MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / dedekindEta

Function dedekindEta

src/compute-engine/numerics/numeric-complex.ts:1011–1031  ·  view source on GitHub ↗
(tau: Complex)

Source from the content-addressed store, hash-verified

1009 ];
1010 candidates.sort((p, q) => p.w.abs() - q.w.abs());
1011
1012 let sawDegenerateCandidate = false;
1013 for (const cand of candidates) {
1014 const { kind, w } = cand;
1015 if (w.abs() > W_MAX) break; // sorted: no further candidate fits
1016 if (cand.degenerate) {
1017 sawDegenerateCandidate = true;
1018 continue;
1019 }
1020 const maxTerms = w.abs() <= W_PREFERRED ? 10_000 : 250_000;
1021
1022 switch (kind) {
1023 case 'direct':
1024 return gauss2F1SeriesC(a, b, c, z, maxTerms);
1025
1026 case 'pfaff':
1027 // A&S 15.3.4: (1−z)^{−a}·₂F₁(a, c−b; c; z/(z−1))
1028 return one
1029 .sub(z)
1030 .pow(a.neg())
1031 .mul(gauss2F1SeriesC(a, c.sub(b), c, w, maxTerms));
1032
1033 case 'one-minus-z': {
1034 // A&S 15.3.6, w = 1−z, s = c−a−b ∉ ℤ

Callers 1

Calls 7

nomePowerFunction · 0.85
expMethod · 0.65
mulMethod · 0.65
absMethod · 0.65
subMethod · 0.65
isNaNMethod · 0.45
ceilMethod · 0.45

Tested by

no test coverage detected