Hi,

I recently download a recent version of MinGW-w64 cross-compiler (compile for 
64 bit Windows on Linux), to replace a old version I have been using
for about two years. 

I have found two problems that didn't occur with the old version of MinGW-w64:

1) log(-0.0) now returns NaN, instead of -infinity (log(0.0) does return 
-infinity). 

I think the standard behaviour is to return -infinity. Our code (which runs on 
many platforms) seems to rely on this. In most man pages, the exact behaviour 
for -0.0 is not always specified, but it is for Mac OS X, and there it is 
specified to return -inifity.

2) pow(2.0, 3) now returns 7.9999999999999982 instead of 8.0. While this
is close to 8.0, on all other platforms we get 8.0 (and also from the previous 
version of MinGW-w64), and the difference from 8.0 (1.8e-15) seems to be about 
twice as large the expected precision.

I was also surprised that the bheaviour is different between the old
and recent versions of MinGW-w64 -- these functions are in the math library 
(libm), and I thought in cross-compiled MinGW, all standard 
C functions are supplied by the native Microsoft libraries, so there should not 
be any difference in behaviours between different versions of MinGW-w64

Any suggestion on how the problems can be fixed, and are these functions 
defined in MinGW or are the Microsoft versions used? If the Microsoft versions 
are used, why is there this difference?

Thanks in advance for any information and help!

Kish Shen

 


      

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to