¦Û¤v¼g ¦Û¤vªº¤è¦¡²£¥Í¶Ã¼Æ
- ©«¤l
- 145
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 190
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2013-10-18
- ³Ì«áµn¿ý
- 2014-3-29
|
¦Û¤v¼g ¦Û¤vªº¤è¦¡²£¥Í¶Ã¼Æ
¤@¬íÄÁ¡A¥i¥H°õ¦æ·þ¤ÖÓ ®aªkªº¹Bºâ¡H
¤@¬íÄÁ¡A¥i¥H²£¥Í¦h¤ÖӶüơH
À\²q¬Ý |
|
¤Ñ¤U¬°¤½
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ stillfish00
¹ê´ú«á¤´¤£º¡·N¡A©I¥sm¦¸«á¡A¤£·|¦^¨ì²Ä¤@²Õ²£¥ÍªºÀH¾÷¼Æ¡A
¥D¦]¬O tmp = a * seed +c ...
stillfish00 µoªí©ó 2013-11-1 08:16
«á¨Ó§ï¬° tmp = (a mod m) *( seed mod m) + c §Y¥i¡A
²£¥Í¤§¼Ò¼Æ¤£ÅÜ¡A¤S¦]m = 2^24®É¡A tmp¬°¤p©ó2^49¤§¾ã¼Æ¡A
double¤§ºë½T«×¥i§¹¾ãªí¥Ü¡A¤£·|¦³»~®t¡C
#16 ´ú¸Õ¤]¥i¥¿±`´`Àô¡C |
|
|
|
|
|
|
- ©«¤l
- 145
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 190
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2013-10-18
- ³Ì«áµn¿ý
- 2014-3-29
|
|
¤Ñ¤U¬°¤½
|
|
|
|
|
- ©«¤l
- 145
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 190
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2013-10-18
- ³Ì«áµn¿ý
- 2014-3-29
|
¦^´_ 18# sunnyso
11/8 ¦^°ê
³o¨â¤Ñ¡A¦b¥x¤j¦³±Â½Òªº ¦æµ{
»Ýn ©ú¤Ñ ¤~¯à ¶}©l |
|
¤Ñ¤U¬°¤½
|
|
|
|
|
- ©«¤l
- 605
- ¥DÃD
- 92
- ºëµØ
- 0
- ¿n¤À
- 648
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- macau
- µù¥U®É¶¡
- 2013-4-5
- ³Ì«áµn¿ý
- 2019-2-10
|
¦^´_ 10# sjgau
¤£ª¾¤j¤jªº¤é¥»¤§®È¦p¦ó¡H
¦³ªÅ ³Â·Ð«ü¾É³oӶüÆ
ÁÂÁÂ |
|
ss
|
|
|
|
|
- ©«¤l
- 145
- ¥DÃD
- 45
- ºëµØ
- 0
- ¿n¤À
- 190
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2013-10-18
- ³Ì«áµn¿ý
- 2014-3-29
|
¤ñ¸û¦nªº ¶Ã¼Æ²£¥Í¾¹ªº ±ø¥ó
¤@ ²£¥Íªºpºâ³t«× ¶V§Ö¶V¦n
¤G ¶Ã¼Æªº½d³ò©M ӼơA¶V¤j¶V¦n
¤T ºÉ¥i¯àªº ±µªñ§¡¤Ã¤À°t
¥| ¦b²£¥Í¤U¤@Ó ¬Û¦Pªº¶Ã¼Æ¤§«e¡An§â©Ò¦³ªº¶Ã¼Æ³£¶]¹L¤@¹M
¤ ´`Àôªº¶g´Án ©T©w
¤» ´`Àôªº ¶g´Án ¶V¤j ¶V¦n |
|
¤Ñ¤U¬°¤½
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 15# c_c_lai
¨ä¹ê§Úªº·N«ä¬O³o¼Ë¡G- Sub EX()
- Dim a As Single, b As Single
- Dim i
-
- a = Rnd
- For i = 2 To 16777216
- Rnd
- Next
- b = Rnd
- Debug.Print a, b
-
- a = myRnd
- For i = 2 To 16777216
- myRnd
- Next
- b = myRnd
- Debug.Print a, b
-
- End Sub
½Æ»s¥N½X ¹³rnd¤@¼Ë¡A³om¦¸¨úªº¶Ã¼Æ³£·|¤£¤@¼Ë¡A
¦ýrnd¨ú§¹m¦¸«á¡A¦A¨ú¤U¤@¦¸®É¡A·|¦^¨ì²Ä¤@¦¸¨úªºÈ¡A¦A¤@¦¸´`Àô¡C
´N¹³LCG¸Ì±´£¨ìªº¥Í©R¶g´Á |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-11-1 08:20 ½s¿è
¦^´_ 13# stillfish00
¹ê´ú«á¤´¤£º¡·N¡A©I¥sm¦¸«á¡A¤£·|¦^¨ì²Ä¤@²Õ²£¥ÍªºÀH¾÷¼Æ¡A
¥D¦]¬O tmp = a * seed + c §Y«K¬O double ¼Æ¤´¦s¦³ºë½T«×»~®t...
LongLong¤S¥u¦³¦b64¦ì¤¸¥¥x¤W¥i¥H¨Ï¥Î |
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 8# sjgau
¦Û¤v¼g¯uªº¥i¥Hµo²{«Ü¦h°ÝÃD¡A¾Ç¨ì«Ü¦h¡A
§Æ±æ¯à©ß¿j¤Þ¥É¡A§Ú¬O±Ä¥ÎMicrosoft Visual Basic ªº¨º²Õ°Ñ¼Æ¡A¥é³yrnd¨ç¼Æ¤@¼Ë¶Ç¦^single¡C- Function myRnd(Optional Number) As Single
- Dim tmp As Double
- 'LCG Algorithm¡G
- ' X(n+1) = (a * X(n) + c) mod m
- Const a As Long = 1140671485
- Const c As Long = 12820163
- Const m As Long = 16777216 '2^24
- Const x0 As Long = 1 '®Ú¾Ú§A¨Ï¥Îþ²Õ°Ñ¼Æ¡Ax0¦³®É¦³»Ýn²Å¦Xªº±ø¥ó¡C
-
- Static seed As Variant
- '§Q¥ÎIsEmpty§PÂ_¡A¨Óªì©l¤Æ¤@ staticÅܼƬ°«D¹sÈ¡C
- If IsEmpty(seed) Then seed = x0
-
- '§Q¥ÎIsMissing§PÂ_ optional °Ñ¼Æ¬O§_¶Ç¤J¡AY¨ç¼Æ¦³¶Ç¤J°Ñ¼Æ®É¡A³]¬°ºØ¤l¡C
- If Not IsMissing(Number) Then seed = Number
-
- 'myRnd = (a * seed + c) Mod m
- '(a * seed + c)¹L¤j®É¡Amod ·|µo¥Í·¸¦ì¡A¥u¯à¥Î¨ä¥L¤èªk¨D¡C
-
- tmp = a * seed + c 'double
- seed = tmp - m * Fix(tmp / m) '§Ypºâ (a * seed + c) Mod m¡A¦¹¬°²£¥Íªº¶Ã¼ÆÈ¡A¨Ã³]¬°¤U¦¸ºØ¤l
- myRnd = seed / m '¨Ï¶Ç¦^¶Ã¼ÆȤ¶©ó0¨ì1¤§¶¡
- End Function
½Æ»s¥N½X |
|
|
|
|
|
|