---------- Forwarded message ---------- From: Grigory Javadyan <grigory.javad...@gmail.com> Date: Tue, Feb 22, 2011 at 5:32 PM Subject: Re: Python fails on math To: christian schulze <xcr...@googlemail.com>
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). -- http://mail.python.org/mailman/listinfo/python-list