summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Watry <awatry@gmail.com>2014-10-24 07:43:33 -0500
committerAaron Watry <awatry@gmail.com>2014-10-29 08:45:14 -0500
commit5d92b506d3b1fca68b2028b48e0f3060f0468ef3 (patch)
treef3cc70799c796d3a05323bca0756da26cbe4fef2
parent373faf328ec9b5af83bc5f790198c5b1365153d7 (diff)
cl: Add some erf builtin tests
Tested on Apple CL (CPU and GF9400m) down to 1 ULP precision, but the spec says 16ULP. Signed-off-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
-rw-r--r--generated_tests/generate-cl-math-builtins.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
index cc9b60bc9..2036cecf3 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -43,6 +43,7 @@ CLC_VERSION_MIN = {
'cos' : 10,
'cosh' : 10,
'cospi' : 10,
+ 'erf' : 10,
'fabs' : 10,
'floor' : 10,
'fmod' : 10,
@@ -184,6 +185,15 @@ tests = {
],
'tolerance' : 4
},
+ 'erf' : {
+ 'arg_types' : [F, F],
+ 'function_type': 'ttt',
+ 'values' : [
+ [0.0, 0.950004, 0.990005, -0.994999475, 0.27219439321703e-29, 1, -1], # Result
+ [0.0, 1.960/sqrt(2.0), 2.576/sqrt(2.0), -2.807/sqrt(2.0), 11.1, float("inf"), float("-inf")] # Arg0
+ ],
+ 'tolerance' : 16
+ },
'fabs' : {
'arg_types' : [F, F],
'function_type': 'ttt',