Handle rounding errors correctly in square root test.