[Twisted-Python] test_nmea failing

Moshe Zadka m at moshez.org
Wed Dec 18 00:26:19 EST 2002


On Tue, 17 Dec 2002, Bob Ippolito <bob at mastersofbranding.com> wrote:

> Yuck.. floating point precision bugs.. they should have a "close 
> enough" equality operator for the damn things.

No they shouldn't. K tried, IIRC, and it was a dud. You want epsilon
comparison? abs(x-y)<0.0001 works fine for me.
Never ever ever compare floats for equality.
Ever.




More information about the Twisted-Python mailing list