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. |
#include <nttl/isPrime.h> ... if( IsPrime( 1239873, 20 ) ) cout << "It is prime!" << endl; |