eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'RandomBlumBlumShub':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RandomBlumBlumShub


Inheritance:

   Object
   |
   +--RandomBlumBlumShub

Package:
stx:libbasic2
Category:
Magnitude-Numbers-Random
Version:
rev: 1.3 date: 2018/03/02 13:04:31
user: cg
file: RandomBlumBlumShub.st directory: libbasic2
module: stx stc-classLibrary: libbasic2
Author:
Claus Gittinger.

Description:


NO WARRANTY

This generator uses the blum blub shub algorithm to generate random numbers.
It is very slow, but considered to provide good random numbers.

RandomBlumBlumShub new nextInteger


Related information:

    RandomGenerator
    -
    the
    default;
    uses
    the
    machine's
    /dev/random
    if
    available
    Random
    -
    fast,
    but
    generates
    less
    quality
    random
    numbers
    RandomTT800
    -
    another
    random
    generator
    RandomParkMiller
    -
    another
    random
    generator
    RandomMT19937
    -
    another
    random
    generator
    RandomKISS
    -
    another
    random
    generator
    [xept]
    -
    a
    library
    containing
    more
    stuff
    based
    on
    hashes
    and
    cyphers

Class protocol:

instance creation
o  new

o  new: seed


Instance protocol:

initialization
o  initialize
The two primes, p and q, should both be congruent to 3 (mod 4)

usage example(s):

     self new initialize

o  seed: seedArg

random numbers
o  nextBoolean
generates the next random boolean

o  nextInteger
generates the next integer in 0..FFFFFFFF

usage example(s):

     self new nextInteger.

     |r|
     r := self new
     100 timesRepeat:[ Transcript showCR:r nextInteger].



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 24 Apr 2024 05:10:52 GMT