History log of /openbsd-src/games/random/random.6 (Results 1 – 8 of 8)
Revision Date Author Comments
# 534f87a3 23-Aug-2022 tb <tb@openbsd.org>

Rework random(6)

Fix putchar(3) handling and a number of other issues in the random(6)
code. In -e mode, avoid bias due to truncation of the return code to
8 bits. In default mode, actually treat th

Rework random(6)

Fix putchar(3) handling and a number of other issues in the random(6)
code. In -e mode, avoid bias due to truncation of the return code to
8 bits. In default mode, actually treat the denominator as a floating
point number and print the line with a probability of 1 / denominator.
This allows e.g. printing 2/3 of stdin with 'random 1.5'.

Includes code for uniform random floats by Taylor R. Campbell from
https://mumble.net/~campbell/2014/04/28/uniform-random-float
and clz64() by me.

From lucic71 () bronze ! ctrl-c ! club, thanks.

ok deraadt

show more ...


# 9490d37c 31-May-2007 jmc <jmc@openbsd.org>

convert to new .Dd format;


# 7a09557b 03-Jun-2003 millert <millert@openbsd.org>

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# fc8533a3 23-May-1999 aaron <aaron@openbsd.org>

remove argument from .Os macros so value in /usr/share/tmac/mdoc/doc-common
is used instead; kwesterback@home.com


# a702fa09 15-Dec-1998 pjanzen <pjanzen@openbsd.org>

Always provide an argument to .Nm in SYNOPSIS section


# 3897dfee 29-Nov-1998 pjanzen <pjanzen@openbsd.org>

Don't capitalize game names at the beginning of sentences.


# fdb7e56c 22-Aug-1998 pjanzen <pjanzen@openbsd.org>

More largely NetBSD-inspired code cleanup


# df930be7 18-Oct-1995 deraadt <deraadt@openbsd.org>

initial import of NetBSD tree