diff options
Diffstat (limited to 'src/lib/libc/stdlib')
-rw-r--r-- | src/lib/libc/stdlib/random.3 | 13 | ||||
-rw-r--r-- | src/lib/libc/stdlib/tsearch.3 | 4 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/libc/stdlib/random.3 b/src/lib/libc/stdlib/random.3 index e1ab9e44da..7b8a566115 100644 --- a/src/lib/libc/stdlib/random.3 +++ b/src/lib/libc/stdlib/random.3 | |||
@@ -29,7 +29,7 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" $OpenBSD: random.3,v 1.8 1999/06/29 18:36:23 aaron Exp $ | 32 | .\" $OpenBSD: random.3,v 1.9 1999/07/04 18:59:43 aaron Exp $ |
33 | .\" | 33 | .\" |
34 | .Dd April 19, 1991 | 34 | .Dd April 19, 1991 |
35 | .Dt RANDOM 3 | 35 | .Dt RANDOM 3 |
@@ -56,9 +56,7 @@ The | |||
56 | function | 56 | function |
57 | uses a non-linear additive feedback random number generator employing a | 57 | uses a non-linear additive feedback random number generator employing a |
58 | default table of size 31 long integers to return successive pseudo-random | 58 | default table of size 31 long integers to return successive pseudo-random |
59 | numbers in the range from 0 to | 59 | numbers in the range from 0 to (2**31)\-1. |
60 | .if t 2\u\s731\s10\d\(mi1. | ||
61 | .if n (2**31)\(mi1. | ||
62 | The maximum value returned by | 60 | The maximum value returned by |
63 | .Fn random | 61 | .Fn random |
64 | is | 62 | is |
@@ -66,8 +64,7 @@ is | |||
66 | (as defined by the header file | 64 | (as defined by the header file |
67 | .Aq Pa limits.h ) . | 65 | .Aq Pa limits.h ) . |
68 | The period of this random number generator is very large, approximately | 66 | The period of this random number generator is very large, approximately |
69 | .if t 16\(mu(2\u\s731\s10\d\(mi1). | 67 | 16*((2**31)\-1. |
70 | .if n 16*((2**31)\(mi1). | ||
71 | .Pp | 68 | .Pp |
72 | The | 69 | The |
73 | .Fn random Ns / Fn srandom | 70 | .Fn random Ns / Fn srandom |
@@ -148,9 +145,7 @@ is that the size of the state array does not have to be remembered after | |||
148 | it is initialized. | 145 | it is initialized. |
149 | .Pp | 146 | .Pp |
150 | With 256 bytes of state information, the period of the random number | 147 | With 256 bytes of state information, the period of the random number |
151 | generator is greater than | 148 | generator is greater than 2**69 |
152 | .if t 2\u\s769\s10\d, | ||
153 | .if n 2**69 | ||
154 | which should be sufficient for most purposes. | 149 | which should be sufficient for most purposes. |
155 | .Sh AUTHOR | 150 | .Sh AUTHOR |
156 | Earl T. Cohen | 151 | Earl T. Cohen |
diff --git a/src/lib/libc/stdlib/tsearch.3 b/src/lib/libc/stdlib/tsearch.3 index 8456457e27..79e220e2cb 100644 --- a/src/lib/libc/stdlib/tsearch.3 +++ b/src/lib/libc/stdlib/tsearch.3 | |||
@@ -23,7 +23,7 @@ | |||
23 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 23 | .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
24 | .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 | .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
25 | .\" | 25 | .\" |
26 | .\" $OpenBSD: tsearch.3,v 1.5 1999/06/29 18:36:24 aaron Exp $ | 26 | .\" $OpenBSD: tsearch.3,v 1.6 1999/07/04 18:59:43 aaron Exp $ |
27 | .\" | 27 | .\" |
28 | .Dd June 15, 1997 | 28 | .Dd June 15, 1997 |
29 | .Dt TSEARCH 3 | 29 | .Dt TSEARCH 3 |
@@ -84,7 +84,7 @@ will be adjusted. | |||
84 | .Pp | 84 | .Pp |
85 | .Fn twalk | 85 | .Fn twalk |
86 | walks the binary search tree rooted in | 86 | walks the binary search tree rooted in |
87 | .fa root | 87 | .Fa root |
88 | and calls the function | 88 | and calls the function |
89 | .Fa action | 89 | .Fa action |
90 | on each node. | 90 | on each node. |