Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual
Product codes
SW006021-1
MPLAB
®
XC8 C Compiler User’s Guide
DS52053B-page 332
2012 Microchip Technology Inc.
FABS
Synopsis
#include <math.h>
double fabs (double f)
Description
This routine returns the absolute value of its double argument.
Example
#include <stdio.h>
#include <math.h>
void
main (void)
{
printf("%f %f\n", fabs(1.5), fabs(-1.5));
}
See Also
abs()
, labs()
FLASH ROUTINES
Description
These functions are now supplied in the peripheral library. See the peripheral library
documentation for full information on this library function.
documentation for full information on this library function.
FLOOR
Synopsis
#include <math.h>
double floor (double f)
Description
This routine returns the largest whole number not greater than
f
.
Example
#include <stdio.h>
#include <math.h>
void
main (void)
{
printf("%f\n", floor( 1.5 ));
printf("%f\n", floor( -1.5));
}