Cube Root - Numerical Methods

Numerical Methods

Newton's method is an Iterative method that can be used to calculate the cube root. For real floating point numbers this method reduces to the following iterative algorithm to produce successively better approximations of the cube root of :

The method is simply averaging three factors chosen such that at each iteration.

Halley's method improves upon this with an algorithm that converges more quickly with each step, albeit consuming more multiplication operations:

With either method a poor initial approximation of can give very poor algorithm performance, and coming up with a good initial approximation is somewhat of a black art. Some implementations manipulate the exponent bits of the floating point number; i.e. they arrive at an initial approximation by dividing the exponent by 3. This has the disadvantage of requiring knowledge of the internal representation of the floating point number, and therefore a single implementation is not guaranteed to work across all computing platforms.

Also useful is this generalized continued fraction, based on the nth root method:

If x is a good first approximation to the cube root of z and y = zx3, then:

The second equation combines each pair of fractions from the first into a single fraction, thus doubling the speed of convergence. The advantage is that x and y are only computed once.

Read more about this topic:  Cube Root

Famous quotes containing the words numerical and/or methods:

    There is a genius of a nation, which is not to be found in the numerical citizens, but which characterizes the society.
    Ralph Waldo Emerson (1803–1882)

    We are lonesome animals. We spend all our life trying to be less lonesome. One of our ancient methods is to tell a story begging the listener to say—and to feel—”Yes, that’s the way it is, or at least that’s the way I feel it. You’re not as alone as you thought.”
    John Steinbeck (1902–1968)