File:  [CSRG BSD Unix] / 43BSDTahoe / man / man3f / random.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)random.3f	6.1 (Berkeley) 5/15/85
.\"
.TH RANDOM 3F "May 15, 1985"
.UC 6
.SH NAME
random, drandm, irandm \- better random number generator
.SH SYNOPSIS
.B function irandm (iflag)
.sp 1
.B function random (iflag)
.sp 1
.B double precision function drandm (iflag)
.SH DESCRIPTION
These functions use
.IR random (3)
to generate sequences of random numbers, and
should be used rather than the older functions described in
.I man 3f rand.
If
.I iflag
is non-zero, it is used as a new seed for the random number
generator, and the first new random value is returned.
.PP
.I Irandm
returns positive integers in the range 0 through 2147483647 ( 2**31-1).
.I Random
and
.I drandm
return values in the range 0. through 1.0 by dividing the integer random number
from
.IR random (3)
by 2147483647 .
.SH FILES
.ie \nM /usr/ucb/lib/libF77.a
.el /usr/lib/libF77.a
.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.