1. Sarvi Shanmugham
  2. cffi

Commits

Armin Rigo  committed a5dbee2

A passing test.

  • Participants
  • Parent commits 012d6a1
  • Branches default

Comments (0)

Files changed (1)

File testing/test_math.py

View file
     m = ffi.load("m")
     x = m.sin(1.23)
     assert x == math.sin(1.23)
+
+def test_sinf():
+    ffi = FFI()
+    ffi.cdef("""
+        float sinf(float x);
+    """)
+    m = ffi.load("m")
+    x = m.sinf(1.23)
+    assert type(x) is float
+    assert x != math.sin(1.23)    # rounding effects
+    assert abs(x - math.sin(1.23)) < 1E-6