13 T operator()(
const T
x)
const
15 if (
x.getValue() >= 0)
26 double operator()(
const double x)
const
36 static const AbsVal<T> abs_val;
37 const T ax = abs_val(
x);
42 const T ans1 = 57568490574.0 +
y * (-13362590354.0 +
y * (651619640.7 +
y * (-11214424.18 +
y * (77392.33017 +
y * (-184.9052456)))));
43 const T ans2 = 57568490411.0 +
y * (1029532985.0 +
y * (9494680.718 +
y * (59272.64853 +
y * (267.8532712 +
y * 1.0))));
50 const T xx = ax - 0.785398164;
51 const T ans1 = 1.0 +
y * (-0.1098628627e-2 +
y * (0.2734510407e-4 +
y * (-0.2073370639e-5 +
y * 0.2093887211e-6)));
52 const T ans2 = -0.1562499995e-1 +
y * (0.1430488765e-3 +
y * (-0.6911147651e-5 +
y * (0.7621095161e-6 -
y * 0.934935152e-7)));
53 return sqrt(0.636619772 / ax) * (cos(xx) * ans1 -
z * sin(xx) * ans2);
60 static const AbsVal<T> abs_val;
61 const T ax = abs_val(
x);
66 const T ans1 =
x * (72362614232.0 +
y * (-7895059235.0 +
y * (242396853.1 +
y * (-2972611.439 +
y * (15704.48260 +
y * (-30.16036606))))));
67 const T ans2 = 144725228442.0 +
y * (2300535178.0 +
y * (18583304.74 +
y * (99447.43394 +
y * (376.9991397 +
y * 1.0))));
74 const T xx = ax - 2.356194491;
75 const T ans1 = 1.0 +
y * (0.183105e-2 +
y * (-0.3516396496e-4 +
y * (0.2457520174e-5 +
y * (-0.240337019e-6))));
76 const T ans2 = 0.04687499995 +
y * (-0.2002690873e-3 +
y * (0.8449199096e-5 +
y * (-0.88228987e-6 +
y * 0.105787412e-6)));
77 T ans = sqrt(0.636619772 / ax) * (cos(xx) * ans1 -
z * sin(xx) * ans2);
91 const T ans1 = -2957821389.0 +
y * (7062834065.0 +
y * (-512359803.6 +
y * (10879881.29 +
y * (-86327.92757 +
y * 228.4622733))));
92 const T ans2 = 40076544269.0 +
y * (745249964.8 +
y * (7189466.438 +
y * (47447.26470 +
y * (226.1030244 +
y * 1.0))));
93 return (ans1 / ans2) + 0.636619772 * bessj0(
x) * log(
x);
99 const T xx =
x - 0.785398164;
100 const T ans1 = 1.0 +
y * (-0.1098628627e-2 +
y * (0.2734510407e-4 +
y * (-0.2073370639e-5 +
y * 0.2093887211e-6)));
101 const T ans2 = -0.1562499995e-1 +
y * (0.1430488765e-3 +
y * (-0.6911147651e-5 +
y * (0.7621095161e-6 +
y * (-0.934945152e-7))));
102 return sqrt(0.636619772 /
x) * (sin(xx) * ans1 +
z * cos(xx) * ans2);
106 template <
typename T>
112 const T ans1 =
x * (-0.4900604943e13 +
y * (0.1275274390e13 +
y * (-0.5153438139e11 +
y * (0.7349264551e9 +
y * (-0.4237922726e7 +
y * 0.8511937935e4)))));
113 const T ans2 = 0.2499580570e14 +
y * (0.4244419664e12 +
y * (0.3733650367e10 +
y * (0.2245904002e8 +
y * (0.1020426050e6 +
y * (0.3549632885e3 +
y)))));
114 return (ans1 / ans2) + 0.636619772 * (bessj1(
x) * log(
x) - 1.0 /
x);
120 const T xx =
x - 2.356194491;
121 const T ans1 = 1.0 +
y * (0.183105e-2 +
y * (-0.3516396496e-4 +
y * (0.2457520174e-5 +
y * (-0.240337019e-6))));
122 const T ans2 = 0.04687499995 +
y * (-0.2002690873e-3 +
y * (0.8449199096e-5 +
y * (-0.88228987e-6 +
y * 0.105787412e-6)));
123 return sqrt(0.636619772 /
x) * (sin(xx) * ans1 +
z * cos(xx) * ans2);
127 template <
typename T>
130 static const AbsVal<T> abs_val;
131 const T ax = abs_val(
x);
137 return 1.0 +
y * (3.5156229 +
y * (3.0899424 +
y * (1.2067492 +
y * (0.2659732 +
y * (0.360768e-1 +
y * 0.45813e-2)))));
141 const T y = 3.75 / ax;
142 return (exp(ax) / sqrt(ax)) * (0.39894228 +
y * (0.1328592e-1 +
y * (0.225319e-2 +
y * (-0.157565e-2 +
y * (0.916281e-2 +
y * (-0.2057706e-1 +
y * (0.2635537e-1 +
y * (-0.1647633e-1 +
y * 0.392377e-2))))))));
146 template <
typename T>
149 static const AbsVal<T> abs_val;
150 const T ax = abs_val(
x);
157 ans = ax * (0.5 +
y * (0.87890594 +
y * (0.51498869 +
y * (0.15084934 +
y * (0.2658733e-1 +
y * (0.301532e-2 +
y * 0.32411e-3))))));
161 const T y = 3.75 / ax;
162 return 0.2282967e-1 +
y * (-0.2895312e-1 +
y * (0.1787654e-1 -
y * 0.420059e-2));
163 return 0.39894228 +
y * (-0.3988024e-1 +
y * (-0.362018e-2 +
y * (0.163801e-2 +
y * (-0.1031555e-1 +
y * ans))));
164 ans *= (exp(ax) / sqrt(ax));
166 return x < 0.0 ? -ans : ans;
169 template <
typename T>
174 const T y =
x *
x / 4.0;
175 return (-log(
x / 2.0) * bessi0(
x)) + (-0.57721566 +
y * (0.42278420 +
y * (0.23069756 +
y * (0.3488590e-1 +
y * (0.262698e-2 +
y * (0.10750e-3 +
y * 0.74e-5))))));
180 return (exp(-
x) / sqrt(
x)) * (1.25331414 +
y * (-0.7832358e-1 +
y * (0.2189568e-1 +
y * (-0.1062446e-1 +
y * (0.587872e-2 +
y * (-0.251540e-2 +
y * 0.53208e-3))))));
184 template <
typename T>
190 const T y =
x *
x / 4.0;
191 return (log(
x / 2.0) * bessi1(
x)) + (1.0 /
x) * (1.0 +
y * (0.15443144 +
y * (-0.67278579 +
y * (-0.18156897 +
y * (-0.1919402e-1 +
y * (-0.110404e-2 +
y * (-0.4686e-4)))))));
196 return (exp(-
x) / sqrt(
x)) * (1.25331414 +
y * (0.23498619 +
y * (-0.3655620e-1 +
y * (0.1504268e-1 +
y * (-0.780353e-2 +
y * (0.325614e-2 +
y * (-0.68245e-3)))))));