double is more precise than float, I'd recommend never using float.Naweed wrote:oh ACCEPTED at last, after so many submissions.... But there are few things i need to know from this problem..
Why do we have to use DOUBLE instead of float? what are the ranges of doubles & floats actually??
& what is the difference between abs() & fabs() ??
Thank you
http://en.wikipedia.org/wiki/IEEE_floating_point
http://www.cplusplus.com/reference/cmath/fabs/
http://www.cplusplus.com/reference/cstdlib/abs/