[Gmp-commit] /var/hg/gmp: Fix lots of errors in the manual (from Ivan Panchen...

mercurial at gmplib.org mercurial at gmplib.org
Thu Nov 17 13:17:17 CET 2022


details:   /var/hg/gmp/rev/614a1cd8bb1d
changeset: 18374:614a1cd8bb1d
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Thu Nov 17 13:17:12 2022 +0100
description:
Fix lots of errors in the manual (from Ivan Panchenko).

diffstat:

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

diffs (truncated from 612 to 300 lines):

diff -r 3ac5afa36be5 -r 614a1cd8bb1d doc/gmp.texi
--- a/doc/gmp.texi	Wed Nov 02 13:48:37 2022 +0100
+++ b/doc/gmp.texi	Thu Nov 17 13:17:12 2022 +0100
@@ -25,7 +25,7 @@
 @ref{GNU Free Documentation License}.
 @end copying
 @c  Note the @ref above must be on one line, a line break in an @ref within
- at c  @copying will bomb in recent texinfo.tex (eg. 2004-04-07.08 which comes
+ at c  @copying will bomb in recent texinfo.tex (e.g. 2004-04-07.08 which comes
 @c  with texinfo 4.7), with messages about missing @endcsname.
 
 
@@ -59,7 +59,7 @@
 @c  HTML:
 @c
 @c  Nothing special is done for links to external manuals, they just come out
- at c  in the usual makeinfo style, eg. "../libc/Locales.html".  If you have
+ at c  in the usual makeinfo style, e.g. "../libc/Locales.html".  If you have
 @c  local copies of such manuals then this is a good thing, if not then you
 @c  may want to search-and-replace to some online source.
 @c
@@ -410,7 +410,7 @@
 @c  on printing a particular section, GMPreftop gives just the title.
 @c
 @c  The texinfo manual recommends putting a likely section name in references
- at c  like this, eg. "Introduction", but it seems better to just give the title.
+ at c  like this, e.g. "Introduction", but it seems better to just give the title.
 @c
 @iftex
 @macro GMPreftop{info,title}
@@ -470,7 +470,7 @@
 the additional option of applying later versions of these licenses. (The
 reason for this dual licensing is to make it possible to use the library with
 programs which are licensed under GPL version 2, but which for historical or
-other reasons do not allow use under later versions of the GPL).
+other reasons do not allow use under later versions of the GPL.)
 
 Programs which are not part of the library itself, such as demonstration
 programs and the GMP testsuite, are licensed under the terms of the GNU
@@ -502,13 +502,13 @@
 @cindex CPU types
 ARM Cortex-A9, Cortex-A15, and generic ARM,
 DEC Alpha 21064, 21164, and 21264,
-AMD K8 and K10 (sold under many brands, e.g. Athlon64, Phenom, Opteron)
+AMD K8 and K10 (sold under many brands, e.g. Athlon64, Phenom, Opteron),
 Bulldozer, and Bobcat,
 Intel Pentium, Pentium Pro/II/III, Pentium 4, Core2, Nehalem, Sandy bridge, Haswell, generic x86,
 Intel IA-64,
 Motorola/IBM PowerPC 32 and 64 such as POWER970, POWER5, POWER6, and POWER7,
 MIPS 32-bit and 64-bit,
-SPARC 32-bit ad 64-bit with special support for all UltraSPARC models.
+SPARC 32-bit and 64-bit with special support for all UltraSPARC models.
 There is also assembly code for many obsolete CPUs.
 
 
@@ -695,7 +695,7 @@
 @command{ranlib}.  This makes it possible for a set of cross-compiling tools
 to co-exist with native tools.  The prefix is the argument to @samp{--host},
 and this can be an alias, such as @samp{m68k-linux}.  But note that tools
-don't have to be setup this way, it's enough to just have a @env{PATH} with a
+don't have to be set up this way, it's enough to just have a @env{PATH} with a
 suitable cross-compiling @command{cc} etc.
 
 Compiling for a different CPU in the same family as the build system is a form
@@ -745,7 +745,7 @@
 @nisamp{alphapca57},
 @nisamp{alphaev6},
 @nisamp{alphaev67},
- at nisamp{alphaev68}
+ at nisamp{alphaev68},
 @nisamp{alphaev7}
 
 @item
@@ -1061,7 +1061,7 @@
 @item @option{MPN_PATH}
 @cindex @code{MPN_PATH}
 Various assembly versions of each mpn subroutines are provided.  For a given
-CPU, a search is made though a path to choose a version of each.  For example
+CPU, a search is made through a path to choose a version of each.  For example
 @samp{sparcv8} has
 
 @example
@@ -1138,7 +1138,7 @@
 installing library or header files built for a particular ABI at .  This will
 probably only matter when installing multiple builds of GMP, and it might be
 as simple as configuring with a special @samp{libdir}, or it might require
-more than that.  Note that builds for different ABIs need to done separately,
+more than that.  Note that builds for different ABIs need to be done separately,
 with a fresh @command{./configure} and @command{make} each.
 
 @sp 1
@@ -1207,7 +1207,7 @@
 cc  +DA2.0 +e
 @end example
 
-Note that current versions of GCC (eg.@: 3.2) don't generate 64-bit
+Note that current versions of GCC (e.g.@: 3.2) don't generate 64-bit
 instructions for @code{long long} operations and so may be slower than for
 2.0w.  (The GMP assembly code is the same though.)
 
@@ -1269,7 +1269,7 @@
 @item @samp{ABI=o32}
 The o32 ABI is 32-bit pointers and integers, and no 64-bit operations.  GMP
 will be slower than in n32 or 64, this option only exists to support old
-compilers, eg.@: GCC 2.7.2.  Applications can be compiled with no special
+compilers, e.g.@: GCC 2.7.2.  Applications can be compiled with no special
 flags on an old compiler, or on a newer compiler with
 
 @example
@@ -1715,7 +1715,7 @@
 @file{config.log}.  Use @command{bash} 2.04 or higher.
 
 @samp{make all} was found to run out of memory during the final
- at file{libgmp.la} link on one system tested, despite having 64Mb available.
+ at file{libgmp.la} link on one system tested, despite having 64MiB available.
 Running @samp{make libgmp.la} directly helped, perhaps recursing into the
 various subdirectories uses up memory.
 
@@ -1806,7 +1806,7 @@
 
 In particular for long-running GMP applications, and applications demanding
 extremely large numbers, building and running the @code{tuneup} program in the
- at file{tune} subdirectory, can be important.  For example,
+ at file{tune} subdirectory can be important.  For example,
 
 @example
 cd tune
@@ -2012,7 +2012,7 @@
 declare a function using the @code{mpz_t} or @code{const mpz_t} as the argument
 types, the same "pointer decay" happens in the background regardless.
 
-Occasionally, it is useful to manipulate pointers directly, e.g, to
+Occasionally, it is useful to manipulate pointers directly, e.g., to
 conditionally swap @emph{references} to a function's inputs without changing
 the @emph{values} as seen by the caller, or returning a pointer to an
 @code{mpz_t} which is part of a larger structure. For these cases, the pointer
@@ -2062,7 +2062,7 @@
 @item
 Functions for floating-point arithmetic, with names beginning with
 @code{mpf_}.  The associated type is @code{mpf_t}.  There are about 70
-functions is this class.  (@pxref{Floating-point Functions})
+functions in this class.  (@pxref{Floating-point Functions})
 
 @item
 Fast low-level functions that operate on natural numbers.  These are used by
@@ -2446,7 +2446,7 @@
 expression evaluation within the main GMP library.  Going beyond something
 minimal quickly leads to matters like user-defined functions, looping, fixnums
 for control variables, etc, which are considered outside the scope of GMP
-(much closer to language interpreters or compilers, @xref{Language Bindings}.)
+(much closer to language interpreters or compilers, @xref{Language Bindings}).
 Something simple for program input convenience may yet be a possibility, a
 combination of the @file{expr} demo and the @file{pexpr} tree back-end
 perhaps.  But for now the above evaluators are offered as illustrations.
@@ -2508,7 +2508,7 @@
 The @code{ui} functions and the small number of @code{si} functions exist for
 convenience and should be used where applicable.  But if for example an
 @code{mpz_t} contains a value that fits in an @code{unsigned long} there's no
-need extract it and call a @code{ui} function, just use the regular @code{mpz}
+need to extract it and call a @code{ui} function, just use the regular @code{mpz}
 function.
 
 @item In-Place Operations
@@ -2556,7 +2556,7 @@
 
 However when testing divisibility by several small integers, it's best to take
 a remainder modulo their product, to save multi-precision operations.  For
-instance to test whether a number is divisible by any of 23, 29 or 31 take a
+instance to test whether a number is divisible by 23, 29 or 31 take a
 remainder modulo @math{23 at times{}29 at times{}31 = 20677} and then test that.
 
 The division functions like @code{mpz_tdiv_q_ui} which give a quotient as well
@@ -2971,7 +2971,7 @@
 Problems}, or perhaps @ref{Notes for Particular Systems}.  You may also want
 to check @uref{https://gmplib.org/} for patches for this release.
 
-Please include the following in any report,
+Please include the following in any report:
 
 @itemize @bullet
 @item
@@ -3165,8 +3165,8 @@
 @code{0B} for binary, @code{0} for octal, or decimal otherwise.
 
 For bases up to 36, case is ignored; upper-case and lower-case letters have
-the same value.  For bases 37 to 62, upper-case letter represent the usual
-10..35 while lower-case letter represent 36..61.
+the same value.  For bases 37 to 62, upper-case letters represent the usual
+10..35 while lower-case letters represent 36..61.
 
 This function returns 0 if the entire string is a valid number in base
 @var{base}.  Otherwise it returns @minus{}1.
@@ -3366,7 +3366,7 @@
 
 Division is undefined if the divisor is zero.  Passing a zero divisor to the
 division or modulo functions (including the modular powering functions
- at code{mpz_powm} and @code{mpz_powm_ui}), will cause an intentional division by
+ at code{mpz_powm} and @code{mpz_powm_ui}) will cause an intentional division by
 zero.  This lets a program handle arithmetic exceptions in these functions the
 same way as for normal C @code{int} arithmetic.
 
