bug-gmp
[Top][All Lists]
Advanced

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

Re: CLN, GMP inputs


From: Kevin Ryde
Subject: Re: CLN, GMP inputs
Date: 03 May 2001 10:06:57 +1000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5

Hans Aberg <address@hidden> writes:
>
> I think that one should perhaps add mod and division a = q*b + r so that
> abs(r) <= abs(b)/2.

I guess that'd be mpz_ndiv, "n" for "nearest".  I'll put it on a todo
list if you think it'd have important uses.

> I think this might be faster when working mod n (in Z/nZ).

I'm not sure it'd help much, after all it only trims one bit from the
size, and since all calculations are done in whole limbs that saving
would rarely change the work done.

If/when some modular arithmetic comes about it'll probably be done all
unsigned internally, to suit the mpn routines.

> For example, gcd converges faster.

I've seen analyses of that sort of thing, but I'm a bit sceptical
about it in practice.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]