Abstraction over various fixed and floating point types as well as rational numbers.
This module should be included qualified as is often given the local synonym B.
- module Data.Number.ER.BasicTypes
- class (Fractional rb, Ord rb) => ERRealBase rb where
- defaultGranularity :: rb -> Granularity
- getApproxBinaryLog :: rb -> ExtendedInteger
- getGranularity :: rb -> Granularity
- setMinGranularity :: Granularity -> rb -> rb
- setGranularity :: Granularity -> rb -> rb
- getMaxRounding :: rb -> rb
- isERNaN :: rb -> Bool
- erNaN :: rb
- isPlusInfinity :: rb -> Bool
- plusInfinity :: rb
- minusInfinity :: rb
- fromDouble :: Double -> rb
- toDouble :: rb -> Double
- fromFloat :: Float -> rb
- toFloat :: rb -> Float
- showDiGrCmp :: Int -> Bool -> Bool -> rb -> String
This class is an abstraction of a subset of real numbers with upwards rounded operations.
a is rounded to
|a-ao| <= getBaseMaxRounding ao