Item | Value |
Header file | math.h |
Declaration | float fabsf(float num); double fabs(double num); long double fabsl(long double num); |
Return | returns the absolute value of num. |
#include <math.h> #include <stdio.h> int main(void) { printf("%1.1f %1.1f", fabs(1.0), fabs(-1.0)); return 0; }
1.0 1.0
19.19.fabs | ||||
19.19.1. | fabs |