Return absolute value of floating-point: fabs
#include <stdio.h> #include <math.h> int main () { printf ("Absoulte value of 3.14 is %lf\n", fabs (3.14) ); printf ("Absoulte value of -11.6 is %lf\n", fabs (-11.6) ); return 0; }