The Stack Overflow podcast is back! Listen to an interview with our new CEO.

A method of generating a polynomial that crosses through a set of data. The degree of this polynomial is equal to the size of the data.

Let $(x_j)_{j=0}^{m-1},(y_j)_{j=0}^{m-1}$ be real numbers such that no $2$ $x_j$s are the same. The Lagrange interpolating polynomial is given by $$ l(x) = \sum_{j=0}^{m-1} y_j \prod_{j \neq k \in [0..m-1]} \frac{x-x_k}{x_j - x_k} $$

history | excerpt history