You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gilles Sadowski (Jira)" <ji...@apache.org> on 2026/10/08 13:20:00 UTC

[jira] [Updated] (MATH-1692) "AccurateMath": Bug in "asinh" and "acosh"

     [ https://issues.apache.org/jira/browse/MATH-1692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gilles Sadowski updated MATH-1692:
----------------------------------
    Issue Type: Bug  (was: Test)
       Summary: "AccurateMath": Bug in "asinh" and "acosh"  (was: Test failures in Java 27)

Thanks for the quick analysis.
You are welcome to apply the fixes as you see fit.

> "AccurateMath": Bug in "asinh" and "acosh"
> ------------------------------------------
>
>                 Key: MATH-1692
>                 URL: https://issues.apache.org/jira/browse/MATH-1692
>             Project: Commons Math
>          Issue Type: Bug
>          Components: legacy-core
>    Affects Versions: 4.0-beta1
>            Reporter: Gilles Sadowski
>            Priority: Minor
>              Labels: comparison, jdk27, unit-test
>
> Current code builds fine with JDK 11, 17 and 21, but with JDK 27, the following failures occur:
> {noformat}
> [INFO] Running org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest
> [ERROR] Tests run: 72, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.075 s <<< FAILURE! -- in org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictCompar
> isonTest
> [ERROR] org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.test1[55] -- Time elapsed: 0.004 s <<< FAILURE!
> java.lang.AssertionError: double asinh(-1.7976931348623157E308) expected -710.4758600739439 actual -Infinity entries [6]
>         at org.junit.Assert.fail(Assert.java:89)
>         at org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.reportFailedResults(AccurateMathStrictComparisonTest.java:161)
>         at org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.callMethods(AccurateMathStrictComparisonTest.java:187)
>         at org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.setupMethodCall(AccurateMathStrictComparisonTest.java:212)
>         at org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.test1(AccurateMathStrictComparisonTest.java:94)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:583)
> [ERROR] org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.test1[56] -- Time elapsed: 0.001 s <<< FAILURE!
> java.lang.AssertionError: double acosh(-1.7976931348623157E308) expected NaN actual Infinity entries [6]
>         at org.junit.Assert.fail(Assert.java:89)
>         at org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.reportFailedResults(AccurateMathStrictComparisonTest.java:161)
>         at org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.callMethods(AccurateMathStrictComparisonTest.java:187)
>         at org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.setupMethodCall(AccurateMathStrictComparisonTest.java:212)
>         at org.apache.commons.math4.legacy.core.jdkmath.AccurateMathStrictComparisonTest.test1(AccurateMathStrictComparisonTest.java:94)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:583)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)