[Piglit] [PATCH 3/9] cl: Add atanh tests

Aaron Watry awatry at gmail.com
Thu Sep 25 13:01:08 PDT 2014


Signed-off-by: Aaron Watry <awatry at gmail.com>
---
 generated_tests/generate-cl-math-builtins.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
index 7d30766..5a1fa02 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -26,7 +26,7 @@
 import os
 
 from genclbuiltins import gen, NEGNAN
-from math import acos, acosh, asin, asinh, atan, atan2, cos
+from math import acos, acosh, asin, asinh, atan, atan2, atanh, cos
 from math import fabs, fmod, pi, pow, sin, sqrt, tan
 
 CLC_VERSION_MIN = {
@@ -36,6 +36,7 @@ CLC_VERSION_MIN = {
     'asinh' : 10,
     'atan' : 10,
     'atan2' : 10,
+    'atanh' : 10,
     'ceil' : 10,
     'copysign' : 10,
     'cos' : 10,
@@ -114,6 +115,15 @@ tests = {
         ],
         'tolerance' : 6
      },
+    'atanh' : {
+        'arg_types' : [F, F],
+        'function_type': 'ttt',
+        'values' : [
+            [0.0, float("inf"), float("-inf"), float("nan"), atanh(0.123456789)], #Result
+            [0.0, 1.0,              -1.0,      float("nan"),       0.123456789 ]  #Arg0
+        ],
+        'tolerance' : 4
+     },
     'ceil' : {
         'arg_types': [F, F],
         'function_type': 'ttt',
-- 
2.0.0



More information about the Piglit mailing list