| Bill Allombert on Fri, 29 Dec 2023 16:28:54 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: bug in x1=Mod(x+X,X^2+1)^2? |
On Fri, Dec 29, 2023 at 05:11:47PM +0200, Georgi Guninski wrote: > Is this a bug? > > ? x1=Mod(x+X,X^2+1)^2 > %11 = Mod(1, X^2 + 1)*x^2 + Mod(2*X, X^2 + 1)*x + Mod(-1, X^2 + 1) > ? x2=Mod(X+x,x^2+1)^2 > %12 = Mod(2*X*x + (X^2 - 1), x^2 + 1) > ? norm(x2) > %13 = X^4 + 2*X^2 + 1 > ? norm(x1) > *** at top-level: norm(x1) > *** ^-------- > *** norm: incorrect type in greal/gimag (t_POLMOD). Yes, x1 is a polynomial and not a POLMOD, due to variable priority. This explains why %11 and %12 are displayed differently. Cheers, Bill