Author: Justin Peel <[email protected]>
Branch: unsigned-dtypes
Changeset: r47031:6801ef32508e
Date: 2011-09-02 13:29 -0600
http://bitbucket.org/pypy/pypy/changeset/6801ef32508e/
Log: fix test_sin to deal with Float32's decreased precision
diff --git a/pypy/module/micronumpy/test/test_ufuncs.py
b/pypy/module/micronumpy/test/test_ufuncs.py
--- a/pypy/module/micronumpy/test/test_ufuncs.py
+++ b/pypy/module/micronumpy/test/test_ufuncs.py
@@ -234,7 +234,7 @@
assert b[i] == math.sin(a[i])
a = sin(array([True, False], dtype=bool))
- assert a[0] == sin(1)
+ assert abs(a[0] - sin(1)) < 1e-7 # a[0] will be less precise
assert a[1] == 0.0
def test_cos(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit