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

nicolas cellier ncellier at ifrance.com
Fri Nov 23 21:18:58 UTC 2007


Hernan Wilkinson a écrit :
> just a kick comment.
> We use Fraction, no ScaledDecimal, no Float. We made some changes to 
> fraction to work faster. We didn't see big performance diferences with 
> ScaledDecimal.
> We use measures to represent all type of quantities of some financial 
> instrument. For example:
> 100 dollars
> 100 IBM
> 100 bond (any bond)
> etc.
> 
> Bye,
> Hernan.
> 

You must be right.

ScaledDecimal are just fractions wrapper with special methods to read 
and print...

...that do not necessarily match your required monetary format (thousand 
separator, localized decimal point, no awfull s2 like in 5.30s2, append 
or prepend monetary symbol etc...).

So you inevitably end up with a monetary object having its own 
read/print methods, and ScaledDecimal is not of much help then...

If your Fraction optimisations are significative, please share on Mantis 
or something.

Cheers

Nicolas




More information about the Squeak-dev mailing list