RFR: JDK-8304028: Port fdlibm IEEEremainder to Java

Andrey Turbanov aturbanov at openjdk.org
Tue Mar 21 11:45:42 UTC 2023


On Tue, 21 Mar 2023 06:11:57 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> Last but not least, a port of fdlibm IEEEremainder from C to Java. I plan to write some more implementation-specific tests around decision points in the FDLIBM algorithm, but I wanted to get the bulk of the changes out for review first.
> 
> Note that since IEEEremainder was the last native method in StrictMath.java, the StrictMath.c file needed to be deleted (or modified) since StrictMath.h was no longer generated as part of the build. (StrictMath.c was one of the file deleted as part of JDK-8302801).
> 
> For testing, Mach 5 tier 1 through 3 were successful (other than an unrelated test failure that was problem listed) and the exhaustive test was locally run and passed with "16, 16" to increase the testing density.

src/java.base/share/classes/java/lang/FdLibm.java line 3399:

> 3397:                 }
> 3398:             }
> 3399:             if(iy >= -1022)

Suggestion:

            if (iy >= -1022)

src/java.base/share/classes/java/lang/FdLibm.java line 3414:

> 3412:             // fix point fmod
> 3413:             n = ix - iy;
> 3414:             while(n-- != 0) {

Suggestion:

            while (n-- != 0) {

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13113#discussion_r1143247870
PR Review Comment: https://git.openjdk.org/jdk/pull/13113#discussion_r1143249143


More information about the core-libs-dev mailing list