floating-bits-0.3.0.0: Conversions between floating and integral values.

Copyright(C) 2015 Anselm Jonas Scholl
LicenseBSD3
MaintainerAnselm Jonas Scholl <anselm.scholl@tu-harburg.de>
Stabilityexperimental
PortabilityGHC-specific
Safe HaskellNone
LanguageHaskell2010

Data.Bits.Floating.Prim

Description

Primitive operations to coerce floating point numbers to integral numbers preserving their bitwise representations as well as functions operating on boxed values.

Synopsis

Documentation

double2WordBitwise :: Double -> Word64 Source

Convert a Double to a Word64 while preserving the bit-pattern.

word2DoubleBitwise :: Word64 -> Double Source

Convert a Word64 to a Double while preserving the bit-pattern.

float2WordBitwise :: Float -> Word32 Source

Convert a Float to a Word32 while preserving the bit-pattern.

word2FloatBitwise :: Word32 -> Float Source

Convert a Word32 to a Float while preserving the bit-pattern.