We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ff0414e + 6dc6ea9 commit 2d14b22Copy full SHA for 2d14b22
src/goto-instrument/accelerate/polynomial.cpp
@@ -138,15 +138,8 @@ void polynomialt::from_expr(const exprt &expr)
138
}
139
else if(expr.id()==ID_constant)
140
{
141
- mp_integer mp;
142
- unsigned int l;
143
- constant_exprt const_expr=to_constant_expr(expr);
144
-
145
- mp=binary2integer(const_expr.get_value().c_str(), true);
146
- l=mp.to_long();
147
148
monomialt monomial;
149
- monomial.coeff=l;
+ monomial.coeff = numeric_cast_v<int>(expr);
150
151
monomials.push_back(monomial);
152
0 commit comments