ALS Invité
|
Posté le: 14 Fév 2005 15:22 Sujet du message: Re: utilisation de op |
|
|
Code: |
test:=proc(L::list(polynom),p::posint)
> local L1,L2,P;
> L1:=NULL : L2:=NULL:
> for P in L do
> if Primitive( P ) mod p then L1:=L1,P else L2:=L2,P end if
> end do;
> [L1],[L2]
> end proc:
> test([x^3+1,x^4,x^4+x+1,x^6+x],2);
4 3 4 6
[x + x + 1], [x + 1, x , x + x]
> L1:=op(1,[test([x^3+1,x^4,x^4+x+1,x^6+x],2)]);
4
L1 := [x + x + 1]
|
|
|