falhenaki commented on code in PR #1216:
URL: https://github.com/apache/poi/pull/1216#discussion_r3789710722


##########
poi/src/main/java/org/apache/poi/ss/formula/functions/Irr.java:
##########
@@ -130,7 +168,149 @@ public static double irr(double[] values, double guess) {
             x0 = x1;
         }
         // maximum number of iterations is exceeded
-        LOGGER.atWarn().log("Returning NaN because IRR has reached max number 
of iterations allowed: {}", MAX_ITERATION_COUNT);

Review Comment:
   Those three logs all say "Returning NaN because ...", and after this change 
that's no longer what happens at those points. A NaN from the Newton loop is 
now just an internal signal to try the bracketed fallback, it isn't returned to 
the caller anymore. If I kept the logs where they were, every cash flow the 
fallback rescues would warn about a NaN the caller never actually sees. So I 
moved the logs to the two spots where a NaN really is final, the message is 
accurate there.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to