commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherb...@apache.org
Subject [commons-numbers] 02/04: Fix asinh odd equality for infinite imaginary.
Date Thu, 05 Dec 2019 00:45:53 GMT
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 4e2d62b34ac5b43ba3c29ba30dda98bd1a0665eb
Author: Alex Herbert <aherbert@apache.org>
AuthorDate: Wed Dec 4 23:22:09 2019 +0000

    Fix asinh odd equality for infinite imaginary.
---
 .../src/main/java/org/apache/commons/numbers/complex/Complex.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
index 1a7abfe..490380b 100644
--- a/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
+++ b/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java
@@ -1043,7 +1043,7 @@ public final class Complex implements Serializable  {
                 return z == this ? result : result.conjugate();
             }
             if (Double.isInfinite(imaginary)) {
-                return new Complex(Double.POSITIVE_INFINITY, Math.copySign(PI_OVER_2, imaginary));
+                return new Complex(Math.copySign(Double.POSITIVE_INFINITY, real), Math.copySign(PI_OVER_2,
imaginary));
             }
             // imaginary is NaN
             return NAN;


Mime
View raw message