|
以下是 《NUmerical Recipes》书中关于 ran1 函数的说明。
“Minimal” random number generator of Park and Miller with Bays-Durham shuffle and
added safeguards. Returns a uniform random deviate between 0.0 and 1.0 (exclusive of
the endpoint values). Call with idum a negative integer to initialize; thereafter, do not
alter idum between successive deviates in a sequence. RNMX should approximate the largest
floating value that is less than 1.
结果是 [0,1) 半开半闭区间 |
|