sc/source/core/opencl/op_statistical.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 100c518e980f6abdc93c727c524b738200236bf2
Author: Tor Lillqvist <t...@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";
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to