mvp (version 1.0-8)

zero: The zero polynomial

Description

Test for a multivariate polynomial being zero

Usage

is.zero(x)

Arguments

x

Object of class mvp

Details

Function is.zero() returns TRUE if x is indeed the zero polynomial. It is defined as length(vars(x))==0 for reasons of efficiency, but conceptually it returns x==constant(0).

(Use constant(0) to create the zero polynomial).

See Also

constant

Examples

Run this code
# NOT RUN {
constant(0)

t1 <- as.mvp("x+y")
t2 <- as.mvp("x-y")

stopifnot(is.zero(t1*t2-as.mvp("x^2-y^2")))

# }

Run the code above in your browser using DataLab