On May 4, 2:55 pm, Marc <marc.gli...@gmail.com> wrote:
> On May 3, 1:00 am, Bill Hart <goodwillh...@googlemail.com> wrote:
>
> > I think the unsigned long int is correct this time. I see no reason
> > why the remove function should return a number of bits.
>
> Well, if the factor being removed is 2, the number of times you can
> factor it out of a number with n+1 bits like 2^n is...

It looks like another document/code inconsistency that also exists in
GMP 5.0:

GMP:
doc:  mp_bitcnt_t mpz_remove (mpz t rop, mpz t op, mpz t f)
dec:  __GMP_DECLSPEC unsigned long int mpz_remove __GMP_PROTO
((mpz_ptr, mpz_srcptr, mpz_srcptr));
code: mp_bitcnt_t mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr
f)

MPIR:
doc:  mp_bitcnt_t mpz_remove (mpz t rop, mpz t op, mpz t f)
dec:  __GMP_DECLSPEC unsigned long int mpz_remove __GMP_PROTO
((mpz_ptr, mpz_srcptr, mpz_srcptr));
code: unsigned long int mpz_remove (mpz_ptr dest, mpz_srcptr src,
mpz_srcptr f)

GMP also has a similar function in mpn that MPIR doesn't have:

mp_bitcnt_t mpn_remove (mp_ptr wp, mp_size_t *wn, mp_ptr up, mp_size_t
un, mp_ptr vp, mp_size_t vn, mp_bitcnt_t cap)

but its not a part of the public interface.

    Brian




-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to