You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/08/06 21:03:26 UTC

[GitHub] [commons-math] aherbert commented on a change in pull request #194: MATH-1573 - Redundant local variable

aherbert commented on a change in pull request #194:
URL: https://github.com/apache/commons-math/pull/194#discussion_r684502997



##########
File path: commons-math-legacy-core/src/main/java/org/apache/commons/math4/legacy/core/jdkmath/AccurateMath.java
##########
@@ -1600,9 +1600,8 @@ public static double pow(final double x, final double y) {
                     z = z * lnb + 1.0;
                     z *= lnb;
 
-                    final double result = exp(lna, z, null);
                     //result = result + result * z;
-                    return result;
+                    return exp(lna, z, null);

Review comment:
       I am wondering about the cryptic commented out code here. It would be run after the result has been computed with `exp`. So if you simply return the result of `exp` then the comment is before the `exp` and out of context. I would leave this unchanged until the reason for commenting out the final computation is clarified.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org