Interpolation methods written in ANSI C