Polynomial interpolation implementation