| Copyright | (c) 2019 Andrew Lelechenko |
|---|---|
| License | BSD3 |
| Maintainer | Andrew Lelechenko <andrew.lelechenko@gmail.com> |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Poly
Description
Polynomials.
Documentation
Polynomials of one variable.
>>>:set -XOverloadedLists>>>-- (1 + x) * (-1 + x) = (-1 + x^2)>>>toPoly [1,1] * toPoly [-1,1]Poly {unPoly = [-1,0,1]}
>>>:set -XOverloadedLists>>>-- (1 + x) + (1 - x) = 2>>>toPoly [1,1] + toPoly [1,-1]Poly {unPoly = [2]}
unPoly :: Poly a -> Vector a Source #
Convert Poly to a vector of coefficients
(first element corresponds to a constant term).