5.3 printShowingDecimalPlaces: 2 displays '5.29' insteadof'5.30'

Sebastian Sastre ssastre at seaswork.com
Thu Nov 22 21:11:42 UTC 2007


> And if it prints 5.29s2, then it is because of
> http://bugs.squeak.org/view.php?id=5693 that you did not care to read.
> 
Hey! I was reading that. That's why I'm now converting values to scaled
decimals without even passing the string representation entered in the
widget to number conversion through floats!
 
> * 5.3 asTrueFraction < (53/10)
> * ScaledDecimal use truncated print,
> => you have the explanation.
> 
> The only thing you should try if you cannot get read of Float 
> because of 3rd party code is:
> 
> (5.3 asScaledDecimal: 2) roundTo: 0.01s2.
> 
> Nicolas
> 

Thanks for helping so accurately,

Sebastian




More information about the Squeak-dev mailing list