The other approach would be to do equality tests with a fuzz factor, because floating point is like that. But that would probably make things slower.

Here is an example of fuzzy equals:

https://github.com/OpenGamma/Strata/blob/master/modules/math/src/test/java/com/opengamma/strata/math/impl/FuzzyEquals.java

wunder
Walter Underwood
[EMAIL PROTECTED]
http://observer.wunderwood.org/  (my blog)