
# NOT RUN {
# }
# NOT RUN {
requires Macaulay2 be installed and an interactive session
##### basic usage
########################################
ring("x", "y", coefring = "QQ")
factor_poly("x^4 - y^4")
# reference function
factor_poly.("x^4 - y^4")
##### different inputs
########################################
# factor_poly accepts mpoly objects:
# remember you must create the ring first!
(p <- mp("x^4 - y^4"))
factor_poly.(p)
factor_poly(p)
mp("(x-y) (x+y) (x^2+y^2)")
##### other examples
########################################
ring("x","y", "z", coefring = "QQ")
(p <- mp("(x^2 - y) (x^2 + y) (x + y)^2 (x - z)^2"))
factor_poly.(p)
factor_poly(p)
(p <- mp("(x-1)^3 (y-1)^3"))
factor_poly.(p)
factor_poly(p)
# }
Run the code above in your browser using DataLab