cubic_spline: some cleanup in the algorithm
test: test twice for correct result
cubic_spline: add comment
test: reformat