/* $Id: polyeval.c,v 1.2 2000/10/20 01:21:48 trow Exp $ */

/*
Cephes Math Library Release 2.3:  June, 1995
Copyright 1984, 1987, 1989, 1995 by Stephen L. Moshier
*/


#include "specfns_protos.h"

double
polevl (double x, double coef[], int N)
{
  double ans;
  int i;
  double *p;

  p = coef;
  ans = *p++;
  i = N;

  do
    ans = ans * x + *p++;
  while (--i);

  return (ans);
}

double
p1evl (double x, double coef[], int N)
{
  double ans;
  double *p;
  int i;

  p = coef;
  ans = x + *p++;
  i = N - 1;

  do
    ans = ans * x + *p++;
  while (--i);

  return (ans);
}




/* $Id: polyeval.c,v 1.2 2000/10/20 01:21:48 trow Exp $ */


syntax highlighted by Code2HTML, v. 0.9.1