RFR: 8375285: Port fdlibm asinh to Java [v8]

Anton Artemov aartemov at openjdk.org
Thu Feb 5 08:51:18 UTC 2026


On Wed, 4 Feb 2026 13:22:16 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8375285: Addressed reviewer's comments.
>
> src/java.base/share/classes/java/lang/FdLibm.java line 3531:
> 
>> 3529:      *
>> 3530:      * Special cases:
>> 3531:      *      only asinh(±0))=±0) is exact for finite x.
> 
> There are two `)` too much.

Fixed.

> test/jdk/java/lang/Math/HyperbolicTests.java line 26:
> 
>> 24: /*
>> 25:  * @test
>> 26:  * @bug 4851625 4900189 4939441
> 
> Not sure if this requires the new bug ID.

I think since we have a issue per method, it is not worth having 3 extra bug ids here.

> test/jdk/java/lang/Math/HyperbolicTests.java line 1533:
> 
>> 1531: 
>> 1532: 
>> 1533:         for (int i = 0; i < testCases.length; i++) {
> 
> Why not enhanced `for`, like in the NaN loop below?

No particular reason, I looked at other tests, some use enhanced for loop, some do not. I changed to enhanced, it's a bit more easy to read.

> test/jdk/java/lang/Math/HyperbolicTests.java line 1712:
> 
>> 1710:     }
>> 1711: 
>> 1712:     public static int testAsinhCaseWithTolerance(double input,
> 
> This method is never invoked, IIUC.

Yes, I see the same for existing methods like `sinh`, `cosh`, `tanh`. Should such methods there be removed then?

> test/jdk/java/lang/StrictMath/ExhaustingTests.java line 26:
> 
>> 24: /*
>> 25:  * @test
>> 26:  * @bug 8301833 8302026 8301444 8302028 8302040 8302027 8304028
> 
> Bug ID? Not sure.

I don't think we need to add anything, see above.

> test/jdk/java/lang/StrictMath/HyperbolicTests.java line 29:
> 
>> 27: /*
>> 28:  * @test
>> 29:  * @bug 4851625 8301444
> 
> Not sure if this requires the new bug ID.

I don't think we need to add anything, see above.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29273#discussion_r2767772829
PR Review Comment: https://git.openjdk.org/jdk/pull/29273#discussion_r2767775949
PR Review Comment: https://git.openjdk.org/jdk/pull/29273#discussion_r2767773917
PR Review Comment: https://git.openjdk.org/jdk/pull/29273#discussion_r2767775285
PR Review Comment: https://git.openjdk.org/jdk/pull/29273#discussion_r2767776514
PR Review Comment: https://git.openjdk.org/jdk/pull/29273#discussion_r2767776196


More information about the core-libs-dev mailing list