Re: Implementation of make-random-real-generator
Bradley Lucier 05 May 2020 20:57 UTC
On 5/5/20 4:38 PM, Marc Nieper-Wißkirchen wrote:
> With this in mind, I am wondering about the justification of SRFI 27.
> Depending on the representation of inexact floats, (log x) can result
> in a non-finite result even if (> x 0) is #t.
In IEEE 754 doubles, SRFI 27 random-real cannot return 0.0 or 1.0
And if log has a bug that allows (log a) to return +inf.0 when a is
about $2^{-32}$ or log(a) return 0.0 when a is about $1-2^{-32}$, that's
not a problem this SRFI can solve. (These are about the smallest and
and largest value that SRFI 27 random-real can return.)
Brad