math-functions-0.3.4.4: Collection of tools for numeric computations
Copyright(c) 2009 2011 Bryan O'Sullivan
LicenseBSD3
Maintainer[email protected]
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Numeric.Polynomial.Chebyshev

Description

Chebyshev polynomials.

Synopsis

Chebyshev polinomials

A Chebyshev polynomial of the first kind is defined by the following recurrence:

\[\begin{aligned} T_0(x) &= 1 \\ T_1(x) &= x \\ T_{n+1}(x) &= 2xT_n(x) - T_{n-1}(x) \\ \end{aligned} \]

chebyshev Source #

Arguments

:: Vector v Double 
=> Double

Parameter of each function.

-> v Double

Coefficients of each polynomial term, in increasing order.

-> Double 

Evaluate a Chebyshev polynomial of the first kind. Uses Clenshaw's algorithm.

chebyshevBroucke Source #

Arguments

:: Vector v Double 
=> Double

Parameter of each function.

-> v Double

Coefficients of each polynomial term, in increasing order.

-> Double 

Evaluate a Chebyshev polynomial of the first kind. Uses Broucke's ECHEB algorithm, and his convention for coefficient handling. It treat 0th coefficient different so

chebyshev x [a0,a1,a2...] == chebyshevBroucke [2*a0,a1,a2...]

References