Changed abs to fabs.