[pypy-svn] pypy fast-forward: Skip this test in the same situation as CPython, for the same reason.
arigo
commits-noreply at bitbucket.org
Sun Jan 9 11:44:20 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: fast-forward
Changeset: r40508:25d38cc1bbfc
Date: 2011-01-09 11:42 +0100
http://bitbucket.org/pypy/pypy/changeset/25d38cc1bbfc/
Log: Skip this test in the same situation as CPython, for the same
reason.
diff --git a/pypy/module/math/test/test_math.py b/pypy/module/math/test/test_math.py
--- a/pypy/module/math/test/test_math.py
+++ b/pypy/module/math/test/test_math.py
@@ -47,6 +47,15 @@
def test_fsum(self):
import math
+ # detect evidence of double-rounding: fsum is not always correctly
+ # rounded on machines that suffer from double rounding.
+ # It is a known problem with IA32 floating-point arithmetic.
+ # It should work fine e.g. with x86-64.
+ x, y = 1e16, 2.9999 # use temporary values to defeat peephole optimizer
+ HAVE_DOUBLE_ROUNDING = (x + y == 1e16 + 4)
+ if HAVE_DOUBLE_ROUNDING:
+ skip("fsum is not exact on machines with double rounding")
+
test_values = [
([], 0.0),
([0.0], 0.0),
More information about the Pypy-commit
mailing list