math-functions-0.1.1.2: Special functions and Chebyshev polynomials

Portabilityportable
Stabilityexperimental
Maintainerbos@serpentine.com
Safe HaskellNone

Numeric.Polynomial.Chebyshev

Contents

Description

Chebyshev polynomials.

Synopsis

Chebyshev polinomials

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

 t 0 _ = 1
 t 1 x = x
 t n x = 2 * x * t (n-1) x - t (n-2) x

chebyshevSource

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.

chebyshevBrouckeSource

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, and so gives different results than chebyshev for the same inputs.

References

  • Broucke, R. (1973) Algorithm 446: Ten subroutines for the manipulation of Chebyshev series. Communications of the ACM 16(4):254–256. http://doi.acm.org/10.1145/362003.362037
  • Clenshaw, C.W. (1962) Chebyshev series for mathematical functions. National Physical Laboratory Mathematical Tables 5, Her Majesty's Stationery Office, London.