\documentstyle{article}
\begin{document}
\title{Integer Representation}
\author{George E. Collins}
\maketitle

In SACLIB, $\beta$ is the radix, or base, for the representation
of large integers.  Let $A$ be any positive integer.  $A$ can
be uniquely represented in the form

\[A = \sum _{i \leq n-1} a_i \beta^i,\]

with $a_i \geq 0$ for all $i$ and $a_n > 0$.  The $a_i$ are
called the $\beta$-digits of $A$ and $n$ is the $\beta$-length
of $A$.  For the most part, SACLIB integers are represented
as lists.  The integer $A$ above is represented as the list
$(a_0,a_1,\ldots,a_{n-1})$ provided that $n > 1$, but if
$n = 1$, it is represented as just the C integer $a_0 = A$.
The negative integer $-A$ is represented as the list
$(-a_0.-a_1,\ldots,-a_n)$ if $n > 1$, but if $n = 1$, it is
represented as the C integer $-a_n$.  Of course zero is also
represented as the C integer 0.

For the sake of greater efficiency, integers are in some
contexts represented by arrays.  In the array representation
of A, any array of size greater than or equal to $n$ may
be used and the $\beta$-digit $a_i$ of $|A|$ is stored in
$A[i]$.  The sign of $A$ and the $\beta$-length of $A$ are
stored separately.

\end{document}
