Message333443
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. |
|
Date |
User |
Action |
Args |
2019-01-11 08:32:45 | Petter S | set | recipients:
+ Petter S, lisroach, xtreak, FR4NKESTI3N |
2019-01-11 08:32:44 | Petter S | set | messageid: <1547195564.24.0.116430370553.issue35656@roundup.psfhosted.org> |
2019-01-11 08:32:44 | Petter S | link | issue35656 messages |
2019-01-11 08:32:44 | Petter S | create | |
|