We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8236d3 commit 536b087Copy full SHA for 536b087
src/util/simplify_expr.cpp
@@ -1575,7 +1575,9 @@ optionalt<std::string> simplify_exprt::expr2bits(
1575
type.id()==ID_floatbv ||
1576
type.id()==ID_fixedbv)
1577
{
1578
- std::string nat=id2string(to_constant_expr(expr).get_value());
+ const auto width = to_bitvector_type(type).get_width();
1579
+ mp_integer int_value=bv2integer(id2string(to_constant_expr(expr).get_value()), width, false);
1580
+ std::string nat=integer2binary(int_value, width);
1581
std::reverse(nat.begin(), nat.end());
1582
1583
endianness_mapt map(type, little_endian, ns);
0 commit comments