RFR: 8377223: Port fdlibm atanh to Java

Joe Darcy darcy at openjdk.org
Wed Feb 18 20:46:47 UTC 2026


On Wed, 18 Feb 2026 10:10:31 GMT, Anton Artemov <aartemov at openjdk.org> wrote:

> Hi, please consider the following changes:
> 
> This is a port of FDLIBM atanh method.

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

> 3637:             int hx,ix;
> 3638:             /*unsigned*/ int lx;
> 3639:             hx = __HI(x);                                        /* high word */

Nit: I'd prefer "//" style comments for the one-liners here.

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

> 3655:             } else
> 3656:                 t = 0.5 * Log1p.compute((x + x)/(one - x));
> 3657:             if (hx >= 0) {

Please consider some smaller-vertical space idiom for this, like a use of the ?: construct, etc.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29782#discussion_r2824361225
PR Review Comment: https://git.openjdk.org/jdk/pull/29782#discussion_r2824366170


More information about the core-libs-dev mailing list