Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
gte::IEEEBinary< Float, UInt, NumBits, Precision > Class Template Reference

#include <GteIEEEBinary.h>

Public Types

enum  Classification {
  CLASS_NEG_INFINITY, CLASS_NEG_SUBNORMAL, CLASS_NEG_NORMAL, CLASS_NEG_ZERO,
  CLASS_POS_ZERO, CLASS_POS_SUBNORMAL, CLASS_POS_NORMAL, CLASS_POS_INFINITY,
  CLASS_QUIET_NAN, CLASS_SIGNALING_NAN
}
 
typedef Float FloatType
 
typedef UInt UIntType
 

Public Member Functions

UInt GetBiased () const
 
Classification GetClassification () const
 
void GetEncoding (UInt &sign, UInt &biased, UInt &trailing) const
 
UInt GetNextDown () const
 
UInt GetNextUp () const
 
UInt GetSign () const
 
UInt GetTrailing () const
 
 IEEEBinary ()
 
 IEEEBinary (IEEEBinary const &object)
 
 IEEEBinary (UInt inEncoding)
 
 IEEEBinary (UInt inSign, UInt inBiased, UInt inTrailing)
 
 IEEEBinary (Float inNumber)
 
bool IsFinite () const
 
bool IsInfinite () const
 
bool IsNaN () const
 
bool IsNormal () const
 
bool IsSignalingNaN () const
 
bool IsSignMinus () const
 
bool IsSubnormal () const
 
bool IsZero () const
 
 operator Float () const
 
 operator UInt () const
 
IEEEBinaryoperator= (IEEEBinary const &object)
 
void SetEncoding (UInt sign, UInt biased, UInt trailing)
 
 ~IEEEBinary ()
 

Public Attributes

union {
   UInt   encoding
 
   Float   number
 
}; 
 

Static Public Attributes

static int const EXPONENT_BIAS = (1 << (NUM_EXPONENT_BITS - 1)) - 1
 
static UInt const EXPONENT_MASK = NOT_SIGN_MASK & ~TRAILING_MASK
 
static int const MAX_BIASED_EXPONENT = (1 << NUM_EXPONENT_BITS) - 1
 
static UInt const MAX_NORMAL = NOT_SIGN_MASK & ~SUP_TRAILING
 
static UInt const MAX_SUBNORMAL = TRAILING_MASK
 
static UInt const MAX_TRAILING = TRAILING_MASK
 
static int const MIN_EXPONENT = MIN_SUB_EXPONENT - NUM_TRAILING_BITS
 
static UInt const MIN_NORMAL = SUP_TRAILING
 
static int const MIN_SUB_EXPONENT = 1 - EXPONENT_BIAS
 
static UInt const MIN_SUBNORMAL = UInt(1)
 
static UInt const NAN_PAYLOAD_MASK = (TRAILING_MASK >> 1)
 
static UInt const NAN_QUIET_MASK = (UInt(1) << (NUM_TRAILING_BITS - 1))
 
static UInt const NEG_INFINITY = SIGN_MASK | EXPONENT_MASK
 
static UInt const NEG_ZERO = SIGN_MASK
 
static UInt const NOT_SIGN_MASK = UInt(~SIGN_MASK)
 
static int const NUM_ENCODING_BITS = NumBits
 
static int const NUM_EXPONENT_BITS = NumBits - Precision
 
static int const NUM_SIGNIFICAND_BITS = Precision
 
static int const NUM_TRAILING_BITS = Precision - 1
 
static UInt const POS_INFINITY = EXPONENT_MASK
 
static UInt const POS_ZERO = UInt(0)
 
static UInt const SIGN_MASK = (UInt(1) << (NumBits - 1))
 
static int const SIGN_SHIFT = NumBits - 1
 
static UInt const SUP_TRAILING = (UInt(1) << NUM_TRAILING_BITS)
 
static UInt const TRAILING_MASK = (UInt(1) << NUM_TRAILING_BITS) - 1
 

Detailed Description

template<typename Float, typename UInt, int NumBits, int Precision>
class gte::IEEEBinary< Float, UInt, NumBits, Precision >

Definition at line 17 of file GteIEEEBinary.h.

Member Typedef Documentation

template<typename Float, typename UInt, int NumBits, int Precision>
typedef Float gte::IEEEBinary< Float, UInt, NumBits, Precision >::FloatType

Definition at line 21 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
typedef UInt gte::IEEEBinary< Float, UInt, NumBits, Precision >::UIntType

Definition at line 22 of file GteIEEEBinary.h.

Member Enumeration Documentation

template<typename Float, typename UInt, int NumBits, int Precision>
enum gte::IEEEBinary::Classification
Enumerator
CLASS_NEG_INFINITY 
CLASS_NEG_SUBNORMAL 
CLASS_NEG_NORMAL 
CLASS_NEG_ZERO 
CLASS_POS_ZERO 
CLASS_POS_SUBNORMAL 
CLASS_POS_NORMAL 
CLASS_POS_INFINITY 
CLASS_QUIET_NAN 
CLASS_SIGNALING_NAN 

Definition at line 70 of file GteIEEEBinary.h.

Constructor & Destructor Documentation

template<typename Float , typename UInt , int NumBits, int Precision>
gte::IEEEBinary< Float, UInt, NumBits, Precision >::~IEEEBinary ( )

Definition at line 121 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
gte::IEEEBinary< Float, UInt, NumBits, Precision >::IEEEBinary ( )

Definition at line 126 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
gte::IEEEBinary< Float, UInt, NumBits, Precision >::IEEEBinary ( IEEEBinary< Float, UInt, NumBits, Precision > const &  object)

Definition at line 132 of file GteIEEEBinary.h.

template<typename Float , typename UInt, int NumBits, int Precision>
gte::IEEEBinary< Float, UInt, NumBits, Precision >::IEEEBinary ( UInt  inEncoding)

Definition at line 140 of file GteIEEEBinary.h.

template<typename Float , typename UInt, int NumBits, int Precision>
gte::IEEEBinary< Float, UInt, NumBits, Precision >::IEEEBinary ( UInt  inSign,
UInt  inBiased,
UInt  inTrailing 
)

Definition at line 147 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
gte::IEEEBinary< Float, UInt, NumBits, Precision >::IEEEBinary ( Float  inNumber)

Definition at line 154 of file GteIEEEBinary.h.

Member Function Documentation

template<typename Float , typename UInt , int NumBits, int Precision>
UInt gte::IEEEBinary< Float, UInt, NumBits, Precision >::GetBiased ( ) const

Definition at line 419 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
IEEEBinary< Float, UInt, NumBits, Precision >::Classification gte::IEEEBinary< Float, UInt, NumBits, Precision >::GetClassification ( ) const

Definition at line 182 of file GteIEEEBinary.h.

template<typename Float , typename UInt, int NumBits, int Precision>
void gte::IEEEBinary< Float, UInt, NumBits, Precision >::GetEncoding ( UInt &  sign,
UInt &  biased,
UInt &  trailing 
) const

Definition at line 439 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
UInt gte::IEEEBinary< Float, UInt, NumBits, Precision >::GetNextDown ( ) const

Definition at line 341 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
UInt gte::IEEEBinary< Float, UInt, NumBits, Precision >::GetNextUp ( ) const

Definition at line 269 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
UInt gte::IEEEBinary< Float, UInt, NumBits, Precision >::GetSign ( ) const

Definition at line 413 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
UInt gte::IEEEBinary< Float, UInt, NumBits, Precision >::GetTrailing ( ) const

Definition at line 425 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
bool gte::IEEEBinary< Float, UInt, NumBits, Precision >::IsFinite ( ) const

Definition at line 242 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
bool gte::IEEEBinary< Float, UInt, NumBits, Precision >::IsInfinite ( ) const

Definition at line 248 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
bool gte::IEEEBinary< Float, UInt, NumBits, Precision >::IsNaN ( ) const

Definition at line 254 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
bool gte::IEEEBinary< Float, UInt, NumBits, Precision >::IsNormal ( ) const

Definition at line 235 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
bool gte::IEEEBinary< Float, UInt, NumBits, Precision >::IsSignalingNaN ( ) const

Definition at line 260 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
bool gte::IEEEBinary< Float, UInt, NumBits, Precision >::IsSignMinus ( ) const

Definition at line 223 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
bool gte::IEEEBinary< Float, UInt, NumBits, Precision >::IsSubnormal ( ) const

Definition at line 229 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
bool gte::IEEEBinary< Float, UInt, NumBits, Precision >::IsZero ( ) const

Definition at line 217 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
gte::IEEEBinary< Float, UInt, NumBits, Precision >::operator Float ( ) const

Definition at line 167 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
gte::IEEEBinary< Float, UInt, NumBits, Precision >::operator UInt ( ) const

Definition at line 161 of file GteIEEEBinary.h.

template<typename Float , typename UInt , int NumBits, int Precision>
IEEEBinary< Float, UInt, NumBits, Precision > & gte::IEEEBinary< Float, UInt, NumBits, Precision >::operator= ( IEEEBinary< Float, UInt, NumBits, Precision > const &  object)

Definition at line 174 of file GteIEEEBinary.h.

template<typename Float , typename UInt, int NumBits, int Precision>
void gte::IEEEBinary< Float, UInt, NumBits, Precision >::SetEncoding ( UInt  sign,
UInt  biased,
UInt  trailing 
)

Definition at line 431 of file GteIEEEBinary.h.

Member Data Documentation

union { ... }
template<typename Float, typename UInt, int NumBits, int Precision>
UInt gte::IEEEBinary< Float, UInt, NumBits, Precision >::encoding

Definition at line 111 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::EXPONENT_BIAS = (1 << (NUM_EXPONENT_BITS - 1)) - 1
static

Definition at line 46 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::EXPONENT_MASK = NOT_SIGN_MASK & ~TRAILING_MASK
static

Definition at line 55 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::MAX_BIASED_EXPONENT = (1 << NUM_EXPONENT_BITS) - 1
static

Definition at line 47 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::MAX_NORMAL = NOT_SIGN_MASK & ~SUP_TRAILING
static

Definition at line 65 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::MAX_SUBNORMAL = TRAILING_MASK
static

Definition at line 63 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::MAX_TRAILING = TRAILING_MASK
static

Definition at line 58 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::MIN_EXPONENT = MIN_SUB_EXPONENT - NUM_TRAILING_BITS
static

Definition at line 49 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::MIN_NORMAL = SUP_TRAILING
static

Definition at line 64 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::MIN_SUB_EXPONENT = 1 - EXPONENT_BIAS
static

Definition at line 48 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::MIN_SUBNORMAL = UInt(1)
static

Definition at line 62 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NAN_PAYLOAD_MASK = (TRAILING_MASK >> 1)
static

Definition at line 57 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NAN_QUIET_MASK = (UInt(1) << (NUM_TRAILING_BITS - 1))
static

Definition at line 56 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NEG_INFINITY = SIGN_MASK | EXPONENT_MASK
static

Definition at line 67 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NEG_ZERO = SIGN_MASK
static

Definition at line 61 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NOT_SIGN_MASK = UInt(~SIGN_MASK)
static

Definition at line 53 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NUM_ENCODING_BITS = NumBits
static

Definition at line 42 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NUM_EXPONENT_BITS = NumBits - Precision
static

Definition at line 43 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NUM_SIGNIFICAND_BITS = Precision
static

Definition at line 44 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::NUM_TRAILING_BITS = Precision - 1
static

Definition at line 45 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
Float gte::IEEEBinary< Float, UInt, NumBits, Precision >::number

Definition at line 112 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::POS_INFINITY = EXPONENT_MASK
static

Definition at line 66 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::POS_ZERO = UInt(0)
static

Definition at line 60 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::SIGN_MASK = (UInt(1) << (NumBits - 1))
static

Definition at line 52 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
int const gte::IEEEBinary< Float, UInt, NumBits, Precision >::SIGN_SHIFT = NumBits - 1
static

Definition at line 50 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::SUP_TRAILING = (UInt(1) << NUM_TRAILING_BITS)
static

Definition at line 59 of file GteIEEEBinary.h.

template<typename Float, typename UInt, int NumBits, int Precision>
UInt const gte::IEEEBinary< Float, UInt, NumBits, Precision >::TRAILING_MASK = (UInt(1) << NUM_TRAILING_BITS) - 1
static

Definition at line 54 of file GteIEEEBinary.h.


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


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:06