Date: Tue, 23 Feb 2010 19:37:00 +0000 (UTC) From: Gavin Atkinson <gavin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r204255 - stable/7/lib/libc/gen Message-ID: <201002231937.o1NJb0T3059880@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gavin Date: Tue Feb 23 19:37:00 2010 New Revision: 204255 URL: http://svn.freebsd.org/changeset/base/204255 Log: Merge r203393,r203395 from head: 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 Modified: stable/7/lib/libc/gen/rand48.3 Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) Modified: stable/7/lib/libc/gen/rand48.3 ============================================================================== --- stable/7/lib/libc/gen/rand48.3 Tue Feb 23 19:34:22 2010 (r204254) +++ stable/7/lib/libc/gen/rand48.3 Tue Feb 23 19:37:00 2010 (r204255) @@ -12,7 +12,7 @@ .\" @(#)rand48.3 V1.0 MB 8 Oct 1993 .\" $FreeBSD$ .\" -.Dd October 8, 1993 +.Dd February 2, 2010 .Dt RAND48 3 .Os .Sh NAME @@ -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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201002231937.o1NJb0T3059880>