Portability | portable |
---|---|
Stability | experimental |
Maintainer | mik@konecny.aow.cz |
Data.Number.ER.Real.Base
Description
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 (RealFrac rb, Ord rb) => ERRealBase rb where
- typeName :: rb -> String
- initialiseBaseArithmetic :: rb -> IO ()
- 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
- isMinusInfinity :: rb -> Bool
- plusInfinity :: rb
- minusInfinity :: rb
- fromIntegerUp :: Integer -> rb
- fromIntegerDown :: Integer -> rb
- fromDouble :: Double -> rb
- toDouble :: rb -> Double
- fromFloat :: Float -> rb
- toFloat :: rb -> Float
- showDiGrCmp :: Int -> Bool -> Bool -> rb -> String
Documentation
module Data.Number.ER.BasicTypes
class (RealFrac rb, Ord rb) => ERRealBase rb whereSource
This class is an abstraction of a subset of real numbers with *upwards rounded* operations.
Methods
typeName :: rb -> StringSource
initialiseBaseArithmetic :: rb -> IO ()Source
defaultGranularity :: rb -> GranularitySource
getApproxBinaryLog :: rb -> ExtendedIntegerSource
getGranularity :: rb -> GranularitySource
setMinGranularity :: Granularity -> rb -> rbSource
setGranularity :: Granularity -> rb -> rbSource
getMaxRounding :: rb -> rbSource
if a
is rounded to ao
then |a-ao| <= getBaseMaxRounding ao
isPlusInfinity :: rb -> BoolSource
isMinusInfinity :: rb -> BoolSource
plusInfinity :: rbSource
minusInfinity :: rbSource
fromIntegerUp :: Integer -> rbSource
fromIntegerDown :: Integer -> rbSource
fromDouble :: Double -> rbSource
toDouble :: rb -> DoubleSource
Instances