Max Alekseyev on Sat, 25 Mar 2023 19:58:53 +0100

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

Re: polrootsmod(f,p) with f%p==0

Well, there will be a memory allocation error in this case, but it'll work fine in many other cases with small p. 
I'd prefer to see a memory error in the case of large p rather than the "zero polynomial in FpX_roots" error unconditionally.

On Sat, Mar 25, 2023 at 2:36 PM Bill Allombert <> wrote:
On Sat, Mar 25, 2023 at 12:46:49PM -0400, Max Alekseyev wrote:
> Shouldn't polrootsmod(f,p) for a prime p and f%p==0 simply return
> vector(p,i,Mod(i-1,p)) instead of the error?

Given that p can be arbitrarily large, this is not practical...
Just consider polrootsmod(0*x,2^127-1)