@tempots/std
biPrevPrime() function
Returns the previous prime number less than the given number. Throws an error if there is no previous prime.
Signature:
biPrevPrime: (x: bigint) => bigint
Parameters
Parameter |
Type |
Description |
---|---|---|
x |
bigint |
The number to find the previous prime for. |
Returns: bigint
The previous prime number less than x
.
Exceptions
Throws ArgumentError
if there is no previous prime.