sc/source/core/opencl/op_math.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit c3fdac32fee3b342bb1d881a443748140af510b5 Author: Luboš Luňák <[email protected]> AuthorDate: Thu Sep 1 14:02:07 2022 +0200 Commit: Luboš Luňák <[email protected]> CommitDate: Tue Sep 6 12:04:46 2022 +0200 opencl MOD() fixes Change-Id: I72c588f714a49ef6ed33657dc30b41ee10ecd5d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139199 Tested-by: Jenkins Reviewed-by: Luboš Luňák <[email protected]> diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index 109d17ade5f6..bd058a26a48b 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -389,6 +389,7 @@ void OpEven::GenSlidingWindowFunction(outputstream &ss, void OpMod::GenSlidingWindowFunction(outputstream &ss, const std::string &sSymName, SubArguments &vSubArguments) { + CHECK_PARAMETER_COUNT( 2, 2 ); ss << "\ndouble " << sSymName; ss << "_"<< BinFuncName() <<"("; for (size_t i = 0; i < vSubArguments.size(); i++) @@ -406,7 +407,7 @@ void OpMod::GenSlidingWindowFunction(outputstream &ss, ss << " if(isnan(arg0)||arg0 == 0)\n"; ss << " return 0;\n"; ss << " if(isnan(arg1) || arg1 ==0)\n"; - ss << " return NAN;\n"; + ss << " return CreateDoubleError(DivisionByZero);\n"; ss << " double tem;\n"; ss << " if(arg0 < 0 && arg1 > 0)\n"; ss << " while(arg0 < 0)\n";