@@ -3453,7 +3453,7 @@
 
 For positive @var{n} both @code{mpz_fdiv_q_2exp} and @code{mpz_tdiv_q_2exp}
 are simple bitwise right shifts.  For negative @var{n}, @code{mpz_fdiv_q_2exp}
-is effectively an arithmetic right shift treating @var{n} as twos complement
+is effectively an arithmetic right shift treating @var{n} as two's complement
 the same as the bitwise logical functions do, whereas @code{mpz_tdiv_q_2exp}
 effectively treats @var{n} as sign and magnitude.
 @end deftypefun
@@ -3795,7 +3795,7 @@
 @deftypefun void mpz_fib_ui (mpz_t @var{fn}, unsigned long int @var{n})
 @deftypefunx void mpz_fib2_ui (mpz_t @var{fn}, mpz_t @var{fnsub1}, unsigned long int @var{n})
 @cindex Fibonacci sequence functions
- at code{mpz_fib_ui} sets @var{fn} to to @m{F_n,F[n]}, the @var{n}'th Fibonacci
+ at code{mpz_fib_ui} sets @var{fn} to @m{F_n,F[n]}, the @var{n}th Fibonacci
 number.  @code{mpz_fib2_ui} sets @var{fn} to @m{F_n,F[n]}, and @var{fnsub1} to
 @m{F_{n-1},F[n-1]}.
 
