# POLY

Utility/GeneralEvaluates a generic polynomial. A polynomial is a mathematical expression defined by the sum of the powers of a variable, multiplied by coefficients.

## Use

This function can be called by any user-defined subroutine.
Fortran Calling Syntax
CALL POLY(X, X0, PAR, NPAR, IORD, VALUE, ERRFLG)
C Calling Syntax
c_poly(x, x0, par, npar, iord, value, errflg)
Python Calling Syntax
[value, eflag] = py_poly(x, x0, par, iord)
MATLAB Calling Syntax
[value, eflag] = m_poly(x, x0, par, iord)

## Attributes

X
[double precision]
The independent variable. For example, to specify time as the independent variable, specify X as TIME.
X0
[double precision]
The shift in the polynomial.
PAR
[double precision]
The array of coefficients.
NPAR
[integer]
The number of coefficients specified.
IORD
[integer]
The order of the derivative that POLY has to return. Order can be 0, 1 or 2.

## Output

Value
[integer]
A value that the subroutine returns.
Errflg
[logical]
A logical (true or false) variable that POLY returns to the calling subroutine. If POLY detects an error while calling the subroutine, it sets the error flag to true.