1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #ifndef INCLUDED_SC_SOURCE_CORE_OPENCL_OPINLINEFUN_MATH_HXX
11 #define INCLUDED_SC_SOURCE_CORE_OPENCL_OPINLINEFUN_MATH_HXX
13 std::string Math_Intg_Str
=
14 "\ndouble Intg(double n)\n\
24 std::string bikDecl
= "double bik(double n,double k);\n";
26 "double bik(double n,double k)\n"
28 " double nVal1 = n;\n"
29 " double nVal2 = k;\n"
34 " nVal1 = nVal1 * n;\n"
35 " nVal2 = nVal2 * k;\n"
39 " return (nVal1 / nVal2);\n"
42 std::string local_cothDecl
= "double local_coth(double n);\n";
43 std::string local_coth
=
44 "double local_coth(double n)\n"
46 " double a = exp(n);\n"
47 " double b = exp(-n);\n"
48 " double nVal = (a + b) / (a - b);\n"
52 std::string local_coshDecl
= "double local_cosh(double n);\n";
53 std::string local_cosh
=
54 "double local_cosh(double n)\n"
56 " double nVal = (exp(n) + exp(-n)) / 2;\n"
59 std::string atan2Decl
= "double arctan2(double y, double x);\n";
60 std::string atan2Content
=
61 "double arctan2(double y, double x)\n"
65 " double a,num,den,tmpPi;\n"
68 " if (fabs(x) >= fabs(y))\n"
76 " if(fabs(x) < fabs(y))\n"
83 " a = atan(num/den);\n"
84 " a = flag==1?a:-a;\n"
85 " a = a + (y >= 0.0 ? tmpPi : -tmpPi);\n"
89 #endif // INCLUDED_SC_SOURCE_CORE_OPENCL_OPINLINEFUN_MATH_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */