[Newbies] How to round a float?
Herbert König
herbertkoenig at gmx.net
Wed Feb 4 12:19:17 UTC 2015
Hi,
> 100 * (1.05 raisedTo: 10) roundTo: 0.01 162.89000000000001
> "162.88946267774418" "unrounded"
> 100 * (1.05 raisedTo: 15) roundTo: 0.01 207.89000000000001
> "207.8928179411367" "unrounded"
this is to be expected and I think you need a bigger pond than the
Squeak image to fish for that. I think I found the hint inside Squeak
only because I know the reason. I think you did your fishing well.
I'll explain later because maybe I can learn better fishing from Ben's
reply.
Cheers,
Herbert
More information about the Beginners
mailing list