ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¦Û¤v¼g ¦Û¤vªº¤è¦¡²£¥Í¶Ã¼Æ

¦^´_  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

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦pÆp¥Û¡j®É¶¡¹ï¤@­Ó¦³´¼¼zªº¤H¦Ó¨¥¡A´N¦pÆp¥Û¯ë¬Ã¶Q¡F¦ý¹ï·M¤H¨Ó»¡¡A«o¹³¬O¤@§âªd¤g¡A¤@ÂI»ù­È¤]¨S¦³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD