home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / ada_1 / Examples_ada_random_ < prev    next >
Encoding:
Text File  |  1994-08-14  |  438 b   |  16 lines

  1. -- ++
  2. -- A superior Random Number Generator.
  3. -- This generator is one of the class discovered by Marsaglia and Zaman
  4. -- and printed in .EXE (Nov.1992).
  5. -- The generator uses the subtractive method and has a period of just
  6. -- under 2^1178 or 10^354. The generator is
  7. --      Xn = X[n-24] - X[n-37] - b) MOD 2^32
  8. -- where b is the borrow from the previous iteration.
  9. -- --
  10.  
  11. package Random is
  12.  
  13.   function Random return Integer;
  14.  
  15. end Random;
  16.