|
PPL
0.12.1
|
#include <Float.defs.hh>
Public Member Functions | |
| int | inf_sign () const |
| bool | is_nan () const |
| int | zero_sign () const |
| bool | 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 | |
| uint32_t | word |
Static Public Attributes | |
| static const uint32_t | SGN_MASK = 0x80000000U |
| static const uint32_t | EXP_MASK = 0x7f800000U |
| static const uint32_t | POS_INF = 0x7f800000U |
| static const uint32_t | NEG_INF = 0xff800000U |
| static const uint32_t | POS_ZERO = 0x00000000U |
| static const uint32_t | NEG_ZERO = 0x80000000U |
| static const unsigned int | BASE = 2 |
| static const unsigned int | EXPONENT_BITS = 8 |
| static const unsigned int | MANTISSA_BITS = 23 |
| 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 |
| static const Floating_Point_Format | floating_point_format = IEEE754_SINGLE |
Definition at line 82 of file Float.defs.hh.
|
inline |
Definition at line 145 of file Float.inlines.hh.
References EXPONENT_BIAS, EXPONENT_BITS, MANTISSA_BITS, PPL_ASSERT, SGN_MASK, and word.
{
word = static_cast<uint32_t>(mpz_get_ui(mantissa)
& ((1UL << MANTISSA_BITS) - 1));
if (negative)
word |= SGN_MASK;
int exponent_repr = exponent + EXPONENT_BIAS;
PPL_ASSERT(exponent_repr >= 0 && exponent_repr < (1 << EXPONENT_BITS));
word |= static_cast<uint32_t>(exponent_repr) << MANTISSA_BITS;
}
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Definition at line 90 of file Float.defs.hh.
Referenced by Parma_Polyhedra_Library::compute_absolute_error(), and Parma_Polyhedra_Library::Linear_Form< C >::relative_error().
|
static |
Definition at line 85 of file Float.defs.hh.
|
static |
Definition at line 94 of file Float.defs.hh.
Referenced by build(), and Parma_Polyhedra_Library::compute_absolute_error().
|
static |
Definition at line 91 of file Float.defs.hh.
Referenced by build().
|
static |
Definition at line 93 of file Float.defs.hh.
|
static |
Definition at line 95 of file Float.defs.hh.
|
static |
EXPONENT_MIN - static_cast<int>(MANTISSA_BITS)
Definition at line 96 of file Float.defs.hh.
|
static |
Definition at line 98 of file Float.defs.hh.
|
static |
Definition at line 92 of file Float.defs.hh.
Referenced by build(), Parma_Polyhedra_Library::compute_absolute_error(), and Parma_Polyhedra_Library::Linear_Form< C >::relative_error().
|
static |
Definition at line 87 of file Float.defs.hh.
Referenced by inf_sign().
|
static |
Definition at line 89 of file Float.defs.hh.
Referenced by zero_sign().
|
static |
Definition at line 86 of file Float.defs.hh.
Referenced by inf_sign(), and is_nan().
|
static |
Definition at line 88 of file Float.defs.hh.
Referenced by zero_sign().
|
static |
Definition at line 84 of file Float.defs.hh.
Referenced by build(), is_nan(), negate(), set_max(), and sign_bit().
Definition at line 83 of file Float.defs.hh.
Referenced by build(), dec(), inc(), inf_sign(), is_nan(), negate(), set_max(), sign_bit(), and zero_sign().