summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/random.313
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
index 84680e2..d1b8208 100644
--- a/lib/libc/stdlib/random.3
+++ b/lib/libc/stdlib/random.3
@@ -64,11 +64,16 @@ The period of this random number generator is very large, approximately
.if n 16*((2**31)\(mi1).
.Pp
The
-.Fn random Ns / Fn srandom
-have (almost) the same calling sequence and initialization properties as
-.Xr rand 3 Ns / Xr srand 3 .
+.Fn random
+and
+.Fn srandom
+functions have (almost) the same calling sequence and initialization properties as the
+.Xr rand 3
+and
+.Xr srand 3
+functions.
The difference is that
-.Xr rand
+.Xr rand 3
produces a much less random sequence \(em in fact, the low dozen bits
generated by rand go through a cyclic pattern. All the bits generated by
.Fn random
OpenPOWER on IntegriCloud