-0.0 on gauche; max-int Bradley Lucier (14 Feb 2024 02:06 UTC)
Re: -0.0 on gauche; max-int Arthur A. Gleckler (14 Feb 2024 02:31 UTC)
Re: -0.0 on gauche; max-int Bradley Lucier (14 Feb 2024 02:39 UTC)
Re: -0.0 on gauche; max-int Antero Mejr (14 Feb 2024 02:40 UTC)
Re: -0.0 on gauche; max-int Bradley Lucier (14 Feb 2024 02:36 UTC)
Re: -0.0 on gauche; max-int Antero Mejr (14 Feb 2024 02:48 UTC)

Re: -0.0 on gauche; max-int Bradley Lucier 14 Feb 2024 02:36 UTC

On 2/13/24 9:05 PM, Bradley Lucier wrote:
>
> 2.  The SRFI 27 random number generator generates a range of integers
> between 0 and a bit under 2^{32}.  To generate numbers greater than this
> requires several calls to the basic generator, using arithmetic shifts
> to assemble the random integer from random "words" of size a bit smaller
> than 32 bits.
>
> So on a 64-bit machine, fx-greatest is going probably going to have a
> width a bit less than 64-bits, so the default random integer will take
> 2-3 calls to SRFI 27's basic random number generator for each random
> fixnum generated.
>
> If we're going to stick with generating fixnums with these integer
> generators, then I think it would be good to have a max-int width that
> takes only one call to the SRFI 27 generator.  So that would require a
> max-int of around 2^{28} or less.
>
> Brad

Perhaps I should clarity that when I say "SRFI 27 generator" I mean the
internal, basic SRFI 27 generator that generates the basic sequence of
random integers, all between 0 and a bit under 2^32 (exclusive).

SRFI 27's random-source-make-integers uses the basic generator to return
random integers of any size.

Brad