Javascript Primality Tester

Test a number here:

You must have Javascript enabled in your browser for the prime checker to work.


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.
Copyright 2008, David Wu