numeric-prelude-0.4.4: An experimental alternative hierarchy of numeric type classes
Copyright(c) Henning Thielemann 2004-2005
Maintainernumericprelude@henning-thielemann.de
Stabilityprovisional
Portabilityrequires multi-parameter type classes
Safe HaskellNone
LanguageHaskell98

MathObj.RootSet

Description

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 .

Synopsis

Documentation

newtype T a Source #

Constructors

Cons 

Fields

Instances

Instances details
Show a => Show (T a) Source # 
Instance details

Defined in MathObj.RootSet

Methods

showsPrec :: Int -> T a -> ShowS #

show :: T a -> String #

showList :: [T a] -> ShowS #

(C a, C a) => C (T a) Source # 
Instance details

Defined in MathObj.RootSet

Methods

zero :: T a Source #

(+) :: T a -> T a -> T a Source #

(-) :: T a -> T a -> T a Source #

negate :: T a -> T a Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in MathObj.RootSet

Methods

(*) :: T a -> T a -> T a Source #

one :: T a Source #

fromInteger :: Integer -> T a Source #

(^) :: T a -> Integer -> T a Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in MathObj.RootSet

Methods

(/) :: T a -> T a -> T a Source #

recip :: T a -> T a Source #

fromRational' :: Rational -> T a Source #

(^-) :: T a -> Integer -> T a Source #

(C a, C a) => C (T a) Source # 
Instance details

Defined in MathObj.RootSet

Methods

sqrt :: T a -> T a Source #

root :: Integer -> T a -> T a Source #

(^/) :: T a -> Rational -> T a Source #

Conversions

lift0 :: [a] -> T a Source #

lift1 :: ([a] -> [a]) -> T a -> T a Source #

lift2 :: ([a] -> [a] -> [a]) -> T a -> T a -> T a Source #

const :: C a => a -> T a Source #

toPolynomial :: T a -> T a Source #

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

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

addRoot :: C a => a -> [a] -> [a] Source #

fromRoots :: 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

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

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

Ring

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

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

pow :: (C a, C a) => Integer -> [a] -> [a] Source #

powInt :: (C a, Eq a, C a) => Integer -> [a] -> [a] Source #

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.