erfcinv(y: number): number
Inverse complementary error function.
Computes the inverse of the complementary error function.
It satisfies y = erfc(x) for 0 ≤ y ≤ 2 with -∞ ≤ x ≤ ∞.
Compute the inverse complementary error function for a value less than 1
Compute the inverse complementary error function for a value less than 1
import { assertEquals, assertAlmostEquals } from "jsr:@std/assert"; assertAlmostEquals(erfcinv(1.5), -0.4769362762044699, 2.384681381022349e-13);
Compute the inverse complementary error function for a value greater than 1
Compute the inverse complementary error function for a value greater than 1
import { assertEquals, assertAlmostEquals } from "jsr:@std/assert"; assertAlmostEquals(erfcinv(0.5), 0.4769362762044699, 2.384681381022349e-13);
Compute the inverse complementary error function for 1
Compute the inverse complementary error function for 1
import { assertEquals, assertAlmostEquals } from "jsr:@std/assert"; assertAlmostEquals(erfcinv(1), -0.0, 1e-14);