Python math is off by .000000000000045

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Feb 22 23:21:31 CET 2012


On Wed, 22 Feb 2012 19:26:26 +0100, Christian Heimes wrote:

> Python uses the platforms double precision float datatype. Floats are
> almost never exact.

Well, that's not quite true. Python floats are always exact. They just 
may not be exactly what you want :)

Pedantic-but-unhelpful-as-always-ly y'rs,


-- 
Steven



More information about the Python-list mailing list