Subtract with carry
Subtract with carry is a pseudorandom number generator of the lagged Fibonacci type introduced by George Marsaglia and Arif Zaman in 1991.[1] It is one of three random number generator engines included in the standard C++11 library.
Subtract with carry generates a sequence of numbers using the recurrence relation:
where has the value 1 if , otherwise . R and S are constants known as the long and short lags.[2]
References
- ↑ A New Class of Random Number Generators, George Marsaglia and Arif Zaman, The Annals of Applied Probability, Vol. 1, No. 3, 1991
- ↑ subtract_with_carry Class, Microsoft Visual Studio 2010
This article is issued from Wikipedia - version of the Wednesday, March 12, 2014. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.