Numerical Mathematics and Computing, 7th Ed. - List of C Codes

Numerical Mathematics and Computing
Seventh Edition
Ward Cheney & David Kincaid
Sample C Codes


In the following table, each line/entry contains the program file name and a brief description.
Click on the program name to display the source code, which can be downloaded.
Chapter 1: Mathematical Preliminaries and Floating-Point Representation
first.c First programming experiment
double_first.c First programming experiment (double precision version)
pi.c Simple code to illustrate double precision
xsinx.c Example of programming f(x) = x - sinx carefully
Chapter 2: Linear Systems
ngauss.c Naive Gaussian elimination to solve linear systems
gauss.c Gaussian elimination with scaled partial pivoting
tri.c Solves tridiagonal systems
penta.c Solves pentadiagonal linear systems
Chapter 3: Locating Roots of Equations
bisection.c Bisection method
rec_bisection.c Recursive version of bisection method
newton.c Sample Newton method
secant.c Secant method
Chapter 4: Interpolation and Numerical Differentiation
coef.c Newton interpolation polynomial at equidistant pts
deriv.c Derivative by center differences/Richardson extrapolation
Chapter 5: Numerical Integration
sums.c Upper/lower sums experiment for an integral
trapezoid.c Trapezoid rule experiment for an integral
romberg.c Romberg arrays for three separate functions
rec_simpson.c Adaptive scheme for Simpson's rule
Chapter 6: Spline Functions
spline1.c Interpolates table using a first-degree spline function
spline3.c Natural cubic spline function at equidistant points
spline2.c Interpolates table using a quadratic B-spline function
schoenberg.c Interpolates table using Schoenberg's process
Chapter 7: Initial Values Problems
euler.c Euler's method for solving an ODE
taylor.c Taylor series method (order 4) for solving an ODE
rk4.c Runge-Kutta method (order 4) for solving an IVP
rk45.c Runge-Kutta-Fehlberg method for solving an IVP
mainrk45.c Runge-Kutta-Fehlberg method for solving an IVP (main program)
rk45ad.c Adaptive Runge-Kutta-Fehlberg method
taylorsys.c Taylor series method (order 4) for systems of ODEs
rk4sys.c Runge-Kutta method (order 4) for systems of ODEs
amrk.c Adams-Moulton method for systems of ODEs
amrkad.c Adaptive Adams-Moulton method for systems of ODEs
Chapter 8: More on Systems of Linear Equations
Chapter 9: Least Squares Methods
Chapter 10: Monte Carlo Methods and Simulation
test_random.c Example to compute, store, and print random numbers
coarse_check.c Coarse check on the random-number generator
double_integral.c Volume of a complicated 3D region by Monte Carlo
volume_region.c Numerical value of integral over a 2D disk by Monte Carlo
cone.c Ice cream cone example
loaded_die.c Loaded die problem simulation
birthday.c Birthday problem simulation
needle.c Buffon's needle problem simulation
two_die.c Two dice problem simulation
shielding.c Neutron shielding problem simulation
Chapter 11: Boundary Value Problems
bvp1.c Boundary value problem solved by discretization technique
bvp2.c Boundary value problem solved by shooting method
Chapter 12: Partial Differential Equations
parabolic1.c Parabolic partial differential equation problem
parabolic2.c Parabolic PDE problem solved by Crank-Nicolson method
hyperbolic.c Hyperbolic PDE problem solved by discretization
seidel.c Elliptic PDE solved by discretization/ Gauss-Seidel method
Chapter 13: Minimization of Functions
Chapter 14: Linear Programming Problems

Addditional programs can be found at the textbook's anonymous ftp site:

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


[Home] [Features] [TOC] [Purchase] [ Codes] [ Web] [ Manuals] [Errata] [Links]

  Last updated: 15 July 2012