# Numerical Analysis: Mathematics of Scientific Computing Third EditionDavid Kincaid & Ward CheneySample Fortran Computer Programs

This page contains a list of sample Fortran computer programs associated with our textbook. In the following table, each line/entry contains the program name, the page number where it can be found in the textbook, and a brief description.
 Chapter 1 elimit.f 15-16 Example of a slowly converging sequence sqrt2.f 16-17 Example of a rapidly converging sequence nest.f 20-21 Nested multiplication Chapter 2 epsi.f 54 Approximate value of machine precision depsi.f 54 Approximate value of double precision machine precision ex2s22.f 57-58 Loss of significance unstab1.f 64-65 Example of an unstable sequence unstab2.f 65-66 Example of another unstable sequence instab.f 66 Example of numerical instability Chapter 3 ex1s31.f 76-78 Bisection method: roots of exp(x) = sin(x) ex1s32.f 81-83 Newton's method example ex2s32.f 86 Simple Newton's method ex3s32.f 86-87 Implicit function example ex1s33.f 95 Secant method example ex3s34.f 103-104 Contractive mapping example ex3s35.f 114 Horner's method example ex6s35.f 114-115 Newton's method on a given polynomial ex7s35.f 119-120 Bairstow's method example laguerre.f 123-124 Laguerre's method example Chapter 4 forsub.f 150 Forward substitution example bacsub.f 150 Backward substitution example pforsub.f 151 Forward substitution for a permuted system pbacsub.f 151 Backward substitution for a permuted system genlu.f 154 General LU-factorization example doolt.f 155 Doolittle's-factorization example cholsky.f 157-158 Cholesky-factorization example bgauss.f 167 Basic Gaussian elimination pbgauss.f 169 Basic Gaussian elimination with pivoting gauss.f 171-172 Gaussian elimination with scaled row pivoting paxeb.f 174-175 Solves Lz = Pb and then Ux = z yaec.f 175 Solves UT z = c and then LTPy = z tri.f 180 Tridiagonal system solver ex1s45.f 199-200 Neumann series example ex2s45.f 201 Gaussian elimination followed by iterative improvement ex1s46.f 208-209 Example of Jacobi and Gauss-Seidel methods ex2s46.f 211 Richardson method example (with scaling) jacobi.f 212-213 Jacobi method example (with scaling) ex3s46.f 217 Gauss-Seidel method (with scaling) ex6s46.f 228-229 Chebyshev acceleration example steepd.f 234 Steepest descent method example cg.f 238 Conjugate gradient method pcg.f 243-244 Jacobi preconditioned conjugate gradient method Chapter 5 ex1s51.f 259 Power method example poweracc.f 259-260 Power method with Aitken acceleration ex2s51.f 261 Inverse power method example ipoweracc.f 261 Inverse power method with Aitken acceleration ex1s52.f 268 Schur factorization example qrshif.f 276-277 Modified Gram-Schmidt example ex1s53.f 282-284 QR-factorization using Householder transformations ex2s55.f 302-303 QR-factorization example ex3s55.f 304 Shifted QR-factorization example Chapter 6 coef.f 309-311 Coefficients in the Newton form of a polynomial fft.f 455-456 Fast Fourier transform example adapta.f 461-463 Adaptive approximation example Chapter 7 ex1s71.f 466-467 Derivative approximations: forward difference formula ex2s71.f 469 Derivative approximation: central difference ex5s71.f 473 Derivative approximation: Richardson extrapolation ex6s71.f 476 Richardson extrapolation gauss5.f 496 Gaussian five-point quadrature example romberg.f 504 Romberg extrapolation adapt.f 511 Adaptive quadrature Chapter 8 taylor.f 531-532 Taylor-series method rk4.f 542-543 Runge-Kutta method rkfelberg.f Runge-Kutta-Fehlberg method taysys.f 567-568 Taylor series for systems Chapter 9 exs91.f 618-619 Boundary value problem (BVP): Explicit method example exs92.f 624-625 BVP: Implicit method example exs93.f 632-633 Finite difference method ex3s96.f 657 BVP: Method of characteristics mgrid1.f 668-669 Multigrid method example exs98.f 670 Damping of errors mgrid2.f 674-675 Multigrid method V-cycle

The sample Fortran programs listed above can be found at the following anonymous ftp site:

ftp://ftp.ma.utexas.edu/pub/kincaid-cheney/f77code/

 [Home] [Features] [TOC] [Purchase] [Sample Code] [Errata] Links]

 Last updated: 5/7/2003