20 lines
669 B
Diff
20 lines
669 B
Diff
--- man-pages-2.43/man3/rand.3.pom 2007-02-15 09:53:56.000000000 +0100
|
|
+++ man-pages-2.43/man3/rand.3 2007-02-15 10:08:45.000000000 +0100
|
|
@@ -101,6 +101,16 @@
|
|
The versions of \fBrand\fP() and \fBsrand\fP() in the Linux C Library use
|
|
the same random number generator as \fBrandom\fP() and \fBsrandom\fP(), so
|
|
the lower-order bits should be as random as the higher-order bits.
|
|
+.PP
|
|
+Most modern
|
|
+.BR rand()
|
|
+functions, including the one provided on Linux systems,
|
|
+do not suffer from this problem, so using expressions like
|
|
+.RS
|
|
+rand() % 10
|
|
+.RE
|
|
+works fine.
|
|
+.PP
|
|
However, on older
|
|
.BR rand ()
|
|
implementations, and on current implementations on different systems,
|