Meaning of Float>>closeTo:
Bert Freudenberg
bert at freudenbergs.de
Fri Mar 2 12:37:52 UTC 2007
On Mar 2, 2007, at 12:55 , Damien Cassou wrote:
> Hi,
>
> I would like to know what is the exact meaning of #closeTo:.
>
> 999999 closeTo: 999899.00011. => true
> 999999 closeTo: 999899.0001. => false
>
> Is it a bug ? Is it a problem with how computer deal with floating
> point numbers ?
No, one is just closer than the other. One is below the threshold and
one above.
- Bert -
More information about the Squeak-dev
mailing list
|