Go to the documentation of this file.
10 #ifndef CPROVER_SOLVERS_FLOATBV_FLOAT_UTILS_H
11 #define CPROVER_SOLVERS_FLOATBV_FLOAT_UTILS_H
95 return src[src.size()-1];
113 return add_sub(src1, src2,
false);
118 return add_sub(src1, src2,
true);
204 const std::size_t dest_bits,
206 const bvt &fraction);
222 #endif // CPROVER_SOLVERS_FLOATBV_FLOAT_UTILS_H
#define UNREACHABLE
This should be used to mark dead code.
biased_floatt bias(const unbiased_floatt &)
takes an unbiased float, and applies the bias
rounding_mode_bitst rounding_mode_bits
literalt fraction_rounding_decision(const std::size_t dest_bits, const literalt sign, const bvt &fraction)
rounding decision for fraction using sticky bit
bvt to_signed_integer(const bvt &src, std::size_t int_width)
virtual bvt add_sub(const bvt &src1, const bvt &src2, bool subtract)
std::vector< literalt > bvt
bvt sticky_right_shift(const bvt &op, const bvt &dist, literalt &sticky)
bool is_signed(const typet &t)
Convenience function – is the type signed?
bvt sub(const bvt &src1, const bvt &src2)
Fixed-width bit-vector with IEEE floating-point interpretation.
bvt debug1(const bvt &op0, const bvt &op1)
bvt add(const bvt &src1, const bvt &src2)
float_utilst(propt &_prop, const floatbv_typet &type)
virtual bvt rounder(const unbiased_floatt &)
bvt sub_bias(const bvt &exponent)
unbiased_floatt unpack(const bvt &)
virtual void normalization_shift(bvt &fraction, bvt &exponent)
normalize fraction/exponent pair returns 'zero' if fraction is zero
ieee_floatt get(const bvt &) const
void set_rounding_mode(const bvt &)
bvt add_bias(const bvt &exponent)
bvt to_unsigned_integer(const bvt &src, std::size_t int_width)
bvt from_signed_integer(const bvt &)
literalt is_infinity(const bvt &)
literalt is_minus_inf(const bvt &)
bvt conversion(const bvt &src, const ieee_float_spect &dest_spec)
virtual bvt rem(const bvt &src1, const bvt &src2)
void denormalization_shift(bvt &fraction, bvt &exponent)
make sure exponent is not too small; the exponent is unbiased
literalt is_zero(const bvt &)
bvt get_exponent(const bvt &)
Gets the unbiased exponent in a floating-point bit-vector.
literalt is_normal(const bvt &)
static literalt sign_bit(const bvt &src)
literalt exponent_all_ones(const bvt &)
bvt pack(const biased_floatt &)
virtual bvt div(const bvt &src1, const bvt &src2)
bvt build_constant(const ieee_floatt &)
literalt const_literal(bool value)
bvt debug2(const bvt &op0, const bvt &op1)
bvt subtract_exponents(const unbiased_floatt &src1, const unbiased_floatt &src2)
Subtracts the exponents.
literalt is_NaN(const bvt &)
bvt to_integer(const bvt &src, std::size_t int_width, bool is_signed)
literalt is_plus_inf(const bvt &)
literalt relation(const bvt &src1, relt rel, const bvt &src2)
bvt get_fraction(const bvt &)
Gets the fraction without hidden bit in a floating-point bit-vector src.
literalt exponent_all_zeros(const bvt &)
void set(const ieee_floatt::rounding_modet mode)
void round_fraction(unbiased_floatt &result)
float_utilst(propt &_prop)
literalt fraction_all_zeros(const bvt &)
literalt round_to_plus_inf
bvt limit_distance(const bvt &dist, mp_integer limit)
Limits the shift distance.
bvt from_unsigned_integer(const bvt &)
virtual bvt mul(const bvt &src1, const bvt &src2)
void round_exponent(unbiased_floatt &result)
literalt round_to_minus_inf