Annotation of coherent/b/lib/libm/pol.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Evaluate a polynomial.
        !             3:  * The polynomial must contain at least two terms.
        !             4:  */
        !             5: #include <math.h>
        !             6: 
        !             7: double
        !             8: _pol(x, c, n)
        !             9: double x;
        !            10: double c[];
        !            11: register int n;
        !            12: {
        !            13:        double r, d;
        !            14:        register int i;
        !            15: 
        !            16:        r = c[0];
        !            17:        d = x;
        !            18:        --n;
        !            19:        for (i=1; i<n; i++) {
        !            20:                r += d*c[i];
        !            21:                d *= x;
        !            22:        }
        !            23:        r += d*c[i];
        !            24:        return (r);
        !            25: }

unix.superglobalmegacorp.com

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