Viewing a single comment thread. View all comments

mfb- t1_j24bs0w wrote

x < x * x is only true for x>1, but that's not relevant here.

What we do need (for x>0 and y>0): if x < y then y/x > 1 or equivalently y^2 / x > y. Same for the other direction, if x > y then y^2 / x < y. Here y is the square root we are looking for. This inequality makes sure one of our numbers is always too small while the other one is too large, i.e. the square root is in between.

3