[GAP Forum] function UnivariatePolynomial is destructive

R.N. Tsai r_n_tsai at yahoo.com
Thu Jul 28 20:39:23 BST 2005


Dear gap forum
 
I just noticed that the function "UnivariatePolynomial" changes its input argument :
 
gap> c:=[0,1,2,3,0];
[ 0, 1, 2, 3, 0 ]
gap> p:=UnivariatePolynomial(Integers,c);
3*x_1^3+2*x_1^2+x_1
gap> c;
[ 1, 2, 3 ]

I found a workaround  p:=UnivariatePolynomial(F,StructuralCopy(c),1); but I think
it might be more "natural" to make it nondistructive by default.
 
Regards,
 
R.N.

		
---------------------------------
 Start your day with Yahoo! - make it your home page 


More information about the Forum mailing list