Fix buggy accuracy test

This commit is contained in:
Mark Dickinson 2009-09-30 16:58:01 +00:00
parent 657024cd26
commit 8ca7482cc9

View file

@ -958,7 +958,7 @@ class MathTests(unittest.TestCase):
continue
if not math.isnan(expected) and not math.isnan(got):
diff_ulps = to_ulps(expected) - to_ulps(got)
if diff_ulps <= ALLOWED_ERROR:
if abs(diff_ulps) <= ALLOWED_ERROR:
continue
if isinstance(got, str) and isinstance(expected, str):