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 = z − x3, 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 (18031882)
“Parents ought, through their own behavior and the values by which they live, to provide direction for their children. But they need to rid themselves of the idea that there are surefire methods which, when well applied, will produce certain predictable results. Whatever we do with and for our children ought to flow from our understanding of and our feelings for the particular situation and the relation we wish to exist between us and our child.”
—Bruno Bettelheim (20th century)