In school teachers told me that 13/10 = 1.3, applications that handle money believe the same (at least the ones that i worked on) and then we have to use some other implementation of numbers because the 3d guys (i also coded some 3d stuff in C) and the speed guys want the default numbers to be fast and inaccurate. Why not the opposite? If you want speed and you are willing to sacrifices presition then use the implementation alternative. On Tue, Jul 7, 2009 at 9:43 PM, Andres Valloud < avalloud@smalltalk.comcastbiz.net> wrote:
The VW tests use something along the lines of
self assert: aResult isWithin: anInteger ulpsFrom: anExpectedValue
Igor Stasenko wrote:
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
-- 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
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Hope is for sissies (Gregory House, M.D.)