diff options
author | tb <> | 2019-12-20 19:16:40 +0000 |
---|---|---|
committer | tb <> | 2019-12-20 19:16:40 +0000 |
commit | 5b9d515fc489268b7277bcd61a86c815cca416a7 (patch) | |
tree | c137395d0abe68baa3f4b126c91d4fe1582e4f12 | |
parent | 90c6438db1bcfc615be1df4658f36a10bfbe29ee (diff) | |
download | openbsd-5b9d515fc489268b7277bcd61a86c815cca416a7.tar.gz openbsd-5b9d515fc489268b7277bcd61a86c815cca416a7.tar.bz2 openbsd-5b9d515fc489268b7277bcd61a86c815cca416a7.zip |
drand48(3) returns values in [0.0, 1.0).
From j@bitminer.ca with input from Andras Farkas, deraadt, joerg@netbsd
"fix however you feel best!" jmc
-rw-r--r-- | src/lib/libc/stdlib/rand48.3 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/rand48.3 b/src/lib/libc/stdlib/rand48.3 index cc54d9174c..fa7a7179bc 100644 --- a/src/lib/libc/stdlib/rand48.3 +++ b/src/lib/libc/stdlib/rand48.3 | |||
@@ -9,9 +9,9 @@ | |||
9 | .\" of any kind. I shall in no event be liable for anything that happens | 9 | .\" of any kind. I shall in no event be liable for anything that happens |
10 | .\" to anyone/anything when using this software. | 10 | .\" to anyone/anything when using this software. |
11 | .\" | 11 | .\" |
12 | .\" $OpenBSD: rand48.3,v 1.20 2015/11/10 23:48:18 jmc Exp $ | 12 | .\" $OpenBSD: rand48.3,v 1.21 2019/12/20 19:16:40 tb Exp $ |
13 | .\" | 13 | .\" |
14 | .Dd $Mdocdate: November 10 2015 $ | 14 | .Dd $Mdocdate: December 20 2019 $ |
15 | .Dt DRAND48 3 | 15 | .Dt DRAND48 3 |
16 | .Os | 16 | .Os |
17 | .Sh NAME | 17 | .Sh NAME |
@@ -101,7 +101,7 @@ and | |||
101 | return values of type double. | 101 | return values of type double. |
102 | The full 48 bits of r(n+1) are | 102 | The full 48 bits of r(n+1) are |
103 | loaded into the mantissa of the returned value, with the exponent set | 103 | loaded into the mantissa of the returned value, with the exponent set |
104 | such that the values produced lie in the interval [0.0, 1.0]. | 104 | such that the values produced lie in the interval [0.0, 1.0). |
105 | .Pp | 105 | .Pp |
106 | .Fn lrand48 | 106 | .Fn lrand48 |
107 | and | 107 | and |