diff options
-rw-r--r-- | sc/source/core/opencl/op_math.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/opencl/op_math.hxx | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index f0ed0b10de91..3f742f8f603a 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -1032,6 +1032,12 @@ void OpAbs::GenSlidingWindowFunction(std::stringstream &ss, ss << " return fabs(tmp);\n"; ss << "}"; } +void OpArcCos::BinInlineFun(std::set<std::string>& decls, + std::set<std::string>& funs) +{ + decls.insert(atan2Decl); + funs.insert(atan2Content); +} void OpArcCos::GenSlidingWindowFunction(std::stringstream &ss, const std::string sSymName, SubArguments &vSubArguments) { @@ -1057,7 +1063,7 @@ void OpArcCos::GenSlidingWindowFunction(std::stringstream &ss, #endif ss << " tmp = "; ss << vSubArguments[0]->GenSlidingWindowDeclRef()<< ";\n"; - ss << " return acos(tmp);\n"; + ss << " return arctan2(sqrt(1.0 - pow(tmp, 2)), tmp);\n"; ss << "}"; } void OpArcCosHyp::GenSlidingWindowFunction(std::stringstream &ss, diff --git a/sc/source/core/opencl/op_math.hxx b/sc/source/core/opencl/op_math.hxx index e10dfa127340..5864161110d2 100644 --- a/sc/source/core/opencl/op_math.hxx +++ b/sc/source/core/opencl/op_math.hxx @@ -101,6 +101,7 @@ public: const std::string sSymName, SubArguments &vSubArguments); virtual std::string GetBottom(void) { return "0.0"; } virtual std::string BinFuncName(void) const { return "ScACos"; } + virtual void BinInlineFun(std::set<std::string>& ,std::set<std::string>&); }; class OpArcCosHyp:public Normal{ public: |