(expr: any, expectedPrefix: string)
| 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 | |
| 618 | describe('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); |
no test coverage detected