### Faster Cube Root II

Yesterday's post discussed an easily calculated cube root approximation with cubic convergence. More spelunking led me to realize the function is the result of a root-finding method known as Halley's method (the fellow with the comet named after him). So it's actually quite old, and, it seems, over the years it has been rediscovered a few times and attributed to others (Lambert, Bailey, etc).

If I ever studied Halley's method, I don't remember doing so. A major strength is that it does exhibit cubic convergence (in contrast to Newton's quadratic convergence). Even if it requires more ops per iteration than Newton's method, an iteration of either method requires a divide. In my experience, there are cases where Halley's method can pay off.

Here's the Wikipedia entry on it: Halley's method.

Halley's method:

x

In the case of the cube root of R:

f(x) = x

f'(x) = 3x

f''(x) = 6x

Plugging them into Halley:

x

Which simplifies to:

x

And it's only a little shuffling to get to the function I posted.

The next post looks at coming up with an initial guess for cube root.

If I ever studied Halley's method, I don't remember doing so. A major strength is that it does exhibit cubic convergence (in contrast to Newton's quadratic convergence). Even if it requires more ops per iteration than Newton's method, an iteration of either method requires a divide. In my experience, there are cases where Halley's method can pay off.

Here's the Wikipedia entry on it: Halley's method.

Halley's method:

x

_{n+1}= x_{n}- 2f(x_{n})f'(x_{n}) / (2 (f'(x_{n})^{2}- f(x_{n})f''(x_{n}))In the case of the cube root of R:

f(x) = x

^{3}- Rf'(x) = 3x

^{2}f''(x) = 6x

Plugging them into Halley:

x

_{n+1}= x - (6x^{2})(x^{3}-R) / (18x^{4}- 6x(x^{3}-R))Which simplifies to:

x

_{n+1}= (2xR + x^{4}) / (R + 2x^{3})And it's only a little shuffling to get to the function I posted.

The next post looks at coming up with an initial guess for cube root.

## 0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home