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

Set #DIV/0! error in VAR() OpenCL implementation when appropriate

Returning DBL_MAX doesn't make sense. The traditional C++ implementation and
other spreadsheet products return an error.

Change-Id: I8189c3ecf4aa7b1df00ec2fd8b91030085848bf4
üst fa4ce83f
......@@ -194,7 +194,7 @@ void OpVar::GenSlidingWindowFunction(std::stringstream &ss,
}
}
ss << " if (fCount <= 1.0)\n";
ss << " return DBL_MAX;\n";
ss << " return CreateDoubleError(errDivisionByZero);\n";
ss << " else\n";
ss << " return vSum * pow(fCount - 1.0,-1.0);\n";
ss << "}\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