HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulemath-functions-0.3.4.4Haskell2010

Numeric.Polynomial.Chebyshev

Chebyshev polynomials.

  • 2 values

Chebyshev polinomials

2 declarations

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}

valuechebyshev
  1. :: Vector v Double
  2. => Double

    Parameter of each function.

  3. -> v Double

    Coefficients of each polynomial term, in increasing order.

  4. -> Double
#

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

valuechebyshevBroucke
  1. :: Vector v Double
  2. => Double

    Parameter of each function.

  3. -> v Double

    Coefficients of each polynomial term, in increasing order.

  4. -> 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

0 declarations
  • 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.