1 | initial version |
You can turn your polynomial into a symbolic expression, then it is possible to take its absolute value:
sage: f = SR(F) ; f
-x^3*y - x^2*y^2 + x*y^3 + y^4 - x^3 - 3*x^2*y + 9*x*y^2 + 2*y^3 + x^2 - x*y + 3*x + 2*y + 1
sage: g = abs(f) ; g
abs(-x^3*y - x^2*y^2 + x*y^3 + y^4 - x^3 - 3*x^2*y + 9*x*y^2 + 2*y^3 + x^2 - x*y + 3*x + 2*y + 1)
sage: g(x=2,y=3)
258
2 | No.2 Revision |
You can turn your polynomial into a symbolic expression, then it is possible to take its absolute value:
sage: f = SR(F) ; f
-x^3*y - x^2*y^2 + x*y^3 + y^4 - x^3 - 3*x^2*y + 9*x*y^2 + 2*y^3 + x^2 - x*y + 3*x + 2*y + 1
sage: g = abs(f) ; g
abs(-x^3*y - x^2*y^2 + x*y^3 + y^4 - x^3 - 3*x^2*y + 9*x*y^2 + 2*y^3 + x^2 - x*y + 3*x + 2*y + 1)
sage: g.parent()
Symbolic Ring
sage: g(x=2,y=3)
258