5.3 printShowingDecimalPlaces: 2 displays '5.29' instead of '5.30'

tim Rowledge tim at rowledge.org
Thu Nov 22 18:17:46 UTC 2007

On 22-Nov-07, at 10:03 AM, Sebastian Sastre wrote:

> Hi there,
>     I'm geting this unexpected result from a Squeak 3.9 final 7067  
> image.
>     I need to display money values with two digits. Has anybody a  
> sugestion to correctly achieve this?

First and most important - don't maintain money as floating point  
Second - never do simple compares of floating point numbers.

tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: FSRA: Forms Skip and Run-Away

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20071122/158d1d19/attachment.htm

More information about the Squeak-dev mailing list