Simplification of "reciprocal word 3by2" (aka invert_pi1)

Adrien Prost-Boucle adrien.prost-boucle at laposte.net
Mon Jun 22 22:12:47 UTC 2020


Hi,
This is an interesting discussion.
I think it shows that some implementation details whould deserve a few comments ;-)
I had real trouble understanding what the code would do and why, some time ago.
Adrien


On Mon, 2020-06-22 at 09:01 +0200, Paul Zimmermann wrote:
>        Dear Pawel,
> 
> > are you able also to generate a case for t0 == d0?
> 
> after thought, this is not possible. Indeed, if we write d=d1*beta+d0, we have
> (p,t0) = (beta+v)*d % beta^2 at line 14, thus it would mean that
> (beta+v)*d = beta^3 + d, thus d would divide beta^3, which implies that d is
> a power of two. The only possible case is d1=beta/2 and d0=0. But when d0=0
> the second part of the algorithm at lines 10-15 does no correction.
> 
> Paul
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss



More information about the gmp-discuss mailing list