Create program to newtons method for cube roots, C/C++ Programming

Newton's method for cube roots is based on the fact that if y is an approximation to the cube root of x, then a better approximation is given by the value:

(x/y2+2y)/3

(a) Use this formula to implement a cube-root procedure analogous to the square-root procedure from the lecture notes.

(b) Modify your original implementation to allow the good-enough? procedure to be included as a argument to the cube-root procedure; i.e., (cube-root 3 good-enough?). In this way, roots of arbitrary precision should be possible by defining new forms of good-enough?

 

Posted Date: 3/25/2013 1:49:55 AM | Location : United States







Related Discussions:- Create program to newtons method for cube roots, Assignment Help, Ask Question on Create program to newtons method for cube roots, Get Answer, Expert's Help, Create program to newtons method for cube roots Discussions

Write discussion on Create program to newtons method for cube roots
Your posts are moderated
Related Questions
Write a program to illustrate array of structures? struct customer { int id; char name[15]; }; struct customer c[100]; . In the above instance, the array of Structures is

what is oops

Assignment:  write a C program and a MASM procedure.  The C program calls the MASM procedure to perform letter case conversion. Text sections covered:  12.1 to 12.3.1 Write a


Write a program to calculate e^x using the formula: e^x = 1 + x/1! + x^2/2! + x^3/3! + ...... Allow the user to enter the integer number x, then do the calculation in a loop (for

I need to include files so you can understand easier.

Objects as Function Arguments: In C program there are several methods to define arguments, and in some case even a structure can be approved as an argument.  Similarly in C+

C Program for SWAPPING THE STRING #include conio.h> #include stdio.h> void main() {           char a[50],temp=0;           int i=0,c=0,c1=0,l=0;           clr

write a program to calculate the cuboid

#include void func(int num, b=5) { auto int total=0; static int sum=0; for ( int i=num; i>0 ; i--) total+=i; sum+=total; cout