Check the math library by Neil Toronto:
https://docs.racket-lang.org/math/base.html?q=random#%28part._.Random_.Number_.Generation%29

        (random-natural k) → Natural

      k : Integer

Returns a random natural number less than k, which must be positive. Use
(random-natural k) instead of (random k) when k could be larger than
4294967087.


On 01/04/2019 23:31, polarish...@gmail.com wrote:
> Hello everyone,
> 
> It appears that the largest number returned by the random function in
> Racket is 4294967087-1 for a good reason. Are there any libraries or
> simple approaches to generate a number larger than that?
> 
> Thanks,
> Shaobo
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com
> <mailto:racket-users+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
Paulo Matos

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to