Wrong operator.
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/b769356e Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/b769356e Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/b769356e Branch: refs/heads/master Commit: b769356edd2a31bef5475ec9df76c260a2c9155c Parents: 03ce049 Author: Gilles Sadowski <gil...@harfang.homelinux.org> Authored: Sun Mar 18 00:41:41 2018 +0100 Committer: Gilles Sadowski <gil...@harfang.homelinux.org> Committed: Sun Mar 18 00:41:41 2018 +0100 ---------------------------------------------------------------------- .../src/main/java/org/apache/commons/numbers/complex/Complex.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-numbers/blob/b769356e/commons-numbers-complex/src/main/java/org/apache/commons/numbers/complex/Complex.java ---------------------------------------------------------------------- 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 22e85f1..10b8709 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 @@ -292,7 +292,7 @@ public final class Complex implements Serializable { x = Math.copySign(Double.POSITIVE_INFINITY, c) * a; y = Math.copySign(Double.POSITIVE_INFINITY, c) * b; } else if ((Double.isInfinite(a) && Double.isInfinite(b)) && - !Double.isInfinite(c) & !Double.isInfinite(d)) { + !Double.isInfinite(c) && !Double.isInfinite(d)) { a = Math.copySign(Double.isInfinite(a) ? 1.0 : 0.0, a); b = Math.copySign(Double.isInfinite(b) ? 1.0 : 0.0, b); x = Double.POSITIVE_INFINITY * (a*c + b*d);