aboutsummaryrefslogtreecommitdiff
path: root/src/Util/ZUtil/Definitions.v
diff options
context:
space:
mode:
Diffstat (limited to 'src/Util/ZUtil/Definitions.v')
-rw-r--r--src/Util/ZUtil/Definitions.v1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Util/ZUtil/Definitions.v b/src/Util/ZUtil/Definitions.v
index 4ef6b5403..8fe5772f5 100644
--- a/src/Util/ZUtil/Definitions.v
+++ b/src/Util/ZUtil/Definitions.v
@@ -85,6 +85,7 @@ Module Z.
then mul_split_at_bitwidth (Z.log2 s) x y
else ((x * y) mod s, (x * y) / s).
+ (** if positive, round up to 2^k-1 (0b11111....); if negative, round down to -2^k (0b...111000000...) *)
Definition round_lor_land_bound (x : Z) : Z
:= if (0 <=? x)%Z
then 2^(Z.log2_up (x+1))-1