diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2017-05-26 19:20:47 +0200 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2017-05-26 19:20:47 +0200 |
commit | 4445158c58756a315dbbbf5773fc691dd61b61f1 (patch) | |
tree | 8104ccc88b757002a2437b42cad489901588a75f /lib | |
parent | 06aa7498415ca98a795219a2b1460e812b6bafc6 (diff) | |
parent | 9bf766d4f66727a638ed2662099d090b5a72200a (diff) |
Merge PR#666: romega revisited : no more normalization trace, cleaned-up resolution trace
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bigint.ml | 6 | ||||
-rw-r--r-- | lib/bigint.mli | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/bigint.ml b/lib/bigint.ml index e95604ffc..1ecc2ce2c 100644 --- a/lib/bigint.ml +++ b/lib/bigint.ml @@ -257,9 +257,9 @@ let sub_mult m d q k = end done -(** Euclid division m/d = (q,r) - This is the "Floor" variant, as with ocaml's / - (but not as ocaml's Big_int.quomod_big_int). +(** Euclid division m/d = (q,r), with m = q*d+r and |r|<|q|. + This is the "Trunc" variant (a.k.a "Truncated-Toward-Zero"), + as with ocaml's / (but not as ocaml's Big_int.quomod_big_int). We have sign r = sign m *) let euclid m d = diff --git a/lib/bigint.mli b/lib/bigint.mli index e5525f164..a1dc66077 100644 --- a/lib/bigint.mli +++ b/lib/bigint.mli @@ -30,6 +30,12 @@ val mult_2 : bigint -> bigint val add : bigint -> bigint -> bigint val sub : bigint -> bigint -> bigint val mult : bigint -> bigint -> bigint + +(** Euclid division m/d = (q,r), with m = q*d+r and |r|<|q|. + This is the "Trunc" variant (a.k.a "Truncated-Toward-Zero"), + as with ocaml's / (but not as ocaml's Big_int.quomod_big_int). + We have sign r = sign m *) + val euclid : bigint -> bigint -> bigint * bigint val less_than : bigint -> bigint -> bool |