R – Crappy Random Number Generator

algorithmlanguage-agnosticrandom

This may sound like an odd question, but where can I find a random number generator that works in C or C++ that is not very good?

Context: I'm creating some tree graph plotting software and testing it by using multi-digit random numbers (so each digit becomes a node in the tree). The random number generator I've been using – which is the one that comes with the GNU C++ compiler – gives me a nice spread of values. That's good, but I want to see how the table looks when the numbers clump together and are less homogenous.

Can anyone suggest a random number generator that has been proven to be not-so-random?

(Oh, any anyone who links to xkcd and/or suggests I just return 4 will get sarcasm in response).

Best Answer

I've always thought of randu as the godfather of bad random number generators.