[Python-Dev] math.areclose ...? (original) (raw)
Raymond Hettinger python at rcn.com
Sun Feb 5 20:31:42 CET 2006
- Previous message: [Python-Dev] math.areclose ...?
- Next message: [Python-Dev] math.areclose ...?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Bob Ipppolito]
For those of us that already know what we're doing with floating point, areclose would be very convenient to have.
Do you agree that the original proposed use (helping newbs ignore floating point realities) is misguided and error-prone?
Just curious, for your needs, do you want both absolute and relative checks combined into the same function?
Especially for unit testing. I could definitely throw away a bunch of ugly code that uses less correct arbitrary tolerance guesses if it were around.
The unittest module already has assertAlmostEqual(). Does that method meet your needs or does it need to be improved in some way?
Raymond
- Previous message: [Python-Dev] math.areclose ...?
- Next message: [Python-Dev] math.areclose ...?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]