summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vesely <jan.vesely@rutgers.edu>2015-01-23 18:59:13 -0500
committerTom Stellard <thomas.stellard@amd.com>2015-01-26 09:39:38 -0500
commit40f70e8a725f9c56228e0e6ed80f05b137f958f3 (patch)
treef8c10260ef7944de730431c956c88b551ab3fe64
parent97f13d417a07e6f03e2f156ad6cac47c2531ce9c (diff)
cl: add log10 test
v2: Fix tolerance Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
-rw-r--r--generated_tests/generate-cl-math-builtins.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/generated_tests/generate-cl-math-builtins.py b/generated_tests/generate-cl-math-builtins.py
index a81038572..01b9ec347 100644
--- a/generated_tests/generate-cl-math-builtins.py
+++ b/generated_tests/generate-cl-math-builtins.py
@@ -27,7 +27,7 @@ import os
from genclbuiltins import gen, NEGNAN
from math import acos, acosh, asin, asinh, atan, atan2, atanh, cos, cosh
-from math import fabs, fmod, log1p, pi, pow, sin, sinh, sqrt, tan, tanh
+from math import fabs, fmod, log10, log1p, pi, pow, sin, sinh, sqrt, tan, tanh
CLC_VERSION_MIN = {
'acos' : 10,
@@ -50,6 +50,7 @@ CLC_VERSION_MIN = {
'floor' : 10,
'fmod' : 10,
'ldexp' : 10,
+ 'log10' : 10,
'log1p' : 10,
'mix' : 10,
'nextafter' : 10,
@@ -256,6 +257,15 @@ tests = {
],
'tolerance' : 0
},
+ 'log10' : {
+ 'arg_types': [F, F],
+ 'function_type': 'ttt',
+ 'values': [
+ [log10(0.5), float("-inf"), log10(1.e-15), float("nan")],
+ [0.5, 0.0, 1.e-15, float("nan")]
+ ],
+ 'tolerance' : 3
+ },
'log1p' : {
'arg_types': [F, F],
'function_type': 'ttt',