The absolute value functions are defined in <math.h>. For a double, the function is fabs(), not abs(), used like:
double result = fabs(theNumber);
printf("fabs(%g) = %g\n", theNumber, fabs(theNumber));
The abs() function is for int() arguments only, and is defined in <stdlib.h>. You should explicitly include that in your source file if you want to use abs() in some other program. Don't depend on <stdio.h> including <stdlib.h> for you. Not all implementations of C will do that.
Finally, if you have a compiler with C99 support, <math.h> will include two more absolute value functions:
fabsf(x) --- returns the absolute value of a float argument, with a float result
fabsl(x) --- returns the absolue value of a long double argument, with a long double result