Cubic Spline Extrema
View Dr. Dobb's article
Look at the C code (from the original article)