blob: e4927cc9a652ee6ffb13067e4cdb553e873322d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef SC_OPENCL_OPINLINFUN_MATH
#define SC_OPENCL_OPINLINFUN_MATH
std::string Math_Intg_Str=
"\ndouble Intg(double n)\n\
{\n\
if(trunc(n)==n )\n\
return n;\n\
else if(n<0)\n\
return trunc(n)-1;\n\
else\n\
return trunc(n)+1;\n\
}\n";
std::string bikDecl = "double bik(double n,double k);\n";
std::string bik =
"double bik(double n,double k)\n"
"{\n"
" double nVal = n/k;\n"
" n = n - 1;\n"
" k = k - 1;\n"
" while (k > 0)\n"
" {\n"
" nVal = nVal * ( n/k );\n"
" k = k - 1;\n"
" n = n - 1;\n"
" }\n"
" return nVal;\n"
"}\n";
#endif //SC_OPENCL_OPINLINFUN_MATH
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|