Browse Source

remove confusing comparison with srand (it does not return the old seed)

use .Sh AUTHORS and .An for author
OPENBSD_3_0
assar 23 years ago
parent
commit
b453282020
1 changed files with 3 additions and 11 deletions
  1. +3
    -11
      src/lib/libc/stdlib/random.3

+ 3
- 11
src/lib/libc/stdlib/random.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: random.3,v 1.12 2000/04/20 13:50:02 aaron Exp $
.\" $OpenBSD: random.3,v 1.13 2001/06/09 01:41:59 assar Exp $
.\" .\"
.Dd April 19, 1991 .Dd April 19, 1991
.Dt RANDOM 3 .Dt RANDOM 3
@ -81,16 +81,8 @@ For example,
will produce a random binary will produce a random binary
value. value.
.Pp .Pp
Unlike
.Xr srand ,
.Fn srandom
does not return the old seed; the reason for this is that the amount of
state information used is much more than a single word.
(Two other routines are provided to deal with restarting/changing random
number generators).
Like Like
.Xr rand 3 , .Xr rand 3 ,
however,
.Fn random .Fn random
will by default produce a sequence of numbers that can be duplicated will by default produce a sequence of numbers that can be duplicated
by calling by calling
@ -162,8 +154,8 @@ it is initialized.
With 256 bytes of state information, the period of the random number With 256 bytes of state information, the period of the random number
generator is greater than 2**69 generator is greater than 2**69
which should be sufficient for most purposes. which should be sufficient for most purposes.
.Sh AUTHOR
Earl T. Cohen
.Sh AUTHORS
.An Earl T. Cohen
.Sh DIAGNOSTICS .Sh DIAGNOSTICS
If If
.Fn initstate .Fn initstate


Loading…
Cancel
Save