Portability | requires multi-parameter type classes |
---|---|

Stability | provisional |

Maintainer | numericprelude@henning-thielemann.de |

Computations on the set of roots of a polynomial. These are represented as the list of their elementar symmetric terms. The difference between a polynomial and the list of elementar symmetric terms is the reversed order and the alternated signs.

Cf. *MathObj.PowerSum* .

- newtype T a = Cons {
- coeffs :: [a]

- lift0 :: [a] -> T a
- lift1 :: ([a] -> [a]) -> T a -> T a
- lift2 :: ([a] -> [a] -> [a]) -> T a -> T a -> T a
- const :: C a => a -> T a
- toPolynomial :: T a -> T a
- fromPolynomial :: T a -> T a
- toPowerSums :: (C a, C a) => [a] -> [a]
- fromPowerSums :: (C a, C a) => [a] -> [a]
- addRoot :: C a => a -> [a] -> [a]
- fromRoots :: C a => [a] -> [a]
- liftPowerSum1Gen :: ([a] -> [a]) -> ([a] -> [a]) -> ([a] -> [a]) -> [a] -> [a]
- liftPowerSum2Gen :: ([a] -> [a]) -> ([a] -> [a]) -> ([a] -> [a] -> [a]) -> [a] -> [a] -> [a]
- liftPowerSum1 :: (C a, C a) => ([a] -> [a]) -> [a] -> [a]
- liftPowerSum2 :: (C a, C a) => ([a] -> [a] -> [a]) -> [a] -> [a] -> [a]
- liftPowerSumInt1 :: (C a, Eq a, C a) => ([a] -> [a]) -> [a] -> [a]
- liftPowerSumInt2 :: (C a, Eq a, C a) => ([a] -> [a] -> [a]) -> [a] -> [a] -> [a]
- appPrec :: Int
- add :: (C a, C a) => [a] -> [a] -> [a]
- addInt :: (C a, Eq a, C a) => [a] -> [a] -> [a]
- mul :: (C a, C a) => [a] -> [a] -> [a]
- mulInt :: (C a, Eq a, C a) => [a] -> [a] -> [a]
- pow :: (C a, C a) => Integer -> [a] -> [a]
- powInt :: (C a, Eq a, C a) => Integer -> [a] -> [a]
- approxPolynomial :: C a => Int -> Integer -> a -> (a, T a)

# Documentation

# Conversions

toPolynomial :: T a -> T aSource

fromPolynomial :: T a -> T aSource

toPowerSums :: (C a, C a) => [a] -> [a]Source

fromPowerSums :: (C a, C a) => [a] -> [a]Source

liftPowerSum1Gen :: ([a] -> [a]) -> ([a] -> [a]) -> ([a] -> [a]) -> [a] -> [a]Source

liftPowerSum2Gen :: ([a] -> [a]) -> ([a] -> [a]) -> ([a] -> [a] -> [a]) -> [a] -> [a] -> [a]Source

liftPowerSum1 :: (C a, C a) => ([a] -> [a]) -> [a] -> [a]Source

liftPowerSum2 :: (C a, C a) => ([a] -> [a] -> [a]) -> [a] -> [a] -> [a]Source

liftPowerSumInt1 :: (C a, Eq a, C a) => ([a] -> [a]) -> [a] -> [a]Source

liftPowerSumInt2 :: (C a, Eq a, C a) => ([a] -> [a] -> [a]) -> [a] -> [a] -> [a]Source

# Show

# Additive

# Ring

# Field.C

# Algebra

approxPolynomial :: C a => Int -> Integer -> a -> (a, T a)Source

Given an approximation of a root, the degree of the polynomial and maximum value of coefficients, find candidates of polynomials that have approximately this root and show the actual value of the polynomial at the given root approximation.

This algorithm runs easily into a stack overflow, I do not know why. We may also employ a more sophisticated integer relation algorithm, like PSLQ and friends.