(base: bigint, exp: bigint, mod: bigint)
| 183 | 5n, |
| 184 | 7n, |
| 185 | 11n, |
| 186 | 13n, |
| 187 | 17n, |
| 188 | 19n, |
| 189 | 23n, |
| 190 | 29n, |
| 191 | 31n, |
| 192 | 37n, |
| 193 | ]; |
| 194 | |
| 195 | export function isPrimeBigint(n: bigint): boolean { |
| 196 | if (n < 2n) return false; |
| 197 | if (n <= LARGEST_SMALL_PRIME) return SMALL_PRIMES.has(Number(n)); |
| 198 | if (n < MILLER_RABIN_THRESHOLD) { |
no outgoing calls
no test coverage detected