Hi all--

 

I hope I'm posting to the correct spot here.

 

We over in the Arduino development community (http://www.arduino.cc
<http://www.arduino.cc/> ) have observed what seems to be a bug in
avr-libc's random() and rand() (but only in Linux builds).

 

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 (!)

 

As you can see, these are not very random. :)  This example was generated
from an Ubuntu host.  Developers who use Windows don't seem to be affected.
The random() and rand() sequences with Windows are entirely reasonable.  

 

For more details, please see this thread:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1227218077/45.

 

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

 

Mikal Hart

Intel Corporation

 

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

Reply via email to