-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Crack various integer/floating-point data formats -- @package crackNum @version 1.0 -- | A library for formatting/analyzing FP and Integer values module Data.Numbers.CrackNum -- | Complete internal representation for a floating-point number data FP FP :: Integer -> Precision -> Bool -> Int -> Int -> Int -> [Bool] -> String -> Kind -> FP -- | The value as represented as a full Integer. Storage purposes only. intVal :: FP -> Integer -- | FP precision. prec :: FP -> Precision -- | Sign. If True then negative, otherwise positive. sign :: FP -> Bool -- | The exponent as it is stored. stExpt :: FP -> Int -- | The implicit bias of the exponent. bias :: FP -> Int -- | The actual exponent. expt :: FP -> Int -- | Bits in the fractional part fracBits :: FP -> [Bool] -- | Layout representation bitLayOut :: FP -> String -- | Floating-point kind (i.e., value) kind :: FP -> Kind -- | Floating point precision data Precision -- | Half precision; 16 bits = 1 sign + 5 exponent + 10 mantissa HP :: Precision -- | Single precision; 32 bits = 1 sign + 8 exponent + 23 mantissa SP :: Precision -- | Double precision; 64 bits = 1 sign + 11 exponent + 52 mantissa DP :: Precision -- | Integer/Word precision data IPrecision -- | 8-bit unsigned (byte) W8 :: IPrecision -- | 8-bit signed I8 :: IPrecision -- | 16-bit unsigned (word) W16 :: IPrecision -- | 16-bit signed I16 :: IPrecision -- | 32-bit unsigned (double-word) W32 :: IPrecision -- | 32-bit signed I32 :: IPrecision -- | 64-bit unsigned (quad-word) W64 :: IPrecision -- | 64-bit signed I64 :: IPrecision -- | Kinds of floating point values data Kind -- | Zero: 0. If Bool is true, then this is -0; otherwise +0. Zero :: Bool -> Kind -- | Infinity: oo. If Bool is true, then this is -oo, otherwie +oo. Infty :: Bool -> Kind -- | The screaming-NaN. SNaN :: Kind -- | The quiet-NaN. QNaN :: Kind -- | Denormalized number, i.e., leading bit is not 1 Denormal :: Kind -- | Normal value. Normal :: Kind -- | Crack a Haskell Integer value as a Half-precision floating point -- number crackHP :: Integer -> FP -- | Crack a Haskell Integer value as a Single-precision floating point -- number crackSP :: Integer -> FP -- | Crack a Haskell Integer value as a Double-precision floating point -- number crackDP :: Integer -> FP -- | Convert the given string to a IEEE number with the required precision convertToIEEE :: Precision -> String -> FP -- | Display a Floating-point number in a nicely formatted way displayFP :: FP -> String -- | Display a Integer (signed/unsigned) number in a nicely formatted way displayInt :: IPrecision -> Integer -> String