# CSE/MATH 455, Programs discussed in class, labs, etc.

These are mostly simple programs to make a point or describe the core of an algorithm. They are generally not intended to be used for serious computation.

### Floating point computation

• showbin.f, a FORTRAN program to print the binary representation of a number
• arith.f, a FORTRAN program demonstrating a very simple example of catastrophic cancellation
• quadratic.f, a naive quadratic equation solver in FORTRAN; try the coefficients 1, 1000, and 1
• integrate.f, a poor FORTRAN 90 program for numerical integration; note the flawed test for terminating the loop

### Rootfinding

• bisect0.m, a basic bisection method program in Matlab
• bisect.m, a better bisection method program in Matlab
• newton0.m, a basic Newton's method program in Matlab
• secant.f, a FORTRAN subroutine implementing the secant method
• dosecant.f, a calling program for secant.f
• f.f, a function to be used as input for secant.f or root.f
• root.f, an adaptive root finding program based on the bisection and secant methods
• doroot.f, a calling program for root.f
• aitken.f , computation of a fixed point and acceleration by Aitken extrapolation
• fixedpoint.m , Matlab program for graphical exploration of fixed point iteration
• iterfun.m , Matlab routine used by fixedpoint.m

### Interpolation

• ginterp.m, Matlab program for graphical exploration of Lagrange interpolating polynomial and cubic spline interpolant
• ninterp.m, Matlab program to evaluate the Lagrange interpolating polynomial
• divdif.m, compute divided differences, mainly for use by ninterp.m
• pop, not a program, but data: the US population from each 20th century census
• pwinterp.m, piecewise Lagrange interpolation
• hermite3.m, Hermite cubic interpolation
• pwhermite.m, piecewise Hermite cubic interpolation Back to CSE/MATH 455 home page