Bug in Decimal??

Gregory Ewing greg.ewing at canterbury.ac.nz
Wed Apr 30 03:59:46 EDT 2014


pleasedontspam at isp.com wrote:
> I compared the results with wolfram Alpha, and
> also with an open source arbitrary precision calculator, which matches Alpha
> results.

Decimal is *not* an arbitrary precision data type, so you
can't expect exact results from it. You can set the precision
to be very large, but it's still essentially a floating point
type, and as such you can expect the last few digits to
depend heavily on the details of the algorithm used.

-- 
Greg



More information about the Python-list mailing list