As Mikal Hart wrote:

> For example, if you run a little Arduino sketch (btw, Arduino uses the
> AVR-168P) that calls random() nine times (without seeding), you immedately
> get a repeat in your series:

> 0 31031784 26852320 4242000 842292 453960 211932 84160 0 ... and so on (!)

What version of avr-libc are you using?

You're never supposed to ever get a 0, because the PRNG does not work
whenever it hits a 0.  There's been a bug once but that has been fixed
long since.

> Developers who use Windows don't seem to be affected.  The random()
> and rand() sequences with Windows are entirely reasonable.

That would also be an indication that the issue has been fixed long
since, but the Ubuntu users are apparently using a way old version of
avr-libc (probably since their package maintainer lags quite a couple
of years behind).

> Thanks!  Is there somewhere else that I should post bug reports like
> this?

The bug reporting system can be found at

https://savannah.nongnu.org/bugs/?group=avr-libc

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to