Copyright | (c) Michal Konecny |
---|---|
License | BSD3 |
Maintainer | mikkonecny@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
AERN2.MP.UseMPFR.Float.Tests
Contents
Description
Tests for operations on arbitrary precision floats.
To run the tests using stack, execute:
stack test aern2-mp --test-arguments "-a 1000 -m MPFloat"
- specMPFloat :: Spec
- tMPFloat :: T MPFloat
- (=~=) :: MPFloat -> MPFloat -> Property
- approxEqual :: Integer -> MPFloat -> MPFloat -> Bool
- approxEqualWithArgs :: [(MPFloat, String)] -> MPFloat -> MPFloat -> Property
- frequencyElements :: ConvertibleExactly t Int => [(t, a)] -> Gen a
Documentation
specMPFloat :: Spec Source #
tMPFloat :: T MPFloat Source #
A runtime representative of type MPFloat
.
Used for specialising polymorphic tests to concrete types.
Arguments
:: Integer |
|
-> MPFloat | LHS of equation |
-> MPFloat | RHS of equation |
-> Bool |
Assert equality of two MPFloat's with tolerance 1/2^p
.
Arguments
:: [(MPFloat, String)] | intermediate values from which to determine tolerance, their names to report when the equality fails |
-> MPFloat | LHS of equation |
-> MPFloat | RHS of equation |
-> Property |
Assert equality of two MPFloat's with tolerance derived from the size and precision of the given intermediate values. When the assertion fails, report the given values using the given names.
frequencyElements :: ConvertibleExactly t Int => [(t, a)] -> Gen a Source #