3 ms·
I‘m sorry, can you show an example of where this helps in the usage of Heron‘s Method?
by selfmodruntime 4y ago
I‘m sorry, can you show an example of where this helps in the usage of Heron‘s Method?
- scythe 4y agoHere are the results for numbers up to 50: http://codepad.org/NBmpZGpT http://codepad.org/NBmpZGpT The advantage simply comes from getting a better initial guess in some cases. When the test number is halfway between two perfect squares, the advantage is maximized -- for 30 we get 5.5 for the one method and 5.47727~ for the other, with a true value of 5.47722~. For some numbers, like 35, the integer square is closer than the half-integer, so the results are the same, but these are also the numbers with the best approximations to start with.