| | | | Browse by category |
Article ID: 827
Last updated: 29 Jan, 2008
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.
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: 2810
Posted: 01 Jul, 1997 by
--
Updated: 29 Jan, 2008 by
Others in this category
Powered by KBPublisher (Knowledge base software)