corrected for errors in floating-point equality tests