SW500011 Microchip Technology, SW500011 Datasheet - Page 200

HI-TECH X PRO FOR PIC32

SW500011

Manufacturer Part Number
SW500011
Description
HI-TECH X PRO FOR PIC32
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC32r
Datasheet

Specifications of SW500011

No. Of User Licenses
1
Supported Families
PIC32
Core Architecture
PIC
Supported Hosts
Windows XP, Vista, Linux, Mac OS X
Software Edition
Professional
Kit Contents
Software And Docs
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC32 Series
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
032
778-1007
778-1007
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.
200
#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);
Library Functions

Related parts for SW500011