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:

    The moment a mere numerical superiority by either states or voters in this country proceeds to ignore the needs and desires of the minority, and for their own selfish purpose or advancement, hamper or oppress that minority, or debar them in any way from equal privileges and equal rights—that moment will mark the failure of our constitutional system.
    Franklin D. Roosevelt (1882–1945)

    The reading public is intellectually adolescent at best, and it is obvious that what is called “significant literature” will only be sold to this public by exactly the same methods as are used to sell it toothpaste, cathartics and automobiles.
    Raymond Chandler (1888–1959)