https://www.bragitoff.com/2018/02/linear-spline-piecewise-interpolation-c-program/linear-spline-output-3-c-program/
linear spline output 3 c program