Data.Serialize.IEEE754

cereal-0.5.8.3: A binary serialization library

Safe Haskell | None
Language | Haskell2010

Data.Serialize.IEEE754

Contents

- IEEE-754 reads
- IEEE-754 writes

Description

IEEE-754 parsing, as described in this stack-overflow article:

http://stackoverflow.com/questions/6976684/converting-ieee-754-floating-point-in-haskell-word32-64-to-and-from-haskell-float/7002812#7002812

Synopsis

- getFloat32le :: Get Float
- getFloat32be :: Get Float
- getFloat64le :: Get Double
- getFloat64be :: Get Double
- putFloat32le :: Float -> Put
- putFloat32be :: Float -> Put
- putFloat64le :: Double -> Put
- putFloat64be :: Double -> Put

# IEEE-754 reads

getFloat32le :: Get Float #

Read a Float in little endian IEEE-754 format

getFloat32be :: Get Float #

Read a Float in big endian IEEE-754 format

getFloat64le :: Get Double #

Read a Double in little endian IEEE-754 format

getFloat64be :: Get Double #

Read a Double in big endian IEEE-754 format

# IEEE-754 writes

putFloat32le :: Float -> Put #

Write a Float in little endian IEEE-754 format

putFloat32be :: Float -> Put #

Write a Float in big endian IEEE-754 format

putFloat64le :: Double -> Put #

Write a Double in little endian IEEE-754 format

putFloat64be :: Double -> Put #

Write a Double in big endian IEEE-754 format