reinterpret-cast-0.1.0: Memory reinterpretation casts for Float/Double and Word32/Word64

Safe HaskellNone

Data.ReinterpretCast.Internal.ImplFFI

Description

This is the FFI approach.

Implements casting via the FFI, using alloca like in http://hackage.haskell.org/package/data-binary-ieee754.

Synopsis

Documentation

floatToWord :: Float -> Word32Source

Reinterpret-casts a Float to a Word32.

wordToFloat :: Word32 -> FloatSource

Reinterpret-casts a Word32 to a Float.

doubleToWord :: Double -> Word64Source

Reinterpret-casts a Double to a Word64.

wordToDouble :: Word64 -> DoubleSource

Reinterpret-casts a Word64 to a Double.