Implementation of make-random-real-generator Bradley Lucier (05 May 2020 01:07 UTC)
Re: Implementation of make-random-real-generator John Cowan (05 May 2020 03:02 UTC)
Re: Implementation of make-random-real-generator Lucier, Bradley J (05 May 2020 03:30 UTC)
Re: Implementation of make-random-real-generator John Cowan (05 May 2020 04:11 UTC)
Re: Implementation of make-random-real-generator Arvydas Silanskas (05 May 2020 18:49 UTC)
Re: Implementation of make-random-real-generator Marc Nieper-Wißkirchen (05 May 2020 19:00 UTC)
Re: Implementation of make-random-real-generator Bradley Lucier (05 May 2020 19:08 UTC)
Re: Implementation of make-random-real-generator John Cowan (05 May 2020 20:25 UTC)
Re: Implementation of make-random-real-generator Lucier, Bradley J (05 May 2020 20:27 UTC)
Re: Implementation of make-random-real-generator Shiro Kawai (05 May 2020 20:32 UTC)
Re: Implementation of make-random-real-generator Marc Nieper-Wißkirchen (05 May 2020 20:38 UTC)
Re: Implementation of make-random-real-generator Shiro Kawai (05 May 2020 20:55 UTC)
Re: Implementation of make-random-real-generator Bradley Lucier (05 May 2020 20:58 UTC)
Re: Implementation of make-random-real-generator John Cowan (05 May 2020 21:01 UTC)
Re: Implementation of make-random-real-generator Marc Nieper-Wißkirchen (05 May 2020 21:07 UTC)
Re: Implementation of make-random-real-generator Shiro Kawai (05 May 2020 21:01 UTC)
Re: Implementation of make-random-real-generator Bradley Lucier (05 May 2020 20:57 UTC)

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