Mark Dickinson <dicki...@gmail.com> added the comment:

The only issue with subnormals is that a simple relative error test is 
usually inappropriate.  For example, on an IEEE 754 machine 2**-1073 
should almost always be considered a good approximation to 2**-1074, since 
the two floats are adjacent; but the relative error here is 100%!  But I 
see that in the code you linked you have a combination of a relative error 
and absolute error tests, so this isn't a problem.
There's something similar to your code in the Python tests:  see function 
'almostEqualF' in Lib/test/test_cmath.py.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6675>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to