HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

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 .

Contents
  1. Conversions
  2. Show
  3. Additive
  4. Ring
  5. Field.C
  6. Algebra
Synopsis
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

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

Additive

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

Ring

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

Field.C

Algebra

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.