Subtract with carry
算法
带进位减法的算法需用递推关系表示:
其中 .
常量S与R分别称作短时滞与长时滞。[2]S与R满足条件。 因此,表达式与对应于序列中之前的第S项与第R项。取模操作M的值为,其中W是状态序列的字(word)的位长度,。
带进位的减法与add-with-carry、subtract-with-borrow为同一族随机数生产引擎。[1]
参考文献
- 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_engine Class (页面存档备份,存于), Microsoft Visual Studio 2015
- std::subtract_with_carry_engine (页面存档备份,存于), cppreference.com
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.