c_eval - Evaluates a polynomial at a given point

SYNTAX

FUNCTION double c_eval (degree, coef, x, y)

     long                 *degree;
     double               *coef;
     double               *x;
     double               *y;

PARAMETERS

degree (input, long)

Degree of polynomial to be evaluated. Valid degrees are 1 through 4.

coef (input, double)

Array of polynomial coefficients.

x (input, double)

X coordinate at which to evaluate polynomial.

y (input, double)

Y coordinate at which to evaluate polynomial.

DESCRIPTION

c_eval() evaluates a polynomial at a given (x,y) coordinate. The degree of the polynomial may be 1st, 2nd, 3rd, or 4th order and the polynomial coefficients are given in the coef array. The polynomial is of the form:

    x' = a0 + a1x + a2y + a3xy + ... + a14y**4

To evaluate a bivariate polynomial, two calls to c_eval() are made, one for the x' part of the coordinate and one for the y' part of the coordinate.

RETURN VALUE

c_eval() returns the polynomial evaluation at (x,y).

SPECIAL CONSIDERATIONS:

The c_eval() call is for C only.