midpnt and derivatives( inf, exp, sqrt, etc.).


amdikand
08-23-2002, 11:16 AM
I am using midpnt to generate an implicit function depending on more than one parameter, which will be called in a self-consistent routine. I habe been using midexp for that task for almost a year but my results looked strange! Some days ago I decided to check the validity of that routine with respect to one taken in the book of D. P. Landau and paez, and a simpson routine written by myself. The two last routines gave similar results while midexp generated a completely different result(of about 100 units of difference). I conbclude that the routine midpnt in NR may contain mistakes or errors. If someone have a corrected version of that routine please I am in an urgent need of it.
Best regards.
DIDI.

Alex_nr
03-13-2007, 02:54 PM
I am also not getting correct answer and changing n changes result by a large margin. Till now I have figured out that there is a mismatch between the text above and the program. tnm turns out to be 3^n-2 in the program and again that is multiplied by 3 while finding del whereas in the text it's written that 2*3^n-2 points will be added. I don't know if I am missing something as I have not yet looked thoroughly