4 ms·
UTSL. avr-libc's random is https://en.wikipedia.org/wiki/Lehmer_random_number_generator https://en.wikipedia.org/wiki/Lehmer_random_number_generator with n = 2
by jepler 11y ago
UTSL. avr-libc's random is https://en.wikipedia.org/wiki/Lehmer_random_number_generator https://en.wikipedia.org/wiki/Lehmer_random_number_generator with n = 2^31-1, g = 7^5. It's not great, but it's not so bad that it wasn't standardized as a generator in C++11 (std::minstd_rand0), though with an alternate value for g. I didn't determine whether Arduino replaces this with an alternate implementation.
notably, out of the range of uint32_t, it'll never produce the outputs 0 or 2^31-1