need fabs instead of abs for double