dsp-0.2.3.1: Haskell Digital Signal Processing

Copyright (c) Matthew Donadio 2002 GPL m.p.donadio@ieee.org experimental portable Safe Haskell98

Polynomial.Basic

Contents

Description

Simple module for handling polynomials.

Synopsis

# Functions

polyeval :: Num a => [a] -> a -> a Source #

Evaluate a polynomial using Horner's method.

polyadd :: Num a => [a] -> [a] -> [a] Source #

Add two polynomials

polyAddScalar :: Num a => a -> [a] -> [a] Source #

polysub :: Num a => [a] -> [a] -> [a] Source #

Subtract two polynomials

polyscale :: Num a => a -> [a] -> [a] Source #

Scale a polynomial

polymult :: Num a => [a] -> [a] -> [a] Source #

Multiply two polynomials

polymultAlt :: Num a => [a] -> [a] -> [a] Source #

polydiv :: Fractional a => [a] -> [a] -> [a] Source #

Divide two polynomials

polymod :: Fractional a => [a] -> [a] -> [a] Source #

Modulus of two polynomials (remainder of division)

polypow :: (Num a, Integral b) => [a] -> b -> [a] Source #

Raise a polynomial to a non-negative integer power

polysubst :: Num a => [a] -> [a] -> [a] Source #

Polynomial substitution y(n) = x(w(n))

polysubstAlt :: Num a => [a] -> [a] -> [a] Source #

polyPolySubst :: Num a => [a] -> [[a]] -> [a] Source #

Polynomial substitution y(n) = x(w(n)) where the coefficients of x are also polynomials.

polyderiv :: Num a => [a] -> [a] Source #

Polynomial derivative

polyinteg :: Fractional a => [a] -> a -> [a] Source #

Polynomial integration

roots2poly :: Num a => [a] -> [a] Source #

Convert roots to a polynomial