SW006013 Microchip Technology, SW006013 Datasheet - Page 183

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
© 2008 Microchip Technology Inc.
pow (Continued)
powf
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Output:
-2.000000 raised to 3.000000 is -8.000000
Calculates x raised to the power y.
<math.h>
float powf(float x, float y);
x
y
Returns x raised to the power y (x^y).
If y is 0, powf returns 1. If x is 0.0 and y is less than 0 powf 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)
{
}
3.000000 raised to -0.500000 is 0.577350
4.000000 raised to 0.000000 is 1.000000
Error: domain error
0.000000 raised to -3.000000 is inf
float x,y,z;
errno = 0;
x = -2.0F;
y = 3.0F;
z = powf (x, y);
if (errno)
printf("%f raised to %f is %f\n\n ", x, y, z);
errno = 0;
x = 3.0F;
y = -0.5F;
z = powf (x, y);
if (errno)
printf("%f raised to %f is %f\n\n ", x, y, z);
errno = 0;
x = 0.0F;
y = -3.0F;
z = powf (x, y);
if (errno)
printf("%f raised to %f is %f\n\n ", x, y, z);
perror("Error");
perror("Error");
perror("Error");
base
exponent
/* for powf
DS51456E-page 179
*/
*/

Related parts for SW006013