Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Absolute value of a polynomial

How can I generate a random polynomial with two variables x, y of fix degree which is not of type : <type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular' ?

I would like to compute the absolute value of this polynomial, but when I generate it using : R = ZZ['x','y']; F = R.random_element(4, 1000)

for example, I get : TypeError: bad operand type for abs(): 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'

What would be a good alternative to get |F(x,y)| ? Thanks