Unnecessary instantiation.
Project: http://git-wip-us.apache.org/repos/asf/commons-numbers/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-numbers/commit/5dbfebeb Tree: http://git-wip-us.apache.org/repos/asf/commons-numbers/tree/5dbfebeb Diff: http://git-wip-us.apache.org/repos/asf/commons-numbers/diff/5dbfebeb Branch: refs/heads/feature__NUMBERS-51__field Commit: 5dbfebebe6a85d844abe0587404d7b3e70299229 Parents: 818603c Author: Gilles Sadowski <gil...@harfang.homelinux.org> Authored: Thu Feb 1 13:05:56 2018 +0100 Committer: Gilles Sadowski <gil...@harfang.homelinux.org> Committed: Thu Feb 1 13:05:56 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/5dbfebeb/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 e544e28..a56c641 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 @@ -777,7 +777,7 @@ public class Complex implements Serializable { imaginary == Double.POSITIVE_INFINITY) { return new Complex(0, Math.PI * 0.5); } - return this.add(Complex.ONE).divide(Complex.ONE.subtract(this)).log().divide(new Complex(2)); + return this.add(Complex.ONE).divide(Complex.ONE.subtract(this)).log().multiply(0.5); } /** * Compute the