Data.Serialize.IEEE754
Contents
Description
- getFloat32be :: Get Float
- getFloat64be :: Get Double
- getFloat32le :: Get Float
- getFloat64le :: Get Double
- getFloat32host :: Get Float
- getFloat64host :: Get Double
- putFloat32le :: Putter Float
- putFloat64le :: Putter Double
- putFloat32be :: Putter Float
- putFloat64be :: Putter Double
- putFloat32host :: Putter Float
- putFloat64host :: Putter Double
- floatToWord :: Float -> Word32
- wordToFloat :: Word32 -> Float
- doubleToWord :: Double -> Word64
- wordToDouble :: Word64 -> Double
Big-endian reads
getFloat32be :: Get FloatSource
Read a 32-bit float in big endian format
getFloat64be :: Get DoubleSource
Read a 64-bit float in big endian format
Little-endian reads
getFloat32le :: Get FloatSource
Read a 32-bit float in little endian format
getFloat64le :: Get DoubleSource
Read a 64-bit float in little endian format
Host-endian, unaligned reads
getFloat32host :: Get FloatSource
Read a 32-bit float in native host order and host endianness
getFloat64host :: Get DoubleSource
Read a 64-bit float in native host order and host endianness
Little-endian writes
putFloat32le :: Putter FloatSource
Write a 32-bit float in little endian format
putFloat64le :: Putter DoubleSource
Write a 64-bit float in little endian format
Big-endian writes
putFloat32be :: Putter FloatSource
Write a 32-bit float in big endian format
putFloat64be :: Putter DoubleSource
Write a 64-bit float in big endian format
Host-endian, unaligned writes
putFloat32host :: Putter FloatSource
Write a 32-bit float in native host order and host endianness
putFloat64host :: Putter DoubleSource
Write a 64-bit float in native host order and host endianness
Conversions
floatToWord :: Float -> Word32Source
Interpret a 32-bit float as a 32-bit word.
wordToFloat :: Word32 -> FloatSource
Interpret a 32-bit word as a 32-bit float.
doubleToWord :: Double -> Word64Source
Interpret a 64-bit float as a 64-bit word.
wordToDouble :: Word64 -> DoubleSource
Interpret a 64-bit word as a 64-bit float.