[Piglit] [PATCH 6/7] cl: Adjust cospi expected values to account for fp32 rounding

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


Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
 generated_tests/gen_cl_math_builtins.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index 149322ca6..a4cae5314 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -271,7 +271,7 @@ tests = {
         'arg_types' : [F, F],
         'function_type': 'ttt',
         'values' : [
-            [1.0, cos(pi*pi/2), cos(pi*3*pi/2), cos(2*pi*pi), cos(pi*1.12345), cos(pi*pow(2,20)), cos(pi*pow(2,24)), 1.0, float("nan")], # Result
+            [1.0, cos(pi * M_PI_F / 2), cos(pi*3*pi/2), cos(2 * M_PI_F * pi), cos(pi*1.12345), cos(pi*pow(2,20)), cos(pi*pow(2,24)), 1.0, float("nan")], # Result
             [0.0, pi / 2,       3 * pi / 2,     2 * pi,       1.12345        , pow(2,20),         pow(2,24),         pow(2,120),         float("nan")]  # Arg0
         ],
         'tolerance' : 4
-- 
2.13.6



More information about the Piglit mailing list