SW500007 Microchip Technology, SW500007 Datasheet - Page 211

PICC-18 PRO

SW500007

Manufacturer Part Number
SW500007
Description
PICC-18 PRO
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC18r
Datasheets

Specifications of SW500007

Supported Families
PIC18
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC18
Tool Function
Compiler
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
PIC18 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
015P
778-1002
778-1002
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);
197

Related parts for SW500007