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

Function expectComplex

test/compute-engine/special-functions.test.ts:805–814  ·  view source on GitHub ↗
(
    expr: any,
    re: number,
    im: number,
    tolerance = 1e-8
  )

Source from the content-addressed store, hash-verified

803 });
804});
805
806// Reference values: mpmath @25 digits, airyai(x, 1) / airybi(x, 1).
807describe("AIRY Ai' FUNCTION (derivative)", () => {
808 test("Ai'(0) ≈ -0.2588194037928068", () => {
809 expectApprox(ce.expr(['AiryAiPrime', 0]), -0.2588194037928068, 1e-12);
810 });
811
812 test("Ai'(1) ≈ -0.15914744129679321 (dd series)", () => {
813 expectApprox(ce.expr(['AiryAiPrime', 1]), -0.15914744129679321, 1e-12);
814 });
815
816 test("Ai'(-5) ≈ 0.32719281855444314 (dd series)", () => {
817 expectApprox(ce.expr(['AiryAiPrime', -5]), 0.32719281855444314, 1e-12);

Callers 1

Calls 2

NMethod · 0.65
absMethod · 0.65

Tested by

no test coverage detected