commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [08/14] commons-numbers git commit: Unnecessary instantiation.
Date Thu, 01 Feb 2018 14:09:00 GMT
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/master
Commit: 5dbfebebe6a85d844abe0587404d7b3e70299229
Parents: 818603c
Author: Gilles Sadowski <gilles@harfang.homelinux.org>
Authored: Thu Feb 1 13:05:56 2018 +0100
Committer: Gilles Sadowski <gilles@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


Mime
View raw message