Complete Natural Spline Algorithm