@@ -3808,7 +3808,7 @@
 @deftypefun void mpz_lucnum_ui (mpz_t @var{ln}, unsigned long int @var{n})
 @deftypefunx void mpz_lucnum2_ui (mpz_t @var{ln}, mpz_t @var{lnsub1}, unsigned long int @var{n})
 @cindex Lucas number functions
- at code{mpz_lucnum_ui} sets @var{ln} to to @m{L_n,L[n]}, the @var{n}'th Lucas
+ at code{mpz_lucnum_ui} sets @var{ln} to @m{L_n,L[n]}, the @var{n}th Lucas
 number.  @code{mpz_lucnum2_ui} sets @var{ln} to @m{L_n,L[n]}, and @var{lnsub1}
 to @m{L_{n-1},L[n-1]}.
 
@@ -3874,7 +3874,7 @@
 @cindex Integer logical functions
 @cindex Integer bit manipulation functions
 
-These functions behave as if twos complement arithmetic were used (although
+These functions behave as if two's complement arithmetic were used (although
 sign-magnitude is the actual implementation).  The least significant bit is
 number 0.
 
@@ -3985,8 +3985,8 @@
 @code{0B} for binary, @code{0} for octal, or decimal otherwise.
 
 For bases up to 36, case is ignored; upper-case and lower-case letters have
