Bill Allombert on Sat, 18 Jan 2025 19:50:06 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Some questions on how to improve Berlekamp‑Rabin algorithm’s implementation
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Some questions on how to improve Berlekamp‑Rabin algorithm’s implementation
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Sat, 18 Jan 2025 19:50:02 +0100
- Delivery-date: Sat, 18 Jan 2025 19:50:06 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=math.u-bordeaux.fr; s=2022; t=1737226203; bh=O8GtcEM4rH8kiwQw6u7FCwOgoXpBbOY6Aqzp5frHY9U=; h=Date:From:To:Subject:References:In-Reply-To:From; b=LzkZuanWX+QiminmKJHn4tApMpntRiTVeF6YPR3t5IDSkVtwe0oX25Bbw7x5LyL4l zw57g8xdPeNM6jzu3k3EWiJl5B73qfFVvvPN7NNDOuk719q/ApaCqusA7zi8CQTmGI ENLeI71utSxezsbOqjQmbRzXBVEFFPo2aTaPpJfA+fwxKfSymB0TWim8FcD9jJ5mr1 F0ZtZazDbdoNSTXHHBoVYf92ucdn3i4zPyH3Kbiwb2keZoFaJSwkivLHnRdawRjzRK xUn7rK3N9PpwRoPBgtYDpQhfq/6RRY+EcQWdGCVNQJjuf9NABLTO7mzsBKBkJgCR4E lAuiu7h7C/HyX+hP4vLQs/Li3lUiHsez5rrGU3d24Xjad3fBykxO2jKMCvjRRv/p6R frhlDuAEewq80FYRZxfEwNhGKaciMks+LiLFTqy3JUzkbAjRmBxUpkwhQuFmoHPpyX 3OeeFavEuEyAceavJvjTjkPvSOthU0geKBx6EzGGIzkY3paeB5wXptOV0N7gfKYCTp 6VpVPjOTE5do6DacUu0mcSL8jvoRn//H9I+noOXDi6J7RuJxlNHg5dq6S/GTGrH3yF nRxKu/4EXhJKil05a4Sjdi42XU9VQjMAJmw1clUQhTMNKfHj63LU5pA+pQep/u1ke6 TbGlIBoMXc7bPzGs2YYsSkVs=
- In-reply-to: <d2398cb8-e402-45a2-bc61-a7c553b5666d@laposte.net>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <d2398cb8-e402-45a2-bc61-a7c553b5666d@laposte.net>
On Sat, Jan 18, 2025 at 02:47:18PM +0100, Laël Cellier wrote:
> Bonjour,
>
> the https://en.wikipedia.org/wiki/Berlekamp%E2%80%93Rabin_algorithm is an
> algorithm for computing square roots on prime numbers or prime powers.
> It's description makes it mostly trivial to implement using Mod() operations
> but I was wondering if it was possible to use more higher level functions
> like factor() or even nfroots() ?
Berlekamp algorithm is implemented in the GP function polrootsmod.
Now if you want to reimplement it in GP, this is rather easy using
POLMOD of INTMOD, soing something like Mod(x-random(p),F)^((p-1)/2)
(the advice of replacing F by F(x+z) is not a good idea).
Cheers,
Bill.