LGTM, will push latter, thanks.
On Thu, Feb 20, 2014 at 09:32:32AM +0800, Yi Sun wrote: > In manual for function pow(), there's following description: > "If x is a finite value less than 0, > and y is a finite noninteger, > a domain error occurs, and a NaN is returned." > That means we can't calculate rootn in cpu like this pow(x,1.0/y) which is > mentioned in OpenCL spec. > E.g. when y=3 and x=-8, rootn should return -2. But when we calculate pow(x, > 1.0/y), it will return a Nan. > I didn't find multi-root math function in glibc. > > Signed-off-by: Yi Sun <[email protected]> > > diff --git a/utests/utest_math_gen.py b/utests/utest_math_gen.py > index f268739..2b70d65 100755 > --- a/utests/utest_math_gen.py > +++ b/utests/utest_math_gen.py > @@ -417,8 +417,8 @@ static float powr(float x, int y){ > rintUtests = > func('rint','rint',[rint_input_type],rint_output_type,[rint_input_values],'0 > * FLT_ULP') > > ##### floatn rootn(floatn x, intn y) > - rootn_input_values1 = > [FLT_MAX_POSI,FLT_MIN_NEGA,FLT_MIN_POSI,FLT_MAX_NEGA,80, -80, 3.14, -3.14, > -0.5, 0.5, 1, -1, 0.0,6,-6,1500.24,-1500.24,2,3,4] > - rootn_input_values2 = [-1,-2,-3,2,3,6,7,8,9,2,11,12,13,14,15,16,2,2,2,2] > + rootn_input_values1 = [0.0, 0.0012, 0.5, 1, 3.14, 12345] > + rootn_input_values2 = [-1, 1, -20, 20, -123, 456] > rootn_input_type1 = ['float','float2','float4','float8','float16'] > rootn_input_type2 = ['int','int2','int4','int8','int16'] > rootn_output_type = ['float','float2','float4','float8','float16'] > -- > 1.8.5.3 > > _______________________________________________ > Beignet mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
