Re: NUmber rounding
Posted by David T. Lewis on Sep 23, 2011; 5:45pm
URL: https://forum.world.st/NUmber-rounding-tp3835875p3837554.html
On Fri, Sep 23, 2011 at 07:18:50AM -0700, Jeff Gray wrote:
> Thanks Sven.
> Works a treat.
> Without the asFloat the printOn: displays 306.66s2 (that is, it appends the
> scale).
> The asFloat message then sorts that out and I get just what I need.
Just a caution in case you are not aware - don't use floating point
for financial calculations. A quick google search will give you the
details, but it is essentially *never* ok to do financial calculations
in floating point math. ScaledDecimal should be fine though.
Dave