utests: change tolerance check for lgamma

Submitted by Guo Yejun on July 27, 2016, 12:16 a.m.

Details

Message ID 1469578575-3051-1-git-send-email-yejun.guo@intel.com
State New
Headers show
Series "utests: change tolerance check for lgamma" ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

Guo Yejun July 27, 2016, 12:16 a.m.
according to spec section 7.4: The ULP values for built-in math
functions lgamma and lgamma_r is currently undefined, let's use
16*ULP for lgamma result.

Signed-off-by: Guo Yejun <yejun.guo@intel.com>
---
 utests/utest_math_gen.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/utests/utest_math_gen.py b/utests/utest_math_gen.py
index ac70979..a4bfd51 100755
--- a/utests/utest_math_gen.py
+++ b/utests/utest_math_gen.py
@@ -360,7 +360,7 @@  static float ldexp(float x, int y){
   lgamma_input_values = base_input_values
   lgamma_input_type = ['float','float2','float4','float8','float16']
   lgamma_output_type = ['float','float2','float4','float8','float16']
-  lgammaUtests = func('lgamma','lgamma',[lgamma_input_type],lgamma_output_type,[lgamma_input_values],'4 * FLT_ULP')
+  lgammaUtests = func('lgamma','lgamma',[lgamma_input_type],lgamma_output_type,[lgamma_input_values],'16 * FLT_ULP')
 
   ##### gentype log(gentype)
   log_input_values = base_input_values