5#ifndef OPENFPM_PDATA_LAMBDAKERNEL_HPP
6#define OPENFPM_PDATA_LAMBDAKERNEL_HPP
11double horner(
const double *v, st x)
14 for(
int i=9; i>=0; i--)
19double c1[10]={(1.0 * 12.0) , (0.0 * 12.0) , -(5.0 * 3.0) , (0.0 * 12.0) , (1.0 * 3.0) , -(100.0 * 4.0) , (455.0 * 3.0) , -(295.0 * 6.0) , (345.0 * 3.0) , -(115.0 * 2.0) };
20double c2[10]={-(199.0 * 24.0) , (5485.0 * 6.0) , -(32975.0 * 3.0) , (28425.0 * 6.0) , -(61953.0 * 3.0) , (33175.0 * 4.0) , -(20685.0 * 3.0) , (3055.0 * 6.0) , -(1035.0 * 3.0) , (115.0 * 2.0) };
21double c3[10]={(5913.0 * 24.0) , -(89235.0 * 6.0) , (297585.0 * 3.0) , -(143895.0 * 6.0) , (177871.0 * 3.0) , -(54641.0 * 4.0) , (19775.0 * 3.0) , -(1715.0 * 6.0) , (345.0 * 3.0) , -(23.0 * 2.0)};
28 static const int np = 6;
29 static inline st value(st x,
size_t i)
32 return horner(c3, -x) / 24.0;
34 return horner(c2, -x) / 24.0;
36 return horner(c1, -x) / 12.0;
38 return horner(c1, x) / 12.0;
40 return horner(c2, x) / 24.0;
42 return horner(c3, x) / 24.0;
49double horner22(
const double *v, st x)
52 for(
int i=5; i>=0; i--)
57double c221[6]={1.0,0.0,-1.0,-4.5,7.5,-3.0};
58double c222[6]={-4.0,18.0,-29.0,21.5,-7.5,1.0};
65 static const int np = 6;
66 static inline st value(st x,
size_t i)
69 return horner22(c221, -x);
71 return horner22(c222, -x);