Thiele's interpolation formula

In mathematics, Thiele's interpolation formula is a formula that defines a rational function $$f(x)$$ from a finite set of inputs $$x_i$$ and their function values $$f(x_i)$$. The problem of generating a function whose graph passes through a given set of function values is called interpolation. This interpolation formula is named after the Danish mathematician Thorvald N. Thiele. It is expressed as a continued fraction, where ρ represents the reciprocal difference:


 * $$ f(x) = f(x_1) + \cfrac{x-x_1}{\rho(x_1,x_2) + \cfrac{x-x_2}{\rho_2(x_1,x_2,x_3) - f(x_1) + \cfrac{x-x_3}{\rho_3(x_1,x_2,x_3,x_4) - \rho(x_1,x_2) + \cdots}}} $$

Note that the $$n$$-th level in Thiele's interpolation formula is


 * $$\rho_n(x_1,x_2,\cdots,x_{n+1})-\rho_{n-2}(x_1,x_2,\cdots,x_{n-1})+\cfrac{x-x_{n+1}}{\rho_{n+1}(x_1,x_2,\cdots,x_{n+2})-\rho_{n-1}(x_1,x_2,\cdots,x_{n})+\cdots},$$

while the $$n$$-th reciprocal difference is defined to be


 * $$\rho_n(x_1,x_2,\ldots,x_{n+1})=\frac{x_1-x_{n+1}}{\rho_{n-1}(x_1,x_2,\ldots,x_{n})-\rho_{n-1}(x_2,x_3,\ldots,x_{n+1})}+\rho_{n-2}(x_2,\ldots,x_{n})$$.

The two $$\rho_{n-2}$$ terms are different and can not be cancelled!