Math-GMPf
view release on metacpan or search on metacpan
so one of those modules is required in order to make use of this
function.
$state is blessed into package Math::GMPf::Random and will be
automatically cleaned up when it goes out of scope.
Initialize $state with a linear congruential algorithm
X = ($mpz*X + $ui) mod (2 ** $m2exp). The low bits of X in this
algorithm are not very random. The least significant bit will have a
period no more than 2, and the second bit no more than 4, etc. For
this reason only the high half of each X is actually used.
When a random number of more than m2exp/2 bits is to be generated,
multiple iterations of the recurrence are used and the results
concatenated.
$state = fgmp_randinit_lc_2exp_size($ui);
This is the Math::GMPf interface to the gmp library function
'gmp_randinit_lc_2exp_size'.
$state is blessed into package Math::GMPf::Random and will be
automatically cleaned up when it goes out of scope.
Initialize state for a linear congruential algorithm as per
gmp_randinit_lc_2exp. a, c and m2exp are selected from a table,
chosen so that $ui bits (or more) of each X will be used,
( run in 2.287 seconds using v1.01-cache-2.11-cpan-71847e10f99 )