aboutsummaryrefslogtreecommitdiffstats
path: root/random.txi
diff options
context:
space:
mode:
Diffstat (limited to 'random.txi')
-rw-r--r--random.txi26
1 files changed, 17 insertions, 9 deletions
diff --git a/random.txi b/random.txi
index d9474f9..ba86c84 100644
--- a/random.txi
+++ b/random.txi
@@ -1,17 +1,23 @@
+@code{(require 'random)}
+@ftindex random
-@defun random n
-@defunx random n state
-Accepts a positive integer or real @var{n} and returns a number of the
-same type between zero (inclusive) and @var{n} (exclusive). The values
-returned by @code{random} are uniformly distributed from 0 to @var{n}.
+
+@defun random n state
+
+
+@defunx random n
+
+@var{n} must be an exact positive integer. @code{random} returns an exact integer
+between zero (inclusive) and @var{n} (exclusive). The values returned by
+@code{random} are uniformly distributed from 0 to @var{n}.
The optional argument @var{state} must be of the type returned by
-@code{(seed->random-state)} or @code{(make-random-state)}. It defaults
-to the value of the variable @code{*random-state*}. This object is used
-to maintain the state of the pseudo-random-number generator and is
-altered as a side effect of calls to @code{random}.
+@code{(seed->random-state)} or @code{(make-random-state)}. It
+defaults to the value of the variable @code{*random-state*}. This
+object is used to maintain the state of the pseudo-random-number
+generator and is altered as a side effect of calls to @code{random}.
@end defun
@defvar *random-state*
Holds a data structure that encodes the internal state of the
@@ -53,3 +59,5 @@ Scheme object; the first 50 characters of its printed representation
will be used as the seed. Otherwise the value of @code{*random-state*}
is used as the seed.
@end defun
+
+