-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | C99 printf "%a" style formatting and parsing -- -- Format and parse floating point values as C99 printf/scanf with format -- string %a do @package float-binstring @version 0.1 -- | This module contains functions for formatting and parsing floating -- point values as C99 printf/scanf functions with format string -- %a do. -- -- Format is [-]0xh.hhhhhp±ddd, where h.hhhhh is -- significand as a hexadecimal floating-point number and ±ddd is -- exponent as a decimal number. Significand has as many digits as needed -- to exactly represent the value, fractional part may be ommitted. -- -- Infinity and NaN are represented as ±inf and nan -- accordingly. -- -- For example, (π ∷ Double) = 0x1.921fb54442d18p+1. -- -- Assertion -- --
-- Just x ≡ readFloatStr (showFloatStr x) ---- -- holds (modulo bugs and cosmic rays). -- -- Floating point radix is assumed to be 2. module Data.Float.BinString -- | Format a value. Will provide enough digits to reconstruct the value -- exactly. showFloatStr :: RealFloat a => a -> String -- | Parse a value from String. readFloatStr :: RealFloat a => String -> Maybe a instance [safe] Show Sign instance [safe] Show ParsedFloat