LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Floating Point Functions

Thank you Fredrik and Tom your replies.

Yeah, I know that Excel is not written in a managed language (maybe in the
future). But many times .NET library API implementations call into unmanaged
code. So when this happens, it is quite possible that an Excel function and a
..NET library function converge at a lower layer in the call stack (a
contrived example could be: .NET C# library - PInvoke into msvcrt.ilb -
call pow - get result WHILE Excel directly calls into msvcrt.lib - call pow
- get result ... and the convergence point in this case would be the pow
function).

I guess the gist of my query tries to see if there are multiple fp
implementations floating (no pun intended :-) ) around for similar formats or
is there one central one (like in the PlatformSDK or something). It is quite
possible that there are multiple.

"Fredrik Wahlgren" wrote:


"Joel" wrote in message
...
Wow! I am somewhat offended at the insinuation that I would do something

like
that. That is absolutely the last thing I would ever do. And, besides, my
question is *way* to specific to even garner wanting to distribute Excel

DLLs
around. I.e. There is much more to Excel than just floating point

operations.

If you want to know why, I can give you some idea. I didn't originally
because I didn't want to get to wordy in my original post.

Basically, if you have heard of Rotor (the shared source implementation of
the CLI), you know you can view the source code of the underlying virtual
machine and see how pretty much everything is working under the covers.

For
some work I am doing, I needed to look at how floating point and decimal

work
from the System.Decimal/System.Single/System.Double libary types down to

what
is called in the implementations of those types. I wanted to see if Excel,

a
program that makes use of FP somewhat heavily, follows the same path as

the
.NET implementations. By path, I wanted to see if there was a convergence
point where both are calling into the same APIs or if they are totally
separated. There is obviously more "why" detail, but I can'r really get

into
it because I am not sure it is appropriate for me to do so.

Does that make sense?


Exce is not based on .NET so I assume there are some differences,. AFAIK
excel uses 8 byte doubles for floating point arithmetic. I seem to remember
that Excel does compress doubles into a 4 byte structure when you save a
file. It's not a float.

I don't think there's much of a common API . My guess is that a
System.Double is pretty much the same as a double in C.
/Fredrik






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
import from files with data in ieee floating point format davidka27 Excel Discussion (Misc queries) 1 March 14th 10 05:59 AM
Unacceptable floating point errors Jeff in GA Excel Discussion (Misc queries) 32 September 25th 09 11:26 AM
Convert floating point to Hours and Minutes ?? [email protected] Excel Discussion (Misc queries) 1 August 19th 06 02:26 AM
setting a floating decimel point Rose New Users to Excel 2 April 29th 05 06:10 PM
Handle Floating point rounding errors, efficiently Peter T Excel Programming 6 December 19th 04 04:34 PM


All times are GMT +1. The time now is 09:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"