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

Function expectBignum

test/compute-engine/special-functions.test.ts:611–625  ·  view source on GitHub ↗
(expr: any, expectedPrefix: string)

Source from the content-addressed store, hash-verified

609 'x',
610 -1,
611 ]);
612 // The parsed form reaches the W₋₁ numeric kernel
613 const w = ce.parse('\\operatorname{W}_{-1}(-0.1)').N().re;
614 expect(Math.abs(w - -3.577152063957297)).toBeLessThan(1e-10);
615 });
616});
617
618describe('BESSEL J FUNCTION', () => {
619 test('J_0(0) = 1', () => {
620 expectApprox(ce.expr(['BesselJ', 0, 0]), 1);
621 });
622
623 test('J_1(0) = 0', () => {
624 expectApprox(ce.expr(['BesselJ', 1, 0]), 0);
625 });
626
627 test('J_0(1) ≈ 0.7651976865579666', () => {
628 expectApprox(ce.expr(['BesselJ', 0, 1]), 0.7651976865579666);

Callers 1

Calls 3

NMethod · 0.65
toStringMethod · 0.65
replaceMethod · 0.65

Tested by

no test coverage detected