 | CARM User's Guide Discontinued |  |
|
|
| fabs| Summary | | | Description | The fabs function determines the absolute value of the floating-point number val. | | Return Value | The fabs function returns the absolute value of val. | | See Also | abs, labs | | Example |
#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);
}
|
|
|