July 8, 2009
12:28 a.m.
2009/7/8 Igor Stasenko <siguctua@gmail.com>:
As a compromise, i propose adding:
Float>>isAlmostZero  ^ self abs < Epsilon
And write tests like:
(13/10) = 1.3
in form:
((13/10) - 1.3) isAlmostZero
Yes, there is already #closeTo: with an arbitrary tolerance (absolute or relative, depending if an operand isZero) and some weird side effects: 1.0 closeTo: (10 raisedTo: 310). -> true
-- Best regards, Igor Stasenko AKA sig.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project