mpoly-equal: Determine whether two multivariate polynomials are equal.

Description Usage Arguments Value Examples

Description

Determine whether two multivariate polynomials are equal.

Usage

1
2
3
4
5
## S3 method for class 'mpoly'
e1 == e2

## S3 method for class 'mpoly'
e1 != e2

Arguments

e1

an object of class mpoly

e2

an object of class mpoly

Value

A logical value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
p1 <- mp("x + y + 2 z")
p1 == p1

p2 <- reorder(p1, order = "lex", varorder = c("z","y","x"))
p1 == p2
p2 <- reorder(p1, order = "lex", varorder = c("z","w","y","x"))
p1 == p2
p1 == ( 2 * p2 )

p1 <- mp("x + 1")
p2 <- mp("x + 1")
identical(p1, p2)
p1 == p2

mp("x + 1") == mp("y + 1")
mp("2") == mp("1")
mp("1") == mp("1")
mp("0") == mp("-0")

mpoly documentation built on March 26, 2020, 7:33 p.m.