Portability | non-portable (Rank2Types) |
---|---|
Stability | provisional |
Maintainer | masahiro.sakai@gmail.com |
Safe Haskell | None |
Algebraic reals
Reference:
- Why the concept of a field extension is a natural one http://www.dpmms.cam.ac.uk/~wtg10/galois.html
- data AReal
- realRoots :: UPolynomial Rational -> [AReal]
- realRootsEx :: UPolynomial AReal -> [AReal]
- minimalPolynomial :: AReal -> UPolynomial Rational
- isRational :: AReal -> Bool
- isAlgebraicInteger :: AReal -> Bool
- height :: AReal -> Integer
- rootIndex :: AReal -> Int
- nthRoot :: Integer -> AReal -> AReal
- approx :: AReal -> Rational -> Rational
- approxInterval :: AReal -> Rational -> Interval Rational
- simpARealPoly :: UPolynomial AReal -> UPolynomial Rational
- goldenRatio :: AReal
Algebraic real type
Algebraic real numbers.
Construction
realRoots :: UPolynomial Rational -> [AReal]Source
Real roots of the polynomial in ascending order.
realRootsEx :: UPolynomial AReal -> [AReal]Source
Real roots of the polynomial in ascending order.
Properties
minimalPolynomial :: AReal -> UPolynomial RationalSource
The polynomial of which the algebraic number is root.
isRational :: AReal -> BoolSource
Whether the algebraic number is a rational.
isAlgebraicInteger :: AReal -> BoolSource
Whether the algebraic number is a root of a polynomial with integer
coefficients with leading coefficient 1
(a monic polynomial).
height :: AReal -> IntegerSource
Height of the algebraic number.
The height of an algebraic number is the greatest absolute value of the coefficients of the irreducible and primitive polynomial with integral rational coefficients.
rootIndex :: AReal -> IntSource
root index, satisfying
realRoots
(minimalPolynomial
a) !! rootIndex a == a
Operations
Approximation
Returns approximate rational value such that abs (a - approx a epsilon) <= epsilon
.
Returns approximate interval such that width (approxInterval a epsilon) <= epsilon
.
Misc
Golden ratio