Derivatives calculation fixed. Linear function is now interpolating correctly with Hermite Spline