lemire / fastrand

Fast random number generation in an interval in Python: Up to 10x faster than random.randint.
Apache License 2.0
88 stars 12 forks source link

How to Guess Upper/Lower bound of a fastrand ? #16

Closed Sim4n6 closed 2 years ago

Sim4n6 commented 2 years ago

Hi,

I'm a little novice, who would like to solve the following little problem:

  1. Say I can control when to generate a number using fastrand (bounded for instance by 1001).
  2. How can I guess at best its interval?

I mean:

  1. suppose now, fastrand generate the number 989.
  2. is there a way to figure out a lower/upper bound, such as 900 to 1000, please?

Regards,

lemire commented 2 years ago

It is unclear what you mean. Can you elaborate ?

Sim4n6 commented 2 years ago

If I generate fast rand 5min ago, can we guess its value (up, low interval) please?

lemire commented 2 years ago

No. You cannot.

Sim4n6 commented 2 years ago

thank u