summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Eichmann <davide@well-typed.com>2018-10-15 13:54:49 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-15 19:24:17 -0400
commit45d5eff820aefd42454a7b9f25c4a61dbfca1ad5 (patch)
tree4ebea20cfa215c94d08f45e96f6e4b8ee81ddecf
parent45ed4619fd5cfe785bbf1142b9d16e4f3c5148ce (diff)
downloadhaskell-45d5eff820aefd42454a7b9f25c4a61dbfca1ad5.tar.gz
Update integer_gmp_gcdext documentation.
Reviewers: hvr, bgamari, monoidal Reviewed By: monoidal Subscribers: rwbarton, carter GHC Trac Issues: #15350 Differential Revision: https://phabricator.haskell.org/D5091
-rw-r--r--libraries/integer-gmp/cbits/wrappers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libraries/integer-gmp/cbits/wrappers.c b/libraries/integer-gmp/cbits/wrappers.c
index 11e5179323..2b5db34f46 100644
--- a/libraries/integer-gmp/cbits/wrappers.c
+++ b/libraries/integer-gmp/cbits/wrappers.c
@@ -279,16 +279,16 @@ integer_gmp_mpn_gcd(mp_limb_t r[],
/* wraps mpz_gcdext()
*
- * Set g to the greatest common divisor of x and y, and in addition
- * set s and t to coefficients satisfying x*s + y*t = g.
+ * Set g={g0,gn} to the greatest common divisor of x={x0,xn} and
+ * y={y0,yn}, and in addition set s={s0,sn} to coefficient
+ * satisfying x*s + y*t = g.
*
- * The {gp,gn} array is zero-padded (as otherwise 'gn' can't be
- * reconstructed).
+ * The g0 array is zero-padded (so that gn is fixed).
*
- * g must have space for exactly gn=min(xn,yn) limbs.
- * s must have space for at least yn limbs.
+ * g0 must have space for exactly gn=min(xn,yn) limbs.
+ * s0 must have space for at least yn limbs.
*
- * return value: signed 'sn' of {sp,sn} where |sn| >= 1
+ * return value: signed 'sn' of s={s0,sn} where |sn| >= 1
*/
mp_size_t
integer_gmp_gcdext(mp_limb_t s0[], mp_limb_t g0[],