Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

exact factorting

How do you get sage to factor into exact values. For instance, I want it to factor x^2-2 and return (x-sqrt(2))*(x+sqrt(2))

However, when I input

realpoly.<x> = PolynomialRing(CC) factor(x^2-2,x)

Sage returns

(x - 1.41421356237310) * (x + 1.41421356237310)

Any ideas?