summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2013-12-18 22:16:53 +0100
committerTorbjorn Granlund <tege@gmplib.org>2013-12-18 22:16:53 +0100
commitb38a3adc35dea8d82d7e87109c0bcfcf9ec93360 (patch)
tree8d93cc57164763265cc2be4575f5e5e624d4b50e /doc
parentacde868785cd32716ae094c39fa5f00e9fe5fbfb (diff)
downloadgmp-b38a3adc35dea8d82d7e87109c0bcfcf9ec93360.tar.gz
(Low-level Functions): Rewrite mpn_set_str docs.
Diffstat (limited to 'doc')
-rw-r--r--doc/gmp.texi13
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/gmp.texi b/doc/gmp.texi
index b6a172851..de9639842 100644
--- a/doc/gmp.texi
+++ b/doc/gmp.texi
@@ -5544,14 +5544,15 @@ Convert bytes @{@var{str},@var{strsize}@} in the given @var{base} to limbs at
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.
+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
+@var{rp}[@var{retval}@minus{}1] will be non-zero, else
+@var{rp}[@var{retval}@minus{}1] and subsequent limbs may be zero.
-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.
+The area at @var{rp} has to have space for the largest possible number with
+@var{strsize} digits in the chosen base, plus one extra limb.
-@var{strsize} must be at least 1, and no overlap is permitted between
+The input must have at least one byte, and no overlap is permitted between
@{@var{str},@var{strsize}@} and the result at @var{rp}.
@end deftypefun