(03-16-2020 07:49 PM)Gerson W. Barbosa Wrote: [ -> ] (03-16-2020 02:42 PM)Albert Chan Wrote: [ -> ]We can use Pade approximation to speedup convergence.
...
For cube roots, we have: \(\large\sqrt[3]k ≈ x \left({2k\;+\; x^3 \over k\;+\;2x^3 } \right) \)
Very nice! For k = 27 and x₀ = √√27 I get 3.00000000001 after 3 iterations. Thanks!
One issue is optimal range of k, to maximize convergence rate.
In other words, with guess = k^y, y≠1/3, should we convert \(\sqrt[3]{27} = 10 \sqrt[3]{0.027}\) ?
At the break-even point, errors should match, but with opposite sign:
\(\sqrt[3]k - k^y = 10(k/1000)^y - \sqrt[3]k\)
\(2 \sqrt[3]k = (1 + 10/1000^y) k^y \)
At break-even, \(\large k = (1/2 + 5/1000^y)^{1 \over 1/3\;-\;y}\)
With guess, x₀ = √√k = k^(1/4), break-even k ≈ 51.636 → optimal k in range [0.051636, 51.636)
Example, try \(\;\sqrt[3]{100}\)
= 4.64158 88336 12728 89241 00763 ...
x₀ = √√(100) → x3 = 4.64158 88336 12724 68166 58655
x₀ = 10√√0.1 → x3 = 4.64158 88336 12728 89241 08943
Keeping k inside optimal range, \(\sqrt[3]{100} = 10\;\sqrt[3]{0.1}\), x
3 gained 7 digits accuracy.
---
OP, we estimate k^(1/3) as k^0x0.5555, break-even k ≈ 31.624 → optimal k in range [0.031624, 31.624)
100^0x0.5555 = 4.641480114, error ≈ +0.000109
10 * 0.1^0x0.5555 = 4.641643194, error ≈ −0.000054, better, as expected