
\index{LIMITS package}
LIMITS is a fast limit package for REDUCE for functions which are
continuous except for computable poles and singularities, based on some
earlier work by Ian Cohen and John P. Fitch.  The Truncated Power Series
package is used for non-critical points, at which the value of the
function is the constant term in the expansion around that point.
\index{l'H\^opital's rule}
l'H\^opital's rule is used in critical cases, with preprocessing of
$\infty - \infty$ forms and reformatting of product forms in order
to apply l'H\^opital's rule.  A limited amount of bounded arithmetic
is also employed where applicable.

\subsection{Normal entry points}
\ttindex{LIMIT}\hypertarget{operator:LIMIT}{}
\begin{syntax}
 \f{LIMIT(}\meta{EXPRN:algebraic}, \meta{VAR:kernel},
  \meta{LIMPOINT:algebraic}):{algebraic}
\end{syntax}

This is the standard way of calling limit, applying all of the methods. The
result is the limit of EXPRN as VAR approaches LIMPOINT.


\subsection{Direction-dependent limits}

\ttindex{LIMIT+} \ttindex{LIMIT-}
\hypertarget{operator:LIMIT+}{}
\hypertarget{operator:LIMIT-}{}
\begin{syntaxtable}
  \texttt{LIMIT!+(}\meta{EXPRN:algebraic}, \meta{VAR:kernel},
     \meta{LIMPOINT:algebraic}\texttt{)}:algebraic & \\
  \texttt{LIMIT!-(}\meta{EXPRN:algebraic}, \meta{VAR:kernel},
     \meta{LIMPOINT:algebraic}\texttt{)}:algebraic \\
\end{syntaxtable}

If the limit depends upon the direction of approach to the \texttt{LIMPOINT},
the functions \texttt{LIMIT!+} and \texttt{LIMIT!-} may be used.  They are
defined by:
\begin{quote}
\begin{tabular}{l}
 \texttt{LIMIT!+ (LIMIT!-)} (EXP,VAR,LIMPOINT) $\rightarrow$\texttt{LIMIT}(EXP*,$\epsilon$,0), \\
  \qquad EXP*=sub(VAR=VAR+(-)$\epsilon^2$,EXP)
\end{tabular}
\end{quote}

\iffalse
\subsection{Diagnostic Functions}

\ttindex{LIMIT0}
\hypertarget{operator:LIMIT0}{}
\vspace{.1in}
\noindent \texttt{LIMIT!-}(EXPRN:{\em algebraic}, VAR:{\em kernel},
LIMPOINT:{\em algebraic}):{\em algebraic}
\noindent \texttt{LIMIT0}(EXPRN:{\em algebraic}, VAR:{\em kernel},
LIMPOINT:{\em algebraic}):{\em algebraic}
\vspace{.1in}

This function will use all parts of the limits package, but it does not
combine log terms before taking limits, so it may fail if there is a sum
of log terms which have a removable singularity in some of the terms.

\ttindex{LIMIT1}
\vspace{.1in}
\noindent \texttt{LIMIT1}(EXPRN:{\em algebraic}, VAR:{\em kernel},
LIMPOINT:{\em algebraic}):{\em algebraic}
\vspace{.1in}

\index{TPS package}
This function uses the TPS branch only, and will fail if the limit point is
singular.

\ttindex{LIMIT2}
\hypertarget{operator:LIMIT2}{}
\begin{quote}
\begin{tabular}{l@{}l}
\texttt{LIMIT2(} & TOP:{\em algebraic}, \\
&BOT:{\em algebraic}, \\
&VAR:{\em kernel}, \\
&LIMPOINT:{\em algebraic}):{\em algebraic}
\end{tabular}
\end{quote}

This function applies l'H\^opital's rule to the quotient (TOP/BOT).

\fi
