[Piglit] [PATCH 3/7] cl: Adjust tanpi epxected results to account for fp32 rounding

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


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

diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py
index 5bbc72a0a..e6abbf50a 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -734,8 +734,9 @@ tests = {
         'arg_types': [F, F],
         'function_type': 'ttt',
         'values': [
-            [0.0, 1.0,  0.0, sqrt(3), -1.0,   tan(pi * 2.234567), float("nan") ], # Result
-            [0.0, 1/4, 1,  1/3,    3/4, 2.234567 ,     float("nan") ], # Arg1
+            #fp32 representation of 2.234567 is 0x1.1e064ap+1
+            [0.0, 1.0,  0.0, sqrt(3), -1.0,   tan(M_PI_F * float.fromhex('0x1.1e064ap+1')), float("nan") ], # Result
+            [0.0, 1/4, 1,  1/3,    3/4, 2.234567,     float("nan") ], # Arg1
         ],
         'tolerance': 6
     },
-- 
2.13.6



More information about the Piglit mailing list