亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? randomnumbersin c_bygeorgemarsaglia_etc.htm

?? QPSK環(huán)境下的仿真性能分析
?? HTM
?? 第 1 頁 / 共 5 頁
字號(hào):
use in C. (See the thread "Random numbers for C: Somesuggestions" in previous postings.) The improved codeis listed below.A question of copyright has also been raised.  UnlikeDIEHARD, there is no copyright on the code below. Youare free to use it in any way you want, but you maywish to acknowledge the source, as a courtesy.To avoid being cited by the style police, some havesuggested using typedef rather than #define in orderto replace unsigned long by UL.Others have pointed out that one cannot be certain ofthe way that a compiler will evaluate terms in a sum,so using ++c in a term is dangerous.  They haveoffered a version using the comma operator, whichensures that the table index is incremented properly.See LFIB4 and SWB below.In my earlier work, done in Fortran, I had implementedtwo 16-bit multiply-with-carry generators, say z and w,as 32-bit integers, with the carry in the top 16 bits,the output in the bottom 16.  They were combined by(z&LT;&LT;16)+w.  (In Fortran, ishft(z,16)+w.) Such acombination seemed to pass all tests. In the above-mentioned post,  I used (z&LT;&LT;16)+(w&65525), and thatdoes not pass all tests.  So (z&LT;&LT;16)+w seemspreferable; it is used below, providing a MWC thatseems to pass all tests. The generators MWC, KISS, LFIB4 and SWB seem to pass all tests.By themselves, CONG and SHR3 do not, but usingCONG+SHR3 provides one of the fastest combinations that satisfythe DIEHARD battery of tests.Of course, one cannot have absolute confidence in anygenerator. The choices LFIB4 and SWB have immenseperiods, are very fast, and pass all tests in DIEHARD,but I am hesitant to rely on them alone---primarilybecause they come from such simple mod 2^32 arithmetic:four adds in LFIB4 or one subtract-with-borrow in SWB.The code below provides  a variety of in-line generators thatseem promising by themselves, and even more so in combination.With them,  one may feel fairly confident  that combinationswill produce results  consistent with the underlying probability theoryin your applications.All combinations seem to support the supplemented quotefrom my 1984 Keynote Address:       A random number generator is like sex;       When it's good, it's wonderful,       And when it's bad, it's still pretty good.       And when it's bad, try a twosome or threesome.The C code follows; you may want to snip and save fromhere--------------------------------------------------:#define znew  (z=36969*(z&65535)+(z>>16))#define wnew  (w=18000*(w&65535)+(w>>16))#define MWC   ( (znew&LT;&LT;16)+wnew )#define SHR3  (jsr=(jsr=(jsr=jsr^(jsr&LT;&LT;17))^(jsr>>13))^(jsr&LT;&LT;5))#define CONG  (jcong=69069*jcong+1234567)#define KISS  ((MWC^CONG)+SHR3)#define LFIB4 (t[c]=t[c]+t[c+58]+t[c+119]+t[c+178],t[++c])#define SWB   (t[c+237]=(x=t[c+15])-(y=t[c]+(x&LT;y)),t[++c])#define UNI   (KISS*2.328306e-10)#define VNI   ((long) KISS)*4.656613e-10typedef unsigned long UL;/*  Global static variables: */ static UL z=362436069, w=521288629, jsr=123456789, jcong=380116160; static UL t[256]; static UL x=0,y=0; static unsigned char c=0;/* Random seeds must be used to reset z,w,jsr,jcong andthe table t[256].  Here is an example procedure, using KISS: */ void settable(UL i1,UL i2,UL i3,UL i4) { int i; z=i1;w=i2,jsr=i3; jcong=i4; for(i=0;i&LT;256;i++)  t[i]=KISS;        }/* Any one of KISS, MWC, LFIB4, SWB, SHR3, or CONG  can be used in   an expression to provide a random 32-bit integer, while UNI   provides a real in (0,1) and VNI a real in (-1,1).   */<HR><A NAME = "790f49x60.fsf@poole.statgen.ncsu.edu"></A>Subject: Re: Random numbers for C: Improvements.Date: 15 Jan 1999 14:02:47 -0500From: zaykin@statgen.ncsu.edu (Dmitri Zaykin)Message-ID: &LT;790f49x60.fsf@poole.statgen.ncsu.edu>References: <A HREF = "#369F6FCA.74C7C041@stat.fsu.edu">&LT;369F6FCA.74C7C041@stat.fsu.edu></A>Newsgroups: sci.stat.math,sci.math,sci.math.num-analysisLines: 11George Marsaglia &LT;geo@stat.fsu.edu> writes:> #define LFIB4 (t[c]=t[c]+t[c+58]+t[c+119]+t[c+178],t[++c])> #define SWB   (t[c+237]=(x=t[c+15])-(y=t[c]+(x&LT;y)),t[++c])Shouldn't these be#define LFIB4 (t[c]=t[c]+t[c+58]+t[c+119]+t[c+179], ++c)#define SWB   (t[c+237]=(x=t[c+15])-(y=t[c+1]+(x&LT;y)), ++c)Dmitri<HR><A NAME = "99Jan15.151547edt.785@neuron.ai.toronto.edu"></A>Subject: Re: Random numbers for C: Improvements.Date: 15 Jan 99 20:16:13 GMTFrom: radford@cs.toronto.edu (Radford Neal)Message-ID: &LT;99Jan15.151547edt.785@neuron.ai.toronto.edu>References: <A HREF = "#790f49x60.fsf@poole.statgen.ncsu.edu">&LT;790f49x60.fsf@poole.statgen.ncsu.edu></A>Newsgroups: sci.math,sci.math.num-analysis,sci.stat.mathLines: 28>George Marsaglia &LT;geo@stat.fsu.edu> writes:>>> #define LFIB4 (t[c]=t[c]+t[c+58]+t[c+119]+t[c+178],t[++c])>> #define SWB   (t[c+237]=(x=t[c+15])-(y=t[c]+(x&LT;y)),t[++c])>In article &LT;790f49x60.fsf@poole.statgen.ncsu.edu>,Dmitri Zaykin &LT;zaykin@statgen.ncsu.edu> wrote:>Shouldn't these be>>#define LFIB4 (t[c]=t[c]+t[c+58]+t[c+119]+t[c+179], ++c)>#define SWB   (t[c+237]=(x=t[c+15])-(y=t[c+1]+(x&LT;y)), ++c)>This doesn't work either.  I believe that it is undefined whether thecomparison x&LT;y uses the new or the old value of x.  The SHR3 macroin the original source also suffers from this flaw.I think one needs to face up to an unpleasant truth:  The #define facility of C was poorly designed, and is incapable in general ofsupporting the definition of "in-line" procedures.  It is far betterto simply write ordinary C procedures, and accept the fairly smallprocedure call overhead.   Radford Neal<HR><A NAME = "QfQn2.10695$bf6.2024@news1.giganews.com"></A>Subject: Re: Random numbers for C: Improvements.Date: Fri, 15 Jan 1999 17:34:36 -0600From: "Jeff Stout" &LT;jstout@ncon.com>Message-ID: &LT;QfQn2.10695$bf6.2024@news1.giganews.com>References: <A HREF = "#99Jan15.151547edt.785@neuron.ai.toronto.edu">&LT;99Jan15.151547edt.785@neuron.ai.toronto.edu></A>Newsgroups: sci.math,sci.math.num-analysis,sci.stat.mathLines: 27Radford Neal wrote in message&LT;99Jan15.151547edt.785@neuron.ai.toronto.edu>...>>>I think one needs to face up to an unpleasant truth:  The #define>facility of C was poorly designed, and is incapable in general of>supporting the definition of "in-line" procedures.  It is far better>to simply write ordinary C procedures, and accept the fairly small>procedure call overhead.>>   Radford Neal>>This is not a poor design of the macro facility of C, but a built inlimitation of the C language itself.  The preprocessor is just doinga stupid text substituation, its the C compiler that is ambigous aboutthe interpretationThe C macro language can support "in-line" procedures and a lotof other junk only true software wienies would ever use.Jeff Stout<HR><A NAME = "99Jan15.233424edt.6005@cortex.ai.toronto.edu"></A>Subject: Re: Random numbers for C: Improvements.Date: 16 Jan 99 04:43:12 GMTFrom: radford@cs.toronto.edu (Radford Neal)Message-ID: &LT;99Jan15.233424edt.6005@cortex.ai.toronto.edu>References: <A HREF = "#QfQn2.10695$bf6.2024@news1.giganews.com">&LT;QfQn2.10695$bf6.2024@news1.giganews.com></A>Newsgroups: sci.math,sci.math.num-analysis,sci.stat.mathLines: 88>Radford Neal wrote in message>&LT;99Jan15.151547edt.785@neuron.ai.toronto.edu>...>>>>I think one needs to face up to an unpleasant truth:  The #define>>facility of C was poorly designed, and is incapable in general of>>supporting the definition of "in-line" procedures.  It is far better>>to simply write ordinary C procedures, and accept the fairly small>>procedure call overhead.In article &LT;QfQn2.10695$bf6.2024@news1.giganews.com>,Jeff Stout &LT;jstout@ncon.com> wrote:>This is not a poor design of the macro facility of C, but a built in>limitation of the C language itself.  The preprocessor is just doing>a stupid text substituation, its the C compiler that is ambigous about>the interpretation>>The C macro language can support "in-line" procedures and a lot>of other junk only true software wienies would ever use.In saying that the #define facility of C was poorly designed, I ofcourse meant that it does not do what is needed to write good programs.The fact that it does stupid text substitation is a big part of this.In the case under discussion, the only reason (I hope!) that obscureand semantically undefined constructs were being used was in order totry to define an in-line procedure using this inadequate facility.Unfortunately, although one can indeed create lots of junk using theC pre-processor, one cannot, in general, use it to create in-lineprocedures.  One can't write a macro equivalent to the following,for instance:  int first_zero (int *a)  { int i;    for (i = 0; a[i]!=0; i++) ;    return i;  }Furthermore, in many cases where one CAN write in-line proceduresusing C macros, 99% of the people who try to do so get it wrong.  Forexample, the following procedure CAN be written as a macro:  void badexample(int a)  {     while (f(a)==0) ;    g(a);  }but NOT as follows:  #define badexample(a) while (f(a)==0) ; g(a);nor as follows:  #define badexample(a) { while (f(a)==0) ; g(a); }The following gets closer:  #define badexample(a) do { while (f(a)==0) ; g(a); } while (0)Note: NO semicolon at the end.  The necessity of this trick is leftas an exercise for the reader.Really, though, one needs to define the macro as follows:  #define badexample(a) do { int fy7653_4xq = a; \                             while (f(fy7653_4xq)==0) ; \                             g(fy7653_4xq); \                        } while (0)Here, fy7853_4xq is assumed to be sufficiently obscure that it isunlikely to conflict with the name of a variable that occurs in a.Not illustrated in this example, but commonly overlooked, is thefrequent necessity to enclose references to the parameters of themacro in parentheses.Failure to understand these arcane necessities will result in macrosthat behave just like the procedure they are trying to mimic around95% of the times they are called, and which produce completely obscurebugs the other 5% of the time.   Radford Neal   <HR><A NAME = "7ogny6htm.fsf@poole.statgen.ncsu.edu"></A>Subject: Re: Random numbers for C: Improvements.Date: 16 Jan 1999 16:14:45 -0500From: zaykin@statgen.ncsu.edu (Dmitri Zaykin)Message-ID: &LT;7ogny6htm.fsf@poole.statgen.ncsu.edu>References: <A HREF = "#QfQn2.10695$bf6.2024@news1.giganews.com">&LT;QfQn2.10695$bf6.2024@news1.giganews.com></A>Newsgroups: sci.math,sci.math.num-analysis,sci.stat.mathLines: 15"Jeff Stout" &LT;jstout@ncon.com> writes:> The C macro language can support "in-line" procedures and a lot> of other junk only true software wienies would ever use.It is probably true that the posted random number generators arebetter implemented as regular functions. C compilers should attempt toinline "short" functions into their callers when certain optimizationflags are enabled.Also, the new C standard will support the "inline" keyword.  Somecompilers (e.g. gcc called without "-ansi" switch) already recognizeit.Dmitri<HR><A NAME = "7pv8f55tf.fsf@poole.statgen.ncsu.edu"></A>Subject: Re: Random numbers for C: Improvements.Date: 16 Jan 1999 15:19:24 -0500From: zaykin@statgen.ncsu.edu (Dmitri Zaykin)Message-ID: &LT;7pv8f55tf.fsf@poole.statgen.ncsu.edu>References: <A HREF = "#99Jan15.151547edt.785@neuron.ai.toronto.edu">&LT;99Jan15.151547edt.785@neuron.ai.toronto.edu></A>Newsgroups: sci.math,sci.math.num-analysis,sci.stat.mathLines: 29

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久久久蜜臀| 成人欧美一区二区三区视频网页 | 欧美一卡2卡三卡4卡5免费| 国产精品亚洲第一区在线暖暖韩国| 综合欧美一区二区三区| 精品国产乱子伦一区| 欧美三级在线播放| 99久久精品费精品国产一区二区| 蜜桃视频在线一区| 亚洲综合一区二区精品导航| 中文字幕av一区二区三区免费看 | 成人午夜激情片| 日本麻豆一区二区三区视频| 亚洲男人的天堂av| 国产亚洲成年网址在线观看| 日韩欧美专区在线| 欧美日韩精品欧美日韩精品 | 日韩欧美久久一区| 欧美日韩高清在线播放| 一本色道亚洲精品aⅴ| 高清视频一区二区| 国内国产精品久久| 久久精品国产秦先生| 视频一区二区国产| 亚洲一区二区美女| 一区二区在线看| 亚洲欧洲精品天堂一级| 国产精品福利影院| 国产精品青草综合久久久久99| www日韩大片| 精品国产一区二区三区久久久蜜月| 欧美一区二视频| 欧美精品久久天天躁| 欧美伦理视频网站| 欧美日韩精品一区二区三区| 欧美日韩视频不卡| 91精品国产色综合久久不卡蜜臀 | 欧美视频一二三区| 欧美亚一区二区| 精品1区2区3区| 欧美日韩一级视频| 678五月天丁香亚洲综合网| 6080yy午夜一二三区久久| 精品污污网站免费看| 欧美丰满高潮xxxx喷水动漫| 91精品国产一区二区| 欧美xxxx在线观看| 2022国产精品视频| 中文字幕在线一区| 亚洲精品视频在线观看网站| 亚洲电影你懂得| 蜜臀va亚洲va欧美va天堂| 精品一区二区影视| 国产一区二区视频在线| 成人免费看的视频| 在线精品亚洲一区二区不卡| 欧美午夜一区二区三区| 91麻豆精品91久久久久久清纯| 91精品国产综合久久精品app| 日韩三级视频中文字幕| 精品国产一区久久| 亚洲欧洲av色图| 亚洲国产精品一区二区www在线| 婷婷久久综合九色综合绿巨人| 日本中文字幕一区| 国产精品白丝jk黑袜喷水| 99国产欧美另类久久久精品| 欧美视频一区在线| 欧美精品一区男女天堂| 国产精品入口麻豆九色| 亚洲自拍偷拍图区| 久久狠狠亚洲综合| eeuss鲁片一区二区三区在线观看| 色妹子一区二区| 日韩网站在线看片你懂的| 国产精品污网站| 午夜伊人狠狠久久| 久久精品国产精品亚洲红杏| 91在线免费视频观看| 国产精品伦一区| 亚洲一区二区三区视频在线| 精久久久久久久久久久| 色综合夜色一区| 日韩欧美国产精品一区| 国产精品久久看| 老鸭窝一区二区久久精品| 91热门视频在线观看| 日韩精品最新网址| 亚洲精品中文字幕在线观看| 精品一区二区三区在线观看| 色一情一伦一子一伦一区| 精品免费视频.| 亚洲一区精品在线| 国产成人精品亚洲午夜麻豆| 欧美日韩高清不卡| 成人免费小视频| 国内精品国产成人| 欧美精品在欧美一区二区少妇| 2023国产精品视频| 三级不卡在线观看| 不卡的电影网站| 2023国产一二三区日本精品2022| 亚洲免费观看高清完整| 国产91在线观看丝袜| 日韩一区二区三区高清免费看看| 综合久久国产九一剧情麻豆| 国内精品久久久久影院薰衣草| 欧美三级中文字幕| 中文字幕五月欧美| 豆国产96在线|亚洲| 欧美一级免费观看| 亚洲一区二区精品3399| av激情综合网| 久久久久久99精品| 精品一区二区三区免费播放| 在线播放/欧美激情| 尤物视频一区二区| 大尺度一区二区| 久久久久99精品一区| 久久精品国产在热久久| 欧美一区二区三区视频免费播放| 一区二区视频免费在线观看| 不卡电影一区二区三区| 欧美激情综合网| 国产精品69毛片高清亚洲| 精品欧美一区二区三区精品久久| 天使萌一区二区三区免费观看| 日本乱人伦aⅴ精品| 亚洲视频综合在线| 91丨九色丨蝌蚪富婆spa| 国产人妖乱国产精品人妖| 国产麻豆日韩欧美久久| 久久精品视频免费| 国产91精品久久久久久久网曝门| 精品福利在线导航| 国产麻豆9l精品三级站| 久久久精品国产99久久精品芒果| 国产一区二区剧情av在线| 久久看人人爽人人| 粉嫩高潮美女一区二区三区 | 日本怡春院一区二区| 欧美区视频在线观看| 男女激情视频一区| 精品久久人人做人人爽| 国产九色精品成人porny | 国产精品福利影院| 一本大道久久a久久精品综合| 国产精品久久影院| 色婷婷精品久久二区二区蜜臀av | 国产精品视频一区二区三区不卡| 成人性生交大片免费看视频在线 | 欧美一区二区福利在线| 老司机精品视频导航| 久久免费电影网| caoporm超碰国产精品| 一区二区三区四区亚洲| 欧美日韩中文一区| 九色porny丨国产精品| 国产亚洲短视频| 日本韩国视频一区二区| 婷婷开心激情综合| 国产亚洲综合性久久久影院| 成人av片在线观看| 亚洲国产三级在线| xnxx国产精品| 一本一本大道香蕉久在线精品 | 国产在线不卡一卡二卡三卡四卡| 国产丝袜美腿一区二区三区| 91香蕉视频污在线| 日韩精品电影一区亚洲| 国产亚洲一区字幕| 91在线观看免费视频| 午夜伊人狠狠久久| 久久久高清一区二区三区| 96av麻豆蜜桃一区二区| 视频一区二区中文字幕| 中文字幕欧美日韩一区| 欧美日韩精品综合在线| 国产成人av电影| 午夜精品123| 国产欧美精品一区| 欧美剧情片在线观看| 国产成人综合亚洲网站| 亚洲伊人色欲综合网| 午夜激情一区二区三区| 国产亚洲一二三区| 欧美久久一区二区| 成人一区二区三区视频| 日本美女视频一区二区| 亚洲美女免费在线| 欧美www视频| 欧洲日韩一区二区三区| 国产成人夜色高潮福利影视| 视频一区二区三区在线| 亚洲视频一区二区在线观看| 精品国产一区二区三区忘忧草| 欧美综合一区二区三区| 国产凹凸在线观看一区二区| 日韩 欧美一区二区三区| 樱桃国产成人精品视频|