Cx51 User's Guide
Technical Support
On-Line Manuals
#include <math.h> float fabs ( float val); /* number to take absolute value of */
#include <math.h> #include <stdio.h> /* for printf */ void tst_fabs (void) { float x; float y; x = 10.2; y = fabs (x); printf ("FABS(%f) = %f\n", x, y); x = -3.6; y = fabs (x); printf ("FABS(%f) = %f\n", x, y); }