SW006013 Microchip Technology, SW006013 Datasheet - Page 182

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
DS51456E-page 178
pow
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Calculates x raised to the power y.
<math.h>
double pow(double x, double y);
x
y
Returns x raised to the power y (x^y).
If y is 0, pow returns 1. If x is 0.0 and y is less than 0 pow returns inf
and a domain error occurs. If the result overflows or underflows, a
range error occurs.
#include <math.h>
#include <stdio.h> /* for printf, perror */
#include <errno.h> /* for errno
int main(void)
{
}
errno = 0;
double x,y,z;
errno = 0;
x = -2.0;
y = 3.0;
z = pow (x, y);
if (errno)
printf("%f raised to %f is %f\n\n ", x, y, z);
errno = 0;
x = 3.0;
y = -0.5;
z = pow (x, y);
if (errno)
printf("%f raised to %f is %f\n\n ", x, y, z);
x = 4.0;
y = 0.0;
z = pow (x, y);
if (errno)
printf("%f raised to %f is %f\n\n ", x, y, z);
errno = 0;
x = 0.0;
y = -3.0;
z = pow (x, y);
if (errno)
printf("%f raised to %f is %f\n\n ", x, y, z);
perror("Error");
perror("Error");
perror("Error");
perror("Error");
the base
the exponent
/* for pow
© 2008 Microchip Technology Inc.
*/
*/

Related parts for SW006013