GNU bug report logs -
#75105
(cl-random -1.0e+INF)
Previous Next
Full log
View this message in rfc822 format
The current behavior of (cl-random -1.0e+INF) is to return NaN with a
probability of 1.1920928955078125e-07, and -1.0e+INF in the remaining
cases.
There are at least two reasonable things cl-random can return for a
negative argument. cl-random implements both, returning a float with
negative sign or a nonnegative integer.
There are at least two reasonable things cl-random can do in response to
a zero argument. cl-random implements three of them:
(cl-random 0.0) is 0.0
(cl-random -0.0) is -0.0
(cl-random 0) throws an error
While "(while (not (isnan (cl-random -1.0e+INF))))" is an interesting
benchmark, its behavior may be somewhat surprising.
As this behavior has been in place since at least 1993 (when the
function was called random*), users may rely on it, and only the
docstring should be changed.
This bug report was last modified 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.