Portability | portable |
---|---|

Stability | experimental |

Maintainer | forsyde-dev@ict.kth.se |

This is the polynomial arithematic library. The arithematic operations include addition, multiplication, division and power. However, the computation time is not optimized for multiplication and is O(n2), which could be considered to be optimized by FFT algorithms later on.

- data Num a => Poly a
- addPoly :: Num a => Poly a -> Poly a -> Poly a
- mulPoly :: Num a => Poly a -> Poly a -> Poly a
- divPoly :: Num a => Poly a -> Poly a -> Poly a
- powerPoly :: Num a => Poly a -> Int -> Poly a
- getCoef :: Num a => Poly a -> ([a], [a])
- scalePoly :: Num a => a -> Poly a -> Poly a
- addPolyCoef :: Num a => [a] -> [a] -> [a]
- subPolyCoef :: RealFloat a => [a] -> [a] -> [a]
- scalePolyCoef :: Num a => a -> [a] -> [a]

# Polynomial data type

Polynomial data type.

# Addition, DmMultiplication, division and power operations

# Some helper functions

getCoef :: Num a => Poly a -> ([a], [a])Source

Some helper functions below.

To get the coefficients of the polynomial.

addPolyCoef :: Num a => [a] -> [a] -> [a]Source

subPolyCoef :: RealFloat a => [a] -> [a] -> [a]Source

scalePolyCoef :: Num a => a -> [a] -> [a]Source