Karim BELABAS on Wed, 6 Nov 2002 17:43:01 +0100 (MET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: CVS branch gmp-kernel-2-2-5


On Wed, 6 Nov 2002, Bill Allombert wrote:

> On Wed, Nov 06, 2002 at 04:50:52PM +0100, Karim BELABAS wrote:
>> On Wed, 6 Nov 2002, Bill Allombert wrote:
>> > --- ratlift() is not implemented. This looks difficult to do without
>> > an insight of the code. Help appreciate (Gerhart ?). It need to either
>> > be ported to the t_INT API, or rewrtten for the gmp kernel.
>>
>> The code is a relatively straightforward implementation of
>> Collins/Encarnacion's paper (see comment above function code).
>>
>> Porting to the new t_INT API should be easy. There are only a few accesses to
>> x[2] for "high word of x" (generally in the case lgefint(x) == 3). Everything
>> else is high-level calls.
>>
>> Any particular problem I have overlooked ?
>
> Well, I believe Gerhart has implemented Lehmer-Jebelean variation.

The Collins/Encarnacion's paper specifically describes this variation.

But you are right:
> The following lines
>     /* do a Lehmer-Jebelean round */
>    lhmres = lgcdii((ulong *)d, (ulong *)d1, &xu, &xu1, &xv, &xv1, vmax);
> use lgcdii which depend heavily on the t_INT representation, I believe.

This will not be easy, I had missed that call.

It's mostly a matter of reading the words in the right order, though. I can
give it a try if you wish.

> > > --- diviiexact is just a call to divii.
> >
> > Should be a wrapper to mpz_divexact (the exact equivalent).
>
> Again there is no mpn_divexact, so the overhead of the wrapper might be
> to high. There is a mpn_bdivmod that can be used, but I do not
> know exactly how, but it is probably easy.

Good luck,

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/