The problem is that variables A and B are both input and output because they are modified inside the subroutine. I have finally found out the issue after a deep look through the code. Subroutine Bisection(A,B,eps,f,niter,xroot,e0)ĭouble precision A,B,eps,xroot,fuc,fua,e0Ĭ Here the subroutine which uses e0 is called twiceĬ Here is the second print. I have used Fortran77 for numerical solving for a couple years and never encountered something like this, but it's been nearly 6 months since I don't program anything so maybe I missed an important thing.Ĭ Here is the first print. Does this mean the subroutine f1 is only called between "out 1" and "out 2"? (it should be called between every "out" print) But we see the first "out 1" print, some "in" prints and then only "out" prints. ![]() We expect an "out 1" print, some "in" prints (printed when subroutine f1 is called by subroutine Bisection some times), then "out 2" print (with the new e0 value), some "in" prints, etc.
0 Comments
Leave a Reply. |