[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)
> results.
>
>


Could you give me an example? It isn't immediately intuitive to me what
incorrect results might occur. Rounding errors maybe?

Gulik

-- 
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20090219/12cb416d/attachment.htm


More information about the Beginners mailing list