![]() |
| ||
| problem with calling a function I'm trying to create a function that uses loops to determine the roots of an equation using the Newton-Raphson method. I have my Newton function set up to take the input from my main prog, calculate the roots, and then return them back into the main prog. Somewhere along the lines something is going wrong. When I input my negative and positive values, I receive my first line of output "Call Newton<given guess> saves root and returns function" but then the program stops. I'm not sure if this is a problem with my loop, my Newton function, or with my program calling the Newton function. here is my code Main program #include "head.h" and here is my Newton function double guess, xi,root; |
| ||
| Re: problem with calling a function basically what i'm trying to do is make the newton function accept two numbers, plug them through the equation f(x)/f'(x) and return a root. I then want prog.cpp to return that root |
| ||
| Re: problem with calling a function halp |
| All times are GMT -4. The time now is 5:58 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC