[Libreoffice-commits] core.git: sc/source
Tor Lillqvist
tml at collabora.com
Fri Mar 6 03:02:48 PST 2015
sc/source/core/opencl/op_statistical.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d9101e9416d9a285028ccb74895f6ba3964cce46
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Mar 6 13:01:21 2015 +0200
Set #VALUE! error in COVAR() OpenCL implementation when appropriate
Returning -DBL_MAX doesn't make sense. The traditional C++ implementation and
other spreadsheet products return an error.
Change-Id: I71117c0b1f113d31ad6eb0c1798b74f96b3a75de
diff --git a/sc/source/core/opencl/op_statistical.cxx b/sc/source/core/opencl/op_statistical.cxx
index e6fb8e6..0f3c1e8 100644
--- a/sc/source/core/opencl/op_statistical.cxx
+++ b/sc/source/core/opencl/op_statistical.cxx
@@ -7048,7 +7048,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss,
ss << " }\n";
}
ss << " if(cnt < 1) {\n";
- ss << " return -DBL_MAX;\n";
+ ss << " return CreateDoubleError(errNoValue);\n";
ss << " }\n";
ss << " else {\n";
ss << " vMean0 = vSum0 / cnt;\n";
More information about the Libreoffice-commits
mailing list