2009/7/8 Igor Stasenko <[email protected]>:
> 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
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to