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


Ulm's Oberon Library:
Lehmann


NAME

Lehmann - implementation of the Lehmann primality testing algorithm

SYNOPSIS

VAR test: Primes.Test;

DESCRIPTION

Lehmann offers the implementation of the primality testing algorithm developed by D. J. Lehmann. Look at SIAM Journal on Computing, v. 11, n. 2, May 1982, pp. 374-375: D. J. Lehmann, On Primality Tests as a reference. The test wrongly declares a none-prime a prime in 1/2 of the cases. The tests are independent and consequently n tests declare a none-prime a prime in 1/$2 sup n$ of the cases.

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

Lehmann must have the possibility to create random numbers of the type specified by the given value to be tested. Consequently, a module importing Lehmann must also import a service provider for the generation of random numbers of the specified type (see, for example, RandCard1024s).

AUTHOR

Frank B.J. Fischer

SEE ALSO

Primes
general abstraction for primality testing algorithms
QuickPrimeTest
a quick test for small primes
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