bad: if ($x == $y) abs tol: if (abs($x - $y) < $abs_tol) rel tol: if (abs($x - $y) < abs($x) * $rel_tol)