Determine whether two multivariate polynomials are equal.

# S3 method for mpoly
==(e1, e2)

# S3 method for mpoly
!=(e1, e2)

Arguments

e1

an object of class mpoly

e2

an object of class mpoly

Value

A logical value.

Examples

p1 <- mp("x + y + 2 z") p1 == p1
#> [1] TRUE
p2 <- reorder(p1, order = "lex", varorder = c("z","y","x")) p1 == p2
#> [1] TRUE
p2 <- reorder(p1, order = "lex", varorder = c("z","w","y","x")) p1 == p2
#> [1] TRUE
p1 == ( 2 * p2 )
#> [1] FALSE
p1 <- mp("x + 1") p2 <- mp("x + 1") identical(p1, p2)
#> [1] TRUE
p1 == p2
#> [1] TRUE
mp("x + 1") == mp("y + 1")
#> [1] FALSE
mp("2") == mp("1")
#> [1] FALSE
mp("1") == mp("1")
#> [1] TRUE
mp("0") == mp("-0")
#> [1] TRUE