floating-bits-0.3.1.0: Bitwise accurate floating point conversion, and Unit of Lease Precision calculation.
Copyright(C) 2015 Anselm Jonas Scholl (C) 2023 Julia Longtin
LicenseBSD3
MaintainerJulia Longtin
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.

float2WordBitwise :: Float -> Word32 Source #

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

word2DoubleBitwise :: Word64 -> Double Source #

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

word2FloatBitwise :: Word32 -> Float Source #

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