|
cprover
|
#include <float_utils.h>
Inheritance diagram for float_utilst:
Collaboration diagram for float_utilst:Classes | |
| struct | biased_floatt |
| struct | rounding_mode_bitst |
| struct | unbiased_floatt |
| struct | unpacked_floatt |
Public Types | |
| enum class | relt { LT , LE , EQ , GT , GE } |
Public Member Functions | |
| float_utilst (propt &_prop) | |
| float_utilst (propt &_prop, const floatbv_typet &type) | |
| void | set_rounding_mode (const bvt &) |
| virtual | ~float_utilst () |
| bvt | build_constant (const ieee_floatt &) |
| bvt | get_exponent (const bvt &) |
| Gets the unbiased exponent in a floating-point bit-vector. | |
| bvt | get_fraction (const bvt &) |
| Gets the fraction without hidden bit in a floating-point bit-vector src. | |
| literalt | is_normal (const bvt &) |
| literalt | is_zero (const bvt &) |
| literalt | is_infinity (const bvt &) |
| literalt | is_plus_inf (const bvt &) |
| literalt | is_minus_inf (const bvt &) |
| literalt | is_NaN (const bvt &) |
| virtual bvt | add_sub (const bvt &src1, const bvt &src2, bool subtract) |
| bvt | add (const bvt &src1, const bvt &src2) |
| bvt | sub (const bvt &src1, const bvt &src2) |
| virtual bvt | mul (const bvt &src1, const bvt &src2) |
| virtual bvt | div (const bvt &src1, const bvt &src2) |
| virtual bvt | rem (const bvt &src1, const bvt &src2) |
| bvt | abs (const bvt &) |
| bvt | negate (const bvt &) |
| bvt | from_unsigned_integer (const bvt &) |
| bvt | from_signed_integer (const bvt &) |
| bvt | to_integer (const bvt &src, std::size_t int_width, bool is_signed) |
| bvt | to_signed_integer (const bvt &src, std::size_t int_width) |
| bvt | to_unsigned_integer (const bvt &src, std::size_t int_width) |
| bvt | conversion (const bvt &src, const ieee_float_spect &dest_spec) |
| literalt | relation (const bvt &src1, relt rel, const bvt &src2) |
| ieee_floatt | get (const bvt &) const |
| literalt | exponent_all_ones (const bvt &) |
| literalt | exponent_all_zeros (const bvt &) |
| literalt | fraction_all_zeros (const bvt &) |
| bvt | debug1 (const bvt &op0, const bvt &op1) |
| bvt | debug2 (const bvt &op0, const bvt &op1) |
Static Public Member Functions | |
| static literalt | sign_bit (const bvt &src) |
Public Attributes | |
| rounding_mode_bitst | rounding_mode_bits |
| ieee_float_spect | spec |
Protected Member Functions | |
| virtual void | normalization_shift (bvt &fraction, bvt &exponent) |
| normalize fraction/exponent pair returns 'zero' if fraction is zero | |
| void | denormalization_shift (bvt &fraction, bvt &exponent) |
| make sure exponent is not too small; the exponent is unbiased | |
| bvt | add_bias (const bvt &exponent) |
| bvt | sub_bias (const bvt &exponent) |
| bvt | limit_distance (const bvt &dist, mp_integer limit) |
| Limits the shift distance. | |
| biased_floatt | bias (const unbiased_floatt &) |
| takes an unbiased float, and applies the bias | |
| virtual bvt | rounder (const unbiased_floatt &) |
| bvt | pack (const biased_floatt &) |
| unbiased_floatt | unpack (const bvt &) |
| void | round_fraction (unbiased_floatt &result) |
| void | round_exponent (unbiased_floatt &result) |
| literalt | fraction_rounding_decision (const std::size_t dest_bits, const literalt sign, const bvt &fraction) |
| rounding decision for fraction using sticky bit | |
| bvt | subtract_exponents (const unbiased_floatt &src1, const unbiased_floatt &src2) |
| Subtracts the exponents. | |
| bvt | sticky_right_shift (const bvt &op, const bvt &dist, literalt &sticky) |
Protected Attributes | |
| propt & | prop |
| bv_utilst | bv_utils |
Definition at line 17 of file float_utils.h.
|
strong |
| Enumerator | |
|---|---|
| LT | |
| LE | |
| EQ | |
| GT | |
| GE | |
Definition at line 138 of file float_utils.h.
|
inlineexplicit |
Definition at line 69 of file float_utils.h.
|
inline |
Definition at line 75 of file float_utils.h.
|
inlinevirtual |
Definition at line 84 of file float_utils.h.
Definition at line 570 of file float_utils.cpp.
Definition at line 111 of file float_utils.h.
Definition at line 1193 of file float_utils.cpp.
Definition at line 247 of file float_utils.cpp.
|
protected |
takes an unbiased float, and applies the bias
Definition at line 1163 of file float_utils.cpp.
| bvt float_utilst::build_constant | ( | const ieee_floatt & | src | ) |
Definition at line 139 of file float_utils.cpp.
| bvt float_utilst::conversion | ( | const bvt & | src, |
| const ieee_float_spect & | dest_spec ) |
Definition at line 152 of file float_utils.cpp.
Definition at line 1320 of file float_utils.cpp.
Definition at line 1327 of file float_utils.cpp.
make sure exponent is not too small; the exponent is unbiased
Definition at line 836 of file float_utils.cpp.
Definition at line 464 of file float_utils.cpp.
Definition at line 711 of file float_utils.cpp.
Definition at line 724 of file float_utils.cpp.
Definition at line 737 of file float_utils.cpp.
|
protected |
rounding decision for fraction using sticky bit
Definition at line 943 of file float_utils.cpp.
Definition at line 32 of file float_utils.cpp.
Definition at line 50 of file float_utils.cpp.
| ieee_floatt float_utilst::get | ( | const bvt & | src | ) | const |
Definition at line 1271 of file float_utils.cpp.
Gets the unbiased exponent in a floating-point bit-vector.
Definition at line 685 of file float_utils.cpp.
Gets the fraction without hidden bit in a floating-point bit-vector src.
Definition at line 691 of file float_utils.cpp.
Definition at line 677 of file float_utils.cpp.
Definition at line 696 of file float_utils.cpp.
Definition at line 705 of file float_utils.cpp.
Definition at line 223 of file float_utils.cpp.
Definition at line 668 of file float_utils.cpp.
Definition at line 659 of file float_utils.cpp.
|
protected |
Limits the shift distance.
Definition at line 389 of file float_utils.cpp.
Definition at line 412 of file float_utils.cpp.
Definition at line 561 of file float_utils.cpp.
normalize fraction/exponent pair returns 'zero' if fraction is zero
Reimplemented in float_approximationt.
Definition at line 747 of file float_utils.cpp.
|
protected |
Definition at line 1240 of file float_utils.cpp.
Definition at line 578 of file float_utils.cpp.
Definition at line 543 of file float_utils.cpp.
|
protected |
Definition at line 1100 of file float_utils.cpp.
|
protected |
Definition at line 1001 of file float_utils.cpp.
|
protectedvirtual |
Definition at line 904 of file float_utils.cpp.
| void float_utilst::set_rounding_mode | ( | const bvt & | src | ) |
Definition at line 15 of file float_utils.cpp.
Definition at line 92 of file float_utils.h.
|
protected |
Definition at line 1285 of file float_utils.cpp.
Definition at line 116 of file float_utils.h.
Definition at line 1202 of file float_utils.cpp.
|
protected |
Subtracts the exponents.
Definition at line 231 of file float_utils.cpp.
Definition at line 81 of file float_utils.cpp.
Definition at line 67 of file float_utils.cpp.
Definition at line 74 of file float_utils.cpp.
|
protected |
Definition at line 1211 of file float_utils.cpp.
|
protected |
Definition at line 155 of file float_utils.h.
|
protected |
Definition at line 154 of file float_utils.h.
| rounding_mode_bitst float_utilst::rounding_mode_bits |
Definition at line 67 of file float_utils.h.
| ieee_float_spect float_utilst::spec |
Definition at line 88 of file float_utils.h.