On Wed, 11 Feb 2026 11:04:02 GMT, Anton Artemov <[email protected]> wrote:
>> Hi, please consider the following changes:
>>
>> This is a port of FDLIBM acosh method.
>
> Anton Artemov has updated the pull request incrementally with two additional
> commits since the last revision:
>
> - 8376665: Stylistical fixes.
> - 8376665: Stylistical fixes.
Otherwise looks fine.
src/java.base/share/classes/java/lang/FdLibm.java line 3573:
> 3571: * acosh(x) is defined so that acosh(cosh(alpha)) = alpha,
> -∞ < alpha < &infin
> 3572: * and cosh(acosh(x)) = x, 1 <= x < &infin.
> 3573: * It can be written as acosh(x) = ln(x + sqrt(x^2 - 1)), 1 <=
> x < &infin.
It's `∞` with a semicolon, like any HTML entity name.
Also, replace `<` with `<`
src/java.base/share/classes/java/lang/FdLibm.java line 3574:
> 3572: * and cosh(acosh(x)) = x, 1 <= x < &infin.
> 3573: * It can be written as acosh(x) = ln(x + sqrt(x^2 - 1)), 1 <=
> x < &infin.
> 3574: * acosh(x) := log(x)+ln2, if x is large; else
Using both log and ln in the same context might be confusing. Consistency would
be welcome.
src/java.base/share/classes/java/lang/Math.java line 2793:
> 2791: * Returns the inverse hyperbolic cosine of a {@code double} value.
> 2792: * The inverse hyperbolic cosine of <i>x</i> is defined to be the
> function such that
> 2793: * acosh({@linkplain Math#cosh cosh(<i>x</i>)}) = <i>x</i> for any
> <i>x >= 0</i>.
Suggestion:
* acosh({@linkplain Math#cosh cosh(<i>x</i>)}) = <i>x</i> for any
<i>x</i> >= 0.
src/java.base/share/classes/java/lang/StrictMath.java line 2202:
> 2200: * Returns the inverse hyperbolic cosine of a {@code double} value.
> 2201: * The inverse hyperbolic cosine of <i>x</i> is defined to be the
> function such that
> 2202: * acosh({@linkplain Math#cosh cosh(<i>x</i>)}) = <i>x</i> for any
> <i>x >= 0</i>.
Suggestion:
* acosh({@linkplain Math#cosh cosh(<i>x</i>)}) = <i>x</i> for any
<i>x</i> >= 0.
-------------
PR Review: https://git.openjdk.org/jdk/pull/29488#pullrequestreview-3785030643
PR Review Comment: https://git.openjdk.org/jdk/pull/29488#discussion_r2793485148
PR Review Comment: https://git.openjdk.org/jdk/pull/29488#discussion_r2793485365
PR Review Comment: https://git.openjdk.org/jdk/pull/29488#discussion_r2793485903
PR Review Comment: https://git.openjdk.org/jdk/pull/29488#discussion_r2793486254