Author: gavin Date: Tue Feb 2 19:28:01 2010 New Revision: 203393 URL: http://svn.freebsd.org/changeset/base/203393
Log: 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 Modified: head/lib/libc/gen/rand48.3 Modified: head/lib/libc/gen/rand48.3 ============================================================================== --- head/lib/libc/gen/rand48.3 Tue Feb 2 19:19:57 2010 (r203392) +++ head/lib/libc/gen/rand48.3 Tue Feb 2 19:28:01 2010 (r203393) @@ -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. _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[email protected]"
