Changing the abs comparison function.
Guarding the approximate code with double conversion exceptions.