\[
\mp(v .. \vl) =
\sum_{0 \le i < \vl - v}
- 2^{\code{MPW_BITS} \cdot i} v[i]
+ 2^{\code{MPW_BITS} \cdot i} v[i]
\]
If the array is empty (i.e., $v = \vl$) then the number is zero. If the
array is empty, or the final word is nonzero, then the representation is said
\begin{listinglist}
|#include <catacomb/mpx.h>| \\
|MPX_OCTETS(size_t |$o$|,|
- |const mpw *|$v$|, const mpw *|$\vl$|);|
+ |const mpw *|$v$|, const mpw *|$\vl$|);|
\end{listinglist}
\fsec{Description}
\begin{listinglist}
|#include <catacomb/mpx.h>| \\
|MPX_COPY(mpw *|$\dv$|, mpw *|$\dvl$|,|
- |const mpw *|$\av$|, const mpw *|$\avl$|);|
+ |const mpw *|$\av$|, const mpw *|$\avl$|);|
\end{listinglist}
\fsec{Description}
\begin{listinglist}
|#include <catacomb/mpx.h>| \\
|void mpx_storel(const mpw *|$v$|, const mpw *|$\vl$|,|
- |void *|$p$|, size_t |$\sz$|);|
+ |void *|$p$|, size_t |$\sz$|);|
\end{listinglist}
\fsec{Description}
\begin{listinglist}
|#include <catacomb/mpx.h>| \\
|void mpx_loadl(mpw *|$v$|, mpw *|$\vl$|,|
- |const void *|$p$|, size_t |$\sz$|);|
+ |const void *|$p$|, size_t |$\sz$|);|
\end{listinglist}
\fsec{Description}
\begin{listinglist}
|#include <catacomb/mpx.h>| \\
|void mpx_storeb(const mpw *|$v$|, const mpw *|$\vl$|,|
- |void *|$p$|, size_t |$\sz$|);|
+ |void *|$p$|, size_t |$\sz$|);|
\end{listinglist}
\fsec{Description}
\begin{listinglist}
|#include <catacomb/mpx.h>| \\
|void mpx_loadb(mpw *|$v$|, mpw *|$\vl$|,|
- |const void *|$p$|, size_t |$\sz$|);|
+ |const void *|$p$|, size_t |$\sz$|);|
\end{listinglist}
\fsec{Description}
\begin{tabbing}
|#include <catacomb/mpx.h>| \\
|void mpx_lsl(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,| \\
- \>|const mpw *|$\av$|, const mpw *|$\avl$|, size_t |$n$|);|
+ \>|const mpw *|$\av$|, const mpw *|$\avl$|, size_t |$n$|);|
\end{tabbing}
\end{listinglist}
\begin{tabbing}
|#include <catacomb/mpx.h>| \\
|void mpx_lsr(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,| \\
- \>|const mpw *|$\av$|, const mpw *|$\avl$|, size_t |$n$|);|
+ \>|const mpw *|$\av$|, const mpw *|$\avl$|, size_t |$n$|);|
\end{tabbing}
\end{listinglist}
\begin{listinglist}
|#include <catacomb/mpx.h>| \\
|void mpx_2c(mpw *|$\dv$|, mpw *|$\dvl$|,|
- |const mpw *|$v$|, const mpw *|$\vl$|);|
+ |const mpw *|$v$|, const mpw *|$\vl$|);|
\end{listinglist}
\fsec{Description}
\begin{tabbing}
|#include <catacomb/mpx.h>| \\
|int mpx_ucmp(|\=|const mpw *|$\av$|, const mpw *|$\avl$|,| \\
- \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);| \\
+ \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);| \\
|int MPX_UCMP(|\=|const mpw *|$\av$|, const mpw *|$\avl$|, |\synt{rel-op}|,|
- \\ \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);|
+ \\ \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);|
\end{tabbing}
\end{listinglist}
\begin{tabbing}
|#include <catacomb/mpx.h>| \\
|void mpx_uadd(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,|
- |const mpw *|$\av$|, const mpw *|$\avl$|,| \\
- \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);|
+ |const mpw *|$\av$|, const mpw *|$\avl$|,| \\
+ \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);|
\end{tabbing}
\end{listinglist}
\begin{tabbing}
|#include <catacomb/mpx.h>| \\
|void mpx_usub(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,|
- |const mpw *|$\av$|, const mpw *|$\avl$|,| \\
- \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);|
+ |const mpw *|$\av$|, const mpw *|$\avl$|,| \\
+ \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);|
\end{tabbing}
\end{listinglist}
Subtracts one multiprecision integer from another. The difference of the two
arguments $\mp(\av .. \avl) - \mp(\bv .. \bvl)$ is stored in $\dv .. \dvl$.
The destination array may be equal to either or both source
-arrays.\footnote{%
+arrays.\footnote{%
Subtracting a number from itself is a particularly poor way of clearing an
integer to zero. A call to \code{MPX_ZERO} (page~\pageref{fn:MPX-ZERO}) is
much more efficient.} %
\begin{tabbing}
|#include <catacomb/mpx.h>| \\
|void mpx_umul(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,|
- |const mpw *|$\av$|, const mpw *|$\avl$|,| \\
- \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);|
+ |const mpw *|$\av$|, const mpw *|$\avl$|,| \\
+ \>|const mpw *|$\bv$|, const mpw *|$\bvl$|);|
\end{tabbing}
\end{listinglist}
\begin{tabbing}
|#include <catacomb/mpx.h>| \\
|void mpx_umuln(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,| \\
- \> |const mpw *|$\av$|, const mpw *|$\avl$|, mpw |$n$|);| \\
+ \> |const mpw *|$\av$|, const mpw *|$\avl$|, mpw |$n$|);| \\
|void MPX_UMULN(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,| \\
- \> |const mpw *|$\av$|, const mpw *|$\avl$|, mpw |$n$|);|
+ \> |const mpw *|$\av$|, const mpw *|$\avl$|, mpw |$n$|);|
\end{tabbing}
\end{listinglist}
\begin{tabbing}
|#include <catacomb/mpx.h>| \\*
|void mpx_umlan(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,| \\*
- \> |const mpw *|$\av$|, const mpw *|$\avl$|, mpw |$n$|);| \\
+ \> |const mpw *|$\av$|, const mpw *|$\avl$|, mpw |$n$|);| \\
|void MPX_UMLAN(|\=|mpw *|$\dv$|, mpw *|$\dvl$|,| \\
- \> |const mpw *|$\av$|, const mpw *|$\avl$|, mpw |$n$|);|
+ \> |const mpw *|$\av$|, const mpw *|$\avl$|, mpw |$n$|);|
\end{tabbing}
\end{listinglist}
\begin{listinglist}
|#include <catacomb/mpx.h>| \\
|void mpx_usqr(mpw *|$\dv$|, mpw *|$\dvl$|,|
- |const mpw *|$\av$|, const mpw *|$\avl$|);|
+ |const mpw *|$\av$|, const mpw *|$\avl$|);|
\end{listinglist}
\fsec{Description}
\begin{tabbing}
|#include <catacomb/mpx.h>| \\
|void mpx_udiv(|\=|mpw *|$\qv$|, mpw *|$\qvl$|, mpw *|$\rv$|, mpw *|$\rvl$|,|
-\\ \>|const mpw *|$\dv$|, const mpw *|$\dvl$|,|
- |mpw *|$\mathit{sv}$|, mpw *|$\mathit{svl}$|);|
+\\ \>|const mpw *|$\dv$|, const mpw *|$\dvl$|,|
+ |mpw *|$\mathit{sv}$|, mpw *|$\mathit{svl}$|);|
\end{tabbing}
\end{listinglist}
which is a useful property when performing modular reductions.
\shortverb\|
-%%% Local Variables:
+%%% Local Variables:
%%% mode: latex
%%% TeX-master: "catacomb"
-%%% End:
+%%% End: