32 double kSqrt2 = 1.4142135623730950488016887242097;
33 double kPi = 3.14159265358979323846;
34 double kEulerGamma = 0.577215664901532860606512090082402431042;
81 double sum, factorial = 1,
n = 1;
82 double term = 1, x_factor = x * x * x * x * 0.0625;
87 factorial = 4 *
n *
n * (2 *
n - 1) * (2 *
n - 1);
88 term *= (-1) / factorial * x_factor;
96 double alpha = x / kSqrt2 - kPi / 8;
98 value *=
exp(x / kSqrt2) /
sqrt(2 * kPi * x);
139 double sum, factorial = 1,
n = 1;
140 double term = x * x * 0.25, x_factor = term * term;
145 factorial = 4 *
n *
n * (2 *
n + 1) * (2 *
n + 1);
146 term *= (-1) / factorial * x_factor;
154 double alpha = x / kSqrt2 - kPi / 8;
156 value *=
exp(x / kSqrt2) /
sqrt(2 * kPi * x);
202 double term = 1, x_factor = x * x * x * x * 0.0625;
203 double factorial = 1, harmonic = 0,
n = 1, sum;
205 if(x < 0) delta =
kPi;
210 factorial = 4 *
n *
n * (2 *
n - 1) * (2 *
n - 1);
211 term *= (-1) / factorial * x_factor;
212 harmonic += 1 / (2 * n - 1 ) + 1 / (2 * n);
213 sum += term * harmonic;
220 double beta = x / kSqrt2 + kPi / 8;
222 value *=
sqrt(kPi / (2 * x)) *
exp(- x / kSqrt2);
268 double term = x * x * 0.25, x_factor = term * term;
269 double factorial = 1, harmonic = 1,
n = 1, sum;
271 if(x < 0) delta =
kPi;
276 factorial = 4 *
n *
n * (2 *
n + 1) * (2 *
n + 1);
277 term *= (-1) / factorial * x_factor;
278 harmonic += 1 / (2 *
n) + 1 / (2 * n + 1);
279 sum += term * harmonic;
286 double beta = x / kSqrt2 + kPi / 8;
288 value *=
sqrt(kPi / (2 * x)) *
exp(- x / kSqrt2);
320 double sum, factorial = 1,
n = 1;
321 double term = - x * x * x * 0.0625, x_factor = - term *
x;
326 factorial = 4 *
n * (
n + 1) * (2 *
n + 1) * (2 *
n + 1);
327 term *= (-1) / factorial * x_factor;
335 else return (
M(x) *
sin(
Theta(x) - kPi / 4));
365 double sum, factorial = 1,
n = 1;
366 double term = x * 0.5, x_factor = x * x * x * x * 0.0625;
371 factorial = 4 *
n *
n * (2 *
n - 1) * (2 *
n + 1);
372 term *= (-1) * x_factor / factorial;
380 else return (
M(x) *
cos(
Theta(x) - kPi / 4));
410 double term = - x * x * x * 0.0625, x_factor = - term *
x;
411 double factorial = 1, harmonic = 1.5,
n = 1, sum;
413 if(x < 0) delta =
kPi;
418 factorial = 4 *
n * (
n + 1) * (2 *
n + 1) * (2 *
n + 1);
419 term *= (-1) / factorial * x_factor;
420 harmonic += 1 / (2 *
n + 1 ) + 1 / (2 *
n + 2);
421 sum += term * harmonic;
428 else return N(x) *
sin(
Phi(x) - kPi / 4);
458 double term = 0.5 *
x, x_factor = x * x * x * x * 0.0625;
459 double factorial = 1, harmonic = 1,
n = 1, sum;
461 if(x < 0) delta =
kPi;
466 factorial = 4 *
n *
n * (2 *
n - 1) * (2 *
n + 1);
467 term *= (-1) / factorial * x_factor;
468 harmonic += 1 / (2 *
n) + 1 / (2 * n + 1);
469 sum += term * harmonic;
476 else return N(x) *
cos(
Phi(x) - kPi / 4);
491 double prod = 1, x_factor = 8 *
x, factorial = 1,
n = 2;
493 sum = kSqrt2 / (16 *
x);
497 prod *= (2 *
n - 1) * (2 *
n - 1);
499 term = prod / (factorial * x_factor) *
cos(0.25 *
n * kPi);
520 double prod = 1, x_factor = 8 *
x, factorial = 1,
n = 2;
522 sum = kSqrt2 / (16 *
x);
526 prod *= (2 *
n - 1) * (2 *
n - 1);
528 term = (prod / (factorial * x_factor)) *
cos(0.25 *
n * kPi);
551 double prod = 1, x_factor = 8 *
x, factorial = 1,
n = 2;
553 sum = kSqrt2 / (16 *
x);
557 prod *= (2 *
n - 1) * (2 *
n - 1);
559 term = prod / (factorial * x_factor) *
sin(0.25 *
n * kPi);
578 double prod = 1, x_factor = 8 *
x, factorial = 1,
n = 2;
580 sum = kSqrt2 / (16 *
x);
584 prod *= (2 *
n - 1) * (2 *
n - 1);
586 term = prod / (factorial * x_factor) *
sin(0.25 *
n * kPi);
606 double value = 1 + 1 / (8 * kSqrt2 *
x) + 1 / (256 * x * x) - 399 / (6144 * kSqrt2 * x * x *
x);
607 value *=
exp(x / kSqrt2) /
sqrt(2 * kPi * x);
622 double value = x / kSqrt2 - kPi / 8;
623 value -= 1 / (8 * kSqrt2 *
x) + 1 / (16 * x * x) + 25 / (384 * kSqrt2 * x * x *
x);
638 double value = 1 - 1 / (8 * kSqrt2 *
x) + 1 / (256 * x * x) + 399 / (6144 * kSqrt2 * x * x *
x);
639 value *=
exp(- x / kSqrt2) *
sqrt(kPi / (2 * x));
654 double value = - x / kSqrt2 - kPi / 8;
655 value += 1 / (8 * kSqrt2 *
x) - 1 / (16 * x * x) + 25 / (384 * kSqrt2 * x * x *
x);
static double Ber(double x)
Begin_Latex Ber(x) = Ber_{0}(x) = Re::left[J_{0}#left(x e^{3#pii/4}#right)#right] End_Latex where x i...
Namespace for new ROOT classes and functions.
static double DBei(double x)
Calculates the first derivative of Bei(x).
static const double kSqrt2
VecExpr< UnaryOp< Sqrt< T >, VecExpr< A, T, D >, T >, T, D > sqrt(const VecExpr< A, T, D > &rhs)
double beta(double x, double y)
Calculates the beta function.
static double F1(double x)
Utility function appearing in the calculations of the Kelvin functions Bei(x) and Ber(x) (and their d...
static double G1(double x)
Utility function appearing in the calculations of the Kelvin functions Bei(x) and Ber(x) (and their d...
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
static double Kei(double x)
Begin_Latex Kei(x) = Kei_{0}(x) = Im::left[K_{0}#left(x e^{3#pii/4}#right)#right] End_Latex where x i...
static double DKer(double x)
Calculates the first derivative of Ker(x).
static double M(double x)
Utility function appearing in the asymptotic expansions of DBer(x) and DBei(x).
static double Bei(double x)
Begin_Latex Bei(x) = Bei_{0}(x) = Im::left[J_{0}#left(x e^{3#pii/4}#right)#right] End_Latex where x i...
static double Theta(double x)
Utility function appearing in the asymptotic expansions of DBer(x) and DBei(x).
Namespace for new Math classes and functions.
static double G2(double x)
Utility function appearing in the calculations of the Kelvin functions Kei(x) and Ker(x) (and their d...
static double DBer(double x)
Calculates the first derivative of Ber(x).
static double Phi(double x)
Utility function appearing in the asymptotic expansions of DKer(x) and DKei(x).
static double Ker(double x)
Begin_Latex Ker(x) = Ker_{0}(x) = Re::left[K_{0}#left(x e^{3#pii/4}#right)#right] End_Latex where x i...
static double DKei(double x)
Calculates the first derivative of Kei(x).
static double F2(double x)
Utility function appearing in the calculations of the Kelvin functions Kei(x) and Ker(x) (and their d...
static double N(double x)
Utility function appearing in the asymptotic expansions of DKer(x) and DKei(x).