Copyright (C) 2000-2012 |
GNU Info (gmp.info)Random Number FunctionsRandom Number Functions *********************** Sequences of pseudo-random numbers in GMP are generated using a variable of type `gmp_randstate_t', which holds an algorithm selection and a current state. Such a variable must be initialized by a call to one of the `gmp_randinit' functions, and can be seeded with one of the `gmp_randseed' functions. The functions actually generating random numbers are described in Note: Integer Random Numbers, and Note: Miscellaneous Float Functions. The older style random number functions don't accept a `gmp_randstate_t' parameter but instead share a global variable of that type. They use a default algorithm and are currently not seeded (though perhaps that will change in the future). The new functions accepting a `gmp_randstate_t' are recommended for applications that care about randomness. automatically generated by info2www version 1.2.2.9 |