previous  next
IsPrime
Syntax
IsPrime(N:INT):BOOL
Summary
prime integer test
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);
ERROR: IsPrime: number too large
CONTEXT: Return(Error("IsPrime: number too large"))
-------------------------------
See also: