Go to the first, previous, next, last section, table of contents.


Miscellaneous Functions

Function: void mpf_random2 (mpf_t rop, mp_size_t max_size, mp_exp_t max_exp)
Generate a random float of at most max_size limbs, with long strings of zeros and ones in the binary representation. The exponent of the number is in the interval -exp to exp. This function is useful for testing functions and algorithms, since this kind of random numbers have proven to be more likely to trigger corner-case bugs. Negative random numbers are generated when max_size is negative.


Go to the first, previous, next, last section, table of contents.