[BUG][POSSIBLE FIXES]

Andres Valloud sqrmax at cvtci.com.ar
Tue Oct 5 05:26:18 UTC 1999


Hi.

> My daughter has spent the last year being tormented by teachers
> asking her to round things to the nearest tenth.  Another example is
> money after an interest computation, where you might regularly ask:
> 
>         (...expr...) roundTo: 0.01
> 
> remembering that if we are using such a thing in a series of
> computations, we probably want to keep an accumulated sum and then
> subtract to arrive at our last result (or assign the remaining
> fractional penny to a "special" account :-)).

I also remember that for some floats, if you sent #roundTo: 0.01, the
answer was 

blablabla.xy9999999999999999999999999999999999999999999999...

Andres.





More information about the Squeak-dev mailing list