[Tutor] How to correct decimal addition.

Keith Winston keithwins at gmail.com
Sun Jan 26 04:22:38 CET 2014


On Sat, Jan 25, 2014 at 5:09 PM, Oscar Benjamin
<oscar.j.benjamin at gmail.com> wrote:
> Perhaps it would be better though to point at this:
>>>> round(D('0.123456'), 3)
> Decimal('0.123')

I think you are right. I didn't even think of round(). I think we have
confounded two issues in this thread, the internal
representation/accuracy, and the final presentation. They aren't
really the same thing, unless we force them to be (i.e. using ints).

-- 
Keith


More information about the Tutor mailing list