This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Petter S
Recipients FR4NKESTI3N, Petter S, lisroach, xtreak
Date 2019-01-11.08:32:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1547195564.24.0.116430370553.issue35656@roundup.psfhosted.org>
In-reply-to
Content
I am of the opposite opinion. :-) 

> if I know roughly what the float should be why would I not want to test it for exactness?

When testing algorithms, it is often the case that the answer should be mathematically exactly 2, but due to floating-point inexactness it becomes, say, 1.9999999997 in practice. If I then test for exactly 1.9999999997 the test becomes very brittle and sensitive for e.g. order of multiplications.

Testing floating point numbers with a relative error is essential in many application.
History
Date User Action Args
2019-01-11 08:32:45Petter Ssetrecipients: + Petter S, lisroach, xtreak, FR4NKESTI3N
2019-01-11 08:32:44Petter Ssetmessageid: <1547195564.24.0.116430370553.issue35656@roundup.psfhosted.org>
2019-01-11 08:32:44Petter Slinkissue35656 messages
2019-01-11 08:32:44Petter Screate