[Gmp-commit] /var/hg/gmp-5.1: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Wed Dec 18 21:30:59 UTC 2013
details: /var/hg/gmp-5.1/rev/d19172622a74
changeset: 15450:d19172622a74
user: Torbjorn Granlund <tege at gmplib.org>
date: Wed Dec 18 22:30:20 2013 +0100
description:
(Low-level Functions): Rewrite mpn_set_str docs.
details: /var/hg/gmp-5.1/rev/9e5c78a9c9c4
changeset: 15451:9e5c78a9c9c4
user: Torbjorn Granlund <tege at gmplib.org>
date: Wed Dec 18 22:30:53 2013 +0100
description:
ChangeLog
diffstat:
ChangeLog | 4 ++++
doc/gmp.texi | 17 +++++++++--------
2 files changed, 13 insertions(+), 8 deletions(-)
diffs (38 lines):
diff -r 7689dc0334e6 -r 9e5c78a9c9c4 ChangeLog
--- a/ChangeLog Fri Oct 18 11:17:55 2013 +0200
+++ b/ChangeLog Wed Dec 18 22:30:53 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-10-11 Torbjorn Granlund <tege at gmplib.org>
* mpn/x86/k7/mod_1_1.asm: Use 'subl' form to avoid ambiguity.
diff -r 7689dc0334e6 -r 9e5c78a9c9c4 doc/gmp.texi
--- a/doc/gmp.texi Fri Oct 18 11:17:55 2013 +0200
+++ b/doc/gmp.texi Wed Dec 18 22:30:53 2013 +0100
@@ -5473,14 +5473,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