xref: /original-bsd/share/man/man3f/random.3 (revision c3e32dec)
Copyright (c) 1983, 1993
The Regents of the University of California. All rights reserved.

%sccs.include.proprietary.roff%

@(#)random.3 8.1 (Berkeley) 06/05/93

RANDOM 3F ""
C 6
NAME
random, drandm, irandm - better random number generator
SYNOPSIS
function irandm (iflag) function random (iflag) double precision function drandm (iflag)
DESCRIPTION
These functions use random (3) to generate sequences of random numbers, and should be used rather than the older functions described in man 3f rand. If iflag is non-zero, it is used as a new seed for the random number generator, and the first new random value is returned.

Irandm returns positive integers in the range 0 through 2147483647 ( 2**31-1). Random and drandm return values in the range 0. through 1.0 by dividing the integer random number from random (3) by 2147483647 .

FILES
"SEE ALSO"
random(3)