#include <Float.defs.hh>
Public Member Functions | |
| int | is_inf () const |
| int | is_nan () const |
| int | is_zero () const |
| int | sign_bit () const |
| void | negate () |
| void | dec () |
| void | inc () |
| void | set_max (bool negative) |
| void | build (bool negative, mpz_t mantissa, int exponent) |
Public Attributes | |
| uint16_t | word |
Static Public Attributes | |
| static const uint16_t | SGN_MASK = 0x8000 |
| static const uint16_t | EXP_MASK = 0xfc00 |
| static const uint16_t | POS_INF = 0xfc00 |
| static const uint16_t | NEG_INF = 0x7c00 |
| static const uint16_t | POS_ZERO = 0x0000 |
| static const uint16_t | NEG_ZERO = 0x8000 |
| static const unsigned int | BASE = 2 |
| static const unsigned int | EXPONENT_BITS = 5 |
| static const unsigned int | MANTISSA_BITS = 10 |
| static const int | EXPONENT_MAX = (1 << (EXPONENT_BITS - 1)) - 1 |
| static const int | EXPONENT_BIAS = EXPONENT_MAX |
| static const int | EXPONENT_MIN = -EXPONENT_MAX + 1 |
| static const int | EXPONENT_MIN_DENORM |
Definition at line 45 of file Float.defs.hh.
| void Parma_Polyhedra_Library::float_ieee754_half::build | ( | bool | negative, | |
| mpz_t | mantissa, | |||
| int | exponent | |||
| ) | [inline] |
Definition at line 82 of file Float.inlines.hh.
References EXPONENT_BIAS, MANTISSA_BITS, SGN_MASK, and word.
00082 { 00083 word = mpz_get_ui(mantissa) & ((1UL << MANTISSA_BITS) - 1); 00084 if (negative) 00085 word |= SGN_MASK; 00086 word |= static_cast<uint16_t>(exponent + EXPONENT_BIAS) << MANTISSA_BITS; 00087 }
| void Parma_Polyhedra_Library::float_ieee754_half::dec | ( | ) | [inline] |
| void Parma_Polyhedra_Library::float_ieee754_half::inc | ( | ) | [inline] |
| int Parma_Polyhedra_Library::float_ieee754_half::is_inf | ( | ) | const [inline] |
| int Parma_Polyhedra_Library::float_ieee754_half::is_nan | ( | ) | const [inline] |
| int Parma_Polyhedra_Library::float_ieee754_half::is_zero | ( | ) | const [inline] |
| void Parma_Polyhedra_Library::float_ieee754_half::negate | ( | ) | [inline] |
| void Parma_Polyhedra_Library::float_ieee754_half::set_max | ( | bool | negative | ) | [inline] |
| int Parma_Polyhedra_Library::float_ieee754_half::sign_bit | ( | ) | const [inline] |
const unsigned int Parma_Polyhedra_Library::float_ieee754_half::BASE = 2 [static] |
Definition at line 53 of file Float.defs.hh.
const uint16_t Parma_Polyhedra_Library::float_ieee754_half::EXP_MASK = 0xfc00 [static] |
Definition at line 48 of file Float.defs.hh.
const int Parma_Polyhedra_Library::float_ieee754_half::EXPONENT_BIAS = EXPONENT_MAX [static] |
Definition at line 57 of file Float.defs.hh.
Referenced by build().
const unsigned int Parma_Polyhedra_Library::float_ieee754_half::EXPONENT_BITS = 5 [static] |
Definition at line 54 of file Float.defs.hh.
const int Parma_Polyhedra_Library::float_ieee754_half::EXPONENT_MAX = (1 << (EXPONENT_BITS - 1)) - 1 [static] |
Definition at line 56 of file Float.defs.hh.
const int Parma_Polyhedra_Library::float_ieee754_half::EXPONENT_MIN = -EXPONENT_MAX + 1 [static] |
Definition at line 58 of file Float.defs.hh.
const int Parma_Polyhedra_Library::float_ieee754_half::EXPONENT_MIN_DENORM [static] |
EXPONENT_MIN - static_cast<int>(MANTISSA_BITS)
Definition at line 59 of file Float.defs.hh.
const unsigned int Parma_Polyhedra_Library::float_ieee754_half::MANTISSA_BITS = 10 [static] |
Definition at line 55 of file Float.defs.hh.
Referenced by build().
const uint16_t Parma_Polyhedra_Library::float_ieee754_half::NEG_INF = 0x7c00 [static] |
Definition at line 50 of file Float.defs.hh.
Referenced by is_inf().
const uint16_t Parma_Polyhedra_Library::float_ieee754_half::NEG_ZERO = 0x8000 [static] |
Definition at line 52 of file Float.defs.hh.
Referenced by is_zero().
const uint16_t Parma_Polyhedra_Library::float_ieee754_half::POS_INF = 0xfc00 [static] |
Definition at line 49 of file Float.defs.hh.
const uint16_t Parma_Polyhedra_Library::float_ieee754_half::POS_ZERO = 0x0000 [static] |
Definition at line 51 of file Float.defs.hh.
Referenced by is_zero().
const uint16_t Parma_Polyhedra_Library::float_ieee754_half::SGN_MASK = 0x8000 [static] |
Definition at line 47 of file Float.defs.hh.
Referenced by build(), is_nan(), negate(), set_max(), and sign_bit().
1.6.3