Question: Is there any bug in the "randpoly" command?!!

restart

with(PolynomialIdeals):

``

``

randomzero := proc (ListVar) local A, G, i, lm, B, f, g; option trace; A := ListVar; G := NULL; for i to nops(A) do f := A[i]^(i+1)+randpoly([op(`minus`({op(A)}, {A[i]}))], terms = 1, coeffs = rand(-4 .. -1), degree = i); G := G, f end do; print(IsZeroDimensional(`<,>`(G))); RETURN([G]) end proc:

randomzero([x, y])

{--> enter randomzero, args = [x, y]

 

[x, y]

 

"G:="

 

x^2-y-4

 

x^2-y-4

 

y^3-3*x

 

x^2-y-4, y^3-3*x

 

true

 

<-- exit randomzero (now at top level) = [x^2-y-4, y^3-3*x]}

 

[x^2-y-4, y^3-3*x]

(1)

``

Download bug.mw

Hi

I think there is a bug in the "randpoly" command. please see the attached file line 7 of my procedure "randomzero". Why x^2-y-4 is created while terms=1 is considered and the outputs must contain binomial?

Please Wait...