summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTorbjorn Granlund <torbjorng@google.com>2016-03-28 22:30:07 +0200
committerTorbjorn Granlund <torbjorng@google.com>2016-03-28 22:30:07 +0200
commit3a7c0875c59abdc8357567b35e00e0a7aeb305e7 (patch)
treeb8c7afb216688e74d143c0d31a423992cb12969d /doc
parent0e2d6717553eaf38b138f663cfdab5bee9aa4b96 (diff)
downloadgmp-3a7c0875c59abdc8357567b35e00e0a7aeb305e7.tar.gz
Redefine @mm to take html into account; use @mm instead of @m in a few places for better superscripting.
Diffstat (limited to 'doc')
-rw-r--r--doc/gmp.texi42
1 files changed, 32 insertions, 10 deletions
diff --git a/doc/gmp.texi b/doc/gmp.texi
index 367703a75..ed54dc4e7 100644
--- a/doc/gmp.texi
+++ b/doc/gmp.texi
@@ -14,7 +14,7 @@
This manual describes how to install and use the GNU multiple precision
arithmetic library, version @value{VERSION}.
-Copyright 1991, 1993-2015 Free Software Foundation, Inc.
+Copyright 1991, 1993-2016 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.3 or any later
@@ -148,9 +148,8 @@ How to install and use the GNU multiple precision arithmetic library, version @v
@end menu
-@c @m{T,N} is $T$ in tex or @math{N} otherwise. This is an easy way to give
-@c different forms for math in tex and info. Commas in N or T don't work,
-@c but @C{} can be used instead. \, works in info but not in tex.
+@c @m{T,N} is $T$ in tex or @math{N} otherwise. Commas in N or T don't work,
+@c but @C{} can be used instead.
@iftex
@macro m {T,N}
@tex$\T\$@end tex
@@ -162,6 +161,27 @@ How to install and use the GNU multiple precision arithmetic library, version @v
@end macro
@end ifnottex
+@c @mm{T,N} is $T$ tex and html and @math{N} in info. Commas in N or T don't
+@c work, but @C{} can be used instead.
+@iftex
+@macro mm {T,N}
+@tex$\T\$@end tex
+@end macro
+@end iftex
+
+@ifhtml
+@macro mm {T,N}
+@math{\T\}
+@end macro
+@end ifhtml
+
+@ifinfo
+@macro mm {T,N}
+@math{\N\}
+@end macro
+@end ifinfo
+
+
@macro C {}
,
@end macro
@@ -3433,9 +3453,10 @@ only when exactly equal.
Set @var{rop} to @m{base^{exp} \bmod mod, (@var{base} raised to @var{exp})
modulo @var{mod}}.
-Negative @var{exp} is supported if an inverse @math{@var{base}^@W{-1} @bmod
-@var{mod}} exists (see @code{mpz_invert} in @ref{Number Theoretic Functions}).
-If an inverse doesn't exist then a divide by zero is raised.
+Negative @var{exp} is supported if the inverse @mm{@var{base}@sup{-1} @bmod
+@var{mod}, @var{base}^(-1) @bmod @var{mod}} exists (see @code{mpz_invert} in
+@ref{Number Theoretic Functions}). If an inverse doesn't exist then a divide
+by zero is raised.
@end deftypefun
@deftypefun void mpz_powm_sec (mpz_t @var{rop}, const mpz_t @var{base}, const mpz_t @var{exp}, const mpz_t @var{mod})
@@ -3924,8 +3945,8 @@ Functions} for more information on how to use and not to use random
number functions.
@deftypefun void mpz_urandomb (mpz_t @var{rop}, gmp_randstate_t @var{state}, mp_bitcnt_t @var{n})
-Generate a uniformly distributed random integer in the range 0 to @m{2^n-1,
-2^@var{n}@minus{}1}, inclusive.
+Generate a uniformly distributed random integer in the range 0 to
+@mm{2@sup{n}-1, 2^@var{n}@minus{}1}, inclusive.
The variable @var{state} must be initialized by calling one of the
@code{gmp_randinit} functions (@ref{Random State Initialization}) before
@@ -3946,7 +3967,8 @@ Generate a random integer with long strings of zeros and ones in the
binary representation. Useful for testing functions and algorithms,
since this kind of random numbers have proven to be more likely to
trigger corner-case bugs. The random number will be in the range
-0 to @m{2^n-1, 2^@var{n}@minus{}1}, inclusive.
+@mm{2@sup{n-1}, 2^(@var{n}@minus{}1)} to @mm{2@sup{n}-1,
+2^@var{n}@minus{}1}, inclusive.
The variable @var{state} must be initialized by calling one of the
@code{gmp_randinit} functions (@ref{Random State Initialization})