How did I not know about this?

I’ve been programming in IDL for a couple of decades. How did I not know about this bizarre behavior of its random number generator?

 

Screenshot 2015-06-25 10.57.07

Apparently, this is something people know about, but somehow I’d missed it for all this time.

Published by

Ted Bunn

I am chair of the physics department at the University of Richmond. In addition to teaching a variety of undergraduate physics courses, I work on a variety of research projects in cosmology, the study of the origin, structure, and evolution of the Universe. University of Richmond undergraduates are involved in all aspects of this research. If you want to know more about my research, ask me!

4 thoughts on “How did I not know about this?”

  1. This is one of the reasons I use RANLUX. This random-number generator has been mathematically proven to have all 24 bits of the mantissa chaotic when run at its highest “luxury level”, so, within the inherent discreteness of 24-bit arithmetic, it is perfect.

    Even many relatively good random-number generators have the following property: a given number is always followed by the same number. Not so with RANLUX, whose period is much longer than the number of individual random numbers. And, of course, many have many worse problems.

    .
    .

  2. Quote of the day:

    Random number generators are like sex: even the bad ones are still pretty good.

    —G. Marsaglia

    I’ve also heard this as “When they’re good, they’re really good, but even the bad ones are still pretty good.

    I don’t agree with George here, neither with respect to random-number generators nor with respect to sex nor (ponder it for a moment) with the combination of the two. 🙂

Comments are closed.