34 auto ax = std::abs (
x);
41 return 1.0 + y * (3.5156229 + y * (3.0899424 + y * (1.2067492
42 + y * (0.2659732 + y * (0.360768e-1 + y * 0.45813e-2)))));
47 return (std::exp (
ax) / std::sqrt (
ax))
48 * (0.39894228 + y * (0.1328592e-1 + y * (0.225319e-2 + y * (-0.157565e-2 + y * (0.916281e-2
49 + y * (-0.2057706e-1 + y * (0.2635537e-1 + y * (-0.1647633e-1 + y * 0.392377e-2))))))));
59 for (
int i = 0; i <
M; ++i)
61 lastK = std::pow (
lastK / (1 + std::sqrt (1 - std::pow (
lastK, 2.0))), 2.0);
66 auto last = std::sqrt (1 -
k *
k);
68 for (
int i = 0; i <
M; ++i)
70 last = std::pow (last / (1.0 + std::sqrt (1.0 - std::pow (last, 2.0))), 2.0);
83 for (
int i = 0; i <
M; ++i)
85 auto next = std::pow (*
kei / (1.0 + std::sqrt (1.0 - std::pow (*
kei, 2.0))), 2.0);
92 for (
int i =
M - 1; i >= 0; --i)
93 last = (1.0 +
ke[i + 1]) / (1.0 / last +
ke[i + 1] * last);
106 for (
int i = 0; i <
M; ++i)
108 auto next = std::pow (*
kei / (1 + std::sqrt (1 - std::pow (*
kei, 2.0))), 2.0);
115 for (
int i =
M - 1; i >= 0; --i)
116 last = (1.0 +
ke[i + 1]) / (1.0 / last +
ke[i + 1] * last);
129 for (
int i = 0; i <
M; ++i)
131 auto next = std::pow (*
kei / (1.0 + std::sqrt (1.0 - std::pow (*
kei, 2.0))), 2.0);
135 std::complex<double> last =
w;
137 for (
int i = 1; i <=
M; ++i)
138 last = 2.0 * last / ((1.0 +
ke[i]) * (1.0 + std::sqrt (1.0 - std::pow (
ke[i - 1] * last, 2.0))));
static Complex< double > sne(Complex< double > u, double k) noexcept
static double besselI0(double x) noexcept
static Complex< double > cde(Complex< double > u, double k) noexcept
static Complex< double > asne(Complex< double > w, double k) noexcept
static void ellipticIntegralK(double k, double &K, double &Kp) noexcept