diff options
| author | drochner <drochner@NetBSD.org> | 2006-03-31 11:43:54 +0000 |
|---|---|---|
| committer | drochner <drochner@NetBSD.org> | 2006-03-31 11:43:54 +0000 |
| commit | 273bf6508d7c483e30e074b9d9dbfce37f38892a (patch) | |
| tree | 7f2d547a2eb2ec27218158caf09335bbc74b59c2 /lib/libc/stdlib | |
| parent | 04293de9bb925e9392612d33a1835b9b71ae8986 (diff) | |
correct multiplicand in pseudorandom generation
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/rand48.3 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/rand48.3 b/lib/libc/stdlib/rand48.3 index 6ea2e5a10f1..b9939ece539 100644 --- a/lib/libc/stdlib/rand48.3 +++ b/lib/libc/stdlib/rand48.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: rand48.3,v 1.10 2003/05/10 12:24:54 wiz Exp $ +.\" $NetBSD: rand48.3,v 1.11 2006/03/31 11:43:54 drochner Exp $ .\" .\" Copyright (c) 1993 Martin Birgmeier .\" All rights reserved. @@ -55,7 +55,7 @@ congruential algorithm working on integers 48 bits in size. 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 modulus is always fixed at m = 2 ** 48. r(n) is called the seed of the random number generator. |
