Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You don't actually even have to know the squares of half integers, though.

Like, if you're looking for sqrt(30) and you're trying to decide 'should I use 5 or 6 as my first estimate?'... you don't actually care, just pick 5.5. You're looking for a decent estimate, and in that situation you can tell 5.5 is going to be a better one than either 5 or 6, without actually knowing or caring what 5.5^2 actually is.

Likewise if you're going for sqrt(33) you could take a reasonable guess that 5.75 will be a better starting estimate than either 5.5 or 6, just by gauging roughly where 33 sits on the logarithmic scale between 25 and 36.

The point of Heron's method, though, is that no matter your starting estimate, it is guaranteed to be even closer to the right answer. So even if your mental logarithmic estimate is really well attuned and you think 'yeah, 33 looks like about 5.74 squared', Heron can refine that to 5.7446.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: