Remove some unreasonable input values for rootn
authorYi Sun <yi.sun@intel.com>
Thu, 20 Feb 2014 01:32:32 +0000 (09:32 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 21 Feb 2014 03:03:02 +0000 (11:03 +0800)
commit55140f477d30f7e021ea9863d7f1770bd27067ad
tree0c3722d10528120f6c899111a5c83d33307a08f9
parentebe6280b3d4224c28ddc7ac71b825d75e8f7d6ea
Remove some unreasonable input values for rootn

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 <yi.sun@intel.com>
utests/utest_math_gen.py