The documentation for isPrime implies that the test is deterministic, which it is clearly not. Correct results using the bases [2, 325, 9375, 28178, 450775, 9780504, 1795265022] are only guaranteed for N <= 2^64. The only way to make the test truly deterministic is to try all bases below 2*log(N)^2. (Assuming that the Generalized Riemann Hypothesis is true, which by all accounts is believed to be so; see here for example). Or alternately, just go with the general consensus supported by the overwhelming experimental evidence which indicates that the lower bound is actually at most log(N). (I can find a reference in case you're interested).
Anyhow, at the very least please amend the docs to make it absolutely clear that isPrime is not strictly deterministic, as it stands.
The documentation for isPrime implies that the test is deterministic, which it is clearly not. Correct results using the bases [2, 325, 9375, 28178, 450775, 9780504, 1795265022] are only guaranteed for N <= 2^64. The only way to make the test truly deterministic is to try all bases below 2*log(N)^2. (Assuming that the Generalized Riemann Hypothesis is true, which by all accounts is believed to be so; see here for example). Or alternately, just go with the general consensus supported by the overwhelming experimental evidence which indicates that the lower bound is actually at most log(N). (I can find a reference in case you're interested).
Anyhow, at the very least please amend the docs to make it absolutely clear that isPrime is not strictly deterministic, as it stands.