Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
QuickPrimeTest


NAME

QuickPrimeTest - quick primality test for small numbers

SYNOPSIS

VAR test: Primes.Test;

DESCRIPTION

QuickPrimeTest offers a quick primality test for small numbers to speed up prime number generators using primality testing algorithms like RabinMiller or Lehmann if large primes are needed. Therefore, QuickPrimeTest contains a list of the first 1028 prime numbers (the largest prime in the list is 8191) and checks if the given value is divisible by or equal to one of these small primes. Thus a lot of numbers can be excluded without starting the actual primality testing algorithm.

During its initialization, QuickPrimeTest creates an interface of the type defined in Primes and connects it to test.

AUTHOR

Frank B.J. Fischer

SEE ALSO

Primes
general abstraction for primality testing algorithms
Lehmann
implementation of the Lehmann primality testing algorithm
RabinMiller
implementation of the Rabin-Miller primality testing algorithm
PrimeGen
implementation of a prime number generator

Edited by: borchert, last change: 1997/04/03, revision: 1.1, converted to HTML: 1997/04/28

Oberon || Library || Module Index || Search Engine || Definition || Module