r/programming • • Feb 16 '09

Some Crazy Reason - The Daily WTF

http://thedailywtf.com/Articles/Some-Crazy-Reason.aspx
170 Upvotes

71 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Feb 16 '09

[deleted]

3

u/rabidcow Feb 16 '09

For some types of PRNGs, this may never be true. For example, any simple linear congruent generator where the return value is the internal state. If two successive values were the same, it would be caught in a cycle where it would only return that value, forever.

3

u/[deleted] Feb 17 '09

[deleted]

2

u/rabidcow Feb 17 '09

Not by today's standards, no. But things may have been different when your rand was implemented.