5.3 printShowingDecimalPlaces: 2 displays '5.29' insteadof'5.30'
ncellier at ifrance.com
Thu Nov 22 21:51:30 UTC 2007
and to push library polishing and consistency further, I propose that
(ScaledDecimal readFrom: '5.30') behave as you expect.
Try patch at http://bugs.squeak.org/view.php?id=6779
Sebastian Sastre a écrit :
>> 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.
> Thanks for helping so accurately,
More information about the Squeak-dev