Skip to content

bigIntIsPrime

bigIntIsPrime(value): boolean

Defined in: big-int/is-prime.ts:11

Deterministic Miller–Rabin primality test. Witnesses cover every bigint up to 3.3 × 10²⁴; beyond that this is a strong probable-prime test rather than a proof.

bigint

Must be non-negative; primality of a negative number is undefined.

boolean