49 const double p1=1.0, p2=3.5156229, p3=3.0899424,
50 p4=1.2067492, p5=0.2659732, p6=3.60768e-2, p7=4.5813e-3;
52 const double q1= 0.39894228, q2= 1.328592e-2, q3= 2.25319e-3,
53 q4=-1.57565e-3, q5= 9.16281e-3, q6=-2.057706e-2,
54 q7= 2.635537e-2, q8=-1.647633e-2, q9= 3.92377e-3;
56 const double k1 = 3.75;
59 double y=0., result=0.;
64 result = p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7)))));
67 result = (exp(ax)/sqrt(ax))*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*(q6+y*(q7+y*(q8+y*q9))))))));
84 const double p1= -0.57721566, p2= 0.42278420, p3=0.23069756,
85 p4=3.488590e-2, p5=2.62698e-3, p6=1.0750e-4, p7=7.4e-6;
87 const double q1= 1.25331414, q2= -7.832358e-2, q3=2.189568e-2,
88 q4= -1.062446e-2, q5=5.87872e-3, q6= -2.51540e-3, q7= 5.3208e-4;
91 cout <<
"BesselK0 *K0* Invalid argument x = " << x << endl;
95 double y=0.,result=0.;
99 result = (-log(x/2.)*
bessel::besI0(x))+(p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7))))));
102 result = (exp(-x)/sqrt(x))*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*(q6+y*q7))))));
119 const double p1=0.5, p2=0.87890594, p3=0.51498869,
120 p4=0.15084934, p5=2.658733e-2, p6=3.01532e-3, p7=3.2411e-4;
122 const double q1= 0.39894228, q2=-3.988024e-2, q3=-3.62018e-3,
123 q4= 1.63801e-3, q5=-1.031555e-2, q6= 2.282967e-2,
124 q7=-2.895312e-2, q8= 1.787654e-2, q9=-4.20059e-3;
126 const double k1 = 3.75;
129 double y=0., result=0.;
134 result = x*(p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7))))));
137 result = (exp(ax)/sqrt(ax))*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*(q6+y*(q7+y*(q8+y*q9))))))));
138 if (x < 0) result = -result;
155 const double p1= 1., p2= 0.15443144, p3=-0.67278579,
156 p4=-0.18156897, p5=-1.919402e-2, p6=-1.10404e-3, p7=-4.686e-5;
158 const double q1= 1.25331414, q2= 0.23498619, q3=-3.655620e-2,
159 q4= 1.504268e-2, q5=-7.80353e-3, q6= 3.25614e-3, q7=-6.8245e-4;
162 cout <<
"bessel:dbesk1 *K1* Invalid argument x = " << x << endl;
166 double y=0.,result=0.;
170 result = (log(x/2.)*
bessel::besI1(x))+(1./x)*(p1+y*(p2+y*(p3+y*(p4+y*(p5+y*(p6+y*p7))))));
173 result = (exp(-x)/sqrt(x))*(q1+y*(q2+y*(q3+y*(q4+y*(q5+y*(q6+y*q7))))));