aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2018-08-18 15:39:05 -0700
committerPaul Eggert2018-08-18 15:42:00 -0700
commit97d273033b523bc07911c848d4e8bf96cdce0c90 (patch)
tree1def37fdbac9d108c5930a15d1538982f40b52a7 /src
parent673b1785db4604efe81b8045a9d8ab68936af719 (diff)
downloademacs-97d273033b523bc07911c848d4e8bf96cdce0c90.tar.gz
emacs-97d273033b523bc07911c848d4e8bf96cdce0c90.zip
Document that ‘random’ is limited to fixnums
Problem reported by Pip Cet (Bug#32463#20). * doc/lispref/numbers.texi (Random Numbers): * src/fns.c (Frandom): Adjust doc.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/fns.c b/src/fns.c
index f6e68036413..a11de1b0827 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -56,15 +56,12 @@ DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0,
56} 56}
57 57
58DEFUN ("random", Frandom, Srandom, 0, 1, 0, 58DEFUN ("random", Frandom, Srandom, 0, 1, 0,
59 doc: /* Return a pseudo-random number. 59 doc: /* Return a pseudo-random integer.
60All integers representable in Lisp, i.e. between `most-negative-fixnum' 60By default, return a fixnum; all fixnums are equally likely.
61and `most-positive-fixnum', inclusive, are equally likely. 61With positive fixnum LIMIT, return random integer in interval [0,LIMIT).
62
63With positive integer LIMIT, return random number in interval [0,LIMIT).
64With argument t, set the random number seed from the system's entropy 62With argument t, set the random number seed from the system's entropy
65pool if available, otherwise from less-random volatile data such as the time. 63pool if available, otherwise from less-random volatile data such as the time.
66With a string argument, set the seed based on the string's contents. 64With a string argument, set the seed based on the string's contents.
67Other values of LIMIT are ignored.
68 65
69See Info node `(elisp)Random Numbers' for more details. */) 66See Info node `(elisp)Random Numbers' for more details. */)
70 (Lisp_Object limit) 67 (Lisp_Object limit)