RFR(M): 8015396 - double a%b returns NaN for some (a, b) (|a| < inf, |b|>0)

Christian Tornqvist christian.tornqvist at oracle.com
Mon Dec 7 21:11:03 UTC 2015


Hi everyone,

 

Please review this change that adds a workaround for a Windows x64 fmod
issue found in Visual Studio 2013. Microsoft has acknowledged that this a
problem but has said that they don't intend to fix it in Visual Studio 2013
or 2015. The workaround is to use JDK libfdlibm's implementation of fmod
instead of the CRT version for Windows x64 only.

 

The code (one function) was copied into the JVM and kept as close to the
original as possible, this meant disabling a warning using pragma's and
copying 2 #defines from a header file.

 

Webrev:

http://cr.openjdk.java.net/~ctornqvi/webrev/8015396/webrev.00/index.html

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-8015396

 

Testing done on Windows x64:

hotspot/test/:hotspot_all

jdk/test/:tier1

jdk/test/:tier2

jdk/test/:tier3

jck/api/java_math

jck/lang

jck/vm

 

Thanks,

Christian

 



More information about the hotspot-runtime-dev mailing list