[Vm-dev] FloatMathPlugin crashes the VM if compiled with gcc optimization

Andreas Raab andreas.raab at gmx.de
Sun Dec 26 21:52:11 UTC 2010


On 12/26/2010 10:24 PM, Igor Stasenko wrote:
> btw, how old that fdlibm portions there?
> maybe updating it will be a simple solution to that issue?

I've never found any newer release than here:

http://www.netlib.org/fdlibm/

> Oh, and please, can you shed some light on the history, why for floating-point
> math in Squeak, VM using non-standard math lib, which comes with any C
> compiler, but instead, a  portions of separate 3rd party library?

You would be surprised to find out just how much the results of the C 
compiler libraries differ when it comes to edge cases. I've run the 
experiment in the past:

Using Python 2.4:
 >>> import math
 >>> math.cos(1.0e32)

WinXP:    -0.39929634612021897
LinuxX86: -0.49093671143542561

In short, the results *dramatically* vary depending on processor family, 
processor version, C compiler libraries, and so on. None of the 
libraries produce cross-platform bit-identical results. fdlibm does.

Cheers,
   - Andreas


More information about the Vm-dev mailing list