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 Marc Nieper-Wißkirchen 05 May 2020 21:07 UTC

Am Di., 5. Mai 2020 um 23:01 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
> But you can reject a and b at the last moment, at the expense of two more conditional  branches.
>
> Is it possible to generate a value less than a or greater than b due to rounding?  If so, such a last-minute test is outright necessary.
>
> I'll leave it up to you mathematicians to decide which you want.

A Scheme system is not forced to use the IEEE 754 model internally, so
we shouldn't rely on inexact reals behaving in a special way.

If we are true to the spirit of section 6.2 of the R7RS, the question
of whether the boundaries are inclusive or exclusive does not make
much sense. It would make sense if *exact* real numbers were returned.
Thus I would, in principle, follow Shiro's suggestion, namely to leave
the boundary case unspecified.