[ThinAir Home] [Table of Contents] [Quick Start]

1 Introduction

Unfortunately, most of the pseudorandom number sequence generators (PRNGs) available to the average programmer are not very good. Usually it's not easy to learn which generator is provided. This makes finding the weaknesses or problems with a particular generator almost impossible. If you realize the potential problems with a provided generator, you usually don't know how to go about testing and verifying another PRNG.

Even if you have the knowledge and experience to choose a good PRNG, you usually aren't completely satisfied. Once you've chosen a PRNG, changing to another is not easy. This makes verifying a simulation using different sources of random numbers a difficult proposition.

This document describes the ThinAir class library that defines a standard interface for PRNGs. The ThinAir library also provides several generators, each with its own strengths and weaknesses. This standard interface allows you to change generators relatively easily.

In many simulations, it is difficult to determine what are results and what are merely artifacts of the random number sequence supplied to the simulation. Some of the bad generators listed in Section 10 can serve as controls for these situations.

The ThinAir library and this documentation supply different things for different people. There are several different ways of using this library, ranging from I need a generator now! to I need to build a completely new kind of generator. The following chart should help you find what you need.

I need a generator now! Section 2
I need other generators now. Section 8
I'm already using rand(). Section 5.2 and the FAQ
I want to learn about random number sequences. Section 3 and the FAQ
I want to choose a generator. Section 4
I want to understand the whole library. Section 6 first
I want to modify a generator. Section 13.4
I want to build a new generator. Section 13.5
I need a nonrandom sequence. Section 10


For further information, contact G. Wade Johnson (gwadej@anomaly.org).

© 1997 G. Wade Johnson. All rights reserved.
http://www.anomaly.org/ThinAir/intro.html