mpf_urandomb and precision
marc.glisse at inria.fr
Sun May 1 11:46:50 CEST 2011
when I read the documentation of mpf_urandomb:
"Generate a uniformly distributed random float in rop, such that 0 <= rop
< 1, with nbits significant bits in the mantissa."
I expected that if nbits was large, the function would increase the
precision of rop so the nbits would fit. Instead, the code reduces nbits
so that it fits prec. Should I append "or less if the precision of rop is
smaller" to the documentation?
More information about the gmp-discuss