! Input: ! f: the function to find a root of ! fp: function returning the derivative f' ! x0: the initial guess ! debug: logical, prints iterations if debug=.true. d - 14 contains subroutine solve ( f, fp, x0, x, iters, debug ) ! Estimate the zero of f(x) using Newton's method. ! $UWHPSC/codes/fortran/newton/newton.f90 module newton ! module parameters: implicit none integer, parameter :: maxiter = 20 real ( kind = 8 ), parameter :: tol = 1.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |