Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

rand(3c)

rand(3f)  —  RISC

NAME

rand, irand, srand − random number generator

SYNTAX

integer iseed, i, irand
double precision s, rand call srand(iseed) i = irand( ) x = rand( )

DESCRIPTION

The irand function generates successive pseudo-random integers in the range from 0 to 2**15−1. The rand function generates pseudo-random numbers distributed in [−, 1.0]. The srand function uses its integer argument to reinitialize the seed for successive invocations of irand and rand.

SEE ALSO

rand(3c)

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