File:  [MW Coherent from dump] / coherent / b / lib / libm / pol.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:35 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * Evaluate a polynomial.
 * The polynomial must contain at least two terms.
 */
#include <math.h>

double
_pol(x, c, n)
double x;
double c[];
register int n;
{
	double r, d;
	register int i;

	r = c[0];
	d = x;
	--n;
	for (i=1; i<n; i++) {
		r += d*c[i];
		d *= x;
	}
	r += d*c[i];
	return (r);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.