Load File: __prime.sml This module defines a function, testPrime, which tests whether a given integer is a prime number. It illustrates the use of the LargeInt structure in the basis library. The module uses Fermat's algorithm to test for primes. The second argument to testPrime controls the number of integers to which the algorithm is applied. Although a given number of successful tests do not guarantee that the first argument is prime, if the number of tests is not too small, then the result is very likely to be correct. For example, to apply the algorithm to the first 15 integers to see whether 233 is a prime: Prime.testPrime (233, 15); gives val it : bool = true