[Gmp-commit] /var/hg/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Sat Jul 5 21:15:17 UTC 2014


details:   /var/hg/gmp/rev/2bd5700ed182
changeset: 16450:2bd5700ed182
user:      Niels M?ller <nisse at lysator.liu.se>
date:      Sat Jul 05 23:11:30 2014 +0200
description:
Document that scratch need for mpn_sec_add_1 and mpn_sec_sub_1 are at most n limbs.

details:   /var/hg/gmp/rev/33b76792d0cb
changeset: 16451:33b76792d0cb
user:      Niels M?ller <nisse at lysator.liu.se>
date:      Sat Jul 05 23:14:57 2014 +0200
description:
Document allowed overlap for mpn_addmul_1 and mpn_submul_1.

diffstat:

 ChangeLog    |  7 +++++++
 doc/gmp.texi |  9 ++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r f27764c94f1b -r 33b76792d0cb ChangeLog
--- a/ChangeLog	Thu Jul 03 22:36:53 2014 +0200
+++ b/ChangeLog	Sat Jul 05 23:14:57 2014 +0200
@@ -1,3 +1,10 @@
+2014-07-05  Niels Möller  <nisse at lysator.liu.se>
+
+	* doc/gmp.texi (Low-level Functions): Document that scratch need
+	for mpn_sec_add_1 and mpn_sec_sub_1 are at most n limbs.
+	(Low-level Functions): Document allowed overlap for mpn_addmul_1
+	and mpn_submul_1.
+
 2014-07-02  Torbjörn Granlund  <tege at gmplib.org>
 
 	mpn/x86_64/atom/redc_1.asm: Enforce proper stack allocation.
diff -r f27764c94f1b -r 33b76792d0cb doc/gmp.texi
--- a/doc/gmp.texi	Thu Jul 03 22:36:53 2014 +0200
+++ b/doc/gmp.texi	Sat Jul 05 23:14:57 2014 +0200
@@ -5301,7 +5301,8 @@
 Multiply @{@var{s1p}, @var{n}@} and @var{s2limb}, and add the @var{n} least
 significant limbs of the product to @{@var{rp}, @var{n}@} and write the result
 to @var{rp}.  Return the most significant limb of the product, plus carry-out
-from the addition.
+from the addition.  @{@var{s1p}, @var{n}@} and @{@var{rp}, @var{n}@} are
+allowed to overlap provided @math{@var{rp} @le{} @var{s1p}}.
 
 This is a low-level function that is a building block for general
 multiplication as well as other operations in GMP at .  It is written in assembly
@@ -5312,7 +5313,8 @@
 Multiply @{@var{s1p}, @var{n}@} and @var{s2limb}, and subtract the @var{n}
 least significant limbs of the product from @{@var{rp}, @var{n}@} and write the
 result to @var{rp}.  Return the most significant limb of the product, plus
-borrow-out from the subtraction.
+borrow-out from the subtraction.  @{@var{s1p}, @var{n}@} and @{@var{rp},
+ at var{n}@} are allowed to overlap provided @math{@var{rp} @le{} @var{s1p}}.
 
 This is a low-level function that is a building block for general
 multiplication and division as well as other operations in GMP at .  It is written
@@ -5706,7 +5708,8 @@
 @code{mpn_add_1} which are @math{O(1)} on average. They require scratch space
 of @code{mpn_sec_add_1_itch(@var{n})} and @code{mpn_sec_sub_1_itch(@var{n})}
 limbs, respectively, to be passed in the @var{tp} parameter. The scratch space
-requirements are guaranteed to increase monotonously in the operand size.
+requirements are guaranteed to be at most @var{n} limbs, and increase
+monotonously in the operand size.
 @end deftypefun
 
 @deftypefun void mpn_sec_mul (mp_limb_t *@var{rp}, const mp_limb_t *@var{ap}, mp_size_t @var{an}, const mp_limb_t *@var{bp}, mp_size_t @var{bn}, mp_limb_t *@var{tp})


More information about the gmp-commit mailing list