gmpolyEval {gmpoly}R Documentation

Evaluation of a multivariate polynomial

Description

Evaluates a gmpoly multivariate polynomial for given values of the variables.

Usage

gmpolyEval(pol, x)

Arguments

pol

a gmpoly object

x

either a bigq vector, or a bigq matrix; in the later case, the evaluation is performed for each row of the matrix

Value

A bigq number or vector.

Examples

library(gmpoly)
library(gmp)
pol <- gmpoly("5/2 x^(2,3) + 3 x^(1,1)")
gmpolyEval(pol, as.bigq(c(1, 1)))
x <- rbind(
  t(as.bigq(c(1, 1))),
  t(as.bigq(c(3, 4), c(4, 3)))
)
gmpolyEval(pol, x)

[Package gmpoly version 1.1.0 Index]