Javascript Primality Tester
PRIME
Javascript Primality Generator
You must have Javascript enabled in your browser for the prime checker to work.
Algorithm
The above prime checker performs 50 rounds of a Miller-Rabin primality test, a fast probabilistic prime checking algorithm.The algorithm is guaranteed not to produce false negatives - if a number is declared composite, then it is definitely composite.
However, with astronomically small probability, a false positive may occur - it is possible (but extraordinarily unlikely)
that a number declared prime is actually composite.
Different resources say about, errors probability for MR algorithm is: (1/4)^k = 4^(-k); or (1/N)^k = N^(-k), where N - number, k - rounds.