note: documentation bug

Vincent Lefevre vincent at vinc17.net
Mon Feb 26 21:22:05 UTC 2018


Hi,

On 2018-02-25 20:37:49 +0100, Stéphane Bosio wrote:
> the following can be read:
> 
>    -- Function: void mpz_rrandomb (mpz_t ROP, gmp_randstate_t STATE,
>               mp_bitcnt_t N)
>          Generate a random integer with long strings of zeros and ones in
>          the binary representation.  Useful for testing functions and
>          algorithms, since this kind of random numbers have proven to be
>          more likely to trigger corner-case bugs.  The random number
>    will be
>          in the range 2^N-1 to 2^N-1, inclusive.
> 
> I'm pretty sure the intended range isn't 2^N-1 to 2^N-1, which is a single
> number, not a range and not random at all.

This is a rendering bug in the info format.
The first one should be 2^(N-1).

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list