GMP documentation bug (mpz_scan0, mpz_scan1)

Brooks Moses brooks.moses at
Wed Jan 10 01:51:07 CET 2007


I just came across what I think is some incorrect information in the GMP 
manual's documentation of mpz_scan0 and mpz_scan1.

GMP version: 4.2.1, from, 2007-01-09.

In the documentation for the two mpz_scan functions, the following sentence 

>If there's no bit found, then ULONG_MAX is returned. This will happen in 
>mpz_scan0 past the end of a positive number, or mpz_scan1 past the end of 
>a negative.

This should have "positive" and "negative" swapped, yes?

(Also, pedantically speaking, that should probably have "nonnegative" in 
place of "positive", since the corrected version is true for zero as well 
as for positive numbers.)

- Brooks

More information about the gmp-bugs mailing list