On May 8, 12:35 am, Jason <ja...@njkfrudils.plus.com> wrote:
> On Saturday 07 May 2011 21:56:54 Cactus wrote:
>
>
>
>
>
> > On May 4, 3:46 pm, Cactus <rieman...@gmail.com> wrote:
> > > 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
>
> > It turns out that there were several inconsistencies introduced into
> > the GMP code when the mp_bitcnt_t type was introduced.
>
> > Chris picked up two of these but there was a third one as well.
>
> > The GMP folk have now picked this up and have corrected all of them in
> > the last few days.
>
> > In order to maintain maximum interface compatibility between GMP and
> > MPIR I will, unless anyone objects, add these three changes to the
> > MPIR repository.   But I cannot do anything about the MPIR
> > documentation as I don't have the tools needed to do this.
>
> I can do it if you tell me what needs changing , I suppose a windows text
> editor would add nl/cr
>
>
>
> > They all consist of a subtitution of the mp_bitcnt_t type for the
> > unsigned long type either as a function parameter or as a return
> > value.
>
> >     Brian

My apologies but I am wrong about this - the documentation uses
mp_bitcnt_t correctly for the three API issues so changes are not
needed.

    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