Skip to content

Commit 05dfb9f

Browse files
pulled out product
1 parent 4d5a408 commit 05dfb9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cdomains/apron/sharedFunctions.apron.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ let int_of_scalar ?(scalewith=Z.one) ?round (scalar: Scalar.t) =
3333
begin match round with
3434
| Some `Floor -> Some (Mpzf.mul scale (Mpzf.fdiv_q n d)) (* floor division *)
3535
| Some `Ceil -> Some (Mpzf.mul scale (Mpzf.cdiv_q n d)) (* ceiling division *)
36-
| None -> if Mpz.divisible_p (Mpzf.mul scale n ) d then
37-
Some (Mpzf.divexact (Mpzf.mul scale n ) d) (* scale, preferably with common denominator *)
36+
| None -> let product = Mpzf.mul scale n in if Mpz.divisible_p product d then
37+
Some (Mpzf.divexact product d) (* scale, preferably with common denominator *)
3838
else None
3939
end
4040
in

0 commit comments

Comments
 (0)