crypto-numbers-0.2.7: Cryptographic numbers: functions and algorithms

License | BSD-style
Maintainer | Vincent Hanquez <vincent@snarc.org>
Stability | experimental
Portability | Good
Safe Haskell | None
Language | Haskell98

Crypto.Number.Polynomial

Contents

- polynomial operations

Description

Synopsis

- data Monomial = Monomial !Int !Integer
- data Polynomial
- toList :: Polynomial -> [Monomial]
- fromList :: [Monomial] -> Polynomial
- addPoly :: Polynomial -> Polynomial -> Polynomial
- subPoly :: Polynomial -> Polynomial -> Polynomial
- mulPoly :: Polynomial -> Polynomial -> Polynomial
- squarePoly :: Polynomial -> Polynomial
- expPoly :: Polynomial -> Integer -> Polynomial
- divPoly :: Polynomial -> Polynomial -> (Polynomial, Polynomial)
- negPoly :: Polynomial -> Polynomial

# Documentation

data Monomial

Constructors

Monomial !Int !Integer |

Instances

Eq Monomial |
Ord Monomial |
Show Monomial |

# polynomial operations

data Polynomial

Instances

Eq Polynomial |
Show Polynomial |

toList :: Polynomial -> [Monomial]

fromList :: [Monomial] -> Polynomial

addPoly :: Polynomial -> Polynomial -> Polynomial

subPoly :: Polynomial -> Polynomial -> Polynomial

mulPoly :: Polynomial -> Polynomial -> Polynomial

squarePoly :: Polynomial -> Polynomial

expPoly :: Polynomial -> Integer -> Polynomial

divPoly :: Polynomial -> Polynomial -> (Polynomial, Polynomial)

negPoly :: Polynomial -> Polynomial