# 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
- adaptint.m, adaptive piecewise linear
interpolation`

### Quadrature

- trapez.m, a simple Matlab implementation
of the trapezoidal rule with equal subintervals
- showtrapez.m, Matlab script to
study the convergence of the trapezoidal rule
- f.m, Matlab function to integrate with trapez.m
- adaptsimp.m, a simple adaptive quadrature
program in Matlab, based on Simpson's rule
- humpsp.m, a version of the humps function
that counts how many times it is called and plots the calling points, for
exploring adaptive quadrature routines
- showadapt.m, Matlab script useful
for exploring adaptsimp and other adaptive quadrature routines
- conv.m , a Matlab script to produce a
log-log error plot demonstrating the convergence rates for the trapezoidal
rule and Simpson's rule

Back to CSE/MATH 455 home page