diff options
author | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-03 12:40:29 -0400 |
---|---|---|
committer | Jan Vesely <jan.vesely@rutgers.edu> | 2017-11-09 13:59:54 -0500 |
commit | b1c3a96d20ffd8c1fb0f0234c2ff70fbbe32bbd5 (patch) | |
tree | 9a562e3bfc349bebcea8316ce3d8935fdaefdb6d /generated_tests | |
parent | 9cec8c4f2c9cc16c4646bc8cf0c5c18adc98e5d1 (diff) |
cl: Adjust sincos expected values to account for fp32 rounding
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Diffstat (limited to 'generated_tests')
-rw-r--r-- | generated_tests/gen_cl_math_builtins.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generated_tests/gen_cl_math_builtins.py b/generated_tests/gen_cl_math_builtins.py index bd1a859b7..149322ca6 100644 --- a/generated_tests/gen_cl_math_builtins.py +++ b/generated_tests/gen_cl_math_builtins.py @@ -674,8 +674,10 @@ tests = { 'arg_types' : [F, F, F], 'function_type': 'ttt', 'values' : [ - [0.0, 1.0, 0.0, -1.0, 0.0, sin(2.234567), sin(7), sin(8), sin(pow(2,20)), sin(pow(2,24)), sin(pow(2,120)), float("nan")], # Result0 - [1.0, 0.0, -1.0, 0.0, 1.0, cos(1.12345), cos(7), cos(8), cos(pow(2,20)), cos(pow(2,24)), cos(pow(2,120)), float("nan")], # Result1 + [0.0, 1.0, sin(M_PI_F), -1.0, sin(2 * M_PI_F), sin(2.234567), sin(7), sin(8), sin(pow(2,20)), sin(pow(2,24)), sin(pow(2,120)), float("nan")], # Result0 + # using libm cosf(3.0f * M_PI / 2.0f) == 0x1.99bc5cp-27 + # this is different form what python gives us + [1.0, cos(M_PI_F / 2), -1.0, float.fromhex('0x1.99bc5cp-27'), 1.0, cos(2.234567), cos(7), cos(8), cos(pow(2,20)), cos(pow(2,24)), cos(pow(2,120)), float("nan")], # Result1 [0.0, pi / 2, pi, 3 * pi / 2, 2 * pi, 2.234567, 7, 8, pow(2,20), pow(2,24), pow(2,120), float("nan")] # Arg0 ], 'tolerance': 4, |