Go to the documentation of this file.
37 (type.
id()==ID_vector || type.
id()==ID_complex))
45 "bitvector representation of type needs to have at least one bit");
48 width % sub_width == 0,
49 "total bitvector width needs to be a multiple of the component bitvector "
54 for(std::size_t sub_idx = 0; sub_idx < width; sub_idx += sub_width)
58 const auto sub_it = std::next(op_bv.begin(), sub_idx);
59 std::copy_n(sub_it, sub_width, std::back_inserter(tmp_op));
64 tmp_op = float_utils.
negate(tmp_op);
70 tmp_op.size() == sub_width,
71 "bitvector after negation shall have same bit width");
73 std::copy(tmp_op.begin(), tmp_op.end(), std::back_inserter(bv));
85 return float_utils.
negate(op_bv);
const typet & subtype() const
The type of an expression, extends irept.
std::vector< literalt > bvt
bvtypet get_bvtype(const typet &type)
Base class for all expressions.
typet & type()
Return the type of the expression.
boolbv_widtht boolbv_width
void conversion_failed(const exprt &expr, bvt &bv)
The unary minus expression.
const irep_idt & id() const
virtual const bvt & convert_bv(const exprt &expr, const optionalt< std::size_t > expected_width=nullopt)
Convert expression to vector of literalts, using an internal cache to speed up conversion if availabl...
bvt negate(const bvt &op)
const floatbv_typet & to_floatbv_type(const typet &type)
Cast a typet to a floatbv_typet.
virtual bvt convert_unary_minus(const unary_minus_exprt &expr)