Copyright | (c) Michal Konecny |
---|---|
License | BSD3 |
Maintainer | mikkonecny@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Precision type and its operations. Precision expresses a limit on the size of an approximation, roughly corresponding to the number of significant bits for a floating-point number and its generalisations to other types.
Documentation
Instances
class HasPrecision t where Source #
getPrecision :: t -> Precision Source #
Instances
HasPrecision Bool Source # | |
Defined in AERN2.MP.Precision getPrecision :: Bool -> Precision Source # | |
HasPrecision MPFloat Source # | |
Defined in AERN2.MP.Float.Type getPrecision :: MPFloat -> Precision Source # | |
HasPrecision Dyadic Source # | |
Defined in AERN2.MP.Dyadic getPrecision :: Dyadic -> Precision Source # | |
HasPrecision MPBall Source # | |
Defined in AERN2.MP.Ball.Type getPrecision :: MPBall -> Precision Source # | |
HasPrecision t => HasPrecision (Maybe t) Source # | |
Defined in AERN2.MP.Precision getPrecision :: Maybe t -> Precision Source # | |
HasPrecision t => HasPrecision (Complex t) Source # | |
Defined in AERN2.MP.Precision getPrecision :: Complex t -> Precision Source # | |
HasPrecision t => HasPrecision (CollectErrors es t) Source # | |
Defined in AERN2.MP.Precision getPrecision :: CollectErrors es t -> Precision Source # |
class CanSetPrecision t where Source #
setPrecision :: Precision -> t -> t Source #
Instances
CanSetPrecision Bool Source # | |
Defined in AERN2.MP.Precision | |
CanSetPrecision MPFloat Source # | |
Defined in AERN2.MP.Float.Type | |
CanSetPrecision MPBall Source # | |
Defined in AERN2.MP.Ball.Type | |
CanSetPrecision t => CanSetPrecision (Maybe t) Source # | |
Defined in AERN2.MP.Precision | |
CanSetPrecision t => CanSetPrecision (Complex t) Source # | |
Defined in AERN2.MP.Precision | |
CanSetPrecision t => CanSetPrecision (CollectErrors es t) Source # | |
Defined in AERN2.MP.Precision setPrecision :: Precision -> CollectErrors es t -> CollectErrors es t Source # |
lowerPrecisionIfAbove :: (HasPrecision t, CanSetPrecision t) => Precision -> t -> t Source #
raisePrecisionIfBelow :: (HasPrecision t, CanSetPrecision t) => Precision -> t -> t Source #
specCanSetPrecision :: (HasPrecision t, CanSetPrecision t, CanTestFinite t, Arbitrary t, Show t, Testable prop) => T t -> (t -> t -> prop) -> Spec Source #
standardPrecisions :: Precision -> [Precision] Source #
precisionTimes2 :: Precision -> Precision Source #
class ConvertibleWithPrecision t1 t2 where Source #
safeConvertP :: Precision -> t1 -> ConvertResult t2 Source #
Instances
convertP :: ConvertibleWithPrecision t1 t2 => Precision -> t1 -> t2 Source #
convertPFirst :: (ConvertibleWithPrecision t1 t2, HasPrecision t2) => (t2 -> t2 -> c) -> t1 -> t2 -> c Source #
convertPSecond :: (ConvertibleWithPrecision t2 t1, HasPrecision t1) => (t1 -> t1 -> c) -> t1 -> t2 -> c Source #