{
  "package": "@arki/math",
  "version": "0.1.0",
  "entries": [
    {
      "subpath": ".",
      "name": "addPolynomials",
      "kind": "function",
      "signature": "export declare function addPolynomials(p: Coefficients, q: Coefficients): number[];",
      "jsdocSummary": "The sum `p + q`."
    },
    {
      "subpath": ".",
      "name": "AmortizationRow",
      "kind": "type",
      "signature": "export type AmortizationRow = { /** 1-based period number. */ period: number; /** Total paid this period: `interest + principal`. */ payment: Decimal; /** Interest part of the payment. */ interest: Decimal; /** Part of the payment that reduces the debt. */ principal: Decimal; /** Debt left after this payment. */ balance: Decimal; };",
      "jsdocSummary": "One line of an amortization schedule."
    },
    {
      "subpath": ".",
      "name": "amortizationSchedule",
      "kind": "function",
      "signature": "export declare function amortizationSchedule(principal: DecimalInput, rate: DecimalInput, periods: number, options: PaymentOptions): AmortizationRow[];",
      "jsdocSummary": "Full repayment schedule, one row per period."
    },
    {
      "subpath": ".",
      "name": "AngleOptions",
      "kind": "type",
      "signature": "export type AngleOptions = { /** Unit of every angle in and out. Default `'rad'`. */ angleUnit?: AngleUnit; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "AngleUnit",
      "kind": "type",
      "signature": "export type AngleUnit = 'deg' | 'rad' | 'grad' | 'turn' | 'arcmin' | 'arcsec';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "AnnuityOptions",
      "kind": "type",
      "signature": "export type AnnuityOptions = { /** Paid in (positive) or taken out (negative) every period. Defaults to 0. */ payment?: DecimalInput; /** When in the period the payment falls. Defaults to `'end'`. */ timing?: PaymentTiming; };",
      "jsdocSummary": "A level payment made every period, added to the balance (negative to withdraw)."
    },
    {
      "subpath": ".",
      "name": "approxEqual",
      "kind": "function",
      "signature": "export declare function approxEqual(a: number, b: number, tolerance?: number): boolean;",
      "jsdocSummary": "Tolerant equality for floats. `tolerance` is relative to the larger magnitude (and absolute near zero), so it works for both `0.1 + 0.2 ≈ 0.3` and `1e12 + 0.001 ≈ 1e12`."
    },
    {
      "subpath": ".",
      "name": "AreaUnit",
      "kind": "type",
      "signature": "export type AreaUnit = 'mm2' | 'cm2' | 'm2' | 'ha' | 'km2' | 'in2' | 'ft2' | 'yd2' | 'ac' | 'mi2';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "beta",
      "kind": "function",
      "signature": "export declare function beta(a: number, b: number): number;",
      "jsdocSummary": "The beta function B(a, b) = Γ(a)Γ(b) / Γ(a + b), for `a, b > 0`. Underflows to `0` for very large arguments."
    },
    {
      "subpath": ".",
      "name": "betaLn",
      "kind": "function",
      "signature": "export declare function betaLn(a: number, b: number): number;",
      "jsdocSummary": "ln B(a, b) = ln Γ(a) + ln Γ(b) − ln Γ(a + b), for `a, b > 0`."
    },
    {
      "subpath": ".",
      "name": "binomial",
      "kind": "function",
      "signature": "export declare function binomial(n: number, p: number): DiscreteDistribution;",
      "jsdocSummary": "Binomial distribution: `n` trials (non-negative safe integer), success probability `p` in [0, 1]."
    },
    {
      "subpath": ".",
      "name": "bisect",
      "kind": "function",
      "signature": "export declare function bisect(f: RealFunction, bracket: readonly [number, number], options?: RootOptions): RootResult;",
      "jsdocSummary": "The root of a continuous `f` inside `bracket`, by bisection. Each step halves the bracket, so reaching a tolerance `t` from width `w` takes `ceil(log2(w / t))` steps; `errorEstimate` bounds the distance to a sign change."
    },
    {
      "subpath": ".",
      "name": "Bounds",
      "kind": "type",
      "signature": "export type Bounds = '[]' | '[)' | '(]' | '()';",
      "jsdocSummary": "Interval notation: `[` / `]` include the bound, `(` / `)` exclude it."
    },
    {
      "subpath": ".",
      "name": "Box",
      "kind": "type",
      "signature": "export type Box = Solid & { readonly spaceDiagonal: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "cbrt",
      "kind": "function",
      "signature": "export declare function cbrt(value: DecimalInput, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Cube root; negative input gives a negative root. Same exact-or-throw rule as `sqrt` (scale s padded up to a multiple of 3, then divided by 3): `cbrt('-27')` → `-3`, `cbrt(2, { scale: 5 })` → `1.25992`."
    },
    {
      "subpath": ".",
      "name": "chiSquare",
      "kind": "function",
      "signature": "export declare function chiSquare(df: number): ContinuousDistribution;",
      "jsdocSummary": "Chi-square distribution with `df > 0` degrees of freedom."
    },
    {
      "subpath": ".",
      "name": "circle",
      "kind": "function",
      "signature": "export declare function circle(radius: number): Circle;",
      "jsdocSummary": "Diameter, circumference and area of a circle."
    },
    {
      "subpath": ".",
      "name": "Circle",
      "kind": "type",
      "signature": "export type Circle = { readonly radius: number; readonly diameter: number; readonly circumference: number; readonly area: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "circleSector",
      "kind": "function",
      "signature": "export declare function circleSector(sector: { readonly radius: number; readonly angle: number; }, options?: AngleOptions): CircleSector;",
      "jsdocSummary": "Arc, chord, sector and segment of a circle cut by a central angle in (0, one full turn]."
    },
    {
      "subpath": ".",
      "name": "CircleSector",
      "kind": "type",
      "signature": "export type CircleSector = { readonly arcLength: number; readonly chordLength: number; readonly sectorArea: number; /** Area between the arc and its chord. */ readonly segmentArea: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "clamp",
      "kind": "function",
      "signature": "export declare function clamp(x: number, min: number, max: number): number;",
      "jsdocSummary": "Limits `x` to `[min, max]`, both ends included."
    },
    {
      "subpath": ".",
      "name": "Coefficients",
      "kind": "type",
      "signature": "export type Coefficients = readonly number[];",
      "jsdocSummary": "Coefficients, highest degree first."
    },
    {
      "subpath": ".",
      "name": "combinations",
      "kind": "function",
      "signature": "export declare function combinations(n: number, k: number): number; ; export declare function combinations(n: bigint, k: bigint): bigint;",
      "jsdocSummary": "Binomial coefficient C(n, k), the number of ways to choose `k` of `n`. Returns `0` when `k` is outside `0..n`. Uses the multiplicative formula, dividing at every step so values stay integral. The `bigint` form allows at most 100_000 steps and a 100,000-digit result (`ResourceLimitError`)."
    },
    {
      "subpath": ".",
      "name": "CompactOptions",
      "kind": "type",
      "signature": "export type CompactOptions = { /** `'short'` gives `1.2M`, `'long'` gives `1.2 million`. Default `'short'`. */ display?: 'short' | 'long'; /** * An ISO 4217 code that turns the result into compact money: `{ currency: 'USD' }` gives * `$1.3M`. The fraction-digit defaults (0 to 1) still apply, so ask for * `maximumFractionDigits: 2` to get `$1.25M`. A formatter's bound currency is not used here. */ currency?: string; /** How the currency is shown, as in `formatCurrency`. Only used with `currency`. */ currencyDisplay?: CurrencyOptions['currencyDisplay']; } & FormatOptions;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "complex",
      "kind": "function",
      "signature": "export declare function complex(re: number, im?: number): Complex; ; export declare function complex(value: Complex | string): Complex;",
      "jsdocSummary": "`complex(3, 4)` is `3 + 4i`; `complex(5)` is real; `complex('3+4i')` parses."
    },
    {
      "subpath": ".",
      "name": "Complex",
      "kind": "class",
      "signature": "export declare class Complex { static readonly ZERO: Complex; static readonly ONE: Complex; static readonly I: Complex; readonly re: number; readonly im: number; private constructor(); /** Builds `re + im·i` from finite parts. `-0` becomes `0`. */ static fromParts(re: number, im: number): Complex; /** Converts a number, a `Complex`, or text such as `'3+4i'`, `'-2i'`, `'5'`. */ static from(value: ComplexInput): Complex; /** `r·(cos θ + i·sin θ)`. `r` must be ≥ 0; both must be finite. */ static fromPolar(r: number, theta: number): Complex; plus(other: ComplexInput): Complex; minus(other: ComplexInput): Complex; times(other: ComplexInput): Complex; /** * Robust complex division (Baudin & Smith 2012, \"A Robust Complex Division * in Scilab\"): Smith's algorithm, which avoids overflow in `|divisor|²`, * plus exact power-of-two scaling when a part is near overflow or underflow, * so `(1e308 + 1e308i) / (1e308 + 1e308i)` is `1`. Throws on a zero divisor, * and `NumericRangeError` only when the quotient itself is out of range. */ dividedBy(other: ComplexInput): Complex; /** `1 / z`. Throws `DivisionByZeroError` for zero. */ inverse(): Complex; negated(): Complex; /** `re - im·i`. */ conjugate(): Complex; /** * Modulus `|z|`, via `Math.hypot` so large parts do not overflow. Throws * `NumericRangeError` when `|z|` itself is beyond the float range, which * finite parts allow (up to √2 × `Number.MAX_VALUE`, as for `1e308 + 1e308i`). */ abs(): number; /** Principal argument in `(-π, π]`. The argument of zero is `0`, as in C's `carg`. */ arg(): number; /** `{ r: abs(), theta: arg() }`; throws `NumericRangeError` where `abs` does. */ toPolar(): Polar; /** `e^z`. */ exp(): Complex; /** Principal natural logarithm `ln|z| + i·arg(z)`. Throws `InvalidArgumentError` for zero. */ ln(): Complex; /** Principal logarithm in `base`: `ln(z) / ln(base)`. `base` must not be 0 or 1. */ log(base: ComplexInput): Complex; /** Principal square root: the root with `re > 0`, or `im ≥ 0` when `re` is 0. */ sqrt(): Complex; /** * Principal power `z^w = e^(w·ln z)`. An integer `w` uses repeated * multiplication (exact for small Gaussian integers); a real `w` uses polar * form (`|z|^w` at angle `w·arg z`). `0^w` is `1` for `w = 0` and `0` when * `re(w) > 0`; otherwise it throws `DivisionByZeroError`. */ pow(exponent: ComplexInput): Complex; private integerPower; /** sin(x + iy) = sin x cosh y + i cos x sinh y; overflows (`NumericRangeError`) only when the result does. */ sin(): Complex; /** cos(x + iy) = cos x cosh y − i sin x sinh y. */ cos(): Complex; /** tan z = −i·tanh(iz), by Kahan's cancellation-free formula; never overflows. */ tan(): Complex; /** sinh z = −i·sin(iz) = sinh x cos y + i cosh x sin y. */ sinh(): Complex; /** cosh z = cos(iz) = cosh x cos y + i sinh x sin y. */ cosh(): Complex; /** tanh z by Kahan's formula: (βρs + it) / (1 + βs²) with t = tan y, β = 1 + t², s = sinh x, ρ = √(1 + s²). */ tanh(): Complex; /** * Principal arcsine, real part in [-π/2, π/2]. Cuts: the real axis outside * [-1, 1]; `asin(2)` is `π/2 - 1.3170i`, `asin(-2)` is `-π/2 + 1.3170i`. */ asin(): Complex; /** * Principal arccosine, real part in [0, π]; `acos z = π/2 − asin z`, same * cuts. `acos(2)` is `1.3170i`, `acos(-2)` is `π - 1.3170i`. */ acos(): Complex; /** * Principal arctangent, real part in [-π/2, π/2]; `atan z = −i·atanh(iz)`. * Cuts: the imaginary axis outside [-i, i]; `atan(2i)` is `π/2 + 0.5493i`, * `atan(-2i)` is `-π/2 - 0.5493i`. `atan(±i)` throws `InvalidArgumentError`. */ atan(): Complex; /** * Principal inverse hyperbolic sine, `asinh z = −i·asin(iz)`. Cuts: the * imaginary axis outside [-i, i]; `asinh(2i)` is `1.3170 + π/2·i`. */ asinh(): Complex; /** * Principal inverse hyperbolic cosine, real part ≥ 0 and imaginary part in * [-π, π]. Cut: the real axis left of 1, valued from above: `acosh(0.5)` is * `1.0472i`, `acosh(-2)` is `1.3170 + πi`. */ acosh(): Complex; /** * Principal inverse hyperbolic tangent, imaginary part in [-π/2, π/2]. Cuts: * the real axis outside [-1, 1]; `atanh(2)` is `0.5493 - π/2·i`, * `atanh(-2)` is `-0.5493 + π/2·i`. `atanh(±1)` throws `InvalidArgumentError`. */ atanh(): Complex; /** * All `n` complex `n`-th roots, counter-clockwise from the principal root * (index 0, the one `pow(1/n)` returns). Zero has `n` roots, all zero. */ nthRoots(n: number): Complex[]; isReal(): boolean; isZero(): boolean; /** Exact equality of both parts. */ eq(other: ComplexInput): boolean; /** * `|z - w| ≤ tolerance × max(1, |z|, |w|)`: absolute near zero, relative * for large values, like `approxEqual` for numbers. */ approxEqual(other: ComplexInput, tolerance?: number): boolean; /** `3 + 4i`, `3 - 4i`, `-2i`, `i`, `5` (see the module notes for the grammar). */ toString(): string; toJSON(): string; /** Throws. A `Complex` never silently becomes a float. */ valueOf(): never; [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string; readonly [Symbol.toStringTag] = \"Complex\"; }",
      "jsdocSummary": "A complex number `re + im·i` with finite float parts. Create one with `complex(3, 4)`, `complex('3+4i')` or `Complex.fromPolar(r, theta)`. Equality (`eq`) is exact; use `approxEqual` after float arithmetic."
    },
    {
      "subpath": ".",
      "name": "ComplexInput",
      "kind": "type",
      "signature": "export type ComplexInput = Complex | number | string;",
      "jsdocSummary": "Anything `Complex.from` accepts: a `Complex`, a finite number, or text like `'3+4i'`."
    },
    {
      "subpath": ".",
      "name": "compoundInterest",
      "kind": "function",
      "signature": "export declare function compoundInterest(principal: DecimalInput, rate: DecimalInput, periods: number, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Interest earned only: `futureValue − principal`. Exact; with `{ scale }` it is rounded once. `periods` must be a non-negative safe integer."
    },
    {
      "subpath": ".",
      "name": "cone",
      "kind": "function",
      "signature": "export declare function cone(dimensions: { readonly radius: number; readonly height: number; }): SlantSolid;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "confidenceInterval",
      "kind": "function",
      "signature": "export declare function confidenceInterval(values: Iterable<number>, options?: ConfidenceIntervalOptions): ConfidenceInterval;",
      "jsdocSummary": "Confidence interval for the mean of `values`, from the exact critical value of the normal (`'z'`) or Student t with `n - 1` degrees of freedom (`'t'`, the default). The spread is the sample standard deviation (`ddof` 1) unless you pass `ddof: 0`. Needs at least 2 values."
    },
    {
      "subpath": ".",
      "name": "ConfidenceInterval",
      "kind": "type",
      "signature": "export type ConfidenceInterval = { mean: number; lower: number; upper: number; marginOfError: number; level: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ConfidenceIntervalOptions",
      "kind": "type",
      "signature": "export type ConfidenceIntervalOptions = VarianceOptions & { /** Confidence level in (0, 1). Default 0.95. */ level?: number; /** Default `'t'` with `n - 1` degrees of freedom. */ method?: IntervalMethod; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ContinuousDistribution",
      "kind": "type",
      "signature": "export type ContinuousDistribution = { /** Probability density at x. */ pdf(x: number): number; /** P(X ≤ x). */ cdf(x: number): number; /** Survival function P(X > x) = 1 − cdf(x), computed on the accurate side where the distribution allows. */ sf(x: number): number; /** * Quantile: the x with cdf(x) = p, p in (0, 1), solved on the accurate side to 1e-12 of the * smaller tail (|cdf(x) − p| ≤ 1e-12·p for p ≤ ½, |sf(x) − (1 − p)| ≤ 1e-12·(1 − p) above), so * far-tail quantiles keep their relative accuracy; p = 0 / 1 return the support bounds * (±Infinity where unbounded). */ quantile(p: number): number; /** Expected value, or `undefined` when the distribution has none. */ readonly mean: number | undefined; /** Variance: `Infinity` when it diverges, `undefined` when the distribution has none. */ readonly variance: number | undefined; };",
      "jsdocSummary": "A continuous probability distribution."
    },
    {
      "subpath": ".",
      "name": "ConvergenceError",
      "kind": "class",
      "signature": "export declare class ConvergenceError extends MathError { readonly code: \"ARKI_MATH_E010\"; readonly remediation = \"Loosen the tolerance, raise the iteration limit, or pass a better starting point.\"; }",
      "jsdocSummary": "An iterative method did not reach its tolerance within its iteration limit."
    },
    {
      "subpath": ".",
      "name": "convert",
      "kind": "function",
      "signature": "export declare function convert(value: number, from: Unit, to: Unit): number;",
      "jsdocSummary": "Converts `value` between two units of the same category, in doubles. `convert(1, 'in', 'cm')` is exactly `2.54`; `convert(100, 'C', 'F')` is `212`. Throws `InvalidArgumentError` for unknown units or units of different categories, and for `0` to or from `l/100km` (zero fuel use or zero distance per litre is infinite)."
    },
    {
      "subpath": ".",
      "name": "convertExact",
      "kind": "function",
      "signature": "export declare function convertExact(value: RationalInput, from: Unit, to: Unit): Rational;",
      "jsdocSummary": "Converts exactly, returning a `Rational`. Linear categories multiply by an exact ratio; temperature applies its exact affine formulas (`°F = °C × 9/5 + 32`, `K = °C + 273.15`); `l/100km` takes the exact reciprocal (`mpg` → `l/100km` is `100 / km-per-litre`)."
    },
    {
      "subpath": ".",
      "name": "correlation",
      "kind": "function",
      "signature": "export declare function correlation(x: Iterable<number>, y: Iterable<number>): number;",
      "jsdocSummary": "Pearson correlation coefficient `r` in `[-1, 1]`. Throws `InvalidArgumentError` for different lengths, fewer than 2 points, or when either side is constant (r is undefined)."
    },
    {
      "subpath": ".",
      "name": "createFormatter",
      "kind": "function",
      "signature": "export declare function createFormatter(defaults: { locale?: string; currency?: string; }): Formatter;",
      "jsdocSummary": "Binds a default locale (and optionally a currency) once. The defaults are copied at creation, so later changes to the caller's object have no effect. Per-call `locale` overrides the default; an explicit currency overrides the bound one. Calls without per-call options reuse a pre-resolved `Intl.NumberFormat` and skip cache-key building. `formatCurrency` with no currency anywhere throws `InvalidArgumentError`."
    },
    {
      "subpath": ".",
      "name": "createRandom",
      "kind": "function",
      "signature": "export declare function createRandom(seed?: number | string): Random;",
      "jsdocSummary": "Seeded → deterministic xoshiro128** stream (seed via splitmix32; string seeds hashed with cyrb53). Unseeded → crypto-backed when available, `Math.random` otherwise. Numeric seeds must be finite. The number `1` and the string `'1'` give the same stream."
    },
    {
      "subpath": ".",
      "name": "cube",
      "kind": "function",
      "signature": "export declare function cube(side: number): Box;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "cubicRoots",
      "kind": "function",
      "signature": "export declare function cubicRoots(a: number, b: number, c: number, d: number): CubicRoots;",
      "jsdocSummary": "Roots of `ax³ + bx² + cx + d` (`a ≠ 0`)."
    },
    {
      "subpath": ".",
      "name": "CubicRoots",
      "kind": "type",
      "signature": "export type CubicRoots = { readonly kind: 'real'; readonly roots: readonly [number, number, number]; } | { readonly kind: 'mixed'; readonly real: number; readonly complex: readonly [Complex, Complex]; };",
      "jsdocSummary": "Three real roots in ascending order (repeated roots listed by multiplicity), or one real root plus a conjugate pair (positive imaginary part first)."
    },
    {
      "subpath": ".",
      "name": "cuboid",
      "kind": "function",
      "signature": "export declare function cuboid(dimensions: { readonly length: number; readonly width: number; readonly height: number; }): Box;",
      "jsdocSummary": "A rectangular box."
    },
    {
      "subpath": ".",
      "name": "CurrencyOptions",
      "kind": "type",
      "signature": "export type CurrencyOptions = { currencyDisplay?: 'symbol' | 'narrowSymbol' | 'code' | 'name'; /** Show negatives in accounting style: `($5.00)` instead of `-$5.00`. */ accounting?: boolean; } & FormatOptions;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "cylinder",
      "kind": "function",
      "signature": "export declare function cylinder(dimensions: { readonly radius: number; readonly height: number; }): LateralSolid;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "DataRateUnit",
      "kind": "type",
      "signature": "export type DataRateUnit = 'bit/s' | 'kbit/s' | 'Mbit/s' | 'Gbit/s' | 'B/s' | 'kB/s' | 'MB/s' | 'GB/s' | 'MiB/s';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "DataUnit",
      "kind": "type",
      "signature": "export type DataUnit = 'B' | 'kB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'KiB' | 'MiB' | 'GiB' | 'TiB' | 'PiB' | 'EiB' | 'bit' | 'kbit' | 'Mbit' | 'Gbit' | 'Kibit' | 'Mibit' | 'Gibit';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "decimal",
      "kind": "function",
      "signature": "export declare function decimal(value: DecimalInput): Decimal;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "Decimal",
      "kind": "class",
      "signature": "export declare class Decimal { readonly coefficient: bigint; readonly scale: number; private constructor(); static from(value: DecimalInput): Decimal; /** Exact sum; accumulates one coefficient instead of allocating a Decimal per element. */ static sum(values: Iterable<DecimalInput>): Decimal; /** Comparator for sorting: `prices.sort(Decimal.compare)`. */ static compare(a: DecimalInput, b: DecimalInput): -1 | 0 | 1; static max(first: DecimalInput, ...rest: DecimalInput[]): Decimal; static min(first: DecimalInput, ...rest: DecimalInput[]): Decimal; plus(other: DecimalInput): Decimal; minus(other: DecimalInput): Decimal; times(other: DecimalInput): Decimal; /** * Exact when the result terminates (`1 ÷ 8 = 0.125`). When it does not * (`1 ÷ 3`), throws `RoundingNecessaryError` unless you say how to round: * `dividedBy(3, { scale: 4, rounding: 'halfEven' })`. */ dividedBy(other: DecimalInput, options?: ScaleOptions): Decimal; /** Remainder with the sign of the dividend, like JavaScript's `%`. */ mod(other: DecimalInput): Decimal; /** Integer exponent. Negative exponents must terminate (`2^-2 = 0.25`) or they throw. */ pow(exponent: number): Decimal; abs(): Decimal; negated(): Decimal; /** * Changes the number of fraction digits. Adding digits is always exact; * dropping non-zero digits needs a rounding mode or it throws. */ toScale(scale: number, rounding?: RoundingMode): Decimal; /** `toScale` with the display-friendly default: half-up. `round(2)` on `1.005` gives `1.01`. */ round(places?: number, rounding?: RoundingMode): Decimal; /** * Rounds to `digits` significant figures: `decimal('123456').roundToSignificant(2)` → `120000`, * `decimal('0.012345').roundToSignificant(3)` → `0.0123`. Fewer digits than that are left as is. Default half-up. */ roundToSignificant(digits: number, rounding?: RoundingMode): Decimal; /** Rounds to the nearest multiple of `step`: `decimal('1.23').roundTo('0.05')` → `1.25`. Default half-up. */ roundTo(step: DecimalInput, rounding?: RoundingMode): Decimal; /** Drops trailing zeros: `1.500` → `1.5`, `2.00` → `2`. */ trim(): Decimal; compareTo(other: DecimalInput): -1 | 0 | 1; eq(other: DecimalInput): boolean; lt(other: DecimalInput): boolean; lte(other: DecimalInput): boolean; gt(other: DecimalInput): boolean; gte(other: DecimalInput): boolean; isZero(): boolean; isPositive(): boolean; isNegative(): boolean; isInteger(): boolean; sign(): -1 | 0 | 1; /** Plain notation, never exponent form: `'0.000001'`, `'-12.30'`. */ toString(): string; /** Like `Number.prototype.toFixed`, but on the exact value and with a chosen rounding mode. */ toFixed(places: number, rounding?: RoundingMode): string; /** The nearest double. Throws if that would overflow or collapse a non-zero value to zero. */ toNumber(): number; /** Requires an integral value; round first if needed. */ toBigInt(): bigint; toRational(): Rational; toJSON(): string; /** Throws. A `Decimal` never silently becomes a float. */ valueOf(): never; [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string; readonly [Symbol.toStringTag] = \"Decimal\"; }",
      "jsdocSummary": "An exact finite decimal: `coefficient × 10^-scale`. The scale is retained, so `'1.10'` stays `1.10` and `'1.10' × 3` is `3.30` — what a person expects from money and measurements. Equality is numeric: `decimal('1.0').eq('1.00')` is `true`."
    },
    {
      "subpath": ".",
      "name": "DecimalInput",
      "kind": "type",
      "signature": "export type DecimalInput = Decimal | string | number | bigint;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "derivative",
      "kind": "function",
      "signature": "export declare function derivative(f: RealFunction, x: number, options?: ExtrapolationOptions): ExtrapolationResult;",
      "jsdocSummary": "The derivative `f'(x)`, by Ridders' extrapolation of central differences."
    },
    {
      "subpath": ".",
      "name": "digitSum",
      "kind": "function",
      "signature": "export declare function digitSum(n: number | bigint): number;",
      "jsdocSummary": "Sum of the decimal digits of `|n|`: `digitSum(-123)` is `6`."
    },
    {
      "subpath": ".",
      "name": "DiscreteDistribution",
      "kind": "type",
      "signature": "export type DiscreteDistribution = { /** P(X = k) for integer k (0 for any other k). */ pmf(k: number): number; /** P(X ≤ k). */ cdf(k: number): number; /** Survival function P(X > k) = 1 − cdf(k), computed on the accurate side. */ sf(k: number): number; /** * Quantile: exactly the smallest integer k with `cdf(k) >= p`, using this object's own `cdf` * (no tolerance), so `quantile(cdf(k)) === k`. p = 0 gives 0; p = 1 gives the support's upper bound. */ quantile(p: number): number; /** Expected value. */ readonly mean: number; /** Variance. */ readonly variance: number; };",
      "jsdocSummary": "A discrete probability distribution over the non-negative integers."
    },
    {
      "subpath": ".",
      "name": "distance",
      "kind": "function",
      "signature": "export declare function distance(a: Point2, b: Point2): number; ; export declare function distance(a: Point3, b: Point3): number;",
      "jsdocSummary": "Euclidean distance between two points of the same dimension."
    },
    {
      "subpath": ".",
      "name": "DivisionByZeroError",
      "kind": "class",
      "signature": "export declare class DivisionByZeroError extends MathError { readonly code: \"ARKI_MATH_E003\"; readonly remediation = \"Check the divisor for zero before dividing.\"; }",
      "jsdocSummary": "Division by zero, or zero raised to a negative power."
    },
    {
      "subpath": ".",
      "name": "divisors",
      "kind": "function",
      "signature": "export declare function divisors(n: number): number[]; ; export declare function divisors(n: bigint): bigint[];",
      "jsdocSummary": "All positive divisors in ascending order: `divisors(28)` is `[1, 2, 4, 7, 14, 28]`. Requires `n >= 1`. Built from the prime factorization, so `bigint` input is limited to `n < 2^64`."
    },
    {
      "subpath": ".",
      "name": "divmod",
      "kind": "function",
      "signature": "export declare function divmod(a: number, b: number): [quotient: number, remainder: number]; ; export declare function divmod(a: bigint, b: bigint): [quotient: bigint, remainder: bigint];",
      "jsdocSummary": "Floor division and remainder, like Python's `divmod`: the quotient rounds toward −∞ and the remainder takes the sign of the divisor, so `divmod(-7, 2)` is `[-4, 1]` and `divmod(7, -2)` is `[-4, -1]`."
    },
    {
      "subpath": ".",
      "name": "DynamicViscosityUnit",
      "kind": "type",
      "signature": "export type DynamicViscosityUnit = 'Pa*s' | 'mPa*s' | 'P' | 'cP';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "E",
      "kind": "function",
      "signature": "export declare function E(scale: number): Decimal;",
      "jsdocSummary": "e to `scale` fraction digits, rounded half-even. Σ 1/k!, cached per precision."
    },
    {
      "subpath": ".",
      "name": "effectiveRate",
      "kind": "function",
      "signature": "export declare function effectiveRate(nominalRate: DecimalInput, periodsPerYear: number, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Effective annual rate from a nominal rate compounded `periodsPerYear` times: `(1 + nominal ÷ n)^n − 1`. Computed as an exact fraction and rounded once with `{ scale }`. Without options the exact value is returned when it terminates, and `RoundingNecessaryError` is thrown when it does not."
    },
    {
      "subpath": ".",
      "name": "ElectricCurrentUnit",
      "kind": "type",
      "signature": "export type ElectricCurrentUnit = 'µA' | 'mA' | 'A' | 'kA';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ellipse",
      "kind": "function",
      "signature": "export declare function ellipse(axes: { readonly semiAxisX: number; readonly semiAxisY: number; }): Ellipse;",
      "jsdocSummary": "Area, perimeter and eccentricity of an ellipse with the given semi-axes (either order)."
    },
    {
      "subpath": ".",
      "name": "Ellipse",
      "kind": "type",
      "signature": "export type Ellipse = { readonly area: number; /** Exact to double precision (arithmetic-geometric mean), not an approximation. */ readonly perimeter: number; /** 0 for a circle, approaching 1 as the ellipse flattens. */ readonly eccentricity: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "EmptyDataError",
      "kind": "class",
      "signature": "export declare class EmptyDataError extends MathError { readonly code: \"ARKI_MATH_E006\"; readonly remediation = \"Pass at least as many values as the statistic needs.\"; }",
      "jsdocSummary": "A statistic was asked of an empty (or too small) data set."
    },
    {
      "subpath": ".",
      "name": "en",
      "kind": "variable",
      "signature": "export declare const en: NumberWordsLocale;",
      "jsdocSummary": "American English: `one hundred two`, `two thousand twenty-six`."
    },
    {
      "subpath": ".",
      "name": "EnergyUnit",
      "kind": "type",
      "signature": "export type EnergyUnit = 'J' | 'kJ' | 'cal' | 'kcal' | 'Wh' | 'kWh' | 'MJ' | 'GJ' | 'BTU' | 'eV' | 'ft*lbf';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "enGB",
      "kind": "variable",
      "signature": "export declare const enGB: NumberWordsLocale;",
      "jsdocSummary": "British English: `one hundred and two`, `one thousand and five`."
    },
    {
      "subpath": ".",
      "name": "erf",
      "kind": "function",
      "signature": "export declare function erf(x: number): number;",
      "jsdocSummary": "The error function erf(x) = 2/√π ∫₀ˣ e^(−t²) dt (Cody's rational approximations, ~1e-16)."
    },
    {
      "subpath": ".",
      "name": "erfc",
      "kind": "function",
      "signature": "export declare function erfc(x: number): number;",
      "jsdocSummary": "The complementary error function erfc(x) = 1 − erf(x), accurate in the far tail."
    },
    {
      "subpath": ".",
      "name": "erfInv",
      "kind": "function",
      "signature": "export declare function erfInv(p: number): number;",
      "jsdocSummary": "Inverse error function: the x with erf(x) = p, for p in [−1, 1] (±1 give ±Infinity)."
    },
    {
      "subpath": ".",
      "name": "evaluatePolynomial",
      "kind": "function",
      "signature": "export declare function evaluatePolynomial(coefficients: Coefficients, x: number): number; ; export declare function evaluatePolynomial(coefficients: Coefficients, x: Complex): Complex;",
      "jsdocSummary": "The value at `x` by Horner's rule (one multiply and one add per coefficient). A `Complex` point gives a `Complex` value."
    },
    {
      "subpath": ".",
      "name": "exp",
      "kind": "function",
      "signature": "export declare function exp(value: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "e^x, correctly rounded to `scale` fraction digits. `exp(0)` is exactly 1; every other result is irrational, so `rounding: 'unnecessary'` throws. Results with more than 10 000 digits (`scale` + integer digits; about x > 23 000 at small scales) throw `ResourceLimitError`. Very negative x rounds to zero (or one unit for `'up'`/`'ceiling'`)."
    },
    {
      "subpath": ".",
      "name": "exponential",
      "kind": "function",
      "signature": "export declare function exponential(rate: number): ContinuousDistribution;",
      "jsdocSummary": "Exponential distribution with `rate > 0`."
    },
    {
      "subpath": ".",
      "name": "ExponentialFit",
      "kind": "type",
      "signature": "export type ExponentialFit = Fit & { readonly a: number; readonly b: number; };",
      "jsdocSummary": "`y = a * e^(b * x)`."
    },
    {
      "subpath": ".",
      "name": "exponentialRegression",
      "kind": "function",
      "signature": "export declare function exponentialRegression(x: Iterable<number>, y: Iterable<number>): ExponentialFit;",
      "jsdocSummary": "Exponential fit `y = a * e^(b * x)`, by least squares on `ln y` against x (so large y weigh less than in a direct fit). `r2` is measured on the original y. Throws `InvalidArgumentError` unless every y is positive, plus `linearRegression`'s conditions."
    },
    {
      "subpath": ".",
      "name": "ExtrapolationConvergenceError",
      "kind": "class",
      "signature": "export declare class ExtrapolationConvergenceError extends ConvergenceError { /** The best value, its error estimate and the evaluations spent. */ readonly best: ExtrapolationResult; constructor(message: string, best: ExtrapolationResult); }",
      "jsdocSummary": "`derivative` or `limit` missed its tolerance; `best` is the best estimate it reached."
    },
    {
      "subpath": ".",
      "name": "ExtrapolationOptions",
      "kind": "type",
      "signature": "export type ExtrapolationOptions = { /** First (largest) sample step (default `max(0.1, 0.001 · |x|)`). */ readonly step?: number; /** Absolute tolerance on the error estimate (default `1e-10`). */ readonly absoluteTolerance?: number; /** Relative tolerance, times `|value|` (default `1e-8`). */ readonly relativeTolerance?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ExtrapolationResult",
      "kind": "type",
      "signature": "export type ExtrapolationResult = { readonly value: number; /** Estimated absolute error of `value`, from the agreement of the extrapolation tableau. */ readonly errorEstimate: number; /** Calls of `f`. */ readonly evaluations: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "factorial",
      "kind": "function",
      "signature": "export declare function factorial(n: number): number; ; export declare function factorial(n: bigint): bigint;",
      "jsdocSummary": "`n!`. The `number` form works up to `n = 18`; above that the result is unsafe and it throws `NumericRangeError`. The `bigint` form is capped at `n = 25_205` (results up to 100,000 digits; `ResourceLimitError`)."
    },
    {
      "subpath": ".",
      "name": "fibonacci",
      "kind": "function",
      "signature": "export declare function fibonacci(n: number): bigint;",
      "jsdocSummary": "The n-th Fibonacci number (`F(0) = 0`, `F(1) = 1`) by fast doubling. Always returns a `bigint`. `n` must be a non-negative safe integer at most 100_000 (`ResourceLimitError` above)."
    },
    {
      "subpath": ".",
      "name": "FileSizeOptions",
      "kind": "type",
      "signature": "export type FileSizeOptions = { /** * `'si'` uses powers of 1000 (`kB`), `'iec'` powers of 1024 (`KiB`), `'jedec'` powers of 1024 * with the `KB`/`MB`/`GB` labels most file managers print. Default `'si'`. */ system?: 'si' | 'iec' | 'jedec'; } & FormatOptions;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "findRoot",
      "kind": "function",
      "signature": "export declare function findRoot(f: RealFunction, bracket: readonly [number, number], options?: RootOptions): RootResult;",
      "jsdocSummary": "The root of a continuous `f` inside `bracket`, by Brent's method. `f(a)` and `f(b)` must have opposite signs (or one of them be 0). `errorEstimate` is the width of the final bracket, so `root` is within it of a sign change."
    },
    {
      "subpath": ".",
      "name": "findRoots",
      "kind": "function",
      "signature": "export declare function findRoots(f: RealFunction, interval: readonly [number, number], options?: FindRootsOptions): RootResult[];",
      "jsdocSummary": "Every root that a sign-change scan of `interval` can see, ascending. `f` is evaluated on `samples + 1` evenly spaced points (default `samples` 100); grid points where `f` is exactly 0 are reported as they are, and each sub-interval whose ends differ in sign is refined by Brent's method. A grid point where `f` has no finite value (it returns `NaN` or `±Infinity`, or throws a `MathError`, as `sqrt(x)` does for `x < 0`) is a gap: no sub-interval that touches it is refined, and the scan goes on. The `iterations`/`evaluations` of each result count only its refinement; the scan itself costs `samples + 1` evaluations."
    },
    {
      "subpath": ".",
      "name": "FindRootsOptions",
      "kind": "type",
      "signature": "export type FindRootsOptions = RootOptions & { /** Number of equal sub-intervals scanned for a sign change (default 100). */ readonly samples?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "fisherF",
      "kind": "function",
      "signature": "export declare function fisherF(df1: number, df2: number): ContinuousDistribution;",
      "jsdocSummary": "Fisher's F distribution with `df1, df2 > 0` degrees of freedom."
    },
    {
      "subpath": ".",
      "name": "ForceUnit",
      "kind": "type",
      "signature": "export type ForceUnit = 'N' | 'kN' | 'lbf' | 'kgf' | 'dyn';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "formatCompact",
      "kind": "function",
      "signature": "export declare function formatCompact(value: FormatValue, options?: CompactOptions): string;",
      "jsdocSummary": "Short or long compact form: `formatCompact(1230000)` → `'1.2M'`. Default max 1 fraction digit. With `currency` it is compact money: `formatCompact(1_250_000, { currency: 'USD' })` → `'$1.3M'`."
    },
    {
      "subpath": ".",
      "name": "formatCurrency",
      "kind": "function",
      "signature": "export declare function formatCurrency(value: FormatValue, currency: string, options?: CurrencyOptions): string;",
      "jsdocSummary": "Formats money. Fraction digits come from the currency (2 for USD, 0 for JPY) unless overridden: `formatCurrency(1234.5, 'EUR', { locale: 'de-DE' })` → `'1.234,50 €'`."
    },
    {
      "subpath": ".",
      "name": "formatFileSize",
      "kind": "function",
      "signature": "export declare function formatFileSize(bytes: number | bigint, options?: FileSizeOptions): string;",
      "jsdocSummary": "Human file size: `formatFileSize(1536)` → `'1.5 kB'`. Picks the largest unit where the value is at least 1. The number part is locale-aware; the unit label is appended in English (`Intl` has no IEC units). Very large bigints lose precision beyond 2^53, which is invisible at one fraction digit. Rounding can show `'1000 kB'` for 999999 bytes; it does not promote to MB."
    },
    {
      "subpath": ".",
      "name": "formatNumber",
      "kind": "function",
      "signature": "export declare function formatNumber(value: FormatValue, options?: FormatOptions): string;",
      "jsdocSummary": "Formats a number for display: `formatNumber(1234.5)` → `'1,234.5'`. Intl defaults: 0–3 fraction digits."
    },
    {
      "subpath": ".",
      "name": "FormatOptions",
      "kind": "type",
      "signature": "export type FormatOptions = { /** * BCP 47 locale tag. Default `'en-US'`, so output is the same on every machine * (SSR-safe). Pass `'default'` (`RUNTIME_LOCALE`) to opt in to the runtime's own * locale, what `toLocaleString()` uses with no argument; the output then depends * on the user's machine. */ locale?: string; minimumFractionDigits?: number; maximumFractionDigits?: number; useGrouping?: boolean; /** How digits beyond `maximumFractionDigits` are dropped. Default `'halfUp'`. */ rounding?: Exclude<RoundingMode, 'unnecessary'>; signDisplay?: 'auto' | 'always' | 'exceptZero' | 'negative' | 'never'; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "formatOrdinal",
      "kind": "function",
      "signature": "export declare function formatOrdinal(value: DecimalInput, options?: OrdinalOptions): string;",
      "jsdocSummary": "`formatOrdinal(21)` → `'21st'`; `formatOrdinal(1000)` → `'1,000th'`. Positive integers only."
    },
    {
      "subpath": ".",
      "name": "formatPercent",
      "kind": "function",
      "signature": "export declare function formatPercent(fraction: FormatValue, options?: FormatOptions): string;",
      "jsdocSummary": "Formats a FRACTION as a percent. The input is a fraction, NOT a percentage: `formatPercent(0.125)` → `'12.5%'`, while `formatPercent(12.5)` → `'1,250%'`. Default 0–2 fraction digits."
    },
    {
      "subpath": ".",
      "name": "Formatter",
      "kind": "type",
      "signature": "export type Formatter = { formatNumber(value: FormatValue, options?: FormatOptions): string; formatPercent(value: FormatValue, options?: FormatOptions): string; formatCompact(value: FormatValue, options?: CompactOptions): string; formatFileSize(bytes: number | bigint, options?: FileSizeOptions): string; /** Uses the bound currency. */ formatCurrency(value: FormatValue, options?: CurrencyOptions): string; /** An explicit currency overrides the bound one. */ formatCurrency(value: FormatValue, currency: string, options?: CurrencyOptions): string; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "formatUnit",
      "kind": "function",
      "signature": "export declare function formatUnit(value: number, unit: Unit, options?: FormatUnitOptions): string;",
      "jsdocSummary": "Formats `value` with its unit through `Intl.NumberFormat`: `formatUnit(5, 'km')` is `'5 km'`, and with `{ display: 'long' }` it is `'5 kilometers'`. Units Intl has no name for (`nmi`, `psi`, `rad`, `K`, ...) print as the number, a space and the symbol; `display` does not apply to them. Power, frequency, force, torque, fuel economy and data rates all take this path (`Intl` names none of them), with `hp_metric` shown as `PS` and `N*m` as `N·m`."
    },
    {
      "subpath": ".",
      "name": "FormatUnitOptions",
      "kind": "type",
      "signature": "export type FormatUnitOptions = { /** BCP 47 locale; defaults to the runtime's. */ locale?: string; /** `'short'` (default) → `5 km`, `'long'` → `5 kilometers`, `'narrow'` → `5km`. */ display?: 'short' | 'long' | 'narrow'; maximumFractionDigits?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "FormatValue",
      "kind": "type",
      "signature": "export type FormatValue = number | bigint | Decimal | string;",
      "jsdocSummary": "A formattable value. A string must be a number in plain decimal syntax (`'-1234.50'`)."
    },
    {
      "subpath": ".",
      "name": "FrequencyUnit",
      "kind": "type",
      "signature": "export type FrequencyUnit = 'Hz' | 'kHz' | 'MHz' | 'GHz' | 'rpm';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "fromBase",
      "kind": "function",
      "signature": "export declare function fromBase(text: string, base: number): bigint;",
      "jsdocSummary": "Reads an integer written in `base` 2 to 36 into a `bigint`: `fromBase('ff', 16)` is `255n`. An optional leading `-` or `+` is allowed and digits are case insensitive. Anything else (spaces, `_`, a `0x` prefix, a digit too large for the base, empty text) throws `NumberFormatError`."
    },
    {
      "subpath": ".",
      "name": "frustum",
      "kind": "function",
      "signature": "export declare function frustum(dimensions: { readonly bottomRadius: number; readonly topRadius: number; readonly height: number; }): SlantSolid;",
      "jsdocSummary": "A conical frustum: a cone with its tip cut off parallel to the base."
    },
    {
      "subpath": ".",
      "name": "FuelEconomyUnit",
      "kind": "type",
      "signature": "export type FuelEconomyUnit = 'km/l' | 'l/100km' | 'mpg' | 'mpg_imp';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "futureValue",
      "kind": "function",
      "signature": "export declare function futureValue(principal: DecimalInput, rate: DecimalInput, periods: number, options?: FutureValueOptions): Decimal;",
      "jsdocSummary": "Balance after `periods`: `principal × (1 + rate)^periods`, plus each `payment` grown to the end (Excel `FV`, negated; see the module doc)."
    },
    {
      "subpath": ".",
      "name": "FutureValueOptions",
      "kind": "type",
      "signature": "export type FutureValueOptions = AnnuityOptions & (ScaleOptions | { scale?: undefined; rounding?: undefined; });",
      "jsdocSummary": "`futureValue` options: an optional payment, and `{ scale, rounding }` only together."
    },
    {
      "subpath": ".",
      "name": "gamma",
      "kind": "function",
      "signature": "export declare function gamma(x: number): number;",
      "jsdocSummary": "The gamma function Γ(x) for finite `x`. `Γ(n + 1) = n!`, so this is the float factorial for `n > 18`. Positive integers up to 171 are exact products; other values use Lanczos (relative error ~1e-15) with the reflection formula for `x < 0.5`. Poles (`0` and the negative integers) throw `InvalidArgumentError`; a result beyond the double range (`x` above about 171.62, or `x` within ~1e-308 of a pole) throws `NumericRangeError`. Very negative `x` whose true value is below the smallest double returns `0`."
    },
    {
      "subpath": ".",
      "name": "gammaLn",
      "kind": "function",
      "signature": "export declare function gammaLn(x: number): number;",
      "jsdocSummary": "Natural log of the gamma function, ln Γ(x), for x > 0 (Lanczos, g = 7, ~1e-15)."
    },
    {
      "subpath": ".",
      "name": "gcd",
      "kind": "function",
      "signature": "export declare function gcd(a: number, b: number): number; ; export declare function gcd(a: bigint, b: bigint): bigint;",
      "jsdocSummary": "Greatest common divisor, always non-negative. `gcd(0, 0)` is `0`."
    },
    {
      "subpath": ".",
      "name": "Gender",
      "kind": "type",
      "signature": "export type Gender = 'masculine' | 'feminine' | 'neuter';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "IlluminanceUnit",
      "kind": "type",
      "signature": "export type IlluminanceUnit = 'lx' | 'fc';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "inRange",
      "kind": "function",
      "signature": "export declare function inRange(x: number, min: number, max: number, bounds?: Bounds): boolean;",
      "jsdocSummary": "Is `x` inside the interval? Defaults to `[min, max)`, the usual half-open range."
    },
    {
      "subpath": ".",
      "name": "IntegerInput",
      "kind": "type",
      "signature": "export type IntegerInput = string | number | bigint;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "integrate",
      "kind": "function",
      "signature": "export declare function integrate(f: RealFunction, bounds: readonly [number, number], options?: IntegrateOptions): IntegrationResult;",
      "jsdocSummary": "`∫ f(x) dx` from `bounds[0]` to `bounds[1]`, with an error estimate. Either bound may be infinite. See the module docs for the methods, the tolerance and the failure policy."
    },
    {
      "subpath": ".",
      "name": "IntegrateOptions",
      "kind": "type",
      "signature": "export type IntegrateOptions = { /** `'gaussKronrod'` (default, adaptive G7–K15) or `'tanhSinh'` (double-exponential, for endpoint singularities). */ readonly method?: IntegrationMethod; /** Absolute tolerance on the error estimate (default `1e-12`). */ readonly absoluteTolerance?: number; /** Relative tolerance, times `|value|` (default `1e-10`). */ readonly relativeTolerance?: number; /** Most calls of `f` before `IntegrationConvergenceError` (default 20,000). */ readonly maxEvaluations?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "IntegrationConvergenceError",
      "kind": "class",
      "signature": "export declare class IntegrationConvergenceError extends ConvergenceError { /** The best value, its error estimate and the evaluations spent (sign already applied for reversed bounds). */ readonly best: IntegrationResult; constructor(message: string, best: IntegrationResult); }",
      "jsdocSummary": "`integrate` missed its tolerance; `best` is the best estimate it reached."
    },
    {
      "subpath": ".",
      "name": "IntegrationMethod",
      "kind": "type",
      "signature": "export type IntegrationMethod = 'gaussKronrod' | 'tanhSinh';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "IntegrationResult",
      "kind": "type",
      "signature": "export type IntegrationResult = { readonly value: number; /** Estimated absolute error of `value`. */ readonly errorEstimate: number; /** Calls of `f`. */ readonly evaluations: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "internalRateOfReturn",
      "kind": "function",
      "signature": "export declare function internalRateOfReturn(cashFlows: readonly number[], options?: { guess?: number; tolerance?: number; }): number;",
      "jsdocSummary": "Internal rate of return as a JS number (the rate that makes NPV zero), like Excel `IRR`. Cash flows start at t = 0 and need at least one negative and one positive value."
    },
    {
      "subpath": ".",
      "name": "IntervalMethod",
      "kind": "type",
      "signature": "export type IntervalMethod = 'z' | 't';",
      "jsdocSummary": "Confidence-interval method: `'z'` (normal critical value) or `'t'` (Student's t, for estimated spread)."
    },
    {
      "subpath": ".",
      "name": "InvalidArgumentError",
      "kind": "class",
      "signature": "export declare class InvalidArgumentError extends MathError { readonly code: \"ARKI_MATH_E002\"; readonly remediation = \"Check the argument against the documented range in the function reference.\"; }",
      "jsdocSummary": "An argument is outside what the function accepts (reversed bounds, negative step, ...)."
    },
    {
      "subpath": ".",
      "name": "inverseLerp",
      "kind": "function",
      "signature": "export declare function inverseLerp(start: number, end: number, x: number): number;",
      "jsdocSummary": "The `t` for which `lerp(start, end, t) === x`."
    },
    {
      "subpath": ".",
      "name": "isComplex",
      "kind": "function",
      "signature": "export declare function isComplex(value: unknown): value is Complex;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "isDecimal",
      "kind": "function",
      "signature": "export declare function isDecimal(value: unknown): value is Decimal;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "isEven",
      "kind": "function",
      "signature": "export declare function isEven(n: number | bigint): boolean;",
      "jsdocSummary": "True when `n` is divisible by 2. Zero is even."
    },
    {
      "subpath": ".",
      "name": "isOdd",
      "kind": "function",
      "signature": "export declare function isOdd(n: number | bigint): boolean;",
      "jsdocSummary": "True when `n` is not divisible by 2. Negative odd numbers are odd."
    },
    {
      "subpath": ".",
      "name": "isPrime",
      "kind": "function",
      "signature": "export declare function isPrime(n: number): boolean; ; export declare function isPrime(n: bigint): boolean;",
      "jsdocSummary": "Exact primality test by Miller–Rabin with a fixed base set that is deterministic for every `n < 2^64`. Values below 2 are not prime. At or above 2^64 it throws `NumericRangeError` rather than guess."
    },
    {
      "subpath": ".",
      "name": "isPythagoreanTriple",
      "kind": "function",
      "signature": "export declare function isPythagoreanTriple(a: number, b: number, c: number): boolean; ; export declare function isPythagoreanTriple(a: bigint, b: bigint, c: bigint): boolean;",
      "jsdocSummary": "Whether three positive integers are a Pythagorean triple, in any order (the largest is taken as the hypotenuse). Exact: `number` inputs are squared as `bigint`, so large integers are not misjudged by rounding. Non-integers and non-positive values are simply not triples."
    },
    {
      "subpath": ".",
      "name": "isRational",
      "kind": "function",
      "signature": "export declare function isRational(value: unknown): value is Rational;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "isRoundingMode",
      "kind": "function",
      "signature": "export declare function isRoundingMode(value: unknown): value is RoundingMode;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "isUnit",
      "kind": "function",
      "signature": "export declare function isUnit(value: string): value is Unit;",
      "jsdocSummary": "True when `value` is one of the supported unit symbols (case sensitive)."
    },
    {
      "subpath": ".",
      "name": "joinUnits",
      "kind": "function",
      "signature": "export declare function joinUnits(parts: readonly UnitPart[], to: Unit): number;",
      "jsdocSummary": "Adds composite parts back into one number in `to`: `joinUnits([{ unit: 'ft', value: 5 }, { unit: 'in', value: 7 }], 'in')` is `67`. Parts may come in any order and may be fractional. It reads parts the way `splitUnits` writes them: the sign of the first non-zero part applies to the whole value, so `-5 ft 7 in` is minus (5 ft + 7 in), `-67 in`. Later parts must not be negative (`InvalidArgumentError`); that would be ambiguous. The sum is exact, rounded to a double once at the end."
    },
    {
      "subpath": ".",
      "name": "KinematicViscosityUnit",
      "kind": "type",
      "signature": "export type KinematicViscosityUnit = 'm2/s' | 'cSt' | 'St';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "LateralSolid",
      "kind": "type",
      "signature": "export type LateralSolid = Solid & { readonly lateralArea: number; };",
      "jsdocSummary": "A solid with a curved or slanted side: `lateralArea` excludes the bases."
    },
    {
      "subpath": ".",
      "name": "lcm",
      "kind": "function",
      "signature": "export declare function lcm(a: number, b: number): number; ; export declare function lcm(a: bigint, b: bigint): bigint;",
      "jsdocSummary": "Least common multiple, always non-negative. Zero in → zero out."
    },
    {
      "subpath": ".",
      "name": "LengthUnit",
      "kind": "type",
      "signature": "export type LengthUnit = 'nm' | 'µm' | 'mm' | 'cm' | 'dm' | 'm' | 'km' | 'in' | 'ft' | 'yd' | 'fathom' | 'mi' | 'nmi' | 'au' | 'ly' | 'pc';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "lerp",
      "kind": "function",
      "signature": "export declare function lerp(start: number, end: number, t: number): number;",
      "jsdocSummary": "Linear interpolation. `t` outside `[0, 1]` extrapolates. Exact at both ends."
    },
    {
      "subpath": ".",
      "name": "limit",
      "kind": "function",
      "signature": "export declare function limit(f: RealFunction, x0: number, options?: LimitOptions): ExtrapolationResult;",
      "jsdocSummary": "`lim f(x)` as `x → x0`, by Richardson extrapolation of `f(x0 ± h)`. A numerical estimate, not a proof that the limit exists."
    },
    {
      "subpath": ".",
      "name": "LimitOptions",
      "kind": "type",
      "signature": "export type LimitOptions = ExtrapolationOptions & { /** Approach `x0` from below, above, or both (default). */ readonly side?: LimitSide; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "LimitSide",
      "kind": "type",
      "signature": "export type LimitSide = 'left' | 'right' | 'both';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "LinearFit",
      "kind": "type",
      "signature": "export type LinearFit = Fit & FitDiagnostics & { readonly slope: number; readonly intercept: number; /** Standard error of the slope: `residualStandardError / sqrt(sum((x - mean x)^2))`. */ readonly slopeStandardError: number | undefined; /** Standard error of the intercept: `residualStandardError * sqrt(1/n + mean(x)^2 / sum((x - mean x)^2))`. */ readonly interceptStandardError: number | undefined; };",
      "jsdocSummary": "`y = intercept + slope * x`, with the usual least-squares diagnostics. They use n - 2 residual degrees of freedom (n - k - 1 with k = 1 predictor) and are `undefined` for exactly two points, where no residual freedom is left."
    },
    {
      "subpath": ".",
      "name": "linearRegression",
      "kind": "function",
      "signature": "export declare function linearRegression(x: Iterable<number>, y: Iterable<number>): LinearFit;",
      "jsdocSummary": "Ordinary least-squares line `y = slope * x + intercept`. Throws `InvalidArgumentError` for different lengths, fewer than 2 points, or when x is constant (the slope is undefined)."
    },
    {
      "subpath": ".",
      "name": "linspace",
      "kind": "function",
      "signature": "export declare function linspace(start: number, end: number, count: number): number[];",
      "jsdocSummary": "`count` evenly spaced numbers from `start` to `end`, both included: `linspace(0, 1, 5)` → `[0, 0.25, 0.5, 0.75, 1]`. `count` 1 gives `[start]`, 0 gives `[]`. The first element is exactly `start` and the last exactly `end`; the span may exceed the float range (`linspace(-1e308, 1e308, 3)` works). Throws `InvalidArgumentError` unless `count` is a non-negative safe integer and `ResourceLimitError` past 10,000,000 elements."
    },
    {
      "subpath": ".",
      "name": "ln",
      "kind": "function",
      "signature": "export declare function ln(value: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Natural logarithm, correctly rounded to `scale` fraction digits. `ln(1)` is exactly 0; values ≤ 0 throw `InvalidArgumentError`. `ln 2` and `ln 10` are computed once per precision and reused."
    },
    {
      "subpath": ".",
      "name": "localeNumberSymbols",
      "kind": "function",
      "signature": "export declare function localeNumberSymbols(locale: string): LocaleNumberSymbols;",
      "jsdocSummary": "The decimal, group and minus symbols and the digits a locale uses. Cached per locale."
    },
    {
      "subpath": ".",
      "name": "LocaleNumberSymbols",
      "kind": "type",
      "signature": "export type LocaleNumberSymbols = { decimal: string; group: string; minusSign: string; /** The ten digits `0` to `9` as this locale writes them. */ digits: string[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "log",
      "kind": "function",
      "signature": "export declare function log(value: DecimalInput, base: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Logarithm of `value` in `base` (> 0, ≠ 1), correctly rounded to `scale` fraction digits. Exact results are detected — `log(8, 2)` → `3`, `log(8, 4)` → `1.5` — so `rounding: 'unnecessary'` accepts them."
    },
    {
      "subpath": ".",
      "name": "log10",
      "kind": "function",
      "signature": "export declare function log10(value: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Base-10 logarithm, correctly rounded: `log10(1000, { scale: 5 })` → `3.00000`."
    },
    {
      "subpath": ".",
      "name": "log2",
      "kind": "function",
      "signature": "export declare function log2(value: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Base-2 logarithm, correctly rounded: `log2(1024, { scale: 5 })` → `10.00000`."
    },
    {
      "subpath": ".",
      "name": "LogarithmicFit",
      "kind": "type",
      "signature": "export type LogarithmicFit = Fit & { readonly a: number; readonly b: number; };",
      "jsdocSummary": "`y = a + b * ln(x)`."
    },
    {
      "subpath": ".",
      "name": "logarithmicRegression",
      "kind": "function",
      "signature": "export declare function logarithmicRegression(x: Iterable<number>, y: Iterable<number>): LogarithmicFit;",
      "jsdocSummary": "Logarithmic fit `y = a + b * ln(x)`, by least squares on `ln x`. `r2` is measured on the original y. Throws `InvalidArgumentError` unless every x is positive; `predict` does too."
    },
    {
      "subpath": ".",
      "name": "marginOfError",
      "kind": "function",
      "signature": "export declare function marginOfError({ stddev: spread, n, level, method }: MarginOfErrorInput): number;",
      "jsdocSummary": "Half-width of a confidence interval for a mean: critical value times the standard error. `method` is `'t'` by default (needs `n >= 2`), `level` 0.95."
    },
    {
      "subpath": ".",
      "name": "MarginOfErrorInput",
      "kind": "type",
      "signature": "export type MarginOfErrorInput = { /** Standard deviation of the data (sample, unless you know the population value). */ stddev: number; /** Number of observations. */ n: number; level?: number; method?: IntervalMethod; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "MassUnit",
      "kind": "type",
      "signature": "export type MassUnit = 'mg' | 'ct' | 'g' | 'kg' | 't' | 'oz' | 'lb' | 'st' | 'ton_us' | 'ton_uk';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "MATH_ERROR_CODES",
      "kind": "variable",
      "signature": "export declare const MATH_ERROR_CODES: { /** * A string is not a number in the accepted syntax. * * @fix Pass a plain ASCII decimal string such as `'12.5'` or `'1e3'`, or parse locale text with `@arki/math/parse`. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly numberFormat: 'ARKI_MATH_E001'; /** * An argument is outside what the function accepts. * * @fix Read the message for the argument and fix its value: bounds in order, a positive step, a probability from 0 to 1. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly invalidArgument: 'ARKI_MATH_E002'; /** * Division by zero, or zero raised to a negative power. * * @fix Check the divisor before the call, or choose a result for the zero case in your own code. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly divisionByZero: 'ARKI_MATH_E003'; /** * The exact result needs rounding and no rounding mode was given. * * @fix Pass a scale and a rounding mode, for example `{ scale: 4, rounding: 'halfEven' }`. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly roundingNecessary: 'ARKI_MATH_E004'; /** * A value cannot be represented in the target type. * * @fix Use a `bigint` or `Decimal` input, or keep the value inside the safe integer and finite float range. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly numericRange: 'ARKI_MATH_E005'; /** * A statistic was asked of an empty or too small data set. * * @fix Check the data length first. Most statistics need one value; variance and regression need more. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly emptyData: 'ARKI_MATH_E006'; /** * An input or result exceeds the documented digit limits. * * @fix Keep values within 10 000 digits and an exponent of 10 000. These limits guard against hostile input. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly resourceLimit: 'ARKI_MATH_E007'; /** * The runtime lacks an `Intl` feature this call depends on. * * @fix Pass `symbols` to parse without `Intl`, or use a runtime with the feature (Hermes on iOS lacks `formatToParts`). * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly unsupportedFeature: 'ARKI_MATH_E008'; /** * A matrix is singular to working precision. * * @fix Check the matrix with `conditionNumber` or `rank`, or use `leastSquares` or `pseudoInverse`. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly singularMatrix: 'ARKI_MATH_E009'; /** * An iterative method did not reach its tolerance. * * @fix Read `.best` for the best estimate, widen the tolerance or iteration limit, or give a better starting bracket. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly convergence: 'ARKI_MATH_E010'; /** * A matrix that must be symmetric positive definite is not. * * @fix Pass a symmetric positive definite matrix, or use LU or QR decomposition instead of Cholesky. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly notPositiveDefinite: 'ARKI_MATH_E011'; };",
      "jsdocSummary": "Stable error codes of `@arki/math`."
    },
    {
      "subpath": ".",
      "name": "MathError",
      "kind": "class",
      "signature": "export declare abstract class MathError extends Error { /** Stable machine-readable code, `ARKI_<PACKAGE>_E<nnn>`. */ abstract readonly code: string; /** What to do about it, in one sentence. */ abstract readonly remediation: string; constructor(message: string, options?: ErrorOptions); }",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "MathErrorCode",
      "kind": "type",
      "signature": "export type MathErrorCode = (typeof MATH_ERROR_CODES)[keyof typeof MATH_ERROR_CODES];",
      "jsdocSummary": "The code of a `MathError` raised by `@arki/math` itself."
    },
    {
      "subpath": ".",
      "name": "MAX_NONCENTRALITY",
      "kind": "variable",
      "signature": "export declare const MAX_NONCENTRALITY = 37.62;",
      "jsdocSummary": "Largest |ncp| `noncentralT` accepts: beyond it `exp(−ncp²/2)` underflows in the AS 243 series. Power is already 1 (or 0) to double precision there, so callers can clamp to this value without changing any visible result."
    },
    {
      "subpath": ".",
      "name": "mean",
      "kind": "function",
      "signature": "export declare function mean(values: Iterable<number>): number; ; export declare function mean(values: Iterable<Decimal>, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Arithmetic mean (compensated sum divided by the count). Throws `EmptyDataError` when empty. Exact mean of `Decimal` values: the exact sum divided by the count. Like `Decimal.dividedBy`, it throws `RoundingNecessaryError` when the result does not terminate (`[1, 1, 2]`) unless you pass `{ scale, rounding }`."
    },
    {
      "subpath": ".",
      "name": "MeanSampleSizeInput",
      "kind": "type",
      "signature": "export type MeanSampleSizeInput = { marginOfError: number; stddev: number; level?: number; proportion?: never; };",
      "jsdocSummary": "Sample size for estimating a mean to within `marginOfError`, given the spread `stddev`."
    },
    {
      "subpath": ".",
      "name": "median",
      "kind": "function",
      "signature": "export declare function median(values: Iterable<number>): number; ; export declare function median(values: Iterable<Decimal>): Decimal;",
      "jsdocSummary": "Middle value; for an even count, the average of the two middle values. Throws `EmptyDataError` when empty. Exact median of `Decimal` values; the midpoint of two middles, `(a + b) / 2`, is always exact in decimal."
    },
    {
      "subpath": ".",
      "name": "midpoint",
      "kind": "function",
      "signature": "export declare function midpoint(a: Point2, b: Point2): Point2; ; export declare function midpoint(a: Point3, b: Point3): Point3;",
      "jsdocSummary": "The point halfway between two points of the same dimension."
    },
    {
      "subpath": ".",
      "name": "minMax",
      "kind": "function",
      "signature": "export declare function minMax(values: Iterable<number>): MinMax; ; export declare function minMax(values: Iterable<Decimal>): { min: Decimal; max: Decimal; };",
      "jsdocSummary": "Smallest and largest value in a single pass. Throws `EmptyDataError` when empty. Smallest and largest `Decimal` in a single pass. Throws `EmptyDataError` when empty."
    },
    {
      "subpath": ".",
      "name": "MinMax",
      "kind": "type",
      "signature": "export type MinMax = { min: number; max: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "MixedNumber",
      "kind": "type",
      "signature": "export type MixedNumber = { whole: bigint; fraction: Rational; };",
      "jsdocSummary": "A mixed number: `7/2` is `{ whole: 3n, fraction: 1/2 }`. The fraction carries the sign of the value."
    },
    {
      "subpath": ".",
      "name": "mode",
      "kind": "function",
      "signature": "export declare function mode(values: Iterable<number>): number[];",
      "jsdocSummary": "Every most-frequent value, ascending. Ties return all tied values; an empty input gives `[]`."
    },
    {
      "subpath": ".",
      "name": "modInverse",
      "kind": "function",
      "signature": "export declare function modInverse(a: bigint, modulus: bigint): bigint;",
      "jsdocSummary": "Modular inverse of `a` mod `modulus` in `[0, modulus)`, by extended Euclid. Throws `InvalidArgumentError` when `gcd(a, modulus) !== 1`."
    },
    {
      "subpath": ".",
      "name": "modPow",
      "kind": "function",
      "signature": "export declare function modPow(base: bigint, exponent: bigint, modulus: bigint): bigint;",
      "jsdocSummary": "`base ** exponent mod modulus`, in `[0, modulus)`. Requires `exponent >= 0` and `modulus > 0`. Square-and-multiply."
    },
    {
      "subpath": ".",
      "name": "multiplyPolynomials",
      "kind": "function",
      "signature": "export declare function multiplyPolynomials(p: Coefficients, q: Coefficients): number[];",
      "jsdocSummary": "The product `p × q` (coefficient convolution)."
    },
    {
      "subpath": ".",
      "name": "netPresentValue",
      "kind": "function",
      "signature": "export declare function netPresentValue(rate: DecimalInput, cashFlows: readonly DecimalInput[], options: ScaleOptions): Decimal;",
      "jsdocSummary": "Net present value of `cashFlows` at t = 1..n, like Excel `NPV`: the first flow is discounted one full period. Add a t = 0 flow yourself: `initial.plus(netPresentValue(rate, flows, options))`."
    },
    {
      "subpath": ".",
      "name": "newton",
      "kind": "function",
      "signature": "export declare function newton(f: RealFunction, df: RealFunction, x0: number, options?: NewtonOptions): RootResult;",
      "jsdocSummary": "A root of `f` near `x0` by Newton's method, given the derivative `df`. Unbracketed steps are damped (halved until `|f|` decreases); with `{ bracket }` the method falls back to bisection whenever Newton would leave the bracket or stall, and `errorEstimate` is at most the bracket width."
    },
    {
      "subpath": ".",
      "name": "NewtonOptions",
      "kind": "type",
      "signature": "export type NewtonOptions = RootOptions & { /** A sign-change bracket containing `x0`; turns on the bisection fallback of `rtsafe`. */ readonly bracket?: readonly [number, number]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "nominalRate",
      "kind": "function",
      "signature": "export declare function nominalRate(effectiveRate: DecimalInput, periodsPerYear: number, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Nominal annual rate that compounds `periodsPerYear` times to the given effective rate: `n × ((1 + effective)^(1/n) − 1)`."
    },
    {
      "subpath": ".",
      "name": "noncentralT",
      "kind": "function",
      "signature": "export declare function noncentralT(df: number, ncp: number): ContinuousDistribution;",
      "jsdocSummary": "Noncentral t distribution with `df > 0` degrees of freedom and noncentrality `ncp` (|ncp| ≤ 37.62). `cdf` is Lenth's (1989) AS 243 series (~1e-14; a normal approximation is used for df > 4e5); it returns the exact limits 1 / 0 once df/x² underflows. `pdf` uses the Johnson–Kotz–Balakrishnan power series on the side of 0 where x and ncp share a sign (all terms positive) and close to 0 on the other side; elsewhere it uses the identity f(x) = df/x · [F(x·√(1+2/df); df+2) − F(x; df)], where the cdf difference no longer cancels (accurate to ~1e-15 absolute, so relative accuracy fades only where the density itself is below ~1e-13). `quantile` is the safeguarded Newton solver. With `ncp = 0` it equals `studentT(df)`."
    },
    {
      "subpath": ".",
      "name": "normal",
      "kind": "function",
      "signature": "export declare function normal(mean?: number, stddev?: number): ContinuousDistribution;",
      "jsdocSummary": "Normal distribution N(mean, stddev²). Defaults to the standard normal."
    },
    {
      "subpath": ".",
      "name": "NotPositiveDefiniteError",
      "kind": "class",
      "signature": "export declare class NotPositiveDefiniteError extends MathError { readonly code: \"ARKI_MATH_E011\"; readonly remediation = \"Pass a symmetric positive definite matrix, or use a general factorization such as LU.\"; }",
      "jsdocSummary": "A matrix that must be symmetric positive definite (for a Cholesky factorization) is not."
    },
    {
      "subpath": ".",
      "name": "nthRoot",
      "kind": "function",
      "signature": "export declare function nthRoot(value: DecimalInput, n: number, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "The n-th root for a positive safe integer `n`. Same exact-or-throw rule as `sqrt` (scale padded up to a multiple of n, then divided by n): `nthRoot('1024', 10)` → `2`. Even roots of negative values throw `InvalidArgumentError`; odd roots keep the sign. Intermediates are capped at 200 000 digits (`ResourceLimitError`), which bounds `n × scale`."
    },
    {
      "subpath": ".",
      "name": "num",
      "kind": "function",
      "signature": "export declare function num(value: number): NumberValue;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "NumberFormatError",
      "kind": "class",
      "signature": "export declare class NumberFormatError extends MathError { readonly code: \"ARKI_MATH_E001\"; readonly remediation = \"Pass a string in the documented number syntax, or validate user input before parsing.\"; }",
      "jsdocSummary": "The input string is not a number in the accepted syntax."
    },
    {
      "subpath": ".",
      "name": "NumberValue",
      "kind": "class",
      "signature": "export declare class NumberValue { #private; constructor(value: number); plus(other: number): NumberValue; minus(other: number): NumberValue; times(other: number): NumberValue; dividedBy(other: number): NumberValue; abs(): NumberValue; negated(): NumberValue; clamp(min: number, max: number): NumberValue; lerp(end: number, t: number): NumberValue; remap(inStart: number, inEnd: number, outStart: number, outEnd: number): NumberValue; round(places?: number, mode?: RoundingMode): NumberValue; roundTo(step: number, mode?: RoundingMode): NumberValue; inRange(min: number, max: number, bounds?: Bounds): boolean; approxEqual(other: number, tolerance?: number): boolean; isZero(): boolean; isPositive(): boolean; isNegative(): boolean; isInteger(): boolean; formatNumber(options?: FormatOptions): string; formatCurrency(currency: string, options?: CurrencyOptions): string; /** The wrapped value is a fraction: `num(0.125).formatPercent()` → `'12.5%'`. */ formatPercent(options?: FormatOptions): string; formatCompact(options?: CompactOptions): string; /** Exact decimal of the shortest spelling: `num(0.1).toDecimal()` is exactly 1/10. */ toDecimal(): Decimal; toRatio(): Rational; value(): number; toString(): string; toJSON(): number; /** Throws. Use `.value()`; implicit coercion hides the wrapper's boundary. */ valueOf(): never; [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string; readonly [Symbol.toStringTag] = \"NumberValue\"; }",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "NumberWordsLocale",
      "kind": "type",
      "signature": "export type NumberWordsLocale = { /** BCP 47 tag, also used for digit formatting. */ readonly code: string; /** The word placed before a negative number: `minus`. */ readonly negative: string; /** The word read for the decimal separator: `point`, `virgulă`, `Komma`. */ readonly decimalSeparator: string; /** * How many base-1000 groups the locale can spell (`en`: 12, up to 10^36 − 1). * The core rejects longer integers with `NumericRangeError` by digit count, * before any grouping work is done. */ readonly maxGroups: number; /** Cardinal words for `n ≥ 0`. Throws `NumericRangeError` beyond the locale's largest scale word. */ spell(n: bigint, context: WordsContext): string; /** Ordinal words for `n ≥ 1`: `twenty-first`, `al douăzeci și unulea`. */ spellOrdinal(n: bigint, context: WordsContext): string; /** Ordinal with digits for `n ≥ 1`: `21st`, `21.`, `al 21-lea`. `digits` is `n` already formatted for the locale. */ ordinal(n: bigint, digits: string, context: WordsContext): string; };",
      "jsdocSummary": "The contract a locale implements. All inputs are non-negative integers; the core handles sign, fractions and thresholds."
    },
    {
      "subpath": ".",
      "name": "NumericRangeError",
      "kind": "class",
      "signature": "export declare class NumericRangeError extends MathError { readonly code: \"ARKI_MATH_E005\"; readonly remediation = \"Use decimal or bigint arithmetic, or keep the value inside the safe range.\"; }",
      "jsdocSummary": "A value cannot be represented in the target type (non-finite, unsafe integer, overflow, underflow)."
    },
    {
      "subpath": ".",
      "name": "OrdinalOptions",
      "kind": "type",
      "signature": "export type OrdinalOptions = { locale?: NumberWordsLocale; gender?: Gender; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "parseDecimal",
      "kind": "function",
      "signature": "export declare function parseDecimal(input: string, options?: ParseOptions): Decimal;",
      "jsdocSummary": "Like `parseNumber` (lenient, locale-aware) but exact: every digit survives in the returned `Decimal`."
    },
    {
      "subpath": ".",
      "name": "parseNumber",
      "kind": "function",
      "signature": "export declare function parseNumber(input: string, options?: ParseOptions): number;",
      "jsdocSummary": "Parses a locale-formatted number: `parseNumber('1.234,56', { locale: 'de-DE' })` → `1234.56`. Lenient and locale-aware; for strict ASCII input use `decimal()`."
    },
    {
      "subpath": ".",
      "name": "ParseOptions",
      "kind": "type",
      "signature": "export type ParseOptions = { /** BCP 47 locale tag. Default `'en-US'`. Ignored when `symbols` is given. */ locale?: string; /** * The separators to read, instead of asking `Intl` for the locale's: * `{ decimal: ',', group: '.' }`. Minus defaults to `'-'`, digits to ASCII. */ symbols?: ParseSymbols; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "ParseSymbols",
      "kind": "type",
      "signature": "export type ParseSymbols = { decimal: string; group: string; minusSign?: string; /** The ten digits `0` to `9`. Default ASCII. */ digits?: readonly string[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "payment",
      "kind": "function",
      "signature": "export declare function payment(principal: DecimalInput, rate: DecimalInput, periods: number, options: PaymentOptions): Decimal;",
      "jsdocSummary": "Excel `PMT`: the level payment that pays off a loan of `principal` over `periods` at `rate` per period."
    },
    {
      "subpath": ".",
      "name": "PaymentOptions",
      "kind": "type",
      "signature": "export type PaymentOptions = ScaleOptions & { timing?: PaymentTiming; };",
      "jsdocSummary": "Options for `payment` and `amortizationSchedule`."
    },
    {
      "subpath": ".",
      "name": "PaymentTiming",
      "kind": "type",
      "signature": "export type PaymentTiming = 'end' | 'begin';",
      "jsdocSummary": "When in the period payments fall: `'end'` is Excel `type` 0, `'begin'` is `type` 1."
    },
    {
      "subpath": ".",
      "name": "percentile",
      "kind": "function",
      "signature": "export declare function percentile(values: Iterable<number>, p: number, options?: QuantileOptions): number;",
      "jsdocSummary": "The `p`-th percentile, `p` in `[0, 100]`. By default linear interpolation between closest ranks (R-7: Excel `PERCENTILE.INC`, NumPy default); pass `{ method }` for any other Hyndman–Fan definition (see `QUANTILE_METHODS`). Equal to `quantile(values, p / 100, options)`. Throws `EmptyDataError` when empty and `InvalidArgumentError` when `p` is out of range."
    },
    {
      "subpath": ".",
      "name": "percentileRank",
      "kind": "function",
      "signature": "export declare function percentileRank(values: Iterable<number>, score: number, options?: PercentileRankOptions): number;",
      "jsdocSummary": "Where `score` falls in `values`, as a percentage in `[0, 100]` — the inverse of `percentile`. `kind` says how values equal to the score count (see `PercentileRankKind`); the default `'mean'` counts half of them, so the median of distinct values ranks 50. `score` need not be one of the values. Matches SciPy's `percentileofscore(values, score, kind)`. Throws `EmptyDataError` when empty."
    },
    {
      "subpath": ".",
      "name": "PercentileRankKind",
      "kind": "type",
      "signature": "export type PercentileRankKind = 'strict' | 'weak' | 'mean' | 'rank';",
      "jsdocSummary": "How `percentileRank` counts values equal to the score (the `kind` of SciPy's `percentileofscore`); with B values below and E equal, out of N: - `'strict'`: B / N, the share strictly below. - `'weak'`: (B + E) / N, the share at or below (the empirical CDF). - `'mean'` (default): (B + E / 2) / N, the textbook percentile rank: half of the ties count as below. - `'rank'`: SciPy's default, the average of the ranks the ties would take: (B + (E + 1) / 2) / N when E > 0, else B / N."
    },
    {
      "subpath": ".",
      "name": "PercentileRankOptions",
      "kind": "type",
      "signature": "export type PercentileRankOptions = { kind?: PercentileRankKind; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "periodsToReach",
      "kind": "function",
      "signature": "export declare function periodsToReach(principal: number, target: number, rate: number, options?: AnnuityOptions): number;",
      "jsdocSummary": "Periods until the balance goes from `principal` to `target` at `rate` per period: the `periods` that makes `futureValue(principal, rate, periods, options)` equal `target`. Approximate and possibly fractional; round up yourself for whole months. The result can be passed straight back to `futureValue`."
    },
    {
      "subpath": ".",
      "name": "permutations",
      "kind": "function",
      "signature": "export declare function permutations(n: number, k: number): number; ; export declare function permutations(n: bigint, k: bigint): bigint;",
      "jsdocSummary": "Ordered selections P(n, k) = n! / (n − k)!. Returns `0` when `k` is outside `0..n`. The `bigint` form allows at most 100_000 terms and a 100,000-digit result."
    },
    {
      "subpath": ".",
      "name": "PI",
      "kind": "function",
      "signature": "export declare function PI(scale: number): Decimal;",
      "jsdocSummary": "π to `scale` fraction digits, rounded half-even. Machin's formula, cached per precision."
    },
    {
      "subpath": ".",
      "name": "pick",
      "kind": "variable",
      "signature": "export declare const pick: Random['pick'];",
      "jsdocSummary": "One element chosen uniformly by the default generator. Throws `EmptyDataError` on an empty array."
    },
    {
      "subpath": ".",
      "name": "Point2",
      "kind": "type",
      "signature": "export type Point2 = readonly [x: number, y: number];",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "Point3",
      "kind": "type",
      "signature": "export type Point3 = readonly [x: number, y: number, z: number];",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "poisson",
      "kind": "function",
      "signature": "export declare function poisson(lambda: number): DiscreteDistribution;",
      "jsdocSummary": "Poisson distribution with rate `lambda > 0`."
    },
    {
      "subpath": ".",
      "name": "Polar",
      "kind": "type",
      "signature": "export type Polar = { r: number; theta: number; };",
      "jsdocSummary": "Polar form: modulus `r` (≥ 0) and argument `theta` in radians."
    },
    {
      "subpath": ".",
      "name": "polygonArea",
      "kind": "function",
      "signature": "export declare function polygonArea(vertices: Iterable<Point2>): number;",
      "jsdocSummary": "Area of a simple polygon (shoelace formula), regardless of vertex order."
    },
    {
      "subpath": ".",
      "name": "polynomialDerivative",
      "kind": "function",
      "signature": "export declare function polynomialDerivative(coefficients: Coefficients): number[];",
      "jsdocSummary": "The derivative. A constant's derivative is `[0]`."
    },
    {
      "subpath": ".",
      "name": "PolynomialFit",
      "kind": "type",
      "signature": "export type PolynomialFit = Fit & FitDiagnostics & { readonly coefficients: readonly number[]; };",
      "jsdocSummary": "`y = c[0] + c[1] * x + c[2] * x^2 + ...`, lowest degree first. Diagnostics use k = degree predictors, so n - degree - 1 residual degrees of freedom."
    },
    {
      "subpath": ".",
      "name": "polynomialRegression",
      "kind": "function",
      "signature": "export declare function polynomialRegression(x: Iterable<number>, y: Iterable<number>, degree: number): PolynomialFit;",
      "jsdocSummary": "Least-squares polynomial of the given `degree`, by Householder QR with column pivoting on the Vandermonde matrix (never the normal equations, which square its condition number; NumPy's `polyfit` uses an SVD to the same end). Coefficients are lowest degree first (`[c0, c1, ...]`); `r2` is measured on the original y."
    },
    {
      "subpath": ".",
      "name": "polynomialRoots",
      "kind": "function",
      "signature": "export declare function polynomialRoots(coefficients: Coefficients): Complex[];",
      "jsdocSummary": "All roots of a polynomial of any degree, as `Complex` values listed by multiplicity and sorted by real part, then imaginary part."
    },
    {
      "subpath": ".",
      "name": "pooledStddev",
      "kind": "function",
      "signature": "export declare function pooledStddev(samples: Iterable<Iterable<number> | SampleSummary>, options?: VarianceOptions): number;",
      "jsdocSummary": "Square root of `pooledVariance`, with the same groups and `ddof` convention (sample by default)."
    },
    {
      "subpath": ".",
      "name": "pooledVariance",
      "kind": "function",
      "signature": "export declare function pooledVariance(samples: Iterable<Iterable<number> | SampleSummary>, options?: VarianceOptions): number;",
      "jsdocSummary": "Pooled variance of two or more groups that share one spread: the within-group sums of squared deviations, added, over the pooled degrees of freedom, `sum(SS_i) / (N - g * ddof)` for g groups of N values in all. The default `ddof: 1` is the textbook pooled sample variance `sum((n_i - 1) * s_i^2) / sum(n_i - 1)` (the two-sample t-test's s_p^2, ANOVA's mean square within); `ddof: 0` divides by N. A group of one value adds no spread and, with `ddof: 1`, no degrees of freedom."
    },
    {
      "subpath": ".",
      "name": "pow",
      "kind": "function",
      "signature": "export declare function pow(base: DecimalInput, exponent: DecimalInput, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "`base` raised to `exponent`."
    },
    {
      "subpath": ".",
      "name": "PowerFit",
      "kind": "type",
      "signature": "export type PowerFit = Fit & { readonly a: number; readonly b: number; };",
      "jsdocSummary": "`y = a * x^b`."
    },
    {
      "subpath": ".",
      "name": "powerRegression",
      "kind": "function",
      "signature": "export declare function powerRegression(x: Iterable<number>, y: Iterable<number>): PowerFit;",
      "jsdocSummary": "Power fit `y = a * x^b`, by least squares on `ln y` against `ln x`. `r2` is measured on the original y. Throws `InvalidArgumentError` unless every x and y is positive; `predict` needs a positive x."
    },
    {
      "subpath": ".",
      "name": "PowerUnit",
      "kind": "type",
      "signature": "export type PowerUnit = 'W' | 'kW' | 'MW' | 'hp' | 'hp_metric' | 'BTU/h' | 'kcal/h';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "presentValue",
      "kind": "function",
      "signature": "export declare function presentValue(amount: DecimalInput, rate: DecimalInput, periods: number, options: PresentValueOptions): Decimal;",
      "jsdocSummary": "Today's worth of `amount` due after `periods`, plus each `payment` discounted to today (Excel `PV`, negated; see the module doc): `(amount + payment × timing × ((1 + rate)^periods − 1) ÷ rate) ÷ (1 + rate)^periods`."
    },
    {
      "subpath": ".",
      "name": "PresentValueOptions",
      "kind": "type",
      "signature": "export type PresentValueOptions = AnnuityOptions & ScaleOptions;",
      "jsdocSummary": "`presentValue` options: an optional payment and the required `{ scale }`."
    },
    {
      "subpath": ".",
      "name": "PressureUnit",
      "kind": "type",
      "signature": "export type PressureUnit = 'Pa' | 'kPa' | 'MPa' | 'bar' | 'atm' | 'psi' | 'mmHg' | 'Torr';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "primeFactors",
      "kind": "function",
      "signature": "export declare function primeFactors(n: number): number[]; ; export declare function primeFactors(n: bigint): bigint[];",
      "jsdocSummary": "Prime factors in ascending order, with multiplicity: `360` gives `[2, 2, 2, 3, 3, 5]`. Values below 2 give `[]`; negatives throw `InvalidArgumentError`. Trial division by 2, 3 and `6k ± 1` up to 1e6, then Pollard's rho (Brent) with Miller–Rabin. Throws `NumericRangeError` for `n >= 2^64`."
    },
    {
      "subpath": ".",
      "name": "ProportionSampleSizeInput",
      "kind": "type",
      "signature": "export type ProportionSampleSizeInput = { marginOfError: number; proportion?: number; level?: number; stddev?: never; };",
      "jsdocSummary": "Sample size for estimating a proportion; `proportion` defaults to 0.5, the worst case."
    },
    {
      "subpath": ".",
      "name": "PythagoreanTriple",
      "kind": "type",
      "signature": "export type PythagoreanTriple = readonly [a: number, b: number, c: number];",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "pythagoreanTriples",
      "kind": "function",
      "signature": "export declare function pythagoreanTriples(limit: number, options?: { primitive?: boolean; }): PythagoreanTriple[];",
      "jsdocSummary": "Every Pythagorean triple `[a, b, c]` with `a < b < c ≤ limit`, generated by Euclid's formula (a = m² − n², b = 2mn, c = m² + n²), sorted by `c` then `a`. With `primitive: true`, only triples whose sides share no common factor. `limit` must be a non-negative safe integer; the result has roughly `limit · ln(limit) / 2π` entries, so very large limits need a lot of memory."
    },
    {
      "subpath": ".",
      "name": "quadraticRoots",
      "kind": "function",
      "signature": "export declare function quadraticRoots(a: number, b: number, c: number): QuadraticRoots;",
      "jsdocSummary": "Roots of `ax² + bx + c` (`a ≠ 0`). Uses `q = -(b + sign(b)·√D) / 2`, then `q / a` and `c / q`, so neither root suffers cancellation — the small root of `x² - 1e8·x + 1` comes out to full precision. The discriminant is computed with exact products, so near-double roots stay accurate: for Kahan's `94906265.625x² - 189812534x + 94906268.375` it is the exact `7.5625` where the plain float formula gives `0` (a false double root)."
    },
    {
      "subpath": ".",
      "name": "QuadraticRoots",
      "kind": "type",
      "signature": "export type QuadraticRoots = { readonly kind: 'real'; readonly roots: readonly [number, number]; readonly discriminant: number; } | { readonly kind: 'complex'; readonly roots: readonly [Complex, Complex]; readonly discriminant: number; };",
      "jsdocSummary": "Two real roots in ascending order (a double root is listed twice), or a conjugate pair (positive imaginary part first). `discriminant` is `b² - 4ac`; its sign is what chose `kind` (`>= 0` real, `< 0` complex)."
    },
    {
      "subpath": ".",
      "name": "quantile",
      "kind": "function",
      "signature": "export declare function quantile(values: Iterable<number>, q: number, options?: QuantileOptions): number;",
      "jsdocSummary": "The `q`-th quantile, `q` in `[0, 1]`, with the same methods as `percentile` (default R-7): `quantile(values, 0.9)` equals `percentile(values, 90)`. Throws `EmptyDataError` when empty and `InvalidArgumentError` when `q` is out of range."
    },
    {
      "subpath": ".",
      "name": "QUANTILE_METHODS",
      "kind": "variable",
      "signature": "export declare const QUANTILE_METHODS: readonly ['inverseCdf', 'averagedInverseCdf', 'closestObservation', 'interpolatedInverseCdf', 'hazen', 'weibull', 'linear', 'medianUnbiased', 'normalUnbiased'];",
      "jsdocSummary": "Hyndman & Fan's nine sample-quantile definitions (Amer. Statistician 50(4), 1996), by NumPy's names; R's `quantile(x, type = k)` is the R-k column."
    },
    {
      "subpath": ".",
      "name": "QuantileMethod",
      "kind": "type",
      "signature": "export type QuantileMethod = (typeof QUANTILE_METHODS)[number];",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "QuantileOptions",
      "kind": "type",
      "signature": "export type QuantileOptions = { /** Sample-quantile definition; default `'linear'` (R-7). */ method?: QuantileMethod; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "QuartileMethod",
      "kind": "type",
      "signature": "export type QuartileMethod = QuantileMethod | 'tukey' | 'medianExcluded';",
      "jsdocSummary": "A quantile method, or one of the two \"median of each half\" rules. They differ only for an odd count, in where the middle value goes: - `'tukey'`: Tukey's hinges; the median belongs to BOTH halves (R `fivenum`, `boxplot.stats`; Wikipedia's \"Method 2\"). - `'medianExcluded'`: the median belongs to NEITHER half (TI-83/TI-84 `1-Var Stats`, Moore & McCabe; Wikipedia's \"Method 1\")."
    },
    {
      "subpath": ".",
      "name": "QuartileOptions",
      "kind": "type",
      "signature": "export type QuartileOptions = { /** Default `'linear'` (R-7), like `quantile`. */ method?: QuartileMethod; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "quartiles",
      "kind": "function",
      "signature": "export declare function quartiles(values: Iterable<number>, options?: QuartileOptions): Quartiles;",
      "jsdocSummary": "The three quartiles in one sort. `method` is any `quantile` method (default `'linear'`, R-7), or a \"median of each half\" rule (see `QuartileMethod`): `'tukey'` (the box-plot hinges of R's `fivenum`, the middle value in both halves when the count is odd) or `'medianExcluded'` (the TI-83 rule, the middle value in neither half). A single value is all three quartiles. Throws `EmptyDataError` when empty."
    },
    {
      "subpath": ".",
      "name": "Quartiles",
      "kind": "type",
      "signature": "export type Quartiles = { /** First quartile (or lower hinge). */ q1: number; /** The median. */ q2: number; /** Third quartile (or upper hinge). */ q3: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "RadioactivityUnit",
      "kind": "type",
      "signature": "export type RadioactivityUnit = 'Bq' | 'kBq' | 'MBq' | 'µCi' | 'mCi' | 'Ci';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "random",
      "kind": "variable",
      "signature": "export declare const random: Random;",
      "jsdocSummary": "The default, unseeded generator."
    },
    {
      "subpath": ".",
      "name": "Random",
      "kind": "type",
      "signature": "export type Random = { /** Uniform float in [0, 1), 53 bits of randomness. */ next(this: void): number; /** Uniform integer in [min, max], both ends included. Safe integers only; unbiased (rejection sampling, never `Math.floor(next() * range)` bias). */ int(this: void, min: number, max: number): number; /** Uniform float in [min, max). Defaults to [0, 1). */ float(this: void, min?: number, max?: number): number; /** `true` with the given probability (default 0.5). */ bool(this: void, probability?: number): boolean; /** One element, uniformly. EmptyDataError on empty. */ pick<T>(this: void, items: readonly T[]): T; /** A shuffled copy (Fisher–Yates). Input is never mutated. */ shuffle<T>(this: void, items: readonly T[]): T[]; /** `count` distinct elements without replacement, in random order. InvalidArgumentError if count > length or negative. */ sample<T>(this: void, items: readonly T[], count: number): T[]; /** Normally distributed value (Box–Muller). */ gaussian(this: void, mean?: number, stddev?: number): number; };",
      "jsdocSummary": "A random-number source with helpers for the common draws."
    },
    {
      "subpath": ".",
      "name": "randomBool",
      "kind": "variable",
      "signature": "export declare const randomBool: Random['bool'];",
      "jsdocSummary": "`true` with the given probability (default 0.5), from the default generator."
    },
    {
      "subpath": ".",
      "name": "randomFloat",
      "kind": "variable",
      "signature": "export declare const randomFloat: Random['float'];",
      "jsdocSummary": "Uniform float in [min, max) (default [0, 1)) from the default generator."
    },
    {
      "subpath": ".",
      "name": "randomInt",
      "kind": "variable",
      "signature": "export declare const randomInt: Random['int'];",
      "jsdocSummary": "Uniform integer in [min, max], both ends included, from the default generator."
    },
    {
      "subpath": ".",
      "name": "range",
      "kind": "function",
      "signature": "export declare function range(end: number): number[]; ; export declare function range(start: number, end: number, step?: number): number[];",
      "jsdocSummary": "Numbers from `start` up to but excluding `end`, `step` apart (default 1): `range(5)` → `[0, 1, 2, 3, 4]`, `range(0, 1, 0.25)` → `[0, 0.25, 0.5, 0.75]`. A negative `step` counts down (`range(3, 0, -1)` → `[3, 2, 1]`). Each element is `start + i * step`, so fractional steps do not drift. A step pointing away from `end` gives `[]`. Throws `InvalidArgumentError` for a zero or non-finite step and `ResourceLimitError` past 10,000,000 elements."
    },
    {
      "subpath": ".",
      "name": "ratio",
      "kind": "function",
      "signature": "export declare function ratio(value: RationalInput): Rational; ; export declare function ratio(numerator: IntegerInput, denominator: IntegerInput): Rational;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "Rational",
      "kind": "class",
      "signature": "export declare class Rational { readonly numerator: bigint; readonly denominator: bigint; private constructor(); /** Normalizes sign and reduces by the GCD. */ static fromParts(numerator: bigint, denominator: bigint): Rational; static from(value: RationalInput): Rational; /** Knuth's addition: reduce through the denominators' GCD instead of the full product. */ plus(other: RationalInput): Rational; minus(other: RationalInput): Rational; /** Cross-cancels before multiplying, so the products never carry common factors. */ times(other: RationalInput): Rational; /** Cross-cancels like `times`, so the result is reduced before its size is checked. */ dividedBy(other: RationalInput): Rational; /** Integer exponent; negative exponents invert. */ pow(exponent: number): Rational; /** The reciprocal: `2/3` → `3/2`. */ inverse(): Rational; abs(): Rational; negated(): Rational; /** * The closest fraction whose denominator is at most `maxDenominator` * (continued-fraction search, like Python's `limit_denominator`): * `ratio('3.14159').approximate(1000)` → `355/113`. */ approximate(maxDenominator: IntegerInput): Rational; compareTo(other: RationalInput): -1 | 0 | 1; eq(other: RationalInput): boolean; lt(other: RationalInput): boolean; lte(other: RationalInput): boolean; gt(other: RationalInput): boolean; gte(other: RationalInput): boolean; isZero(): boolean; isPositive(): boolean; isNegative(): boolean; isInteger(): boolean; sign(): -1 | 0 | 1; /** Exact when the fraction terminates; otherwise needs `{ scale, rounding }` or it throws. */ toDecimal(options?: ScaleOptions): Decimal; /** `7/2` → `{ whole: 3n, fraction: 1/2 }`; `-7/2` → `{ whole: -3n, fraction: -1/2 }`. */ toMixed(): MixedNumber; /** * The nearest double, ties to even, by rounding in binary (never through a * decimal string, which could round twice). Throws on overflow, or when a * non-zero value would underflow to zero. */ toNumber(): number; /** Requires an integral value. */ toBigInt(): bigint; /** `'1/3'`, `'-7/2'`, or just `'4'` for integers. */ toString(): string; toJSON(): string; /** Throws. A `Rational` never silently becomes a float. */ valueOf(): never; [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string; readonly [Symbol.toStringTag] = \"Rational\"; }",
      "jsdocSummary": "An exact fraction of two bigints, always reduced, denominator always positive, zero always `0/1`. Where `Decimal` must throw (`1 ÷ 3`), a `Rational` just keeps going."
    },
    {
      "subpath": ".",
      "name": "RationalInput",
      "kind": "type",
      "signature": "export type RationalInput = Rational | DecimalInput;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "RealFunction",
      "kind": "type",
      "signature": "export type RealFunction = (x: number) => number;",
      "jsdocSummary": "A real function of one real variable, evaluated on float64."
    },
    {
      "subpath": ".",
      "name": "regularizedBeta",
      "kind": "function",
      "signature": "export declare function regularizedBeta(x: number, a: number, b: number): number;",
      "jsdocSummary": "Regularized incomplete beta I_x(a, b) for x in [0, 1] and a, b > 0."
    },
    {
      "subpath": ".",
      "name": "regularizedGammaP",
      "kind": "function",
      "signature": "export declare function regularizedGammaP(a: number, x: number): number;",
      "jsdocSummary": "Regularized lower incomplete gamma P(a, x) = γ(a, x) / Γ(a), for a > 0 and x ≥ 0."
    },
    {
      "subpath": ".",
      "name": "regularPolygon",
      "kind": "function",
      "signature": "export declare function regularPolygon(polygon: { readonly sides: number; readonly sideLength: number; }, options?: AngleOptions): RegularPolygon;",
      "jsdocSummary": "A regular polygon with `sides` (an integer ≥ 3) sides of length `sideLength`."
    },
    {
      "subpath": ".",
      "name": "RegularPolygon",
      "kind": "type",
      "signature": "export type RegularPolygon = { readonly perimeter: number; readonly area: number; /** Distance from the centre to the middle of a side (inradius). */ readonly apothem: number; /** Distance from the centre to a vertex. */ readonly circumradius: number; readonly interiorAngle: number; /** Equal to the central angle: one turn divided by the side count. */ readonly exteriorAngle: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "remap",
      "kind": "function",
      "signature": "export declare function remap(x: number, inStart: number, inEnd: number, outStart: number, outEnd: number): number;",
      "jsdocSummary": "Maps `x` from one range onto another: `remap(5, 0, 10, 0, 100)` → `50`."
    },
    {
      "subpath": ".",
      "name": "ResourceLimitError",
      "kind": "class",
      "signature": "export declare class ResourceLimitError extends MathError { readonly code: \"ARKI_MATH_E007\"; readonly remediation = \"Reduce the number of digits or the size of the exponent.\"; }",
      "jsdocSummary": "An input or result exceeds the documented digit limits."
    },
    {
      "subpath": ".",
      "name": "RootConvergenceError",
      "kind": "class",
      "signature": "export declare class RootConvergenceError extends ConvergenceError { /** The last iterate and its error estimate (`Infinity` when there is none). */ readonly best: RootResult; constructor(message: string, best: RootResult); }",
      "jsdocSummary": "A root-finding method stopped before its tolerance; `best` is where it stopped."
    },
    {
      "subpath": ".",
      "name": "RootOptions",
      "kind": "type",
      "signature": "export type RootOptions = { /** Absolute part of the stopping tolerance (default `2e-12`). */ readonly absoluteTolerance?: number; /** Relative part of the stopping tolerance, times `|root|` (default `4 · Number.EPSILON`). */ readonly relativeTolerance?: number; /** Most steps before `RootConvergenceError` (default 200). */ readonly maxIterations?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "RootResult",
      "kind": "type",
      "signature": "export type RootResult = { readonly root: number; /** Bracket width for `findRoot`/`bisect` (a bound); last step length for unbracketed `newton` (an estimate). */ readonly errorEstimate: number; readonly iterations: number; /** Calls of `f` (plus `df` for Newton), including the bracket ends. */ readonly evaluations: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "round",
      "kind": "function",
      "signature": "export declare function round(x: number, places?: number, mode?: RoundingMode): number;",
      "jsdocSummary": "Rounds the number you typed, not its binary approximation: `round(1.005, 2)` is `1.01` (plain `Math.round(1.005 * 100) / 100` gives `1`). Negative `places` round to tens, hundreds, ..."
    },
    {
      "subpath": ".",
      "name": "ROUNDING_MODES",
      "kind": "variable",
      "signature": "export declare const ROUNDING_MODES: readonly ['up', 'down', 'ceiling', 'floor', 'halfUp', 'halfDown', 'halfEven', 'unnecessary'];",
      "jsdocSummary": "One rounding vocabulary for the whole package. The names follow Java's `RoundingMode` and brick/math, which most developers already know."
    },
    {
      "subpath": ".",
      "name": "RoundingMode",
      "kind": "type",
      "signature": "export type RoundingMode = (typeof ROUNDING_MODES)[number];",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "RoundingNecessaryError",
      "kind": "class",
      "signature": "export declare class RoundingNecessaryError extends MathError { readonly code: \"ARKI_MATH_E004\"; readonly remediation = \"Pass a scale and a rounding mode so the result can be rounded.\"; }",
      "jsdocSummary": "The exact result cannot be represented without rounding and no rounding mode was given."
    },
    {
      "subpath": ".",
      "name": "roundTo",
      "kind": "function",
      "signature": "export declare function roundTo(x: number, step: number, mode?: RoundingMode): number;",
      "jsdocSummary": "Rounds to the nearest multiple of `step`, measured from zero: `roundTo(127.3, 5)` → `125`."
    },
    {
      "subpath": ".",
      "name": "roundToSignificant",
      "kind": "function",
      "signature": "export declare function roundToSignificant(x: number, digits: number, mode?: RoundingMode): number;",
      "jsdocSummary": "Rounds to `digits` significant figures, on the number you typed: `roundToSignificant(123_456, 2)` is `120000`, `roundToSignificant(0.012_345, 3)` is `0.0123`. A number with fewer digits is returned as is (nothing is padded). Works for every finite double, from subnormals to `6.02214076e23` and beyond: the digits are those of the number's shortest decimal text, `String(x)`. Throws `NumericRangeError` only when rounding up past the largest double (`roundToSignificant(1.7976931348623157e308, 1)` would be `2e308`)."
    },
    {
      "subpath": ".",
      "name": "RUNTIME_LOCALE",
      "kind": "variable",
      "signature": "export declare const RUNTIME_LOCALE = \"default\";",
      "jsdocSummary": "Pass as `locale` to use the runtime's default locale instead of `'en-US'`. It is a word, not `undefined`, so a missing locale can never switch it on by accident."
    },
    {
      "subpath": ".",
      "name": "sample",
      "kind": "variable",
      "signature": "export declare const sample: Random['sample'];",
      "jsdocSummary": "`count` distinct elements in random order, from the default generator."
    },
    {
      "subpath": ".",
      "name": "sampleSize",
      "kind": "function",
      "signature": "export declare function sampleSize(input: MeanSampleSizeInput | ProportionSampleSizeInput): number;",
      "jsdocSummary": "Smallest sample size, rounded up, that keeps the margin of error at or below `marginOfError` with the given `level` (default 0.95), using the normal critical value `z`. For a mean pass `stddev`: `n = (z * stddev / E)^2`. For a proportion pass `proportion` (default 0.5, the worst case): `n = z^2 * p * (1 - p) / E^2`."
    },
    {
      "subpath": ".",
      "name": "SampleSummary",
      "kind": "type",
      "signature": "export type SampleSummary = { n: number; stddev: number; variance?: never; } | { n: number; variance: number; stddev?: never; };",
      "jsdocSummary": "A group known only by its size and SAMPLE spread (ddof 1): `{ n, stddev }` or `{ n, variance }`. Accepted by `pooledVariance` and `pooledStddev`."
    },
    {
      "subpath": ".",
      "name": "ScaleOptions",
      "kind": "type",
      "signature": "export type ScaleOptions = { /** Number of fraction digits in the result. */ scale: number; /** How to drop digits that do not fit. Defaults to `'unnecessary'`, which throws instead. */ rounding?: RoundingMode; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "shuffle",
      "kind": "variable",
      "signature": "export declare const shuffle: Random['shuffle'];",
      "jsdocSummary": "A shuffled copy of the input, from the default generator."
    },
    {
      "subpath": ".",
      "name": "signedPolygonArea",
      "kind": "function",
      "signature": "export declare function signedPolygonArea(vertices: Iterable<Point2>): number;",
      "jsdocSummary": "Signed area of a simple polygon by the shoelace formula: positive when the vertices run counterclockwise (with y pointing up), negative when clockwise. Do not repeat the first vertex at the end (it is harmless if you do). For a self-intersecting polygon the result is the net of its oppositely wound parts."
    },
    {
      "subpath": ".",
      "name": "significantDigits",
      "kind": "function",
      "signature": "export declare function significantDigits(value: string | Decimal): number;",
      "jsdocSummary": "Counts the significant figures in a written number by the textbook rules: leading zeros never count, zeros between digits always count, and trailing zeros count only when there is a decimal point. `'1200'` → 2, `'1200.'` → 4, `'0.00120'` → 3, `'1.20e3'` → 3. The exponent is ignored. Zero counts its written zeros after the point (`'0'` → 1, `'0.00'` → 2). Pass the text (or a `Decimal`, whose scale is its written precision): a JS number cannot tell `1.20` from `1.2`. Anything else throws `NumberFormatError`."
    },
    {
      "subpath": ".",
      "name": "simpleInterest",
      "kind": "function",
      "signature": "export declare function simpleInterest(principal: DecimalInput, rate: DecimalInput, periods: DecimalInput): Decimal;",
      "jsdocSummary": "`principal × rate × periods`, exact. `periods` may be fractional (pass it as a string or Decimal)."
    },
    {
      "subpath": ".",
      "name": "SingularMatrixError",
      "kind": "class",
      "signature": "export declare class SingularMatrixError extends MathError { readonly code: \"ARKI_MATH_E009\"; readonly remediation = \"Check that the matrix has full rank, or use a least-squares method.\"; }",
      "jsdocSummary": "A matrix is singular to working precision, so it has no inverse and `A·x = b` has no unique solution."
    },
    {
      "subpath": ".",
      "name": "SlantSolid",
      "kind": "type",
      "signature": "export type SlantSolid = LateralSolid & { readonly slantHeight: number; };",
      "jsdocSummary": "A cone, pyramid or frustum: `slantHeight` runs along the side from base edge to apex (or top edge)."
    },
    {
      "subpath": ".",
      "name": "Solid",
      "kind": "type",
      "signature": "export type Solid = { readonly volume: number; /** Total surface area, bases included. */ readonly surfaceArea: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "SolidAngleUnit",
      "kind": "type",
      "signature": "export type SolidAngleUnit = 'sr' | 'deg2';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "solveTriangle",
      "kind": "function",
      "signature": "export declare function solveTriangle(parts: TriangleParts, options?: TriangleOptions): Triangle;",
      "jsdocSummary": "The one triangle that fits the given parts. Throws `InvalidArgumentError` when the parts describe no triangle, or when they are an ambiguous SSA case that fits two (use `solveTriangles` for that)."
    },
    {
      "subpath": ".",
      "name": "solveTriangles",
      "kind": "function",
      "signature": "export declare function solveTriangles(parts: TriangleParts, options?: TriangleOptions): readonly Triangle[];",
      "jsdocSummary": "Every triangle that fits the given parts (exactly three, at least one a side). SSS, SAS, ASA and AAS give one triangle; SSA gives 0, 1 or 2, the acute solution first. Parts that describe no triangle (triangle inequality broken, angles summing to a half turn or more, SSA side too short) give `[]`. Malformed input (wrong part count, non-positive or non-finite values, an angle of a half turn or more, no side at all) throws `InvalidArgumentError`."
    },
    {
      "subpath": ".",
      "name": "SpeedUnit",
      "kind": "type",
      "signature": "export type SpeedUnit = 'm/s' | 'km/h' | 'mph' | 'kn' | 'ft/s';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "spellNumber",
      "kind": "function",
      "signature": "export declare function spellNumber(value: DecimalInput, options?: SpellOptions): string;",
      "jsdocSummary": "`spellNumber(102)` → `'one hundred two'`; `spellNumber('3.14')` → `'three point one four'`; `spellNumber(-5)` → `'minus five'`. Fractions are read digit by digit, as people do. Numbers are read through `decimal()`, so `0.1` is \"zero point one\", never its binary expansion."
    },
    {
      "subpath": ".",
      "name": "SpellOptions",
      "kind": "type",
      "signature": "export type SpellOptions = { locale?: NumberWordsLocale; gender?: Gender; /** * Numbers are spelled when `after < |value| ≤ until`; the rest come back as * formatted digits that keep the exact value (every fraction digit is kept). * `until` is the inclusive upper bound of the spelled range. */ until?: number; /** The exclusive lower bound of the spelled range (see `until`). */ after?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "spellOrdinal",
      "kind": "function",
      "signature": "export declare function spellOrdinal(value: DecimalInput, options?: OrdinalOptions): string;",
      "jsdocSummary": "`spellOrdinal(21)` → `'twenty-first'`. Positive integers only."
    },
    {
      "subpath": ".",
      "name": "sphere",
      "kind": "function",
      "signature": "export declare function sphere(radius: number): Solid;",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "splitUnits",
      "kind": "function",
      "signature": "export declare function splitUnits(value: RationalInput, from: Unit, units: readonly Unit[], options?: SplitUnitsOptions): UnitPart[];",
      "jsdocSummary": "Splits a value into whole parts of larger units plus a remainder, for display like \"5 ft 7 in\", \"1 h 30 min\" or \"3 lb 4 oz\". `units` go largest first and share one category: `splitUnits(67, 'in', ['ft', 'in'])` is `[{ unit: 'ft', value: 5 }, { unit: 'in', value: 7 }]`."
    },
    {
      "subpath": ".",
      "name": "SplitUnitsOptions",
      "kind": "type",
      "signature": "export type SplitUnitsOptions = { /** * Fraction digits kept on the last part. Leave it out to keep the exact remainder * (as a double). The value is rounded once, in the last unit, before it is split, * so a rounded-up remainder carries into the larger parts: 5 ft 11.6 in at * `scale: 0` is 6 ft 0 in, never 5 ft 12 in. */ scale?: number; /** How to round to `scale`. Defaults to `'halfUp'`. Ignored without `scale`. */ rounding?: RoundingMode; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "sqrt",
      "kind": "function",
      "signature": "export declare function sqrt(value: DecimalInput, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Square root. Without options the result must be exact or it throws `RoundingNecessaryError`: `sqrt(16)` → `4`, `sqrt('2.25')` → `1.5`, `sqrt(2)` throws. The exact result of a value with scale s has scale s/2, after padding an odd s with one zero: `sqrt('1.00')` → `1.0`, `sqrt('0.0001')` → `0.01`, `sqrt('0.4')` (= √0.40) throws."
    },
    {
      "subpath": ".",
      "name": "squarePyramid",
      "kind": "function",
      "signature": "export declare function squarePyramid(dimensions: { readonly baseSide: number; readonly height: number; }): SlantSolid;",
      "jsdocSummary": "A right pyramid on a square base; `slantHeight` is the height of each triangular face."
    },
    {
      "subpath": ".",
      "name": "standardError",
      "kind": "function",
      "signature": "export declare function standardError(values: Iterable<number> | { stddev: number; n: number; }, options?: VarianceOptions): number;",
      "jsdocSummary": "Standard error of the mean, `stddev / sqrt(n)`. Pass the data (its `stddev` uses `ddof`, sample by default) or a known `{ stddev, n }`. Throws `EmptyDataError` when the data has too few values."
    },
    {
      "subpath": ".",
      "name": "standardNormal",
      "kind": "variable",
      "signature": "export declare const standardNormal: ContinuousDistribution;",
      "jsdocSummary": "The standard normal, N(0, 1), shared so callers do not rebuild it on every call."
    },
    {
      "subpath": ".",
      "name": "stddev",
      "kind": "function",
      "signature": "export declare function stddev(values: Iterable<number>, options?: VarianceOptions): number; ; export declare function stddev(values: Iterable<Decimal>, options: VarianceOptions & ScaleOptions): Decimal;",
      "jsdocSummary": "Square root of `variance`, with the same `ddof` convention (sample by default). Square root of the exact variance, correctly rounded at the requested scale (default rounding `'halfEven'`). A square root rarely terminates, so `{ scale }` is required. The variance is kept as an exact fraction and the root is rounded once, so tiny variances and near-ties round correctly."
    },
    {
      "subpath": ".",
      "name": "studentT",
      "kind": "function",
      "signature": "export declare function studentT(df: number): ContinuousDistribution;",
      "jsdocSummary": "Student's t distribution with `df > 0` degrees of freedom."
    },
    {
      "subpath": ".",
      "name": "sum",
      "kind": "function",
      "signature": "export declare function sum(values: Iterable<number>): number;",
      "jsdocSummary": "Total of the values using Neumaier compensated summation. An empty input gives `0`. Numbers only: for an exact total of `Decimal` values use `Decimal.sum`, which returns a `Decimal` zero for an empty input."
    },
    {
      "subpath": ".",
      "name": "TemperatureUnit",
      "kind": "type",
      "signature": "export type TemperatureUnit = 'C' | 'F' | 'K';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "thousandsGroups",
      "kind": "function",
      "signature": "export declare function thousandsGroups(n: bigint): number[];",
      "jsdocSummary": "Splits a non-negative integer into base-1000 groups, most significant first: `1234567n` → `[1, 234, 567]`. The building block every locale uses."
    },
    {
      "subpath": ".",
      "name": "TimeUnit",
      "kind": "type",
      "signature": "export type TimeUnit = 'ms' | 's' | 'min' | 'h' | 'd' | 'wk' | 'month' | 'year';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "toBase",
      "kind": "function",
      "signature": "export declare function toBase(value: number | bigint, base: number): string;",
      "jsdocSummary": "Writes an integer in `base` 2 to 36 with lowercase digits: `toBase(255, 16)` is `'ff'`, `toBase(-10, 2)` is `'-1010'`. A `number` must be a safe integer; a `bigint` is exact at any size. No prefix (`0x`) is added."
    },
    {
      "subpath": ".",
      "name": "TorqueUnit",
      "kind": "type",
      "signature": "export type TorqueUnit = 'N*m' | 'lbf*ft' | 'kgf*m';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "torus",
      "kind": "function",
      "signature": "export declare function torus(dimensions: { readonly majorRadius: number; readonly minorRadius: number; }): Solid;",
      "jsdocSummary": "A ring torus: `majorRadius` from the centre to the tube's centre, `minorRadius` of the tube. Requires `majorRadius ≥ minorRadius`; a spindle torus overlaps itself and these formulas would count the overlap twice."
    },
    {
      "subpath": ".",
      "name": "Triangle",
      "kind": "type",
      "signature": "export type Triangle = { readonly a: number; readonly b: number; readonly c: number; readonly A: number; readonly B: number; readonly C: number; readonly area: number; readonly perimeter: number; readonly sideType: TriangleSideType; readonly angleType: TriangleAngleType; };",
      "jsdocSummary": "A solved triangle. Angles are in the requested `angleUnit`."
    },
    {
      "subpath": ".",
      "name": "TriangleAngleType",
      "kind": "type",
      "signature": "export type TriangleAngleType = 'acute' | 'right' | 'obtuse';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "TriangleOptions",
      "kind": "type",
      "signature": "export type TriangleOptions = AngleOptions & { /** * Relative tolerance (as in `approxEqual`) for classification and for the * SSA case where the given side exactly reaches the base. Default `1e-9`. */ tolerance?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "TriangleParts",
      "kind": "type",
      "signature": "export type TriangleParts = { readonly a?: number; readonly b?: number; readonly c?: number; readonly A?: number; readonly B?: number; readonly C?: number; };",
      "jsdocSummary": "Known parts of a triangle. Side `a` is opposite angle `A`, `b` opposite `B`, `c` opposite `C`. Give exactly three parts, at least one of them a side."
    },
    {
      "subpath": ".",
      "name": "TriangleSideType",
      "kind": "type",
      "signature": "export type TriangleSideType = 'equilateral' | 'isosceles' | 'scalene';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "uniform",
      "kind": "function",
      "signature": "export declare function uniform(min: number, max: number): ContinuousDistribution;",
      "jsdocSummary": "Continuous uniform distribution on `[min, max]`, with `min < max`."
    },
    {
      "subpath": ".",
      "name": "Unit",
      "kind": "type",
      "signature": "export type Unit = LengthUnit | MassUnit | AreaUnit | VolumeUnit | TemperatureUnit | TimeUnit | SpeedUnit | DataUnit | EnergyUnit | PressureUnit | AngleUnit | SolidAngleUnit | PowerUnit | FrequencyUnit | ForceUnit | TorqueUnit | FuelEconomyUnit | DataRateUnit | ElectricCurrentUnit | IlluminanceUnit | RadioactivityUnit | DynamicViscosityUnit | KinematicViscosityUnit;",
      "jsdocSummary": "Every supported unit symbol."
    },
    {
      "subpath": ".",
      "name": "unitCategory",
      "kind": "function",
      "signature": "export declare function unitCategory(unit: Unit): UnitCategory;",
      "jsdocSummary": "The category a unit belongs to."
    },
    {
      "subpath": ".",
      "name": "UnitCategory",
      "kind": "type",
      "signature": "export type UnitCategory = 'length' | 'mass' | 'area' | 'volume' | 'temperature' | 'time' | 'speed' | 'data' | 'energy' | 'pressure' | 'angle' | 'solidAngle' | 'power' | 'frequency' | 'force' | 'torque' | 'fuelEconomy' | 'dataRate' | 'electricCurrent' | 'illuminance' | 'radioactivity' | 'dynamicViscosity' | 'kinematicViscosity';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "UnitPart",
      "kind": "type",
      "signature": "export type UnitPart = { readonly unit: Unit; readonly value: number; };",
      "jsdocSummary": "One part of a composite value, such as the `7 in` of \"5 ft 7 in\"."
    },
    {
      "subpath": ".",
      "name": "unitsOf",
      "kind": "function",
      "signature": "export declare function unitsOf(category: UnitCategory): readonly Unit[];",
      "jsdocSummary": "Every unit symbol in a category, in display order."
    },
    {
      "subpath": ".",
      "name": "UnsupportedFeatureError",
      "kind": "class",
      "signature": "export declare class UnsupportedFeatureError extends MathError { readonly code: \"ARKI_MATH_E008\"; readonly remediation = \"Run on a runtime whose Intl supports the feature, or avoid the locale-dependent option.\"; }",
      "jsdocSummary": "The runtime lacks an `Intl` feature this call depends on."
    },
    {
      "subpath": ".",
      "name": "variance",
      "kind": "function",
      "signature": "export declare function variance(values: Iterable<number>, options?: VarianceOptions): number; ; export declare function variance(values: Iterable<Decimal>, options?: VarianceOptions & Partial<ScaleOptions>): Decimal;",
      "jsdocSummary": "Variance by the corrected two-pass algorithm. Sample (`ddof: 1`, divide by n - 1) by default; `ddof: 0` gives the population variance (divide by n). Throws `EmptyDataError` unless there are more than `ddof` values. Exact variance of `Decimal` values, computed as `(n * sum(x^2) - sum(x)^2) / (n * (n - ddof))` with a single division, so nothing is rounded before the end. Like `Decimal.dividedBy`, it throws `RoundingNecessaryError` when the result does not terminate unless you pass `{ scale, rounding }`."
    },
    {
      "subpath": ".",
      "name": "VarianceOptions",
      "kind": "type",
      "signature": "export type VarianceOptions = { /** Delta degrees of freedom: 1 = sample (default), 0 = population. */ ddof?: 0 | 1; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "VolumeUnit",
      "kind": "type",
      "signature": "export type VolumeUnit = 'ml' | 'cl' | 'l' | 'cm3' | 'm3' | 'in3' | 'ft3' | 'yd3' | 'tsp' | 'tbsp' | 'floz' | 'cup' | 'pt' | 'qt' | 'gal' | 'floz_imp' | 'pt_imp' | 'qt_imp' | 'gal_imp';",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "WordsContext",
      "kind": "type",
      "signature": "export type WordsContext = { /** Grammatical gender of the thing being counted, where the language cares (`una`/`unu`, `première`/`premier`). */ gender: Gender | undefined; };",
      "jsdocSummary": ""
    },
    {
      "subpath": ".",
      "name": "zScore",
      "kind": "function",
      "signature": "export declare function zScore(value: number, mean: number, stddev: number): number;",
      "jsdocSummary": "How many standard deviations `value` lies from `mean`: `(value - mean) / stddev`. Throws `InvalidArgumentError` unless `stddev` is positive."
    },
    {
      "subpath": "./complex",
      "name": "complex",
      "kind": "function",
      "signature": "export declare function complex(re: number, im?: number): Complex; ; export declare function complex(value: Complex | string): Complex;",
      "jsdocSummary": "`complex(3, 4)` is `3 + 4i`; `complex(5)` is real; `complex('3+4i')` parses."
    },
    {
      "subpath": "./complex",
      "name": "Complex",
      "kind": "class",
      "signature": "export declare class Complex { static readonly ZERO: Complex; static readonly ONE: Complex; static readonly I: Complex; readonly re: number; readonly im: number; private constructor(); /** Builds `re + im·i` from finite parts. `-0` becomes `0`. */ static fromParts(re: number, im: number): Complex; /** Converts a number, a `Complex`, or text such as `'3+4i'`, `'-2i'`, `'5'`. */ static from(value: ComplexInput): Complex; /** `r·(cos θ + i·sin θ)`. `r` must be ≥ 0; both must be finite. */ static fromPolar(r: number, theta: number): Complex; plus(other: ComplexInput): Complex; minus(other: ComplexInput): Complex; times(other: ComplexInput): Complex; /** * Robust complex division (Baudin & Smith 2012, \"A Robust Complex Division * in Scilab\"): Smith's algorithm, which avoids overflow in `|divisor|²`, * plus exact power-of-two scaling when a part is near overflow or underflow, * so `(1e308 + 1e308i) / (1e308 + 1e308i)` is `1`. Throws on a zero divisor, * and `NumericRangeError` only when the quotient itself is out of range. */ dividedBy(other: ComplexInput): Complex; /** `1 / z`. Throws `DivisionByZeroError` for zero. */ inverse(): Complex; negated(): Complex; /** `re - im·i`. */ conjugate(): Complex; /** * Modulus `|z|`, via `Math.hypot` so large parts do not overflow. Throws * `NumericRangeError` when `|z|` itself is beyond the float range, which * finite parts allow (up to √2 × `Number.MAX_VALUE`, as for `1e308 + 1e308i`). */ abs(): number; /** Principal argument in `(-π, π]`. The argument of zero is `0`, as in C's `carg`. */ arg(): number; /** `{ r: abs(), theta: arg() }`; throws `NumericRangeError` where `abs` does. */ toPolar(): Polar; /** `e^z`. */ exp(): Complex; /** Principal natural logarithm `ln|z| + i·arg(z)`. Throws `InvalidArgumentError` for zero. */ ln(): Complex; /** Principal logarithm in `base`: `ln(z) / ln(base)`. `base` must not be 0 or 1. */ log(base: ComplexInput): Complex; /** Principal square root: the root with `re > 0`, or `im ≥ 0` when `re` is 0. */ sqrt(): Complex; /** * Principal power `z^w = e^(w·ln z)`. An integer `w` uses repeated * multiplication (exact for small Gaussian integers); a real `w` uses polar * form (`|z|^w` at angle `w·arg z`). `0^w` is `1` for `w = 0` and `0` when * `re(w) > 0`; otherwise it throws `DivisionByZeroError`. */ pow(exponent: ComplexInput): Complex; private integerPower; /** sin(x + iy) = sin x cosh y + i cos x sinh y; overflows (`NumericRangeError`) only when the result does. */ sin(): Complex; /** cos(x + iy) = cos x cosh y − i sin x sinh y. */ cos(): Complex; /** tan z = −i·tanh(iz), by Kahan's cancellation-free formula; never overflows. */ tan(): Complex; /** sinh z = −i·sin(iz) = sinh x cos y + i cosh x sin y. */ sinh(): Complex; /** cosh z = cos(iz) = cosh x cos y + i sinh x sin y. */ cosh(): Complex; /** tanh z by Kahan's formula: (βρs + it) / (1 + βs²) with t = tan y, β = 1 + t², s = sinh x, ρ = √(1 + s²). */ tanh(): Complex; /** * Principal arcsine, real part in [-π/2, π/2]. Cuts: the real axis outside * [-1, 1]; `asin(2)` is `π/2 - 1.3170i`, `asin(-2)` is `-π/2 + 1.3170i`. */ asin(): Complex; /** * Principal arccosine, real part in [0, π]; `acos z = π/2 − asin z`, same * cuts. `acos(2)` is `1.3170i`, `acos(-2)` is `π - 1.3170i`. */ acos(): Complex; /** * Principal arctangent, real part in [-π/2, π/2]; `atan z = −i·atanh(iz)`. * Cuts: the imaginary axis outside [-i, i]; `atan(2i)` is `π/2 + 0.5493i`, * `atan(-2i)` is `-π/2 - 0.5493i`. `atan(±i)` throws `InvalidArgumentError`. */ atan(): Complex; /** * Principal inverse hyperbolic sine, `asinh z = −i·asin(iz)`. Cuts: the * imaginary axis outside [-i, i]; `asinh(2i)` is `1.3170 + π/2·i`. */ asinh(): Complex; /** * Principal inverse hyperbolic cosine, real part ≥ 0 and imaginary part in * [-π, π]. Cut: the real axis left of 1, valued from above: `acosh(0.5)` is * `1.0472i`, `acosh(-2)` is `1.3170 + πi`. */ acosh(): Complex; /** * Principal inverse hyperbolic tangent, imaginary part in [-π/2, π/2]. Cuts: * the real axis outside [-1, 1]; `atanh(2)` is `0.5493 - π/2·i`, * `atanh(-2)` is `-0.5493 + π/2·i`. `atanh(±1)` throws `InvalidArgumentError`. */ atanh(): Complex; /** * All `n` complex `n`-th roots, counter-clockwise from the principal root * (index 0, the one `pow(1/n)` returns). Zero has `n` roots, all zero. */ nthRoots(n: number): Complex[]; isReal(): boolean; isZero(): boolean; /** Exact equality of both parts. */ eq(other: ComplexInput): boolean; /** * `|z - w| ≤ tolerance × max(1, |z|, |w|)`: absolute near zero, relative * for large values, like `approxEqual` for numbers. */ approxEqual(other: ComplexInput, tolerance?: number): boolean; /** `3 + 4i`, `3 - 4i`, `-2i`, `i`, `5` (see the module notes for the grammar). */ toString(): string; toJSON(): string; /** Throws. A `Complex` never silently becomes a float. */ valueOf(): never; [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string; readonly [Symbol.toStringTag] = \"Complex\"; }",
      "jsdocSummary": "A complex number `re + im·i` with finite float parts. Create one with `complex(3, 4)`, `complex('3+4i')` or `Complex.fromPolar(r, theta)`. Equality (`eq`) is exact; use `approxEqual` after float arithmetic."
    },
    {
      "subpath": "./complex",
      "name": "ComplexInput",
      "kind": "type",
      "signature": "export type ComplexInput = Complex | number | string;",
      "jsdocSummary": "Anything `Complex.from` accepts: a `Complex`, a finite number, or text like `'3+4i'`."
    },
    {
      "subpath": "./complex",
      "name": "isComplex",
      "kind": "function",
      "signature": "export declare function isComplex(value: unknown): value is Complex;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./complex",
      "name": "Polar",
      "kind": "type",
      "signature": "export type Polar = { r: number; theta: number; };",
      "jsdocSummary": "Polar form: modulus `r` (≥ 0) and argument `theta` in radians."
    },
    {
      "subpath": "./decimal",
      "name": "decimal",
      "kind": "function",
      "signature": "export declare function decimal(value: DecimalInput): Decimal;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./decimal",
      "name": "Decimal",
      "kind": "class",
      "signature": "export declare class Decimal { readonly coefficient: bigint; readonly scale: number; private constructor(); static from(value: DecimalInput): Decimal; /** Exact sum; accumulates one coefficient instead of allocating a Decimal per element. */ static sum(values: Iterable<DecimalInput>): Decimal; /** Comparator for sorting: `prices.sort(Decimal.compare)`. */ static compare(a: DecimalInput, b: DecimalInput): -1 | 0 | 1; static max(first: DecimalInput, ...rest: DecimalInput[]): Decimal; static min(first: DecimalInput, ...rest: DecimalInput[]): Decimal; plus(other: DecimalInput): Decimal; minus(other: DecimalInput): Decimal; times(other: DecimalInput): Decimal; /** * Exact when the result terminates (`1 ÷ 8 = 0.125`). When it does not * (`1 ÷ 3`), throws `RoundingNecessaryError` unless you say how to round: * `dividedBy(3, { scale: 4, rounding: 'halfEven' })`. */ dividedBy(other: DecimalInput, options?: ScaleOptions): Decimal; /** Remainder with the sign of the dividend, like JavaScript's `%`. */ mod(other: DecimalInput): Decimal; /** Integer exponent. Negative exponents must terminate (`2^-2 = 0.25`) or they throw. */ pow(exponent: number): Decimal; abs(): Decimal; negated(): Decimal; /** * Changes the number of fraction digits. Adding digits is always exact; * dropping non-zero digits needs a rounding mode or it throws. */ toScale(scale: number, rounding?: RoundingMode): Decimal; /** `toScale` with the display-friendly default: half-up. `round(2)` on `1.005` gives `1.01`. */ round(places?: number, rounding?: RoundingMode): Decimal; /** * Rounds to `digits` significant figures: `decimal('123456').roundToSignificant(2)` → `120000`, * `decimal('0.012345').roundToSignificant(3)` → `0.0123`. Fewer digits than that are left as is. Default half-up. */ roundToSignificant(digits: number, rounding?: RoundingMode): Decimal; /** Rounds to the nearest multiple of `step`: `decimal('1.23').roundTo('0.05')` → `1.25`. Default half-up. */ roundTo(step: DecimalInput, rounding?: RoundingMode): Decimal; /** Drops trailing zeros: `1.500` → `1.5`, `2.00` → `2`. */ trim(): Decimal; compareTo(other: DecimalInput): -1 | 0 | 1; eq(other: DecimalInput): boolean; lt(other: DecimalInput): boolean; lte(other: DecimalInput): boolean; gt(other: DecimalInput): boolean; gte(other: DecimalInput): boolean; isZero(): boolean; isPositive(): boolean; isNegative(): boolean; isInteger(): boolean; sign(): -1 | 0 | 1; /** Plain notation, never exponent form: `'0.000001'`, `'-12.30'`. */ toString(): string; /** Like `Number.prototype.toFixed`, but on the exact value and with a chosen rounding mode. */ toFixed(places: number, rounding?: RoundingMode): string; /** The nearest double. Throws if that would overflow or collapse a non-zero value to zero. */ toNumber(): number; /** Requires an integral value; round first if needed. */ toBigInt(): bigint; toRational(): Rational; toJSON(): string; /** Throws. A `Decimal` never silently becomes a float. */ valueOf(): never; [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string; readonly [Symbol.toStringTag] = \"Decimal\"; }",
      "jsdocSummary": "An exact finite decimal: `coefficient × 10^-scale`. The scale is retained, so `'1.10'` stays `1.10` and `'1.10' × 3` is `3.30` — what a person expects from money and measurements. Equality is numeric: `decimal('1.0').eq('1.00')` is `true`."
    },
    {
      "subpath": "./decimal",
      "name": "DecimalInput",
      "kind": "type",
      "signature": "export type DecimalInput = Decimal | string | number | bigint;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./decimal",
      "name": "isDecimal",
      "kind": "function",
      "signature": "export declare function isDecimal(value: unknown): value is Decimal;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./decimal",
      "name": "RoundingMode",
      "kind": "type",
      "signature": "export type RoundingMode = (typeof ROUNDING_MODES)[number];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./decimal",
      "name": "ScaleOptions",
      "kind": "type",
      "signature": "export type ScaleOptions = { /** Number of fraction digits in the result. */ scale: number; /** How to drop digits that do not fit. Defaults to `'unnecessary'`, which throws instead. */ rounding?: RoundingMode; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./decimal-math",
      "name": "cbrt",
      "kind": "function",
      "signature": "export declare function cbrt(value: DecimalInput, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Cube root; negative input gives a negative root. Same exact-or-throw rule as `sqrt` (scale s padded up to a multiple of 3, then divided by 3): `cbrt('-27')` → `-3`, `cbrt(2, { scale: 5 })` → `1.25992`."
    },
    {
      "subpath": "./decimal-math",
      "name": "E",
      "kind": "function",
      "signature": "export declare function E(scale: number): Decimal;",
      "jsdocSummary": "e to `scale` fraction digits, rounded half-even. Σ 1/k!, cached per precision."
    },
    {
      "subpath": "./decimal-math",
      "name": "exp",
      "kind": "function",
      "signature": "export declare function exp(value: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "e^x, correctly rounded to `scale` fraction digits. `exp(0)` is exactly 1; every other result is irrational, so `rounding: 'unnecessary'` throws. Results with more than 10 000 digits (`scale` + integer digits; about x > 23 000 at small scales) throw `ResourceLimitError`. Very negative x rounds to zero (or one unit for `'up'`/`'ceiling'`)."
    },
    {
      "subpath": "./decimal-math",
      "name": "ln",
      "kind": "function",
      "signature": "export declare function ln(value: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Natural logarithm, correctly rounded to `scale` fraction digits. `ln(1)` is exactly 0; values ≤ 0 throw `InvalidArgumentError`. `ln 2` and `ln 10` are computed once per precision and reused."
    },
    {
      "subpath": "./decimal-math",
      "name": "log",
      "kind": "function",
      "signature": "export declare function log(value: DecimalInput, base: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Logarithm of `value` in `base` (> 0, ≠ 1), correctly rounded to `scale` fraction digits. Exact results are detected — `log(8, 2)` → `3`, `log(8, 4)` → `1.5` — so `rounding: 'unnecessary'` accepts them."
    },
    {
      "subpath": "./decimal-math",
      "name": "log10",
      "kind": "function",
      "signature": "export declare function log10(value: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Base-10 logarithm, correctly rounded: `log10(1000, { scale: 5 })` → `3.00000`."
    },
    {
      "subpath": "./decimal-math",
      "name": "log2",
      "kind": "function",
      "signature": "export declare function log2(value: DecimalInput, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Base-2 logarithm, correctly rounded: `log2(1024, { scale: 5 })` → `10.00000`."
    },
    {
      "subpath": "./decimal-math",
      "name": "nthRoot",
      "kind": "function",
      "signature": "export declare function nthRoot(value: DecimalInput, n: number, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "The n-th root for a positive safe integer `n`. Same exact-or-throw rule as `sqrt` (scale padded up to a multiple of n, then divided by n): `nthRoot('1024', 10)` → `2`. Even roots of negative values throw `InvalidArgumentError`; odd roots keep the sign. Intermediates are capped at 200 000 digits (`ResourceLimitError`), which bounds `n × scale`."
    },
    {
      "subpath": "./decimal-math",
      "name": "PI",
      "kind": "function",
      "signature": "export declare function PI(scale: number): Decimal;",
      "jsdocSummary": "π to `scale` fraction digits, rounded half-even. Machin's formula, cached per precision."
    },
    {
      "subpath": "./decimal-math",
      "name": "pow",
      "kind": "function",
      "signature": "export declare function pow(base: DecimalInput, exponent: DecimalInput, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "`base` raised to `exponent`."
    },
    {
      "subpath": "./decimal-math",
      "name": "sqrt",
      "kind": "function",
      "signature": "export declare function sqrt(value: DecimalInput, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Square root. Without options the result must be exact or it throws `RoundingNecessaryError`: `sqrt(16)` → `4`, `sqrt('2.25')` → `1.5`, `sqrt(2)` throws. The exact result of a value with scale s has scale s/2, after padding an odd s with one zero: `sqrt('1.00')` → `1.0`, `sqrt('0.0001')` → `0.01`, `sqrt('0.4')` (= √0.40) throws."
    },
    {
      "subpath": "./differentiate",
      "name": "derivative",
      "kind": "function",
      "signature": "export declare function derivative(f: RealFunction, x: number, options?: ExtrapolationOptions): ExtrapolationResult;",
      "jsdocSummary": "The derivative `f'(x)`, by Ridders' extrapolation of central differences."
    },
    {
      "subpath": "./differentiate",
      "name": "ExtrapolationConvergenceError",
      "kind": "class",
      "signature": "export declare class ExtrapolationConvergenceError extends ConvergenceError { /** The best value, its error estimate and the evaluations spent. */ readonly best: ExtrapolationResult; constructor(message: string, best: ExtrapolationResult); }",
      "jsdocSummary": "`derivative` or `limit` missed its tolerance; `best` is the best estimate it reached."
    },
    {
      "subpath": "./differentiate",
      "name": "ExtrapolationOptions",
      "kind": "type",
      "signature": "export type ExtrapolationOptions = { /** First (largest) sample step (default `max(0.1, 0.001 · |x|)`). */ readonly step?: number; /** Absolute tolerance on the error estimate (default `1e-10`). */ readonly absoluteTolerance?: number; /** Relative tolerance, times `|value|` (default `1e-8`). */ readonly relativeTolerance?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./differentiate",
      "name": "ExtrapolationResult",
      "kind": "type",
      "signature": "export type ExtrapolationResult = { readonly value: number; /** Estimated absolute error of `value`, from the agreement of the extrapolation tableau. */ readonly errorEstimate: number; /** Calls of `f`. */ readonly evaluations: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./differentiate",
      "name": "limit",
      "kind": "function",
      "signature": "export declare function limit(f: RealFunction, x0: number, options?: LimitOptions): ExtrapolationResult;",
      "jsdocSummary": "`lim f(x)` as `x → x0`, by Richardson extrapolation of `f(x0 ± h)`. A numerical estimate, not a proof that the limit exists."
    },
    {
      "subpath": "./differentiate",
      "name": "LimitOptions",
      "kind": "type",
      "signature": "export type LimitOptions = ExtrapolationOptions & { /** Approach `x0` from below, above, or both (default). */ readonly side?: LimitSide; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./differentiate",
      "name": "LimitSide",
      "kind": "type",
      "signature": "export type LimitSide = 'left' | 'right' | 'both';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./differentiate",
      "name": "RealFunction",
      "kind": "type",
      "signature": "export type RealFunction = (x: number) => number;",
      "jsdocSummary": "A real function of one real variable, evaluated on float64."
    },
    {
      "subpath": "./distributions",
      "name": "beta",
      "kind": "function",
      "signature": "export declare function beta(a: number, b: number): number;",
      "jsdocSummary": "The beta function B(a, b) = Γ(a)Γ(b) / Γ(a + b), for `a, b > 0`. Underflows to `0` for very large arguments."
    },
    {
      "subpath": "./distributions",
      "name": "betaLn",
      "kind": "function",
      "signature": "export declare function betaLn(a: number, b: number): number;",
      "jsdocSummary": "ln B(a, b) = ln Γ(a) + ln Γ(b) − ln Γ(a + b), for `a, b > 0`."
    },
    {
      "subpath": "./distributions",
      "name": "binomial",
      "kind": "function",
      "signature": "export declare function binomial(n: number, p: number): DiscreteDistribution;",
      "jsdocSummary": "Binomial distribution: `n` trials (non-negative safe integer), success probability `p` in [0, 1]."
    },
    {
      "subpath": "./distributions",
      "name": "chiSquare",
      "kind": "function",
      "signature": "export declare function chiSquare(df: number): ContinuousDistribution;",
      "jsdocSummary": "Chi-square distribution with `df > 0` degrees of freedom."
    },
    {
      "subpath": "./distributions",
      "name": "ContinuousDistribution",
      "kind": "type",
      "signature": "export type ContinuousDistribution = { /** Probability density at x. */ pdf(x: number): number; /** P(X ≤ x). */ cdf(x: number): number; /** Survival function P(X > x) = 1 − cdf(x), computed on the accurate side where the distribution allows. */ sf(x: number): number; /** * Quantile: the x with cdf(x) = p, p in (0, 1), solved on the accurate side to 1e-12 of the * smaller tail (|cdf(x) − p| ≤ 1e-12·p for p ≤ ½, |sf(x) − (1 − p)| ≤ 1e-12·(1 − p) above), so * far-tail quantiles keep their relative accuracy; p = 0 / 1 return the support bounds * (±Infinity where unbounded). */ quantile(p: number): number; /** Expected value, or `undefined` when the distribution has none. */ readonly mean: number | undefined; /** Variance: `Infinity` when it diverges, `undefined` when the distribution has none. */ readonly variance: number | undefined; };",
      "jsdocSummary": "A continuous probability distribution."
    },
    {
      "subpath": "./distributions",
      "name": "DiscreteDistribution",
      "kind": "type",
      "signature": "export type DiscreteDistribution = { /** P(X = k) for integer k (0 for any other k). */ pmf(k: number): number; /** P(X ≤ k). */ cdf(k: number): number; /** Survival function P(X > k) = 1 − cdf(k), computed on the accurate side. */ sf(k: number): number; /** * Quantile: exactly the smallest integer k with `cdf(k) >= p`, using this object's own `cdf` * (no tolerance), so `quantile(cdf(k)) === k`. p = 0 gives 0; p = 1 gives the support's upper bound. */ quantile(p: number): number; /** Expected value. */ readonly mean: number; /** Variance. */ readonly variance: number; };",
      "jsdocSummary": "A discrete probability distribution over the non-negative integers."
    },
    {
      "subpath": "./distributions",
      "name": "erf",
      "kind": "function",
      "signature": "export declare function erf(x: number): number;",
      "jsdocSummary": "The error function erf(x) = 2/√π ∫₀ˣ e^(−t²) dt (Cody's rational approximations, ~1e-16)."
    },
    {
      "subpath": "./distributions",
      "name": "erfc",
      "kind": "function",
      "signature": "export declare function erfc(x: number): number;",
      "jsdocSummary": "The complementary error function erfc(x) = 1 − erf(x), accurate in the far tail."
    },
    {
      "subpath": "./distributions",
      "name": "erfInv",
      "kind": "function",
      "signature": "export declare function erfInv(p: number): number;",
      "jsdocSummary": "Inverse error function: the x with erf(x) = p, for p in [−1, 1] (±1 give ±Infinity)."
    },
    {
      "subpath": "./distributions",
      "name": "exponential",
      "kind": "function",
      "signature": "export declare function exponential(rate: number): ContinuousDistribution;",
      "jsdocSummary": "Exponential distribution with `rate > 0`."
    },
    {
      "subpath": "./distributions",
      "name": "fisherF",
      "kind": "function",
      "signature": "export declare function fisherF(df1: number, df2: number): ContinuousDistribution;",
      "jsdocSummary": "Fisher's F distribution with `df1, df2 > 0` degrees of freedom."
    },
    {
      "subpath": "./distributions",
      "name": "gamma",
      "kind": "function",
      "signature": "export declare function gamma(x: number): number;",
      "jsdocSummary": "The gamma function Γ(x) for finite `x`. `Γ(n + 1) = n!`, so this is the float factorial for `n > 18`. Positive integers up to 171 are exact products; other values use Lanczos (relative error ~1e-15) with the reflection formula for `x < 0.5`. Poles (`0` and the negative integers) throw `InvalidArgumentError`; a result beyond the double range (`x` above about 171.62, or `x` within ~1e-308 of a pole) throws `NumericRangeError`. Very negative `x` whose true value is below the smallest double returns `0`."
    },
    {
      "subpath": "./distributions",
      "name": "gammaLn",
      "kind": "function",
      "signature": "export declare function gammaLn(x: number): number;",
      "jsdocSummary": "Natural log of the gamma function, ln Γ(x), for x > 0 (Lanczos, g = 7, ~1e-15)."
    },
    {
      "subpath": "./distributions",
      "name": "MAX_NONCENTRALITY",
      "kind": "variable",
      "signature": "export declare const MAX_NONCENTRALITY = 37.62;",
      "jsdocSummary": "Largest |ncp| `noncentralT` accepts: beyond it `exp(−ncp²/2)` underflows in the AS 243 series. Power is already 1 (or 0) to double precision there, so callers can clamp to this value without changing any visible result."
    },
    {
      "subpath": "./distributions",
      "name": "noncentralT",
      "kind": "function",
      "signature": "export declare function noncentralT(df: number, ncp: number): ContinuousDistribution;",
      "jsdocSummary": "Noncentral t distribution with `df > 0` degrees of freedom and noncentrality `ncp` (|ncp| ≤ 37.62). `cdf` is Lenth's (1989) AS 243 series (~1e-14; a normal approximation is used for df > 4e5); it returns the exact limits 1 / 0 once df/x² underflows. `pdf` uses the Johnson–Kotz–Balakrishnan power series on the side of 0 where x and ncp share a sign (all terms positive) and close to 0 on the other side; elsewhere it uses the identity f(x) = df/x · [F(x·√(1+2/df); df+2) − F(x; df)], where the cdf difference no longer cancels (accurate to ~1e-15 absolute, so relative accuracy fades only where the density itself is below ~1e-13). `quantile` is the safeguarded Newton solver. With `ncp = 0` it equals `studentT(df)`."
    },
    {
      "subpath": "./distributions",
      "name": "normal",
      "kind": "function",
      "signature": "export declare function normal(mean?: number, stddev?: number): ContinuousDistribution;",
      "jsdocSummary": "Normal distribution N(mean, stddev²). Defaults to the standard normal."
    },
    {
      "subpath": "./distributions",
      "name": "poisson",
      "kind": "function",
      "signature": "export declare function poisson(lambda: number): DiscreteDistribution;",
      "jsdocSummary": "Poisson distribution with rate `lambda > 0`."
    },
    {
      "subpath": "./distributions",
      "name": "regularizedBeta",
      "kind": "function",
      "signature": "export declare function regularizedBeta(x: number, a: number, b: number): number;",
      "jsdocSummary": "Regularized incomplete beta I_x(a, b) for x in [0, 1] and a, b > 0."
    },
    {
      "subpath": "./distributions",
      "name": "regularizedGammaP",
      "kind": "function",
      "signature": "export declare function regularizedGammaP(a: number, x: number): number;",
      "jsdocSummary": "Regularized lower incomplete gamma P(a, x) = γ(a, x) / Γ(a), for a > 0 and x ≥ 0."
    },
    {
      "subpath": "./distributions",
      "name": "standardNormal",
      "kind": "variable",
      "signature": "export declare const standardNormal: ContinuousDistribution;",
      "jsdocSummary": "The standard normal, N(0, 1), shared so callers do not rebuild it on every call."
    },
    {
      "subpath": "./distributions",
      "name": "studentT",
      "kind": "function",
      "signature": "export declare function studentT(df: number): ContinuousDistribution;",
      "jsdocSummary": "Student's t distribution with `df > 0` degrees of freedom."
    },
    {
      "subpath": "./distributions",
      "name": "uniform",
      "kind": "function",
      "signature": "export declare function uniform(min: number, max: number): ContinuousDistribution;",
      "jsdocSummary": "Continuous uniform distribution on `[min, max]`, with `min < max`."
    },
    {
      "subpath": "./errors",
      "name": "ConvergenceError",
      "kind": "class",
      "signature": "export declare class ConvergenceError extends MathError { readonly code: \"ARKI_MATH_E010\"; readonly remediation = \"Loosen the tolerance, raise the iteration limit, or pass a better starting point.\"; }",
      "jsdocSummary": "An iterative method did not reach its tolerance within its iteration limit."
    },
    {
      "subpath": "./errors",
      "name": "DivisionByZeroError",
      "kind": "class",
      "signature": "export declare class DivisionByZeroError extends MathError { readonly code: \"ARKI_MATH_E003\"; readonly remediation = \"Check the divisor for zero before dividing.\"; }",
      "jsdocSummary": "Division by zero, or zero raised to a negative power."
    },
    {
      "subpath": "./errors",
      "name": "EmptyDataError",
      "kind": "class",
      "signature": "export declare class EmptyDataError extends MathError { readonly code: \"ARKI_MATH_E006\"; readonly remediation = \"Pass at least as many values as the statistic needs.\"; }",
      "jsdocSummary": "A statistic was asked of an empty (or too small) data set."
    },
    {
      "subpath": "./errors",
      "name": "InvalidArgumentError",
      "kind": "class",
      "signature": "export declare class InvalidArgumentError extends MathError { readonly code: \"ARKI_MATH_E002\"; readonly remediation = \"Check the argument against the documented range in the function reference.\"; }",
      "jsdocSummary": "An argument is outside what the function accepts (reversed bounds, negative step, ...)."
    },
    {
      "subpath": "./errors",
      "name": "MATH_ERROR_CODES",
      "kind": "variable",
      "signature": "export declare const MATH_ERROR_CODES: { /** * A string is not a number in the accepted syntax. * * @fix Pass a plain ASCII decimal string such as `'12.5'` or `'1e3'`, or parse locale text with `@arki/math/parse`. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly numberFormat: 'ARKI_MATH_E001'; /** * An argument is outside what the function accepts. * * @fix Read the message for the argument and fix its value: bounds in order, a positive step, a probability from 0 to 1. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly invalidArgument: 'ARKI_MATH_E002'; /** * Division by zero, or zero raised to a negative power. * * @fix Check the divisor before the call, or choose a result for the zero case in your own code. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly divisionByZero: 'ARKI_MATH_E003'; /** * The exact result needs rounding and no rounding mode was given. * * @fix Pass a scale and a rounding mode, for example `{ scale: 4, rounding: 'halfEven' }`. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly roundingNecessary: 'ARKI_MATH_E004'; /** * A value cannot be represented in the target type. * * @fix Use a `bigint` or `Decimal` input, or keep the value inside the safe integer and finite float range. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly numericRange: 'ARKI_MATH_E005'; /** * A statistic was asked of an empty or too small data set. * * @fix Check the data length first. Most statistics need one value; variance and regression need more. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly emptyData: 'ARKI_MATH_E006'; /** * An input or result exceeds the documented digit limits. * * @fix Keep values within 10 000 digits and an exponent of 10 000. These limits guard against hostile input. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly resourceLimit: 'ARKI_MATH_E007'; /** * The runtime lacks an `Intl` feature this call depends on. * * @fix Pass `symbols` to parse without `Intl`, or use a runtime with the feature (Hermes on iOS lacks `formatToParts`). * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly unsupportedFeature: 'ARKI_MATH_E008'; /** * A matrix is singular to working precision. * * @fix Check the matrix with `conditionNumber` or `rank`, or use `leastSquares` or `pseudoInverse`. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly singularMatrix: 'ARKI_MATH_E009'; /** * An iterative method did not reach its tolerance. * * @fix Read `.best` for the best estimate, widen the tolerance or iteration limit, or give a better starting bracket. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly convergence: 'ARKI_MATH_E010'; /** * A matrix that must be symmetric positive definite is not. * * @fix Pass a symmetric positive definite matrix, or use LU or QR decomposition instead of Cholesky. * @verify cd packages/math && bun run vitest run src/errors.test.ts */ readonly notPositiveDefinite: 'ARKI_MATH_E011'; };",
      "jsdocSummary": "Stable error codes of `@arki/math`."
    },
    {
      "subpath": "./errors",
      "name": "MathError",
      "kind": "class",
      "signature": "export declare abstract class MathError extends Error { /** Stable machine-readable code, `ARKI_<PACKAGE>_E<nnn>`. */ abstract readonly code: string; /** What to do about it, in one sentence. */ abstract readonly remediation: string; constructor(message: string, options?: ErrorOptions); }",
      "jsdocSummary": ""
    },
    {
      "subpath": "./errors",
      "name": "MathErrorCode",
      "kind": "type",
      "signature": "export type MathErrorCode = (typeof MATH_ERROR_CODES)[keyof typeof MATH_ERROR_CODES];",
      "jsdocSummary": "The code of a `MathError` raised by `@arki/math` itself."
    },
    {
      "subpath": "./errors",
      "name": "NotPositiveDefiniteError",
      "kind": "class",
      "signature": "export declare class NotPositiveDefiniteError extends MathError { readonly code: \"ARKI_MATH_E011\"; readonly remediation = \"Pass a symmetric positive definite matrix, or use a general factorization such as LU.\"; }",
      "jsdocSummary": "A matrix that must be symmetric positive definite (for a Cholesky factorization) is not."
    },
    {
      "subpath": "./errors",
      "name": "NumberFormatError",
      "kind": "class",
      "signature": "export declare class NumberFormatError extends MathError { readonly code: \"ARKI_MATH_E001\"; readonly remediation = \"Pass a string in the documented number syntax, or validate user input before parsing.\"; }",
      "jsdocSummary": "The input string is not a number in the accepted syntax."
    },
    {
      "subpath": "./errors",
      "name": "NumericRangeError",
      "kind": "class",
      "signature": "export declare class NumericRangeError extends MathError { readonly code: \"ARKI_MATH_E005\"; readonly remediation = \"Use decimal or bigint arithmetic, or keep the value inside the safe range.\"; }",
      "jsdocSummary": "A value cannot be represented in the target type (non-finite, unsafe integer, overflow, underflow)."
    },
    {
      "subpath": "./errors",
      "name": "ResourceLimitError",
      "kind": "class",
      "signature": "export declare class ResourceLimitError extends MathError { readonly code: \"ARKI_MATH_E007\"; readonly remediation = \"Reduce the number of digits or the size of the exponent.\"; }",
      "jsdocSummary": "An input or result exceeds the documented digit limits."
    },
    {
      "subpath": "./errors",
      "name": "RoundingNecessaryError",
      "kind": "class",
      "signature": "export declare class RoundingNecessaryError extends MathError { readonly code: \"ARKI_MATH_E004\"; readonly remediation = \"Pass a scale and a rounding mode so the result can be rounded.\"; }",
      "jsdocSummary": "The exact result cannot be represented without rounding and no rounding mode was given."
    },
    {
      "subpath": "./errors",
      "name": "SingularMatrixError",
      "kind": "class",
      "signature": "export declare class SingularMatrixError extends MathError { readonly code: \"ARKI_MATH_E009\"; readonly remediation = \"Check that the matrix has full rank, or use a least-squares method.\"; }",
      "jsdocSummary": "A matrix is singular to working precision, so it has no inverse and `A·x = b` has no unique solution."
    },
    {
      "subpath": "./errors",
      "name": "UnsupportedFeatureError",
      "kind": "class",
      "signature": "export declare class UnsupportedFeatureError extends MathError { readonly code: \"ARKI_MATH_E008\"; readonly remediation = \"Run on a runtime whose Intl supports the feature, or avoid the locale-dependent option.\"; }",
      "jsdocSummary": "The runtime lacks an `Intl` feature this call depends on."
    },
    {
      "subpath": "./finance",
      "name": "AmortizationRow",
      "kind": "type",
      "signature": "export type AmortizationRow = { /** 1-based period number. */ period: number; /** Total paid this period: `interest + principal`. */ payment: Decimal; /** Interest part of the payment. */ interest: Decimal; /** Part of the payment that reduces the debt. */ principal: Decimal; /** Debt left after this payment. */ balance: Decimal; };",
      "jsdocSummary": "One line of an amortization schedule."
    },
    {
      "subpath": "./finance",
      "name": "amortizationSchedule",
      "kind": "function",
      "signature": "export declare function amortizationSchedule(principal: DecimalInput, rate: DecimalInput, periods: number, options: PaymentOptions): AmortizationRow[];",
      "jsdocSummary": "Full repayment schedule, one row per period."
    },
    {
      "subpath": "./finance",
      "name": "AnnuityOptions",
      "kind": "type",
      "signature": "export type AnnuityOptions = { /** Paid in (positive) or taken out (negative) every period. Defaults to 0. */ payment?: DecimalInput; /** When in the period the payment falls. Defaults to `'end'`. */ timing?: PaymentTiming; };",
      "jsdocSummary": "A level payment made every period, added to the balance (negative to withdraw)."
    },
    {
      "subpath": "./finance",
      "name": "compoundInterest",
      "kind": "function",
      "signature": "export declare function compoundInterest(principal: DecimalInput, rate: DecimalInput, periods: number, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Interest earned only: `futureValue − principal`. Exact; with `{ scale }` it is rounded once. `periods` must be a non-negative safe integer."
    },
    {
      "subpath": "./finance",
      "name": "effectiveRate",
      "kind": "function",
      "signature": "export declare function effectiveRate(nominalRate: DecimalInput, periodsPerYear: number, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Effective annual rate from a nominal rate compounded `periodsPerYear` times: `(1 + nominal ÷ n)^n − 1`. Computed as an exact fraction and rounded once with `{ scale }`. Without options the exact value is returned when it terminates, and `RoundingNecessaryError` is thrown when it does not."
    },
    {
      "subpath": "./finance",
      "name": "futureValue",
      "kind": "function",
      "signature": "export declare function futureValue(principal: DecimalInput, rate: DecimalInput, periods: number, options?: FutureValueOptions): Decimal;",
      "jsdocSummary": "Balance after `periods`: `principal × (1 + rate)^periods`, plus each `payment` grown to the end (Excel `FV`, negated; see the module doc)."
    },
    {
      "subpath": "./finance",
      "name": "FutureValueOptions",
      "kind": "type",
      "signature": "export type FutureValueOptions = AnnuityOptions & (ScaleOptions | { scale?: undefined; rounding?: undefined; });",
      "jsdocSummary": "`futureValue` options: an optional payment, and `{ scale, rounding }` only together."
    },
    {
      "subpath": "./finance",
      "name": "internalRateOfReturn",
      "kind": "function",
      "signature": "export declare function internalRateOfReturn(cashFlows: readonly number[], options?: { guess?: number; tolerance?: number; }): number;",
      "jsdocSummary": "Internal rate of return as a JS number (the rate that makes NPV zero), like Excel `IRR`. Cash flows start at t = 0 and need at least one negative and one positive value."
    },
    {
      "subpath": "./finance",
      "name": "netPresentValue",
      "kind": "function",
      "signature": "export declare function netPresentValue(rate: DecimalInput, cashFlows: readonly DecimalInput[], options: ScaleOptions): Decimal;",
      "jsdocSummary": "Net present value of `cashFlows` at t = 1..n, like Excel `NPV`: the first flow is discounted one full period. Add a t = 0 flow yourself: `initial.plus(netPresentValue(rate, flows, options))`."
    },
    {
      "subpath": "./finance",
      "name": "nominalRate",
      "kind": "function",
      "signature": "export declare function nominalRate(effectiveRate: DecimalInput, periodsPerYear: number, options: ScaleOptions): Decimal;",
      "jsdocSummary": "Nominal annual rate that compounds `periodsPerYear` times to the given effective rate: `n × ((1 + effective)^(1/n) − 1)`."
    },
    {
      "subpath": "./finance",
      "name": "payment",
      "kind": "function",
      "signature": "export declare function payment(principal: DecimalInput, rate: DecimalInput, periods: number, options: PaymentOptions): Decimal;",
      "jsdocSummary": "Excel `PMT`: the level payment that pays off a loan of `principal` over `periods` at `rate` per period."
    },
    {
      "subpath": "./finance",
      "name": "PaymentOptions",
      "kind": "type",
      "signature": "export type PaymentOptions = ScaleOptions & { timing?: PaymentTiming; };",
      "jsdocSummary": "Options for `payment` and `amortizationSchedule`."
    },
    {
      "subpath": "./finance",
      "name": "PaymentTiming",
      "kind": "type",
      "signature": "export type PaymentTiming = 'end' | 'begin';",
      "jsdocSummary": "When in the period payments fall: `'end'` is Excel `type` 0, `'begin'` is `type` 1."
    },
    {
      "subpath": "./finance",
      "name": "periodsToReach",
      "kind": "function",
      "signature": "export declare function periodsToReach(principal: number, target: number, rate: number, options?: AnnuityOptions): number;",
      "jsdocSummary": "Periods until the balance goes from `principal` to `target` at `rate` per period: the `periods` that makes `futureValue(principal, rate, periods, options)` equal `target`. Approximate and possibly fractional; round up yourself for whole months. The result can be passed straight back to `futureValue`."
    },
    {
      "subpath": "./finance",
      "name": "presentValue",
      "kind": "function",
      "signature": "export declare function presentValue(amount: DecimalInput, rate: DecimalInput, periods: number, options: PresentValueOptions): Decimal;",
      "jsdocSummary": "Today's worth of `amount` due after `periods`, plus each `payment` discounted to today (Excel `PV`, negated; see the module doc): `(amount + payment × timing × ((1 + rate)^periods − 1) ÷ rate) ÷ (1 + rate)^periods`."
    },
    {
      "subpath": "./finance",
      "name": "PresentValueOptions",
      "kind": "type",
      "signature": "export type PresentValueOptions = AnnuityOptions & ScaleOptions;",
      "jsdocSummary": "`presentValue` options: an optional payment and the required `{ scale }`."
    },
    {
      "subpath": "./finance",
      "name": "simpleInterest",
      "kind": "function",
      "signature": "export declare function simpleInterest(principal: DecimalInput, rate: DecimalInput, periods: DecimalInput): Decimal;",
      "jsdocSummary": "`principal × rate × periods`, exact. `periods` may be fractional (pass it as a string or Decimal)."
    },
    {
      "subpath": "./finance/float",
      "name": "AmortizationRow",
      "kind": "type",
      "signature": "export type AmortizationRow = { /** 1-based period number. */ period: number; /** Total paid this period: `interest + principal`. */ payment: number; /** Interest part of the payment. */ interest: number; /** Part of the payment that reduces the debt. */ principal: number; /** Debt left after this payment. */ balance: number; };",
      "jsdocSummary": "One line of an amortization schedule."
    },
    {
      "subpath": "./finance/float",
      "name": "amortizationSchedule",
      "kind": "function",
      "signature": "export declare function amortizationSchedule(principal: number, rate: number, periods: number, options?: { timing?: PaymentTiming; }): AmortizationRow[];",
      "jsdocSummary": "Full repayment schedule, one row per period, unrounded (round for display with `round` from `@arki/math/number`)."
    },
    {
      "subpath": "./finance/float",
      "name": "AnnuityOptions",
      "kind": "type",
      "signature": "export type AnnuityOptions = { /** Paid in (positive) or taken out (negative) every period. Defaults to 0. */ payment?: number; /** When in the period the payment falls. Defaults to `'end'`. */ timing?: PaymentTiming; };",
      "jsdocSummary": "A level payment made every period, added to the balance (negative to withdraw)."
    },
    {
      "subpath": "./finance/float",
      "name": "compoundInterest",
      "kind": "function",
      "signature": "export declare function compoundInterest(principal: number, rate: number, periods: number): number;",
      "jsdocSummary": "Interest earned only: `principal × ((1 + rate)^periods − 1)`, via `expm1` so tiny rates do not cancel to 0. `periods` may be fractional or negative."
    },
    {
      "subpath": "./finance/float",
      "name": "effectiveRate",
      "kind": "function",
      "signature": "export declare function effectiveRate(nominalRate: number, periodsPerYear: number): number;",
      "jsdocSummary": "Effective annual rate (Excel `EFFECT`) from a nominal rate compounded `periodsPerYear` times: `(1 + nominal ÷ n)^n − 1`. `periodsPerYear` must be positive and may be fractional (0.5 compounds every two years)."
    },
    {
      "subpath": "./finance/float",
      "name": "futureValue",
      "kind": "function",
      "signature": "export declare function futureValue(principal: number, rate: number, periods: number, options?: AnnuityOptions): number;",
      "jsdocSummary": "Balance after `periods`: `principal × (1 + rate)^periods`, plus each `payment` grown to the end (Excel `FV`, negated). `periods` may be fractional or negative (negative discounts)."
    },
    {
      "subpath": "./finance/float",
      "name": "internalRateOfReturn",
      "kind": "function",
      "signature": "export declare function internalRateOfReturn(cashFlows: readonly number[], options?: { guess?: number; tolerance?: number; }): number;",
      "jsdocSummary": "Internal rate of return as a JS number (the rate that makes NPV zero), like Excel `IRR`. Cash flows start at t = 0 and need at least one negative and one positive value."
    },
    {
      "subpath": "./finance/float",
      "name": "netPresentValue",
      "kind": "function",
      "signature": "export declare function netPresentValue(rate: number, cashFlows: readonly number[]): number;",
      "jsdocSummary": "Net present value of `cashFlows` at t = 1..n, like Excel `NPV`: the first flow is discounted one full period. Add a t = 0 flow yourself: `initial + netPresentValue(rate, flows)`."
    },
    {
      "subpath": "./finance/float",
      "name": "nominalRate",
      "kind": "function",
      "signature": "export declare function nominalRate(effectiveRate: number, periodsPerYear: number): number;",
      "jsdocSummary": "Nominal annual rate (Excel `NOMINAL`) that compounds `periodsPerYear` times to the given effective rate: `n × ((1 + effective)^(1/n) − 1)`."
    },
    {
      "subpath": "./finance/float",
      "name": "payment",
      "kind": "function",
      "signature": "export declare function payment(principal: number, rate: number, periods: number, options?: { timing?: PaymentTiming; }): number;",
      "jsdocSummary": "Excel `PMT`, negated: the level payment that pays off `principal` over `periods` at `rate` per period. `periods` must be positive and may be fractional. A rate of 0 gives `principal ÷ periods`; `timing: 'begin'` divides the payment by `1 + rate`."
    },
    {
      "subpath": "./finance/float",
      "name": "PaymentTiming",
      "kind": "type",
      "signature": "export type PaymentTiming = 'end' | 'begin';",
      "jsdocSummary": "When in the period payments fall: `'end'` is Excel `type` 0, `'begin'` is `type` 1."
    },
    {
      "subpath": "./finance/float",
      "name": "periodsToReach",
      "kind": "function",
      "signature": "export declare function periodsToReach(principal: number, target: number, rate: number, options?: AnnuityOptions): number;",
      "jsdocSummary": "Periods until the balance goes from `principal` to `target` at `rate` per period: the `periods` that makes `futureValue(principal, rate, periods, options)` equal `target`. Approximate and possibly fractional; round up yourself for whole months. The result can be passed straight back to `futureValue`."
    },
    {
      "subpath": "./finance/float",
      "name": "presentValue",
      "kind": "function",
      "signature": "export declare function presentValue(amount: number, rate: number, periods: number, options?: AnnuityOptions): number;",
      "jsdocSummary": "Today's worth of `amount` due after `periods`, plus each `payment` discounted to today (Excel `PV`, negated): `amount ÷ (1 + rate)^periods + payment × (1 − (1 + rate)^-periods) ÷ rate`. `periods` may be fractional or negative."
    },
    {
      "subpath": "./fluent",
      "name": "num",
      "kind": "function",
      "signature": "export declare function num(value: number): NumberValue;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./fluent",
      "name": "NumberValue",
      "kind": "class",
      "signature": "export declare class NumberValue { #private; constructor(value: number); plus(other: number): NumberValue; minus(other: number): NumberValue; times(other: number): NumberValue; dividedBy(other: number): NumberValue; abs(): NumberValue; negated(): NumberValue; clamp(min: number, max: number): NumberValue; lerp(end: number, t: number): NumberValue; remap(inStart: number, inEnd: number, outStart: number, outEnd: number): NumberValue; round(places?: number, mode?: RoundingMode): NumberValue; roundTo(step: number, mode?: RoundingMode): NumberValue; inRange(min: number, max: number, bounds?: Bounds): boolean; approxEqual(other: number, tolerance?: number): boolean; isZero(): boolean; isPositive(): boolean; isNegative(): boolean; isInteger(): boolean; formatNumber(options?: FormatOptions): string; formatCurrency(currency: string, options?: CurrencyOptions): string; /** The wrapped value is a fraction: `num(0.125).formatPercent()` → `'12.5%'`. */ formatPercent(options?: FormatOptions): string; formatCompact(options?: CompactOptions): string; /** Exact decimal of the shortest spelling: `num(0.1).toDecimal()` is exactly 1/10. */ toDecimal(): Decimal; toRatio(): Rational; value(): number; toString(): string; toJSON(): number; /** Throws. Use `.value()`; implicit coercion hides the wrapper's boundary. */ valueOf(): never; [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string; readonly [Symbol.toStringTag] = \"NumberValue\"; }",
      "jsdocSummary": ""
    },
    {
      "subpath": "./format",
      "name": "CompactOptions",
      "kind": "type",
      "signature": "export type CompactOptions = { /** `'short'` gives `1.2M`, `'long'` gives `1.2 million`. Default `'short'`. */ display?: 'short' | 'long'; /** * An ISO 4217 code that turns the result into compact money: `{ currency: 'USD' }` gives * `$1.3M`. The fraction-digit defaults (0 to 1) still apply, so ask for * `maximumFractionDigits: 2` to get `$1.25M`. A formatter's bound currency is not used here. */ currency?: string; /** How the currency is shown, as in `formatCurrency`. Only used with `currency`. */ currencyDisplay?: CurrencyOptions['currencyDisplay']; } & FormatOptions;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./format",
      "name": "createFormatter",
      "kind": "function",
      "signature": "export declare function createFormatter(defaults: { locale?: string; currency?: string; }): Formatter;",
      "jsdocSummary": "Binds a default locale (and optionally a currency) once. The defaults are copied at creation, so later changes to the caller's object have no effect. Per-call `locale` overrides the default; an explicit currency overrides the bound one. Calls without per-call options reuse a pre-resolved `Intl.NumberFormat` and skip cache-key building. `formatCurrency` with no currency anywhere throws `InvalidArgumentError`."
    },
    {
      "subpath": "./format",
      "name": "CurrencyOptions",
      "kind": "type",
      "signature": "export type CurrencyOptions = { currencyDisplay?: 'symbol' | 'narrowSymbol' | 'code' | 'name'; /** Show negatives in accounting style: `($5.00)` instead of `-$5.00`. */ accounting?: boolean; } & FormatOptions;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./format",
      "name": "FileSizeOptions",
      "kind": "type",
      "signature": "export type FileSizeOptions = { /** * `'si'` uses powers of 1000 (`kB`), `'iec'` powers of 1024 (`KiB`), `'jedec'` powers of 1024 * with the `KB`/`MB`/`GB` labels most file managers print. Default `'si'`. */ system?: 'si' | 'iec' | 'jedec'; } & FormatOptions;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./format",
      "name": "formatCompact",
      "kind": "function",
      "signature": "export declare function formatCompact(value: FormatValue, options?: CompactOptions): string;",
      "jsdocSummary": "Short or long compact form: `formatCompact(1230000)` → `'1.2M'`. Default max 1 fraction digit. With `currency` it is compact money: `formatCompact(1_250_000, { currency: 'USD' })` → `'$1.3M'`."
    },
    {
      "subpath": "./format",
      "name": "formatCurrency",
      "kind": "function",
      "signature": "export declare function formatCurrency(value: FormatValue, currency: string, options?: CurrencyOptions): string;",
      "jsdocSummary": "Formats money. Fraction digits come from the currency (2 for USD, 0 for JPY) unless overridden: `formatCurrency(1234.5, 'EUR', { locale: 'de-DE' })` → `'1.234,50 €'`."
    },
    {
      "subpath": "./format",
      "name": "formatFileSize",
      "kind": "function",
      "signature": "export declare function formatFileSize(bytes: number | bigint, options?: FileSizeOptions): string;",
      "jsdocSummary": "Human file size: `formatFileSize(1536)` → `'1.5 kB'`. Picks the largest unit where the value is at least 1. The number part is locale-aware; the unit label is appended in English (`Intl` has no IEC units). Very large bigints lose precision beyond 2^53, which is invisible at one fraction digit. Rounding can show `'1000 kB'` for 999999 bytes; it does not promote to MB."
    },
    {
      "subpath": "./format",
      "name": "formatNumber",
      "kind": "function",
      "signature": "export declare function formatNumber(value: FormatValue, options?: FormatOptions): string;",
      "jsdocSummary": "Formats a number for display: `formatNumber(1234.5)` → `'1,234.5'`. Intl defaults: 0–3 fraction digits."
    },
    {
      "subpath": "./format",
      "name": "FormatOptions",
      "kind": "type",
      "signature": "export type FormatOptions = { /** * BCP 47 locale tag. Default `'en-US'`, so output is the same on every machine * (SSR-safe). Pass `'default'` (`RUNTIME_LOCALE`) to opt in to the runtime's own * locale, what `toLocaleString()` uses with no argument; the output then depends * on the user's machine. */ locale?: string; minimumFractionDigits?: number; maximumFractionDigits?: number; useGrouping?: boolean; /** How digits beyond `maximumFractionDigits` are dropped. Default `'halfUp'`. */ rounding?: Exclude<RoundingMode, 'unnecessary'>; signDisplay?: 'auto' | 'always' | 'exceptZero' | 'negative' | 'never'; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./format",
      "name": "formatPercent",
      "kind": "function",
      "signature": "export declare function formatPercent(fraction: FormatValue, options?: FormatOptions): string;",
      "jsdocSummary": "Formats a FRACTION as a percent. The input is a fraction, NOT a percentage: `formatPercent(0.125)` → `'12.5%'`, while `formatPercent(12.5)` → `'1,250%'`. Default 0–2 fraction digits."
    },
    {
      "subpath": "./format",
      "name": "Formatter",
      "kind": "type",
      "signature": "export type Formatter = { formatNumber(value: FormatValue, options?: FormatOptions): string; formatPercent(value: FormatValue, options?: FormatOptions): string; formatCompact(value: FormatValue, options?: CompactOptions): string; formatFileSize(bytes: number | bigint, options?: FileSizeOptions): string; /** Uses the bound currency. */ formatCurrency(value: FormatValue, options?: CurrencyOptions): string; /** An explicit currency overrides the bound one. */ formatCurrency(value: FormatValue, currency: string, options?: CurrencyOptions): string; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./format",
      "name": "FormatValue",
      "kind": "type",
      "signature": "export type FormatValue = number | bigint | Decimal | string;",
      "jsdocSummary": "A formattable value. A string must be a number in plain decimal syntax (`'-1234.50'`)."
    },
    {
      "subpath": "./format",
      "name": "RUNTIME_LOCALE",
      "kind": "variable",
      "signature": "export declare const RUNTIME_LOCALE = \"default\";",
      "jsdocSummary": "Pass as `locale` to use the runtime's default locale instead of `'en-US'`. It is a word, not `undefined`, so a missing locale can never switch it on by accident."
    },
    {
      "subpath": "./geometry",
      "name": "AngleOptions",
      "kind": "type",
      "signature": "export type AngleOptions = { /** Unit of every angle in and out. Default `'rad'`. */ angleUnit?: AngleUnit; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "Box",
      "kind": "type",
      "signature": "export type Box = Solid & { readonly spaceDiagonal: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "circle",
      "kind": "function",
      "signature": "export declare function circle(radius: number): Circle;",
      "jsdocSummary": "Diameter, circumference and area of a circle."
    },
    {
      "subpath": "./geometry",
      "name": "Circle",
      "kind": "type",
      "signature": "export type Circle = { readonly radius: number; readonly diameter: number; readonly circumference: number; readonly area: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "circleSector",
      "kind": "function",
      "signature": "export declare function circleSector(sector: { readonly radius: number; readonly angle: number; }, options?: AngleOptions): CircleSector;",
      "jsdocSummary": "Arc, chord, sector and segment of a circle cut by a central angle in (0, one full turn]."
    },
    {
      "subpath": "./geometry",
      "name": "CircleSector",
      "kind": "type",
      "signature": "export type CircleSector = { readonly arcLength: number; readonly chordLength: number; readonly sectorArea: number; /** Area between the arc and its chord. */ readonly segmentArea: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "cone",
      "kind": "function",
      "signature": "export declare function cone(dimensions: { readonly radius: number; readonly height: number; }): SlantSolid;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "cube",
      "kind": "function",
      "signature": "export declare function cube(side: number): Box;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "cuboid",
      "kind": "function",
      "signature": "export declare function cuboid(dimensions: { readonly length: number; readonly width: number; readonly height: number; }): Box;",
      "jsdocSummary": "A rectangular box."
    },
    {
      "subpath": "./geometry",
      "name": "cylinder",
      "kind": "function",
      "signature": "export declare function cylinder(dimensions: { readonly radius: number; readonly height: number; }): LateralSolid;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "distance",
      "kind": "function",
      "signature": "export declare function distance(a: Point2, b: Point2): number; ; export declare function distance(a: Point3, b: Point3): number;",
      "jsdocSummary": "Euclidean distance between two points of the same dimension."
    },
    {
      "subpath": "./geometry",
      "name": "ellipse",
      "kind": "function",
      "signature": "export declare function ellipse(axes: { readonly semiAxisX: number; readonly semiAxisY: number; }): Ellipse;",
      "jsdocSummary": "Area, perimeter and eccentricity of an ellipse with the given semi-axes (either order)."
    },
    {
      "subpath": "./geometry",
      "name": "Ellipse",
      "kind": "type",
      "signature": "export type Ellipse = { readonly area: number; /** Exact to double precision (arithmetic-geometric mean), not an approximation. */ readonly perimeter: number; /** 0 for a circle, approaching 1 as the ellipse flattens. */ readonly eccentricity: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "frustum",
      "kind": "function",
      "signature": "export declare function frustum(dimensions: { readonly bottomRadius: number; readonly topRadius: number; readonly height: number; }): SlantSolid;",
      "jsdocSummary": "A conical frustum: a cone with its tip cut off parallel to the base."
    },
    {
      "subpath": "./geometry",
      "name": "isPythagoreanTriple",
      "kind": "function",
      "signature": "export declare function isPythagoreanTriple(a: number, b: number, c: number): boolean; ; export declare function isPythagoreanTriple(a: bigint, b: bigint, c: bigint): boolean;",
      "jsdocSummary": "Whether three positive integers are a Pythagorean triple, in any order (the largest is taken as the hypotenuse). Exact: `number` inputs are squared as `bigint`, so large integers are not misjudged by rounding. Non-integers and non-positive values are simply not triples."
    },
    {
      "subpath": "./geometry",
      "name": "LateralSolid",
      "kind": "type",
      "signature": "export type LateralSolid = Solid & { readonly lateralArea: number; };",
      "jsdocSummary": "A solid with a curved or slanted side: `lateralArea` excludes the bases."
    },
    {
      "subpath": "./geometry",
      "name": "midpoint",
      "kind": "function",
      "signature": "export declare function midpoint(a: Point2, b: Point2): Point2; ; export declare function midpoint(a: Point3, b: Point3): Point3;",
      "jsdocSummary": "The point halfway between two points of the same dimension."
    },
    {
      "subpath": "./geometry",
      "name": "Point2",
      "kind": "type",
      "signature": "export type Point2 = readonly [x: number, y: number];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "Point3",
      "kind": "type",
      "signature": "export type Point3 = readonly [x: number, y: number, z: number];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "polygonArea",
      "kind": "function",
      "signature": "export declare function polygonArea(vertices: Iterable<Point2>): number;",
      "jsdocSummary": "Area of a simple polygon (shoelace formula), regardless of vertex order."
    },
    {
      "subpath": "./geometry",
      "name": "PythagoreanTriple",
      "kind": "type",
      "signature": "export type PythagoreanTriple = readonly [a: number, b: number, c: number];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "pythagoreanTriples",
      "kind": "function",
      "signature": "export declare function pythagoreanTriples(limit: number, options?: { primitive?: boolean; }): PythagoreanTriple[];",
      "jsdocSummary": "Every Pythagorean triple `[a, b, c]` with `a < b < c ≤ limit`, generated by Euclid's formula (a = m² − n², b = 2mn, c = m² + n²), sorted by `c` then `a`. With `primitive: true`, only triples whose sides share no common factor. `limit` must be a non-negative safe integer; the result has roughly `limit · ln(limit) / 2π` entries, so very large limits need a lot of memory."
    },
    {
      "subpath": "./geometry",
      "name": "regularPolygon",
      "kind": "function",
      "signature": "export declare function regularPolygon(polygon: { readonly sides: number; readonly sideLength: number; }, options?: AngleOptions): RegularPolygon;",
      "jsdocSummary": "A regular polygon with `sides` (an integer ≥ 3) sides of length `sideLength`."
    },
    {
      "subpath": "./geometry",
      "name": "RegularPolygon",
      "kind": "type",
      "signature": "export type RegularPolygon = { readonly perimeter: number; readonly area: number; /** Distance from the centre to the middle of a side (inradius). */ readonly apothem: number; /** Distance from the centre to a vertex. */ readonly circumradius: number; readonly interiorAngle: number; /** Equal to the central angle: one turn divided by the side count. */ readonly exteriorAngle: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "signedPolygonArea",
      "kind": "function",
      "signature": "export declare function signedPolygonArea(vertices: Iterable<Point2>): number;",
      "jsdocSummary": "Signed area of a simple polygon by the shoelace formula: positive when the vertices run counterclockwise (with y pointing up), negative when clockwise. Do not repeat the first vertex at the end (it is harmless if you do). For a self-intersecting polygon the result is the net of its oppositely wound parts."
    },
    {
      "subpath": "./geometry",
      "name": "SlantSolid",
      "kind": "type",
      "signature": "export type SlantSolid = LateralSolid & { readonly slantHeight: number; };",
      "jsdocSummary": "A cone, pyramid or frustum: `slantHeight` runs along the side from base edge to apex (or top edge)."
    },
    {
      "subpath": "./geometry",
      "name": "Solid",
      "kind": "type",
      "signature": "export type Solid = { readonly volume: number; /** Total surface area, bases included. */ readonly surfaceArea: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "solveTriangle",
      "kind": "function",
      "signature": "export declare function solveTriangle(parts: TriangleParts, options?: TriangleOptions): Triangle;",
      "jsdocSummary": "The one triangle that fits the given parts. Throws `InvalidArgumentError` when the parts describe no triangle, or when they are an ambiguous SSA case that fits two (use `solveTriangles` for that)."
    },
    {
      "subpath": "./geometry",
      "name": "solveTriangles",
      "kind": "function",
      "signature": "export declare function solveTriangles(parts: TriangleParts, options?: TriangleOptions): readonly Triangle[];",
      "jsdocSummary": "Every triangle that fits the given parts (exactly three, at least one a side). SSS, SAS, ASA and AAS give one triangle; SSA gives 0, 1 or 2, the acute solution first. Parts that describe no triangle (triangle inequality broken, angles summing to a half turn or more, SSA side too short) give `[]`. Malformed input (wrong part count, non-positive or non-finite values, an angle of a half turn or more, no side at all) throws `InvalidArgumentError`."
    },
    {
      "subpath": "./geometry",
      "name": "sphere",
      "kind": "function",
      "signature": "export declare function sphere(radius: number): Solid;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "squarePyramid",
      "kind": "function",
      "signature": "export declare function squarePyramid(dimensions: { readonly baseSide: number; readonly height: number; }): SlantSolid;",
      "jsdocSummary": "A right pyramid on a square base; `slantHeight` is the height of each triangular face."
    },
    {
      "subpath": "./geometry",
      "name": "torus",
      "kind": "function",
      "signature": "export declare function torus(dimensions: { readonly majorRadius: number; readonly minorRadius: number; }): Solid;",
      "jsdocSummary": "A ring torus: `majorRadius` from the centre to the tube's centre, `minorRadius` of the tube. Requires `majorRadius ≥ minorRadius`; a spindle torus overlaps itself and these formulas would count the overlap twice."
    },
    {
      "subpath": "./geometry",
      "name": "Triangle",
      "kind": "type",
      "signature": "export type Triangle = { readonly a: number; readonly b: number; readonly c: number; readonly A: number; readonly B: number; readonly C: number; readonly area: number; readonly perimeter: number; readonly sideType: TriangleSideType; readonly angleType: TriangleAngleType; };",
      "jsdocSummary": "A solved triangle. Angles are in the requested `angleUnit`."
    },
    {
      "subpath": "./geometry",
      "name": "TriangleAngleType",
      "kind": "type",
      "signature": "export type TriangleAngleType = 'acute' | 'right' | 'obtuse';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "TriangleOptions",
      "kind": "type",
      "signature": "export type TriangleOptions = AngleOptions & { /** * Relative tolerance (as in `approxEqual`) for classification and for the * SSA case where the given side exactly reaches the base. Default `1e-9`. */ tolerance?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./geometry",
      "name": "TriangleParts",
      "kind": "type",
      "signature": "export type TriangleParts = { readonly a?: number; readonly b?: number; readonly c?: number; readonly A?: number; readonly B?: number; readonly C?: number; };",
      "jsdocSummary": "Known parts of a triangle. Side `a` is opposite angle `A`, `b` opposite `B`, `c` opposite `C`. Give exactly three parts, at least one of them a side."
    },
    {
      "subpath": "./geometry",
      "name": "TriangleSideType",
      "kind": "type",
      "signature": "export type TriangleSideType = 'equilateral' | 'isosceles' | 'scalene';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./integer",
      "name": "combinations",
      "kind": "function",
      "signature": "export declare function combinations(n: number, k: number): number; ; export declare function combinations(n: bigint, k: bigint): bigint;",
      "jsdocSummary": "Binomial coefficient C(n, k), the number of ways to choose `k` of `n`. Returns `0` when `k` is outside `0..n`. Uses the multiplicative formula, dividing at every step so values stay integral. The `bigint` form allows at most 100_000 steps and a 100,000-digit result (`ResourceLimitError`)."
    },
    {
      "subpath": "./integer",
      "name": "digitSum",
      "kind": "function",
      "signature": "export declare function digitSum(n: number | bigint): number;",
      "jsdocSummary": "Sum of the decimal digits of `|n|`: `digitSum(-123)` is `6`."
    },
    {
      "subpath": "./integer",
      "name": "divisors",
      "kind": "function",
      "signature": "export declare function divisors(n: number): number[]; ; export declare function divisors(n: bigint): bigint[];",
      "jsdocSummary": "All positive divisors in ascending order: `divisors(28)` is `[1, 2, 4, 7, 14, 28]`. Requires `n >= 1`. Built from the prime factorization, so `bigint` input is limited to `n < 2^64`."
    },
    {
      "subpath": "./integer",
      "name": "divmod",
      "kind": "function",
      "signature": "export declare function divmod(a: number, b: number): [quotient: number, remainder: number]; ; export declare function divmod(a: bigint, b: bigint): [quotient: bigint, remainder: bigint];",
      "jsdocSummary": "Floor division and remainder, like Python's `divmod`: the quotient rounds toward −∞ and the remainder takes the sign of the divisor, so `divmod(-7, 2)` is `[-4, 1]` and `divmod(7, -2)` is `[-4, -1]`."
    },
    {
      "subpath": "./integer",
      "name": "factorial",
      "kind": "function",
      "signature": "export declare function factorial(n: number): number; ; export declare function factorial(n: bigint): bigint;",
      "jsdocSummary": "`n!`. The `number` form works up to `n = 18`; above that the result is unsafe and it throws `NumericRangeError`. The `bigint` form is capped at `n = 25_205` (results up to 100,000 digits; `ResourceLimitError`)."
    },
    {
      "subpath": "./integer",
      "name": "fibonacci",
      "kind": "function",
      "signature": "export declare function fibonacci(n: number): bigint;",
      "jsdocSummary": "The n-th Fibonacci number (`F(0) = 0`, `F(1) = 1`) by fast doubling. Always returns a `bigint`. `n` must be a non-negative safe integer at most 100_000 (`ResourceLimitError` above)."
    },
    {
      "subpath": "./integer",
      "name": "fromBase",
      "kind": "function",
      "signature": "export declare function fromBase(text: string, base: number): bigint;",
      "jsdocSummary": "Reads an integer written in `base` 2 to 36 into a `bigint`: `fromBase('ff', 16)` is `255n`. An optional leading `-` or `+` is allowed and digits are case insensitive. Anything else (spaces, `_`, a `0x` prefix, a digit too large for the base, empty text) throws `NumberFormatError`."
    },
    {
      "subpath": "./integer",
      "name": "gcd",
      "kind": "function",
      "signature": "export declare function gcd(a: number, b: number): number; ; export declare function gcd(a: bigint, b: bigint): bigint;",
      "jsdocSummary": "Greatest common divisor, always non-negative. `gcd(0, 0)` is `0`."
    },
    {
      "subpath": "./integer",
      "name": "isEven",
      "kind": "function",
      "signature": "export declare function isEven(n: number | bigint): boolean;",
      "jsdocSummary": "True when `n` is divisible by 2. Zero is even."
    },
    {
      "subpath": "./integer",
      "name": "isOdd",
      "kind": "function",
      "signature": "export declare function isOdd(n: number | bigint): boolean;",
      "jsdocSummary": "True when `n` is not divisible by 2. Negative odd numbers are odd."
    },
    {
      "subpath": "./integer",
      "name": "isPrime",
      "kind": "function",
      "signature": "export declare function isPrime(n: number): boolean; ; export declare function isPrime(n: bigint): boolean;",
      "jsdocSummary": "Exact primality test by Miller–Rabin with a fixed base set that is deterministic for every `n < 2^64`. Values below 2 are not prime. At or above 2^64 it throws `NumericRangeError` rather than guess."
    },
    {
      "subpath": "./integer",
      "name": "lcm",
      "kind": "function",
      "signature": "export declare function lcm(a: number, b: number): number; ; export declare function lcm(a: bigint, b: bigint): bigint;",
      "jsdocSummary": "Least common multiple, always non-negative. Zero in → zero out."
    },
    {
      "subpath": "./integer",
      "name": "modInverse",
      "kind": "function",
      "signature": "export declare function modInverse(a: bigint, modulus: bigint): bigint;",
      "jsdocSummary": "Modular inverse of `a` mod `modulus` in `[0, modulus)`, by extended Euclid. Throws `InvalidArgumentError` when `gcd(a, modulus) !== 1`."
    },
    {
      "subpath": "./integer",
      "name": "modPow",
      "kind": "function",
      "signature": "export declare function modPow(base: bigint, exponent: bigint, modulus: bigint): bigint;",
      "jsdocSummary": "`base ** exponent mod modulus`, in `[0, modulus)`. Requires `exponent >= 0` and `modulus > 0`. Square-and-multiply."
    },
    {
      "subpath": "./integer",
      "name": "permutations",
      "kind": "function",
      "signature": "export declare function permutations(n: number, k: number): number; ; export declare function permutations(n: bigint, k: bigint): bigint;",
      "jsdocSummary": "Ordered selections P(n, k) = n! / (n − k)!. Returns `0` when `k` is outside `0..n`. The `bigint` form allows at most 100_000 terms and a 100,000-digit result."
    },
    {
      "subpath": "./integer",
      "name": "primeFactors",
      "kind": "function",
      "signature": "export declare function primeFactors(n: number): number[]; ; export declare function primeFactors(n: bigint): bigint[];",
      "jsdocSummary": "Prime factors in ascending order, with multiplicity: `360` gives `[2, 2, 2, 3, 3, 5]`. Values below 2 give `[]`; negatives throw `InvalidArgumentError`. Trial division by 2, 3 and `6k ± 1` up to 1e6, then Pollard's rho (Brent) with Miller–Rabin. Throws `NumericRangeError` for `n >= 2^64`."
    },
    {
      "subpath": "./integer",
      "name": "toBase",
      "kind": "function",
      "signature": "export declare function toBase(value: number | bigint, base: number): string;",
      "jsdocSummary": "Writes an integer in `base` 2 to 36 with lowercase digits: `toBase(255, 16)` is `'ff'`, `toBase(-10, 2)` is `'-1010'`. A `number` must be a safe integer; a `bigint` is exact at any size. No prefix (`0x`) is added."
    },
    {
      "subpath": "./integrate",
      "name": "integrate",
      "kind": "function",
      "signature": "export declare function integrate(f: RealFunction, bounds: readonly [number, number], options?: IntegrateOptions): IntegrationResult;",
      "jsdocSummary": "`∫ f(x) dx` from `bounds[0]` to `bounds[1]`, with an error estimate. Either bound may be infinite. See the module docs for the methods, the tolerance and the failure policy."
    },
    {
      "subpath": "./integrate",
      "name": "IntegrateOptions",
      "kind": "type",
      "signature": "export type IntegrateOptions = { /** `'gaussKronrod'` (default, adaptive G7–K15) or `'tanhSinh'` (double-exponential, for endpoint singularities). */ readonly method?: IntegrationMethod; /** Absolute tolerance on the error estimate (default `1e-12`). */ readonly absoluteTolerance?: number; /** Relative tolerance, times `|value|` (default `1e-10`). */ readonly relativeTolerance?: number; /** Most calls of `f` before `IntegrationConvergenceError` (default 20,000). */ readonly maxEvaluations?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./integrate",
      "name": "IntegrationConvergenceError",
      "kind": "class",
      "signature": "export declare class IntegrationConvergenceError extends ConvergenceError { /** The best value, its error estimate and the evaluations spent (sign already applied for reversed bounds). */ readonly best: IntegrationResult; constructor(message: string, best: IntegrationResult); }",
      "jsdocSummary": "`integrate` missed its tolerance; `best` is the best estimate it reached."
    },
    {
      "subpath": "./integrate",
      "name": "IntegrationMethod",
      "kind": "type",
      "signature": "export type IntegrationMethod = 'gaussKronrod' | 'tanhSinh';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./integrate",
      "name": "IntegrationResult",
      "kind": "type",
      "signature": "export type IntegrationResult = { readonly value: number; /** Estimated absolute error of `value`. */ readonly errorEstimate: number; /** Calls of `f`. */ readonly evaluations: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./integrate",
      "name": "RealFunction",
      "kind": "type",
      "signature": "export type RealFunction = (x: number) => number;",
      "jsdocSummary": "A real function of one real variable, evaluated on float64."
    },
    {
      "subpath": "./linear-algebra",
      "name": "angleBetween",
      "kind": "function",
      "signature": "export declare function angleBetween(a: Vector, b: Vector): number;",
      "jsdocSummary": "The angle between two vectors in radians, in `[0, π]`. Uses Kahan's `2·atan2(‖û − v̂‖, ‖û + v̂‖)` on the unit vectors, which stays accurate for nearly parallel and nearly opposite vectors where `acos(cos θ)` loses half its digits. Throws `DivisionByZeroError` if either vector is zero."
    },
    {
      "subpath": "./linear-algebra",
      "name": "choleskyDecompose",
      "kind": "function",
      "signature": "export declare function choleskyDecompose(a: Matrix, options?: SymmetryOptions): CholeskyDecomposition;",
      "jsdocSummary": "`A = L·Lᵀ` for a symmetric positive definite matrix (LAPACK `dpotrf`): about half the work of LU, and no pivoting is needed. Symmetry is checked like `symmetricEigenvalues` (`InvalidArgumentError` beyond the tolerance; the factorization uses `(A + Aᵀ) / 2`). Throws `NotPositiveDefiniteError` when a diagonal pivot is `≤ 0`, the LAPACK rule, which makes this the standard positive-definiteness test. A singular positive semidefinite matrix may pass with a tiny diagonal entry or throw, depending on rounding."
    },
    {
      "subpath": "./linear-algebra",
      "name": "CholeskyDecomposition",
      "kind": "type",
      "signature": "export type CholeskyDecomposition = { /** Lower-triangular `L` with a positive diagonal. */ lower: number[][]; };",
      "jsdocSummary": "`A = L·Lᵀ`, from `choleskyDecompose`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "choleskySolve",
      "kind": "function",
      "signature": "export declare function choleskySolve(a: Matrix, b: Vector, options?: ToleranceOptions): number[]; ; export declare function choleskySolve(a: Matrix, b: Matrix, options?: ToleranceOptions): number[][];",
      "jsdocSummary": "Solves `A·x = b` for a symmetric positive definite `A` by Cholesky: about twice as fast as `solve`, and as accurate. `b` is a vector or a matrix of right-hand-side columns, as for `solve`. Symmetry is checked with the default tolerance (see `choleskyDecompose`). A pivot `d` with `|d| ≤ n · Number.EPSILON · ‖A‖∞` (or `{ tolerance }`, absolute; the same quantity `solve` tests, since for this matrix `d` equals LU's pivot) throws `SingularMatrixError`; a pivot below `−tolerance` throws `NotPositiveDefiniteError`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "conditionNumber",
      "kind": "function",
      "signature": "export declare function conditionNumber(a: Matrix): number;",
      "jsdocSummary": "The 2-norm condition number `σ₁ / σₖ` (largest over smallest singular value) of any `m×n` matrix: about how many times a relative error in `A` or `b` can be magnified in the solution of `A·x = b` or a least-squares fit. `1` for an orthogonal matrix; `Infinity` (as NumPy's `cond` returns) when the smallest singular value is exactly `0`, the one case in this module that returns a non-finite number, since the condition number of a singular matrix is infinite by definition."
    },
    {
      "subpath": "./linear-algebra",
      "name": "cross",
      "kind": "function",
      "signature": "export declare function cross(a: Vector, b: Vector): number[];",
      "jsdocSummary": "Cross product of two 3-vectors; perpendicular to both, right-handed."
    },
    {
      "subpath": "./linear-algebra",
      "name": "determinant",
      "kind": "function",
      "signature": "export declare function determinant(a: Matrix): number;",
      "jsdocSummary": "The determinant, as `sign(P) · Π u_kk` from an LU factorization: O(n³), where cofactor expansion is O(n!). A singular matrix gives `0` or a value tiny next to the entries; it never throws for that. Throws `NumericRangeError` if the product overflows."
    },
    {
      "subpath": "./linear-algebra",
      "name": "dot",
      "kind": "function",
      "signature": "export declare function dot(a: Vector, b: Vector): number;",
      "jsdocSummary": "Dot product `Σ aᵢ·bᵢ`. Throws `InvalidArgumentError` for different lengths."
    },
    {
      "subpath": "./linear-algebra",
      "name": "eigenDecompose",
      "kind": "function",
      "signature": "export declare function eigenDecompose(a: Matrix): EigenDecomposition;",
      "jsdocSummary": "Eigenvalues and eigenvectors of any real square matrix: `A·v = λ·v` for `λ = values[k]`, `v = vectors[k]`. Values are sorted as in `eigenvalues`. Each vector has unit length with its largest-magnitude entry real and positive; a real eigenvalue's vector has real entries, and conjugate eigenvalues have conjugate vectors. For a defective matrix the vectors of a repeated eigenvalue are (nearly) parallel: there is no full basis to find. Throws `ConvergenceError` if the QR iteration stalls."
    },
    {
      "subpath": "./linear-algebra",
      "name": "EigenDecomposition",
      "kind": "type",
      "signature": "export type EigenDecomposition = { /** The eigenvalues, sorted by real part, then imaginary part; a real one has `im === 0`. */ values: Complex[]; /** `vectors[k]` is a unit eigenvector for `values[k]` (real entries for a real eigenvalue). */ vectors: Complex[][]; };",
      "jsdocSummary": "Eigenpairs of a general real matrix, from `eigenDecompose`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "eigenvalues",
      "kind": "function",
      "signature": "export declare function eigenvalues(a: Matrix): Complex[];",
      "jsdocSummary": "The eigenvalues of any real square matrix, as `Complex` values sorted by real part, then imaginary part, repeated by multiplicity. A real eigenvalue has an imaginary part of exactly `0`; complex ones come in conjugate pairs. For a symmetric matrix, `symmetricEigenvalues` is faster and returns plain numbers. Throws `ConvergenceError` if the QR iteration stalls."
    },
    {
      "subpath": "./linear-algebra",
      "name": "identity",
      "kind": "function",
      "signature": "export declare function identity(n: number): number[][];",
      "jsdocSummary": "The `n × n` identity matrix. Throws `ResourceLimitError` past 10,000,000 elements."
    },
    {
      "subpath": "./linear-algebra",
      "name": "inverse",
      "kind": "function",
      "signature": "export declare function inverse(a: Matrix, options?: ToleranceOptions): number[][];",
      "jsdocSummary": "The inverse `A⁻¹`, so that `A·A⁻¹ = I`. Throws `SingularMatrixError` when `A` is singular to working precision. To solve `A·x = b`, call `solve`: it is faster and more accurate than `multiply(inverse(A), b)`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "leastSquares",
      "kind": "function",
      "signature": "export declare function leastSquares(a: Matrix, b: Vector, options?: ToleranceOptions): number[]; ; export declare function leastSquares(a: Matrix, b: Matrix, options?: ToleranceOptions): number[][];",
      "jsdocSummary": "The least-squares solution of `A·x ≈ b` for any `m×n` matrix: the `x` that minimizes `‖A·x − b‖₂`. `b` is a vector (gives `x`, length `n`) or a matrix of right-hand-side columns (gives an `n`-row matrix of solution columns)."
    },
    {
      "subpath": "./linear-algebra",
      "name": "luDecompose",
      "kind": "function",
      "signature": "export declare function luDecompose(a: Matrix): LuDecomposition;",
      "jsdocSummary": "`P·A = L·U` for a square matrix, with partial pivoting (the largest remaining entry in each column becomes the pivot, so every multiplier in `L` has magnitude at most 1). Never throws for a singular matrix: `upper` then has a zero, or tiny, diagonal entry."
    },
    {
      "subpath": "./linear-algebra",
      "name": "LuDecomposition",
      "kind": "type",
      "signature": "export type LuDecomposition = { /** Unit lower-triangular factor `L` (ones on the diagonal). */ lower: number[][]; /** Upper-triangular factor `U`; a zero (or tiny) diagonal entry means `A` is singular. */ upper: number[][]; /** Row `i` of `P·A` is row `permutation[i]` of `A`. */ permutation: number[]; /** Sign of the permutation: `1` for an even number of row swaps, `-1` for odd. */ sign: 1 | -1; };",
      "jsdocSummary": "`P·A = L·U`, from `luDecompose`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "matrix",
      "kind": "function",
      "signature": "export declare function matrix(rows: Matrix): number[][];",
      "jsdocSummary": "A validated copy of `rows`: throws unless it is a non-empty, rectangular array of non-empty rows of finite numbers. Use it at a trust boundary (parsed JSON, user input); every other function validates on its own."
    },
    {
      "subpath": "./linear-algebra",
      "name": "Matrix",
      "kind": "type",
      "signature": "export type Matrix = readonly Vector[];",
      "jsdocSummary": "A matrix: a non-empty array of equally long, non-empty rows of finite numbers."
    },
    {
      "subpath": "./linear-algebra",
      "name": "minus",
      "kind": "function",
      "signature": "export declare function minus(a: Vector, b: Vector): number[]; ; export declare function minus(a: Matrix, b: Matrix): number[][];",
      "jsdocSummary": "Element-wise difference `a − b` of two vectors, or of two matrices of the same shape."
    },
    {
      "subpath": "./linear-algebra",
      "name": "multiply",
      "kind": "function",
      "signature": "export declare function multiply(a: Matrix, b: Matrix): number[][]; ; export declare function multiply(a: Matrix, b: Vector): number[];",
      "jsdocSummary": "The matrix product `A·B` (`m×n` times `n×p` gives `m×p`), or the matrix-vector product `A·v` (an `m`-vector). For a row vector times a matrix, use `multiply(transpose(A), v)`. For scaling by a number, see `times`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "norm",
      "kind": "function",
      "signature": "export declare function norm(v: Vector, p?: number): number;",
      "jsdocSummary": "The p-norm `(Σ |vᵢ|^p)^(1/p)`: Euclidean length by default, `1` for the taxicab sum, `Infinity` for the largest magnitude. `p` must be at least 1 (below 1 it is not a norm). Scaled by the largest magnitude first, so `norm([3e200, 4e200])` is `5e200` instead of overflowing."
    },
    {
      "subpath": "./linear-algebra",
      "name": "normalize",
      "kind": "function",
      "signature": "export declare function normalize(v: Vector): number[];",
      "jsdocSummary": "The unit vector in the direction of `v`. Throws `DivisionByZeroError` for the zero vector."
    },
    {
      "subpath": "./linear-algebra",
      "name": "plus",
      "kind": "function",
      "signature": "export declare function plus(a: Vector, b: Vector): number[]; ; export declare function plus(a: Matrix, b: Matrix): number[][];",
      "jsdocSummary": "Element-wise sum of two vectors, or of two matrices of the same shape."
    },
    {
      "subpath": "./linear-algebra",
      "name": "projection",
      "kind": "function",
      "signature": "export declare function projection(v: Vector, onto: Vector): number[];",
      "jsdocSummary": "The vector projection of `v` onto `onto`: `(v·onto / onto·onto)·onto`. Throws `DivisionByZeroError` when `onto` is the zero vector."
    },
    {
      "subpath": "./linear-algebra",
      "name": "pseudoInverse",
      "kind": "function",
      "signature": "export declare function pseudoInverse(a: Matrix, options?: ToleranceOptions): number[][];",
      "jsdocSummary": "The Moore–Penrose pseudo-inverse `A⁺` (`n×m` for an `m×n` matrix) from the SVD: `V·Σ⁺·Uᵀ`, where `Σ⁺` inverts the singular values above `max(m, n) · Number.EPSILON · σ₁` (NumPy's `pinv` default) and zeroes the rest; `{ tolerance }` sets an absolute cut-off instead. `A⁺·b` is the minimum-norm least-squares solution, but `leastSquares` computes that faster and more accurately."
    },
    {
      "subpath": "./linear-algebra",
      "name": "qrDecompose",
      "kind": "function",
      "signature": "export declare function qrDecompose(a: Matrix, options?: QrOptions): QrDecomposition;",
      "jsdocSummary": "`A·P = Q·R` for any `m×n` matrix, by Householder reflections (LAPACK `dgeqp3`, or `dgeqrf` with `{ pivoting: false }`). `Q` is the thin `m×k` factor with `k = min(m, n)`; `R` is `k×n`. Each diagonal entry of `R` is made non-negative (flipping the matching column of `Q`), so without pivoting the factorization of a full-rank `A` is unique. `rank` counts the `|r_kk|` above `max(m, n) · Number.EPSILON · |r₀₀|`, or above `{ tolerance }` (absolute). Backward stable: `‖A·P − Q·R‖ ≈ n · ε · ‖A‖`. Never throws for a rank-deficient matrix."
    },
    {
      "subpath": "./linear-algebra",
      "name": "QrDecomposition",
      "kind": "type",
      "signature": "export type QrDecomposition = { /** `Q`, `m×k` with orthonormal columns. */ orthogonal: number[][]; /** `R`, `k×n` upper triangular (trapezoidal when `n > m`), with a non-negative diagonal. */ upper: number[][]; /** Column `j` of `A·P` is column `permutation[j]` of `A`. */ permutation: number[]; /** The number of diagonal entries of `R` above the tolerance: the numerical rank, with pivoting. */ rank: number; };",
      "jsdocSummary": "`A·P = Q·R`, from `qrDecompose`; `k = min(m, n)` for an `m×n` matrix `A`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "QrOptions",
      "kind": "type",
      "signature": "export type QrOptions = ToleranceOptions & { /** * Column pivoting (default `true`): each step takes the remaining column of * largest norm, so `|r_kk|` falls along the diagonal and `rank` is reliable. * `false` gives plain Householder QR of `A` itself (`permutation` is then the * identity). */ pivoting?: boolean; };",
      "jsdocSummary": "Options for `qrDecompose`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "rank",
      "kind": "function",
      "signature": "export declare function rank(a: Matrix, options?: RankOptions): number;",
      "jsdocSummary": "The number of linearly independent rows (equivalently, columns) of any `m×n` matrix. By default it counts the singular values above `max(m, n) · Number.EPSILON · σ₁` (σ₁ the largest), the rule of NumPy's `matrix_rank`, so `rank`, `pseudoInverse` and `leastSquares` agree. `{ method: 'elimination' }` counts row echelon pivots above `max(m, n) · Number.EPSILON · ‖A‖∞` instead. `{ tolerance }` replaces the default with an absolute threshold for whichever quantity is counted."
    },
    {
      "subpath": "./linear-algebra",
      "name": "RankOptions",
      "kind": "type",
      "signature": "export type RankOptions = ToleranceOptions & { /** * `'svd'` (the default) counts singular values above the tolerance, the * reliable rank test. `'elimination'` counts pivots of row echelon form with * partial pivoting: several times faster, but on badly conditioned input it * can miss a near-dependence that the singular values show. */ method?: 'svd' | 'elimination'; };",
      "jsdocSummary": "Options for `rank`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "singularValueDecompose",
      "kind": "function",
      "signature": "export declare function singularValueDecompose(a: Matrix): SingularValueDecomposition;",
      "jsdocSummary": "`A = U·Σ·Vᵀ` for any `m×n` matrix, in thin form: `values` holds the `k = min(m, n)` singular values, descending; `left[k]` and `right[k]` are the matching unit singular vectors, so `transpose(left)` is the `m×k` factor `U` and `right` is `Vᵀ` (NumPy's `Vh`). Each pair's sign is fixed so that the largest-magnitude entry of `left[k]` (the first, on a tie) is positive. Throws like `singularValues`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "SingularValueDecomposition",
      "kind": "type",
      "signature": "export type SingularValueDecomposition = { /** The `min(m, n)` singular values, descending, all `≥ 0`. */ values: number[]; /** `left[k]` is the unit left singular vector (length `m`) for `values[k]`; together they are orthonormal. */ left: number[][]; /** `right[k]` is the unit right singular vector (length `n`) for `values[k]`; together they are orthonormal. */ right: number[][]; };",
      "jsdocSummary": "`A = Σₖ values[k] · left[k] · right[k]ᵀ`, from `singularValueDecompose`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "singularValues",
      "kind": "function",
      "signature": "export declare function singularValues(a: Matrix): number[];",
      "jsdocSummary": "The singular values of any `m×n` matrix: `min(m, n)` of them, descending, all `≥ 0` (the square roots of the eigenvalues of `AᵀA`, computed without forming it). Golub–Kahan–Reinsch: backward stable, so each value is within about `max(m, n) · ε · σ₁` of the exact one. Throws `ConvergenceError` if the QR iteration stalls (see the module docs). Faster than `singularValueDecompose`: no singular vectors are accumulated."
    },
    {
      "subpath": "./linear-algebra",
      "name": "solve",
      "kind": "function",
      "signature": "export declare function solve(a: Matrix, b: Vector, options?: ToleranceOptions): number[]; ; export declare function solve(a: Matrix, b: Matrix, options?: ToleranceOptions): number[][];",
      "jsdocSummary": "Solves `A·x = b` for a square `A`, by LU with partial pivoting. `b` is a vector (gives `x`) or a matrix of right-hand-side columns (gives a matrix of solution columns). Throws `SingularMatrixError` when `A` is singular to working precision; see the module docs for the tolerance."
    },
    {
      "subpath": "./linear-algebra",
      "name": "symmetricEigenDecompose",
      "kind": "function",
      "signature": "export declare function symmetricEigenDecompose(a: Matrix, options?: SymmetryOptions): SymmetricEigenDecomposition;",
      "jsdocSummary": "Eigenvalues and orthonormal eigenvectors of a symmetric matrix, so that `A = V·Λ·Vᵀ` with `V = transpose(vectors)`. Values ascend; `vectors[k]` belongs to `values[k]`, has unit length, and its largest-magnitude entry is positive. Throws like `symmetricEigenvalues`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "SymmetricEigenDecomposition",
      "kind": "type",
      "signature": "export type SymmetricEigenDecomposition = { /** The eigenvalues, ascending, repeated by multiplicity. */ values: number[]; /** `vectors[k]` is the unit eigenvector for `values[k]`; together they are orthonormal. */ vectors: number[][]; };",
      "jsdocSummary": "`A = V·Λ·Vᵀ`, from `symmetricEigenDecompose`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "symmetricEigenvalues",
      "kind": "function",
      "signature": "export declare function symmetricEigenvalues(a: Matrix, options?: SymmetryOptions): number[];",
      "jsdocSummary": "The eigenvalues of a symmetric matrix, ascending, repeated by multiplicity. Throws `InvalidArgumentError` when `A` is not symmetric within the tolerance (see the module docs, or pass `{ tolerance }`), and `ConvergenceError` if the QL iteration stalls. Faster than `symmetricEigenDecompose`: no eigenvectors are accumulated."
    },
    {
      "subpath": "./linear-algebra",
      "name": "SymmetryOptions",
      "kind": "type",
      "signature": "export type SymmetryOptions = { /** * Largest accepted `|a[i][j] − a[j][i]|`, absolute. Defaults to * `n · Number.EPSILON · ‖A‖∞`, which accepts the rounding noise of a * matrix computed in floating point; `0` demands exact symmetry. */ tolerance?: number; };",
      "jsdocSummary": "Options for the symmetric eigen solvers."
    },
    {
      "subpath": "./linear-algebra",
      "name": "times",
      "kind": "function",
      "signature": "export declare function times(a: Vector, k: number): number[]; ; export declare function times(a: Matrix, k: number): number[][];",
      "jsdocSummary": "Every element multiplied by the scalar `k`. For the matrix product, see `multiply`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "ToleranceOptions",
      "kind": "type",
      "signature": "export type ToleranceOptions = { /** * Absolute pivot threshold. A pivot whose magnitude is at or below it * counts as zero. Defaults to the size-and-norm-relative rule in the module * docs; `0` treats only exact zeros as zero. */ tolerance?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./linear-algebra",
      "name": "trace",
      "kind": "function",
      "signature": "export declare function trace(a: Matrix): number;",
      "jsdocSummary": "Sum of the diagonal of a square matrix."
    },
    {
      "subpath": "./linear-algebra",
      "name": "transpose",
      "kind": "function",
      "signature": "export declare function transpose(a: Matrix): number[][];",
      "jsdocSummary": "Rows become columns: `transpose(A)[j][i] === A[i][j]`."
    },
    {
      "subpath": "./linear-algebra",
      "name": "Vector",
      "kind": "type",
      "signature": "export type Vector = readonly number[];",
      "jsdocSummary": "A vector: a non-empty array of finite numbers."
    },
    {
      "subpath": "./number",
      "name": "approxEqual",
      "kind": "function",
      "signature": "export declare function approxEqual(a: number, b: number, tolerance?: number): boolean;",
      "jsdocSummary": "Tolerant equality for floats. `tolerance` is relative to the larger magnitude (and absolute near zero), so it works for both `0.1 + 0.2 ≈ 0.3` and `1e12 + 0.001 ≈ 1e12`."
    },
    {
      "subpath": "./number",
      "name": "Bounds",
      "kind": "type",
      "signature": "export type Bounds = '[]' | '[)' | '(]' | '()';",
      "jsdocSummary": "Interval notation: `[` / `]` include the bound, `(` / `)` exclude it."
    },
    {
      "subpath": "./number",
      "name": "clamp",
      "kind": "function",
      "signature": "export declare function clamp(x: number, min: number, max: number): number;",
      "jsdocSummary": "Limits `x` to `[min, max]`, both ends included."
    },
    {
      "subpath": "./number",
      "name": "inRange",
      "kind": "function",
      "signature": "export declare function inRange(x: number, min: number, max: number, bounds?: Bounds): boolean;",
      "jsdocSummary": "Is `x` inside the interval? Defaults to `[min, max)`, the usual half-open range."
    },
    {
      "subpath": "./number",
      "name": "inverseLerp",
      "kind": "function",
      "signature": "export declare function inverseLerp(start: number, end: number, x: number): number;",
      "jsdocSummary": "The `t` for which `lerp(start, end, t) === x`."
    },
    {
      "subpath": "./number",
      "name": "lerp",
      "kind": "function",
      "signature": "export declare function lerp(start: number, end: number, t: number): number;",
      "jsdocSummary": "Linear interpolation. `t` outside `[0, 1]` extrapolates. Exact at both ends."
    },
    {
      "subpath": "./number",
      "name": "linspace",
      "kind": "function",
      "signature": "export declare function linspace(start: number, end: number, count: number): number[];",
      "jsdocSummary": "`count` evenly spaced numbers from `start` to `end`, both included: `linspace(0, 1, 5)` → `[0, 0.25, 0.5, 0.75, 1]`. `count` 1 gives `[start]`, 0 gives `[]`. The first element is exactly `start` and the last exactly `end`; the span may exceed the float range (`linspace(-1e308, 1e308, 3)` works). Throws `InvalidArgumentError` unless `count` is a non-negative safe integer and `ResourceLimitError` past 10,000,000 elements."
    },
    {
      "subpath": "./number",
      "name": "range",
      "kind": "function",
      "signature": "export declare function range(end: number): number[]; ; export declare function range(start: number, end: number, step?: number): number[];",
      "jsdocSummary": "Numbers from `start` up to but excluding `end`, `step` apart (default 1): `range(5)` → `[0, 1, 2, 3, 4]`, `range(0, 1, 0.25)` → `[0, 0.25, 0.5, 0.75]`. A negative `step` counts down (`range(3, 0, -1)` → `[3, 2, 1]`). Each element is `start + i * step`, so fractional steps do not drift. A step pointing away from `end` gives `[]`. Throws `InvalidArgumentError` for a zero or non-finite step and `ResourceLimitError` past 10,000,000 elements."
    },
    {
      "subpath": "./number",
      "name": "remap",
      "kind": "function",
      "signature": "export declare function remap(x: number, inStart: number, inEnd: number, outStart: number, outEnd: number): number;",
      "jsdocSummary": "Maps `x` from one range onto another: `remap(5, 0, 10, 0, 100)` → `50`."
    },
    {
      "subpath": "./number",
      "name": "round",
      "kind": "function",
      "signature": "export declare function round(x: number, places?: number, mode?: RoundingMode): number;",
      "jsdocSummary": "Rounds the number you typed, not its binary approximation: `round(1.005, 2)` is `1.01` (plain `Math.round(1.005 * 100) / 100` gives `1`). Negative `places` round to tens, hundreds, ..."
    },
    {
      "subpath": "./number",
      "name": "roundTo",
      "kind": "function",
      "signature": "export declare function roundTo(x: number, step: number, mode?: RoundingMode): number;",
      "jsdocSummary": "Rounds to the nearest multiple of `step`, measured from zero: `roundTo(127.3, 5)` → `125`."
    },
    {
      "subpath": "./number",
      "name": "roundToSignificant",
      "kind": "function",
      "signature": "export declare function roundToSignificant(x: number, digits: number, mode?: RoundingMode): number;",
      "jsdocSummary": "Rounds to `digits` significant figures, on the number you typed: `roundToSignificant(123_456, 2)` is `120000`, `roundToSignificant(0.012_345, 3)` is `0.0123`. A number with fewer digits is returned as is (nothing is padded). Works for every finite double, from subnormals to `6.02214076e23` and beyond: the digits are those of the number's shortest decimal text, `String(x)`. Throws `NumericRangeError` only when rounding up past the largest double (`roundToSignificant(1.7976931348623157e308, 1)` would be `2e308`)."
    },
    {
      "subpath": "./number",
      "name": "significantDigits",
      "kind": "function",
      "signature": "export declare function significantDigits(value: string | Decimal): number;",
      "jsdocSummary": "Counts the significant figures in a written number by the textbook rules: leading zeros never count, zeros between digits always count, and trailing zeros count only when there is a decimal point. `'1200'` → 2, `'1200.'` → 4, `'0.00120'` → 3, `'1.20e3'` → 3. The exponent is ignored. Zero counts its written zeros after the point (`'0'` → 1, `'0.00'` → 2). Pass the text (or a `Decimal`, whose scale is its written precision): a JS number cannot tell `1.20` from `1.2`. Anything else throws `NumberFormatError`."
    },
    {
      "subpath": "./parse",
      "name": "localeNumberSymbols",
      "kind": "function",
      "signature": "export declare function localeNumberSymbols(locale: string): LocaleNumberSymbols;",
      "jsdocSummary": "The decimal, group and minus symbols and the digits a locale uses. Cached per locale."
    },
    {
      "subpath": "./parse",
      "name": "LocaleNumberSymbols",
      "kind": "type",
      "signature": "export type LocaleNumberSymbols = { decimal: string; group: string; minusSign: string; /** The ten digits `0` to `9` as this locale writes them. */ digits: string[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./parse",
      "name": "parseDecimal",
      "kind": "function",
      "signature": "export declare function parseDecimal(input: string, options?: ParseOptions): Decimal;",
      "jsdocSummary": "Like `parseNumber` (lenient, locale-aware) but exact: every digit survives in the returned `Decimal`."
    },
    {
      "subpath": "./parse",
      "name": "parseNumber",
      "kind": "function",
      "signature": "export declare function parseNumber(input: string, options?: ParseOptions): number;",
      "jsdocSummary": "Parses a locale-formatted number: `parseNumber('1.234,56', { locale: 'de-DE' })` → `1234.56`. Lenient and locale-aware; for strict ASCII input use `decimal()`."
    },
    {
      "subpath": "./parse",
      "name": "ParseOptions",
      "kind": "type",
      "signature": "export type ParseOptions = { /** BCP 47 locale tag. Default `'en-US'`. Ignored when `symbols` is given. */ locale?: string; /** * The separators to read, instead of asking `Intl` for the locale's: * `{ decimal: ',', group: '.' }`. Minus defaults to `'-'`, digits to ASCII. */ symbols?: ParseSymbols; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./parse",
      "name": "ParseSymbols",
      "kind": "type",
      "signature": "export type ParseSymbols = { decimal: string; group: string; minusSign?: string; /** The ten digits `0` to `9`. Default ASCII. */ digits?: readonly string[]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./polynomial",
      "name": "addPolynomials",
      "kind": "function",
      "signature": "export declare function addPolynomials(p: Coefficients, q: Coefficients): number[];",
      "jsdocSummary": "The sum `p + q`."
    },
    {
      "subpath": "./polynomial",
      "name": "Coefficients",
      "kind": "type",
      "signature": "export type Coefficients = readonly number[];",
      "jsdocSummary": "Coefficients, highest degree first."
    },
    {
      "subpath": "./polynomial",
      "name": "cubicRoots",
      "kind": "function",
      "signature": "export declare function cubicRoots(a: number, b: number, c: number, d: number): CubicRoots;",
      "jsdocSummary": "Roots of `ax³ + bx² + cx + d` (`a ≠ 0`)."
    },
    {
      "subpath": "./polynomial",
      "name": "CubicRoots",
      "kind": "type",
      "signature": "export type CubicRoots = { readonly kind: 'real'; readonly roots: readonly [number, number, number]; } | { readonly kind: 'mixed'; readonly real: number; readonly complex: readonly [Complex, Complex]; };",
      "jsdocSummary": "Three real roots in ascending order (repeated roots listed by multiplicity), or one real root plus a conjugate pair (positive imaginary part first)."
    },
    {
      "subpath": "./polynomial",
      "name": "evaluatePolynomial",
      "kind": "function",
      "signature": "export declare function evaluatePolynomial(coefficients: Coefficients, x: number): number; ; export declare function evaluatePolynomial(coefficients: Coefficients, x: Complex): Complex;",
      "jsdocSummary": "The value at `x` by Horner's rule (one multiply and one add per coefficient). A `Complex` point gives a `Complex` value."
    },
    {
      "subpath": "./polynomial",
      "name": "multiplyPolynomials",
      "kind": "function",
      "signature": "export declare function multiplyPolynomials(p: Coefficients, q: Coefficients): number[];",
      "jsdocSummary": "The product `p × q` (coefficient convolution)."
    },
    {
      "subpath": "./polynomial",
      "name": "polynomialDerivative",
      "kind": "function",
      "signature": "export declare function polynomialDerivative(coefficients: Coefficients): number[];",
      "jsdocSummary": "The derivative. A constant's derivative is `[0]`."
    },
    {
      "subpath": "./polynomial",
      "name": "polynomialRoots",
      "kind": "function",
      "signature": "export declare function polynomialRoots(coefficients: Coefficients): Complex[];",
      "jsdocSummary": "All roots of a polynomial of any degree, as `Complex` values listed by multiplicity and sorted by real part, then imaginary part."
    },
    {
      "subpath": "./polynomial",
      "name": "quadraticRoots",
      "kind": "function",
      "signature": "export declare function quadraticRoots(a: number, b: number, c: number): QuadraticRoots;",
      "jsdocSummary": "Roots of `ax² + bx + c` (`a ≠ 0`). Uses `q = -(b + sign(b)·√D) / 2`, then `q / a` and `c / q`, so neither root suffers cancellation — the small root of `x² - 1e8·x + 1` comes out to full precision. The discriminant is computed with exact products, so near-double roots stay accurate: for Kahan's `94906265.625x² - 189812534x + 94906268.375` it is the exact `7.5625` where the plain float formula gives `0` (a false double root)."
    },
    {
      "subpath": "./polynomial",
      "name": "QuadraticRoots",
      "kind": "type",
      "signature": "export type QuadraticRoots = { readonly kind: 'real'; readonly roots: readonly [number, number]; readonly discriminant: number; } | { readonly kind: 'complex'; readonly roots: readonly [Complex, Complex]; readonly discriminant: number; };",
      "jsdocSummary": "Two real roots in ascending order (a double root is listed twice), or a conjugate pair (positive imaginary part first). `discriminant` is `b² - 4ac`; its sign is what chose `kind` (`>= 0` real, `< 0` complex)."
    },
    {
      "subpath": "./random",
      "name": "createRandom",
      "kind": "function",
      "signature": "export declare function createRandom(seed?: number | string): Random;",
      "jsdocSummary": "Seeded → deterministic xoshiro128** stream (seed via splitmix32; string seeds hashed with cyrb53). Unseeded → crypto-backed when available, `Math.random` otherwise. Numeric seeds must be finite. The number `1` and the string `'1'` give the same stream."
    },
    {
      "subpath": "./random",
      "name": "pick",
      "kind": "variable",
      "signature": "export declare const pick: Random['pick'];",
      "jsdocSummary": "One element chosen uniformly by the default generator. Throws `EmptyDataError` on an empty array."
    },
    {
      "subpath": "./random",
      "name": "random",
      "kind": "variable",
      "signature": "export declare const random: Random;",
      "jsdocSummary": "The default, unseeded generator."
    },
    {
      "subpath": "./random",
      "name": "Random",
      "kind": "type",
      "signature": "export type Random = { /** Uniform float in [0, 1), 53 bits of randomness. */ next(this: void): number; /** Uniform integer in [min, max], both ends included. Safe integers only; unbiased (rejection sampling, never `Math.floor(next() * range)` bias). */ int(this: void, min: number, max: number): number; /** Uniform float in [min, max). Defaults to [0, 1). */ float(this: void, min?: number, max?: number): number; /** `true` with the given probability (default 0.5). */ bool(this: void, probability?: number): boolean; /** One element, uniformly. EmptyDataError on empty. */ pick<T>(this: void, items: readonly T[]): T; /** A shuffled copy (Fisher–Yates). Input is never mutated. */ shuffle<T>(this: void, items: readonly T[]): T[]; /** `count` distinct elements without replacement, in random order. InvalidArgumentError if count > length or negative. */ sample<T>(this: void, items: readonly T[], count: number): T[]; /** Normally distributed value (Box–Muller). */ gaussian(this: void, mean?: number, stddev?: number): number; };",
      "jsdocSummary": "A random-number source with helpers for the common draws."
    },
    {
      "subpath": "./random",
      "name": "randomBool",
      "kind": "variable",
      "signature": "export declare const randomBool: Random['bool'];",
      "jsdocSummary": "`true` with the given probability (default 0.5), from the default generator."
    },
    {
      "subpath": "./random",
      "name": "randomFloat",
      "kind": "variable",
      "signature": "export declare const randomFloat: Random['float'];",
      "jsdocSummary": "Uniform float in [min, max) (default [0, 1)) from the default generator."
    },
    {
      "subpath": "./random",
      "name": "randomInt",
      "kind": "variable",
      "signature": "export declare const randomInt: Random['int'];",
      "jsdocSummary": "Uniform integer in [min, max], both ends included, from the default generator."
    },
    {
      "subpath": "./random",
      "name": "sample",
      "kind": "variable",
      "signature": "export declare const sample: Random['sample'];",
      "jsdocSummary": "`count` distinct elements in random order, from the default generator."
    },
    {
      "subpath": "./random",
      "name": "shuffle",
      "kind": "variable",
      "signature": "export declare const shuffle: Random['shuffle'];",
      "jsdocSummary": "A shuffled copy of the input, from the default generator."
    },
    {
      "subpath": "./rational",
      "name": "IntegerInput",
      "kind": "type",
      "signature": "export type IntegerInput = string | number | bigint;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./rational",
      "name": "isRational",
      "kind": "function",
      "signature": "export declare function isRational(value: unknown): value is Rational;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./rational",
      "name": "MixedNumber",
      "kind": "type",
      "signature": "export type MixedNumber = { whole: bigint; fraction: Rational; };",
      "jsdocSummary": "A mixed number: `7/2` is `{ whole: 3n, fraction: 1/2 }`. The fraction carries the sign of the value."
    },
    {
      "subpath": "./rational",
      "name": "ratio",
      "kind": "function",
      "signature": "export declare function ratio(value: RationalInput): Rational; ; export declare function ratio(numerator: IntegerInput, denominator: IntegerInput): Rational;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./rational",
      "name": "Rational",
      "kind": "class",
      "signature": "export declare class Rational { readonly numerator: bigint; readonly denominator: bigint; private constructor(); /** Normalizes sign and reduces by the GCD. */ static fromParts(numerator: bigint, denominator: bigint): Rational; static from(value: RationalInput): Rational; /** Knuth's addition: reduce through the denominators' GCD instead of the full product. */ plus(other: RationalInput): Rational; minus(other: RationalInput): Rational; /** Cross-cancels before multiplying, so the products never carry common factors. */ times(other: RationalInput): Rational; /** Cross-cancels like `times`, so the result is reduced before its size is checked. */ dividedBy(other: RationalInput): Rational; /** Integer exponent; negative exponents invert. */ pow(exponent: number): Rational; /** The reciprocal: `2/3` → `3/2`. */ inverse(): Rational; abs(): Rational; negated(): Rational; /** * The closest fraction whose denominator is at most `maxDenominator` * (continued-fraction search, like Python's `limit_denominator`): * `ratio('3.14159').approximate(1000)` → `355/113`. */ approximate(maxDenominator: IntegerInput): Rational; compareTo(other: RationalInput): -1 | 0 | 1; eq(other: RationalInput): boolean; lt(other: RationalInput): boolean; lte(other: RationalInput): boolean; gt(other: RationalInput): boolean; gte(other: RationalInput): boolean; isZero(): boolean; isPositive(): boolean; isNegative(): boolean; isInteger(): boolean; sign(): -1 | 0 | 1; /** Exact when the fraction terminates; otherwise needs `{ scale, rounding }` or it throws. */ toDecimal(options?: ScaleOptions): Decimal; /** `7/2` → `{ whole: 3n, fraction: 1/2 }`; `-7/2` → `{ whole: -3n, fraction: -1/2 }`. */ toMixed(): MixedNumber; /** * The nearest double, ties to even, by rounding in binary (never through a * decimal string, which could round twice). Throws on overflow, or when a * non-zero value would underflow to zero. */ toNumber(): number; /** Requires an integral value. */ toBigInt(): bigint; /** `'1/3'`, `'-7/2'`, or just `'4'` for integers. */ toString(): string; toJSON(): string; /** Throws. A `Rational` never silently becomes a float. */ valueOf(): never; [Symbol.toPrimitive](hint: 'string' | 'number' | 'default'): string; readonly [Symbol.toStringTag] = \"Rational\"; }",
      "jsdocSummary": "An exact fraction of two bigints, always reduced, denominator always positive, zero always `0/1`. Where `Decimal` must throw (`1 ÷ 3`), a `Rational` just keeps going."
    },
    {
      "subpath": "./rational",
      "name": "RationalInput",
      "kind": "type",
      "signature": "export type RationalInput = Rational | DecimalInput;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./rational",
      "name": "RoundingMode",
      "kind": "type",
      "signature": "export type RoundingMode = (typeof ROUNDING_MODES)[number];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./rational",
      "name": "ScaleOptions",
      "kind": "type",
      "signature": "export type ScaleOptions = { /** Number of fraction digits in the result. */ scale: number; /** How to drop digits that do not fit. Defaults to `'unnecessary'`, which throws instead. */ rounding?: RoundingMode; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./roots",
      "name": "bisect",
      "kind": "function",
      "signature": "export declare function bisect(f: RealFunction, bracket: readonly [number, number], options?: RootOptions): RootResult;",
      "jsdocSummary": "The root of a continuous `f` inside `bracket`, by bisection. Each step halves the bracket, so reaching a tolerance `t` from width `w` takes `ceil(log2(w / t))` steps; `errorEstimate` bounds the distance to a sign change."
    },
    {
      "subpath": "./roots",
      "name": "findRoot",
      "kind": "function",
      "signature": "export declare function findRoot(f: RealFunction, bracket: readonly [number, number], options?: RootOptions): RootResult;",
      "jsdocSummary": "The root of a continuous `f` inside `bracket`, by Brent's method. `f(a)` and `f(b)` must have opposite signs (or one of them be 0). `errorEstimate` is the width of the final bracket, so `root` is within it of a sign change."
    },
    {
      "subpath": "./roots",
      "name": "findRoots",
      "kind": "function",
      "signature": "export declare function findRoots(f: RealFunction, interval: readonly [number, number], options?: FindRootsOptions): RootResult[];",
      "jsdocSummary": "Every root that a sign-change scan of `interval` can see, ascending. `f` is evaluated on `samples + 1` evenly spaced points (default `samples` 100); grid points where `f` is exactly 0 are reported as they are, and each sub-interval whose ends differ in sign is refined by Brent's method. A grid point where `f` has no finite value (it returns `NaN` or `±Infinity`, or throws a `MathError`, as `sqrt(x)` does for `x < 0`) is a gap: no sub-interval that touches it is refined, and the scan goes on. The `iterations`/`evaluations` of each result count only its refinement; the scan itself costs `samples + 1` evaluations."
    },
    {
      "subpath": "./roots",
      "name": "FindRootsOptions",
      "kind": "type",
      "signature": "export type FindRootsOptions = RootOptions & { /** Number of equal sub-intervals scanned for a sign change (default 100). */ readonly samples?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./roots",
      "name": "newton",
      "kind": "function",
      "signature": "export declare function newton(f: RealFunction, df: RealFunction, x0: number, options?: NewtonOptions): RootResult;",
      "jsdocSummary": "A root of `f` near `x0` by Newton's method, given the derivative `df`. Unbracketed steps are damped (halved until `|f|` decreases); with `{ bracket }` the method falls back to bisection whenever Newton would leave the bracket or stall, and `errorEstimate` is at most the bracket width."
    },
    {
      "subpath": "./roots",
      "name": "NewtonOptions",
      "kind": "type",
      "signature": "export type NewtonOptions = RootOptions & { /** A sign-change bracket containing `x0`; turns on the bisection fallback of `rtsafe`. */ readonly bracket?: readonly [number, number]; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./roots",
      "name": "RealFunction",
      "kind": "type",
      "signature": "export type RealFunction = (x: number) => number;",
      "jsdocSummary": "A real function of one real variable, evaluated on float64."
    },
    {
      "subpath": "./roots",
      "name": "RootConvergenceError",
      "kind": "class",
      "signature": "export declare class RootConvergenceError extends ConvergenceError { /** The last iterate and its error estimate (`Infinity` when there is none). */ readonly best: RootResult; constructor(message: string, best: RootResult); }",
      "jsdocSummary": "A root-finding method stopped before its tolerance; `best` is where it stopped."
    },
    {
      "subpath": "./roots",
      "name": "RootOptions",
      "kind": "type",
      "signature": "export type RootOptions = { /** Absolute part of the stopping tolerance (default `2e-12`). */ readonly absoluteTolerance?: number; /** Relative part of the stopping tolerance, times `|root|` (default `4 · Number.EPSILON`). */ readonly relativeTolerance?: number; /** Most steps before `RootConvergenceError` (default 200). */ readonly maxIterations?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./roots",
      "name": "RootResult",
      "kind": "type",
      "signature": "export type RootResult = { readonly root: number; /** Bracket width for `findRoot`/`bisect` (a bound); last step length for unbracketed `newton` (an estimate). */ readonly errorEstimate: number; readonly iterations: number; /** Calls of `f` (plus `df` for Newton), including the bracket ends. */ readonly evaluations: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./rounding",
      "name": "isRoundingMode",
      "kind": "function",
      "signature": "export declare function isRoundingMode(value: unknown): value is RoundingMode;",
      "jsdocSummary": ""
    },
    {
      "subpath": "./rounding",
      "name": "ROUNDING_MODES",
      "kind": "variable",
      "signature": "export declare const ROUNDING_MODES: readonly ['up', 'down', 'ceiling', 'floor', 'halfUp', 'halfDown', 'halfEven', 'unnecessary'];",
      "jsdocSummary": "One rounding vocabulary for the whole package. The names follow Java's `RoundingMode` and brick/math, which most developers already know."
    },
    {
      "subpath": "./rounding",
      "name": "RoundingMode",
      "kind": "type",
      "signature": "export type RoundingMode = (typeof ROUNDING_MODES)[number];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "confidenceInterval",
      "kind": "function",
      "signature": "export declare function confidenceInterval(values: Iterable<number>, options?: ConfidenceIntervalOptions): ConfidenceInterval;",
      "jsdocSummary": "Confidence interval for the mean of `values`, from the exact critical value of the normal (`'z'`) or Student t with `n - 1` degrees of freedom (`'t'`, the default). The spread is the sample standard deviation (`ddof` 1) unless you pass `ddof: 0`. Needs at least 2 values."
    },
    {
      "subpath": "./stats",
      "name": "ConfidenceInterval",
      "kind": "type",
      "signature": "export type ConfidenceInterval = { mean: number; lower: number; upper: number; marginOfError: number; level: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "ConfidenceIntervalOptions",
      "kind": "type",
      "signature": "export type ConfidenceIntervalOptions = VarianceOptions & { /** Confidence level in (0, 1). Default 0.95. */ level?: number; /** Default `'t'` with `n - 1` degrees of freedom. */ method?: IntervalMethod; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "correlation",
      "kind": "function",
      "signature": "export declare function correlation(x: Iterable<number>, y: Iterable<number>): number;",
      "jsdocSummary": "Pearson correlation coefficient `r` in `[-1, 1]`. Throws `InvalidArgumentError` for different lengths, fewer than 2 points, or when either side is constant (r is undefined)."
    },
    {
      "subpath": "./stats",
      "name": "ExponentialFit",
      "kind": "type",
      "signature": "export type ExponentialFit = Fit & { readonly a: number; readonly b: number; };",
      "jsdocSummary": "`y = a * e^(b * x)`."
    },
    {
      "subpath": "./stats",
      "name": "exponentialRegression",
      "kind": "function",
      "signature": "export declare function exponentialRegression(x: Iterable<number>, y: Iterable<number>): ExponentialFit;",
      "jsdocSummary": "Exponential fit `y = a * e^(b * x)`, by least squares on `ln y` against x (so large y weigh less than in a direct fit). `r2` is measured on the original y. Throws `InvalidArgumentError` unless every y is positive, plus `linearRegression`'s conditions."
    },
    {
      "subpath": "./stats",
      "name": "IntervalMethod",
      "kind": "type",
      "signature": "export type IntervalMethod = 'z' | 't';",
      "jsdocSummary": "Confidence-interval method: `'z'` (normal critical value) or `'t'` (Student's t, for estimated spread)."
    },
    {
      "subpath": "./stats",
      "name": "LinearFit",
      "kind": "type",
      "signature": "export type LinearFit = Fit & FitDiagnostics & { readonly slope: number; readonly intercept: number; /** Standard error of the slope: `residualStandardError / sqrt(sum((x - mean x)^2))`. */ readonly slopeStandardError: number | undefined; /** Standard error of the intercept: `residualStandardError * sqrt(1/n + mean(x)^2 / sum((x - mean x)^2))`. */ readonly interceptStandardError: number | undefined; };",
      "jsdocSummary": "`y = intercept + slope * x`, with the usual least-squares diagnostics. They use n - 2 residual degrees of freedom (n - k - 1 with k = 1 predictor) and are `undefined` for exactly two points, where no residual freedom is left."
    },
    {
      "subpath": "./stats",
      "name": "linearRegression",
      "kind": "function",
      "signature": "export declare function linearRegression(x: Iterable<number>, y: Iterable<number>): LinearFit;",
      "jsdocSummary": "Ordinary least-squares line `y = slope * x + intercept`. Throws `InvalidArgumentError` for different lengths, fewer than 2 points, or when x is constant (the slope is undefined)."
    },
    {
      "subpath": "./stats",
      "name": "LogarithmicFit",
      "kind": "type",
      "signature": "export type LogarithmicFit = Fit & { readonly a: number; readonly b: number; };",
      "jsdocSummary": "`y = a + b * ln(x)`."
    },
    {
      "subpath": "./stats",
      "name": "logarithmicRegression",
      "kind": "function",
      "signature": "export declare function logarithmicRegression(x: Iterable<number>, y: Iterable<number>): LogarithmicFit;",
      "jsdocSummary": "Logarithmic fit `y = a + b * ln(x)`, by least squares on `ln x`. `r2` is measured on the original y. Throws `InvalidArgumentError` unless every x is positive; `predict` does too."
    },
    {
      "subpath": "./stats",
      "name": "marginOfError",
      "kind": "function",
      "signature": "export declare function marginOfError({ stddev: spread, n, level, method }: MarginOfErrorInput): number;",
      "jsdocSummary": "Half-width of a confidence interval for a mean: critical value times the standard error. `method` is `'t'` by default (needs `n >= 2`), `level` 0.95."
    },
    {
      "subpath": "./stats",
      "name": "MarginOfErrorInput",
      "kind": "type",
      "signature": "export type MarginOfErrorInput = { /** Standard deviation of the data (sample, unless you know the population value). */ stddev: number; /** Number of observations. */ n: number; level?: number; method?: IntervalMethod; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "mean",
      "kind": "function",
      "signature": "export declare function mean(values: Iterable<number>): number; ; export declare function mean(values: Iterable<Decimal>, options?: ScaleOptions): Decimal;",
      "jsdocSummary": "Arithmetic mean (compensated sum divided by the count). Throws `EmptyDataError` when empty. Exact mean of `Decimal` values: the exact sum divided by the count. Like `Decimal.dividedBy`, it throws `RoundingNecessaryError` when the result does not terminate (`[1, 1, 2]`) unless you pass `{ scale, rounding }`."
    },
    {
      "subpath": "./stats",
      "name": "MeanSampleSizeInput",
      "kind": "type",
      "signature": "export type MeanSampleSizeInput = { marginOfError: number; stddev: number; level?: number; proportion?: never; };",
      "jsdocSummary": "Sample size for estimating a mean to within `marginOfError`, given the spread `stddev`."
    },
    {
      "subpath": "./stats",
      "name": "median",
      "kind": "function",
      "signature": "export declare function median(values: Iterable<number>): number; ; export declare function median(values: Iterable<Decimal>): Decimal;",
      "jsdocSummary": "Middle value; for an even count, the average of the two middle values. Throws `EmptyDataError` when empty. Exact median of `Decimal` values; the midpoint of two middles, `(a + b) / 2`, is always exact in decimal."
    },
    {
      "subpath": "./stats",
      "name": "minMax",
      "kind": "function",
      "signature": "export declare function minMax(values: Iterable<number>): MinMax; ; export declare function minMax(values: Iterable<Decimal>): { min: Decimal; max: Decimal; };",
      "jsdocSummary": "Smallest and largest value in a single pass. Throws `EmptyDataError` when empty. Smallest and largest `Decimal` in a single pass. Throws `EmptyDataError` when empty."
    },
    {
      "subpath": "./stats",
      "name": "MinMax",
      "kind": "type",
      "signature": "export type MinMax = { min: number; max: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "mode",
      "kind": "function",
      "signature": "export declare function mode(values: Iterable<number>): number[];",
      "jsdocSummary": "Every most-frequent value, ascending. Ties return all tied values; an empty input gives `[]`."
    },
    {
      "subpath": "./stats",
      "name": "percentile",
      "kind": "function",
      "signature": "export declare function percentile(values: Iterable<number>, p: number, options?: QuantileOptions): number;",
      "jsdocSummary": "The `p`-th percentile, `p` in `[0, 100]`. By default linear interpolation between closest ranks (R-7: Excel `PERCENTILE.INC`, NumPy default); pass `{ method }` for any other Hyndman–Fan definition (see `QUANTILE_METHODS`). Equal to `quantile(values, p / 100, options)`. Throws `EmptyDataError` when empty and `InvalidArgumentError` when `p` is out of range."
    },
    {
      "subpath": "./stats",
      "name": "percentileRank",
      "kind": "function",
      "signature": "export declare function percentileRank(values: Iterable<number>, score: number, options?: PercentileRankOptions): number;",
      "jsdocSummary": "Where `score` falls in `values`, as a percentage in `[0, 100]` — the inverse of `percentile`. `kind` says how values equal to the score count (see `PercentileRankKind`); the default `'mean'` counts half of them, so the median of distinct values ranks 50. `score` need not be one of the values. Matches SciPy's `percentileofscore(values, score, kind)`. Throws `EmptyDataError` when empty."
    },
    {
      "subpath": "./stats",
      "name": "PercentileRankKind",
      "kind": "type",
      "signature": "export type PercentileRankKind = 'strict' | 'weak' | 'mean' | 'rank';",
      "jsdocSummary": "How `percentileRank` counts values equal to the score (the `kind` of SciPy's `percentileofscore`); with B values below and E equal, out of N: - `'strict'`: B / N, the share strictly below. - `'weak'`: (B + E) / N, the share at or below (the empirical CDF). - `'mean'` (default): (B + E / 2) / N, the textbook percentile rank: half of the ties count as below. - `'rank'`: SciPy's default, the average of the ranks the ties would take: (B + (E + 1) / 2) / N when E > 0, else B / N."
    },
    {
      "subpath": "./stats",
      "name": "PercentileRankOptions",
      "kind": "type",
      "signature": "export type PercentileRankOptions = { kind?: PercentileRankKind; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "PolynomialFit",
      "kind": "type",
      "signature": "export type PolynomialFit = Fit & FitDiagnostics & { readonly coefficients: readonly number[]; };",
      "jsdocSummary": "`y = c[0] + c[1] * x + c[2] * x^2 + ...`, lowest degree first. Diagnostics use k = degree predictors, so n - degree - 1 residual degrees of freedom."
    },
    {
      "subpath": "./stats",
      "name": "polynomialRegression",
      "kind": "function",
      "signature": "export declare function polynomialRegression(x: Iterable<number>, y: Iterable<number>, degree: number): PolynomialFit;",
      "jsdocSummary": "Least-squares polynomial of the given `degree`, by Householder QR with column pivoting on the Vandermonde matrix (never the normal equations, which square its condition number; NumPy's `polyfit` uses an SVD to the same end). Coefficients are lowest degree first (`[c0, c1, ...]`); `r2` is measured on the original y."
    },
    {
      "subpath": "./stats",
      "name": "pooledStddev",
      "kind": "function",
      "signature": "export declare function pooledStddev(samples: Iterable<Iterable<number> | SampleSummary>, options?: VarianceOptions): number;",
      "jsdocSummary": "Square root of `pooledVariance`, with the same groups and `ddof` convention (sample by default)."
    },
    {
      "subpath": "./stats",
      "name": "pooledVariance",
      "kind": "function",
      "signature": "export declare function pooledVariance(samples: Iterable<Iterable<number> | SampleSummary>, options?: VarianceOptions): number;",
      "jsdocSummary": "Pooled variance of two or more groups that share one spread: the within-group sums of squared deviations, added, over the pooled degrees of freedom, `sum(SS_i) / (N - g * ddof)` for g groups of N values in all. The default `ddof: 1` is the textbook pooled sample variance `sum((n_i - 1) * s_i^2) / sum(n_i - 1)` (the two-sample t-test's s_p^2, ANOVA's mean square within); `ddof: 0` divides by N. A group of one value adds no spread and, with `ddof: 1`, no degrees of freedom."
    },
    {
      "subpath": "./stats",
      "name": "PowerFit",
      "kind": "type",
      "signature": "export type PowerFit = Fit & { readonly a: number; readonly b: number; };",
      "jsdocSummary": "`y = a * x^b`."
    },
    {
      "subpath": "./stats",
      "name": "powerRegression",
      "kind": "function",
      "signature": "export declare function powerRegression(x: Iterable<number>, y: Iterable<number>): PowerFit;",
      "jsdocSummary": "Power fit `y = a * x^b`, by least squares on `ln y` against `ln x`. `r2` is measured on the original y. Throws `InvalidArgumentError` unless every x and y is positive; `predict` needs a positive x."
    },
    {
      "subpath": "./stats",
      "name": "ProportionSampleSizeInput",
      "kind": "type",
      "signature": "export type ProportionSampleSizeInput = { marginOfError: number; proportion?: number; level?: number; stddev?: never; };",
      "jsdocSummary": "Sample size for estimating a proportion; `proportion` defaults to 0.5, the worst case."
    },
    {
      "subpath": "./stats",
      "name": "quantile",
      "kind": "function",
      "signature": "export declare function quantile(values: Iterable<number>, q: number, options?: QuantileOptions): number;",
      "jsdocSummary": "The `q`-th quantile, `q` in `[0, 1]`, with the same methods as `percentile` (default R-7): `quantile(values, 0.9)` equals `percentile(values, 90)`. Throws `EmptyDataError` when empty and `InvalidArgumentError` when `q` is out of range."
    },
    {
      "subpath": "./stats",
      "name": "QUANTILE_METHODS",
      "kind": "variable",
      "signature": "export declare const QUANTILE_METHODS: readonly ['inverseCdf', 'averagedInverseCdf', 'closestObservation', 'interpolatedInverseCdf', 'hazen', 'weibull', 'linear', 'medianUnbiased', 'normalUnbiased'];",
      "jsdocSummary": "Hyndman & Fan's nine sample-quantile definitions (Amer. Statistician 50(4), 1996), by NumPy's names; R's `quantile(x, type = k)` is the R-k column."
    },
    {
      "subpath": "./stats",
      "name": "QuantileMethod",
      "kind": "type",
      "signature": "export type QuantileMethod = (typeof QUANTILE_METHODS)[number];",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "QuantileOptions",
      "kind": "type",
      "signature": "export type QuantileOptions = { /** Sample-quantile definition; default `'linear'` (R-7). */ method?: QuantileMethod; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "QuartileMethod",
      "kind": "type",
      "signature": "export type QuartileMethod = QuantileMethod | 'tukey' | 'medianExcluded';",
      "jsdocSummary": "A quantile method, or one of the two \"median of each half\" rules. They differ only for an odd count, in where the middle value goes: - `'tukey'`: Tukey's hinges; the median belongs to BOTH halves (R `fivenum`, `boxplot.stats`; Wikipedia's \"Method 2\"). - `'medianExcluded'`: the median belongs to NEITHER half (TI-83/TI-84 `1-Var Stats`, Moore & McCabe; Wikipedia's \"Method 1\")."
    },
    {
      "subpath": "./stats",
      "name": "QuartileOptions",
      "kind": "type",
      "signature": "export type QuartileOptions = { /** Default `'linear'` (R-7), like `quantile`. */ method?: QuartileMethod; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "quartiles",
      "kind": "function",
      "signature": "export declare function quartiles(values: Iterable<number>, options?: QuartileOptions): Quartiles;",
      "jsdocSummary": "The three quartiles in one sort. `method` is any `quantile` method (default `'linear'`, R-7), or a \"median of each half\" rule (see `QuartileMethod`): `'tukey'` (the box-plot hinges of R's `fivenum`, the middle value in both halves when the count is odd) or `'medianExcluded'` (the TI-83 rule, the middle value in neither half). A single value is all three quartiles. Throws `EmptyDataError` when empty."
    },
    {
      "subpath": "./stats",
      "name": "Quartiles",
      "kind": "type",
      "signature": "export type Quartiles = { /** First quartile (or lower hinge). */ q1: number; /** The median. */ q2: number; /** Third quartile (or upper hinge). */ q3: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "sampleSize",
      "kind": "function",
      "signature": "export declare function sampleSize(input: MeanSampleSizeInput | ProportionSampleSizeInput): number;",
      "jsdocSummary": "Smallest sample size, rounded up, that keeps the margin of error at or below `marginOfError` with the given `level` (default 0.95), using the normal critical value `z`. For a mean pass `stddev`: `n = (z * stddev / E)^2`. For a proportion pass `proportion` (default 0.5, the worst case): `n = z^2 * p * (1 - p) / E^2`."
    },
    {
      "subpath": "./stats",
      "name": "SampleSummary",
      "kind": "type",
      "signature": "export type SampleSummary = { n: number; stddev: number; variance?: never; } | { n: number; variance: number; stddev?: never; };",
      "jsdocSummary": "A group known only by its size and SAMPLE spread (ddof 1): `{ n, stddev }` or `{ n, variance }`. Accepted by `pooledVariance` and `pooledStddev`."
    },
    {
      "subpath": "./stats",
      "name": "standardError",
      "kind": "function",
      "signature": "export declare function standardError(values: Iterable<number> | { stddev: number; n: number; }, options?: VarianceOptions): number;",
      "jsdocSummary": "Standard error of the mean, `stddev / sqrt(n)`. Pass the data (its `stddev` uses `ddof`, sample by default) or a known `{ stddev, n }`. Throws `EmptyDataError` when the data has too few values."
    },
    {
      "subpath": "./stats",
      "name": "stddev",
      "kind": "function",
      "signature": "export declare function stddev(values: Iterable<number>, options?: VarianceOptions): number; ; export declare function stddev(values: Iterable<Decimal>, options: VarianceOptions & ScaleOptions): Decimal;",
      "jsdocSummary": "Square root of `variance`, with the same `ddof` convention (sample by default). Square root of the exact variance, correctly rounded at the requested scale (default rounding `'halfEven'`). A square root rarely terminates, so `{ scale }` is required. The variance is kept as an exact fraction and the root is rounded once, so tiny variances and near-ties round correctly."
    },
    {
      "subpath": "./stats",
      "name": "sum",
      "kind": "function",
      "signature": "export declare function sum(values: Iterable<number>): number;",
      "jsdocSummary": "Total of the values using Neumaier compensated summation. An empty input gives `0`. Numbers only: for an exact total of `Decimal` values use `Decimal.sum`, which returns a `Decimal` zero for an empty input."
    },
    {
      "subpath": "./stats",
      "name": "variance",
      "kind": "function",
      "signature": "export declare function variance(values: Iterable<number>, options?: VarianceOptions): number; ; export declare function variance(values: Iterable<Decimal>, options?: VarianceOptions & Partial<ScaleOptions>): Decimal;",
      "jsdocSummary": "Variance by the corrected two-pass algorithm. Sample (`ddof: 1`, divide by n - 1) by default; `ddof: 0` gives the population variance (divide by n). Throws `EmptyDataError` unless there are more than `ddof` values. Exact variance of `Decimal` values, computed as `(n * sum(x^2) - sum(x)^2) / (n * (n - ddof))` with a single division, so nothing is rounded before the end. Like `Decimal.dividedBy`, it throws `RoundingNecessaryError` when the result does not terminate unless you pass `{ scale, rounding }`."
    },
    {
      "subpath": "./stats",
      "name": "VarianceOptions",
      "kind": "type",
      "signature": "export type VarianceOptions = { /** Delta degrees of freedom: 1 = sample (default), 0 = population. */ ddof?: 0 | 1; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./stats",
      "name": "zScore",
      "kind": "function",
      "signature": "export declare function zScore(value: number, mean: number, stddev: number): number;",
      "jsdocSummary": "How many standard deviations `value` lies from `mean`: `(value - mean) / stddev`. Throws `InvalidArgumentError` unless `stddev` is positive."
    },
    {
      "subpath": "./units",
      "name": "AngleUnit",
      "kind": "type",
      "signature": "export type AngleUnit = 'deg' | 'rad' | 'grad' | 'turn' | 'arcmin' | 'arcsec';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "AreaUnit",
      "kind": "type",
      "signature": "export type AreaUnit = 'mm2' | 'cm2' | 'm2' | 'ha' | 'km2' | 'in2' | 'ft2' | 'yd2' | 'ac' | 'mi2';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "convert",
      "kind": "function",
      "signature": "export declare function convert(value: number, from: Unit, to: Unit): number;",
      "jsdocSummary": "Converts `value` between two units of the same category, in doubles. `convert(1, 'in', 'cm')` is exactly `2.54`; `convert(100, 'C', 'F')` is `212`. Throws `InvalidArgumentError` for unknown units or units of different categories, and for `0` to or from `l/100km` (zero fuel use or zero distance per litre is infinite)."
    },
    {
      "subpath": "./units",
      "name": "convertExact",
      "kind": "function",
      "signature": "export declare function convertExact(value: RationalInput, from: Unit, to: Unit): Rational;",
      "jsdocSummary": "Converts exactly, returning a `Rational`. Linear categories multiply by an exact ratio; temperature applies its exact affine formulas (`°F = °C × 9/5 + 32`, `K = °C + 273.15`); `l/100km` takes the exact reciprocal (`mpg` → `l/100km` is `100 / km-per-litre`)."
    },
    {
      "subpath": "./units",
      "name": "DataRateUnit",
      "kind": "type",
      "signature": "export type DataRateUnit = 'bit/s' | 'kbit/s' | 'Mbit/s' | 'Gbit/s' | 'B/s' | 'kB/s' | 'MB/s' | 'GB/s' | 'MiB/s';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "DataUnit",
      "kind": "type",
      "signature": "export type DataUnit = 'B' | 'kB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'KiB' | 'MiB' | 'GiB' | 'TiB' | 'PiB' | 'EiB' | 'bit' | 'kbit' | 'Mbit' | 'Gbit' | 'Kibit' | 'Mibit' | 'Gibit';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "DynamicViscosityUnit",
      "kind": "type",
      "signature": "export type DynamicViscosityUnit = 'Pa*s' | 'mPa*s' | 'P' | 'cP';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "ElectricCurrentUnit",
      "kind": "type",
      "signature": "export type ElectricCurrentUnit = 'µA' | 'mA' | 'A' | 'kA';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "EnergyUnit",
      "kind": "type",
      "signature": "export type EnergyUnit = 'J' | 'kJ' | 'cal' | 'kcal' | 'Wh' | 'kWh' | 'MJ' | 'GJ' | 'BTU' | 'eV' | 'ft*lbf';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "ForceUnit",
      "kind": "type",
      "signature": "export type ForceUnit = 'N' | 'kN' | 'lbf' | 'kgf' | 'dyn';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "formatUnit",
      "kind": "function",
      "signature": "export declare function formatUnit(value: number, unit: Unit, options?: FormatUnitOptions): string;",
      "jsdocSummary": "Formats `value` with its unit through `Intl.NumberFormat`: `formatUnit(5, 'km')` is `'5 km'`, and with `{ display: 'long' }` it is `'5 kilometers'`. Units Intl has no name for (`nmi`, `psi`, `rad`, `K`, ...) print as the number, a space and the symbol; `display` does not apply to them. Power, frequency, force, torque, fuel economy and data rates all take this path (`Intl` names none of them), with `hp_metric` shown as `PS` and `N*m` as `N·m`."
    },
    {
      "subpath": "./units",
      "name": "FormatUnitOptions",
      "kind": "type",
      "signature": "export type FormatUnitOptions = { /** BCP 47 locale; defaults to the runtime's. */ locale?: string; /** `'short'` (default) → `5 km`, `'long'` → `5 kilometers`, `'narrow'` → `5km`. */ display?: 'short' | 'long' | 'narrow'; maximumFractionDigits?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "FrequencyUnit",
      "kind": "type",
      "signature": "export type FrequencyUnit = 'Hz' | 'kHz' | 'MHz' | 'GHz' | 'rpm';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "FuelEconomyUnit",
      "kind": "type",
      "signature": "export type FuelEconomyUnit = 'km/l' | 'l/100km' | 'mpg' | 'mpg_imp';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "IlluminanceUnit",
      "kind": "type",
      "signature": "export type IlluminanceUnit = 'lx' | 'fc';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "isUnit",
      "kind": "function",
      "signature": "export declare function isUnit(value: string): value is Unit;",
      "jsdocSummary": "True when `value` is one of the supported unit symbols (case sensitive)."
    },
    {
      "subpath": "./units",
      "name": "joinUnits",
      "kind": "function",
      "signature": "export declare function joinUnits(parts: readonly UnitPart[], to: Unit): number;",
      "jsdocSummary": "Adds composite parts back into one number in `to`: `joinUnits([{ unit: 'ft', value: 5 }, { unit: 'in', value: 7 }], 'in')` is `67`. Parts may come in any order and may be fractional. It reads parts the way `splitUnits` writes them: the sign of the first non-zero part applies to the whole value, so `-5 ft 7 in` is minus (5 ft + 7 in), `-67 in`. Later parts must not be negative (`InvalidArgumentError`); that would be ambiguous. The sum is exact, rounded to a double once at the end."
    },
    {
      "subpath": "./units",
      "name": "KinematicViscosityUnit",
      "kind": "type",
      "signature": "export type KinematicViscosityUnit = 'm2/s' | 'cSt' | 'St';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "LengthUnit",
      "kind": "type",
      "signature": "export type LengthUnit = 'nm' | 'µm' | 'mm' | 'cm' | 'dm' | 'm' | 'km' | 'in' | 'ft' | 'yd' | 'fathom' | 'mi' | 'nmi' | 'au' | 'ly' | 'pc';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "MassUnit",
      "kind": "type",
      "signature": "export type MassUnit = 'mg' | 'ct' | 'g' | 'kg' | 't' | 'oz' | 'lb' | 'st' | 'ton_us' | 'ton_uk';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "PowerUnit",
      "kind": "type",
      "signature": "export type PowerUnit = 'W' | 'kW' | 'MW' | 'hp' | 'hp_metric' | 'BTU/h' | 'kcal/h';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "PressureUnit",
      "kind": "type",
      "signature": "export type PressureUnit = 'Pa' | 'kPa' | 'MPa' | 'bar' | 'atm' | 'psi' | 'mmHg' | 'Torr';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "RadioactivityUnit",
      "kind": "type",
      "signature": "export type RadioactivityUnit = 'Bq' | 'kBq' | 'MBq' | 'µCi' | 'mCi' | 'Ci';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "SolidAngleUnit",
      "kind": "type",
      "signature": "export type SolidAngleUnit = 'sr' | 'deg2';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "SpeedUnit",
      "kind": "type",
      "signature": "export type SpeedUnit = 'm/s' | 'km/h' | 'mph' | 'kn' | 'ft/s';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "splitUnits",
      "kind": "function",
      "signature": "export declare function splitUnits(value: RationalInput, from: Unit, units: readonly Unit[], options?: SplitUnitsOptions): UnitPart[];",
      "jsdocSummary": "Splits a value into whole parts of larger units plus a remainder, for display like \"5 ft 7 in\", \"1 h 30 min\" or \"3 lb 4 oz\". `units` go largest first and share one category: `splitUnits(67, 'in', ['ft', 'in'])` is `[{ unit: 'ft', value: 5 }, { unit: 'in', value: 7 }]`."
    },
    {
      "subpath": "./units",
      "name": "SplitUnitsOptions",
      "kind": "type",
      "signature": "export type SplitUnitsOptions = { /** * Fraction digits kept on the last part. Leave it out to keep the exact remainder * (as a double). The value is rounded once, in the last unit, before it is split, * so a rounded-up remainder carries into the larger parts: 5 ft 11.6 in at * `scale: 0` is 6 ft 0 in, never 5 ft 12 in. */ scale?: number; /** How to round to `scale`. Defaults to `'halfUp'`. Ignored without `scale`. */ rounding?: RoundingMode; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "TemperatureUnit",
      "kind": "type",
      "signature": "export type TemperatureUnit = 'C' | 'F' | 'K';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "TimeUnit",
      "kind": "type",
      "signature": "export type TimeUnit = 'ms' | 's' | 'min' | 'h' | 'd' | 'wk' | 'month' | 'year';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "TorqueUnit",
      "kind": "type",
      "signature": "export type TorqueUnit = 'N*m' | 'lbf*ft' | 'kgf*m';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "Unit",
      "kind": "type",
      "signature": "export type Unit = LengthUnit | MassUnit | AreaUnit | VolumeUnit | TemperatureUnit | TimeUnit | SpeedUnit | DataUnit | EnergyUnit | PressureUnit | AngleUnit | SolidAngleUnit | PowerUnit | FrequencyUnit | ForceUnit | TorqueUnit | FuelEconomyUnit | DataRateUnit | ElectricCurrentUnit | IlluminanceUnit | RadioactivityUnit | DynamicViscosityUnit | KinematicViscosityUnit;",
      "jsdocSummary": "Every supported unit symbol."
    },
    {
      "subpath": "./units",
      "name": "unitCategory",
      "kind": "function",
      "signature": "export declare function unitCategory(unit: Unit): UnitCategory;",
      "jsdocSummary": "The category a unit belongs to."
    },
    {
      "subpath": "./units",
      "name": "UnitCategory",
      "kind": "type",
      "signature": "export type UnitCategory = 'length' | 'mass' | 'area' | 'volume' | 'temperature' | 'time' | 'speed' | 'data' | 'energy' | 'pressure' | 'angle' | 'solidAngle' | 'power' | 'frequency' | 'force' | 'torque' | 'fuelEconomy' | 'dataRate' | 'electricCurrent' | 'illuminance' | 'radioactivity' | 'dynamicViscosity' | 'kinematicViscosity';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./units",
      "name": "UnitPart",
      "kind": "type",
      "signature": "export type UnitPart = { readonly unit: Unit; readonly value: number; };",
      "jsdocSummary": "One part of a composite value, such as the `7 in` of \"5 ft 7 in\"."
    },
    {
      "subpath": "./units",
      "name": "unitsOf",
      "kind": "function",
      "signature": "export declare function unitsOf(category: UnitCategory): readonly Unit[];",
      "jsdocSummary": "Every unit symbol in a category, in display order."
    },
    {
      "subpath": "./units",
      "name": "VolumeUnit",
      "kind": "type",
      "signature": "export type VolumeUnit = 'ml' | 'cl' | 'l' | 'cm3' | 'm3' | 'in3' | 'ft3' | 'yd3' | 'tsp' | 'tbsp' | 'floz' | 'cup' | 'pt' | 'qt' | 'gal' | 'floz_imp' | 'pt_imp' | 'qt_imp' | 'gal_imp';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./words",
      "name": "en",
      "kind": "variable",
      "signature": "export declare const en: NumberWordsLocale;",
      "jsdocSummary": "American English: `one hundred two`, `two thousand twenty-six`."
    },
    {
      "subpath": "./words",
      "name": "enGB",
      "kind": "variable",
      "signature": "export declare const enGB: NumberWordsLocale;",
      "jsdocSummary": "British English: `one hundred and two`, `one thousand and five`."
    },
    {
      "subpath": "./words",
      "name": "formatOrdinal",
      "kind": "function",
      "signature": "export declare function formatOrdinal(value: DecimalInput, options?: OrdinalOptions): string;",
      "jsdocSummary": "`formatOrdinal(21)` → `'21st'`; `formatOrdinal(1000)` → `'1,000th'`. Positive integers only."
    },
    {
      "subpath": "./words",
      "name": "Gender",
      "kind": "type",
      "signature": "export type Gender = 'masculine' | 'feminine' | 'neuter';",
      "jsdocSummary": ""
    },
    {
      "subpath": "./words",
      "name": "NumberWordsLocale",
      "kind": "type",
      "signature": "export type NumberWordsLocale = { /** BCP 47 tag, also used for digit formatting. */ readonly code: string; /** The word placed before a negative number: `minus`. */ readonly negative: string; /** The word read for the decimal separator: `point`, `virgulă`, `Komma`. */ readonly decimalSeparator: string; /** * How many base-1000 groups the locale can spell (`en`: 12, up to 10^36 − 1). * The core rejects longer integers with `NumericRangeError` by digit count, * before any grouping work is done. */ readonly maxGroups: number; /** Cardinal words for `n ≥ 0`. Throws `NumericRangeError` beyond the locale's largest scale word. */ spell(n: bigint, context: WordsContext): string; /** Ordinal words for `n ≥ 1`: `twenty-first`, `al douăzeci și unulea`. */ spellOrdinal(n: bigint, context: WordsContext): string; /** Ordinal with digits for `n ≥ 1`: `21st`, `21.`, `al 21-lea`. `digits` is `n` already formatted for the locale. */ ordinal(n: bigint, digits: string, context: WordsContext): string; };",
      "jsdocSummary": "The contract a locale implements. All inputs are non-negative integers; the core handles sign, fractions and thresholds."
    },
    {
      "subpath": "./words",
      "name": "OrdinalOptions",
      "kind": "type",
      "signature": "export type OrdinalOptions = { locale?: NumberWordsLocale; gender?: Gender; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./words",
      "name": "spellNumber",
      "kind": "function",
      "signature": "export declare function spellNumber(value: DecimalInput, options?: SpellOptions): string;",
      "jsdocSummary": "`spellNumber(102)` → `'one hundred two'`; `spellNumber('3.14')` → `'three point one four'`; `spellNumber(-5)` → `'minus five'`. Fractions are read digit by digit, as people do. Numbers are read through `decimal()`, so `0.1` is \"zero point one\", never its binary expansion."
    },
    {
      "subpath": "./words",
      "name": "SpellOptions",
      "kind": "type",
      "signature": "export type SpellOptions = { locale?: NumberWordsLocale; gender?: Gender; /** * Numbers are spelled when `after < |value| ≤ until`; the rest come back as * formatted digits that keep the exact value (every fraction digit is kept). * `until` is the inclusive upper bound of the spelled range. */ until?: number; /** The exclusive lower bound of the spelled range (see `until`). */ after?: number; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./words",
      "name": "spellOrdinal",
      "kind": "function",
      "signature": "export declare function spellOrdinal(value: DecimalInput, options?: OrdinalOptions): string;",
      "jsdocSummary": "`spellOrdinal(21)` → `'twenty-first'`. Positive integers only."
    },
    {
      "subpath": "./words",
      "name": "thousandsGroups",
      "kind": "function",
      "signature": "export declare function thousandsGroups(n: bigint): number[];",
      "jsdocSummary": "Splits a non-negative integer into base-1000 groups, most significant first: `1234567n` → `[1, 234, 567]`. The building block every locale uses."
    },
    {
      "subpath": "./words",
      "name": "WordsContext",
      "kind": "type",
      "signature": "export type WordsContext = { /** Grammatical gender of the thing being counted, where the language cares (`una`/`unu`, `première`/`premier`). */ gender: Gender | undefined; };",
      "jsdocSummary": ""
    },
    {
      "subpath": "./words/de",
      "name": "de",
      "kind": "variable",
      "signature": "export declare const de: NumberWordsLocale;",
      "jsdocSummary": "German: `einundzwanzig`, `eine Million`, `zwei Milliarden`; ordinals `erste`, `einundzwanzigste`."
    },
    {
      "subpath": "./words/es",
      "name": "es",
      "kind": "variable",
      "signature": "export declare const es: NumberWordsLocale;",
      "jsdocSummary": "Spanish: `veintiún mil`, `mil millones`, `ciento uno`; ordinals `primero`, `vigésimo primero`."
    },
    {
      "subpath": "./words/fr",
      "name": "fr",
      "kind": "variable",
      "signature": "export declare const fr: NumberWordsLocale;",
      "jsdocSummary": "French: `vingt et un`, `quatre-vingt-dix-neuf`, `deux cents`; ordinals `premier`, `vingt et unième`."
    },
    {
      "subpath": "./words/it",
      "name": "it",
      "kind": "variable",
      "signature": "export declare const it: NumberWordsLocale;",
      "jsdocSummary": "Italian (`ventuno`, `ventitré`, `un milione duecentomila`, `ventesimo`). Reads up to 10^15 − 1."
    },
    {
      "subpath": "./words/ro",
      "name": "ro",
      "kind": "variable",
      "signature": "export declare const ro: NumberWordsLocale;",
      "jsdocSummary": "Romanian (`unu`, `una`, `douăzeci și una de mii`, `al douăzecilea`). Reads up to 10^15 − 1."
    }
  ],
  "groups": [],
  "errorCodes": [
    "ARKI_MATH_E001",
    "ARKI_MATH_E002",
    "ARKI_MATH_E003",
    "ARKI_MATH_E004",
    "ARKI_MATH_E005",
    "ARKI_MATH_E006",
    "ARKI_MATH_E007",
    "ARKI_MATH_E008",
    "ARKI_MATH_E009",
    "ARKI_MATH_E010",
    "ARKI_MATH_E011"
  ]
}
