#include <GteIEEEBinary16.h>
Public Member Functions | |
IEEEBinary16 () | |
IEEEBinary16 (IEEEBinary16 const &object) | |
IEEEBinary16 (float number) | |
IEEEBinary16 (double number) | |
IEEEBinary16 (uint16_t encoding) | |
operator double () const | |
operator float () const | |
bool | operator!= (IEEEBinary16 const &object) const |
bool | operator< (IEEEBinary16 const &object) const |
bool | operator<= (IEEEBinary16 const &object) const |
IEEEBinary16 & | operator= (IEEEBinary16 const &object) |
bool | operator== (IEEEBinary16 const &object) const |
bool | operator> (IEEEBinary16 const &object) const |
bool | operator>= (IEEEBinary16 const &object) const |
~IEEEBinary16 () | |
Public Member Functions inherited from gte::IEEEBinary< _Float16, uint16_t, 16, 11 > | |
uint16_t | GetBiased () const |
Classification | GetClassification () const |
void | GetEncoding (uint16_t &sign, uint16_t &biased, uint16_t &trailing) const |
uint16_t | GetNextDown () const |
uint16_t | GetNextUp () const |
uint16_t | GetSign () const |
uint16_t | GetTrailing () const |
IEEEBinary () | |
IEEEBinary (IEEEBinary const &object) | |
IEEEBinary (uint16_tinEncoding) | |
IEEEBinary (uint16_tinSign, uint16_tinBiased, uint16_tinTrailing) | |
IEEEBinary (_Float16inNumber) | |
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 _Float16 () const | |
operator uint16_t () const | |
IEEEBinary & | operator= (IEEEBinary const &object) |
void | SetEncoding (uint16_tsign, uint16_tbiased, uint16_ttrailing) |
~IEEEBinary () | |
Private Types | |
enum | { F32_NUM_ENCODING_BITS = 32, F32_NUM_TRAILING_BITS = 23, F32_EXPONENT_BIAS = 127, F32_MAX_BIASED_EXPONENT = 255, F32_SIGN_MASK = 0x80000000, F32_NOT_SIGN_MASK = 0x7FFFFFFF, F32_BIASED_EXPONENT_MASK = 0x7F800000, F32_TRAILING_MASK = 0x007FFFFF, F16_AVR_MIN_SUBNORMAL_ZERO = 0x33000000, F16_MIN_SUBNORMAL = 0x33800000, F16_MIN_NORMAL = 0x38800000, F16_MAX_NORMAL = 0x477FE000, F16_AVR_MAX_NORMAL_INFINITY = 0x477FF000, DIFF_NUM_ENCODING_BITS = 16, DIFF_NUM_TRAILING_BITS = 13, DIFF_PAYLOAD_SHIFT = 13, INT_PART_MASK = 0x007FE000, FRC_PART_MASK = 0x00001FFF, FRC_HALF = 0x00001000 } |
Static Private Member Functions | |
static uint32_t | Convert16To32 (uint16_t encoding) |
static uint16_t | Convert32To16 (uint32_t encoding) |
Additional Inherited Members | |
Public Types inherited from gte::IEEEBinary< _Float16, uint16_t, 16, 11 > | |
enum | Classification |
typedef _Float16 | FloatType |
typedef uint16_t | UIntType |
Public Attributes inherited from gte::IEEEBinary< _Float16, uint16_t, 16, 11 > | |
union { | |
UInt encoding | |
Float number | |
}; | |
uint16_t | encoding |
_Float16 | number |
Static Public Attributes inherited from gte::IEEEBinary< _Float16, uint16_t, 16, 11 > | |
static int const | EXPONENT_BIAS |
static uint16_tconst | EXPONENT_MASK |
static int const | MAX_BIASED_EXPONENT |
static uint16_tconst | MAX_NORMAL |
static uint16_tconst | MAX_SUBNORMAL |
static uint16_tconst | MAX_TRAILING |
static int const | MIN_EXPONENT |
static uint16_tconst | MIN_NORMAL |
static int const | MIN_SUB_EXPONENT |
static uint16_tconst | MIN_SUBNORMAL |
static uint16_tconst | NAN_PAYLOAD_MASK |
static uint16_tconst | NAN_QUIET_MASK |
static uint16_tconst | NEG_INFINITY |
static uint16_tconst | NEG_ZERO |
static uint16_tconst | NOT_SIGN_MASK |
static int const | NUM_ENCODING_BITS |
static int const | NUM_EXPONENT_BITS |
static int const | NUM_SIGNIFICAND_BITS |
static int const | NUM_TRAILING_BITS |
static uint16_tconst | POS_INFINITY |
static uint16_tconst | POS_ZERO |
static uint16_tconst | SIGN_MASK |
static int const | SIGN_SHIFT |
static uint16_tconst | SUP_TRAILING |
static uint16_tconst | TRAILING_MASK |
Definition at line 17 of file GteIEEEBinary16.h.
|
private |
Definition at line 46 of file GteIEEEBinary16.h.
gte::IEEEBinary16::~IEEEBinary16 | ( | ) |
Definition at line 15 of file GteIEEEBinary16.cpp.
gte::IEEEBinary16::IEEEBinary16 | ( | ) |
Definition at line 19 of file GteIEEEBinary16.cpp.
gte::IEEEBinary16::IEEEBinary16 | ( | IEEEBinary16 const & | object | ) |
Definition at line 26 of file GteIEEEBinary16.cpp.
gte::IEEEBinary16::IEEEBinary16 | ( | float | number | ) |
Definition at line 32 of file GteIEEEBinary16.cpp.
gte::IEEEBinary16::IEEEBinary16 | ( | double | number | ) |
Definition at line 40 of file GteIEEEBinary16.cpp.
gte::IEEEBinary16::IEEEBinary16 | ( | uint16_t | encoding | ) |
Definition at line 49 of file GteIEEEBinary16.cpp.
|
staticprivate |
Definition at line 199 of file GteIEEEBinary16.cpp.
|
staticprivate |
Definition at line 103 of file GteIEEEBinary16.cpp.
gte::IEEEBinary16::operator double | ( | ) | const |
Definition at line 61 of file GteIEEEBinary16.cpp.
gte::IEEEBinary16::operator float | ( | ) | const |
Definition at line 55 of file GteIEEEBinary16.cpp.
bool gte::IEEEBinary16::operator!= | ( | IEEEBinary16 const & | object | ) | const |
Definition at line 78 of file GteIEEEBinary16.cpp.
bool gte::IEEEBinary16::operator< | ( | IEEEBinary16 const & | object | ) | const |
Definition at line 83 of file GteIEEEBinary16.cpp.
bool gte::IEEEBinary16::operator<= | ( | IEEEBinary16 const & | object | ) | const |
Definition at line 88 of file GteIEEEBinary16.cpp.
IEEEBinary16 & gte::IEEEBinary16::operator= | ( | IEEEBinary16 const & | object | ) |
Definition at line 67 of file GteIEEEBinary16.cpp.
bool gte::IEEEBinary16::operator== | ( | IEEEBinary16 const & | object | ) | const |
Definition at line 73 of file GteIEEEBinary16.cpp.
bool gte::IEEEBinary16::operator> | ( | IEEEBinary16 const & | object | ) | const |
Definition at line 93 of file GteIEEEBinary16.cpp.
bool gte::IEEEBinary16::operator>= | ( | IEEEBinary16 const & | object | ) | const |
Definition at line 98 of file GteIEEEBinary16.cpp.