fbpx
维基百科

Subtract with carry

带进位减法(Subtract-with-carry)是一种时滞斐波那契伪随机数生成器 ,1991年由George Marsaglia英语George Marsaglia与Arif Zaman发明。[1]

算法 编辑

带进位减法的算法需用递推关系表示:

 

其中  .

常量SR分别称作短时滞与长时滞。[2]SR满足条件 。 因此,表达式  对应于序列中之前的第S项与第R项。取模操作M的值为 ,其中W是状态序列的字(word)的位长度, 

带进位的减法与add-with-carry英语add-with-carrysubtract-with-borrow英语subtract-with-borrow为同一族随机数生产引擎。[1]

带进位的减法是C++11标准模板库中的三种随机数生成器之一。[3]

参考文献 编辑

  1. ^ 1.0 1.1 A New Class of Random Number Generators (页面存档备份,存于互联网档案馆), George Marsaglia and Arif Zaman, The Annals of Applied Probability, Vol. 1, No. 3, 1991
  2. ^ subtract_with_carry_engine Class (页面存档备份,存于互联网档案馆), Microsoft Visual Studio 2015
  3. ^ std::subtract_with_carry_engine (页面存档备份,存于互联网档案馆), cppreference.com

subtract, with, carry, 带进位减法, subtract, with, carry, 是一种时滞斐波那契伪随机数生成器, 1991年由george, marsaglia, 英语, george, marsaglia, 与arif, zaman发明, 算法, 编辑带进位减法的算法需用递推关系表示, displaystyle, bmod, nbsp, 其中, displaystyle, begin, cases, text, text, cases, nbsp, 常量s与r分别称作短时滞与长时滞, . 带进位减法 Subtract with carry 是一种时滞斐波那契伪随机数生成器 1991年由George Marsaglia 英语 George Marsaglia 与Arif Zaman发明 1 算法 编辑带进位减法的算法需用递推关系表示 x i x i S x i R c i 1 mod M displaystyle x i x i S x i R c i 1 bmod M nbsp 其中 c i 1 if x i S x i R c i 1 lt 0 0 否 则 displaystyle c i begin cases 1 amp text if x i S x i R c i 1 lt 0 0 amp text 否 则 end cases nbsp 常量S与R分别称作短时滞与长时滞 2 S与R满足条件0 lt S lt R displaystyle 0 lt S lt R nbsp 因此 表达式x i S displaystyle x i S nbsp 与x i R displaystyle x i R nbsp 对应于序列中之前的第S项与第R项 取模操作M的值为M 2 W displaystyle M 2 W nbsp 其中W是状态序列的字 word 的位长度 W gt 0 displaystyle W gt 0 nbsp 带进位的减法与add with carry 英语 add with carry subtract with borrow 英语 subtract with borrow 为同一族随机数生产引擎 1 带进位的减法是C 11标准模板库中的三种随机数生成器之一 3 参考文献 编辑 1 0 1 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 取自 https zh wikipedia org w index php title Subtract with carry amp oldid 61985324, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。