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)
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB