Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cFloat64 Class Reference

#include <cFloat.h>

Public Member Functions

 cFloat64 () noexcept
 
 cFloat64 (double d) noexcept
 
void put_Bits (UINT64 qw) noexcept
 
UINT64 get_Mantissa () const noexcept
 

Static Public Member Functions

static UINT64 toBits (double src) noexcept
 
static double fromBits (UINT64 src) noexcept
 

Public Attributes

cUnion64 m_v
 holds the float64. More...
 

Static Public Attributes

static const UINT64 k_SIGN_MASK = 0x8000000000000000ULL
 1 bit = value sign (Sign_bit) More...
 
static const UINT64 k_EXP_MASK = 0x7FF0000000000000ULL
 11 bits = signed exponent (base 2) More...
 
static const UINT64 k_MANT_MASK = 0x000FFFFFFFFFFFFFULL
 52 bits = fractional mantissa More...
 
static const UINT32 k_MANT_BITS = 52
 52 bits = fractional mantissa More...
 

Detailed Description

pack/unpack IEEE float64/double http://en.wikipedia.org/wiki/IEEE_754-1985 Use DBL_MAX

Constructor & Destructor Documentation

◆ cFloat64() [1/2]

Gray::cFloat64::cFloat64 ( )
inlinenoexcept

◆ cFloat64() [2/2]

Gray::cFloat64::cFloat64 ( double  d)
inlinenoexcept

Member Function Documentation

◆ fromBits()

static double Gray::cFloat64::fromBits ( UINT64  src)
inlinestaticnoexcept

reinterpret an UINT64 as a double Warning in GNUC reinterpret_ warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

◆ get_Mantissa()

UINT64 Gray::cFloat64::get_Mantissa ( ) const
inlinenoexcept

◆ put_Bits()

void Gray::cFloat64::put_Bits ( UINT64  qw)
inlinenoexcept

◆ toBits()

static UINT64 Gray::cFloat64::toBits ( double  src)
inlinestaticnoexcept

reinterpret a double as an UINT64 Warning in GNUC reinterpret_ warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Member Data Documentation

◆ k_EXP_MASK

const UINT64 Gray::cFloat64::k_EXP_MASK = 0x7FF0000000000000ULL
static

11 bits = signed exponent (base 2)

◆ k_MANT_BITS

const UINT32 Gray::cFloat64::k_MANT_BITS = 52
static

52 bits = fractional mantissa

◆ k_MANT_MASK

const UINT64 Gray::cFloat64::k_MANT_MASK = 0x000FFFFFFFFFFFFFULL
static

52 bits = fractional mantissa

◆ k_SIGN_MASK

const UINT64 Gray::cFloat64::k_SIGN_MASK = 0x8000000000000000ULL
static

1 bit = value sign (Sign_bit)

◆ m_v

cUnion64 Gray::cFloat64::m_v

holds the float64.


The documentation for this class was generated from the following file: