/** * Complementary error function. * * Calculates the complementary error function, which is widely used in probability, statistics, and partial differential equations. * * The complementary error function is defined as: * * ``` * 2 ∞ * erfc(x) = ─── ∫ e^(-t²) dt = 1 - erf(x) * √π x * ``` * * This implementation provides an approximation with a high degree of accuracy. * * @param x A real value * @returns The value of the complementary error function for the input x * @throws If no arguments are provided * * @example Compute the complementary error function for a single value * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(erfc(0.5), 0.47950009227675744); * * ``` * * @example Compute the complementary error function for a negative value * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(erfc(-1), 1.8427007877600068); * * ``` * * @example Compute the complementary error function for zero * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(erfc(0), 1); * * ``` * * @example Compute the complementary error function for a large positive value * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(erfc(2), 0.004677734989334044); * * ``` * * @example Compute the complementary error function for a large negative value * ```ts * import { assertEquals } from "jsr:@std/assert"; * * assertEquals(erfc(-2), 1.995322265010666); * * ``` */ export default function erfc(x: number): number; //# sourceMappingURL=erfc.d.ts.map