Decimal arithmetic, was Re: Python GUI app to impress the boss?

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Wed Oct 2 08:11:21 EDT 2002


----- Original Message ----- 
From: "Dennis Lee Bieber" <wlfraed at ix.netcom.com>


> Chris Gonnerman fed this fish to the penguins on Tuesday 01 October 
> 2002 06:21 pm:
> 
> > In other words, 0.7 * 0.05 should always be 0.035, and
> > never 0.034999...
> 
>         When I took science classes, I'd have been dinged a 
> few points if I turned in 0.035 -- the rule was to report 
> results to the same significance as the inputs.

Would you have been dinged for not paying attention in class?

This entire thread has to do with MONETARY applications.  If
you are doing SCIENCE you probably want double-precision
floating point (the Python float).

Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
http://newcenturycomputers.net





More information about the Python-list mailing list