-the same value.  For bases 37 to 62, upper-case letter represent the usual
-10..35 while lower-case letter represent 36..61.
+the same value.  For bases 37 to 62, upper-case letters represent the usual
+10..35 while lower-case letters represent 36..61.
 
 Return the number of bytes read, or if an error occurred, return 0.
 @end deftypefun
@@ -4023,7 +4023,7 @@
 @cindex Integer random number functions
 @cindex Random number functions
 
-The random number functions of GMP come in two groups; older function
+The random number functions of GMP come in two groups; older functions
 that rely on a global state, and newer functions that accept a state
 parameter that is read and modified.  Please see the @ref{Random Number
 Functions} for more information on how to use and not to use random
@@ -4550,7 +4550,7 @@
 
 @var{num2} and @var{den2} are allowed to have common factors.
 
-These functions are implemented as a macros and evaluate their arguments
+These functions are implemented as macros and evaluate their arguments
 multiple times.
 @end deftypefn
 
@@ -4870,8 +4870,8 @@
 decimal.
 
 For bases up to 36, case is ignored; upper-case and lower-case letters have
-the same value; for bases 37 to 62, upper-case letter represent the usual
-10..35 while lower-case letter represent 36..61.
+the same value; for bases 37 to 62, upper-case letters represent the usual
+10..35 while lower-case letters represent 36..61.
 
 Unlike the corresponding @code{mpz} function, the base will not be determined
 from the leading characters of the string if @var{base} is 0.  This is so that
@@ -5364,7 +5364,7 @@
 
 @deftypefun mp_limb_t mpn_neg (mp_limb_t *@var{rp}, const mp_limb_t *@var{sp}, mp_size_t @var{n})
 Perform the negation of @{@var{sp}, @var{n}@}, and write the result to
-@{@var{rp}, @var{n}@}.  This is equivalent to calling @code{mpn_sub_n} with a
+@{@var{rp}, @var{n}@}.  This is equivalent to calling @code{mpn_sub_n} with an
 @var{n}-limb zero minuend and passing @{@var{sp}, @var{n}@} as subtrahend.
 Return borrow, either 0 or 1.
 @end deftypefun
@@ -5540,7 +5540,7 @@
 least significant @var{count} bits of the return value (the rest of the return
 value is zero).
 
- at var{count} must be in the range 1 to @nicode{mp_bits_per_limb}@minus{}1.  The
+ at var{count} must be in the range 1 to @nicode{mp_bits_per_limb}@math{{}-1}.  The
 regions @{@var{sp}, @var{n}@} and @{@var{rp}, @var{n}@} may overlap, provided
 @math{@var{rp} @ge{} @var{sp}}.
 
@@ -5553,7 +5553,7 @@
 most significant @var{count} bits of the return value (the rest of the return
 value is zero).
 
- at var{count} must be in the range 1 to @nicode{mp_bits_per_limb}@minus{}1.  The


More information about the gmp-commit mailing list