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

Function quickTwoSum

src/compute-engine/numerics/special-functions.ts:2191–2194  ·  view source on GitHub ↗

Exact: a + b = s + e, assuming |a| ≥ |b| (fast two-sum)

(a: number, b: number)

Source from the content-addressed store, hash-verified

2189
2190/** Power series (DLMF 10.25.2): I_n(x) = (x/2)^n Σ (x²/4)^k / (k!(n+k)!).
2191 * All terms are positive — no cancellation at any x. Kahan-compensated:
2192 * near x = 30 the ~60 accumulations otherwise cost ~5 ulp. */
2193function besselISeries(n: number, x: number): number {
2194 const halfX = x / 2;
2195 const quarter = (x * x) / 4;
2196 let term = 1;
2197 for (let i = 1; i <= n; i++) term /= i;

Callers 5

ddAddFunction · 0.85
ddMulFunction · 0.85
ddMulDFunction · 0.85
ddDivDFunction · 0.85
ddSqrtDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected