[Piglit] [PATCH 7/7] cl: Fix sinpi expected values

Jan Vesely jan.vesely at rutgers.edu
Fri Nov 3 18:11:15 UTC 2017


account for fp32 rounding.
sinpi(n) should return 0 for any integer n

Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 generated_tests/gen_cl_math_builtins.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index a4cae5314..98950c3ac 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -696,12 +696,11 @@ tests = {
         'arg_types' : [F, F],
         'function_type': 'ttt',
         'values' : [
-            [0.0, 0.0, sin(pi*pi/2), sin(pi*3*pi/2), sin(2*pi*pi),
-             sin(pi*1.12345), sin(pi*7), sin(pi*8), sin(pi*pow(2,20)),
-             sin(pi*pow(2,24)), sin(pi*pow(2,120)), float("nan")],#Result
+            [0.0, 0.0, sin(pi*pi/2), sin(pi*3*pi/2), sin(2* M_PI_F * pi),
+             sin(pi*1.12345), 0.0, 0.0, 0.0, 0.0, 0.0, float("nan")],#Result
             [0.0, 1.0, pi / 2,       3 * pi / 2,     2 * pi,
-             1.12345        , 7,         8,         pow(2,20),
-             pow(2,24),         pow(2,120),         float("nan")] #Arg0
+             1.12345        , 7.0, 8.0, pow(2,20), pow(2,24), pow(2,120),
+             float("nan")] #Arg0
         ],
         'tolerance' : 4
     },
-- 
2.13.6



More information about the Piglit mailing list