DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=37019>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37019 ------- Additional Comments From [EMAIL PROTECTED] 2005-10-13 17:26 ------- Ok, did some more checks, and the solution before was only dealing with half the problem: public void increment(final double d) { if (Double.isNaN(value) || Double.isNaN(d)) value = Double.NaN; else if (d > value) value = d; n++; } public double evaluate(final double[] values, final int begin, final int length) { double max = Double.NaN; if (test(values, begin, length)) { max = values[begin]; for (int i = begin; i < begin + length; i++) { if (Double.isNaN(values[i])) return Double.NaN; max = (max > values[i]) ? max : values[i]; } } return max; } The solution I added prematurely returns the method as soon as it finds a NaN. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]