polynomial-algebra-0.1: Multivariate polynomial rings
Safe HaskellNone
LanguageHaskell2010

Math.Algebra.Polynomial.Univariate.Lagrange

Description

Synopsis

Lagrange interpolation

lagrangeInterp :: KnownSymbol var => [(Rational, Rational)] -> Univariate Rational var Source #

The Lagrange interpolation for a list of (x_i,y_i) pairs: the resulting polynomial P is the one with minimal degree for which P(x_i) = y_i

lagrangePoly :: KnownSymbol var => [Rational] -> Int -> Univariate Rational var Source #

The minimal degree polynomial which evaluates to zero at the given inputs, except a single one on which it evaluates to 1