How Do Math.h++ Random Number Classes Generate Random Numbers?

Article ID: 827
Last updated: 29 Jan, 2008
Article ID: 827
Last updated: 29 Jan, 2008
Revision: 1
Views: 2721
Posted: 01 Jul, 1997
by --
Updated: 29 Jan, 2008
by
Problem


How do Math.h++ random number classes generate random numbers?


Cause





Action


The random number generator in the class RWRandGenerator is taken from the ran1 example in Numerical Recipes. It is a slightly modified additive congruential generator. This algorithm is an improvement over many implementations of the ANSI C random number generator rand(), which is almost always a linear congruential generator.

Starting in Math 6.0, you can define your own uniform random number generator if desired.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 827
Last updated: 29 Jan, 2008
Revision: 1
Views: 2721
Posted: 01 Jul, 1997 by --
Updated: 29 Jan, 2008 by

Others in this category