16 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
31 IEEEBinary (UInt inSign, UInt inBiased, UInt inTrailing);
35 operator UInt ()
const;
36 operator Float ()
const;
52 static UInt
const SIGN_MASK = (UInt(1) << (NumBits - 1));
65 static UInt
const MAX_NORMAL = NOT_SIGN_MASK & ~SUP_TRAILING;
105 void SetEncoding (UInt sign, UInt biased, UInt trailing);
106 void GetEncoding (UInt& sign, UInt& biased, UInt& trailing)
const;
120 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
125 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
131 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
139 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
146 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
148 UInt inBiased, UInt inTrailing)
153 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
160 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
166 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
172 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
180 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
184 UInt sign, biased, trailing;
202 else if (trailing == 0)
216 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
222 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
228 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
234 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
241 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
247 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
253 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
259 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
268 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
271 UInt sign, biased, trailing;
313 else if (trailing == 0)
340 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
343 UInt sign, biased, trailing;
385 else if (trailing == 0)
412 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
418 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
424 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
430 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
432 UInt biased, UInt trailing)
438 template <
typename Float,
typename UInt,
int NumBits,
int Precision>
440 UInt& biased, UInt& trailing)
const static UInt const SUP_TRAILING
static int const NUM_TRAILING_BITS
void SetEncoding(UInt sign, UInt biased, UInt trailing)
static int const NUM_EXPONENT_BITS
void GetEncoding(UInt &sign, UInt &biased, UInt &trailing) const
static int const MAX_BIASED_EXPONENT
IEEEBinary< double, uint64_t, 64, 53 > IEEEBinary64
static UInt const MIN_NORMAL
static UInt const NAN_PAYLOAD_MASK
static UInt const NEG_ZERO
static int const NUM_ENCODING_BITS
static UInt const EXPONENT_MASK
static int const EXPONENT_BIAS
static UInt const NOT_SIGN_MASK
static UInt const MAX_SUBNORMAL
static UInt const NEG_INFINITY
static UInt const MAX_NORMAL
static UInt const MIN_SUBNORMAL
static int const SIGN_SHIFT
static int const MIN_EXPONENT
Classification GetClassification() const
static int const MIN_SUB_EXPONENT
static UInt const TRAILING_MASK
static UInt const POS_INFINITY
bool IsSignalingNaN() const
IEEEBinary< float, uint32_t, 32, 24 > IEEEBinary32
static UInt const MAX_TRAILING
static UInt const NAN_QUIET_MASK
IEEEBinary & operator=(IEEEBinary const &object)
static int const NUM_SIGNIFICAND_BITS
static UInt const POS_ZERO
static UInt const SIGN_MASK