AlyaNum
    Preparing search index...

    Interface AlyaNum

    Library for performing mathematical operations on numbers exceeding 2^1024.

    interface AlyaNum {
        exponent: number;
        heptate: number;
        hexate: number;
        lbencode: () => number;
        multiplicand: number;
        pentate: number;
        sign: -1 | 0 | 1;
        tetrate: number;
        toBaseAlya: (number: AlyaNum) => BaseAlyaNum;
        abs(): AlyaNum;
        add(number: Number): AlyaNum;
        ceil(): AlyaNum;
        compare(number: Number): -1 | 0 | 1;
        div(number: Number): AlyaNum;
        equals(number: Number): boolean;
        factorial(): AlyaNum;
        floor(): AlyaNum;
        hext(number: Number): AlyaNum;
        isCloseTo(
            number: Number,
            relativeTolerance?: number,
            absoluteTolerance?: Number,
        ): boolean;
        isInteger(): boolean;
        lambertw(): AlyaNum;
        lessEquals(number: Number): boolean;
        lessThan(number: Number): boolean;
        log(number: Number): AlyaNum | undefined;
        log10(): AlyaNum | undefined;
        mod(number: Number): AlyaNum;
        moreEquals(number: Number): boolean;
        moreThan(number: Number): boolean;
        mul(number: Number): AlyaNum;
        pent(number: Number): AlyaNum;
        pow(number: Number): AlyaNum;
        reciprocal(): AlyaNum;
        revert(): number;
        root(number: Number): AlyaNum;
        round(): AlyaNum;
        slog(number: Number): AlyaNum;
        sub(number: Number): AlyaNum;
        tet(number: Number): AlyaNum;
        toEChain(): string;
        toEnt(): string;
        toHyperE(): string;
        toNumber(): number;
        toScientific(): string;
        toSingle(): number;
        toString(): string;
        toSuffix(): string;
        unary(): AlyaNum;
    }

    Hierarchy (View Summary)

    Index
    exponent: number

    This number primitive represents how many times to perform 10^multiplicand. e.g. exponent = 2 would yield in 10^(10^multiplicand).

    heptate: number

    This number primitive represents how many times to perform 10^^^^^multiplicand. e.g. heptate = 2 would yield in 10^^^^^(10^^^^^multiplicand)).

    hexate: number

    This number primitive represents how many times to perform 10^^^^multiplicand. e.g. hexate = 2 would yield in 10^^^^(10^^^^multiplicand)).

    lbencode: () => number

    Converts AlyaNum to a single primitive number for leaderboards.

    multiplicand: number

    This number primitive represents the significant digits of the entire number.

    pentate: number

    This number primitive represents how many times to perform 10^^^multiplicand. e.g. pentate = 2 would yield in 10^^^(10^^^multiplicand)).

    sign: -1 | 0 | 1

    This number primitive represents whether the number is positive, negative or zero.

    tetrate: number

    This number primitive represents how many times to perform 10^^multiplicand. e.g. tetrate = 3 would yield in 10^^(10^^(10^^(multiplicand))).

    toBaseAlya: (number: AlyaNum) => BaseAlyaNum

    Strips the metatable from the AlyaNum object and returns a BaseAlyaNum. This is mutable, so be careful when using it.

    • Adds the specified number to this AlyaNum and returns the result as a new AlyaNum.

      Parameters

      • number: Number

        The number to add (can be AlyaNum, BaseAlyaNum, or primitive number).

      Returns AlyaNum

    • Rounds up the AlyaNum to the nearest integer. This operation is unsafe for numbers beyond 2^1024.

      Returns AlyaNum

    • Checks if this AlyaNum is exactly equal to the specified number.

      Parameters

      • number: Number

        The number to compare against.

      Returns boolean

      True if the numbers are equal, false otherwise.

    • Returns the factorial of this non-negative integer AlyaNum. Large inputs use a logarithmic Stirling approximation.

      Returns AlyaNum

    • Rounds down the AlyaNum to the nearest integer. This operation is unsafe for numbers beyond 2^1024.

      Returns AlyaNum

    • Returns x^^^^y, where ^^^^ = hexation, and hexation is repeated pentation. This is an expensive operation, performing generally ~8-80x worse than mul depending on different values and whether the height is an integer or not. Do try to minimize calls of this function.

      Parameters

      • number: Number

        Height of the pentation tower. If the height is not an integer, lambertw is used to approximate the final result.

      Returns AlyaNum

    • Checks if this AlyaNum is approximately equal to the specified number.

      Parameters

      • number: Number

        The number to compare against.

      • OptionalrelativeTolerance: number

        Maximum relative difference. Defaults to 1e-9.

      • OptionalabsoluteTolerance: Number

        Maximum absolute difference. Defaults to 0.

      Returns boolean

      True if the numbers are close, false otherwise.

    • Returns if the AlyaNum is an integer. This operation is unsafe for numbers beyond 2^1024.

      Returns boolean

    • Checks if this AlyaNum is less than or equal to the specified number.

      Parameters

      • number: Number

        The number to compare against.

      Returns boolean

      True if this AlyaNum is less than or equal, false otherwise.

    • Checks if this AlyaNum is less than the specified number.

      Parameters

      • number: Number

        The number to compare against.

      Returns boolean

      True if this AlyaNum is less, false otherwise.

    • Checks if this AlyaNum is greater than or equal to the specified number.

      Parameters

      • number: Number

        The number to compare against.

      Returns boolean

      True if this AlyaNum is greater than or equal, false otherwise.

    • Checks if this AlyaNum is greater than the specified number.

      Parameters

      • number: Number

        The number to compare against.

      Returns boolean

      True if this AlyaNum is greater, false otherwise.

    • Multiplies this AlyaNum by the specified number and returns the result as a new AlyaNum.

      Parameters

      • number: Number

        The number to multiply by.

      Returns AlyaNum

    • Returns x^^^y, where ^^^ = pentation, and pentation is repeated tetration. This is an expensive operation, performing generally ~8-80x worse than mul depending on different values and whether the height is an integer or not. Do try to minimize calls of this function.

      Parameters

      • number: Number

        Height of the tetration tower. If the height is not an integer, lambertw is used to approximate the final result.

      Returns AlyaNum

    • Raises this AlyaNum to the power of the specified number and returns the result as a new AlyaNum.

      Parameters

      • number: Number

        The exponent value.

      Returns AlyaNum

    • Reverts the AlyaNum back to a primitive number. For numbers beyond 2^1024, this will return math.huge. Functionally equivalent to toNumber.

      Returns number

      Use toNumber instead

    • Returns x^^y, where ^^ = tetration, and tetration is repeated exponentiation. This is an expensive operation, performing generally ~8-80x worse than mul depending on different values and whether the height is an integer or not. Do try to minimize calls of this function.

      Parameters

      • number: Number

        Height of the power tower. If the height is not an integer, lambertw is used to approximate the final result.

      Returns AlyaNum

    • Converts the AlyaNum into a string in an E chain. An E chain is exactly what it says. 1e(1e1M) is formatted as ee1M. E chains place all Es at the start, and have a maximum chain of 10 Es.

      Returns string

      Resulting string

    • Reverts the AlyaNum back to a primitive number. For numbers beyond 2^1024, this will return math.huge.

      Returns number

    • Converts the AlyaNum into a string in scientific notation format.

      Returns string

      Resulting string

    • Converts the AlyaNum into a single primitive number that represents the magnitude of the number. This method should only be used for leaderboards and other things that do not require the specific number itself as the resulting single numbers are highly inaccurate.

      Returns number

      Resulting single number

    • Converts the AlyaNum object into a displayable string.

      Returns string

      Resulting string

    • Converts the AlyaNum into a string with a number and suffix. Use the AlyaNum.changeSuffixes method to edit the suffixes. If a suffix for the specified AlyaNum is not found, scientific notation is used.

      Returns string

      Resulting string