ªð¦^¦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®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD