mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Fix the bug reported by Torbjorn Granlund <tege@cygnus.com>:
The documentation for mrand48 and lrand48 is mixed up. mrand48 returns a full 32 bit number, while lrand48 only returns 31 bits.
This commit is contained in:
parent
c8ac34903c
commit
6424ff77c2
1 changed files with 5 additions and 5 deletions
|
|
@ -71,16 +71,16 @@ such that the values produced lie in the interval [0.0, 1.0).
|
|||
and
|
||||
.Fn nrand48
|
||||
return values of type long in the range
|
||||
[-2**31, 2**31-1]. The high-order (32) bits of
|
||||
r(n+1) are loaded into the returned value.
|
||||
[0, 2**31-1]. The high-order (31) bits of
|
||||
r(n+1) are loaded into the lower bits of the returned value, with
|
||||
the topmost (sign) bit set to zero.
|
||||
.Pp
|
||||
.Fn mrand48
|
||||
and
|
||||
.Fn jrand48
|
||||
return values of type long in the range
|
||||
[0, 2**31-1]. The high-order (31) bits of
|
||||
r(n+1) are loaded into the lower bits of the returned value, with
|
||||
the topmost (sign) bit set to zero.
|
||||
[-2**31, 2**31-1]. The high-order (32) bits of
|
||||
r(n+1) are loaded into the returned value.
|
||||
.Pp
|
||||
.Fn drand48 ,
|
||||
.Fn lrand48 ,
|
||||
|
|
|
|||
Loading…
Reference in a new issue