Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ srand(3c) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

drand48(3)



     rand(3c)                   DG/UX 4.30                    rand(3c)



     NAME
          rand, srand - simple random-number generator

     SYNOPSIS
          int rand ( )

          void srand (seed)
          unsigned seed;

     DESCRIPTION
          rand uses a multiplicative congruential random-number
          generator with period 2^32 that returns successive pseudo-
          random numbers in the range from 0 to (2^15)-1.

          Srand can be called at any time to reset the random-number
          generator to a random starting point.  The generator is
          initially seeded with a value of 1.

     NOTES
          The spectral properties of rand are limited.  Drand48(3)
          provides a much better, though more elaborate, random-number
          generator.

     SEE ALSO
          drand48(3).






























     Licensed material--property of copyright holder(s)         Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026