JuliaLang/julia — pull request #3077 by jiahao (2013-05-11 05:37:27+00:00)
Title: Adds random number generation for BigInts from GMP

Introduces new type `BigIntRand` that initializes GMP RNG.
- `gmp_randinit_default` - initialize RNG (current default: Mersenne Twister)
- `gmp_randseed_ui`, `gmp_randseed` - sets random seed

Provides methods to generate random BigInts.
- `rand(Range1{BigInt})` - wraps `mpz_urandomm`
- `rand!(Range1, Array)` - initializes a `BigIntRand` automatically and populates an array

Also adds low-level creation of `BigInt`type from constituent data elements.

Is this the right way to expose the RNG state from GMP?