Deleted Added
full compact
random.4 (130582) random.4 (131530)
1.\" Copyright (c) 2001 Mark R V Murray. All rights reserved.
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions
5.\" are met:
6.\" 1. Redistributions of source code must retain the above copyright
7.\" notice, this list of conditions and the following disclaimer.
8.\" 2. Redistributions in binary form must reproduce the above copyright

--- 7 unchanged lines hidden (view full) ---

16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22.\" SUCH DAMAGE.
23.\"
1.\" Copyright (c) 2001 Mark R V Murray. All rights reserved.
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions
5.\" are met:
6.\" 1. Redistributions of source code must retain the above copyright
7.\" notice, this list of conditions and the following disclaimer.
8.\" 2. Redistributions in binary form must reproduce the above copyright

--- 7 unchanged lines hidden (view full) ---

16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22.\" SUCH DAMAGE.
23.\"
24.\" $FreeBSD: head/share/man/man4/random.4 130582 2004-06-16 08:33:57Z ru $
24.\" $FreeBSD: head/share/man/man4/random.4 131530 2004-07-03 18:29:24Z ru $
25.\"
26.Dd February 10, 2001
27.Dt RANDOM 4
28.Os
29.Sh NAME
30.Nm random
31.Nd the entropy device
32.Sh DESCRIPTION

--- 186 unchanged lines hidden (view full) ---

219it should produce the same results.
220A peripheral concern for simulation is
221the speed of a random number generator.
222.Pp
223Another issue in simulation is
224the size of the state associated with the random number generator, and
225how frequently it repeats itself.
226For example,
25.\"
26.Dd February 10, 2001
27.Dt RANDOM 4
28.Os
29.Sh NAME
30.Nm random
31.Nd the entropy device
32.Sh DESCRIPTION

--- 186 unchanged lines hidden (view full) ---

219it should produce the same results.
220A peripheral concern for simulation is
221the speed of a random number generator.
222.Pp
223Another issue in simulation is
224the size of the state associated with the random number generator, and
225how frequently it repeats itself.
226For example,
227a program which shuffles a pack of cards should have 52! possible outputs,
228which requires the random number generator to have 52! starting states.
227a program which shuffles a pack of cards should have 52!\& possible outputs,
228which requires the random number generator to have 52!\& starting states.
229This means the seed should have at least log_2(52!) ~ 226 bits of state
230if the program is to stand a chance of outputting all possible sequences,
231and the program needs some unbiased way of generating these bits.
232Again,
233the
234.Nm
235device could be used for seeding here,
236but in practice, smaller seeds are usually considered acceptable.

--- 97 unchanged lines hidden ---
229This means the seed should have at least log_2(52!) ~ 226 bits of state
230if the program is to stand a chance of outputting all possible sequences,
231and the program needs some unbiased way of generating these bits.
232Again,
233the
234.Nm
235device could be used for seeding here,
236but in practice, smaller seeds are usually considered acceptable.

--- 97 unchanged lines hidden ---