File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / man / man3 / rand.3c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:27:05 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

.TH RAND 3C "19 January 1983"
.SH NAME
rand, srand \- random number generator
.SH SYNOPSIS
.nf
.B srand(seed)
.B int seed;
.PP
.B rand()
.fi
.SH DESCRIPTION
.ft B
The newer random(3) should be used in new applications;
rand remains for compatibilty.
.ft R
.PP
.I Rand
uses a multiplicative congruential
random number generator
with period 2**32
to return successive pseudo-random
numbers in the range from 0 to 2**31-1.
.PP
The generator is reinitialized by calling
.I srand
with 1 as argument.
It can be set to a random starting point by calling
.I srand
with whatever you like as argument.
.SH "SEE ALSO"
random(3)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.