📄 ranrotb.cpp
字号:
/************************* RANROTB.CPP ****************** AgF 1999-03-03 *
* Random Number generator 'RANROT' type B *
* *
* This is a lagged-Fibonacci type of random number generator with *
* rotation of bits. The algorithm is: *
* X[n] = ((X[n-j] rotl r1) + (X[n-k] rotl r2)) modulo 2^b *
* *
* The last k values of X are stored in a circular buffer named *
* randbuffer. *
* The code includes a self-test facility which will detect any *
* repetition of previous states. *
* *
* The theory of the RANROT type of generators and the reason for the *
* self-test are described at www.agner.org/random *
* *
*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -