abs 'implicit declaration...' error after including math.h
I'm going to quote straight from the docs : "Prototypes for abs, labs and llabs are in stdlib.h"
As a rule of thumb the mathematical functions that operate on floating point numbers are in math.h, and the ones that operate on integers are in stdlib.h.
There's a pretty good Wikipedia article on C mathematical functions if you need more information.