There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is there test coverage on this? I'm mildly surprised that (y + 1) / 2 ~= (y / 2) + 1 and it doesn't break some other edge case.
(y + 1) / 2 ~= (y / 2) + 1
Sorry, something went wrong.
@MicahZoltu it's just a (somewhat arbitrary) starting value. see https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
in the process of fuzzing this function.