use fabs() for floating point