Function primeLimit

  • Calculate the prime limit of an integer or a fraction.

    Parameters

    • n: bigint | FractionValue

      Integer or fraction to calculate prime limit for.

    • asOrdinal: boolean = false

      Return the limit as an ordinal instead of a prime. (1 is #0, 2 is #1, 3 is #2, 5 is #3, etc.)

    • maxLimit: number = 7919

      Maximum prime limit to consider.

    Returns number

    The largest prime in the factorization of the input. Infinity if above the maximum limit. NaN if not applicable.