1. Henrik Vendelbo
  2. pypy

Commits

Justin Peel  committed 6801ef3

fix test_sin to deal with Float32's decreased precision

  • Participants
  • Parent commits 84e2299
  • Branches unsigned-dtypes

Comments (0)

Files changed (1)

File pypy/module/micronumpy/test/test_ufuncs.py

View file
  • Ignore whitespace
             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):