NTTL Function - IsPrime

Description
Determine, probabilistically, if a given number is prime.
Header
<nttl/isPrime.h>
Signature
template< class T >
bool
IsPrime( const T &X, size_t security )
Parameters
Name Type Description
X T The number being tested.
security size_t The number of trials of the probabilistic algorithm to be performed.  Increasing this parameter decreases the chance of a composite being reported as prime, but also increases the running time of the algorithm.  The default value of this parameter is 20.
Returns
( bool )  If this function returns false, then the number X is composite.  If it returns true, then X is probably prime (with probability approximately ??).
Example
#include <nttl/isPrime.h>
...
if( IsPrime( 1239873, 20 ) )
   cout << "It is prime!" << endl;
Algorithm
<Find a reference to the algorithm.  Describe it, along with error probability.>
References
<related literature references>