SW500010 Microchip Technology, SW500010 Datasheet - Page 221

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
Library Functions
EVAL_POLY
Synopsis
Description
The eval_poly() function evaluates a polynomial, whose coefficients are contained in the array d, at
x, for example:
The order of the polynomial is passed in n.
Example
Return Value
A double value, being the polynomial evaluated at x.
#include <math.h>
double eval_poly (double x, const double * d, int n)
y = x * x * d2 + x * d1 + d0.
#include <stdio.h>
#include <math.h>
void
main (void)
{
}
double x, y;
double d[3] = {1.1, 3.5, 2.7};
x = 2.2;
y = eval_poly(x, d, 2);
printf("The polynomial evaluated at %f is %f\n", x, y);
221

Related parts for SW500010