SW006013 Microchip Technology, SW006013 Datasheet - Page 165

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.
fabs
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
fabsf
Description:
Include:
Prototype:
Argument:
Return Value:
Remarks:
Example:
Calculates the absolute value of a double precision floating-point value.
<math.h>
double fabs(double x);
x
Returns the absolute value of x. (A negative number is returned as
positive, a positive number is unchanged.)
No domain or range error will occur.
#include <math.h>
#include <stdio.h> /* for printf */
int main(void)
{
}
Output:
The absolute value of
The absolute value of -1.500000 is
Calculates the absolute value of a single precision floating-point value.
<math.h>
float fabsf(float x);
x
Returns the absolute value of x. (A negative number is returned as
positive, a positive number is unchanged.)
No domain or range error will occur.
#include <math.h>
#include <stdio.h> /* for printf */
int main(void)
{
}
Output:
The absolute value of
The absolute value of -1.500000 is
printf("The absolute value of
printf("The absolute value of
double x, y;
x = 1.75;
y = fabs (x);
x = -1.5;
y = fabs (x);
printf("The absolute value of %f is
float x,y;
x = 1.75F;
y = fabsf (x);
x = -1.5F;
y = fabsf (x);
printf("The absolute value of %f is
floating-point value for which to return the absolute value
floating-point value for which to return the absolute value
/* for fabs
/* for fabsf
1.750000 is
1.750000 is
%f is
%f is
*/
*/
1.750000
1.500000
1.750000
1.500000
%f\n", x, y);
%f\n", x, y);
DS51456E-page 161
%f\n", x, y);
%f\n", x, y);

Related parts for SW006013