@neutrium/quantity - v7.1.0
    Preparing search index...

    Interface ScientificAdapter<T>

    Arithmetic plus powers, roots, logarithms and trigonometry.

    interface ScientificAdapter<T> {
        id: string;
        tier: "scientific";
        abs(value: T): T;
        acos(value: T): T;
        acosh(value: T): T;
        add(a: T, b: T): T;
        asin(value: T): T;
        asinh(value: T): T;
        atan(value: T): T;
        atan2(y: T, x: T): T;
        atanh(value: T): T;
        cbrt(value: T): T;
        ceil(value: T): T;
        compare(a: T, b: T): number;
        cos(value: T): T;
        cosh(value: T): T;
        div(a: T, b: T): T;
        exp(value: T): T;
        floor(value: T): T;
        from(value: unknown): T;
        isFinite(value: T): boolean;
        isInteger(value: T): boolean;
        isNaN(value: T): boolean;
        isValue(value: unknown): value is T;
        ln(value: T): T;
        log(value: T, base: T): T;
        mul(a: T, b: T): T;
        neg(value: T): T;
        pi(): T;
        pow(value: T, exponent: NumericInput<T>): T;
        powInteger(value: T, exponent: number): T;
        rem(a: T, b: T): T;
        round(value: T): T;
        sin(value: T): T;
        sinh(value: T): T;
        sqrt(value: T): T;
        sub(a: T, b: T): T;
        tan(value: T): T;
        tanh(value: T): T;
        toBytes(value: T): number;
        toNumber(value: T): number;
        toString(value: T): string;
        trunc(value: T): T;
    }

    Type Parameters

    • T

    Hierarchy

    Index
    id: string

    Diagnostic backend name, not a compatibility key.

    tier: "scientific"

    Complete scientific capability tier.

    • Absolute value.

      Parameters

      • value: T

      Returns T

    • acos function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • acosh function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • Sum.

      Parameters

      • a: T
      • b: T

      Returns T

    • asin function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • asinh function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • atan function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • Two-argument arctangent in radians.

      Parameters

      • y: T
      • x: T

      Returns T

    • atanh function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • Cube root.

      Parameters

      • value: T

      Returns T

    • Round toward positive infinity.

      Parameters

      • value: T

      Returns T

    • Negative, zero, positive, or NaN for unordered comparisons.

      Parameters

      • a: T
      • b: T

      Returns number

    • cos function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • cosh function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • Quotient using backend precision and rounding.

      Parameters

      • a: T
      • b: T

      Returns T

    • Natural exponential.

      Parameters

      • value: T

      Returns T

    • Round toward negative infinity.

      Parameters

      • value: T

      Returns T

    • Parse a strict decimal literal or convert a native scalar. No arbitrary object coercion.

      Parameters

      • value: unknown

      Returns T

    • Whether the scalar is finite.

      Parameters

      • value: T

      Returns boolean

    • Whether the scalar is a finite integer.

      Parameters

      • value: T

      Returns boolean

    • Whether the scalar is NaN.

      Parameters

      • value: T

      Returns boolean

    • Recognize backend-native values without coercion.

      Parameters

      • value: unknown

      Returns value is T

    • Natural logarithm.

      Parameters

      • value: T

      Returns T

    • Logarithm to the supplied base.

      Parameters

      • value: T
      • base: T

      Returns T

    • Product.

      Parameters

      • a: T
      • b: T

      Returns T

    • Negation, preserving signed-zero semantics.

      Parameters

      • value: T

      Returns T

    • Pi at backend precision.

      Returns T

    • Raise a scalar to an exponent, retaining its original literal until backend conversion.

      Parameters

      • value: T
      • exponent: NumericInput<T>

      Returns T

    • Raise to a finite integer Number exponent without rounding the exponent into the scalar format. Fractional/nonfinite exponents throw RangeError; Decimal additionally requires a safe integer.

      Parameters

      • value: T
      • exponent: number

      Returns T

    • Remainder using backend semantics; Decimal uses its modulo setting.

      Parameters

      • a: T
      • b: T

      Returns T

    • Round to an integer: native Math.round ties toward positive infinity; Decimal uses configured rounding.

      Parameters

      • value: T

      Returns T

    • sin function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • sinh function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • Square root.

      Parameters

      • value: T

      Returns T

    • Difference.

      Parameters

      • a: T
      • b: T

      Returns T

    • tan function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • tanh function; circular angles are in radians.

      Parameters

      • value: T

      Returns T

    • Size of the scalar in bytes.

      Parameters

      • value: T

      Returns number

    • Convert to Number, preserving signed zero; precision or range may be lost.

      Parameters

      • value: T

      Returns number

    • Numeric text preserving negative zero; formatting is backend-specific.

      Parameters

      • value: T

      Returns string

    • Round toward zero.

      Parameters

      • value: T

      Returns T