mpf_urandomb and precision
tg at gmplib.org
Sun May 1 11:54:09 CEST 2011
Marc Glisse <marc.glisse at inria.fr> writes:
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?
Please do (preferably to both the head and 5.0 repos).
More information about the gmp-discuss