diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-03-06 17:35:09 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-03-06 17:35:22 +0200 |
commit | 3da65dc8982167517f19e80a288b049118bc3d23 (patch) | |
tree | 317717d05991142b2e13bc5ecc71853c161c0d60 | |
parent | 2a0b6705724c4ea65b56eb0f45bccfa253d9fdc2 (diff) |
Return #VALUE! instead of NaN in the OpenCL NORMSINV()
Change-Id: I5bf4d5bb84cc85e631b27741a6fc171ec99eead4
-rw-r--r-- | sc/source/core/opencl/op_statistical.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx index f6f346f5f2ec..6e38f843eed0 100644 --- a/sc/source/core/opencl/op_statistical.cxx +++ b/sc/source/core/opencl/op_statistical.cxx @@ -4765,8 +4765,9 @@ void OpNormsinv:: GenSlidingWindowFunction ss <<"}\n"; ss << "z = q < 0.0 ? (-1)*z : z;\n"; ss <<"}\n"; - ss <<"double tmp = z;\n"; - ss <<"return tmp;\n"; + ss <<"if (isnan(z))\n"; + ss <<" return CreateDoubleError(errNoValue);\n"; + ss <<"return z;\n"; ss <<"}\n"; } void OpMedian::GenSlidingWindowFunction( |