[Newbies] problem with numbers

JuanjoE juanjoe at gmail.com
Mon Jul 13 20:26:58 UTC 2009


Hello.
I'm having a problem with numbers in squeak, I'm using a 3.10.2 image update
#7179 on a vm 3.8.18b1 running on a OSX 10.5

If I open a workspace and evaluate 1203.22 - 1200 I get  3.220000000000027

It's seems that is something working wrong on this.

I tried with ScaledDecimal but when I print the numbers it appends a 's2'
after it. I'm doing something like ((((1203.22 - 1200)*100) asInteger)/100)
asFloat as a workarround, but I think that there may be a better way to work
with this problem

Thanks


El problema no es mentirse, el problema es creerse
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20090713/3a3e6d1d/attachment.htm


More information about the Beginners mailing list