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 18:59 UTC

Am Di., 5. Mai 2020 um 20:50 Uhr schrieb Arvydas Silanskas
<xxxxxx@gmail.com>:
>
> >  if you're basing this SRFI on SRFI 27, why you decided to
> build your own rand-real-proc based on randomly generated integers
> rather than simply use random-real from SRFI 27
>
> The only reason is because it was defined for the generator to return lower and upper bounds inclusively, while the random real proc in srfi 27 returns 0 to 1 exclusively. I wasn't sure how to convert function with exclusive bound to inclusive except for reimplementing it grounds up.

Mathematically, the difference between including and excluding an
interval bound does not make any sense here. A set consisting of a
single real number has measure 0.

I understand that the real numbers of a programming language behave
differently (at least the inexact ones), but I wouldn't emphasize the
difference in the spec (and maybe leave it up to the implementation).
In any case, a program has to cope with real numbers arbitrarily close
to the upper bound, so it most likely has to be stable in the limit
case as well.

-- Marc