Question: Programming in C: One numerical method for calculating the cubic root of a number, , is in iterations. The process starts by choosing a value
Programming in C:
One numerical method for calculating the cubic root of a number, , is in iterations. The process starts by choosing a value as a first estimate of the solution. Using this value, a second, more accurate value can be calculated with , which is then used for calculating a third, still more accurate value , and so on. The general equation for calculating the value of is . Write a program to calculate the cubic root of a number by this method. In the program use =P for the first estimate of the solution. Then, by using the general equation in a while loop, calculate new, more accurate values. Stop the looping when the estimated relative error E defined by is smaller than 0.00001.
Print the estimate of the cube root of the number entered with 6 decimal digits and also print the actual value of the cube root of the same number from the math library
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
