Question: Algebraic: Quotient doesn't work within Procedure

NULL

Programm zur Brechnung der Kreisteilungspolynome_2022-04-05 Ki

 

NULL

restart; with(Algebraic); with(NumberTheory)

n := 6

6

(1)

 

cyclo_poly := Vector[row](1 .. n, 0)

Vector[row](%id = 36893489967244295332)

(2)

i := 1; cyclo_poly[1] := X-1

1

 

X-1

(3)

NULL
c_poly := proc (i, kt_poly) local j, hz1, hz2, X; j := i+1; hz1 := X^j-1; hz2 := kt_poly; kt_poly := Quotient(hz1, hz2, X) end proc

cyclo_poly[2] := c_poly(i, cyclo_poly[i])

Error, (in c_poly) illegal use of a formal parameter

 

i := 1; kt_poly := X-1

1

 

X-1

(4)

j := i+1; hz1 := X^j-1; hz2 := kt_poly; kt_poly := Quotient(hz1, hz2, X)

2

 

X^2-1

 

X-1

 

X+1

(5)

NULL

Download Programm_zur_Brechnung_der_Kreisteilungspolynome_2022-04-05_Ki.mw

Good morning

Why doesn't Quotient(x,y,z) not work within a procedure whereas it works well standing alone? See example.

Greetings  Heinz

Please Wait...