74 -.5 - 0.03532739323390276872, 0.3442898999246284869,
75 0.03597993651536150163, 0.00126461541144692592,
76 0.00002286212103119451, 0.00000025347910790261,
77 0.00000000190451637722, 0.00000000001034969525,
78 0.00000000000004259816, 0.00000000000000013744,
79 0.00000000000000000035};
91 2.5 - 0.07643947903327941, -0.02235652605699819, 0.00077341811546938,
92 -0.00004281006688886, 0.00000308170017386, -0.00000026393672220,
93 0.00000002563713036, -0.00000000274270554, 0.00000000031694296,
94 -0.00000000003902353, 0.00000000000506804, -0.00000000000068895,
95 0.00000000000009744, -0.00000000000001427, 0.00000000000000215,
96 -0.00000000000000033, 0.00000000000000005};
108 2.5 - 0.01201869826307592, -0.00917485269102569, 0.00014445509317750,
109 -0.00000401361417543, 0.00000015678318108, -0.00000000777011043,
110 0.00000000046111825, -0.00000000003158592, 0.00000000000243501,
111 -0.00000000000020743, 0.00000000000001925, -0.00000000000000192,
112 0.00000000000000020, -0.00000000000000002};
127 5.5 - .07660547252839144951, 1.92733795399380827000, .22826445869203013390,
128 .01304891466707290428, .00043442709008164874, .00000942265768600193,
129 .00000014340062895106, .00000000161384906966, .00000000001396650044,
130 .00000000000009579451, .00000000000000053339, .00000000000000000245};
145 1.5 + 0.0253002273389477705, -0.3531559607765448760, -0.1226111808226571480,
146 -0.0069757238596398643, -0.0001730288957513052, -0.0000024334061415659,
147 -0.0000000221338763073, -0.0000000001411488392, -0.0000000000006666901,
148 -0.0000000000000024274, -0.0000000000000000070};
160 2.5 + 0.27443134069738830, 0.07571989953199368, -0.00144105155647540,
161 0.00006650116955125, -0.00000436998470952, 0.00000035402774997,
162 -0.00000003311163779, 0.00000000344597758, -0.00000000038989323,
163 0.00000000004720819, -0.00000000000604783, 0.00000000000081284,
164 -0.00000000000011386, 0.00000000000001654, -0.00000000000000248,
165 0.00000000000000038, -0.00000000000000006};
177 2.5 + 0.06379308343739001, 0.02832887813049721, -0.00024753706739052,
178 0.00000577197245160, -0.00000020689392195, 0.00000000973998344,
179 -0.00000000055853361, 0.00000000003732996, -0.00000000000282505,
180 0.00000000000023720, -0.00000000000002176, 0.00000000000000215,
181 -0.00000000000000022, 0.00000000000000002};
196 1.75 - 0.001971713261099859, 0.407348876675464810, 0.034838994299959456,
197 0.001545394556300123, 0.000041888521098377, 0.000000764902676483,
198 0.000000010042493924, 0.000000000099322077, 0.000000000000766380,
199 0.000000000000004741, 0.000000000000000024};
206 1.00000000000000000000000000000, 0.083333333333333333333333333333,
207 -0.00138888888888888888888888888889, 0.000033068783068783068783068783069,
208 -8.2671957671957671957671957672e-07, 2.0876756987868098979210090321e-08,
209 -5.2841901386874931848476822022e-10, 1.3382536530684678832826980975e-11,
210 -3.3896802963225828668301953912e-13, 8.5860620562778445641359054504e-15,
211 -2.1748686985580618730415164239e-16, 5.5090028283602295152026526089e-18,
212 -1.3954464685812523340707686264e-19, 3.5347070396294674716932299778e-21,
213 -8.9535174270375468504026113181e-23};
217 constexpr auto jmax = 12;
218 constexpr auto kmax = 10;
221 return std::pow(q, -s);
223 auto const p1 = std::pow(q, -s);
224 auto const p2 = std::pow(q / (1.0 + q), s);
225 auto const p3 = std::pow(q / (2.0 + q), s);
226 return p1 * (1.0 +
p2 +
p3);
231 auto const kmax_q =
static_cast<double>(
kmax) + q;
237 for (
int k = 0; k <
kmax; k++)
238 ans += std::pow(
static_cast<double>(k) + q, -s);
240 for (
int j = 0;
j <=
jmax;
j++) {
243 scp *= (s + 2. *
j + 1.) * (s + 2. *
j + 2.);
254 return (-std::log(x) + std::numbers::ln2) *
i0 + c;
259 return std::exp(-x) * c / std::sqrt(x);
266 return (std::log(x) - std::numbers::ln2) *
i1 + c / x;
271 return std::exp(-x) * c / std::sqrt(x);
284 11, 11, 10, 10, 9, 9,
286 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 2, 2, 2, 2, 2};
290 auto const tmp = .5 * std::exp(-x) / std::sqrt(x);
294 auto const tmp = std::exp(-x) / std::sqrt(x);
295 auto const xx = (16. / 3.) / x - 5. / 3.;
304 x2 = (2. * 16. / 3.) / x - 2. * 5. / 3.;
307 x2 = (2. * 16.) / x - 2.;
311 for (
j -= 2;
j >= 1;
j--) {
316 auto const tmp = std::exp(-x) / std::sqrt(x);
323 auto x2 = (2. / 4.5) * x * x - 2.;
326 for (
j -= 2;
j >= 1;
j--) {
331 auto const tmp = std::log(x) - std::numbers::ln2;
339 for (
j -= 2;
j >= 1;
j--) {
350 auto const tmp = .5 * std::exp(-x) / std::sqrt(x);
354 auto const tmp = std::exp(-x) / std::sqrt(x);
355 auto const xx = (16. / 3.) / x - 5. / 3.;
364 x2 = (2. * 16. / 3.) / x - 2. * 5. / 3.;
367 x2 = (2. * 16.) / x - 2.;
371 for (
j -= 2;
j >= 1;
j--) {
376 auto const tmp = std::exp(-x) / std::sqrt(x);
383 auto x2 = (2. / 4.5) * x * x - 2.;
386 for (
j -= 2;
j >= 1;
j--) {
391 auto const tmp = std::log(x) - std::numbers::ln2;
399 for (
j -= 2;
j >= 1;
j--) {
408std::pair<double, double>
LPK01(
double x) {
410 auto const tmp = .5 * std::exp(-x) / std::sqrt(x);
416 auto const tmp = std::exp(-x) / std::sqrt(x);
417 auto const xx = (16. / 3.) / x - 5. / 3.;
429 x2 = (2. * 16. / 3.) / x - 2. * 5. / 3.;
433 x2 = (2. * 16.) / x - 2.;
439 for (
j -= 2;
j >= 1;
j--) {
446 auto const tmp = std::exp(-x) / std::sqrt(x);
455 auto x2 = (2. / 4.5) * x * x - 2.;
460 for (
j -= 2;
j >= 1;
j--) {
467 auto const tmp = std::log(x) - std::numbers::ln2;
478 for (
j -= 2;
j >= 1;
j--) {
408std::pair<double, double>
LPK01(
double x) {
…}
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
DEVICE_QUALIFIER constexpr T sqr(T x)
Calculates the SQuaRe of x.
double hzeta(double s, double q)
Hurwitz zeta function.
static int ak01_orders[]
necessary orders for K0/1 from 2 up to 22 for 10^-14 precision.
static double ak02_cs[14]
Series for ak02.
double LPK1(double x)
Modified Bessel function of second kind, order 1, low precision.
static double bi0_cs[12]
Series for bi0.
static double bk1_cs[11]
Series for bk1.
std::pair< double, double > LPK01(double x)
Modified Bessel functions of second kind, order 0 and 1, low precision.
double K1(double x)
Modified Bessel function of second kind, order 1.
static double ak12_cs[14]
Series for ak12.
static double ak0_cs[17]
Series for ak0.
static double ak1_cs[17]
Series for ak1.
static double bk0_cs[11]
Series for bk0.
static double bi1_cs[11]
Series for bi1.
double K0(double x)
Modified Bessel function of second kind, order 0.
static double const hzeta_c[15]
Coefficients for Maclaurin summation in hzeta().
double LPK0(double x)
Modified Bessel function of second kind, order 0, low precision.
This file contains implementations for some special functions which are needed by the MMM family of a...
double evaluateAsChebychevSeriesAt(std::span< const double > series, double x)
Evaluate the polynomial interpreted as a Chebychev series.