[Gmp-commit] /var/hg/gmp: (Low-level Functions): More of: Rewrite mpn_set_str...

mercurial at gmplib.org mercurial at gmplib.org
Thu Dec 19 11:43:31 UTC 2013


details:   /var/hg/gmp/rev/325eb0ecbafc
changeset: 16104:325eb0ecbafc
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Dec 19 12:42:59 2013 +0100
description:
(Low-level Functions): More of: Rewrite mpn_set_str docs.

diffstat:

 doc/gmp.texi |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (28 lines):

diff -r 521a0f48d7c4 -r 325eb0ecbafc doc/gmp.texi
--- a/doc/gmp.texi	Wed Dec 18 22:17:08 2013 +0100
+++ b/doc/gmp.texi	Thu Dec 19 12:42:59 2013 +0100
@@ -5539,15 +5539,15 @@
 Convert bytes @{@var{str}, at var{strsize}@} in the given @var{base} to limbs at
 @var{rp}.
 
- at math{@var{str}[0]} is the most significant byte and
- at math{@var{str}[@var{strsize}-1]} is the least significant.  Each byte should
-be a value in the range 0 to @math{@var{base}-1}, not an ASCII character.
- at var{base} can vary from 2 to 256.
-
-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.
+ at math{@var{str}[0]} is the most significant input byte and
+ at math{@var{str}[@var{strsize}-1]} is the least significant input byte.  Each
+byte should 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 converted value is @{@var{rp}, at var{rn}@} where @var{rn} is the return
+value.  If the most significant input byte @math{@var{str}[0]} is non-zero,
+then @math{@var{rp}[@var{rn}-1]} will be non-zero, else
+ at math{@var{rp}[@var{rn}-1]} and some number of subsequent limbs may be zero.
 
 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.


More information about the gmp-commit mailing list