[Newbies] ScaledDecimal implementation (was: Number formatting
printf/sprintf for Squeak?)
Michael van der Gulik
mikevdg at gmail.com
Wed Feb 18 20:21:42 UTC 2009
On Thu, Feb 19, 2009 at 8:28 AM, Chris Cunningham
<cunningham.cb at gmail.com>wrote:
> I'd be leary of basing Currency off of ScaledDecimal, especially if there
> is to be much manipulation of it (such as multiplication or division). The
> reason is that ScaledDecimal keeps the representation of their numbers as
> fractions under the covers - which can results in some odd (and incorrect)
Could you give me an example? It isn't immediately intuitive to me what
incorrect results might occur. Rounding errors maybe?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners