36 union {
float n; uint32_t e; } temp = { number };
44 union {
float n; uint32_t e; } temp;
45 temp.n = (float)number;
55 IEEEBinary16::operator float()
const 61 IEEEBinary16::operator double()
const 64 return (
double)temp.n;
75 return (
float)*
this == (float)
object;
80 return (
float)*
this != (float)
object;
85 return (
float)*
this < (float)
object;
90 return (
float)*
this <= (float)
object;
95 return (
float)*
this > (float)
object;
100 return (
float)*
this >= (float)
object;
114 uint16_t biased16, trailing16;
152 return sign16 | trailing16;
171 return sign16 | (biased16 + trailing16);
194 uint16_t maskPayload =
static_cast<uint16_t
>(
195 (trailing32 & 0x007FE000u) >> 13);
209 uint32_t biased32, trailing32;
221 trailing32 =
static_cast<uint32_t
>(trailing16);
223 int32_t shift = 23 - leading;
235 trailing32 = (
static_cast<uint32_t
>(
249 uint32_t maskPayload =
262 return static_cast<float>(
x)+static_cast<float>(y);
267 return static_cast<float>(
x)-static_cast<float>(y);
272 return static_cast<float>(
x)* static_cast<float>(y);
277 return static_cast<float>(
x) / static_cast<float>(y);
282 return static_cast<float>(
x)+y;
287 return static_cast<float>(
x)-y;
292 return static_cast<float>(
x)* y;
297 return static_cast<float>(
x) / y;
302 return x +
static_cast<float>(
y);
307 return x -
static_cast<float>(
y);
312 return x *
static_cast<float>(
y);
317 return x /
static_cast<float>(
y);
322 x =
static_cast<float>(
x)+static_cast<float>(y);
328 x =
static_cast<float>(
x)-static_cast<float>(y);
334 x =
static_cast<float>(
x)* static_cast<float>(y);
340 x =
static_cast<float>(
x) / static_cast<float>(y);
346 x =
static_cast<float>(
x)+y;
352 x =
static_cast<float>(
x)-y;
358 x =
static_cast<float>(
x)* y;
364 x =
static_cast<float>(
x) / y;
static int const NUM_TRAILING_BITS
bool operator>=(IEEEBinary16 const &object) const
static int const MAX_BIASED_EXPONENT
DualQuaternion< Real > & operator*=(DualQuaternion< Real > &d, Real scalar)
GTE_IMPEXP int32_t GetLeadingBit(uint32_t value)
bool operator!=(IEEEBinary16 const &object) const
bool operator<(IEEEBinary16 const &object) const
static uint16_tconst EXPONENT_MASK
IEEEBinary16 & operator=(IEEEBinary16 const &object)
bool operator<=(IEEEBinary16 const &object) const
static int const EXPONENT_BIAS
bool operator==(IEEEBinary16 const &object) const
DualQuaternion< Real > operator+(DualQuaternion< Real > const &d)
static uint32_t Convert16To32(uint16_t encoding)
static uint16_tconst MAX_NORMAL
DualQuaternion< Real > & operator-=(DualQuaternion< Real > &d0, DualQuaternion< Real > const &d1)
static uint16_tconst MIN_SUBNORMAL
static uint16_tconst TRAILING_MASK
static uint16_tconst POS_INFINITY
DualQuaternion< Real > operator-(DualQuaternion< Real > const &d)
DualQuaternion< Real > & operator+=(DualQuaternion< Real > &d0, DualQuaternion< Real > const &d1)
IEEEBinary & operator=(IEEEBinary const &object)
static uint16_t Convert32To16(uint32_t encoding)
DualQuaternion< Real > & operator/=(DualQuaternion< Real > &d, Real scalar)
Vector4< float > operator*(Transform const &M, Vector4< float > const &V)
static uint16_tconst SIGN_MASK
DualQuaternion< Real > operator/(DualQuaternion< Real > const &d, Real scalar)
bool operator>(IEEEBinary16 const &object) const