sesaparcours
    Preparing search index...
    interface MathJsChain<TValue> {
        apply: <T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            dim: number,
            callback: (array: Matrix<MathNumericType> | MathType[]) => number,
        ) => MathJsChain<T>;
        abs(this: MathJsChain<Complex>): MathJsChain<number>;
        abs<T extends MathType>(this: MathJsChain<T>): MathJsChain<T>;
        acos<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        acosh<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        acot<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        acoth<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        acsc<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        acsch<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        add<T extends MathType>(this: MathJsChain<T>, y: T): MathJsChain<T>;
        add(this: MathJsChain<MathType>, y: MathType): MathJsChain<MathType>;
        and(
            this: MathJsChain<
                | number
                | bigint
                | Unit
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
            >,
            y:
                | number
                | bigint
                | Unit
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        arg(this: MathJsChain<number | Complex>): MathJsChain<number>;
        arg(this: MathJsChain<BigNumber | Complex>): MathJsChain<BigNumber>;
        arg(
            this: MathJsChain<MathArray<MathNumericType>>,
        ): MathJsChain<MathArray<MathNumericType>>;
        arg(
            this: MathJsChain<Matrix<MathNumericType>>,
        ): MathJsChain<Matrix<MathNumericType>>;
        asec<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        asech<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        asin<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        asinh<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        atan<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        atan2<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
            x: number,
        ): MathJsChain<T>;
        atanh<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        bellNumbers(this: MathJsChain<number>): MathJsChain<number>;
        bellNumbers(this: MathJsChain<BigNumber>): MathJsChain<BigNumber>;
        bernoulli<T extends number | BigNumber | Fraction>(
            this: MathJsChain<T>,
        ): MathJsChain<NoLiteralType<T>>;
        bernoulli(this: MathJsChain<bigint>): MathJsChain<Fraction>;
        bigint(
            this: MathJsChain<
                string
                | number
                | bigint
                | boolean
                | BigNumber
                | Fraction
                | null,
            >,
        ): MathJsChain<bigint>;
        bigint<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        bignumber(
            this: MathJsChain<
                | string
                | number
                | bigint
                | boolean
                | Unit
                | BigNumber
                | Fraction
                | null,
            >,
        ): MathJsChain<BigNumber>;
        bignumber<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        bitAnd<
            T extends number
            | bigint
            | BigNumber
            | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
            y: number | bigint | BigNumber | MathCollection<MathNumericType>,
        ): MathJsChain<NoLiteralType<T>>;
        bitNot<
            T extends number
            | bigint
            | BigNumber
            | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        bitOr<
            T extends number
            | bigint
            | BigNumber
            | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
            y: T,
        ): MathJsChain<T>;
        bitXor<
            T extends number
            | bigint
            | BigNumber
            | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
            y: number | bigint | BigNumber | MathCollection<MathNumericType>,
        ): MathJsChain<NoLiteralType<T>>;
        boolean(
            this: MathJsChain<string | number | boolean | null>,
        ): MathJsChain<boolean>;
        boolean(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<MathCollection<MathNumericType>>;
        catalan(this: MathJsChain<number>): MathJsChain<number>;
        catalan(this: MathJsChain<BigNumber>): MathJsChain<BigNumber>;
        cbrt<T extends number | Unit | BigNumber | Complex>(
            this: MathJsChain<T>,
            allRoots?: boolean,
        ): MathJsChain<T>;
        ceil<T extends MathNumericType | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            n?: number | BigNumber | MathCollection<MathNumericType>,
        ): MathJsChain<T>;
        ceil<U extends MathCollection<MathNumericType>>(
            this: MathJsChain<MathNumericType | U>,
            n: U,
        ): MathJsChain<U>;
        ceil(this: MathJsChain<Unit>, unit: Unit): MathJsChain<Unit>;
        ceil<U extends MathCollection<Unit>>(
            this: MathJsChain<U>,
            unit: Unit,
        ): MathJsChain<U>;
        ceil(
            this: MathJsChain<Unit>,
            n: number | BigNumber,
            unit: Unit,
        ): MathJsChain<Unit>;
        ceil<U extends MathCollection<Unit>>(
            this: MathJsChain<U>,
            n: number | BigNumber,
            unit: Unit,
        ): MathJsChain<U>;
        clone<TValue>(this: MathJsChain<TValue>): MathJsChain<TValue>;
        combinations<T extends number | BigNumber>(
            n: MathJsChain<T>,
            k: number | BigNumber,
        ): MathJsChain<NoLiteralType<T>>;
        compare(
            this: MathJsChain<string | MathType>,
            y: string | MathType,
        ): MathJsChain<
            number
            | BigNumber
            | Fraction
            | MathCollection<MathNumericType>,
        >;
        compareNatural(this: MathJsChain<any>, y: any): MathJsChain<number>;
        compareText(
            this: MathJsChain<string | MathCollection<MathNumericType>>,
            y: string | MathCollection<MathNumericType>,
        ): MathJsChain<number | MathCollection<MathNumericType>>;
        compile(this: MathJsChain<MathExpression>): MathJsChain<EvalFunction>;
        complex(
            this: MathJsChain<string | Complex | PolarCoordinates>,
            im?: number,
        ): MathJsChain<Complex>;
        complex(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<MathCollection<MathNumericType>>;
        composition<T extends number | BigNumber>(
            this: MathJsChain<T>,
            k: number | BigNumber,
        ): MathJsChain<NoLiteralType<T>>;
        concat(
            this: MathJsChain<
                (number | BigNumber | MathCollection<MathNumericType>)[],
            >,
        ): MathJsChain<MathCollection<MathNumericType>>;
        conj<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<NoLiteralType<T>>;
        cos<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        cosh<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        cot<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        coth<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        count(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<number>;
        count(this: MathJsChain<string>): MathJsChain<number>;
        createUnit(
            this: MathJsChain<string>,
            definition?: string | Unit | UnitDefinition,
            options?: CreateUnitOptions,
        ): MathJsChain<Unit>;
        createUnit(
            this: MathJsChain<Record<string, string | Unit | UnitDefinition>>,
            options?: CreateUnitOptions,
        ): MathJsChain<Unit>;
        cross(
            this: MathJsChain<MathCollection<MathNumericType>>,
            y: MathCollection,
        ): MathJsChain<MathCollection<MathNumericType>>;
        csc<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        csch<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        ctranspose(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<MathCollection<MathNumericType>>;
        cube<T extends Unit | MathNumericType>(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        deepEqual(this: MathJsChain<MathType>, y: MathType): MathJsChain<MathType>;
        derivative(
            this: MathJsChain<string | MathNode>,
            variable: string | MathNode,
            options?: { simplify: boolean },
        ): MathJsChain<MathNode>;
        det(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<number>;
        diag(
            this: MathJsChain<MathCollection<MathNumericType>>,
            format?: string,
        ): MathJsChain<Matrix<MathNumericType>>;
        diag(
            this: MathJsChain<MathCollection<MathNumericType>>,
            k: number | BigNumber,
            format?: string,
        ): MathJsChain<MathCollection<MathNumericType>>;
        diff<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            dim?: number | BigNumber,
        ): MathJsChain<T>;
        distance(
            this: MathJsChain<object | MathCollection<MathNumericType>>,
            y: object | MathCollection<MathNumericType>,
        ): MathJsChain<number | BigNumber>;
        divide(this: MathJsChain<Unit>, y: Unit): MathJsChain<number | Unit>;
        divide(this: MathJsChain<Unit>, y: number): MathJsChain<Unit>;
        divide(this: MathJsChain<number>, y: number): MathJsChain<number>;
        divide(this: MathJsChain<MathType>, y: MathType): MathJsChain<MathType>;
        done(): TValue;
        dot(
            this: MathJsChain<MathCollection<MathNumericType>>,
            y: MathCollection,
        ): MathJsChain<number>;
        dotDivide<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            y: MathType,
        ): MathJsChain<T>;
        dotDivide<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<MathType>,
            y: T,
        ): MathJsChain<T>;
        dotDivide(this: MathJsChain<Unit>, y: MathType): MathJsChain<Unit>;
        dotDivide(this: MathJsChain<MathType>, y: Unit): MathJsChain<Unit>;
        dotDivide(
            this: MathJsChain<MathNumericType>,
            y: MathNumericType,
        ): MathJsChain<MathNumericType>;
        dotMultiply<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            y: MathType,
        ): MathJsChain<T>;
        dotMultiply<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<MathType>,
            y: T,
        ): MathJsChain<T>;
        dotMultiply(this: MathJsChain<Unit>, y: MathType): MathJsChain<Unit>;
        dotMultiply(this: MathJsChain<MathType>, y: Unit): MathJsChain<Unit>;
        dotMultiply(
            this: MathJsChain<MathNumericType>,
            y: MathNumericType,
        ): MathJsChain<MathNumericType>;
        dotPow<T extends MathType>(
            this: MathJsChain<T>,
            y: MathType,
        ): MathJsChain<T>;
        equal(
            this: MathJsChain<string | MathType>,
            y: string | MathType,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        equalText(
            this: MathJsChain<string | MathCollection<MathNumericType>>,
            y: string | MathCollection<MathNumericType>,
        ): MathJsChain<number | MathCollection<MathNumericType>>;
        erf<T extends number | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
        ): MathJsChain<NoLiteralType<T>>;
        evaluate(
            this: MathJsChain<MathExpression>,
            scope?: MathScope<any>,
        ): MathJsChain<any>;
        evaluate(
            this: MathJsChain<MathExpression[]>,
            scope?: MathScope<any>,
        ): MathJsChain<any[]>;
        exp<T extends number | BigNumber | Complex>(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        expm(
            this: MathJsChain<Matrix<MathNumericType>>,
        ): MathJsChain<Matrix<MathNumericType>>;
        expm1<T extends number | BigNumber | Complex>(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        factorial<T extends number | BigNumber | MathCollection<MathNumericType>>(
            n: MathJsChain<T>,
        ): MathJsChain<NoLiteralType<T>>;
        filter(
            this: MathJsChain<string[] | MathCollection<MathNumericType>>,
            test:
                | RegExp
                | (
                    (
                        value: any,
                        index: number[],
                        matrix: string[] | MathCollection<MathNumericType>,
                    ) => boolean
                ),
        ): MathJsChain<MathCollection<MathNumericType>>;
        fix<T extends MathNumericType | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            n?: number | BigNumber | MathCollection<MathNumericType>,
        ): MathJsChain<T>;
        fix<U extends MathCollection<MathNumericType>>(
            this: MathJsChain<MathNumericType | U>,
            n: U,
        ): MathJsChain<U>;
        fix(this: MathJsChain<Unit>, unit: Unit): MathJsChain<Unit>;
        fix<U extends MathCollection<Unit>>(
            this: MathJsChain<U>,
            unit: Unit,
        ): MathJsChain<U>;
        fix(
            this: MathJsChain<Unit>,
            n: number | BigNumber,
            unit: Unit,
        ): MathJsChain<Unit>;
        fix<U extends MathCollection<Unit>>(
            this: MathJsChain<U>,
            n: number | BigNumber,
            unit: Unit,
        ): MathJsChain<U>;
        flatten<T extends MathCollection<MathNumericType>>(
            x: MathJsChain<T>,
        ): MathJsChain<T>;
        floor<T extends MathNumericType | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            n?: number | BigNumber | MathCollection<MathNumericType>,
        ): MathJsChain<T>;
        floor<U extends MathCollection<MathNumericType>>(
            this: MathJsChain<MathNumericType | U>,
            n: U,
        ): MathJsChain<U>;
        floor(this: MathJsChain<Unit>, unit: Unit): MathJsChain<Unit>;
        floor<U extends MathCollection<Unit>>(
            this: MathJsChain<U>,
            unit: Unit,
        ): MathJsChain<U>;
        floor(
            this: MathJsChain<Unit>,
            n: number | BigNumber,
            unit: Unit,
        ): MathJsChain<Unit>;
        floor<U extends MathCollection<Unit>>(
            this: MathJsChain<U>,
            n: number | BigNumber,
            unit: Unit,
        ): MathJsChain<U>;
        forEach<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            callback: (value: any, index: number[], matrix: T) => void,
        ): void;
        format(
            this: MathJsChain<any>,
            value: any,
            options?: number | FormatOptions | ((item: any) => string),
            callback?: (value: any) => string,
        ): MathJsChain<string>;
        fraction(
            this: MathJsChain<
                | string
                | number
                | bigint
                | Unit
                | BigNumber
                | Fraction
                | FractionDefinition,
            >,
            denominator?: number,
        ): MathJsChain<Fraction>;
        fraction(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<MathCollection<MathNumericType>>;
        freqz<
            T extends
                number
                | MathArray<MathNumericType>
                | MathArray<MathNumericType>[],
        >(
            this: MathJsChain<T>,
            a: T,
            w?: number | T,
        ): MathJsChain<{ h: T; w: T }>;
        gamma<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            n: MathJsChain<T>,
        ): MathJsChain<NoLiteralType<T>>;
        gcd<T extends number | BigNumber | Fraction | Matrix<MathNumericType>>(
            this: MathJsChain<T[]>,
            ...args: T[],
        ): MathJsChain<T>;
        getMatrixDataType(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<string>;
        help(this: MathJsChain<unknown>): MathJsChain<unknown>;
        hypot<T extends number | BigNumber>(this: MathJsChain<T[]>): MathJsChain<T>;
        identity(
            this: MathJsChain<number | number[] | MathCollection<MathNumericType>>,
            format?: string,
        ): MathJsChain<number | MathCollection<MathNumericType>>;
        identity(
            this: MathJsChain<number>,
            n: number,
            format?: string,
        ): MathJsChain<number | MathCollection<MathNumericType>>;
        im(this: MathJsChain<number | Complex>): MathJsChain<number>;
        im(this: MathJsChain<BigNumber>): MathJsChain<BigNumber>;
        im(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<MathCollection<MathNumericType>>;
        index(this: MathJsChain<any[]>): MathJsChain<Index>;
        intersect(
            this: MathJsChain<MathCollection<MathNumericType>>,
            x: MathCollection,
            y: MathCollection,
            z?: MathCollection<MathNumericType>,
        ): MathJsChain<MathArray<MathNumericType>>;
        inv<T extends number | Complex | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
        ): MathJsChain<NoLiteralType<T>>;
        isBounded(this: MathJsChain<MathType>): MathJsChain<boolean>;
        isFinite(this: MathJsChain<MathScalarType>): MathJsChain<boolean>;
        isFinite(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<MathCollection<MathNumericType>>;
        isInteger(
            this: MathJsChain<
                | number
                | bigint
                | BigNumber
                | Fraction
                | MathCollection<MathNumericType>,
            >,
        ): MathJsChain<boolean>;
        isNaN(
            this: MathJsChain<
                number
                | Unit
                | BigNumber
                | Fraction
                | MathCollection<MathNumericType>,
            >,
        ): MathJsChain<boolean>;
        isNegative(
            this: MathJsChain<
                number
                | Unit
                | BigNumber
                | Fraction
                | MathCollection<MathNumericType>,
            >,
        ): MathJsChain<boolean>;
        isNumeric(this: MathJsChain<any>): MathJsChain<boolean>;
        isPositive(
            this: MathJsChain<
                | number
                | bigint
                | Unit
                | BigNumber
                | Fraction
                | MathCollection<MathNumericType>,
            >,
        ): MathJsChain<boolean>;
        isPrime(
            this: MathJsChain<
                number
                | bigint
                | BigNumber
                | MathCollection<MathNumericType>,
            >,
        ): MathJsChain<boolean>;
        isZero(this: MathJsChain<MathType>): MathJsChain<boolean>;
        kldivergence(
            this: MathJsChain<MathCollection<MathNumericType>>,
            p: MathCollection,
        ): MathJsChain<number>;
        kron(
            this: MathJsChain<MathCollection<MathNumericType>>,
            y: MathCollection,
        ): MathJsChain<Matrix<MathNumericType>>;
        larger(
            this: MathJsChain<string | MathType>,
            y: string | MathType,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        largerEq(
            this: MathJsChain<string | MathType>,
            y: string | MathType,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        lcm<T extends number | BigNumber | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            b: T,
        ): MathJsChain<T>;
        leafCount(this: MathJsChain<MathNode>): MathJsChain<number>;
        leftShift<
            T extends number
            | bigint
            | BigNumber
            | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
            y: number | bigint | BigNumber,
        ): MathJsChain<NoLiteralType<T>>;
        log<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
            base?: number | BigNumber | Complex,
        ): MathJsChain<NoLiteralType<T>>;
        log10<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        log1p(
            this: MathJsChain<number>,
            base?: number | BigNumber | Complex,
        ): MathJsChain<number>;
        log1p(
            this: MathJsChain<BigNumber>,
            base?: number | BigNumber | Complex,
        ): MathJsChain<BigNumber>;
        log1p(
            this: MathJsChain<Complex>,
            base?: number | BigNumber | Complex,
        ): MathJsChain<Complex>;
        log1p(
            this: MathJsChain<MathArray<MathNumericType>>,
            base?: number | BigNumber | Complex,
        ): MathJsChain<MathArray<MathNumericType>>;
        log1p(
            this: MathJsChain<Matrix<MathNumericType>>,
            base?: number | BigNumber | Complex,
        ): MathJsChain<Matrix<MathNumericType>>;
        log2<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        lsolve(
            this: MathJsChain<Matrix<MathNumericType>>,
            b: MathCollection,
        ): MathJsChain<Matrix<MathNumericType>>;
        lsolve(
            this: MathJsChain<MathArray<MathNumericType>>,
            b: MathCollection,
        ): MathJsChain<MathArray<MathNumericType>>;
        lup(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<LUDecomposition>;
        lusolve(
            this: MathJsChain<Matrix<MathNumericType>>,
            b: MathCollection,
            order?: number,
            threshold?: number,
        ): MathJsChain<Matrix<MathNumericType>>;
        lusolve(
            this: MathJsChain<MathArray<MathNumericType>>,
            b: MathCollection,
            order?: number,
            threshold?: number,
        ): MathJsChain<MathArray<MathNumericType>>;
        lusolve(
            this: MathJsChain<LUDecomposition>,
            b: MathCollection,
        ): MathJsChain<Matrix<MathNumericType>>;
        lyap(
            this: MathJsChain<MathCollection<MathNumericType>>,
            Q: MathCollection,
        ): MathJsChain<MathCollection<MathNumericType>>;
        mad(this: MathJsChain<MathCollection<MathNumericType>>): MathJsChain<any>;
        map<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            callback: (value: any, index: number[], matrix: T) => string | MathType,
        ): MathJsChain<T>;
        mapSlices<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            dim: number,
            callback: (array: Matrix<MathNumericType> | MathType[]) => number,
        ): MathJsChain<T>;
        matrix(
            this: MathJsChain<MathCollection<MathNumericType>>,
            format?: "sparse" | "dense",
            dataType?: string,
        ): MathJsChain<Matrix<MathNumericType>>;
        max(this: MathJsChain<MathType[]>, dim?: number): MathJsChain<any>;
        max(
            this: MathJsChain<MathCollection<MathNumericType>>,
            dim?: number,
        ): MathJsChain<any>;
        mean(this: MathJsChain<MathType[]>, dim?: number): MathJsChain<any>;
        mean(
            this: MathJsChain<MathCollection<MathNumericType>>,
            dim?: number,
        ): MathJsChain<any>;
        median(this: MathJsChain<MathType[]>, dim?: number): MathJsChain<any>;
        median(
            this: MathJsChain<MathCollection<MathNumericType>>,
            dim?: number,
        ): MathJsChain<any>;
        min(this: MathJsChain<MathType[]>): MathJsChain<MathType[]>;
        min(
            this: MathJsChain<MathCollection<MathNumericType>>,
            dim?: number,
        ): MathJsChain<any>;
        mod<
            T extends
                | number
                | bigint
                | BigNumber
                | Fraction
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
            y:
                | number
                | bigint
                | BigNumber
                | Fraction
                | MathCollection<MathNumericType>,
        ): MathJsChain<NoLiteralType<T>>;
        mode(this: MathJsChain<MathType[]>): MathJsChain<MathType[]>;
        multinomial<T extends number | BigNumber>(
            a: MathJsChain<T[]>,
        ): MathJsChain<NoLiteralType<T>>;
        multiply<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            y: MathType,
        ): MathJsChain<T>;
        multiply(this: MathJsChain<Unit>, y: Unit): MathJsChain<Unit>;
        multiply(this: MathJsChain<number>, y: number): MathJsChain<number>;
        multiply(this: MathJsChain<MathType>, y: MathType): MathJsChain<MathType>;
        norm(
            this: MathJsChain<
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
            >,
            p?: string | number | BigNumber,
        ): MathJsChain<number | BigNumber>;
        not(
            this: MathJsChain<
                | number
                | bigint
                | Unit
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
            >,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        nthRoot(
            this: MathJsChain<number | BigNumber | Complex>,
            root?: number | BigNumber,
        ): MathJsChain<number | Complex>;
        nthRoot(
            this: MathCollection,
            root?: number | BigNumber,
        ): MathJsChain<MathCollection<MathNumericType>>;
        nthRoots(
            this: MathJsChain<number | BigNumber | Complex>,
            n?: number,
        ): MathJsChain<Complex[]>;
        number(
            this: MathJsChain<
                | string
                | number
                | bigint
                | boolean
                | Unit
                | BigNumber
                | Fraction
                | null,
            >,
            valuelessUnit?: string | Unit,
        ): MathJsChain<number>;
        number(
            this: MathJsChain<MathCollection<MathNumericType>>,
            valuelessUnit?: string | Unit,
        ): MathJsChain<MathCollection<MathNumericType>>;
        numeric(
            this: MathJsChain<string | number | bigint | BigNumber | Fraction>,
            outputType: "number",
        ): MathJsChain<number>;
        numeric(
            this: MathJsChain<string | number | bigint | BigNumber | Fraction>,
            outputType: "BigNumber",
        ): MathJsChain<BigNumber>;
        numeric(
            this: MathJsChain<string | number | bigint | BigNumber | Fraction>,
            outputType: "bigint",
        ): MathJsChain<bigint>;
        numeric(
            this: MathJsChain<string | number | bigint | BigNumber | Fraction>,
            outputType: "Fraction",
        ): MathJsChain<Fraction>;
        ones(
            this: MathJsChain<number | number[] | BigNumber | BigNumber[]>,
            format?: string,
        ): MathJsChain<MathCollection<MathNumericType>>;
        or(
            this: MathJsChain<
                | number
                | bigint
                | Unit
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
            >,
            y:
                | number
                | bigint
                | Unit
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        parse(
            this: MathJsChain<MathExpression[]>,
            options?: any,
        ): MathJsChain<MathNode[]>;
        parse(
            this: MathJsChain<MathExpression>,
            options?: any,
        ): MathJsChain<MathNode>;
        partitionSelect(
            this: MathJsChain<MathCollection<MathNumericType>>,
            k: number,
            compare?: "desc" | "asc" | ((a: any, b: any) => number),
        ): MathJsChain<MathCollection<MathNumericType>>;
        permutations<T extends number | BigNumber>(
            n: MathJsChain<T>,
            k?: number | BigNumber,
        ): MathJsChain<NoLiteralType<T>>;
        pickRandom<T>(this: MathJsChain<T[]>): MathJsChain<T>;
        pickRandom<T>(this: MathJsChain<T[]>, number: number): MathJsChain<T[]>;
        pickRandom<T>(
            this: MathJsChain<T[]>,
            number: number,
            weights: number[],
        ): MathJsChain<T[]>;
        pow(
            this: MathJsChain<MathType>,
            y: number | bigint | BigNumber | Complex,
        ): MathJsChain<MathType>;
        print(
            this: MathJsChain<string>,
            values: any,
            precision?: number,
            options?: number | object,
        ): MathJsChain<string>;
        prod(this: MathJsChain<MathType[]>): MathJsChain<any>;
        qr(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<QRDecomposition>;
        quantileSeq(
            A: MathJsChain<MathCollection<MathNumericType>>,
            prob: number | BigNumber | MathArray<MathNumericType>,
            sorted?: boolean,
        ): MathJsChain<number | Unit | BigNumber | MathArray<MathNumericType>>;
        random(this: MathJsChain<number>, max?: number): MathJsChain<number>;
        random<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            min?: number,
            max?: number,
        ): MathJsChain<T>;
        randomInt<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            max?: number,
        ): MathJsChain<T>;
        randomInt<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            max?: number,
        ): MathJsChain<T>;
        randomInt<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            min: number,
            max: number,
        ): MathJsChain<T>;
        range(
            this: MathJsChain<string>,
            includeEnd?: boolean,
        ): MathJsChain<Matrix<MathNumericType>>;
        range(
            this: MathJsChain<number | BigNumber>,
            end: number | BigNumber,
            includeEnd?: boolean,
        ): MathJsChain<Matrix<MathNumericType>>;
        range(
            this: MathJsChain<number | Unit | BigNumber>,
            end: number | Unit | BigNumber,
            step: number | Unit | BigNumber,
            includeEnd?: boolean,
        ): MathJsChain<Matrix<MathNumericType>>;
        rationalize(
            this: MathJsChain<string | MathNode>,
            optional?: boolean | object,
            detailed?: boolean,
        ): MathJsChain<MathNode>;
        re(this: MathJsChain<number | Complex>): MathJsChain<number>;
        re(this: MathJsChain<BigNumber>): MathJsChain<BigNumber>;
        re(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<MathCollection<MathNumericType>>;
        reshape<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            sizes: number[],
        ): MathJsChain<T>;
        resize<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            size: MathCollection,
            defaultValue?: string | number,
        ): MathJsChain<T>;
        resolve(
            this: MathJsChain<MathNode>,
            scope?: MathScope<any>,
        ): MathJsChain<MathNode>;
        resolve(
            this: MathJsChain<MathNode[]>,
            scope?: MathScope<any>,
        ): MathJsChain<MathNode[]>;
        rightArithShift<
            T extends number
            | bigint
            | BigNumber
            | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
            y: number | bigint | BigNumber,
        ): MathJsChain<NoLiteralType<T>>;
        rightLogShift<T extends number | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            y: number,
        ): MathJsChain<NoLiteralType<T>>;
        round<T extends MathNumericType | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            n?: number | BigNumber | MathCollection<MathNumericType>,
        ): MathJsChain<T>;
        round<U extends MathCollection<MathNumericType>>(
            this: MathJsChain<MathNumericType | U>,
            n: U,
        ): MathJsChain<U>;
        round(this: MathJsChain<Unit>, unit: Unit): MathJsChain<Unit>;
        round<U extends MathCollection<Unit>>(
            this: MathJsChain<U>,
            unit: Unit,
        ): MathJsChain<U>;
        round(
            this: MathJsChain<Unit>,
            n: number | BigNumber,
            unit: Unit,
        ): MathJsChain<Unit>;
        round<U extends MathCollection<Unit>>(
            this: MathJsChain<U>,
            n: number | BigNumber,
            unit: Unit,
        ): MathJsChain<U>;
        schur(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): SchurDecomposition;
        sec<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        sech<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        setCartesian<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            a2: MathCollection,
        ): MathJsChain<T>;
        setDifference<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            a2: MathCollection,
        ): MathJsChain<T>;
        setDistinct<T extends MathCollection<MathNumericType>>(
            a: MathJsChain<T>,
        ): MathJsChain<T>;
        setIntersect<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            a2: MathCollection,
        ): MathJsChain<T>;
        setIsSubset(
            this: MathJsChain<MathCollection<MathNumericType>>,
            a2: MathCollection,
        ): MathJsChain<boolean>;
        setMultiplicity(
            e: MathJsChain<MathNumericType>,
            a: MathCollection,
        ): MathJsChain<number>;
        setPowerset<T extends MathCollection<MathNumericType>>(
            a: MathJsChain<T>,
        ): MathJsChain<T>;
        setSize(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<number>;
        setSymDifference<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            a2: MathCollection,
        ): MathJsChain<T>;
        setUnion<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            a2: MathCollection,
        ): MathJsChain<T>;
        sign<T extends MathType>(this: MathJsChain<T>): MathJsChain<T>;
        simplify(
            this: MathJsChain<string | MathNode>,
            rules?: SimplifyRule[],
            scope?: object | Map<string, MathType>,
            options?: SimplifyOptions,
        ): MathJsChain<MathNode>;
        simplifyConstant(
            this: MathJsChain<string | MathNode>,
            options?: SimplifyOptions,
        ): MathJsChain<MathNode>;
        simplifyCore(
            this: MathJsChain<string | MathNode>,
            options?: SimplifyOptions,
        ): MathJsChain<MathNode>;
        sin<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        sinh<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        size(
            this: MathJsChain<
                | string
                | number
                | boolean
                | Unit
                | Complex
                | MathCollection<MathNumericType>,
            >,
        ): MathJsChain<MathCollection<MathNumericType>>;
        slu(
            this: MathJsChain<Matrix<MathNumericType>>,
            order: number,
            threshold: number,
        ): MathJsChain<SLUDecomposition>;
        smaller(
            this: MathJsChain<string | MathType>,
            y: string | MathType,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        smallerEq(
            this: MathJsChain<string | MathType>,
            y: string | MathType,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        sort<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            compare: "desc" | "asc" | "natural" | ((a: any, b: any) => number),
        ): MathJsChain<T>;
        sparse(
            this: MathJsChain<MathCollection<MathNumericType>>,
            dataType?: string,
        ): MathJsChain<Matrix<MathNumericType>>;
        splitUnit(this: MathJsChain<Unit>, parts: Unit[]): MathJsChain<Unit[]>;
        sqrt<
            T extends
                number
                | Unit
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        sqrtm<T extends MathCollection<MathNumericType>>(
            A: MathJsChain<T>,
        ): MathJsChain<T>;
        square<T extends MathType>(this: MathJsChain<T>): MathJsChain<T>;
        squeeze<T extends MathCollection<MathNumericType>>(
            x: MathJsChain<T>,
        ): MathJsChain<T>;
        std(
            this: MathJsChain<number[]>,
            dim?: number,
            normalization?: "unbiased" | "uncorrected" | "biased",
        ): MathJsChain<number>;
        std(
            this: MathJsChain<MathCollection<MathNumericType>>,
            dimension?: number,
            normalization?: "unbiased" | "uncorrected" | "biased",
        ): MathJsChain<number[]>;
        std(
            this: MathJsChain<MathCollection<MathNumericType>>,
            normalization: "unbiased" | "uncorrected" | "biased",
        ): MathJsChain<number>;
        stirlingS2<T extends number | BigNumber>(
            this: MathJsChain<T>,
            k: number | BigNumber,
        ): MathJsChain<NoLiteralType<T>>;
        string(
            this: MathJsChain<string | Unit | MathNumericType | null>,
        ): MathJsChain<string>;
        string(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<MathCollection<MathNumericType>>;
        subset<T extends string | MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            index: Index,
            replacement?: any,
            defaultValue?: any,
        ): MathJsChain<T>;
        subtract<T extends MathType>(this: MathJsChain<T>, y: T): MathJsChain<T>;
        sum(
            this: MathJsChain<(number | BigNumber | Fraction)[]>,
        ): MathJsChain<number>;
        sum(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<number>;
        symbolicEqual(
            this: MathJsChain<MathNode>,
            expr2: MathNode,
            options?: SimplifyOptions,
        ): MathJsChain<boolean>;
        tan<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        tanh<
            T extends
                number
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        >(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        to(
            this: MathJsChain<Unit | MathCollection<MathNumericType>>,
            unit: string | Unit,
        ): MathJsChain<Unit | MathCollection<MathNumericType>>;
        toBest(this: MathJsChain<Unit>): MathJsChain<Unit>;
        toBest(
            this: MathJsChain<Unit>,
            units: string[] | Unit[],
            options: object,
        ): MathJsChain<Unit>;
        trace(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<number>;
        transpose<T extends MathCollection<MathNumericType>>(
            x: MathJsChain<T>,
        ): MathJsChain<T>;
        typeOf(this: MathJsChain<any>): MathJsChain<string>;
        unaryMinus<T extends MathType>(this: MathJsChain<T>): MathJsChain<T>;
        unaryPlus<T extends string | MathType>(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        unequal(
            this: MathJsChain<string | MathType>,
            y: string | MathType,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        unit(this: MathJsChain<string>, unit?: string): MathJsChain<Unit>;
        unit(this: MathJsChain<MathNumericType>, unit?: string): MathJsChain<Unit>;
        unit(
            this: MathJsChain<MathCollection<MathNumericType>>,
        ): MathJsChain<Unit[]>;
        usolve(
            this: MathJsChain<Matrix<MathNumericType>>,
            b: MathCollection,
        ): MathJsChain<Matrix<MathNumericType>>;
        usolve(
            this: MathJsChain<MathArray<MathNumericType>>,
            b: MathCollection,
        ): MathJsChain<MathArray<MathNumericType>>;
        variance(
            this: MathJsChain<(number | BigNumber | Fraction)[][]>,
        ): MathJsChain<number>;
        variance(
            this: MathJsChain<MathCollection<MathNumericType>>,
            dimension?: number,
            normalization?: "unbiased" | "uncorrected" | "biased",
        ): MathJsChain<number[]>;
        variance(
            this: MathJsChain<MathCollection<MathNumericType>>,
            normalization: "unbiased" | "uncorrected" | "biased",
        ): MathJsChain<number>;
        xgcd(
            this: MathJsChain<number | BigNumber>,
            b: number | BigNumber,
        ): MathJsChain<MathArray<MathNumericType>>;
        xor(
            this: MathJsChain<
                | number
                | bigint
                | Unit
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
            >,
            y:
                | number
                | bigint
                | Unit
                | BigNumber
                | Complex
                | MathCollection<MathNumericType>,
        ): MathJsChain<boolean | MathCollection<MathNumericType>>;
        zeros(
            this: MathJsChain<number | number[] | BigNumber | BigNumber[]>,
            format?: string,
        ): MathJsChain<MathCollection<MathNumericType>>;
        zeta<T extends number | BigNumber | Complex>(
            this: MathJsChain<T>,
        ): MathJsChain<T>;
        zpk2tf<T extends MathCollection<MathNumericType>>(
            this: MathJsChain<T>,
            p: T,
            k?: number,
        ): MathJsChain<T>;
    }

    Type Parameters

    • TValue
    Index

    Properties

    Methods

    abs acos acosh acot acoth acsc acsch add and arg asec asech asin asinh atan atan2 atanh bellNumbers bernoulli bigint bignumber bitAnd bitNot bitOr bitXor boolean catalan cbrt ceil clone combinations compare compareNatural compareText compile complex composition concat conj cos cosh cot coth count createUnit cross csc csch ctranspose cube deepEqual derivative det diag diff distance divide done dot dotDivide dotMultiply dotPow equal equalText erf evaluate exp expm expm1 factorial filter fix flatten floor forEach format fraction freqz gamma gcd getMatrixDataType help hypot identity im index intersect inv isBounded isFinite isInteger isNaN isNegative isNumeric isPositive isPrime isZero kldivergence kron larger largerEq lcm leafCount leftShift log log10 log1p log2 lsolve lup lusolve lyap mad map mapSlices matrix max mean median min mod mode multinomial multiply norm not nthRoot nthRoots number numeric ones or parse partitionSelect permutations pickRandom pow print prod qr quantileSeq random randomInt range rationalize re reshape resize resolve rightArithShift rightLogShift round schur sec sech setCartesian setDifference setDistinct setIntersect setIsSubset setMultiplicity setPowerset setSize setSymDifference setUnion sign simplify simplifyConstant simplifyCore sin sinh size slu smaller smallerEq sort sparse splitUnit sqrt sqrtm square squeeze std stirlingS2 string subset subtract sum symbolicEqual tan tanh to toBest trace transpose typeOf unaryMinus unaryPlus unequal unit usolve variance xgcd xor zeros zeta zpk2tf

    Properties

    apply: <T extends MathCollection<MathNumericType>>(
        this: MathJsChain<T>,
        dim: number,
        callback: (array: Matrix<MathNumericType> | MathType[]) => number,
    ) => MathJsChain<T>

    Type Declaration

    backwards-compatibility old name of mapSlices

    Methods

    • The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. bellNumbers only takes integer arguments. The following condition must be enforced: n

      = 0

      Parameters

      Returns MathJsChain<number>

    • Parameters

      Returns MathJsChain<BigNumber>

    • Calculate the cubic root of a value. For matrices, the function is evaluated element wise.

      Type Parameters

      Parameters

      • this: MathJsChain<T>
      • OptionalallRoots: boolean

        Optional, false by default. Only applicable when x is a number or complex number. If true, all complex roots are returned, if false (default) the principal root is returned.

      Returns MathJsChain<T>

    • Compare two values of any type in a deterministic, natural way. For numeric values, the function works the same as math.compare. For types of values that can’t be compared mathematically, the function compares in a natural way.

      Parameters

      Returns MathJsChain<number>

    • Create a user-defined unit and register it with the Unit type.

      Parameters

      • this: MathJsChain<string>
      • Optionaldefinition: string | Unit | UnitDefinition

        Definition of the unit in terms of existing units. For example, ‘0.514444444 m / s’.

      • Optionaloptions: CreateUnitOptions

        (optional) An object containing any of the following properties:
        - prefixes {string} “none”, “short”, “long”, “binary_short”, or “binary_long”. The default is “none”.
        - aliases {Array} Array of strings. Example: [‘knots’, ‘kt’, ‘kts’]
        - offset {Numeric} An offset to apply when converting from the unit. For example, the offset for celsius is 273.15. Default is 0.

      Returns MathJsChain<Unit>

    • Create a user-defined unit and register it with the Unit type.

      Parameters

      • this: MathJsChain<Record<string, string | Unit | UnitDefinition>>
      • Optionaloptions: CreateUnitOptions

        (optional) An object containing any of the following properties:
        - prefixes {string} “none”, “short”, “long”, “binary_short”, or “binary_long”. The default is “none”.
        - aliases {Array} Array of strings. Example: [‘knots’, ‘kt’, ‘kts’]
        - offset {Numeric} An offset to apply when converting from the unit. For example, the offset for celsius is 273.15. Default is 0.

      Returns MathJsChain<Unit>

    • Parameters

      • this: MathJsChain<string | MathNode>
      • variable: string | MathNode

        The variable over which to differentiate

      • Optionaloptions: { simplify: boolean }

        There is one option available, simplify, which is true by default. When false, output will not be simplified.

      Returns MathJsChain<MathNode>

    • Returns TValue

    • Test whether two values are equal.

      The function tests whether the relative difference between x and y is smaller than the configured relTol and absTol. The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise. In case of complex numbers, x.re must equal y.re, and x.im must equal y.im. Values null and undefined are compared strictly, thus null is only equal to null and nothing else, and undefined is only equal to undefined and nothing else.

      Parameters

      Returns MathJsChain<boolean | MathCollection<MathNumericType>>

    • Iterate over all elements of a matrix/array, and executes the given callback function.

      Type Parameters

      Parameters

      • this: MathJsChain<T>
      • callback: (value: any, index: number[], matrix: T) => void

      Returns void

    • Format a value of any type into a string.

      Parameters

      • this: MathJsChain<any>
      • value: any
      • Optionaloptions: number | FormatOptions | ((item: any) => string)

        An object with formatting options.

      • Optionalcallback: (value: any) => string

        A custom formatting function, invoked for all numeric elements in value, for example all elements of a matrix, or the real and imaginary parts of a complex number. This callback can be used to override the built-in numeric notation with any type of formatting. Function callback is called with value as parameter and must return a string.

      Returns MathJsChain<string>

    • Retrieve help on a function or data type. Help files are retrieved from the documentation in math.expression.docs.

      Parameters

      Returns MathJsChain<unknown>

    • Calculate the hypotenuse of a list with values. The hypotenuse is defined as: hypot(a, b, c, ...) = sqrt(a^2 + b^2 + c^2 + ...) For matrix input, the hypotenuse is calculated for all values in the matrix.

      Type Parameters

      Parameters

      Returns MathJsChain<T>

    • Create an index. An Index can store ranges having start, step, and end for multiple dimensions. Matrix.get, Matrix.set, and math.subset accept an Index as input.

      Parameters

      Returns MathJsChain<Index>

    • Test whether a value is a numeric value. The function is evaluated element-wise in case of Array or Matrix input.

      Parameters

      Returns MathJsChain<boolean>

    • Test whether a value is zero. The function can check for zero for types number, BigNumber, Fraction, Complex, and Unit. The function is evaluated element-wise in case of Array or Matrix input.

      Parameters

      Returns MathJsChain<boolean>

    • Test whether value x is larger than y. The function returns true when x is larger than y and the relative difference between x and y is larger than the configured relTol and absTol. The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise.

      Parameters

      Returns MathJsChain<boolean | MathCollection<MathNumericType>>

    • Test whether value x is larger or equal to y. The function returns true when x is larger than y or the relative difference between x and y is smaller than the configured relTol and absTol. The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise.

      Parameters

      Returns MathJsChain<boolean | MathCollection<MathNumericType>>

    • Gives the number of “leaf nodes” in the parse tree of the given expression. A leaf node is one that has no subexpressions, essentially either a symbol or a constant. Note that 5! has just one leaf, the 5; the unary factorial operator does not add a leaf. On the other hand, function symbols do add leaves, so sin(x)/cos(x) has four leaves.

      Parameters

      Returns MathJsChain<number>

    • Iterate over all elements of a matrix/array, and executes the given callback function.

      Type Parameters

      Parameters

      • this: MathJsChain<T>
      • callback: (value: any, index: number[], matrix: T) => string | MathType

        The callback function is invoked with three parameters: the value of the element, the index of the element, and the Matrix/array being traversed.

      Returns MathJsChain<T>

    • Apply a function that maps an array to a scalar along a given axis of the matrix or array. Returns a new matrix or array with one less dimension than the input.

      Type Parameters

      Parameters

      • this: MathJsChain<T>
      • dim: number

        The dimension along which the callback is applied

      • callback: (array: Matrix<MathNumericType> | MathType[]) => number

        The callback function that is applied. This Function should take an array or 1-d matrix as an input and return a number.

      Returns MathJsChain<T>

      The residual matrix with the function applied over some dimension.

    • Compute the maximum value of a matrix or a list with values. In case of a multi dimensional array, the maximum of the flattened array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based.

      Parameters

      Returns MathJsChain<any>

    • Parameters

      Returns MathJsChain<any>

    • Compute the mean value of matrix or a list with values. In case of a multi dimensional array, the mean of the flattened array will be calculated. When dim is provided, the maximum over the selected dimension will be calculated. Parameter dim is zero-based.

      Parameters

      Returns MathJsChain<any>

    • Parameters

      Returns MathJsChain<any>

    • Compute the median of a matrix or a list with values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned. Supported types of values are: Number, BigNumber, Unit In case of a (multi dimensional) array or matrix, the median of all elements will be calculated.

      Parameters

      Returns MathJsChain<any>

    • Parameters

      Returns MathJsChain<any>

    • Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from n possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai <= 0

      Type Parameters

      Parameters

      Returns MathJsChain<NoLiteralType<T>>

    • Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.

      Parameters

      • this: MathJsChain<MathCollection<MathNumericType>>
      • k: number

        The kth smallest value to be retrieved; zero-based index

      • Optionalcompare: "desc" | "asc" | ((a: any, b: any) => number)

        An optional comparator function. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: 'asc'.

      Returns MathJsChain<MathCollection<MathNumericType>>

    • Compute the number of ways of obtaining an ordered subset of k elements from a set of n elements. Permutations only takes integer arguments. The following condition must be enforced: k <= n.

      Type Parameters

      Parameters

      Returns MathJsChain<NoLiteralType<T>>

    • Random pick a value from a one dimensional array. Array element is picked using a random function with uniform distribution.

      Type Parameters

      • T

      Parameters

      Returns MathJsChain<T>

    • Type Parameters

      • T

      Parameters

      Returns MathJsChain<T[]>

    • Type Parameters

      • T

      Parameters

      Returns MathJsChain<T[]>

    • Interpolate values into a string template.

      Parameters

      • this: MathJsChain<string>
      • values: any

        An object containing variables which will be filled in in the template.

      • Optionalprecision: number

        Number of digits to format numbers. If not provided, the value will not be rounded.

      • Optionaloptions: number | object

        Formatting options, or the number of digits to format numbers. See function math.format for a description of all options.

      Returns MathJsChain<string>

    • Compute the product of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated.

      Parameters

      Returns MathJsChain<any>

    • Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.

      Parameters

      • this: MathJsChain<string | MathNode>
      • Optionaloptional: boolean | object

        scope of expression or true for already evaluated rational expression at input

      • Optionaldetailed: boolean

        optional True if return an object, false if return expression node (default)

      Returns MathJsChain<MathNode>

    • Compute the sign of a value. The sign of a value x is: 1 when x > 1 -1 when x < 0 0 when x == 0 For matrices, the function is evaluated element wise.

      Type Parameters

      Parameters

      Returns MathJsChain<T>

      The sign of x

    • Simplify an expression tree.

      Parameters

      • this: MathJsChain<string | MathNode>
      • Optionalrules: SimplifyRule[]

        A list of rules are applied to an expression, repeating over the list until no further changes are made. It’s possible to pass a custom set of rules to the function as second argument. A rule can be specified as an object, string, or function.

      • Optionalscope: object | Map<string, MathType>

        Scope to variables

      • Optionaloptions: SimplifyOptions

        Options to configure the behavior of simplify

      Returns MathJsChain<MathNode>

    • Calculate the Sparse Matrix LU decomposition with full pivoting. Sparse Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U

      Parameters

      • this: MathJsChain<Matrix<MathNumericType>>
      • order: number

        The Symbolic Ordering and Analysis order: 0 - Natural ordering, no permutation vector q is returned 1 - Matrix must be square, symbolic ordering and analisis is performed on M = A + A' 2 - Symbolic ordering and analysis is performed on M = A' * A. Dense columns from A' are dropped, A recreated from A'. This is appropriate for LU factorization of non-symmetric matrices. 3 - Symbolic ordering and analysis is performed on M = A' * A. This is best used for LU factorization is matrix M has no dense rows. A dense row is a row with more than 10*sqr(columns) entries.

      • threshold: number

        Partial pivoting threshold (1 for partial pivoting)

      Returns MathJsChain<SLUDecomposition>

    • Test whether value x is smaller than y. The function returns true when x is smaller than y and the relative difference between x and y is smaller than the configured relTol and absTol. The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise.

      Parameters

      Returns MathJsChain<boolean | MathCollection<MathNumericType>>

    • Test whether value x is smaller or equal to y. The function returns true when x is smaller than y or the relative difference between x and y is smaller than the configured relTol and absTol. The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise.

      Parameters

      Returns MathJsChain<boolean | MathCollection<MathNumericType>>

    • Sort the items in a matrix

      Type Parameters

      Parameters

      • this: MathJsChain<T>
      • compare: "desc" | "asc" | "natural" | ((a: any, b: any) => number)

        An optional _comparator function or name. The function is called as compare(a, b), and must return 1 when a > b, -1 when a < b, and 0 when a == b. Default value: ‘asc’

      Returns MathJsChain<T>

    • Split a unit in an array of units whose sum is equal to the original unit.

      Parameters

      Returns MathJsChain<Unit[]>

    • Compute the square of a value, x * x. For matrices, the function is evaluated element wise.

      Type Parameters

      Parameters

      Returns MathJsChain<T>

    • Compute the standard deviation of a matrix or a list with values. The standard deviations is defined as the square root of the variance: std(A) = sqrt(variance(A)). In case of a (multi dimensional) array or matrix, the standard deviation over all elements will be calculated. Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following values: 'unbiased' (default) The sum of squared errors is divided by (n - 1) 'uncorrected' The sum of squared errors is divided by n 'biased' The sum of squared errors is divided by (n + 1)

      Parameters

      • this: MathJsChain<number[]>
      • Optionaldim: number

        A dimension to compute standard deviation.

      • Optionalnormalization: "unbiased" | "uncorrected" | "biased"

        Determines how to normalize the variance. Choose ‘unbiased’ (default), ‘uncorrected’, or ‘biased’. Default value: ‘unbiased’.

      Returns MathJsChain<number>

      The standard deviation

    • Compute the standard deviation of a matrix or a list with values. The standard deviations is defined as the square root of the variance: std(A) = sqrt(variance(A)). In case of a (multi dimensional) array or matrix, the standard deviation over all elements will be calculated. Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following values: 'unbiased' (default) The sum of squared errors is divided by (n - 1) 'uncorrected' The sum of squared errors is divided by n 'biased' The sum of squared errors is divided by (n + 1)

      Parameters

      • this: MathJsChain<MathCollection<MathNumericType>>
      • Optionaldimension: number
      • Optionalnormalization: "unbiased" | "uncorrected" | "biased"

        Determines how to normalize the variance. Choose ‘unbiased’ (default), ‘uncorrected’, or ‘biased’. Default value: ‘unbiased’.

      Returns MathJsChain<number[]>

      The standard deviation

    • Compute the sum of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the sum of all elements will be calculated.

      Parameters

      Returns MathJsChain<number>

    • The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. stirlingS2 only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1

      Type Parameters

      Parameters

      Returns MathJsChain<NoLiteralType<T>>

    • Get or set a subset of a matrix or string.

      Type Parameters

      Parameters

      • this: MathJsChain<T>
      • index: Index

        For each dimension, an index or list of indices to get or set

      • Optionalreplacement: any

        An array, matrix, or scalar. If provided, the subset is replaced with replacement. If not provided, the subset is returned

      • OptionaldefaultValue: any

        Default value, filled in on new entries when the matrix is resized. If not provided, math.matrix elements will be left undefined. Default value: undefined.

      Returns MathJsChain<T>

    • Subtract two values, x - y. For matrices, the function is evaluated element wise.

      Type Parameters

      Parameters

      Returns MathJsChain<T>

    • Determines if two expressions are symbolically equal, i.e. one is the result of valid algebraic manipulations on the other.

      Parameters

      Returns MathJsChain<boolean>

      Returns true if a valid manipulation making the expressions equal is found.

    • Converts a unit to the most appropriate display unit. When no preferred units are provided, the function automatically find the best prefix. When preferred units are provided, it converts to the unit that gives a value closest to 1.

      Parameters

      Returns MathJsChain<Unit>

    • Parameters

      Returns MathJsChain<Unit>

    • Determine the type of a variable.

      Parameters

      Returns MathJsChain<string>

    • Inverse the sign of a value, apply a unary minus operation. For matrices, the function is evaluated element wise. Boolean values and strings will be converted to a number. For complex numbers, both real and complex value are inverted.

      Type Parameters

      Parameters

      Returns MathJsChain<T>

    • Unary plus operation. Boolean values and strings will be converted to a number, numeric values will be returned as is. For matrices, the function is evaluated element wise.

      Type Parameters

      Parameters

      Returns MathJsChain<T>

    • Test whether two values are unequal. The function tests whether the relative difference between x and y is larger than the configured relTol and absTol. The function cannot be used to compare values smaller than approximately 2.22e-16. For matrices, the function is evaluated element wise. In case of complex numbers, x.re must unequal y.re, or x.im must unequal y.im. Values null and undefined are compared strictly, thus null is unequal with everything except null, and undefined is unequal with everything except undefined.

      Parameters

      Returns MathJsChain<boolean | MathCollection<MathNumericType>>

    • Compute the variance of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the variance over all elements will be calculated. Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following values: 'unbiased' (default) The sum of squared errors is divided by (n - 1) 'uncorrected' The sum of squared errors is divided by n 'biased' The sum of squared errors is divided by (n +

      1. Note that older browser may not like the variable name var. In that case, the function can be called as math'var' instead of math.variance(...).

      Parameters

      Returns MathJsChain<number>

      The variance

    • Compute the variance of a matrix or a list with values. In case of a (multi dimensional) array or matrix, the variance over all elements will be calculated. Optionally, the type of normalization can be specified as second parameter. The parameter normalization can be one of the following values: 'unbiased' (default) The sum of squared errors is divided by (n - 1) 'uncorrected' The sum of squared errors is divided by n 'biased' The sum of squared errors is divided by (n +

      1. Note that older browser may not like the variable name var. In that case, the function can be called as math'var' instead of math.variance(...).

      Parameters

      • this: MathJsChain<MathCollection<MathNumericType>>
      • Optionaldimension: number
      • Optionalnormalization: "unbiased" | "uncorrected" | "biased"

        normalization Determines how to normalize the variance. Choose ‘unbiased’ (default), ‘uncorrected’, or ‘biased’. Default value: ‘unbiased’.

      Returns MathJsChain<number[]>

      The variance

    • Parameters

      Returns MathJsChain<number>