Kaydet (Commit) d9101e94 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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
üst 3f6f21e6
...@@ -7048,7 +7048,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss, ...@@ -7048,7 +7048,7 @@ void OpCovar::GenSlidingWindowFunction(std::stringstream& ss,
ss << " }\n"; ss << " }\n";
} }
ss << " if(cnt < 1) {\n"; ss << " if(cnt < 1) {\n";
ss << " return -DBL_MAX;\n"; ss << " return CreateDoubleError(errNoValue);\n";
ss << " }\n"; ss << " }\n";
ss << " else {\n"; ss << " else {\n";
ss << " vMean0 = vSum0 / cnt;\n"; ss << " vMean0 = vSum0 / cnt;\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment