From 9ca7e769b62173a79a1c7d12a363205dd608b519 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Tue, 1 Dec 2020 18:28:43 +0100 Subject: Make the code clearer and faster by calling mask63 explicitly at the end. Before this commit, function mask63 was called implicitly at each step. --- kernel/uint63_31.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/uint63_31.ml b/kernel/uint63_31.ml index 5b2d934b5d..696efacb32 100644 --- a/kernel/uint63_31.ml +++ b/kernel/uint63_31.ml @@ -72,12 +72,12 @@ let l_xor x y = Int64.logxor x y (* addition of int63 *) let add x y = mask63 (Int64.add x y) -let addcarry x y = add (add x y) Int64.one +let addcarry x y = mask63 Int64.(add (add x y) one) (* subtraction *) let sub x y = mask63 (Int64.sub x y) -let subcarry x y = sub (sub x y) Int64.one +let subcarry x y = mask63 Int64.(sub (sub x y) one) (* multiplication *) let mul x y = mask63 (Int64.mul x y) -- cgit v1.2.3