up previous next
IsPrime

prime integer test

Syntax
IsPrime(N:INT):BOOL

Description
This function determines whether a small integer is prime. The range of permitted values for N is the same the range of permitted values for the NextPrime function: on most platforms N <= 45000 should work fine, on some platforms considerably larger values will work. For N greater than the limit an error is raised.

Example
/**/  IsPrime(32003);
true

/**/  IsPrime(10^100);
false

See Also