[Libreoffice-commits] core.git: sc/source
Tor Lillqvist
tml at collabora.com
Fri Mar 6 03:44:06 PST 2015
sc/source/core/opencl/op_statistical.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 100c518e980f6abdc93c727c524b738200236bf2
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Mar 6 13:43:04 2015 +0200
Set #VALUE! error in PEARSON() OpenCL implementation when appropriate
Returning a NaN with no "double error" semantic payload as such does not make
sense. "Pure" NaNs are displayed in Calc as "nan" which probably is not what
we want.
Change-Id: I85dc55328669bd27478be438dd5a9970d24cf7f9
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index 0f3c1e8..c9e74f9 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -3323,6 +3323,8 @@ void OpPearson::GenSlidingWindowFunction(
ss << " }\n";
ss << " double tmp = ( fSumDeltaXDeltaY / ";
ss << "sqrt( fSumX * fSumY));\n\t";
+ ss << " if (isnan(tmp))\n";
+ ss << " return CreateDoubleError(errNoValue);\n";
ss << " return tmp;\n";
ss << "}\n";
}
More information about the Libreoffice-commits
mailing list