HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulenumeric-prelude-0.4.4Haskell98

MathObj.RootSet

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 .

  • 1 type
  • 24 values
newtypenewtype T a
#

Constructors

Instances5Show, C
  • Show a => Show (T a)Defined in numeric-prelude-0.4.4 · MathObj.RootSet
  • (C a, C a) => C (T a)Defined in numeric-prelude-0.4.4 · MathObj.RootSet
  • (C a, C a) => C (T a)Defined in numeric-prelude-0.4.4 · MathObj.RootSet
  • (C a, C a) => C (T a)Defined in numeric-prelude-0.4.4 · MathObj.RootSet
  • (C a, C a) => C (T a)Defined in numeric-prelude-0.4.4 · MathObj.RootSet

Conversions

16 declarations
valuelift1 :: ([a] -> [a]) -> T a -> T a
#
valuelift2 :: ([a] -> [a] -> [a]) -> T a -> T a -> T a
#
valueaddRoot :: C a => a -> [a] -> [a]
#

cf. MathObj.Polynomial.mulLinearFactor

valueliftPowerSum2Gen
  1. :: [a] -> [a]
  2. -> [a] -> [a]
  3. -> [a] -> [a] -> [a]
  4. -> [a]
  5. -> [a]
  6. -> [a]
#
valueliftPowerSum2 :: (C a, C a) => ([a] -> [a] -> [a]) -> [a] -> [a] -> [a]
#

Show

1 declaration

Additive

2 declarations
valueadd :: (C a, C a) => [a] -> [a] -> [a]
#
valueaddInt :: (C a, Eq a, C a) => [a] -> [a] -> [a]
#

Ring

4 declarations
valuemul :: (C a, C a) => [a] -> [a] -> [a]
#
valuemulInt :: (C a, Eq a, C a) => [a] -> [a] -> [a]
#

Field.C

0 declarations

Algebra

1 declaration
valueapproxPolynomial :: C a => Int -> Integer -> a -> (a, T a)
#

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.