4 ms·
Is Arduino's Random() Function Truly Random?
- jepler 11y agoUTSL. 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
- viraptor 11y agoThe article ends with "What we need is someone who has a clue what they are doing access to sophisticated plotting and analysis software and knows how to use it. Are you that person?" Not much point to it really...