summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorgavin <gavin@FreeBSD.org>2010-02-02 19:28:01 +0000
committergavin <gavin@FreeBSD.org>2010-02-02 19:28:01 +0000
commitf4a1ca000f01cb18d4e8ebe16dddcf0745b7a03b (patch)
tree10306c91451ac7ffe4acf5b2a1467da50d664a61 /lib
parentca42e1d1ceb9cfd3924a389a273d173d25ae7523 (diff)
downloadFreeBSD-src-f4a1ca000f01cb18d4e8ebe16dddcf0745b7a03b.zip
FreeBSD-src-f4a1ca000f01cb18d4e8ebe16dddcf0745b7a03b.tar.gz
The multiplicand a = 0x5deece66d = 25214903917, not 0xfdeece66d.
This bug in the man page has gone unnoticed for over 15 years! PR: docs/143461 Submitted by: Jeremy Huddleston jeremyhu apple.com Approved by: ed (mentor, implicit) MFC after: 1 week
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/rand48.32
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/rand48.3 b/lib/libc/gen/rand48.3
index a703ba0..5f6811d 100644
--- a/lib/libc/gen/rand48.3
+++ b/lib/libc/gen/rand48.3
@@ -57,7 +57,7 @@ The
particular formula employed is
r(n+1) = (a * r(n) + c) mod m
where the default values are
-for the multiplicand a = 0xfdeece66d = 25214903917 and
+for the multiplicand a = 0x5deece66d = 25214903917 and
the addend c = 0xb = 11.
The modulo is always fixed at m = 2 ** 48.
r(n) is called the seed of the random number generator.
OpenPOWER on IntegriCloud