module Data.Number.ER.Real.Base
(
module Data.Number.ER.BasicTypes,
ERRealBase(..)
)
where
import Data.Number.ER.BasicTypes
import qualified Data.Number.ER.BasicTypes.ExtendedInteger as EI
import Data.Typeable
class (RealFrac rb, Ord rb) => ERRealBase rb
where
typeName :: rb -> String
initialiseBaseArithmetic :: rb -> IO ()
initialiseBaseArithmetic x =
do
putStrLn $ "Base arithmetic: " ++ typeName x
defaultGranularity :: rb -> Granularity
getApproxBinaryLog :: rb -> EI.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
isMinusInfinity = isPlusInfinity . negate
plusInfinity :: rb
minusInfinity :: rb
minusInfinity = plusInfinity
fromIntegerUp :: Integer -> rb
fromIntegerDown :: Integer -> rb
fromIntegerDown i = negate $ fromIntegerUp $ i
fromDouble :: Double -> rb
toDouble :: rb -> Double
fromFloat :: Float -> rb
toFloat :: rb -> Float
showDiGrCmp ::
Int ->
Bool ->
Bool ->
rb -> String