Hello Luc. > [...] > > I propose to change the "maxUlps > 0" into "maxUlps >= 0" and either > > 1) comment out the corresponding asserts (just as the other ones in > the file are commented out) > 2) replace the asserts by a real test and throw a > MathIllegalArgumentException > 3) remove the asserts without replacement > > I would prefer choice 1. > > What do you think ?
The line with the "assert" was a remnant from the original code: http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm where a paragraph warns about the caveat related to NaNs. I think that this is in effect handled with the last line of the Java code: ----- return isEqual && !Double.isNaN(x) && !Double.isNaN(y); ----- Thus, the assert not necessary. Option 3) would be fine, I think. Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org