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

Function check2F1

test/compute-engine/special-functions.test.ts:1267–1276  ·  view source on GitHub ↗
(
    args: (number | unknown[])[],
    re: number,
    im: number,
    tol = 1e-12
  )

Source from the content-addressed store, hash-verified

1265});
1266
1267// Exponential and logarithmic integrals (ROADMAP B2: ∫eˣ/x → Ei,
1268// ∫1/ln x → li). Machine-precision only (no bignum kernel; ROADMAP B1).
1269describe('EXPONENTIAL & LOGARITHMIC INTEGRALS (Ei, li)', () => {
1270 test('Ei(1) ≈ 1.8951178163559368', () =>
1271 expectApprox(ce.expr(['ExpIntegralEi', 1]), 1.8951178163559368, 1e-12));
1272
1273 test('Ei(2) ≈ 4.954234356001890 (asymptotic-free regime)', () =>
1274 expectApprox(ce.expr(['ExpIntegralEi', 2]), 4.95423435600189, 1e-12));
1275
1276 test('Ei(10) ≈ 2492.2289762418777', () =>
1277 expectApprox(ce.expr(['ExpIntegralEi', 10]), 2492.2289762418777, 1e-9));
1278
1279 test('Ei(40) ≈ 6.0397182636112e15 (asymptotic-series regime)', () =>

Callers 1

Calls 3

NMethod · 0.65
exprMethod · 0.65
absMethod · 0.65

Tested by

no test coverage detected