Next: , Up: Polynomials


6.1 Polynomial Evaluation

The functions described here evaluate the polynomial P(x) = c[0] + c[1] x + c[2] x^2 + \dots + c[len-1] x^{len-1} using Horner's method for stability. Inline versions of these functions are used when HAVE_INLINE is defined.

— Function: double gsl_poly_eval (const double c[], const int len, const double x)

This function evaluates a polynomial with real coefficients for the real variable x.

— Function: gsl_complex gsl_poly_complex_eval (const double c[], const int len, const gsl_complex z)

This function evaluates a polynomial with real coefficients for the complex variable z.

— Function: gsl_complex gsl_complex_poly_complex_eval (const gsl_complex c[], const int len, const gsl_complex z)

This function evaluates a polynomial with complex coefficients for the complex variable z.

— Function: int gsl_poly_eval_derivs (const double c[], const size_t lenc, const double x, double res[], const size_t lenres)

This function evaluates a polynomial and its derivatives storing the results in the array res of size lenres. The output array contains the values of d^k P/d x^k for the specified value of x starting with k = 0.