Maintainer | bastiaan.heeren@ou.nl |
---|---|

Stability | provisional |

Portability | portable (depends on ghc) |

Safe Haskell | Safe |

Language | Haskell2010 |

## Synopsis

- data Polynomial a
- toPolynomial :: (Eq a, Num a) => [a] -> Polynomial a
- fromPolynomial :: (Eq a, Num a) => Polynomial a -> [a]
- var :: (Eq a, Num a) => Polynomial a
- con :: (Eq a, Num a) => a -> Polynomial a
- raise :: (Eq a, Num a) => Int -> Polynomial a -> Polynomial a
- degree :: (Eq a, Num a) => Polynomial a -> Int
- lowestDegree :: (Eq a, Num a) => Polynomial a -> Int
- coefficient :: (Eq a, Num a) => Int -> Polynomial a -> a
- isRoot :: (Eq a, Num a) => Polynomial a -> a -> Bool
- positiveRoots :: (Eq a, Num a) => Polynomial a -> Int
- negativeRoots :: (Eq a, Num a) => Polynomial a -> Int
- derivative :: (Eq a, Num a) => Polynomial a -> Polynomial a
- eval :: (Eq a, Num a) => Polynomial a -> a -> a
- polynomialGCD :: (Eq a, Fractional a) => Polynomial a -> Polynomial a -> Polynomial a
- factorize :: Polynomial Rational -> [Polynomial Rational]
- testPolynomials :: TestSuite

# Documentation

data Polynomial a Source #

## Instances

toPolynomial :: (Eq a, Num a) => [a] -> Polynomial a Source #

fromPolynomial :: (Eq a, Num a) => Polynomial a -> [a] Source #

raise :: (Eq a, Num a) => Int -> Polynomial a -> Polynomial a Source #

Raise all powers by a constant (discarding negative exponents)

lowestDegree :: (Eq a, Num a) => Polynomial a -> Int Source #

coefficient :: (Eq a, Num a) => Int -> Polynomial a -> a Source #

positiveRoots :: (Eq a, Num a) => Polynomial a -> Int Source #

negativeRoots :: (Eq a, Num a) => Polynomial a -> Int Source #

derivative :: (Eq a, Num a) => Polynomial a -> Polynomial a Source #

polynomialGCD :: (Eq a, Fractional a) => Polynomial a -> Polynomial a -> Polynomial a Source #

factorize :: Polynomial Rational -> [Polynomial Rational] Source #