[pypy-svn] pypy fast-forward: acosh(x) is only defined for x >= 1.0.
arigo
commits-noreply at bitbucket.org
Mon Jan 17 10:13:33 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: fast-forward
Changeset: r40743:c57ac70a2024
Date: 2011-01-17 10:11 +0100
http://bitbucket.org/pypy/pypy/changeset/c57ac70a2024/
Log: acosh(x) is only defined for x >= 1.0.
diff --git a/pypy/rpython/lltypesystem/module/test/test_llinterp_math.py b/pypy/rpython/lltypesystem/module/test/test_llinterp_math.py
--- a/pypy/rpython/lltypesystem/module/test/test_llinterp_math.py
+++ b/pypy/rpython/lltypesystem/module/test/test_llinterp_math.py
@@ -17,15 +17,19 @@
except AttributeError:
fn = getattr(rarithmetic, name)
assert_exact = False
+ if name == 'acosh':
+ value = 1.3 # acosh(x) is only defined for x >= 1.0
+ else:
+ value = 0.3
#
def next_test(self):
def f(x):
return fn(x)
- res = self.interpret(f, [0.3])
+ res = self.interpret(f, [value])
if assert_exact:
- assert res == f(0.3)
+ assert res == f(value)
else:
- assert abs(res - f(0.3)) < 1e-10
+ assert abs(res - f(value)) < 1e-10
return next_test
def new_binary_test(name):
More information about the Pypy-commit
mailing list