vendredi 5 juin 2020

Criteria for being an effective pseudo-random generator

I implemented a class that takes two (random) uint32_t values, and generates pseudo-random uint64_t numbers with a period of 2^64 - 1. I generated 500,000,000 numbers and I could see that:

  • Each percentile of [0; 2^64 - 1] was populated by 1% of all numbers, with a 10^-8 precision at least.
  • For k in [2; 101], the proportion of numbers divisible by k was 1/k, with a 10^-4 precision at least, 10^-5 for a majority of them.
  • No two numbers had the same value.

Are these criteria enough to say that my generator is a "good" one?




Aucun commentaire:

Enregistrer un commentaire