spline: compute correct final slope