Skip to content

Commit 8b2bd7b

Browse files
committed
Convert to signed type to make negation meaningful
1 parent 7823d9c commit 8b2bd7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/solvers/floatbv/float_approximation.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ void float_approximationt::normalization_shift(bvt &fraction, bvt &exponent)
4848
bv_utils.cond_implies_equal(shift, shifted_fraction, new_fraction);
4949

5050
// build new exponent
51-
bvt adjustment=bv_utils.build_constant(-i, exponent.size());
51+
bvt adjustment =
52+
bv_utils.build_constant(-static_cast<int>(i), exponent.size());
5253
bvt added_exponent=bv_utils.add(exponent, adjustment);
5354
bv_utils.cond_implies_equal(shift, added_exponent, new_exponent);
5455
}

0 commit comments

Comments
 (0)