Python fails on math

Grigory Javadyan grigory.javadyan at
Tue Feb 22 14:33:03 CET 2011

---------- Forwarded message ----------
From: Grigory Javadyan <grigory.javadyan at>
Date: Tue, Feb 22, 2011 at 5:32 PM
Subject: Re: Python fails on math
To: christian schulze <xcr4cx at>

Everybody knows you can't just compare floating point values for
equality with a simple ==.
Instead, check that the difference between them is less than some
predefined epsilon (0.0000001 for example, depends on how much
precision you want).

More information about the Python-list mailing list