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

mercurial at gmplib.org mercurial at gmplib.org
Wed Dec 18 21:17:17 UTC 2013


details:   /var/hg/gmp/rev/60464a88dd37
changeset: 16102:60464a88dd37
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Dec 18 22:16:53 2013 +0100
description:
(Low-level Functions): Rewrite mpn_set_str docs.

details:   /var/hg/gmp/rev/521a0f48d7c4
changeset: 16103:521a0f48d7c4
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Dec 18 22:17:08 2013 +0100
description:
ChangeLog

diffstat:

 ChangeLog    |   4 ++++
 doc/gmp.texi |  17 +++++++++--------
 2 files changed, 13 insertions(+), 8 deletions(-)

diffs (38 lines):

diff -r 92ab483b71b5 -r 521a0f48d7c4 ChangeLog
--- a/ChangeLog	Sat Dec 14 17:53:57 2013 +0100
+++ b/ChangeLog	Wed Dec 18 22:17:08 2013 +0100
@@ -1,3 +1,7 @@
+2013-12-18  Torbjorn Granlund  <tege at gmplib.org>
+
+	* doc/gmp.texi (Low-level Functions): Rewrite mpn_set_str docs.
+
 2013-12-14  Ulrich Weigand  <Ulrich.Weigand at de.ibm.com>
 
 	* mpn/powerpc32/darwin.m4: Allow (and ignore) optional
diff -r 92ab483b71b5 -r 521a0f48d7c4 doc/gmp.texi
--- a/doc/gmp.texi	Sat Dec 14 17:53:57 2013 +0100
+++ b/doc/gmp.texi	Wed Dec 18 22:17:08 2013 +0100
@@ -5544,14 +5544,15 @@
 be a value in the range 0 to @math{@var{base}-1}, not an ASCII character.
 @var{base} can vary from 2 to 256.
 
-The return value is the number of limbs written to @var{rp}.  If the most
-significant input byte is non-zero then the high limb at @var{rp} will be
-non-zero, and only that exact number of limbs will be required there.
-
-If the most significant input byte is zero then there may be high zero limbs
-written to @var{rp} and included in the return value.
-
- at var{strsize} must be at least 1, and no overlap is permitted between
+The return value is the number of valid limbs written to @var{rp}.  Iff the
+input string has no leading zero digits, the value at
+ at var{rp}[@var{retval}@minus{}1] will be non-zero, else
+ at var{rp}[@var{retval}@minus{}1] and subsequent limbs may be zero.
+
+The area at @var{rp} has to have space for the largest possible number with
+ at var{strsize} digits in the chosen base, plus one extra limb.
+
+The input must have at least one byte, and no overlap is permitted between
 @{@var{str}, at var{strsize}@} and the result at @var{rp}.
 @end deftypefun
 


More information about the gmp-commit mailing list