exp-extended-0.1.1: floating point with extended exponent range

Safe HaskellSafe
LanguageHaskell2010

Numeric.ExpExtended.Internal

Description

Internal stuff.

Synopsis

Documentation

data Cache a Source

Cache of useful magic values.

Constructors

Cache 

Fields

cRadix :: !Integer

base floatRadix

cDigits :: !Int

base floatDigits

cRangeMin :: !Int

base fst . floatRange

cRangeMax :: !Int

base snd . floatRange

cSupExponent :: !Int

magic for overflow checks

(finite :: a) && supExponent <= e ==> maxExponent < exponent finite + e
cInfExponent :: !Int

magic for underflow checks

(finite :: a) && e <= infExponent ==> exponent finite + e < minExponent
cUpShift :: Integer -> Int -> Integer

radix-aware shiftL

cDownShift :: Integer -> Int -> Integer

radix-aware shiftR

cRadixPower :: Int -> Integer

radix-aware bit

cExpMin :: !Int

smaller than this exponent and base exp is 1

cExpMax :: !Int

larger than this exponent and base exp overflows to inf or 0

cExpInf :: !Int

smaller than this exponent and extended exp is 1

cExpSup :: !Int

larger than this exponent and extended exp overflows to inf or 0

cLogRadix :: !a

base log . fromInteger . floatRadix

cRadix' :: !a

base fromInteger . floatRadix

cacheDefault :: RealFloat a => Cache a Source

Calculate the magic values at a type.

minExponent :: Int Source

Minimum exponent.

As small as possible without requiring more expensive overflow checks.

maxExponent :: Int Source

Maximum exponent.

As big as possible without requiring more expensive overflow checks.