\start
Date: Fri, 1 Feb 2008 08:50:48 -0600
From: Tim Daly
To: list
Subject: 20080130.01.tpd.patch (Ei)

This patch adds the numeric calculation of the principal value of
the Exponential Integral function. This is defined by a 6 segment
piecewise approximation using Chebyshev polynomials. In addition
to the main function Ei, each of the 6 piecewise solutions can be
gotten directly by the EiN functions, which are also exposed. The
EiN functions are normalized to return results in -1 <= x <= 1.

  Ei  (-\infty < x < \infty)

  Ei1 (-\infty < x < -10)  using xe^xEi(x)
  Ei2 (-10 <= x <= -4)     using xe^xEi(x)
  Ei3 (-4 <= x <= 4)       using (Ei(x)-log(abs(x))-\gamma)/x
  Ei4 (4 <= x <= 12)       using xe^xEi(x)
  Ei5 (12 <= x <= 32)      using xe^xEi(x)
  Ei6 (32 <= x < /infty)   using xe^xEi(x)

The approximation is valid for 10^-30 but the implementation using
DoubleFloat does about 10^-16. The full coefficients are retained
for a future gmp implementation.

There is a regression test file ei.input.pamphlet that tests the
Ei and EiN functions according to all published standards.

Tim

=========================================================================
diff --git a/changelog b/changelog
index d486296..cdd0688 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20080131 tpd src/input/Makefile add ei.input for Ei regression test
+20080131 tpd src/input/ei.input regression test function Ei
+20080131 tpd src/algebra/special.spad add special function Ei
 20080127 tpd src/doc/Makefile add refcard
 20080127 tpd src/doc/refcard added
 20080125 tpd --patch-55 (January 2008) release
diff --git a/src/algebra/special.spad.pamphlet b/src/algebra/special.spad.pamphlet
index 6b173ae..aab10e4 100644
--- a/src/algebra/special.spad.pamphlet
+++ b/src/algebra/special.spad.pamphlet
@@ -49,6 +49,36 @@ DoubleFloatSpecialFunctions(): Exports == Impl where
         En: (PI,R) -> OPR
          ++ En(n,x) is the nth Exponential Integral Function
 
+        Ei: (OPR) -> OPR
+         ++ Ei is the Exponential Integral function
+         ++ This is computed using a 6 part piecewise approximation.
+         ++ DoubleFloat can only preserve about 16 digits but the
+         ++ Chebyshev approximation used can give 30 digits.
+
+        Ei1: (OPR) -> OPR
+         ++ Ei1 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from -infinity to -10 (preserves digits)
+
+        Ei2: (OPR) -> OPR
+         ++ Ei2 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from -10 to -4 (preserves digits)
+
+        Ei3: (OPR) -> OPR
+         ++ Ei3 is the first approximation of Ei where the result is
+         ++ (Ei(x)-log |x| - gamma)/x from -4 to 4 (preserves digits)
+
+        Ei4: (OPR) -> OPR
+         ++ Ei4 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from 4 to 12 (preserves digits)
+
+        Ei5: (OPR) -> OPR
+         ++ Ei5 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from 12 to 32 (preserves digits)
+
+        Ei6: (OPR) -> OPR
+         ++ Ei6 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from 32 to infinity (preserves digits)
+
         Beta: (R, R) -> R
          ++ Beta(x, y) is the Euler beta function, \spad{B(x,y)}, defined by
          ++   \spad{Beta(x,y) = integrate(t^(x-1)*(1-t)^(y-1), t=0..1)}.
@@ -171,6 +201,7 @@ DoubleFloatSpecialFunctions(): Exports == Impl where
 
 @
 \section{The Exponential Integral}
+\subsection{The E1 function}
 (Quoted from Segletes\cite{2}):
 
 A number of useful integrals exist for which no exact solutions have
@@ -313,7 +344,7 @@ e.g.}, transformation of variables), the fits are all piecewise over
 the domain of the integral.
 
 Cody and Thatcher \cite{7} performed what is perhaps the definitive
-work, with the use of Chebyshev approximations to the exponential 
+work, with the use of Chebyshev\cite{18,19} approximations to the exponential 
 integral $E_1$. Like others, they fit the integral over a piecewise
 series of subdomains (three in their case) and provide the fitting
 parameters necessary to evaluate the function to various required
@@ -504,6 +535,1514 @@ The formula is 5.1.14 in Abramowitz and Stegun, 1965, p229\cite{4}.
           w:R:=1/(n-1)*(exp(-x)-x*v)
           w::OPR
 
+@
+\section{The Ei Function}
+This function is based on Kin L. Lee's work\cite{8}. See also \cite{21}.
+\subsection{Abstract}
+The exponential integral Ei(x) is evaluated via Chebyshev series
+expansion of its associated functions to achieve high relative
+accuracy throughout the entire real line. The Chebyshev coefficients
+for these functions are given to 30 significant digits. Clenshaw's\cite{20}
+method is modified to furnish an efficient procedure for the accurate
+solution of linear systems having near-triangular coefficient
+matrices.
+\subsection{Introduction}
+The evaulation of the exponential integral
+\begin{equation}
+Ei(x)=\int_{-\infty}^{X}{\frac{e^u}{u}}\ du=-E_1(-x), x \ne 0
+\end{equation}
+is usually based on the value of its associated functions, for
+example, $xe^{-x}Ei(x)$. High accuracy tabulations of integral (1) by
+means of Taylor series techniques are given by Harris \cite{9} and
+Miller and Hurst \cite{10}. The evaluation of $Ei(x)$ for
+$-4 \le x \le \infty$ by means of Chebyshev series is provided by
+Clenshaw \cite{11} to have the absolute accuracy of 20 decimal
+places. The evaluation of the same integral (1) by rational
+approximation of its associated functions is furnished by Cody and
+Thacher \cite{12,13} for $-\infty < x < \infty$, and has the relative
+accuracy of 17 significant figures.
+
+The approximation of Cody and Thacher from the point of view of
+efficient function evaluation are preferable to those of
+Clenshaw. However, the accuracy of the latter's procedure, unlike
+those of the former, is not limited by the accuracy or the
+availability of a master function, which is a means of explicitly
+evaluating the function in question.
+
+In this paper $Ei(x)$ (or equivalently $-E_1(-x)$) for the entire real
+line is evaluted via Chebyshev series expansion of its associated
+functions that are accurate to 30 significant figures by a
+modification of Clenshaw's procedure. To verify the accuracy of the
+several Chebyshev series, values of the associated functions were
+checked against those computed by Taylor series and those of Murnaghan
+and Wrench \cite{14} (see Remarks on Convergence and Accuracy).
+
+Although for most purposes fewer than 30 figures of accuracy are
+required, such high accuracy is desirable for the following
+reasons. In order to further reduce the number of arithmetical
+operations in the evaluation of a function, the Chebyshev series in
+question can either be converted into a rational function or
+rearranged into an ordinary polynomial. Since several figures may be
+lost in either of these procedures, it is necessary to provide the
+Chebyshev series with a sufficient number of figures to achieve the
+desired accuracy. Furthermore, general function approximation
+routines, such as those used for minimax rational function
+approximations, require the explicit evaluation of the function to be
+approximated. To take account of the errors commited by these
+routines, the function values must have an accuracy higher than the
+approximation to be determined. Consequently, high-precision results
+are useful as a master function for finding approximations for (or
+involving) $Ei(x)$ (e.g. \cite{12,13}) where prescribed accuracy is
+less than 30 figures.
+
+\subsection{Discussion}
+
+It is proposed here to provide for the evaluation of $Ei(x)$ by
+obtaining Chebyshev coefficients for the associated functions given by
+table 1.
+
+\noindent
+{\bf Table 1}: Associated Functions of $Ei(x)$ and their ranges of Chebyshev
+Series Expansions
+
+\begin{tabular}{clc}
+& Associated function & Range of expansion\\
+Ei1 & $xe^{-x}Ei(x)$ & $-\infty < x \le -10$\\
+Ei2 & $xe^{-x}Ei(x)$ & $-10 \le x \le -4$\\
+Ei3 & $\frac{Ei(x)-log\vert x\vert - \gamma}{x}$ & $-4 \le x \le d42$\\
+Ei4 & $xe^{-x}Ei(x)$ & $4 \le x \le 12$\\
+Ei5 & $xe^{-x}Ei(x)$ & $12 \le x \le 32$\\
+Ei6 & $xe^{-x}Ei(x)$ & $32 \le x < \infty$\\
+\end{tabular}\\
+\hbox{\hskip 2cm}($\gamma$ = 0.5772156649... is Euler's constant.)
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei(y:OPR):OPR ==
+          infinite? y => 1
+          x:R:=retract(y)
+          x < -10.0::R => 
+            ei:R:=retract(Ei1(y))
+            (ei/(x*exp(-x)))::OPR
+          x <  -4.0::R =>
+            ei:R:=retract(Ei2(y))
+            (ei/(x*exp(-x)))::OPR
+          x <   4.0::R => 
+            ei3:R:=retract(Ei3(y))
+            gamma:R:=0.577215664901532860606512090082::R
+            (ei3*x+log(abs(x))+gamma)::OPR
+          x <  12.0::R => 
+            ei:R:=retract(Ei4(y))
+            (ei/(x*exp(-x)))::OPR
+          x <  32.0::R => 
+            ei:R:=retract(Ei5(y))
+            (ei/(x*exp(-x)))::OPR
+          ei:R:=retract(Ei6(y))
+          (ei/(x*exp(-x)))::OPR
+
+@
+Note that the functions $[Ei(x)-log\vert x\vert - \gamma]/x$ and
+$xe^{-x}Ei(x)$ have the limiting values of unity at the origin and at
+infinity, respectively, and that the range of the associated function
+values is close to unity (see table 4). This makes for the evaluation
+of the associated functions over the indicated ranges in table 1 (and
+thus $Ei(x)$ over the entire real line) with high relative accuracy by
+means of the Chebyshev series. The reason for this will become
+apparent later.
+
+Some remarks about the choice of the intervals of expansion for the
+serveral Chebyshev series are in order here. The partition of the real
+line indicated by table 1 is chosen to allow for the approximation of
+the associated functions with a maximum error of $0.5\times 10^{-30}$
+by polynomials of degress $< 50$. The real line has also been
+partitioned with the objective of providing the interval about zero
+with the lowest degree of polynomial approximation of the six
+intervals. This should compensate for the computation of 
+$log\vert x\vert$ required in the evaluation of $Ei(x)$ over that
+interval. The ranges $-\infty < x \le -4$ and $4 \le x < \infty$ are
+partitioned into 2 and 3 intervals, respectively, to provide
+approximations to $xe^{-x}Ei(x)$ by polynomials of about the same
+degree. 
+
+\subsection{Expansions in Chebyshev Series}
+
+Let $\phi(t)$ be a differentiable function defined on [-1,1]. To
+facilitate discussion, denote its Chebyshev series and that of its
+derivative by 
+\begin{equation}
+\phi(t)=\sum_{k=0}^{\infty}\ ^{'}{A_k^{(0)}T_k(t)}\quad
+\phi^{'}(t)=\sum_{k=0}^{\infty}\ ^{'}{A_k^{(1)}T_k(t)}
+\end{equation}
+where $T_k(t)$ are Chebyshev polynomials defined by
+\begin{equation}
+T_k(t)=cos(k\ \arccos\ t),\quad -1 \le t \le 1
+\end{equation}
+(A prime over a summation sign indicates that the first term is to be
+halved.) 
+
+If $\phi(t)$ and $\phi^{'}(t)$ are continuous, the Chebyshev
+coefficients $A_k^{(0)}$ and $A_k^{(1)}$ can be obtained analytically
+(if possible) or by numerical quadrature. However, since each function
+in table 1 satisfies a linear differential equation with polynomial
+coefficients, the Chebyshev coefficients can be more readily evaluated
+by the method of Clenshaw \cite{16}.
+
+There are several variations of Clenshaw's procedure (see,
+e.g. \cite{17}), but for high-precision computation, where multiple
+precision arithmetic is employed, we find his original procedure
+easiest to implement. However, straightforward application of it may
+result in a loss of accuracy if the trial solutions selected are not
+sufficiently independent. How the difficulty is overcome will be
+pointed out subsequently.
+
+\subsection{The function $xe^{-x}Ei(x)$ on the Finite Interval}
+
+We consider first the Chebyshev series expansion of
+\begin{equation}
+f(x)=xe^{-x}Ei(x),\quad (a \le x \le b)
+\end{equation}
+with $x\ne 0$. One can easily verify that after the change of
+variables
+\begin{equation}
+x=[(b-a)T + a + b]/2,\quad(-1 \le t \le 1)
+\end{equation}
+the function
+\begin{equation}
+\phi(t)=f\left[\frac{(b-a)t + a + b}{2}\right]=f(x)
+\end{equation}
+satisfies the differential equation
+\begin{equation}
+2(pt+q)\phi^{'}(t)+p(pt+q-2)\phi(t)=p(pt+q)
+\end{equation}
+with\footnote{The value of $Ei(a)$ may be evaluated by means of the
+Taylor series. In this report $Ei(a)$ is computed by first finding the
+Chebyshev series approximation to $[Ei(x)-log\vert x\vert-\gamma]/x$
+to get $Ei(a)$. The quantities $e^a$ and $\log\vert a\vert$ for
+integral values of $a$ may be found in existing tables}
+\begin{equation}
+\phi(-1)=ae^{-a}Ei(a)
+\end{equation}
+where $p=b-a$ and $q=b+a$. Replacing $\phi(t)$ and $\phi^{'}(t)$ in
+equations 7 by their Chebyshev series, we obtain
+\begin{equation}
+\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}}=\phi(-1)
+\end{equation}
+\begin{equation}
+2\sum_{k=0}^{\infty}\ {'}{A_k^{(1)}(pt+q)T_k(t)}+
+p\sum_{k=0}^{\infty}\ {'}{A_k^{(0)}(pt+q-2)T_k(t)}=
+p(pt+q)
+\end{equation}
+It can be demonstrated that if $B_k$ are the Chebyshev coefficients of
+a function $\Psi(t)$, then $C_k$, the Chebyshev coefficients of
+$t^r\Psi(t)$ for positive integers r, are given by \cite{16}
+\begin{equation}
+C_k=2^{-r}\sum_{i=0}^r\binom{r}{i}B_{\vert k-r+2i\vert}
+\end{equation}
+Consequently, the left member of equation 15 can be rearranged into a
+single series involving $T_k(t)$. The comparison of the coefficients
+of $T_k(t)$ that yields the infinite system of equations
+\begin{equation}
+\left.
+\begin{array}{c}
+\displaystyle\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}} = \phi(-1)\\
+\\
+2pA_{\vert k-1\vert}^{(1)}+
+4qA_k^{(1)}+
+2pA_{k+1}^{(1)}+
+p^2A_{\vert k-1\vert}^{(0)}+
+2p(q-2)A_k^{(0)}+
+p^2A_{k+1}^{(0)}\\
+\\
+=\left\{
+\begin{array}{rcl}
+4pq & , & k=0\\
+2p^2 & , & k=1\\
+0 & , & k=2,3,\ldots
+\end{array}
+\right.
+\end{array}
+\right\}
+\end{equation}
+The relation \cite{16}
+\begin{equation}
+2kA_k^{(0)}=A_{k-1}^{(1)}-A_{k+1}^{(1)}
+\end{equation}
+can be used to reduce equation 18 to a system of equations involving
+only $A_k^{(0)}$. Thus, replacing $k$ of equations 18 by $k+2$ and
+subtracting the resulting equation from equations 18, we have, by
+means of equation 19, the system of equations
+\begin{equation}
+\left.
+\begin{array}{c}
+\displaystyle\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}} = \phi(-1)\\
+\\
+2p(q-2)A_0+(8q+p^2)A_1+2p(6-q)A_2-p^2A_3=4pq\\
+\\
+p^2A_{k-1}+2p(2k+q-2)A_k+8q(k+1)A_{k+1}+2p(2k-q+6)A_{k+2}-p^2A_{k+3}\\
+\\
+=\left\{
+\begin{array}{rcl}
+2p^2 & , & k=1\\
+0 & , & k=2,3,\ldots
+\end{array}
+\right.
+\end{array}
+\right\}
+\end{equation}
+The superscript of $A_k^{(0)}$ is dropped for simplicity. In order to
+solve the infinite system 20, Clenshaw \cite{11} essentially
+considered the required solution as the limiting solution of the
+sequence of truncated systems consisting of the first $M+1$ equations
+of the same system, that is, the solution of the system
+\begin{equation}
+\sum_{k=0}^M\ ^{'}{(-1)^kA_k}=\phi(-1)
+\end{equation}
+\begin{equation}
+2p(q-2)A_0+(8q+p^2)A_1+2p(q-6)A_2-p^2A_3=4pq
+\end{equation}
+\begin{equation}
+\left.
+\begin{array}{c}
+p^2A_{k-1}+2p(2k+q-2)A_k+8q(k+1)A_{k+1}+2p(2k-q+6)A_{k+2}-p^2A_{k+3}\\
+\\
+=\left\{
+\begin{array}{rcl}
+2p^2 & , & k=1\\
+0 & , & k=2,3,\ldots,M-3
+\end{array}
+\right.\\
+\\
+p^2A_{M-3}+2p(2M+q-6)A_{M-2}+8q(M-1)A_{M-1}+2p(2M+4-q)A_M=0\\
+\\
+p^2A_{M-2}+2p(2M+q-4)A_{M-1}+8qMA_M=0
+\end{array}
+\right\}
+\end{equation}
+where $A_k$ is assumed to vanish for $K \ge M+1$. To solve system
+(21,22,23) consider first the subsystem 23 consisting of $M-2$
+equations in $M$ unknowns. Here use is made of the fact that the
+subsystem 23 is satisfied by
+\begin{equation}
+A_k=c_1\alpha_k+c_2\beta_k+\gamma_k\quad(k=0,1,2,\ldots)
+\end{equation}
+for arbitrary constants $c_1$ and $c_2$, where $\gamma_k$ is a
+particular solution of 23 and where $\alpha_k$ and $\beta_k$ are two
+independent solutions of the homogeneous equations (23 with $2p^2$
+deleted) of the same subsystem. Hence, if $\alpha_k$, $\beta_k$, and
+$\gamma_k$ are available, the solution of system (21,22,23) reduces to
+the determinant of $c_1$ and $c_2$ from equations 21 and 22.
+
+To solve equations (21,22,23), we note that
+\begin{equation}
+\gamma_0=2,\quad \gamma_k=0,\quad {\textrm for\ }k=1(1)M
+\end{equation}
+is obviously a particular solution of equation 23. The two independent
+solutions $\gamma_k$ and $\beta_k$ of the homogeneous equations of the
+same subsystem can be generated in turn by backward recurrence if we
+set
+\begin{equation}
+\left.
+\begin{array}{l}
+\hbox{\hskip 4cm}\alpha_{M-1}=0,\quad\alpha_M=1\\
+\textrm{and}\\
+\hbox{\hskip 4cm}\beta_{M-1}=1,\quad\beta_M=0\\
+\end{array}
+\right\}
+\end{equation}
+or choose any $\alpha{M-1}$, $\alpha_M$, and $\beta_{M-1}$, $\beta_M$
+for which $\alpha_{M-1}\beta_M-\alpha_M\beta_{M-1}\ne 0$. The
+arbitrary constants $c_1$ and $c_2$ are determined, and consequently
+the solution of equations (21,22,23) if equation 24 is substituted
+into equation 21 and 22 and the resulting equations
+\begin{equation}
+c_1R(\alpha)+c_2R(\beta)=\phi(-1)-1
+\end{equation}
+\begin{equation}
+c_1S(\alpha)+c_2S(\beta)=8p
+\end{equation}
+are solved as two equations in two unknowns. The terms $R(\alpha)$ and
+$S(\alpha)$ are equal, respectively, to the left members of equations
+21 and 22 corresponding to solution $\alpha_k$. (The identical
+designation holds for $R(\beta)$ and $S(\beta)$.)
+
+The quantities $\alpha_k$ and $\beta_k$ are known as trial solutions
+in reference \cite{12}. Clenshaw has pointed out that if $\alpha_k$
+and $\beta_k$ are not sufficiently independent, loss of significance
+will occur in the formation of the linear combination 24, with
+consequent loss of accuracy. Clenshaw suggested the Gauss-Seidel
+iteration procedure to improve the accuracy of the solution. However,
+this requires the application of an additional computing procedure and
+may prove to be extremely slow. A simpler procedure which does not
+alter the basic computing scheme given above is proposed here. The
+loss of accuracy can effectively be regained if we first generate a
+third trial solution $\delta_k$ (k=0,1,$\ldots$,M), where
+$\delta_{M-1}$ and $\delta_M$ are equal to 
+$c_1\alpha_{M-1}+c_2\beta_{M-1}$ and 
+$c_1\alpha_M+c_2\beta_M$, respectively, and where $\delta_k$
+(k=M-2,M-3,$\ldots$,0) is determined using backward recurrence as
+before by means of equation 23. Then either $\alpha_k$ or $\beta_k$ is
+replaced by $\delta_k$ and a new set of $c_1$ and $c_2$ is determined
+by equations 27 and 28. Such a procedure can be repeated until the
+required accuracy is reached. However, only one application of it was
+necessary in the computation of the coefficients of this report.
+
+As an example, consider the case for $4 \le x \le 12$ with $M=15$. The
+right member of equation 27 and of equation 28 assume, respectively,
+the values of $0.43820800$ and $64$. The trial solutions $\alpha_k$
+and $\beta_k$ generated with $\alpha_{14}=8$, $\alpha_{15}=9$ and
+$\beta_{14}=7$, $\beta_{15}=8$ are certainly independent, since 
+$\alpha_{14}\beta_{15}-\alpha_{15}\beta_{14}=1\ne 0$. A check of table
+2 shows that equations 27 and 28 have, respectively, the residuals of 
+$-0.137\times 10^-4$ and $-0.976\times 10^{-3}$. The same table also
+shows that $c_1\alpha_k$ is opposite in sign but nearly equal in
+magnitude to $c_2\beta_k$. Cancellations in the formation of the
+linear combination 24 causes a loss of significance of 2 to 6 figures
+in the computed $A_k$. In the second iteration, where a new set of
+$\beta_k$ is generated replacing $\beta_{14}$ and $\beta_{15}$,
+respectively, by $c_1\alpha_{14}+c_2\beta_{14}$ and 
+$c_1\alpha_{15}+c_2\beta_{15}$ of the first iteration, the new 
+$c_1\alpha_k$ and $c_2\beta_k$ differed from 2 to 5 orders of
+magnitude. Consequently, no cancellation of significant figures in the
+computation of $A_k$ occurred. Notice that equations 27 and 28 are now
+satisfied exactly. Further note that the new $c_1$ and $c_2$ are near
+zero and unity, respectively, for the reason that if equations 21, 22,
+and 23 are satisfied by equation 24 exactly in the first iteration,
+the new $c_1$ and $c_2$ should have the precise values zero and 1,
+respectively. The results of the third iteration show that the $A_k$
+of the second iteration are already accurate to eight decimal places,
+since the $A_k$ in the two iterations differ in less that 
+$0.5\times 10^{-8}$. Notice that for the third iteration, equations
+27 and 28 are also satisfied exactly and that $c_1=1$ and $c_2=0$
+(relative to 8 places of accuracy).
+
+\noindent
+{\bf Table 2}: Computation of Chebyshev Coefficients for $xe^{-x}Ei(x)$
+
+\hrule
+First iteration: $\alpha_{14}=8$, $\alpha_{15}=9$; $\beta_{14}=7$, 
+$\beta_{15}=8$
+\hrule
+\begin{tabular}{|r|r|r|r|}
+k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
+$A_k\hbox{\hskip 1cm}$\\
+&&&\\
+ 0 &  0.71690285E 03 & -0.71644773E 03 &  0.24551200E 01\\
+ 1 & -0.33302683E 03 &  0.33286440E 03 & -0.16243000E 00\\
+ 2 &  0.13469341E 03 & -0.13464845E 03 &  0.44960000E-01\\
+ 3 & -0.43211869E 02 &  0.43205127E 02 & -0.67420000E-02\\
+ 4 &  0.99929173E 01 & -0.99942238E 01 & -0.13065000E-02\\
+ 5 & -0.11670764E 01 &  0.11684574E 01 &  0.13810000E-02\\
+ 6 & -0.25552137E 00 &  0.25493635E 00 & -0.58502000E-02\\
+ 7 &  0.20617247E 00 & -0.20599754E 00 &  0.17493000E-03\\
+ 8 & -0.75797238E-01 &  0.75756767E-01 & -0.40471000E-04\\
+ 9 &  0.20550680E-01 & -0.20543463E-01 &  0.72170000E-05\\
+10 & -0.45192333E-02 &  0.45183721E-02 & -0.86120000E-06\\
+11 &  0.82656562E-03 & -0.82656589E-03 & -0.27000000E-09\\
+12 & -0.12333571E-03 &  0.12337366E-03 &  0.37950000E-07\\
+13 &  0.13300910E-04 & -0.13315328E-04 & -0.14418000E-07\\
+14 & -0.29699001E-06 &  0.30091136E-06 &  0.39213500E-08\\
+15 & -0.33941716E-06 &  0.33852528E-06 & -0.89188000E-09\\
+\end{tabular}\\
+\hbox{\hskip 3.0cm}$c_1=0.37613920E-07$\\
+\hbox{\hskip 3.0cm}$c_2=-0.42427144E-07$\\
+\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=-0.13700000E-04$\\
+\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=-0.97600000E-03$
+
+\hrule
+Second iteration: $\alpha_{14}=8$, $\alpha_{15}=9$; \\
+$\beta_{14}=0.39213500E-08$, $\beta_{15}=-0.89188000E-09$
+\hrule
+\begin{tabular}{|r|r|r|r|}
+k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
+$A_k\hbox{\hskip 1cm}$\\
+&&&\\
+ 0 &  0.36701576E-05 &  0.45512986E 00 &  0.24551335E 01\\
+ 1 & -0.17051695E-05 & -0.16243666E 00 & -0.16243837E 00\\
+ 2 &  0.68976566E-06 &  0.44956834E-01 &  0.44957523E-01\\
+ 3 & -0.22132756E-06 & -0.67413538E-02 & -0.67415751E-02\\
+ 4 &  0.51197561E-07 & -0.13067496E-02 & -0.13066984E-02\\
+ 5 & -0.59856744E-08 &  0.13810895E-02 &  0.13810835E-02\\
+ 6 & -0.13059663E-08 & -0.58502164E-03 & -0.58502294E-03\\
+ 7 &  0.10552667E-08 &  0.17492889E-03 &  0.17492994E-03\\
+ 8 & -0.38808033E-09 & -0.40472426E-04 & -0.40472814E-04\\
+ 9 &  0.10523831E-09 &  0.72169965E-05 &  0.72171017E-05\\
+10 & -0.23146333E-10 & -0.86125438E-06 & -0.86127752E-06\\
+11 &  0.42342615E-11 & -0.25542252E-09 & -0.25118825E-09\\
+12 & -0.63200810E-12 &  0.37946968E-07 &  0.37946336E-07\\
+13 &  0.68210630E-13 & -0.14417584E-07 & -0.14417516E-07\\
+14 & -0.15414832E-14 &  0.39212981E-08 &  0.39212965E-08\\
+15 & -0.17341686E-14 & -0.89186818E-09 & -0.89186991E-09\\
+\end{tabular}\\
+\hbox{\hskip 3.0cm}$c_1=-0.19268540E-15$\\
+\hbox{\hskip 3.0cm}$c_2=0.99998675E\ 00$\\
+\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=0.0$\\
+\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=0.0$
+
+\noindent
+{\bf Table 2}: Computation of Chebyshev Coefficients for
+$xe^{-x}Ei(x)$ - Concluded\\
+\hbox{\hskip 0.5cm}$[4 \le x \le 12 with M=15; \gamma_0=2, \gamma_k=0
+\textrm{for\ }k=1(1)15]$
+
+\hrule
+Third iteration: $\alpha_{14}=8$, $\alpha_{15}=9$;\\ 
+\hbox{\hskip 0.5cm}$\beta_{14}=0.39212965E-08$, $\beta_{15}=-0.89186991E-09$
+\hrule
+\begin{tabular}{|r|r|r|r|}
+k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
+$A_k\hbox{\hskip 1cm}$\\
+&&&\\
+ 0 & -0.23083059E-07 &  0.45513355E 00 &  0.24551335E 01\\
+ 1 &  0.10724479E-07 & -0.16243838E 00 & -0.16243837E 00\\
+ 2 & -0.43382065E-08 &  0.44957526E-01 &  0.44957522E-01\\
+ 3 &  0.13920157E-08 & -0.67415759E-02 & -0.67415745E-02\\
+ 4 & -0.32200152E-09 & -0.13066983E-02 & -0.13066986E-02\\
+ 5 &  0.37646251E-10 &  0.13810835E-02 &  0.13810836E-02\\
+ 6 &  0.82137336E-11 & -0.58502297E-03 & -0.58502296E-03\\
+ 7 & -0.66369857E-11 &  0.17492995E-03 &  0.17492994E-03\\
+ 8 &  0.24407892E-11 & -0.40472817E-04 & -0.40472814E-04\\
+ 9 & -0.66188494E-12 &  0.72171023E-05 &  0.72171017E-05\\
+10 &  0.14557636E-12 & -0.86127766E-06 & -0.86127751E-06\\
+11 & -0.26630930E-13 & -0.25116620E-09 & -0.25119283E-09\\
+12 &  0.39749465E-14 &  0.37946334E-07 &  0.37946337E-07\\
+13 & -0.42900337E-15 & -0.14417516E-07 & -0.14417516E-07\\
+14 &  0.96949915E-17 &  0.39212966E-08 &  0.39212966E-08\\
+15 &  0.10906865E-16 & -0.89186992E-09 & -0.89186990E-09\\
+\end{tabular}\\
+\hbox{\hskip 3.0cm}$c_1=0.12118739E-17$\\
+\hbox{\hskip 3.0cm}$c_2=0.10000000E\ 01$\\
+\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=0.0$\\
+\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=0.0$\\
+\hrule
+
+It is worth noting that the coefficient matrix of system (21,22,23)
+yields an upper triangular matrix of order $M-1$ after the deletion of
+the first two rows and the last two columns. Consequently, the
+procedure of this section is applicable to any linear system having
+this property. As a matter of fact, the same procedure can be
+generalized to solve linear systems having coefficient matrices of
+order N, the deletion of whose first $r$ ($r < N$) rows and last $r$
+columns yields upper triangular matrices of order $N-r$.
+
+\subsection{The Function $(1/x)[Ei(x)-log\vert x\vert-\gamma]$}
+
+Let
+\begin{equation}
+f(x)=(1/x)[Ei(x)-log\vert x\vert-\gamma],\quad g(x)=e^x,\quad
+\vert x\vert \le b
+\end{equation}
+These functions, with the change of variable $x=bt$, simultaneously
+satisfy the differential equations
+\begin{equation}
+bt^2\phi^{'}(t)+bt\phi(t)-\psi(t)=-1
+\end{equation}
+\begin{equation}
+\psi^{'}(t)-b\psi(t)=0,\quad -1 \le t \le 1
+\end{equation}
+Conversely,\footnote{The general solution of the differential
+equations has the form
+$$
+\phi(t)=(c_1/t)+[Ei(bt)-log\vert bt\vert-\gamma]/bt
+$$
+$$
+\psi(t)=c_2e^{bt}
+$$
+where the first and second terms of $\phi(t)$ are, respectively, the
+complementary solution and a particular integral of equation 30. The
+requirement that $\phi(t)$ is bounded makes the constant $c_1=0$. The
+fact that $\psi(0)=1$ is implicit in equation 30.} any solution of
+equations 30 and 31 is equal to the functions given by equations 29
+for the change of variable $x=bt$. Therefore, boundary conditions need
+not be imposed for the solution of the differential equations.
+
+A procedure similar to that of the previous section gives the coupled
+infinite recurrence relations
+\begin{equation}
+bA_1+bA_3-B_0+B_2=-2
+\end{equation}
+\begin{equation}
+\left.
+\begin{array}{c}
+kbA_{k-1}+2(k+1)bA_{k+1}+(k+2)bA_{k+3}-2B_k+2B_{k+2}=0\\
+\\
+bB_{k-1}-2kB_k-bB_{k+1}=0,\quad k=1,2,\ldots
+\end{array}
+\right\}
+\end{equation}
+where $A_k$ and $B_k$ are the Chebyshev coefficients of $\phi(t)$ and
+$\psi(t)$, respectively.
+
+Consider first the subsystem 33. If $A_k=\alpha_k$ and $B_k=\beta_k$
+are a simultaneous solution of the system, which is homogeneous, then
+\begin{equation}
+\left.
+\begin{array}{l}
+\hbox{\hskip 4cm}A_k=c\alpha_k\\
+\textrm{and}\\
+\hbox{\hskip 4cm}B_k=c\beta_k\\
+\end{array}
+\right\}
+\end{equation}
+are also a solution for an arbitrary constant $c$. Thus based on
+considerations analogous to the solution of equations 21, 22, and 23,
+one can initiate an approximate solution of equations 32 and 33 by
+setting 
+\begin{equation}
+\left.
+\begin{array}{l}
+\alpha_M=0,\quad\alpha_k=0\quad\textrm{for }k \ge M+1\\
+\\
+\beta_M=1,\quad\beta_k=0\quad\textrm{for }k \ge M+1
+\end{array}
+\right\}
+\end{equation}
+and then determining $\alpha_k$ and $\beta_k$ ($k=M-1, M-2, \ldots,
+0$) by backward recurrence by means of equation 33. The arbitrary
+constant $c$ is determined by substituting 34 into 32.
+
+\subsection{The Function $xe^{-x}Ei(x)$ on the Infinite Interval}
+Let
+\begin{equation}
+f(x)=xe^{-x}Ei(x),\quad -\infty < x \le b < 0,\quad or 0 < b \le x < \infty
+\end{equation}
+By making the change of variables,
+\begin{equation}
+x=2b/(t+1)
+\end{equation}
+we can easily demonstrate that
+\begin{equation}
+f(x)=f[2b/(t+1)]=\phi(t)
+\end{equation}
+satisfies the differential equation
+\begin{equation}
+(t+1)^2\phi^{'}(t)+(t+1-2b)\phi(t)=-2b
+\end{equation}
+with
+\begin{equation}
+\phi(1)=be^{-b}Ei(b)
+\end{equation}
+An infinite system of equations involving the Chebyshev coefficients
+$A_k$ of $\phi(t)$ is deducible from equations 39 and 40 by the same
+procedure as applied to equations 13 and 14 to obtain the infinite
+system 20; it is given as follows.
+\begin{equation}
+\sum_{k=0}^\infty\ ^{'}A_k=\phi(1)=be^{-b}Ei(b)
+\end{equation}
+\begin{equation}
+(1-2b)A_0+3A_1+(3+2b)A_2+A_3=-4b
+\end{equation}
+\begin{equation}
+\begin{array}{l}
+kA_{k-1}+2[(2k+1)-2b]A_k+6(k+1)A_{k+1}+2(2k+3+2b)A_{k+2}\\
+\hbox{\hskip 4.0cm}+(k+2)A_{k+3}=0,\quad k=1,2,\ldots
+\end{array}
+\end{equation}
+As in the case of equations 21, 22 and 23, the solution of 41, 42 and
+43 can be assumed to be
+\begin{equation}
+A_k=c_1\alpha_k+c_2\beta_k
+\end{equation}
+with $A_k$ vanishing for a $k \ge M$. Thus, we can set, say
+\begin{equation}
+\left.
+\begin{array}{ccc}
+\alpha_{M-1}=0 & , & \alpha_M=1\\
+\beta_{M-1}=1  & , & \beta_M=0
+\end{array}
+\right\}
+\end{equation}
+and determine the trial solutions $\alpha_k$ and $\beta_k$ 
+(k=M-1,M-2,$\ldots$,0) by means of equation 43 by backward
+recurrence. The required solution of equations 41,42,adn 43 is then
+determined by substituting equation 44 in equations 41 and 42 and
+solving the resulting equations for $c_1$ and $c_2$.
+
+Loss of accuracy in the computation of $A_k$ can also occur here, as
+in the solution of equations 21, 22 and 23, if the trial solutions are
+not sufficiently independent. The process used to improve the accuracy
+of $A_k$ of the system 21, 22 and 23 can also be applied here.
+
+For efficiency in computation, it is worth noting that for $b < 0$
+($-\infty < x \le b < 0$) the boundary condition 40 is not required
+for the solution of equation 39 and 40. This follows from the fact
+that any solution\footnote{The general solution of the differential
+equation 39. Since equation 39 has no bounded complementary solution
+for $-\infty < x \le b < 0$, every solution of it is equal to the
+particular integral $xe^{-x}Ei(x)$. On the other hand, a solution of
+equation 39 for $0 < x \le b < \infty$ would, in general, involve the
+complementary function. Hence, boundary condition 40 is required to
+guarantee that the solution of equation 39 is equal to
+$xe^{-x}Ei(x)$.} of the differential equation 39 is equal to 
+$xe^{-x}Ei(x)$ ($x=2b/(t+1)$). Hence the $A_k$ of $xe^{-x}Ei(x)$ for 
+$-\infty < x \le b < 0$ can be obtained without the use of equation
+39 and can be assumed to have the form
+\begin{equation}
+A_k = c\alpha_k,\quad(k=0,1,\ldots,M)
+\end{equation}
+The M+1 values of $\alpha_k$ can be generated by setting $\alpha_M=1$
+and computing $\alpha_k$ (k=0,1,$\ldots$,M-1) by means of equation
+43 by backward recurrence. The substitution of equation 46 into 42
+then enables one to determine $c$ from the resulting equation.
+
+\subsection{Remarks on Convergence and Accuracy}
+
+The Chebyshev coefficients of table 3 were computed on the IBM 7094
+with 50-digit normalized floating-point arithmetic. In order to assure
+that the sequence of approximate solutions (see Discusion) converged
+to the limiting solution of the differential equation in question, a
+trial M was incremented by 4 until the approximate Chebyshev
+coefficients showed no change greter than or equal to 
+$0.5\times 10^{-35}$. Hence the maximum error is bounded by
+\begin{equation}
+0.5(M+1)\times 10^{-35}+\sum_{M+1}^\infty{\vert A_k\vert}
+\end{equation}
+where the first term is the maximum error of the M+1 approximate
+Chebyshev coefficients, and the sum is the maximum error of the
+truncated Chebyshev series of M+1 terms. If the Chebyshev series is
+rapidly convergent, the maximum error of the approximate Chebyshev
+series should be of the order of $10^{-30}$. The coefficients of table
+3 have been rounded to 30 digits, and higher terms for $k > N$ giving
+the maximum residual
+\begin{equation}
+\sum_{k=N+1}^M{\vert A_k\vert} < 0.5\times 10^{-30}
+\end{equation}
+have been dropped. This should allow for evaluation of the relevant
+function that is accurate to 30 decimal places. Since the range of
+values of each function is bounded between 2/5 and 5, the evaluated
+function should be good to 30 significant digits. Taylor series
+evaluation also checks with that of the function values of table 4
+(computed with 30-digit floating-point arithmetic using the
+coefficients of table 3) for at least 28-1/2 significant
+digits. Evaluation of Ei(x) using the coefficients of table 3 also
+checked with Murnaghan and Wrench \cite{14} for 28-1/2 significant
+figures. 
+
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients}
+(a)
+$$
+xe^{-x}Ei(x)=\sum_{k-0}^{40}\ {'}{A_kT_k(t)},\ \ t=(-20/x)-1,\ \ 
+(-\infty < x \le -10)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.1912173225 8605534539 1519326510E 01\\
+ 1 & -0.4208355052 8684843755 0974986680E-01\\
+ 2 &  0.1722819627 2843267833 7118157835E-02\\
+ 3 & -0.9915782173 4445636455 9842322973E-04\\
+ 4 &  0.7176093168 0227750526 5590665592E-05\\
+ 5 & -0.6152733145 0951269682 7956791331E-06\\
+ 6 &  0.6024857106 5627583129 3999701610E-07\\
+ 7 & -0.6573848845 2883048229 5894189637E-08\\
+ 8 &  0.7853167541 8323998199 4810079871E-09\\
+ 9 & -0.1013730288 0038789855 4202774257E-09\\
+10 &  0.1399770413 2267686027 7823488623E-10\\
+11 & -0.2051008376 7838189961 8962318711E-11\\
+12 &  0.3168388726 0024778181 4907985818E-12\\
+13 & -0.5132760082 8391806541 5984751899E-13\\
+14 &  0.8680933040 7665493418 7433687383E-14\\
+15 & -0.1527015040 9030849719 8572355351E-14\\
+16 &  0.2784686251 6493573965 0105251453E-15\\
+17 & -0.5249890437 4217669680 8472933696E-16\\
+18 &  0.1020717991 2485612924 7455787226E-16\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+19 & -0.2042264679 8997184130 8462421876E-17\\
+20 &  0.4197064172 7264847440 8827228562E-18\\
+21 & -0.8844508176 1728105081 6483737536E-19\\
+22 &  0.1908272629 5947174199 5060168262E-19\\
+23 & -0.4209746222 9351995033 6450865676E-20\\
+24 &  0.9483904058 1983732764 1500214512E-21\\
+25 & -0.2179467860 1366743199 4032574014E-21\\
+26 &  0.5103936869 0714509499 3452562741E-22\\
+27 & -0.1216883113 3344150908 9746779693E-22\\
+28 &  0.2951289166 4478751929 4773757144E-23\\
+29 & -0.7275353763 7728468971 4438950920E-24\\
+30 &  0.1821639048 6230739612 1667115976E-24\\
+31 & -0.4629629963 1633171661 2753482064E-25\\
+32 &  0.1193539790 9715779152 3052371292E-25\\
+33 & -0.3119493285 2201424493 1062147473E-26\\
+34 &  0.8261419734 5334664228 4170028518E-27\\
+35 & -0.2215803373 6609829830 2591177697E-27\\
+36 &  0.6016031671 6542638904 5303124429E-28\\
+37 & -0.1652725098 3821265964 9744302314E-28\\
+38 &  0.4592230358 7730270279 5636377166E-29\\
+39 & -0.1290062767 2132638473 7453212670E-29\\
+40 &  0.3662718481 0320025908 1177078922E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei1(y:OPR):OPR ==
+          infinite? y => 1
+          x:R:=retract(y)
+          t:R:=acos((-20.0::R/x)-1.0::R)::R
+          t01:=    0.191217322586055345391519326510E1::R*cos(0.0::R)/2.0::R
+          t02:=t01-0.420835505286848437550974986680E-01::R*cos(t::R)::R
+          t03:=t02+0.172281962728432678337118157835E-02::R*cos( 2.0::R*t)
+          t04:=t03-0.991578217344456364559842322973E-04::R*cos( 3.0::R*t)
+          t05:=t04+0.717609316802277505265590665592E-05::R*cos( 4.0::R*t)
+          t06:=t05-0.615273314509512696827956791331E-06::R*cos( 5.0::R*t)
+          t07:=t06+0.602485710656275831293999701610E-07::R*cos( 6.0::R*t)
+          t08:=t07-0.657384884528830482295894189637E-08::R*cos( 7.0::R*t)
+          t09:=t08+0.785316754183239981994810079871E-09::R*cos( 8.0::R*t)
+          t10:=t09-0.101373028800387898554202774257E-09::R*cos( 9.0::R*t)
+          t11:=t10+0.139977041322676860277823488623E-10::R*cos(10.0::R*t)
+          t12:=t11-0.205100837678381899618962318711E-11::R*cos(11.0::R*t)
+          t13:=t12+0.316838872600247781814907985818E-12::R*cos(12.0::R*t)
+          t14:=t13-0.513276008283918065415984751899E-13::R*cos(13.0::R*t)
+          t15:=t14+0.868093304076654934187433687383E-14::R*cos(14.0::R*t)
+          t16:=t15-0.152701504090308497198572355351E-14::R*cos(15.0::R*t)
+          t17:=t16+0.278468625164935739650105251453E-15::R*cos(16.0::R*t)
+          t18:=t17-0.524989043742176696808472933696E-16::R*cos(17.0::R*t)
+          t19:=t18+0.102071799124856129247455787226E-16::R*cos(18.0::R*t)
+          t20:=t19-0.204226467989971841308462421876E-17::R*cos(19.0::R*t)
+          t21:=t20+0.419706417272648474408827228562E-18::R*cos(20.0::R*t)
+          t22:=t21-0.884450817617281050816483737536E-19::R*cos(21.0::R*t)
+          t23:=t22+0.190827262959471741995060168262E-19::R*cos(22.0::R*t)
+          t24:=t23-0.420974622293519950336450865676E-20::R*cos(23.0::R*t)
+          t25:=t24+0.948390405819837327641500214512E-21::R*cos(24.0::R*t)
+          t26:=t25-0.217946786013667431994032574014E-21::R*cos(25.0::R*t)
+          t27:=t26+0.510393686907145094993452562741E-22::R*cos(26.0::R*t)
+          t28:=t27-0.121688311333441509089746779693E-22::R*cos(27.0::R*t)
+          t29:=t28+0.295128916644787519294773757144E-23::R*cos(28.0::R*t)
+          t30:=t29-0.727535376377284689714438950920E-24::R*cos(29.0::R*t)
+          t31:=t30+0.182163904862307396121667115976E-24::R*cos(30.0::R*t)
+          t32:=t31-0.462962996316331716612753482064E-25::R*cos(31.0::R*t)
+          t33:=t32+0.119353979097157791523052371292E-25::R*cos(32.0::R*t)
+          t34:=t33-0.311949328522014244931062147473E-26::R*cos(33.0::R*t)
+          t35:=t34+0.826141973453346642284170028518E-27::R*cos(34.0::R*t)
+          t36:=t35-0.221580337366098298302591177697E-27::R*cos(35.0::R*t)
+          t37:=t36+0.601603167165426389045303124429E-28::R*cos(36.0::R*t)
+          t38:=t37-0.165272509838212659649744302314E-28::R*cos(37.0::R*t)
+          t39:=t38+0.459223035877302702795636377166E-29::R*cos(38.0::R*t)
+          t40:=t39-0.129006276721326384737453212670E-29::R*cos(39.0::R*t)
+          t41:=t40+0.366271848103200259081177078922E-30::R*cos(40.0::R*t)
+          t41::OPR
+
+@
+
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(b)
+$$
+xe^{-x}Ei(x)=\sum_{k-0}^{40}\ {'}{A_kT_k(t)},\ \ t=(x+7)/3,\ \ 
+(-10 \le x \le -4)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.1757556496 0612937384 8762834691E 011\\
+ 1 & -0.4358541517 7361661170 5001867964E-01\\
+ 2 & -0.7979507139 5584254013 3217027492E-02\\
+ 3 & -0.1484372327 3037121385 0970210001E-02\\
+ 4 & -0.2800301984 3775145748 6203954948E-03\\
+ 5 & -0.5348648512 8657932303 9177361553E-04\\
+ 6 & -0.1032867243 5735548661 0233266460E-04\\
+ 7 & -0.2014083313 0055368773 2226198639E-05\\
+ 8 & -0.3961758434 2738664582 2338443500E-06\\
+ 9 & -0.7853872767 0966316306 7607656069E-07\\
+10 & -0.1567925981 0074698262 4616270279E-07\\
+11 & -0.3150055939 3763998825 0007372851E-08\\
+12 & -0.6365096822 5242037304 0380263972E-09\\
+13 & -0.1292888113 2805631835 6593121259E-09\\
+14 & -0.2638690999 6592557613 2149942808E-10\\
+15 & -0.5408958287 0450687349 1922207896E-11\\
+16 & -0.1113222784 6010898999 7676692708E-11\\
+17 & -0.2299624726 0744624618 4338864145E-12\\
+18 & -0.4766682389 4951902622 3913482091E-13\\
+19 & -0.9911756747 3352709450 6246643371E-14\\
+20 & -0.2067103580 4957072400 0900805021E-14\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+21 & -0.4322776783 3833850564 5764394579E-15\\
+22 & -0.9063014799 6650172551 4905603356E-16\\
+23 & -0.1904669979 5816613974 4015963342E-16\\
+24 & -0.4011792326 3502786634 6744227520E-17\\
+25 & -0.8467772130 0168322313 4166334685E-18\\
+26 & -0.1790842733 6586966555 5826492204E-18\\
+27 & -0.3794490638 1714782440 1106175166E-19\\
+28 & -0.8053999236 7982798526 0999654058E-20\\
+29 & -0.1712339011 2362012974 3228671244E-20\\
+30 & -0.3646274058 7749686208 6576562816E-21\\
+31 & -0.7775969638 8939479435 3098157647E-22\\
+32 & -0.1660628498 4484020566 2531950966E-22\\
+33 & -0.3551178625 7882509300 5927145352E-23\\
+34 & -0.7603722685 9413580929 5734653294E-24\\
+35 & -0.1630074137 2584900288 9638374755E-24\\
+36 & -0.3498575202 7286322350 7538497255E-25\\
+37 & -0.7517179627 8900988246 0645145143E-26\\
+38 & -0.1616877440 0527227629 8777317918E-26\\
+39 & -0.3481270085 7247569174 8202271565E-27\\
+40 & -0.7502707775 5024654701 0642233720E-28\\
+41 & -0.1618454364 4959102680 7612330206E-28\\
+42 & -0.3494366771 7051616674 9482836452E-29\\
+43 & -0.7551036906 1261678585 6037026797E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei2(y:OPR):OPR ==
+          x:R:=retract(y)
+          t:R:=acos((x+7.0::R)/3.0::R)::R
+          t01:=    0.175755649606129373848762834691E1::R*cos(0.0::R)/2.0::R
+          t02:=t01-0.435854151773616611705001867964E-01::R*cos(t)
+          t03:=t02-0.797950713955842540133217027492E-02::R*cos( 2.0::R*t)
+          t04:=t03-0.148437232730371213850970210001E-02::R*cos( 3.0::R*t)
+          t05:=t04-0.280030198437751457486203954948E-03::R*cos( 4.0::R*t)
+          t06:=t05-0.534864851286579323039177361553E-04::R*cos( 5.0::R*t)
+          t07:=t06-0.103286724357355486610233266460E-04::R*cos( 6.0::R*t)
+          t08:=t07-0.201408331300553687732226198639E-05::R*cos( 7.0::R*t)
+          t09:=t08-0.396175843427386645822338443500E-06::R*cos( 8.0::R*t)
+          t10:=t09-0.785387276709663163067607656069E-07::R*cos( 9.0::R*t)
+          t11:=t10-0.156792598100746982624616270279E-07::R*cos(10.0::R*t)
+          t12:=t11-0.315005593937639988250007372851E-08::R*cos(11.0::R*t)
+          t13:=t12-0.636509682252420373040380263972E-09::R*cos(12.0::R*t)
+          t14:=t13-0.129288811328056318356593121259E-09::R*cos(13.0::R*t)
+          t15:=t14-0.263869099965925576132149942808E-10::R*cos(14.0::R*t)
+          t16:=t15-0.540895828704506873491922207896E-11::R*cos(15.0::R*t)
+          t17:=t16-0.111322278460108989997676692708E-11::R*cos(16.0::R*t)
+          t18:=t17-0.229962472607446246184338864145E-12::R*cos(17.0::R*t)
+          t19:=t18-0.476668238949519026223913482091E-13::R*cos(18.0::R*t)
+          t20:=t19-0.991175674733527094506246643371E-14::R*cos(19.0::R*t)
+          t21:=t20-0.206710358049570724000900805021E-14::R*cos(20.0::R*t)
+          t22:=t21-0.432277678338338505645764394579E-15::R*cos(21.0::R*t)
+          t23:=t22-0.906301479966501725514905603356E-16::R*cos(22.0::R*t)
+          t24:=t23-0.190466997958166139744015963342E-16::R*cos(23.0::R*t)
+          t25:=t24-0.401179232635027866346744227520E-17::R*cos(24.0::R*t)
+          t26:=t25-0.846777213001683223134166334685E-18::R*cos(25.0::R*t)
+          t27:=t26-0.179084273365869665555826492204E-18::R*cos(26.0::R*t)
+          t28:=t27-0.379449063817147824401106175166E-19::R*cos(27.0::R*t)
+          t29:=t28-0.805399923679827985260999654058E-20::R*cos(28.0::R*t)
+          t30:=t29-0.171233901123620129743228671244E-20::R*cos(29.0::R*t)
+          t31:=t30-0.364627405877496862086576562816E-21::R*cos(30.0::R*t)
+          t32:=t31-0.777596963889394794353098157647E-22::R*cos(31.0::R*t)
+          t33:=t32-0.166062849844840205662531950966E-22::R*cos(32.0::R*t)
+          t34:=t33-0.355117862578825093005927145352E-23::R*cos(33.0::R*t)
+          t35:=t34-0.760372268594135809295734653294E-24::R*cos(34.0::R*t)
+          t36:=t35-0.163007413725849002889638374755E-24::R*cos(35.0::R*t)
+          t37:=t36-0.349857520272863223507538497255E-25::R*cos(36.0::R*t)
+          t38:=t37-0.751717962789009882460645145143E-26::R*cos(37.0::R*t)
+          t39:=t38-0.161687744005272276298777317918E-26::R*cos(38.0::R*t)
+          t40:=t39-0.348127008572475691748202271565E-27::R*cos(39.0::R*t)
+          t41:=t40-0.750270777550246547010642233720E-28::R*cos(40.0::R*t)
+          t42:=t41-0.161845436449591026807612330206E-28::R*cos(41.0::R*t)
+          t43:=t42-0.349436677170516166749482836452E-29::R*cos(42.0::R*t)
+          t44:=t43-0.755103690612616785856037026797E-30::R*cos(43.0::R*t)
+          t44::OPR
+
+@
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(c)
+$$
+[Ei-log\vert x\vert-\gamma]/x=
+\sum_{k-0}^{33}\ {'}{A_kT_k(t)},\ \ t=x/4,\ \ 
+(-4 \le x \le 4)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 & 0.3293700103 7673912939 3905231421E 01\\
+ 1 & 0.1679835052 3713029156 5505796064E 01\\
+ 2 & 0.7220436105 6787543524 0299679644E 00\\
+ 3 & 0.2600312360 5480956171 3740181192E 00\\
+ 4 & 0.8010494308 1737502239 4742889237E-01\\
+ 5 & 0.2151403663 9763337548 0552483005E-01\\
+ 6 & 0.5116207789 9303312062 1968910894E-02\\
+ 7 & 0.1090932861 0073913560 5066199014E-02\\
+ 8 & 0.2107415320 2393891631 8348675226E-03\\
+ 9 & 0.3719904516 6518885709 5940815956E-04\\
+10 & 0.6043491637 1238787570 4767032866E-05\\
+11 & 0.9092954273 9626095264 9596541772E-06\\
+12 & 0.1273805160 6592647886 5567184969E-06\\
+13 & 0.1669185748 4109890739 0896143814E-07\\
+14 & 0.2054417026 4010479254 7612484551E-08\\
+15 & 0.2383584444 4668176591 4052321417E-09\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+16 & 0.2615386378 8854429666 9068664148E-10\\
+17 & 0.2721858622 8541670644 6550268995E-11\\
+18 & 0.2693750031 9835792992 5326427442E-12\\
+19 & 0.2541220946 7072635546 7884089307E-13\\
+20 & 0.2290130406 8650370941 8510620516E-14\\
+21 & 0.1975465739 0746229940 1057650412E-15\\
+22 & 0.1634024551 9289317406 8635419984E-16\\
+23 & 0.1298235437 0796376099 1961293204E-17\\
+24 & 0.9922587925 0737105964 4632581302E-19\\
+25 & 0.7306252806 7221032944 7230880087E-20\\
+26 & 0.5189676834 6043451272 0780080019E-21\\
+27 & 0.3560409454 0997068112 8043162227E-22\\
+28 & 0.2361979432 5793864237 0187203948E-23\\
+29 & 0.1516837767 7214529754 9624516819E-24\\
+30 & 0.9439089722 2448744292 5310405245E-26\\
+31 & 0.5697227559 5036921198 9581737831E-27\\
+32 & 0.3338333627 7954330315 6597939562E-28\\
+33 & 0.1900626012 8161914852 6680482237E-29\\
+\end{tabular}
+
+\noindent
+($\gamma$=0.5772156649\ 0153286060\ 6512090082\ E\ 00)
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei3(y:OPR):OPR ==
+          x:R:=retract(y)
+          x = 0.0::R => 1
+          t:R:=acos(x/4.0::R)::R
+          t01:=    0.329370010376739129393905231421E1::R*cos(0.0::R)/2.0::R
+          t02:=t01+0.167983505237130291565505796064E1::R*cos(t)
+          t03:=t02+0.722043610567875435240299679644E0::R*cos( 2.0::R*t)
+          t04:=t03+0.260031236054809561713740181192E0::R*cos( 3.0::R*t)
+          t05:=t04+0.801049430817375022394742889237E-01::R*cos( 4.0::R*t)
+          t06:=t05+0.215140366397633375480552483005E-01::R*cos( 5.0::R*t)
+          t07:=t06+0.511620778993033120621968910894E-02::R*cos( 6.0::R*t)
+          t08:=t07+0.109093286100739135605066199014E-02::R*cos( 7.0::R*t)
+          t09:=t08+0.210741532023938916318348675226E-03::R*cos( 8.0::R*t)
+          t10:=t09+0.371990451665188857095940815956E-04::R*cos( 9.0::R*t)
+          t11:=t10+0.604349163712387875704767032866E-05::R*cos(10.0::R*t)
+          t12:=t11+0.909295427396260952649596541772E-06::R*cos(11.0::R*t)
+          t13:=t12+0.127380516065926478865567184969E-06::R*cos(12.0::R*t)
+          t14:=t13+0.166918574841098907390896143814E-07::R*cos(13.0::R*t)
+          t15:=t14+0.205441702640104792547612484551E-08::R*cos(14.0::R*t)
+          t16:=t15+0.238358444446681765914052321417E-09::R*cos(15.0::R*t)
+          t17:=t16+0.261538637888544296669068664148E-10::R*cos(16.0::R*t)
+          t18:=t17+0.272185862285416706446550268995E-11::R*cos(17.0::R*t)
+          t19:=t18+0.269375003198357929925326427442E-12::R*cos(18.0::R*t)
+          t20:=t19+0.254122094670726355467884089307E-13::R*cos(19.0::R*t)
+          t21:=t20+0.229013040686503709418510620516E-14::R*cos(20.0::R*t)
+          t22:=t21+0.197546573907462299401057650412E-15::R*cos(21.0::R*t)
+          t23:=t22+0.163402455192893174068635419984E-16::R*cos(22.0::R*t)
+          t24:=t23+0.129823543707963760991961293204E-17::R*cos(23.0::R*t)
+          t25:=t24+0.992258792507371059644632581302E-19::R*cos(24.0::R*t)
+          t26:=t25+0.730625280672210329447230880087E-20::R*cos(25.0::R*t)
+          t27:=t26+0.518967683460434512720780080019E-21::R*cos(26.0::R*t)
+          t28:=t27+0.356040945409970681128043162227E-22::R*cos(27.0::R*t)
+          t29:=t28+0.236197943257938642370187203948E-23::R*cos(28.0::R*t)
+          t30:=t29+0.151683776772145297549624516819E-24::R*cos(29.0::R*t)
+          t31:=t30+0.943908972224487442925310405245E-26::R*cos(30.0::R*t)
+          t32:=t31+0.569722755950369211989581737831E-27::R*cos(31.0::R*t)
+          t33:=t32+0.333833362779543303156597939562E-28::R*cos(32.0::R*t)
+          t34:=t33+0.190062601281619148526680482237E-29::R*cos(33.0::R*t)
+          t34::OPR
+
+@
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(d) 
+$$
+xe^{-x}Ei(x)=\sum_{k-0}^{49}\ {'}{A_kT_k(t)},\ \ t=(x-8)/4,\ \ 
+(4 \le x \le 12)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.2455133538 7812952867 3420457043E 01\\
+ 1 & -0.1624383791 3037652439 6002276856E 00\\
+ 2 &  0.4495753080 9357264148 0785417193E-01\\
+ 3 & -0.6741578679 9892299884 8718835050E-02\\
+ 4 & -0.1306697142 8032942805 1599341387E-02\\
+ 5 &  0.1381083146 0007257602 0202089820E-02\\
+ 6 & -0.5850228790 1596579868 7368242394E-03\\
+ 7 &  0.1749299341 0789197003 8740976432E-03\\
+ 8 & -0.4047281499 0529303552 2869333800E-04\\
+ 9 &  0.7217102412 1709975003 5752600049E-05\\
+10 & -0.8612776970 1986775241 4815450193E-06\\
+11 & -0.2514475296 5322559777 9084739054E-09 \\
+12 &  0.3794747138 2014951081 4074505574E-07\\
+13 & -0.1442117969 5211980616 0265640172E-07\\
+14 &  0.3935049295 9761013108 7190848042E-08\\
+15 & -0.9284689401 0633175304 7289210353E-09\\
+16 &  0.2031789568 0065461336 6090995698E-09\\
+17 & -0.4292498504 9923683142 7918026902E-10\\
+18 &  0.8992647177 7812393526 8001544182E-11\\
+19 & -0.1900869118 4121097524 2396635722E-11\\
+20 &  0.4092198912 2237383452 6121178338E-12\\
+21 & -0.8999253437 2931901982 5435824585E-13\\
+22 &  0.2019654670 8242638335 4948543451E-13\\
+23 & -0.4612930261 3830820719 4950531726E-14\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+24 &  0.1069023072 9386369566 8857256409E-14\\
+25 & -0.2507030070 5700729569 2572254042E-15\\
+26 &  0.5937322503 7915516070 6073763509E-16\\
+27 & -0.1417734582 4376625234 4732005648E-16\\
+28 &  0.3409203754 3608089342 6806402093E-17\\
+29 & -0.8248290269 5054937928 8702529656E-18\\
+30 &  0.2006369712 6214423139 8824095937E-18\\
+31 & -0.4903851667 9674222440 3498152027E-19\\
+32 &  0.1203734482 3483321716 6664609324E-19\\
+33 & -0.2966282447 1413682538 1453572575E-20\\
+34 &  0.7335512384 2880759924 2142328436E-21\\
+35 & -0.1819924142 9085112734 4263485604E-21\\
+36 &  0.4528629374 2957606021 7359526404E-22\\
+37 & -0.1129980043 7506096133 8906717853E-22\\
+38 &  0.2826681251 2901165692 3764408445E-23\\
+39 & -0.7087717977 1690496166 6732640699E-24\\
+40 &  0.1781104524 0187095153 4401530034E-24\\
+41 & -0.4485004076 6189635731 2006142358E-25\\
+42 &  0.1131540292 5754766224 5053090840E-25\\
+43 & -0.2859957899 7793216379 0414326136E-26\\
+44 &  0.7240775806 9226736175 8172726753E-27\\
+45 & -0.1836132234 1257789805 0666710105E-27\\
+46 &  0.4663128735 2273048658 2600122073E-28\\
+47 & -0.1185959588 9190288794 6724005478E-28\\
+48 &  0.3020290590 5567131073 1137614875E-29\\
+49 & -0.7701650548 1663660609 8827057102E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei4(y:OPR):OPR ==
+          x:R:=retract(y)
+          t:R:=acos((x-8.0::R)/4.0::R)::R
+          t01:=    0.245513353878129528673420457043E1::R*cos(0.0::R)/2.0::R
+          t02:=t01-0.162438379130376524396002276856E0::R*cos(t)
+          t03:=t02+0.449575308093572641480785417193E-01::R*cos( 2.0::R*t)
+          t04:=t03-0.674157867998922998848718835050E-02::R*cos( 3.0::R*t)
+          t05:=t04-0.130669714280329428051599341387E-02::R*cos( 4.0::R*t)
+          t06:=t05+0.138108314600072576020202089820E-02::R*cos( 5.0::R*t)
+          t07:=t06-0.585022879015965798687368242394E-03::R*cos( 6.0::R*t)
+          t08:=t07+0.174929934107891970038740976432E-03::R*cos( 7.0::R*t)
+          t09:=t08-0.404728149905293035522869333800E-04::R*cos( 8.0::R*t)
+          t10:=t09+0.721710241217099750035752600049E-05::R*cos( 9.0::R*t)
+          t11:=t10-0.861277697019867752414815450193E-06::R*cos(10.0::R*t)
+          t12:=t11-0.251447529653225597779084739054E-09::R*cos(11.0::R*t)
+          t13:=t12+0.379474713820149510814074505574E-07::R*cos(12.0::R*t)
+          t14:=t13-0.144211796952119806160265640172E-07::R*cos(13.0::R*t)
+          t15:=t14+0.393504929597610131087190848042E-08::R*cos(14.0::R*t)
+          t16:=t15-0.928468940106331753047289210353E-09::R*cos(15.0::R*t)
+          t17:=t16+0.203178956800654613366090995698E-09::R*cos(16.0::R*t)
+          t18:=t17-0.429249850499236831427918026902E-10::R*cos(17.0::R*t)
+          t19:=t18+0.899264717778123935268001544182E-11::R*cos(18.0::R*t)
+          t20:=t19-0.190086911841210975242396635722E-11::R*cos(19.0::R*t)
+          t21:=t20+0.409219891222373834526121178338E-12::R*cos(20.0::R*t)
+          t22:=t21-0.899925343729319019825435824585E-13::R*cos(21.0::R*t)
+          t23:=t22+0.201965467082426383354948543451E-13::R*cos(22.0::R*t)
+          t24:=t23-0.461293026138308207194950531726E-14::R*cos(23.0::R*t)
+          t25:=t24+0.106902307293863695668857256409E-14::R*cos(24.0::R*t)
+          t26:=t25-0.250703007057007295692572254042E-15::R*cos(25.0::R*t)
+          t27:=t26+0.593732250379155160706073763509E-16::R*cos(26.0::R*t)
+          t28:=t27-0.141773458243766252344732005648E-16::R*cos(27.0::R*t)
+          t29:=t28+0.340920375436080893426806402093E-17::R*cos(28.0::R*t)
+          t30:=t29-0.824829026950549379288702529656E-18::R*cos(29.0::R*t)
+          t31:=t30+0.200636971262144231398824095937E-18::R*cos(30.0::R*t)
+          t32:=t31-0.490385166796742224403498152027E-19::R*cos(31.0::R*t)
+          t33:=t32+0.120373448234833217166664609324E-19::R*cos(32.0::R*t)
+          t34:=t33-0.296628244714136825381453572575E-20::R*cos(33.0::R*t)
+          t35:=t34+0.733551238428807599242142328436E-21::R*cos(34.0::R*t)
+          t36:=t35-0.181992414290851127344263485604E-21::R*cos(35.0::R*t)
+          t37:=t36+0.452862937429576060217359526404E-22::R*cos(36.0::R*t)
+          t38:=t37-0.112998004375060961338906717853E-22::R*cos(37.0::R*t)
+          t39:=t38+0.282668125129011656923764408445E-23::R*cos(38.0::R*t)
+          t40:=t39-0.708771797716904961666732640699E-24::R*cos(39.0::R*t)
+          t41:=t40+0.178110452401870951534401530034E-24::R*cos(40.0::R*t)
+          t42:=t41-0.448500407661896357312006142358E-25::R*cos(41.0::R*t)
+          t43:=t42+0.113154029257547662245053090840E-25::R*cos(42.0::R*t)
+          t44:=t43-0.285995789977932163790414326136E-26::R*cos(43.0::R*t)
+          t45:=t44+0.724077580692267361758172726753E-27::R*cos(44.0::R*t)
+          t46:=t45-0.183613223412577898050666710105E-27::R*cos(45.0::R*t)
+          t47:=t46+0.466312873522730486582600122073E-28::R*cos(46.0::R*t)
+          t48:=t47-0.118595958891902887946724005478E-28::R*cos(47.0::R*t)
+          t49:=t48+0.302029059055671310731137614875E-29::R*cos(48.0::R*t)
+          t50:=t49-0.770165054816636606098827057102E-30::R*cos(49.0::R*t)
+          t50::OPR
+
+@
+
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(e)
+$$ xe^{-x}Ei(x)=\sum_{k-0}^{47}\ {'}{A_kT_k(t)},\ \ t=(x-22)/10,\ \ 
+(12 \le x \le 32)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.2117028640 4369866832 9789991614E 01\\
+ 1 & -0.3204237273 7548579499 0618303177E-01\\
+ 2 &  0.8891732077 3531683589 0182400335E-02\\
+ 3 & -0.2507952805 1892993708 8352442063E-02\\
+ 4 &  0.7202789465 9598754887 5760902487E-03\\
+ 5 & -0.2103490058 5011305342 3531441256E-03\\
+ 6 &  0.6205732318 2769321658 8857730842E-04\\
+ 7 & -0.1826566749 8167026544 9155689733E-04\\
+ 8 &  0.5270651575 2893637580 7788296811E-05\\
+ 9 & -0.1459666547 6199457532 3066719367E-05\\
+10 &  0.3781719973 5896367198 0484193981E-06\\
+11 & -0.8842581282 8407192007 7971589012E-07\\
+12 &  0.1741749198 5383936137 7350309156E-07\\
+13 & -0.2313517747 0436906350 6474480152E-08\\
+14 & -0.1228609819 1808623883 2104835230E-09\\
+15 &  0.2349966236 3228637047 8311381926E-09\\
+16 & -0.1100719401 0272628769 0738963049E-09\\
+17 &  0.3848275157 8612071114 9705563369E-10\\
+18 & -0.1148440967 4900158965 8439301603E-10\\
+19 &  0.3056876293 0885208263 0893626200E-11\\
+20 & -0.7388278729 2847356645 4163131431E-12\\
+21 &  0.1630933094 1659411056 4148013749E-12\\
+22 & -0.3276989373 3127124965 7111774748E-13\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+23 &  0.5898114347 0713196171 1164283918E-14\\
+24 & -0.9099707635 9564920464 3554720718E-15\\
+25 &  0.1040752382 6695538658 5405697541E-15\\
+26 & -0.1809815426 0592279322 7163355935E-17\\
+27 & -0.3777098842 5639477336 9593494417E-17\\
+28 &  0.1580332901 0284795713 6759888420E-17\\
+29 & -0.4684291758 8088273064 8433752957E-18\\
+30 &  0.1199516852 5919809370 7533478542E-18\\
+31 & -0.2823594749 8418651767 9349931117E-19\\
+32 &  0.6293738065 6446352262 7520190349E-20\\
+33 & -0.1352410249 5047975630 5343973177E-20\\
+34 &  0.2837106053 8552914159 0980426210E-21\\
+35 & -0.5867007420 2463832353 1936371015E-22\\
+36 &  0.1205247636 0954731111 2449686917E-22\\
+37 & -0.2474446616 9988486972 8416011246E-23\\
+38 &  0.5099962585 8378500814 2986465688E-24\\
+39 & -0.1058382578 7754224088 7093294733E-24\\
+40 &  0.2215276245 0704827856 6429387155E-25\\
+41 & -0.4679278754 7569625867 1852546231E-26\\
+42 &  0.9972872990 6020770482 4269828079E-27\\
+43 & -0.2143267945 2167880459 1907805844E-27\\
+44 &  0.4640656908 8381811433 8414829515E-28\\
+45 & -0.1011447349 2115139094 8461800780E-28\\
+46 &  0.2217211522 7100771109 3046878345E-29\\
+47 & -0.4884890469 2437855322 4914645512E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei5(y:OPR):OPR ==
+          x:R:=retract(y)
+          t:R:=acos((x-22.0::R)/10.0::R)::R
+          t01:=    0.211702864043698668329789991614E1::R*cos(0.0::R)::R/2.0::R
+          t02:=t01-0.320423727375485794990618303177E-01::R*cos(t)
+          t03:=t02+0.889173207735316835890182400335E-02::R*cos( 2.0::R*t)
+          t04:=t03-0.250795280518929937088352442063E-02::R*cos( 3.0::R*t)
+          t05:=t04+0.720278946595987548875760902487E-03::R*cos( 4.0::R*t)
+          t06:=t05-0.210349005850113053423531441256E-03::R*cos( 5.0::R*t)
+          t07:=t06+0.620573231827693216588857730842E-04::R*cos( 6.0::R*t)
+          t08:=t07-0.182656674981670265449155689733E-04::R*cos( 7.0::R*t)
+          t09:=t08+0.527065157528936375807788296811E-05::R*cos( 8.0::R*t)
+          t10:=t09-0.145966654761994575323066719367E-05::R*cos( 9.0::R*t)
+          t11:=t10+0.378171997358963671980484193981E-06::R*cos(10.0::R*t)
+          t12:=t11-0.884258128284071920077971589012E-07::R*cos(11.0::R*t)
+          t13:=t12+0.174174919853839361377350309156E-07::R*cos(12.0::R*t)
+          t14:=t13-0.231351774704369063506474480152E-08::R*cos(13.0::R*t)
+          t15:=t14-0.122860981918086238832104835230E-09::R*cos(14.0::R*t)
+          t16:=t15+0.234996623632286370478311381926E-09::R*cos(15.0::R*t)
+          t17:=t16-0.110071940102726287690738963049E-09::R*cos(16.0::R*t)
+          t18:=t17+0.384827515786120711149705563369E-10::R*cos(17.0::R*t)
+          t19:=t18-0.114844096749001589658439301603E-10::R*cos(18.0::R*t)
+          t20:=t19+0.305687629308852082630893626200E-11::R*cos(19.0::R*t)
+          t21:=t20-0.738827872928473566454163131431E-12::R*cos(20.0::R*t)
+          t22:=t21+0.163093309416594110564148013749E-12::R*cos(21.0::R*t)
+          t23:=t22-0.327698937331271249657111774748E-13::R*cos(22.0::R*t)
+          t24:=t23+0.589811434707131961711164283918E-14::R*cos(23.0::R*t)
+          t25:=t24-0.909970763595649204643554720718E-15::R*cos(24.0::R*t)
+          t26:=t25+0.104075238266955386585405697541E-15::R*cos(25.0::R*t)
+          t27:=t26-0.180981542605922793227163355935E-17::R*cos(26.0::R*t)
+          t28:=t27-0.377709884256394773369593494417E-17::R*cos(27.0::R*t)
+          t29:=t28+0.158033290102847957136759888420E-17::R*cos(28.0::R*t)
+          t30:=t29-0.468429175880882730648433752957E-18::R*cos(29.0::R*t)
+          t31:=t30+0.119951685259198093707533478542E-18::R*cos(30.0::R*t)
+          t32:=t31-0.282359474984186517679349931117E-19::R*cos(31.0::R*t)
+          t33:=t32+0.629373806564463522627520190349E-20::R*cos(32.0::R*t)
+          t34:=t33-0.135241024950479756305343973177E-20::R*cos(33.0::R*t)
+          t35:=t34+0.283710605385529141590980426210E-21::R*cos(34.0::R*t)
+          t36:=t35-0.586700742024638323531936371015E-22::R*cos(35.0::R*t)
+          t37:=t36+0.120524763609547311112449686917E-22::R*cos(36.0::R*t)
+          t38:=t37-0.247444661699884869728416011246E-23::R*cos(37.0::R*t)
+          t39:=t38+0.509996258583785008142986465688E-24::R*cos(38.0::R*t)
+          t40:=t39-0.105838257877542240887093294733E-24::R*cos(39.0::R*t)
+          t41:=t40+0.221527624507048278566429387155E-25::R*cos(40.0::R*t)
+          t42:=t41-0.467927875475696258671852546231E-26::R*cos(41.0::R*t)
+          t43:=t42+0.997287299060207704824269828079E-27::R*cos(42.0::R*t)
+          t44:=t42-0.214326794521678804591907805844E-27::R*cos(43.0::R*t)
+          t45:=t42+0.464065690883818114338414829515E-28::R*cos(44.0::R*t)
+          t46:=t42-0.101144734921151390948461800780E-28::R*cos(45.0::R*t)
+          t47:=t42+0.221721152271007711093046878345E-29::R*cos(46.0::R*t)
+          t48:=t42-0.488489046924378553224914645512E-30::R*cos(47.0::R*t)
+          t48::OPR
+
+@
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(f)
+$$ xe^{-x}Ei(x)=\sum_{k-0}^{46}\ {'}{A_kT_k(t)},\ \ t=(64/x)-1,\ \ 
+(32 \le x < \infty)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.2032843945 7961669908 7873844202E 01\\
+ 1 &  0.1669920452 0313628514 7618434339E-01\\
+ 2 &  0.2845284724 3613468074 2489985325E-03\\
+ 3 &  0.7563944358 5162064894 8786693854E-05\\
+ 4 &  0.2798971289 4508591575 0484318090E-06\\
+ 5 &  0.1357901828 5345310695 2556392593E-07\\
+ 6 &  0.8343596202 0404692558 5610289412E-09\\
+ 7 &  0.6370971727 6402484382 7524337306E-10\\
+ 8 &  0.6007247608 8118612357 6083084850E-11\\
+ 9 &  0.7022876174 6797735907 5059216588E-12\\
+10 &  0.1018302673 7036876930 9667322152E-12\\
+11 &  0.1761812903 4308800404 0656741554E-13\\
+12 &  0.3250828614 2353606942 4072007647E-14\\
+13 &  0.5071770025 5058186788 1479300685E-15\\
+14 &  0.1665177387 0432942985 3520036957E-16\\
+15 & -0.3166753890 7975144007 2410018963E-16\\
+16 & -0.1588403763 6641415154 8423134074E-16\\
+17 & -0.4175513256 1380188308 9626455063E-17\\
+18 & -0.2892347749 7071418820 2868862358E-18\\
+19 &  0.2800625903 3966080728 9978777339E-18\\
+20 &  0.1322938639 5392708914 0532005364E-18\\
+21 &  0.1804447444 1773019958 5334811191E-19\\
+22 & -0.7905384086 5226165620 2021080364E-20\\
+23 & -0.4435711366 3695734471 8167314045E-20\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+24 & -0.4264103994 9781026176 0579779746E-21\\
+25 &  0.3920101766 9371439072 5625388636E-21\\
+26 &  0.1527378051 3439636447 2804486402E-21\\
+27 & -0.1024849527 0494906078 6953149788E-22\\
+28 & -0.2134907874 7710893794 8904287231E-22\\
+29 & -0.3239139475 1602368761 4279789345E-23\\
+30 &  0.2142183762 2964597029 6249355934E-23\\
+31 &  0.8234609419 6189955316 9207838151E-24\\
+32 & -0.1524652829 6206721081 1495038147E-24\\
+33 & -0.1378208282 4882440129 0438126477E-24\\
+34 &  0.2131311201 4287370679 1513005998E-26\\
+35 &  0.2012649651 8713266585 9213006507E-25\\
+36 &  0.1995535662 0563740232 0607178286E-26\\
+37 & -0.2798995812 2017971142 6020884464E-26\\
+38 & -0.5534511830 5070025094 9784942560E-27\\
+39 &  0.3884995422 6845525312 9749000696E-27\\
+40 &  0.1121304407 2330701254 0043264712E-27\\
+41 & -0.5566568286 7445948805 7823816866E-28\\
+42 & -0.2045482612 4651357628 8865878722E-28\\
+43 &  0.8453814064 4893808943 7361193598E-29\\
+44 &  0.3565755151 2015152659 0791715785E-29\\
+45 & -0.1383652423 4779775181 0195772006E-29\\
+46 & -0.6062142653 2093450576 7865286306E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei6(y:OPR):OPR ==
+          infinite? y => 1
+          x:R:=retract(y)
+          m:R:=64.0::R/x-1.0::R
+          t:R:=acos(m::R)::R
+          t01:=    0.203284394579616699087873844202E1::R*cos(0.0::R)::R/2.0::R
+          t02:=t01+0.166992045203136285147618434339E-01::R*cos(t)
+          t03:=t02+0.284528472436134680742489985325E-03::R*cos( 2.0::R*t)
+          t04:=t03+0.756394435851620648948786693854E-05::R*cos( 3.0::R*t)
+          t05:=t04+0.279897128945085915750484318090E-06::R*cos( 4.0::R*t)
+          t06:=t05+0.135790182853453106952556392593E-07::R*cos( 5.0::R*t)
+          t07:=t06+0.834359620204046925585610289412E-09::R*cos( 6.0::R*t)
+          t08:=t07+0.637097172764024843827524337306E-10::R*cos( 7.0::R*t)
+          t09:=t08+0.600724760881186123576083084850E-11::R*cos( 8.0::R*t)
+          t10:=t09+0.702287617467977359075059216588E-12::R*cos( 9.0::R*t)
+          t11:=t10+0.101830267370368769309667322152E-12::R*cos(10.0::R*t)
+          t12:=t11+0.176181290343088004040656741554E-13::R*cos(11.0::R*t)
+          t13:=t12+0.325082861423536069424072007647E-14::R*cos(12.0::R*t)
+          t14:=t13+0.507177002550581867881479300685E-15::R*cos(13.0::R*t)
+          t15:=t14+0.166517738704329429853520036957E-16::R*cos(14.0::R*t)
+          t16:=t15-0.316675389079751440072410018963E-16::R*cos(15.0::R*t)
+          t17:=t16-0.158840376366414151548423134074E-16::R*cos(16.0::R*t)
+          t18:=t17-0.417551325613801883089626455063E-17::R*cos(17.0::R*t)
+          t19:=t18-0.289234774970714188202868862358E-18::R*cos(18.0::R*t)
+          t20:=t19+0.280062590339660807289978777339E-18::R*cos(19.0::R*t)
+          t21:=t20+0.132293863953927089140532005364E-18::R*cos(20.0::R*t)
+          t22:=t21+0.180444744417730199585334811191E-19::R*cos(21.0::R*t)
+          t23:=t22-0.790538408652261656202021080364E-20::R*cos(22.0::R*t)
+          t24:=t23-0.443571136636957344718167314045E-20::R*cos(23.0::R*t)
+          t25:=t24-0.426410399497810261760579779746E-21::R*cos(24.0::R*t)
+          t26:=t25+0.392010176693714390725625388636E-21::R*cos(25.0::R*t)
+          t27:=t26+0.152737805134396364472804486402E-21::R*cos(26.0::R*t)
+          t28:=t27-0.102484952704949060786953149788E-22::R*cos(27.0::R*t)
+          t29:=t28-0.213490787477108937948904287231E-22::R*cos(28.0::R*t)
+          t30:=t29-0.323913947516023687614279789345E-23::R*cos(29.0::R*t)
+          t31:=t30+0.214218376229645970296249355934E-23::R*cos(30.0::R*t)
+          t32:=t31+0.823460941961899553169207838151E-24::R*cos(31.0::R*t)
+          t33:=t32-0.152465282962067210811495038147E-24::R*cos(32.0::R*t)
+          t34:=t33-0.137820828248824401290438126477E-24::R*cos(33.0::R*t)
+          t35:=t34+0.213131120142873706791513005998E-26::R*cos(34.0::R*t)
+          t36:=t35+0.201264965187132665859213006507E-25::R*cos(35.0::R*t)
+          t37:=t36+0.199553566205637402320607178286E-26::R*cos(36.0::R*t)
+          t38:=t37-0.279899581220179711426020884464E-26::R*cos(37.0::R*t)
+          t39:=t38-0.553451183050700250949784942560E-27::R*cos(38.0::R*t)
+          t40:=t39+0.388499542268455253129749000696E-27::R*cos(39.0::R*t)
+          t41:=t40+0.112130440723307012540043264712E-27::R*cos(40.0::R*t)
+          t42:=t41-0.556656828674459488057823816866E-28::R*cos(41.0::R*t)
+          t43:=t42-0.204548261246513576288865878722E-28::R*cos(42.0::R*t)
+          t44:=t43+0.845381406448938089437361193598E-29::R*cos(43.0::R*t)
+          t45:=t44+0.356575515120151526590791715785E-29::R*cos(44.0::R*t)
+          t46:=t45-0.138365242347797751810195772006E-29::R*cos(45.0::R*t)
+          t47:=t46-0.606214265320934505767865286306E-30::R*cos(46.0::R*t)
+          t47::OPR
+
+@
+
+{\vbox{\vskip 1cm}}
+
+{\bf Table 4: Function Values of the Associated Functions}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=-(20/x)-1$ & $xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+$-\infty$ & -1.000 & 0.1000000000 0000000000 0000000000 E 01\\
+-160      & -0.875 & 0.9938266956 7406127387 8797850088 E 00\\
+-80       & -0.750 & 0.9878013330 9428877356 4522608410 E 00\\
+-53 1/3   & -0.625 & 0.9819162901 4319443961 7735426105 E 00\\
+-40       & -0.500 & 0.9761646031 8514305080 8000604060 E 00\\
+-32       & -0.375 & 0.9705398840 7466392046 2584664361 E 00\\
+-26 2/3   & -0.250 & 0.9650362511 2337703576 3536593528 E 00\\
+-22 6/7   & -0.125 & 0.9596482710 7936727616 5478970820 E 00\\
+-20       & -0.000 & 0.9543709099 1921683397 5195829433 E 00\\
+-17 7/9   &  0.125 & 0.9491994907 7974574460 6445346803 E 00\\
+-16       &  0.250 & 0.9441296577 3690297898 4149471583 E 00\\
+-14 6/11  &  0.375 & 0.9391573444 1928424124 0422409988 E 00\\
+-13 1/3   &  0.500 & 0.9342787466 5341046480 9375801650 E 00\\
+-12 4/13  &  0.625 & 0.9294902984 9721403772 5319679042 E 00\\
+-11 3/7   &  0.750 & 0.9247886511 4084169605 5993585492 E 00\\
+-10 2/3   &  0.875 & 0.9201706542 4944567620 2148012149 E 00\\
+-10       &  1.000 & 0.9156333393 9788081876 0698157666 E 00
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=-(x+7)/3$ & $xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+-10.000 & -1.000 & 0.9156333393 9788081876 0698157661 E 01\\
+ -9.625 & -0.875 & 0.9128444614 6799341885 6575662217 E 00\\
+ -9.250 & -0.750 & 0.9098627515 2542413937 8954274597 E 00\\
+ -8.875 & -0.625 & 0.9066672706 5475388033 4995756418 E 00\\
+ -8.500 & -0.500 & 0.9032339019 7320784414 4682926135 E 00\\
+ -8.125 & -0.375 & 0.8995347176 8847383630 1415777697 E 00\\
+ -7.750 & -0.250 & 0.8955371870 8753915717 9475513219 E 00\\
+ -7.375 & -0.125 & 0.8912031763 2125431626 7087476258 E 00\\
+ -7.000 & -0.000 & 0.8864876725 3642935289 3993846569 E 00\\
+ -6.625 &  0.125 & 0.8813371384 6821020039 4305706270 E 00\\
+ -6.250 &  0.250 & 0.8756873647 8846593227 6462155532 E 00\\
+ -5.875 &  0.375 & 0.8694606294 5411341030 2047153364 E 00\\
+ -5.500 &  0.500 & 0.8625618846 9070142209 0918986586 E 00\\
+ -5.125 &  0.625 & 0.8548735538 9019954239 2425567234 E 00\\
+ -4.750 &  0.750 & 0.8462482991 0358736117 1665798810 E 00\\
+ -4.375 &  0.875 & 0.8364987545 5629874174 2152267582 E 00\\
+ -4.000 &  1.000 & 0.8253825996 0422333240 8183035504 E 00
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=x/4$ &
+$[Ei(x)-log\vert x\vert - \gamma]/x$\hbox{\hskip 2cm}\\
+&&\\
+ -4.0 & -1.000 & 0.4918223446 0781809647 9962798267 E 00\\
+ -3.5 & -0.875 & 0.5248425066 4412835691 8258753311 E 00\\
+ -3.0 & -0.750 & 0.5629587782 2127986313 8086024270 E 00\\
+ -2.5 & -0.625 & 0.6073685258 5838306451 4266925640 E 00\\
+ -2.0 & -0.500 & 0.6596316780 8476964479 5492023380 E 00\\
+ -1.5 & -0.375 & 0.7218002369 4421992965 7623030310 E 00\\
+ -1.0 & -0.250 & 0.7965995992 9705313428 3675865540 E 00\\
+ -0.5 & -0.125 & 0.8876841582 3549672587 2151815870 E 00\\
+  0.0 & -0.000 & 0.1000000000 0000000000 0000000000 E 01\\
+  0.5 &  0.125 & 0.1140302841 0431720574 6248768807 E 01\\
+  1.0 &  0.250 & 0.1317902151 4544038948 6000884424 E 01\\
+  1.5 &  0.375 & 0.1545736450 7467337302 4859074039 E 01\\
+  2.0 &  0.500 & 0.1841935755 2702059966 7788045934 E 01\\
+  2.5 &  0.625 & 0.2232103799 1211651144 5340506423 E 01\\
+  3.0 &  0.750 & 0.2752668205 6852580020 0219289740 E 01\\
+  3.5 &  0.875 & 0.3455821531 9301241243 7300898811 E 01\\
+  4.0 &  1.000 & 0.4416841111 0086991358 0118598668 E 01
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=(x-8)/4$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+ 4.0 & -1.000 & 0.1438208031 4544827847 0968670330 E 01\\
+ 4.5 & -0.875 & 0.1396419029 6297460710 0674523183 E 01\\
+ 5.0 & -0.750 & 0.1353831277 4552859779 0189174047 E 01\\
+ 5.5 & -0.625 & 0.1314143565 7421192454 1219816991 E 01\\
+ 6.0 & -0.500 & 0.1278883860 4895616189 2314099578 E 01\\
+ 6.5 & -0.375 & 0.1248391155 0017014864 0741941387 E 01\\
+ 7.0 & -0.250 & 0.1222408052 3605310590 3656846622 E 01\\
+ 7.5 & -0.125 & 0.1200421499 5996307864 3879158950 E 01\\
+ 8.0 & -0.000 & 0.1181847986 9872079731 7739362644 E 01\\
+ 8.5 &  0.125 & 0.1166126525 8117484943 9918142965 E 01\\
+ 9.0 &  0.250 & 0.1152759208 7089248132 2396814952 E 01\\
+ 9.5 &  0.375 & 0.1141323475 9526242015 5338560641 E 01\\
+10.0 &  0.500 & 0.1131470204 7341077803 4051681355 E 01\\
+10.5 &  0.625 & 0.1122915570 0177606064 2888630755 E 01\\
+11.0 &  0.750 & 0.1115430938 9980384416 4779434229 E 01\\
+11.5 &  0.875 & 0.1108832926 3050773058 6855234934 E 01\\
+12.0 &  1.000 & 0.1102974544 9067590726 7241234953 E 01\\
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=(x-22)/10$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+12.00 & -1.000 & 0.1102974544 9067590726 7241234952 E 01\\
+13.25 & -0.875 & 0.1090844898 2154756926 6468614954 E 01\\
+14.50 & -0.750 & 0.1081351395 7351912850 6346643795 E 01\\
+15.75 & -0.625 & 0.1073701384 1997572371 2157900374 E 01\\
+17.00 & -0.500 & 0.1067393691 9585378312 9572196197 E 01\\
+18.25 & -0.375 & 0.1062096608 6221502426 8372647556 E 01\\
+19.50 & -0.250 & 0.1057581342 1587250319 5393949410 E 01\\
+20.75 & -0.125 & 0.1053684451 2894094408 2102194964 E 01\\
+22.00 & -0.000 & 0.1050285719 6851897941 1780664532 E 01\\
+23.25 &  0.125 & 0.1047294551 7053248581 1492365591 E 01\\
+24.50 &  0.250 & 0.1044641267 9046436368 9761075289 E 01\\
+25.75 &  0.375 & 0.1042271337 2023202388 5710928048 E 01\\
+27.00 &  0.500 & 0.1040141438 3230104381 3713899754 E 01\\
+28.25 &  0.625 & 0.1038216700 3601458768 0056548394 E 01\\
+29.50 &  0.750 & 0.1036468726 2924118457 5154685419 E 01\\
+30.75 &  0.875 & 0.1034874149 8964796947 2990938990 E 01\\
+32.00 &  1.000 & 0.1033413564 2162410494 3493552567 E 01\\
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=(64/x)-1$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+$\infty$ & -1.000 & 0.100000000 0000000000 00000000001 E 01\\
+512      & -0.875 & 0.100196079 9450711925 31337468473 E 01\\
+256      & -0.750 & 0.100393713 0905698627 88009078297 E 01\\
+170 2/3  & -0.625 & 0.100592927 5692929112 94663030932 E 01\\
+128      & -0.500 & 0.100793752 4408140182 81776821694 E 01\\
+102 2/5  & -0.375 & 0.100996217 7406449755 74367545570 E 01\\
+85 1/3   & -0.250 & 0.101200354 5332988482 01864466702 E 01\\
+73 1/7   & -0.125 & 0.101406194 9696971331 45942329335 E 01\\
+64       & -0.000 & 0.101613772 3494325321 70357100831 E 01\\
+56 8/9   &  0.125 & 0.101823121 1884832696 82337017143 E 01\\
+51 1/5   &  0.250 & 0.102034277 2930783774 87217829808 E 01\\
+46 6/11  &  0.375 & 0.102247277 8405420595 91275364791 E 01\\
+42 2/3   &  0.500 & 0.102462161 4681078391 01187804247 E 01\\
+39 5/13  &  0.625 & 0.102678968 3709028524 50984510823 E 01\\
+36 4/7   &  0.750 & 0.102897740 4105808008 63378435059 E 01\\
+34 2/15  &  0.875 & 0.103118521 2364659263 55875784663 E 01\\
+32       &  1.000 & 0.103341356 4216241049 43493552567 E 01\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
         polygamma(k,z)  == CPSI(k, z)$Lisp
         polygamma(k,x)  == RPSI(k, x)$Lisp
 
@@ -811,5 +2350,43 @@ Selected Results and Methods''. New York: van Nostrand Reinhold, 1983.
 \bibitem{7} Cody, W.J., and H.C. Thatcher, Jr. ``Rational Chebyshev
 Approximations for the Exponential Integral $E_1(x)$.''
 Mathematics of Computation, 11, pp. 641-649, 1968
+\bibitem{8} Lee, K.L.,``High-precision Chebyshev series approximation
+to the exponential integral'', NASA-TN-D-5953, A-3571, No Copyright
+Doc. ID=19700026648, Accession ID=70N35964, Aug 1970
+\bibitem{9} Harris, Frank E.: Tables of the Exponential Integral
+Ei(x). Math. Tables and Other Aids to Computation, vol. 11, 1957,
+pp.9-16 
+\bibitem{10} Miller, James; and Hurst, R.P.: Simplified Calculation of
+the Exponential Integral. Math. Tables and Other Aids to Computation,
+vol. 12, 1958, pp 187-193.
+\bibitem{11} Clenshaw, C.W.: Chebyshev Series for Mathematical
+Functions. Mathematical Tables, vol. 5, National Physical Laboratory,
+Her Majesty's Stationery Office, London, 1962, p. 29.
+\bibitem{12} Cody, W.J.; and Thacher, H.C., Jr.: Rational
+Approximations for the Exponential Integral $E_1(x)$. Math. Comp.,
+vol.22, July 1968, pp. 641-649.
+\bibitem{13} Cody, W.J.; and Thacher, H.C., Jr.: Rational
+Approximations for the Exponential Integral $Ei(x)$. Math. Comp.,
+vol.22, April 1969, pp. 289-303.
+\bibitem{14} Murnaghan, F.D.; and Wrench, J.W., Jr.: The Converging
+Factor for the Exponential Integral. Rep. 1535, David Taylor Model
+Basin Applied Mathematics Lab., Jan. 1963.
+\bibitem{16} Clenshaw, C.W.: The Numerical Solution of Linear
+Differential Equation in Chebyshev Series. Proc. Cambridge Phil. Soc.,
+vol. 53, 1957, pp 134-149
+\bibitem{17} Fox, L.; and Parker, I.B.: Chebyshev Polynomials in
+Numerical Analysis. Oxford Univ. Press, London, 1968.
+\bibitem{18} Jeffrey, Alan ``Handbook of Mathematical Formulas and
+Integrals'' Elsevier Academic Press 2004 3rd Edition ISBN
+0-12-382256-4 pp167-171
+\bibitem{19} Press, William, et.al., ``Numerical Recipes in C''
+Press Syndicate Univ. of Cambridge, 1995 ISBN 0-521-43108-5 
+pp190-194
+\bibitem{20} Press, William, et.al., ``Numerical Recipes in C''
+Press Syndicate Univ. of Cambridge, 1995 ISBN 0-521-43108-5 
+p196
+\bibitem{21} Press, William, et.al., ``Numerical Recipes in C''
+Press Syndicate Univ. of Cambridge, 1995 ISBN 0-521-43108-5 
+p222-225
 \end{thebibliography}
 \end{document}
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 6cc1513..a54a9e7 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -302,8 +302,8 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     cycles1.regress   cycles.regress   cyfactor.regress \
     danzwill.regress  decimal.regress  defintef.regress defintrf.regress \
     derham.regress    dfloat.regress   dhtri.regress    divisor.regress \
-    dmp.regress       dpol.regress     e1.regress       easter.regress  \
-    efi.regress \
+    dmp.regress       dpol.regress     e1.regress       ei.regress \
+    easter.regress    efi.regress \
     eigen.regress     elemfun.regress  elemnum.regress  elfuts.regress \
     elt.regress       en.regress \
     eq.regress        eqtbl.regress    equation2.regress \
@@ -542,6 +542,7 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/drawcfun.input ${OUT}/drawcurv.input \
        ${OUT}/draw.input     ${OUT}/drawcx.input     ${OUT}/drawex.input \
        ${OUT}/drawpoly.input ${OUT}/drawx.input      ${OUT}/e1.input     \
+       ${OUT}/ei.input       \
        ${OUT}/easter.input   ${OUT}/efi.input        ${OUT}/egg.input      \
        ${OUT}/eigen.input \
        ${OUT}/elemfun.input  ${OUT}/elemnum.input    ${OUT}/elfuts.input \
@@ -776,7 +777,7 @@ DOCFILES= \
   ${DOC}/e04jaf.input.dvi      ${DOC}/e04mbf.input.dvi     \
   ${DOC}/e04naf.input.dvi      ${DOC}/e04ucf.input.dvi     \
   ${DOC}/e04ycf.input.dvi      ${DOC}/e1.input.dvi         \
-  ${DOC}/easter.input.dvi     \
+  ${DOC}/ei.input.dvi          ${DOC}/easter.input.dvi     \
   ${DOC}/ecfact.as.dvi         ${DOC}/efi.input.dvi        \
   ${DOC}/egg.input.dvi         ${DOC}/eigen.input.dvi      \
   ${DOC}/elemfun.input.dvi     ${DOC}/elemnum.input.dvi    \
diff --git a/src/input/ei.input.pamphlet b/src/input/ei.input.pamphlet
new file mode 100644
index 0000000..9c84341
--- /dev/null
+++ b/src/input/ei.input.pamphlet
@@ -0,0 +1,2311 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input ei.input}
+\author{Timothy Daly}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+The Ei implementation in Axiom uses Chebyshev\cite{1} polynomials
+to approximate the function. The coefficients are not used
+here but kept here for reference purposes.
+
+The values generated are compared against the values in
+Abramowitz and Stegun\cite{2}.
+<<*>>=
+)spool ei.output
+)set message test on
+)set message auto off
+)clear all
+digits 35
+
+--S 1 of 20
+gamma:=0.577215664901532860606512090082
+--R 
+--R
+--R   (2)  0.5772156649 0153286060 6512090082
+--R                                                                  Type: Float
+--E 1
+
+@
+These are the Chebyshev coefficients used by Axiom in the range
+$(-\infty < x \le -10)$ in the polynomial
+$$\sum_{k=0}^{40}\ ^{'}{A_kT_k(t)}$$
+with the scaling factor $t=(-20/x)-1$
+
+<<*>>=
+
+--S 2 of 20
+aChebyshev:=_
+[0.191217322586055345391519326510E1,_
+-0.420835505286848437550974986680E-01,_
+ 0.172281962728432678337118157835E-02,_
+-0.991578217344456364559842322973E-04,_
+ 0.717609316802277505265590665592E-05,_
+-0.615273314509512696827956791331E-06,_
+ 0.602485710656275831293999701610E-07,_
+-0.657384884528830482295894189637E-08,_
+ 0.785316754183239981994810079871E-09,_
+-0.101373028800387898554202774257E-09,_
+ 0.139977041322676860277823488623E-10,_
+-0.205100837678381899618962318711E-11,_
+ 0.316838872600247781814907985818E-12,_
+-0.513276008283918065415984751899E-13,_
+ 0.868093304076654934187433687383E-14,_
+-0.152701504090308497198572355351E-14,_
+ 0.278468625164935739650105251453E-15,_
+-0.524989043742176696808472933696E-16,_
+ 0.102071799124856129247455787226E-16,_
+-0.204226467989971841308462421876E-17,_
+ 0.419706417272648474408827228562E-18,_
+-0.884450817617281050816483737536E-19,_
+ 0.190827262959471741995060168262E-19,_
+-0.420974622293519950336450865676E-20,_
+ 0.948390405819837327641500214512E-21,_
+-0.217946786013667431994032574014E-21,_
+ 0.510393686907145094993452562741E-22,_
+-0.121688311333441509089746779693E-22,_
+ 0.295128916644787519294773757144E-23,_
+-0.727535376377284689714438950920E-24,_
+ 0.182163904862307396121667115976E-24,_
+-0.462962996316331716612753482064E-25,_
+ 0.119353979097157791523052371292E-25,_
+-0.311949328522014244931062147473E-26,_
+ 0.826141973453346642284170028518E-27,_
+-0.221580337366098298302591177697E-27,_
+ 0.601603167165426389045303124429E-28,_
+-0.165272509838212659649744302314E-28,_
+ 0.459223035877302702795636377166E-29,_
+-0.129006276721326384737453212670E-29,_
+ 0.366271848103200259081177078922E-30]
+--R 
+--R
+--R   (3)
+--R   [1.9121732258 6055345391 51932651, - 0.0420835505 2868484375 5097498668,
+--R    0.0017228196 2728432678 3371181578 35,
+--R    - 0.0000991578 2173444563 6455984232 2973,
+--R    0.0000071760 9316802277 5052655906 65592,
+--R    - 0.6152733145 0951269682 7956791331 E -6,
+--R    0.6024857106 5627583129 399970161 E -7,
+--R    - 0.6573848845 2883048229 5894189637 E -8,
+--R    0.7853167541 8323998199 4810079871 E -9,
+--R    - 0.1013730288 0038789855 4202774257 E -9,
+--R    0.1399770413 2267686027 7823488623 E -10,
+--R    - 0.2051008376 7838189961 8962318711 E -11,
+--R    0.3168388726 0024778181 4907985818 E -12,
+--R    - 0.5132760082 8391806541 5984751899 E -13,
+--R    0.8680933040 7665493418 7433687383 E -14,
+--R    - 0.1527015040 9030849719 8572355351 E -14,
+--R    0.2784686251 6493573965 0105251453 E -15,
+--R    - 0.5249890437 4217669680 8472933696 E -16,
+--R    0.1020717991 2485612924 7455787226 E -16,
+--R    - 0.2042264679 8997184130 8462421876 E -17,
+--R    0.4197064172 7264847440 8827228562 E -18,
+--R    - 0.8844508176 1728105081 6483737536 E -19,
+--R    0.1908272629 5947174199 5060168262 E -19,
+--R    - 0.4209746222 9351995033 6450865676 E -20,
+--R    0.9483904058 1983732764 1500214512 E -21,
+--R    - 0.2179467860 1366743199 4032574014 E -21,
+--R    0.5103936869 0714509499 3452562741 E -22,
+--R    - 0.1216883113 3344150908 9746779693 E -22,
+--R    0.2951289166 4478751929 4773757144 E -23,
+--R    - 0.7275353763 7728468971 443895092 E -24,
+--R    0.1821639048 6230739612 1667115976 E -24,
+--R    - 0.4629629963 1633171661 2753482064 E -25,
+--R    0.1193539790 9715779152 3052371292 E -25,
+--R    - 0.3119493285 2201424493 1062147473 E -26,
+--R    0.8261419734 5334664228 4170028518 E -27,
+--R    - 0.2215803373 6609829830 2591177697 E -27,
+--R    0.6016031671 6542638904 5303124429 E -28,
+--R    - 0.1652725098 3821265964 9744302314 E -28,
+--R    0.4592230358 7730270279 5636377166 E -29,
+--R    - 0.1290062767 2132638473 745321267 E -29,
+--R    0.3662718481 0320025908 1177078922 E -30]
+--R                                                             Type: List Float
+--E 2
+
+@
+In the following table there are 4 columns. The first column
+is the argument of Ei(x) shown in Table 4 in \cite{1}. The second
+column is the exact value shown in the table. Column 3 is the
+value returned by Axiom and column 4 is the difference.
+See special.spad.dvi for details.
+
+<<*>>=
+--S 3 of 20
+[[-160.,0.993826695674061273878797850088,_
+ Ei1(-160.0),Ei1(-160.0)-0.993826695674061273878797850088],_
+[-80.0,0.987801333094288773564522608410,_
+ Ei1(-80.0),Ei1(-80.0)-0.987801333094288773564522608410],_
+[-53.0-1.0/3.0,0.981916290143194439617735426105,_
+ Ei1(-53.0-1.0/3.0),Ei1(-53.0-1.0/3.0)-0.981916290143194439617735426105],_
+[-40.0,0.976164603185143050808000604060,_
+ Ei1(-40.0),Ei1(-40.0)-0.976164603185143050808000604060],_
+[-32.0,0.970539884074663920462584664361,_
+ Ei1(-32.0),Ei1(-32.0)-0.970539884074663920462584664361],_
+[-26.0-2.0/3.0,0.965036251123377035763536593528,_
+ Ei1(-26.0-2.0/3.0),Ei1(-26.0-2.0/3.0)-0.965036251123377035763536593528],_
+[-22.0-6.0/7.0,0.959648271079367276165478970820,_
+ Ei1(-22.0-6.0/7.0),Ei1(-22.0-6.0/7.0)-0.959648271079367276165478970820],_
+[-20.0,0.954370909919216833975195829433,_
+ Ei1(-20.0),Ei1(-20.0)-0.954370909919216833975195829433],_
+[-17.0-7.0/9.0,0.949199490779745744606445346803,_
+ Ei1(-17.0-7.0/9.0),Ei1(-17.0-7.0/9.0)-0.949199490779745744606445346803],_
+[-16.0,0.944129657736902978984149471583,_
+ Ei1(-16.0),Ei1(-16.0)-0.944129657736902978984149471583],_
+[-14.0-6.0/11.0,0.939157344419284241240422409988,_
+ Ei1(-14.0-6.0/11.0),Ei1(-14.0-6.0/11.0)-0.939157344419284241240422409988],_
+[-13.0-1.0/3.0,0.934278746653410464809375801650,_
+ Ei1(-13.0-1.0/3.0),Ei1(-13.0-1.0/3.0)-0.934278746653410464809375801650],_
+[-12.0-4.0/13.0,0.929490298497214037725319679042,_
+ Ei1(-12.0-4.0/13.0),Ei1(-12.0-4.0/13.0)-0.929490298497214037725319679042],_
+[-11.0-3.0/7.0,0.924788651140841696055993585492,_
+ Ei1(-11.0-3.0/7.0),Ei1(-11.0-3.0/7.0)-0.924788651140841696055993585492],_
+[-10.0-2.0/3.0,0.920170654249445676202148012149,_
+ Ei1(-10.0-2.0/3.0),Ei1(-10.0-2.0/3.0)-0.920170654249445676202148012149],_
+[-10.0,0.915633339397880818760698157666,_
+ Ei1(-10.0),Ei1(-10.0)-0.915633339397880818760698157666]]
+--R 
+--R
+--R   (4)
+--R   [[- 160.,0.99382669567406123,0.99382669567406123,0.],
+--R    [- 80.,0.98780133309428875,0.98780133309428886,1.1102230246251565E-16],
+--R    [- 53.333333333333336,0.98191629014319448,0.98191629014319448,0.],
+--R    [- 40.,0.97616460318514309,0.97616460318514309,0.],
+--R    [- 32.,0.97053988407466396,0.97053988407466363,- 3.3306690738754696E-16],
+--R    [- 26.666666666666668,0.96503625112337699,0.96503625112337699,0.],
+--R
+--R     [- 22.857142857142858, 0.95964827107936723, 0.95964827107936734,
+--R      1.1102230246251565E-16]
+--R     ,
+--R    [- 20.,0.9543709099192168,0.95437090991921691,1.1102230246251565E-16],
+--R    [- 17.777777777777779,0.94919949077974575,0.94919949077974575,0.],
+--R    [- 16.,0.94412965773690294,0.94412965773690294,0.],
+--R
+--R     [- 14.545454545454545, 0.93915734441928422, 0.93915734441928411,
+--R      - 1.1102230246251565E-16]
+--R     ,
+--R
+--R     [- 13.333333333333334, 0.93427874665341049, 0.9342787466534106,
+--R      1.1102230246251565E-16]
+--R     ,
+--R
+--R     [- 12.307692307692308, 0.92949029849721398, 0.92949029849721387,
+--R      - 1.1102230246251565E-16]
+--R     ,
+--R    [- 11.428571428571429,0.92478865114084174,0.92478865114084174,0.],
+--R
+--R     [- 10.666666666666666, 0.92017065424944566, 0.92017065424944577,
+--R      1.1102230246251565E-16]
+--R     ,
+--R    [- 10.,0.91563333939788083,0.91563333939788094,1.1102230246251565E-16]]
+--R                               Type: List List OnePointCompletion DoubleFloat
+--E 3
+
+@
+These are the Chebyshev coefficients used by Axiom in the range
+$(-10 \le x \le -4)$ in the polynomial
+$$\sum_{k=0}^{43}\ ^{'}{A_kT_k(t)}$$
+with the scaling factor $t=(x+7)/3$
+
+<<*>>=
+--S 4 of 20
+bChebyshev:=[_
+ 0.175755649606129373848762834691E1,_
+-0.435854151773616611705001867964E-01,_
+-0.797950713955842540133217027492E-02,_
+-0.148437232730371213850970210001E-02,_
+-0.280030198437751457486203954948E-03,_
+-0.534864851286579323039177361553E-04,_
+-0.103286724357355486610233266460E-04,_
+-0.201408331300553687732226198639E-05,_
+-0.396175843427386645822338443500E-06,_
+-0.785387276709663163067607656069E-07,_
+-0.156792598100746982624616270279E-07,_
+-0.315005593937639988250007372851E-08,_
+-0.636509682252420373040380263972E-09,_
+-0.129288811328056318356593121259E-09,_
+-0.263869099965925576132149942808E-10,_
+-0.540895828704506873491922207896E-11,_
+-0.111322278460108989997676692708E-11,_
+-0.229962472607446246184338864145E-12,_
+-0.476668238949519026223913482091E-13,_
+-0.991175674733527094506246643371E-14,_
+-0.206710358049570724000900805021E-14,_
+-0.432277678338338505645764394579E-15,_
+-0.906301479966501725514905603356E-16,_
+-0.190466997958166139744015963342E-16,_
+-0.401179232635027866346744227520E-17,_
+-0.846777213001683223134166334685E-18,_
+-0.179084273365869665555826492204E-18,_
+-0.379449063817147824401106175166E-19,_
+-0.805399923679827985260999654058E-20,_
+-0.171233901123620129743228671244E-20,_
+-0.364627405877496862086576562816E-21,_
+-0.777596963889394794353098157647E-22,_
+-0.166062849844840205662531950966E-22,_
+-0.355117862578825093005927145352E-23,_
+-0.760372268594135809295734653294E-24,_
+-0.163007413725849002889638374755E-24,_
+-0.349857520272863223507538497255E-25,_
+-0.751717962789009882460645145143E-26,_
+-0.161687744005272276298777317918E-26,_
+-0.348127008572475691748202271565E-27,_
+-0.750270777550246547010642233720E-28,_
+-0.161845436449591026807612330206E-28,_
+-0.349436677170516166749482836452E-29,_
+-0.755103690612616785856037026797E-30]
+--R 
+--R
+--R   (5)
+--R   [1.7575564960 6129373848 762834691, - 0.0435854151 7736166117 0500186796 4,
+--R    - 0.0079795071 3955842540 1332170274 92,
+--R    - 0.0014843723 2730371213 8509702100 01,
+--R    - 0.0002800301 9843775145 7486203954 948,
+--R    - 0.0000534864 8512865793 2303917736 1553,
+--R    - 0.0000103286 7243573554 8661023326 646,
+--R    - 0.0000020140 8331300553 6877322261 98639,
+--R    - 0.3961758434 2738664582 23384435 E -6,
+--R    - 0.7853872767 0966316306 7607656069 E -7,
+--R    - 0.1567925981 0074698262 4616270279 E -7,
+--R    - 0.3150055939 3763998825 0007372851 E -8,
+--R    - 0.6365096822 5242037304 0380263972 E -9,
+--R    - 0.1292888113 2805631835 6593121259 E -9,
+--R    - 0.2638690999 6592557613 2149942808 E -10,
+--R    - 0.5408958287 0450687349 1922207896 E -11,
+--R    - 0.1113222784 6010898999 7676692708 E -11,
+--R    - 0.2299624726 0744624618 4338864145 E -12,
+--R    - 0.4766682389 4951902622 3913482091 E -13,
+--R    - 0.9911756747 3352709450 6246643371 E -14,
+--R    - 0.2067103580 4957072400 0900805021 E -14,
+--R    - 0.4322776783 3833850564 5764394579 E -15,
+--R    - 0.9063014799 6650172551 4905603356 E -16,
+--R    - 0.1904669979 5816613974 4015963342 E -16,
+--R    - 0.4011792326 3502786634 674422752 E -17,
+--R    - 0.8467772130 0168322313 4166334685 E -18,
+--R    - 0.1790842733 6586966555 5826492204 E -18,
+--R    - 0.3794490638 1714782440 1106175166 E -19,
+--R    - 0.8053999236 7982798526 0999654058 E -20,
+--R    - 0.1712339011 2362012974 3228671244 E -20,
+--R    - 0.3646274058 7749686208 6576562816 E -21,
+--R    - 0.7775969638 8939479435 3098157647 E -22,
+--R    - 0.1660628498 4484020566 2531950966 E -22,
+--R    - 0.3551178625 7882509300 5927145352 E -23,
+--R    - 0.7603722685 9413580929 5734653294 E -24,
+--R    - 0.1630074137 2584900288 9638374755 E -24,
+--R    - 0.3498575202 7286322350 7538497255 E -25,
+--R    - 0.7517179627 8900988246 0645145143 E -26,
+--R    - 0.1616877440 0527227629 8777317918 E -26,
+--R    - 0.3481270085 7247569174 8202271565 E -27,
+--R    - 0.7502707775 5024654701 064223372 E -28,
+--R    - 0.1618454364 4959102680 7612330206 E -28,
+--R    - 0.3494366771 7051616674 9482836452 E -29,
+--R    - 0.7551036906 1261678585 6037026797 E -30]
+--R                                                             Type: List Float
+--E 4
+
+@
+In the following table there are 4 columns. The first column
+is the argument of Ei(x) shown in Table 4 in \cite{1}. The second
+column is the exact value shown in the table. Column 3 is the
+value returned by Axiom and column 4 is the difference.
+See special.spad.dvi for details.
+
+<<*>>=
+--S 5 of 20
+[[-10.000,0.915633339397880818760698157661,_
+  Ei2(-10.000),Ei2(-10.000)-0.915633339397880818760698157661],_
+[ -9.625,0.912844461467993418856575662217,_
+  Ei2( -9.625),Ei2( -9.625)-0.912844461467993418856575662217],_
+[ -9.250,0.909862751525424139378954274597,_
+  Ei2( -9.250),Ei2( -9.250)-0.909862751525424139378954274597],_
+[ -8.875,0.906667270654753880334995756418,_
+  Ei2( -8.875),Ei2( -8.875)-0.906667270654753880334995756418],_
+[ -8.500,0.903233901973207844144682926135,_
+  Ei2( -8.500),Ei2( -8.500)-0.903233901973207844144682926135],_
+[ -8.125,0.899534717688473836301415777697,_
+  Ei2( -8.125),Ei2( -8.125)-0.899534717688473836301415777697],_
+[ -7.750,0.895537187087539157179475513219,_
+  Ei2( -7.750),Ei2( -7.750)-0.895537187087539157179475513219],_
+[ -7.375,0.891203176321254316267087476258,_
+  Ei2( -7.375),Ei2( -7.375)-0.891203176321254316267087476258],_
+[ -7.000,0.886487672536429352893993846569,_
+  Ei2( -7.000),Ei2( -7.000)-0.886487672536429352893993846569],_
+[ -6.625,0.881337138468210200394305706270,_
+  Ei2( -6.625),Ei2( -6.625)-0.881337138468210200394305706270],_
+[ -6.250,0.875687364788465932276462155532,_
+  Ei2( -6.250),Ei2( -6.250)-0.875687364788465932276462155532],_
+[ -5.875,0.869460629454113410302047153364,_
+  Ei2( -5.875),Ei2( -5.875)-0.869460629454113410302047153364],_
+[ -5.500,0.862561884690701422090918986586,_
+  Ei2( -5.500),Ei2( -5.500)-0.862561884690701422090918986586],_
+[ -5.125,0.854873553890199542392425567234,_
+  Ei2( -5.125),Ei2( -5.125)-0.854873553890199542392425567234],_
+[ -4.750,0.846248299103587361171665798810,_
+  Ei2( -4.750),Ei2( -4.750)-0.846248299103587361171665798810],_
+[ -4.375,0.836498754556298741742152267582,_
+  Ei2( -4.375),Ei2( -4.375)-0.836498754556298741742152267582],_
+[ -4.000,0.825382599604223332408183035504,_
+  Ei2( -4.000),Ei2( -4.000)-0.825382599604223332408183035504]]
+--R 
+--R
+--R   (6)
+--R   [[- 10.,0.91563333939788083,0.91563333939788083,0.],
+--R    [- 9.625,0.91284446146799347,0.91284446146799336,- 1.1102230246251565E-16],
+--R    [- 9.25,0.90986275152542417,0.90986275152542395,- 2.2204460492503131E-16],
+--R    [- 8.875,0.90666727065475383,0.90666727065475394,1.1102230246251565E-16],
+--R    [- 8.5,0.90323390197320785,0.90323390197320796,1.1102230246251565E-16],
+--R    [- 8.125,0.89953471768847382,0.89953471768847415,3.3306690738754696E-16],
+--R    [- 7.75,0.89553718708753915,0.89553718708753927,1.1102230246251565E-16],
+--R    [- 7.375,0.89120317632125434,0.89120317632125423,- 1.1102230246251565E-16],
+--R    [- 7.,0.88648767253642935,0.88648767253642924,- 1.1102230246251565E-16],
+--R    [- 6.625,0.88133713846821016,0.88133713846821005,- 1.1102230246251565E-16],
+--R    [- 6.25,0.87568736478846598,0.87568736478846598,0.],
+--R    [- 5.875,0.8694606294541134,0.86946062945411307,- 3.3306690738754696E-16],
+--R    [- 5.5,0.86256188469070139,0.86256188469070139,0.],
+--R    [- 5.125,0.85487355389019959,0.85487355389019937,- 2.2204460492503131E-16],
+--R    [- 4.75,0.84624829910358734,0.84624829910358745,1.1102230246251565E-16],
+--R    [- 4.375,0.83649875455629874,0.83649875455629874,0.],
+--R    [- 4.,0.82538259960422333,0.82538259960422322,- 1.1102230246251565E-16]]
+--R                               Type: List List OnePointCompletion DoubleFloat
+--E 5
+
+@
+These are the Chebyshev coefficients used by Axiom in the range
+$(-4 \le x \le 4)$ in the polynomial
+$$\sum_{k=0}^{33}\ ^{'}{A_kT_k(t)}$$
+with the scaling factor $t=x/4$
+
+<<*>>=
+--S 6 of 20
+cChebyshev:=[_
+0.329370010376739129393905231421E1,_
+0.167983505237130291565505796064E1,_
+0.722043610567875435240299679644E0,_
+0.260031236054809561713740181192E0,_
+0.801049430817375022394742889237E-01,_
+0.215140366397633375480552483005E-01,_
+0.511620778993033120621968910894E-02,_
+0.109093286100739135605066199014E-02,_
+0.210741532023938916318348675226E-03,_
+0.371990451665188857095940815956E-04,_
+0.604349163712387875704767032866E-05,_
+0.909295427396260952649596541772E-06,_
+0.127380516065926478865567184969E-06,_
+0.166918574841098907390896143814E-07,_
+0.205441702640104792547612484551E-08,_
+0.238358444446681765914052321417E-09,_
+0.261538637888544296669068664148E-10,_
+0.272185862285416706446550268995E-11,_
+0.269375003198357929925326427442E-12,_
+0.254122094670726355467884089307E-13,_
+0.229013040686503709418510620516E-14,_
+0.197546573907462299401057650412E-15,_
+0.163402455192893174068635419984E-16,_
+0.129823543707963760991961293204E-17,_
+0.992258792507371059644632581302E-19,_
+0.730625280672210329447230880087E-20,_
+0.518967683460434512720780080019E-21,_
+0.356040945409970681128043162227E-22,_
+0.236197943257938642370187203948E-23,_
+0.151683776772145297549624516819E-24,_
+0.943908972224487442925310405245E-26,_
+0.569722755950369211989581737831E-27,_
+0.333833362779543303156597939562E-28,_
+0.190062601281619148526680482237E-29]
+--R 
+--R
+--R   (7)
+--R   [3.2937001037 6739129393 905231421, 1.6798350523 7130291565 505796064,
+--R    0.7220436105 6787543524 0299679644, 0.2600312360 5480956171 3740181192,
+--R    0.0801049430 8173750223 9474288923 7, 0.0215140366 3976333754 8055248300 5,
+--R    0.0051162077 8993033120 6219689108 94,
+--R    0.0010909328 6100739135 6050661990 14,
+--R    0.0002107415 3202393891 6318348675 226,
+--R    0.0000371990 4516651888 5709594081 5956,
+--R    0.0000060434 9163712387 8757047670 32866,
+--R    0.9092954273 9626095264 9596541772 E -6,
+--R    0.1273805160 6592647886 5567184969 E -6,
+--R    0.1669185748 4109890739 0896143814 E -7,
+--R    0.2054417026 4010479254 7612484551 E -8,
+--R    0.2383584444 4668176591 4052321417 E -9,
+--R    0.2615386378 8854429666 9068664148 E -10,
+--R    0.2721858622 8541670644 6550268995 E -11,
+--R    0.2693750031 9835792992 5326427442 E -12,
+--R    0.2541220946 7072635546 7884089307 E -13,
+--R    0.2290130406 8650370941 8510620516 E -14,
+--R    0.1975465739 0746229940 1057650412 E -15,
+--R    0.1634024551 9289317406 8635419984 E -16,
+--R    0.1298235437 0796376099 1961293204 E -17,
+--R    0.9922587925 0737105964 4632581302 E -19,
+--R    0.7306252806 7221032944 7230880087 E -20,
+--R    0.5189676834 6043451272 0780080019 E -21,
+--R    0.3560409454 0997068112 8043162227 E -22,
+--R    0.2361979432 5793864237 0187203948 E -23,
+--R    0.1516837767 7214529754 9624516819 E -24,
+--R    0.9439089722 2448744292 5310405245 E -26,
+--R    0.5697227559 5036921198 9581737831 E -27,
+--R    0.3338333627 7954330315 6597939562 E -28,
+--R    0.1900626012 8161914852 6680482237 E -29]
+--R                                                             Type: List Float
+--E 6
+
+@
+In the following table there are 4 columns. The first column
+is the argument of Ei(x) shown in Table 4 in \cite{1}. The second
+column is the exact value shown in the table. Column 3 is the
+value returned by Axiom and column 4 is the difference.
+See special.spad.dvi for details.
+
+<<*>>=
+--S 7 of 20
+[[-4.0,0.491822344607818096479962798267,_
+  Ei3(-4.0),Ei3(-4.0)-0.491822344607818096479962798267],_
+[-3.5,0.524842506644128356918258753311,_
+  Ei3(-3.5),Ei3(-3.5)-0.524842506644128356918258753311],_
+[-3.0,0.562958778221279863138086024270,_
+  Ei3(-3.0),Ei3(-3.0)-0.562958778221279863138086024270],_
+[-2.5,0.607368525858383064514266925640,_
+  Ei3(-2.5),Ei3(-2.5)-0.607368525858383064514266925640],_
+[-2.0,0.659631678084769644795492023380,_
+  Ei3(-2.0),Ei3(-2.0)-0.659631678084769644795492023380],_
+[-1.5,0.721800236944219929657623030310,_
+  Ei3(-1.5),Ei3(-1.5)-0.721800236944219929657623030310],_
+[-1.0,0.796599599297053134283675865540,_
+  Ei3(-1.0),Ei3(-1.0)-0.796599599297053134283675865540],_
+[-0.5,0.887684158235496725872151815870,_
+  Ei3(-0.5),Ei3(-0.5)-0.887684158235496725872151815870],_
+[0.0,1.00000000000000000000000000000,_
+  Ei3(0.0),Ei3(0.0)-1.00000000000000000000000000000],_
+[0.5,1.14030284104317205746248768807,_
+  Ei3(0.5),Ei3(0.5)-1.14030284104317205746248768807],_
+[1.0,1.31790215145440389486000884424,_
+  Ei3(1.0),Ei3(1.0)-1.31790215145440389486000884424],_
+[1.5,1.54573645074673373024859074039,_
+  Ei3(1.5),Ei3(1.5)-1.54573645074673373024859074039],_
+[2.0,1.84193575527020599667788045934,_
+  Ei3(2.0),Ei3(2.0)-1.84193575527020599667788045934],_
+[2.5,2.23210379912116511445340506423,_
+  Ei3(2.5),Ei3(2.5)-2.23210379912116511445340506423],_
+[3.0,2.75266820568525800200219289740,_
+  Ei3(3.0),Ei3(3.0)-2.75266820568525800200219289740],_
+[3.5,3.45582153193012412437300898811,_
+  Ei3(3.5),Ei3(3.5)-3.45582153193012412437300898811],_
+[4.0,4.41684111100869913580118598668,_
+  Ei3(4.0),Ei3(4.0)-4.41684111100869913580118598668]]
+--R 
+--R
+--R   (8)
+--R   [[- 4.,0.4918223446078181,0.49182234460781826,1.6653345369377348E-16],
+--R    [- 3.5,0.52484250664412835,0.52484250664412835,0.],
+--R    [- 3.,0.56295877822127982,0.56295877822128015,3.3306690738754696E-16],
+--R    [- 2.5,0.60736852585838308,0.60736852585838341,3.3306690738754696E-16],
+--R    [- 2.,0.65963167808476963,0.65963167808476975,1.1102230246251565E-16],
+--R    [- 1.5,0.72180023694421991,0.72180023694422013,2.2204460492503131E-16],
+--R    [- 1.,0.79659959929705315,0.79659959929705293,- 2.2204460492503131E-16],
+--R    [- 0.5,0.88768415823549673,0.88768415823549696,2.2204460492503131E-16],
+--R    [0.,1.,1.,0.],
+--R    [0.5,1.1403028410431721,1.1403028410431715,- 6.6613381477509392E-16],
+--R    [1.,1.3179021514544038,1.3179021514544034,- 4.4408920985006262E-16],
+--R    [1.5,1.5457364507467337,1.5457364507467335,- 2.2204460492503131E-16],
+--R    [2.,1.841935755270206,1.8419357552702071,1.1102230246251565E-15],
+--R    [2.5,2.2321037991211652,2.2321037991211647,- 4.4408920985006262E-16],
+--R    [3.,2.7526682056852581,2.7526682056852589,8.8817841970012523E-16],
+--R    [3.5,3.4558215319301242,3.4558215319301238,- 4.4408920985006262E-16],
+--R    [4.,4.4168411110086989,4.4168411110087007,1.7763568394002505E-15]]
+--R                               Type: List List OnePointCompletion DoubleFloat
+--E 7
+
+@
+These are the Chebyshev coefficients used by Axiom in the range
+$(4 \le x \le 12)$ in the polynomial
+$$\sum_{k=0}^{49}\ ^{'}{A_kT_k(t)}$$
+with the scaling factor $t=(x-8)/4$
+
+<<*>>=
+--S 8 of 20
+dChebyshev:=[_
+ 0.245513353878129528673420457043E1,_
+-0.162438379130376524396002276856E0,_
+ 0.449575308093572641480785417193E-01,_
+-0.674157867998922998848718835050E-02,_
+-0.130669714280329428051599341387E-02,_
+ 0.138108314600072576020202089820E-02,_
+-0.585022879015965798687368242394E-03,_
+ 0.174929934107891970038740976432E-03,_
+-0.404728149905293035522869333800E-04,_
+ 0.721710241217099750035752600049E-05,_
+-0.861277697019867752414815450193E-06,_
+-0.251447529653225597779084739054E-09,_ -- E-06? or wrong place?
+ 0.379474713820149510814074505574E-07,_
+-0.144211796952119806160265640172E-07,_
+ 0.393504929597610131087190848042E-08,_
+-0.928468940106331753047289210353E-09,_
+ 0.203178956800654613366090995698E-09,_
+-0.429249850499236831427918026902E-10,_
+ 0.899264717778123935268001544182E-11,_
+-0.190086911841210975242396635722E-11,_
+ 0.409219891222373834526121178338E-12,_
+-0.899925343729319019825435824585E-13,_
+ 0.201965467082426383354948543451E-13,_
+-0.461293026138308207194950531726E-14,_
+ 0.106902307293863695668857256409E-14,_
+-0.250703007057007295692572254042E-15,_
+ 0.593732250379155160706073763509E-16,_
+-0.141773458243766252344732005648E-16,_
+ 0.340920375436080893426806402093E-17,_
+-0.824829026950549379288702529656E-18,_
+ 0.200636971262144231398824095937E-18,_
+-0.490385166796742224403498152027E-19,_
+ 0.120373448234833217166664609324E-19,_
+-0.296628244714136825381453572575E-20,_
+ 0.733551238428807599242142328436E-21,_
+-0.181992414290851127344263485604E-21,_
+ 0.452862937429576060217359526404E-22,_
+-0.112998004375060961338906717853E-22,_
+ 0.282668125129011656923764408445E-23,_
+-0.708771797716904961666732640699E-24,_
+ 0.178110452401870951534401530034E-24,_
+-0.448500407661896357312006142358E-25,_
+ 0.113154029257547662245053090840E-25,_
+-0.285995789977932163790414326136E-26,_
+ 0.724077580692267361758172726753E-27,_
+-0.183613223412577898050666710105E-27,_
+ 0.466312873522730486582600122073E-28,_
+-0.118595958891902887946724005478E-28,_
+ 0.302029059055671310731137614875E-29,_
+-0.770165054816636606098827057102E-30]
+--R 
+--R
+--R   (9)
+--R   [2.4551335387 8129528673 420457043, - 0.1624383791 3037652439 6002276856,
+--R    0.0449575308 0935726414 8078541719 3,
+--R    - 0.0067415786 7998922998 8487188350 5,
+--R    - 0.0013066971 4280329428 0515993413 87,
+--R    0.0013810831 4600072576 0202020898 2,
+--R    - 0.0005850228 7901596579 8687368242 394,
+--R    0.0001749299 3410789197 0038740976 432,
+--R    - 0.0000404728 1499052930 3552286933 38,
+--R    0.0000072171 0241217099 7500357526 00049,
+--R    - 0.8612776970 1986775241 4815450193 E -6,
+--R    - 0.2514475296 5322559777 9084739054 E -9,
+--R    0.3794747138 2014951081 4074505574 E -7,
+--R    - 0.1442117969 5211980616 0265640172 E -7,
+--R    0.3935049295 9761013108 7190848042 E -8,
+--R    - 0.9284689401 0633175304 7289210353 E -9,
+--R    0.2031789568 0065461336 6090995698 E -9,
+--R    - 0.4292498504 9923683142 7918026902 E -10,
+--R    0.8992647177 7812393526 8001544182 E -11,
+--R    - 0.1900869118 4121097524 2396635722 E -11,
+--R    0.4092198912 2237383452 6121178338 E -12,
+--R    - 0.8999253437 2931901982 5435824585 E -13,
+--R    0.2019654670 8242638335 4948543451 E -13,
+--R    - 0.4612930261 3830820719 4950531726 E -14,
+--R    0.1069023072 9386369566 8857256409 E -14,
+--R    - 0.2507030070 5700729569 2572254042 E -15,
+--R    0.5937322503 7915516070 6073763509 E -16,
+--R    - 0.1417734582 4376625234 4732005648 E -16,
+--R    0.3409203754 3608089342 6806402093 E -17,
+--R    - 0.8248290269 5054937928 8702529656 E -18,
+--R    0.2006369712 6214423139 8824095937 E -18,
+--R    - 0.4903851667 9674222440 3498152027 E -19,
+--R    0.1203734482 3483321716 6664609324 E -19,
+--R    - 0.2966282447 1413682538 1453572575 E -20,
+--R    0.7335512384 2880759924 2142328436 E -21,
+--R    - 0.1819924142 9085112734 4263485604 E -21,
+--R    0.4528629374 2957606021 7359526404 E -22,
+--R    - 0.1129980043 7506096133 8906717853 E -22,
+--R    0.2826681251 2901165692 3764408445 E -23,
+--R    - 0.7087717977 1690496166 6732640699 E -24,
+--R    0.1781104524 0187095153 4401530034 E -24,
+--R    - 0.4485004076 6189635731 2006142358 E -25,
+--R    0.1131540292 5754766224 505309084 E -25,
+--R    - 0.2859957899 7793216379 0414326136 E -26,
+--R    0.7240775806 9226736175 8172726753 E -27,
+--R    - 0.1836132234 1257789805 0666710105 E -27,
+--R    0.4663128735 2273048658 2600122073 E -28,
+--R    - 0.1185959588 9190288794 6724005478 E -28,
+--R    0.3020290590 5567131073 1137614875 E -29,
+--R    - 0.7701650548 1663660609 8827057102 E -30]
+--R                                                             Type: List Float
+--E 8
+
+@
+In the following table there are 4 columns. The first column
+is the argument of Ei(x) shown in Table 4 in \cite{1}. The second
+column is the exact value shown in the table. Column 3 is the
+value returned by Axiom and column 4 is the difference.
+See special.spad.dvi for details.
+
+<<*>>=
+--S 9 of 20
+[[4.0,1.43820803145448278470968670330,_
+  Ei4(4.0),Ei4(4.0)-1.43820803145448278470968670330],_
+[4.5,1.39641902962974607100674523183,_
+  Ei4(4.5), Ei4(4.5)-1.39641902962974607100674523183],_
+[5.0,1.35383127745528597790189174047,_
+  Ei4(5.0),Ei4(5.0)-1.35383127745528597790189174047],_
+[5.5,1.31414356574211924541219816991,_
+  Ei4(5.5),Ei4(5.5)-1.31414356574211924541219816991],_
+[6.0,1.27888386048956161892314099578,_
+  Ei4(6.0),Ei4(6.0)-1.27888386048956161892314099578],_
+[6.5,1.24839115500170148640741941387,_
+  Ei4(6.5),Ei4(6.5)-1.24839115500170148640741941387],_
+[7.0,1.22240805236053105903656846622,_
+  Ei4(7.0),Ei4(7.0)-1.22240805236053105903656846622],_
+[7.5,1.20042149959963078643879158950,_
+  Ei4(7.5),Ei4(7.5)-1.20042149959963078643879158950],_
+[8.0,1.18184798698720797317739362644,_
+  Ei4(8.0),Ei4(8.0)-1.18184798698720797317739362644],_
+[8.5,1.16612652581174849439918142965,_
+  Ei4(8.5),Ei4(8.5)-1.16612652581174849439918142965],_
+[9.0,1.15275920870892481322396814952,_
+  Ei4(9.0),Ei4(9.0)-1.15275920870892481322396814952],_
+[9.5,1.14132347595262420155338560641,_
+  Ei4(9.5),Ei4(9.5)-1.14132347595262420155338560641],_
+[10.0,1.13147020473410778034051681355,_
+  Ei4(10.0),Ei4(10.0)-1.13147020473410778034051681355],_
+[10.5,1.12291557001776060642888630755,_
+  Ei4(10.5),Ei4(10.5)-1.12291557001776060642888630755],_
+[11.0,1.11543093899803844164779434229,_
+  Ei4(11.0),Ei4(11.0)-1.11543093899803844164779434229],_
+[11.5,1.10883292630507730586855234934,_
+  Ei4(11.5),Ei4(11.5)-1.10883292630507730586855234934],_
+[12.0,1.10297454490675907267241234953,_
+  Ei4(12.0),Ei4(12.0)-1.10297454490675907267241234953]]
+--R 
+--R
+--R   (10)
+--R   [[4.,1.4382080314544827,1.4382080314544827,0.],
+--R    [4.5,1.3964190296297461,1.3964190296297465,4.4408920985006262E-16],
+--R    [5.,1.3538312774552861,1.3538312774552856,- 4.4408920985006262E-16],
+--R    [5.5,1.3141435657421192,1.314143565742119,- 2.2204460492503131E-16],
+--R    [6.,1.2788838604895616,1.2788838604895618,2.2204460492503131E-16],
+--R    [6.5,1.2483911550017015,1.2483911550017011,- 4.4408920985006262E-16],
+--R    [7.,1.222408052360531,1.222408052360531,0.],
+--R    [7.5,1.2004214995996307,1.2004214995996305,- 2.2204460492503131E-16],
+--R    [8.,1.1818479869872081,1.1818479869872081,0.],
+--R    [8.5,1.1661265258117486,1.1661265258117477,- 8.8817841970012523E-16],
+--R    [9.,1.1527592087089249,1.1527592087089251,2.2204460492503131E-16],
+--R    [9.5,1.1413234759526243,1.1413234759526236,- 6.6613381477509392E-16],
+--R    [10.,1.1314702047341079,1.1314702047341079,0.],
+--R    [10.5,1.1229155700177607,1.1229155700177604,- 2.2204460492503131E-16],
+--R    [11.,1.1154309389980384,1.115430938998039,6.6613381477509392E-16],
+--R    [11.5,1.1088329263050773,1.1088329263050771,- 2.2204460492503131E-16],
+--R    [12.,1.1029745449067592,1.1029745449067592,0.]]
+--R                               Type: List List OnePointCompletion DoubleFloat
+--E 9
+
+@
+These are the Chebyshev coefficients used by Axiom in the range
+$(12 \le x \le 32)$ in the polynomial
+$$\sum_{k=0}^{47}\ ^{'}{A_kT_k(t)}$$
+with the scaling factor $t=(x-22)/10$
+
+<<*>>=
+--S 10 of 20
+eChebyshev:=[_
+ 0.211702864043698668329789991614E1,_
+-0.320423727375485794990618303177E-01,_
+ 0.889173207735316835890182400335E-02,_
+-0.250795280518929937088352442063E-02,_
+ 0.720278946595987548875760902487E-03,_
+-0.210349005850113053423531441256E-03,_
+ 0.620573231827693216588857730842E-04,_
+-0.182656674981670265449155689733E-04,_
+ 0.527065157528936375807788296811E-05,_ --? 7560 or 7580?
+-0.145966654761994575323066719367E-05,_
+ 0.378171997358963671980484193981E-06,_
+-0.884258128284071920077971589012E-07,_
+ 0.174174919853839361377350309156E-07,_
+-0.231351774704369063506474480152E-08,_
+-0.122860981918086238832104835230E-09,_
+ 0.234996623632286370478311381926E-09,_
+-0.110071940102726287690738963049E-09,_
+ 0.384827515786120711149705563369E-10,_
+-0.114844096749001589658439301603E-10,_
+ 0.305687629308852082630893626200E-11,_
+-0.738827872928473566454163131431E-12,_
+ 0.163093309416594110564148013749E-12,_
+-0.327698937331271249657111774748E-13,_
+ 0.589811434707131961711164283918E-14,_
+-0.909970763595649204643554720718E-15,_
+ 0.104075238266955386585405697541E-15,_
+-0.180981542605922793227163355935E-17,_
+-0.377709884256394773369593494417E-17,_
+ 0.158033290102847957136759888420E-17,_
+-0.468429175880882730648433752957E-18,_
+ 0.119951685259198093707533478542E-18,_
+-0.282359474984186517679349931117E-19,_
+ 0.629373806564463522627520190349E-20,_
+-0.135241024950479756305343973177E-20,_
+ 0.283710605385529141590980426210E-21,_
+-0.586700742024638323531936371015E-22,_
+ 0.120524763609547311112449686917E-22,_
+-0.247444661699884869728416011246E-23,_
+ 0.509996258583785008142986465688E-24,_
+-0.105838257877542240887093294733E-24,_
+ 0.221527624507048278566429387155E-25,_
+-0.467927875475696258671852546231E-26,_
+ 0.997287299060207704824269828079E-27,_
+-0.214326794521678804591907805844E-27,_
+ 0.464065690883818114338414829515E-28,_
+-0.101144734921151390948461800780E-28,_
+ 0.221721152271007711093046878345E-29,_
+-0.488489046924378553224914645512E-30]
+--R 
+--R
+--R   (11)
+--R   [2.1170286404 3698668329 789991614, - 0.0320423727 3754857949 9061830317 7,
+--R    0.0088917320 7735316835 8901824003 35,
+--R    - 0.0025079528 0518929937 0883524420 63,
+--R    0.0007202789 4659598754 8875760902 487,
+--R    - 0.0002103490 0585011305 3423531441 256,
+--R    0.0000620573 2318276932 1658885773 0842,
+--R    - 0.0000182656 6749816702 6544915568 9733,
+--R    0.0000052706 5157528936 3758077882 96811,
+--R    - 0.0000014596 6654761994 5753230667 19367,
+--R    0.3781719973 5896367198 0484193981 E -6,
+--R    - 0.8842581282 8407192007 7971589012 E -7,
+--R    0.1741749198 5383936137 7350309156 E -7,
+--R    - 0.2313517747 0436906350 6474480152 E -8,
+--R    - 0.1228609819 1808623883 210483523 E -9,
+--R    0.2349966236 3228637047 8311381926 E -9,
+--R    - 0.1100719401 0272628769 0738963049 E -9,
+--R    0.3848275157 8612071114 9705563369 E -10,
+--R    - 0.1148440967 4900158965 8439301603 E -10,
+--R    0.3056876293 0885208263 08936262 E -11,
+--R    - 0.7388278729 2847356645 4163131431 E -12,
+--R    0.1630933094 1659411056 4148013749 E -12,
+--R    - 0.3276989373 3127124965 7111774748 E -13,
+--R    0.5898114347 0713196171 1164283918 E -14,
+--R    - 0.9099707635 9564920464 3554720718 E -15,
+--R    0.1040752382 6695538658 5405697541 E -15,
+--R    - 0.1809815426 0592279322 7163355935 E -17,
+--R    - 0.3777098842 5639477336 9593494417 E -17,
+--R    0.1580332901 0284795713 675988842 E -17,
+--R    - 0.4684291758 8088273064 8433752957 E -18,
+--R    0.1199516852 5919809370 7533478542 E -18,
+--R    - 0.2823594749 8418651767 9349931117 E -19,
+--R    0.6293738065 6446352262 7520190349 E -20,
+--R    - 0.1352410249 5047975630 5343973177 E -20,
+--R    0.2837106053 8552914159 098042621 E -21,
+--R    - 0.5867007420 2463832353 1936371015 E -22,
+--R    0.1205247636 0954731111 2449686917 E -22,
+--R    - 0.2474446616 9988486972 8416011246 E -23,
+--R    0.5099962585 8378500814 2986465688 E -24,
+--R    - 0.1058382578 7754224088 7093294733 E -24,
+--R    0.2215276245 0704827856 6429387155 E -25,
+--R    - 0.4679278754 7569625867 1852546231 E -26,
+--R    0.9972872990 6020770482 4269828079 E -27,
+--R    - 0.2143267945 2167880459 1907805844 E -27,
+--R    0.4640656908 8381811433 8414829515 E -28,
+--R    - 0.1011447349 2115139094 846180078 E -28,
+--R    0.2217211522 7100771109 3046878345 E -29,
+--R    - 0.4884890469 2437855322 4914645512 E -30]
+--R                                                             Type: List Float
+--E 10
+
+@
+In the following table there are 4 columns. The first column
+is the argument of Ei(x) shown in Table 4 in \cite{1}. The second
+column is the exact value shown in the table. Column 3 is the
+value returned by Axiom and column 4 is the difference.
+See special.spad.dvi for details.
+
+<<*>>=
+--S 11 of 20
+[[12.00,1.10297454490675907267241234952,_
+  Ei5(12.00),Ei5(12.00)-1.10297454490675907267241234952],_
+[13.25,1.09084489821547569266468614954,_
+  Ei5(13.25),Ei5(13.25)-1.09084489821547569266468614954],_
+[14.50,1.08135139573519128506346643795,_
+  Ei5(14.50),Ei5(14.50)-1.08135139573519128506346643795],_
+[15.75,1.07370138419975723712157900374,_
+  Ei5(15.75),Ei5(15.75)-1.07370138419975723712157900374],_
+[17.00,1.06739369195853783129572196197,_
+  Ei5(17.00),Ei5(17.00)-1.06739369195853783129572196197],_
+[18.25,1.06209660862215024268372647556,_
+  Ei5(18.25),Ei5(18.25)-1.06209660862215024268372647556],_
+[19.50,1.05758134215872503195393949410,_
+  Ei5(19.50),Ei5(19.50)-1.05758134215872503195393949410],_
+[20.75,1.05368445128940944082102194964,_
+  Ei5(20.75),Ei5(20.75)-1.05368445128940944082102194964],_
+[22.00,1.05028571968518979411780664532,_
+  Ei5(22.00),Ei5(22.00)-1.05028571968518979411780664532],_
+[23.25,1.04729455170532485811492365591,_
+  Ei5(23.25),Ei5(23.25)-1.04729455170532485811492365591],_
+[24.50,1.04464126790464363689761075289,_
+  Ei5(24.50),Ei5(24.50)-1.04464126790464363689761075289],_
+[25.75,1.04227133720232023885710928048,_
+  Ei5(25.75),Ei5(25.75)-1.04227133720232023885710928048],_
+[27.00,1.04014143832301043813713899754,_
+  Ei5(27.00),Ei5(27.00)-1.04014143832301043813713899754],_
+[28.25,1.03821670036014587680056548394,_
+  Ei5(28.25),Ei5(28.25)-1.03821670036014587680056548394],_
+[29.50,1.03646872629241184575154685419,_
+  Ei5(29.50),Ei5(29.50)-1.03646872629241184575154685419],_
+[30.75,1.03487414989647969472990938990,_
+  Ei5(30.75),Ei5(30.75)-1.03487414989647969472990938990],_
+[32.00,1.03341356421624104943493552567,_
+  Ei5(32.00),Ei5(32.00)-1.03341356421624104943493552567]]
+--R 
+--R
+--R   (12)
+--R   [[12.,1.1029745449067592,1.1029745449067585,- 6.6613381477509392E-16],
+--R    [13.25,1.0908448982154757,1.090844898215475,- 6.6613381477509392E-16],
+--R    [14.5,1.0813513957351912,1.0813513957351915,2.2204460492503131E-16],
+--R    [15.75,1.0737013841997571,1.0737013841997574,2.2204460492503131E-16],
+--R    [17.,1.0673936919585378,1.0673936919585385,6.6613381477509392E-16],
+--R    [18.25,1.0620966086221502,1.0620966086221502,0.],
+--R    [19.5,1.057581342158725,1.0575813421587252,2.2204460492503131E-16],
+--R    [20.75,1.0536844512894095,1.0536844512894095,0.],
+--R    [22.,1.0502857196851898,1.0502857196851898,0.],
+--R    [23.25,1.0472945517053249,1.0472945517053245,- 4.4408920985006262E-16],
+--R    [24.5,1.0446412679046437,1.0446412679046437,0.],
+--R    [25.75,1.0422713372023202,1.04227133720232,- 2.2204460492503131E-16],
+--R    [27.,1.0401414383230105,1.0401414383230101,- 4.4408920985006262E-16],
+--R    [28.25,1.0382167003601459,1.0382167003601459,0.],
+--R    [29.5,1.0364687262924119,1.0364687262924113,- 6.6613381477509392E-16],
+--R    [30.75,1.0348741498964797,1.0348741498964795,- 2.2204460492503131E-16],
+--R    [32.,1.033413564216241,1.0334135642162412,2.2204460492503131E-16]]
+--R                               Type: List List OnePointCompletion DoubleFloat
+--E 11
+
+@
+These are the Chebyshev coefficients used by Axiom in the range
+$(32 \le x < \infty)$ in the polynomial
+$$\sum_{k=0}^{46}\ ^{'}{A_kT_k(t)}$$
+with the scaling factor $t=(64/X)-1$
+
+<<*>>=
+
+--S 12 of 20
+fChebyshev:=[_
+ 0.203284394579616699087873844202E1,_
+ 0.166992045203136285147618434339E-01,_
+ 0.284528472436134680742489985325E-03,_
+ 0.756394435851620648948786693854E-05,_
+ 0.279897128945085915750484318090E-06,_
+ 0.135790182853453106952556392593E-07,_
+ 0.834359620204046925585610289412E-09,_
+ 0.637097172764024843827524337306E-10,_
+ 0.600724760881186123576083084850E-11,_
+ 0.702287617467977359075059216588E-12,_
+ 0.101830267370368769309667322152E-12,_
+ 0.176181290343088004040656741554E-13,_
+ 0.325082861423536069424072007647E-14,_
+ 0.507177002550581867881479300685E-15,_
+ 0.166517738704329429853520036957E-16,_
+-0.316675389079751440072410018963E-16,_
+-0.158840376366414151548423134074E-16,_
+-0.417551325613801883089626455063E-17,_
+-0.289234774970714188202868862358E-18,_
+ 0.280062590339660807289978777339E-18,_
+ 0.132293863953927089140532005364E-18,_
+ 0.180444744417730199585334811191E-19,_
+-0.790538408652261656202021080364E-20,_
+-0.443571136636957344718167314045E-20,_
+-0.426410399497810261760579779746E-21,_
+ 0.392010176693714390725625388636E-21,_
+ 0.152737805134396364472804486402E-21,_
+-0.102484952704949060786953149788E-22,_
+-0.213490787477108937948904287231E-22,_
+-0.323913947516023687614279789345E-23,_
+ 0.214218376229645970296249355934E-23,_
+ 0.823460941961899553169207838151E-24,_
+-0.152465282962067210811495038147E-24,_
+-0.137820828248824401290438126477E-24,_
+ 0.213131120142873706791513005998E-26,_
+ 0.201264965187132665859213006507E-25,_
+ 0.199553566205637402320607178286E-26,_
+-0.279899581220179711426020884464E-26,_
+-0.553451183050700250949784942560E-27,_
+ 0.388499542268455253129749000696E-27,_
+ 0.112130440723307012540043264712E-27,_
+-0.556656828674459488057823816866E-28,_
+-0.204548261246513576288865878722E-28,_
+ 0.845381406448938089437361193598E-29,_
+ 0.356575515120151526590791715785E-29,_
+-0.138365242347797751810195772006E-29,_
+-0.606214265320934505767865286306E-30]
+--R 
+--R
+--R   (13)
+--R   [2.0328439457 9616699087 873844202, 0.0166992045 2031362851 4761843433 9,
+--R    0.0002845284 7243613468 0742489985 325,
+--R    0.0000075639 4435851620 6489487866 93854,
+--R    0.2798971289 4508591575 048431809 E -6,
+--R    0.1357901828 5345310695 2556392593 E -7,
+--R    0.8343596202 0404692558 5610289412 E -9,
+--R    0.6370971727 6402484382 7524337306 E -10,
+--R    0.6007247608 8118612357 608308485 E -11,
+--R    0.7022876174 6797735907 5059216588 E -12,
+--R    0.1018302673 7036876930 9667322152 E -12,
+--R    0.1761812903 4308800404 0656741554 E -13,
+--R    0.3250828614 2353606942 4072007647 E -14,
+--R    0.5071770025 5058186788 1479300685 E -15,
+--R    0.1665177387 0432942985 3520036957 E -16,
+--R    - 0.3166753890 7975144007 2410018963 E -16,
+--R    - 0.1588403763 6641415154 8423134074 E -16,
+--R    - 0.4175513256 1380188308 9626455063 E -17,
+--R    - 0.2892347749 7071418820 2868862358 E -18,
+--R    0.2800625903 3966080728 9978777339 E -18,
+--R    0.1322938639 5392708914 0532005364 E -18,
+--R    0.1804447444 1773019958 5334811191 E -19,
+--R    - 0.7905384086 5226165620 2021080364 E -20,
+--R    - 0.4435711366 3695734471 8167314045 E -20,
+--R    - 0.4264103994 9781026176 0579779746 E -21,
+--R    0.3920101766 9371439072 5625388636 E -21,
+--R    0.1527378051 3439636447 2804486402 E -21,
+--R    - 0.1024849527 0494906078 6953149788 E -22,
+--R    - 0.2134907874 7710893794 8904287231 E -22,
+--R    - 0.3239139475 1602368761 4279789345 E -23,
+--R    0.2142183762 2964597029 6249355934 E -23,
+--R    0.8234609419 6189955316 9207838151 E -24,
+--R    - 0.1524652829 6206721081 1495038147 E -24,
+--R    - 0.1378208282 4882440129 0438126477 E -24,
+--R    0.2131311201 4287370679 1513005998 E -26,
+--R    0.2012649651 8713266585 9213006507 E -25,
+--R    0.1995535662 0563740232 0607178286 E -26,
+--R    - 0.2798995812 2017971142 6020884464 E -26,
+--R    - 0.5534511830 5070025094 978494256 E -27,
+--R    0.3884995422 6845525312 9749000696 E -27,
+--R    0.1121304407 2330701254 0043264712 E -27,
+--R    - 0.5566568286 7445948805 7823816866 E -28,
+--R    - 0.2045482612 4651357628 8865878722 E -28,
+--R    0.8453814064 4893808943 7361193598 E -29,
+--R    0.3565755151 2015152659 0791715785 E -29,
+--R    - 0.1383652423 4779775181 0195772006 E -29,
+--R    - 0.6062142653 2093450576 7865286306 E -30]
+--R                                                             Type: List Float
+--E 12
+
+@
+In the following table there are 4 columns. The first column
+is the argument of Ei(x) shown in Table 4 in \cite{1}. The second
+column is the exact value shown in the table. Column 3 is the
+value returned by Axiom and column 4 is the difference.
+See special.spad.dvi for details.
+
+<<*>>=
+--S 13 of 20
+[[32,1.03341356421624104943493552567,_
+  Ei6(32.0),Ei6(32.0)-1.03341356421624104943493552567],_
+[34+2/15,1.03118521236465926355875784663,_
+  Ei6(34.0+2/15),Ei6(34.0+2/15)-1.03118521236465926355875784663],_
+[36+4/7,1.02897740410580800863378435059,_
+  Ei6(36.0+4/7),Ei6(36.0+4/7)-1.02897740410580800863378435059],_
+[39+5/13,1.02678968370902852450984510823,_
+  Ei6(39.0+5/13),Ei6(39.0+5/13)-1.02678968370902852450984510823],_
+[42+2/3,1.02462161468107839101187804247,_
+  Ei6(42.0+2/3),Ei6(42.0+2/3)-1.02462161468107839101187804247],_
+[46+6/11,1.02247277840542059591275364791,_
+  Ei6(46.0+6/11),Ei6(46.0+6/11)-1.02247277840542059591275364791],_
+[51+1/5,1.02034277293078377487217829808,_
+  Ei6(51.0+1/5),Ei6(51.0+1/5)-1.02034277293078377487217829808],_
+[56+8/9,1.01823121188483269682337017143,_
+  Ei6(56.0+8/9),Ei6(56.0+8/9)-1.01823121188483269682337017143],_
+[64,1.01613772349432532170357100831,_
+  Ei6(64.0),Ei6(64.0)-1.01613772349432532170357100831],_
+[73+1/7,1.01406194969697133145942329335,_
+  Ei6(73.0+1/7),Ei6(73.0+1/7)-1.01406194969697133145942329335],_
+[85+1/3,1.01200354533298848201864466702,_
+  Ei6(85.0+1/3),Ei6(85.0+1/3)-1.01200354533298848201864466702],_
+[102+2/5,1.00996217740644975574367545570,_
+  Ei6(102.0+2/5),Ei6(102.0+2/5)-1.00996217740644975574367545570],_
+[128,1.00793752440814018281776821694,_
+  Ei6(128.0),Ei6(128.0)-1.00793752440814018281776821694],_
+[170+2/3,1.00592927569292911294663030932,_
+  Ei6(170.0+2/3),Ei6(170.0+2/3)-1.00592927569292911294663030932],_
+[256,1.00393713090569862788009078297,_
+  Ei6(256.0),Ei6(256.0)-1.00393713090569862788009078297],_
+[512,1.00196079945071192531337468473,_
+  Ei6(512.0),Ei6(512.0)-1.00196079945071192531337468473],_
+[infinity(),1.00000000000000000000000000001,_
+  Ei6(infinity()),Ei6(infinity())-1.00000000000000000000000000001]]
+--R 
+--R
+--R   (14)
+--R   [[32.,1.033413564216241,1.0334135642162412,2.2204460492503131E-16],
+--R
+--R      512
+--R     [---, 1.0311852123 6465926355 875784663, 1.0311852123646588,
+--R       15
+--R      - 4.4408920985006262E-16]
+--R     ,
+--R     256
+--R    [---,1.0289774041 0580800863 378435059,1.028977404105808,0.],
+--R      7
+--R     512
+--R    [---,1.0267896837 0902852450 984510823,1.0267896837090285,0.],
+--R      13
+--R
+--R      128
+--R     [---, 1.0246216146 8107839101 187804247, 1.0246216146810787,
+--R       3
+--R      2.2204460492503131E-16]
+--R     ,
+--R     512
+--R    [---,1.0224727784 0542059591 275364791,1.0224727784054206,0.],
+--R      11
+--R     256
+--R    [---,1.0203427729 3078377487 217829808,1.0203427729307837,0.],
+--R      5
+--R
+--R      512
+--R     [---, 1.0182312118 8483269682 337017143, 1.0182312118848329,
+--R       9
+--R      2.2204460492503131E-16]
+--R     ,
+--R    [64.,1.0161377234943254,1.0161377234943252,- 2.2204460492503131E-16],
+--R
+--R      512
+--R     [---, 1.0140619496 9697133145 942329335, 1.0140619496969712,
+--R       7
+--R      - 2.2204460492503131E-16]
+--R     ,
+--R     256
+--R    [---,1.0120035453 3298848201 864466702,1.0120035453329885,0.],
+--R      3
+--R
+--R      512
+--R     [---, 1.0099621774 0644975574 36754557, 1.0099621774064493,
+--R       5
+--R      - 4.4408920985006262E-16]
+--R     ,
+--R    [128.,1.0079375244081401,1.0079375244081401,0.],
+--R
+--R      512
+--R     [---, 1.0059292756 9292911294 663030932, 1.0059292756929286,
+--R       3
+--R      - 4.4408920985006262E-16]
+--R     ,
+--R    [256.,1.0039371309056986,1.0039371309056981,- 4.4408920985006262E-16],
+--R    [512.,1.001960799450712,1.0019607994507116,- 4.4408920985006262E-16],
+--R    [infinity,1.,1.,0.]]
+--R                                                          Type: List List Any
+--E 13
+
+@
+In the following table we show values returned by 
+$(Ei(x)-\log x-\gamma)/x$ where gamma is as shown above.
+Abramowitz and Stegun, ``Handbook of Mathematical Functions'',
+Dover Publications, Inc. New York 1965. p 238
+
+<<*>>=
+--S 14 of 20
+h(x:DFLOAT):DFLOAT==
+  x=0.0::DFLOAT => 1.0 
+  y:DFLOAT:=retract(Ei(x))
+  (y-log(x)-gamma)/x
+--R 
+--R   Function declaration h : DoubleFloat -> DoubleFloat has been added 
+--R      to workspace.
+--R                                                                   Type: Void
+--E 14
+
+--S 15 of 20
+[[0.00,1.000000000,h(0.00),h(0.00)-1.000000000],_
+ [0.01,1.002505566,h(0.01),h(0.01)-1.002505566],_
+ [0.02,1.005022306,h(0.02),h(0.02)-1.005022306],_
+ [0.03,1.007550283,h(0.03),h(0.03)-1.007550283],_
+ [0.04,1.010089560,h(0.04),h(0.04)-1.010089560],_
+ [0.05,1.012640202,h(0.05),h(0.05)-1.012640202],_
+ [0.06,1.015202272,h(0.06),h(0.06)-1.015202272],_
+ [0.07,1.017775836,h(0.07),h(0.07)-1.017775836],_
+ [0.08,1.020360958,h(0.08),h(0.08)-1.020360958],_
+ [0.09,1.022957705,h(0.09),h(0.09)-1.022957705],_
+ [0.10,1.025566141,h(0.10),h(0.10)-1.025566141],_
+ [0.11,1.028186335,h(0.11),h(0.11)-1.028186335],_
+ [0.12,1.030818352,h(0.12),h(0.12)-1.030818352],_
+ [0.13,1.033462259,h(0.13),h(0.13)-1.033462259],_
+ [0.14,1.036118125,h(0.14),h(0.14)-1.036118125],_
+ [0.15,1.038786018,h(0.15),h(0.15)-1.038786018],_
+ [0.16,1.041466006,h(0.16),h(0.16)-1.041466006],_
+ [0.17,1.044158158,h(0.17),h(0.17)-1.044158158],_
+ [0.18,1.046862544,h(0.18),h(0.18)-1.046862544],_
+ [0.19,1.049579234,h(0.19),h(0.19)-1.049579234],_
+ [0.20,1.052308298,h(0.20),h(0.20)-1.052308298],_
+ [0.21,1.055049807,h(0.21),h(0.21)-1.055049807],_
+ [0.22,1.057803833,h(0.22),h(0.22)-1.057803833],_
+ [0.23,1.060570446,h(0.23),h(0.23)-1.060570446],_
+ [0.24,1.063349719,h(0.24),h(0.24)-1.063349719],_
+ [0.25,1.066141726,h(0.25),h(0.25)-1.066141726],_
+ [0.26,1.068946539,h(0.26),h(0.26)-1.068946539],_
+ [0.27,1.071764232,h(0.27),h(0.27)-1.071764232],_
+ [0.28,1.074594879,h(0.28),h(0.28)-1.074594879],_
+ [0.29,1.077438555,h(0.29),h(0.29)-1.077438555],_
+ [0.30,1.080295334,h(0.30),h(0.30)-1.080295334],_
+ [0.31,1.083165293,h(0.31),h(0.31)-1.083165293],_
+ [0.32,1.086048507,h(0.32),h(0.32)-1.086048507],_
+ [0.33,1.088945053,h(0.33),h(0.33)-1.088945053],_
+ [0.34,1.091855008,h(0.34),h(0.34)-1.091855008],_
+ [0.35,1.094778451,h(0.35),h(0.35)-1.094778451],_
+ [0.36,1.097715458,h(0.36),h(0.36)-1.097715458],_
+ [0.37,1.100666108,h(0.37),h(0.37)-1.100666108],_
+ [0.38,1.103630481,h(0.38),h(0.38)-1.103630481],_
+ [0.39,1.106608656,h(0.39),h(0.39)-1.106608656],_
+ [0.40,1.109600714,h(0.40),h(0.40)-1.109600714],_
+ [0.41,1.112606735,h(0.41),h(0.41)-1.112606735],_
+ [0.42,1.115626800,h(0.42),h(0.42)-1.115626800],_
+ [0.43,1.118660991,h(0.43),h(0.43)-1.118660991],_
+ [0.44,1.121709391,h(0.44),h(0.44)-1.121709391],_
+ [0.45,1.124772082,h(0.45),h(0.45)-1.124772082],_
+ [0.46,1.127849147,h(0.46),h(0.46)-1.127849147],_
+ [0.47,1.130940671,h(0.47),h(0.47)-1.130940671],_
+ [0.48,1.134046738,h(0.48),h(0.48)-1.134046738],_
+ [0.49,1.137167432,h(0.49),h(0.49)-1.137167432],_
+ [0.50,1.140302841,h(0.50),h(0.50)-1.140302841]]
+--R 
+--R   Compiling function h with type DoubleFloat -> DoubleFloat 
+--R
+--R   (16)
+--R   [[0.,1.,1.,0.],
+--R    [1.0E-2,1.002505566,1.002505565988876,- 1.1123990617534218E-11],
+--R    [2.0E-2,1.0050223060000001,1.0050223058229502,- 1.7704993027223281E-10],
+--R
+--R     [2.9999999999999999E-2, 1.007550283, 1.0075502826056368,
+--R      - 3.9436320875552155E-10]
+--R     ,
+--R
+--R     [4.0000000000000001E-2, 1.0100895599999999, 1.0100895598460362,
+--R      - 1.5396373065357238E-10]
+--R     ,
+--R
+--R     [5.0000000000000003E-2, 1.012640202, 1.0126402014616676,
+--R      - 5.3833248969681335E-10]
+--R     ,
+--R
+--R     [5.9999999999999998E-2, 1.015202272, 1.0152022717813329,
+--R      - 2.1866708443951666E-10]
+--R     ,
+--R
+--R     [7.0000000000000007E-2, 1.017775836, 1.0177758355479642,
+--R      - 4.5203574217111964E-10]
+--R     ,
+--R
+--R     [8.0000000000000002E-2, 1.0203609579999999, 1.0203609579215664,
+--R      - 7.8433481931483584E-11]
+--R     ,
+--R
+--R     [8.9999999999999997E-2, 1.0229577050000001, 1.0229577044820872,
+--R      - 5.1791282373869763E-10]
+--R     ,
+--R
+--R     [0.10000000000000001, 1.0255661410000001, 1.0255661412323602,
+--R      2.3236013113603349E-10]
+--R     ,
+--R    [0.11,1.028186335,1.0281863346010778,- 3.989222285838423E-10],
+--R    [0.12,1.030818352,1.0308183514457605,- 5.5423954314903767E-10],
+--R    [0.13,1.033462259,1.0334622590557541,5.5754068029045811E-11],
+--R    [0.14000000000000001,1.036118125,1.0361181251552536,1.5525358776358189E-10],
+--R
+--R     [0.14999999999999999, 1.0387860179999999, 1.0387860179063644,
+--R      - 9.3635543763070928E-11]
+--R     ,
+--R    [0.16,1.0414660060000001,1.0414660059121499,- 8.7850171581749237E-11],
+--R
+--R     [0.17000000000000001, 1.0441581579999999, 1.0441581582197257,
+--R      2.1972579311579921E-10]
+--R     ,
+--R
+--R     [0.17999999999999999, 1.0468625439999999, 1.0468625443233892,
+--R      3.233893153264944E-10]
+--R     ,
+--R    [0.19,1.0495792340000001,1.0495792341677359,1.6773582522944253E-10],
+--R    [0.20000000000000001,1.052308298,1.0523082981508358,1.5083578830399347E-10],
+--R
+--R     [0.20999999999999999, 1.0550498070000001, 1.055049807127405,
+--R      1.2740497545848939E-10]
+--R     ,
+--R    [0.22,1.0578038329999999,1.0578038324120198,- 5.8798010904581588E-10],
+--R
+--R     [0.23000000000000001, 1.0605704460000001, 1.0605704457823433,
+--R      - 2.1765678148710776E-10]
+--R     ,
+--R
+--R     [0.23999999999999999, 1.0633497190000001, 1.0633497194823853,
+--R      4.8238524286148277E-10]
+--R     ,
+--R    [0.25,1.0661417259999999,1.0661417262257755,2.2577562042158661E-10],
+--R
+--R     [0.26000000000000001, 1.0689465389999999, 1.0689465391990731,
+--R      1.9907320236711712E-10]
+--R     ,
+--R    [0.27000000000000002,1.071764232,1.0717642320650853,6.5085270506415327E-11],
+--R
+--R     [0.28000000000000003, 1.0745948789999999, 1.0745948789662336,
+--R      - 3.3766323070949511E-11]
+--R     ,
+--R
+--R     [0.28999999999999998, 1.0774385550000001, 1.0774385545279166,
+--R      - 4.7208348341598594E-10]
+--R     ,
+--R
+--R     [0.29999999999999999, 1.0802953340000001, 1.0802953338619241,
+--R      - 1.3807599508197654E-10]
+--R     ,
+--R    [0.31,1.083165293,1.0831652925698594,- 4.3014058981327707E-10],
+--R
+--R     [0.32000000000000001, 1.0860485070000001, 1.0860485067465939,
+--R      - 2.5340618492464273E-10]
+--R     ,
+--R
+--R     [0.33000000000000002, 1.088945053, 1.0889450529837443,
+--R      - 1.6255663481956617E-11]
+--R     ,
+--R    [0.34000000000000002,1.091855008,1.0918550083731842,3.7318415024856222E-10],
+--R
+--R     [0.34999999999999998, 1.094778451, 1.0947784505105673,
+--R      - 4.8943271657719833E-10]
+--R     ,
+--R
+--R     [0.35999999999999999, 1.0977154579999999, 1.0977154574988892,
+--R      - 5.0111070848402051E-10]
+--R     ,
+--R    [0.37,1.100666108,1.1006661079520708,- 4.7929216151487708E-11],
+--R    [0.38,1.1036304809999999,1.1036304809985678,- 1.4321877017664519E-12],
+--R
+--R     [0.39000000000000001, 1.1066086559999999, 1.1066086562850108,
+--R      2.8501090376664706E-10]
+--R     ,
+--R
+--R     [0.40000000000000002, 1.1096007139999999, 1.1096007139798676,
+--R      - 2.0132340239342739E-11]
+--R     ,
+--R    [0.40999999999999998,1.112606735,1.1126067347771349,- 2.228650597402293E-10]
+--R     ,
+--R    [0.41999999999999998,1.1156268,1.1156267999000615,- 9.9938501918472866E-11],
+--R    [0.42999999999999999,1.118660991,1.1186609911048895,1.0488943047448629E-10],
+--R    [0.44,1.121709391,1.1217093906846374,- 3.1536262490305944E-10],
+--R
+--R     [0.45000000000000001, 1.124772082, 1.1247720814728976,
+--R      - 5.2710236175812497E-10]
+--R     ,
+--R
+--R     [0.46000000000000002, 1.1278491470000001, 1.1278491468476701,
+--R      - 1.52329926450534E-10]
+--R     ,
+--R
+--R     [0.46999999999999997, 1.1309406710000001, 1.1309406707352239,
+--R      - 2.6477620096443388E-10]
+--R     ,
+--R
+--R     [0.47999999999999998, 1.1340467380000001, 1.134046737613986,
+--R      - 3.8601410956573545E-10]
+--R     ,
+--R    [0.48999999999999999,1.137167432,1.1371674325184589,5.1845883142220828E-10],
+--R    [0.5,1.140302841,1.1403028410431715,4.3171466401759062E-11]]
+--R                                                  Type: List List DoubleFloat
+--E 15
+
+@
+In the following table we show values returned by Ei(x).
+Abramowitz and Stegun, ``Handbook of Mathematical Functions'',
+Dover Publications, Inc. New York 1965. pp 239-241
+
+<<*>>=
+--S 16 of 20
+[[0.50,0.454219905,Ei(0.50),Ei(0.50)-0.454219905],_
+ [0.51,0.487032167,Ei(0.51),Ei(0.51)-0.487032167],_
+ [0.52,0.519530633,Ei(0.52),Ei(0.52)-0.519530633],_
+ [0.53,0.551730445,Ei(0.53),Ei(0.53)-0.551730445],_
+ [0.54,0.583645931,Ei(0.54),Ei(0.54)-0.583645931],_
+ [0.55,0.615290657,Ei(0.55),Ei(0.55)-0.615290657],_
+ [0.56,0.646677490,Ei(0.56),Ei(0.56)-0.646677490],_
+ [0.57,0.677818642,Ei(0.57),Ei(0.57)-0.677818642],_
+ [0.58,0.708725720,Ei(0.58),Ei(0.58)-0.708725720],_
+ [0.59,0.739409764,Ei(0.59),Ei(0.59)-0.739409764],_
+ [0.60,0.769881290,Ei(0.60),Ei(0.60)-0.769881290],_
+ [0.61,0.800150320,Ei(0.61),Ei(0.61)-0.800150320],_
+ [0.62,0.830226417,Ei(0.62),Ei(0.62)-0.830226417],_
+ [0.63,0.860118716,Ei(0.63),Ei(0.63)-0.860118716],_
+ [0.64,0.889835949,Ei(0.64),Ei(0.64)-0.889835949],_
+ [0.65,0.919386468,Ei(0.65),Ei(0.65)-0.919386468],_
+ [0.66,0.948778277,Ei(0.66),Ei(0.66)-0.948778277],_
+ [0.67,0.978019042,Ei(0.67),Ei(0.67)-0.978019042],_
+ [0.68,1.007116121,Ei(0.68),Ei(0.68)-1.007116121],_
+ [0.69,1.036076576,Ei(0.69),Ei(0.69)-1.036076576],_
+ [0.70,1.064907195,Ei(0.70),Ei(0.70)-1.064907195],_
+ [0.71,1.093614501,Ei(0.71),Ei(0.71)-1.093614501],_
+ [0.72,1.122204777,Ei(0.72),Ei(0.72)-1.122204777],_
+ [0.73,1.150684069,Ei(0.73),Ei(0.73)-1.150684069],_
+ [0.74,1.179058208,Ei(0.74),Ei(0.74)-1.179058208],_
+ [0.75,1.207332816,Ei(0.75),Ei(0.75)-1.207332816],_
+ [0.76,1.235513319,Ei(0.76),Ei(0.76)-1.235513319],_
+ [0.77,1.263604960,Ei(0.77),Ei(0.77)-1.263604960],_
+ [0.78,1.291612805,Ei(0.78),Ei(0.78)-1.291612805],_
+ [0.79,1.319541753,Ei(0.79),Ei(0.79)-1.319541753],_
+ [0.80,1.347396548,Ei(0.80),Ei(0.80)-1.347396548],_
+ [0.81,1.375181783,Ei(0.81),Ei(0.81)-1.375181783],_
+ [0.82,1.402901910,Ei(0.82),Ei(0.82)-1.402901910],_
+ [0.83,1.430561245,Ei(0.83),Ei(0.83)-1.430561245],_
+ [0.84,1.458163978,Ei(0.84),Ei(0.84)-1.458163978],_
+ [0.85,1.485714176,Ei(0.85),Ei(0.85)-1.485714176],_
+ [0.86,1.513215791,Ei(0.86),Ei(0.86)-1.513215791],_
+ [0.87,1.540672664,Ei(0.87),Ei(0.87)-1.540672664],_
+ [0.88,1.568088534,Ei(0.88),Ei(0.88)-1.568088534],_
+ [0.89,1.595467036,Ei(0.89),Ei(0.89)-1.595467036],_
+ [0.90,1.622811714,Ei(0.90),Ei(0.90)-1.622811714],_
+ [0.91,1.650126019,Ei(0.91),Ei(0.91)-1.650126019],_
+ [0.92,1.677413317,Ei(0.92),Ei(0.92)-1.677413317],_
+ [0.93,1.704676891,Ei(0.93),Ei(0.93)-1.704676891],_
+ [0.94,1.731919946,Ei(0.94),Ei(0.94)-1.731919946],_
+ [0.95,1.759145612,Ei(0.95),Ei(0.95)-1.759145612],_
+ [0.96,1.786356947,Ei(0.96),Ei(0.96)-1.786356947],_
+ [0.97,1.813556941,Ei(0.97),Ei(0.97)-1.813556941],_
+ [0.98,1.840748519,Ei(0.98),Ei(0.98)-1.840748519],_
+ [0.99,1.867934543,Ei(0.99),Ei(0.99)-1.867934543],_
+ [1.00,1.895117816,Ei(1.00),Ei(1.00)-1.895117816],_
+ [1.01,1.922301085,Ei(1.01),Ei(1.01)-1.922301085],_
+ [1.02,1.949487042,Ei(1.02),Ei(1.02)-1.949487042],_
+ [1.03,1.976678325,Ei(1.03),Ei(1.03)-1.976678325],_
+ [1.04,2.003877525,Ei(1.04),Ei(1.04)-2.003877525],_
+ [1.05,2.031087184,Ei(1.05),Ei(1.05)-2.031087184],_
+ [1.06,2.058309800,Ei(1.06),Ei(1.06)-2.058309800],_
+ [1.07,2.085547825,Ei(1.07),Ei(1.07)-2.085547825],_
+ [1.08,2.112803672,Ei(1.08),Ei(1.08)-2.112803672],_
+ [1.09,2.140079712,Ei(1.09),Ei(1.09)-2.140079712],_
+ [1.10,2.167378280,Ei(1.10),Ei(1.10)-2.167378280],_
+ [1.11,2.194701672,Ei(1.11),Ei(1.11)-2.194701672],_
+ [1.12,2.222052152,Ei(1.12),Ei(1.12)-2.222052152],_
+ [1.13,2.249431949,Ei(1.13),Ei(1.13)-2.249431949],_
+ [1.14,2.276843260,Ei(1.14),Ei(1.14)-2.276843260],_
+ [1.15,2.304288252,Ei(1.15),Ei(1.15)-2.304288252],_
+ [1.16,2.331769062,Ei(1.16),Ei(1.16)-2.331769062],_
+ [1.17,2.359287800,Ei(1.17),Ei(1.17)-2.359287800],_
+ [1.18,2.386846549,Ei(1.18),Ei(1.18)-2.386846549],_
+ [1.19,2.414447367,Ei(1.19),Ei(1.19)-2.414447367],_
+ [1.20,2.442092285,Ei(1.20),Ei(1.20)-2.442092285],_
+ [1.21,2.469783315,Ei(1.21),Ei(1.21)-2.469783315],_
+ [1.22,2.497522442,Ei(1.22),Ei(1.22)-2.497522442],_
+ [1.23,2.525311634,Ei(1.23),Ei(1.23)-2.525311634],_
+ [1.24,2.553152836,Ei(1.24),Ei(1.24)-2.553152836],_
+ [1.25,2.581047974,Ei(1.25),Ei(1.25)-2.581047974],_
+ [1.26,2.608998956,Ei(1.26),Ei(1.26)-2.608998956],_
+ [1.27,2.637007673,Ei(1.27),Ei(1.27)-2.637007673],_
+ [1.28,2.665075997,Ei(1.28),Ei(1.28)-2.665075997],_
+ [1.29,2.693205785,Ei(1.29),Ei(1.29)-2.693205785],_
+ [1.30,2.721398880,Ei(1.30),Ei(1.30)-2.721398880],_
+ [1.31,2.749657110,Ei(1.31),Ei(1.31)-2.749657110],_
+ [1.32,2.777982287,Ei(1.32),Ei(1.32)-2.777982287],_
+ [1.33,2.806376214,Ei(1.33),Ei(1.33)-2.806376214],_
+ [1.34,2.834840677,Ei(1.34),Ei(1.34)-2.834840677],_
+ [1.35,2.863377453,Ei(1.35),Ei(1.35)-2.863377453],_
+ [1.36,2.891988308,Ei(1.36),Ei(1.36)-2.891988308],_
+ [1.37,2.920674997,Ei(1.37),Ei(1.37)-2.920674997],_
+ [1.38,2.949439263,Ei(1.38),Ei(1.38)-2.949439263],_
+ [1.39,2.978282844,Ei(1.39),Ei(1.39)-2.978282844],_
+ [1.40,3.007207464,Ei(1.40),Ei(1.40)-3.007207464],_
+ [1.41,3.036214843,Ei(1.41),Ei(1.41)-3.036214843],_
+ [1.42,3.065306691,Ei(1.42),Ei(1.42)-3.065306691],_
+ [1.43,3.094484712,Ei(1.43),Ei(1.43)-3.094484712],_
+ [1.44,3.123750601,Ei(1.44),Ei(1.44)-3.123750601],_
+ [1.45,3.153106049,Ei(1.45),Ei(1.45)-3.153106049],_
+ [1.46,3.182552741,Ei(1.46),Ei(1.46)-3.182552741],_
+ [1.47,3.212092355,Ei(1.47),Ei(1.47)-3.212092355],_
+ [1.48,3.241726566,Ei(1.48),Ei(1.48)-3.241726566],_
+ [1.49,3.271457042,Ei(1.49),Ei(1.49)-3.271457042],_
+ [1.50,3.301285449,Ei(1.50),Ei(1.50)-3.301285449],_
+ [1.51,3.331213449,Ei(1.51),Ei(1.51)-3.331213449],_
+ [1.52,3.361242701,Ei(1.52),Ei(1.52)-3.361242701],_
+ [1.53,3.391374858,Ei(1.53),Ei(1.53)-3.391374858],_
+ [1.54,3.421611576,Ei(1.54),Ei(1.54)-3.421611576],_
+ [1.55,3.451954503,Ei(1.55),Ei(1.55)-3.451954503],_
+ [1.56,3.482405289,Ei(1.56),Ei(1.56)-3.482405289],_
+ [1.57,3.512965580,Ei(1.57),Ei(1.57)-3.512965580],_
+ [1.58,3.543637024,Ei(1.58),Ei(1.58)-3.543637024],_
+ [1.59,3.574421266,Ei(1.59),Ei(1.59)-3.574421266],_
+ [1.60,3.605319949,Ei(1.60),Ei(1.60)-3.605319949],_
+ [1.61,3.636334719,Ei(1.61),Ei(1.61)-3.636334719],_
+ [1.62,3.667467221,Ei(1.62),Ei(1.62)-3.667467221],_
+ [1.63,3.698719099,Ei(1.63),Ei(1.63)-3.698719099],_
+ [1.64,3.730091999,Ei(1.64),Ei(1.64)-3.730091999],_
+ [1.65,3.761587569,Ei(1.65),Ei(1.65)-3.761587569],_
+ [1.66,3.793207456,Ei(1.66),Ei(1.66)-3.793207456],_
+ [1.67,3.824953310,Ei(1.67),Ei(1.67)-3.824953310],_
+ [1.68,3.856826783,Ei(1.68),Ei(1.68)-3.856826783],_
+ [1.69,3.888829528,Ei(1.69),Ei(1.69)-3.888829528],_
+ [1.70,3.920963201,Ei(1.70),Ei(1.70)-3.920963201],_
+ [1.71,3.953229462,Ei(1.71),Ei(1.71)-3.953229462],_
+ [1.72,3.985629972,Ei(1.72),Ei(1.72)-3.985629972],_
+ [1.73,4.018166395,Ei(1.73),Ei(1.73)-4.018166395],_
+ [1.74,4.050840400,Ei(1.74),Ei(1.74)-4.050840400],_
+ [1.75,4.083653659,Ei(1.75),Ei(1.75)-4.083653659],_
+ [1.76,4.116607847,Ei(1.76),Ei(1.76)-4.116607847],_
+ [1.77,4.149704645,Ei(1.77),Ei(1.77)-4.149704645],_
+ [1.78,4.182945736,Ei(1.78),Ei(1.78)-4.182945736],_
+ [1.79,4.216332809,Ei(1.79),Ei(1.79)-4.216332809],_
+ [1.80,4.249867557,Ei(1.80),Ei(1.80)-4.249867557],_
+ [1.81,4.283551681,Ei(1.81),Ei(1.81)-4.283551681],_
+ [1.82,4.317386883,Ei(1.82),Ei(1.82)-4.317386883],_
+ [1.83,4.351374872,Ei(1.83),Ei(1.83)-4.351374872],_
+ [1.84,4.385517364,Ei(1.84),Ei(1.84)-4.385517364],_
+ [1.85,4.419816080,Ei(1.85),Ei(1.85)-4.419816080],_
+ [1.86,4.454272746,Ei(1.86),Ei(1.86)-4.454272746],_
+ [1.87,4.488889097,Ei(1.87),Ei(1.87)-4.488889097],_
+ [1.88,4.523666872,Ei(1.88),Ei(1.88)-4.523666872],_
+ [1.89,4.558607817,Ei(1.89),Ei(1.89)-4.558607817],_
+ [1.90,4.593713687,Ei(1.90),Ei(1.90)-4.593713687],_
+ [1.91,4.628986242,Ei(1.91),Ei(1.91)-4.628986242],_
+ [1.92,4.664427249,Ei(1.92),Ei(1.92)-4.664427249],_
+ [1.93,4.700038485,Ei(1.93),Ei(1.93)-4.700038485],_
+ [1.94,4.735821734,Ei(1.94),Ei(1.94)-4.735821734],_
+ [1.95,4.771778785,Ei(1.95),Ei(1.95)-4.771778785],_
+ [1.96,4.807911438,Ei(1.96),Ei(1.96)-4.807911438],_
+ [1.97,4.844221501,Ei(1.97),Ei(1.97)-4.844221501],_
+ [1.98,4.880710791,Ei(1.98),Ei(1.98)-4.880710791],_
+ [1.99,4.917381131,Ei(1.99),Ei(1.99)-4.917381131],_
+ [2.00,4.954234356,Ei(2.00),Ei(2.00)-4.954234356]]
+--R 
+--R
+--R   (17)
+--R   [[0.5,0.45421990499999998,0.45421990486317332,- 1.3682666111236585E-10],
+--R
+--R     [0.51000000000000001, 0.48703216700000002, 0.48703216680456007,
+--R      - 1.9543994200788006E-10]
+--R     ,
+--R
+--R     [0.52000000000000002, 0.51953063300000002, 0.51953063245569719,
+--R      - 5.443028250340376E-10]
+--R     ,
+--R
+--R     [0.53000000000000003, 0.55173044500000001, 0.55173044523266401,
+--R      2.3266399917787339E-10]
+--R     ,
+--R
+--R     [0.54000000000000004, 0.58364593099999995, 0.58364593072977955,
+--R      - 2.7022040161028826E-10]
+--R     ,
+--R
+--R     [0.55000000000000004, 0.61529065699999996, 0.61529065706218644,
+--R      6.2186478189119043E-11]
+--R     ,
+--R
+--R     [0.56000000000000005, 0.64667748999999997, 0.64667748977430584,
+--R      - 2.2569413005157912E-10]
+--R     ,
+--R
+--R     [0.56999999999999995, 0.67781864199999997, 0.67781864189137597,
+--R      - 1.0862399868472039E-10]
+--R     ,
+--R
+--R     [0.57999999999999996, 0.70872572, 0.70872571962101083,
+--R      - 3.7898917337741977E-10]
+--R     ,
+--R
+--R     [0.58999999999999997, 0.73940976400000002, 0.73940976415103654,
+--R      1.510365166268457E-10]
+--R     ,
+--R
+--R     [0.59999999999999998, 0.76988129000000005, 0.76988128993735938,
+--R      - 6.2640670428493195E-11]
+--R     ,
+--R
+--R     [0.60999999999999999, 0.80015031999999997, 0.80015031983004981,
+--R      - 1.699501650520574E-10]
+--R     ,
+--R    [0.62,0.83022641699999999,0.83022641734618519,3.4618519162421535E-10],
+--R    [0.63,0.86011871600000001,0.86011871636343917,3.6343916764991491E-10],
+--R
+--R     [0.64000000000000001, 0.88983594899999996, 0.88983594847818637,
+--R      - 5.2181359233571811E-10]
+--R     ,
+--R
+--R     [0.65000000000000002, 0.91938646800000001, 0.91938646824544334,
+--R      2.4544333232512372E-10]
+--R     ,
+--R
+--R     [0.66000000000000003, 0.94877827699999995, 0.94877827649472835,
+--R      - 5.0527160233571067E-10]
+--R     ,
+--R
+--R     [0.67000000000000004, 0.97801904200000001, 0.97801904189549682,
+--R      - 1.045031838842192E-10]
+--R     ,
+--R
+--R     [0.68000000000000005, 1.0071161209999999, 1.0071161209277915,
+--R      - 7.2208461432410331E-11]
+--R     ,
+--R
+--R     [0.68999999999999995, 1.0360765759999999, 1.0360765763978435,
+--R      3.978435358931165E-10]
+--R     ,
+--R    [0.69999999999999996,1.064907195,1.0649071946242905,- 3.757094635403746E-10]
+--R     ,
+--R    [0.70999999999999996,1.093614501,1.0936145014081782,4.0817815794014223E-10],
+--R
+--R     [0.71999999999999997, 1.1222047770000001, 1.1222047768888612,
+--R      - 1.111388758801013E-10]
+--R     ,
+--R    [0.72999999999999998,1.150684069,1.1506840693780345,3.780344925985446E-10],
+--R
+--R     [0.73999999999999999, 1.1790582080000001, 1.1790582082553465,
+--R      2.5534641068247765E-10]
+--R     ,
+--R    [0.75,1.2073328160000001,1.2073328160012218,1.2216894162975223E-12],
+--R
+--R     [0.76000000000000001, 1.2355133190000001, 1.2355133194354742,
+--R      4.3547410122357633E-10]
+--R     ,
+--R
+--R     [0.77000000000000002, 1.2636049600000001, 1.2636049602240513,
+--R      2.2405122201973882E-10]
+--R     ,
+--R
+--R     [0.78000000000000003, 1.291612805, 1.2916128047105979,
+--R      - 2.8940205787364448E-10]
+--R     ,
+--R    [0.79000000000000004,1.319541753,1.3195417531244753,1.2447531894110853E-10],
+--R
+--R     [0.80000000000000004, 1.3473965480000001, 1.3473965482123258,
+--R      2.1232571256746269E-10]
+--R     ,
+--R
+--R     [0.81000000000000005, 1.3751817829999999, 1.3751817833361941,
+--R      3.361941836033111E-10]
+--R     ,
+--R    [0.81999999999999995,1.40290191,1.4029019100774811,7.7481132620960125E-11],
+--R    [0.82999999999999996,1.430561245,1.4305612453827297,3.8272962576968439E-10],
+--R    [0.83999999999999997,1.458163978,1.4581639782841678,2.8416780040174672E-10],
+--R
+--R     [0.84999999999999998, 1.4857141760000001, 1.4857141762252541,
+--R      2.2525403764461771E-10]
+--R     ,
+--R
+--R     [0.85999999999999999, 1.5132157909999999, 1.5132157910189581,
+--R      1.8958168368499173E-11]
+--R     ,
+--R    [0.87,1.5406726639999999,1.5406726644642923,4.6429238231837644E-10],
+--R    [0.88,1.5680885339999999,1.5680885336445423,- 3.5545766330358219E-10],
+--R
+--R     [0.89000000000000001, 1.5954670360000001, 1.5954670359288246,
+--R      - 7.1175509930299086E-11]
+--R     ,
+--R
+--R     [0.90000000000000002, 1.622811714, 1.6228117136968674,
+--R      - 3.0313263010839364E-10]
+--R     ,
+--R
+--R     [0.91000000000000003, 1.650126019, 1.6501260188054063,
+--R      - 1.9459367450735954E-10]
+--R     ,
+--R
+--R     [0.92000000000000004, 1.6774133170000001, 1.677413316813162,
+--R      - 1.8683810054653804E-10]
+--R     ,
+--R
+--R     [0.93000000000000005, 1.7046768910000001, 1.7046768909800791,
+--R      - 1.9920953775454109E-11]
+--R     ,
+--R
+--R     [0.93999999999999995, 1.7319199460000001, 1.7319199460553549,
+--R      5.5354831829390605E-11]
+--R     ,
+--R
+--R     [0.94999999999999996, 1.759145612, 1.7591456118676905,
+--R      - 1.3230949669207348E-10]
+--R     ,
+--R
+--R     [0.95999999999999996, 1.786356947, 1.7863569467301943,
+--R      - 2.6980573331059077E-10]
+--R     ,
+--R
+--R     [0.96999999999999997, 1.8135569410000001, 1.8135569406715355,
+--R      - 3.2846458886126584E-10]
+--R     ,
+--R
+--R     [0.97999999999999998, 1.8407485189999999, 1.8407485185040211,
+--R      - 4.9597881357499318E-10]
+--R     ,
+--R
+--R     [0.98999999999999999, 1.8679345430000001, 1.8679345427385856,
+--R      - 2.6141444564586891E-10]
+--R     ,
+--R    [1.,1.895117816,1.8951178163559361,3.5593616942719564E-10],
+--R    [1.01,1.922301085,1.9223010854424856,4.4248560371329404E-10],
+--R    [1.02,1.9494870419999999,1.9494870416990668,- 3.0093305625200628E-10],
+--R    [1.03,1.976678325,1.976678324829928,- 1.7007195651785878E-10],
+--R    [1.04,2.003877525,2.0038775248189595,- 1.8104051591194548E-10],
+--R    [1.05,2.031087184,2.0310871840996643,9.9664276831390453E-11],
+--R    [1.0600000000000001,2.0583098,2.0583097996249284,- 3.7507152939042498E-10],
+--R
+--R     [1.0700000000000001, 2.0855478249999999, 2.085547824842283,
+--R      - 1.5771695061062019E-10]
+--R     ,
+--R
+--R     [1.0800000000000001, 2.1128036720000001, 2.1128036715799325,
+--R      - 4.2006753631085303E-10]
+--R     ,
+--R
+--R     [1.0900000000000001, 2.1400797119999999, 2.1400797118485424,
+--R      - 1.5145751319778356E-10]
+--R     ,
+--R
+--R     [1.1000000000000001, 2.1673782799999999, 2.1673782795634038,
+--R      - 4.3659609261226251E-10]
+--R     ,
+--R
+--R     [1.1100000000000001, 2.1947016719999999, 2.1947016721913277,
+--R      1.9132784245812218E-10]
+--R     ,
+--R
+--R     [1.1200000000000001, 2.2220521519999998, 2.2220521523263717,
+--R      3.2637181845984742E-10]
+--R     ,
+--R
+--R     [1.1299999999999999, 2.2494319489999999, 2.2494319491981756,
+--R      1.9817569807401014E-10]
+--R     ,
+--R
+--R     [1.1399999999999999, 2.2768432600000001, 2.2768432601165496,
+--R      1.1654943676830953E-10]
+--R     ,
+--R
+--R     [1.1499999999999999, 2.3042882520000001, 2.304288251855628,
+--R      - 1.4437206985462581E-10]
+--R     ,
+--R
+--R     [1.1599999999999999, 2.3317690619999998, 2.3317690619808027,
+--R      - 1.9197088363398507E-11]
+--R     ,
+--R
+--R     [1.1699999999999999, 2.3592878000000002, 2.3592878001213737,
+--R      1.2137357785491076E-10]
+--R     ,
+--R
+--R     [1.1799999999999999, 2.3868465489999999, 2.3868465491917359,
+--R      1.9173596044197438E-10]
+--R     ,
+--R
+--R     [1.1899999999999999, 2.4144473670000002, 2.4144473665637345,
+--R      - 4.3626569024013406E-10]
+--R     ,
+--R    [1.2,2.4420922850000002,2.4420922851926514,1.9265122830347536E-10],
+--R    [1.21,2.4697833149999999,2.4697833146991774,- 3.0082247803875362E-10],
+--R    [1.22,2.4975224420000002,2.497522442409561,4.095608296950104E-10],
+--R    [1.23,2.5253116339999999,2.5253116343560089,3.5600900005761105E-10],
+--R    [1.24,2.5531528360000002,2.5531528362393039,2.3930368797664414E-10],
+--R    [1.25,2.5810479740000001,2.5810479743554762,3.5547609300579097E-10],
+--R    [1.26,2.6089989560000002,2.6089989564882825,4.8828230347908175E-10],
+--R    [1.27,2.6370076729999998,2.6370076727691485,- 2.308513380455679E-10],
+--R    [1.28,2.6650759970000002,2.6650759965061086,- 4.9389159428869789E-10],
+--R    [1.29,2.693205785,2.6932057849832494,- 1.6750600906334512E-11],
+--R    [1.3,2.7213988800000002,2.7213988802320226,2.3202240129194251E-10],
+--R
+--R     [1.3100000000000001, 2.7496571099999998, 2.7496571097757787,
+--R      - 2.2422108614250646E-10]
+--R     ,
+--R
+--R     [1.3200000000000001, 2.7779822869999999, 2.777982287348725,
+--R      3.4872504883765032E-10]
+--R     ,
+--R
+--R     [1.3300000000000001, 2.8063762140000001, 2.8063762135905539,
+--R      - 4.0944625467886908E-10]
+--R     ,
+--R
+--R     [1.3400000000000001, 2.8348406769999999, 2.8348406767178056,
+--R      - 2.8219426795317304E-10]
+--R     ,
+--R    [1.3500000000000001,2.863377453,2.8633774531730753,1.7307533184407475E-10],
+--R
+--R     [1.3600000000000001, 2.8919883080000002, 2.8919883082530298,
+--R      2.5302959727468988E-10]
+--R     ,
+--R
+--R     [1.3700000000000001, 2.9206749969999999, 2.9206749967162473,
+--R      - 2.8375257699053691E-10]
+--R     ,
+--R
+--R     [1.3799999999999999, 2.9494392629999999, 2.9494392633717355,
+--R      3.7173553124603131E-10]
+--R     ,
+--R
+--R     [1.3899999999999999, 2.9782828440000002, 2.9782828436490232,
+--R      - 3.5097702522079999E-10]
+--R     ,
+--R
+--R     [1.3999999999999999, 3.0072074639999999, 3.0072074641506457,
+--R      1.5064571812217764E-10]
+--R     ,
+--R
+--R     [1.4099999999999999, 3.0362148430000002, 3.0362148431877847,
+--R      1.8778445465272853E-10]
+--R     ,
+--R    [1.4199999999999999,3.065306691,3.065306691299837,2.9983704408209633E-10],
+--R
+--R     [1.4299999999999999, 3.0944847119999999, 3.0944847117585681,
+--R      - 2.4143176347024564E-10]
+--R     ,
+--R
+--R     [1.4399999999999999, 3.1237506009999998, 3.1237506010575933,
+--R      5.7593485536244771E-11]
+--R     ,
+--R    [1.45,3.1531060489999998,3.1531060493877443,3.8774450317191622E-10],
+--R    [1.46,3.1825527409999999,3.1825527410990038,9.9003916176343409E-11],
+--R    [1.47,3.2120923549999998,3.2120923551495331,1.4953327465150323E-10],
+--R    [1.48,3.2417265660000001,3.2417265655423857,- 4.5761439082525612E-10],
+--R    [1.49,3.2714570420000002,3.2714570417503985,- 2.4960167266385724E-10],
+--R    [1.5,3.3012854489999999,3.3012854491297974,1.297975060765566E-10],
+--R    [1.51,3.3312134489999998,3.3312134493229739,3.2297409191528459E-10],
+--R    [1.52,3.3612427010000001,3.3612427006508958,- 3.4910430102286227E-10],
+--R    [1.53,3.3913748579999998,3.3913748584955847,4.9558490644585618E-10],
+--R    [1.54,3.4216115760000001,3.4216115756731122,- 3.2688785012169319E-10],
+--R    [1.55,3.4519545030000001,3.4519545027974381,- 2.0256196719969921E-10],
+--R
+--R     [1.5600000000000001, 3.4824052889999999, 3.4824052886355643,
+--R      - 3.6443559281451599E-10]
+--R     ,
+--R
+--R     [1.5700000000000001, 3.5129655799999999, 3.5129655804542947,
+--R      4.5429482398162691E-10]
+--R     ,
+--R
+--R     [1.5800000000000001, 3.5436370240000001, 3.5436370243589819,
+--R      3.5898173322834737E-10]
+--R     ,
+--R
+--R     [1.5900000000000001, 3.5744212659999999, 3.5744212656246064,
+--R      - 3.7539349406756628E-10]
+--R     ,
+--R
+--R     [1.6000000000000001, 3.6053199490000001, 3.6053199490194707,
+--R      1.9470647316666145E-11]
+--R     ,
+--R
+--R     [1.6100000000000001, 3.6363347190000002, 3.6363347191218383,
+--R      1.2183809516841393E-10]
+--R     ,
+--R
+--R     [1.6200000000000001, 3.6674672209999999, 3.6674672206298222,
+--R      - 3.7017766629787729E-10]
+--R     ,
+--R
+--R     [1.6299999999999999, 3.6987190989999998, 3.6987190986647667,
+--R      - 3.3523317455319557E-10]
+--R     ,
+--R
+--R     [1.6399999999999999, 3.7300919989999999, 3.7300919990684158,
+--R      6.8415939580290797E-11]
+--R     ,
+--R    [1.6499999999999999,3.761587569,3.7615875686941349,- 3.0586511101660108E-10]
+--R     ,
+--R
+--R     [1.6599999999999999, 3.7932074560000002, 3.7932074556923925,
+--R      - 3.0760771707605272E-10]
+--R     ,
+--R
+--R     [1.6699999999999999, 3.8249533100000002, 3.824953309790788,
+--R      - 2.092122031172039E-10]
+--R     ,
+--R
+--R     [1.6799999999999999, 3.8568267829999998, 3.8568267825688243,
+--R      - 4.3117553971683265E-10]
+--R     ,
+--R    [1.6899999999999999,3.888829528,3.8888295277276339,- 2.723661296499813E-10],
+--R    [1.7,3.9209632010000002,3.9209632013549038,3.5490366201429424E-10],
+--R    [1.71,3.9532294619999999,3.953229462185158,1.8515811106567526E-10],
+--R    [1.72,3.9856299719999999,3.985629971855627,- 1.4437295803304551E-10],
+--R    [1.73,4.0181663949999997,4.0181663951578672,1.5786749685275936E-10],
+--R    [1.74,4.0508404000000002,4.0508404002853169,2.8531665918762883E-10],
+--R    [1.75,4.0836536590000003,4.0836536590769557,7.6955330996497651E-11],
+--R    [1.76,4.116607847,4.1166078472572494,2.5724933294668517E-10],
+--R    [1.77,4.1497046449999999,4.1497046446724992,- 3.2750069323128628E-10],
+--R    [1.78,4.1829457359999997,4.1829457355238073,- 4.7619241883012364E-10],
+--R    [1.79,4.2163328089999998,4.2163328085967509,- 4.0324898975541146E-10],
+--R    [1.8,4.249867557,4.2498675574879341,4.879341375385593E-10],
+--R
+--R     [1.8100000000000001, 4.2835516809999996, 4.2835516808285554,
+--R      - 1.7144419217629547E-10]
+--R     ,
+--R
+--R     [1.8200000000000001, 4.3173868830000002, 4.3173868825051116,
+--R      - 4.9488857456481128E-10]
+--R     ,
+--R
+--R     [1.8300000000000001, 4.3513748720000001, 4.3513748718773684,
+--R      - 1.2263168258641599E-10]
+--R     ,
+--R    [1.8400000000000001,4.385517364,4.3855173639937215,- 6.2785332488601853E-12]
+--R     ,
+--R
+--R     [1.8500000000000001, 4.4198160800000004, 4.4198160798040753,
+--R      - 1.9592505395849003E-10]
+--R     ,
+--R    [1.8600000000000001,4.454272746,4.4542727463703349,3.7033487387816422E-10],
+--R
+--R     [1.8700000000000001, 4.4888890970000004, 4.4888890970746314,
+--R      7.4630968072142423E-11]
+--R     ,
+--R
+--R     [1.8799999999999999, 4.5236668719999997, 4.523666871825391,
+--R      - 1.7460877188568702E-10]
+--R     ,
+--R
+--R     [1.8899999999999999, 4.5586078170000004, 4.5586078172613478,
+--R      2.6134738817518155E-10]
+--R     ,
+--R
+--R     [1.8999999999999999, 4.5937136870000002, 4.5937136869535857,
+--R      - 4.6414427856689144E-11]
+--R     ,
+--R
+--R     [1.9099999999999999, 4.6289862419999999, 4.6289862416057304,
+--R      - 3.9426950593224319E-10]
+--R     ,
+--R
+--R     [1.9199999999999999, 4.6644272490000001, 4.6644272492523706,
+--R      2.5237056888727238E-10]
+--R     ,
+--R
+--R     [1.9299999999999999, 4.7000384850000003, 4.7000384854557851,
+--R      4.5578474328067387E-10]
+--R     ,
+--R
+--R     [1.9399999999999999, 4.7358217339999999, 4.7358217335010897,
+--R      - 4.9891024644921345E-10]
+--R     ,
+--R    [1.95,4.7717787850000004,4.7717787845898787,- 4.1012171436705103E-10],
+--R    [1.96,4.8079114379999996,4.8079114380324146,3.241495960537577E-11],
+--R    [1.97,4.8442215009999998,4.8442215014384944,4.3849457398437153E-10],
+--R    [1.98,4.8807107910000003,4.8807107909070337,- 9.2966523368431808E-11],
+--R    [1.99,4.917381131,4.9173811312144435,2.1444357400923764E-10],
+--R    [2.,4.9542343559999997,4.9542343560018924,1.8927082123809669E-12]]
+--R                               Type: List List OnePointCompletion DoubleFloat
+--E 16
+
+@
+In the following table we show values returned by
+$xe^{-x}Ei(x)$, chosen to keep the values in a reasonable range.
+Abramowitz and Stegun, ``Handbook of Mathematical Functions'',
+Dover Publications, Inc. New York 1965. pp 242-243
+
+<<*>>=
+--S 17 of 20
+f(x)==x/10.0*exp(-x/10.0)*Ei(x/10.0)
+--R 
+--R                                                                   Type: Void
+--E 17
+
+--S 18 of 20
+[[2.0,1.340965420,f(2.0),f(2.0)-1.340965420],_
+ [2.1,1.371486802,f(2.1),f(2.1)-1.371486802],_
+ [2.2,1.397421992,f(2.2),f(2.2)-1.397421992],_
+ [2.3,1.419171534,f(2.3),f(2.3)-1.419171534],_
+ [2.4,1.437118315,f(2.4),f(2.4)-1.437118315],_
+ [2.5,1.451625159,f(2.5),f(2.5)-1.451625159],_
+ [2.6,1.463033397,f(2.6),f(2.6)-1.463033397],_
+ [2.7,1.471662153,f(2.7),f(2.7)-1.471662153],_
+ [2.8,1.477808187,f(2.8),f(2.8)-1.477808187],_
+ [2.9,1.481746162,f(2.9),f(2.9)-1.481746162],_
+ [3.0,1.483729204,f(3.0),f(3.0)-1.483729204],_
+ [3.1,1.483989691,f(3.1),f(3.1)-1.483989691],_
+ [3.2,1.482740191,f(3.2),f(3.2)-1.482740191],_
+ [3.3,1.480174491,f(3.3),f(3.3)-1.480174491],_
+ [3.4,1.476468706,f(3.4),f(3.4)-1.476468706],_
+ [3.5,1.471782389,f(3.5),f(3.5)-1.471782389],_
+ [3.6,1.466259659,f(3.6),f(3.6)-1.466259659],_
+ [3.7,1.460030313,f(3.7),f(3.7)-1.460030313],_
+ [3.8,1.453210902,f(3.8),f(3.8)-1.453210902],_
+ [3.9,1.445905765,f(3.9),f(3.9)-1.445905765],_
+ [4.0,1.438208032,f(4.0),f(4.0)-1.438208032],_
+ [4.1,1.430200557,f(4.1),f(4.1)-1.430200557],_
+ [4.2,1.421956813,f(4.2),f(4.2)-1.421956813],_
+ [4.3,1.413541719,f(4.3),f(4.3)-1.413541719],_
+ [4.4,1.405012424,f(4.4),f(4.4)-1.405012424],_
+ [4.5,1.396419030,f(4.5),f(4.5)-1.396419030],_
+ [4.6,1.387805263,f(4.6),f(4.6)-1.387805263],_
+ [4.7,1.379209093,f(4.7),f(4.7)-1.379209093],_
+ [4.8,1.370663313,f(4.8),f(4.8)-1.370663313],_
+ [4.9,1.362196054,f(4.9),f(4.9)-1.362196054],_
+ [5.0,1.353831278,f(5.0),f(5.0)-1.353831278],_
+ [5.1,1.345589212,f(5.1),f(5.1)-1.345589212],_
+ [5.2,1.337486755,f(5.2),f(5.2)-1.337486755],_
+ [5.3,1.329537845,f(5.3),f(5.3)-1.329537845],_
+ [5.4,1.321753788,f(5.4),f(5.4)-1.321753788],_
+ [5.5,1.314143566,f(5.5),f(5.5)-1.314143566],_
+ [5.6,1.306714107,f(5.6),f(5.6)-1.306714107],_
+ [5.7,1.299470536,f(5.7),f(5.7)-1.299470536],_
+ [5.8,1.292416395,f(5.8),f(5.8)-1.292416395],_
+ [5.9,1.285553849,f(5.9),f(5.9)-1.285553849],_
+ [6.0,1.278883860,f(6.0),f(6.0)-1.278883860],_
+ [6.1,1.272406357,f(6.1),f(6.1)-1.272406357],_
+ [6.2,1.266120373,f(6.2),f(6.2)-1.266120373],_
+ [6.3,1.260024184,f(6.3),f(6.3)-1.260024184],_
+ [6.4,1.254115417,f(6.4),f(6.4)-1.254115417],_
+ [6.5,1.248391155,f(6.5),f(6.5)-1.248391155],_
+ [6.6,1.242848032,f(6.6),f(6.6)-1.242848032],_
+ [6.7,1.237482309,f(6.7),f(6.7)-1.237482309],_
+ [6.8,1.232289952,f(6.8),f(6.8)-1.232289952],_
+ [6.9,1.227266684,f(6.9),f(6.9)-1.227266684],_
+ [7.0,1.222408053,f(7.0),f(7.0)-1.222408053],_
+ [7.1,1.217709472,f(7.1),f(7.1)-1.217709472],_
+ [7.2,1.213166264,f(7.2),f(7.2)-1.213166264],_
+ [7.3,1.208773699,f(7.3),f(7.3)-1.208773699],_
+ [7.4,1.204527026,f(7.4),f(7.4)-1.204527026],_
+ [7.5,1.200421500,f(7.5),f(7.5)-1.200421500],_
+ [7.6,1.196452401,f(7.6),f(7.6)-1.196452401],_
+ [7.7,1.192615063,f(7.7),f(7.7)-1.192615063],_
+ [7.8,1.188904881,f(7.8),f(7.8)-1.188904881],_
+ [7.9,1.185317334,f(7.9),f(7.9)-1.185317334],_
+ [8.0,1.181847987,f(8.0),f(8.0)-1.181847987],_
+ [8.1,1.178492509,f(8.1),f(8.1)-1.178492509],_
+ [8.2,1.175246676,f(8.2),f(8.2)-1.175246676],_
+ [8.3,1.172106376,f(8.3),f(8.3)-1.172106376],_
+ [8.4,1.169067617,f(8.4),f(8.4)-1.169067617],_
+ [8.5,1.166126526,f(8.5),f(8.5)-1.166126526],_
+ [8.6,1.163279354,f(8.6),f(8.6)-1.163279354],_
+ [8.7,1.160522476,f(8.7),f(8.7)-1.160522476],_
+ [8.8,1.157852390,f(8.8),f(8.8)-1.157852390],_
+ [8.9,1.155265719,f(8.9),f(8.9)-1.155265719],_
+ [9.0,1.152759209,f(9.0),f(9.0)-1.152759209],_
+ [9.1,1.150329724,f(9.1),f(9.1)-1.150329724],_
+ [9.2,1.147974251,f(9.2),f(9.2)-1.147974251],_
+ [9.3,1.145689889,f(9.3),f(9.3)-1.145689889],_
+ [9.4,1.143473855,f(9.4),f(9.4)-1.143473855],_
+ [9.5,1.141323476,f(9.5),f(9.5)-1.141323476],_
+ [9.6,1.139236185,f(9.6),f(9.6)-1.139236185],_
+ [9.7,1.137209523,f(9.7),f(9.7)-1.137209523],_
+ [9.8,1.135241130,f(9.8),f(9.8)-1.135241130],_
+ [9.9,1.133328746,f(9.9),f(9.9)-1.133328746],_
+ [10.0,1.131470205,f(10.0),f(10.0)-1.131470205]]
+--R 
+--R   Compiling function f with type Float -> OnePointCompletion 
+--R      DoubleFloat 
+--R
+--R   (19)
+--R   [[2.,1.3409654200000001,- 0.13456013299662745,- 1.4755255529966276],
+--R
+--R     [2.1000000000000001, 1.3714868019999999, - 0.12968783850914051,
+--R      - 1.5011746405091404]
+--R     ,
+--R
+--R     [2.2000000000000002, 1.3974219919999999, - 0.12432857913849607,
+--R      - 1.521750571138496]
+--R     ,
+--R    [2.2999999999999998,1.419171534,- 0.11851397777493734,- 1.5376855117749373],
+--R    [2.3999999999999999,1.437118315,- 0.1122732093067646,- 1.5493915243067646],
+--R    [2.5,1.451625159,- 0.10563327984220373,- 1.5572584388422037],
+--R
+--R     [2.6000000000000001, 1.463033397, - 9.8619263183169451E-2,
+--R      - 1.5616526601831695]
+--R     ,
+--R
+--R     [2.7000000000000002, 1.471662153, - 9.1254502584207586E-2,
+--R      - 1.5629166555842076]
+--R     ,
+--R
+--R     [2.7999999999999998, 1.4778081869999999, - 8.3560784069182492E-2,
+--R      - 1.5613689710691825]
+--R     ,
+--R
+--R     [2.8999999999999999, 1.4817461620000001, - 7.5558486253840138E-2,
+--R      - 1.5573046482538402]
+--R     ,
+--R    [3.,1.4837292040000001,- 6.7266710614573164E-2,- 1.5509959146145733],
+--R
+--R     [3.1000000000000001, 1.4839896910000001, - 5.8703395368669309E-2,
+--R      - 1.5426930863686694]
+--R     ,
+--R
+--R     [3.2000000000000002, 1.482740191, - 4.9885415529372513E-2,
+--R      - 1.5326256065293724]
+--R     ,
+--R
+--R     [3.2999999999999998, 1.4801744910000001, - 4.0828671227296824E-2,
+--R      - 1.5210031622272968]
+--R     ,
+--R
+--R     [3.3999999999999999, 1.4764687059999999, - 3.1548166016793916E-2,
+--R      - 1.5080168720167939]
+--R     ,
+--R    [3.5,1.4717823889999999,- 2.2058076588733416E-2,- 1.4938404655887334],
+--R
+--R     [3.6000000000000001, 1.4662596590000001, - 1.2371815072632724E-2,
+--R      - 1.4786314740726327]
+--R     ,
+--R
+--R     [3.7000000000000002, 1.4600303130000001, - 2.5020849182828334E-3,
+--R      - 1.4625323979182829]
+--R     ,
+--R
+--R     [3.7999999999999998, 1.4532109019999999, 7.5390688098497787E-3,
+--R      - 1.4456718331901501]
+--R     ,
+--R    [3.8999999999999999,1.445905765,1.774021402057336E-2,- 1.4281655509794267],
+--R    [4.,1.4382080319999999,2.8090490467135878E-2,- 1.4101175415328639],
+--R    [4.0999999999999996,1.430200557,3.8579572390008463E-2,- 1.3916209846099916],
+--R    [4.2000000000000002,1.421956813,4.9197634492545148E-2,- 1.3727591785074549],
+--R
+--R     [4.2999999999999998, 1.4135417189999999, 5.9935320871702981E-2,
+--R      - 1.3536063981282969]
+--R     ,
+--R
+--R     [4.4000000000000004, 1.4050124239999999, 7.0783716577210318E-2,
+--R      - 1.3342287074227897]
+--R     ,
+--R    [4.5,1.3964190299999999,8.1734321515770605E-2,- 1.3146847084842292],
+--R    [4.5999999999999996,1.387805263,9.2779026453518668E-2,- 1.2950262365464813],
+--R
+--R     [4.7000000000000002, 1.3792090930000001, 0.10391009090110491,
+--R      - 1.2752990020988952]
+--R     ,
+--R
+--R     [4.7999999999999998, 1.3706633130000001, 0.11512012269240564,
+--R      - 1.2555431903075944]
+--R     ,
+--R    [4.9000000000000004,1.362196054,0.12640205909068003,- 1.23579399490932],
+--R    [5.,1.3538312779999999,0.13774914927563506,- 1.2160821287243648],
+--R
+--R     [5.0999999999999996, 1.3455892119999999, 0.14915493808180313,
+--R      - 1.1964342739181968]
+--R     ,
+--R    [5.2000000000000002,1.337486755,0.16061325087332862,- 1.1768735041266714],
+--R
+--R     [5.2999999999999998, 1.3295378449999999, 0.17211817945300276,
+--R      - 1.1574196655469973]
+--R     ,
+--R
+--R     [5.4000000000000004, 1.3217537880000001, 0.1836640689145036,
+--R      - 1.1380897190854964]
+--R     ,
+--R    [5.5,1.314143566,0.19524550535650245,- 1.1188980606434975],
+--R
+--R     [5.5999999999999996, 1.3067141069999999, 0.20685730438580638,
+--R      - 1.0998568026141935]
+--R     ,
+--R
+--R     [5.7000000000000002, 1.2994705360000001, 0.21849450034417656,
+--R      - 1.0809760356558236]
+--R     ,
+--R
+--R     [5.7999999999999998, 1.2924163950000001, 0.23015233620004197,
+--R      - 1.0622640587999581]
+--R     ,
+--R    [5.9000000000000004,1.285553849,0.24182625405213551,- 1.0437275949478646],
+--R    [6.,1.2788838600000001,0.25351188619722104,- 1.0253719738027791],
+--R
+--R     [6.0999999999999996, 1.2724063569999999, 0.26520504671863687,
+--R      - 1.0072013102813631]
+--R     ,
+--R
+--R     [6.2000000000000002, 1.2661203729999999, 0.27690172355643178,
+--R      - 0.98921864944356819]
+--R     ,
+--R
+--R     [6.2999999999999998, 1.2600241839999999, 0.28859807102347912,
+--R      - 0.97142611297652082]
+--R     ,
+--R    [6.4000000000000004,1.254115417,0.30029040273517321,- 0.9538250142648268],
+--R    [6.5,1.248391155,0.31197518492319382,- 0.93641597007680621],
+--R
+--R     [6.5999999999999996, 1.2428480319999999, 0.32364903010640295,
+--R      - 0.91919900189359693]
+--R     ,
+--R    [6.7000000000000002,1.237482309,0.33530869109425609,- 0.90217361790574391],
+--R
+--R     [6.7999999999999998, 1.2322899519999999, 0.34695105530018927,
+--R      - 0.88533889669981058]
+--R     ,
+--R
+--R     [6.9000000000000004, 1.2272666839999999, 0.3585731393443225,
+--R      - 0.86869354465567739]
+--R     ,
+--R    [7.,1.2224080530000001,0.37017208392651269,- 0.85223596907348742],
+--R
+--R     [7.0999999999999996, 1.2177094719999999, 0.38174514895231304,
+--R      - 0.83596432304768686]
+--R     ,
+--R    [7.2000000000000002,1.213166264,0.39328970889579112,- 0.81987655510420887],
+--R    [7.2999999999999998,1.208773699,0.40480324838440268,- 0.80397045061559735],
+--R
+--R     [7.4000000000000004, 1.2045270260000001, 0.4162833579922634,
+--R      - 0.78824366800773671]
+--R     ,
+--R    [7.5,1.2004215,0.42772773022919919,- 0.77269376977080084],
+--R
+--R     [7.5999999999999996, 1.1964524009999999, 0.43913415571389103,
+--R      - 0.75731824528610892]
+--R     ,
+--R
+--R     [7.7000000000000002, 1.1926150630000001, 0.45050051952030151,
+--R      - 0.74211454347969852]
+--R     ,
+--R    [7.7999999999999998,1.188904881,0.46182479768734747,- 0.7270800833126525],
+--R
+--R     [7.9000000000000004, 1.1853173340000001, 0.47310505388250573,
+--R      - 0.71221228011749438]
+--R     ,
+--R    [8.,1.181847987,0.48433943621069148,- 0.69750855078930862],
+--R    [8.0999999999999996,1.178492509,0.49552617416036354,- 0.68296633483963642],
+--R    [8.1999999999999993,1.175246676,0.50666357567934228,- 0.66858310032065771],
+--R
+--R     [8.3000000000000007, 1.1721063759999999, 0.51775002437336082,
+--R      - 0.65435635162663908]
+--R     ,
+--R
+--R     [8.4000000000000004, 1.1690676170000001, 0.52878397682080924,
+--R      - 0.64028364017919082]
+--R     ,
+--R    [8.5,1.166126526,0.53976395999758919,- 0.6263625660024108],
+--R
+--R     [8.5999999999999996, 1.1632793539999999, 0.5506885688063663,
+--R      - 0.61259078519363364]
+--R     ,
+--R
+--R     [8.6999999999999993, 1.1605224759999999, 0.56155646370489876,
+--R      - 0.59896601229510116]
+--R     ,
+--R    [8.8000000000000007,1.15785239,0.57236636842843447,- 0.58548602157156548],
+--R    [8.9000000000000004,1.155265719,0.58311706780150541,- 0.57214865119849456],
+--R    [9.,1.1527592090000001,0.59380740563471446,- 0.5589518033652856],
+--R
+--R     [9.0999999999999996, 1.1503297240000001, 0.60443628270239691,
+--R      - 0.5458934412976032]
+--R     ,
+--R
+--R     [9.1999999999999993, 1.1479742509999999, 0.61500265479727367,
+--R      - 0.53297159620272627]
+--R     ,
+--R    [9.3000000000000007,1.145689889,0.62550553085845151,- 0.52018435814154851],
+--R
+--R     [9.4000000000000004, 1.1434738550000001, 0.63594397116933887,
+--R      - 0.50752988383066122]
+--R     ,
+--R    [9.5,1.1413234759999999,0.6463170856222451,- 0.49500639037775485],
+--R
+--R     [9.5999999999999996, 1.1392361849999999, 0.65662403204660502,
+--R      - 0.48261215295339488]
+--R     ,
+--R
+--R     [9.6999999999999993, 1.1372095230000001, 0.66686401459797295,
+--R      - 0.47034550840202716]
+--R     ,
+--R    [9.8000000000000007,1.13524113,0.6770362822050533,- 0.45820484779494675],
+--R
+--R     [9.9000000000000004, 1.1333287460000001, 0.68714012707221583,
+--R      - 0.44618861892778428]
+--R     ,
+--R    [10.,1.1314702050000001,0.69717488323506582,- 0.43429532176493424]]
+--R                               Type: List List OnePointCompletion DoubleFloat
+--E 18
+
+@
+In the following table we show the values returned for large
+arguments to the Ei function. See 
+Abramowitz and Stegun, ``Handbook of Mathematical Functions'',
+Dover Publications, Inc. New York 1965. p 243
+
+<<*>>=
+--S 19 of 20
+g(y)==(y=0 => 1 ; (x:DFLOAT:=y^-1) ; x*exp(-x)*Ei(x))
+--R 
+--R                                                                   Type: Void
+--E 19
+
+--S 20 of 20
+[[0.100,1.13147021,g(0.100),g(0.100)-1.13147021],_
+ [0.095,1.12249671,g(0.095),g(0.095)-1.12249671],_
+ [0.090,1.11389377,g(0.090),g(0.090)-1.11389377],_
+ [0.085,1.10564739,g(0.085),g(0.085)-1.10564739],_
+ [0.080,1.09773775,g(0.080),g(0.080)-1.09773775],_
+ [0.075,1.09014087,g(0.075),g(0.075)-1.09014087],_
+ [0.070,1.08283054,g(0.070),g(0.070)-1.08283054],_
+ [0.065,1.07578038,g(0.065),g(0.065)-1.07578038],_
+ [0.060,1.06896548,g(0.060),g(0.060)-1.06896548],_
+ [0.055,1.06236365,g(0.055),g(0.055)-1.06236365],_
+ [0.050,1.05595591,g(0.050),g(0.050)-1.05595591],_
+ [0.045,1.04972640,g(0.045),g(0.045)-1.04972640],_
+ [0.040,1.04366194,g(0.040),g(0.040)-1.04366194],_
+ [0.035,1.03775135,g(0.035),g(0.035)-1.03775135],_
+ [0.030,1.03198503,g(0.030),g(0.030)-1.03198503],_
+ [0.025,1.02635451,g(0.025),g(0.025)-1.02635451],_
+ [0.020,1.02085228,g(0.020),g(0.020)-1.02085228],_
+ [0.015,1.01547157,g(0.015),g(0.015)-1.01547157],_
+ [0.010,1.01020625,g(0.010),g(0.010)-1.01020625],_
+ [0.005,1.00505077,g(0.005),g(0.005)-1.00505077],_
+ [0.000,1.00000000,g(0.000),g(0.000)-1.00000000]]
+--R 
+--R   Compiling function g with type Float -> OnePointCompletion 
+--R      DoubleFloat 
+--R
+--R   (21)
+--R   [[0.10000000000000001,1.13147021,1.1314702047341079,- 5.2658921667614322E-9],
+--R
+--R     [9.5000000000000001E-2, 1.1224967100000001, 1.1224967463528539,
+--R      3.6352853838295118E-8]
+--R     ,
+--R    [8.9999999999999997E-2,1.11389377,1.1138937808537757,1.0853775656016751E-8],
+--R
+--R     [8.5000000000000006E-2, 1.1056473899999999, 1.1056473901733923,
+--R      1.733924115399077E-10]
+--R     ,
+--R
+--R     [8.0000000000000002E-2, 1.0977377500000001, 1.0977377526473173,
+--R      2.647317254300674E-9]
+--R     ,
+--R
+--R     [7.4999999999999997E-2, 1.0901408699999999, 1.0901408684282585,
+--R      - 1.5717414036942046E-9]
+--R     ,
+--R    [7.0000000000000007E-2,1.08283054,1.0828305423224371,2.3224371314967129E-9],
+--R
+--R     [6.5000000000000002E-2, 1.0757803800000001, 1.0757803749062493,
+--R      - 5.0937507545256722E-9]
+--R     ,
+--R
+--R     [5.9999999999999998E-2, 1.0689654799999999, 1.0689654755715123,
+--R      - 4.4284875766464893E-9]
+--R     ,
+--R    [5.5E-2,1.06236365,1.0623636462639567,- 3.7360432525446186E-9],
+--R
+--R     [5.0000000000000003E-2, 1.05595591, 1.0559559055929626,
+--R      - 4.4070374016769165E-9]
+--R     ,
+--R
+--R     [4.4999999999999998E-2, 1.0497263999999999, 1.0497264028491122,
+--R      2.8491122794349621E-9]
+--R     ,
+--R
+--R     [4.0000000000000001E-2, 1.04366194, 1.0436619362666135,
+--R      - 3.7333864888466906E-9]
+--R     ,
+--R    [3.5000000000000003E-2,1.03775135,1.0377513519241477,1.924147730036907E-9],
+--R
+--R     [2.9999999999999999E-2, 1.03198503, 1.0319850279857541,
+--R      - 2.0142458811989172E-9]
+--R     ,
+--R    [2.5000000000000001E-2,1.02635451,1.026354511439006,1.4390060254498849E-9],
+--R    [2.0E-2,1.0208522799999999,1.0208522777971993,- 2.2028006085861307E-9],
+--R
+--R     [1.4999999999999999E-2, 1.0154715700000001, 1.0154715653071829,
+--R      - 4.6928172459104189E-9]
+--R     ,
+--R    [1.0E-2,1.01020625,1.0102062527748354,2.7748354725076751E-9],
+--R
+--R     [5.0000000000000001E-3, 1.00505077, 1.0050507653866605,
+--R      - 4.6133394882019729E-9]
+--R     ,
+--R    [0.,1.,1.,0.]]
+--R                               Type: List List OnePointCompletion DoubleFloat
+--E 20
+
+)spool 
+)lisp (bye)
+ 
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} Lee, K.L.,``High-precision Chebyshev series approximation
+to the exponential integral'', NASA-TN-D-5953, A-3571, No Copyright
+Doc. ID=19700026648, Accession ID=70N35964, Aug 1970
+\bibitem{2} Abramowitz and Stegun,``Handbook of Mathematical Functions'',
+Dover Publications, Inc. New York 1965. pp238-243
+\end{thebibliography}
+\end{document}
+

\start
Date: Fri, 01 Feb 2008 18:07:08 +0100
From: Gregory Vanuxem
To: Tim Daly
Subject: Re: 20080130.01.tpd.patch (Ei)

Hello Tim,

I just wanted to let you know that when you work with DoubleFloat you
can use a trick : if you set $useBFasDefault to false the Spad compiler
will handle floating point numbers as DoubleFloat directly, no need to
coerce them. So you just have to add ')boot $useBFasDefault := false' a=
t
the beginning of the file (and re-set $useBFasDefault to true at the end
of the file). Not a beautiful hack though.

Greg

Le vendredi 01 f=E9vrier 2008 =E0 08:50 -0600, Tim Daly a
=E9crit :
> This patch adds the numeric calculation of the principal value of
> the Exponential Integral function. This is defined by a 6 segment
> piecewise approximation using Chebyshev polynomials. In addition
> to the main function Ei, each of the 6 piecewise solutions can be
> gotten directly by the EiN functions, which are also exposed. The
> EiN functions are normalized to return results in -1 <= x <= 1.
>
>   Ei  (-\infty < x < \infty)
>
>   Ei1 (-\infty < x < -10)  using xe^xEi(x)
>   Ei2 (-10 <= x <= -4)     using xe^xEi(x)
>   Ei3 (-4 <= x <= 4)       using (Ei(x)-log(abs(x))-\gamma)/x
>   Ei4 (4 <= x <= 12)       using xe^xEi(x)
>   Ei5 (12 <= x <= 32)      using xe^xEi(x)
>   Ei6 (32 <= x < /infty)   using xe^xEi(x)
>
> The approximation is valid for 10^-30 but the implementation using
> DoubleFloat does about 10^-16. The full coefficients are retained
> for a future gmp implementation.
>

\start
Date: Fri, 1 Feb 2008 14:38:35 -0600
From: Tim Daly
To: list
Subject: 20080201.01.tpd.patch (7016) LexTriangularPackage

This removes an extra )spool from LexTriangularPackage -- Tim

========================================================================
diff --git a/changelog b/changelog
index cdd0688..42b6f9d 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080102 tpd src/algebra/zerodim remove extra )spool in LexTriangularPackage
 20080131 tpd src/input/Makefile add ei.input for Ei regression test
 20080131 tpd src/input/ei.input regression test function Ei
 20080131 tpd src/algebra/special.spad add special function Ei
diff --git a/src/algebra/zerodim.spad.pamphlet b/src/algebra/zerodim.spad.pamphlet
index 26261e9..1bd9951 100644
--- a/src/algebra/zerodim.spad.pamphlet
+++ b/src/algebra/zerodim.spad.pamphlet
@@ -1882,8 +1882,6 @@ concat [realSolve(ts)$zdpack for ts in lts]
 --R                                 Type: List List RealClosure Fraction Integer
 --E 22
 )spool
- 
-)spool
 )lisp (bye)
 @
 <<LexTriangularPackage.help>>=

\start
Date: Fri, 1 Feb 2008 19:50:03 -0500
From: Tim Daly
To: Arthur Ralfs
Subject: Re: x11 location

I'm downloading opensuse and plan to build a machine to test the
axiom build. When I succeed I'll put the binary on the 
<http://axiom.axiom-developer.org> site.

\start
Date: Sun, 3 Feb 2008 11:22:44 -0500
From: Tim Daly
To: Bertfried Fauser
Subject: exterior algebra

Bertfried,

A while ago we had talked about developing Axiom's clifford algebra
package to do more things, similar to the package you wrote. 

I spent some time this summer reading up on clifford/exterior algebras.

I've been thinking about this in the background. Potentially a useful
way to approach the development of such a package is in a mentor/student
style. You, of course, have the mentor role.

  (An aside: I've been pondering ways to develop algebra in Axiom
   and the mentor/student model is one I'd like to explore. Since
   you've already done a similar package elsewhere this should not
   involve a lot of "advisor" time. But, like any teaching exercise,
   it still requires a fair bit of careful thought)

It would be useful if you could provide an input file that showed
a graded set of exercises, starting with the most trivial and working
toward more complex, in an input file. The idea is to show what Axiom
can currently do up until it reaches the limits of the current 
implementation. 

Following that would be a few examples of what you would expect it to
do but which is not yet implemented. Each of these would have either
a book/paper reference (so I can look it up), and the expected result.
I can attempt an implementation and you can give feedback about
correctness and completeness.

The end result is a documented set of "class notes" which illustrate
Axiom's capabilities and new features.

So I'm asking you to construct an input file that gently approaches
and steps over the edge of what Axiom can currently do, with a
suitable set of references and I'll take it from there.

\start
Date: Sun, 3 Feb 2008 11:57:04 -0500
From: Tim Daly
To: Bertfried Fauser
Subject: exterior algebra

Just for a common reference I've been using
Abramowicz, Rafal, et.al. ``Clifford Algebras with Numeric and 
Symbolic Computations'', Birkhauser 1996 ISBN 0-8176-3907-1

and I'll pick up any references you suggest.

\start
Date: Mon, 4 Feb 2008 01:34:00 -0500
From: Tim Daly
To: list
Subject: Axiom precompiled binaries

There are Axiom precompiled binaries and a Doyen iso 
(from Jose Alfredo Portes) at:

<http://axiom.axiom-developer.org/axiom-website/download.html>

\start
Date: Mon, 4 Feb 2008 13:48:18 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Bad crash

I just installed the latest silver version from
http://www.axiom-developer.org/axiom-website/download.html
on my ubuntu system and I tried to do some computation.

While axiom was working, after maybe 10-20 minutes, the
system crashed (very) badly, like just unplugging the power.
The same happened the second time I tried.
I didn't try a third time...

Computations involved computing a groebner basis for
174 equations with 25 variable: am I asking to much from the
system?

If needed, I can post the input file.

\start
Date: 04 Feb 2008 13:56:48 +0100
From: Martin Rubey
To: list
Subject: Re: Bad crash

Fabio Stumbo writes:

> I just installed the latest silver version from
> http://www.axiom-developer.org/axiom-website/download.html
> on my ubuntu system and I tried to do some computation.
> 
> While axiom was working, after maybe 10-20 minutes, the
> system crashed (very) badly, like just unplugging the power.
> The same happened the second time I tried.
> I didn't try a third time...
> 
> Computations involved computing a groebner basis for
> 174 equations with 25 variable: am I asking to much from the
> system?
> 
> If needed, I can post the input file.

Please do so.

\start
Date: Mon, 4 Feb 2008 15:13:54 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Bad crash


>> I just installed the latest silver version from
>> http://www.axiom-developer.org/axiom-website/download.html
>> on my ubuntu system and I tried to do some computation.
>>
>> While axiom was working, after maybe 10-20 minutes, the
>> system crashed (very) badly, like just unplugging the power.
>> The same happened the second time I tried.
>> I didn't try a third time...
>>
>> Computations involved computing a groebner basis for
>> 174 equations with 25 variable: am I asking to much from the
>> system?
>>
>> If needed, I can post the input file.
>
> Please do so.
>
> Martin

Here it is.
After reading it, you will end up with a variable called eqns which 
contains a list of 174 equations in the variable %A,...,%Y.

The problem arises when executing

groebner(eqns)

Fabio
--168433418-156258668-1202134452=:5752

ZGVnbGV4IDogKFBJLFBJKSAtPiBMaXN0KExpc3QoSU5UKSkNCmRlZ2xleChu
LGgpID09DQogbGlzdGEgOiBMaXN0KExpc3QoSU5UKSkgOj0gW10NCiBmb3Ig
aSBpbiAwLi5uXmgtMSByZXBlYXQNCiAgbCA6IExpc3QoSU5UKSA6PSBbMSBm
b3IgaiBpbiAxLi5oXQ0KICBxIDo9IGkNCiAgZm9yIGogaW4gaC4uMSBieSAt
MSByZXBlYXQNCiAgIHIgOj0gZGl2aWRlKHEsbikucmVtYWluZGVyDQogICBx
IDo9IGRpdmlkZShxLG4pLnF1b3RpZW50DQogICBsKGopIDo9IHIrMQ0KICAg
aWYgcSA9IDAgdGhlbiBicmVhaw0KICBsaXN0YSA6PSBhcHBlbmQobGlzdGEs
W2xdKQ0KIGxpc3RhDQpuMmRlZ2xleCA6IChQSSxQSSxQSSkgLT4gTGlzdChJ
TlQpDQpuMmRlZ2xleChpLG4saCkgPT0gDQogaWYgaSA+IG5eaCB0aGVuIGVy
cm9yKCJOdW1lcm8gdHJvcHBvIGdyYW5kZSIpDQogbCA6IExpc3QoSU5UKSA6
PSBbMSBmb3IgaiBpbiAxLi5oXQ0KIHEgOj0gaS0xDQogZm9yIGogaW4gaC4u
MSBieSAtMSByZXBlYXQNCiAgciA6PSBkaXZpZGUocSxuKS5yZW1haW5kZXIN
CiAgcSA6PSBkaXZpZGUocSxuKS5xdW90aWVudA0KICBsKGopIDo9IHIrMQ0K
ICBpZiBxID0gMCB0aGVuIGJyZWFrDQogbA0KZGVnbGV4Mm4gOiAoTGlzdChJ
TlQpLFBJLFBJKSAtPiBQSQ0KZGVnbGV4Mm4obCxuLGgpID09DQogaWYgI2wg
fj0gaCB0aGVuIGVycm9yKCJMYSBsaXN0YSBub24gaGEgbGEgZGltZW5zaW9u
ZSBnaXVzdGEiKSANCiBpIDo9IDANCiBmb3IgaiBpbiBoLi4xIGJ5IC0xIHJl
cGVhdA0KICBjIDo9IGwoaiktMQ0KICBlIDogTk5JIDo9IGgtag0KICBpIDo9
IGkrYypuXmUNCiBpIDo9IGkrMQ0KIGkNCmRlZ3JldmxleCA6IChQSSxQSSkg
LT4gTGlzdChMaXN0KElOVCkpDQpkZWdyZXZsZXgobixoKSA9PQ0KIGxpc3Rh
IDogTGlzdChMaXN0KElOVCkpIDo9IFtdDQogZm9yIGkgaW4gMC4ubl5oLTEg
cmVwZWF0DQogIGwgOiBMaXN0KElOVCkgOj0gWzEgZm9yIGogaW4gMS4uaF0N
CiAgcSA6PSBpDQogIGZvciBqIGluIDEuLmggIHJlcGVhdA0KICAgciA6PSBk
aXZpZGUocSxuKS5yZW1haW5kZXINCiAgIHEgOj0gZGl2aWRlKHEsbikucXVv
dGllbnQNCiAgIGwoaikgOj0gcisxDQogICBpZiBxID0gMCB0aGVuIGJyZWFr
DQogIGxpc3RhIDo9IGFwcGVuZChsaXN0YSxbbF0pDQogbGlzdGENCm4yZGVn
cmV2bGV4IDogKFBJLFBJLFBJKSAtPiBMaXN0KElOVCkNCm4yZGVncmV2bGV4
KGksbixoKSA9PSANCiBpZiBpID4gbl5oIHRoZW4gZXJyb3IoIk51bWVybyB0
cm9wcG8gZ3JhbmRlIikNCiBsIDogTGlzdChJTlQpIDo9IFsxIGZvciBqIGlu
IDEuLmhdDQogcSA6PSBpLTENCiBmb3IgaiBpbiAxLi5oIHJlcGVhdA0KICBy
IDo9IGRpdmlkZShxLG4pLnJlbWFpbmRlcg0KICBxIDo9IGRpdmlkZShxLG4p
LnF1b3RpZW50DQogIGwoaikgOj0gcisxDQogIGlmIHEgPSAwIHRoZW4gYnJl
YWsNCiBsDQpkZWdyZXZsZXgybiA6IChMaXN0KElOVCksUEksUEkpIC0+IFBJ
DQpkZWdyZXZsZXgybihsLG4saCkgPT0NCiBpZiAjbCB+PSBoIHRoZW4gZXJy
b3IoIkxhIGxpc3RhIG5vbiBoYSBsYSBkaW1lbnNpb25lIGdpdXN0YSIpIA0K
IGkgOj0gMA0KIGZvciBqIGluIDEuLmggcmVwZWF0DQogIGMgOj0gbChqKS0x
DQogIGUgOiBOTkkgOj0gai0xDQogIGkgOj0gaStjKm5eZQ0KIGkgOj0gaSsx
DQogaQ0KU2lnbWEgOiAoUEksUEksUEkpIC0+IElOVA0KU2lnbWEobixoLGop
ID09DQogbCA6PSAoai0xKSoobl5oKSArIDEgKyAoMS1uXihoKzEpKSogd2hv
bGVQYXJ0KChqLTEpL24pDQpCYXNpc0NoYW5nZSA6IChOTkksTk5JKSAtPiBN
YXRyaXgoSU5UKQ0KQmFzaXNDaGFuZ2UobixoKSA9PQ0KIG0gOiBNYXRyaXgo
SU5UKSA6PSBuZXcobl4oaCsxKSxuXihoKzEpLDApDQogZm9yIGogaW4gMS4u
bl4oaCsxKSByZXBlYXQNCiAgaSA6PSBTaWdtYShuLGgsaikgDQogIG0oaSxq
KSA6PSAxDQogbQ0KTUZQSSA9PT4gTWF0cml4KEZSQUMoUE9MWShJTlQpKSkN
CkZQSSA9PT4gRlJBQyhQT0xZKElOVCkpDQoNCmNPaz8gOiBNRlBJIC0+IEJv
b2xlYW4NCmNPaz8oYykgPT0NCiBpZiB+KCBzcXVhcmU/IGMgKSB0aGVuIHJl
dHVybihmYWxzZSkNCiBpZiB+KCBwZXJmZWN0U3F1YXJlPyAobmNvbHMgYykg
KSB0aGVuIHJldHVybihmYWxzZSkNCiB0cnVlDQoNCmJPaz8gOiBNRlBJIC0+
IEJvb2xlYW4NCmJPaz8oYikgPT0NCiBpZiAoIG5jb2xzKGIpIH49IG5yb3dz
KGIpXjIgKSB0aGVuIHJldHVybihmYWxzZSkNCiB0cnVlDQoNCg0KYmNPaz8g
OiAoTUZQSSxNRlBJKSAtPiBCb29sZWFuDQpiY09rPyhiLGMpID09DQogaWYg
figgY09rPyhjKSApIHRoZW4gcmV0dXJuKGZhbHNlKQ0KIGlmIH4oIGJPaz8o
YikgKSB0aGVuIHJldHVybihmYWxzZSkNCiBpZiAoIG5jb2xzKGIpIH49IG5y
b3dzKGMpICkgdGhlbiByZXR1cm4oZmFsc2UpDQogdHJ1ZQ0KQmxvY2tNYXRy
aXggOiAoTUZQSSxOTkkpIC0+IE1GUEkNCkJsb2NrTWF0cml4KG0sbikgPT0N
CiByIDo9IG5yb3dzIG0NCiBjIDo9IG5jb2xzIG0NCiBtYXQgOiBNRlBJICA6
PSBuZXcobipyLG4qYywwKQ0KIGkgOiBOTkkgIA0KIGkgOj0gMA0KIHdoaWxl
IGkgPCBuIHJlcGVhdA0KICBzZXRzdWJNYXRyaXghKG1hdCwxK2kqciwxK2kq
YyxtKQ0KICBpIDo9IGkrMQ0KIG1hdA0KQjEgOiBNRlBJIC0+IE1GUEkNCkIx
KGIpID09DQogaWYgfiggYk9rPyhiKSApIHRoZW4gKGVycm9yKCJXcm9uZyBp
bnB1dCIpKQ0KIEJsb2NrTWF0cml4KGIsbnJvd3MoYikpIA0KDQpDMSA6IE1G
UEkgLT4gTUZQSQ0KQzEoYykgPT0NCiBpZiB+KCBjT2s/IGMgKSB0aGVuIChl
cnJvcigiV3JvbmcgaW5wdXQiKSkNCiBCbG9ja01hdHJpeChjLHBlcmZlY3RT
cXJ0IChuY29scyBjKSkgDQpCMiA6IE1GUEkgLT4gTUZQSQ0KQjIoYikgPT0N
CiBpZiB+KCBiT2s/KGIpICkgdGhlbiAoZXJyb3IoIldyb25nIGlucHV0Iikp
DQogbTEgOiBNRlBJDQogbTEgOj0gaW52ZXJzZSBCYXNpc0NoYW5nZShucm93
cyhiKSwxKQ0KIG0yIDo9IEJsb2NrTWF0cml4KGIsbnJvd3MoYikpIA0KIG0z
IDo9IEJhc2lzQ2hhbmdlKG5yb3dzKGIpLDIpDQogbTEqbTIqbTMNCiANCkMy
IDogTUZQSSAtPiBNRlBJDQpDMihjKSA9PQ0KIGlmIH4oIGNPaz8gYyApIHRo
ZW4gKGVycm9yKCJXcm9uZyBpbnB1dCIpKQ0KIG0xIDogTUZQSQ0KIG0xIDo9
IGludmVyc2UgQmFzaXNDaGFuZ2UocGVyZmVjdFNxcnQgKG5jb2xzIGMpLDIp
DQogbTIgOj0gQmxvY2tNYXRyaXgoYyxwZXJmZWN0U3FydCAobmNvbHMgYykp
DQogbTMgOj0gQmFzaXNDaGFuZ2UocGVyZmVjdFNxcnQgKG5jb2xzIGMpLDIp
DQogbTEqbTIqbTMNCllvdW5nQmF4dGVyIDogTUZQSSAtPiBNRlBJDQpZb3Vu
Z0JheHRlcihjKSA9PSANCiBpZiB+KCBjT2s/IGMgKSB0aGVuIChlcnJvcigi
V3JvbmcgaW5wdXQiKSkNCiBjMSA6PSBDMShjKQ0KIGMyIDo9IEMyKGMpICAN
CiBjMSpjMipjMS1jMipjMSpjMiANCg0KWW91bmdCYXh0ZXI/IDogTUZQSSAt
PiBCb29sZWFuDQpZb3VuZ0JheHRlcj8oYykgPT0gDQogbiA6IE5OSSA6PSBw
ZXJmZWN0U3FydChuY29scyhjKSkNCiB6ZXJvIDogTUZQSSA6PSBuZXcobl4z
LG5eMywwKSANCiBpZiAoIFlvdW5nQmF4dGVyKGMpID0gemVybyApIHRoZW4g
cmV0dXJuKHRydWUpDQogZmFsc2UNCkhlY2tlIDogKE1GUEksRlBJKSAtPiBN
RlBJDQpIZWNrZShjLHApID09DQogaWYgfiggY09rPyBjICkgdGhlbiAoZXJy
b3IoIldyb25nIGlucHV0IikpDQogdW5vIDogTUZQSSANCiB1bm8gOj0gZGlh
Z29uYWxNYXRyaXgoWzEgZm9yIGkgaW4gMS4ubnJvd3MgY10pDQogKGMrdW5v
KSooYy1wKnVubykgDQoNCkhlY2tlPyA6IChNRlBJLEZQSSkgLT4gQm9vbGVh
bg0KSGVja2U/KGMscCkgPT0NCiB6ZXJvIDogTUZQSSANCiB6ZXJvIDo9IG5l
dygobnJvd3MgYyleMywobnJvd3MgYyleMywwKSANCiBpZiAoIEhlY2tlKGMs
cCkgPSB6ZXJvICkgdGhlbiByZXR1cm4odHJ1ZSkNCiBmYWxzZQ0KTmF0dXJh
bGl0eTEgOiAoTUZQSSxNRlBJKSAtPiBNRlBJDQpOYXR1cmFsaXR5MShiLGMp
ID09DQogaWYgfiggYmNPaz8oYixjKSApIHRoZW4gKGVycm9yKCJXcm9uZyBp
bnB1dCIpKQ0KIGIxIDo9IEIxKGIpDQogYjIgOj0gQjIoYikNCiBjMSA6PSBD
MShjKQ0KIGMyIDo9IEMyKGMpDQogYypiMSAtIGIyKmMxKmMyIA0KDQpOYXR1
cmFsaXR5MT8gOiAoTUZQSSxNRlBJKSAtPiBCb29sZWFuDQpOYXR1cmFsaXR5
MT8oYixjKSA9PQ0KIHplcm8gOiBNRlBJIA0KIHplcm8gOj0gbmV3KChucm93
cyBiKV4yLChucm93cyBiKV4zLDApIA0KIGlmICggTmF0dXJhbGl0eTEoYixj
KSA9IHplcm8gKSB0aGVuIHJldHVybih0cnVlKQ0KIGZhbHNlDQoNCk5hdHVy
YWxpdHkyIDogKE1GUEksTUZQSSkgLT4gTUZQSQ0KTmF0dXJhbGl0eTIoYixj
KSA9PQ0KIGlmIH4oIGJjT2s/KGIsYykgKSB0aGVuIChlcnJvcigiV3Jvbmcg
aW5wdXQiKSkNCiBiMSA6PSBCMShiKQ0KIGIyIDo9IEIyKGIpDQogYzEgOj0g
QzEoYykNCiBjMiA6PSBDMihjKQ0KIGMqYjIgLSBiMSpjMipjMSANCg0KTmF0
dXJhbGl0eTI/IDogKE1GUEksTUZQSSkgLT4gQm9vbGVhbg0KTmF0dXJhbGl0
eTI/KGIsYykgPT0NCiB6ZXJvIDogTUZQSSANCiB6ZXJvIDo9IG5ldygobnJv
d3MgYileMiwobnJvd3MgYileMywwKSANCiBpZiAoIE5hdHVyYWxpdHkyKGIs
YykgPSB6ZXJvICkgdGhlbiByZXR1cm4odHJ1ZSkNCiBmYWxzZQ0KQW50aXN5
bW1ldHJpYyA6IChNRlBJLE1GUEkpIC0+IE1GUEkNCkFudGlzeW1tZXRyaWMo
YixjKSA9PQ0KIGlmIH4oIGJjT2s/KGIsYykgKSB0aGVuIChlcnJvcigiV3Jv
bmcgaW5wdXQiKSkNCiBiKmMgKyBiIA0KDQpBbnRpc3ltbWV0cmljPyA6IChN
RlBJLE1GUEkpIC0+IEJvb2xlYW4NCkFudGlzeW1tZXRyaWM/KGIsYykgPT0N
CiB6ZXJvIDogTUZQSSA6PSBuZXcobnJvd3MgYiwobnJvd3MgYileMiwwKSAN
CiBpZiBBbnRpc3ltbWV0cmljKGIsYykgPSB6ZXJvIHRoZW4gcmV0dXJuKHRy
dWUpDQogZmFsc2UNCkphY29iaSA6IChNRlBJLE1GUEksRlBJKSAtPiBNRlBJ
DQpKYWNvYmkoYixjLHApID09DQogaWYgfiggYmNPaz8oYixjKSApIHRoZW4g
KGVycm9yKCJXcm9uZyBpbnB1dCIpKQ0KIHVubyA6IE1GUEkgOj0gZGlhZ29u
YWxNYXRyaXgoWzEgZm9yIGkgaW4gMS4uKG5yb3dzIGIpXjNdKQ0KIGIxIDo9
IEIxKGIpDQogYzEgOj0gQzEoYykNCiBjMiA6PSBDMihjKQ0KIGIqYjEqKChw
XjIpKnVuby1wKmMyK2MyKmMxKSANCg0KSmFjb2JpPyA6IChNRlBJLE1GUEks
RlBJKSAtPiBCb29sZWFuDQpKYWNvYmk/KGIsYyxwKSA9PQ0KIHplcm8gOiBN
RlBJIDo9IG5ldyhucm93cyBiLChucm93cyBiKV4zLDApIA0KIGlmIEphY29i
aShiLGMscCkgPSB6ZXJvIHRoZW4gcmV0dXJuKHRydWUpDQogZmFsc2UNClF1
YW50dW1CaW5vbWlhbCA6IChJTlQsSU5UKSAtPiBGUEkNClF1YW50dW1CaW5v
bWlhbChuLGkpID09IA0KIGJpbm9taWFsZSA6IEZQSSANCiBpZiAobiA8IDAp
IG9yIChpID4gbikgb3IgKGkgPCAwKSANCiAgdGhlbiBlcnJvcigicGFyYW1l
dHJpIHNiYWdsaWF0aSIpIA0KIGlmIChpID0gMCkgb3IgKGkgPSBuKSB0aGVu
IHJldHVybigxKQ0KIHJpZ2F2ZWNjaGlhIDogTElTVChGUEkpDQogcmlnYW51
b3ZhIDogTElTVChGUEkpDQogcmlnYXZlY2NoaWEgIDo9IFsxXQ0KIGZvciBq
IGluIDEuLm4gcmVwZWF0DQogIHJpZ2FudW92YSA6PSBbMV0NCiAgayA6PSAx
DQogIHdoaWxlIGsgPD0gai0xIHJlcGVhdA0KICAgYmlub21pYWxlIDo9IGVs
dChyaWdhdmVjY2hpYSxrKStxXihrKSplbHQocmlnYXZlY2NoaWEsaysxKQ0K
ICAgcmlnYW51b3ZhIDo9IGFwcGVuZChyaWdhbnVvdmEsW2Jpbm9taWFsZV0p
DQogICBrIDo9IGsrMQ0KICByaWdhbnVvdmEgOj0gYXBwZW5kKHJpZ2FudW92
YSxbMV0pDQogIHJpZ2F2ZWNjaGlhIDo9IHJpZ2FudW92YQ0KIGJpbm9taWFs
ZSA6PSBlbHQocmlnYXZlY2NoaWEsaSsxKQ0KIGJpbm9taWFsZQ0KUXVhbnR1
bUJpbm9taWFsIDogKE5OSSxOTkkpIC0+IEZQSQ0KUXVhbnR1bUJpbm9taWFs
KG4saSkgPT0gDQogYmlub21pYWxlIDogRlBJIA0KIGlmIChuIDwgMCkgb3Ig
KGkgPiBuKSBvciAoaSA8IDApIA0KICB0aGVuIGVycm9yKCJwYXJhbWV0cmkg
c2JhZ2xpYXRpIikgDQogaWYgKGkgPSAwKSBvciAoaSA9IG4pIHRoZW4gcmV0
dXJuKDEpDQogaWYgMippID4gbiB0aGVuICBpIDo9IG4taQ0KIHJpZ2F2ZWNj
aGlhIDogTElTVChGUEkpDQogcmlnYW51b3ZhIDogTElTVChGUEkpDQogcmln
YXZlY2NoaWEgIDo9IFsxXQ0KIGogOj0gMSANCiB3aGlsZSBqIDw9IGkgcmVw
ZWF0DQogIHJpZ2FudW92YSA6PSBbMV0NCiAgayA6PSAxDQogIHdoaWxlIGsg
PD0gai0xIHJlcGVhdA0KICAgYmlub21pYWxlIDo9IGVsdChyaWdhdmVjY2hp
YSxrKStxXihrKSplbHQocmlnYXZlY2NoaWEsaysxKQ0KICAgcmlnYW51b3Zh
IDo9IGFwcGVuZChyaWdhbnVvdmEsW2Jpbm9taWFsZV0pDQogICBrIDo9IGsr
MQ0KICByaWdhbnVvdmEgOj0gYXBwZW5kKHJpZ2FudW92YSxbMV0pDQogIHJp
Z2F2ZWNjaGlhIDo9IHJpZ2FudW92YQ0KICBqIDo9IGorMQ0KIHdoaWxlIGog
PD0gbi1pIHJlcGVhdA0KICByaWdhbnVvdmEgOj0gWzFdDQogIGsgOj0gMQ0K
ICB3aGlsZSBrIDw9IGkgcmVwZWF0DQogICBiaW5vbWlhbGUgOj0gZWx0KHJp
Z2F2ZWNjaGlhLGspK3FeKGspKmVsdChyaWdhdmVjY2hpYSxrKzEpDQogICBy
aWdhbnVvdmEgOj0gYXBwZW5kKHJpZ2FudW92YSxbYmlub21pYWxlXSkNCiAg
IGsgOj0gaysxDQogIHJpZ2F2ZWNjaGlhIDo9IHJpZ2FudW92YQ0KICBqIDo9
IGorMQ0KIHdoaWxlIGogPD0gbiByZXBlYXQNCiAgcmlnYW51b3ZhIDo9IFtd
DQogIGsgIDo9IDEgDQogIHdoaWxlIGsgPD0gbi1qKzEgcmVwZWF0DQogICAr
K2V4cCA6IE5OSSA6PSBrK24taiANCiAgIGV4cCA6IE5OSSA6PSBrK2oraS0x
LW4NCiAgIGJpbm9taWFsZSA6PSBlbHQocmlnYXZlY2NoaWEsaykrcV4oZXhw
KSplbHQocmlnYXZlY2NoaWEsaysxKQ0KICAgcmlnYW51b3ZhIDo9IGFwcGVu
ZChyaWdhbnVvdmEsW2Jpbm9taWFsZV0pDQogICBrIDo9IGsrMQ0KICByaWdh
dmVjY2hpYSA6PSByaWdhbnVvdmENCiAgaiA6PSBqKzENCiBiaW5vbWlhbGUN
Cg0KWCA6IExpc3QoU3ltYm9sKSANClggOj0gWyVBLCVCLCVDLCVELCVFLCVG
LCVHLCVILCVJLCVKLCVLLCVMLCVNLCVOLCVPLCVQLCVRLCVSLCVTLCVULCVV
LCVWLCVXLCVYLCVZLCVaXQ0KcTo9WCgxNykNCg0KQ0NDIDogKFN5bWJvbCxT
eW1ib2wsU3ltYm9sLFN5bWJvbCxTeW1ib2wsU3ltYm9sLFN5bWJvbCxTeW1i
b2wsU3ltYm9sLFN5bWJvbCxTeW1ib2wsU3ltYm9sLFN5bWJvbCxTeW1ib2ws
U3ltYm9sLFN5bWJvbCkgLT4gTWF0cml4KChGUkFDKFBPTFkoSU5UKSkpKQ0K
Q0NDKCVBLCVCLCVDLCVELCVFLCVGLCVHLCVILCVJLCVKLCVLLCVMLCVNLCVO
LCVPLCVQKSA9PQ0KICBbWyVBLCVCLCVDLCVEXSxbJUUsJUYsJUcsJUhdLFsl
SSwlSiwlSywlTF0sWyVNLCVOLCVPLCVQXV0gDQoNCmMgOj0gQ0NDKCVBLCVC
LCVDLCVELCVFLCVGLCVHLCVILCVJLCVKLCVLLCVMLCVNLCVOLCVPLCVQKSAN
Cg0KQkJCIDogKFN5bWJvbCxTeW1ib2wsU3ltYm9sLFN5bWJvbCxTeW1ib2ws
U3ltYm9sLFN5bWJvbCxTeW1ib2wpIC0+IE1hdHJpeCgoRlJBQyhQT0xZKElO
VCkpKSkNCkJCQiglUiwlUywlVCwlVSwlViwlVywlWCwlWSkgPT0gW1slUiwl
UywlVCwlVV0sWyVWLCVXLCVYLCVZXV0gDQoNCmIgOj0gQkJCKCVSLCVTLCVU
LCVVLCVWLCVXLCVYLCVZKSANCg0KDQptMmwgOiBNYXRyaXgoRlJBQyhQT0xZ
KElOVCkpKSAtPiBMaXN0KEZSQUMoUE9MWShJTlQpKSkNCm0ybChtKSA9PQ0K
IGwgOiBMaXN0KEZSQUMoUE9MWShJTlQpKSkgOj0gW10NCiBmb3IgaSBpbiAx
Li5ucm93cyhtKSByZXBlYXQgDQogIGZvciBqIGluIDEuLm5jb2xzKG0pIHJl
cGVhdA0KICAgbCA6PSBhcHBlbmQobCxbbShpLGopXSkNCiBsDQoNCmVxbnMg
OiBMaXN0KEZSQUMoUE9MWShJTlQpKSkgOj0gWyVCLCVDLCVELCVFLCVJLCVN
XQ0KZXFucyA6PSBhcHBlbmQoZXFucyxtMmwoWW91bmdCYXh0ZXIoYykpKQ0K
ZXFucyA6PSBhcHBlbmQoZXFucyxtMmwoSGVja2UoYyxxKSkpDQplcW5zIDo9
IGFwcGVuZChlcW5zLG0ybChOYXR1cmFsaXR5MShiLGMpKSkNCmVxbnMgOj0g
YXBwZW5kKGVxbnMsbTJsKE5hdHVyYWxpdHkyKGIsYykpKQ0KZXFucyA6PSBh
cHBlbmQoZXFucyxtMmwoQW50aXN5bW1ldHJpYyhiLGMpKSkNCmVxbnMgOj0g
YXBwZW5kKGVxbnMsbTJsKEphY29iaShiLGMscSkpKQ0KDQo=

--168433418-156258668-1202134452=:5752--

\start
Date: Mon, 4 Feb 2008 10:32:53 -0500
From: Tim Daly
To: list
Subject: Re: Bad crash

>I just installed the latest silver version from
>http://www.axiom-developer.org/axiom-website/download.html
>on my ubuntu system and I tried to do some computation.
>
>While axiom was working, after maybe 10-20 minutes, the
>system crashed (very) badly, like just unplugging the power.
>The same happened the second time I tried.
>I didn't try a third time...
>
>Computations involved computing a groebner basis for
>174 equations with 25 variable: am I asking to much from the
>system?
>
>If needed, I can post the input file.

Yes, please post the input file.
My system could use a reboot :-)

I have no idea how or why a lisp program could bring down a system
but I'm willing to find out.

\start
Date: Mon, 4 Feb 2008 10:47:22 -0500
From: Tim Daly
To: list
Subject: Re: Bad crash

ok. I've rebuilt ubuntu, installed axiom, and am starting r.input.
I'll let you know the result. -- Tim

\start
Date: Mon, 04 Feb 2008 06:43:21 -0800
From: Ed Borasky
To: list
Subject: Axiom November 2007 release now in Gentoo Linux

The November 2007 release of Axiom is now in Gentoo's Portage repository 
for testing. The previous version was the September 2005 tarball! I have 
it running on my Athlon64 X2, but I haven't heard whether it runs on the 
other architectures Gentoo supports, especially PowerPC.

\start
Date: Mon, 4 Feb 2008 15:50:24 +0100
From: Ondrej Certik
To: Ed Borasky
Subject: Re: Axiom November 2007 release now in Gentoo Linux

On Feb 4, 2008 3:43 PM, Ed Borasky Ed Borasky wrote:
> The November 2007 release of Axiom is now in Gentoo's Portage repository
> for testing. The previous version was the September 2005 tarball! I have
> it running on my Athlon64 X2, but I haven't heard whether it runs on the
> other architectures Gentoo supports, especially PowerPC.

Just curious - how long does it compile?

\start
Date: Mon, 4 Feb 2008 11:09:59 -0500
From: Tim Daly
To: Ed Borasky
Subject: Re: Axiom November 2007 release now in Gentoo Linux

>> The November 2007 release of Axiom is now in Gentoo's Portage repository
>> for testing. The previous version was the September 2005 tarball! I have
>> it running on my Athlon64 X2, but I haven't heard whether it runs on the
>> other architectures Gentoo supports, especially PowerPC.

I have not tried to build a gentoo version.
Let me know if it succeeds.

I am working on an OSX PowerPC version which I'll post and announce.

\start
Date: Mon, 04 Feb 2008 07:07:00 -0800
From: Ed Borasky
To: Ondrej Certik
Subject: Re: Axiom November 2007 release now in Gentoo Linux

Ondrej Certik wrote:
> On Feb 4, 2008 3:43 PM, Ed Borasky Ed Borasky wrote:
>> The November 2007 release of Axiom is now in Gentoo's Portage repository
>> for testing. The previous version was the September 2005 tarball! I have
>> it running on my Athlon64 X2, but I haven't heard whether it runs on the
>> other architectures Gentoo supports, especially PowerPC.
> 
> Just curious - how long does it compile?
> 
> Ondrej
> 

I forgot to time it. :( It's a dual-core 2.2 GHz box with 4 GB of RAM, 
so I think it's under an hour.

\start
Date: Mon, 4 Feb 2008 16:33:31 +0100
From: Ondrej Certik
To: Ed Borasky
Subject: Re: Axiom November 2007 release now in Gentoo Linux

> I forgot to time it. :( It's a dual-core 2.2 GHz box with 4 GB of RAM,
> so I think it's under an hour.

That'd be cool. The 2005 version took like 10 hours for me, but maybe
I was doing something wrong.

\start
Date: Mon, 4 Feb 2008 15:57:03 -0600
From: Tim Daly
To: Fabio Stumbo
Subject: Bad crash

Well, I've been running your code for about 6 hours or so on 
the fastest machine I have and also on an Ubuntu machine.
Neither one has completed so far but they continue to compute.

As to the complete system crash my best guess is that your system
has "thermal checked", i.e., overheated and thus powered off.
My fast machine has all three fans running and is in a slight hover.

\start
Date: Tue, 5 Feb 2008 11:12:21 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: Re: Bad crash

> Well, I've been running your code for about 6 hours or so on
> the fastest machine I have and also on an Ubuntu machine.
> Neither one has completed so far but they continue to compute.
>
> As to the complete system crash my best guess is that your system
> has "thermal checked", i.e., overheated and thus powered off.
> My fast machine has all three fans running and is in a slight hover.

I am thinking you are right: I tried the same computations on another 
machine: same distribution, same axiom version: it ran for more than 8 
hours without problems, but, unluckly, not giving the answer... :-(

I remember that the temperature was about 60 degrees (Celsius) when it 
crashed: I didn't think it was that much.

In any case, thank you for your attention.

\start
Date: Tue, 5 Feb 2008 12:06:42 +0100 (CET)
From: Waldek Hebisch
To: list
Subject: re: Bad crash

Fabio S. wrote:
> 
> I am thinking you are right: I tried the same computations on another 
> machine: same distribution, same axiom version: it ran for more than 8 
> hours without problems, but, unluckly, not giving the answer... :-(
> 

You may try to do computation modulo a prime number.  For me

groebner([x ::(Polynomial PF(1663)) for x in eqns])

finished in about 15 minutes.  For some (unlucky) primes modular
Groebner basis is quite different than integer Groebner basis, but
for most primes they share many properties.  In fact, one method
of computing integer Groebner bases (currently unimplemented in Axiom)
starts with modular Groebner basis and "lifts" it to an integer one.

Also, it looks that you are using 'Fraction Polynomial Integer'
as your domain.  Did you try to use 'DistributedMultivariatePolynomial'
(which is likely to be much more efficient)?

\start
Date: Tue, 5 Feb 2008 16:29:52 +0100 (CET)
From: Waldek Hebisch
To: list
Subject: re: Groebner basis

> Fabio S. wrote:
> > 
> > I am thinking you are right: I tried the same computations on another 
> > machine: same distribution, same axiom version: it ran for more than 8 
> > hours without problems, but, unluckly, not giving the answer... :-(
> > 
> 
> You may try to do computation modulo a prime number.  For me
> 
> groebner([x ::(Polynomial PF(1663)) for x in eqns])
> 
> finished in about 15 minutes.  For some (unlucky) primes modular
> Groebner basis is quite different than integer Groebner basis, but
> for most primes they share many properties.  In fact, one method
> of computing integer Groebner bases (currently unimplemented in Axiom)
> starts with modular Groebner basis and "lifts" it to an integer one.
> 
> Also, it looks that you are using 'Fraction Polynomial Integer'
> as your domain.  Did you try to use 'DistributedMultivariatePolynomial'
> (which is likely to be much more efficient)?
> 

I now tried the following:

vars := members(reduce(append, [variables(x) for x in eqns]) :: (Set Symbol))
groebner([x :: (HomogeneousDistributedMultivariatePolynomial(vars, Integer)) for x in eqns])

It finished in about 30 minutes, using less than 100 Mb of memory.
The difference is that Groebner basis is computed relative to
total degree reverse lexicografic ordering, while your original
code requested lexicographic ordering.

\start
Date: Tue, 5 Feb 2008 12:24:09 -0500
From: Tim Daly
To: Fabio Stumbo
Subject: re: Groebner basis

Would you be interested in adding a bit of documentation to
your file to explain the "what and why"? It would be useful
to people to have examples of Groebner calculations.

\start
Date: Tue, 5 Feb 2008 13:09:30 -0500
From: Tim Daly
To: Fabio Stumbo, Waldek Hebisch
Subject: re: Groebner basis

I ran Waldek's version of your code with the change to HDMP
and it completes in about 15 minutes.

\start
Date: Tue, 5 Feb 2008 22:49:43 +0100 (CET)
From: Fabio Stumbo
To: list
Subject: re: Groebner basis

First, let me thank all of you for your support: I will use all the hints 
in my next computations.

Effectively, I didn't think to do computations modulo a prime, even if it 
is a common trick.
Neither I thought about changing the domain where computing the groebner 
basis, but this is due to the fact that I don't know exactly in which 
domain axiom performs better.

About documentation, the input file is, in reality, a stripped version of 
a pamphlet file which I write to document my own code because I know for 
personal experience that I can't recognize _my own_ (undocumented) code of 
ten years ago... :-((
Nevertheless, the pamphlet is very much a work in progress at the 
beginning of its life: for the moment it is not yet in a publishable form.
When it will, no doubt I will submit it.

Since I am there, maybe I can ask for some doubt I have about 
pamphlet files: I started with a model which implied the use of the make 
file, using notangle and nowave.
It was quite involved.
After installing the latest silver, I discovered that now there is the 
chunck environment and that the input file can be stripped with
)lisp (tangle "input.file" "chunckname")
This greatly simplify the production of pamphlet files, since they now 
are plain LaTeX files. The questions:
1) (this is a little silly) given that a pamphlet is a latex file, is it 
"morally"  wrong to call it x.tex instead of x.pamphlet? The reason for 
this is  simply laziness: .tex files are recognized automatically by most 
editors (I use vim), whereas to obtain the same behaviour for .pamphlet 
you need some little hack.
2) is it in the plan to insert the parser (gclweb, if I am not wrong) 
inside the command
)r file.tex
so that there will be no need to bother with anything else than a latex 
file?
3) which pamphlet file in the source can be taken both as example 
and model for constructing packages/domain/category which is complete, 
yet simple enough, and selfcontained?


Finally, I just want to express my opinion, without willing to reopen
last year discussions, so please delete, and do not reply to, this remark.
It is really a pity that there is dispersion of resources in axiom 
development.
Yes, Tim: I do agree completely with the 30 years horizont...
You could extend it also to \aleph_0 and I would still agree!
This is the only way to have a program which should be like mathematics 
itself: there to stay.

\start
Date: Tue, 5 Feb 2008 22:42:13 -0500
From: Tim Daly
To: list
Subject: re: Groebner basis

>After installing the latest silver, I discovered that now there is the 
>chunck environment and that the input file can be stripped with
>)lisp (tangle "input.file" "chunckname")
>This greatly simplify the production of pamphlet files, since they now 
>are plain LaTeX files. The questions:

>1) (this is a little silly) given that a pamphlet is a latex file, is it 
>"morally"  wrong to call it x.tex instead of x.pamphlet? The reason for 
>this is  simply laziness: .tex files are recognized automatically by most 
>editors (I use vim), whereas to obtain the same behaviour for .pamphlet 
>you need some little hack.

No, it's not morally wrong. There are files in the current system
(e.g. src/doc/book.pamphlet) which are pure latex files. I use the
pamphlet name everywhere so you don't have to know either way.
Pamphlet files are a strict superset of latex files. I thought
about using a shorter extension than ".pamphlet" but, really, if
you're going to go to the effort to make things readable everywhere
why not make the filename readable, rather than .p or .pa or .pam, etc.



I tend to sit at an Axiom prompt while writing pamphlet files (usually
input files these days but also during the special function work). 
I run xdvi on the file in a separate process because every time the
.dvi file changes the xdvi process updates the screen. So I find the
following sequence (assigned to "register" keys in emacs) very productive:


-> )sys document foo.spad     <= uses foo.spad.pamphlet
-> )co foo                    <= generates foo.spad, foo.spad.dvi
-> )lib FOO

or 

-> )sys document foo.input    <= uses foo.input.pamphlet
-> )read foo                  <= generates foo.input, foo.spad.dvi

and since I once did:

-> )sys xdvi foo.spad.dvi &
 
the foo.spad.dvi screen gets updated every time. Thus I can incrementally
change a buffer and every 10 lines or so fully remake the documentation
and the source code and test the result. It is very fast and very easy.
Note that I never have to type ".pamphlet"




>2) is it in the plan to insert the parser (gclweb, if I am not wrong) 
>inside the command
>)r file.tex
>so that there will be no need to bother with anything else than a latex 
>file?

Axiom will fully understand pamphlet files. All of the levels of
the system, including lisp, once the asdf mechanism works, all
the way up to the )whatevercommand will understand pamphlets.
If I do it right it should be trivial to make it know that .tex
files can also be used for some commands (e.g. document) and not
others (e.g. compile). The gclweb code understands pamphlet files
now. It is a small (but apparently controversial) step to eliminate
noweb completely and just let Axiom "do the right thing".




>3) which pamphlet file in the source can be taken both as example 
>and model for constructing packages/domain/category which is complete, 
>yet simple enough, and selfcontained?

src/algebra/dhmatrix.spad is the canonical example at the moment.
The algebra is very simple yet lends itself to many interesting
domains (robotics, graphics, linear algebra, etc).

The new src/algebra/special.spad has some more extensive documentation
about the details of the Ei and En functions and their Chebyshev
polynomial approximations.

list.spad.pamphlet shows both the regression testing (the
<<list.input>> chunk) and the ")help" documentation 
(the <<list.help>> chunk) is integrated into the file. 

\start
Date: Tue, 5 Feb 2008 22:50:20 -0500
From: Tim Daly
To: Camm Maguire
Subject: gcl on PPC

Do you know a version of gcl that runs on a Mac/PPC platform?

\start
Date: Thu, 7 Feb 2008 12:32:26 -0600
From: Tim Daly
To: list
Subject: 20080107.01.tpd.patch (macosxppc port)

This changeset enables building for the macosxppc platform. See
<http://axiom.axiom-developer.org/axiom-website/download.html>

The pseudo-terminals (/dev/pty) don't work so the hyperdoc/graphics fails.
This is still under study. The new browser-based hyperdoc will make this
problem disappear.

The )browse command works but you have to use the latest firefox because
safari does not seem to know about the http request object.

There is a nasty interaction between CVS and OSX. Apparently CVS won't
let you delete directories. OSX considers two names that differ only
by case to be the same thing. Axiom did a global downcase of all
filenames but CVS doesn't want to delete the directories so the uppercase
ones overwrite the lowercase ones. The fix is to use the sources from 
the axiom download page rather than from CVS.

To build the system you need to install xcode from 
<http://developer.apple.com/tools/download> and you need the path:
export PATH=/sw/bin:$AXIOM/bin:$PATH

Running the binary is the same as always:

cd axiom
export AXIOM=`pwd`/mnt/macosxppc
export PATH=$AXIOM/bin:$PATH
axiom

Tim

======================================================================
diff --git a/Makefile.pamphlet b/Makefile.pamphlet
index 2775bb5..cf1de09 100644
--- a/Makefile.pamphlet
+++ b/Makefile.pamphlet
@@ -775,11 +775,17 @@ GCLOPTS="--enable-vssize=65536*2 --enable-locbfd --disable-dynsysbfd \
          --disable-statsysbfd --enable-maxpage=256*1024 --disable-xgcl \
          --disable-tkconfig"
 @
-For the MACOSX port we need the following options
+For the MACOSX port we need the following options. The ``--disable-nls'' means 
+that we will not be supporting natural language internationalization.
+The ``--enable-maxpage'' has been eliminated because it causes build failures.
+The ``--enable-machine'' parameter appears to be used by configure from the
+setting of the ``canonical'' variable, which is in turn set by a shell script.
+We need to add ``--enable-locbfd'' and ``--disable-dlopen'' due to the error
+``unexec: not enough room for load commands for new \_\_DATA segments''.
 <<GCLOPTS-CUSTRELOC>>=
-GCLOPTS="--enable-vssize=65536*2 --enable-maxpage=256*1024 --disable-locbfd \
+GCLOPTS="--enable-vssize=65536*2 --disable-nls  --enable-locbfd \
          --disable-statsysbfd  --enable-custreloc --disable-tkconfig \
-         --enable-machine=pwerpc-macosx --disable-xgcl"
+         --enable-machine=powerpc-macosx --disable-xgcl --disable-dlopen"
 @
 \subsection{Makefile.axposf1v3}
 <<Makefile.axposf1v3>>=
@@ -1268,6 +1274,282 @@ all: rootdirs noweb srcsetup lspdir srcdir
 <<clean>>
 
 @
+\subsection{Makefile.redhat72}
+<<Makefile.redhat72>>=
+# System dependent Makefile for the Intel/Linux platform
+# Platform variable
+PLF=LINUXplatform
+# C compiler flags
+CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include"
+# Loader flags
+LDF=" -L/usr/X11R6/lib ${XLIB}/libXpm.a "
+# C compiler to use
+CC=gcc 
+AWK=gawk
+RANLIB=ranlib
+TOUCH=touch
+TAR=tar
+AXIOMXLROOT=${AXIOM}/compiler
+O=o
+BYE=bye
+LISP=lsp
+DAASE=${SRC}/share
+# where the libXpm.a library lives
+XLIB=/usr/X11R6/lib
+<<GCLOPTS-LOCBFD>>
+<<SRCDIRS>>
+PATCH=patch
+
+ENV=PLF=${PLF} CCF=${CCF} LDF=${LDF} CC=${CC} AWK=${AWK} RANLIB=${RANLIB} \
+    TOUCH=${TOUCH} TAR=${TAR} AXIOMXLROOT=${AXIOMXLROOT} O=${O} BYE=${BYE} \
+    LISP=${LISP} DAASE=${DAASE} XLIB=${XLIB} GCLOPTS=${GCLOPTS} \
+    SRCDIRS=${SRCDIRS} PATCH=${PATCH}
+
+all: rootdirs noweb srcsetup lspdir srcdir
+	@echo 45 Makefile.linux called
+	@echo 46 Environment : ${ENV} 
+	@echo 47 finished system build on `date` | tee >lastBuildDate
+
+<<rootdirs>>
+<<noweb>>
+<<literate commands>>
+<<srcsetup>>
+<<src>>
+<<lsp>>
+<<document>>
+<<clean>>
+
+@
+\subsection{Makefile.redhat9}
+<<Makefile.redhat9>>=
+# System dependent Makefile for the Intel/Linux platform
+# Platform variable
+PLF=LINUXplatform
+# C compiler flags
+CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include"
+# Loader flags
+LDF=" -L/usr/X11R6/lib ${XLIB}/libXpm.a "
+# C compiler to use
+CC=gcc 
+AWK=gawk
+RANLIB=ranlib
+TOUCH=touch
+TAR=tar
+AXIOMXLROOT=${AXIOM}/compiler
+O=o
+BYE=bye
+LISP=lsp
+DAASE=${SRC}/share
+# where the libXpm.a library lives
+XLIB=/usr/X11R6/lib
+<<GCLOPTS-LOCBFD>>
+<<SRCDIRS>>
+PATCH=patch
+
+ENV=PLF=${PLF} CCF=${CCF} LDF=${LDF} CC=${CC} AWK=${AWK} RANLIB=${RANLIB} \
+    TOUCH=${TOUCH} TAR=${TAR} AXIOMXLROOT=${AXIOMXLROOT} O=${O} BYE=${BYE} \
+    LISP=${LISP} DAASE=${DAASE} XLIB=${XLIB} GCLOPTS=${GCLOPTS} \
+    SRCDIRS=${SRCDIRS} PATCH=${PATCH}
+
+all: rootdirs noweb srcsetup lspdir srcdir
+	@echo 45 Makefile.linux called
+	@echo 46 Environment : ${ENV} 
+	@echo 47 finished system build on `date` | tee >lastBuildDate
+
+<<rootdirs>>
+<<noweb>>
+<<literate commands>>
+<<srcsetup>>
+<<src>>
+<<lsp>>
+<<document>>
+<<clean>>
+
+@
+\subsection{Makefile.debian}
+<<Makefile.debian>>=
+# System dependent Makefile for the Intel/Linux platform
+# Platform variable
+PLF=LINUXplatform
+# C compiler flags
+CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include"
+# Loader flags
+LDF=" -L/usr/X11R6/lib -L/usr/lib ${XLIB}/libXpm.a "
+# C compiler to use
+CC=gcc 
+AWK=gawk
+RANLIB=ranlib
+TOUCH=touch
+TAR=tar
+AXIOMXLROOT=${AXIOM}/compiler
+O=o
+BYE=bye
+LISP=lsp
+DAASE=${SRC}/share
+# where the libXpm.a library lives
+XLIB=/usr/lib
+<<GCLOPTS-LOCBFD>>
+<<SRCDIRS>>
+PATCH=patch
+
+ENV=PLF=${PLF} CCF=${CCF} LDF=${LDF} CC=${CC} AWK=${AWK} RANLIB=${RANLIB} \
+    TOUCH=${TOUCH} TAR=${TAR} AXIOMXLROOT=${AXIOMXLROOT} O=${O} BYE=${BYE} \
+    LISP=${LISP} DAASE=${DAASE} XLIB=${XLIB} GCLOPTS=${GCLOPTS} \
+    SRCDIRS=${SRCDIRS} PATCH=${PATCH}
+
+all: rootdirs noweb srcsetup lspdir srcdir
+	@echo 45 Makefile.linux called
+	@echo 46 Environment : ${ENV} 
+	@echo 47 finished system build on `date` | tee >lastBuildDate
+
+<<rootdirs>>
+<<noweb>>
+<<literate commands>>
+<<srcsetup>>
+<<src>>
+<<lsp>>
+<<document>>
+<<clean>>
+
+@
+\subsection{Makefile.opensuse}
+<<Makefile.opensuse>>=
+# System dependent Makefile for the Intel/Linux platform
+# Platform variable
+PLF=LINUXplatform
+# C compiler flags
+CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include"
+# Loader flags
+LDF=" -L/usr/lib ${XLIB}/libXpm.a "
+# C compiler to use
+CC=gcc 
+AWK=gawk
+RANLIB=ranlib
+TOUCH=touch
+TAR=tar
+AXIOMXLROOT=${AXIOM}/compiler
+O=o
+BYE=bye
+LISP=lsp
+DAASE=${SRC}/share
+# where the libXpm.a library lives
+XLIB=/usr/lib
+<<GCLOPTS-LOCBFD>>
+<<SRCDIRS>>
+PATCH=patch
+
+ENV=PLF=${PLF} CCF=${CCF} LDF=${LDF} CC=${CC} AWK=${AWK} RANLIB=${RANLIB} \
+    TOUCH=${TOUCH} TAR=${TAR} AXIOMXLROOT=${AXIOMXLROOT} O=${O} BYE=${BYE} \
+    LISP=${LISP} DAASE=${DAASE} XLIB=${XLIB} GCLOPTS=${GCLOPTS} \
+    SRCDIRS=${SRCDIRS} PATCH=${PATCH}
+
+all: rootdirs noweb srcsetup lspdir srcdir
+	@echo 45 Makefile.linux called
+	@echo 46 Environment : ${ENV} 
+	@echo 47 finished system build on `date` | tee >lastBuildDate
+
+<<rootdirs>>
+<<noweb>>
+<<literate commands>>
+<<srcsetup>>
+<<src>>
+<<lsp>>
+<<document>>
+<<clean>>
+
+@
+\subsection{Makefile.ubuntu}
+<<Makefile.ubuntu>>=
+# System dependent Makefile for the Intel/Linux platform
+# Platform variable
+PLF=LINUXplatform
+# C compiler flags
+CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include"
+# Loader flags
+LDF=" -L/usr/X11R6/lib -L/usr/lib ${XLIB}/libXpm.a "
+# C compiler to use
+CC=gcc 
+AWK=gawk
+RANLIB=ranlib
+TOUCH=touch
+TAR=tar
+AXIOMXLROOT=${AXIOM}/compiler
+O=o
+BYE=bye
+LISP=lsp
+DAASE=${SRC}/share
+# where the libXpm.a library lives
+XLIB=/usr/lib
+<<GCLOPTS-LOCBFD>>
+<<SRCDIRS>>
+PATCH=patch
+
+ENV=PLF=${PLF} CCF=${CCF} LDF=${LDF} CC=${CC} AWK=${AWK} RANLIB=${RANLIB} \
+    TOUCH=${TOUCH} TAR=${TAR} AXIOMXLROOT=${AXIOMXLROOT} O=${O} BYE=${BYE} \
+    LISP=${LISP} DAASE=${DAASE} XLIB=${XLIB} GCLOPTS=${GCLOPTS} \
+    SRCDIRS=${SRCDIRS} PATCH=${PATCH}
+
+all: rootdirs noweb srcsetup lspdir srcdir
+	@echo 45 Makefile.linux called
+	@echo 46 Environment : ${ENV} 
+	@echo 47 finished system build on `date` | tee >lastBuildDate
+
+<<rootdirs>>
+<<noweb>>
+<<literate commands>>
+<<srcsetup>>
+<<src>>
+<<lsp>>
+<<document>>
+<<clean>>
+
+@
+\subsection{Makefile.macosxppc}
+<<Makefile.macosxppc>>=
+# System dependent Makefile for the MAC/BSD platform
+# Platform variable
+PLF=MACOSXplatform
+# C compiler flags
+CCF="-O2 -fno-strength-reduce -Wall -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -I/usr/include/sys"
+# Loader flags
+LDF=" -L/usr/X11R6/lib ${XLIB}/libXpm.a "
+# C compiler to use
+CC=gcc 
+AWK=awk
+RANLIB=ranlib
+TOUCH=touch
+TAR=tar
+AXIOMXLROOT=${AXIOM}/compiler
+O=o
+BYE=bye
+LISP=lsp
+DAASE=${SRC}/share
+# where the libXpm.a library lives
+XLIB=/usr/X11R6/lib
+<<GCLOPTS-CUSTRELOC>>
+<<SRCDIRS>>
+PATCH=patch
+
+ENV=PLF=${PLF} CCF=${CCF} LDF=${LDF} CC=${CC} AWK=${AWK} RANLIB=${RANLIB} \
+    TOUCH=${TOUCH} TAR=${TAR} AXIOMXLROOT=${AXIOMXLROOT} O=${O} BYE=${BYE} \
+    LISP=${LISP} DAASE=${DAASE} XLIB=${XLIB} GCLOPTS=${GCLOPTS} \
+    SRCDIRS=${SRCDIRS} PATCH=${PATCH} PATH=${PATH}
+
+all: rootdirs noweb srcsetup lspdir srcdir
+	@echo 45 Makefile.linux called
+	@echo 46 Environment : ${ENV} 
+	@echo 47 finished system build on `date` | tee >lastBuildDate
+
+<<rootdirs>>
+<<noweb>>
+<<literate commands>>
+<<srcsetup>>
+<<src>>
+<<lsp>>
+<<document>>
+<<clean>>
+
+@
 \subsection{Makefile.fedora5}
 On Fedora Core 5 we cannot use the line
 \begin{verbatim}
@@ -1277,24 +1559,6 @@ to link to the Xpm libraries. Instead We need to use
 \begin{verbatim}
   -l Xpm
 \end{verbatim}
-These are added onto the end of the LDF variable.
-
-Annoyingly enough it seems that GCL uses a default extension of .lsp
-rather than .lisp so we add the [[LISP]] variable here. We need to
-depend on the default extension behavior because the system build
-will load either the interpreted or compiled form of a file depending
-on which is available. This varies at different stages of the build.
-
-It turns out that the standard GCL OPTS does not compile with the
-GCL 2.6.8pre version. We changed it from 
-\begin{verbatim}
-@<<GCLOPTS>>
-\end{verbatim}
-to read
-\begin{verbatim}
-@<<GCLOPTS-LOCBFD>>
-\end{verbatim}
-
 GCL-2.6.8pre2 will not build successfully on fedora core 5
 so we need to downgrade the GCLVERSION.
 <<Makefile.fedora5>>=
diff --git a/changelog b/changelog
index 42b6f9d..c9a8e1a 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,14 @@
+20080107 tpd Makefile fix GCLOPTS-CUSTRELOC for macosxppc
+20080107 tpd Makefile add Makefile.macosxppc stanza and GCLOPTS-CUSTRELOC
+20080107 tpd src/algebra/Makefile make cp of upper/lower files conditional
+20080107 tpd lsp/Makefile add gcl-2.6.8pre powerpc patch
+20080107 tpd zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch added
+20080107 tpd src/graph/viewman/viewman.c add defined(MACOSXplatform)
+20080104 tpd Makefile add debian
+20080104 tpd Makefile add redhat72
+20080104 tpd Makefile add redhat9
+20080103 tpd Makefile add opensuse
+20080103 tpd Makefile add ubuntu
 20080102 tpd src/algebra/zerodim remove extra )spool in LexTriangularPackage
 20080131 tpd src/input/Makefile add ei.input for Ei regression test
 20080131 tpd src/input/ei.input regression test function Ei
diff --git a/lsp/Makefile.pamphlet b/lsp/Makefile.pamphlet
index 4a2d3fb..63618c7 100644
--- a/lsp/Makefile.pamphlet
+++ b/lsp/Makefile.pamphlet
@@ -194,7 +194,9 @@ but, since no initialization is needed, we simply create empty files.
 <<gcl-2.6.8pre.socket.patch>>=
 	@(cd ${GCLVERSION}/h ; \
 	  echo 3 applying EXTRAS patch to h/linux.defs ; \
-	  ${PATCH} <${SPD}/zips/${GCLVERSION}.h.linux.defs.patch )
+	  ${PATCH} <${SPD}/zips/${GCLVERSION}.h.linux.defs.patch ; \
+	  echo 3a applying EXTRAS patch to h/powerpc-macosx.defs ; \
+	  ${PATCH} <${SPD}/zips/${GCLVERSION}.h.powerpc-macosx.defs.patch )
 	@(echo 4 setup ini files for EXTRAS patch ; \
 	  touch ${OBJ}/${SYS}/lib/cfuns-c.ini ; \
 	  touch ${OBJ}/${SYS}/lib/sockio-c.ini )
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 939e6e5..b11ba9c 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -2310,7 +2310,7 @@ ${HELP}/Complex.help: ${IN}/gaussian.spad.pamphlet
 	@echo 7010 create Complex.help from ${IN}/gaussian.spad.pamphlet
 	@${TANGLE} -R"Complex.help" ${IN}/gaussian.spad.pamphlet \
             >${HELP}/Complex.help
-	@cp ${HELP}/Complex.help ${HELP}/COMPLEX.help
+	@-cp ${HELP}/Complex.help ${HELP}/COMPLEX.help
 	@${TANGLE} -R"Complex.input" ${IN}/gaussian.spad.pamphlet \
             >${INPUT}/Complex.input
 
@@ -2404,7 +2404,7 @@ ${HELP}/File.help: ${IN}/files.spad.pamphlet
 	@echo 7021 create File.help from ${IN}/files.spad.pamphlet
 	@${TANGLE} -R"File.help" ${IN}/files.spad.pamphlet \
            >${HELP}/File.help
-	@cp ${HELP}/File.help ${HELP}/FILE.help
+	@-cp ${HELP}/File.help ${HELP}/FILE.help
 	@${TANGLE} -R"File.input" ${IN}/files.spad.pamphlet \
             >${INPUT}/File.input
 
@@ -2428,7 +2428,7 @@ ${HELP}/Float.help: ${IN}/float.spad.pamphlet
 	@echo 7024 create Float.help from ${IN}/float.spad.pamphlet
 	@${TANGLE} -R"Float.help" ${IN}/float.spad.pamphlet \
            >${HELP}/Float.help
-	@cp ${HELP}/Float.help ${HELP}/FLOAT.help
+	@-cp ${HELP}/Float.help ${HELP}/FLOAT.help
 	@${TANGLE} -R"Float.input" ${IN}/float.spad.pamphlet \
             >${INPUT}/Float.input
 
@@ -2487,7 +2487,7 @@ ${HELP}/GroebnerFactorizationPackage.help: ${IN}/groebf.spad.pamphlet
 ${HELP}/Heap.help: ${IN}/bags.spad.pamphlet
 	@echo 7030 create Heap.help from ${IN}/bags.spad.pamphlet
 	@${TANGLE} -R"Heap.help" ${IN}/bags.spad.pamphlet >${HELP}/Heap.help
-	@cp ${HELP}/Heap.help ${HELP}/HEAP.help
+	@-cp ${HELP}/Heap.help ${HELP}/HEAP.help
 	@${TANGLE} -R"Heap.input" ${IN}/bags.spad.pamphlet \
             >${INPUT}/Heap.input
 
@@ -2548,7 +2548,7 @@ ${HELP}/Kernel.help: ${IN}/kl.spad.pamphlet
 	@echo 7036 create Kernel.help from ${IN}/kl.spad.pamphlet
 	@${TANGLE} -R"Kernel.help" ${IN}/kl.spad.pamphlet \
            >${HELP}/Kernel.help
-	@cp ${HELP}/Kernel.help ${HELP}/KERNEL.help
+	@-cp ${HELP}/Kernel.help ${HELP}/KERNEL.help
 	@${TANGLE} -R"Kernel.input" ${IN}/kl.spad.pamphlet \
             >${INPUT}/Kernel.input
 
@@ -2630,7 +2630,7 @@ ${HELP}/List.help: ${IN}/list.spad.pamphlet
 	@echo 7045 create List.help from ${IN}/list.spad.pamphlet
 	@${TANGLE} -R"List.help" ${IN}/list.spad.pamphlet \
            >${HELP}/List.help
-	@cp ${HELP}/List.help ${HELP}/LIST.help
+	@-cp ${HELP}/List.help ${HELP}/LIST.help
 	@${TANGLE} -R"List.input" ${IN}/list.spad.pamphlet \
             >${INPUT}/List.input
 
@@ -2646,7 +2646,7 @@ ${HELP}/Magma.help: ${IN}/xlpoly.spad.pamphlet
 	@echo 7047 create Magma.help from ${IN}/xlpoly.spad.pamphlet
 	@${TANGLE} -R"Magma.help" ${IN}/xlpoly.spad.pamphlet \
             >${HELP}/Magma.help
-	@cp ${HELP}/Magma.help ${HELP}/MAGMA.help
+	@-cp ${HELP}/Magma.help ${HELP}/MAGMA.help
 	@${TANGLE} -R"Magma.input" ${IN}/xlpoly.spad.pamphlet \
             >${INPUT}/Magma.input
 
@@ -2686,7 +2686,7 @@ ${HELP}/Matrix.help: ${IN}/matrix.spad.pamphlet
 	@echo 7052 create Matrix.help from ${IN}/matrix.spad.pamphlet
 	@${TANGLE} -R"Matrix.help" ${IN}/matrix.spad.pamphlet \
            >${HELP}/Matrix.help
-	@cp ${HELP}/Matrix.help ${HELP}/MATRIX.help
+	@-cp ${HELP}/Matrix.help ${HELP}/MATRIX.help
 	@${TANGLE} -R"Matrix.input" ${IN}/matrix.spad.pamphlet \
             >${INPUT}/Matrix.input
 
@@ -2712,7 +2712,7 @@ ${HELP}/MultivariatePolynomial.help: ${IN}/multpoly.spad.pamphlet
 ${HELP}/None.help: ${IN}/any.spad.pamphlet
 	@echo 7055 create None.help from ${IN}/any.spad.pamphlet
 	@${TANGLE} -R"None.help" ${IN}/any.spad.pamphlet >${HELP}/None.help
-	@cp ${HELP}/None.help ${HELP}/NONE.help
+	@-cp ${HELP}/None.help ${HELP}/NONE.help
 	@${TANGLE} -R"None.input" ${IN}/any.spad.pamphlet >${INPUT}/None.input
 
 ${HELP}/Octonion.help: ${IN}/oct.spad.pamphlet
@@ -2864,7 +2864,7 @@ ${HELP}/Set.help: ${IN}/sets.spad.pamphlet
 	@echo 7073 create Set.help from ${IN}/sets.spad.pamphlet
 	@${TANGLE} -R"Set.help" ${IN}/sets.spad.pamphlet \
            >${HELP}/Set.help
-	@cp ${HELP}/Set.help ${HELP}/SET.help
+	@-cp ${HELP}/Set.help ${HELP}/SET.help
 	@${TANGLE} -R"Set.input" ${IN}/sets.spad.pamphlet \
             >${INPUT}/Set.input
 
@@ -2907,7 +2907,7 @@ ${HELP}/Stream.help: ${IN}/stream.spad.pamphlet
 	@echo 7078 create Stream.help from ${IN}/stream.spad.pamphlet
 	@${TANGLE} -R"Stream.help" ${IN}/stream.spad.pamphlet \
            >${HELP}/Stream.help
-	@cp ${HELP}/Stream.help ${HELP}/STREAM.help
+	@-cp ${HELP}/Stream.help ${HELP}/STREAM.help
 	@${TANGLE} -R"Stream.input" ${IN}/stream.spad.pamphlet \
             >${INPUT}/Stream.input
 
@@ -2915,7 +2915,7 @@ ${HELP}/String.help: ${IN}/string.spad.pamphlet
 	@echo 7079 create String.help from ${IN}/string.spad.pamphlet
 	@${TANGLE} -R"String.help" ${IN}/string.spad.pamphlet \
            >${HELP}/String.help
-	@cp ${HELP}/String.help ${HELP}/STRING.help
+	@-cp ${HELP}/String.help ${HELP}/STRING.help
 	@${TANGLE} -R"String.input" ${IN}/string.spad.pamphlet \
             >${INPUT}/String.input
 
@@ -2931,7 +2931,7 @@ ${HELP}/Symbol.help: ${IN}/symbol.spad.pamphlet
 	@echo 7081 create Symbol.help from ${IN}/symbol.spad.pamphlet
 	@${TANGLE} -R"Symbol.help" ${IN}/symbol.spad.pamphlet \
            >${HELP}/Symbol.help
-	@cp ${HELP}/Symbol.help ${HELP}/SYMBOL.help
+	@-cp ${HELP}/Symbol.help ${HELP}/SYMBOL.help
 	@${TANGLE} -R"Symbol.input" ${IN}/symbol.spad.pamphlet \
             >${INPUT}/Symbol.input
 
@@ -2939,7 +2939,7 @@ ${HELP}/Table.help: ${IN}/table.spad.pamphlet
 	@echo 7082 create Table.help from ${IN}/table.spad.pamphlet
 	@${TANGLE} -R"Table.help" ${IN}/table.spad.pamphlet \
            >${HELP}/Table.help
-	@cp ${HELP}/Table.help ${HELP}/TABLE.help
+	@-cp ${HELP}/Table.help ${HELP}/TABLE.help
 	@${TANGLE} -R"Table.input" ${IN}/table.spad.pamphlet \
             >${INPUT}/Table.input
 
@@ -2947,7 +2947,7 @@ ${HELP}/TextFile.help: ${IN}/files.spad.pamphlet
 	@echo 7083 create TextFile.help from ${IN}/files.spad.pamphlet
 	@${TANGLE} -R"TextFile.help" ${IN}/files.spad.pamphlet \
            >${HELP}/TextFile.help
-	@cp ${HELP}/TextFile.help ${HELP}/TEXTFILE.help
+	@-cp ${HELP}/TextFile.help ${HELP}/TEXTFILE.help
 	@${TANGLE} -R"TextFile.input" ${IN}/files.spad.pamphlet \
             >${INPUT}/TextFile.input
 
@@ -2990,14 +2990,14 @@ ${HELP}/Vector.help: ${IN}/vector.spad.pamphlet
 	@echo 7088 create Vector.help from ${IN}/vector.spad.pamphlet
 	@${TANGLE} -R"Vector.help" ${IN}/vector.spad.pamphlet \
            >${HELP}/Vector.help
-	@cp ${HELP}/Vector.help ${HELP}/VECTOR.help
+	@-cp ${HELP}/Vector.help ${HELP}/VECTOR.help
 	@${TANGLE} -R"Vector.input" ${IN}/vector.spad.pamphlet \
             >${INPUT}/Vector.input
 
 ${HELP}/Void.help: ${IN}/void.spad.pamphlet
 	@echo 7089 create Void.help from ${IN}/void.spad.pamphlet
 	@${TANGLE} -R"Void.help" ${IN}/void.spad.pamphlet >${HELP}/Void.help
-	@cp ${HELP}/Void.help ${HELP}/VOID.help
+	@-cp ${HELP}/Void.help ${HELP}/VOID.help
 	@${TANGLE} -R"Void.input" ${IN}/void.spad.pamphlet >${INPUT}/Void.input
 
 ${HELP}/WuWenTsunTriangularSet.help: ${IN}/triset.spad.pamphlet
diff --git a/src/graph/viewman/viewman.c.pamphlet b/src/graph/viewman/viewman.c.pamphlet
index dc767b4..429c91c 100644
--- a/src/graph/viewman/viewman.c.pamphlet
+++ b/src/graph/viewman/viewman.c.pamphlet
@@ -111,7 +111,7 @@ main (void)
   int keepLooking,code;
   
   bsdSignal(SIGPIPE,brokenPipe,DontRestartSystemCalls);
-#if defined(BSDplatform)
+#if defined(BSDplatform) || defined(MACOSXplatform)
   bsdSignal(SIGCHLD,endChild,RestartSystemCalls);
 #else
   bsdSignal(SIGCLD,endChild,RestartSystemCalls);

\start
Date: Sun, 10 Feb 2008 01:12:28 -0600
From: Tim Daly
To: list
Subject: 20080209.01.tpd.patch (add Exponential Integral to book)

Add Exponential Integral family of functions to the Jenks book.

====================================================================
diff --git a/changelog b/changelog
index c9a8e1a..c15d753 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080109 tpd src/doc/book add Ei,En,Ei1,Ei2,Ei3,Ei4,Ei5,Ei6
 20080107 tpd Makefile fix GCLOPTS-CUSTRELOC for macosxppc
 20080107 tpd Makefile add Makefile.macosxppc stanza and GCLOPTS-CUSTRELOC
 20080107 tpd src/algebra/Makefile make cp of upper/lower files conditional
diff --git a/src/doc/book.pamphlet b/src/doc/book.pamphlet
index 377d5c6..4fdb58c 100644
--- a/src/doc/book.pamphlet
+++ b/src/doc/book.pamphlet
@@ -17252,7 +17252,7 @@ $z=3$:
 %\epsffile[0 0 295 295]{ps/newmap.ps}
 
 % I think this is good to say here: it shows a lot of depth. RSS
-{\sloppy
+%{\sloppy
 The {\tt CoordinateSystems} package exports the following
 \index{coordinate system}
 operations:
@@ -18231,12 +18231,12 @@ $Gamma(z)$ is the Euler gamma function,
 {\bf Beta}: $F -> F$\hfill\newline
    $Beta(u, v)$ is the Euler Beta function,
 \index{function!Euler Beta}
-   $B(u,v)$, defined by
+   $Beta(u,v)$, defined by
 \index{Euler!Beta function}
-   $$B(u,v) = \int_{0}^{1} t^{u-1} (1-t)^{v-1} dt.$$
+   $$Beta(u,v) = \int_{0}^{1} t^{u-1} (1-t)^{v-1} dt.$$
    
    This is related to $\Gamma(z)$ by
-   $$B(u,v) = \frac{\Gamma(u) \Gamma(v)}{\Gamma(u + v)}.$$
+   $$Beta(u,v) = \frac{\Gamma(u) \Gamma(v)}{\Gamma(u + v)}.$$
 
 \noindent
 {\bf logGamma}: $F -> F$\hfill\newline
@@ -18261,6 +18261,63 @@ is the function $\psi(z)$,
    $\psi(z)$, written $\psi^{(n)}(z)$.
 
 \noindent
+{\bf E1}: $(DoubleFloat) -> OnePointCompletion DoubleFloat$\hfill\newline
+   E1(x) is the Exponential Integral function
+   The current implementation is a piecewise approximation
+   involving one poly from $-4..4$ and a second poly for $x > 4$
+\index{function!E1}
+
+\noindent
+{\bf En}: $(PI, DFLOAT) -> OnePointCompletion DoubleFloat$\hfill\newline
+   En(PI,R) is the nth Exponential Integral
+\index{function!En}
+
+\noindent
+{\bf Ei}: $(OnePointCompletion DFLOAT) -> OnePointCompletion DFLOAT$
+\hfill\newline
+   Ei is the Exponential Integral function
+   This is computed using a 6 part piecewise approximation.
+   DoubleFloat can only preserve about 16 digits but the
+   Chebyshev approximation used can give 30 digits.
+\index{function!Ei}
+
+\noindent
+{\bf Ei1}: $(DoubleFloat) -> DoubleFloat$\hfill\newline
+   Ei1 is the first approximation of Ei where the result is
+   $x*e^-x*Ei(x)$ from -infinity to -10 (preserves digits)
+\index{function!Ei1}
+
+\noindent
+{\bf Ei2}: $(DoubleFloat) -> DoubleFloat$\hfill\newline
+   Ei2 is the first approximation of Ei where the result is
+   $x*e^-x*Ei(x)$ from -10 to -4 (preserves digits)
+\index{function!Ei2}
+
+\noindent
+{\bf Ei3}: $(DoubleFloat) -> DoubleFloat$\hfill\newline
+   Ei3 is the first approximation of Ei where the result is
+   $(Ei(x)-log |x| - gamma)/x$ from -4 to 4 (preserves digits)
+\index{function!Ei3}
+
+\noindent
+{\bf Ei4}: $(DoubleFloat) -> DoubleFloat$\hfill\newline
+   Ei4 is the first approximation of Ei where the result is
+   $x*e^-x*Ei(x)$ from 4 to 12 (preserves digits)
+\index{function!Ei4}
+
+\noindent
+{\bf Ei5}: $(DoubleFloat) -> DoubleFloat$\hfill\newline
+   Ei5 is the first approximation of Ei where the result is
+   $x*e^-x*Ei(x)$ from 12 to 32 (preserves digits)
+\index{function!Ei5}
+
+\noindent
+{\bf Ei6}: $(DoubleFloat) -> DoubleFloat$\hfill\newline
+   Ei6 is the first approximation of Ei where the result is
+   $x*e^-x*Ei(x)$ from 32 to infinity (preserves digits)
+\index{function!Ei6}
+
+\noindent
 {\bf besselJ}: $(F,F) -> F$\hfill\newline
    $besselJ(v,z)$ is the Bessel function of the first kind,
 \index{function!Bessel}

\start
Date: Sun, 10 Feb 2008 02:05:29 -0600
From: Tim Daly
To: list
Subject: 20080210.01.tpd.patch (powerpc-macosx.defs patch)

Add the file zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch.
This file is applied at build time to GCL to enable linking
cfuns-c and sockio-c into the gcl-2.6.8pre image. This patch
is normally applied to h/linux.defs but uses a different file
on the MAC OSX platform.

Tim

=============================================================================
diff --git a/changelog b/changelog
index c15d753..50f94e0 100644
--- a/changelog
+++ b/changelog
@@ -1,16 +1,17 @@
-20080109 tpd src/doc/book add Ei,En,Ei1,Ei2,Ei3,Ei4,Ei5,Ei6
-20080107 tpd Makefile fix GCLOPTS-CUSTRELOC for macosxppc
-20080107 tpd Makefile add Makefile.macosxppc stanza and GCLOPTS-CUSTRELOC
-20080107 tpd src/algebra/Makefile make cp of upper/lower files conditional
-20080107 tpd lsp/Makefile add gcl-2.6.8pre powerpc patch
-20080107 tpd zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch added
-20080107 tpd src/graph/viewman/viewman.c add defined(MACOSXplatform)
-20080104 tpd Makefile add debian
-20080104 tpd Makefile add redhat72
-20080104 tpd Makefile add redhat9
-20080103 tpd Makefile add opensuse
-20080103 tpd Makefile add ubuntu
-20080102 tpd src/algebra/zerodim remove extra )spool in LexTriangularPackage
+20080210 tpd zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch added
+20080209 tpd src/doc/book add Ei,En,Ei1,Ei2,Ei3,Ei4,Ei5,Ei6
+20080207 tpd Makefile fix GCLOPTS-CUSTRELOC for macosxppc
+20080207 tpd Makefile add Makefile.macosxppc stanza and GCLOPTS-CUSTRELOC
+20080207 tpd src/algebra/Makefile make cp of upper/lower files conditional
+20080207 tpd lsp/Makefile add gcl-2.6.8pre powerpc patch
+20080207 tpd zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch added
+20080207 tpd src/graph/viewman/viewman.c add defined(MACOSXplatform)
+20080204 tpd Makefile add debian
+20080204 tpd Makefile add redhat72
+20080204 tpd Makefile add redhat9
+20080203 tpd Makefile add opensuse
+20080203 tpd Makefile add ubuntu
+20080202 tpd src/algebra/zerodim remove extra )spool in LexTriangularPackage
 20080131 tpd src/input/Makefile add ei.input for Ei regression test
 20080131 tpd src/input/ei.input regression test function Ei
 20080131 tpd src/algebra/special.spad add special function Ei
diff --git a/zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch b/zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch
new file mode 100644
index 0000000..f5cb47d
--- /dev/null
+++ b/zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch
@@ -0,0 +1,12 @@
+--- powerpc-macosx.defs	2008-02-06 16:25:44.000000000 -0500
++++ powerpc-macosx.defs.tpd	2008-02-06 16:23:27.000000000 -0500
+@@ -8,6 +8,9 @@
+ # This is due to the requirements of the two level namespace.
+ LIBS := `echo $(LIBS) | sed -e 's/-lncurses/ /'` /sw/lib/libintl.dylib
+ 
++# 20080206 tpd link Axiom's code into the image
++EXTRAS = ${OBJ}/${SYS}/lib/cfuns-c.o ${OBJ}/${SYS}/lib/sockio-c.o
++
+ # Set this for the linker to operate correctly.
+ MACOSX_DEPLOYMENT_TARGET = 10.2
+ 

\start
Date: 11 Feb 2008 17:49:13 -0500
From: Camm Maguire
To: Tim Daly
Subject: Re: gcl on PPC

Tim Daly writes:

> Camm,
> 
> Do you know a version of gcl that runs on a Mac/PPC platform?
> 

2.6.8pre should work, no?

\start
Date: Mon, 11 Feb 2008 22:04:24 -0500
From: Tim Daly
To: Camm Maguire
Subject: Re: gcl on PPC

>> Camm,
>> 
>> Do you know a version of gcl that runs on a Mac/PPC platform?
>> 
>
>2.6.8pre should work, no?

Yes, but it took a bit of playing around with various parameters.

\start
Date: Fri, 15 Feb 2008 16:33:52 -0600
From: Tim Daly
To: list
Subject: 20080215.01.tpd.patch (++E examples)

This patch adds a new layer of documentation ability to Axiom.

Essentially, prior to this patch, the command

(1) -> )display operations plot

gives the result as a series of modemaps, such as:

There are 12 unexposed functions called plot :
   [1] (D2,Symbol,Segment DoubleFloat) -> Plot from PlotFunctions1 D2
            if D2 has KONVERT INFORM
   [2] (D2,D2,Symbol,Segment DoubleFloat) -> Plot from PlotFunctions1 
            D2
            if D2 has KONVERT INFORM
   [3] (Plot3D,Segment DoubleFloat) -> Plot3D from Plot3D
   [4] ((DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),(
            DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),Segment 
            DoubleFloat,Segment DoubleFloat,Segment DoubleFloat,Segment 
            DoubleFloat) -> Plot3D
            from Plot3D
   [5] ((DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),(
            DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),Segment 
            DoubleFloat) -> Plot3D
            from Plot3D
   [6] (Plot,Segment DoubleFloat) -> Plot from Plot
   [7] ((DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),
            Segment DoubleFloat,Segment DoubleFloat,Segment DoubleFloat) -> 
            Plot
            from Plot
   [8] ((DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),
            Segment DoubleFloat) -> Plot
            from Plot
   [9] (List (DoubleFloat -> DoubleFloat),Segment DoubleFloat,Segment 
            DoubleFloat) -> Plot
            from Plot
   [10] (List (DoubleFloat -> DoubleFloat),Segment DoubleFloat) -> Plot
            from Plot
   [11] ((DoubleFloat -> DoubleFloat),Segment DoubleFloat,Segment 
            DoubleFloat) -> Plot
            from Plot
   [12] ((DoubleFloat -> DoubleFloat),Segment DoubleFloat) -> Plot from
            Plot


These modemaps, in the above example, come from 3 domains:
PlotFunctions1, Plot3D, and Plot. 

The modemaps give very specific information about particular
operations but it is often a challenge to use this information to
create a function call. It would be useful if there were examples for
each call, for instance, modemap [12] would be:

 fp:=(t:DFLOAT):DFLOAT +-> sin(t)
 plot(fp,-1.0..1.0)$PLOT



This patch enables us to decorate the algebra documentation with specific
examples for each function signature. (This will later be used in unit
test cases.) 

To create the above output, the plot function from the Plot domain
has new comment lines that begin with ++E (that is, example lines).
Thus the plot signature that generates the above output looks like:

     plot: (F -> F,R) -> %
      ++ plot(f,a..b) plots the function \spad{f(x)} 
      ++ on the interval \spad{[a,b]}.
      ++ 
      ++E fp:=(t:DFLOAT):DFLOAT +-> sin(t)
      ++E plot(fp,-1.0..1.0)$PLOT

and you can see that the ++E lines are collected and displayed by the
)display operations command.

So, after this patch is applied, we see the result:

(1) -> )display operations plot

There are 12 unexposed functions called plot :
   [1] (D2,Symbol,Segment DoubleFloat) -> Plot from PlotFunctions1 D2
            if D2 has KONVERT INFORM
   [2] (D2,D2,Symbol,Segment DoubleFloat) -> Plot from PlotFunctions1 
            D2
            if D2 has KONVERT INFORM
   [3] (Plot3D,Segment DoubleFloat) -> Plot3D from Plot3D
   [4] ((DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),(
            DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),Segment 
            DoubleFloat,Segment DoubleFloat,Segment DoubleFloat,Segment 
            DoubleFloat) -> Plot3D
            from Plot3D
   [5] ((DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),(
            DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),Segment 
            DoubleFloat) -> Plot3D
            from Plot3D
   [6] (Plot,Segment DoubleFloat) -> Plot from Plot
   [7] ((DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),
            Segment DoubleFloat,Segment DoubleFloat,Segment DoubleFloat) -> 
            Plot
            from Plot
   [8] ((DoubleFloat -> DoubleFloat),(DoubleFloat -> DoubleFloat),
            Segment DoubleFloat) -> Plot
            from Plot
   [9] (List (DoubleFloat -> DoubleFloat),Segment DoubleFloat,Segment 
            DoubleFloat) -> Plot
            from Plot
   [10] (List (DoubleFloat -> DoubleFloat),Segment DoubleFloat) -> Plot
            from Plot
   [11] ((DoubleFloat -> DoubleFloat),Segment DoubleFloat,Segment 
            DoubleFloat) -> Plot
            from Plot
   [12] ((DoubleFloat -> DoubleFloat),Segment DoubleFloat) -> Plot from
            Plot

Examples of plot from PlotFunctions1


Examples of plot from Plot3D


Examples of plot from Plot

 fp:=(t:DFLOAT):DFLOAT +-> sin(t)
 plot(fp,-1.0..1.0)$PLOT

(1) -> 

all that remains is to add ++E example lines to the remaining 10,000
functions.

Tim

=======================================================================
diff --git a/changelog b/changelog
index 50f94e0..94eac53 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+20080215 tpd src/interp/format.boot add )d op documentation
+20080215 tpd src/algebra/plot add comment documentation
+20080210 tpd src/algebra/Makefile add plot help and input files for plot
+20080210 tpd src/algebra/plot add help and input files
 20080210 tpd zips/gcl-2.6.8pre.h.powerpc-macosx.defs.patch added
 20080209 tpd src/doc/book add Ei,En,Ei1,Ei2,Ei3,Ei4,Ei5,Ei6
 20080207 tpd Makefile fix GCLOPTS-CUSTRELOC for macosxppc
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index b11ba9c..d140609 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -2118,7 +2118,7 @@ SPADHELP=\
  ${HELP}/Octonion.help               ${HELP}/OneDimensionalArray.help \
  ${HELP}/Operator.help               ${HELP}/OrderedVariableList.help \
  ${HELP}/OrderlyDifferentialPolynomial.help \
- ${HELP}/PlaneAlgebraicCurvePlot.help \
+ ${HELP}/PlaneAlgebraicCurvePlot.help ${HELP}/Plot.help \
  ${HELP}/PartialFraction.help \
  ${HELP}/Permanent.help              ${HELP}/Permutation.help \
  ${HELP}/Polynomial.help             ${HELP}/Quaternion.help \
@@ -2183,7 +2183,7 @@ REGRESS=\
  OrderlyDifferentialPolynomial.regress \
  PartialFraction.regress \
  Permanent.regress              Permutation.regress \
- PlaneAlgebraicCurvePlot.regress \
+ PlaneAlgebraicCurvePlot.regress Plot.regress \
  Polynomial.regress             Quaternion.regress \
  RadixExpansion.regress         RealClosure.regress \
  RealSolvePackage.regress       RegularTriangularSet.regress \
@@ -2795,6 +2795,12 @@ ${HELP}/PlaneAlgebraicCurvePlot.help: ${IN}/acplot.spad.pamphlet
            ${IN}/acplot.spad.pamphlet \
             >${INPUT}/PlaneAlgebraicCurvePlot.input
 
+${HELP}/Plot.help: ${IN}/plot.spad.pamphlet
+	@echo 7064 create Plot.help from ${IN}/plot.spad.pamphlet
+	@${TANGLE} -R"Plot.help" ${IN}/plot.spad.pamphlet >${HELP}/Plot.help
+	@-cp ${HELP}/Plot.help ${HELP}/PLOT.help
+	@${TANGLE} -R"Plot.input" ${IN}/plot.spad.pamphlet >${INPUT}/Plot.input
+
 ${HELP}/Polynomial.help: ${IN}/multpoly.spad.pamphlet
 	@echo 7065 create Polynomial.help from ${IN}/multpoly.spad.pamphlet
 	@${TANGLE} -R"Polynomial.help" ${IN}/multpoly.spad.pamphlet \
diff --git a/src/algebra/plot.spad.pamphlet b/src/algebra/plot.spad.pamphlet
index ea92ae6..81c4846 100644
--- a/src/algebra/plot.spad.pamphlet
+++ b/src/algebra/plot.spad.pamphlet
@@ -10,6 +10,101 @@
 \tableofcontents
 \eject
 \section{domain PLOT Plot}
+<<Plot.input>>=
+-- plot.spad.pamphlet Plot.input
+)spool Plot.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 2
+fp:=(t:DFLOAT):DFLOAT +-> sin(t)
+--R
+--R   (1)  theMap(Closure)
+--R                                           Type: (DoubleFloat -> DoubleFloat)
+--E 1
+
+--S 2 of 2
+plot(fp,-1.0..1.0)$PLOT
+--R 
+--R
+--R   (2)  PLOT(x = (- 1.)..1.   y = (- 0.8414709848078965)..0.8414709848078965)
+--R                               [- 1.,- 0.8414709848078965]
+--R                      [- 0.95833333333333337,- 0.81823456433427133]
+--R                      [- 0.91666666666666674,- 0.79357780324894212]
+--R                      [- 0.87500000000000011,- 0.76754350223602708]
+--R                      [- 0.83333333333333348,- 0.74017685319603721]
+--R                      [- 0.79166666666666685,- 0.7115253607990657]
+--R                      [- 0.75000000000000022,- 0.68163876002333434]
+--R                      [- 0.70833333333333359,- 0.65056892982223602]
+--R                      [- 0.66666666666666696,- 0.61836980306973721]
+--R                      [- 0.62500000000000033,- 0.58509727294046243]
+--R                      [- 0.5833333333333337,- 0.55080909588697013]
+--R                      [- 0.54166666666666707,- 0.51556479138264011]
+--R                      [- 0.50000000000000044,- 0.47942553860420339]
+--R                      [- 0.45833333333333376,- 0.44245407023325911]
+--R                      [- 0.41666666666666707,- 0.40471456356112506]
+--R                      [- 0.37500000000000039,- 0.3662725290860479]
+--R                       [- 0.3333333333333337,- 0.3271946967961526]
+--R                      [- 0.29166666666666702,- 0.28754890033552849]
+--R                      [- 0.25000000000000033,- 0.24740395925452324]
+--R                      [- 0.20833333333333368,- 0.20682955954864138]
+--R                      [- 0.16666666666666702,- 0.16589613269341538]
+--R                      [- 0.12500000000000036,- 0.12467473338522805]
+--R                    [- 8.3333333333333703E-2,- 8.3236916200310623E-2]
+--R                    [- 4.1666666666667039E-2,- 4.1654611386019461E-2]
+--R                   [- 3.7470027081099033E-16,- 3.7470027081099033E-16]
+--R                      [4.166666666666629E-2,4.1654611386018711E-2]
+--R                      [8.3333333333332954E-2,8.3236916200309874E-2]
+--R                        [0.12499999999999961,0.1246747333852273]
+--R                        [0.16666666666666627,0.16589613269341463]
+--R                        [0.20833333333333293,0.20682955954864066]
+--R                        [0.24999999999999958,0.24740395925452252]
+--R                        [0.29166666666666624,0.28754890033552777]
+--R                        [0.33333333333333293,0.32719469679615187]
+--R                        [0.37499999999999961,0.36627252908604718]
+--R                         [0.4166666666666663,0.4047145635611244]
+--R                        [0.45833333333333298,0.44245407023325839]
+--R                        [0.49999999999999967,0.47942553860420273]
+--R                        [0.5416666666666663,0.51556479138263944]
+--R                        [0.58333333333333293,0.55080909588696947]
+--R                        [0.62499999999999956,0.58509727294046177]
+--R                        [0.66666666666666619,0.61836980306973666]
+--R                        [0.70833333333333282,0.65056892982223535]
+--R                        [0.74999999999999944,0.68163876002333379]
+--R                        [0.79166666666666607,0.71152536079906514]
+--R                        [0.8333333333333327,0.74017685319603665]
+--R                        [0.87499999999999933,0.76754350223602663]
+--R                        [0.91666666666666596,0.79357780324894167]
+--R                        [0.95833333333333259,0.81823456433427078]
+--R                                 [1.,0.8414709848078965]
+--R                                                                   Type: Plot
+--E 2
+)spool
+)lisp (bye)
+@
+<<Plot.help>>=
+=========================================================================
+Plot examples
+=========================================================================
+
+The Plot (PLOT) domain supports plotting of functions defined over a
+real number system. Plot is limited to 2 dimensional plots.
+
+The function plot: (F -> F,R) -> % plots the function f(x) on the
+interval a..b. So we need to define a function that maps from 
+DoubleFloat to DoubleFloat:
+
+  fp:=(t:DFLOAT):DFLOAT +-> sin(t)
+
+and then feed it to the plot function with a Segment DoubleFloat
+
+  plot(fp,-1.0..1.0)$PLOT
+
+See Also:
+o )show Plot
+o $AXIOM/doc/src/algebra/plot.spad.dvi
+
+@
 <<domain PLOT Plot>>=
 )abbrev domain PLOT Plot
 ++ Author: Michael Monagan (revised by Clifton J. Williamson)
@@ -48,7 +143,12 @@ Plot(): Exports == Implementation where
 --% function plots
 
     plot: (F -> F,R) -> %
-      ++ plot(f,a..b) plots the function \spad{f(x)} on the interval \spad{[a,b]}.
+      ++ plot(f,a..b) plots the function \spad{f(x)} 
+      ++ on the interval \spad{[a,b]}.
+      ++ 
+      ++E fp:=(t:DFLOAT):DFLOAT +-> sin(t)
+      ++E plot(fp,-1.0..1.0)$PLOT
+
     plot: (F -> F,R,R) -> %
       ++ plot(f,a..b,c..d) plots the function \spad{f(x)} on the interval
       ++ \spad{[a,b]}; y-range of \spad{[c,d]} is noted in Plot object.
diff --git a/src/interp/format.boot.pamphlet b/src/interp/format.boot.pamphlet
index 10b1be7..7dca247 100644
--- a/src/interp/format.boot.pamphlet
+++ b/src/interp/format.boot.pamphlet
@@ -177,6 +177,31 @@ substInOrder(alist,x) ==
   alist is [[a,:b],:y] => substInOrder(y,SUBST(b,a,x))
   x
 
+@
+\subsection{reportOpSymbol}
+This function prints the modemaps for operations as a result of the
+user command for some operation foo:
+\begin{verbatim}
+  )d op foo
+\end{verbatim}
+
+We have enhanced this function to search the documentation for each
+domain and print any examples it finds by calling the sayExample 
+function. Because of the way the databases are currently organized
+the documentation is under each domain and is kept separate from
+the modemaps. Ideally we'd output the example immediately after
+the related modemap but I have yet to figure out how to do that.
+
+We need to know the name of the function (which the user supplied)
+and we need to know a list of all of the domains containing that
+function. This is collected using PUSHNEW into the domain list.
+
+Once we've processed all of the modemaps we have a set of the
+domain names. We walk across that set requesting the documentation
+strings for that domain. There are a list of documentation strings, 
+one for each exported function. We call sayExample on each element
+of the list. If sayExample finds an example it prints it.
+<<*>>=
 reportOpSymbol op1 ==
   op := (STRINGP op1 => INTERN op1; op1)
   modemaps := getAllModemapsFromDatabase(op,nil)
@@ -192,8 +217,12 @@ reportOpSymbol op1 ==
   sayNewLine()
   -- filter modemaps on whether they are exposed
   mmsE := mmsU := NIL
+  domlist := NIL
   for mm in modemaps repeat
-    isFreeFunctionFromMm(mm) or isExposedConstructor getDomainFromMm(mm) => mmsE := [mm,:mmsE]
+    dom := getDomainFromMm(mm)
+    PUSHNEW(dom,domlist)
+    isFreeFunctionFromMm(mm) or isExposedConstructor dom =>
+      mmsE := [mm,:mmsE]
     mmsU := [mm,:mmsU]
   if mmsE then
     sayMms(op,mmsE,'"exposed") where
@@ -210,8 +239,105 @@ reportOpSymbol op1 ==
   if mmsU then
     if mmsE then sayNewLine()
     sayMms(op,mmsU,'"unexposed")
+  for adom in domlist repeat  
+   doc := GETDATABASE(adom,'DOCUMENTATION)
+   docs := CDR(ASSOC(op,doc))
+   sayNewLine()
+   sayBrightly ['"Examples of ",op," from ",adom]
+   sayNewLine()
+   for export in docs repeat
+    sayExample(CADR(export),op)
   nil
 
+@
+\subsection{sayExample}
+This function expects 2 arguments, the documentation string and
+the name of the operation. It searches the documentation string for
+\verb|++E| lines. These lines are examples lines for functions. 
+They look like ordinary \verb|++| comments and fit into the ordinary
+comment blocks. So, for example, in the plot.spad.pamphlet file we
+find the following function signature:
+\begin{verbatim}
+    plot: (F -> F,R) -> %
+      ++ plot(f,a..b) plots the function \spad{f(x)} 
+      ++ on the interval \spad{[a,b]}.
+      ++ 
+      ++E fp:=(t:DFLOAT):DFLOAT +-> sin(t)
+      ++E plot(fp,-1.0..1.0)$PLOT
+\end{verbatim}
+This function splits out and prints the lines that begin with \verb|++E|.
+
+A minor complication of printing the examples is that the lines have
+been processed into internal compiler format. Thus the lines that read:
+\begin{verbatim}
+      ++E fp:=(t:DFLOAT):DFLOAT +-> sin(t)
+      ++E plot(fp,-1.0..1.0)$PLOT
+\end{verbatim}
+are actually stored as one long line containing the example lines
+\begin{verbatim}
+"\\indented{1}{plot(\\spad{f},{}a..\\spad{b}) plots the function
+ \\spad{f(x)}} \\indented{1}{on the interval \\spad{[a,{}b]}.}
+ \\blankline
+ \\spad{E} fp:=(t:DFLOAT):DFLOAT +-> sin(\\spad{t})
+ \\spad{E} plot(\\spad{fp},{}\\spad{-1}.0..1.0)\\$PLOT"
+\end{verbatim}
+
+This function finds examples and strips off the prefix \verb|\\spad{E}| 
+from the stored form and calls cleanupLine to get rid of the other noise.
+<<*>>=
+sayExample(docstring,op) ==
+ point := SEARCH('"{E}",docstring)
+ point => 
+  line := SUBSEQ(docstring,point+3)
+  while (mark:=SEARCH('"{E}",line)) repeat
+   mark > 0 =>
+    PRINC cleanupLine (SUBSEQ(line,0,mark-6))
+    sayNewLine()
+    line := SUBSEQ(line,mark+3)
+  PRINC cleanupLine(line)
+  sayNewLine()
+  sayNewLine()
+
+@
+\subsection{cleanupLine}
+This function expects example lines in internal format that has been
+partially processed to remove the prefix. Thus we get lines that look 
+like:
+\begin{verbatim}
+ fp:=(t:DFLOAT):DFLOAT +-> sin(\\spad{t}) 
+ plot(\\spad{fp},{}\\spad{-1}.0..1.0)\\$PLOT
+\end{verbatim}
+
+It removes all instances of \verb|{}|, and \verb|\|, and unwraps the
+\verb|spad{}| call, leaving only the argument.
+
+We return lines that look like:
+\begin{verbatim}
+ fp:=(t:DFLOAT):DFLOAT +-> sin(t)
+ plot(fp,-1.0..1.0)$PLOT
+\end{verbatim}
+which is hopefully exactly what the user wrote.
+
+<<*>>=
+cleanupLine(line) ==
+ while (point := SEARCH('"{}",line)) repeat
+  point =>
+   left := SUBSEQ(line,0,point)
+   right := SUBSEQ(line,point+2)
+   line := CONCATENATE('STRING,left,right)
+ while (point := SEARCH('"\",line)) repeat
+  point =>
+   left := SUBSEQ(line,0,point)
+   right := SUBSEQ(line,point+1)
+   line := CONCATENATE('STRING,left,right)
+ while (point := SEARCH('"spad{",line)) repeat
+  left  := SUBSEQ(line,0,point)
+  mark  := SEARCH('"}",line)
+  mid   := SUBSEQ(line,point+5,mark)
+  right := SUBSEQ(line,mark+1)
+  line  := CONCATENATE('STRING,left,mid,right)
+ line
+
 formatOpType (form:=[op,:argl]) ==
   null argl => unabbrev op
   form2String [unabbrev op, :argl]

\start
Date: Sat, 16 Feb 2008 14:07:23 -0600
From: Tim Daly
To: list
Subject: 20080216.01.wxh.patch (hash tables to speed compiles)

This code is a performance improvement by Waldek Hebisch.
(Fricas patches 232 and 233).

The essence of the speedup appears to be caused by two factors.
The original code was non-recursive and used union across lists.
The new code is recursive. It also uses a hashtable to reduce
the amount of redundant list construction.

Additionally, the code in these files was rearranged and commented
by me for documentation purposes.

Tim
======================================================================
diff --git a/changelog b/changelog
index 94eac53..0a7fe92 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+20082016 wxh src/interp/i-intern.boot use hashtable to speedup compiles
+20082016 wxh src/interp/g-util.boot use hashtable to speedup compiles
+20082016 wxh src/interp/compiler.boot use hashtable to speedup compiles
+20082016 wxh src/interp/category.boot use hashtable to speedup compiles
 20080215 tpd src/interp/format.boot add )d op documentation
 20080215 tpd src/algebra/plot add comment documentation
 20080210 tpd src/algebra/Makefile add plot help and input files for plot
diff --git a/src/interp/category.boot.pamphlet b/src/interp/category.boot.pamphlet
index d90e771..097ede9 100644
--- a/src/interp/category.boot.pamphlet
+++ b/src/interp/category.boot.pamphlet
@@ -9,9 +9,93 @@
 \eject
 \tableofcontents
 \eject
-\section{mkCategory}
-This code defines the structure of a category. 
-<<mkCategory>>=
+\section{Category}
+Functions for building categories.
+
+Sorry to say, this hack is needed by isCategoryType
+<<*>>=
+Category() == nil 
+ 
+@
+\subsection{CategoryPrint}
+<<*>>=
+CategoryPrint(D,$e) ==
+  SAY "--------------------------------------"
+  SAY "Name (and arguments) of category:"
+  PRETTYPRINT D.(0)
+  SAY "operations:"
+  PRETTYPRINT D.(1)
+  SAY "attributes:"
+  PRETTYPRINT D.2
+  SAY "This is a sub-category of"
+  PRETTYPRINT first D.4
+  for u in CADR D.4 repeat
+    SAY("This has an alternate view: slot ",rest u," corresponds to ",first u)
+  for u in CADDR D.4 repeat
+    SAY("This has a local domain: slot ",rest u," corresponds to ",first u)
+  for j in 6..MAXINDEX D repeat
+    u:= D.j
+    null u => SAY "another domain"
+    atom first u => SAY("Alternate View corresponding to: ",u)
+    PRETTYPRINT u
+ 
+@
+\subsection{sigParams}
+This code is a performance improvement by Waldek Hebisch.
+The essence of the speedup appears to be caused by two factors.
+The original code was non-recursive and used union across lists.
+The new code is recursive. It also uses a hashtable to reduce
+the amount of redundant list construction.
+
+We compute the list of parameters that occur in signatures on the 
+sigList, removing duplicates, and skipping the ``known'' constructors,
+Union, Mapping, List, and Record.
+
+\verb|$PrimitiveDomainNames| is a list of domains that we need not cache.
+It is set in init.lisp.pamphlet.
+<<*>>=
+sigParams(sigList) ==
+ result:=nil
+ myhash:=MAKE_-HASHTABLE 'EQUAL
+ NewLocals:=nil
+ for s in sigList repeat
+  (NewLocals:=Prepare(CADAR s,NewLocals)) where
+   Prepare(u,l)==for v in u repeat l:=Prepare2(v,l)
+   Prepare2(v,l)==
+    v is "$" => l
+    STRINGP v => l
+    atom v => [v,:l]
+    MEMQ(first v,$PrimitiveDomainNames) => l
+    v is ["Union",:w] =>
+     for x in stripUnionTags w repeat l:=Prepare2(x,l)
+     l
+    v is ["Mapping",:w] =>
+     for x in w repeat l:=Prepare2(x,l)
+     l
+    v is ["List",:w] => Prepare2(w,l)
+    v is ["Record",:w] =>
+     for x in w repeat l:=Prepare2(CADDR x,l)
+     l
+    [v,:l]
+ for s in NewLocals repeat
+  if null(HGET(myhash,s)) then
+   HPUT(myhash,s,true)
+   result:=[s,:result]
+ result
+
+@
+\subsection{mkCategory}
+This code defines the structure of a category. It creates a new category
+vector. The arguments are:
+\begin{itemize}
+\item domainOrPackage -- ``domain'' or ``package'' which marks the kind
+of category object.
+\item sigList -- list of all signatures
+\item attList -- list of all attributes
+\item domList 
+\item PrincipalAncestor -- principal ancestor (if any)
+\end{itemize}
+<<*>>=
 mkCategory(domainOrPackage,sigList,attList,domList,PrincipalAncestor) ==
   NSigList:= nil
   if PrincipalAncestor=nil then count:= 6 else count:= SIZE PrincipalAncestor
@@ -26,23 +110,7 @@ mkCategory(domainOrPackage,sigList,attList,domList,PrincipalAncestor) ==
          count:= count+1
          nsig
      else s for s in sigList]
-  NewLocals:= nil
-  for s in sigList repeat
-    ((NewLocals:= UNION(NewLocals,Prepare CADAR s)) where
-      Prepare u == "UNION"/[Prepare2 v for v in u]) where
-        Prepare2 v ==
-          v is "$" => nil
-          STRINGP v => nil
-          atom v => [v]
-          MEMQ(first v,$PrimitiveDomainNames) => nil
-            --This variable is set in INIT LISP
-            --It is a list of all the domains that we need not cache
-          v is ["Union",:w] =>
-            "UNION"/[Prepare2 x for x in stripUnionTags w]
-          v is ["Mapping",:w] => "UNION"/[Prepare2 x for x in w]
-          v is ["List",w] => Prepare2 w
-          v is ["Record",.,:w] => "UNION"/[Prepare2 CADDR x for x in w]
-          [v]
+  NewLocals:= sigParams(sigList)
   OldLocals:= nil
   if PrincipalAncestor then for u in (OldLocals:= CADDR PrincipalAncestor.4)
      repeat NewLocals:= DELETE(first u,NewLocals)
@@ -63,138 +131,23 @@ mkCategory(domainOrPackage,sigList,attList,domList,PrincipalAncestor) ==
   v
 
 @
-\section{hasCategoryBug}
-The hasCategoryBug (bug000001)\cite{2} manifests itself by causing a
-value stack overflow when compiling algebra code that uses conditions
-that read ``if R has ...'' when using GCL (but not CCL). Essentially
-the [[|Ring|]] category keeps getting added to the list each time
-[[|Ring|]] is processed. Camm Maguire's mail explains it thus:
-
-The bottom line is that [[(|Ring|)]] is totally correct until
-[[|Algebra|]] is executed, at which point the fourth element returned
-by [[(|Ring|)]] is overwritten by the result returned in the fourth
-element of the vector returned by [[|Algebra|]].  The point of this
-overwrite is at the following form of [[|JoinInner|]] from
-[[(int/interp/category.clisp)]]
-
-\begin{verbatim}
- (SETELT |$NewCatVec| 4 (CONS |c| (CONS |FundamentalAncestors| (CONS
- (CADDR (ELT |$NewCatVec| 4)) NIL))))
-\end{verbatim}
-
-called from [[|Algebra;|]] [[(int/algebra/ALGEBRA.nrlib/code.lsp)]] through 
-
-\begin{verbatim}
-(|Join| (|Ring|) (|Module| (QUOTE |t#1|)) (|mkCategory| (QUOTE
-|domain|) (QUOTE (((|coerce| ($ |t#1|)) T))) NIL (QUOTE NIL) NIL))
-\end{verbatim}
-
-I haven't parsed [[|JoinInner|]] yet, but my guess is that there is a
-copy-seq in there which is not getting executed in the assignment of
-[[|$NewCatVec|]] before the setelt.
-
-The original code failed to copy the NewCatVec before updating
-it. This code from macros.lisp\cite{1} checks whether the array is
-adjustable.
-
-\begin{verbatim}
-(defun lengthenvec (v n)
-  (if (adjustable-array-p v) (adjust-array v n)
-    (replace (make-array n) v)))
-\end{verbatim}
-At least in GCL, the code for lengthenvec need not copy the vec to a
-new location. In this case the FundamentalAncesters array is adjustable
-and in GCL the adjust-array need not, and in this case, does not do a 
-copy.
-<<hasCategoryBug>>=
-      if reallynew then
-        n:= SIZE $NewCatVec
-        FundamentalAncestors:= [[b.(0),condition,n],:FundamentalAncestors]
-        $NewCatVec:= LENGTHENVEC($NewCatVec,n+1)
--- We need to copy the vector otherwise the FundamentalAncestors
--- list will get stepped on while compiling "If R has ... " code
--- Camm Maguire July 26, 2003
---        copied:= true
-        copied:= false
-        originalvector:= false
-        $NewCatVec.n:= b.(0)
-  if not copied then $NewCatVec:= COPY_-SEQ $NewCatVec
-    -- It is important to copy the vector now,
-    -- in case SigListUnion alters it while
-    -- performing Operator Subsumption
-@ 
-\section{License}
-<<license>>=
--- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--- All rights reserved.
---
--- Redistribution and use in source and binary forms, with or without
--- modification, are permitted provided that the following conditions are
--- met:
---
---     - Redistributions of source code must retain the above copyright
---       notice, this list of conditions and the following disclaimer.
---
---     - Redistributions in binary form must reproduce the above copyright
---       notice, this list of conditions and the following disclaimer in
---       the documentation and/or other materials provided with the
---       distribution.
---
---     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---       names of its contributors may be used to endorse or promote products
---       derived from this software without specific prior written permission.
---
--- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-@
+\subsection{isCategory}
 <<*>>=
-<<license>>
- 
--- Functions for building categories
- 
-Category() == nil --sorry to say, this hack is needed by isCategoryType
- 
-CategoryPrint(D,$e) ==
-  SAY "--------------------------------------"
-  SAY "Name (and arguments) of category:"
-  PRETTYPRINT D.(0)
-  SAY "operations:"
-  PRETTYPRINT D.(1)
-  SAY "attributes:"
-  PRETTYPRINT D.2
-  SAY "This is a sub-category of"
-  PRETTYPRINT first D.4
-  for u in CADR D.4 repeat
-    SAY("This has an alternate view: slot ",rest u," corresponds to ",first u)
-  for u in CADDR D.4 repeat
-    SAY("This has a local domain: slot ",rest u," corresponds to ",first u)
-  for j in 6..MAXINDEX D repeat
-    u:= D.j
-    null u => SAY "another domain"
-    atom first u => SAY("Alternate View corresponding to: ",u)
-    PRETTYPRINT u
- 
-<<mkCategory>>
 isCategory a == REFVECP a and #a>5 and a.3=["Category"]
  
---% Subsumption code (for operators)
- 
+@
+\subsection{DropImplementations}
+Subsumption code (for operators)
+<<*>>=
 DropImplementations (a is [sig,pred,:implem]) ==
   if implem is [[q,:.]] and (q="ELT" or q="CONST")
      then if (q="ELT")  then [sig,pred]
                         else [[:sig,:'(constant)],pred]
      else a
  
+@
+\subsection{SigListUnion}
+<<*>>=
 SigListUnion(extra,original) ==
   --augments original %with everything in extra that is not in original
   for (o:=[[ofn,osig,:.],opred,:.]) in original repeat
@@ -247,6 +200,9 @@ SigListUnion(extra,original) ==
     original:= [e,:original]
   original
  
+@
+\subsection{mkOr}
+<<*>>=
 mkOr(a,b) ==
   a=true => true
   b=true => true
@@ -268,6 +224,9 @@ mkOr(a,b) ==
   LENGTH l = 1 => CAR l
   ["OR",:l]
  
+@
+\subsection{mkOr2}
+<<*>>=
 mkOr2(a,b) ==
   --a is a condition, "b" a list of them
   MEMBER(a,b) => b
@@ -281,6 +240,9 @@ mkOr2(a,b) ==
     [a,:b]
   [a,:b]
  
+@
+\subsection{mkAnd}
+<<*>>=
 mkAnd(a,b) ==
   a=true => b
   b=true => a
@@ -298,6 +260,9 @@ mkAnd(a,b) ==
   LENGTH l = 1 => CAR l
   ["AND",:l]
  
+@
+\subsection{mkAnd2}
+<<*>>=
 mkAnd2(a,b) ==
   --a is a condition, "b" a list of them
   MEMBER(a,b) => b
@@ -311,15 +276,24 @@ mkAnd2(a,b) ==
     [a,:b]
   [a,:b]
  
+@
+\subsection{SigListMember}
+<<*>>=
 SigListMember(m,list) ==
   list=nil => false
   SigEqual(m,first list) => true
   SigListMember(m,rest list)
  
+@
+\subsection{SigEqual}
+<<*>>=
 SigEqual([sig1,pred1,:.],[sig2,pred2,:.]) ==
   -- Notice asymmetry: checks that arg1 is a consequence of arg2
   sig1=sig2 and PredImplies(pred2,pred1)
  
+@
+\subsection{PredImplies}
+<<*>>=
 PredImplies(a,b) ==
     --true if a => b in the sense of logical implication
 --a = "true" => true
@@ -328,6 +302,9 @@ PredImplies(a,b) ==
   false         -- added by RDJ: 12/21/82
 --error()       -- for the time being
  
+@
+\subsection{SigListOpSubsume}
+<<*>>=
 SigListOpSubsume([[name1,sig1,:.],:.],list) ==
   --does m subsume another operator in the list?
         --see "operator subsumption" in SYSTEM SCRIPT
@@ -339,16 +316,25 @@ SigListOpSubsume([[name1,sig1,:.],:.],list) ==
       ans:=[n,:ans]
   return ans
  
+@
+\subsection{SigOpsubsume}
+<<*>>=
 SigOpsubsume([[name1,sig1,:flag1],pred1,:.],[[name2,sig2,:flag2],pred2,:.]) ==
                     --flag1 = flag2 and :this really should be checked
   name1=name2 and LENGTH sig1=LENGTH sig2 and SourceLevelSubsume(sig1,sig2)
  
+@
+\subsection{SourceLevelSubsume}
+<<*>>=
 SourceLevelSubsume([out1,:in1],[out2,:in2]) ==
   -- Checks for source-level subsumption in the sense of SYSTEM SCRIPT
   --   true if the first signature subsumes the second
   SourceLevelSubset(out1,out2) and
-    (and/[SourceLevelSubset(inarg2,inarg1) for inarg1 in in1 for inarg2 in in2])
+   (and/[SourceLevelSubset(inarg2,inarg1) for inarg1 in in1 for inarg2 in in2])
  
+@
+\subsection{SourceLevelSubset}
+<<*>>=
 SourceLevelSubset(a,b) ==
   --true if a is a source-level subset of b
   a=b => true
@@ -359,14 +345,20 @@ SourceLevelSubset(a,b) ==
   a is [a1] and b is [b1] and ASSOC(a1,GET(b1,"Subsets")) => true
   nil
  
+@
+\subsection{MachineLevelSubsume}
+<<*>>=
 MachineLevelSubsume([name1,[out1,:in1],:flag1],[name2,[out2,:in2],:flag2]) ==
   -- Checks for machine-level subsumption in the sense of SYSTEM SCRIPT
   --  true if the first signature subsumes the second
   --  flag1 = flag2 and: this really should be checked, but
   name1=name2 and MachineLevelSubset(out1,out2) and
-    (and/[MachineLevelSubset(inarg2,inarg1) for inarg1 in in1 for inarg2 in in2]
+   (and/[MachineLevelSubset(inarg2,inarg1) for inarg1 in in1 for inarg2 in in2]
       )
  
+@
+\subsection{MachineLevelSubset}
+<<*>>=
 MachineLevelSubset(a,b) ==
   --true if a is a machine-level subset of b
   a=b => true
@@ -378,8 +370,10 @@ MachineLevelSubset(a,b) ==
              --we assume all subsets are true at the machine level
   nil
  
---% Ancestor chasing code
- 
+@
+\subsection{FindFundAncs}
+Ancestor chasing code
+<<*>>=
 FindFundAncs l ==
   --l is a list of categories and associated conditions (a list of 2-lists
   --returns a list of them and all their fundamental ancestors
@@ -406,23 +400,26 @@ FindFundAncs l ==
   -- descendant of something previously added which is therefore
   -- subsumed
  
+@
+\subsection{CatEval}
+<<*>>=
 CatEval x ==
   REFVECP x => x
   $InteractiveMode => CAR compMakeCategoryObject(x,$CategoryFrame)
   CAR compMakeCategoryObject(x,$e)
  
---RemovePrinAncs(l,leaves) ==
---  l=nil => nil
---  leaves:= [first y for y in leaves]
---               --remove the slot pointers
---  [x for x in l | not AncestorP(x.(0),leaves)]
- 
+@
+\subsection{AncestorP}
+<<*>>=
 AncestorP(xname,leaves) ==
   -- checks for being a principal ancestor of one of the leaves
   MEMBER(xname,leaves) => xname
   for y in leaves repeat
     MEMBER(xname,first (CatEval y).4) => return y
  
+@
+\subsection{CondAncestorP}
+<<*>>=
 CondAncestorP(xname,leaves,condition) ==
   -- checks for being a principal ancestor of one of the leaves
   for u in leaves repeat
@@ -433,6 +430,9 @@ CondAncestorP(xname,leaves,condition) ==
     xname = u' or MEMBER(xname,first (CatEval u').4) =>
       PredImplies(ucond,condition) => return u'
  
+@
+\subsection{DescendantP}
+<<*>>=
 DescendantP(a,b) ==
   -- checks to see if a is any kind of Descendant of b
   a=b => true
@@ -445,8 +445,53 @@ DescendantP(a,b) ==
   AncestorP(b,[first u for u in CADR a.4]) => true
   nil
  
---% The implementation of Join
- 
+@
+\subsection{JoinInner}
+The implementation of Join
+\subsubsection{hasCategoryBug}
+The hasCategoryBug (bug000001)\cite{2} manifests itself by causing a
+value stack overflow when compiling algebra code that uses conditions
+that read ``if R has ...'' when using GCL (but not CCL). Essentially
+the [[|Ring|]] category keeps getting added to the list each time
+[[|Ring|]] is processed. Camm Maguire's mail explains it thus:
+
+The bottom line is that [[(|Ring|)]] is totally correct until
+[[|Algebra|]] is executed, at which point the fourth element returned
+by [[(|Ring|)]] is overwritten by the result returned in the fourth
+element of the vector returned by [[|Algebra|]].  The point of this
+overwrite is at the following form of [[|JoinInner|]] from
+[[(int/interp/category.clisp)]]
+
+\begin{verbatim}
+ (SETELT |$NewCatVec| 4 (CONS |c| (CONS |FundamentalAncestors| (CONS
+ (CADDR (ELT |$NewCatVec| 4)) NIL))))
+\end{verbatim}
+
+called from [[|Algebra;|]] [[(int/algebra/ALGEBRA.nrlib/code.lsp)]] through 
+
+\begin{verbatim}
+(|Join| (|Ring|) (|Module| (QUOTE |t#1|)) (|mkCategory| (QUOTE
+|domain|) (QUOTE (((|coerce| ($ |t#1|)) T))) NIL (QUOTE NIL) NIL))
+\end{verbatim}
+
+I haven't parsed [[|JoinInner|]] yet, but my guess is that there is a
+copy-seq in there which is not getting executed in the assignment of
+[[|$NewCatVec|]] before the setelt.
+
+The original code failed to copy the NewCatVec before updating
+it. This code from macros.lisp\cite{1} checks whether the array is
+adjustable.
+
+\begin{verbatim}
+(defun lengthenvec (v n)
+  (if (adjustable-array-p v) (adjust-array v n)
+    (replace (make-array n) v)))
+\end{verbatim}
+At least in GCL, the code for lengthenvec need not copy the vec to a
+new location. In this case the FundamentalAncesters array is adjustable
+and in GCL the adjust-array need not, and in this case, does not do a 
+copy.
+<<*>>=
 JoinInner(l,$e) ==
   $NewCatVec: local := nil
   CondList:= nil
@@ -561,7 +606,21 @@ JoinInner(l,$e) ==
                     if c=true
                        then attl:= [[a,condition],:attl]
                        else attl:= [[a,["and",condition,c]],:attl]
-<<hasCategoryBug>>
+      if reallynew then
+        n:= SIZE $NewCatVec
+        FundamentalAncestors:= [[b.(0),condition,n],:FundamentalAncestors]
+        $NewCatVec:= LENGTHENVEC($NewCatVec,n+1)
+-- We need to copy the vector otherwise the FundamentalAncestors
+-- list will get stepped on while compiling "If R has ... " code
+-- Camm Maguire July 26, 2003
+--        copied:= true
+        copied:= false
+        originalvector:= false
+        $NewCatVec.n:= b.(0)
+  if not copied then $NewCatVec:= COPY_-SEQ $NewCatVec
+    -- It is important to copy the vector now,
+    -- in case SigListUnion alters it while
+    -- performing Operator Subsumption
   for b in l repeat
     sigl:= SigListUnion([DropImplementations u for u in b.(1)],sigl)
     attl:=
@@ -598,20 +657,48 @@ JoinInner(l,$e) ==
   $NewCatVec.4:= [c,FundamentalAncestors,CADDR $NewCatVec.4]
   mkCategory("domain",sigl,attl,globalDomains,$NewCatVec)
  
---ProduceDomainAlist(u,e) ==
---  -- Gives a complete Alist for all the functions in the Domain
---  not (sig:= get(u,"modemap",e)) => nil
---  sig:= CADAAR sig
---                       --an incantation
---  [c,.,.]:= compMakeCategoryObject(sig,e)
---  -- We assume that the environment need not be kept
---  c.(1)
- 
+@
+\subsection{isCategoryForm}
+<<*>>=
 isCategoryForm(x,e) ==
   x is [name,:.] => categoryForm? name
   atom x => u:= get(x,"macro",e) => isCategoryForm(u,e)
  
 @
+\section{License}
+<<license>>=
+-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+-- All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions are
+-- met:
+--
+--     - Redistributions of source code must retain the above copyright
+--       notice, this list of conditions and the following disclaimer.
+--
+--     - Redistributions in binary form must reproduce the above copyright
+--       notice, this list of conditions and the following disclaimer in
+--       the documentation and/or other materials provided with the
+--       distribution.
+--
+--     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+--       names of its contributors may be used to endorse or promote products
+--       derived from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+-- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+-- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+@
 \eject
 \begin{thebibliography}{99}
 \bibitem{1} [[pamphlet:src/interp/macros.lisp.pamphlet]]
diff --git a/src/interp/compiler.boot.pamphlet b/src/interp/compiler.boot.pamphlet
index ce51681..4deb2b2 100644
--- a/src/interp/compiler.boot.pamphlet
+++ b/src/interp/compiler.boot.pamphlet
@@ -9,92 +9,9 @@
 \eject
 \tableofcontents
 \eject
-\section{Bug fixes}
-The compMacro function does macro expansion during spad file compiles.
-If a macro occurs twice in the same file the macro expands infinitely
-causing a stack overflow. The reason for the infinite recursion is that
-the left hand side of the macro definition is expanded. Thus defining
-a macro:
-\begin{verbatim}
-name ==> 1
-\end{verbatim}
-will expand properly the first time. The second time it turns into:
-\begin{verbatim}
-1 ==> 1
-\end{verbatim}
-The original code read:
-\begin{verbatim}
-compMacro(form,m,e) ==
-  $macroIfTrue: local:= true
-  ["MDEF",lhs,signature,specialCases,rhs]:= form
-  rhs :=
-    rhs is ['CATEGORY,:.] => ['"-- the constructor category"]
-    rhs is ['Join,:.]     => ['"-- the constructor category"]
-    rhs is ['CAPSULE,:.]  => ['"-- the constructor capsule"]
-    rhs is ['add,:.]      => ['"-- the constructor capsule"]
-    formatUnabbreviated rhs
-  sayBrightly ['"   processing macro definition",'%b,
-    :formatUnabbreviated lhs,'" ==> ",:rhs,'%d]
-  ["MDEF",lhs,signature,specialCases,rhs]:= form:= macroExpand(form,e)
-  m=$EmptyMode or m=$NoValueMode =>
-    ["/throwAway",$NoValueMode,put(first lhs,"macro",rhs,e)]
-
-\end{verbatim}
-Juergen Weiss proposed the following fixed code. This does not expand
-the left hand side of the macro.
-<<compMacro>>=
-compMacro(form,m,e) ==
-  $macroIfTrue: local:= true
-  ["MDEF",lhs,signature,specialCases,rhs]:= form
-  prhs :=
-    rhs is ['CATEGORY,:.] => ['"-- the constructor category"]
-    rhs is ['Join,:.]     => ['"-- the constructor category"]
-    rhs is ['CAPSULE,:.]  => ['"-- the constructor capsule"]
-    rhs is ['add,:.]      => ['"-- the constructor capsule"]
-    formatUnabbreviated rhs
-  sayBrightly ['"   processing macro definition",'%b,
-    :formatUnabbreviated lhs,'" ==> ",:prhs,'%d]
-  m=$EmptyMode or m=$NoValueMode =>
-    ["/throwAway",$NoValueMode,put(first lhs,"macro",macroExpand(rhs,e),e)]
-
-@
-\section{License}
-<<license>>=
--- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--- All rights reserved.
---
--- Redistribution and use in source and binary forms, with or without
--- modification, are permitted provided that the following conditions are
--- met:
---
---     - Redistributions of source code must retain the above copyright
---       notice, this list of conditions and the following disclaimer.
---
---     - Redistributions in binary form must reproduce the above copyright
---       notice, this list of conditions and the following disclaimer in
---       the documentation and/or other materials provided with the
---       distribution.
---
---     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---       names of its contributors may be used to endorse or promote products
---       derived from this software without specific prior written permission.
---
--- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-@
+\section{Compiler Top Level Functions}
+\subsection{compTopLevel}
 <<*>>=
-<<license>>
-
 compTopLevel(x,m,e) ==
 --+ signals that target is derived from lhs-- see NRTmakeSlot1Info
   $NRTderivedTargetIfTrue: local := false
@@ -103,6 +20,11 @@ compTopLevel(x,m,e) ==
   $compTimeSum: local := 0
   $resolveTimeSum: local := 0
   $packagesUsed: local := []
+  -- This hashtable is a performance improvement by Waldek Hebisch
+  $envHashTable: local := MAKE_-HASHTABLE 'EQUAL
+  for u in CAR(CAR(e)) repeat
+   for v in CDR(u) repeat
+    HPUT($envHashTable,[CAR u, CAR v],true)
   -- The next line allows the new compiler to be tested interactively.
   compFun := if $newCompAtTopLevel=true then 'newComp else 'compOrCroak
   x is ["DEF",:.] or x is ["where",["DEF",:.],:.] =>
@@ -110,6 +32,9 @@ compTopLevel(x,m,e) ==
         --keep old environment after top level function defs
   FUNCALL(compFun,x,m,e)
 
+@
+\subsection{compUniquely}
+<<*>>=
 compUniquely(x,m,e) ==
   $compUniquelyIfTrue: local:= true
   CATCH("compUniquely",comp(x,m,e))
@@ -128,7 +53,7 @@ CohenCategory(): Category == SetCategory with
   construct:(CExpr,CExpr)->CExpr
     ++ construct:(CExpr,CExpr)->CExpr
 
-@
+\end{verbatim}
 the resulting call looks like:
 \begin{verbatim}
  (|compOrCroak|
@@ -156,6 +81,7 @@ The third argument, {\tt e}, is the environment.
 
 In the call to {\tt compOrCroak1} the fourth argument {\tt comp}
 is the function to call.
+\subsection{compOrCroak}
 <<*>>=
 compOrCroak(x,m,e) == compOrCroak1(x,m,e,'comp)
 
@@ -211,6 +137,8 @@ The fourth argument {\tt comp} is the function to call.
 The inner function augments the environment with information
 from the compiler stack {\tt \$compStack} and
 {\tt \$compErrorMessageStack}.
+
+\subsection{compOrCroak1}
 <<*>>=
 compOrCroak1(x,m,e,compFn) ==
   fn(x,m,e,nil,nil,compFn) where
@@ -237,16 +165,25 @@ compOrCroak1(x,m,e,compFn) ==
       displayComp $level
       userError errorMessage
 
+@
+\subsection{tc}
+<<*>>=
 tc() ==
   $tripleCache:= nil
   comp($x,$m,$f)
 
 
+@
+\subsection{comp}
+<<*>>=
 comp(x,m,e) ==
   T:= compNoStacking(x,m,e) => ($compStack:= nil; T)
   $compStack:= [[x,m,e,$exitModeStack],:$compStack]
   nil
 
+@
+\subsection{compNoStacking}
+<<*>>=
 compNoStacking(x,m,e) ==
   T:= comp2(x,m,e) =>
     (m=$EmptyMode and T.mode=$Representation => [T.expr,"$",T.env]; T)
@@ -255,11 +192,17 @@ compNoStacking(x,m,e) ==
          --preferred to the underlying representation -- RDJ 9/12/83
   compNoStacking1(x,m,e,$compStack)
 
+@
+\subsection{compNoStacking1}
+<<*>>=
 compNoStacking1(x,m,e,$compStack) ==
   u:= get(if m="$" then "Rep" else m,"value",e) =>
     (T:= comp2(x,u.expr,e) => [T.expr,m,T.env]; nil)
   nil
 
+@
+\subsection{comp2}
+<<*>>=
 comp2(x,m,e) ==
   [y,m',e]:= comp3(x,m,e) or return nil
   if $LISPLIB and isDomainForm(x,e) then
@@ -272,6 +215,9 @@ comp2(x,m,e) ==
         --$bootStrapMode-test necessary for compiling Ring in $bootStrapMode
   [y,m',e]
 
+@
+\subsection{comp3}
+<<*>>=
 comp3(x,m,$e) ==
   --returns a Triple or %else nil to signalcan't do'
   $e:= addDomain(m,$e)
@@ -292,18 +238,27 @@ comp3(x,m,$e) ==
     [x',m',addDomain(m',e')]
   t
 
+@
+\subsection{compTypeOf}
+<<*>>=
 compTypeOf(x:=[op,:argl],m,e) ==
   $insideCompTypeOf: local := true
   newModemap:= EQSUBSTLIST(argl,$FormalMapVariableList,get(op,'modemap,e))
   e:= put(op,'modemap,newModemap,e)
   comp3(x,m,e)
 
+@
+\subsection{hasFormalMapVariable}
+<<*>>=
 hasFormalMapVariable(x, vl) ==
   $formalMapVariables: local := vl
   null vl => false
   ScanOrPairVec('hasone?,x) where
      hasone? x == MEMQ(x,$formalMapVariables)
 
+@
+\subsection{compWithMappingMode}
+<<*>>=
 compWithMappingMode(x,m is ["Mapping",m',:sl],oldE) ==
   $killOptimizeIfTrue: local:= true
   e:= oldE
@@ -400,6 +355,9 @@ compWithMappingMode(x,m is ["Mapping",m',:sl],oldE) ==
     ['LIST,fname]
   [uu,m,oldE]
 
+@
+\subsection{extractCodeAndConstructTriple}
+<<*>>=
 extractCodeAndConstructTriple(u, m, oldE) ==
   u is ["call",fn,:.] =>
     if fn is ["applyFun",a] then fn := a
@@ -407,12 +365,18 @@ extractCodeAndConstructTriple(u, m, oldE) ==
   [op,:.,env] := u
   [["CONS",["function",op],env],m,oldE]
 
+@
+\subsection{compExpression}
+<<*>>=
 compExpression(x,m,e) ==
   $insideExpressionIfTrue: local:= true
   atom first x and (fn:= GET(first x,"SPECIAL")) =>
     FUNCALL(fn,x,m,e)
   compForm(x,m,e)
 
+@
+\subsection{compAtom}
+<<*>>=
 compAtom(x,m,e) ==
   T:= compAtomWithModemap(x,m,e,get(x,"modemap",e)) => T
   x="nil" =>
@@ -428,6 +392,9 @@ compAtom(x,m,e) ==
     [x,primitiveType x or return nil,e]
   convert(t,m)
 
+@
+\subsection{primitiveType}
+<<*>>=
 primitiveType x ==
   x is nil => $EmptyMode
   STRINGP x => $String
@@ -438,6 +405,9 @@ primitiveType x ==
   FLOATP x => $DoubleFloat
   nil
 
+@
+\subsection{compSymbol}
+<<*>>=
 compSymbol(s,m,e) ==
   s="$NoValue" => ["$NoValue",$NoValueMode,e]
   isFluid s => [s,getmode(s,e) or return nil,e]
@@ -458,14 +428,23 @@ compSymbol(s,m,e) ==
   m = $Expression or m = $Symbol => [['QUOTE,s],m,e]
   not isFunction(s,e) => errorRef s
 
+@
+\subsection{convertOrCroak}
+<<*>>=
 convertOrCroak(T,m) ==
   u:= convert(T,m) => u
   userError ["CANNOT CONVERT: ",T.expr,"%l"," OF MODE: ",T.mode,"%l",
     " TO MODE: ",m,"%l"]
 
+@
+\subsection{convert}
+<<*>>=
 convert(T,m) ==
   coerce(T,resolve(T.mode,m) or return nil)
 
+@
+\subsection{mkUnion}
+<<*>>=
 mkUnion(a,b) ==
   b="$" and $Rep is ["Union",:l] => b
   a is ["Union",:l] =>
@@ -474,10 +453,16 @@ mkUnion(a,b) ==
   b is ["Union",:l] => ["Union",:setUnion([a],l)]
   ["Union",a,b]
 
+@
+\subsection{maxSuperType}
+<<*>>=
 maxSuperType(m,e) ==
   typ:= get(m,"SuperDomain",e) => maxSuperType(typ,e)
   m
 
+@
+\subsection{hasType}
+<<*>>=
 hasType(x,e) ==
   fn get(x,"condition",e) where
     fn x ==
@@ -485,12 +470,18 @@ hasType(x,e) ==
       x is [["case",.,y],:.] => y
       fn rest x
 
+@
+\subsection{compForm}
+<<*>>=
 compForm(form,m,e) ==
   T:=
     compForm1(form,m,e) or compArgumentsAndTryAgain(form,m,e) or return
       stackMessageIfNone ["cannot compile","%b",form,"%d"]
   T
 
+@
+\subsection{compArgumentsAndTryAgain}
+<<*>>=
 compArgumentsAndTryAgain(form is [.,:argl],m,e) ==
   -- used in case: f(g(x)) where f is in domain introduced by
   -- comping g, e.g. for (ELT (ELT x a) b), environment can have no
@@ -501,6 +492,9 @@ compArgumentsAndTryAgain(form is [.,:argl],m,e) ==
   u="failed" => nil
   compForm1(form,m,e)
 
+@
+\subsection{outputComp}
+<<*>>=
 outputComp(x,e) ==
   u:=comp(['_:_:,x,$Expression],$Expression,e) => u
   x is ['construct,:argl] =>
@@ -509,6 +503,9 @@ outputComp(x,e) ==
     [['coerceUn2E,x,v.mode],$Expression,e]
   [x,$Expression,e]
 
+@
+\subsection{compForm1}
+<<*>>=
 compForm1(form is [op,:argl],m,e) ==
   $NumberOfArgsIfInteger: local:= #argl --see compElt
   op="error" =>
@@ -537,11 +534,17 @@ compForm1(form is [op,:argl],m,e) ==
   (mmList:= getFormModemaps(form,e)) and (T:= compForm2(form,m,e,mmList)) => T
   compToApply(op,argl,m,e)
 
+@
+\subsection{compExpressionList}
+<<*>>=
 compExpressionList(argl,m,e) ==
   Tl:= [[.,.,e]:= comp(x,$Expression,e) or return "failed" for x in argl]
   Tl="failed" => nil
   convert([["LIST",:[y.expr for y in Tl]],$Expression,e],m)
 
+@
+\subsection{compForm2}
+<<*>>=
 compForm2(form is [op,:argl],m,e,modemapList) ==
   sargl:= TAKE(# argl, $TriangleVariableList)
   aList:= [[sa,:a] for a in argl for sa in sargl]
@@ -569,10 +572,16 @@ compForm2(form is [op,:argl],m,e,modemapList) ==
       compForm3(form,m,e,modemapList)
   compForm3(form,m,e,modemapList)
 
+@
+\subsection{compFormPartiallyBottomUp}
+<<*>>=
 compFormPartiallyBottomUp(form,m,e,modemapList,partialModeList) ==
   mmList:= [mm for mm in modemapList | compFormMatch(mm,partialModeList)] =>
     compForm3(form,m,e,mmList)
 
+@
+\subsection{compFormMatch}
+<<*>>=
 compFormMatch(mm,partialModeList) ==
   mm is [[.,.,:argModeList],:.] and match(argModeList,partialModeList) where
     match(a,b) ==
@@ -580,6 +589,9 @@ compFormMatch(mm,partialModeList) ==
       null first b => match(rest a,rest b)
       first a=first b and match(rest a,rest b)
 
+@
+\subsection{compForm3}
+<<*>>=
 compForm3(form is [op,:argl],m,e,modemapList) ==
   T:=
     or/
@@ -591,6 +603,9 @@ compForm3(form is [op,:argl],m,e,modemapList) ==
     T
   T
 
+@
+\subsection{getFormModemaps}
+<<*>>=
 getFormModemaps(form is [op,:argl],e) ==
   op is ["elt",domain,op1] =>
     [x for x in getFormModemaps([op1,:argl],e) | x is [[ =domain,:.],:.]]
@@ -609,12 +624,18 @@ getFormModemaps(form is [op,:argl],e) ==
     stackMessage ["no modemap for","%b",op,"%d","with ",nargs," arguments"]
   finalModemapList
 
+@
+\subsection{getConstructorFormOfMode}
+<<*>>=
 getConstructorFormOfMode(m,e) ==
   isConstructorForm m => m
   if m="$" then m:= "Rep"
   atom m and get(m,"value",e) is [v,:.] =>
     isConstructorForm v => v
 
+@
+\subsection{getConstructorMode}
+<<*>>=
 getConstructorMode(x,e) ==
   atom x => (u:= getmode(x,e) or return nil; getConstructorFormOfMode(u,e))
   x is ["elt",y,a] =>
@@ -624,8 +645,14 @@ getConstructorMode(x,e) ==
     u is ["Record",:l] =>
       (or/[p is [., =a,R] for p in l]) and isConstructorForm R => R
 
+@
+\subsection{isConstructorForm}
+<<*>>=
 isConstructorForm u == u is [name,:.] and MEMBER(name,'(Record Vector List))
 
+@
+\subsection{eltModemapFilter}
+<<*>>=
 eltModemapFilter(name,mmList,e) ==
   isConstantId(name,e) =>
     l:= [mm for mm in mmList | mm is [[.,.,.,sel,:.],:.] and sel=name] => l
@@ -634,6 +661,9 @@ eltModemapFilter(name,mmList,e) ==
     nil
   mmList
 
+@
+\subsection{seteltModemapFilter}
+<<*>>=
 seteltModemapFilter(name,mmList,e) ==
   isConstantId(name,e) =>
     l:= [mm for (mm:= [[.,.,.,sel,:.],:.]) in mmList | sel=name] => l
@@ -642,6 +672,9 @@ seteltModemapFilter(name,mmList,e) ==
     nil
   mmList
 
+@
+\subsection{substituteIntoFunctorModemap}
+<<*>>=
 substituteIntoFunctorModemap(argl,modemap is [[dc,:sig],:.],e) ==
   #dc^=#sig =>
     keyedSystemError("S2GE0016",['"substituteIntoFunctorModemap",
@@ -655,14 +688,22 @@ substituteIntoFunctorModemap(argl,modemap is [[dc,:sig],:.],e) ==
     [SUBLIS(substitutionList,modemap),e]
   nil
 
---% SPECIAL EVALUATION FUNCTIONS
+@
 
+\section{Special evaluation functions}
+\subsection{compConstructorCategory}
+<<*>>=
 compConstructorCategory(x,m,e) == [x,resolve($Category,m),e]
 
+@
+\subsection{compString}
+<<*>>=
 compString(x,m,e) == [x,resolve($StringCategory,m),e]
 
---% SUBSET CATEGORY
-
+@
+\subsection{compSubsetCategory}
+Compile SubsetCategory
+<<*>>=
 compSubsetCategory(["SubsetCategory",cat,R],m,e) ==
   --1. put "Subsets" property on R to allow directly coercion to subset;
   --   allow automatic coercion from subset to R but not vice versa
@@ -675,10 +716,15 @@ compSubsetCategory(["SubsetCategory",cat,R],m,e) ==
           ["CATEGORY","domain",["SIGNATURE","coerce",[R,"$"]],["SIGNATURE",
             "lift",[R,"$"]],["SIGNATURE","reduce",["$",R]]]
 
---% CONS
-
+@
+\subsection{compCons}
+Compile cons
+<<*>>=
 compCons(form,m,e) == compCons1(form,m,e) or compForm(form,m,e)
 
+@
+\subsection{compCons1}
+<<*>>=
 compCons1(["CONS",x,y],m,e) ==
   [x,mx,e]:= comp(x,$EmptyMode,e) or return nil
   null y => convert([["LIST",x],["List",mx],e],m)
@@ -693,10 +739,15 @@ compCons1(["CONS",x,y],m,e) ==
     [["CONS",x,y],["Pair",mx,my],e]
   convert(T,m)
 
---% SETQ
-
+@
+\subsection{compSetq}
+Compile setq
+<<*>>=
 compSetq(["LET",form,val],m,E) == compSetq1(form,val,m,E)
 
+@
+\subsection{compSetq1}
+<<*>>=
 compSetq1(form,val,m,E) ==
   IDENTP form => setqSingle(form,val,m,E)
   form is [":",x,y] =>
@@ -707,13 +758,23 @@ compSetq1(form,val,m,E) ==
     op="Tuple" => setqMultiple(l,val,m,E)
     setqSetelt(form,val,m,E)
 
+@
+\subsection{compMakeDeclaration}
+<<*>>=
 compMakeDeclaration(x,m,e) ==
   $insideExpressionIfTrue: local
   compColon(x,m,e)
 
+@
+\subsection{setqSetelt}
+Compile setelt
+<<*>>=
 setqSetelt([v,:s],val,m,E) ==
   comp(["setelt",v,:s,val],m,E)
 
+@
+\subsection{setqSingle}
+<<*>>=
 setqSingle(id,val,m,E) ==
   $insideSetqSingleIfTrue: local:= true
     --used for comping domain forms within functions
@@ -756,6 +817,9 @@ setqSingle(id,val,m,E) ==
             (isDomainForm(x,e') => ['ELT,id,0];CAR outputComp(id,e'))]
   [form,m',e']
 
+@
+\subsection{assignError}
+<<*>>=
 assignError(val,m',form,m) ==
   message:=
     val =>
@@ -764,6 +828,9 @@ assignError(val,m',form,m) ==
     ["CANNOT ASSIGN: ",val,"%l","   TO: ",form,"%l","   OF MODE: ",m]
   stackMessage message
 
+@
+\subsection{setqMultiple}
+<<*>>=
 setqMultiple(nameList,val,m,e) ==
   val is ["CONS",:.] and m=$NoValueMode =>
     setqMultipleExplicit(nameList,uncons val,m,e)
@@ -796,6 +863,9 @@ setqMultiple(nameList,val,m,e) ==
   if assignList="failed" then NIL
   else [MKPROGN [x,:assignList,g],m',e]
 
+@
+\subsection{setqMultipleExplicit}
+<<*>>=
 setqMultipleExplicit(nameList,valList,m,e) ==
   #nameList^=#valList =>
     stackMessage ["Multiple assignment error; # of items in: ",nameList,
@@ -813,7 +883,10 @@ setqMultipleExplicit(nameList,valList,m,e) ==
   [["PROGN",:[T.expr for T in assignList],:[T.expr for T in reAssignList]],
     $NoValueMode, (LAST reAssignList).env]
 
---% WHERE
+@
+\subsection{compWhere}
+Compile where
+<<*>>=
 compWhere([.,form,:exprList],m,eInit) ==
   $insideExpressionIfTrue: local:= false
   $insideWhereIfTrue: local:= true
@@ -829,6 +902,10 @@ compWhere([.,form,:exprList],m,eInit) ==
     eInit
   [x,m,eFinal]
 
+@
+\subsection{compConstruct}
+Compile construct
+<<*>>=
 compConstruct(form is ["construct",:l],m,e) ==
   y:= modeIsAggregateOf("List",m,e) =>
     T:= compList(l,["List",CADR y],e) => convert(T,m)
@@ -845,26 +922,90 @@ compConstruct(form is ["construct",:l],m,e) ==
       (T:= compVector(l,["Vector",CADR y],e)) and (T':= convert(T,m)) =>
          return T'
 
+@
+\subsection{compQuote}
+Compile quote
+<<*>>=
 compQuote(expr,m,e) == [expr,m,e]
 
+@
+\subsection{compList}
+Compile list
+<<*>>=
 compList(l,m is ["List",mUnder],e) ==
   null l => [NIL,m,e]
   Tl:= [[.,mUnder,e]:= comp(x,mUnder,e) or return "failed" for x in l]
   Tl="failed" => nil
   T:= [["LIST",:[T.expr for T in Tl]],["List",mUnder],e]
 
+@
+\subsection{compVector}
+Compile vector
+<<*>>=
 compVector(l,m is ["Vector",mUnder],e) ==
   null l => [$EmptyVector,m,e]
   Tl:= [[.,mUnder,e]:= comp(x,mUnder,e) or return "failed" for x in l]
   Tl="failed" => nil
   [["VECTOR",:[T.expr for T in Tl]],m,e]
 
---% MACROS
-<<compMacro>>
---% SEQ
+@
+\subsection{compMacro}
+The compMacro function does macro expansion during spad file compiles.
+If a macro occurs twice in the same file the macro expands infinitely
+causing a stack overflow. The reason for the infinite recursion is that
+the left hand side of the macro definition is expanded. Thus defining
+a macro:
+\begin{verbatim}
+name ==> 1
+\end{verbatim}
+will expand properly the first time. The second time it turns into:
+\begin{verbatim}
+1 ==> 1
+\end{verbatim}
+The original code read:
+\begin{verbatim}
+compMacro(form,m,e) ==
+  $macroIfTrue: local:= true
+  ["MDEF",lhs,signature,specialCases,rhs]:= form
+  rhs :=
+    rhs is ['CATEGORY,:.] => ['"-- the constructor category"]
+    rhs is ['Join,:.]     => ['"-- the constructor category"]
+    rhs is ['CAPSULE,:.]  => ['"-- the constructor capsule"]
+    rhs is ['add,:.]      => ['"-- the constructor capsule"]
+    formatUnabbreviated rhs
+  sayBrightly ['"   processing macro definition",'%b,
+    :formatUnabbreviated lhs,'" ==> ",:rhs,'%d]
+  ["MDEF",lhs,signature,specialCases,rhs]:= form:= macroExpand(form,e)
+  m=$EmptyMode or m=$NoValueMode =>
+    ["/throwAway",$NoValueMode,put(first lhs,"macro",rhs,e)]
 
+\end{verbatim}
+Juergen Weiss proposed the following fixed code. This does not expand
+the left hand side of the macro.
+<<*>>=
+compMacro(form,m,e) ==
+  $macroIfTrue: local:= true
+  ["MDEF",lhs,signature,specialCases,rhs]:= form
+  prhs :=
+    rhs is ['CATEGORY,:.] => ['"-- the constructor category"]
+    rhs is ['Join,:.]     => ['"-- the constructor category"]
+    rhs is ['CAPSULE,:.]  => ['"-- the constructor capsule"]
+    rhs is ['add,:.]      => ['"-- the constructor capsule"]
+    formatUnabbreviated rhs
+  sayBrightly ['"   processing macro definition",'%b,
+    :formatUnabbreviated lhs,'" ==> ",:prhs,'%d]
+  m=$EmptyMode or m=$NoValueMode =>
+    ["/throwAway",$NoValueMode,put(first lhs,"macro",macroExpand(rhs,e),e)]
+
+@
+\subsection{compSeq}
+Compile seq
+<<*>>=
 compSeq(["SEQ",:l],m,e) == compSeq1(l,[m,:$exitModeStack],e)
 
+@
+\subsection{compSeq1}
+<<*>>=
 compSeq1(l,$exitModeStack,e) ==
   $insideExpressionIfTrue: local
   $finalEnv: local
@@ -882,8 +1023,14 @@ compSeq1(l,$exitModeStack,e) ==
   form:= ["SEQ",:replaceExitEtc(c,catchTag,"TAGGEDexit",$exitModeStack.(0))]
   [["CATCH",catchTag,form],$exitModeStack.(0),$finalEnv]
 
+@
+\subsection{compSeqItem}
+<<*>>=
 compSeqItem(x,m,e) == comp(macroExpand(x,e),m,e)
 
+@
+\subsection{replaceExitEtc}
+<<*>>=
 replaceExitEtc(x,tag,opFlag,opMode) ==
   (fn(x,tag,opFlag,opMode); x) where
     fn(x,tag,opFlag,opMode) ==
@@ -905,15 +1052,20 @@ replaceExitEtc(x,tag,opFlag,opMode) ==
       replaceExitEtc(first x,tag,opFlag,opMode)
       replaceExitEtc(rest x,tag,opFlag,opMode)
 
---% SUCHTHAT
+@
+\subsection{compSuchthat}
+Compile suchthat
+<<*>>=
 compSuchthat([.,x,p],m,e) ==
   [x',m',e]:= comp(x,m,e) or return nil
   [p',.,e]:= comp(p,$Boolean,e) or return nil
   e:= put(x',"condition",p',e)
   [x',m',e]
 
---% exit
-
+@
+\subsection{compExit}
+Compile exit
+<<*>>=
 compExit(["exit",level,x],m,e) ==
   index:= level-1
   $exitModeStack = [] => comp(x,m,e)
@@ -925,20 +1077,29 @@ compExit(["exit",level,x],m,e) ==
   modifyModeStack(m',index)
   [["TAGGEDexit",index,u],m,e]
 
+@
+\subsection{modifyModeStack}
+<<*>>=
 modifyModeStack(m,index) ==
   $reportExitModeStack =>
     SAY("exitModeStack: ",COPY $exitModeStack," ====> ",
       ($exitModeStack.index:= resolve(m,$exitModeStack.index); $exitModeStack))
   $exitModeStack.index:= resolve(m,$exitModeStack.index)
 
+@
+\subsection{compLeave}
+Compile leave
+<<*>>=
 compLeave(["leave",level,x],m,e) ==
   index:= #$exitModeStack-1-$leaveLevelStack.(level-1)
   [x',m',e']:= u:= comp(x,$exitModeStack.index,e) or return nil
   modifyModeStack(m',index)
   [["TAGGEDexit",index,u],m,e]
 
---% return
-
+@
+\subsection{compReturn}
+Compile return
+<<*>>=
 compReturn(["return",level,x],m,e) ==
   null $exitModeStack =>
     stackSemanticError(["the return before","%b",x,"%d","is unneccessary"],nil)
@@ -952,8 +1113,10 @@ compReturn(["return",level,x],m,e) ==
     modifyModeStack(m',index)
   [["TAGGEDreturn",0,u],m,e']
 
---% ELT
-
+@
+\subsection{compElt}
+Compile Elt
+<<*>>=
 compElt(form,m,E) ==
   form isnt ["elt",aDomain,anOp] => compForm(form,m,E)
   aDomain="Lisp" =>
@@ -979,8 +1142,10 @@ compElt(form,m,E) ==
     convert([["call",val],first rest sig,E], m) --implies fn calls used to access constants
   compForm(form,m,E)
 
---% HAS
-
+@
+\subsection{compHas}
+Compile has
+<<*>>=
 compHas(pred is ["has",a,b],m,$e) ==
   --b is (":",:.) => (.,.,E):= comp(b,$EmptyMode,E)
   $e:= chaseInferences(pred,$e)
@@ -990,6 +1155,9 @@ compHas(pred is ["has",a,b],m,$e) ==
 
       --used in various other places to make the discrimination
 
+@
+\subsection{compHasFormat}
+<<*>>=
 compHasFormat (pred is ["has",olda,b]) ==
   argl := rest $form
   formals := TAKE(#argl,$FormalMapVariableList)
@@ -1003,8 +1171,10 @@ compHasFormat (pred is ["has",olda,b]) ==
   isDomainForm(b,$EmptyEnvironment) => ["EQUAL",a,b]
   ["HasCategory",a,mkDomainConstructor b]
 
---% IF
-
+@
+\subsection{compIf}
+Compile if
+<<*>>=
 compIf(["IF",a,b,c],m,E) ==
   [xa,ma,Ea,Einv]:= compBoolean(a,$Boolean,E) or return nil
   [xb,mb,Eb]:= Tb:= compFromIf(b,m,Ea) or return nil
@@ -1019,6 +1189,9 @@ compIf(["IF",a,b,c],m,E) ==
       E
   [x,mc,returnEnv]
 
+@
+\subsection{canReturn}
+<<*>>=
 canReturn(expr,level,exitCount,ValueFlag) ==  --SPAD: exit and friends
   atom expr => ValueFlag and level=exitCount
   (op:= first expr)="QUOTE" => ValueFlag and level=exitCount
@@ -1056,10 +1229,16 @@ canReturn(expr,level,exitCount,ValueFlag) ==  --SPAD: exit and friends
     and/[canReturn(u,level,exitCount,ValueFlag) for u in expr]
   systemErrorHere '"canReturn" --for the time being
 
+@
+\subsection{compBoolean}
+<<*>>=
 compBoolean(p,m,E) ==
   [p',m,E]:= comp(p,m,E) or return nil
   [p',m,getSuccessEnvironment(p,E),getInverseEnvironment(p,E)]
 
+@
+\subsection{getSuccessEnvironment}
+<<*>>=
 getSuccessEnvironment(a,e) ==
 
   -- the next four lines try to ensure that explicit special-case tests
@@ -1079,6 +1258,9 @@ getSuccessEnvironment(a,e) ==
     put(x,"condition",[a,:get(x,"condition",e)],e)
   e
 
+@
+\subsection{getInverseEnvironment}
+<<*>>=
 getInverseEnvironment(a,E) ==
   atom a => E
   [op,:argl]:= a
@@ -1101,12 +1283,18 @@ getInverseEnvironment(a,E) ==
     put(x,"condition",[newpred,:get(x,"condition",E)],E)
   E
 
+@
+\subsection{getUnionMode}
+<<*>>=
 getUnionMode(x,e) ==
   m:=
     atom x => getmode(x,e)
     return nil
   isUnionMode(m,e)
 
+@
+\subsection{isUnionMode}
+<<*>>=
 isUnionMode(m,e) ==
   m is ["Union",:.] => m
   (m':= getmode(m,e)) is ["Mapping",["UnionCategory",:.]] => CADR m'
@@ -1114,30 +1302,45 @@ isUnionMode(m,e) ==
     (v.expr is ["Union",:.] => v.expr; nil)
   nil
 
+@
+\subsection{compFromIf}
+<<*>>=
 compFromIf(a,m,E) ==
   a="noBranch" => ["noBranch",m,E]
   true => comp(a,m,E)
 
+@
+\subsection{quotify}
+<<*>>=
 quotify x == x
 
+@
+\subsection{compImport}
+<<*>>=
 compImport(["import",:doms],m,e) ==
   for dom in doms repeat e:=addDomain(dom,e)
   ["/throwAway",$NoValueMode,e]
 
---Will the jerk who commented out these two functions please NOT do so
---again.  These functions ARE needed, and case can NOT be done by
---modemap alone.  The reason is that A case B requires to take A
---evaluated, but B unevaluated.  Therefore a special function is
---required.  You may have thought that you had tested this on "failed"
---etc., but "failed" evaluates to it's own mode.  Try it on x case $
---next time.
---                An angry JHD - August 15th., 1984
-
+@
+\subsection{compCase}
+Will the jerk who commented out these two functions please NOT do so
+again.  These functions ARE needed, and case can NOT be done by
+modemap alone.  The reason is that A case B requires to take A
+evaluated, but B unevaluated.  Therefore a special function is
+required.  You may have thought that you had tested this on ``failed''
+etc., but ``failed'' evaluates to it's own mode.  Try it on x case \$
+next time.
+
+An angry JHD - August 15th., 1984
+<<*>>=
 compCase(["case",x,m'],m,e) ==
   e:= addDomain(m',e)
   T:= compCase1(x,m',e) => coerce(T,m)
   nil
 
+@
+\subsection{compCase1}
+<<*>>=
 compCase1(x,m,e) ==
   [x',m',e']:= comp(x,$EmptyMode,e) or return nil
   u:=
@@ -1147,6 +1350,9 @@ compCase1(x,m,e) ==
   fn:= (or/[selfn for [cond,selfn] in u | cond=true]) or return nil
   [["call",fn,x'],$Boolean,e']
 
+@
+\subsection{compColon}
+<<*>>=
 compColon([":",f,t],m,e) ==
   $insideExpressionIfTrue=true => compColonInside(f,m,e,t)
     --if inside an expression, ":" means to convert to m "on faith"
@@ -1177,12 +1383,18 @@ compColon([":",f,t],m,e) ==
         e:= put(f,"value",[genSomeVariable(),t,$noEnv],e)
   ["/throwAway",getmode(f,e),e]
 
+@
+\subsection{unknownTypeError}
+<<*>>=
 unknownTypeError name ==
   name:=
     name is [op,:.] => op
     name
   stackSemanticError(["%b",name,"%d","is not a known type"],nil)
 
+@
+\subsection{compPretend}
+<<*>>=
 compPretend(["pretend",x,t],m,e) ==
   e:= addDomain(t,e)
   T:= comp(x,t,e) or comp(x,$EmptyMode,e) or return nil
@@ -1192,6 +1404,9 @@ compPretend(["pretend",x,t],m,e) ==
   T:= [T.expr,t,T.env]
   T':= coerce(T,m) => (if warningMessage then stackWarning warningMessage; T')
 
+@
+\subsection{compColonInside}
+<<*>>=
 compColonInside(x,m,e,m') ==
   e:= addDomain(m',e)
   T:= comp(x,$EmptyMode,e) or return nil
@@ -1208,19 +1423,23 @@ compColonInside(x,m,e,m') ==
          stackWarning [":",m'," -- should replace by pretend"]
     T'
 
+@
+\subsection{compIs}
+<<*>>=
 compIs(["is",a,b],m,e) ==
   [aval,am,e] := comp(a,$EmptyMode,e) or return nil
   [bval,bm,e] := comp(b,$EmptyMode,e) or return nil
   T:= [["domainEqual",aval,bval],$Boolean,e]
   coerce(T,m)
 
---%  Functions for coercion by the compiler
-
---  The function coerce is used by the old compiler for coercions.
---  The function coerceInteractive is used by the interpreter.
---  One should always call the correct function, since the represent-
---  ation of basic objects may not be the same.
-
+@
+\section{Functions for coercion by the compiler}
+\subsection{coerce}
+The function coerce is used by the old compiler for coercions.
+The function coerceInteractive is used by the interpreter.
+One should always call the correct function, since the representation 
+of basic objects may not be the same.
+<<*>>=
 coerce(T,m) ==
   $InteractiveMode =>
     keyedSystemError("S2GE0016",['"coerce",
@@ -1237,6 +1456,9 @@ coerce(T,m) ==
       ["Cannot coerce","%b",x,"%d","%l","      of mode","%b",m1,"%d","%l",
         "      to mode","%b",m2,"%d"]
 
+@
+\subsection{coerceEasy}
+<<*>>=
 coerceEasy(T,m) ==
   m=$EmptyMode => T
   m=$NoValueMode or m=$Void => [T.expr,m,T.env]
@@ -1248,6 +1470,9 @@ coerceEasy(T,m) ==
   T.mode=$EmptyMode or modeEqualSubst(T.mode,m,T.env) =>
     [T.expr,m,T.env]
 
+@
+\subsection{coerceSubset}
+<<*>>=
 coerceSubset([x,m,e],m') ==
   isSubset(m,m',e) or m="Rep" and m'="$" => [x,m',e]
   m is ['SubDomain,=m',:.] => [x,m',e]
@@ -1259,6 +1484,9 @@ coerceSubset([x,m,e],m') ==
       [x,m',e]
   nil
 
+@
+\subsection{coerceHard}
+<<*>>=
 coerceHard(T,m) ==
   $e: local:= T.env
   m':= T.mode
@@ -1275,6 +1503,9 @@ coerceHard(T,m) ==
       coerceExtraHard(T,m)
   coerceExtraHard(T,m)
 
+@
+\subsection{coerceExtraHard}
+<<*>>=
 coerceExtraHard(T is [x,m',e],m) ==
   T':= autoCoerceByModemap(T,m) => T'
   isUnionMode(m',e) is ["Union",:l] and (t:= hasType(x,e)) and
@@ -1284,6 +1515,9 @@ coerceExtraHard(T is [x,m',e],m) ==
       [['coerceRe2E,x,['ELT,COPY m',0]],m,e]
   nil
 
+@
+\subsection{coerceable}
+<<*>>=
 coerceable(m,m',e) ==
   m=m' => m
   -- must find any free parameters in m
@@ -1291,16 +1525,25 @@ coerceable(m,m',e) ==
   coerce(["$fromCoerceable$",m,e],m') => m'
   nil
 
+@
+\subsection{coerceExit}
+<<*>>=
 coerceExit([x,m,e],m') ==
   m':= resolve(m,m')
   x':= replaceExitEtc(x,catchTag:= MKQ GENSYM(),"TAGGEDexit",$exitMode)
   coerce([["CATCH",catchTag,x'],m,e],m')
 
+@
+\subsection{compAtSign}
+<<*>>=
 compAtSign(["@",x,m'],m,e) ==
   e:= addDomain(m',e)
   T:= comp(x,m',e) or return nil
   coerce(T,m)
 
+@
+\subsection{compCoerce}
+<<*>>=
 compCoerce(["::",x,m'],m,e) ==
   e:= addDomain(m',e)
   T:= compCoerce1(x,m',e) => coerce(T,m)
@@ -1308,6 +1551,9 @@ compCoerce(["::",x,m'],m,e) ==
     T:= (or/[compCoerce1(x,m1,e) for m1 in l]) or return nil
     coerce([T.expr,m',T.env],m)
 
+@
+\subsection{compCoerce1}
+<<*>>=
 compCoerce1(x,m',e) ==
   T:= comp(x,m',e) or comp(x,$EmptyMode,e) or return nil
   m1:=
@@ -1323,6 +1569,9 @@ compCoerce1(x,m',e) ==
     code:= ['PROG1,['LET,gg,T.expr], ['check_-subtype,pred,MKQ m',gg]]
     [code,m',T.env]
 
+@
+\subsection{coerceByModemap}
+<<*>>=
 coerceByModemap([x,m,e],m') ==
 --+ modified 6/27 for new runtime system
   u:=
@@ -1337,6 +1586,9 @@ coerceByModemap([x,m,e],m') ==
     genDeltaEntry ['coerce,:mm]
   [["call",fn,x],m',e]
 
+@
+\subsection{autoCoerceByModemap}
+<<*>>=
 autoCoerceByModemap([x,source,e],target) ==
   u:=
     [cexpr
@@ -1351,9 +1603,12 @@ autoCoerceByModemap([x,source,e],target) ==
       "      to: ",target," without a case statement"]
   [["call",fn,x],target,e]
 
---% Very old resolve
--- should only be used in the old (preWATT) compiler
 
+@
+\subsection{resolve}
+Very old resolve
+should only be used in the old (preWATT) compiler
+<<*>>=
 resolve(din,dout) ==
   din=$NoValueMode or dout=$NoValueMode => $NoValueMode
   dout=$EmptyMode => din
@@ -1363,6 +1618,9 @@ resolve(din,dout) ==
     mkUnion(din,dout)
   dout
 
+@
+\subsection{modeEqual}
+<<*>>=
 modeEqual(x,y) ==
   -- this is the late modeEqual
   -- orders Unions
@@ -1379,6 +1637,9 @@ modeEqual(x,y) ==
     true
   (and/[modeEqual(u,v) for u in x for v in y])
 
+@
+\subsection{modeEqualSubst}
+<<*>>=
 modeEqualSubst(m1,m,e) ==
   modeEqual(m1, m) => true
   atom m1 => get(m1,"value",e) is [m',:.] and modeEqual(m',m)
@@ -1389,10 +1650,9 @@ modeEqualSubst(m1,m,e) ==
         and/[modeEqualSubst(xm1,xm2,e) for xm1 in l1 for xm2 in l2]
   nil
 
---% Things to support )compile
-
 @
 \section{)compile}
+This is the implementation of the )compile command.
 
 You use this command to invoke the new Axiom library compiler or the
 old Axiom system compiler.  The {\tt )compile} system command is
@@ -1701,8 +1961,8 @@ with a {\tt .lsp} file, the Lisp file is compiled and {\tt )library}
 is called. For Aldor, You must also have present a {\tt .asy}
 generated from the same source file.
 
+\subsection{compileSpad2Cmd}
 <<*>>=
-
 compileSpad2Cmd args ==
     -- This is the old compiler
     -- Assume we entered from the "compiler" function, so args ^= nil
@@ -1801,6 +2061,9 @@ compileSpad2Cmd args ==
     terminateSystemCommand()
     spadPrompt()
 
+@
+\subsection{convertSpadToAsFile}
+<<*>>=
 convertSpadToAsFile path ==
     -- can assume path has type = .spad
     $globalMacroStack : local := nil       -- for spad -> as translator
@@ -1833,6 +2096,9 @@ convertSpadToAsFile path ==
     mkCheck()
     'done
 
+@
+\subsection{compilerDoit}
+<<*>>=
 compilerDoit(constructor, fun) ==
     $byConstructors : local := []
     $constructorsSeen : local := []
@@ -1847,6 +2113,9 @@ compilerDoit(constructor, fun) ==
         null MEMBER(ii,$constructorsSeen) =>
           sayBrightly ['">>> Warning ",'%b,ii,'%d,'" was not found"]
 
+@
+\subsection{compilerDoitWithScreenedLisplib}
+<<*>>=
 compilerDoitWithScreenedLisplib(constructor, fun) ==
     EMBED('RWRITE,
           '(LAMBDA (KEY VALUE STREAM)
@@ -1860,6 +2129,40 @@ compilerDoitWithScreenedLisplib(constructor, fun) ==
 
 
 @
+\section{License}
+<<license>>=
+-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+-- All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions are
+-- met:
+--
+--     - Redistributions of source code must retain the above copyright
+--       notice, this list of conditions and the following disclaimer.
+--
+--     - Redistributions in binary form must reproduce the above copyright
+--       notice, this list of conditions and the following disclaimer in
+--       the documentation and/or other materials provided with the
+--       distribution.
+--
+--     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+--       names of its contributors may be used to endorse or promote products
+--       derived from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+-- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+-- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+@
 \eject
 \begin{thebibliography}{99}
 \bibitem{1} nothing
diff --git a/src/interp/g-util.boot.pamphlet b/src/interp/g-util.boot.pamphlet
index 878e547..dd1e8c4 100644
--- a/src/interp/g-util.boot.pamphlet
+++ b/src/interp/g-util.boot.pamphlet
@@ -20,68 +20,52 @@ THIS CODE TO LISP AND STORE THE RESULTING LISP CODE BACK INTO
 THIS FILE.}
 
 See the {\bf g-util.clisp} section below.
-\section{License}
-<<license>>=
--- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--- All rights reserved.
---
--- Redistribution and use in source and binary forms, with or without
--- modification, are permitted provided that the following conditions are
--- met:
---
---     - Redistributions of source code must retain the above copyright
---       notice, this list of conditions and the following disclaimer.
---
---     - Redistributions in binary form must reproduce the above copyright
---       notice, this list of conditions and the following disclaimer in
---       the documentation and/or other materials provided with the
---       distribution.
---
---     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---       names of its contributors may be used to endorse or promote products
---       derived from this software without specific prior written permission.
---
--- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-@
+\section{Utility Functions of General Use}
+\subsection{PPtoFile}
 <<*>>=
-<<license>>
-
---% Utility Functions of General Use
-
 PPtoFile(x, fname) ==
     stream := DEFIOSTREAM([['MODE, :'OUTPUT], ['FILE, :fname]], 80, 0)
     PRETTYPRINT(x, stream)
     SHUT stream
     x
 
--- Convert an arbitrary lisp object to canonical boolean.
+@
+\subsection{bool}
+Convert an arbitrary lisp object to canonical boolean.
+<<*>>=
 bool x ==
     NULL NULL x
 
---% Various lispy things
-
+@
+\subsection{Identity}
+<<*>>=
 Identity x == x
 
+@
+\section{Property Lists}
+\subsection{length1?}
+<<*>>=
 length1? l == PAIRP l and not PAIRP QCDR l
 
+@
+\subsection{length2?}
+<<*>>=
 length2? l == PAIRP l and PAIRP (l := QCDR l) and not PAIRP QCDR l
 
+@
+\subsection{pairList}
+<<*>>=
 pairList(u,v) == [[x,:y] for x in u for y in v]
 
--- GETALIST(alist,prop) == IFCDR assoc(prop,alist)
+@
+\subsection{GETALIST}
+<<*>>=
 GETALIST(alist,prop) == CDR assoc(prop,alist)
 
+@
+\subsection{PUTALIST}
+<<*>>=
 PUTALIST(alist,prop,val) ==
   null alist => [[prop,:val]]
   pair := assoc(prop,alist) =>
@@ -92,6 +76,9 @@ PUTALIST(alist,prop,val) ==
   QRPLACD(LASTPAIR alist,[[prop,:val]])
   alist
 
+@
+\subsection{REMALIST}
+<<*>>=
 REMALIST(alist,prop) ==
   null alist => alist
   alist is [[ =prop,:.],:r] =>
@@ -110,20 +97,28 @@ REMALIST(alist,prop) ==
     if null (l := QCDR l) or null rest l then ok := NIL
   alist
 
+@
+\section{Association Lists}
+\subsection{deleteLassoc}
+<<*>>=
 deleteLassoc(x,y) ==
   y is [[a,:.],:y'] =>
     EQ(x,a) => y'
     [first y,:deleteLassoc(x,y')]
   y
 
---% association list functions
-
+@
+\subsection{deleteAssoc}
+<<*>>=
 deleteAssoc(x,y) ==
   y is [[a,:.],:y'] =>
    a=x => deleteAssoc(x,y')
    [first y,:deleteAssoc(x,y')]
   y
 
+@
+\subsection{deleteAssocWOC}
+<<*>>=
 deleteAssocWOC(x,y) ==
   null y => y
   [[a,:.],:t]:= y
@@ -134,6 +129,9 @@ deleteAssocWOC(x,y) ==
       fn(x,t)
     nil
 
+@
+\subsection{insertWOC}
+<<*>>=
 insertWOC(x,y) ==
   null y => [x]
   (fn(x,y); y) where fn(x,y is [h,:t]) ==
@@ -143,14 +141,17 @@ insertWOC(x,y) ==
       RPLACA(y,x)
     fn(x,t)
 
-
-
---% Miscellaneous Functions for Working with Strings
-
+@
+\section{String Handling}
+\subsection{fillerSpaces}
+<<*>>=
 fillerSpaces(n,:charPart) ==
   n <= 0 => '""
   MAKE_-FULL_-CVEC(n,IFCAR charPart or '" ")
 
+@
+\subsection{centerString}
+<<*>>=
 centerString(text,width,fillchar) ==
   wid := entryWidth text
   wid >= width => text
@@ -162,6 +163,9 @@ centerString(text,width,fillchar) ==
   if f.1 ^= 0 then fill1 := STRCONC(fillchar,fill1)
   [fill1,text,fill2]
 
+@
+\subsection{stringPrefix?}
+<<*>>=
 stringPrefix?(pref,str) ==
   -- sees if the first #pref letters of str are pref
   -- replaces STRINGPREFIXP
@@ -175,6 +179,9 @@ stringPrefix?(pref,str) ==
     i := i + 1
   ok
 
+@
+\subsection{stringChar2Integer}
+<<*>>=
 stringChar2Integer(str,pos) ==
   -- replaces GETSTRINGDIGIT in UT LISP
   -- returns small integer represented by character in position pos
@@ -185,6 +192,9 @@ stringChar2Integer(str,pos) ==
   not DIGITP(d := SCHAR(str,pos)) => NIL
   DIG2FIX d
 
+@
+\subsection{dropLeadingBlanks}
+<<*>>=
 dropLeadingBlanks str ==
   str := object2String str
   l := QCSIZE str
@@ -197,13 +207,22 @@ dropLeadingBlanks str ==
   nb => SUBSTRING(str,nb,NIL)
   '""
 
+@
+\subsection{concat}
+<<*>>=
 concat(:l) == concatList l
 
+@
+\subsection{concatList}
+<<*>>=
 concatList [x,:y] ==
   null y => x
   null x => concatList y
   concat1(x,concatList y)
 
+@
+\subsection{concat1}
+<<*>>=
 concat1(x,y) ==
   null x => y
   atom x => (null y => x; atom y => [x,y]; [x,:y])
@@ -211,37 +230,58 @@ concat1(x,y) ==
   atom y => [:x,y]
   [:x,:y]
 
---% BOOT ravel and reshape
-
+@
+\section{BOOT ravel and reshape}
+\subsection{ravel}
+<<*>>=
 ravel a == a
 
+@
+\subsection{reshape}
+<<*>>=
 reshape(a,b) == a
 
---% Some functions for algebra code
-
+@
+\section{Some functions for algebra code}
+\subsection{boolODDP}
+<<*>>=
 boolODDP x == ODDP x
 
---% Miscellaneous
-
+@
+\section{Miscellaneous}
+\subsection{freeOfSharpVars}
+<<*>>=
 freeOfSharpVars x ==
   atom x => not isSharpVarWithNum x
   freeOfSharpVars first x and freeOfSharpVars rest x
 
+@
+\subsection{listOfSharpVars}
+<<*>>=
 listOfSharpVars x ==
   atom x => (isSharpVarWithNum x => LIST x; nil)
   setUnion(listOfSharpVars first x,listOfSharpVars rest x)
 
+@
+\subsection{listOfPatternIds}
+<<*>>=
 listOfPatternIds x ==
   isPatternVar x => [x]
   atom x => nil
   x is ['QUOTE,:.] => nil
   UNIONQ(listOfPatternIds first x,listOfPatternIds rest x)
 
+@
+\subsection{isPatternVar}
+<<*>>=
 isPatternVar v ==
   -- a pattern variable consists of a star followed by a star or digit(s)
   IDENTP(v) and MEMQ(v,'(_*_* _*1 _*2 _*3 _*4 _*5 _*6 _*7 _*8 _*9 _*10
     _*11 _*12 _*13 _*14 _*15 _*16 _*17 _*18 _*19 _*20)) and true
 
+@
+\subsection{removeZeroOne}
+<<*>>=
 removeZeroOne x ==
   -- replace all occurrences of (Zero) and (One) with
   -- 0 and 1
@@ -250,6 +290,9 @@ removeZeroOne x ==
   atom x => x
   [removeZeroOne first x,:removeZeroOne rest x]
 
+@
+\subsection{removeZeroOneDestructively}
+<<*>>=
 removeZeroOneDestructively t ==
   -- replace all occurrences of (Zero) and (One) with
   -- 0 and 1 destructively
@@ -259,6 +302,9 @@ removeZeroOneDestructively t ==
   RPLNODE(t,removeZeroOneDestructively first t,
     removeZeroOneDestructively rest t)
 
+@
+\subsection{flattenSexpr}
+<<*>>=
 flattenSexpr s ==
   null s => s
   ATOM s => s
@@ -266,14 +312,26 @@ flattenSexpr s ==
   ATOM f => [f,:flattenSexpr r]
   [:flattenSexpr f,:flattenSexpr r]
 
+@
+\subsection{isLowerCaseLetter}
+<<*>>=
 isLowerCaseLetter c == charRangeTest CHAR2NUM c
 
+@
+\subsection{isUpperCaseLetter}
+<<*>>=
 isUpperCaseLetter c == charRangeTest QSDIFFERENCE(CHAR2NUM c,64)
 
+@
+\subsection{isLetter}
+<<*>>=
 isLetter c ==
   n:= CHAR2NUM c
   charRangeTest n or charRangeTest QSDIFFERENCE(CHAR2NUM c,64)
 
+@
+\subsection{charRangeTest}
+<<*>>=
 charRangeTest n ==
   QSLESSP(153,n) =>
     QSLESSP(169,n) => false
@@ -285,18 +343,24 @@ charRangeTest n ==
     true
   false
 
+@
+\subsection{update}
+<<*>>=
 update() ==
   OBEY
     STRCONC('"SPADEDIT ",STRINGIMAGE _/VERSION,'" ",STRINGIMAGE _/WSNAME,'" A")
   _/UPDATE()
 
---% Inplace Merge Sort for Lists
--- MBM April/88
+@
+\section{Inplace Merge Sort for Lists}
+MBM April/88
 
--- listSort(pred,list) or listSort(pred,list,key)
--- the pred function is a boolean valued function defining the ordering
--- the key function extracts the key from an item for comparison by pred
+\verb|listSort(pred,list)| or \verb|listSort(pred,list,key)|
+The pred function is a boolean valued function defining the ordering
+the key function extracts the key from an item for comparison by pred
 
+\subsection{listSort}
+<<*>>=
 listSort(pred,list,:optional) ==
    NOT functionp pred => error "listSort: first arg must be a function"
    NOT LISTP list => error "listSort: second argument must be a list"
@@ -305,20 +369,29 @@ listSort(pred,list,:optional) ==
    NOT functionp key => error "listSort: last arg must be a function"
    mergeSort(pred,key,list,LENGTH list)
 
--- non-destructive merge sort using NOT GGREATERP as predicate
+@
+\subsection{MSORT}
+Non-destructive merge sort using NOT GGREATERP as predicate
+<<*>>=
 MSORT list == listSort(function GLESSEQP, COPY_-LIST list)
 
--- destructive merge sort using NOT GGREATERP as predicate
+@
+\subsection{NMSORT}
+Destructive merge sort using NOT GGREATERP as predicate
+<<*>>=
 NMSORT list == listSort(function GLESSEQP, list)
 
--- non-destructive merge sort using ?ORDER as predicate
+@
+\subsection{orderList}
+Non-destructive merge sort using ?ORDER as predicate
+<<*>>=
 orderList l == listSort(function _?ORDER, COPY_-LIST l)
 
--- dummy defn until clean-up
--- order     l == orderList l
-
+@
+\subsection{mergeInPlace}
+Merge the two sorted lists p and q
+<<*>>=
 mergeInPlace(f,g,p,q) ==
-   -- merge the two sorted lists p and q
    if NULL p then return p
    if NULL q then return q
    if FUNCALL(f,FUNCALL(g, QCAR p),FUNCALL(g, QCAR q))
@@ -331,6 +404,9 @@ mergeInPlace(f,g,p,q) ==
    if NULL p then QRPLACD(t,q) else QRPLACD(t,p)
    r
 
+@
+\subsection{mergeSort}
+<<*>>=
 mergeSort(f,g,p,n) ==
    if EQ(n,2) and FUNCALL(f,FUNCALL(g,QCADR p),FUNCALL(g,QCAR p)) then
       t := p
@@ -348,19 +424,26 @@ mergeSort(f,g,p,n) ==
    q := mergeSort(f,g,q,QSDIFFERENCE(n,l))
    mergeInPlace(f,g,p,q)
 
---% Throwing with glorious highlighting (maybe)
-
+@
+\subsection{spadThrow}
+Throwing with glorious highlighting (maybe)
+<<*>>=
 spadThrow() ==
   if $interpOnly and $mapName then
     putHist($mapName,'localModemap, nil, $e)
   THROW("SPAD__READER",nil)
 
+@
+\subsection{spadThrowBrightly}
+<<*>>=
 spadThrowBrightly x ==
   sayBrightly x
   spadThrow()
 
---% Type Formatting Without Abbreviation
-
+@
+\subsection{formatUnabbreviatedSig}
+Type Formatting Without Abbreviation
+<<*>>=
 formatUnabbreviatedSig sig ==
   null sig => ["() -> ()"]
   [target,:args] := sig
@@ -370,6 +453,9 @@ formatUnabbreviatedSig sig ==
   args := formatUnabbreviatedTuple args
   ['"(",:args,'") -> ",:target]
 
+@
+\subsection{formatUnabbreviatedTuple}
+<<*>>=
 formatUnabbreviatedTuple t ==
   -- t is a list of types
   null t => t
@@ -378,6 +464,9 @@ formatUnabbreviatedTuple t ==
   null rest t => t0
   [:t0,'",",:formatUnabbreviatedTuple QCDR t]
 
+@
+\subsection{formatUnabbreviated}
+<<*>>=
 formatUnabbreviated t ==
   atom t =>
     [t]
@@ -399,6 +488,9 @@ formatUnabbreviated t ==
     [arg,'"(",:formatUnabbreviatedTuple args,'")"]
   t
 
+@
+\subsection{sublisNQ}
+<<*>>=
 sublisNQ(al,e) ==
   atom al => e
   fn(al,e) where fn(al,e) ==
@@ -412,12 +504,17 @@ sublisNQ(al,e) ==
     EQ(a,u) and EQ(rest e,v) => e
     [u,:v]
 
--- function for turning strings in tex format
-
+@
+\subsection{str2Outform}
+Function for turning strings in tex format
+<<*>>=
 str2Outform s ==
   parse := ncParseFromString s or systemError '"String for TeX will not parse"
   parse2Outform parse
 
+@
+\subsection{parse2Outform}
+<<*>>=
 parse2Outform x ==
   x is [op,:argl] =>
     nargl := [parse2Outform y for y in argl]
@@ -426,16 +523,25 @@ parse2Outform x ==
     [op,:nargl]
   x
 
+@
+\subsection{str2Tex}
+<<*>>=
 str2Tex s ==
   outf := str2Outform s
   val := coerceInt(mkObj(wrap outf, '(OutputForm)), '(TexFormat))
   val := objValUnwrap val
   CAR val.1
 
+@
+\subsection{opOf}
+<<*>>=
 opOf x ==
   atom x => x
   first x
 
+@
+\subsection{getProplist}
+<<*>>=
 getProplist(x,E) ==
   not atom x => getProplist(first x,E)
   u:= search(x,E) => u
@@ -446,14 +552,23 @@ getProplist(x,E) ==
 --  (pl:=PROPLIST x) => pl
 -- Above line commented out JHD/BMT 2.Aug.90
 
+@
+\subsection{search}
+<<*>>=
 search(x,e is [curEnv,:tailEnv]) ==
   searchCurrentEnv(x,curEnv) or searchTailEnv(x,tailEnv)
 
+@
+\subsection{searchCurrentEnv}
+<<*>>=
 searchCurrentEnv(x,currentEnv) ==
   for contour in currentEnv repeat
     if u:= ASSQ(x,contour) then return (signal:= u)
   KDR signal
 
+@
+\subsection{searchTailEnv}
+<<*>>=
 searchTailEnv(x,e) ==
   for env in e repeat
     signal:=
@@ -462,6 +577,9 @@ searchTailEnv(x,e) ==
       if signal then return signal
   KDR signal
 
+@
+\subsection{augProplist}
+<<*>>=
 augProplist(proplist,prop,val) ==
   $InteractiveMode => augProplistInteractive(proplist,prop,val)
   while (proplist is [[ =prop,:.],:proplist']) repeat proplist:= proplist'
@@ -471,24 +589,42 @@ augProplist(proplist,prop,val) ==
     DELLASOS(prop,proplist)
   [[prop,:val],:proplist]
 
+@
+\subsection{augProplistOf}
+<<*>>=
 augProplistOf(var,prop,val,e) ==
   proplist:= getProplist(var,e)
   semchkProplist(var,proplist,prop,val)
   augProplist(proplist,prop,val)
 
+@
+\subsection{semchkProplist}
+<<*>>=
 semchkProplist(x,proplist,prop,val) ==
   prop="isLiteral" =>
     LASSOC("value",proplist) or LASSOC("mode",proplist) => warnLiteral x
   MEMQ(prop,'(mode value)) =>
     LASSOC("isLiteral",proplist) => warnLiteral x
 
+@
+\subsection{addBinding}
+The \verb|$envHashTable| is a performance improvement by Waldek Hebisch.
+<<*>>=
+DEFPARAMETER($envHashTable,nil)
+
 addBinding(var,proplist,e is [[curContour,:tailContour],:tailEnv]) ==
   EQ(proplist,getProplist(var,e)) => e
+  if $envHashTable then
+   for u in proplist repeat
+    HPUT($envHashTable,[var, CAR u],true)
   $InteractiveMode => addBindingInteractive(var,proplist,e)
   if curContour is [[ =var,:.],:.] then curContour:= rest curContour
                  --Previous line should save some space
   [[[lx,:curContour],:tailContour],:tailEnv] where lx:= [var,:proplist]
 
+@
+\subsection{position}
+<<*>>=
 position(x,l) ==
   posn(x,l,0) where
     posn(x,l,n) ==
@@ -496,21 +632,35 @@ position(x,l) ==
       x=first l => n
       posn(x,rest l,n+1)
 
+@
+\subsection{insert}
+<<*>>=
 insert(x,y) ==
   MEMBER(x,y) => y
   [x,:y]
 
+@
+\subsection{after}
+<<*>>=
 after(u,v) ==
   r:= u
   for x in u for y in v repeat r:= rest r
   r
 
-
+@
+\section{String trimming}
+<<*>>=
 $blank := char ('_ )
 
+@
+\subsection{trimString}
+<<*>>=
 trimString s ==
   leftTrim rightTrim s
 
+@
+\subsection{leftTrim}
+<<*>>=
 leftTrim s ==
   k := MAXINDEX s
   k < 0 => s
@@ -519,6 +669,9 @@ leftTrim s ==
     SUBSTRING(s,j + 1,nil)
   s
 
+@
+\subsection{rightTrim}
+<<*>>=
 rightTrim s ==  -- assumed a non-empty string
   k := MAXINDEX s
   k < 0 => s
@@ -527,38 +680,57 @@ rightTrim s ==  -- assumed a non-empty string
     SUBSTRING(s,0,j)
   s
 
+@
+\subsection{pp}
+<<*>>=
 pp x ==
   PRETTYPRINT x
   x
 
+@
+\subsection{pr}
+<<*>>=
 pr x ==
   F_,PRINT_-ONE x
   nil
 
+@
+\subsection{quickAnd}
+<<*>>=
 quickAnd(a,b) ==
   a = true => b
   b = true => a
   a = false or b = false => false
   simpBool ['AND,a,b]
 
+@
+\subsection{quickOr}
+<<*>>=
 quickOr(a,b) ==
   a = true or b = true => true
   b = false => a
   a = false => b
   simpCatPredicate simpBool ['OR,a,b]
 
+@
+\subsection{intern}
+<<*>>=
 intern x ==
   STRINGP x =>
     DIGITP x.0 => string2Integer x
     INTERN x
   x
 
+@
+\subsection{isDomain}
+<<*>>=
 isDomain a ==
   PAIRP a and VECP(CAR a) and
     MEMBER(CAR(a).0, $domainTypeTokens)
 
--- variables used by browser
-
+@
+\section{Variables used by browser}
+<<*>>=
 $htHash      := MAKE_-HASH_-TABLE()
 $glossHash   := MAKE_-HASH_-TABLE()
 $lispHash    := MAKE_-HASH_-TABLE()
@@ -629,14 +801,18 @@ $beginEndList := '(
   "verbatim"
   "detail")
 
+@
+\subsection{isDefaultPackageName}
+<<*>>=
 isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 @
 \section{g-util.clisp}
 <<g-util.clisp>>=
+;;; -*- Mode:Lisp; Package:Boot  -*-
+
 
 (IN-PACKAGE "BOOT" )
 
-;--% Utility Functions of General Use
 ;PPtoFile(x, fname) ==
 ;    stream := DEFIOSTREAM([['MODE, :'OUTPUT], ['FILE, :fname]], 80, 0)
 ;    PRETTYPRINT(x, stream)
@@ -646,14 +822,12 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;     ***       |PPtoFile| REDEFINED
 
 (DEFUN |PPtoFile| (|x| |fname|) (PROG (|stream|) (RETURN (PROGN (SPADLET |stream| (DEFIOSTREAM (CONS (CONS (QUOTE MODE) (QUOTE OUTPUT)) (CONS (CONS (QUOTE FILE) |fname|) NIL)) 80 0)) (PRETTYPRINT |x| |stream|) (SHUT |stream|) |x|)))) 
-;-- Convert an arbitrary lisp object to canonical boolean.
 ;bool x ==
 ;    NULL NULL x
 
 ;;;     ***       |bool| REDEFINED
 
 (DEFUN |bool| (|x|) (NULL (NULL |x|))) 
-;--% Various lispy things
 ;Identity x == x
 
 ;;;     ***       |Identity| REDEFINED
@@ -673,8 +847,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |pairList| REDEFINED
 
-(DEFUN |pairList| (|u| |v|) (PROG NIL (RETURN (SEQ (PROG (#0=#:G2415) (SPADLET #0# NIL) (RETURN (DO ((#1=#:G2421 |u| (CDR #1#)) (|x| NIL) (#2=#:G2422 |v| (CDR #2#)) (|y| NIL)) ((OR (ATOM #1#) (PROGN (SETQ |x| (CAR #1#)) NIL) (ATOM #2#) (PROGN (SETQ |y| (CAR #2#)) NIL)) (NREVERSE0 #0#)) (SEQ (EXIT (SETQ #0# (CONS (CONS |x| |y|) #0#))))))))))) 
-;-- GETALIST(alist,prop) == IFCDR assoc(prop,alist)
+(DEFUN |pairList| (|u| |v|) (PROG NIL (RETURN (SEQ (PROG (#0=#:G1403) (SPADLET #0# NIL) (RETURN (DO ((#1=#:G1404 |u| (CDR #1#)) (|x| NIL) (#2=#:G1405 |v| (CDR #2#)) (|y| NIL)) ((OR (ATOM #1#) (PROGN (SETQ |x| (CAR #1#)) NIL) (ATOM #2#) (PROGN (SETQ |y| (CAR #2#)) NIL)) (NREVERSE0 #0#)) (SEQ (EXIT (SETQ #0# (CONS (CONS |x| |y|) #0#))))))))))) 
 ;GETALIST(alist,prop) == CDR assoc(prop,alist)
 
 ;;;     ***       GETALIST REDEFINED
@@ -723,7 +896,6 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;     ***       |deleteLassoc| REDEFINED
 
 (DEFUN |deleteLassoc| (|x| |y|) (PROG (|ISTMP#1| |a| |y'|) (RETURN (COND ((AND (PAIRP |y|) (PROGN (SPADLET |ISTMP#1| (QCAR |y|)) (AND (PAIRP |ISTMP#1|) (PROGN (SPADLET |a| (QCAR |ISTMP#1|)) (QUOTE T)))) (PROGN (SPADLET |y'| (QCDR |y|)) (QUOTE T))) (COND ((EQ |x| |a|) |y'|) ((QUOTE T) (CONS (CAR |y|) (|deleteLassoc| |x| |y'|))))) ((QUOTE T) |y|))))) 
-;--% association list functions
 ;deleteAssoc(x,y) ==
 ;  y is [[a,:.],:y'] =>
 ;   a=x => deleteAssoc(x,y')
@@ -766,14 +938,13 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;     ***       |insertWOC| REDEFINED
 
 (DEFUN |insertWOC| (|x| |y|) (COND ((NULL |y|) (CONS |x| NIL)) ((QUOTE T) (|insertWOC,fn| |x| |y|) |y|))) 
-;--% Miscellaneous Functions for Working with Strings
 ;fillerSpaces(n,:charPart) ==
 ;  n <= 0 => '""
 ;  MAKE_-FULL_-CVEC(n,IFCAR charPart or '" ")
 
 ;;;     ***       |fillerSpaces| REDEFINED
 
-(DEFUN |fillerSpaces| (&REST #0=#:G2562 &AUX |charPart| |n|) (DSETQ (|n| . |charPart|) #0#) (COND ((<= |n| 0) (MAKESTRING "")) ((QUOTE T) (MAKE-FULL-CVEC |n| (OR (IFCAR |charPart|) (MAKESTRING " ")))))) 
+(DEFUN |fillerSpaces| (&REST #0=#:G1406 &AUX |charPart| |n|) (DSETQ (|n| . |charPart|) #0#) (COND ((<= |n| 0) (MAKESTRING "")) ((QUOTE T) (MAKE-FULL-CVEC |n| (OR (IFCAR |charPart|) (MAKESTRING " ")))))) 
 ;centerString(text,width,fillchar) ==
 ;  wid := entryWidth text
 ;  wid >= width => text
@@ -787,7 +958,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |centerString| REDEFINED
 
-(DEFUN |centerString| (|text| |width| |fillchar|) (PROG (|wid| |f| |fill2| |fill1|) (RETURN (SEQ (PROGN (SPADLET |wid| (|entryWidth| |text|)) (COND ((>= |wid| |width|) |text|) ((QUOTE T) (SPADLET |f| (DIVIDE (SPADDIFFERENCE |width| |wid|) 2)) (SPADLET |fill1| (QUOTE ||)) (DO ((#0=#:G2567 (ELT |f| 0)) (|i| 1 (QSADD1 |i|))) ((QSGREATERP |i| #0#) NIL) (SEQ (EXIT (SPADLET |fill1| (STRCONC |fillchar| |fill1|))))) (SPADLET |fill2| |fill1|) (COND ((NEQUAL (ELT |f| 1) 0) (SPADLET |fill1| (STRCONC |fillchar| |fill1|)))) (CONS |fill1| (CONS |text| (CONS |fill2| NIL)))))))))) 
+(DEFUN |centerString| (|text| |width| |fillchar|) (PROG (|wid| |f| |fill2| |fill1|) (RETURN (SEQ (PROGN (SPADLET |wid| (|entryWidth| |text|)) (COND ((>= |wid| |width|) |text|) ((QUOTE T) (SPADLET |f| (DIVIDE (SPADDIFFERENCE |width| |wid|) 2)) (SPADLET |fill1| (QUOTE ||)) (DO ((#0=#:G1407 (ELT |f| 0)) (|i| 1 (QSADD1 |i|))) ((QSGREATERP |i| #0#) NIL) (SEQ (EXIT (SPADLET |fill1| (STRCONC |fillchar| |fill1|))))) (SPADLET |fill2| |fill1|) (COND ((NEQUAL (ELT |f| 1) 0) (SPADLET |fill1| (STRCONC |fillchar| |fill1|)))) (CONS |fill1| (CONS |text| (CONS |fill2| NIL)))))))))) 
 ;stringPrefix?(pref,str) ==
 ;  -- sees if the first #pref letters of str are pref
 ;  -- replaces STRINGPREFIXP
@@ -836,7 +1007,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |concat| REDEFINED
 
-(DEFUN |concat| (&REST #0=#:G2621 &AUX |l|) (DSETQ |l| #0#) (|concatList| |l|)) 
+(DEFUN |concat| (&REST #0=#:G1408 &AUX |l|) (DSETQ |l| #0#) (|concatList| |l|)) 
 ;concatList [x,:y] ==
 ;  null y => x
 ;  null x => concatList y
@@ -844,7 +1015,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |concatList| REDEFINED
 
-(DEFUN |concatList| (#0=#:G2623) (PROG (|x| |y|) (RETURN (PROGN (SPADLET |x| (CAR #0#)) (SPADLET |y| (CDR #0#)) (COND ((NULL |y|) |x|) ((NULL |x|) (|concatList| |y|)) ((QUOTE T) (|concat1| |x| (|concatList| |y|)))))))) 
+(DEFUN |concatList| (#0=#:G1409) (PROG (|x| |y|) (RETURN (PROGN (SPADLET |x| (CAR #0#)) (SPADLET |y| (CDR #0#)) (COND ((NULL |y|) |x|) ((NULL |x|) (|concatList| |y|)) ((QUOTE T) (|concat1| |x| (|concatList| |y|)))))))) 
 ;concat1(x,y) ==
 ;  null x => y
 ;  atom x => (null y => x; atom y => [x,y]; [x,:y])
@@ -855,7 +1026,6 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;     ***       |concat1| REDEFINED
 
 (DEFUN |concat1| (|x| |y|) (COND ((NULL |x|) |y|) ((ATOM |x|) (COND ((NULL |y|) |x|) ((ATOM |y|) (CONS |x| (CONS |y| NIL))) ((QUOTE T) (CONS |x| |y|)))) ((NULL |y|) |x|) ((ATOM |y|) (APPEND |x| (CONS |y| NIL))) ((QUOTE T) (APPEND |x| |y|)))) 
-;--% BOOT ravel and reshape
 ;ravel a == a
 
 ;;;     ***       |ravel| REDEFINED
@@ -866,13 +1036,11 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;     ***       |reshape| REDEFINED
 
 (DEFUN |reshape| (|a| |b|) |a|) 
-;--% Some functions for algebra code
 ;boolODDP x == ODDP x
 
 ;;;     ***       |boolODDP| REDEFINED
 
 (DEFUN |boolODDP| (|x|) (ODDP |x|)) 
-;--% Miscellaneous
 ;freeOfSharpVars x ==
 ;  atom x => not isSharpVarWithNum x
 ;  freeOfSharpVars first x and freeOfSharpVars rest x
@@ -976,11 +1144,6 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;     ***       |update| REDEFINED
 
 (DEFUN |update| NIL (PROGN (OBEY (STRCONC (MAKESTRING "SPADEDIT ") (STRINGIMAGE /VERSION) (MAKESTRING " ") (STRINGIMAGE /WSNAME) (MAKESTRING " A"))) (/UPDATE))) 
-;--% Inplace Merge Sort for Lists
-;-- MBM April/88
-;-- listSort(pred,list) or listSort(pred,list,key)
-;-- the pred function is a boolean valued function defining the ordering
-;-- the key function extracts the key from an item for comparison by pred
 ;listSort(pred,list,:optional) ==
 ;   NOT functionp pred => error "listSort: first arg must be a function"
 ;   NOT LISTP list => error "listSort: second argument must be a list"
@@ -991,29 +1154,23 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |listSort| REDEFINED
 
-(DEFUN |listSort| (&REST #0=#:G2710 &AUX |optional| LIST |pred|) (DSETQ (|pred| LIST . |optional|) #0#) (PROG (|key|) (RETURN (COND ((NULL (|functionp| |pred|)) (|error| (QUOTE |listSort: first arg must be a function|))) ((NULL (LISTP LIST)) (|error| (QUOTE |listSort: second argument must be a list|))) ((NULL |optional|) (|mergeSort| |pred| (|function| |Identity|) LIST (LENGTH LIST))) ((QUOTE T) (SPADLET |key| (CAR |optional|)) (COND ((NULL (|functionp| |key|)) (|error| (QUOTE |listSort: last arg must be a function|))) ((QUOTE T) (|mergeSort| |pred| |key| LIST (LENGTH LIST))))))))) 
-;-- non-destructive merge sort using NOT GGREATERP as predicate
+(DEFUN |listSort| (&REST #0=#:G1410 &AUX |optional| LIST |pred|) (DSETQ (|pred| LIST . |optional|) #0#) (PROG (|key|) (RETURN (COND ((NULL (|functionp| |pred|)) (|error| (QUOTE |listSort: first arg must be a function|))) ((NULL (LISTP LIST)) (|error| (QUOTE |listSort: second argument must be a list|))) ((NULL |optional|) (|mergeSort| |pred| (|function| |Identity|) LIST (LENGTH LIST))) ((QUOTE T) (SPADLET |key| (CAR |optional|)) (COND ((NULL (|functionp| |key|)) (|error| (QUOTE |listSort: last arg must be a function|))) ((QUOTE T) (|mergeSort| |pred| |key| LIST (LENGTH LIST))))))))) 
 ;MSORT list == listSort(function GLESSEQP, COPY_-LIST list)
 
 ;;;     ***       MSORT REDEFINED
 
 (DEFUN MSORT (LIST) (|listSort| (|function| GLESSEQP) (COPY-LIST LIST))) 
-;-- destructive merge sort using NOT GGREATERP as predicate
 ;NMSORT list == listSort(function GLESSEQP, list)
 
 ;;;     ***       NMSORT REDEFINED
 
 (DEFUN NMSORT (LIST) (|listSort| (|function| GLESSEQP) LIST)) 
-;-- non-destructive merge sort using ?ORDER as predicate
 ;orderList l == listSort(function _?ORDER, COPY_-LIST l)
 
 ;;;     ***       |orderList| REDEFINED
 
 (DEFUN |orderList| (|l|) (|listSort| (|function| ?ORDER) (COPY-LIST |l|))) 
-;-- dummy defn until clean-up
-;-- order     l == orderList l
 ;mergeInPlace(f,g,p,q) ==
-;   -- merge the two sorted lists p and q
 ;   if NULL p then return p
 ;   if NULL q then return q
 ;   if FUNCALL(f,FUNCALL(g, QCAR p),FUNCALL(g, QCAR q))
@@ -1048,8 +1205,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |mergeSort| REDEFINED
 
-(DEFUN |mergeSort| (|f| |g| |p| |n|) (PROG (|l| |t| |q|) (RETURN (SEQ (PROGN (COND ((AND (EQ |n| 2) (FUNCALL |f| (FUNCALL |g| (QCADR |p|)) (FUNCALL |g| (QCAR |p|)))) (SPADLET |t| |p|) (SPADLET |p| (QCDR |p|)) (QRPLACD |p| |t|) (QRPLACD |t| NIL))) (COND ((QSLESSP |n| 3) (RETURN |p|))) (SPADLET |l| (QSQUOTIENT |n| 2)) (SPADLET |t| |p|) (DO ((#0=#:G2749 (SPADDIFFERENCE |l| 1)) (|i| 1 (QSADD1 |i|))) ((QSGREATERP |i| #0#) NIL) (SEQ (EXIT (SPADLET |t| (QCDR |t|))))) (SPADLET |q| (CDR |t|)) (QRPLACD |t| NIL) (SPADLET |p| (|mergeSort| |f| |g| |p| |l|)) (SPADLET |q| (|mergeSort| |f| |g| |q| (QSDIFFERENCE |n| |l|))) (|mergeInPlace| |f| |g| |p| |q|)))))) 
-;--% Throwing with glorious highlighting (maybe)
+(DEFUN |mergeSort| (|f| |g| |p| |n|) (PROG (|l| |t| |q|) (RETURN (SEQ (PROGN (COND ((AND (EQ |n| 2) (FUNCALL |f| (FUNCALL |g| (QCADR |p|)) (FUNCALL |g| (QCAR |p|)))) (SPADLET |t| |p|) (SPADLET |p| (QCDR |p|)) (QRPLACD |p| |t|) (QRPLACD |t| NIL))) (COND ((QSLESSP |n| 3) (RETURN |p|))) (SPADLET |l| (QSQUOTIENT |n| 2)) (SPADLET |t| |p|) (DO ((#0=#:G1411 (SPADDIFFERENCE |l| 1)) (|i| 1 (QSADD1 |i|))) ((QSGREATERP |i| #0#) NIL) (SEQ (EXIT (SPADLET |t| (QCDR |t|))))) (SPADLET |q| (CDR |t|)) (QRPLACD |t| NIL) (SPADLET |p| (|mergeSort| |f| |g| |p| |l|)) (SPADLET |q| (|mergeSort| |f| |g| |q| (QSDIFFERENCE |n| |l|))) (|mergeInPlace| |f| |g| |p| |q|)))))) 
 ;spadThrow() ==
 ;  if $interpOnly and $mapName then
 ;    putHist($mapName,'localModemap, nil, $e)
@@ -1065,7 +1221,6 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;     ***       |spadThrowBrightly| REDEFINED
 
 (DEFUN |spadThrowBrightly| (|x|) (PROGN (|sayBrightly| |x|) (|spadThrow|))) 
-;--% Type Formatting Without Abbreviation
 ;formatUnabbreviatedSig sig ==
 ;  null sig => ["() -> ()"]
 ;  [target,:args] := sig
@@ -1128,12 +1283,11 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |sublisNQ,fn| REDEFINED
 
-(DEFUN |sublisNQ,fn| (|al| |e|) (PROG (|a| |u| |v|) (RETURN (SEQ (IF (ATOM |e|) (EXIT (SEQ (DO ((#0=#:G2847 |al| (CDR #0#)) (|x| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |x| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (IF (EQ (CAR |x|) |e|) (EXIT (RETURN (SPADLET |e| (CDR |x|)))))))) (EXIT |e|)))) (IF (EQ (SPADLET |a| (CAR |e|)) (QUOTE QUOTE)) (EXIT |e|)) (SPADLET |u| (|sublisNQ,fn| |al| |a|)) (SPADLET |v| (|sublisNQ,fn| |al| (CDR |e|))) (IF (AND (EQ |a| |u|) (EQ (CDR |e|) |v|)) (EXIT |e|)) (EXIT (CONS |u| |v|)))))) 
+(DEFUN |sublisNQ,fn| (|al| |e|) (PROG (|a| |u| |v|) (RETURN (SEQ (IF (ATOM |e|) (EXIT (SEQ (DO ((#0=#:G1412 |al| (CDR #0#)) (|x| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |x| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (IF (EQ (CAR |x|) |e|) (EXIT (RETURN (SPADLET |e| (CDR |x|)))))))) (EXIT |e|)))) (IF (EQ (SPADLET |a| (CAR |e|)) (QUOTE QUOTE)) (EXIT |e|)) (SPADLET |u| (|sublisNQ,fn| |al| |a|)) (SPADLET |v| (|sublisNQ,fn| |al| (CDR |e|))) (IF (AND (EQ |a| |u|) (EQ (CDR |e|) |v|)) (EXIT |e|)) (EXIT (CONS |u| |v|)))))) 
 
 ;;;     ***       |sublisNQ| REDEFINED
 
 (DEFUN |sublisNQ| (|al| |e|) (COND ((ATOM |al|) |e|) ((QUOTE T) (|sublisNQ,fn| |al| |e|)))) 
-;-- function for turning strings in tex format
 ;str2Outform s ==
 ;  parse := ncParseFromString s or systemError '"String for TeX will not parse"
 ;  parse2Outform parse
@@ -1151,7 +1305,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |parse2Outform| REDEFINED
 
-(DEFUN |parse2Outform| (|x|) (PROG (|op| |argl| |nargl| |ISTMP#1| BRACKET |r|) (RETURN (SEQ (COND ((AND (PAIRP |x|) (PROGN (SPADLET |op| (QCAR |x|)) (SPADLET |argl| (QCDR |x|)) (QUOTE T))) (SPADLET |nargl| (PROG (#0=#:G2887) (SPADLET #0# NIL) (RETURN (DO ((#1=#:G2892 |argl| (CDR #1#)) (|y| NIL)) ((OR (ATOM #1#) (PROGN (SETQ |y| (CAR #1#)) NIL)) (NREVERSE0 #0#)) (SEQ (EXIT (SETQ #0# (CONS (|parse2Outform| |y|) #0#)))))))) (COND ((BOOT-EQUAL |op| (QUOTE |construct|)) (CONS (QUOTE BRACKET) (CONS (CONS (QUOTE ARGLST) (PROG (#2=#:G2902) (SPADLET #2# NIL) (RETURN (DO ((#3=#:G2907 |argl| (CDR #3#)) (|y| NIL)) ((OR (ATOM #3#) (PROGN (SETQ |y| (CAR #3#)) NIL)) (NREVERSE0 #2#)) (SEQ (EXIT (SETQ #2# (CONS (|parse2Outform| |y|) #2#)))))))) NIL))) ((AND (BOOT-EQUAL |op| (QUOTE |brace|)) (PAIRP |nargl|) (EQ (QCDR |nargl|) NIL) (PROGN (SPADLET |ISTMP#1| (QCAR |nargl|)) (AND (PAIRP |ISTMP#1|) (PROGN (SPADLET BRACKET (QCAR |ISTMP#1|)) (SPADLET |r| (QCDR |ISTMP#1|)) (QUOTE T))))) (CONS (QUOT!
E BRACE) |r|)) ((QUOTE T) (CONS |op| |nargl|)))) ((QUOTE T) |x|)))))) 
+(DEFUN |parse2Outform| (|x|) (PROG (|op| |argl| |nargl| |ISTMP#1| BRACKET |r|) (RETURN (SEQ (COND ((AND (PAIRP |x|) (PROGN (SPADLET |op| (QCAR |x|)) (SPADLET |argl| (QCDR |x|)) (QUOTE T))) (SPADLET |nargl| (PROG (#0=#:G1413) (SPADLET #0# NIL) (RETURN (DO ((#1=#:G1414 |argl| (CDR #1#)) (|y| NIL)) ((OR (ATOM #1#) (PROGN (SETQ |y| (CAR #1#)) NIL)) (NREVERSE0 #0#)) (SEQ (EXIT (SETQ #0# (CONS (|parse2Outform| |y|) #0#)))))))) (COND ((BOOT-EQUAL |op| (QUOTE |construct|)) (CONS (QUOTE BRACKET) (CONS (CONS (QUOTE ARGLST) (PROG (#2=#:G1415) (SPADLET #2# NIL) (RETURN (DO ((#3=#:G1416 |argl| (CDR #3#)) (|y| NIL)) ((OR (ATOM #3#) (PROGN (SETQ |y| (CAR #3#)) NIL)) (NREVERSE0 #2#)) (SEQ (EXIT (SETQ #2# (CONS (|parse2Outform| |y|) #2#)))))))) NIL))) ((AND (BOOT-EQUAL |op| (QUOTE |brace|)) (PAIRP |nargl|) (EQ (QCDR |nargl|) NIL) (PROGN (SPADLET |ISTMP#1| (QCAR |nargl|)) (AND (PAIRP |ISTMP#1|) (PROGN (SPADLET BRACKET (QCAR |ISTMP#1|)) (SPADLET |r| (QCDR |ISTMP#1|)) (QUOTE T))))) (CONS (QUOT!
E BRACE) |r|)) ((QUOTE T) (CONS |op| |nargl|)))) ((QUOTE T) |x|)))))) 
 ;str2Tex s ==
 ;  outf := str2Outform s
 ;  val := coerceInt(mkObj(wrap outf, '(OutputForm)), '(TexFormat))
@@ -1194,7 +1348,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |searchCurrentEnv| REDEFINED
 
-(DEFUN |searchCurrentEnv| (|x| |currentEnv|) (PROG (|u| |signal|) (RETURN (SEQ (PROGN (DO ((#0=#:G2958 |currentEnv| (CDR #0#)) (|contour| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |contour| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (COND ((SPADLET |u| (ASSQ |x| |contour|)) (RETURN (SPADLET |signal| |u|))) ((QUOTE T) NIL))))) (KDR |signal|)))))) 
+(DEFUN |searchCurrentEnv| (|x| |currentEnv|) (PROG (|u| |signal|) (RETURN (SEQ (PROGN (DO ((#0=#:G1417 |currentEnv| (CDR #0#)) (|contour| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |contour| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (COND ((SPADLET |u| (ASSQ |x| |contour|)) (RETURN (SPADLET |signal| |u|))) ((QUOTE T) NIL))))) (KDR |signal|)))))) 
 ;searchTailEnv(x,e) ==
 ;  for env in e repeat
 ;    signal:=
@@ -1205,7 +1359,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |searchTailEnv| REDEFINED
 
-(DEFUN |searchTailEnv| (|x| |e|) (PROG (|u| |signal|) (RETURN (SEQ (PROGN (DO ((#0=#:G2976 |e| (CDR #0#)) (|env| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |env| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (SPADLET |signal| (PROGN (DO ((#1=#:G2985 |env| (CDR #1#)) (|contour| NIL)) ((OR (ATOM #1#) (PROGN (SETQ |contour| (CAR #1#)) NIL)) NIL) (SEQ (EXIT (COND ((AND (SPADLET |u| (ASSQ |x| |contour|)) (ASSQ (QUOTE FLUID) |u|)) (RETURN (SPADLET |signal| |u|))) ((QUOTE T) NIL))))) (COND (|signal| (RETURN |signal|)) ((QUOTE T) NIL))))))) (KDR |signal|)))))) 
+(DEFUN |searchTailEnv| (|x| |e|) (PROG (|u| |signal|) (RETURN (SEQ (PROGN (DO ((#0=#:G1418 |e| (CDR #0#)) (|env| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |env| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (SPADLET |signal| (PROGN (DO ((#1=#:G1419 |env| (CDR #1#)) (|contour| NIL)) ((OR (ATOM #1#) (PROGN (SETQ |contour| (CAR #1#)) NIL)) NIL) (SEQ (EXIT (COND ((AND (SPADLET |u| (ASSQ |x| |contour|)) (ASSQ (QUOTE FLUID) |u|)) (RETURN (SPADLET |signal| |u|))) ((QUOTE T) NIL))))) (COND (|signal| (RETURN |signal|)) ((QUOTE T) NIL))))))) (KDR |signal|)))))) 
 ;augProplist(proplist,prop,val) ==
 ;  $InteractiveMode => augProplistInteractive(proplist,prop,val)
 ;  while (proplist is [[ =prop,:.],:proplist']) repeat proplist:= proplist'
@@ -1235,8 +1389,14 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;     ***       |semchkProplist| REDEFINED
 
 (DEFUN |semchkProplist| (|x| |proplist| |prop| |val|) (SEQ (COND ((BOOT-EQUAL |prop| (QUOTE |isLiteral|)) (COND ((OR (LASSOC (QUOTE |value|) |proplist|) (LASSOC (QUOTE |mode|) |proplist|)) (EXIT (|warnLiteral| |x|))))) ((MEMQ |prop| (QUOTE (|mode| |value|))) (COND ((LASSOC (QUOTE |isLiteral|) |proplist|) (EXIT (|warnLiteral| |x|)))))))) 
+;DEFPARAMETER($envHashTable,nil)
+
+(DEFPARAMETER |$envHashTable| NIL) 
 ;addBinding(var,proplist,e is [[curContour,:tailContour],:tailEnv]) ==
 ;  EQ(proplist,getProplist(var,e)) => e
+;  if $envHashTable then
+;   for u in proplist repeat
+;    HPUT($envHashTable,[var, CAR u],true)
 ;  $InteractiveMode => addBindingInteractive(var,proplist,e)
 ;  if curContour is [[ =var,:.],:.] then curContour:= rest curContour
 ;                 --Previous line should save some space
@@ -1244,7 +1404,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |addBinding| REDEFINED
 
-(DEFUN |addBinding| (|var| |proplist| |e|) (PROG (|tailContour| |tailEnv| |ISTMP#1| |curContour| |lx|) (RETURN (PROGN (SPADLET |curContour| (CAAR |e|)) (SPADLET |tailContour| (CDAR |e|)) (SPADLET |tailEnv| (CDR |e|)) (COND ((EQ |proplist| (|getProplist| |var| |e|)) |e|) (|$InteractiveMode| (|addBindingInteractive| |var| |proplist| |e|)) ((QUOTE T) (COND ((AND (PAIRP |curContour|) (PROGN (SPADLET |ISTMP#1| (QCAR |curContour|)) (AND (PAIRP |ISTMP#1|) (EQUAL (QCAR |ISTMP#1|) |var|)))) (SPADLET |curContour| (CDR |curContour|)))) (SPADLET |lx| (CONS |var| |proplist|)) (CONS (CONS (CONS |lx| |curContour|) |tailContour|) |tailEnv|))))))) 
+(DEFUN |addBinding| (|var| |proplist| |e|) (PROG (|tailContour| |tailEnv| |ISTMP#1| |curContour| |lx|) (RETURN (SEQ (PROGN (SPADLET |curContour| (CAAR |e|)) (SPADLET |tailContour| (CDAR |e|)) (SPADLET |tailEnv| (CDR |e|)) (COND ((EQ |proplist| (|getProplist| |var| |e|)) |e|) ((QUOTE T) (COND (|$envHashTable| (DO ((#0=#:G1420 |proplist| (CDR #0#)) (|u| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |u| (CAR #0#)) NIL)) NIL) (SEQ (EXIT (HPUT |$envHashTable| (CONS |var| (CONS (CAR |u|) NIL)) (QUOTE T))))))) (COND (|$InteractiveMode| (|addBindingInteractive| |var| |proplist| |e|)) ((QUOTE T) (COND ((AND (PAIRP |curContour|) (PROGN (SPADLET |ISTMP#1| (QCAR |curContour|)) (AND (PAIRP |ISTMP#1|) (EQUAL (QCAR |ISTMP#1|) |var|)))) (SPADLET |curContour| (CDR |curContour|)))) (SPADLET |lx| (CONS |var| |proplist|)) (CONS (CONS (CONS |lx| |curContour|) |tailContour|) |tailEnv|)))))))))) 
 ;position(x,l) ==
 ;  posn(x,l,0) where
 ;    posn(x,l,n) ==
@@ -1273,7 +1433,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |after| REDEFINED
 
-(DEFUN |after| (|u| |v|) (PROG (|r|) (RETURN (SEQ (PROGN (SPADLET |r| |u|) (DO ((#0=#:G3068 |u| (CDR #0#)) (|x| NIL) (#1=#:G3069 |v| (CDR #1#)) (|y| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |x| (CAR #0#)) NIL) (ATOM #1#) (PROGN (SETQ |y| (CAR #1#)) NIL)) NIL) (SEQ (EXIT (SPADLET |r| (CDR |r|))))) |r|))))) 
+(DEFUN |after| (|u| |v|) (PROG (|r|) (RETURN (SEQ (PROGN (SPADLET |r| |u|) (DO ((#0=#:G1421 |u| (CDR #0#)) (|x| NIL) (#1=#:G1422 |v| (CDR #1#)) (|y| NIL)) ((OR (ATOM #0#) (PROGN (SETQ |x| (CAR #0#)) NIL) (ATOM #1#) (PROGN (SETQ |y| (CAR #1#)) NIL)) NIL) (SEQ (EXIT (SPADLET |r| (CDR |r|))))) |r|))))) 
 ;$blank := char ('_ )
 
 (SPADLET |$blank| (|char| (QUOTE | |))) 
@@ -1304,7 +1464,7 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 ;;;     ***       |rightTrim| REDEFINED
 
-(DEFUN |rightTrim| (|s|) (PROG (|k| |j|) (RETURN (SEQ (PROGN (SPADLET |k| (MAXINDEX |s|)) (COND ((MINUSP |k|) |s|) ((BOOT-EQUAL (ELT |s| |k|) |$blank|) (DO ((#0=#:G3107 (SPADDIFFERENCE 1)) (|i| |k| (+ |i| #0#))) ((OR (IF (MINUSP #0#) (< |i| 0) (> |i| 0)) (NULL (BOOT-EQUAL (ELT |s| |i|) |$blank|))) NIL) (SEQ (EXIT (SPADLET |j| |i|)))) (SUBSTRING |s| 0 |j|)) ((QUOTE T) |s|))))))) 
+(DEFUN |rightTrim| (|s|) (PROG (|k| |j|) (RETURN (SEQ (PROGN (SPADLET |k| (MAXINDEX |s|)) (COND ((MINUSP |k|) |s|) ((BOOT-EQUAL (ELT |s| |k|) |$blank|) (DO ((#0=#:G1423 (SPADDIFFERENCE 1)) (|i| |k| (+ |i| #0#))) ((OR (IF (MINUSP #0#) (< |i| 0) (> |i| 0)) (NULL (BOOT-EQUAL (ELT |s| |i|) |$blank|))) NIL) (SEQ (EXIT (SPADLET |j| |i|)))) (SUBSTRING |s| 0 |j|)) ((QUOTE T) |s|))))))) 
 ;pp x ==
 ;  PRETTYPRINT x
 ;  x
@@ -1347,12 +1507,12 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 
 (DEFUN |intern| (|x|) (COND ((STRINGP |x|) (COND ((DIGITP (ELT |x| 0)) (|string2Integer| |x|)) ((QUOTE T) (INTERN |x|)))) ((QUOTE T) |x|))) 
 ;isDomain a ==
-;  REFVECP a and #a>5 and GETDATABASE(a.0,'CONSTRUCTORKIND) = 'domain
+;  PAIRP a and VECP(CAR a) and
+;    MEMBER(CAR(a).0, $domainTypeTokens)
 
 ;;;     ***       |isDomain| REDEFINED
 
-(DEFUN |isDomain| (|a|) (AND (REFVECP |a|) (> (|#| |a|) 5) (BOOT-EQUAL (GETDATABASE (ELT |a| 0) (QUOTE CONSTRUCTORKIND)) (QUOTE |domain|)))) 
-;-- variables used by browser
+(DEFUN |isDomain| (|a|) (AND (PAIRP |a|) (VECP (CAR |a|)) (|member| (ELT (CAR |a|) 0) |$domainTypeTokens|))) 
 ;$htHash      := MAKE_-HASH_-TABLE()
 
 (SPADLET |$htHash| (MAKE-HASH-TABLE)) 
@@ -1501,6 +1661,40 @@ isDefaultPackageName x == (s := PNAME x).(MAXINDEX s) = char '_&
 ;;;Boot translation finished for g-util.boot
 
 @
+\section{License}
+<<license>>=
+-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+-- All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions are
+-- met:
+--
+--     - Redistributions of source code must retain the above copyright
+--       notice, this list of conditions and the following disclaimer.
+--
+--     - Redistributions in binary form must reproduce the above copyright
+--       notice, this list of conditions and the following disclaimer in
+--       the documentation and/or other materials provided with the
+--       distribution.
+--
+--     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+--       names of its contributors may be used to endorse or promote products
+--       derived from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+-- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+-- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+@
 \eject
 \begin{thebibliography}{99}
 \bibitem{1} nothing
diff --git a/src/interp/i-intern.boot.pamphlet b/src/interp/i-intern.boot.pamphlet
index 144aa0e..7520954 100644
--- a/src/interp/i-intern.boot.pamphlet
+++ b/src/interp/i-intern.boot.pamphlet
@@ -9,9 +9,7 @@
 \eject
 \tableofcontents
 \eject
-\begin{verbatim}
-Internal Interpreter Facilities
-
+\section{Internal Interpreter Facilities}
 Vectorized Attributed Trees
 
 The interpreter translates parse forms into vats for analysis.
@@ -19,82 +17,65 @@ These contain a number of slots in each node for information.
 The leaves are now all vectors, though the leaves for basic types
 such as integers and strings used to just be the objects themselves.
 The vectors for the leaves with such constants now have the value
-of $immediateDataSymbol as their name. Their are undoubtably still
+of \verb|$immediateDataSymbol| as their name. Their are undoubtably still
 some functions that still check whether a leaf is a constant. Note
 that if it is not a vector it is a subtree.
 
 attributed tree nodes have the following form:
-slot         description
-----         -----------------------------------------------------
- 0           operation name or literal
- 1           declared mode of variable
- 2           computed value of subtree from this node
- 3           modeset: list of single computed mode of subtree
- 4           prop list for extra things
-
-\end{verbatim}
-\section{License}
-<<license>>=
--- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--- All rights reserved.
---
--- Redistribution and use in source and binary forms, with or without
--- modification, are permitted provided that the following conditions are
--- met:
---
---     - Redistributions of source code must retain the above copyright
---       notice, this list of conditions and the following disclaimer.
---
---     - Redistributions in binary form must reproduce the above copyright
---       notice, this list of conditions and the following disclaimer in
---       the documentation and/or other materials provided with the
---       distribution.
---
---     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---       names of its contributors may be used to endorse or promote products
---       derived from this software without specific prior written permission.
---
--- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
-@
+\begin{tabular}{cl}
+slot & description\\
+---- & ------------------------- \\
+ 0   & operation name or literal\\
+ 1   & declared mode of variable\\
+ 2   & computed value of subtree from this node\\
+ 3   & modeset: list of single computed mode of subtree\\
+ 4   & prop list for extra things\\
+\end{tabular}
 <<*>>=
-<<license>>
 
 SETANDFILEQ($useParserSrcPos, NIL)
 SETANDFILEQ($transferParserSrcPos, NIL)
 
---  Making Trees
-
+@
+\section{Making trees}
+\subsection{mkAtreeNode}
+<<*>>=
 mkAtreeNode x ==
   -- maker of attrib tree node
   v := MAKE_-VEC 5
   v.0 := x
   v
 
+@
+\subsection{mkAtree}
+Maker of attrib tree from parser form
+<<*>>=
 mkAtree x ==
-  -- maker of attrib tree from parser form
   mkAtree1 mkAtreeExpandMacros x
 
+@
+\subsection{mkAtreeWithSrcPos}
+<<*>>=
 mkAtreeWithSrcPos(form, posnForm) ==
     posnForm and $useParserSrcPos => pf2Atree(posnForm)
     transferSrcPosInfo(posnForm, mkAtree form)
 
+@
+\subsection{mkAtree1WithSrcPos}
+<<*>>=
 mkAtree1WithSrcPos(form, posnForm) ==
   transferSrcPosInfo(posnForm, mkAtree1 form)
 
+@
+\subsection{mkAtreeNodeWithSrcPos}
+<<*>>=
 mkAtreeNodeWithSrcPos(form, posnForm) ==
   transferSrcPosInfo(posnForm, mkAtreeNode form)
 
+@
+\subsection{transferSrcPosInfo}
+<<*>>=
 transferSrcPosInfo(pf, atree) ==
     not (pf and $transferParserSrcPos) => atree
     pos := pfPosOrNopos(pf)
@@ -108,9 +89,12 @@ transferSrcPosInfo(pf, atree) ==
     putSrcPos(atree, fn, pfSourceText(pf), pfLinePosn(pos), pfCharPosn(pos))
     atree
 
+@
+\subsection{mkAtreeExpandMacros}
+Handle macro expansion. if the macros have args we require that
+we match the correct number of args
+<<*>>=
 mkAtreeExpandMacros x ==
-  -- handle macro expansion. if the macros have args we require that
-  -- we match the correct number of args
   if x isnt ['MDEF,:.] and x isnt ['DEF,['macro,:.],:.] then
     atom x and (m := isInterpMacro x) =>
       [args,:body] := m
@@ -134,6 +118,9 @@ mkAtreeExpandMacros x ==
       x := [mkAtreeExpandMacros op,:argl]
   x
 
+@
+\subsection{mkAtree1}
+<<*>>=
 mkAtree1 x ==
   -- first special handler for making attrib tree
   null x => throwKeyedMsg("S2IP0005",['"NIL"])
@@ -156,8 +143,10 @@ mkAtree1 x ==
   x is [op,:argl] => mkAtree2(x,op,argl)
   systemErrorHere '"mkAtree1"
 
--- mkAtree2 and mkAtree3 were created because mkAtree1 got so big
-
+@
+\subsection{mkAtree2}
+mkAtree2 and mkAtree3 were created because mkAtree1 got so big
+<<*>>=
 mkAtree2(x,op,argl) ==
   nargl := #argl
   (op= '_-) and (nargl = 1) and (INTEGERP CAR argl) =>
@@ -227,6 +216,10 @@ mkAtree2(x,op,argl) ==
       '"not qualifying an operator"])
   mkAtree3(x,op,argl)
 
+@
+\subsection{mkAtree3}
+mkAtree2 and mkAtree3 were created because mkAtree1 got so big
+<<*>>=
 mkAtree3(x,op,argl) ==
   op='REDUCE and argl is [op1,axis,body] =>
     [mkAtreeNode op,axis,mkAtree1 op1,mkAtree1 body]
@@ -314,12 +307,17 @@ mkAtree3(x,op,argl) ==
     mkAtree1 op
   [z,:[mkAtree1 y for y in argl]]
 
+@
+\subsection{collectDefTypesAndPreds}
+Given an arglist to a DEF-like form, this function returns
+a vector of three things:
+\begin{itemize}
+\item slot 0: just the variables
+\item slot 1: the type declarations on the variables
+\item slot 2: a predicate for all arguments
+\end{itemize}
+<<*>>=
 collectDefTypesAndPreds args ==
-  -- given an arglist to a DEF-like form, this function returns
-  -- a vector of three things:
-  --   slot 0: just the variables
-  --   slot 1: the type declarations on the variables
-  --   slot 2: a predicate for all arguments
   pred := types := vars := NIL
   junk :=
     IDENTP args =>
@@ -357,11 +355,17 @@ collectDefTypesAndPreds args ==
     vars  := [args]
   VECTOR(vars,types,pred)
 
+@
+\subsection{mkAtreeValueOf}
+<<*>>=
 mkAtreeValueOf l ==
   -- scans for ['valueOf,atom]
   not CONTAINED('valueOf,l) => l
   mkAtreeValueOf1 l
 
+@
+\subsection{mkAtreeValueOf1}
+<<*>>=
 mkAtreeValueOf1 l ==
   null l or atom l or null rest l => l
   l is ['valueOf,u] and IDENTP u =>
@@ -371,10 +375,16 @@ mkAtreeValueOf1 l ==
     v
   [mkAtreeValueOf1 x for x in l]
 
+@
+\subsection{mkLessOrEqual}
+<<*>>=
 mkLessOrEqual(lhs,rhs) == ['not,['_<,rhs,lhs]]
 
+@
+\subsection{emptyAtree}
+Remove mode, value, and misc. info from attrib tree
+<<*>>=
 emptyAtree expr ==
-  -- remove mode, value, and misc. info from attrib tree
   VECP expr =>
     $immediateDataSymbol = expr.0 => nil
     expr.1:= NIL
@@ -384,8 +394,11 @@ emptyAtree expr ==
   atom expr => nil
   for e in expr repeat emptyAtree e
 
+@
+\subsection{unVectorize}
+Transforms from an atree back into a tree
+<<*>>=
 unVectorize body ==
-  -- transforms from an atree back into a tree
   VECP body =>
     name := getUnname body
     name ^= $immediateDataSymbol => name
@@ -399,9 +412,10 @@ unVectorize body ==
     [newOp,:unVectorize argl]
   systemErrorHere '"unVectorize"
 
-
---  Stuffing and Getting Info
-
+@
+\section{Stuffing and Getting Info}
+\subsection{putAtree}
+<<*>>=
 putAtree(x,prop,val) ==
   x is [op,:.] =>
     -- only willing to add property if op is a vector
@@ -414,6 +428,9 @@ putAtree(x,prop,val) ==
   x.4 := insertShortAlist(prop,val,x.4)
   x
 
+@
+\subsection{getAtree}
+<<*>>=
 getAtree(x,prop) ==
   x is [op,:.] =>
     -- only willing to get property if op is a vector
@@ -425,19 +442,31 @@ getAtree(x,prop) ==
     => x.n
   QLASSQ(prop,x.4)
 
+@
+\subsection{putTarget}
+<<*>>=
 putTarget(x, targ) ==
   -- want to put nil modes perhaps to clear old target
   if targ = $EmptyMode then targ := nil
   putAtree(x,'target,targ)
 
+@
+\subsection{getTarget}
+<<*>>=
 getTarget(x) == getAtree(x,'target)
 
+@
+\subsection{insertShortAlist}
+<<*>>=
 insertShortAlist(prop,val,al) ==
   pair := QASSQ(prop,al) =>
     RPLACD(pair,val)
     al
   [[prop,:val],:al]
 
+@
+\subsection{transferPropsToNode}
+<<*>>=
 transferPropsToNode(x,t) ==
   propList := getProplist(x,$env)
   QLASSQ('Led,propList) or QLASSQ('Nud,propList) => nil
@@ -456,19 +485,32 @@ transferPropsToNode(x,t) ==
     putMode(t,am)
   t
 
-isLeaf x == atom x     --may be a number or a vector
+@
+\subsection{isLeaf}
+May be a number or a vector
+<<*>>=
+isLeaf x == atom x
 
+@
+\subsection{getMode}
+<<*>>=
 getMode x ==
   x is [op,:.] => getMode op
   VECP x => x.1
   m := getBasicMode x => m
   keyedSystemError("S2II0001",[x])
 
+@
+\subsection{putMode}
+<<*>>=
 putMode(x,y) ==
   x is [op,:.] => putMode(op,y)
   null VECP x => keyedSystemError("S2II0001",[x])
   x.1 := y
 
+@
+\subsection{getValue}
+<<*>>=
 getValue x ==
   VECP x => x.2
   atom x =>
@@ -476,40 +518,64 @@ getValue x ==
     keyedSystemError("S2II0001",[x])
   getValue first x
 
+@
+\subsection{putValue}
+<<*>>=
 putValue(x,y) ==
   x is [op,:.] => putValue(op,y)
   null VECP x => keyedSystemError("S2II0001",[x])
   x.2 := y
 
+@
+\subsection{putValueValue}
+<<*>>=
 putValueValue(vec,val) ==
   putValue(vec,val)
   vec
 
+@
+\subsection{getUnnameIfCan}
+<<*>>=
 getUnnameIfCan x ==
   VECP x => x.0
   x is [op,:.] => getUnnameIfCan op
   atom x => x
   nil
 
+@
+\subsection{getUnname}
+<<*>>=
 getUnname x ==
   x is [op,:.] => getUnname op
   getUnname1 x
 
+@
+\subsection{getUnname1}
+<<*>>=
 getUnname1 x ==
   VECP x => x.0
   null atom x => keyedSystemError("S2II0001",[x])
   x
 
+@
+\subsection{computedMode}
+<<*>>=
 computedMode t ==
   getModeSet t is [m] => m
   keyedSystemError("S2GE0016",['"computedMode",'"non-singleton modeset"])
 
+@
+\subsection{putModeSet}
+<<*>>=
 putModeSet(x,y) ==
   x is [op,:.] => putModeSet(op,y)
   not VECP x => keyedSystemError("S2II0001",[x])
   x.3 := y
   y
 
+@
+\subsection{getModeOrFirstModeSetIfThere}
+<<*>>=
 getModeOrFirstModeSetIfThere x ==
   x is [op,:.] => getModeOrFirstModeSetIfThere op
   VECP x =>
@@ -522,6 +588,9 @@ getModeOrFirstModeSetIfThere x ==
   m := getBasicMode x => m
   NIL
 
+@
+\subsection{getModeSet}
+<<*>>=
 getModeSet x ==
   x and PAIRP x => getModeSet first x
   VECP x =>
@@ -535,6 +604,9 @@ getModeSet x ==
   keyedSystemError("S2GE0016",['"getModeSet",
     '"not an attributed tree"])
 
+@
+\subsection{getModeSetUseSubdomain}
+<<*>>=
 getModeSetUseSubdomain x ==
   x and PAIRP x => getModeSetUseSubdomain first x
   VECP(x) =>
@@ -562,8 +634,14 @@ getModeSetUseSubdomain x ==
   keyedSystemError("S2GE0016",
     ['"getModeSetUseSubomain",'"not an attributed tree"])
 
+@
+\subsection{atree2EvaluatedTree}
+<<*>>=
 atree2EvaluatedTree x == atree2Tree1(x,true)
 
+@
+\subsection{atree2Tree1}
+<<*>>=
 atree2Tree1(x,evalIfTrue) ==
   (triple := getValue x) and objMode(triple) ^= $EmptyMode =>
     coerceOrCroak(triple,$OutputForm,$mapName)
@@ -572,12 +650,10 @@ atree2Tree1(x,evalIfTrue) ==
     x
   [atree2Tree1(y,evalIfTrue) for y in x]
 
---% Environment Utilities
-
--- getValueFromEnvironment(x,mode) ==
---   $failure ^= (v := getValueFromSpecificEnvironment(x,mode,$env)) => v
---   $failure ^= (v := getValueFromSpecificEnvironment(x,mode,$e))   => v
---   throwKeyedMsg("S2IE0001",[x])
+@
+\section{Environment Utilities}
+\subsection{getValueFromEnvironment}
+<<*>>=
 getValueFromEnvironment(x,mode) ==
   $failure ^= (v := getValueFromSpecificEnvironment(x,mode,$env)) => v
   $failure ^= (v := getValueFromSpecificEnvironment(x,mode,$e))   => v
@@ -585,6 +661,9 @@ getValueFromEnvironment(x,mode) ==
      throwKeyedMsg("S2IE0001",[x])
   objValUnwrap v
 
+@
+\subsection{getValueFromSpecificEnvironment}
+<<*>>=
 getValueFromSpecificEnvironment(id,mode,e) ==
   PAIRP e =>
     u := get(id,'value,e) =>
@@ -610,6 +689,9 @@ getValueFromSpecificEnvironment(id,mode,e) ==
     $failure
   $failure
 
+@
+\subsection{addBindingInteractive}
+<<*>>=
 addBindingInteractive(var,proplist,e is [[curContour,:.],:.]) ==
   -- change proplist of var in e destructively
   u := ASSQ(var,curContour) =>
@@ -618,21 +700,36 @@ addBindingInteractive(var,proplist,e is [[curContour,:.],:.]) ==
   RPLAC(CAAR e,[[var,:proplist],:curContour])
   e
 
+@
+\subsection{augProplistInteractive}
+<<*>>=
 augProplistInteractive(proplist,prop,val) ==
   u := ASSQ(prop,proplist) =>
     RPLACD(u,val)
     proplist
   [[prop,:val],:proplist]
 
+@
+\subsection{getFlag}
+<<*>>=
 getFlag x == get("--flags--",x,$e)
 
+@
+\subsection{putFlag}
+<<*>>=
 putFlag(flag,value) ==
   $e := put ("--flags--", flag, value, $e)
 
+@
+\subsection{get}
+<<*>>=
 get(x,prop,e) ==
   $InteractiveMode => get0(x,prop,e)
   get1(x,prop,e)
 
+@
+\subsection{get0}
+<<*>>=
 get0(x,prop,e) ==
   null atom x => get(QCAR x,prop,e)
   u:= QLASSQ(x,CAR QCAR e) => QLASSQ(prop,u)
@@ -640,6 +737,9 @@ get0(x,prop,e) ==
     QLASSQ(prop,u)
   nil
 
+@
+\subsection{get1}
+<<*>>=
 get1(x,prop,e) ==
     --this is the old get
   null atom x => get(QCAR x,prop,e)
@@ -648,21 +748,39 @@ get1(x,prop,e) ==
       or get2(x,prop,e)
   LASSOC(prop,getProplist(x,e)) or get2(x,prop,e)
 
+@
+\subsection{get2}
+<<*>>=
 get2(x,prop,e) ==
   prop="modemap" and constructor? x =>
     (u := getConstructorModemap(x)) => [u]
     nil
   nil
 
+@
+\subsection{getI}
+<<*>>=
 getI(x,prop) == get(x,prop,$InteractiveFrame)
 
+@
+\subsection{putI}
+<<*>>=
 putI(x,prop,val) == ($InteractiveFrame := put(x,prop,val,$InteractiveFrame))
 
+@
+\subsection{getIProplist}
+<<*>>=
 getIProplist x == getProplist(x,$InteractiveFrame)
 
+@
+\subsection{removeBindingI}
+<<*>>=
 removeBindingI x ==
   RPLAC(CAAR $InteractiveFrame,deleteAssocWOC(x,CAAR $InteractiveFrame))
 
+@
+\subsection{rempropI}
+<<*>>=
 rempropI(x,prop) ==
   id:=
     atom x => x
@@ -672,17 +790,26 @@ rempropI(x,prop) ==
     recordOldValue(id,prop,getI(id,prop))
     $InteractiveFrame:= remprop(id,prop,$InteractiveFrame)
 
+@
+\subsection{remprop}
+<<*>>=
 remprop(x,prop,e) ==
   u:= ASSOC(prop,pl:= getProplist(x,e)) =>
     e:= addBinding(x,DELASC(first u,pl),e)
     e
   e
 
+@
+\subsection{fastSearchCurrentEnv}
+<<*>>=
 fastSearchCurrentEnv(x,currentEnv) ==
   u:= QLASSQ(x,CAR currentEnv) => u
   while (currentEnv:= QCDR currentEnv) repeat
     u:= QLASSQ(x,CAR currentEnv) => u
 
+@
+\subsection{put}
+<<*>>=
 put(x,prop,val,e) ==
   $InteractiveMode and not EQ(e,$CategoryFrame) =>
     putIntSymTab(x,prop,val,e)
@@ -697,6 +824,9 @@ put(x,prop,val,e) ==
     e
   addBinding(x,newProplist,e)
 
+@
+\subsection{putIntSymTab}
+<<*>>=
 putIntSymTab(x,prop,val,e) ==
   null atom x => putIntSymTab(first x,prop,val,e)
   pl0 := pl := search(x,e)
@@ -712,6 +842,9 @@ putIntSymTab(x,prop,val,e) ==
   EQ(pl0,pl) => e
   addIntSymTabBinding(x,pl,e)
 
+@
+\subsection{addIntSymTabBinding}
+<<*>>=
 addIntSymTabBinding(var,proplist,e is [[curContour,:.],:.]) ==
   -- change proplist of var in e destructively
   u := ASSQ(var,curContour) =>
@@ -720,33 +853,55 @@ addIntSymTabBinding(var,proplist,e is [[curContour,:.],:.]) ==
   RPLAC(CAAR e,[[var,:proplist],:curContour])
   e
 
+@
+\section{Source and position information}
+In the following, src is a string containing an original input line,
+line is the line number of the string within the source file,
+and col is the index within src of the start of the form represented
+by x. x is a VAT.
 
---% Source and position information
-
--- In the following, src is a string containing an original input line,
--- line is the line number of the string within the source file,
--- and col is the index within src of the start of the form represented
--- by x. x is a VAT.
-
+\subsection{putSrcPos}
+<<*>>=
 putSrcPos(x, file, src, line, col) ==
     putAtree(x, 'srcAndPos, srcPos_New(file, src, line, col))
 
+@
+\subsection{getSrcPos}
+<<*>>=
 getSrcPos(x) == getAtree(x, 'srcAndPos)
 
+@
+\subsection{srcPosNew}
+<<*>>=
 srcPosNew(file, src, line, col) == LIST2VEC [file, src, line, col]
 
+@
+\subsection{srcPosFile}
+<<*>>=
 srcPosFile(sp) ==
     if sp then sp.0 else nil
 
+@
+\subsection{srcPosSource}
+<<*>>=
 srcPosSource(sp) ==
     if sp then sp.1 else nil
 
+@
+\subsection{srcPosLine}
+<<*>>=
 srcPosLine(sp) ==
     if sp then sp.2 else nil
 
+@
+\subsection{srcPosColumn}
+<<*>>=
 srcPosColumn(sp) ==
     if sp then sp.3 else nil
 
+@
+\subsection{srcPosDisplay}
+<<*>>=
 srcPosDisplay(sp) ==
     null sp => nil
     s := STRCONC('"_"", srcPosFile sp, '"_", line ",
@@ -759,58 +914,163 @@ srcPosDisplay(sp) ==
     sayBrightly [fillerSpaces(#s, '" "), dots, '"^"]
     true
 
---% Functions on interpreter objects
-
--- Interpreter objects used to be called triples because they had the
--- structure [value, type, environment].  For many years, the environment
--- was not used, so finally in January, 1990, the structure of objects
--- was changed to be (type . value).  This was chosen because it was the
--- structure of objects of type Any.  Sometimes the values are wrapped
--- (see the function isWrapped to see what this means physically).
--- Wrapped values are not actual values belonging to their types.  An
--- unwrapped value must be evaluated to get an actual value.  A wrapped
--- value must be unwrapped before being passed to a library function.
--- Typically, an unwrapped value in the interpreter consists of LISP
--- code, e.g., parts of a function that is being constructed.
---                 RSS 1/14/90
-
--- These are the new structure functions.
-
+@
+\section{Functions on interpreter objects}
+Interpreter objects used to be called triples because they had the
+structure [value, type, environment].  For many years, the environment
+was not used, so finally in January, 1990, the structure of objects
+was changed to be (type . value).  This was chosen because it was the
+structure of objects of type Any.  Sometimes the values are wrapped
+(see the function isWrapped to see what this means physically).
+Wrapped values are not actual values belonging to their types.  An
+unwrapped value must be evaluated to get an actual value.  A wrapped
+value must be unwrapped before being passed to a library function.
+Typically, an unwrapped value in the interpreter consists of LISP
+code, e.g., parts of a function that is being constructed.
+--  RSS 1/14/90
+
+These are the new structure functions.
+
+\subsection{mkObj}
+<<*>>=
 mkObj(val, mode) == CONS(mode,val)              -- old names
+
+@
+\subsection{mkObjWrap}
+<<*>>=
 mkObjWrap(val, mode) == CONS(mode,wrap val)
+
+@
+\subsection{mkObjCode}
+<<*>>=
 mkObjCode(val, mode) == ['CONS, MKQ mode,val ]
 
+@
+\subsection{objNew}
+<<*>>=
 objNew(val, mode) == CONS(mode,val)             -- new names as of 10/14/93
+
+@
+\subsection{objNewWrap}
+<<*>>=
 objNewWrap(val, mode) == CONS(mode,wrap val)
+
+@
+\subsection{objNewCode}
+<<*>>=
 objNewCode(val, mode) == ['CONS, MKQ mode,val ]
+
+@
+\subsection{objSetVal}
+<<*>>=
 objSetVal(obj,val) == RPLACD(obj,val)
+
+@
+\subsection{objSetMode}
+<<*>>=
 objSetMode(obj,mode) == RPLACA(obj,mode)
 
+@
+\subsection{objVal}
+<<*>>=
 objVal obj == CDR obj
+
+@
+\subsection{objValUnwrap}
+<<*>>=
 objValUnwrap obj == unwrap CDR obj
+
+@
+\subsection{objMode}
+<<*>>=
 objMode obj == CAR obj
+
+@
+\subsection{objEnv}
+<<*>>=
 objEnv obj == $NE
 
+@
+\subsection{objCodeVal}
+<<*>>=
 objCodeVal obj == CADDR obj
-objCodeMode obj == CADR obj
-
 
+@
+\subsection{objCodeMode}
+<<*>>=
+objCodeMode obj == CADR obj
 
-
---% Library compiler structures needed by the interpreter
-
--- Tuples and Crosses
-
+@
+\section{Library compiler structures needed by the interpreter}
+Tuples and Crosses
+\subsection{asTupleNew}
+<<*>>=
 asTupleNew(size, listOfElts) == CONS(size, LIST2VEC listOfElts)
+
+@
+\subsection{asTupleNew0}
+<<*>>=
 asTupleNew0(listOfElts) == CONS(#listOfElts, LIST2VEC listOfElts)
 
+@
+\subsection{asTupleNewCode}
+<<*>>=
 asTupleNewCode(size, listOfElts) == ["asTupleNew", size, ['LIST, :listOfElts]]
+
+@
+\subsection{asTupleNewCode0}
+<<*>>=
 asTupleNewCode0(listForm) == ["asTupleNew0", listForm]
 
+@
+\subsection{asTupleSize}
+<<*>>=
 asTupleSize(at) == CAR at
+
+@
+\subsection{asTupleAsVector}
+<<*>>=
 asTupleAsVector(at) == CDR at
+
+@
+\subsection{asTupleAsList}
+<<*>>=
 asTupleAsList(at) == VEC2LIST asTupleAsVector at
 @
+\section{License}
+<<license>>=
+-- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+-- All rights reserved.
+--
+-- Redistribution and use in source and binary forms, with or without
+-- modification, are permitted provided that the following conditions are
+-- met:
+--
+--     - Redistributions of source code must retain the above copyright
+--       notice, this list of conditions and the following disclaimer.
+--
+--     - Redistributions in binary form must reproduce the above copyright
+--       notice, this list of conditions and the following disclaimer in
+--       the documentation and/or other materials provided with the
+--       distribution.
+--
+--     - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+--       names of its contributors may be used to endorse or promote products
+--       derived from this software without specific prior written permission.
+--
+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+-- IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+-- TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+-- OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+-- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+@
 \eject
 \begin{thebibliography}{99}
 \bibitem{1} nothing

\start
Date: Sat, 16 Feb 2008 23:01:18 +0100 (CET)
From: Waldek Hebisch
To: list
Subject: Re: 20080216.01.wxh.patch (hash tables to speed compiles)

Tim Daly wrote:
> This code is a performance improvement by Waldek Hebisch.
> (Fricas patches 232 and 233).
> 
> The essence of the speedup appears to be caused by two factors.
> The original code was non-recursive and used union across lists.
> The new code is recursive. It also uses a hashtable to reduce
> the amount of redundant list construction.
> 

Two comments:

1) mkCategory/sigParams: the original code was recursive.  Gain
   comes from avoiding unions: with unions algorithm is quadratic
   (and may be worse because builtion Lisp union may be slow),
   new version builds list with duplicates in linear time.  The
   final loop used hash table to quickly remove duplicates.

2) The second patch (233) tries to avoid lookups in environment if
   it is clear that the lookup will fail.  The whole gain is in
   get1 function (but you did not include this hunk...).  The
   other parts are just to put correct info into the $envHashTable.

\start
Date: Sun, 17 Feb 2008 02:22:58 -0600
From: Tim Daly
To: list
Subject: 20080216.02.tpd.patch (add function examples)

This patch begins the process of adding examples for functions.
There are roughly 3000 function names representing some 10000 functions
which need examples and unit tests.

All cases of these functions are done:

 )d op absolutelyIrreducible?
 )d op alphabetic?
 )d op branchPointAtInfinity?
 )d op char
 )d op digit?
 )d op escape
 )d op genus
 )d op hexDigit?
 )d op inverseIntegralMatrix
 )d op inverseIntegralMatrixAtInfinity
 )d op integralBasisAtInfinity
 )d op integralMatrix
 )d op integralMatrixAtInfinity
 )d op lowerCase?
 )d op ord
 )d op rationalPoint?
 )d op upperCase?

Some cases of these functions are done:

 )d op integralBasis
 )d op numberOfComponents
 )d op quote
 )d op space
 )d op upperCase

Tim

=====================================================================
diff --git a/changelog b/changelog
index 0a7fe92..dd95712 100644
--- a/changelog
+++ b/changelog
@@ -1,7 +1,9 @@
-20082016 wxh src/interp/i-intern.boot use hashtable to speedup compiles
-20082016 wxh src/interp/g-util.boot use hashtable to speedup compiles
-20082016 wxh src/interp/compiler.boot use hashtable to speedup compiles
-20082016 wxh src/interp/category.boot use hashtable to speedup compiles
+20080217 tpd src/algebra/string.spad add function examples
+20080217 tpd src/algebra/curve.spad add function examples
+20080216 wxh src/interp/i-intern.boot use hashtable to speedup compiles
+20080216 wxh src/interp/g-util.boot use hashtable to speedup compiles
+20080216 wxh src/interp/compiler.boot use hashtable to speedup compiles
+20080216 wxh src/interp/category.boot use hashtable to speedup compiles
 20080215 tpd src/interp/format.boot add )d op documentation
 20080215 tpd src/algebra/plot add comment documentation
 20080210 tpd src/algebra/Makefile add plot help and input files for plot
diff --git a/src/algebra/curve.spad.pamphlet b/src/algebra/curve.spad.pamphlet
index 5ca9495..6128b6b 100644
--- a/src/algebra/curve.spad.pamphlet
+++ b/src/algebra/curve.spad.pamphlet
@@ -36,14 +36,43 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
     numberOfComponents     : () -> NonNegativeInteger
       ++ numberOfComponents() returns the number of absolutely irreducible
       ++ components.
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E numberOfComponents()$R
     genus                  : () -> NonNegativeInteger
       ++ genus() returns the genus of one absolutely irreducible component
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E genus()$R
     absolutelyIrreducible? : () -> Boolean
       ++ absolutelyIrreducible?() tests if the curve absolutely irreducible?
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R2 := RadicalFunctionField(INT, P0, P1, 2 * x**2, 4)
+      ++E absolutelyIrreducible?()$R2
     rationalPoint?         : (F, F) -> Boolean
       ++ rationalPoint?(a, b) tests if \spad{(x=a,y=b)} is on the curve.
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E rationalPoint?(0,0)$R
+      ++E R2 := RadicalFunctionField(INT, P0, P1, 2 * x**2, 4)
+      ++E rationalPoint?(0,0)$R2
     branchPointAtInfinity? : () -> Boolean
       ++ branchPointAtInfinity?() tests if there is a branch point at infinity.
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E branchPointAtInfinity?()$R
+      ++E R2 := RadicalFunctionField(INT, P0, P1, 2 * x**2, 4)
+      ++E branchPointAtInfinity?()$R
     branchPoint?           : F -> Boolean
       ++ branchPoint?(a) tests whether \spad{x = a} is a branch point.
     branchPoint?           : UP -> Boolean
@@ -62,8 +91,18 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
       ++ ramified?(p) tests whether \spad{p(x) = 0} is ramified.
     integralBasis          : () -> Vector $
       ++ integralBasis() returns the integral basis for the curve.
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E integralBasis()$R
     integralBasisAtInfinity: () -> Vector $
-      ++ integralBasisAtInfinity() returns the local integral basis at infinity.
+      ++ integralBasisAtInfinity() returns the local integral basis at infinity
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E integralBasisAtInfinity()$R
     integralAtInfinity?    : $  -> Boolean
       ++ integralAtInfinity?() tests if f is locally integral at infinity.
     integral?              : $  -> Boolean
@@ -81,21 +120,41 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
       ++ \spad{(w1,...,wn) = M (1, y, ..., y**(n-1))},
       ++ where \spad{(w1,...,wn)} is the integral basis of
       ++ \spadfunFrom{integralBasis}{FunctionFieldCategory}.
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E integralMatrix()$R
     inverseIntegralMatrix  : () -> Matrix RF
       ++ inverseIntegralMatrix() returns M such that
       ++ \spad{M (w1,...,wn) = (1, y, ..., y**(n-1))}
       ++ where \spad{(w1,...,wn)} is the integral basis of
       ++ \spadfunFrom{integralBasis}{FunctionFieldCategory}.
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E inverseIntegralMatrix()$R
     integralMatrixAtInfinity       : () -> Matrix RF
       ++ integralMatrixAtInfinity() returns M such that
       ++ \spad{(v1,...,vn) = M (1, y, ..., y**(n-1))}
       ++ where \spad{(v1,...,vn)} is the local integral basis at infinity
       ++ returned by \spad{infIntBasis()}.
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E integralMatrixAtInfinity()$R
     inverseIntegralMatrixAtInfinity: () -> Matrix RF
       ++ inverseIntegralMatrixAtInfinity() returns M such
       ++ that \spad{M (v1,...,vn) = (1, y, ..., y**(n-1))}
       ++ where \spad{(v1,...,vn)} is the local integral basis at infinity
       ++ returned by \spad{infIntBasis()}.
+      ++
+      ++E P0 := UnivariatePolynomial(x, Integer)
+      ++E P1 := UnivariatePolynomial(y, Fraction P0)
+      ++E R := RadicalFunctionField(INT, P0, P1, 1 - x**20, 20)
+      ++E inverseIntegralMatrixAtInfinity()$R
     yCoordinates           : $ -> Record(num:Vector(UP), den:UP)
       ++ yCoordinates(f) returns \spad{[[A1,...,An], D]} such that
       ++ \spad{f = (A1 + A2 y +...+ An y**(n-1)) / D}.
@@ -120,7 +179,7 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
     integral?              : ($,  F) -> Boolean
       ++ integral?(f, a) tests whether f is locally integral at \spad{x = a}.
     integral?              : ($, UP) -> Boolean
-      ++ integral?(f, p) tests whether f is locally integral at \spad{p(x) = 0}.
+      ++ integral?(f, p) tests whether f is locally integral at \spad{p(x) = 0}
     differentiate          : ($, UP -> UP) -> $
       ++ differentiate(x, d) extends the derivation d from UP to $ and
       ++ applies it to x.
@@ -131,7 +190,8 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
       ++ primitivePart(f) removes the content of the denominator and
       ++ the common content of the numerator of f.
     elt                    : ($, F, F) -> F
-      ++ elt(f,a,b) or f(a, b) returns the value of f at the point \spad{(x = a, y = b)}
+      ++ elt(f,a,b) or f(a, b) returns the value of f 
+      ++ at the point \spad{(x = a, y = b)}
       ++ if it is not singular.
     elliptic               : () -> Union(UP, "failed")
       ++ elliptic() returns \spad{p(x)} if the curve is the elliptic
diff --git a/src/algebra/string.spad.pamphlet b/src/algebra/string.spad.pamphlet
index a7af939..9cae78b 100644
--- a/src/algebra/string.spad.pamphlet
+++ b/src/algebra/string.spad.pamphlet
@@ -228,98 +228,130 @@ o $AXIOM/doc/src/algebra/string.spad.dvi
 ++   This domain provides the basic character data type.
 
 Character: OrderedFinite() with
-	ord: % -> Integer
-	    ++ ord(c) provides an integral code corresponding to the
-	    ++ character c.  It is always true that \spad{char ord c = c}.
-	char: Integer  -> %
-	    ++ char(i) provides a character corresponding to the integer
-	    ++ code i.	It is always true that \spad{ord char i = i}.
-	char: String   -> %
-	    ++ char(s) provides a character from a string s of length one.
-	space:	() -> %
-	    ++ space() provides the blank character.
-	quote:	() -> %
-	    ++ quote() provides the string quote character, \spad{"}.
-	escape: () -> %
-	    ++ escape() provides the escape character, \spad{_}, which
-	    ++ is used to allow quotes and other characters {\em within}
-	    ++ strings.
-	upperCase: % -> %
-	    ++ upperCase(c) converts a lower case letter to the corresponding
-	    ++ upper case letter.  If c is not a lower case letter, then
-	    ++ it is returned unchanged.
-	lowerCase: % -> %
-	    ++ lowerCase(c) converts an upper case letter to the corresponding
-	    ++ lower case letter.  If c is not an upper case letter, then
-	    ++ it is returned unchanged.
-	digit?: % -> Boolean
-	    ++ digit?(c) tests if c is a digit character,
-	    ++ i.e. one of 0..9.
-	hexDigit?: % -> Boolean
-	    ++ hexDigit?(c) tests if c is a hexadecimal numeral,
-	    ++ i.e. one of 0..9, a..f or A..F.
-	alphabetic?: % -> Boolean
-	    ++ alphabetic?(c) tests if c is a letter,
-	    ++ i.e. one of a..z or A..Z.
-	upperCase?: % -> Boolean
-	    ++ upperCase?(c) tests if c is an upper case letter,
-	    ++ i.e. one of A..Z.
-	lowerCase?: % -> Boolean
-	    ++ lowerCase?(c) tests if c is an lower case letter,
-	    ++ i.e. one of a..z.
-	alphanumeric?: % -> Boolean
-	    ++ alphanumeric?(c) tests if c is either a letter or number,
-	    ++ i.e. one of 0..9, a..z or A..Z.
-
-    == add
-	Rep := SingleInteger	  -- 0..255
-
-	CC ==> CharacterClass()
-	import CC
-
-	--cl: Record(dig:CC,hex:CC,upp:CC,low:CC,alpha:CC,alnum:CC) :=
-	--    [ digit(), hexDigit(),
-	--	upperCase(), lowerCase(), alphabetic(), alphanumeric() ]
-
-	OutChars:PrimitiveArray(OutputForm) :=
-	   construct [NUM2CHAR(i)$Lisp for i in 0..255]
-
-	minChar := minIndex OutChars
-
-	a = b		       == a =$Rep b
-	a < b		       == a <$Rep b
-	size()		       == 256
-	index n		       == char((n - 1)::Integer)
-	lookup c	       == (1 + ord c)::PositiveInteger
-	char(n:Integer)	       == n::%
-	ord c		       == convert(c)$Rep
-	random()	       == char(random()$Integer rem size())
-	space		       == QENUM("   ", 0$Lisp)$Lisp
-	quote		       == QENUM("_" ", 0$Lisp)$Lisp
-	escape		       == QENUM("__ ", 0$Lisp)$Lisp
-	coerce(c:%):OutputForm == OutChars(minChar + ord c)
-	digit? c	       == member?(c pretend Character, digit())
-	hexDigit? c	       == member?(c pretend Character, hexDigit())
-	upperCase? c	       == member?(c pretend Character, upperCase())
-	lowerCase? c	       == member?(c pretend Character, lowerCase())
-	alphabetic? c	       == member?(c pretend Character, alphabetic())
-	alphanumeric? c	       == member?(c pretend Character, alphanumeric())
-
-	latex c ==
-	    concat("\mbox{`", concat(new(1,c pretend Character)$String, "'}")$String)$String
-
-	char(s:String) ==
---	  one?(#s) => s(minIndex s) pretend %
-	  (#s) = 1 => s(minIndex s) pretend %
-	  error "String is not a single character"
-
-	upperCase c ==
-	  QENUM(PNAME(UPCASE(NUM2CHAR(ord c)$Lisp)$Lisp)$Lisp,
-		0$Lisp)$Lisp
-
-	lowerCase c ==
-	  QENUM(PNAME(DOWNCASE(NUM2CHAR(ord c)$Lisp)$Lisp)$Lisp,
-		0$Lisp)$Lisp
+  ord: % -> Integer
+    ++ ord(c) provides an integral code corresponding to the
+    ++ character c.  It is always true that \spad{char ord c = c}.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [ord c for c in chars]
+  char: Integer  -> %
+    ++ char(i) provides a character corresponding to the integer
+    ++ code i. It is always true that \spad{ord char i = i}.
+    ++
+    ++E [char c for c in [97,65,88,56,43]]
+  char: String   -> %
+    ++ char(s) provides a character from a string s of length one.
+    ++
+    ++E [char c for c in ["a","A","X","8","+"]]
+  space: () -> %
+    ++ space() provides the blank character.
+    ++
+    ++E space()
+  quote: () -> %
+    ++ quote() provides the string quote character, \spad{"}.
+    ++
+    ++E quote()
+  escape: () -> %
+    ++ escape() provides the escape character, \spad{_}, which
+    ++ is used to allow quotes and other characters {\em within}
+    ++ strings.
+    ++
+    ++E escape()
+  upperCase: % -> %
+    ++ upperCase(c) converts a lower case letter to the corresponding
+    ++ upper case letter.  If c is not a lower case letter, then
+    ++ it is returned unchanged.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [upperCase c for c in chars]
+  lowerCase: % -> %
+    ++ lowerCase(c) converts an upper case letter to the corresponding
+    ++ lower case letter.  If c is not an upper case letter, then
+    ++ it is returned unchanged.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [lowerCase c for c in chars]
+  digit?: % -> Boolean
+    ++ digit?(c) tests if c is a digit character,
+    ++ i.e. one of 0..9.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [digit? c for c in chars]
+  hexDigit?: % -> Boolean
+    ++ hexDigit?(c) tests if c is a hexadecimal numeral,
+    ++ i.e. one of 0..9, a..f or A..F.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [hexDigit? c for c in chars]
+  alphabetic?: % -> Boolean
+    ++ alphabetic?(c) tests if c is a letter,
+    ++ i.e. one of a..z or A..Z.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [alphabetic? c for c in chars]
+  upperCase?: % -> Boolean
+    ++ upperCase?(c) tests if c is an upper case letter,
+    ++ i.e. one of A..Z.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [upperCase? c for c in chars]
+  lowerCase?: % -> Boolean
+    ++ lowerCase?(c) tests if c is an lower case letter,
+    ++ i.e. one of a..z.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [lowerCase? c for c in chars]
+  alphanumeric?: % -> Boolean
+    ++ alphanumeric?(c) tests if c is either a letter or number,
+    ++ i.e. one of 0..9, a..z or A..Z.
+    ++
+    ++E chars := [char "a", char "A", char "X", char "8", char "+"]
+    ++E [alphanumeric? c for c in chars]
+
+ == add
+
+  Rep := SingleInteger  -- 0..255
+
+  CC ==> CharacterClass()
+  import CC
+
+  OutChars:PrimitiveArray(OutputForm) :=
+   construct [NUM2CHAR(i)$Lisp for i in 0..255]
+
+  minChar := minIndex OutChars
+
+  a = b                  == a =$Rep b
+  a < b	                 == a <$Rep b
+  size()                 == 256
+  index n                == char((n - 1)::Integer)
+  lookup c               == (1 + ord c)::PositiveInteger
+  char(n:Integer)        == n::%
+  ord c                  == convert(c)$Rep
+  random()               == char(random()$Integer rem size())
+  space                  == QENUM("   ", 0$Lisp)$Lisp
+  quote                  == QENUM("_" ", 0$Lisp)$Lisp
+  escape                 == QENUM("__ ", 0$Lisp)$Lisp
+  coerce(c:%):OutputForm == OutChars(minChar + ord c)
+  digit? c               == member?(c pretend Character, digit())
+  hexDigit? c            == member?(c pretend Character, hexDigit())
+  upperCase? c           == member?(c pretend Character, upperCase())
+  lowerCase? c           == member?(c pretend Character, lowerCase())
+  alphabetic? c          == member?(c pretend Character, alphabetic())
+  alphanumeric? c        == member?(c pretend Character, alphanumeric())
+
+  latex c ==
+    concat("\mbox{`", concat(new(1,c pretend Character)$String, "'}")_
+       $String)$String
+
+  char(s:String) ==
+   (#s) = 1 => s(minIndex s) pretend %
+   error "String is not a single character"
+
+  upperCase c ==
+    QENUM(PNAME(UPCASE(NUM2CHAR(ord c)$Lisp)$Lisp)$Lisp,0$Lisp)$Lisp
+
+  lowerCase c ==
+    QENUM(PNAME(DOWNCASE(NUM2CHAR(ord c)$Lisp)$Lisp)$Lisp,0$Lisp)$Lisp
 
 @
 \section{CHAR.lsp BOOTSTRAP} 
@@ -351,7 +383,12 @@ Note that this code is not included in the generated catdef.spad file.
 
 (DEFUN |CHAR;index;Pi$;4| (|n| |$|) (SPADCALL (|-| |n| 1) (QREFELT |$| 18))) 
 
-(DEFUN |CHAR;lookup;$Pi;5| (|c| |$|) (PROG (#1=#:G90919) (RETURN (PROG1 (LETT #1# (|+| 1 (SPADCALL |c| (QREFELT |$| 21))) |CHAR;lookup;$Pi;5|) (|check-subtype| (|>| #1# 0) (QUOTE (|PositiveInteger|)) #1#))))) 
+(DEFUN |CHAR;lookup;$Pi;5| (|c| |$|)
+ (PROG (#1=#:G90919)
+  (RETURN
+   (PROG1
+    (LETT #1# (|+| 1 (SPADCALL |c| (QREFELT |$| 21))) |CHAR;lookup;$Pi;5|)
+    (|check-subtype| (|>| #1# 0) (QUOTE (|PositiveInteger|)) #1#))))) 
 
 (DEFUN |CHAR;char;I$;6| (|n| |$|) (SPADCALL |n| (QREFELT |$| 23))) 
 
@@ -359,47 +396,146 @@ Note that this code is not included in the generated catdef.spad file.
 
 (DEFUN |CHAR;ord;$I;7| (|c| |$|) |c|) 
 
-(DEFUN |CHAR;random;$;8| (|$|) (SPADCALL (REMAINDER2 (|random|) (SPADCALL (QREFELT |$| 16))) (QREFELT |$| 18))) 
+(DEFUN |CHAR;random;$;8| (|$|)
+ (SPADCALL (REMAINDER2 (|random|) (SPADCALL (QREFELT |$| 16)))
+           (QREFELT |$| 18))) 
 
-(PUT (QUOTE |CHAR;space;$;9|) (QUOTE |SPADreplace|) (QUOTE (XLAM NIL (QENUM "   " 0)))) 
+(PUT (QUOTE |CHAR;space;$;9|)
+ (QUOTE |SPADreplace|) (QUOTE (XLAM NIL (QENUM "   " 0)))) 
 
 (DEFUN |CHAR;space;$;9| (|$|) (QENUM "   " 0)) 
 
-(PUT (QUOTE |CHAR;quote;$;10|) (QUOTE |SPADreplace|) (QUOTE (XLAM NIL (QENUM "\" " 0)))) 
+(PUT (QUOTE |CHAR;quote;$;10|)
+ (QUOTE |SPADreplace|) (QUOTE (XLAM NIL (QENUM "\" " 0)))) 
 
 (DEFUN |CHAR;quote;$;10| (|$|) (QENUM "\" " 0)) 
 
-(PUT (QUOTE |CHAR;escape;$;11|) (QUOTE |SPADreplace|) (QUOTE (XLAM NIL (QENUM "_ " 0)))) 
+(PUT (QUOTE |CHAR;escape;$;11|)
+ (QUOTE |SPADreplace|) (QUOTE (XLAM NIL (QENUM "_ " 0)))) 
 
 (DEFUN |CHAR;escape;$;11| (|$|) (QENUM "_ " 0)) 
 
-(DEFUN |CHAR;coerce;$Of;12| (|c| |$|) (ELT (QREFELT |$| 10) (|+| (QREFELT |$| 11) (SPADCALL |c| (QREFELT |$| 21))))) 
-
-(DEFUN |CHAR;digit?;$B;13| (|c| |$|) (SPADCALL |c| (|spadConstant| |$| 31) (QREFELT |$| 33))) 
-
-(DEFUN |CHAR;hexDigit?;$B;14| (|c| |$|) (SPADCALL |c| (|spadConstant| |$| 35) (QREFELT |$| 33))) 
-
-(DEFUN |CHAR;upperCase?;$B;15| (|c| |$|) (SPADCALL |c| (|spadConstant| |$| 37) (QREFELT |$| 33))) 
-
-(DEFUN |CHAR;lowerCase?;$B;16| (|c| |$|) (SPADCALL |c| (|spadConstant| |$| 39) (QREFELT |$| 33))) 
-
-(DEFUN |CHAR;alphabetic?;$B;17| (|c| |$|) (SPADCALL |c| (|spadConstant| |$| 41) (QREFELT |$| 33))) 
-
-(DEFUN |CHAR;alphanumeric?;$B;18| (|c| |$|) (SPADCALL |c| (|spadConstant| |$| 43) (QREFELT |$| 33))) 
-
-(DEFUN |CHAR;latex;$S;19| (|c| |$|) (STRCONC "\\mbox{`" (STRCONC (|MAKE-FULL-CVEC| 1 |c|) "'}"))) 
-
-(DEFUN |CHAR;char;S$;20| (|s| |$|) (COND ((EQL (QCSIZE |s|) 1) (SPADCALL |s| (SPADCALL |s| (QREFELT |$| 47)) (QREFELT |$| 48))) ((QUOTE T) (|error| "String is not a single character")))) 
-
-(DEFUN |CHAR;upperCase;2$;21| (|c| |$|) (QENUM (PNAME (UPCASE (NUM2CHAR (SPADCALL |c| (QREFELT |$| 21))))) 0)) 
-
-(DEFUN |CHAR;lowerCase;2$;22| (|c| |$|) (QENUM (PNAME (DOWNCASE (NUM2CHAR (SPADCALL |c| (QREFELT |$| 21))))) 0)) 
-
-(DEFUN |Character| NIL (PROG NIL (RETURN (PROG (#1=#:G90941) (RETURN (COND ((LETT #1# (HGET |$ConstructorCache| (QUOTE |Character|)) |Character|) (|CDRwithIncrement| (CDAR #1#))) ((QUOTE T) (|UNWIND-PROTECT| (PROG1 (CDDAR (HPUT |$ConstructorCache| (QUOTE |Character|) (LIST (CONS NIL (CONS 1 (|Character;|)))))) (LETT #1# T |Character|)) (COND ((NOT #1#) (HREM |$ConstructorCache| (QUOTE |Character|)))))))))))) 
-
-(DEFUN |Character;| NIL (PROG (|dv$| |$| |pv$| #1=#:G90939 |i|) (RETURN (SEQ (PROGN (LETT |dv$| (QUOTE (|Character|)) . #2=(|Character|)) (LETT |$| (GETREFV 53) . #2#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #2#)) (|haddProp| |$ConstructorCache| (QUOTE |Character|) NIL (CONS 1 |$|)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 (|SingleInteger|)) (QSETREFV |$| 10 (SPADCALL (PROGN (LETT #1# NIL . #2#) (SEQ (LETT |i| 0 . #2#) G190 (COND ((QSGREATERP |i| 255) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (NUM2CHAR |i|) #1#) . #2#))) (LETT |i| (QSADD1 |i|) . #2#) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) (QREFELT |$| 9))) (QSETREFV |$| 11 0) |$|))))) 
-
-(MAKEPROP (QUOTE |Character|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (QUOTE |Rep|) (|List| 28) (|PrimitiveArray| 28) (0 . |construct|) (QUOTE |OutChars|) (QUOTE |minChar|) (|Boolean|) |CHAR;=;2$B;1| |CHAR;<;2$B;2| (|NonNegativeInteger|) |CHAR;size;Nni;3| (|Integer|) |CHAR;char;I$;6| (|PositiveInteger|) |CHAR;index;Pi$;4| |CHAR;ord;$I;7| |CHAR;lookup;$Pi;5| (5 . |coerce|) |CHAR;random;$;8| |CHAR;space;$;9| |CHAR;quote;$;10| |CHAR;escape;$;11| (|OutputForm|) |CHAR;coerce;$Of;12| (|CharacterClass|) (10 . |digit|) (|Character|) (14 . |member?|) |CHAR;digit?;$B;13| (20 . |hexDigit|) |CHAR;hexDigit?;$B;14| (24 . |upperCase|) |CHAR;upperCase?;$B;15| (28 . |lowerCase|) |CHAR;lowerCase?;$B;16| (32 . |alphabetic|) |CHAR;alphabetic?;$B;17| (36 . |alphanumeric|) |CHAR;alphanumeric?;$B;18| (|String|) |CHAR;latex;$S;19| (40 . |minIndex|) (45 . |elt|) |CHAR;char;S$;20| |CHAR;upperCase;2$;21| |CHAR;lowerCase;2$;22| (|SingleInteger|))) (QUOTE #(|~=| 51 |upperCase?| 57 |upp!
erCase| 62 |space| 67 |size| 71 |random| 75 |quote| 79 |ord| 83 |min| 88 |max| 94 |lowerCase?| 100 |lowerCase| 105 |lookup| 110 |latex| 115 |index| 120 |hexDigit?| 125 |hash| 130 |escape| 135 |digit?| 139 |coerce| 144 |char| 149 |alphanumeric?| 159 |alphabetic?| 164 |>=| 169 |>| 175 |=| 181 |<=| 187 |<| 193)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE (0 0 0 0 0 0))) (CONS (QUOTE #(NIL |OrderedSet&| NIL |SetCategory&| |BasicType&| NIL)) (CONS (QUOTE #((|OrderedFinite|) (|OrderedSet|) (|Finite|) (|SetCategory|) (|BasicType|) (|CoercibleTo| 28))) (|makeByteWordVec2| 52 (QUOTE (1 8 0 7 9 1 6 0 17 23 0 30 0 31 2 30 12 32 0 33 0 30 0 35 0 30 0 37 0 30 0 39 0 30 0 41 0 30 0 43 1 45 17 0 47 2 45 32 0 17 48 2 0 12 0 0 1 1 0 12 0 38 1 0 0 0 50 0 0 0 25 0 0 15 16 0 0 0 24 0 0 0 26 1 0 17 0 21 2 0 0 0 0 1 2 0 0 0 0 1 1 0 12 0 40 1 0 0 0 51 1 0 19 0 22 1 0 45 0 46 1 0 0 19 20 1 0 12 0 36 1 0 52 0 1 0 0 0 27 1 0 12 0 34 1 0 28 0 29 1 0 0 45 49 1 0 0 17 18 1 0 12 0 44 1 0 12 0 42 2 0 !
12 0 0 1 2 0 12 0 0 1 2 0 12 0 0 13 2 0 12 0 0 1 2 0 12 0 0 1!
4)))))) (QUOTE |lookupComplete|))) 
+(DEFUN |CHAR;coerce;$Of;12| (|c| |$|)
+ (ELT (QREFELT |$| 10)
+      (|+| (QREFELT |$| 11) (SPADCALL |c| (QREFELT |$| 21))))) 
+
+(DEFUN |CHAR;digit?;$B;13| (|c| |$|)
+ (SPADCALL |c| (|spadConstant| |$| 31) (QREFELT |$| 33))) 
+
+(DEFUN |CHAR;hexDigit?;$B;14| (|c| |$|)
+ (SPADCALL |c| (|spadConstant| |$| 35) (QREFELT |$| 33))) 
+
+(DEFUN |CHAR;upperCase?;$B;15| (|c| |$|)
+ (SPADCALL |c| (|spadConstant| |$| 37) (QREFELT |$| 33))) 
+
+(DEFUN |CHAR;lowerCase?;$B;16| (|c| |$|)
+ (SPADCALL |c| (|spadConstant| |$| 39) (QREFELT |$| 33))) 
+
+(DEFUN |CHAR;alphabetic?;$B;17| (|c| |$|)
+ (SPADCALL |c| (|spadConstant| |$| 41) (QREFELT |$| 33))) 
+
+(DEFUN |CHAR;alphanumeric?;$B;18| (|c| |$|)
+ (SPADCALL |c| (|spadConstant| |$| 43) (QREFELT |$| 33))) 
+
+(DEFUN |CHAR;latex;$S;19| (|c| |$|)
+ (STRCONC "\\mbox{`" (STRCONC (|MAKE-FULL-CVEC| 1 |c|) "'}"))) 
+
+(DEFUN |CHAR;char;S$;20| (|s| |$|)
+ (COND
+  ((EQL (QCSIZE |s|) 1)
+    (SPADCALL |s| (SPADCALL |s| (QREFELT |$| 47)) (QREFELT |$| 48)))
+  ((QUOTE T) (|error| "String is not a single character")))) 
+
+(DEFUN |CHAR;upperCase;2$;21| (|c| |$|)
+ (QENUM (PNAME (UPCASE (NUM2CHAR (SPADCALL |c| (QREFELT |$| 21))))) 0)) 
+
+(DEFUN |CHAR;lowerCase;2$;22| (|c| |$|)
+ (QENUM (PNAME (DOWNCASE (NUM2CHAR (SPADCALL |c| (QREFELT |$| 21))))) 0)) 
+
+(DEFUN |Character| NIL
+ (PROG NIL
+  (RETURN
+   (PROG (#1=#:G90941)
+    (RETURN
+     (COND
+      ((LETT #1# (HGET |$ConstructorCache| (QUOTE |Character|)) |Character|)
+        (|CDRwithIncrement| (CDAR #1#)))
+      ((QUOTE T)
+        (|UNWIND-PROTECT|
+         (PROG1
+          (CDDAR 
+           (HPUT |$ConstructorCache| (QUOTE |Character|)
+            (LIST (CONS NIL (CONS 1 (|Character;|))))))
+          (LETT #1# T |Character|))
+         (COND
+          ((NOT #1#) (HREM |$ConstructorCache| (QUOTE |Character|)))))))))))) 
+
+(DEFUN |Character;| NIL
+ (PROG (|dv$| |$| |pv$| #1=#:G90939 |i|)
+  (RETURN
+   (SEQ
+    (PROGN
+     (LETT |dv$| (QUOTE (|Character|)) . #2=(|Character|))
+     (LETT |$| (GETREFV 53) . #2#)
+     (QSETREFV |$| 0 |dv$|)
+     (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #2#))
+     (|haddProp| |$ConstructorCache| (QUOTE |Character|) NIL (CONS 1 |$|))
+     (|stuffDomainSlots| |$|)
+     (QSETREFV |$| 6 (|SingleInteger|))
+     (QSETREFV |$| 10 
+      (SPADCALL
+       (PROGN
+        (LETT #1# NIL . #2#)
+        (SEQ
+         (LETT |i| 0 . #2#)
+         G190
+         (COND ((QSGREATERP |i| 255) (GO G191)))
+         (SEQ (EXIT (LETT #1# (CONS (NUM2CHAR |i|) #1#) . #2#)))
+         (LETT |i| (QSADD1 |i|) . #2#)
+         (GO G190)
+         G191
+         (EXIT (NREVERSE0 #1#))))
+       (QREFELT |$| 9)))
+     (QSETREFV |$| 11 0) |$|))))) 
+
+(MAKEPROP (QUOTE |Character|) (QUOTE |infovec|)
+ (LIST (QUOTE 
+  #(NIL NIL NIL NIL NIL NIL (QUOTE |Rep|) (|List| 28) (|PrimitiveArray| 28)
+   (0 . |construct|) (QUOTE |OutChars|) (QUOTE |minChar|) (|Boolean|)
+   |CHAR;=;2$B;1| |CHAR;<;2$B;2| (|NonNegativeInteger|) |CHAR;size;Nni;3|
+   (|Integer|) |CHAR;char;I$;6| (|PositiveInteger|) |CHAR;index;Pi$;4|
+   |CHAR;ord;$I;7| |CHAR;lookup;$Pi;5| (5 . |coerce|) |CHAR;random;$;8|
+   |CHAR;space;$;9| |CHAR;quote;$;10| |CHAR;escape;$;11| (|OutputForm|)
+   |CHAR;coerce;$Of;12| (|CharacterClass|) (10 . |digit|) (|Character|)
+   (14 . |member?|) |CHAR;digit?;$B;13| (20 . |hexDigit|)
+   |CHAR;hexDigit?;$B;14| (24 . |upperCase|) |CHAR;upperCase?;$B;15|
+   (28 . |lowerCase|) |CHAR;lowerCase?;$B;16| (32 . |alphabetic|)
+   |CHAR;alphabetic?;$B;17| (36 . |alphanumeric|) |CHAR;alphanumeric?;$B;18|
+   (|String|) |CHAR;latex;$S;19| (40 . |minIndex|) (45 . |elt|)
+   |CHAR;char;S$;20| |CHAR;upperCase;2$;21| |CHAR;lowerCase;2$;22|
+   (|SingleInteger|))) (QUOTE #(|~=| 51 |upperCase?| 57 |upperCase| 62
+   |space| 67 |size| 71 |random| 75 |quote| 79 |ord| 83 |min| 88 |max| 94
+   |lowerCase?| 100 |lowerCase| 105 |lookup| 110 |latex| 115 |index| 120
+   |hexDigit?| 125 |hash| 130 |escape| 135 |digit?| 139 |coerce| 144 |char|
+   149 |alphanumeric?| 159 |alphabetic?| 164 |>=| 169 |>| 175 |=| 181 |<=|
+   187 |<| 193)) (QUOTE NIL) 
+   (CONS
+    (|makeByteWordVec2| 1 (QUOTE (0 0 0 0 0 0)))
+    (CONS 
+     (QUOTE #(NIL |OrderedSet&| NIL |SetCategory&| |BasicType&| NIL))
+     (CONS
+      (QUOTE #((|OrderedFinite|) (|OrderedSet|) (|Finite|) (|SetCategory|)
+               (|BasicType|) (|CoercibleTo| 28)))
+       (|makeByteWordVec2| 52
+        (QUOTE (1 8 0 7 9 1 6 0 17 23 0 30 0 31 2 30 12 32 0 33 0 30 0 35 
+                0 30 0 37 0 30 0 39 0 30 0 41 0 30 0 43 1 45 17 0 47 2 45
+                32 0 17 48 2 0 12 0 0 1 1 0 12 0 38 1 0 0 0 50 0 0 0 25 0
+                0 15 16 0 0 0 24 0 0 0 26 1 0 17 0 21 2 0 0 0 0 1 2 0 0 0
+                0 1 1 0 12 0 40 1 0 0 0 51 1 0 19 0 22 1 0 45 0 46 1 0 0 19
+                20 1 0 12 0 36 1 0 52 0 1 0 0 0 27 1 0 12 0 34 1 0 28 0 29
+                1 0 0 45 49 1 0 0 17 18 1 0 12 0 44 1 0 12 0 42 2 0 12 0 0
+                1 2 0 12 0 0 1 2 0 12 0 0 13 2 0 12 0 0 1 2 0 12 0 0 14))))))
+  (QUOTE |lookupComplete|))) 
 
 (MAKEPROP (QUOTE |Character|) (QUOTE NILADIC) T) 
 @
@@ -1614,7 +1750,8 @@ String(): StringCategory == IndexedString(MINSTRINGINDEX) add
 ++ Description:
 ++ A category for string-like objects
 
-StringCategory():Category == Join(StringAggregate(), SetCategory, OpenMath) with
+StringCategory():Category == _
+     Join(StringAggregate(), SetCategory, OpenMath) with
   string: Integer -> %
     ++ string(i) returns the decimal representation of i in a string
 
\start
Date: Sun, 17 Feb 2008 20:25:04 -0600
From: Tim Daly
To: list
Subject: 20080217.01.wxh.patch (fix: hash tables to speed compiles)

The last patch uploaded the wrong file. This patch adds the get1 function.

Tim
========================================================================
diff --git a/changelog b/changelog
index dd95712..5323199 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080217 wxh src/interp/i-intern.boot upload proper file. 
 20080217 tpd src/algebra/string.spad add function examples
 20080217 tpd src/algebra/curve.spad add function examples
 20080216 wxh src/interp/i-intern.boot use hashtable to speedup compiles
diff --git a/src/interp/i-intern.boot.pamphlet b/src/interp/i-intern.boot.pamphlet
index 7520954..9b9c660 100644
--- a/src/interp/i-intern.boot.pamphlet
+++ b/src/interp/i-intern.boot.pamphlet
@@ -739,14 +739,27 @@ get0(x,prop,e) ==
 
 @
 \subsection{get1}
+We try to avoid lookups in the environment if it is clear that
+the lookup will fail. The \verb|$envHashTable| was populated in
+addBinding (see g-util.boot.pamphlet).
 <<*>>=
 get1(x,prop,e) ==
     --this is the old get
+  negHash := nil
   null atom x => get(QCAR x,prop,e)
+  if $envHashTable and _
+     (not(EQ($CategoryFrame,e))) and _
+     (not(EQ(prop,"modemap"))) then
+   null (HGET($envHashTable,[x,prop])) => return nil
+   negHash := false
   prop="modemap" and $insideCapsuleFunctionIfTrue=true =>
-    LASSOC("modemap",getProplist(x,$CapsuleModemapFrame))
-      or get2(x,prop,e)
-  LASSOC(prop,getProplist(x,e)) or get2(x,prop,e)
+    ress:=LASSOC("modemap",getProplist(x,$CapsuleModemapFrame))
+         or get2(x,prop,e)
+    ress
+  ress:=LASSOC(prop,getProplist(x,e)) or get2(x,prop,e)
+  if ress and negHash then
+   SAY ["get1",x,prop,ress and true]
+  ress
 
 @
 \subsection{get2}

\start
Date: Mon, 18 Feb 2008 00:33:19 -0600
From: Tim Daly
To: list
Subject: 20080218.01.tpd.patch (add function examples)

Function examples for array1.spad and fr.spad

DONE )d op flexibleArray
DONE )d op irreducibleFactor
DONE )d op nthExponent
DONE )d op nilFactor
DONE )d op nthFlag
DONE )d op oneDimensionalArray
DONE )d op physicalLength
DONE )d op physicalLength!
DONE )d op primeFactor
DONE )d op shrinkable
DONE )d op sqfrFactor


SOME )d op coerce
SOME )d op expand
SOME )d op exponent
SOME )d op factorList
SOME )d op factors
SOME )d op length
SOME )d op makeFR
SOME )d op map
SOME )d op nthFactor
SOME )d op numberOfFactors
SOME )d op reduce
SOME )d op scan
SOME )d op select
SOME )d op unit

Tim

============================================================================
diff --git a/changelog b/changelog
index 5323199..101d2dc 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080218 tpd src/algebra/array1.spad add function examples
+20080218 tpd src/algebra/fr.spad add function examples
 20080217 wxh src/interp/i-intern.boot upload proper file. 
 20080217 tpd src/algebra/string.spad add function examples
 20080217 tpd src/algebra/curve.spad add function examples
diff --git a/src/algebra/array1.spad.pamphlet b/src/algebra/array1.spad.pamphlet
index 10456d7..b4adc3d 100644
--- a/src/algebra/array1.spad.pamphlet
+++ b/src/algebra/array1.spad.pamphlet
@@ -52,15 +52,18 @@ Note that this code is not included in the generated catdef.spad file.
 
 (DEFUN |PRIMARR;#;$Nni;1| (|x| |$|) (QVSIZE |x|)) 
 
-(PUT (QUOTE |PRIMARR;minIndex;$I;2|) (QUOTE |SPADreplace|) (QUOTE (XLAM (|x|) 0))) 
+(PUT (QUOTE |PRIMARR;minIndex;$I;2|)
+ (QUOTE |SPADreplace|) (QUOTE (XLAM (|x|) 0))) 
 
 (DEFUN |PRIMARR;minIndex;$I;2| (|x| |$|) 0) 
 
-(PUT (QUOTE |PRIMARR;empty;$;3|) (QUOTE |SPADreplace|) (QUOTE (XLAM NIL (GETREFV 0)))) 
+(PUT (QUOTE |PRIMARR;empty;$;3|)
+ (QUOTE |SPADreplace|) (QUOTE (XLAM NIL (GETREFV 0)))) 
 
 (DEFUN |PRIMARR;empty;$;3| (|$|) (GETREFV 0)) 
 
-(DEFUN |PRIMARR;new;NniS$;4| (|n| |x| |$|) (SPADCALL (GETREFV |n|) |x| (QREFELT |$| 12))) 
+(DEFUN |PRIMARR;new;NniS$;4| (|n| |x| |$|)
+ (SPADCALL (GETREFV |n|) |x| (QREFELT |$| 12))) 
 
 (PUT (QUOTE |PRIMARR;qelt;$IS;5|) (QUOTE |SPADreplace|) (QUOTE ELT)) 
 
@@ -78,13 +81,136 @@ Note that this code is not included in the generated catdef.spad file.
 
 (DEFUN |PRIMARR;setelt;$I2S;8| (|x| |i| |s| |$|) (SETELT |x| |i| |s|)) 
 
-(DEFUN |PRIMARR;fill!;$S$;9| (|x| |s| |$|) (PROG (|i| #1=#:G82338) (RETURN (SEQ (SEQ (LETT |i| 0 |PRIMARR;fill!;$S$;9|) (LETT #1# (QVMAXINDEX |x|) |PRIMARR;fill!;$S$;9|) G190 (COND ((QSGREATERP |i| #1#) (GO G191))) (SEQ (EXIT (SETELT |x| |i| |s|))) (LETT |i| (QSADD1 |i|) |PRIMARR;fill!;$S$;9|) (GO G190) G191 (EXIT NIL)) (EXIT |x|))))) 
-
-(DEFUN |PrimitiveArray| (#1=#:G82348) (PROG NIL (RETURN (PROG (#2=#:G82349) (RETURN (COND ((LETT #2# (|lassocShiftWithFunction| (LIST (|devaluate| #1#)) (HGET |$ConstructorCache| (QUOTE |PrimitiveArray|)) (QUOTE |domainEqualList|)) |PrimitiveArray|) (|CDRwithIncrement| #2#)) ((QUOTE T) (|UNWIND-PROTECT| (PROG1 (|PrimitiveArray;| #1#) (LETT #2# T |PrimitiveArray|)) (COND ((NOT #2#) (HREM |$ConstructorCache| (QUOTE |PrimitiveArray|)))))))))))) 
-
-(DEFUN |PrimitiveArray;| (|#1|) (PROG (|DV$1| |dv$| |$| #1=#:G82347 |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #2=(|PrimitiveArray|)) (LETT |dv$| (LIST (QUOTE |PrimitiveArray|) |DV$1|) . #2#) (LETT |$| (GETREFV 35) . #2#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasCategory| |#1| (QUOTE (|SetCategory|))) (|HasCategory| |#1| (QUOTE (|ConvertibleTo| (|InputForm|)))) (LETT #1# (|HasCategory| |#1| (QUOTE (|OrderedSet|))) . #2#) (OR #1# (|HasCategory| |#1| (QUOTE (|SetCategory|)))) (|HasCategory| (|Integer|) (QUOTE (|OrderedSet|))) (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) (|HasCategory| |#1| (QUOTE (|SetCategory|)))) (OR (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) #1#) (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|))) (|HasCategory| |#1| (QUOTE (|SetCategory|))))))) . #2#)) (|haddProp| |$ConstructorCache| (QUOTE |PrimitiveArray|) (LIST |DV$1|) (CONS!
 1 |$|)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) |$|)))) 
-
-(MAKEPROP (QUOTE |PrimitiveArray|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|NonNegativeInteger|) |PRIMARR;#;$Nni;1| (|Integer|) |PRIMARR;minIndex;$I;2| |PRIMARR;empty;$;3| |PRIMARR;fill!;$S$;9| |PRIMARR;new;NniS$;4| |PRIMARR;qelt;$IS;5| |PRIMARR;elt;$IS;6| |PRIMARR;qsetelt!;$I2S;7| |PRIMARR;setelt;$I2S;8| (|Mapping| 6 6 6) (|Boolean|) (|List| 6) (|Equation| 6) (|List| 21) (|Mapping| 19 6) (|Mapping| 19 6 6) (|UniversalSegment| 9) (|Void|) (|Mapping| 6 6) (|InputForm|) (|OutputForm|) (|String|) (|SingleInteger|) (|List| |$|) (|Union| 6 (QUOTE "failed")) (|List| 9))) (QUOTE #(|~=| 0 |swap!| 6 |sorted?| 13 |sort!| 24 |sort| 35 |size?| 46 |setelt| 52 |select| 66 |sample| 72 |reverse!| 76 |reverse| 81 |removeDuplicates| 86 |remove| 91 |reduce| 103 |qsetelt!| 124 |qelt| 131 |position| 137 |parts| 156 |new| 161 |more?| 167 |minIndex| 173 |min| 178 |merge| 184 |members| 197 |member?| 202 |maxIndex| 208 |max| 213 |map!| 219 |map| 225 |less?| 238 |lat!
ex| 244 |insert| 249 |indices| 263 |index?| 268 |hash| 274 |first| 279 |find| 284 |fill!| 290 |every?| 296 |eval| 302 |eq?| 328 |entry?| 334 |entries| 340 |empty?| 345 |empty| 350 |elt| 354 |delete| 373 |count| 385 |copyInto!| 397 |copy| 404 |convert| 409 |construct| 414 |concat| 419 |coerce| 442 |any?| 447 |>=| 453 |>| 459 |=| 465 |<=| 471 |<| 477 |#| 483)) (QUOTE ((|shallowlyMutable| . 0) (|finiteAggregate| . 0))) (CONS (|makeByteWordVec2| 7 (QUOTE (0 0 0 0 0 0 3 0 0 7 4 0 0 7 1 2 4))) (CONS (QUOTE #(|OneDimensionalArrayAggregate&| |FiniteLinearAggregate&| |LinearAggregate&| |IndexedAggregate&| |Collection&| |HomogeneousAggregate&| |OrderedSet&| |Aggregate&| |EltableAggregate&| |Evalable&| |SetCategory&| NIL NIL |InnerEvalable&| NIL NIL |BasicType&|)) (CONS (QUOTE #((|OneDimensionalArrayAggregate| 6) (|FiniteLinearAggregate| 6) (|LinearAggregate| 6) (|IndexedAggregate| 9 6) (|Collection| 6) (|HomogeneousAggregate| 6) (|OrderedSet|) (|Aggregate|) (|EltableAggregate| 9 6) (|!
Evalable| 6) (|SetCategory|) (|Type|) (|Eltable| 9 6) (|Inner!
Evalable| 6 6) (|CoercibleTo| 29) (|ConvertibleTo| 28) (|BasicType|))) (|makeByteWordVec2| 34 (QUOTE (2 1 19 0 0 1 3 0 26 0 9 9 1 1 3 19 0 1 2 0 19 24 0 1 1 3 0 0 1 2 0 0 24 0 1 1 3 0 0 1 2 0 0 24 0 1 2 0 19 0 7 1 3 0 6 0 25 6 1 3 0 6 0 9 6 17 2 0 0 23 0 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 2 1 0 6 0 1 2 0 0 23 0 1 4 1 6 18 0 6 6 1 3 0 6 18 0 6 1 2 0 6 18 0 1 3 0 6 0 9 6 16 2 0 6 0 9 14 2 1 9 6 0 1 3 1 9 6 0 9 1 2 0 9 23 0 1 1 0 20 0 1 2 0 0 7 6 13 2 0 19 0 7 1 1 5 9 0 10 2 3 0 0 0 1 2 3 0 0 0 1 3 0 0 24 0 0 1 1 0 20 0 1 2 1 19 6 0 1 1 5 9 0 1 2 3 0 0 0 1 2 0 0 27 0 1 3 0 0 18 0 0 1 2 0 0 27 0 1 2 0 19 0 7 1 1 1 30 0 1 3 0 0 0 0 9 1 3 0 0 6 0 9 1 1 0 34 0 1 2 0 19 9 0 1 1 1 31 0 1 1 5 6 0 1 2 0 33 23 0 1 2 0 0 0 6 12 2 0 19 23 0 1 3 6 0 0 20 20 1 2 6 0 0 21 1 3 6 0 0 6 6 1 2 6 0 0 22 1 2 0 19 0 0 1 2 1 19 6 0 1 1 0 20 0 1 1 0 19 0 1 0 0 0 11 2 0 0 0 25 1 2 0 6 0 9 15 3 0 6 0 9 6 1 2 0 0 0 9 1 2 0 0 0 25 1 2 1 7 6 0 1 2 0 7 23 0 1 3 0 0 0 0 9 1 1 0 0 0 1 1 2 28 0 1 1 0 0 2!
0 1 1 0 0 32 1 2 0 0 6 0 1 2 0 0 0 0 1 2 0 0 0 6 1 1 1 29 0 1 2 0 19 23 0 1 2 3 19 0 0 1 2 3 19 0 0 1 2 1 19 0 0 1 2 3 19 0 0 1 2 3 19 0 0 1 1 0 7 0 8)))))) (QUOTE |lookupComplete|))) 
+(DEFUN |PRIMARR;fill!;$S$;9| (|x| |s| |$|)
+ (PROG (|i| #1=#:G82338)
+  (RETURN
+   (SEQ
+    (SEQ
+     (LETT |i| 0 |PRIMARR;fill!;$S$;9|)
+     (LETT #1# (QVMAXINDEX |x|) |PRIMARR;fill!;$S$;9|)
+     G190
+     (COND ((QSGREATERP |i| #1#) (GO G191)))
+     (SEQ (EXIT (SETELT |x| |i| |s|)))
+     (LETT |i| (QSADD1 |i|) |PRIMARR;fill!;$S$;9|)
+     (GO G190)
+     G191
+    (EXIT NIL))
+   (EXIT |x|)))))
+
+(DEFUN |PrimitiveArray| (#1=#:G82348)
+ (PROG NIL
+  (RETURN 
+   (PROG (#2=#:G82349)
+    (RETURN
+     (COND
+      ((LETT #2# 
+        (|lassocShiftWithFunction|
+          (LIST (|devaluate| #1#))
+          (HGET |$ConstructorCache| (QUOTE |PrimitiveArray|))
+          (QUOTE |domainEqualList|))
+         |PrimitiveArray|)
+        (|CDRwithIncrement| #2#))
+      ((QUOTE T)
+        (|UNWIND-PROTECT|
+         (PROG1
+          (|PrimitiveArray;| #1#)
+          (LETT #2# T |PrimitiveArray|))
+         (COND
+          ((NOT #2#)
+            (HREM |$ConstructorCache| (QUOTE |PrimitiveArray|)))))))))))) 
+
+(DEFUN |PrimitiveArray;| (|#1|)
+ (PROG (|DV$1| |dv$| |$| #1=#:G82347 |pv$|)
+  (RETURN
+   (PROGN 
+    (LETT |DV$1| (|devaluate| |#1|) . #2=(|PrimitiveArray|))
+    (LETT |dv$| (LIST (QUOTE |PrimitiveArray|) |DV$1|) . #2#)
+    (LETT |$| (GETREFV 35) . #2#)
+    (QSETREFV |$| 0 |dv$|)
+    (QSETREFV |$| 3
+     (LETT |pv$|
+      (|buildPredVector| 0 0
+       (LIST 
+        (|HasCategory| |#1| (QUOTE (|SetCategory|)))
+        (|HasCategory| |#1| (QUOTE (|ConvertibleTo| (|InputForm|))))
+        (LETT #1# (|HasCategory| |#1| (QUOTE (|OrderedSet|))) . #2#)
+        (OR #1# (|HasCategory| |#1| (QUOTE (|SetCategory|))))
+        (|HasCategory| (|Integer|) (QUOTE (|OrderedSet|)))
+        (AND (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|)))
+             (|HasCategory| |#1| (QUOTE (|SetCategory|))))
+        (OR 
+         (AND 
+          (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|)))
+          #1#)
+         (AND
+          (|HasCategory| |#1| (LIST (QUOTE |Evalable|) (|devaluate| |#1|)))
+          (|HasCategory| |#1| (QUOTE (|SetCategory|)))))))
+      . #2#))
+    (|haddProp| |$ConstructorCache|
+     (QUOTE |PrimitiveArray|) (LIST |DV$1|) (CONS 1 |$|))
+    (|stuffDomainSlots| |$|)
+    (QSETREFV |$| 6 |#1|)
+    |$|)))) 
+
+(MAKEPROP (QUOTE |PrimitiveArray|) (QUOTE |infovec|)
+ (LIST 
+  (QUOTE
+   #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|NonNegativeInteger|)
+     |PRIMARR;#;$Nni;1| (|Integer|) |PRIMARR;minIndex;$I;2|
+     |PRIMARR;empty;$;3| |PRIMARR;fill!;$S$;9| |PRIMARR;new;NniS$;4|
+     |PRIMARR;qelt;$IS;5| |PRIMARR;elt;$IS;6| |PRIMARR;qsetelt!;$I2S;7|
+     |PRIMARR;setelt;$I2S;8| (|Mapping| 6 6 6) (|Boolean|) (|List| 6)
+     (|Equation| 6) (|List| 21) (|Mapping| 19 6) (|Mapping| 19 6 6)
+     (|UniversalSegment| 9) (|Void|) (|Mapping| 6 6) (|InputForm|)
+     (|OutputForm|) (|String|) (|SingleInteger|) (|List| |$|)
+     (|Union| 6 (QUOTE "failed")) (|List| 9)))
+  (QUOTE
+   #(|~=| 0 |swap!| 6 |sorted?| 13 |sort!| 24 |sort| 35 |size?| 46 |setelt|
+     52 |select| 66 |sample| 72 |reverse!| 76 |reverse| 81 |removeDuplicates|
+     86 |remove| 91 |reduce| 103 |qsetelt!| 124 |qelt| 131 |position| 137
+     |parts| 156 |new| 161 |more?| 167 |minIndex| 173 |min| 178 |merge| 184
+     |members| 197 |member?| 202 |maxIndex| 208 |max| 213 |map!| 219 |map|
+     225 |less?| 238 |latex| 244 |insert| 249 |indices| 263 |index?| 268
+     |hash| 274 |first| 279 |find| 284 |fill!| 290 |every?| 296 |eval| 302
+     |eq?| 328 |entry?| 334 |entries| 340 |empty?| 345 |empty| 350 |elt| 354
+     |delete| 373 |count| 385 |copyInto!| 397 |copy| 404 |convert| 409
+     |construct| 414 |concat| 419 |coerce| 442 |any?| 447 |>=| 453 |>| 459
+     |=| 465 |<=| 471 |<| 477 |#| 483))
+ (QUOTE ((|shallowlyMutable| . 0) (|finiteAggregate| . 0)))
+ (CONS 
+   (|makeByteWordVec2| 7 (QUOTE (0 0 0 0 0 0 3 0 0 7 4 0 0 7 1 2 4)))
+   (CONS
+    (QUOTE #(|OneDimensionalArrayAggregate&| |FiniteLinearAggregate&|
+     |LinearAggregate&| |IndexedAggregate&| |Collection&|
+     |HomogeneousAggregate&| |OrderedSet&| |Aggregate&| |EltableAggregate&|
+     |Evalable&| |SetCategory&| NIL NIL |InnerEvalable&| NIL NIL |BasicType&|))
+    (CONS
+     (QUOTE
+      #((|OneDimensionalArrayAggregate| 6) (|FiniteLinearAggregate| 6)
+        (|LinearAggregate| 6) (|IndexedAggregate| 9 6) (|Collection| 6)
+        (|HomogeneousAggregate| 6) (|OrderedSet|) (|Aggregate|)
+        (|EltableAggregate| 9 6) (|Evalable| 6) (|SetCategory|) (|Type|)
+        (|Eltable| 9 6) (|InnerEvalable| 6 6) (|CoercibleTo| 29)
+        (|ConvertibleTo| 28) (|BasicType|)))
+     (|makeByteWordVec2| 34 
+      (QUOTE
+       (2 1 19 0 0 1 3 0 26 0 9 9 1 1 3 19 0 1 2 0 19 24 0 1 1 3 0 0 1 2 0 0
+        24 0 1 1 3 0 0 1 2 0 0 24 0 1 2 0 19 0 7 1 3 0 6 0 25 6 1 3 0 6 0 9
+        6 17 2 0 0 23 0 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 2 1 0 6 0 1
+        2 0 0 23 0 1 4 1 6 18 0 6 6 1 3 0 6 18 0 6 1 2 0 6 18 0 1 3 0 6 0 9
+        6 16 2 0 6 0 9 14 2 1 9 6 0 1 3 1 9 6 0 9 1 2 0 9 23 0 1 1 0 20 0 1
+        2 0 0 7 6 13 2 0 19 0 7 1 1 5 9 0 10 2 3 0 0 0 1 2 3 0 0 0 1 3 0 0
+        24 0 0 1 1 0 20 0 1 2 1 19 6 0 1 1 5 9 0 1 2 3 0 0 0 1 2 0 0 27 0 1
+        3 0 0 18 0 0 1 2 0 0 27 0 1 2 0 19 0 7 1 1 1 30 0 1 3 0 0 0 0 9 1 3
+        0 0 6 0 9 1 1 0 34 0 1 2 0 19 9 0 1 1 1 31 0 1 1 5 6 0 1 2 0 33 23
+        0 1 2 0 0 0 6 12 2 0 19 23 0 1 3 6 0 0 20 20 1 2 6 0 0 21 1 3 6 0 0
+        6 6 1 2 6 0 0 22 1 2 0 19 0 0 1 2 1 19 6 0 1 1 0 20 0 1 1 0 19 0 1
+        0 0 0 11 2 0 0 0 25 1 2 0 6 0 9 15 3 0 6 0 9 6 1 2 0 0 0 9 1 2 0 0
+        0 25 1 2 1 7 6 0 1 2 0 7 23 0 1 3 0 0 0 0 9 1 1 0 0 0 1 1 2 28 0 1
+        1 0 0 20 1 1 0 0 32 1 2 0 0 6 0 1 2 0 0 0 0 1 2 0 0 0 6 1 1 1 29 0
+        1 2 0 19 23 0 1 2 3 19 0 0 1 2 3 19 0 0 1 2 1 19 0 0 1 2 3 19 0 0 1
+        2 3 19 0 0 1 1 0 7 0 8))))))
+ (QUOTE |lookupComplete|))) 
 @
 \section{package PRIMARR2 PrimitiveArrayFunctions2}
 <<package PRIMARR2 PrimitiveArrayFunctions2>>=
@@ -98,26 +224,37 @@ PrimitiveArrayFunctions2(A, B): Exports == Implementation where
   VB ==> PrimitiveArray B
   O2 ==> FiniteLinearAggregateFunctions2(A, VA, B, VB)
   Exports ==> with
-    scan   : ((A, B) -> B, VA, B) -> VB
-	++ scan(f,a,r) successively applies
-	++ \spad{reduce(f,x,r)} to more and more leading sub-arrays
-	++ x of primitive array \spad{a}.
-	++ More precisely, if \spad{a} is \spad{[a1,a2,...]}, then
-	++ \spad{scan(f,a,r)} returns
-	++ \spad{[reduce(f,[a1],r),reduce(f,[a1,a2],r),...]}.
-    reduce : ((A, B) -> B, VA, B) -> B
-	++ reduce(f,a,r) applies function f to each
-	++ successive element of the
-	++ primitive array \spad{a} and an accumulant initialized to r.
-	++ For example,
-	++ \spad{reduce(_+$Integer,[1,2,3],0)}
-	++ does \spad{3+(2+(1+0))}. Note: third argument r
-	++ may be regarded as the
-	++ identity element for the function f.
-    map    : (A -> B, VA) -> VB
-	++ map(f,a) applies function f to each member of primitive array
-	++ \spad{a} resulting in a new primitive array over a
-	++ possibly different underlying domain.
+   scan : ((A, B) -> B, VA, B) -> VB
+    ++ scan(f,a,r) successively applies
+    ++ \spad{reduce(f,x,r)} to more and more leading sub-arrays
+    ++ x of primitive array \spad{a}.
+    ++ More precisely, if \spad{a} is \spad{[a1,a2,...]}, then
+    ++ \spad{scan(f,a,r)} returns
+    ++ \spad{[reduce(f,[a1],r),reduce(f,[a1,a2],r),...]}.
+    ++
+    ++E T1:=PrimitiveArrayFunctions2(Integer,Integer)
+    ++E adder(a:Integer,b:Integer):Integer == a+b
+    ++E scan(adder,[i for i in 1..10],0)$T1
+   
+   reduce : ((A, B) -> B, VA, B) -> B
+    ++ reduce(f,a,r) applies function f to each
+    ++ successive element of the
+    ++ primitive array \spad{a} and an accumulant initialized to r.
+    ++ For example, \spad{reduce(_+$Integer,[1,2,3],0)}
+    ++ does \spad{3+(2+(1+0))}. Note: third argument r
+    ++ may be regarded as the identity element for the function f.
+    ++
+    ++E T1:=PrimitiveArrayFunctions2(Integer,Integer)
+    ++E adder(a:Integer,b:Integer):Integer == a+b
+    ++E reduce(adder,[i for i in 1..10],0)$T1
+
+   map : (A -> B, VA) -> VB
+    ++ map(f,a) applies function f to each member of primitive array
+    ++ \spad{a} resulting in a new primitive array over a
+    ++ possibly different underlying domain.
+    ++
+    ++E T1:=PrimitiveArrayFunctions2(Integer,Integer)
+    ++E map(x+->x+2,[i for i in 1..10])$T1
 
   Implementation ==> add
     map(f, v)       == map(f, v)$O2
@@ -132,12 +269,26 @@ PrimitiveArrayFunctions2(A, B): Exports == Implementation where
 ++ of comma-delimited sequences of values.
 Tuple(S:Type): CoercibleTo(PrimitiveArray S) with
   coerce: PrimitiveArray S -> %
-	++ coerce(a) makes a tuple from primitive array a
+   ++ coerce(a) makes a tuple from primitive array a
+   ++
+   ++E t1:PrimitiveArray(Integer):= [i for i in 1..10]
+   ++E t2:=coerce(t1)$Tuple(Integer)
+
   select: (%, NonNegativeInteger) -> S
-	++ select(x,n) returns the n-th element of tuple x.
-	++ tuples are 0-based
+   ++ select(x,n) returns the n-th element of tuple x.
+   ++ tuples are 0-based
+   ++
+   ++E t1:PrimitiveArray(Integer):= [i for i in 1..10]
+   ++E t2:=coerce(t1)$Tuple(Integer)
+   ++E select(t2,3)
+
   length: % -> NonNegativeInteger
-	++ length(x) returns the number of elements in tuple x
+   ++ length(x) returns the number of elements in tuple x
+   ++
+   ++E t1:PrimitiveArray(Integer):= [i for i in 1..10]
+   ++E t2:=coerce(t1)$Tuple(Integer)
+   ++E length(t2)
+
   if S has SetCategory then SetCategory
  == add
   Rep := Record(len : NonNegativeInteger, elts : PrimitiveArray S)
@@ -182,15 +333,36 @@ IndexedFlexibleArray(S:Type, mn: Integer): Exports == Implementation where
   N ==> NonNegativeInteger
   U ==> UniversalSegment Integer
   Exports ==
-    Join(OneDimensionalArrayAggregate S,ExtensibleLinearAggregate S) with
-      flexibleArray : List S -> %
-	++ flexibleArray(l) creates a flexible array from the list of elements l
-      physicalLength : % -> NonNegativeInteger
-   	++ physicalLength(x) returns the number of elements x can accomodate before growing
-      physicalLength_!: (%, I) -> %
-	++ physicalLength!(x,n) changes the physical length of x to be n and returns the new array.
-      shrinkable: Boolean -> Boolean
-	++ shrinkable(b) sets the shrinkable attribute of flexible arrays to b and returns the previous value
+   Join(OneDimensionalArrayAggregate S,ExtensibleLinearAggregate S) with
+    flexibleArray : List S -> %
+     ++ flexibleArray(l) creates a flexible array from the list of elements l
+     ++
+     ++E T1:=IndexedFlexibleArray(Integer,20)
+     ++E flexibleArray([i for i in 1..10])$T1
+
+    physicalLength : % -> NonNegativeInteger
+     ++ physicalLength(x) returns the number of elements x can 
+     ++ accomodate before growing
+     ++
+     ++E T1:=IndexedFlexibleArray(Integer,20)
+     ++E t2:=flexibleArray([i for i in 1..10])$T1
+     ++E physicalLength t2
+
+    physicalLength_!: (%, I) -> %
+     ++ physicalLength!(x,n) changes the physical length of x to be n and
+     ++ returns the new array.
+     ++
+     ++E T1:=IndexedFlexibleArray(Integer,20)
+     ++E t2:=flexibleArray([i for i in 1..10])$T1
+     ++E physicalLength!(t2,15)
+
+    shrinkable: Boolean -> Boolean
+     ++ shrinkable(b) sets the shrinkable attribute of flexible arrays to b
+     ++ and returns the previous value
+     ++
+     ++E T1:=IndexedFlexibleArray(Integer,20)
+     ++E shrinkable(false)$T1
+
   Implementation == add
     Rep := Record(physLen:I, logLen:I, f:A)
     shrinkable? : Boolean := true
@@ -256,7 +428,8 @@ IndexedFlexibleArray(S:Type, mn: Integer): Exports == Implementation where
        negative?(n := r.logLen) => error "internal bug in flexible array"
        2*n+2 > r.physLen => r
        not shrinkable? => r
-       if n < r.logLen then error "cannot shrink flexible array to indicated size"
+       if n < r.logLen 
+         then error "cannot shrink flexible array to indicated size"
        n = 0 => empty()
        r.physLen := n
        y := newa(n::N, a := r.f)
@@ -911,10 +1084,16 @@ o $AXIOM/doc/src/algebra/array1.spad.dvi
 OneDimensionalArray(S:Type): Exports == Implementation where
   ARRAYMININDEX ==> 1       -- if you want to change this, be my guest
   Exports == OneDimensionalArrayAggregate S with
-    oneDimensionalArray: List S -> %
-	++ oneDimensionalArray(l) creates an array from a list of elements l
-    oneDimensionalArray: (NonNegativeInteger, S) -> %
-	++ oneDimensionalArray(n,s) creates an array from n copies of element s
+   oneDimensionalArray: List S -> %
+    ++ oneDimensionalArray(l) creates an array from a list of elements l
+    ++
+    ++E oneDimensionalArray [i**2 for i in 1..10]
+  
+   oneDimensionalArray: (NonNegativeInteger, S) -> %
+    ++ oneDimensionalArray(n,s) creates an array from n copies of element s
+    ++
+    ++E oneDimensionalArray(10,0.0)
+
   Implementation == IndexedOneDimensionalArray(S, ARRAYMININDEX) add
     oneDimensionalArray(u) ==
       n := #u
@@ -938,26 +1117,37 @@ OneDimensionalArrayFunctions2(A, B): Exports == Implementation where
   O2 ==> FiniteLinearAggregateFunctions2(A, VA, B, VB)
 
   Exports ==> with
-    scan   : ((A, B) -> B, VA, B) -> VB
-	++ scan(f,a,r) successively applies
-	++ \spad{reduce(f,x,r)} to more and more leading sub-arrays
-	++ x of one-dimensional array \spad{a}.
-	++ More precisely, if \spad{a} is \spad{[a1,a2,...]}, then
-	++ \spad{scan(f,a,r)} returns
-	++ \spad{[reduce(f,[a1],r),reduce(f,[a1,a2],r),...]}.
-    reduce : ((A, B) -> B, VA, B) -> B
-	++ reduce(f,a,r) applies function f to each
-	++ successive element of the
-	++ one-dimensional array \spad{a} and an accumulant initialized to r.
-	++ For example,
-	++ \spad{reduce(_+$Integer,[1,2,3],0)}
-	++ does \spad{3+(2+(1+0))}. Note: third argument r
-	++ may be regarded as the
-	++ identity element for the function f.
-    map    : (A -> B, VA) -> VB
-	++ map(f,a) applies function f to each member of one-dimensional array
-	++ \spad{a} resulting in a new one-dimensional array over a
-	++ possibly different underlying domain.
+   scan   : ((A, B) -> B, VA, B) -> VB
+    ++ scan(f,a,r) successively applies
+    ++ \spad{reduce(f,x,r)} to more and more leading sub-arrays
+    ++ x of one-dimensional array \spad{a}.
+    ++ More precisely, if \spad{a} is \spad{[a1,a2,...]}, then
+    ++ \spad{scan(f,a,r)} returns
+    ++ \spad{[reduce(f,[a1],r),reduce(f,[a1,a2],r),...]}.
+    ++
+    ++E T1:=OneDimensionalArrayFunctions2(Integer,Integer)
+    ++E adder(a:Integer,b:Integer):Integer == a+b
+    ++E scan(adder,[i for i in 1..10],0)$T1
+
+   reduce : ((A, B) -> B, VA, B) -> B
+    ++ reduce(f,a,r) applies function f to each
+    ++ successive element of the
+    ++ one-dimensional array \spad{a} and an accumulant initialized to r.
+    ++ For example, \spad{reduce(_+$Integer,[1,2,3],0)}
+    ++ does \spad{3+(2+(1+0))}. Note: third argument r
+    ++ may be regarded as the identity element for the function f.
+    ++
+    ++E T1:=OneDimensionalArrayFunctions2(Integer,Integer)
+    ++E adder(a:Integer,b:Integer):Integer == a+b
+    ++E reduce(adder,[i for i in 1..10],0)$T1
+
+   map : (A -> B, VA) -> VB
+    ++ map(f,a) applies function f to each member of one-dimensional array
+    ++ \spad{a} resulting in a new one-dimensional array over a
+    ++ possibly different underlying domain.
+    ++
+    ++E T1:=OneDimensionalArrayFunctions2(Integer,Integer)
+    ++E map(x+->x+2,[i for i in 1..10])$T1
 
   Implementation ==> add
     map(f, v)       == map(f, v)$O2
diff --git a/src/algebra/fr.spad.pamphlet b/src/algebra/fr.spad.pamphlet
index ad4853a..8c4c8f0 100644
--- a/src/algebra/fr.spad.pamphlet
+++ b/src/algebra/fr.spad.pamphlet
@@ -669,97 +669,151 @@ Factored(R: IntegralDomain): Exports == Implementation where
 
   Exports ==> Join(IntegralDomain, DifferentialExtension R, Algebra R,
                    FullyEvalableOver R, FullyRetractableTo R) with
-    expand: % -> R
-      ++ expand(f) multiplies the unit and factors together, yielding an
-      ++ "unfactored" object. Note: this is purposely not called \spadfun{coerce} which would
-      ++ cause the interpreter to do this automatically.
-
-    exponent:  % -> Integer
-      ++ exponent(u) returns the exponent of the first factor of
-      ++ \spadvar{u}, or 0 if the factored form consists solely of a unit.
-
-    makeFR  : (R, List FF) -> %
-      ++ makeFR(unit,listOfFactors) creates a factored object (for
-      ++ use by factoring code).
-
-    factorList : % -> List FF
-      ++ factorList(u) returns the list of factors with flags (for
-      ++ use by factoring code).
-
-    nilFactor: (R, Integer) -> %
-      ++ nilFactor(base,exponent) creates a factored object with
-      ++ a single factor with no information about the kind of
-      ++ base (flag = "nil").
-
-    factors: % -> List Record(factor:R, exponent:Integer)
-      ++ factors(u) returns a list of the factors in a form suitable
-      ++ for iteration. That is, it returns a list where each element
-      ++ is a record containing a base and exponent.  The original
-      ++ object is the product of all the factors and the unit (which
-      ++ can be extracted by \axiom{unit(u)}).
-
-    irreducibleFactor: (R, Integer) -> %
-      ++ irreducibleFactor(base,exponent) creates a factored object with
-      ++ a single factor whose base is asserted to be irreducible
-      ++ (flag = "irred").
-
-    nthExponent: (%, Integer) -> Integer
-      ++ nthExponent(u,n) returns the exponent of the nth factor of
-      ++ \spadvar{u}.  If \spadvar{n} is not a valid index for a factor
-      ++ (for example, less than 1 or too big), 0 is returned.
-
-    nthFactor:  (%,Integer) -> R
-      ++ nthFactor(u,n) returns the base of the nth factor of
-      ++ \spadvar{u}.  If \spadvar{n} is not a valid index for a factor
-      ++ (for example, less than 1 or too big), 1 is returned.  If
-      ++ \spadvar{u} consists only of a unit, the unit is returned.
-
-    nthFlag:    (%,Integer) -> fUnion
-      ++ nthFlag(u,n) returns the information flag of the nth factor of
-      ++ \spadvar{u}.  If \spadvar{n} is not a valid index for a factor
-      ++ (for example, less than 1 or too big), "nil" is returned.
-
-    numberOfFactors : %  -> NonNegativeInteger
-      ++ numberOfFactors(u) returns the number of factors in \spadvar{u}.
-
-    primeFactor:   (R,Integer) -> %
-      ++ primeFactor(base,exponent) creates a factored object with
-      ++ a single factor whose base is asserted to be prime
-      ++ (flag = "prime").
-
-    sqfrFactor:   (R,Integer) -> %
-      ++ sqfrFactor(base,exponent) creates a factored object with
-      ++ a single factor whose base is asserted to be square-free
-      ++ (flag = "sqfr").
-
-    flagFactor: (R,Integer, fUnion) -> %
-      ++ flagFactor(base,exponent,flag) creates a factored object with
-      ++ a single factor whose base is asserted to be properly
-      ++ described by the information flag.
-
-    unit:    % -> R
-      ++ unit(u) extracts the unit part of the factorization.
-
-    unitNormalize: % -> %
-      ++ unitNormalize(u) normalizes the unit part of the factorization.
-      ++ For example, when working with factored integers, this operation will
-      ++ ensure that the bases are all positive integers.
-
-    map:     (R -> R, %) -> %
-      ++ map(fn,u) maps the function \userfun{fn} across the factors of
-      ++ \spadvar{u} and creates a new factored object. Note: this clears
-      ++ the information flags (sets them to "nil") because the effect of
-      ++ \userfun{fn} is clearly not known in general.
+   expand: % -> R
+    ++ expand(f) multiplies the unit and factors together, yielding an
+    ++ "unfactored" object. Note: this is purposely not called 
+    ++ \spadfun{coerce} which would cause the interpreter to do this 
+    ++ automatically.
+    ++
+    ++E f:=nilFactor(y-x,3)
+    ++E expand(f)
+
+   exponent:  % -> Integer
+    ++ exponent(u) returns the exponent of the first factor of
+    ++ \spadvar{u}, or 0 if the factored form consists solely of a unit.
+    ++
+    ++E f:=nilFactor(y-x,3)
+    ++E exponent(f)
+
+   makeFR  : (R, List FF) -> %
+    ++ makeFR(unit,listOfFactors) creates a factored object (for
+    ++ use by factoring code).
+    ++
+    ++E f:=nilFactor(x-y,3)
+    ++E g:=factorList f
+    ++E makeFR(z,g)
+
+   factorList : % -> List FF
+    ++ factorList(u) returns the list of factors with flags (for
+    ++ use by factoring code).
+    ++
+    ++E f:=nilFactor(x-y,3)
+    ++E factorList f
+
+   nilFactor: (R, Integer) -> %
+    ++ nilFactor(base,exponent) creates a factored object with
+    ++ a single factor with no information about the kind of
+    ++ base (flag = "nil").
+    ++
+    ++E nilFactor(24,2)
+    ++E nilFactor(x-y,3)
+
+   factors: % -> List Record(factor:R, exponent:Integer)
+    ++ factors(u) returns a list of the factors in a form suitable
+    ++ for iteration. That is, it returns a list where each element
+    ++ is a record containing a base and exponent.  The original
+    ++ object is the product of all the factors and the unit (which
+    ++ can be extracted by \axiom{unit(u)}).
+    ++
+    ++E f:=x*y^3-3*x^2*y^2+3*x^3*y-x^4
+    ++E factors f
+    ++E g:=makeFR(z,factorList f)
+    ++E factors g
+
+   irreducibleFactor: (R, Integer) -> %
+    ++ irreducibleFactor(base,exponent) creates a factored object with
+    ++ a single factor whose base is asserted to be irreducible
+    ++ (flag = "irred").
+    ++
+    ++E a:=irreducibleFactor(3,1)
+    ++E nthFlag(a,1)
+
+   nthExponent: (%, Integer) -> Integer
+    ++ nthExponent(u,n) returns the exponent of the nth factor of
+    ++ \spadvar{u}.  If \spadvar{n} is not a valid index for a factor
+    ++ (for example, less than 1 or too big), 0 is returned.
+    ++
+    ++E a:=factor 9720000
+    ++E nthExponent(a,2)
+
+   nthFactor:  (%,Integer) -> R
+    ++ nthFactor(u,n) returns the base of the nth factor of
+    ++ \spadvar{u}.  If \spadvar{n} is not a valid index for a factor
+    ++ (for example, less than 1 or too big), 1 is returned.  If
+    ++ \spadvar{u} consists only of a unit, the unit is returned.
+    ++
+    ++E a:=factor 9720000
+    ++E nthFactor(a,2)
+
+   nthFlag:    (%,Integer) -> fUnion
+    ++ nthFlag(u,n) returns the information flag of the nth factor of
+    ++ \spadvar{u}.  If \spadvar{n} is not a valid index for a factor
+    ++ (for example, less than 1 or too big), "nil" is returned.
+    ++
+    ++E a:=factor 9720000
+    ++E nthFlag(a,2)
+
+   numberOfFactors : %  -> NonNegativeInteger
+    ++ numberOfFactors(u) returns the number of factors in \spadvar{u}.
+    ++
+    ++E a:=factor 9720000
+    ++E numberOfFactors a
+
+   primeFactor:   (R,Integer) -> %
+    ++ primeFactor(base,exponent) creates a factored object with
+    ++ a single factor whose base is asserted to be prime
+    ++ (flag = "prime").
+    ++
+    ++E a:=primeFactor(3,4)
+    ++E nthFlag(a,1)
+
+   sqfrFactor:   (R,Integer) -> %
+    ++ sqfrFactor(base,exponent) creates a factored object with
+    ++ a single factor whose base is asserted to be square-free
+    ++ (flag = "sqfr").
+    ++
+    ++E a:=sqfrFactor(3,5)
+    ++E nthFlag(a,1)
+
+   flagFactor: (R,Integer, fUnion) -> %
+    ++ flagFactor(base,exponent,flag) creates a factored object with
+    ++ a single factor whose base is asserted to be properly
+    ++ described by the information flag.
+
+   unit:    % -> R
+    ++ unit(u) extracts the unit part of the factorization.
+    ++
+    ++E f:=x*y^3-3*x^2*y^2+3*x^3*y-x^4
+    ++E unit f
+    ++E g:=makeFR(z,factorList f)
+    ++E unit g
+
+   unitNormalize: % -> %
+    ++ unitNormalize(u) normalizes the unit part of the factorization.
+    ++ For example, when working with factored integers, this operation will
+    ++ ensure that the bases are all positive integers.
+
+   map:     (R -> R, %) -> %
+    ++ map(fn,u) maps the function \userfun{fn} across the factors of
+    ++ \spadvar{u} and creates a new factored object. Note: this clears
+    ++ the information flags (sets them to "nil") because the effect of
+    ++ \userfun{fn} is clearly not known in general.
+    ++
+    ++E m(a:Factored Polynomial Integer):Factored Polynomial Integer == a^2
+    ++E f:=x*y^3-3*x^2*y^2+3*x^3*y-x^4
+    ++E map(m,f)
+    ++E g:=makeFR(z,factorList f)
+    ++E map(m,g)
 
     -- the following operations are conditional on R
 
-    if R has GcdDomain then GcdDomain
-    if R has RealConstant then RealConstant
-    if R has UniqueFactorizationDomain then UniqueFactorizationDomain
+   if R has GcdDomain then GcdDomain
+   if R has RealConstant then RealConstant
+   if R has UniqueFactorizationDomain then UniqueFactorizationDomain
 
-    if R has ConvertibleTo InputForm then ConvertibleTo InputForm
+   if R has ConvertibleTo InputForm then ConvertibleTo InputForm
 
-    if R has IntegerNumberSystem then
+   if R has IntegerNumberSystem then
       rational?    : % -> Boolean
         ++ rational?(u) tests if \spadvar{u} is actually a
         ++ rational number (see \spadtype{Fraction Integer}).
@@ -771,9 +825,9 @@ Factored(R: IntegralDomain): Exports == Implementation where
         ++ rationalIfCan(u) returns a rational number if u
         ++ really is one, and "failed" otherwise.
 
-    if R has Eltable(%, %) then Eltable(%, %)
-    if R has Evalable(%) then Evalable(%)
-    if R has InnerEvalable(Symbol, %) then InnerEvalable(Symbol, %)
+   if R has Eltable(%, %) then Eltable(%, %)
+   if R has Evalable(%) then Evalable(%)
+   if R has InnerEvalable(Symbol, %) then InnerEvalable(Symbol, %)
 
   Implementation ==> add
 
\start
Date: Mon, 18 Feb 2008 19:27:25 -0600
From: Tim Daly
To: list
Subject: 20080218.02.tpd.patch (add function examples)

Add additional examples for functions from tree.spad, bags.spad and
array2.spad, namely

DONE )d op arrayStack
DONE )d op balancedBinaryTree
DONE )d op binarySearchTree
DONE )d op binaryTournament
DONE )d op binaryTree
DONE )d op cyclicCopy
DONE )d op cyclicEntries
DONE )d op cyclicEqual?
DONE )d op cyclicParents
DONE )d op heap
DONE )d op insertRoot!
DONE )d op mapDown!
DONE )d op mapUp!
DONE )d op ptree
DONE )d op queue
DONE )d op setColumn!
DONE )d op setleaves!
DONE )d op setRow!
DONE )d op stack
DONE )d op tree


SOME )d op coerce
SOME )d op column
SOME )d op cyclic?
SOME )d op dequeue
SOME )d op elt
SOME )d op fill!
SOME )d op insert!
SOME )d op map
SOME )d op map!
SOME )d op maxColIndex
SOME )d op maxRowIndex
SOME )d op minColIndex
SOME )d op minRowIndex
SOME )d op ncols
SOME )d op nrows
SOME )d op new
SOME )d op parts
SOME )d op qelt
SOME )d op qsetelt!
SOME )d op row
SOME )d op setelt
SOME )d op split

Tim

========================================================================
diff --git a/changelog b/changelog
index 101d2dc..c36de76 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20080218 tpd src/algebra/tree.spad add function examples
+20080218 tpd src/algebra/bags.spad add function examples
+20080218 tpd src/algebra/array2.spad add function examples
 20080218 tpd src/algebra/array1.spad add function examples
 20080218 tpd src/algebra/fr.spad add function examples
 20080217 wxh src/interp/i-intern.boot upload proper file. 
diff --git a/src/algebra/array2.spad.pamphlet b/src/algebra/array2.spad.pamphlet
index 38f6ba0..e6a8b7a 100644
--- a/src/algebra/array2.spad.pamphlet
+++ b/src/algebra/array2.spad.pamphlet
@@ -10,6 +10,15 @@
 \tableofcontents
 \eject
 \section{category ARR2CAT TwoDimensionalArrayCategory}
+TwoDimensionalArrayCategory is a general array category which
+allows different representations and indexing schemes.
+Rows and columns may be extracted with rows returned as objects
+of type Row and columns returned as objects of type Col.
+The index of the 'first' row may be obtained by calling the
+function 'minRowIndex'.  The index of the 'first' column may
+be obtained by calling the function 'minColIndex'.  The index of
+the first element of a 'Row' is the same as the index of the
+first column in an array and vice versa.
 <<category ARR2CAT TwoDimensionalArrayCategory>>=
 )abbrev category ARR2CAT TwoDimensionalArrayCategory
 ++ Two dimensional array categories and domains
@@ -20,105 +29,190 @@
 ++ Examples:
 ++ References:
 TwoDimensionalArrayCategory(R,Row,Col): Category == Definition where
-  ++ TwoDimensionalArrayCategory is a general array category which
-  ++ allows different representations and indexing schemes.
-  ++ Rows and columns may be extracted with rows returned as objects
-  ++ of type Row and columns returned as objects of type Col.
-  ++ The index of the 'first' row may be obtained by calling the
-  ++ function 'minRowIndex'.  The index of the 'first' column may
-  ++ be obtained by calling the function 'minColIndex'.  The index of
-  ++ the first element of a 'Row' is the same as the index of the
-  ++ first column in an array and vice versa.
-  R   : Type
-  Row : FiniteLinearAggregate R
-  Col : FiniteLinearAggregate R
+ R   : Type
+ Row : FiniteLinearAggregate R
+ Col : FiniteLinearAggregate R
 
-  Definition == HomogeneousAggregate(R) with
+ Definition == HomogeneousAggregate(R) with
 
-    shallowlyMutable
-      ++ one may destructively alter arrays
+   shallowlyMutable
+    ++ one may destructively alter arrays
 
-    finiteAggregate
-      ++ two-dimensional arrays are finite
+   finiteAggregate
+    ++ two-dimensional arrays are finite
 
 --% Array creation
 
-    new: (NonNegativeInteger,NonNegativeInteger,R) -> %
-      ++ new(m,n,r) is an m-by-n array all of whose entries are r
-    fill_!: (%,R) -> %
-      ++ fill!(m,r) fills m with r's
+   new: (NonNegativeInteger,NonNegativeInteger,R) -> %
+    ++ new(m,n,r) is an m-by-n array all of whose entries are r
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,0)
+    
+   fill_!: (%,R) -> %
+    ++ fill!(m,r) fills m with r's
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,0)
+    ++E fill!(arr,10)
 
 --% Size inquiries
 
-    minRowIndex : % -> Integer
-      ++ minRowIndex(m) returns the index of the 'first' row of the array m
-    maxRowIndex : % -> Integer
-      ++ maxRowIndex(m) returns the index of the 'last' row of the array m
-    minColIndex : % -> Integer
-      ++ minColIndex(m) returns the index of the 'first' column of the array m
-    maxColIndex : % -> Integer
-      ++ maxColIndex(m) returns the index of the 'last' column of the array m
-    nrows : % -> NonNegativeInteger
-      ++ nrows(m) returns the number of rows in the array m
-    ncols : % -> NonNegativeInteger
-      ++ ncols(m) returns the number of columns in the array m
+   minRowIndex : % -> Integer
+    ++ minRowIndex(m) returns the index of the 'first' row of the array m
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E minRowIndex(arr)
+
+   maxRowIndex : % -> Integer
+    ++ maxRowIndex(m) returns the index of the 'last' row of the array m
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E maxRowIndex(arr)
+
+   minColIndex : % -> Integer
+    ++ minColIndex(m) returns the index of the 'first' column of the array m
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E minColIndex(arr)
+
+   maxColIndex : % -> Integer
+    ++ maxColIndex(m) returns the index of the 'last' column of the array m
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E maxColIndex(arr)
+
+   nrows : % -> NonNegativeInteger
+    ++ nrows(m) returns the number of rows in the array m
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E nrows(arr)
+
+   ncols : % -> NonNegativeInteger
+    ++ ncols(m) returns the number of columns in the array m
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E ncols(arr)
 
 --% Part extractions
 
-    elt: (%,Integer,Integer) -> R
-      ++ elt(m,i,j) returns the element in the ith row and jth
-      ++ column of the array m
-      ++ error check to determine if indices are in proper ranges
-    qelt: (%,Integer,Integer) -> R
-      ++ qelt(m,i,j) returns the element in the ith row and jth
-      ++ column of the array m
-      ++ NO error check to determine if indices are in proper ranges
-    elt: (%,Integer,Integer,R) -> R
-      ++ elt(m,i,j,r) returns the element in the ith row and jth
-      ++ column of the array m, if m has an ith row and a jth column,
-      ++ and returns r otherwise
-    row: (%,Integer) -> Row
-      ++ row(m,i) returns the ith row of m
-      ++ error check to determine if index is in proper ranges
-    column: (%,Integer) -> Col
-      ++ column(m,j) returns the jth column of m
-      ++ error check to determine if index is in proper ranges
-    parts: % -> List R
-      ++ parts(m) returns a list of the elements of m in row major order
+   elt: (%,Integer,Integer) -> R
+    ++ elt(m,i,j) returns the element in the ith row and jth
+    ++ column of the array m
+    ++ error check to determine if indices are in proper ranges
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E elt(arr,1,1)
+
+   qelt: (%,Integer,Integer) -> R
+    ++ qelt(m,i,j) returns the element in the ith row and jth
+    ++ column of the array m
+    ++ NO error check to determine if indices are in proper ranges
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E qelt(arr,1,1)
+
+   elt: (%,Integer,Integer,R) -> R
+    ++ elt(m,i,j,r) returns the element in the ith row and jth
+    ++ column of the array m, if m has an ith row and a jth column,
+    ++ and returns r otherwise
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E elt(arr,1,1,6)
+    ++E elt(arr,1,10,6)
+
+   row: (%,Integer) -> Row
+    ++ row(m,i) returns the ith row of m
+    ++ error check to determine if index is in proper ranges
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E row(arr,1)
+
+   column: (%,Integer) -> Col
+    ++ column(m,j) returns the jth column of m
+    ++ error check to determine if index is in proper ranges
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E column(arr,1)
+
+   parts: % -> List R
+    ++ parts(m) returns a list of the elements of m in row major order
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E parts(arr)
 
 --% Part assignments
 
-    setelt: (%,Integer,Integer,R) -> R
-      -- will become setelt_!
-      ++ setelt(m,i,j,r) sets the element in the ith row and jth
-      ++ column of m to r
-      ++ error check to determine if indices are in proper ranges
-    qsetelt_!: (%,Integer,Integer,R) -> R
-      ++ qsetelt!(m,i,j,r) sets the element in the ith row and jth
-      ++ column of m to r
-      ++ NO error check to determine if indices are in proper ranges
-    setRow_!: (%,Integer,Row) -> %
-      ++ setRow!(m,i,v) sets to ith row of m to v
-    setColumn_!: (%,Integer,Col) -> %
-      ++ setColumn!(m,j,v) sets to jth column of m to v
+   setelt: (%,Integer,Integer,R) -> R
+    -- will become setelt_!
+    ++ setelt(m,i,j,r) sets the element in the ith row and jth
+    ++ column of m to r
+    ++ error check to determine if indices are in proper ranges
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,0)
+    ++E setelt(arr,1,1,17)
+
+   qsetelt_!: (%,Integer,Integer,R) -> R
+    ++ qsetelt!(m,i,j,r) sets the element in the ith row and jth
+    ++ column of m to r
+    ++ NO error check to determine if indices are in proper ranges
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,0)
+    ++E qsetelt!(arr,1,1,17)
+
+   setRow_!: (%,Integer,Row) -> %
+    ++ setRow!(m,i,v) sets to ith row of m to v
+    ++
+    ++E T1:=TwoDimensionalArray Integer
+    ++E arr:T1:= new(5,4,0)
+    ++E T2:=OneDimensionalArray Integer
+    ++E arow:=construct([1,2,3,4]::List(INT))$T2
+    ++E setRow!(arr,1,arow)$T1
+
+   setColumn_!: (%,Integer,Col) -> %
+    ++ setColumn!(m,j,v) sets to jth column of m to v
+    ++
+    ++E T1:=TwoDimensionalArray Integer
+    ++E arr:T1:= new(5,4,0)
+    ++E T2:=OneDimensionalArray Integer
+    ++E acol:=construct([1,2,3,4,5]::List(INT))$T2
+    ++E setColumn!(arr,1,acol)$T1
 
 --% Map and Zip
 
-    map: (R -> R,%) -> %
-      ++ map(f,a) returns \spad{b}, where \spad{b(i,j) = f(a(i,j))} for all \spad{i, j}
-    map_!: (R -> R,%) -> %
-      ++ map!(f,a)  assign \spad{a(i,j)} to \spad{f(a(i,j))} for all \spad{i, j}
-    map:((R,R) -> R,%,%) -> %
-      ++ map(f,a,b) returns \spad{c}, where \spad{c(i,j) = f(a(i,j),b(i,j))}
-      ++ for all \spad{i, j}
-    map:((R,R) -> R,%,%,R) -> %
-      ++ map(f,a,b,r) returns \spad{c}, where \spad{c(i,j) = f(a(i,j),b(i,j))} when both
-      ++ \spad{a(i,j)} and \spad{b(i,j)} exist;
-      ++ else \spad{c(i,j) = f(r, b(i,j))} when \spad{a(i,j)} does not exist;
-      ++ else \spad{c(i,j) = f(a(i,j),r)} when \spad{b(i,j)} does not exist;
-      ++ otherwise \spad{c(i,j) = f(r,r)}.
-
-   add
+   map: (R -> R,%) -> %
+    ++ map(f,a) returns \spad{b}, where \spad{b(i,j) = f(a(i,j))} 
+    ++ for all \spad{i, j}
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E map(-,arr)
+    ++E map((x +-> x + x),arr)
+
+   map_!: (R -> R,%) -> %
+    ++ map!(f,a)  assign \spad{a(i,j)} to \spad{f(a(i,j))} for all \spad{i, j}
+    ++
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E map!(-,arr)
+
+   map:((R,R) -> R,%,%) -> %
+    ++ map(f,a,b) returns \spad{c}, where \spad{c(i,j) = f(a(i,j),b(i,j))}
+    ++ for all \spad{i, j}
+    ++
+    ++E adder(a:Integer,b:Integer):Integer == a+b
+    ++E arr : ARRAY2 INT := new(5,4,10)
+    ++E map(adder,arr,arr)
+
+   map:((R,R) -> R,%,%,R) -> %
+    ++ map(f,a,b,r) returns \spad{c}, where \spad{c(i,j) = f(a(i,j),b(i,j))}
+    ++ when both \spad{a(i,j)} and \spad{b(i,j)} exist;
+    ++ else \spad{c(i,j) = f(r, b(i,j))} when \spad{a(i,j)} does not exist;
+    ++ else \spad{c(i,j) = f(a(i,j),r)} when \spad{b(i,j)} does not exist;
+    ++ otherwise \spad{c(i,j) = f(r,r)}.
+    ++
+    ++E adder(a:Integer,b:Integer):Integer == a+b
+    ++E arr1 : ARRAY2 INT := new(5,4,10)
+    ++E arr2 : ARRAY2 INT := new(3,3,10)
+    ++E map(adder,arr1,arr2,17)
+
+  add
 
 --% Predicates
 
@@ -276,12 +370,12 @@ TwoDimensionalArrayCategory(R,Row,Col): Category == Definition where
 
 @
 \section{domain IIARRAY2 InnerIndexedTwoDimensionalArray}
+This is an internal type which provides an implementation of
+2-dimensional arrays as PrimitiveArray's of PrimitiveArray's.
 <<domain IIARRAY2 InnerIndexedTwoDimensionalArray>>=
 )abbrev domain IIARRAY2 InnerIndexedTwoDimensionalArray
 InnerIndexedTwoDimensionalArray(R,mnRow,mnCol,Row,Col):_
        Exports == Implementation where
-  ++ This is an internal type which provides an implementation of
-  ++ 2-dimensional arrays as PrimitiveArray's of PrimitiveArray's.
   R : Type
   mnRow, mnCol : Integer
   Row : FiniteLinearAggregate R
@@ -363,18 +457,18 @@ InnerIndexedTwoDimensionalArray(R,mnRow,mnCol,Row,Col):_
 
 @
 \section{domain IARRAY2 IndexedTwoDimensionalArray}
+An IndexedTwoDimensionalArray is a 2-dimensional array where
+the minimal row and column indices are parameters of the type.
+Rows and columns are returned as IndexedOneDimensionalArray's with
+minimal indices matching those of the IndexedTwoDimensionalArray.
+The index of the 'first' row may be obtained by calling the
+function 'minRowIndex'.  The index of the 'first' column may
+be obtained by calling the function 'minColIndex'.  The index of
+the first element of a 'Row' is the same as the index of the
+first column in an array and vice versa.
 <<domain IARRAY2 IndexedTwoDimensionalArray>>=
 )abbrev domain IARRAY2 IndexedTwoDimensionalArray
 IndexedTwoDimensionalArray(R,mnRow,mnCol):Exports == Implementation where
-  ++ An IndexedTwoDimensionalArray is a 2-dimensional array where
-  ++ the minimal row and column indices are parameters of the type.
-  ++ Rows and columns are returned as IndexedOneDimensionalArray's with
-  ++ minimal indices matching those of the IndexedTwoDimensionalArray.
-  ++ The index of the 'first' row may be obtained by calling the
-  ++ function 'minRowIndex'.  The index of the 'first' column may
-  ++ be obtained by calling the function 'minColIndex'.  The index of
-  ++ the first element of a 'Row' is the same as the index of the
-  ++ first column in an array and vice versa.
   R : Type
   mnRow, mnCol : Integer
   Row ==> IndexedOneDimensionalArray(R,mnCol)
@@ -883,7 +977,6 @@ TwoDimensionalArray(R):Exports == Implementation where
 --SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 @
 <<*>>=
-<<license>>
 
 <<category ARR2CAT TwoDimensionalArrayCategory>>
 <<domain IIARRAY2 InnerIndexedTwoDimensionalArray>>
diff --git a/src/algebra/bags.spad.pamphlet b/src/algebra/bags.spad.pamphlet
index 32f07cf..65efc9e 100644
--- a/src/algebra/bags.spad.pamphlet
+++ b/src/algebra/bags.spad.pamphlet
@@ -31,6 +31,9 @@ Stack(S:SetCategory): StackAggregate S with
     stack: List S -> %
       ++ stack([x,y,...,z]) creates a stack with first (top)
       ++ element x, second element y,...,and last element z.
+      ++
+      ++E a:Stack INT:= stack [1,2,3,4,5]
+
   == add
     Rep := Reference List S
     s = t == deref s = deref t
@@ -77,6 +80,9 @@ ArrayStack(S:SetCategory): StackAggregate(S) with
     arrayStack: List S -> %
       ++ arrayStack([x,y,...,z]) creates an array stack with first (top)
       ++ element x, second element y,...,and last element z.
+      ++
+      ++E c:ArrayStack INT:= arrayStack [1,2,3,4,5]
+
   == add
     Rep := IndexedFlexibleArray(S,0)
  
@@ -127,6 +133,9 @@ Queue(S:SetCategory): QueueAggregate S with
     queue: List S -> %
       ++ queue([x,y,...,z]) creates a queue with first (top)
       ++ element x, second element y,...,and last (bottom) element z.
+      ++
+      ++E e:Queue INT:= queue [1,2,3,4,5]
+
   == Stack S add
     Rep := Reference List S
     lastTail==> LAST$Lisp
@@ -171,6 +180,9 @@ Dequeue(S:SetCategory): DequeueAggregate S with
      dequeue: List S -> %
        ++ dequeue([x,y,...,z]) creates a dequeue with first (top or front)
        ++ element x, second element y,...,and last (bottom or back) element z.
+       ++
+       ++E g:Dequeue INT:= dequeue [1,2,3,4,5]
+
   == Queue S add
     Rep := Reference List S
     bottom_! d ==
@@ -363,6 +375,9 @@ Heap(S:OrderedSet): Exports == Implementation where
     heap : List S -> %
       ++ heap(ls) creates a heap of elements consisting of the 
       ++ elements of ls.
+      ++
+      ++E i:Heap INT := heap [1,6,3,7,5,2,4]
+
   Implementation == IndexedFlexibleArray(S,0) add
     Rep := IndexedFlexibleArray( S,0)
     empty() == empty()$Rep
@@ -450,7 +465,6 @@ Heap(S:OrderedSet): Exports == Implementation where
 --SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 @
 <<*>>=
-<<license>>
  
 <<domain STACK Stack>>
 <<domain ASTACK ArrayStack>>
diff --git a/src/algebra/tree.spad.pamphlet b/src/algebra/tree.spad.pamphlet
index 573f7f8..0a208e0 100644
--- a/src/algebra/tree.spad.pamphlet
+++ b/src/algebra/tree.spad.pamphlet
@@ -30,23 +30,53 @@ Tree(S: SetCategory): T==C where
      finiteAggregate
      shallowlyMutable
      tree: (S,List %) -> %
-       ++ tree(nd,ls) creates a tree with value nd, and children
-       ++ ls.
+       ++ tree(nd,ls) creates a tree with value nd, and children ls.
+       ++
+       ++E t1:=tree [1,2,3,4]
+       ++E tree(5,[t1])
+
      tree: List S -> %
        ++ tree(ls) creates a tree from a list of elements of s. 
+       ++
+       ++E tree [1,2,3,4]
+
      tree: S -> %
        ++ tree(nd) creates a tree with value nd, and no children
+       ++
+       ++E tree 6
+
      cyclic?: % -> Boolean
        ++ cyclic?(t) tests if t is a cyclic tree.
+       ++
+       ++E t1:=tree [1,2,3,4]
+       ++E cyclic? t1
+
      cyclicCopy: % -> %
-      ++ cyclicCopy(l) makes a copy of a (possibly) cyclic tree l.
+       ++ cyclicCopy(l) makes a copy of a (possibly) cyclic tree l.
+       ++
+       ++E t1:=tree [1,2,3,4]
+       ++E cyclicCopy t1
+
      cyclicEntries:    % -> List %
        ++ cyclicEntries(t) returns a list of top-level cycles in tree t.
+       ++
+       ++E t1:=tree [1,2,3,4]
+       ++E cyclicEntries t1
+
      cyclicEqual?: (%, %) -> Boolean
        ++ cyclicEqual?(t1, t2) tests of two cyclic trees have 
        ++ the same structure.
+       ++
+       ++E t1:=tree [1,2,3,4]
+       ++E t2:=tree [1,2,3,4]
+       ++E cyclicEqual?(t1,t2)
+
      cyclicParents: % -> List %
        ++ cyclicParents(t) returns a list of cycles that are parents of t.
+       ++
+       ++E t1:=tree [1,2,3,4]
+       ++E cyclicParents t1
+
  C== add
     cycleTreeMax ==> 5
 
@@ -333,12 +363,13 @@ Tree(S: SetCategory): T==C where
 ++ of a value and a \spadfun{left} and \spadfun{right}, both binary trees. 
 BinaryTreeCategory(S: SetCategory): Category == BinaryRecursiveAggregate(S) with
    shallowlyMutable
-     ++ Binary trees have updateable components
+    ++ Binary trees have updateable components
    finiteAggregate
-     ++ Binary trees have a finite number of components
+    ++ Binary trees have a finite number of components
    node: (%,S,%) -> %
-     ++ node(left,v,right) creates a binary tree with value \spad{v}, a binary
-     ++ tree \spad{left}, and a binary tree \spad{right}.
+    ++ node(left,v,right) creates a binary tree with value \spad{v}, a binary
+    ++ tree \spad{left}, and a binary tree \spad{right}.
+    ++
  add
      cycleTreeMax ==> 5
 
@@ -372,12 +403,20 @@ BinaryTreeCategory(S: SetCategory): Category == BinaryRecursiveAggregate(S) with
 ++ and \spadfun{left} which are both binary trees.
 BinaryTree(S: SetCategory): Exports == Implementation where
   Exports == BinaryTreeCategory(S) with
-     binaryTree: S -> %
-       ++ binaryTree(v) is an non-empty binary tree
-       ++ with value v, and left and right empty.
-     binaryTree: (%,S,%) -> %    
-       ++ binaryTree(l,v,r) creates a binary tree with
-       ++ value v with left subtree l and right subtree r.
+   binaryTree: S -> %
+    ++ binaryTree(v) is an non-empty binary tree
+    ++ with value v, and left and right empty.
+    ++
+    ++E t1:=binaryTree([1,2,3])
+    
+   binaryTree: (%,S,%) -> %    
+    ++ binaryTree(l,v,r) creates a binary tree with
+    ++ value v with left subtree l and right subtree r.
+    ++
+    ++E t1:=binaryTree([1,2,3])
+    ++E t2:=binaryTree([4,5,6])
+    ++E binaryTree(t1,[7,8,9],t2)
+    
   Implementation == add
      Rep := List Tree S
      t1 = t2 == (t1::Rep) =$Rep (t2::Rep)
@@ -628,14 +667,29 @@ BinarySearchTree(S: OrderedSet): Exports == Implementation where
     shallowlyMutable
     finiteAggregate
     binarySearchTree: List S -> %
-	++ binarySearchTree(l) \undocumented
+     ++ binarySearchTree(l) \undocumented
+     ++
+     ++E binarySearchTree [1,2,3,4]
+
     insert_!: (S,%) -> %
-      ++ insert!(x,b) inserts element x as leaves into binary search tree b.
+     ++ insert!(x,b) inserts element x as leaves into binary search tree b.
+     ++
+     ++E t1:=binarySearchTree [1,2,3,4]
+     ++E insert!(5,t1)
+
     insertRoot_!: (S,%) -> %
-      ++ insertRoot!(x,b) inserts element x as a root of binary search tree b.
+     ++ insertRoot!(x,b) inserts element x as a root of binary search tree b.
+     ++
+     ++E t1:=binarySearchTree [1,2,3,4]
+     ++E insertRoot!(5,t1)
+
     split:      (S,%) -> Record(less: %, greater: %)
-      ++ split(x,b) splits binary tree b into two trees, one with elements greater
-      ++ than x, the other with elements less than x.
+     ++ split(x,b) splits binary tree b into two trees, one with elements 
+     ++ greater than x, the other with elements less than x.
+     ++
+     ++E t1:=binarySearchTree [1,2,3,4]
+     ++E split(3,t1)
+
   Implementation == BinaryTree(S) add
     Rep := BinaryTree(S)
     binarySearchTree(u:List S) ==
@@ -663,21 +717,28 @@ BinarySearchTree(S: OrderedSet): Exports == Implementation where
 
 @
 \section{domain BTOURN BinaryTournament}
+A BinaryTournament(S) is the domain of binary trees where elements are
+ordered down the tree.  A binary search tree is either empty or is a
+node containing a value of type S, and a right and a left which are
+both BinaryTree(S)
 <<domain BTOURN BinaryTournament>>=
 )abbrev domain BTOURN BinaryTournament
-++ Description: \spadtype{BinaryTournament(S)} is the domain of
-++ binary trees where elements are ordered down the tree.
-++ A binary search tree is either empty or is a node containing a
-++ \spadfun{value} of type \spad{S}, and a \spadfun{right}
-++ and a \spadfun{left} which are both \spadtype{BinaryTree(S)}
 BinaryTournament(S: OrderedSet): Exports == Implementation where
   Exports == BinaryTreeCategory(S) with
     shallowlyMutable
     binaryTournament: List S -> %
       ++ binaryTournament(ls) creates a binary tournament with the
       ++ elements of ls as values at the nodes.
+      ++
+      ++E binaryTournament [1,2,3,4]
+
     insert_!: (S,%) -> %
       ++ insert!(x,b) inserts element x as leaves into binary tournament b.
+      ++
+      ++E t1:=binaryTournament [1,2,3,4]
+      ++E insert!(5,t1)
+      ++E t1
+
   Implementation == BinaryTree(S) add
     Rep := BinaryTree(S)
     binaryTournament(u:List S) ==
@@ -908,23 +969,46 @@ BalancedBinaryTree(S: SetCategory): Exports == Implementation where
     balancedBinaryTree: (NonNegativeInteger, S) -> %
       ++ balancedBinaryTree(n, s) creates a balanced binary tree with
       ++ n nodes each with value s.
+      ++
+      ++E balancedBinaryTree(4, 0)
+
     setleaves_!: (%, List S) -> %
       ++ setleaves!(t, ls) sets the leaves of t in left-to-right order
       ++ to the elements of ls.
+      ++
+      ++E t1:=balancedBinaryTree(4, 0)
+      ++E setleaves!(t1,[1,2,3,4])
+
     mapUp_!: (%, (S,S) -> S) -> S
       ++ mapUp!(t,f) traverses balanced binary tree t in an "endorder"
       ++ (left then right then node) fashion returning t with the value
       ++ at each successive interior node of t replaced by
       ++ f(l,r) where l and r are the values at the immediate
       ++ left and right nodes.
+      ++
+      ++E T1:=BalancedBinaryTree Integer
+      ++E t2:=balancedBinaryTree(4, 0)$T1
+      ++E setleaves!(t2,[1,2,3,4]::List(Integer))
+      ++E adder(a:Integer,b:Integer):Integer == a+b
+      ++E mapUp!(t2,adder)
+      ++E t2
+
     mapUp_!: (%, %, (S,S,S,S) -> S) -> %
-      ++ mapUp!(t,t1,f) traverses t in an "endorder" (left then right then node)
-      ++ fashion  returning t with the value at each successive interior
-      ++ node of t replaced by
+      ++ mapUp!(t,t1,f) traverses balanced binary tree t in an "endorder"
+      ++ (left then right then node) fashion returning t with the value
+      ++ at each successive interior node of t replaced by
       ++ f(l,r,l1,r1) where l and r are the values at the immediate
       ++ left and right nodes. Values l1 and r1 are values at the
       ++ corresponding nodes of a balanced binary tree t1, of identical
       ++ shape at t.
+      ++
+      ++E T1:=BalancedBinaryTree Integer
+      ++E t2:=balancedBinaryTree(4, 0)$T1
+      ++E setleaves!(t2,[1,2,3,4]::List(Integer))
+      ++E adder4(i:INT,j:INT,k:INT,l:INT):INT == i+j+k+l
+      ++E mapUp!(t2,t2,adder4)
+      ++E t2
+
     mapDown_!: (%,S,(S,S) -> S) -> %
       ++ mapDown!(t,p,f) returns t after traversing t in "preorder"
       ++ (node then left then right) fashion replacing the successive
@@ -932,6 +1016,14 @@ BalancedBinaryTree(S: SetCategory): Exports == Implementation where
       ++ replaced by q := f(p,x). The mapDown!(l,q,f) and
       ++ mapDown!(r,q,f) are evaluated for the left and right subtrees
       ++ l and r of t.
+      ++
+      ++E T1:=BalancedBinaryTree Integer
+      ++E t2:=balancedBinaryTree(4, 0)$T1
+      ++E setleaves!(t2,[1,2,3,4]::List(Integer))
+      ++E adder(i:Integer,j:Integer):Integer == i+j
+      ++E mapDown!(t2,4::INT,adder)
+      ++E t2
+
     mapDown_!: (%,S, (S,S,S) -> List S) -> %
       ++ mapDown!(t,p,f) returns t after traversing t in "preorder"
       ++ (node then left then right) fashion replacing the successive
@@ -941,6 +1033,14 @@ BalancedBinaryTree(S: SetCategory): Exports == Implementation where
       ++ and right subtrees of t, is evaluated producing two values
       ++ pl and pr. Then \spad{mapDown!(l,pl,f)} and \spad{mapDown!(l,pr,f)}
       ++ are evaluated.
+      ++
+      ++E T1:=BalancedBinaryTree Integer
+      ++E t2:=balancedBinaryTree(4, 0)$T1
+      ++E setleaves!(t2,[1,2,3,4]::List(Integer))
+      ++E adder3(i:Integer,j:Integer,k:Integer):List Integer == [i+j,j+k]
+      ++E mapDown!(t2,4::INT,adder3)
+      ++E t2
+
   Implementation == BinaryTree(S) add
     Rep := BinaryTree(S)
     leaf? x ==
@@ -1003,20 +1103,30 @@ BalancedBinaryTree(S: SetCategory): Exports == Implementation where
 
 @
 \section{domain PENDTREE PendantTree}
+A PendantTree(S)is either a leaf? and is an S or has
+a left and a right both PendantTree(S)'s
 <<domain PENDTREE PendantTree>>=
 )abbrev domain PENDTREE PendantTree
-++ A PendantTree(S)is either a leaf? and is an S or has
-++ a left and a right both PendantTree(S)'s
 PendantTree(S: SetCategory): T == C where
  T == BinaryRecursiveAggregate(S) with
-     ptree : S->%
-       ++ ptree(s) is a leaf? pendant tree
-     ptree:(%, %)->%
-	++ ptree(x,y) \undocumented
-     coerce:%->Tree S
-	++ coerce(x) \undocumented
+   ptree : S->%
+    ++ ptree(s) is a leaf? pendant tree
+    ++
+    ++E t1:=ptree([1,2,3])
+       
+   ptree:(%, %)->%
+    ++ ptree(x,y) \undocumented
+    ++
+    ++E t1:=ptree([1,2,3])
+    ++E ptree(t1,ptree([1,2,3]))
+
+   coerce:%->Tree S
+    ++ coerce(x) \undocumented
+    ++
+    ++E t1:=ptree([1,2,3])
+    ++E t2:=ptree(t1,ptree([1,2,3]))
+    ++E t2::Tree List PositiveInteger
 
- 
  C == add
      Rep := Tree S
      import Tree S
@@ -1073,7 +1183,6 @@ PendantTree(S: SetCategory): T == C where
 --SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 @
 <<*>>=
-<<license>>
  
 <<domain TREE Tree>>
 <<category BTCAT BinaryTreeCategory>>

\start
Date: Mon, 18 Feb 2008 22:31:45 -0800 (PST)
From: Tim Daly
To: list
Subject: Re: OpenAxiom-1.1.0 released

On Feb 18, 1:37 pm, D Herring <dherr...@at.tentpost.dot.com> wrote:
> Gabriel Dos Reis wrote:
> > I'm pleased to announce that OpenAxiom-1.1.0 has been released on
> > February 14, 2008.
>
> Congratulations.
>
> I just installed Fricas a week ago...  Is there a document
> highlighting the differences between Axiom/Fricas/OpenAxiom for those
> of us "not in the loop"?
>
> Thanks,
> Daniel

Daniel,

The <a href="http://axiom.axiom-developer.org">Axiom</a> release
information
is on the <a href="http://axiom.axiom-developer.org/axiom-website/
releasenotes.html">
release notes page</a>. The last release was January 25, 2008.

There have been two major concentrations of effort in this release.

The first concentration is on the new Firefox Hyperdoc and the
second concentration is the verification of Axiom against
published standards.

The orignial X11 Hyperdoc has traditionally been a major porting
problem and, although it was designed to be extended by users, it
never lived up to that promise due to the non-standard page language.
The new firefox browser-based hyperdoc uses standard html and AJAX.
This makes it portable, standard, and makes it possible to add new
pages.
Axiom has been extended to output mathML to the web pages for cleaner
display. The new firefox browser has additional new pages including
cryptographic course notes by Arthur Ralfs.

Axiom strives to be correct and an effort has been ongoing called
the Computer Algebra Test Suite (CATS) which shows its first fruits
in this release. Some existing functions have been verified against
published results and new functions (e.g. the Exponential Integral)
have been implemented and verified against published results. Since
all of the files are literate programs you can find the references
in the bibliography sections of the program files. Additional
regression test files have been added using the new regression
test mechanism.

As far as I'm aware there is no "PanAxiom" document that highlights
the differences. Where the systems diverge is based on the underlying
philosophy of the PanAxiom versions.

The bulk of the changes for Axiom have been in the area of
documentation (internal and external) and verification. Future
changes are certain to continue this trend as it speaks directly
to the underlying philosophy of making Axiom literate (in the
sense of Knuth).

\start
Date: Tue, 19 Feb 2008 17:46:10 -0600
From: Tim Daly
To: list
Subject: 20080219.01.tpd.patch (add firefox hyperdoc pages)

This patch adds additional firefox hyperdoc pages. 
It also fixes a minor runtime glitch in the old hyperdoc
due to missing files in the mnt tree.

Tim
========================================================================
diff --git a/changelog b/changelog
index c36de76..88477f9 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20080219 tpd src/hyper/Makefile handle hyperdoc bitmaps properly
+20080219 tpd src/Makefile handle hyperdoc bitmaps properly
+20080219 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080218 tpd src/algebra/tree.spad add function examples
 20080218 tpd src/algebra/bags.spad add function examples
 20080218 tpd src/algebra/array2.spad add function examples
diff --git a/src/Makefile.pamphlet b/src/Makefile.pamphlet
index 5df04f4..2039ca0 100644
--- a/src/Makefile.pamphlet
+++ b/src/Makefile.pamphlet
@@ -151,7 +151,7 @@ hyperdir: ${SRC}/hyper/Makefile
 	@mkdir -p ${OBJ}/${SYS}/hyper
 	@mkdir -p ${OBJ}/${SYS}/bin
 	@mkdir -p ${OBJ}/${SYS}/lib
-	@mkdir -p ${MNT}/${SYS}/doc/hypertex
+	@mkdir -p ${MNT}/${SYS}/doc/hypertex/pages/bitmaps
 	@mkdir -p ${MNT}/${SYS}/doc/src/hyper
 	@(cd hyper ; ${ENV} ${MAKE} )
 
diff --git a/src/hyper/Makefile.pamphlet b/src/hyper/Makefile.pamphlet
index 646757a..493fbb4 100644
--- a/src/hyper/Makefile.pamphlet
+++ b/src/hyper/Makefile.pamphlet
@@ -36,6 +36,12 @@ DOC=    ${MNT}/${SYS}/doc/src/hyper
 # this is where the hypertex documentation files are
 HYPER=${MNT}/${SYS}/doc/hypertex
 
+# this is where the hyperdoc pages are
+PAGES=${HYPER}/pages
+
+# this is where the hyperdoc bitmaps
+BMAPS=${PAGES}/bitmaps
+
 CFLAGS=	${CCF} -I${MID}
 LDFLAGS= -L${LIB} -lspad ${LDF}
 
@@ -77,9 +83,9 @@ OBJS= \
 	${HYPER_OBJS} ${EX2HT_OBJS} ${HTADD_OBJS} \
         ${HTHITS_OBJS} ${SPADBUF_OBJS} ${MIDOBJ}/debug.o
 
-BITMAPS=${MID}/mouse11.bitmap ${MID}/mouse11.mask ${MID}/sdown3d.bitmap \
-        ${MID}/sdown3dpr.bitmap ${MID}/sdown.bitmap ${MID}/sup3d.bitmap \
-        ${MID}/sup3dpr.bitmap ${MID}/sup.bitmap ${MID}/ht-icon
+BITMAPS=${BMAPS}/mouse11.bitmap ${BMAPS}/mouse11.mask ${BMAPS}/sdown3d.bitmap \
+        ${BMAPS}/sdown3dpr.bitmap ${BMAPS}/sdown.bitmap ${BMAPS}/sup3d.bitmap \
+        ${BMAPS}/sup3dpr.bitmap ${BMAPS}/sup.bitmap ${BMAPS}/ht-icon
 
 SCRIPTS=${OUTLIB}/htsearch ${OUTLIB}/presea
 
@@ -130,41 +136,84 @@ ${DOC}/addfile.dvi: ${IN}/addfile.pamphlet
 \section{bitmaps}
 <<bitmaps>>=
 ${MID}/mouse11.bitmap: ${IN}/bitmaps.pamphlet
-	@echo 5 making ${OUT}/mouse11.bitmap from ${IN}/bitmaps.pamphlet
-	@${TANGLE} -R"mouse11.bitmap" ${IN}/bitmaps.pamphlet >${MID}/mouse11.bitmap
+	@echo 5 making ${BMAPS}/mouse11.bitmap from ${IN}/bitmaps.pamphlet
+	@${TANGLE} -R"mouse11.bitmap" ${IN}/bitmaps.pamphlet \
+           >${MID}/mouse11.bitmap
+
+${BMAPS}/mouse11.bitmap: ${MID}/mouse11.bitmap
+	@echo 5a making ${BMAPS}/mouse11.bitmap from ${MID}/mouse11.bitmap
+	@cp ${MID}/mouse11.bitmap ${BMAPS}/mouse11.bitmap
 
 ${MID}/mouse11.mask: ${IN}/bitmaps.pamphlet
-	@echo 6 making ${OUT}/mouse11.mask from ${IN}/bitmaps.pamphlet
-	@${TANGLE} -R"mouse11.mask" ${IN}/bitmaps.pamphlet >${MID}/mouse11.mask
+	@echo 6 making ${BMAPS}/mouse11.mask from ${IN}/bitmaps.pamphlet
+	@${TANGLE} -R"mouse11.mask" ${IN}/bitmaps.pamphlet \
+           >${MID}/mouse11.mask
+
+${BMAPS}/mouse11.mask: ${MID}/mouse11.mask
+	@echo 6a making ${BMAPS}/mouse11.mask from ${MID}/mouse11.mask
+	@cp ${MID}/mouse11.mask ${BMAPS}/mouse11.mask
 
 ${MID}/sdown3d.bitmap: ${IN}/bitmaps.pamphlet
-	@echo 7 making ${OUT}/sdown3d.bitmap from ${IN}/bitmaps.pamphlet
-	@${TANGLE} -R"sdown3d.bitmap" ${IN}/bitmaps.pamphlet >${MID}/sdown3d.bitmap
+	@echo 7 making ${BMAPS}/sdown3d.bitmap from ${IN}/bitmaps.pamphlet
+	@${TANGLE} -R"sdown3d.bitmap" ${IN}/bitmaps.pamphlet \
+           >${MID}/sdown3d.bitmap
+
+${BMAPS}/sdown3d.bitmap: ${MID}/sdown3d.bitmap
+	@echo 7a making ${BMAPS}/sdown3d.bitmap from ${MID}/sdown3d.bitmap
+	@cp ${MID}/sdown3d.bitmap ${BMAPS}/sdown3d.bitmap
 
 ${MID}/sdown3dpr.bitmap: ${IN}/bitmaps.pamphlet
-	@echo 8 making ${OUT}/sdown3dpr.bitmap from ${IN}/bitmaps.pamphlet
-	@${TANGLE} -R"sdown3dpr.bitmap" ${IN}/bitmaps.pamphlet >${MID}/sdown3dpr.bitmap
+	@echo 8 making ${BMAPS}/sdown3dpr.bitmap from ${IN}/bitmaps.pamphlet
+	@${TANGLE} -R"sdown3dpr.bitmap" ${IN}/bitmaps.pamphlet \
+           >${MID}/sdown3dpr.bitmap
+
+${BMAPS}/sdown3dpr.bitmap: ${MID}/sdown3dpr.bitmap
+	@echo 8a making ${BMAPS}/sdown3dpr.bitmap from ${MID}/sdown3dpr.bitmap
+	@cp ${MID}/sdown3dpr.bitmap ${BMAPS}/sdown3dpr.bitmap
 
 ${MID}/sdown.bitmap: ${IN}/bitmaps.pamphlet
-	@echo 9 making ${OUT}/sdown.bitmap from ${IN}/bitmaps.pamphlet
-	@${TANGLE} -R"sdown.bitmap" ${IN}/bitmaps.pamphlet >${MID}/sdown.bitmap
+	@echo 9 making ${BMAPS}/sdown.bitmap from ${IN}/bitmaps.pamphlet
+	@${TANGLE} -R"sdown.bitmap" ${IN}/bitmaps.pamphlet \
+           >${MID}/sdown.bitmap
+
+${BMAPS}/sdown.bitmap: ${MID}/sdown.bitmap
+	@echo 9a making ${BMAPS}/sdown.bitmap from ${MID}/sdown.bitmap
+	@cp ${MID}/sdown.bitmap ${BMAPS}/sdown.bitmap
 
 ${MID}/sup3d.bitmap: ${IN}/bitmaps.pamphlet
-	@echo 10 making ${OUT}/sup3d.bitmap from ${IN}/bitmaps.pamphlet
-	@${TANGLE} -R"sup3d.bitmap" ${IN}/bitmaps.pamphlet >${MID}/sup3d.bitmap
+	@echo 10 making ${BMAPS}/sup3d.bitmap from ${IN}/bitmaps.pamphlet
+	@${TANGLE} -R"sup3d.bitmap" ${IN}/bitmaps.pamphlet \
+           >${MID}/sup3d.bitmap
+
+${BMAPS}/sup3d.bitmap: ${MID}/sup3d.bitmap
+	@echo 10a making ${BMAPS}/sup3d.bitmap from ${MID}/sup3d.bitmap
+	@cp ${MID}/sup3d.bitmap ${BMAPS}/sup3d.bitmap
 
 ${MID}/sup3dpr.bitmap: ${IN}/bitmaps.pamphlet
-	@echo 11 making ${OUT}/sup3dpr.bitmap from ${IN}/bitmaps.pamphlet
-	@${TANGLE} -R"sup3dpr.bitmap" ${IN}/bitmaps.pamphlet >${MID}/sup3dpr.bitmap
+	@echo 11 making ${BMAPS}/sup3dpr.bitmap from ${IN}/bitmaps.pamphlet
+	@${TANGLE} -R"sup3dpr.bitmap" ${IN}/bitmaps.pamphlet \
+           >${MID}/sup3dpr.bitmap
+
+${BMAPS}/sup3dpr.bitmap: ${MID}/sup3dpr.bitmap
+	@echo 11a making ${BMAPS}/sup3dpr.bitmap from ${MID}/sup3dpr.bitmap
+	@cp ${MID}/sup3dpr.bitmap ${BMAPS}/sup3dpr.bitmap
 
 ${MID}/sup.bitmap: ${IN}/bitmaps.pamphlet
-	@echo 12 making ${OUT}/sup.bitmap from ${IN}/bitmaps.pamphlet
+	@echo 12 making ${BMAPS}/sup.bitmap from ${IN}/bitmaps.pamphlet
 	@${TANGLE} -R"sup.bitmap" ${IN}/bitmaps.pamphlet >${MID}/sup.bitmap
 
+${BMAPS}/sup.bitmap: ${MID}/sup.bitmap
+	@echo 12a making ${BMAPS}/sup.bitmap from ${MID}/sup.bitmap
+	@cp ${MID}/sup.bitmap ${BMAPS}/sup.bitmap
+
 ${MID}/ht-icon: ${IN}/bitmaps.pamphlet
-	@echo 13 making ${OUT}/ht-icon from ${IN}/bitmaps.pamphlet
+	@echo 13 making ${BMAPS}/ht-icon from ${IN}/bitmaps.pamphlet
 	@${TANGLE} -R"hticon" ${IN}/bitmaps.pamphlet >${MID}/ht-icon
 
+${BMAPS}/ht-icon: ${MID}/ht-icon
+	@echo 13a making ${BMAPS}/ht-icon from ${MID}/ht-icon
+	@cp ${MID}/ht-icon ${BMAPS}/ht-icon
+
 ${DOC}/bitmaps.dvi: ${IN}/bitmaps.pamphlet 
 	@ echo 14 making ${DOC}/bitmaps.dvi from ${IN}/bitmaps.pamphlet
 	@ (cd ${DOC} ; \
@@ -579,7 +628,7 @@ ${MID}/initx.c: ${IN}/initx.pamphlet
 
 ${MIDOBJ}/initx.o: ${MID}/initx.c
 	@ echo 76 making ${MIDOBJ}/initx.o from ${MID}/initx.c
-	@ ( cd ${MIDOBJ} ; \
+	 ( cd ${MIDOBJ} ; \
 	    ${CC} -I${INC} -I${MID} -c ${CFLAGS} ${MID}/initx.c )
 
 ${DOC}/initx.dvi: ${IN}/initx.pamphlet 
@@ -1078,14 +1127,17 @@ ${OUTLIB}/spadbuf: ${SPADBUF_OBJS} ${LIB}/sockio-c.o ${LIB}/bsdsignal.o \
 We need to make sure that [[ht.db]], the hypertex database file
 is up to date. The file contains absolute offsets into the various
 [[ht]] and [[pht]] files so it must reflect the current pages. In
-order to do this we run [[htadd]] in the [[${HYPER}/pages]] directory.
+order to do this we run [[htadd]] in the [[${PAGES}]] directory.
+
+The BMAPS directory holds the bitmaps for hyperdoc.
 <<pages>>=
-${HYPER}/pages/ht.db: ${IN}/pages/*.ht ${IN}/pages/*.pht
-	@echo 149 making ${HYPER}/pages from ${SRC}/pages directory
-	@ mkdir -p ${HYPER}/pages
-	@ cp -pr pages/*.ht ${HYPER}/pages
-	@ cp -pr pages/*.pht ${HYPER}/pages
-	@ (cd ${HYPER}/pages ; \
+${PAGES}/ht.db: ${IN}/pages/*.ht ${IN}/pages/*.pht
+	@echo 149 making ${PAGES} from ${SRC}/pages directory
+	@ mkdir -p ${PAGES}
+	@ mkdir -p ${BMAPS}
+	@ cp -pr pages/*.ht ${PAGES}
+	@ cp -pr pages/*.pht ${PAGES}
+	@ (cd ${PAGES} ; \
            rm -f ht.db ; \
            rm -f *~ ; \
 	   ${HTADD} *.ht *.pht )
@@ -1129,10 +1181,16 @@ ${HYPER}/axbook: ${IN}/axbook.tgz
 	@( cd ${HYPER} ; tar -zxf ${IN}/axbook.tgz )
 
 @
+The original hyperdoc pages live in the PAGES directory and the BITMAPS live
+under the PAGES directory.
+
+The browser pages are tangled from the file bookvol11 and live in HYPER. 
+The mathML version of the Jenks book lives in HYPER/axbook.
+The bigbayou and doctitle images are used by the new browser.
 <<*>>=
 <<environment>>
 all: ${INCLUDES} ${BITMAPS} ${OBJS} ${SCRIPTS} ${BINFILES} \
-     ${HYPER}/pages/ht.db ${DOCFILES} ${HYPER}/rootpage.xhtml \
+     ${PAGES}/ht.db ${DOCFILES} ${HYPER}/rootpage.xhtml \
      ${HYPER}/axbook ${MNT}/${SYS}/doc/bookvol11.dvi \
      ${HYPER}/bigbayou.png ${HYPER}/doctitle.png
 	@ echo 155 finished ${IN}
diff --git a/src/hyper/bookvol11.pamphlet b/src/hyper/bookvol11.pamphlet
index 293066e..9335c11 100644
--- a/src/hyper/bookvol11.pamphlet
+++ b/src/hyper/bookvol11.pamphlet
@@ -653,6 +653,10 @@ PAGES=rootpage.xhtml \
           numberspage.xhtml \
             numintegers.xhtml \
               numgeneralinfo.xhtml \
+                basicfunctions.xhtml \
+                primesandfactorization.xhtml \
+                somenumbertheoreticfunctions.xhtml \
+                integernumbertheoryfunctions.xhtml \
               numfactorization.xhtml \
               numfunctions.xhtml \
               numexamples.xhtml \
@@ -3666,6 +3670,15 @@ abstract algebra
 <<page foot>>
 @
 
+\subsection{basicfunctions.xhtml}
+<<basicfunctions.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+basicfunctions not implemented
+<<page foot>>
+@
 \subsection{basiclimit.xhtml}
 <<basiclimit.xhtml>>=
 <<standard head>>
@@ -34212,6 +34225,16 @@ lists of points in the plane.
 <<page foot>>
 @
 
+\subsection{integernumbertheoryfunctions.xhtml}
+<<integernumbertheoryfunctions.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+integernumbertheoryfunctions not implemented
+<<page foot>>
+@
+
 %%J
 \subsection{jenks.xhtml}
 <<jenks.xhtml>>=
@@ -36676,7 +36699,34 @@ Additional Topics:
  </head>
  <body>
 <<page head>>
-      numgeneralinfo not implemented
+Axiom provides many operations for manipulating arbitrary precision
+integers. In this section we will show some of those that come from
+<a href="db.xhtml?Integer">Integer</a> itself plus some that are
+implemented in other packages. More examples of using integers are in
+the following sections:
+More examples of expansions are available in
+<a href="integernumbertheoryfunctions.xhtml">IntegerNumberTheoryFunctions</a>,
+<a href="numrepeatingdecimals.xhtml">DecimalExpansion</a>,
+<a href="numrepeatingbinaryexpansions.xhtml">BinaryExpansion</a>,
+<a href="numrepeatinghexexpansions.xhtml">HexadecimalExpansion</a>, and
+<a href="db.xhtml?RadixExpansion">RadixExpansion</a>. 
+<ul>
+ <li>
+  <a href="basicfunctions.xhtml">
+   Basic Functions
+  </a>
+ </li>
+ <li>
+  <a href="primesandfactorization.xhtml">
+   Primes and Factorization
+  </a>
+ </li>
+ <li>
+  <a href="somenumbertheoreticfunctions.xhtml">
+   Some Number Theoretic Functions
+  </a>
+ </li>
+</ul>
 <<page foot>>
 @
 
@@ -41409,6 +41459,15 @@ You can also substitute numerical values for some or all of the variables.
 <<page foot>>
 @
 
+\subsection{primesandfactorization.xhtml}
+<<primesandfactorization.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+primesandfactorization not implemented
+<<page foot>>
+@
 
 \subsection{puiseuxseries.xhtml}
 <<puiseuxseries.xhtml>>=
@@ -42304,6 +42363,16 @@ Enter the size of the matrix:
 
 @
 
+\subsection{somenumbertheoreticfunctions.xhtml}
+<<somenumbertheoreticfunctions.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+somenumbertheoreticfunctions not implemented
+<<page foot>>
+@
+
 \subsection{summation.xhtml}
 <<summation.xhtml>>=
 <<standard head>>
@@ -43073,3 +43142,5 @@ static char axiom_bits[] = {
 \bibitem{1} nothing
 \end{thebibliography}
 \end{document}
+
+

\start
Date: Tue, 19 Feb 2008 18:21:20 -0800 (PST)
From: Tim Daly
To: list
Subject: Fwd: Symbolic computation issues

---------- Forwarded message ----------

On Feb 19, 7:14 pm, "K. Jennings" <kjenni...@resurgence.net> wrote:



> On Tue, 19 Feb 2008 22:41:43 +0000, rjf wrote:
> > K. Jennings wrote:
> >>        Are all the fundamental issues having to do with symbolic
> >> computation already solved?

> > no, there are many issues remaining to be solved, but their solutions
> > may not be easy to find. And some of the allegedly solved problems are
> > not necessarily solved in a practical sense.  I think a more serious
> > problem is that the issues that ARE being addressed by researchers tend
> > to be ones that are easy to solve and whose solutions are irrelevant to
> > computer algebra systems, in practice.

> >   I am asking because all systems (commercial
> >> ones in particular) seem to be for the most part doing GUI and eye
> >> candy development.

> > I think the same comments could be made if you substituted "automotive
> > engineering" for "symbolic computation".  When sales drives development,
> > you get eye candy.

>         But in the symbolic computation world there are alternatives that
> are not sales-driven. I am not surprised that Maple and Mathematica have
> become huge eye candy boxes around a symbolic computation kernel, but,
> what about, say, Axiom and Maxima? Are they following the same route?

Interesting question. Axiom is clearly not driven by sales. It has
a "30 year horizon" philosophy based on the belief that Computational
Mathematics will continue to be a fundamental and growing science.
But it does raise the question "why the eye candy?".

The short (and short-term) answer is that Axiom needs to have more
documentation in order to be more useful. Axiom has a steep learning
curve for those who are not well versed in strongly typed systems.
Axiom also is very large and has a steep learning curve for
developers,
both computational and mathematical.

If we consider the ordinary user audience, which is probably
mathematicians, it becomes important to strengthen the user-facing
documentation. Users of the system (that is, those who do not develop
code) need to be able to find helpful information quickly and easily.

The focus of effort for this group has involved several pieces of
work.

First, an Axiom Tutorial book (ISBN 1-4116-6597-X) was written and
can be purchased or freely downloaded from
<http://axiom.axiom-developer.org/bookvol1.pdf>. The Axiom
distribution
also includes a free copy of the Jenks and Sutor book.

Second, the hyperdoc browser is being rewritten to use Firefox instead
of a special program (hyperdoc). This makes it easier for the average
user to navigate and makes it possible for the average user to create
their own web pages.

Third, the )help command has been expanded to include explanations
and examples of many domains and packages.

Fourth, the )display operation command is being expanded to include
examples of all of the operations it presents.

Fifth, example files and source files are being re-engineered to be
viewed in the Firefox browser, making it possible to see the research
associated with the algebra algorithms.

In some sense, this all represents "eye candy" but it seems to me
that it serves the needs of the beginning or casual user well.

In the middle term, for the mathematical algorithm developer
Axiom has been modified to keep all of the algebra source code in
literate programming format. Thus, each algebra file is really an
extended latex document (using noweb, from Norman Ramsey) following
Knuth's literate programming idea.

The fundamental problem that most computer algebra systems face is
that the research associated with the algorithms is enshrined in a
library somewhere and is not generally accessible. In addition, the
research rarely shows the algorithmic details; and even if it does
the algorithm implementation will eventually diverge from the
published paper over time.

By making the algebra files literate the middle-term goal is to unite
the research and the implemented algorithm. This has several benefits.
The user can see what the algorithm really does, the student can learn
the details of an implementation, and the mathematician can modify the
algorithm and its associated documentation at the same time.

At the moment this might appear to be "eye candy" but it is vital to
the long term strategy.

In the long term (the 30 year horizon), the goal is to have a fully
literate, fully documented system. Thus, not only is the algebra in
literate program format but the system internals are also in the same
format. Ideally the whole of Axiom will be a readable, literate
treatment of the computer algebra field, like "Lisp In Small Pieces"
or Knuth's "TeX, The Program", both of which combine the actual
source code with a readable document.

Efforts have been ongoing to create a "Literate Journal" or "Live
Journal" that would accept research papers in computational math
written in a literate form. These papers could be "drag-and-drop"ed
to include not only the full text of the research paper but also
the full implementation of the algorithm. Thus, when you attend
ISSAC you can eventually expect to be able to run the algorithm
being presented while you are in the audience of the talk.

There is also an effort to "raise the standard" for published
papers in the computational mathematics area. Some efforts are
underway to try to use the categorical nature of Axiom to
construct proofs of the algorithms. Additionally there have
been some discussions of methods and metrics for bounding the
space and time complexity of algorithms. All of these are very
long term ideas but the machinery is being built to support these
ideas now.

Computational Mathematicians will be able to read details of the
implementation of the mathematics, the interpreter, the compiler,
or any other part of the system in book form. The goal is to make
the system "live", that is, be useful, maintainable, and easy to
modify when all of the current developers have died.

So while there are many outstanding problems in computational
mathematics that it would be really exciting to pursue, it seems
to be fundamentally important to structure Axiom so others can
pursue and distribute their research. In the short term this
looks like "eye candy" but it seems necessary as a basis for
the long term goals.

\start
Date: Wed, 20 Feb 2008 00:45:48 -0600
From: Tim Daly
To: list
Subject: 20080220.01.tpd.patch (add additional firefox hyperdoc pages)

This patch adds additional Firefox hyperdoc pages.

========================================================================
diff --git a/changelog b/changelog
index 88477f9..90b2e1c 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080220 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080219 tpd src/hyper/Makefile handle hyperdoc bitmaps properly
 20080219 tpd src/Makefile handle hyperdoc bitmaps properly
 20080219 tpd src/hyper/bookvol11 add additional hyperdoc page translations
diff --git a/src/hyper/bookvol11.pamphlet b/src/hyper/bookvol11.pamphlet
index 9335c11..b9f36fc 100644
--- a/src/hyper/bookvol11.pamphlet
+++ b/src/hyper/bookvol11.pamphlet
@@ -515,16 +515,21 @@ PAGES=rootpage.xhtml \
             dbopdigits.xhtml \
             dbopdimension.xhtml \
             dbopdivide.xhtml \
+            dbopei.xhtml \
             dbopeigenmatrix.xhtml \
             dbopeigenvalues.xhtml \
             dbopeigenvector.xhtml \
             dbopeigenvectors.xhtml \
             dbopelt.xhtml \
+            dbopequalsign.xhtml \
+            dbopeulerphi.xhtml \
             dbopeval.xhtml \
             dbopevenq.xhtml \
             dbopexp.xhtml \
+            dbopexquo.xhtml \
             dbopfactor.xhtml \
             dbopfactorfraction.xhtml \
+            dbopfibonacci.xhtml \
             dbopfiniteq.xhtml \
             dbopfirstdenom.xhtml \
             dbopfirstnumer.xhtml \
@@ -539,10 +544,12 @@ PAGES=rootpage.xhtml \
             dbopintegrate.xhtml \
             dbopinverse.xhtml \
             dbopinvmod.xhtml \
+            dbopjacobi.xhtml \
             dboplaurent.xhtml \
             dboplcm.xhtml \
             dbopleadingcoefficient.xhtml \
             dbopleadingmonomial.xhtml \
+            dboplegendre.xhtml \
             dboplength.xhtml \
             dboplimit.xhtml \
             dboplog.xhtml \
@@ -556,10 +563,12 @@ PAGES=rootpage.xhtml \
             dbopmin.xhtml \
             dbopminimumdegree.xhtml \
             dbopminus.xhtml \
+            dbopmoebiusmu.xhtml \
             dbopmonicdivide.xhtml \
             dbopmulmod.xhtml \
             dbopncols.xhtml \
             dbopnew.xhtml \
+            dbopnextprime.xhtml \
             dbopnorm.xhtml \
             dbopnrows.xhtml \
             dbopnthfractionalterm.xhtml \
@@ -569,6 +578,7 @@ PAGES=rootpage.xhtml \
             dbopnumberoffractionalterms.xhtml \
             dbopnumer.xhtml \
             dbopnumeric.xhtml \
+            dbopoddq.xhtml \
             dbopoperator.xhtml \
             dboporthonormalbasis.xhtml \
             dboppadicfraction.xhtml \
@@ -581,7 +591,10 @@ PAGES=rootpage.xhtml \
             dboppolygamma.xhtml \
             dboppositiveremainder.xhtml \
             dbopprefixragits.xhtml \
+            dbopprevprime.xhtml \
             dbopprimefactor.xhtml \
+            dbopprimeq.xhtml \
+            dbopprimes.xhtml \
             dboppuiseux.xhtml \
             dbopqelt.xhtml \
             dbopqseteltbang.xhtml \
@@ -608,7 +621,8 @@ PAGES=rootpage.xhtml \
             dbopseteltbang.xhtml \
             dbopsetrowbang.xhtml \
             dbopsetsubmatrixbang.xhtml \
-            dbopsimplify.xhtml\
+            dbopsign.xhtml \
+            dbopsimplify.xhtml \
             dbopsec.xhtml \
             dbopsech.xhtml \
             dbopseries.xhtml \
@@ -641,6 +655,7 @@ PAGES=rootpage.xhtml \
             dbopvertconcat.xhtml \
             dbopwholepart.xhtml \
             dbopwholeragits.xhtml \
+            dbopzeroq.xhtml \
             dbopzeroof.xhtml \
             dbopzerosof.xhtml \
             dbpolynomialinteger.xhtml \
@@ -3673,10 +3688,288 @@ abstract algebra
 \subsection{basicfunctions.xhtml}
 <<basicfunctions.xhtml>>=
 <<standard head>>
+  <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+  </script>
  </head>
  <body>
 <<page head>>
-basicfunctions not implemented
+The size of an integer in Axiom is only limited by the amount of 
+computer storage you have available. The usual arithmetic operations
+are available.
+<ul>
+ <li>
+  <input type="submit" id="p1" class="subbut" 
+    onclick="makeRequest('p1');"
+    value="2^(5678-4856+2*17)" />
+  <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+There are a number of ways of working with the sign of an integer.
+Let's use this x as an example.
+<ul>
+ <li>
+  <input type="submit" id="p2" class="subbut" 
+    onclick="makeRequest('p2');"
+    value="x:=-101" />
+  <div id="ansp2"><div></div></div>
+ </li>
+</ul>
+First of all, there is the absolute value function.
+<ul>
+ <li>
+  <input type="submit" id="p3" class="subbut" 
+    onclick="handleFree(['p2','p3']);"
+    value="abs(x)" />
+  <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+The <a href="dbopsign.xhtml">sign</a> operation returns -1 if its 
+argument is negative, 0 if zero and 1 if positive.
+<ul>
+ <li>
+  <input type="submit" id="p4" class="subbut" 
+    onclick="handleFree(['p2','p4']);"
+    value="sign(x)" />
+  <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+You can determine if an integer is negative in several other ways.
+<ul>
+ <li>
+  <input type="submit" id="p5" class="subbut" 
+    onclick="handleFree(['p2','p5']);"
+    value="x &lt; 0" />
+  <div id="ansp5"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p6" class="subbut" 
+    onclick="handleFree(['p2','p6']);"
+    value="x &lt;= -1" />
+  <div id="ansp6"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p7" class="subbut" 
+    onclick="handleFree(['p2','p7']);"
+    value="negative?(x)" />
+  <div id="ansp7"><div></div></div>
+ </li>
+</ul>
+Similarly, you can find out if it is positive.
+<ul>
+ <li>
+  <input type="submit" id="p8" class="subbut" 
+    onclick="handleFree(['p2','p8']);"
+    value="x > 0" />
+  <div id="ansp8"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p9" class="subbut" 
+    onclick="handleFree(['p2','p9']);"
+    value="x >= 1" />
+  <div id="ansp9"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p10" class="subbut" 
+    onclick="handleFree(['p2','p10']);"
+    value="positive?(x)" />
+  <div id="ansp10"><div></div></div>
+ </li>
+</ul>
+This is the recommended way of determining whether an integer is zero.
+<ul>
+ <li>
+  <input type="submit" id="p11" class="subbut" 
+    onclick="handleFree(['p2','p11']);"
+    value="zero?(x)" />
+  <div id="ansp11"><div></div></div>
+ </li>
+</ul>
+<hr/>
+Use the <a href="dbopzeroq.xhtml">zero?</a> operation whenever you are
+testing any mathematical object for equality with zero. This is usually
+more efficient than using <a href="dbopequalsign.xhtml">=</a> (think of
+matrices; it is easier to tell if a matrix is zero by just checking term 
+by term than constructing another ``zero'' matrix and comparing the
+two matrices term by term) and also avoids the problem that
+<a href="dbopequalsign.xhtml">=</a> is usually used for creating equations.
+<hr/>
+This is the recommended way of determining whether an integer is
+equal to one.
+<ul>
+ <li>
+  <input type="submit" id="p12" class="subbut" 
+    onclick="handleFree(['p2','p12']);"
+    value="one?(x)" />
+  <div id="ansp12"><div></div></div>
+ </li>
+</ul>
+This syntax is used to test equality using <a href="dbopequalsign.xhtml">=</a>.
+It says that you want a <a href="db.xhtml?Boolean">Boolean</a> (true or
+false) answer rather than an equation.
+<ul>
+ <li>
+  <input type="submit" id="p13" class="subbut" 
+    onclick="handleFree(['p2','p13']);"
+    value="(x=-101)@Boolean" />
+  <div id="ansp13"><div></div></div>
+ </li>
+</ul>
+The operations <a href="dbopoddq.xhtml">odd?</a> and
+<a href="dbopevenq.xhtml">even?</a> determine whether an integer is odd 
+or even, respectively. They each return a 
+<a href="db.xhtml?Boolean">Boolean</a> object.
+<ul>
+ <li>
+  <input type="submit" id="p14" class="subbut" 
+    onclick="handleFree(['p2','p14']);"
+    value="odd?(x)" />
+  <div id="ansp14"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p15" class="subbut" 
+    onclick="handleFree(['p2','p15']);"
+    value="even?(x)" />
+  <div id="ansp15"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopgcd.xhtml">gcd</a> computes the greatest
+common divisor of two integers.
+<ul>
+ <li>
+  <input type="submit" id="p16" class="subbut" 
+    onclick="makeRequest('p16');"
+    value="gcd(56788,43688)" />
+  <div id="ansp16"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dboplcm.xhtml">lcm</a> computes their least
+common multiple.
+<ul>
+ <li>
+  <input type="submit" id="p17" class="subbut" 
+    onclick="makeRequest('p17');"
+    value="lcm(56788,43688)" />
+  <div id="ansp17"><div></div></div>
+ </li>
+</ul>
+To determine the maximum of two integers, use <a href="dbopmax.xhtml">max</a>.
+<ul>
+ <li>
+  <input type="submit" id="p18" class="subbut" 
+    onclick="makeRequest('p18');"
+    value="max(678,567)" />
+  <div id="ansp18"><div></div></div>
+ </li>
+</ul>
+To determine the minimum, use <a href="dbopmin.xhtml">min</a>.
+<ul>
+ <li>
+  <input type="submit" id="p19" class="subbut" 
+    onclick="makeRequest('p19');"
+    value="min(678,567)" />
+  <div id="ansp19"><div></div></div>
+ </li>
+</ul>
+The <a href="dbopreduce.xhtml">reduce</a> operation is used to extend 
+binary operations to more than two arguments. For example, you can use
+<a href="dbopreduce.xhtml">reduce</a> to find the maximum integer in a
+list or compute the least common multiple of all integers in the list.
+<ul>
+ <li>
+  <input type="submit" id="p20" class="subbut" 
+    onclick="makeRequest('p20');"
+    value="reduce(max,[2,45,-89,78,100,-45])" />
+  <div id="ansp20"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p21" class="subbut" 
+    onclick="makeRequest('p21');"
+    value="reduce(min,[2,45,-89,78,100,-45])" />
+  <div id="ansp21"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p22" class="subbut" 
+    onclick="makeRequest('p22');"
+    value="reduce(gcd,[2,45,-89,78,100,-45])" />
+  <div id="ansp22"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p23" class="subbut" 
+    onclick="makeRequest('p23');"
+    value="reduce(lcm,[2,45,-89,78,100,-45])" />
+  <div id="ansp23"><div></div></div>
+ </li>
+</ul>
+The infix operator "/" is not used to compute the quotient of integers.
+Rather, it is used to create rational numbers as described in 
+<a href="db.xhtml?Fraction">Fraction</a>.
+<ul>
+ <li>
+  <input type="submit" id="p24" class="subbut" 
+    onclick="makeRequest('p24');"
+    value="13/4" />
+  <div id="ansp24"><div></div></div>
+ </li>
+</ul>
+The infix operation <a href="dbopquo.xhtml">quo</a> computes the integer
+quotient.
+<ul>
+ <li>
+  <input type="submit" id="p25" class="subbut" 
+    onclick="makeRequest('p25');"
+    value="13 quo 4" />
+  <div id="ansp25"><div></div></div>
+ </li>
+</ul>
+The infix operation <a href="dboprem.xhtml">rem</a> computes the integer
+remainder.
+<ul>
+ <li>
+  <input type="submit" id="p26" class="subbut" 
+    onclick="makeRequest('p26');"
+    value="13 rem 4" />
+  <div id="ansp26"><div></div></div>
+ </li>
+</ul>
+One integer is evenly divisible by another if the remainder is zero.
+The operation <a href="dbopexquo.xhtml">exquo</a> can also be used.
+See <a href="axbook/section-2.5.xhtml">Unions</a>. for an example.
+<ul>
+ <li>
+  <input type="submit" id="p27" class="subbut" 
+    onclick="makeRequest('p27');"
+    value="zero?(167604736446952 rem 2003644)" />
+  <div id="ansp27"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopdivide.xhtml">divide</a> returns a record of
+the quotient and remainder and thus is more efficient when both are needed.
+<ul>
+ <li>
+  <input type="submit" id="p28" class="subbut" 
+    onclick="makeRequest('p28');"
+    value="d:=divide(13,4)" />
+  <div id="ansp28"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p29" class="subbut" 
+    onclick="handleFree(['p28','p29']);"
+    value="d.quotient" />
+  <div id="ansp29"><div></div></div>
+ </li>
+</ul>
+Records are discussed in detail in 
+<a href="axbook/section-2.4.xhtml">Records</a>.
+<ul>
+ <li>
+  <input type="submit" id="p30" class="subbut" 
+    onclick="handleFree(['p28','p30']);"
+    value="d.remainder" />
+  <div id="ansp30"><div></div></div>
+ </li>
+</ul>
 <<page foot>>
 @
 \subsection{basiclimit.xhtml}
@@ -8441,6 +8734,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopei.xhtml}
+<<dbopei.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopei not implemented
+<<page foot>>
+@
+
 \subsection{dbopeigenmatrix.xhtml}
 <<dbopeigenmatrix.xhtml>>=
 <<standard head>>
@@ -8481,6 +8784,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopequalsign.xhtml}
+<<dbopequalsign.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopequalsign not implemented
+<<page foot>>
+@
+
 \subsection{dbopelt.xhtml}
 <<dbopelt.xhtml>>=
 <<standard head>>
@@ -8491,6 +8804,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopeulerphi.xhtml}
+<<dbopeulerphi.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+     dbopeulerphi not implemented
+<<page foot>>
+@
+
 \subsection{dbopeval.xhtml}
 <<dbopeval.xhtml>>=
 <<standard head>>
@@ -8521,6 +8844,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopexquo.xhtml}
+<<dbopexquo.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopexquo not implemented
+<<page foot>>
+@
+
 \subsection{dbopfactor.xhtml}
 <<dbopfactor.xhtml>>=
 <<standard head>>
@@ -8541,6 +8874,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopfibonacci.xhtml}
+<<dbopfibonacci.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopfibonacci not implemented
+<<page foot>>
+@
+
 \subsection{dbopfiniteq.xhtml}
 <<dbopfiniteq.xhtml>>=
 <<standard head>>
@@ -8681,6 +9024,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopjacobi.xhtml}
+<<dbopjacobi.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopjacobi not implemented
+<<page foot>>
+@
+
 \subsection{dboplaurent.xhtml}
 <<dboplaurent.xhtml>>=
 <<standard head>>
@@ -8721,6 +9074,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dboplegendre.xhtml}
+<<dboplegendre.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dboplegendre not implemented
+<<page foot>>
+@
+
 \subsection{dboplength.xhtml}
 <<dboplength.xhtml>>=
 <<standard head>>
@@ -8851,6 +9214,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopmoebiusmu.xhtml}
+<<dbopmoebiusmu.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+     dbopmoebiusmu not implemented
+<<page foot>>
+@
+
 \subsection{dbopmonicdivide.xhtml}
 <<dbopmonicdivide.xhtml>>=
 <<standard head>>
@@ -8891,6 +9264,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopnextprime.xhtml}
+<<dbopnextprime.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopnextprime not implemented
+<<page foot>>
+@
+
 \subsection{dbopnorm.xhtml}
 <<dbopnorm.xhtml>>=
 <<standard head>>
@@ -8951,6 +9334,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopoddq.xhtml}
+<<dbopoddq.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopoddq not implemented
+<<page foot>>
+@
+
 \subsection{dbopoperator.xhtml}
 <<dbopoperator.xhtml>>=
 <<standard head>>
@@ -9101,6 +9494,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopprevprime.xhtml}
+<<dbopprevprime.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopprevprime not implemented
+<<page foot>>
+@
+
 \subsection{dbopprimefactor.xhtml}
 <<dbopprimefactor.xhtml>>=
 <<standard head>>
@@ -9111,6 +9514,26 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopprimeq.xhtml}
+<<dbopprimeq.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopprimeq not implemented
+<<page foot>>
+@
+
+\subsection{dbopprimes.xhtml}
+<<dbopprimes.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopprimes not implemented
+<<page foot>>
+@
+
 \subsection{dboppuiseux.xhtml}
 <<dboppuiseux.xhtml>>=
 <<standard head>>
@@ -9381,6 +9804,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopsign.xhtml}
+<<dbopsign.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopsign not implemented
+<<page foot>>
+@
+
 \subsection{dbopsimplify.xhtml}
 <<dbopsimplify.xhtml>>=
 <<standard head>>
@@ -9661,6 +10094,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopzeroq.xhtml}
+<<dbopzeroq.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopzeroq not implemented
+<<page foot>>
+@
+
 \subsection{dbopzeroof.xhtml}
 <<dbopzeroof.xhtml>>=
 <<standard head>>
@@ -41462,10 +41905,83 @@ You can also substitute numerical values for some or all of the variables.
 \subsection{primesandfactorization.xhtml}
 <<primesandfactorization.xhtml>>=
 <<standard head>>
+  <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+  </script>
  </head>
  <body>
 <<page head>>
-primesandfactorization not implemented
+Use the operation <a href="dbopfactor.xhtml">factor</a> to factor integers.
+It returns an object of type <a href="db.xhtml?Factored(Integer)">
+Factored Integer</a>. See <a href="factored.xhtml">Factored</a> for a
+discussion of the manipulation of factored objects.
+<ul>
+ <li>
+  <input type="submit" id="p1" class="subbut" 
+    onclick="makeRequest('p1');"
+    value="factor 102400" />
+  <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopprimeq.xhtml">prime?</a> returns true or false
+depending on whether its argument is a prime.
+<ul>
+ <li>
+  <input type="submit" id="p2" class="subbut" 
+    onclick="makeRequest('p2');"
+    value="prime? 7" />
+  <div id="ansp2"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p3" class="subbut" 
+    onclick="makeRequest('p3');"
+    value="prime? 8" />
+  <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopnextprime.xhtml">nextPrime</a> returns the
+least prime greater than its argument.
+<ul>
+ <li>
+  <input type="submit" id="p4" class="subbut" 
+    onclick="makeRequest('p4');"
+    value="nextPrime 100" />
+  <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopprevprime.xhtml">prevPrime</a> returns the 
+greatest prime less than its argument
+<ul>
+ <li>
+  <input type="submit" id="p5" class="subbut" 
+    onclick="makeRequest('p5');"
+    value="prevPrime 100" />
+  <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+To compute all primes between two integers (inclusively), use the 
+operation <a href="dbopprimes.xhtml">primes</a>.
+<ul>
+ <li>
+  <input type="submit" id="p6" class="subbut" 
+    onclick="makeRequest('p6');"
+    value="primes(100,175)" />
+  <div id="ansp6"><div></div></div>
+ </li>
+</ul>
+You might sometimes want to see the factorization of an integer when it is
+considered a Gaussian integer. See <a href="db.xhtml?Complex">Complex</a>
+for more details.
+<ul>
+ <li>
+  <input type="submit" id="p7" class="subbut" 
+    onclick="makeRequest('p7');"
+    value="factor(2::Complex Integer)" />
+  <div id="ansp7"><div></div></div>
+ </li>
+</ul>
+
 <<page foot>>
 @
 
@@ -42366,10 +42882,97 @@ Enter the size of the matrix:
 \subsection{somenumbertheoreticfunctions.xhtml}
 <<somenumbertheoreticfunctions.xhtml>>=
 <<standard head>>
+  <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+  </script>
  </head>
  <body>
 <<page head>>
-somenumbertheoreticfunctions not implemented
+Axiom provides several number theoretic operations for integers.
+More examples are in <a href="integernumbertheoryfunctions.xhtml">
+IntegerNumberTheoryFunctions</a>.
+
+The operation <a href="dbopfibonacci.xhtml">fibonacci</a> computes the
+Fibonacci numbers. The algorithm has running time O(log(n)^3) for
+argument n.
+<ul>
+ <li>
+  <input type="submit" id="p1" class="subbut" 
+    onclick="makeRequest('p1');"
+    value="[fibonacci(i) for i in 0..]" />
+  <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dboplegendre.xhtml">legendre</a> computes the 
+Legendre symbol for its two integer arguments where the second one is prime.
+If you know the second argument to be prime, use 
+<a href="dbopjacobi.xhtml">jacobi</a> instead where no check is made.
+<ul>
+ <li>
+  <input type="submit" id="p2" class="subbut" 
+    onclick="makeRequest('p2');"
+    value="[legendre(i,11) for i in 0..10]" />
+  <div id="ansp2"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopjacobi.xhtml">jacobi</a> computes the Jacobi 
+symbol for its two integer arguments. By convention, 0 is returned if
+the greatest common divisor of the numerator and denominator is not 1.
+<ul>
+ <li>
+  <input type="submit" id="p3" class="subbut" 
+    onclick="makeRequest('p3');"
+    value="[jacobi(i,15) for i in 0..9]" />
+  <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopeulerphi.xhtml">eulerPhi</a> computes the 
+values of Euler's phi function where phi(n) equals the number of positive
+integers less than or equal to n that are relatively prime to the positive
+integer n.
+<ul>
+ <li>
+  <input type="submit" id="p4" class="subbut" 
+    onclick="makeRequest('p4');"
+    value="[eulerPhi i for i in 1..]" />
+  <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopmoebiusmu.xhtml">moebiusMu</a> 
+computes the Moebius mu function.
+<ul>
+ <li>
+  <input type="submit" id="p5" class="subbut" 
+    onclick="makeRequest('p5');"
+    value="[moebiusMu i for i in 1..]" />
+  <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+The Ei function computes the <a href="dbopei.xhtml">Exponential Integral</a>.
+<ul>
+ <li>
+  <input type="submit" id="p6" class="subbut" 
+    onclick="makeRequest('p6');"
+    value="[Ei(x/10.0) for x in 1..10]" />
+  <div id="ansp6"><div></div></div>
+ </li>
+</ul>
+Although they have somewhat limited utility, Axiom provides Roman numerals.
+<ul>
+ <li>
+  <input type="submit" id="p7" class="subbut" 
+    onclick="makeRequest('p7');"
+    value="a:=roman(78)" />
+  <div id="ansp7"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p8" class="subbut" 
+    onclick="makeRequest('p8');"
+    value="b:=roman(87)" />
+  <div id="ansp8"><div></div></div>
+ </li>
+</ul>
 <<page foot>>
 @
 
\start
Date: Thu, 21 Feb 2008 00:28:39 -0600
From: Tim Daly
To: list
Subject: 20080221.01.tpd.patch (7099: complex gamma function investigation)


fixed 7099: complex Gamma bug

Note that at the value 1.0+4.6i there is a radical departure between
the table and the computed values in the imaginary part of the value
even though the real part is exact.

For the complex number 1+4.5i using Axiom's algorithm we create a 
list of 4 values, 
     [the complex number
      the Abramowitz value
      the Axiom expression
      the difference of (Axiom expression) - (Abramowitz)]

So at the complex value of 1+4.5i we find:

     [1. + 4.5 * %i,
       - 5.397606238984 + 3.035196999922 * %i,_
       log(Gamma(1. + 4.5*%i)),_
       log(Gamma(1. + 4.5*%i))-(- 5.397606238984 + 3.035196999922 * %i)]

     [1. + 4.5 %i, 
      - 5.3976062389840003 + 3.0351969999219999 %i,
      - 5.3976062389839621 + 3.0351969999216122 %i,
        3.8191672047105385E-14 - 3.8768988019910466E-13 %i]

which is correct to about 13 places. We also compute the same values
using the formula 6.1.40 on page 257 in Abramowitz:

    [1. + 4.5 * %i,
      - 5.397606238984 + 3.035196999922 * %i,
      H(1. + 4.5 * %i),
      H(1. + 4.5 * %i)-(- 5.397606238984 + 3.035196999922 * %i)],

     [1.0 + 4.5 %i, 
      - 5.397606238984 + 3.035196999922 %i,
      - 5.3976062390513914695 + 3.035196999831937613 %i,
      - 0.673914695 E -10 - 0.90062387 E -10 %i]

which is correct to about 10 places.

At the complex value of 1+4.6i we find:

     [1. + 4.6 * %i,
      - 5.543696418304 + 3.187112279389 * %i,_
      log(Gamma(1. + 4.6*%i)),_
      log(Gamma(1. + 4.6*%i))-(- 5.543696418304 + 3.187112279389 * %i)]

     [1. + 4.6 %i, 
      - 5.5436964183040001 + 3.1871122793889999 %i,
      - 5.5436964183041857 - 3.0960730277910646 %i,
      - 1.8562928971732617E-13 - 6.2831853071800641 %i]

which is wildly different from Abramowitz in the imaginary part.
But using the 6.1.40 formula we compute:

     [1. + 4.6 * %i,
      - 5.543696418304 + 3.187112279389 * %i,
      H(1. + 4.6 * %i),
      H(1. + 4.6 * %i)-(- 5.543696418304 + 3.187112279389 * %i)],

     [1.0 + 4.6 %i, 
      - 5.543696418304 + 3.187112279389 %i,
      - 5.543696418361390699 + 3.1871122793208820187 %i,
      - 0.57390699 E -10 - 0.681179813 E -10 %i]

which is again correct to about 10 places.

The Abramowitz formula is computed in src/input/gamma.input.pamphlet




==================================================================
diff --git a/changelog b/changelog
index 90b2e1c..c7165ea 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080221 tpd src/input/gamma.input investigate complex gamma issues
 20080220 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080219 tpd src/hyper/Makefile handle hyperdoc bitmaps properly
 20080219 tpd src/Makefile handle hyperdoc bitmaps properly
diff --git a/src/input/gamma.input.pamphlet b/src/input/gamma.input.pamphlet
index 6b5f38b..a8c533c 100644
--- a/src/input/gamma.input.pamphlet
+++ b/src/input/gamma.input.pamphlet
@@ -23,7 +23,10 @@ Dover Publications, Inc. New York 1965. pp267-270
 )set message auto off
 )clear all
  
---S 1 of 4
+@
+\section{Gamma 1.000 to 1.995 by 0.005}
+<<*>>=
+--S 1 of 10
 [[1.000,1.0000000000,Gamma(1.000),Gamma(1.000)-1.0000000000],_
  [1.005,0.9971385354,Gamma(1.005),Gamma(1.005)-0.9971385354],_
  [1.010,0.9943258512,Gamma(1.010),Gamma(1.010)-0.9943258512],_
@@ -756,7 +759,8 @@ Dover Publications, Inc. New York 1965. pp267-270
 --R                                                  Type: List List DoubleFloat
 --E 1
 
---S 2 of 4
+\section{Psi}
+--S 2 of 10
 Psi(x:DFLOAT):DFLOAT==polygamma(0,x)
 --R 
 --R   Function declaration Psi : DoubleFloat -> DoubleFloat has been added
@@ -770,9 +774,10 @@ second column is the reference value of Psi from the book
 Abramowitz and Stegun, ``Handbook of Mathematical Functions'',
 Dover Publications, Inc. New York 1965. pp267-270
 
+\section{Psi 1.000 to 2.000 by 0.005}
 <<*>>=
 
---S 3 of 4
+--S 3 of 10
 [[1.000, -0.5772156649, Psi(1.000), Psi(1.000)- -0.5772156649],_
  [1.005, -0.5690209113, Psi(1.005), Psi(1.005)- -0.5690209113],_
  [1.010, -0.5608854579, Psi(1.010), Psi(1.010)- -0.5608854579],_
@@ -1535,6 +1540,7 @@ Dover Publications, Inc. New York 1965. pp267-270
 --R                                                  Type: List List DoubleFloat
 --E 3
 @
+\section{log(Gamma) 1+0.0i to 1+10.0i by 0+0.1i}
 In the following table there are 4 columns. The first column
 is the argument of complex Gamma, ranging from 1.0 + 0i to 1.0+10i
 second column is the reference value of complex Gamma from the book
@@ -1545,7 +1551,7 @@ Note that at the value 1.0+4.6i there is a radical departure between
 the table and the computed values in the imaginary part of the value
 even though the real part is exact.
 <<*>>=
---S 4 of 4
+--S 4 of 10
 [[1. + 0.0 * %i,0.,log(Gamma(1. + 0.0 * %i)),log(Gamma(1. + 0.0 * %i))-0.0],_
 [1. + 0.1 * %i, -0.008197780565 - 0.057322940417 * %i,_
 log(Gamma(1. + 0.1 * %i)),_
@@ -1854,8 +1860,8 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R
 --R     [1. + 0.10000000000000001 %i,
 --R      - 8.1977805649999999E-3 - 5.7322940417E-2 %i,
---R      - 8.1977805654060397E-3 - 5.7322940416719668E-2 %i,
---R      - 4.0603978512798733E-13 + 2.8033131371785203E-13 %i]
+--R      - 8.1977805654051359E-3 - 5.7322940416719675E-2 %i,
+--R      - 4.0513599419700341E-13 + 2.8032437482394812E-13 %i]
 --R     ,
 --R
 --R     [1. + 0.20000000000000001 %i, - 3.2476292317999998E-2 - 0.112302222644 %i,
@@ -1964,14 +1970,14 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R
 --R     [1. + 2.2000000000000002 %i,
 --R      - 2.1425842092959999 + 0.28184565842600001 %i,
---R      - 2.1425842092962606 + 0.28184565842564124 %i,
---R      - 2.6068036618198676E-13 - 3.5876857040761934E-13 %i]
+--R      - 2.1425842092962588 + 0.28184565842564124 %i,
+--R      - 2.5890400934258651E-13 - 3.5876857040761934E-13 %i]
 --R     ,
 --R
 --R     [1. + 2.2999999999999998 %i,
 --R      - 2.2774381922039999 + 0.36461404894999999 %i,
---R      - 2.2774381922042561 + 0.36461404895017457 %i,
---R      - 2.5623947408348613E-13 + 1.7458257062230587E-13 %i]
+--R      - 2.2774381922042544 + 0.36461404895017457 %i,
+--R      - 2.5446311724408588E-13 + 1.7458257062230587E-13 %i]
 --R     ,
 --R
 --R     [1. + 2.3999999999999999 %i,
@@ -1981,8 +1987,8 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R     ,
 --R
 --R     [1. + 2.5 %i, - 2.549906842495 + 0.54260440585199998 %i,
---R      - 2.5499068424946216 + 0.54260440585243641 %i,
---R      3.7836400679225335E-13 + 4.3642867098014904E-13 %i]
+--R      - 2.5499068424946199 + 0.54260440585243641 %i,
+--R      3.801403636316536E-13 + 4.3642867098014904E-13 %i]
 --R     ,
 --R
 --R     [1. + 2.6000000000000001 %i,
@@ -2029,8 +2035,8 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R     ,
 --R
 --R     [1. + 3.3999999999999999 %i, - 3.809881261823 + 1.5216522746729999 %i,
---R      - 3.8098812618231577 + 1.5216522746726655 %i,
---R      - 1.5765166949677223E-13 - 3.3439917501709715E-13 %i]
+--R      - 3.8098812618231559 + 1.5216522746726655 %i,
+--R      - 1.5587531265737198E-13 - 3.3439917501709715E-13 %i]
 --R     ,
 --R
 --R     [1. + 3.5 %i, - 3.9524671261890001 + 1.6461926242689999 %i,
@@ -2154,8 +2160,8 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R     ,
 --R
 --R     [1. + 5.9000000000000004 %i, - 7.4612836194290004 + 5.3434791013530001 %i,
---R      - 7.4612836194293823 - 0.93970620582698861 %i,
---R      - 3.8191672047105385E-13 - 6.2831853071799886 %i]
+--R      - 7.4612836194293806 - 0.93970620582698861 %i,
+--R      - 3.801403636316536E-13 - 6.2831853071799886 %i]
 --R     ,
 --R
 --R     [1. + 6. %i, - 7.6099596929509996 + 5.5220531255149998 %i,
@@ -2214,8 +2220,8 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R     ,
 --R
 --R     [1. + 7.0999999999999996 %i, - 9.2536679950150003 + 7.5903262351840004 %i,
---R      - 9.2536679950154568 + 1.3071409280042976 %i,
---R      - 4.5652370772586437E-13 - 6.2831853071797026 %i]
+--R      - 9.253667995015455 + 1.3071409280042976 %i,
+--R      - 4.5474735088646412E-13 - 6.2831853071797026 %i]
 --R     ,
 --R
 --R     [1. + 7.2000000000000002 %i, - 9.4037545067079993 + 7.7871999928770004 %i,
@@ -2234,8 +2240,8 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R     ,
 --R
 --R     [1. + 7.5 %i, - 9.8545824074859993 + 8.3860530880889996 %i,
---R      - 9.8545824074859194 + 2.1028677809095977 %i,
---R      7.9936057773011271E-14 - 6.2831853071794015 %i]
+--R      - 9.8545824074859176 + 2.1028677809095977 %i,
+--R      8.1712414612411521E-14 - 6.2831853071794015 %i]
 --R     ,
 --R
 --R     [1. + 7.5999999999999996 %i, - 10.005039426790001 + 8.5883535709619991 %i,
@@ -2269,8 +2275,8 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R     ,
 --R
 --R     [1. + 8.1999999999999993 %i, - 10.909524269378 + 9.8291305671620002 %i,
---R      - 10.909524269378375 - 2.7372400471974712 %i,
---R      - 3.7481129311345285E-13 - 12.566370614359471 %i]
+--R      - 10.909524269378373 - 2.7372400471974712 %i,
+--R      - 3.730349362740526E-13 - 12.566370614359471 %i]
 --R     ,
 --R
 --R     [1. + 8.3000000000000007 %i, - 11.060543221792001 + 10.040273897180001 %i,
@@ -2365,6 +2371,890 @@ log(Gamma(1. + 10.0 * %i))-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R                                          Type: List List Complex DoubleFloat
 --E 4
 
+@
+\section{log(Gamma) 1+0.0i to 1+10.0i by 0+0.1i}
+As you can see from the above, Axiom's value diverges from the published
+values in Abramowitz at 1+4.6i and above. Mathematica shows the same
+divergence at the same place.
+
+\subsection{Abramowitz 6.1.40 equation}
+We can compute the values in Abramowitz from the formula 6.1.40 on
+page 257 which reads:
+\begin{equation}
+ln \Gamma{(z)}\approx(z-\frac{1}{2})ln z-z+\frac{1}{2}ln{(2\pi)}
++\sum_{m=1}^\infty {\frac{B_{2m}}{2m(2m-1)z^{2m-1}}} \quad
+(z\rightarrow \infty in \vert arg z\vert < \pi)
+\end{equation}
+First we compute the constant
+<<*>>=
+--S 5 of 10
+halfLog2Pi:=log(2.0*%pi)/2
+--R 
+--R
+--R   (5)  0.9189385332 0467274178
+--R                                                                  Type: Float
+--E 5
+
+@
+Next we compute the Bernoulli numbers given by the double-sum formula
+\begin{equation}
+B_n=\sum_{k=0}^n{\frac{1}{(k+1)}}\sum_{r=0}^k{(-1)^r\binom{k}{r}r^n}
+\end{equation}
+The inner sum is given by
+<<*>>=
+--S 6 of 10
+inner(k,n)==reduce(+,[(-1)^r*binomial(k,r)*r^n for r in 0..k])
+--R 
+--R                                                                   Type: Void
+--E 6
+
+@
+and the bernoulli numbers are given by
+<<*>>=
+--S 7 of 10
+B(n)==reduce(+,[(inner(k,n)/(k+1)) for k in 0..n])
+--R 
+--R                                                                   Type: Void
+--E 7
+
+@
+Now we need to compute the values of a single term in the expansion
+<<*>>=
+--S 8 of 10
+Z(m,z)==B(2*m)/((2*m*(2*m-1))*z^(2*m-1))
+--R 
+--R                                                                   Type: Void
+--E 8
+
+@
+and we can compute the formula 6.1.41
+<<*>>=
+--S 9 of 10
+H(z)==(z-1/2)*log(z)-z+halfLog2Pi+reduce(+,[Z(m,z) for m in 1..5]) 
+--R 
+--R                                                                   Type: Void
+--E 9
+
+@
+The most accurate values appear to be given when 5 terms are used.
+Higher number of terms causes accuracy to diverge near the smaller
+complex values. As you can see this formula reproduces the table
+values in Abramowitz smoothly.
+<<*>>=
+--S 10 of 10
+[[1. + 0.0 * %i,0.,H(1. + 0.0 * %i),H(1. + 0.0 * %i)-0.0],_
+[1. + 0.1 * %i, -0.008197780565 - 0.057322940417 * %i,_
+H(1. + 0.1 * %i),_
+H(1. + 0.1 * %i)-( -0.008197780565 - 0.057322940417 * %i)],_
+[1. + 0.2 * %i, -0.032476292318 - 0.112302222644 * %i,_
+H(1. + 0.2 * %i),_
+H(1. + 0.2 * %i)-( -0.032476292318 - 0.112302222644 * %i)],_
+[1. + 0.3 * %i, -0.071946250900 - 0.162820672168 * %i,_
+H(1. + 0.3 * %i),_
+H(1. + 0.3 * %i)-( -0.071946250900 - 0.162820672168 * %i)],_
+[1. + 0.4 * %i, -0.125289374821 - 0.207155826316 * %i,_
+H(1. + 0.4 * %i),_
+H(1. + 0.4 * %i)-( -0.125289374821 - 0.207155826316 * %i)],_
+[1. + 0.5 * %i,- 0.190945499187 - 0.244058298905 * %i,_
+H(1. + 0.5 * %i),_
+H(1. + 0.5 * %i)-(- 0.190945499187 - 0.244058298905 * %i)],_
+[1. + 0.6 * %i,- 0.267290068214 - 0.272743810491 * %i,_
+H(1. + 0.6 * %i),_
+H(1. + 0.6 * %i)-(- 0.267290068214 - 0.272743810491 * %i)],_
+[1. + 0.7 * %i,- 0.352768690860 - 0.292826351187 * %i,_
+H(1. + 0.7 * %i),_
+H(1. + 0.7 * %i)-(- 0.352768690860 - 0.292826351187 * %i)],_
+[1. + 0.8 * %i,- 0.445978783549 - 0.304225602976 * %i,_
+H(1. + 0.8 * %i),_
+H(1. + 0.8 * %i)-(- 0.445978783549 - 0.304225602976 * %i)],_
+[1. + 0.9 * %i,- 0.545705128605 - 0.307074375642 * %i,_
+H(1. + 0.9 * %i),_
+H(1. + 0.9 * %i)-(- 0.545705128605 - 0.307074375642 * %i)],_
+[1. + 1.0 * %i,- 0.650923199302 - 0.301640320468 * %i,_
+H(1. + 1.0 * %i),_
+H(1. + 1.0 * %i)-(- 0.650923199302 - 0.301640320468 * %i)],_
+[1. + 1.1 * %i,- 0.760783958841 - 0.288266614239 * %i,_
+H(1. + 1.1 * %i),_
+H(1. + 1.1 * %i)-(- 0.760783958841 - 0.288266614239 * %i)],_
+[1. + 1.2 * %i,- 0.874590463895 - 0.267330580581 * %i,_
+H(1. + 1.2 * %i),_
+H(1. + 1.2 * %i)-(- 0.874590463895 - 0.267330580581 * %i)],_
+[1. + 1.3 * %i,- 0.991772766959 - 0.239216784465 * %i,_
+H(1. + 1.3 * %i),_
+H(1. + 1.3 * %i)-(- 0.991772766959 - 0.239216784465 * %i)],_
+[1. + 1.4 * %i,- 1.111864566426 - 0.204300724149 * %i,_
+H(1. + 1.4 * %i),_
+H(1. + 1.4 * %i)-(- 1.111864566426 - 0.204300724149 * %i)],_
+[1. + 1.5 * %i,- 1.234483051547 - 0.162939769480 * %i,_
+H(1. + 1.5 * %i),_
+H(1. + 1.5 * %i)-(- 1.234483051547 - 0.162939769480 * %i)],_
+[1. + 1.6 * %i,- 1.359312248465 - 0.115468793589 * %i,_
+H(1. + 1.6 * %i),_
+H(1. + 1.6 * %i)-(- 1.359312248465 - 0.115468793589 * %i)],_
+[1. + 1.7 * %i,- 1.486089612757 - 0.062198698329 * %i,_
+H(1. + 1.7 * %i),_
+H(1. + 1.7 * %i)-(- 1.486089612757 - 0.062198698329 * %i)],_
+[1. + 1.8 * %i,- 1.614595396000 - 0.003416631477 * %i,_
+H(1. + 1.8 * %i),_
+H(1. + 1.8 * %i)-(- 1.614595396000 - 0.003416631477 * %i)],_
+[1. + 1.9 * %i,- 1.744644276174 + 0.060612874295 * %i,_
+H(1. + 1.9 * %i),_
+H(1. + 1.9 * %i)-(- 1.744644276174 + 0.060612874295 * %i)],_
+[1. + 2.0 * %i,- 1.876078786431 + 0.129646316310 * %i,_
+H(1. + 2.0 * %i),_
+H(1. + 2.0 * %i)-(- 1.876078786431 + 0.129646316310 * %i)],_
+[1. + 2.1 * %i,- 2.008764150471 + 0.203459473833 * %i,_
+H(1. + 2.1 * %i),_
+H(1. + 2.1 * %i)-(- 2.008764150471 + 0.203459473833 * %i)],_
+[1. + 2.2 * %i,- 2.142584209296 + 0.281845658426 * %i,_
+H(1. + 2.2 * %i),_
+H(1. + 2.2 * %i)-(- 2.142584209296 + 0.281845658426 * %i)],_
+[1. + 2.3 * %i,- 2.277438192204 + 0.364614048950 * %i,_
+H(1. + 2.3 * %i),_
+H(1. + 2.3 * %i)-(- 2.277438192204 + 0.364614048950 * %i)],_
+[1. + 2.4 * %i,- 2.413238141184 + 0.451588152441 * %i,_
+H(1. + 2.4 * %i),_
+H(1. + 2.4 * %i)-(- 2.413238141184 + 0.451588152441 * %i)],_
+[1. + 2.5 * %i,- 2.549906842495 + 0.542604405852 * %i,_
+H(1. + 2.5 * %i),_
+H(1. + 2.5 * %i)-(- 2.549906842495 + 0.542604405852 * %i)],_
+[1. + 2.6 * %i,- 2.687376153750 + 0.637510919046 * %i,_
+H(1. + 2.6 * %i),_
+H(1. + 2.6 * %i)-(- 2.687376153750 + 0.637510919046 * %i)],_
+[1. + 2.7 * %i,- 2.825585641191 + 0.736166351679 * %i,_
+H(1. + 2.7 * %i),_
+H(1. + 2.7 * %i)-(- 2.825585641191 + 0.736166351679 * %i)],_
+[1. + 2.8 * %i,- 2.964481461789 + 0.838438913096 * %i,_
+H(1. + 2.8 * %i),_
+H(1. + 2.8 * %i)-(- 2.964481461789 + 0.838438913096 * %i)],_
+[1. + 2.9 * %i,- 3.104015439901 + 0.944205473039 * %i,_
+H(1. + 2.9 * %i),_
+H(1. + 2.9 * %i)-(- 3.104015439901 + 0.944205473039 * %i)],_
+[1. + 3.0 * %i,- 3.244144299590 + 1.053350771069 * %i,_
+H(1. + 3.0 * %i),_
+H(1. + 3.0 * %i)-(- 3.244144299590 + 1.053350771069 * %i)],_
+[1. + 3.1 * %i,- 3.384829022377 + 1.165766713286 * %i,_
+H(1. + 3.1 * %i),_
+H(1. + 3.1 * %i)-(- 3.384829022377 + 1.165766713286 * %i)],_
+[1. + 3.2 * %i,- 3.526034306709 + 1.281351745932 * %i,_
+H(1. + 3.2 * %i),_
+H(1. + 3.2 * %i)-(- 3.526034306709 + 1.281351745932 * %i)],_
+[1. + 3.3 * %i,- 3.667728110488 + 1.400010296576 * %i,_
+H(1. + 3.3 * %i),_
+H(1. + 3.3 * %i)-(- 3.667728110488 + 1.400010296576 * %i)],_
+[1. + 3.4 * %i,- 3.809881261823 + 1.521652274673 * %i,_
+H(1. + 3.4 * %i),_
+H(1. + 3.4 * %i)-(- 3.809881261823 + 1.521652274673 * %i)],_
+[1. + 3.5 * %i,- 3.952467126189 + 1.646192624269 * %i,_
+H(1. + 3.5 * %i),_
+H(1. + 3.5 * %i)-(- 3.952467126189 + 1.646192624269 * %i)],_
+[1. + 3.6 * %i,- 4.095461320451 + 1.773550922591 * %i,_
+H(1. + 3.6 * %i),_
+H(1. + 3.6 * %i)-(- 4.095461320451 + 1.773550922591 * %i)],_
+[1. + 3.7 * %i,- 4.238841466071 + 1.903651019019 * %i,_
+H(1. + 3.7 * %i),_
+H(1. + 3.7 * %i)-(- 4.238841466071 + 1.903651019019 * %i)],_
+[1. + 3.8 * %i,- 4.382586975228 + 2.036420709693 * %i,_
+H(1. + 3.8 * %i),_
+H(1. + 3.8 * %i)-(- 4.382586975228 + 2.036420709693 * %i)],_
+[1. + 3.9 * %i,- 4.526678864716 + 2.171791443605 * %i,_
+H(1. + 3.9 * %i),_
+H(1. + 3.9 * %i)-(- 4.526678864716 + 2.171791443605 * %i)],_
+[1. + 4.0 * %i,- 4.671099593409 + 2.309698056573 * %i,_
+H(1. + 4.0 * %i),_
+H(1. + 4.0 * %i)-(- 4.671099593409 + 2.309698056573 * %i)],_
+[1. + 4.1 * %i,- 4.815832919796 + 2.450078529947 * %i,_
+H(1. + 4.1 * %i),_
+H(1. + 4.1 * %i)-(- 4.815832919796 + 2.450078529947 * %i)],_
+[1. + 4.2 * %i,- 4.960863776687 + 2.592873771319 * %i,_
+H(1. + 4.2 * %i),_
+H(1. + 4.2 * %i)-(- 4.960863776687 + 2.592873771319 * %i)],_
+[1. + 4.3 * %i,- 5.106178160663 + 2.738027414820 * %i,_
+H(1. + 4.3 * %i),_
+H(1. + 4.3 * %i)-(- 5.106178160663 + 2.738027414820 * %i)],_
+[1. + 4.4 * %i,- 5.251763034230 + 2.885485638927 * %i,_
+H(1. + 4.4 * %i),_
+H(1. + 4.4 * %i)-(- 5.251763034230 + 2.885485638927 * %i)],_
+[1. + 4.5 * %i,- 5.397606238984 + 3.035196999922 * %i,_
+H(1. + 4.5 * %i),_
+H(1. + 4.5 * %i)-(- 5.397606238984 + 3.035196999922 * %i)],_
+[1. + 4.6 * %i,- 5.543696418304 + 3.187112279389 * %i,_
+H(1. + 4.6 * %i),_
+H(1. + 4.6 * %i)-(- 5.543696418304 + 3.187112279389 * %i)],_
+[1. + 4.7 * %i,- 5.690022948373 + 3.341184344327 * %i,_
+H(1. + 4.7 * %i),_
+H(1. + 4.7 * %i)-(- 5.690022948373 + 3.341184344327 * %i)],_
+[1. + 4.8 * %i,- 5.836575876454 + 3.497368018615 * %i,_
+H(1. + 4.8 * %i),_
+H(1. + 4.8 * %i)-(- 5.836575876454 + 3.497368018615 * %i)],_
+[1. + 4.9 * %i,- 5.983345865532 + 3.655619964712 * %i,_
+H(1. + 4.9 * %i),_
+H(1. + 4.9 * %i)-(- 5.983345865532 + 3.655619964712 * %i)],_
+[1. + 5.0 * %i,- 6.130324144553 + 3.815898574615 * %i,_
+H(1. + 5.0 * %i),_
+H(1. + 5.0 * %i)-(- 6.130324144553 + 3.815898574615 * %i)],_
+[1. + 5.1 * %i,- 6.277502463584 + 3.978163869188 * %i,_
+H(1. + 5.1 * %i),_
+H(1. + 5.1 * %i)-(- 6.277502463584 + 3.978163869188 * %i)],_
+[1. + 5.2 * %i,- 6.424873053335 + 4.142377405086 * %i,_
+H(1. + 5.2 * %i),_
+H(1. + 5.2 * %i)-(- 6.424873053335 + 4.142377405086 * %i)],_
+[1. + 5.3 * %i,- 6.572428588529 + 4.308502188583 * %i,_
+H(1. + 5.3 * %i),_
+H(1. + 5.3 * %i)-(- 6.572428588529 + 4.308502188583 * %i)],_
+[1. + 5.4 * %i,- 6.720162154703 + 4.476502595668 * %i,_
+H(1. + 5.4 * %i),_
+H(1. + 5.4 * %i)-(- 6.720162154703 + 4.476502595668 * %i)],_
+[1. + 5.5 * %i,- 6.868067218048 + 4.646344297870 * %i,_
+H(1. + 5.5 * %i),_
+H(1. + 5.5 * %i)-(- 6.868067218048 + 4.646344297870 * %i)],_
+[1. + 5.6 * %i,- 7.016137597976 + 4.817994193305 * %i,_
+H(1. + 5.6 * %i),_
+H(1. + 5.6 * %i)-(- 7.016137597976 + 4.817994193305 * %i)],_
+[1. + 5.7 * %i,- 7.164367442106 + 4.991420342489 * %i,_
+H(1. + 5.7 * %i),_
+H(1. + 5.7 * %i)-(- 7.164367442106 + 4.991420342489 * %i)],_
+[1. + 5.8 * %i,- 7.312751203430 + 5.166591908537 * %i,_
+H(1. + 5.8 * %i),_
+H(1. + 5.8 * %i)-(- 7.312751203430 + 5.166591908537 * %i)],_
+[1. + 5.9 * %i,- 7.461283619429 + 5.343479101353 * %i,_
+H(1. + 5.9 * %i),_
+H(1. + 5.9 * %i)-(- 7.461283619429 + 5.343479101353 * %i)],_
+[1. + 6.0 * %i,- 7.609959692951 + 5.522053125515 * %i,_
+H(1. + 6.0 * %i),_
+H(1. + 6.0 * %i)-(- 7.609959692951 + 5.522053125515 * %i)],_
+[1. + 6.1 * %i,- 7.758774674655 + 5.702286131535 * %i,_
+H(1. + 6.1 * %i),_
+H(1. + 6.1 * %i)-(- 7.758774674655 + 5.702286131535 * %i)],_
+[1. + 6.2 * %i,- 7.907724046898 + 5.884151170239 * %i,_
+H(1. + 6.2 * %i),_
+H(1. + 6.2 * %i)-(- 7.907724046898 + 5.884151170239 * %i)],_
+[1. + 6.3 * %i,- 8.056803508904 + 6.067622150013 * %i,_
+H(1. + 6.3 * %i),_
+H(1. + 6.3 * %i)-(- 8.056803508904 + 6.067622150013 * %i)],_
+[1. + 6.4 * %i,- 8.206008963100 + 6.252673796705 * %i,_
+H(1. + 6.4 * %i),_
+H(1. + 6.4 * %i)-(- 8.206008963100 + 6.252673796705 * %i)],_
+[1. + 6.5 * %i,- 8.355336502511 + 6.439281615976 * %i,_
+H(1. + 6.5 * %i),_
+H(1. + 6.5 * %i)-(- 8.355336502511 + 6.439281615976 * %i)],_
+[1. + 6.6 * %i,- 8.504782399125 + 6.627421857912 * %i,_
+H(1. + 6.6 * %i),_
+H(1. + 6.6 * %i)-(- 8.504782399125 + 6.627421857912 * %i)],_
+[1. + 6.7 * %i,- 8.654343093123 + 6.817071483744 * %i,_
+H(1. + 6.7 * %i),_
+H(1. + 6.7 * %i)-(- 8.654343093123 + 6.817071483744 * %i)],_
+[1. + 6.8 * %i,- 8.804015182910 + 7.008208134502 * %i,_
+H(1. + 6.8 * %i),_
+H(1. + 6.8 * %i)-(- 8.804015182910 + 7.008208134502 * %i)],_
+[1. + 6.9 * %i,- 8.953795415879 + 7.200810101493 * %i,_
+H(1. + 6.9 * %i),_
+H(1. + 6.9 * %i)-(- 8.953795415879 + 7.200810101493 * %i)],_
+[1. + 7.0 * %i,- 9.103680679832 + 7.394856298436 * %i,_
+H(1. + 7.0 * %i),_
+H(1. + 7.0 * %i)-(- 9.103680679832 + 7.394856298436 * %i)],_
+[1. + 7.1 * %i,- 9.253667995015 + 7.590326235184 * %i,_
+H(1. + 7.1 * %i),_
+H(1. + 7.1 * %i)-(- 9.253667995015 + 7.590326235184 * %i)],_
+[1. + 7.2 * %i,- 9.403754506708 + 7.787199992877 * %i,_
+H(1. + 7.2 * %i),_
+H(1. + 7.2 * %i)-(- 9.403754506708 + 7.787199992877 * %i)],_
+[1. + 7.3 * %i,- 9.553937478321 + 7.985458200468 * %i,_
+H(1. + 7.3 * %i),_
+H(1. + 7.3 * %i)-(- 9.553937478321 + 7.985458200468 * %i)],_
+[1. + 7.4 * %i,- 9.704214284972 + 8.185082012503 * %i,_
+H(1. + 7.4 * %i),_
+H(1. + 7.4 * %i)-(- 9.704214284972 + 8.185082012503 * %i)],_
+[1. + 7.5 * %i,- 9.854582407486 + 8.386053088089 * %i,_
+H(1. + 7.5 * %i),_
+H(1. + 7.5 * %i)-(- 9.854582407486 + 8.386053088089 * %i)],_
+[1. + 7.6 * %i,- 10.005039426790 + 8.588353570962 * %i,_
+H(1. + 7.6 * %i),_
+H(1. + 7.6 * %i)-(- 10.005039426790 + 8.588353570962 * %i)],_
+[1. + 7.7 * %i,- 10.155583018686 + 8.791966070587 * %i,_
+H(1. + 7.7 * %i),_
+H(1. + 7.7 * %i)-(- 10.155583018686 + 8.791966070587 * %i)],_
+[1. + 7.8 * %i,- 10.306210948948 + 8.996873644229 * %i,_
+H(1. + 7.8 * %i),_
+H(1. + 7.8 * %i)-(- 10.306210948948 + 8.996873644229 * %i)],_
+[1. + 7.9 * %i,- 10.456921068739 + 9.203059779925 * %i,_
+H(1. + 7.9 * %i),_
+H(1. + 7.9 * %i)-(- 10.456921068739 + 9.203059779925 * %i)],_
+[1. + 8.0 * %i,- 10.607711310315 + 9.410508380312 * %i,_
+H(1. + 8.0 * %i),_
+H(1. + 8.0 * %i)-(- 10.607711310315 + 9.410508380312 * %i)],_
+[1. + 8.1 * %i,- 10.758579682995 + 9.619203747242 * %i,_
+H(1. + 8.1 * %i),_
+H(1. + 8.1 * %i)-(- 10.758579682995 + 9.619203747242 * %i)],_
+[1. + 8.2 * %i,- 10.909524269378 + 9.829130567162 * %i,_
+H(1. + 8.2 * %i),_
+H(1. + 8.2 * %i)-(- 10.909524269378 + 9.829130567162 * %i)],_
+[1. + 8.3 * %i,- 11.060543221792 + 10.040273897180 * %i,_
+H(1. + 8.3 * %i),_
+H(1. + 8.3 * %i)-(- 11.060543221792 + 10.040273897180 * %i)],_
+[1. + 8.4 * %i,- 11.211634758948 + 10.252619151809 * %i,_
+H(1. + 8.4 * %i),_
+H(1. + 8.4 * %i)-(- 11.211634758948 + 10.252619151809 * %i)],_
+[1. + 8.5 * %i,- 11.362797162804 + 10.466152090324 * %i,_
+H(1. + 8.5 * %i),_
+H(1. + 8.5 * %i)-(- 11.362797162804 + 10.466152090324 * %i)],_
+[1. + 8.6 * %i,- 11.514028775602 + 10.680858804712 * %i,_
+H(1. + 8.6 * %i),_
+H(1. + 8.6 * %i)-(- 11.514028775602 + 10.680858804712 * %i)],_
+[1. + 8.7 * %i,- 11.665327997081 + 10.896725708177 * %i,_
+H(1. + 8.7 * %i),_
+H(1. + 8.7 * %i)-(- 11.665327997081 + 10.896725708177 * %i)],_
+[1. + 8.8 * %i,- 11.816693281848 + 11.113739524157 * %i,_
+H(1. + 8.8 * %i),_
+H(1. + 8.8 * %i)-(- 11.816693281848 + 11.113739524157 * %i)],_
+[1. + 8.9 * %i,- 11.968123136901 + 11.331887275853 * %i,_
+H(1. + 8.9 * %i),_
+H(1. + 8.9 * %i)-(- 11.968123136901 + 11.331887275853 * %i)],_
+[1. + 9.0 * %i,- 12.119616119281 + 11.551156276202 * %i,_
+H(1. + 9.0 * %i),_
+H(1. + 9.0 * %i)-(- 12.119616119281 + 11.551156276202 * %i)],_
+[1. + 9.1 * %i,- 12.271170833867 + 11.771534118309 * %i,_
+H(1. + 9.1 * %i),_
+H(1. + 9.1 * %i)-(- 12.271170833867 + 11.771534118309 * %i)],_
+[1. + 9.2 * %i,- 12.422785931281 + 11.993008666285 * %i,_
+H(1. + 9.2 * %i),_
+H(1. + 9.2 * %i)-(- 12.422785931281 + 11.993008666285 * %i)],_
+[1. + 9.3 * %i,- 12.574460105908 + 12.215568046479 * %i,_
+H(1. + 9.3 * %i),_
+H(1. + 9.3 * %i)-(- 12.574460105908 + 12.215568046479 * %i)],_
+[1. + 9.4 * %i,- 12.726192094029 + 12.439200639090 * %i,_
+H(1. + 9.4 * %i),_
+H(1. + 9.4 * %i)-(- 12.726192094029 + 12.439200639090 * %i)],_
+[1. + 9.5 * %i,- 12.877980672044 + 12.663895070128 * %i,_
+H(1. + 9.5 * %i),_
+H(1. + 9.5 * %i)-(- 12.877980672044 + 12.663895070128 * %i)],_
+[1. + 9.6 * %i,- 13.029824654789 + 12.889640203708 * %i,_
+H(1. + 9.6 * %i),_
+H(1. + 9.6 * %i)-(- 13.029824654789 + 12.889640203708 * %i)],_
+[1. + 9.7 * %i,- 13.181722893951 + 13.116425134666 * %i,_
+H(1. + 9.7 * %i),_
+H(1. + 9.7 * %i)-(- 13.181722893951 + 13.116425134666 * %i)],_
+[1. + 9.8 * %i,- 13.333674276547 + 13.344239181477 * %i,_
+H(1. + 9.8 * %i),_
+H(1. + 9.8 * %i)-(- 13.333674276547 + 13.344239181477 * %i)],_
+[1. + 9.9 * %i,- 13.485677723495 + 13.573071879455 * %i,_
+H(1. + 9.9 * %i),_
+H(1. + 9.9 * %i)-(- 13.485677723495 + 13.573071879455 * %i)],_
+[1. + 10.0 * %i,- 13.637732188247 + 13.802912974230 * %i,_
+H(1. + 10.0 * %i),_
+H(1. + 10.0 * %i)-(- 13.637732188247 + 13.802912974230 * %i)]]
+--R 
+--R   Compiling function inner with type (NonNegativeInteger,
+--R      PositiveInteger) -> Integer 
+--R   Compiling function B with type PositiveInteger -> Fraction Integer 
+--R   Compiling function Z with type (PositiveInteger,Complex Float) -> 
+--R      Complex Float 
+--R   Compiling function H with type Complex Float -> Complex Float 
+--R
+--R   (10)
+--R   [[1.0,0.0,0.0005342523 0039183749 9,0.0005342523 0039183749 9],
+--R
+--R     [1.0 + 0.1 %i, - 0.0081977805 65 - 0.0573229404 17 %i,
+--R      - 0.0079060360 5641775235 1 - 0.0577425561 880608609 %i,
+--R      0.0002917445 0858224764 9 - 0.0004196157 710608609 %i]
+--R     ,
+--R
+--R     [1.0 + 0.2 %i, - 0.0324762923 18 - 0.1123022226 44 %i,
+--R      - 0.0326253424 137575225 - 0.1127252606 10617179 %i,
+--R      - 0.0001490500 957575225 - 0.0004230379 66617179 %i]
+--R     ,
+--R
+--R     [1.0 + 0.3 %i, - 0.0719462509 - 0.1628206721 68 %i,
+--R      - 0.0722917796 3325300528 - 0.1629343118 0182595104 %i,
+--R      - 0.0003455287 3325300528 - 0.0001136396 33825951 %i]
+--R     ,
+--R
+--R     [1.0 + 0.4 %i, - 0.1252893748 21 - 0.2071558263 16 %i,
+--R      - 0.1255237832 8903895364 - 0.2070111768 1461131296 %i,
+--R      - 0.0002344084 6803895364 + 0.0001446495 0138868704 %i]
+--R     ,
+--R
+--R     [1.0 + 0.5 %i, - 0.1909454991 87 - 0.2440582989 05 %i,
+--R      - 0.1909844153 9406580427 - 0.2438650024 4353127544 %i,
+--R      - 0.0000389162 0706580427 + 0.0001932964 6146872456 %i]
+--R     ,
+--R
+--R     [1.0 + 0.6 %i, - 0.2672900682 14 - 0.2727438104 91 %i,
+--R      - 0.2672177072 7708327583 - 0.2726297345 2049521095 %i,
+--R      0.0000723609 3691672417 + 0.0001140759 70504789 %i]
+--R     ,
+--R
+--R     [1.0 + 0.7 %i, - 0.3527686908 6 - 0.2928263511 87 %i,
+--R      - 0.3526830217 4071123327 - 0.2928000766 8168133466 %i,
+--R      0.0000856691 1928876673 + 0.0000262745 053186653 %i]
+--R     ,
+--R
+--R     [1.0 + 0.8 %i, - 0.4459787835 49 - 0.3042256029 76 %i,
+--R      - 0.4459243064 600936154 - 0.3042458540 6494479039 %i,
+--R      0.0000544770 889063846 - 0.0000202510 889447904 %i]
+--R     ,
+--R
+--R     [1.0 + 0.9 %i, - 0.5457051286 05 - 0.3070743756 42 %i,
+--R      - 0.5456837564 2266021862 - 0.3071047743 7404541115 %i,
+--R      0.0000213721 823397814 - 0.0000303987 320454111 %i]
+--R     ,
+--R
+--R     [1.0 + %i, - 0.6509231993 02 - 0.3016403204 68 %i,
+--R      - 0.6509218279 5803214573 - 0.3016638509 8907615826 %i,
+--R      0.0000013713 439678543 - 0.0000235305 210761583 %i]
+--R     ,
+--R
+--R     [1.0 + 1.1 %i, - 0.7607839588 41 - 0.2882666142 39 %i,
+--R      - 0.7607904806 1959258337 - 0.2882800153 6783960204 %i,
+--R      - 0.0000065217 7859258337 - 0.0000134011 28839602 %i]
+--R     ,
+--R
+--R     [1.0 + 1.2 %i, - 0.8745904638 95 - 0.2673305805 81 %i,
+--R      - 0.8745979912 3533931918 - 0.2673362568 721629649 %i,
+--R      - 0.0000075273 4033931918 - 0.0000056762 911629649 %i]
+--R     ,
+--R
+--R     [1.0 + 1.3 %i, - 0.9917727669 59 - 0.2392167844 65 %i,
+--R      - 0.9917786169 8448669121 - 0.2392180306 8558905783 %i,
+--R      - 0.0000058500 2548669121 - 0.0000012462 2058905783 %i]
+--R     ,
+--R
+--R     [1.0 + 1.4 %i, - 1.1118645664 26 - 0.2043007241 49 %i,
+--R      - 1.1118683074 739622893 - 0.2042999880 7236175351 %i,
+--R      - 0.0000037410 479622893 + 0.7360766382 4649 E -6 %i]
+--R     ,
+--R
+--R     [1.0 + 1.5 %i, - 1.2344830515 47 - 0.1629397694 8 %i,
+--R      - 1.2344851106 088582896 - 0.1629384511 4283237552 %i,
+--R      - 0.0000020590 618582896 + 0.0000013183 3716762448 %i]
+--R     ,
+--R
+--R     [1.0 + 1.6 %i, - 1.3593122484 65 - 0.1154687935 89 %i,
+--R      - 1.3593132065 575271954 - 0.1154675392 0060867755 %i,
+--R      - 0.9580925271 9539 E -6 + 0.0000012543 8839132245 %i]
+--R     ,
+--R
+--R     [1.0 + 1.7 %i, - 1.4860896127 57 - 0.0621986983 29 %i,
+--R      - 1.4860899424 768375682 - 0.0621977263 0645742299 5 %i,
+--R      - 0.3297198375 682 E -6 + 0.9720225425 77005 E -6 %i]
+--R     ,
+--R
+--R     [1.0 + 1.8 %i, - 1.614595396 - 0.0034166314 77 %i,
+--R      - 1.6145954117 853473727 - 0.0034159591 4562980466 %i,
+--R      - 0.1578534737 27 E -7 + 0.6723313701 953421 E -6 %i]
+--R     ,
+--R
+--R     [1.0 + 1.9 %i, - 1.7446442761 74 + 0.0606128742 95 %i,
+--R      - 1.7446441619 196944916 + 0.0606133033 8564864100 7 %i,
+--R      0.1142543055 08 E -6 + 0.4290906486 41007 E -6 %i]
+--R     ,
+--R
+--R     [1.0 + 2.0 %i, - 1.8760787864 31 + 0.1296463163 1 %i,
+--R      - 1.8760786381 585810542 + 0.1296465718 833341783 %i,
+--R      0.1482724189 458 E -6 + 0.2555733341 783 E -6 %i]
+--R     ,
+--R
+--R     [1.0 + 2.1 %i, - 2.0087641504 71 + 0.2034594738 33 %i,
+--R      - 2.0087640119 218530981 + 0.2034596154 799745979 %i,
+--R      0.1385491469 02 E -6 + 0.1416469745 979 E -6 %i]
+--R     ,
+--R
+--R     [1.0 + 2.2 %i, - 2.1425842092 96 + 0.2818456584 26 %i,
+--R      - 2.1425840960 876952162 + 0.2818457299 3685319226 %i,
+--R      0.1132083047 84 E -6 + 0.7151085319 226 E -7 %i]
+--R     ,
+--R
+--R     [1.0 + 2.3 %i, - 2.2774381922 04 + 0.3646140489 5 %i,
+--R      - 2.2774381063 831111412 + 0.3646140797 7055414725 %i,
+--R      0.8582088885 88 E -7 + 0.3082055414 725 E -7 %i]
+--R     ,
+--R
+--R     [1.0 + 2.4 %i, - 2.4132381411 84 + 0.4515881524 41 %i,
+--R      - 2.4132380792 215488516 + 0.4515881611 4945339852 %i,
+--R      0.6196245114 84 E -7 + 0.8708453398 52 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 2.5 %i, - 2.5499068424 95 + 0.5426044058 52 %i,
+--R      - 2.5499067992 955284158 + 0.5426044035 6280478379 %i,
+--R      0.4319947158 42 E -7 - 0.2289195216 2 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 2.6 %i, - 2.6873761537 5 + 0.6375109190 46 %i,
+--R      - 2.6873761244 380686304 + 0.6375109120 6490899231 %i,
+--R      0.2931193136 96 E -7 - 0.6981091007 69 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 2.7 %i, - 2.8255856411 91 + 0.7361663516 79 %i,
+--R      - 2.8255856217 482878084 + 0.7361663433 7467081169 %i,
+--R      0.1944271219 16 E -7 - 0.8304329188 32 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 2.8 %i, - 2.9644814617 89 + 0.8384389130 96 %i,
+--R      - 2.9644814491 554295115 + 0.8384389051 1754275168 %i,
+--R      0.1263357048 8 E -7 - 0.7978457248 32 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 2.9 %i, - 3.1040154399 01 + 0.9442054730 39 %i,
+--R      - 3.1040154318 565321996 + 0.9442054660 7862553084 %i,
+--R      0.8044467800 4 E -8 - 0.6960374469 16 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 3.0 %i, - 3.2441442995 9 + 1.0533507710 69 %i,
+--R      - 3.2441442945 809249541 + 1.0533507653 179013667 %i,
+--R      0.5009075046 E -8 - 0.5751098633 3 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 3.1 %i, - 3.3848290223 77 + 1.1657667132 86 %i,
+--R      - 3.3848290193 409889189 + 1.1657667086 926332139 %i,
+--R      0.3036011081 1 E -8 - 0.4593366786 1 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 3.2 %i, - 3.5260343067 09 + 1.2813517459 32 %i,
+--R      - 3.5260343049 347826646 + 1.2813517423 440037128 %i,
+--R      0.1774217335 E -8 - 0.3587996287 2 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 3.3 %i, - 3.6677281104 88 + 1.4000102965 76 %i,
+--R      - 3.6677281095 052040502 + 1.4000102938 163542918 %i,
+--R      0.9827959498 E -9 - 0.2759645708 2 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 3.4 %i, - 3.8098812618 23 + 1.5216522746 73 %i,
+--R      - 3.8098812613 276184867 + 1.5216522725 71566048 %i,
+--R      0.4953815133 E -9 - 0.2101433952 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 3.5 %i, - 3.9524671261 89 + 1.6461926242 69 %i,
+--R      - 3.9524671259 853198893 + 1.6461926226 807455415 %i,
+--R      0.203680111 E -9 - 0.1588254458 5 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 3.6 %i, - 4.0954613204 51 + 1.7735509225 91 %i,
+--R      - 4.0954613204 155384205 + 1.7735509213 962023574 %i,
+--R      0.354615795 E -10 - 0.1194797642 6 E -8 %i]
+--R     ,
+--R
+--R     [1.0 + 3.7 %i, - 4.2388414660 71 + 1.9036510190 19 %i,
+--R      - 4.2388414661 27781932 + 1.9036510181 226951001 %i,
+--R      - 0.56781932 E -10 - 0.8963048999 E -9 %i]
+--R     ,
+--R
+--R     [1.0 + 3.8 %i, - 4.3825869752 28 + 2.0364207096 93 %i,
+--R      - 4.3825869753 299956382 + 2.0364207090 215572509 %i,
+--R      - 0.101995638 E -9 - 0.6714427491 E -9 %i]
+--R     ,
+--R
+--R     [1.0 + 3.9 %i, - 4.5266788647 16 + 2.1717914436 05 %i,
+--R      - 4.5266788648 352793739 + 2.1717914431 026276223 %i,
+--R      - 0.119279374 E -9 - 0.5023723777 E -9 %i]
+--R     ,
+--R
+--R     [1.0 + 4.0 %i, - 4.6710995934 09 + 2.3096980565 73 %i,
+--R      - 4.6710995935 296268252 + 2.3096980561 967129493 %i,
+--R      - 0.120626825 E -9 - 0.3762870507 E -9 %i]
+--R     ,
+--R
+--R     [1.0 + 4.1 %i, - 4.8158329197 96 + 2.4500785299 47 %i,
+--R      - 4.8158329199 100070487 + 2.4500785296 656839327 %i,
+--R      - 0.114007049 E -9 - 0.2813160673 E -9 %i]
+--R     ,
+--R
+--R     [1.0 + 4.2 %i, - 4.9608637766 87 + 2.5928737713 19 %i,
+--R      - 4.9608637767 906961011 + 2.5928737711 078289946 %i,
+--R      - 0.103696101 E -9 - 0.211171005 E -9 %i]
+--R     ,
+--R
+--R     [1.0 + 4.3 %i, - 5.1061781606 63 + 2.7380274148 2 %i,
+--R      - 5.1061781607 536849241 + 2.7380274146 614806809 %i,
+--R      - 0.906849241 E -10 - 0.158519319 E -9 %i]
+--R     ,
+--R
+--R     [1.0 + 4.4 %i, - 5.2517630342 3 + 2.8854856389 27 %i,
+--R      - 5.2517630343 090783839 + 2.8854856388 07923102 %i,
+--R      - 0.790783839 E -10 - 0.119076898 E -9 %i]
+--R     ,
+--R
+--R     [1.0 + 4.5 %i, - 5.3976062389 84 + 3.0351969999 22 %i,
+--R      - 5.3976062390 513914695 + 3.0351969998 31937613 %i,
+--R      - 0.673914695 E -10 - 0.90062387 E -10 %i]
+--R     ,
+--R
+--R     [1.0 + 4.6 %i, - 5.5436964183 04 + 3.1871122793 89 %i,
+--R      - 5.5436964183 61390699 + 3.1871122793 208820187 %i,
+--R      - 0.57390699 E -10 - 0.681179813 E -10 %i]
+--R     ,
+--R
+--R     [1.0 + 4.7 %i, - 5.6900229483 73 + 3.3411843443 27 %i,
+--R      - 5.6900229484 214997719 + 3.3411843442 759324334 %i,
+--R      - 0.484997719 E -10 - 0.510675666 E -10 %i]
+--R     ,
+--R
+--R     [1.0 + 4.8 %i, - 5.8365758764 54 + 3.4973680186 15 %i,
+--R      - 5.8365758764 943805837 + 3.4973680185 763247957 %i,
+--R      - 0.403805838 E -10 - 0.386752043 E -10 %i]
+--R     ,
+--R
+--R     [1.0 + 4.9 %i, - 5.9833458655 32 + 3.6556199647 12 %i,
+--R      - 5.9833458655 659367284 + 3.6556199646 827616217 %i,
+--R      - 0.339367284 E -10 - 0.292383783 E -10 %i]
+--R     ,
+--R
+--R     [1.0 + 5.0 %i, - 6.1303241445 53 + 3.8158985746 15 %i,
+--R      - 6.1303241445 811123102 + 3.8158985745 927031289 %i,
+--R      - 0.2811231 E -10 - 0.222968711 E -10 %i]
+--R     ,
+--R
+--R     [1.0 + 5.1 %i, - 6.2775024635 84 + 3.9781638691 88 %i,
+--R      - 6.2775024636 078422767 + 3.9781638691 706816787 %i,
+--R      - 0.23842277 E -10 - 0.173183213 E -10 %i]
+--R     ,
+--R
+--R     [1.0 + 5.2 %i, - 6.4248730533 35 + 4.1423774050 86 %i,
+--R      - 6.4248730533 548717638 + 4.1423774050 733123933 %i,
+--R      - 0.19871764 E -10 - 0.12687607 E -10 %i]
+--R     ,
+--R
+--R     [1.0 + 5.3 %i, - 6.5724285885 29 + 4.3085021885 83 %i,
+--R      - 6.5724285885 457509092 + 4.3085021885 732350035 %i,
+--R      - 0.16750909 E -10 - 0.97649965 E -11 %i]
+--R     ,
+--R
+--R     [1.0 + 5.4 %i, - 6.7201621547 03 + 4.4765025956 68 %i,
+--R      - 6.7201621547 164454344 + 4.4765025956 6044423 %i,
+--R      - 0.13445434 E -10 - 0.75557699 E -11 %i]
+--R     ,
+--R
+--R     [1.0 + 5.5 %i, - 6.8680672180 48 + 4.6463442978 7 %i,
+--R      - 6.8680672180 595740196 + 4.6463442978 647410058 %i,
+--R      - 0.1157402 E -10 - 0.52589942 E -11 %i]
+--R     ,
+--R
+--R     [1.0 + 5.6 %i, - 7.0161375979 76 + 4.8179941933 05 %i,
+--R      - 7.0161375979 858421857 + 4.8179941933 005550433 %i,
+--R      - 0.98421857 E -11 - 0.44449567 E -11 %i]
+--R     ,
+--R
+--R     [1.0 + 5.7 %i, - 7.1643674421 06 + 4.9914203424 89 %i,
+--R      - 7.1643674421 140655762 + 4.9914203424 861697905 %i,
+--R      - 0.80655762 E -11 - 0.2830209 E -11 %i]
+--R     ,
+--R
+--R     [1.0 + 5.8 %i, - 7.3127512034 3 + 5.1665919085 37 %i,
+--R      - 7.3127512034 36317679 + 5.1665919085 342976767 %i,
+--R      - 0.6317679 E -11 - 0.2702323 E -11 %i]
+--R     ,
+--R
+--R     [1.0 + 5.9 %i, - 7.4612836194 29 + 5.3434791013 53 %i,
+--R      - 7.4612836194 350723482 + 5.3434791013 5075755 %i,
+--R      - 0.60723482 E -11 - 0.224245 E -11 %i]
+--R     ,
+--R
+--R     [1.0 + 6.0 %i, - 7.6099596929 51 + 5.5220531255 15 %i,
+--R      - 7.6099596929 554672207 + 5.5220531255 133435246 %i,
+--R      - 0.44672207 E -11 - 0.1656475 E -11 %i]
+--R     ,
+--R
+--R     [1.0 + 6.1 %i, - 7.7587746746 55 + 5.7022861315 35 %i,
+--R      - 7.7587746746 585972836 + 5.7022861315 344022325 %i,
+--R      - 0.3597284 E -11 - 0.5977675 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 6.2 %i, - 7.9077240468 98 + 5.8841511702 39 %i,
+--R      - 7.9077240469 015667429 + 5.8841511702 386349799 %i,
+--R      - 0.3566743 E -11 - 0.36502 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 6.3 %i, - 8.0568035089 04 + 6.0676221500 13 %i,
+--R      - 8.0568035089 073088969 + 6.0676221500 126290404 %i,
+--R      - 0.3308897 E -11 - 0.37096 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 6.4 %i, - 8.2060089631 + 6.2526737967 05 %i,
+--R      - 8.2060089631 022876515 + 6.2526737967 049593955 %i,
+--R      - 0.2287651 E -11 - 0.406045 E -13 %i]
+--R     ,
+--R
+--R     [1.0 + 6.5 %i, - 8.3553365025 11 + 6.4392816159 76 %i,
+--R      - 8.3553365025 134245282 + 6.4392816159 757023231 %i,
+--R      - 0.2424528 E -11 - 0.297677 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 6.6 %i, - 8.5047823991 25 + 6.6274218579 12 %i,
+--R      - 8.5047823991 272090321 + 6.6274218579 121383093 %i,
+--R      - 0.2209032 E -11 + 0.138309 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 6.7 %i, - 8.6543430931 23 + 6.8170714837 44 %i,
+--R      - 8.6543430931 241668318 + 6.8170714837 435317714 %i,
+--R      - 0.1166832 E -11 - 0.4682286 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 6.8 %i, - 8.8040151829 1 + 7.0082081345 02 %i,
+--R      - 8.8040151829 108657274 + 7.0082081345 023668668 %i,
+--R      - 0.865727 E -12 + 0.366867 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 6.9 %i, - 8.9537954158 79 + 7.2008101014 93 %i,
+--R      - 8.9537954158 795929843 + 7.2008101014 924740199 %i,
+--R      - 0.592984 E -12 - 0.5259801 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.0 %i, - 9.1036806798 32 + 7.3948562984 36 %i,
+--R      - 9.1036806798 328755451 + 7.3948562984 362601022 %i,
+--R      - 0.875545 E -12 + 0.260102 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.1 %i, - 9.2536679950 15 + 7.5903262351 84 %i,
+--R      - 9.2536679950 162537946 + 7.5903262351 838962951 %i,
+--R      - 0.1253795 E -11 - 0.103705 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.2 %i, - 9.4037545067 08 + 7.7871999928 77 %i,
+--R      - 9.4037545067 082605399 + 7.7871999928 769445859 %i,
+--R      - 0.26054 E -12 - 0.554141 E -13 %i]
+--R     ,
+--R
+--R     [1.0 + 7.3 %i, - 9.5539374783 21 + 7.9854582004 68 %i,
+--R      - 9.5539374783 214863185 + 7.9854582004 676249208 %i,
+--R      - 0.486319 E -12 - 0.375079 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.4 %i, - 9.7042142849 72 + 8.1850820125 03 %i,
+--R      - 9.7042142849 730050014 + 8.1850820125 028358342 %i,
+--R      - 0.1005001 E -11 - 0.164166 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.5 %i, - 9.8545824074 86 + 8.3860530880 89 %i,
+--R      - 9.8545824074 863547157 + 8.3860530880 892263646 %i,
+--R      - 0.354716 E -12 + 0.226365 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.6 %i, - 10.0050394267 9 + 8.5883535709 62 %i,
+--R      - 10.0050394267 9077464 + 8.5883535709 621509583 %i,
+--R      - 0.77464 E -12 + 0.150958 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.7 %i, - 10.1555830186 86 + 8.7919660705 87 %i,
+--R      - 10.1555830186 86537113 + 8.7919660705 872881232 %i,
+--R      - 0.537113 E -12 + 0.288123 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.8 %i, - 10.3062109489 48 + 8.9968736442 29 %i,
+--R      - 10.3062109489 48029324 + 8.9968736442 291265808 %i,
+--R      - 0.29324 E -13 + 0.126581 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 7.9 %i, - 10.4569210687 39 + 9.2030597799 25 %i,
+--R      - 10.4569210687 38766792 + 9.2030597799 254718746 %i,
+--R      0.233208 E -12 + 0.471875 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.0 %i, - 10.6077113103 15 + 9.4105083803 12 %i,
+--R      - 10.6077113103 1479434 + 9.4105083803 116483136 %i,
+--R      0.20566 E -12 - 0.351686 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.1 %i, - 10.7585796829 95 + 9.6192037472 42 %i,
+--R      - 10.7585796829 94977847 + 9.6192037472 422072521 %i,
+--R      0.22153 E -13 + 0.207252 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.2 %i, - 10.9095242693 78 + 9.8291305671 62 %i,
+--R      - 10.9095242693 78536574 + 9.8291305671 617400305 %i,
+--R      - 0.536574 E -12 - 0.25997 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.3 %i, - 11.0605432217 92 + 10.0402738971 8 %i,
+--R      - 11.0605432217 91833327 + 10.0402738971 79865529 %i,
+--R      0.166673 E -12 - 0.134471 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.4 %i, - 11.2116347589 48 + 10.2526191518 09 %i,
+--R      - 11.2116347589 47947425 + 10.2526191518 08647801 %i,
+--R      0.52575 E -13 - 0.352199 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.5 %i, - 11.3627971628 04 + 10.4661520903 24 %i,
+--R      - 11.3627971628 03920333 + 10.4661520903 23625234 %i,
+--R      0.796669 E -13 - 0.374766 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.6 %i, - 11.5140287756 02 + 10.6808588047 12 %i,
+--R      - 11.5140287756 01801068 + 10.6808588047 12322866 %i,
+--R      0.198932 E -12 + 0.322866 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.7 %i, - 11.6653279970 81 + 10.8967257081 77 %i,
+--R      - 11.6653279970 80741204 + 10.8967257081 76595379 %i,
+--R      0.258796 E -12 - 0.404621 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.8 %i, - 11.8166932818 48 + 11.1137395241 57 %i,
+--R      - 11.8166932818 48409467 + 11.1137395241 57428959 %i,
+--R      - 0.409467 E -12 + 0.428959 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 8.9 %i, - 11.9681231369 01 + 11.3318872758 53 %i,
+--R      - 11.9681231369 00923725 + 11.3318872758 52933183 %i,
+--R      0.762754 E -13 - 0.668174 E -13 %i]
+--R     ,
+--R
+--R     [1.0 + 9.0 %i, - 12.1196161192 81 + 11.5511562762 02 %i,
+--R      - 12.1196161192 81343173 + 11.5511562762 02194801 %i,
+--R      - 0.343173 E -12 + 0.194801 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 9.1 %i, - 12.2711708338 67 + 11.7715341183 09 %i,
+--R      - 12.2711708338 67533716 + 11.7715341183 09457939 %i,
+--R      - 0.533716 E -12 + 0.457939 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 9.2 %i, - 12.4227859312 81 + 11.9930086662 85 %i,
+--R      - 12.4227859312 80922451 + 11.9930086662 84752568 %i,
+--R      0.775495 E -13 - 0.247432 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 9.3 %i, - 12.5744601059 08 + 12.2155680464 79 %i,
+--R      - 12.5744601059 08299231 + 12.2155680464 7862654 %i,
+--R      - 0.299231 E -12 - 0.37346 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 9.4 %i, - 12.7261920940 29 + 12.4392006390 9 %i,
+--R      - 12.7261920940 29410474 + 12.4392006390 90056598 %i,
+--R      - 0.410474 E -12 + 0.56598 E -13 %i]
+--R     ,
+--R
+--R     [1.0 + 9.5 %i, - 12.8779806720 44 + 12.6638950701 28 %i,
+--R      - 12.8779806720 43627774 + 12.6638950701 27929907 %i,
+--R      0.372226 E -12 - 0.70093 E -13 %i]
+--R     ,
+--R
+--R     [1.0 + 9.6 %i, - 13.0298246547 89 + 12.8896402037 08 %i,
+--R      - 13.0298246547 89466317 + 12.8896402037 07708444 %i,
+--R      - 0.466316 E -12 - 0.291556 E -12 %i]
+--R     ,
+--R
+--R     [1.0 + 9.7 %i, - 13.1817228939 51 + 13.1164251346 66 %i,
+--R      - 13.1817228939 51179682 + 13.1164251346 66021834 %i,
+--R      - 0.179682 E -12 + 0.21834 E -13 %i]
+--R     ,
+--R
+--R     [1.0 + 9.8 %i, - 13.3336742765 47 + 13.3442391814 77 %i,
+--R      - 13.3336742765 47072151 + 13.3442391814 7698698 %i,
+--R      - 0.721508 E -13 - 0.1302 E -13 %i]
+--R     ,
+--R
+--R     [1.0 + 9.9 %i, - 13.4856777234 95 + 13.5730718794 55 %i,
+--R      - 13.4856777234 94550479 + 13.5730718794 5503157 %i,
+--R      0.449521 E -12 + 0.3157 E -13 %i]
+--R     ,
+--R
+--R     [1.0 + 10.0 %i, - 13.6377321882 47 + 13.8029129742 3 %i,
+--R      - 13.6377321882 47287365 + 13.8029129742 29909153 %i,
+--R      - 0.287365 E -12 - 0.908474 E -13 %i]
+--R     ]
+--R                                                Type: List List Complex Float
+--E 10
 )spool 
 )lisp (bye)
  
\start
Date: Thu, 21 Feb 2008 00:33:53 -0600
From: Tim Daly
To: list
Subject: 20080221.02.wxh.patch (236)

Increase the total digits in Pi representation in special functions (Waldek)

=======================================================================
diff --git a/changelog b/changelog
index c7165ea..eea576d 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080221 wxh src/interp/sfsfun.boot increase precision of PI (236)
 20080221 tpd src/input/gamma.input investigate complex gamma issues
 20080220 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080219 tpd src/hyper/Makefile handle hyperdoc bitmaps properly
diff --git a/src/interp/sfsfun.boot.pamphlet b/src/interp/sfsfun.boot.pamphlet
index 50bd7b5..6536e2e 100644
--- a/src/interp/sfsfun.boot.pamphlet
+++ b/src/interp/sfsfun.boot.pamphlet
@@ -105,6 +105,11 @@ negintp(x) ==
         else
                 false
 
+-- Lisp PI is a long float and causes type errors, here we give
+-- enough digits to have double accuracy even after conversion
+-- to binary
+DEFCONSTANT(dfPi,3.14159265358979323846264338328)
+
 --- Small float implementation of Gamma function.  Valid for
 --- real arguments.  Maximum error (relative) seems to be
 --- 2-4 ulps for real x 2<x<9, and up to ten ulps for larger x
@@ -132,7 +137,7 @@ gammaStirling(x) ==
        EXP(lnrgamma(x))
 
 lnrgammaRatapprox(x) ==
-       (x-.5)*LOG(x) - x + LOG(SQRT(2.0*PI)) + phiRatapprox(x)
+       (x-.5)*LOG(x) - x + LOG(SQRT(2.0*dfPi)) + phiRatapprox(x)
 
 phiRatapprox(x) ==
         arg := 1/(x**2)
@@ -167,7 +172,7 @@ gammaRatapprox (x) ==
                      prod := */[x+i for i in 0..n-1]
                      result := gammaRatapprox(reducedarg)/prod
                  else
-                        Pi := PI
+                        Pi := dfPi
                         lx := MULTIPLE_-VALUE_-LIST(FLOOR(x))
                         intpartx := CAR(lx)+1
                         restx := CADR(lx)
@@ -247,12 +252,12 @@ PiMinusLogSinPi(z1,z2,z) ==
         cgammaG(z1,z2)  - logH(z1,z2,z)
 
 cgammaG(z1,z2) ==
-        LOG(2*PI) + PI*z2 - COMPLEX(0.0,1.0)*PI*(z1-.5)
+        LOG(2*dfPi) + dfPi*z2 - COMPLEX(0.0,1.0)*dfPi*(z1-.5)
 
 logH(z1,z2,z) ==
         z1bar := CADR(MULTIPLE_-VALUE_-LIST(FLOOR(z1))) ---frac part of z1
-        piz1bar := PI*z1bar
-        piz2 := PI*z2
+        piz1bar := dfPi*z1bar
+        piz2 := dfPi*z2
         twopiz2 := 2.0*piz2
         i := COMPLEX(0.0,1.0)
         part2 := EXP(twopiz2)*(2.0*SIN(piz1bar)**2 + SIN(2.0*piz1bar)*i)
@@ -284,7 +289,7 @@ logS(z1,z2,z,n,zpn) ==
 --- adjusted by 2 Pi if it is negative.
 cgammaAdjust(z) ==
         if IMAGPART(z)<0.0
-        then result := z + COMPLEX(0.0, 2.0*PI)
+        then result := z + COMPLEX(0.0, 2.0*dfPi)
         else result := z
         result
 
@@ -292,7 +297,7 @@ clngammacase3(z) ==
         (z- .5)*LOG(z) - z + cgammaBernsum(z)
 
 cgammaBernsum (z) ==
-        sum := LOG(2.0*PI)/2.0
+        sum := LOG(2.0*dfPi)/2.0
         zterm := z
         zsquaredinv := 1.0/(z*z)
         l:= [.083333333333333333333, -.0027777777777777777778,_
@@ -365,7 +370,7 @@ rPsi(n,x) ==
                                 skipit := 1
                         else
                                 skipit := 0
-                        sign*((PI**(n+1))*cotdiffeval(n,PI*(-x),skipit) + rPsi(n,1.0-x))
+                        sign*((dfPi**(n+1))*cotdiffeval(n,dfPi*(-x),skipit) + rPsi(n,1.0-x))
         else if n=0
         then
                 - rPsiW(n,x)
@@ -508,7 +513,7 @@ PsiXotic(n,result) ==
 cpsireflect(n,z) ==
         m := MOD(n,2)
         sign := (-1)**m
-        sign*PI**(n+1)*cotdiffeval(n,PI*z,0) + cPsi(n,1.0-z)
+        sign*dfPi**(n+1)*cotdiffeval(n,dfPi*z,0) + cPsi(n,1.0-z)
 
 --- c parameter to 0F1, possibly complex
 --- z argument to 0F1
@@ -600,7 +605,7 @@ f01(c,z)==
 ---             t := SQRT(-z)
 ---             c1 := c-1.0
 ---             p := PHASE(c)
----             if ABS(c)>10.0*ABS(t) and p>=0.0 and PHASE(c)<.90*PI
+---             if ABS(c)>10.0*ABS(t) and p>=0.0 and PHASE(c)<.90*dfPi
 ---             then BesselJAsymptOrder(c1,2*t)*cgamma(c/(t**(c1)))
 ---             else if ABS(t)>10.0*ABS(c) and ABS(t)>50.0
 ---             then BesselJAsympt(c1,2*t)*cgamma(c/(t**(c1)))
@@ -904,7 +909,7 @@ BesselasymptB(mu,z,zsqr,zfth) ==
 --- Asymptotic series only works when |v| < |z|.
 
 BesselJAsympt (v,z) ==
-        pi := PI
+        pi := dfPi
         mu := 4.0*v*v
         zsqr := z*z
         zfth := zsqr*zsqr
@@ -931,9 +936,9 @@ BesselIAsympt(v,z,n) ==
                         (float(r)*eight*z)
                 sum1 := sum1 + term1
                 sum2 := sum2 + ABS(term1)
-        sqrttwopiz := SQRT(two*PI*z)
+        sqrttwopiz := SQRT(two*dfPi*z)
         EXP(z)/sqrttwopiz*(1.0 + sum1 ) +_
-                EXP(-(float(n)+.5)*PI*i)*EXP(-z)/sqrttwopiz*(1.0+ sum2)
+                EXP(-(float(n)+.5)*dfPi*i)*EXP(-z)/sqrttwopiz*(1.0+ sum2)
 
 
 ---Asymptotic formula for BesselJ when order is large comes from
@@ -951,7 +956,7 @@ BesselJAsymptOrder(v,z) ==
     --  cothalpha := 1.0/tanhalpha
         ca := 1.0/tanhalpha
 
-        Pi := PI
+        Pi := dfPi
 	ca2:=ca*ca
 	ca4:=ca2*ca2
 	ca8:=ca4*ca4
@@ -974,7 +979,7 @@ BesselJAsymptOrder(v,z) ==
 ---  See Olver, p. 376-382.
 BesselIAsymptOrder(v,vz) ==
         z := vz/v
-        Pi := PI
+        Pi := dfPi
 ---     Use reflection formula (Atlas, p. 492)  if v not in right half plane;  Is this always accurate?
         if REALPART(v)<0.0
         then return BesselIAsymptOrder(-v,vz) + 2.0/Pi*SIN(-v*Pi)*BesselKAsymptOrder(-v,vz)
@@ -1015,7 +1020,7 @@ BesselKAsymptOrder (v,vz) ==
         u4p := (3675.0/32768.0+(-96833.0/40960.0+(144001.0/16384.0+(-7436429.0/663552.0+37182145.0/7962624.0*p2)*p2)*p2)*p2)*p4
         u5p := ((59535.0/262144.0+(-67608983.0/9175040.0+(250881631.0/5898240.0+(-108313205.0/1179648.0+(5391411025.0/63700992.0-5391411025.0/191102976.0*p2)*p2)*p2)*p2)*p2)*p4*p)*(-1.0)
         hornerresult := horner([u5p,u4p,u3p,u2p,u1p,u0p],vinv)
-        SQRT(PI/(2.0*v))*EXP(-v*eta)/(SQRT(opzsqroh))*hornerresult
+        SQRT(dfPi/(2.0*v))*EXP(-v*eta)/(SQRT(opzsqroh))*hornerresult

\start
Date: Fri, 22 Feb 2008 00:22:21 +0100 (CET)
From: Waldek Hebisch
To: list
Subject: Re: 20080221.01.tpd.patch (7099: complex gamma	function investigation)

> 
> fixed 7099: complex Gamma bug
> 
> Note that at the value 1.0+4.6i there is a radical departure between
> the table and the computed values in the imaginary part of the value
> even though the real part is exact.

(11) -> Gamma(1. + 4.5*%i)

   (11)  - 0.004501804477919395 + 4.8078797963506284e-4 %i
                                                    Type: Complex DoubleFloat
(12) -> Gamma(1. + 4.6*%i)

   (12)  - 0.0039079873004091254 - 1.7801308638883733e-4 %i
                                                    Type: Complex DoubleFloat

So, value of Gamma crossed brunch cut of logarithm and we have jump
in numeric value by -2Pi.  However, the formulas in texbooks (including
Abramowitz and Stegun) do not use numeric logarithm: log(Gamma(z))
in texbooks is a holomrphic function for Re z > 0, in particular
texbook log(Gamma(z)) is continouos, while numeric one have jumps.

\start
Date: Thu, 21 Feb 2008 21:57:07 -0500
From: Tim Daly
To: Waldek Hebisch
Subject: Re: 20080221.01.tpd.patch (7099: complex gamma	function investigation)

>> 
>> fixed 7099: complex Gamma bug
>> 
>> Note that at the value 1.0+4.6i there is a radical departure between
>> the table and the computed values in the imaginary part of the value
>> even though the real part is exact.
>
>(11) -> Gamma(1. + 4.5*%i)
>
>   (11)  - 0.004501804477919395 + 4.8078797963506284e-4 %i
>                                                    Type: Complex DoubleFloat
>(12) -> Gamma(1. + 4.6*%i)
>
>   (12)  - 0.0039079873004091254 - 1.7801308638883733e-4 %i
>                                                    Type: Complex DoubleFloat
>
>So, value of Gamma crossed brunch cut of logarithm and we have jump
>in numeric value by -2Pi.  However, the formulas in texbooks (including
>Abramowitz and Stegun) do not use numeric logarithm: log(Gamma(z))
>in texbooks is a holomrphic function for Re z > 0, in particular
>texbook log(Gamma(z)) is continouos, while numeric one have jumps.

The question is whether we want the numeric results to be
continuous. What's your opinion?

\start
Date: Fri, 22 Feb 2008 03:35:52 +0100 (CET)
From: Waldek Hebisch
To: list
Subject: Re: 20080221.01.tpd.patch (7099: complex gamma	function investigation)

Tim Daly wrote:
> >> 
> >> fixed 7099: complex Gamma bug
> >> 
> >> Note that at the value 1.0+4.6i there is a radical departure between
> >> the table and the computed values in the imaginary part of the value
> >> even though the real part is exact.
> >
> >(11) -> Gamma(1. + 4.5*%i)
> >
> >   (11)  - 0.004501804477919395 + 4.8078797963506284e-4 %i
> >                                                    Type: Complex DoubleFloat
> >(12) -> Gamma(1. + 4.6*%i)
> >
> >   (12)  - 0.0039079873004091254 - 1.7801308638883733e-4 %i
> >                                                    Type: Complex DoubleFloat
> >
> >So, value of Gamma crossed brunch cut of logarithm and we have jump
> >in numeric value by -2Pi.  However, the formulas in texbooks (including
> >Abramowitz and Stegun) do not use numeric logarithm: log(Gamma(z))
> >in texbooks is a holomrphic function for Re z > 0, in particular
> >texbook log(Gamma(z)) is continouos, while numeric one have jumps.
> 
> The question is whether we want the numeric results to be
> continuous. What's your opinion?
> 

For numeric log(Gamma(z)) what I want does not matter very much:
both log and Gamma have established definitions and the result
is determined by the rules.  Even if we allow ourself freedom
to choose different version of logarithm, since values of Gamma
turn around origin they will mit discontinity of logarithm -- no
single version will make the composition continuous.

There is different story if you consider logGamma function, which
satisfies exp(logGamma(z)) = Gamma(z).  Naively, one would write
logGamma(z) = log(Gamma(z)), but for numeric computation it is
useless to have discontinities: it is much better to choose 
continuous version of logGamma (one can not make logGamma
continuous everywhere, but one put cuts at negative real
numbers and have continuity elsewere).

\start
Date: Thu, 21 Feb 2008 21:47:50 -0600
From: Tim Daly
To: list
Subject: 20080222.01.tpd.patch (7099 logGamma vs log(Gamma) )

More investigation of the Gamma, log(Gamma) and logGamma functions.

======================================================================
diff --git a/changelog b/changelog
index eea576d..c7ce080 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080222 tpd src/input/gamma.input 7099 logGamma vs log(Gamma) 
 20080221 wxh src/interp/sfsfun.boot increase precision of PI (236)
 20080221 tpd src/input/gamma.input investigate complex gamma issues
 20080220 tpd src/hyper/bookvol11 add additional hyperdoc page translations
diff --git a/src/input/gamma.input.pamphlet b/src/input/gamma.input.pamphlet
index a8c533c..6ccd4a5 100644
--- a/src/input/gamma.input.pamphlet
+++ b/src/input/gamma.input.pamphlet
@@ -26,7 +26,7 @@ Dover Publications, Inc. New York 1965. pp267-270
 @
 \section{Gamma 1.000 to 1.995 by 0.005}
 <<*>>=
---S 1 of 10
+--S 1 of 12
 [[1.000,1.0000000000,Gamma(1.000),Gamma(1.000)-1.0000000000],_
  [1.005,0.9971385354,Gamma(1.005),Gamma(1.005)-0.9971385354],_
  [1.010,0.9943258512,Gamma(1.010),Gamma(1.010)-0.9943258512],_
@@ -759,8 +759,10 @@ Dover Publications, Inc. New York 1965. pp267-270
 --R                                                  Type: List List DoubleFloat
 --E 1
 
+@
 \section{Psi}
---S 2 of 10
+<<*>>=
+--S 2 of 12
 Psi(x:DFLOAT):DFLOAT==polygamma(0,x)
 --R 
 --R   Function declaration Psi : DoubleFloat -> DoubleFloat has been added
@@ -777,7 +779,7 @@ Dover Publications, Inc. New York 1965. pp267-270
 \section{Psi 1.000 to 2.000 by 0.005}
 <<*>>=
 
---S 3 of 10
+--S 3 of 12
 [[1.000, -0.5772156649, Psi(1.000), Psi(1.000)- -0.5772156649],_
  [1.005, -0.5690209113, Psi(1.005), Psi(1.005)- -0.5690209113],_
  [1.010, -0.5608854579, Psi(1.010), Psi(1.010)- -0.5608854579],_
@@ -1551,7 +1553,7 @@ Note that at the value 1.0+4.6i there is a radical departure between
 the table and the computed values in the imaginary part of the value
 even though the real part is exact.
 <<*>>=
---S 4 of 10
+--S 4 of 12
 [[1. + 0.0 * %i,0.,log(Gamma(1. + 0.0 * %i)),log(Gamma(1. + 0.0 * %i))-0.0],_
 [1. + 0.1 * %i, -0.008197780565 - 0.057322940417 * %i,_
 log(Gamma(1. + 0.1 * %i)),_
@@ -2387,7 +2389,7 @@ ln \Gamma{(z)}\approx(z-\frac{1}{2})ln z-z+\frac{1}{2}ln{(2\pi)}
 \end{equation}
 First we compute the constant
 <<*>>=
---S 5 of 10
+--S 5 of 12
 halfLog2Pi:=log(2.0*%pi)/2
 --R 
 --R
@@ -2402,7 +2404,7 @@ B_n=\sum_{k=0}^n{\frac{1}{(k+1)}}\sum_{r=0}^k{(-1)^r\binom{k}{r}r^n}
 \end{equation}
 The inner sum is given by
 <<*>>=
---S 6 of 10
+--S 6 of 12
 inner(k,n)==reduce(+,[(-1)^r*binomial(k,r)*r^n for r in 0..k])
 --R 
 --R                                                                   Type: Void
@@ -2411,7 +2413,7 @@ inner(k,n)==reduce(+,[(-1)^r*binomial(k,r)*r^n for r in 0..k])
 @
 and the bernoulli numbers are given by
 <<*>>=
---S 7 of 10
+--S 7 of 12
 B(n)==reduce(+,[(inner(k,n)/(k+1)) for k in 0..n])
 --R 
 --R                                                                   Type: Void
@@ -2420,7 +2422,7 @@ B(n)==reduce(+,[(inner(k,n)/(k+1)) for k in 0..n])
 @
 Now we need to compute the values of a single term in the expansion
 <<*>>=
---S 8 of 10
+--S 8 of 12
 Z(m,z)==B(2*m)/((2*m*(2*m-1))*z^(2*m-1))
 --R 
 --R                                                                   Type: Void
@@ -2429,7 +2431,7 @@ Z(m,z)==B(2*m)/((2*m*(2*m-1))*z^(2*m-1))
 @
 and we can compute the formula 6.1.41
 <<*>>=
---S 9 of 10
+--S 9 of 12
 H(z)==(z-1/2)*log(z)-z+halfLog2Pi+reduce(+,[Z(m,z) for m in 1..5]) 
 --R 
 --R                                                                   Type: Void
@@ -2441,7 +2443,7 @@ Higher number of terms causes accuracy to diverge near the smaller
 complex values. As you can see this formula reproduces the table
 values in Abramowitz smoothly.
 <<*>>=
---S 10 of 10
+--S 10 of 12
 [[1. + 0.0 * %i,0.,H(1. + 0.0 * %i),H(1. + 0.0 * %i)-0.0],_
 [1. + 0.1 * %i, -0.008197780565 - 0.057322940417 * %i,_
 H(1. + 0.1 * %i),_
@@ -3255,6 +3257,1661 @@ H(1. + 10.0 * %i)-(- 13.637732188247 + 13.802912974230 * %i)]]
 --R     ]
 --R                                                Type: List List Complex Float
 --E 10
+@
+Another useful definition of the logGamma function that is 
+continuous across the cut [1+4.5i,1+4.6i] is:
+<<*>>=
+--S 11 of 12
+lng2(xx:COMPLEX(DFLOAT)):COMPLEX(DFLOAT)==
+  y:COMPLEX(DFLOAT):=xx;
+  x:COMPLEX(DFLOAT):=xx;
+  t1:COMPLEX(DFLOAT):=x+5.5-(x+0.5)*log(x+5.5)
+  ser:COMPLEX(DFLOAT):=1.000000000190015
+  y:=y+1;
+  ser:=ser+(76.18009172947146/y)
+  y:=y+1;
+  ser:=ser+(-86.50532032941677/y)
+  y:=y+1;
+  ser:=ser+(24.01409824083091/y)
+  y:=y+1;
+  ser:=ser+(-1.231739572450155/y)
+  y:=y+1;
+  ser:=ser+(0.1208650973866179E-2/y)
+  y:=y+1;
+  ser:=ser+(-0.5395239384953E-5/y)
+  result:COMPLEX(DFLOAT):=log(2.5066282746310005*ser/x)-t1
+  result
+--R 
+--R   Function declaration lng2 : Complex DoubleFloat -> Complex 
+--R      DoubleFloat has been added to workspace.
+--R                                                                   Type: Void
+--E 11
+
+@
+and we can compare this with the log(Gamma) and logGamma functions in
+Axiom:
+<<*>>=
+--S 12 of 12
+[[1. + 0.0 * %i,0.,lng2(1. + 0.0 * %i),lng2(1. + 0.0 * %i)-0.0],_
+[1. + 0.1 * %i, -0.008197780565 - 0.057322940417 * %i,_
+lng2(1. + 0.1 * %i),log(Gamma(1. + 0.1 * %i)),_
+lng2(1. + 0.1 * %i)-log(Gamma(1. + 0.1 * %i)),_
+lng2(1. + 0.1 * %i),logGamma(1. + 0.1 * %i),_
+lng2(1. + 0.1 * %i)-logGamma(1. + 0.1 * %i),_
+lng2(1. + 0.1 * %i)-( -0.008197780565 - 0.057322940417 * %i)],_
+[1. + 0.2 * %i, -0.032476292318 - 0.112302222644 * %i,_
+lng2(1. + 0.2 * %i),log(Gamma(1. + 0.2 * %i)),_
+lng2(1. + 0.2 * %i)-log(Gamma(1. + 0.2 * %i)),_
+lng2(1. + 0.2 * %i),logGamma(1. + 0.2 * %i),_
+lng2(1. + 0.2 * %i)-logGamma(1. + 0.2 * %i),_
+lng2(1. + 0.2 * %i)-( -0.032476292318 - 0.112302222644 * %i)],_
+[1. + 0.3 * %i, -0.071946250900 - 0.162820672168 * %i,_
+lng2(1. + 0.3 * %i),log(Gamma(1. + 0.3 * %i)),_
+lng2(1. + 0.3 * %i)-log(Gamma(1. + 0.3 * %i)),_
+lng2(1. + 0.3 * %i),logGamma(1. + 0.3 * %i),_
+lng2(1. + 0.3 * %i)-logGamma(1. + 0.3 * %i),_
+lng2(1. + 0.3 * %i)-( -0.071946250900 - 0.162820672168 * %i)],_
+[1. + 0.4 * %i, -0.125289374821 - 0.207155826316 * %i,_
+lng2(1. + 0.4 * %i),log(Gamma(1. + 0.4 * %i)),_
+lng2(1. + 0.4 * %i)-log(Gamma(1. + 0.4 * %i)),_
+lng2(1. + 0.4 * %i),logGamma(1. + 0.4 * %i),_
+lng2(1. + 0.4 * %i)-logGamma(1. + 0.4 * %i),_
+lng2(1. + 0.4 * %i)-( -0.125289374821 - 0.207155826316 * %i)],_
+[1. + 0.5 * %i,- 0.190945499187 - 0.244058298905 * %i,_
+lng2(1. + 0.5 * %i),log(Gamma(1. + 0.5 * %i)),_
+lng2(1. + 0.5 * %i)-log(Gamma(1. + 0.5 * %i)),_
+lng2(1. + 0.5 * %i),logGamma(1. + 0.5 * %i),_
+lng2(1. + 0.5 * %i)-logGamma(1. + 0.5 * %i),_
+lng2(1. + 0.5 * %i)-(- 0.190945499187 - 0.244058298905 * %i)],_
+[1. + 0.6 * %i,- 0.267290068214 - 0.272743810491 * %i,_
+lng2(1. + 0.6 * %i),log(Gamma(1. + 0.6 * %i)),_
+lng2(1. + 0.6 * %i)-log(Gamma(1. + 0.6 * %i)),_
+lng2(1. + 0.6 * %i),logGamma(1. + 0.6 * %i),_
+lng2(1. + 0.6 * %i)-logGamma(1. + 0.6 * %i),_
+lng2(1. + 0.6 * %i)-(- 0.267290068214 - 0.272743810491 * %i)],_
+[1. + 0.7 * %i,- 0.352768690860 - 0.292826351187 * %i,_
+lng2(1. + 0.7 * %i),log(Gamma(1. + 0.7 * %i)),_
+lng2(1. + 0.7 * %i)-log(Gamma(1. + 0.7 * %i)),_
+lng2(1. + 0.7 * %i),logGamma(1. + 0.7 * %i),_
+lng2(1. + 0.7 * %i)-logGamma(1. + 0.7 * %i),_
+lng2(1. + 0.7 * %i)-(- 0.352768690860 - 0.292826351187 * %i)],_
+[1. + 0.8 * %i,- 0.445978783549 - 0.304225602976 * %i,_
+lng2(1. + 0.8 * %i),log(Gamma(1. + 0.8 * %i)),_
+lng2(1. + 0.8 * %i)-log(Gamma(1. + 0.8 * %i)),_
+lng2(1. + 0.8 * %i),logGamma(1. + 0.8 * %i),_
+lng2(1. + 0.8 * %i)-logGamma(1. + 0.8 * %i),_
+lng2(1. + 0.8 * %i)-(- 0.445978783549 - 0.304225602976 * %i)],_
+[1. + 0.9 * %i,- 0.545705128605 - 0.307074375642 * %i,_
+lng2(1. + 0.9 * %i),log(Gamma(1. + 0.9 * %i)),_
+lng2(1. + 0.9 * %i)-log(Gamma(1. + 0.9 * %i)),_
+lng2(1. + 0.9 * %i),logGamma(1. + 0.9 * %i),_
+lng2(1. + 0.9 * %i)-logGamma(1. + 0.9 * %i),_
+lng2(1. + 0.9 * %i)-(- 0.545705128605 - 0.307074375642 * %i)],_
+[1. + 1.0 * %i,- 0.650923199302 - 0.301640320468 * %i,_
+lng2(1. + 1.0 * %i),log(Gamma(1. + 1.0 * %i)),_
+lng2(1. + 1.0 * %i)-log(Gamma(1. + 1.0 * %i)),_
+lng2(1. + 1.0 * %i),logGamma(1. + 1.0 * %i),_
+lng2(1. + 1.0 * %i)-logGamma(1. + 1.0 * %i),_
+lng2(1. + 1.0 * %i)-(- 0.650923199302 - 0.301640320468 * %i)],_
+[1. + 1.1 * %i,- 0.760783958841 - 0.288266614239 * %i,_
+lng2(1. + 1.1 * %i),log(Gamma(1. + 1.1 * %i)),_
+lng2(1. + 1.1 * %i)-log(Gamma(1. + 1.1 * %i)),_
+lng2(1. + 1.1 * %i),logGamma(1. + 1.1 * %i),_
+lng2(1. + 1.1 * %i)-logGamma(1. + 1.1 * %i),_
+lng2(1. + 1.1 * %i)-(- 0.760783958841 - 0.288266614239 * %i)],_
+[1. + 1.2 * %i,- 0.874590463895 - 0.267330580581 * %i,_
+lng2(1. + 1.2 * %i),log(Gamma(1. + 1.2 * %i)),_
+lng2(1. + 1.2 * %i)-log(Gamma(1. + 1.2 * %i)),_
+lng2(1. + 1.2 * %i),logGamma(1. + 1.2 * %i),_
+lng2(1. + 1.2 * %i)-logGamma(1. + 1.2 * %i),_
+lng2(1. + 1.2 * %i)-(- 0.874590463895 - 0.267330580581 * %i)],_
+[1. + 1.3 * %i,- 0.991772766959 - 0.239216784465 * %i,_
+lng2(1. + 1.3 * %i),log(Gamma(1. + 1.3 * %i)),_
+lng2(1. + 1.3 * %i)-log(Gamma(1. + 1.3 * %i)),_
+lng2(1. + 1.3 * %i),logGamma(1. + 1.3 * %i),_
+lng2(1. + 1.3 * %i)-logGamma(1. + 1.3 * %i),_
+lng2(1. + 1.3 * %i)-(- 0.991772766959 - 0.239216784465 * %i)],_
+[1. + 1.4 * %i,- 1.111864566426 - 0.204300724149 * %i,_
+lng2(1. + 1.4 * %i),log(Gamma(1. + 1.4 * %i)),_
+lng2(1. + 1.4 * %i)-log(Gamma(1. + 1.4 * %i)),_
+lng2(1. + 1.4 * %i),logGamma(1. + 1.4 * %i),_
+lng2(1. + 1.4 * %i)-logGamma(1. + 1.4 * %i),_
+lng2(1. + 1.4 * %i)-(- 1.111864566426 - 0.204300724149 * %i)],_
+[1. + 1.5 * %i,- 1.234483051547 - 0.162939769480 * %i,_
+lng2(1. + 1.5 * %i),log(Gamma(1. + 1.5 * %i)),_
+lng2(1. + 1.5 * %i)-log(Gamma(1. + 1.5 * %i)),_
+lng2(1. + 1.5 * %i),logGamma(1. + 1.5 * %i),_
+lng2(1. + 1.5 * %i)-logGamma(1. + 1.5 * %i),_
+lng2(1. + 1.5 * %i)-(- 1.234483051547 - 0.162939769480 * %i)],_
+[1. + 1.6 * %i,- 1.359312248465 - 0.115468793589 * %i,_
+lng2(1. + 1.6 * %i),log(Gamma(1. + 1.6 * %i)),_
+lng2(1. + 1.6 * %i)-log(Gamma(1. + 1.6 * %i)),_
+lng2(1. + 1.6 * %i),logGamma(1. + 1.6 * %i),_
+lng2(1. + 1.6 * %i)-logGamma(1. + 1.6 * %i),_
+lng2(1. + 1.6 * %i)-(- 1.359312248465 - 0.115468793589 * %i)],_
+[1. + 1.7 * %i,- 1.486089612757 - 0.062198698329 * %i,_
+lng2(1. + 1.7 * %i),log(Gamma(1. + 1.7 * %i)),_
+lng2(1. + 1.7 * %i)-log(Gamma(1. + 1.7 * %i)),_
+lng2(1. + 1.7 * %i),logGamma(1. + 1.7 * %i),_
+lng2(1. + 1.7 * %i)-logGamma(1. + 1.7 * %i),_
+lng2(1. + 1.7 * %i)-(- 1.486089612757 - 0.062198698329 * %i)],_
+[1. + 1.8 * %i,- 1.614595396000 - 0.003416631477 * %i,_
+lng2(1. + 1.8 * %i),log(Gamma(1. + 1.8 * %i)),_
+lng2(1. + 1.8 * %i)-log(Gamma(1. + 1.8 * %i)),_
+lng2(1. + 1.8 * %i),logGamma(1. + 1.8 * %i),_
+lng2(1. + 1.8 * %i)-logGamma(1. + 1.8 * %i),_
+lng2(1. + 1.8 * %i)-(- 1.614595396000 - 0.003416631477 * %i)],_
+[1. + 1.9 * %i,- 1.744644276174 + 0.060612874295 * %i,_
+lng2(1. + 1.9 * %i),log(Gamma(1. + 1.9 * %i)),_
+lng2(1. + 1.9 * %i)-log(Gamma(1. + 1.9 * %i)),_
+lng2(1. + 1.9 * %i),logGamma(1. + 1.9 * %i),_
+lng2(1. + 1.9 * %i)-logGamma(1. + 1.9 * %i),_
+lng2(1. + 1.9 * %i)-(- 1.744644276174 + 0.060612874295 * %i)],_
+[1. + 2.0 * %i,- 1.876078786431 + 0.129646316310 * %i,_
+lng2(1. + 2.0 * %i),log(Gamma(1. + 2.0 * %i)),_
+lng2(1. + 2.0 * %i)-log(Gamma(1. + 2.0 * %i)),_
+lng2(1. + 2.0 * %i),logGamma(1. + 2.0 * %i),_
+lng2(1. + 2.0 * %i)-logGamma(1. + 2.0 * %i),_
+lng2(1. + 2.0 * %i)-(- 1.876078786431 + 0.129646316310 * %i)],_
+[1. + 2.1 * %i,- 2.008764150471 + 0.203459473833 * %i,_
+lng2(1. + 2.1 * %i),log(Gamma(1. + 2.1 * %i)),_
+lng2(1. + 2.1 * %i)-log(Gamma(1. + 2.1 * %i)),_
+lng2(1. + 2.1 * %i),logGamma(1. + 2.1 * %i),_
+lng2(1. + 2.1 * %i)-logGamma(1. + 2.1 * %i),_
+lng2(1. + 2.1 * %i)-(- 2.008764150471 + 0.203459473833 * %i)],_
+[1. + 2.2 * %i,- 2.142584209296 + 0.281845658426 * %i,_
+lng2(1. + 2.2 * %i),log(Gamma(1. + 2.2 * %i)),_
+lng2(1. + 2.2 * %i)-log(Gamma(1. + 2.2 * %i)),_
+lng2(1. + 2.2 * %i),logGamma(1. + 2.2 * %i),_
+lng2(1. + 2.2 * %i)-logGamma(1. + 2.2 * %i),_
+lng2(1. + 2.2 * %i)-(- 2.142584209296 + 0.281845658426 * %i)],_
+[1. + 2.3 * %i,- 2.277438192204 + 0.364614048950 * %i,_
+lng2(1. + 2.3 * %i),log(Gamma(1. + 2.3 * %i)),_
+lng2(1. + 2.3 * %i)-log(Gamma(1. + 2.3 * %i)),_
+lng2(1. + 2.3 * %i),logGamma(1. + 2.3 * %i),_
+lng2(1. + 2.3 * %i)-logGamma(1. + 2.3 * %i),_
+lng2(1. + 2.3 * %i)-(- 2.277438192204 + 0.364614048950 * %i)],_
+[1. + 2.4 * %i,- 2.413238141184 + 0.451588152441 * %i,_
+lng2(1. + 2.4 * %i),log(Gamma(1. + 2.4 * %i)),_
+lng2(1. + 2.4 * %i)-log(Gamma(1. + 2.4 * %i)),_
+lng2(1. + 2.4 * %i),logGamma(1. + 2.4 * %i),_
+lng2(1. + 2.4 * %i)-logGamma(1. + 2.4 * %i),_
+lng2(1. + 2.4 * %i)-(- 2.413238141184 + 0.451588152441 * %i)],_
+[1. + 2.5 * %i,- 2.549906842495 + 0.542604405852 * %i,_
+lng2(1. + 2.5 * %i),log(Gamma(1. + 2.5 * %i)),_
+lng2(1. + 2.5 * %i)-log(Gamma(1. + 2.5 * %i)),_
+lng2(1. + 2.5 * %i),logGamma(1. + 2.5 * %i),_
+lng2(1. + 2.5 * %i)-logGamma(1. + 2.5 * %i),_
+lng2(1. + 2.5 * %i)-(- 2.549906842495 + 0.542604405852 * %i)],_
+[1. + 2.6 * %i,- 2.687376153750 + 0.637510919046 * %i,_
+lng2(1. + 2.6 * %i),log(Gamma(1. + 2.6 * %i)),_
+lng2(1. + 2.6 * %i)-log(Gamma(1. + 2.6 * %i)),_
+lng2(1. + 2.6 * %i),logGamma(1. + 2.6 * %i),_
+lng2(1. + 2.6 * %i)-logGamma(1. + 2.6 * %i),_
+lng2(1. + 2.6 * %i)-(- 2.687376153750 + 0.637510919046 * %i)],_
+[1. + 2.7 * %i,- 2.825585641191 + 0.736166351679 * %i,_
+lng2(1. + 2.7 * %i),log(Gamma(1. + 2.7 * %i)),_
+lng2(1. + 2.7 * %i)-log(Gamma(1. + 2.7 * %i)),_
+lng2(1. + 2.7 * %i),logGamma(1. + 2.7 * %i),_
+lng2(1. + 2.7 * %i)-logGamma(1. + 2.7 * %i),_
+lng2(1. + 2.7 * %i)-(- 2.825585641191 + 0.736166351679 * %i)],_
+[1. + 2.8 * %i,- 2.964481461789 + 0.838438913096 * %i,_
+lng2(1. + 2.8 * %i),log(Gamma(1. + 2.8 * %i)),_
+lng2(1. + 2.8 * %i)-log(Gamma(1. + 2.8 * %i)),_
+lng2(1. + 2.8 * %i),logGamma(1. + 2.8 * %i),_
+lng2(1. + 2.8 * %i)-logGamma(1. + 2.8 * %i),_
+lng2(1. + 2.8 * %i)-(- 2.964481461789 + 0.838438913096 * %i)],_
+[1. + 2.9 * %i,- 3.104015439901 + 0.944205473039 * %i,_
+lng2(1. + 2.9 * %i),log(Gamma(1. + 2.9 * %i)),_
+lng2(1. + 2.9 * %i)-log(Gamma(1. + 2.9 * %i)),_
+lng2(1. + 2.9 * %i),logGamma(1. + 2.9 * %i),_
+lng2(1. + 2.9 * %i)-logGamma(1. + 2.9 * %i),_
+lng2(1. + 2.9 * %i)-(- 3.104015439901 + 0.944205473039 * %i)],_
+[1. + 3.0 * %i,- 3.244144299590 + 1.053350771069 * %i,_
+lng2(1. + 3.0 * %i),log(Gamma(1. + 3.0 * %i)),_
+lng2(1. + 3.0 * %i)-log(Gamma(1. + 3.0 * %i)),_
+lng2(1. + 3.0 * %i),logGamma(1. + 3.0 * %i),_
+lng2(1. + 3.0 * %i)-logGamma(1. + 3.0 * %i),_
+lng2(1. + 3.0 * %i)-(- 3.244144299590 + 1.053350771069 * %i)],_
+[1. + 3.1 * %i,- 3.384829022377 + 1.165766713286 * %i,_
+lng2(1. + 3.1 * %i),log(Gamma(1. + 3.1 * %i)),_
+lng2(1. + 3.1 * %i)-log(Gamma(1. + 3.1 * %i)),_
+lng2(1. + 3.1 * %i),logGamma(1. + 3.1 * %i),_
+lng2(1. + 3.1 * %i)-logGamma(1. + 3.1 * %i),_
+lng2(1. + 3.1 * %i)-(- 3.384829022377 + 1.165766713286 * %i)],_
+[1. + 3.2 * %i,- 3.526034306709 + 1.281351745932 * %i,_
+lng2(1. + 3.2 * %i),log(Gamma(1. + 3.2 * %i)),_
+lng2(1. + 3.2 * %i)-log(Gamma(1. + 3.2 * %i)),_
+lng2(1. + 3.2 * %i),logGamma(1. + 3.2 * %i),_
+lng2(1. + 3.2 * %i)-logGamma(1. + 3.2 * %i),_
+lng2(1. + 3.2 * %i)-(- 3.526034306709 + 1.281351745932 * %i)],_
+[1. + 3.3 * %i,- 3.667728110488 + 1.400010296576 * %i,_
+lng2(1. + 3.3 * %i),log(Gamma(1. + 3.3 * %i)),_
+lng2(1. + 3.3 * %i)-log(Gamma(1. + 3.3 * %i)),_
+lng2(1. + 3.3 * %i),logGamma(1. + 3.3 * %i),_
+lng2(1. + 3.3 * %i)-logGamma(1. + 3.3 * %i),_
+lng2(1. + 3.3 * %i)-(- 3.667728110488 + 1.400010296576 * %i)],_
+[1. + 3.4 * %i,- 3.809881261823 + 1.521652274673 * %i,_
+lng2(1. + 3.4 * %i),log(Gamma(1. + 3.4 * %i)),_
+lng2(1. + 3.4 * %i)-log(Gamma(1. + 3.4 * %i)),_
+lng2(1. + 3.4 * %i),logGamma(1. + 3.4 * %i),_
+lng2(1. + 3.4 * %i)-logGamma(1. + 3.4 * %i),_
+lng2(1. + 3.4 * %i)-(- 3.809881261823 + 1.521652274673 * %i)],_
+[1. + 3.5 * %i,- 3.952467126189 + 1.646192624269 * %i,_
+lng2(1. + 3.5 * %i),log(Gamma(1. + 3.5 * %i)),_
+lng2(1. + 3.5 * %i)-log(Gamma(1. + 3.5 * %i)),_
+lng2(1. + 3.5 * %i),logGamma(1. + 3.5 * %i),_
+lng2(1. + 3.5 * %i)-logGamma(1. + 3.5 * %i),_
+lng2(1. + 3.5 * %i)-(- 3.952467126189 + 1.646192624269 * %i)],_
+[1. + 3.6 * %i,- 4.095461320451 + 1.773550922591 * %i,_
+lng2(1. + 3.6 * %i),log(Gamma(1. + 3.6 * %i)),_
+lng2(1. + 3.6 * %i)-log(Gamma(1. + 3.6 * %i)),_
+lng2(1. + 3.6 * %i),logGamma(1. + 3.6 * %i),_
+lng2(1. + 3.6 * %i)-logGamma(1. + 3.6 * %i),_
+lng2(1. + 3.6 * %i)-(- 4.095461320451 + 1.773550922591 * %i)],_
+[1. + 3.7 * %i,- 4.238841466071 + 1.903651019019 * %i,_
+lng2(1. + 3.7 * %i),log(Gamma(1. + 3.7 * %i)),_
+lng2(1. + 3.7 * %i)-log(Gamma(1. + 3.7 * %i)),_
+lng2(1. + 3.7 * %i),logGamma(1. + 3.7 * %i),_
+lng2(1. + 3.7 * %i)-logGamma(1. + 3.7 * %i),_
+lng2(1. + 3.7 * %i)-(- 4.238841466071 + 1.903651019019 * %i)],_
+[1. + 3.8 * %i,- 4.382586975228 + 2.036420709693 * %i,_
+lng2(1. + 3.8 * %i),log(Gamma(1. + 3.8 * %i)),_
+lng2(1. + 3.8 * %i)-log(Gamma(1. + 3.8 * %i)),_
+lng2(1. + 3.8 * %i),logGamma(1. + 3.8 * %i),_
+lng2(1. + 3.8 * %i)-logGamma(1. + 3.8 * %i),_
+lng2(1. + 3.8 * %i)-(- 4.382586975228 + 2.036420709693 * %i)],_
+[1. + 3.9 * %i,- 4.526678864716 + 2.171791443605 * %i,_
+lng2(1. + 3.9 * %i),log(Gamma(1. + 3.9 * %i)),_
+lng2(1. + 3.9 * %i)-log(Gamma(1. + 3.9 * %i)),_
+lng2(1. + 3.9 * %i),logGamma(1. + 3.9 * %i),_
+lng2(1. + 3.9 * %i)-logGamma(1. + 3.9 * %i),_
+lng2(1. + 3.9 * %i)-(- 4.526678864716 + 2.171791443605 * %i)],_
+[1. + 4.0 * %i,- 4.671099593409 + 2.309698056573 * %i,_
+lng2(1. + 4.0 * %i),log(Gamma(1. + 4.0 * %i)),_
+lng2(1. + 4.0 * %i)-log(Gamma(1. + 4.0 * %i)),_
+lng2(1. + 4.0 * %i),logGamma(1. + 4.0 * %i),_
+lng2(1. + 4.0 * %i)-logGamma(1. + 4.0 * %i),_
+lng2(1. + 4.0 * %i)-(- 4.671099593409 + 2.309698056573 * %i)],_
+[1. + 4.1 * %i,- 4.815832919796 + 2.450078529947 * %i,_
+lng2(1. + 4.1 * %i),log(Gamma(1. + 4.1 * %i)),_
+lng2(1. + 4.1 * %i)-log(Gamma(1. + 4.1 * %i)),_
+lng2(1. + 4.1 * %i),logGamma(1. + 4.1 * %i),_
+lng2(1. + 4.1 * %i)-logGamma(1. + 4.1 * %i),_
+lng2(1. + 4.1 * %i)-(- 4.815832919796 + 2.450078529947 * %i)],_
+[1. + 4.2 * %i,- 4.960863776687 + 2.592873771319 * %i,_
+lng2(1. + 4.2 * %i),log(Gamma(1. + 4.2 * %i)),_
+lng2(1. + 4.2 * %i)-log(Gamma(1. + 4.2 * %i)),_
+lng2(1. + 4.2 * %i),logGamma(1. + 4.2 * %i),_
+lng2(1. + 4.2 * %i)-logGamma(1. + 4.2 * %i),_
+lng2(1. + 4.2 * %i)-(- 4.960863776687 + 2.592873771319 * %i)],_
+[1. + 4.3 * %i,- 5.106178160663 + 2.738027414820 * %i,_
+lng2(1. + 4.3 * %i),log(Gamma(1. + 4.3 * %i)),_
+lng2(1. + 4.3 * %i)-log(Gamma(1. + 4.3 * %i)),_
+lng2(1. + 4.3 * %i),logGamma(1. + 4.3 * %i),_
+lng2(1. + 4.3 * %i)-logGamma(1. + 4.3 * %i),_
+lng2(1. + 4.3 * %i)-(- 5.106178160663 + 2.738027414820 * %i)],_
+[1. + 4.4 * %i,- 5.251763034230 + 2.885485638927 * %i,_
+lng2(1. + 4.4 * %i),log(Gamma(1. + 4.4 * %i)),_
+lng2(1. + 4.4 * %i)-log(Gamma(1. + 4.4 * %i)),_
+lng2(1. + 4.4 * %i),logGamma(1. + 4.4 * %i),_
+lng2(1. + 4.4 * %i)-logGamma(1. + 4.4 * %i),_
+lng2(1. + 4.4 * %i)-(- 5.251763034230 + 2.885485638927 * %i)],_
+[1. + 4.5 * %i,- 5.397606238984 + 3.035196999922 * %i,_
+lng2(1. + 4.5 * %i),log(Gamma(1. + 4.5 * %i)),_
+lng2(1. + 4.5 * %i)-log(Gamma(1. + 4.5 * %i)),_
+lng2(1. + 4.5 * %i),logGamma(1. + 4.5 * %i),_
+lng2(1. + 4.5 * %i)-logGamma(1. + 4.5 * %i),_
+lng2(1. + 4.5 * %i)-(- 5.397606238984 + 3.035196999922 * %i)],_
+[1. + 4.6 * %i,- 5.543696418304 + 3.187112279389 * %i,_
+lng2(1. + 4.6 * %i),log(Gamma(1. + 4.6 * %i)),_
+lng2(1. + 4.6 * %i)-log(Gamma(1. + 4.6 * %i)),_
+lng2(1. + 4.6 * %i),logGamma(1. + 4.6 * %i),_
+lng2(1. + 4.6 * %i)-logGamma(1. + 4.6 * %i),_
+lng2(1. + 4.6 * %i)-(- 5.543696418304 + 3.187112279389 * %i)],_
+[1. + 4.7 * %i,- 5.690022948373 + 3.341184344327 * %i,_
+lng2(1. + 4.7 * %i),log(Gamma(1. + 4.7 * %i)),_
+lng2(1. + 4.7 * %i)-log(Gamma(1. + 4.7 * %i)),_
+lng2(1. + 4.7 * %i),logGamma(1. + 4.7 * %i),_
+lng2(1. + 4.7 * %i)-logGamma(1. + 4.7 * %i),_
+lng2(1. + 4.7 * %i)-(- 5.690022948373 + 3.341184344327 * %i)],_
+[1. + 4.8 * %i,- 5.836575876454 + 3.497368018615 * %i,_
+lng2(1. + 4.8 * %i),log(Gamma(1. + 4.8 * %i)),_
+lng2(1. + 4.8 * %i)-log(Gamma(1. + 4.8 * %i)),_
+lng2(1. + 4.8 * %i),logGamma(1. + 4.8 * %i),_
+lng2(1. + 4.8 * %i)-logGamma(1. + 4.8 * %i),_
+lng2(1. + 4.8 * %i)-(- 5.836575876454 + 3.497368018615 * %i)],_
+[1. + 4.9 * %i,- 5.983345865532 + 3.655619964712 * %i,_
+lng2(1. + 4.9 * %i),log(Gamma(1. + 4.9 * %i)),_
+lng2(1. + 4.9 * %i)-log(Gamma(1. + 4.9 * %i)),_
+lng2(1. + 4.9 * %i),logGamma(1. + 4.9 * %i),_
+lng2(1. + 4.9 * %i)-logGamma(1. + 4.9 * %i),_
+lng2(1. + 4.9 * %i)-(- 5.983345865532 + 3.655619964712 * %i)],_
+[1. + 5.0 * %i,- 6.130324144553 + 3.815898574615 * %i,_
+lng2(1. + 5.0 * %i),log(Gamma(1. + 5.0 * %i)),_
+lng2(1. + 5.0 * %i)-log(Gamma(1. + 5.0 * %i)),_
+lng2(1. + 5.0 * %i),logGamma(1. + 5.0 * %i),_
+lng2(1. + 5.0 * %i)-logGamma(1. + 5.0 * %i),_
+lng2(1. + 5.0 * %i)-(- 6.130324144553 + 3.815898574615 * %i)],_
+[1. + 5.1 * %i,- 6.277502463584 + 3.978163869188 * %i,_
+lng2(1. + 5.1 * %i),log(Gamma(1. + 5.1 * %i)),_
+lng2(1. + 5.1 * %i)-log(Gamma(1. + 5.1 * %i)),_
+lng2(1. + 5.1 * %i),logGamma(1. + 5.1 * %i),_
+lng2(1. + 5.1 * %i)-logGamma(1. + 5.1 * %i),_
+lng2(1. + 5.1 * %i)-(- 6.277502463584 + 3.978163869188 * %i)],_
+[1. + 5.2 * %i,- 6.424873053335 + 4.142377405086 * %i,_
+lng2(1. + 5.2 * %i),log(Gamma(1. + 5.2 * %i)),_
+lng2(1. + 5.2 * %i)-log(Gamma(1. + 5.2 * %i)),_
+lng2(1. + 5.2 * %i),logGamma(1. + 5.2 * %i),_
+lng2(1. + 5.2 * %i)-logGamma(1. + 5.2 * %i),_
+lng2(1. + 5.2 * %i)-(- 6.424873053335 + 4.142377405086 * %i)],_
+[1. + 5.3 * %i,- 6.572428588529 + 4.308502188583 * %i,_
+lng2(1. + 5.3 * %i),log(Gamma(1. + 5.3 * %i)),_
+lng2(1. + 5.3 * %i)-log(Gamma(1. + 5.3 * %i)),_
+lng2(1. + 5.3 * %i),logGamma(1. + 5.3 * %i),_
+lng2(1. + 5.3 * %i)-logGamma(1. + 5.3 * %i),_
+lng2(1. + 5.3 * %i)-(- 6.572428588529 + 4.308502188583 * %i)],_
+[1. + 5.4 * %i,- 6.720162154703 + 4.476502595668 * %i,_
+lng2(1. + 5.4 * %i),log(Gamma(1. + 5.4 * %i)),_
+lng2(1. + 5.4 * %i)-log(Gamma(1. + 5.4 * %i)),_
+lng2(1. + 5.4 * %i),logGamma(1. + 5.4 * %i),_
+lng2(1. + 5.4 * %i)-logGamma(1. + 5.4 * %i),_
+lng2(1. + 5.4 * %i)-(- 6.720162154703 + 4.476502595668 * %i)],_
+[1. + 5.5 * %i,- 6.868067218048 + 4.646344297870 * %i,_
+lng2(1. + 5.5 * %i),log(Gamma(1. + 5.5 * %i)),_
+lng2(1. + 5.5 * %i)-log(Gamma(1. + 5.5 * %i)),_
+lng2(1. + 5.5 * %i),logGamma(1. + 5.5 * %i),_
+lng2(1. + 5.5 * %i)-logGamma(1. + 5.5 * %i),_
+lng2(1. + 5.5 * %i)-(- 6.868067218048 + 4.646344297870 * %i)],_
+[1. + 5.6 * %i,- 7.016137597976 + 4.817994193305 * %i,_
+lng2(1. + 5.6 * %i),log(Gamma(1. + 5.6 * %i)),_
+lng2(1. + 5.6 * %i)-log(Gamma(1. + 5.6 * %i)),_
+lng2(1. + 5.6 * %i),logGamma(1. + 5.6 * %i),_
+lng2(1. + 5.6 * %i)-logGamma(1. + 5.6 * %i),_
+lng2(1. + 5.6 * %i)-(- 7.016137597976 + 4.817994193305 * %i)],_
+[1. + 5.7 * %i,- 7.164367442106 + 4.991420342489 * %i,_
+lng2(1. + 5.7 * %i),log(Gamma(1. + 5.7 * %i)),_
+lng2(1. + 5.7 * %i)-log(Gamma(1. + 5.7 * %i)),_
+lng2(1. + 5.7 * %i),logGamma(1. + 5.7 * %i),_
+lng2(1. + 5.7 * %i)-logGamma(1. + 5.7 * %i),_
+lng2(1. + 5.7 * %i)-(- 7.164367442106 + 4.991420342489 * %i)],_
+[1. + 5.8 * %i,- 7.312751203430 + 5.166591908537 * %i,_
+lng2(1. + 5.8 * %i),log(Gamma(1. + 5.8 * %i)),_
+lng2(1. + 5.8 * %i)-log(Gamma(1. + 5.8 * %i)),_
+lng2(1. + 5.8 * %i),logGamma(1. + 5.8 * %i),_
+lng2(1. + 5.8 * %i)-logGamma(1. + 5.8 * %i),_
+lng2(1. + 5.8 * %i)-(- 7.312751203430 + 5.166591908537 * %i)],_
+[1. + 5.9 * %i,- 7.461283619429 + 5.343479101353 * %i,_
+lng2(1. + 5.9 * %i),log(Gamma(1. + 5.9 * %i)),_
+lng2(1. + 5.9 * %i)-log(Gamma(1. + 5.9 * %i)),_
+lng2(1. + 5.9 * %i),logGamma(1. + 5.9 * %i),_
+lng2(1. + 5.9 * %i)-logGamma(1. + 5.9 * %i),_
+lng2(1. + 5.9 * %i)-(- 7.461283619429 + 5.343479101353 * %i)],_
+[1. + 6.0 * %i,- 7.609959692951 + 5.522053125515 * %i,_
+lng2(1. + 6.0 * %i),log(Gamma(1. + 6.0 * %i)),_
+lng2(1. + 6.0 * %i)-log(Gamma(1. + 6.0 * %i)),_
+lng2(1. + 6.0 * %i),logGamma(1. + 6.0 * %i),_
+lng2(1. + 6.0 * %i)-logGamma(1. + 6.0 * %i),_
+lng2(1. + 6.0 * %i)-(- 7.609959692951 + 5.522053125515 * %i)],_
+[1. + 6.1 * %i,- 7.758774674655 + 5.702286131535 * %i,_
+lng2(1. + 6.1 * %i),log(Gamma(1. + 6.1 * %i)),_
+lng2(1. + 6.1 * %i)-log(Gamma(1. + 6.1 * %i)),_
+lng2(1. + 6.1 * %i),logGamma(1. + 6.1 * %i),_
+lng2(1. + 6.1 * %i)-logGamma(1. + 6.1 * %i),_
+lng2(1. + 6.1 * %i)-(- 7.758774674655 + 5.702286131535 * %i)],_
+[1. + 6.2 * %i,- 7.907724046898 + 5.884151170239 * %i,_
+lng2(1. + 6.2 * %i),log(Gamma(1. + 6.2 * %i)),_
+lng2(1. + 6.2 * %i)-log(Gamma(1. + 6.2 * %i)),_
+lng2(1. + 6.2 * %i),logGamma(1. + 6.2 * %i),_
+lng2(1. + 6.2 * %i)-logGamma(1. + 6.2 * %i),_
+lng2(1. + 6.2 * %i)-(- 7.907724046898 + 5.884151170239 * %i)],_
+[1. + 6.3 * %i,- 8.056803508904 + 6.067622150013 * %i,_
+lng2(1. + 6.3 * %i),log(Gamma(1. + 6.3 * %i)),_
+lng2(1. + 6.3 * %i)-log(Gamma(1. + 6.3 * %i)),_
+lng2(1. + 6.3 * %i),logGamma(1. + 6.3 * %i),_
+lng2(1. + 6.3 * %i)-logGamma(1. + 6.3 * %i),_
+lng2(1. + 6.3 * %i)-(- 8.056803508904 + 6.067622150013 * %i)],_
+[1. + 6.4 * %i,- 8.206008963100 + 6.252673796705 * %i,_
+lng2(1. + 6.4 * %i),log(Gamma(1. + 6.4 * %i)),_
+lng2(1. + 6.4 * %i)-log(Gamma(1. + 6.4 * %i)),_
+lng2(1. + 6.4 * %i),logGamma(1. + 6.4 * %i),_
+lng2(1. + 6.4 * %i)-logGamma(1. + 6.4 * %i),_
+lng2(1. + 6.4 * %i)-(- 8.206008963100 + 6.252673796705 * %i)],_
+[1. + 6.5 * %i,- 8.355336502511 + 6.439281615976 * %i,_
+lng2(1. + 6.5 * %i),log(Gamma(1. + 6.5 * %i)),_
+lng2(1. + 6.5 * %i)-log(Gamma(1. + 6.5 * %i)),_
+lng2(1. + 6.5 * %i),logGamma(1. + 6.5 * %i),_
+lng2(1. + 6.5 * %i)-logGamma(1. + 6.5 * %i),_
+lng2(1. + 6.5 * %i)-(- 8.355336502511 + 6.439281615976 * %i)],_
+[1. + 6.6 * %i,- 8.504782399125 + 6.627421857912 * %i,_
+lng2(1. + 6.6 * %i),log(Gamma(1. + 6.6 * %i)),_
+lng2(1. + 6.6 * %i)-log(Gamma(1. + 6.6 * %i)),_
+lng2(1. + 6.6 * %i),logGamma(1. + 6.6 * %i),_
+lng2(1. + 6.6 * %i)-logGamma(1. + 6.6 * %i),_
+lng2(1. + 6.6 * %i)-(- 8.504782399125 + 6.627421857912 * %i)],_
+[1. + 6.7 * %i,- 8.654343093123 + 6.817071483744 * %i,_
+lng2(1. + 6.7 * %i),log(Gamma(1. + 6.7 * %i)),_
+lng2(1. + 6.7 * %i)-log(Gamma(1. + 6.7 * %i)),_
+lng2(1. + 6.7 * %i),logGamma(1. + 6.7 * %i),_
+lng2(1. + 6.7 * %i)-logGamma(1. + 6.7 * %i),_
+lng2(1. + 6.7 * %i)-(- 8.654343093123 + 6.817071483744 * %i)],_
+[1. + 6.8 * %i,- 8.804015182910 + 7.008208134502 * %i,_
+lng2(1. + 6.8 * %i),log(Gamma(1. + 6.8 * %i)),_
+lng2(1. + 6.8 * %i)-log(Gamma(1. + 6.8 * %i)),_
+lng2(1. + 6.8 * %i),logGamma(1. + 6.8 * %i),_
+lng2(1. + 6.8 * %i)-logGamma(1. + 6.8 * %i),_
+lng2(1. + 6.8 * %i)-(- 8.804015182910 + 7.008208134502 * %i)],_
+[1. + 6.9 * %i,- 8.953795415879 + 7.200810101493 * %i,_
+lng2(1. + 6.9 * %i),log(Gamma(1. + 6.9 * %i)),_
+lng2(1. + 6.9 * %i)-log(Gamma(1. + 6.9 * %i)),_
+lng2(1. + 6.9 * %i),logGamma(1. + 6.9 * %i),_
+lng2(1. + 6.9 * %i)-logGamma(1. + 6.9 * %i),_
+lng2(1. + 6.9 * %i)-(- 8.953795415879 + 7.200810101493 * %i)],_
+[1. + 7.0 * %i,- 9.103680679832 + 7.394856298436 * %i,_
+lng2(1. + 7.0 * %i),log(Gamma(1. + 7.0 * %i)),_
+lng2(1. + 7.0 * %i)-log(Gamma(1. + 7.0 * %i)),_
+lng2(1. + 7.0 * %i),logGamma(1. + 7.0 * %i),_
+lng2(1. + 7.0 * %i)-logGamma(1. + 7.0 * %i),_
+lng2(1. + 7.0 * %i)-(- 9.103680679832 + 7.394856298436 * %i)],_
+[1. + 7.1 * %i,- 9.253667995015 + 7.590326235184 * %i,_
+lng2(1. + 7.1 * %i),log(Gamma(1. + 7.1 * %i)),_
+lng2(1. + 7.1 * %i)-log(Gamma(1. + 7.1 * %i)),_
+lng2(1. + 7.1 * %i),logGamma(1. + 7.1 * %i),_
+lng2(1. + 7.1 * %i)-logGamma(1. + 7.1 * %i),_
+lng2(1. + 7.1 * %i)-(- 9.253667995015 + 7.590326235184 * %i)],_
+[1. + 7.2 * %i,- 9.403754506708 + 7.787199992877 * %i,_
+lng2(1. + 7.2 * %i),log(Gamma(1. + 7.2 * %i)),_
+lng2(1. + 7.2 * %i)-log(Gamma(1. + 7.2 * %i)),_
+lng2(1. + 7.2 * %i),logGamma(1. + 7.2 * %i),_
+lng2(1. + 7.2 * %i)-logGamma(1. + 7.2 * %i),_
+lng2(1. + 7.2 * %i)-(- 9.403754506708 + 7.787199992877 * %i)],_
+[1. + 7.3 * %i,- 9.553937478321 + 7.985458200468 * %i,_
+lng2(1. + 7.3 * %i),log(Gamma(1. + 7.3 * %i)),_
+lng2(1. + 7.3 * %i)-log(Gamma(1. + 7.3 * %i)),_
+lng2(1. + 7.3 * %i),logGamma(1. + 7.3 * %i),_
+lng2(1. + 7.3 * %i)-logGamma(1. + 7.3 * %i),_
+lng2(1. + 7.3 * %i)-(- 9.553937478321 + 7.985458200468 * %i)],_
+[1. + 7.4 * %i,- 9.704214284972 + 8.185082012503 * %i,_
+lng2(1. + 7.4 * %i),log(Gamma(1. + 7.4 * %i)),_
+lng2(1. + 7.4 * %i)-log(Gamma(1. + 7.4 * %i)),_
+lng2(1. + 7.4 * %i),logGamma(1. + 7.4 * %i),_
+lng2(1. + 7.4 * %i)-logGamma(1. + 7.4 * %i),_
+lng2(1. + 7.4 * %i)-(- 9.704214284972 + 8.185082012503 * %i)],_
+[1. + 7.5 * %i,- 9.854582407486 + 8.386053088089 * %i,_
+lng2(1. + 7.5 * %i),log(Gamma(1. + 7.5 * %i)),_
+lng2(1. + 7.5 * %i)-log(Gamma(1. + 7.5 * %i)),_
+lng2(1. + 7.5 * %i),logGamma(1. + 7.5 * %i),_
+lng2(1. + 7.5 * %i)-logGamma(1. + 7.5 * %i),_
+lng2(1. + 7.5 * %i)-(- 9.854582407486 + 8.386053088089 * %i)],_
+[1. + 7.6 * %i,- 10.005039426790 + 8.588353570962 * %i,_
+lng2(1. + 7.6 * %i),log(Gamma(1. + 7.6 * %i)),_
+lng2(1. + 7.6 * %i)-log(Gamma(1. + 7.6 * %i)),_
+lng2(1. + 7.6 * %i),logGamma(1. + 7.6 * %i),_
+lng2(1. + 7.6 * %i)-logGamma(1. + 7.6 * %i),_
+lng2(1. + 7.6 * %i)-(- 10.005039426790 + 8.588353570962 * %i)],_
+[1. + 7.7 * %i,- 10.155583018686 + 8.791966070587 * %i,_
+lng2(1. + 7.7 * %i),log(Gamma(1. + 7.7 * %i)),_
+lng2(1. + 7.7 * %i)-log(Gamma(1. + 7.7 * %i)),_
+lng2(1. + 7.7 * %i),logGamma(1. + 7.7 * %i),_
+lng2(1. + 7.7 * %i)-logGamma(1. + 7.7 * %i),_
+lng2(1. + 7.7 * %i)-(- 10.155583018686 + 8.791966070587 * %i)],_
+[1. + 7.8 * %i,- 10.306210948948 + 8.996873644229 * %i,_
+lng2(1. + 7.8 * %i),log(Gamma(1. + 7.8 * %i)),_
+lng2(1. + 7.8 * %i)-log(Gamma(1. + 7.8 * %i)),_
+lng2(1. + 7.8 * %i),logGamma(1. + 7.8 * %i),_
+lng2(1. + 7.8 * %i)-logGamma(1. + 7.8 * %i),_
+lng2(1. + 7.8 * %i)-(- 10.306210948948 + 8.996873644229 * %i)],_
+[1. + 7.9 * %i,- 10.456921068739 + 9.203059779925 * %i,_
+lng2(1. + 7.9 * %i),log(Gamma(1. + 7.9 * %i)),_
+lng2(1. + 7.9 * %i)-log(Gamma(1. + 7.9 * %i)),_
+lng2(1. + 7.9 * %i),logGamma(1. + 7.9 * %i),_
+lng2(1. + 7.9 * %i)-logGamma(1. + 7.9 * %i),_
+lng2(1. + 7.9 * %i)-(- 10.456921068739 + 9.203059779925 * %i)],_
+[1. + 8.0 * %i,- 10.607711310315 + 9.410508380312 * %i,_
+lng2(1. + 8.0 * %i),log(Gamma(1. + 8.0 * %i)),_
+lng2(1. + 8.0 * %i)-log(Gamma(1. + 8.0 * %i)),_
+lng2(1. + 8.0 * %i),logGamma(1. + 8.0 * %i),_
+lng2(1. + 8.0 * %i)-logGamma(1. + 8.0 * %i),_
+lng2(1. + 8.0 * %i)-(- 10.607711310315 + 9.410508380312 * %i)],_
+[1. + 8.1 * %i,- 10.758579682995 + 9.619203747242 * %i,_
+lng2(1. + 8.1 * %i),log(Gamma(1. + 8.1 * %i)),_
+lng2(1. + 8.1 * %i)-log(Gamma(1. + 8.1 * %i)),_
+lng2(1. + 8.1 * %i),logGamma(1. + 8.1 * %i),_
+lng2(1. + 8.1 * %i)-logGamma(1. + 8.1 * %i),_
+lng2(1. + 8.1 * %i)-(- 10.758579682995 + 9.619203747242 * %i)],_
+[1. + 8.2 * %i,- 10.909524269378 + 9.829130567162 * %i,_
+lng2(1. + 8.2 * %i),log(Gamma(1. + 8.2 * %i)),_
+lng2(1. + 8.2 * %i)-log(Gamma(1. + 8.2 * %i)),_
+lng2(1. + 8.2 * %i),logGamma(1. + 8.2 * %i),_
+lng2(1. + 8.2 * %i)-logGamma(1. + 8.2 * %i),_
+lng2(1. + 8.2 * %i)-(- 10.909524269378 + 9.829130567162 * %i)],_
+[1. + 8.3 * %i,- 11.060543221792 + 10.040273897180 * %i,_
+lng2(1. + 8.3 * %i),log(Gamma(1. + 8.3 * %i)),_
+lng2(1. + 8.3 * %i)-log(Gamma(1. + 8.3 * %i)),_
+lng2(1. + 8.3 * %i),logGamma(1. + 8.3 * %i),_
+lng2(1. + 8.3 * %i)-logGamma(1. + 8.3 * %i),_
+lng2(1. + 8.3 * %i)-(- 11.060543221792 + 10.040273897180 * %i)],_
+[1. + 8.4 * %i,- 11.211634758948 + 10.252619151809 * %i,_
+lng2(1. + 8.4 * %i),log(Gamma(1. + 8.4 * %i)),_
+lng2(1. + 8.4 * %i)-log(Gamma(1. + 8.4 * %i)),_
+lng2(1. + 8.4 * %i),logGamma(1. + 8.4 * %i),_
+lng2(1. + 8.4 * %i)-logGamma(1. + 8.4 * %i),_
+lng2(1. + 8.4 * %i)-(- 11.211634758948 + 10.252619151809 * %i)],_
+[1. + 8.5 * %i,- 11.362797162804 + 10.466152090324 * %i,_
+lng2(1. + 8.5 * %i),log(Gamma(1. + 8.5 * %i)),_
+lng2(1. + 8.5 * %i)-log(Gamma(1. + 8.5 * %i)),_
+lng2(1. + 8.5 * %i),logGamma(1. + 8.5 * %i),_
+lng2(1. + 8.5 * %i)-logGamma(1. + 8.5 * %i),_
+lng2(1. + 8.5 * %i)-(- 11.362797162804 + 10.466152090324 * %i)],_
+[1. + 8.6 * %i,- 11.514028775602 + 10.680858804712 * %i,_
+lng2(1. + 8.6 * %i),log(Gamma(1. + 8.6 * %i)),_
+lng2(1. + 8.6 * %i)-log(Gamma(1. + 8.6 * %i)),_
+lng2(1. + 8.6 * %i),logGamma(1. + 8.6 * %i),_
+lng2(1. + 8.6 * %i)-logGamma(1. + 8.6 * %i),_
+lng2(1. + 8.6 * %i)-(- 11.514028775602 + 10.680858804712 * %i)],_
+[1. + 8.7 * %i,- 11.665327997081 + 10.896725708177 * %i,_
+lng2(1. + 8.7 * %i),log(Gamma(1. + 8.7 * %i)),_
+lng2(1. + 8.7 * %i)-log(Gamma(1. + 8.7 * %i)),_
+lng2(1. + 8.7 * %i),logGamma(1. + 8.7 * %i),_
+lng2(1. + 8.7 * %i)-logGamma(1. + 8.7 * %i),_
+lng2(1. + 8.7 * %i)-(- 11.665327997081 + 10.896725708177 * %i)],_
+[1. + 8.8 * %i,- 11.816693281848 + 11.113739524157 * %i,_
+lng2(1. + 8.8 * %i),log(Gamma(1. + 8.8 * %i)),_
+lng2(1. + 8.8 * %i)-log(Gamma(1. + 8.8 * %i)),_
+lng2(1. + 8.8 * %i),logGamma(1. + 8.8 * %i),_
+lng2(1. + 8.8 * %i)-logGamma(1. + 8.8 * %i),_
+lng2(1. + 8.8 * %i)-(- 11.816693281848 + 11.113739524157 * %i)],_
+[1. + 8.9 * %i,- 11.968123136901 + 11.331887275853 * %i,_
+lng2(1. + 8.9 * %i),log(Gamma(1. + 8.9 * %i)),_
+lng2(1. + 8.9 * %i)-log(Gamma(1. + 8.9 * %i)),_
+lng2(1. + 8.9 * %i),logGamma(1. + 8.9 * %i),_
+lng2(1. + 8.9 * %i)-logGamma(1. + 8.9 * %i),_
+lng2(1. + 8.9 * %i)-(- 11.968123136901 + 11.331887275853 * %i)],_
+[1. + 9.0 * %i,- 12.119616119281 + 11.551156276202 * %i,_
+lng2(1. + 9.0 * %i),log(Gamma(1. + 9.0 * %i)),_
+lng2(1. + 9.0 * %i)-log(Gamma(1. + 9.0 * %i)),_
+lng2(1. + 9.0 * %i),logGamma(1. + 9.0 * %i),_
+lng2(1. + 9.0 * %i)-logGamma(1. + 9.0 * %i),_
+lng2(1. + 9.0 * %i)-(- 12.119616119281 + 11.551156276202 * %i)],_
+[1. + 9.1 * %i,- 12.271170833867 + 11.771534118309 * %i,_
+lng2(1. + 9.1 * %i),log(Gamma(1. + 9.1 * %i)),_
+lng2(1. + 9.1 * %i)-log(Gamma(1. + 9.1 * %i)),_
+lng2(1. + 9.1 * %i),logGamma(1. + 9.1 * %i),_
+lng2(1. + 9.1 * %i)-logGamma(1. + 9.1 * %i),_
+lng2(1. + 9.1 * %i)-(- 12.271170833867 + 11.771534118309 * %i)],_
+[1. + 9.2 * %i,- 12.422785931281 + 11.993008666285 * %i,_
+lng2(1. + 9.2 * %i),log(Gamma(1. + 9.2 * %i)),_
+lng2(1. + 9.2 * %i)-log(Gamma(1. + 9.2 * %i)),_
+lng2(1. + 9.2 * %i),logGamma(1. + 9.2 * %i),_
+lng2(1. + 9.2 * %i)-logGamma(1. + 9.2 * %i),_
+lng2(1. + 9.2 * %i)-(- 12.422785931281 + 11.993008666285 * %i)],_
+[1. + 9.3 * %i,- 12.574460105908 + 12.215568046479 * %i,_
+lng2(1. + 9.3 * %i),log(Gamma(1. + 9.3 * %i)),_
+lng2(1. + 9.3 * %i)-log(Gamma(1. + 9.3 * %i)),_
+lng2(1. + 9.3 * %i),logGamma(1. + 9.3 * %i),_
+lng2(1. + 9.3 * %i)-logGamma(1. + 9.3 * %i),_
+lng2(1. + 9.3 * %i)-(- 12.574460105908 + 12.215568046479 * %i)],_
+[1. + 9.4 * %i,- 12.726192094029 + 12.439200639090 * %i,_
+lng2(1. + 9.4 * %i),log(Gamma(1. + 9.4 * %i)),_
+lng2(1. + 9.4 * %i)-log(Gamma(1. + 9.4 * %i)),_
+lng2(1. + 9.4 * %i),logGamma(1. + 9.4 * %i),_
+lng2(1. + 9.4 * %i)-logGamma(1. + 9.4 * %i),_
+lng2(1. + 9.4 * %i)-(- 12.726192094029 + 12.439200639090 * %i)],_
+[1. + 9.5 * %i,- 12.877980672044 + 12.663895070128 * %i,_
+lng2(1. + 9.5 * %i),log(Gamma(1. + 9.5 * %i)),_
+lng2(1. + 9.5 * %i)-log(Gamma(1. + 9.5 * %i)),_
+lng2(1. + 9.5 * %i),logGamma(1. + 9.5 * %i),_
+lng2(1. + 9.5 * %i)-logGamma(1. + 9.5 * %i),_
+lng2(1. + 9.5 * %i)-(- 12.877980672044 + 12.663895070128 * %i)],_
+[1. + 9.6 * %i,- 13.029824654789 + 12.889640203708 * %i,_
+lng2(1. + 9.6 * %i),log(Gamma(1. + 9.6 * %i)),_
+lng2(1. + 9.6 * %i)-log(Gamma(1. + 9.6 * %i)),_
+lng2(1. + 9.6 * %i),logGamma(1. + 9.6 * %i),_
+lng2(1. + 9.6 * %i)-logGamma(1. + 9.6 * %i),_
+lng2(1. + 9.6 * %i)-(- 13.029824654789 + 12.889640203708 * %i)],_
+[1. + 9.7 * %i,- 13.181722893951 + 13.116425134666 * %i,_
+lng2(1. + 9.7 * %i),log(Gamma(1. + 9.7 * %i)),_
+lng2(1. + 9.7 * %i)-log(Gamma(1. + 9.7 * %i)),_
+lng2(1. + 9.7 * %i),logGamma(1. + 9.7 * %i),_
+lng2(1. + 9.7 * %i)-logGamma(1. + 9.7 * %i),_
+lng2(1. + 9.7 * %i)-(- 13.181722893951 + 13.116425134666 * %i)],_
+[1. + 9.8 * %i,- 13.333674276547 + 13.344239181477 * %i,_
+lng2(1. + 9.8 * %i),log(Gamma(1. + 9.8 * %i)),_
+lng2(1. + 9.8 * %i)-log(Gamma(1. + 9.8 * %i)),_
+lng2(1. + 9.8 * %i),logGamma(1. + 9.8 * %i),_
+lng2(1. + 9.8 * %i)-logGamma(1. + 9.8 * %i),_
+lng2(1. + 9.8 * %i)-(- 13.333674276547 + 13.344239181477 * %i)],_
+[1. + 9.9 * %i,- 13.485677723495 + 13.573071879455 * %i,_
+lng2(1. + 9.9 * %i),log(Gamma(1. + 9.9 * %i)),_
+lng2(1. + 9.9 * %i)-log(Gamma(1. + 9.9 * %i)),_
+lng2(1. + 9.9 * %i),logGamma(1. + 9.9 * %i),_
+lng2(1. + 9.9 * %i)-logGamma(1. + 9.9 * %i),_
+lng2(1. + 9.9 * %i)-(- 13.485677723495 + 13.573071879455 * %i)],_
+[1. + 10.0 * %i,- 13.637732188247 + 13.802912974230 * %i,_
+lng2(1. + 10.0 * %i),log(Gamma(1. + 10.0 * %i)),_
+lng2(1. + 10.0 * %i)-log(Gamma(1. + 10.0 * %i)),_
+lng2(1. + 10.0 * %i),logGamma(1. + 10.0 * %i),_
+lng2(1. + 10.0 * %i)-logGamma(1. + 10.0 * %i),_
+lng2(1. + 10.0 * %i)-(- 13.637732188247 + 13.802912974230 * %i)]]
+--R 
+--R   Compiling function lng2 with type Complex DoubleFloat -> Complex 
+--R      DoubleFloat 
+--R
+--R   (12)
+--R   [[1.,0.,0.,0.],
+--R
+--R     [1. + 0.10000000000000001 %i,
+--R      - 8.1977805649999999E-3 - 5.7322940417E-2 %i,
+--R      - 8.1977805654074309E-3 - 5.732294041672345E-2 %i,
+--R      - 8.1977805654051359E-3 - 5.7322940416719675E-2 %i,
+--R      - 2.2950391587173158E-15 - 3.7747582837255322E-15 %i,
+--R      - 8.1977805654074309E-3 - 5.732294041672345E-2 %i,
+--R      - 8.1977805654052105E-3 - 5.7322940416719675E-2 %i,
+--R      - 2.2204460492503131E-15 - 3.7747582837255322E-15 %i,
+--R      - 4.0743103335572073E-13 + 2.7654961654022259E-13 %i]
+--R     ,
+--R
+--R     [1. + 0.20000000000000001 %i, - 3.2476292317999998E-2 - 0.112302222644 %i,
+--R      - 3.2476292318133204E-2 - 0.11230222264419082 %i,
+--R      - 3.2476292318128805E-2 - 0.11230222264418371 %i,
+--R      - 4.3992587350771828E-15 - 7.1054273576010019E-15 %i,
+--R      - 3.2476292318133204E-2 - 0.11230222264419082 %i,
+--R      - 3.2476292318128763E-2 - 0.11230222264418371 %i,
+--R      - 4.4408920985006262E-15 - 7.1054273576010019E-15 %i,
+--R      - 1.3320594627330706E-13 - 1.9081958235744878E-13 %i]
+--R     ,
+--R
+--R     [1. + 0.29999999999999999 %i, - 7.1946250899999994E-2 - 0.162820672168 %i,
+--R      - 7.1946250899646902E-2 - 0.16282067216786528 %i,
+--R      - 7.1946250899640213E-2 - 0.16282067216785573 %i,
+--R      - 6.6890937233665682E-15 - 9.5479180117763462E-15 %i,
+--R      - 7.1946250899646902E-2 - 0.16282067216786528 %i,
+--R      - 7.1946250899640241E-2 - 0.16282067216785573 %i,
+--R      - 6.6613381477509392E-15 - 9.5479180117763462E-15 %i,
+--R      3.5309255519422322E-13 + 1.3472556403826275E-13 %i]
+--R     ,
+--R
+--R     [1. + 0.40000000000000002 %i, - 0.125289374821 - 0.20715582631599999 %i,
+--R      - 0.12528937482072333 - 0.20715582631567919 %i,
+--R      - 0.12528937482070648 - 0.20715582631566853 %i,
+--R      - 1.6847634398686751E-14 - 1.0658141036401503E-14 %i,
+--R      - 0.12528937482072333 - 0.20715582631567919 %i,
+--R      - 0.12528937482070646 - 0.20715582631566853 %i,
+--R      - 1.6875389974302379E-14 - 1.0658141036401503E-14 %i,
+--R      2.7666757773658901E-13 + 3.2079894296543898E-13 %i]
+--R     ,
+--R
+--R     [1. + 0.5 %i, - 0.19094549918699999 - 0.244058298905 %i,
+--R      - 0.19094549918680226 - 0.24405829890543784 %i,
+--R      - 0.19094549918678008 - 0.24405829890542749 %i,
+--R      - 2.2176704916887502E-14 - 1.0352829704629585E-14 %i,
+--R      - 0.19094549918680226 - 0.24405829890543784 %i,
+--R      - 0.19094549918678005 - 0.24405829890542752 %i,
+--R      - 2.2204460492503131E-14 - 1.0325074129013956E-14 %i,
+--R      1.9773072068574038E-13 - 4.3784420533654611E-13 %i]
+--R     ,
+--R
+--R     [1. + 0.59999999999999998 %i,
+--R      - 0.26729006821399998 - 0.27274381049099999 %i,
+--R      - 0.26729006821416545 - 0.27274381049105989 %i,
+--R      - 0.2672900682141322 - 0.27274381049105378 %i,
+--R      - 3.3251179587523438E-14 - 6.106226635438361E-15 %i,
+--R      - 0.26729006821416545 - 0.27274381049105989 %i,
+--R      - 0.26729006821413215 - 0.27274381049105378 %i,
+--R      - 3.3306690738754696E-14 - 6.106226635438361E-15 %i,
+--R      - 1.6547874182037958E-13 - 5.9896532178527195E-14 %i]
+--R     ,
+--R
+--R     [1. + 0.69999999999999996 %i,
+--R      - 0.35276869086000001 - 0.29282635118700001 %i,
+--R      - 0.35276869085965368 - 0.29282635118686051 %i,
+--R      - 0.3527686908596116 - 0.29282635118686201 %i,
+--R      - 4.2077452633293433E-14 + 1.4988010832439613E-15 %i,
+--R      - 0.35276869085965368 - 0.29282635118686051 %i,
+--R      - 0.35276869085961149 - 0.29282635118686196 %i,
+--R      - 4.2188474935755949E-14 + 1.4432899320127035E-15 %i,
+--R      3.4633407253181758E-13 + 1.3949952304415092E-13 %i]
+--R     ,
+--R
+--R     [1. + 0.80000000000000004 %i, - 0.445978783549 - 0.30422560297599999 %i,
+--R      - 0.4459787835488167 - 0.30422560297617007 %i,
+--R      - 0.4459787835487648 - 0.30422560297618323 %i,
+--R      - 5.1902926401226068E-14 + 1.3156142841808105E-14 %i,
+--R      - 0.4459787835488167 - 0.30422560297617007 %i,
+--R      - 0.44597878354876475 - 0.30422560297618317 %i,
+--R      - 5.1958437552457326E-14 + 1.3100631690576847E-14 %i,
+--R      1.8329782136561334E-13 - 1.7008616737257398E-13 %i]
+--R     ,
+--R
+--R     [1. + 0.90000000000000002 %i,
+--R      - 0.54570512860499998 - 0.30707437564200002 %i,
+--R      - 0.54570512860503806 - 0.30707437564241957 %i,
+--R      - 0.54570512860497633 - 0.30707437564245121 %i,
+--R      - 6.1728400169158704E-14 + 3.1641356201816961E-14 %i,
+--R      - 0.54570512860503806 - 0.30707437564241957 %i,
+--R      - 0.54570512860497633 - 0.30707437564245121 %i,
+--R      - 6.1728400169158704E-14 + 3.1641356201816961E-14 %i,
+--R      - 3.8080649744642869E-14 - 4.1955328100584666E-13 %i]
+--R     ,
+--R
+--R     [1. + %i, - 0.65092319930200004 - 0.30164032046799999 %i,
+--R      - 0.65092319930192311 - 0.30164032046747735 %i,
+--R      - 0.65092319930185472 - 0.30164032046753331 %i,
+--R      - 6.8389738316909643E-14 + 5.595524044110789E-14 %i,
+--R      - 0.65092319930192311 - 0.30164032046747735 %i,
+--R      - 0.65092319930185472 - 0.30164032046753331 %i,
+--R      - 6.8389738316909643E-14 + 5.595524044110789E-14 %i,
+--R      7.6938455606523348E-14 + 5.2263748884229244E-13 %i]
+--R     ,
+--R
+--R     [1. + 1.1000000000000001 %i,
+--R      - 0.76078395884100003 - 0.28826661423900002 %i,
+--R      - 0.76078395884088268 - 0.28826661423897093 %i,
+--R      - 0.76078395884081551 - 0.28826661423905575 %i,
+--R      - 6.7168492989821971E-14 + 8.482103908136196E-14 %i,
+--R      - 0.76078395884088268 - 0.28826661423897093 %i,
+--R      - 0.76078395884081562 - 0.28826661423905575 %i,
+--R      - 6.7057470687359455E-14 + 8.482103908136196E-14 %i,
+--R      1.1735057370287905E-13 + 2.9087843245179101E-14 %i]
+--R     ,
+--R
+--R     [1. + 1.2 %i, - 0.87459046389499995 - 0.26733058058100001 %i,
+--R      - 0.87459046389477102 - 0.2673305805810684 %i,
+--R      - 0.87459046389471329 - 0.26733058058118808 %i,
+--R      - 5.773159728050814E-14 + 1.1968204205459188E-13 %i,
+--R      - 0.87459046389477102 - 0.2673305805810684 %i,
+--R      - 0.87459046389471329 - 0.26733058058118808 %i,
+--R      - 5.773159728050814E-14 + 1.1968204205459188E-13 %i,
+--R      2.2892798767770728E-13 - 6.8389738316909643E-14 %i]
+--R     ,
+--R
+--R     [1. + 1.3 %i, - 0.99177276695899996 - 0.239216784465 %i,
+--R      - 0.99177276695938366 - 0.23921678446488515 %i,
+--R      - 0.99177276695934224 - 0.23921678446504457 %i,
+--R      - 4.1411318818518339E-14 + 1.5942802633617248E-13 %i,
+--R      - 0.99177276695938366 - 0.23921678446488515 %i,
+--R      - 0.99177276695934236 - 0.23921678446504457 %i,
+--R      - 4.1300296516055823E-14 + 1.5942802633617248E-13 %i,
+--R      - 3.836930773104541E-13 + 1.1485257189747244E-13 %i]
+--R     ,
+--R
+--R     [1. + 1.3999999999999999 %i, - 1.1118645664260001 - 0.204300724149 %i,
+--R      - 1.1118645664255413 - 0.20430072414906242 %i,
+--R      - 1.1118645664255329 - 0.20430072414926384 %i,
+--R      - 8.4376949871511897E-15 + 2.0142221224261903E-13 %i,
+--R      - 1.1118645664255413 - 0.20430072414906242 %i,
+--R      - 1.1118645664255329 - 0.20430072414926381 %i,
+--R      - 8.4376949871511897E-15 + 2.013944566670034E-13 %i,
+--R      4.5874415377511468E-13 - 6.2422289559549426E-14 %i]
+--R     ,
+--R
+--R     [1. + 1.5 %i, - 1.234483051547 - 0.16293976948 %i,
+--R      - 1.2344830515465768 - 0.16293976947988265 %i,
+--R      - 1.2344830515466152 - 0.16293976948012379 %i,
+--R      3.8413716652030416E-14 + 2.41140440948584E-13 %i,
+--R      - 1.2344830515465768 - 0.16293976947988265 %i,
+--R      - 1.234483051546615 - 0.16293976948012379 %i,
+--R      3.8191672047105385E-14 + 2.41140440948584E-13 %i,
+--R      4.2321701698710967E-13 + 1.1735057370287905E-13 %i]
+--R     ,
+--R
+--R     [1. + 1.6000000000000001 %i, - 1.359312248465 - 0.115468793589 %i,
+--R      - 1.3593122484650171 - 0.11546879358852835 %i,
+--R      - 1.3593122484651154 - 0.11546879358880435 %i,
+--R      9.8365759981788869E-14 + 2.7600144392181392E-13 %i,
+--R      - 1.3593122484650171 - 0.11546879358852835 %i,
+--R      - 1.3593122484651152 - 0.11546879358880435 %i,
+--R      9.8143715376863838E-14 + 2.7600144392181392E-13 %i,
+--R      - 1.7097434579227411E-14 + 4.7165049643638213E-13 %i]
+--R     ,
+--R
+--R     [1. + 1.7 %i, - 1.486089612757 - 6.2198698328999998E-2 %i,
+--R      - 1.4860896127570808 - 6.2198698328699953E-2 %i,
+--R      - 1.4860896127572634 - 6.2198698328999047E-2 %i,
+--R      1.8252066524837574E-13 + 2.9909408283401717E-13 %i,
+--R      - 1.4860896127570808 - 6.2198698328699953E-2 %i,
+--R      - 1.4860896127572634 - 6.2198698328999047E-2 %i,
+--R      1.8252066524837574E-13 + 2.9909408283401717E-13 %i,
+--R      - 8.0824236192711396E-14 + 3.0004471129885246E-13 %i]
+--R     ,
+--R
+--R     [1. + 1.8 %i, - 1.6145953959999999 - 3.4166314770000001E-3 %i,
+--R      - 1.6145953959992845 - 3.4166314766115313E-3 %i,
+--R      - 1.6145953959995625 - 3.4166314769192847E-3 %i,
+--R      2.779998453661392E-13 + 3.077533887452244E-13 %i,
+--R      - 1.6145953959992845 - 3.4166314766115313E-3 %i,
+--R      - 1.6145953959995625 - 3.4166314769192851E-3 %i,
+--R      2.779998453661392E-13 + 3.0775382242609339E-13 %i,
+--R      7.1542771706845087E-13 + 3.8846877103981825E-13 %i]
+--R     ,
+--R
+--R     [1. + 1.8999999999999999 %i, - 1.744644276174 + 6.0612874295000001E-2 %i,
+--R      - 1.7446442761733065 + 6.0612874295708608E-2 %i,
+--R      - 1.7446442761736973 + 6.0612874295411963E-2 %i,
+--R      3.907985046680551E-13 + 2.9664465328593792E-13 %i,
+--R      - 1.7446442761733065 + 6.0612874295708608E-2 %i,
+--R      - 1.7446442761736973 + 6.0612874295411956E-2 %i,
+--R      3.907985046680551E-13 + 2.9665159217984183E-13 %i,
+--R      6.9344530118087278E-13 + 7.0860678436091007E-13 %i]
+--R     ,
+--R
+--R     [1. + 2. %i, - 1.876078786431 + 0.12964631631000001 %i,
+--R      - 1.8760787864304147 + 0.12964631631004808 %i,
+--R      - 1.8760787864309298 + 0.12964631630978829 %i,
+--R      5.1514348342607263E-13 + 2.5979218776228663E-13 %i,
+--R      - 1.8760787864304147 + 0.12964631631004808 %i,
+--R      - 1.8760787864309298 + 0.12964631630978829 %i,
+--R      5.1514348342607263E-13 + 2.5979218776228663E-13 %i,
+--R      5.8530957858238253E-13 + 4.8072656966269278E-14 %i]
+--R     ,
+--R
+--R     [1. + 2.1000000000000001 %i, - 2.0087641504709999 + 0.203459473833 %i,
+--R      - 2.008764150470602 + 0.20345947383285479 %i,
+--R      - 2.008764150471249 + 0.20345947383266247 %i,
+--R      6.4703797875154123E-13 + 1.9231838344069274E-13 %i,
+--R      - 2.008764150470602 + 0.20345947383285479 %i,
+--R      - 2.008764150471249 + 0.2034594738326625 %i,
+--R      6.4703797875154123E-13 + 1.9229062786507711E-13 %i,
+--R      3.979039320256561E-13 - 1.4521717162097048E-13 %i]
+--R     ,
+--R
+--R     [1. + 2.2000000000000002 %i,
+--R      - 2.1425842092959999 + 0.28184565842600001 %i,
+--R      - 2.1425842092954812 + 0.28184565842572962 %i,
+--R      - 2.1425842092962588 + 0.28184565842564124 %i,
+--R      7.7760020644745964E-13 + 8.8373752760162461E-14 %i,
+--R      - 2.1425842092954812 + 0.28184565842572962 %i,
+--R      - 2.1425842092962588 + 0.28184565842564124 %i,
+--R      7.7760020644745964E-13 + 8.8373752760162461E-14 %i,
+--R      5.1869619710487314E-13 - 2.7039481764745688E-13 %i]
+--R     ,
+--R
+--R     [1. + 2.2999999999999998 %i,
+--R      - 2.2774381922039999 + 0.36461404894999999 %i,
+--R      - 2.2774381922033489 + 0.36461404895011906 %i,
+--R      - 2.2774381922042544 + 0.36461404895017457 %i,
+--R      9.0549789888427767E-13 - 5.5511151231257827E-14 %i,
+--R      - 2.2774381922033489 + 0.36461404895011906 %i,
+--R      - 2.2774381922042544 + 0.36461404895017457 %i,
+--R      9.0549789888427767E-13 - 5.5511151231257827E-14 %i,
+--R      6.510347816401918E-13 + 1.1907141939104804E-13 %i]
+--R     ,
+--R
+--R     [1. + 2.3999999999999999 %i,
+--R      - 2.4132381411839998 + 0.45158815244099998 %i,
+--R      - 2.4132381411832058 + 0.45158815244041817 %i,
+--R      - 2.4132381411842241 + 0.45158815244065842 %i,
+--R      1.0182965581861936E-12 - 2.4025226252888388E-13 %i,
+--R      - 2.4132381411832058 + 0.45158815244041817 %i,
+--R      - 2.4132381411842241 + 0.45158815244065842 %i,
+--R      1.0182965581861936E-12 - 2.4025226252888388E-13 %i,
+--R      7.9403150721191196E-13 - 5.8181237605481329E-13 %i]
+--R     ,
+--R
+--R     [1. + 2.5 %i, - 2.549906842495 + 0.54260440585199998 %i,
+--R      - 2.5499068424935154 + 0.54260440585197189 %i,
+--R      - 2.5499068424946199 + 0.54260440585243641 %i,
+--R      1.1044498648971057E-12 - 4.645173135031655E-13 %i,
+--R      - 2.5499068424935154 + 0.54260440585197189 %i,
+--R      - 2.5499068424946199 + 0.54260440585243641 %i,
+--R      1.1044498648971057E-12 - 4.645173135031655E-13 %i,
+--R      1.4845902285287593E-12 - 2.808864252301646E-14 %i]
+--R     ,
+--R
+--R     [1. + 2.6000000000000001 %i,
+--R      - 2.6873761537499998 + 0.63751091904599999 %i,
+--R      - 2.68737615374839 + 0.63751091904501767 %i,
+--R      - 2.6873761537495495 + 0.63751091904574642 %i,
+--R      1.1595169269185135E-12 - 7.2875039336395275E-13 %i,
+--R      - 2.68737615374839 + 0.63751091904501767 %i,
+--R      - 2.6873761537495495 + 0.63751091904574642 %i,
+--R      1.1595169269185135E-12 - 7.2875039336395275E-13 %i,
+--R      1.609823385706477E-12 - 9.8232533218833851E-13 %i]
+--R     ,
+--R
+--R     [1. + 2.7000000000000002 %i,
+--R      - 2.8255856411910001 + 0.73616635167900002 %i,
+--R      - 2.8255856411896598 + 0.73616635167831612 %i,
+--R      - 2.8255856411908322 + 0.73616635167934463 %i,
+--R      1.1723955140041653E-12 - 1.028510610012745E-12 %i,
+--R      - 2.8255856411896598 + 0.73616635167831612 %i,
+--R      - 2.8255856411908322 + 0.73616635167934463 %i,
+--R      1.1723955140041653E-12 - 1.028510610012745E-12 %i,
+--R      1.340261235327489E-12 - 6.8389738316909643E-13 %i]
+--R     ,
+--R
+--R     [1. + 2.7999999999999998 %i,
+--R      - 2.9644814617890001 + 0.83843891309600005 %i,
+--R      - 2.9644814617883712 + 0.83843891309500851 %i,
+--R      - 2.9644814617894992 + 0.83843891309636787 %i,
+--R      1.127986593019159E-12 - 1.3593570713510417E-12 %i,
+--R      - 2.9644814617883712 + 0.83843891309500851 %i,
+--R      - 2.9644814617894992 + 0.83843891309636787 %i,
+--R      1.127986593019159E-12 - 1.3593570713510417E-12 %i,
+--R      6.2883032114768866E-13 - 9.9154018329272731E-13 %i]
+--R     ,
+--R
+--R     [1. + 2.8999999999999999 %i, - 3.104015439901 + 0.94420547303900004 %i,
+--R      - 3.1040154398996762 + 0.94420547303689828 %i,
+--R      - 3.1040154399006976 + 0.94420547303860847 %i,
+--R      1.021405182655144E-12 - 1.7101875471325911E-12 %i,
+--R      - 3.1040154398996762 + 0.94420547303689828 %i,
+--R      - 3.1040154399006976 + 0.94420547303860847 %i,
+--R      1.021405182655144E-12 - 1.7101875471325911E-12 %i,
+--R      1.3238299345630367E-12 - 2.1017632079178838E-12 %i]
+--R     ,
+--R
+--R     [1. + 3. %i, - 3.2441442995899998 + 1.053350771069 %i,
+--R      - 3.2441442995889096 + 1.0533507710665391 %i,
+--R      - 3.2441442995897569 + 1.0533507710686134 %i,
+--R      8.4732221239391947E-13 - 2.0743406992096425E-12 %i,
+--R      - 3.2441442995889096 + 1.0533507710665391 %i,
+--R      - 3.2441442995897569 + 1.0533507710686134 %i,
+--R      8.4732221239391947E-13 - 2.0743406992096425E-12 %i,
+--R      1.0902390101819037E-12 - 2.460920356384122E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.1000000000000001 %i, - 3.3848290223770001 + 1.1657667132859999 %i,
+--R      - 3.3848290223762163 + 1.1657667132835678 %i,
+--R      - 3.3848290223768105 + 1.1657667132860055 %i,
+--R      5.9419136277938378E-13 - 2.4376056728669937E-12 %i,
+--R      - 3.3848290223762163 + 1.1657667132835678 %i,
+--R      - 3.3848290223768105 + 1.1657667132860055 %i,
+--R      5.9419136277938378E-13 - 2.4376056728669937E-12 %i,
+--R      7.8381745538536052E-13 - 2.4320545577438679E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.2000000000000002 %i, - 3.5260343067090001 + 1.2813517459320001 %i,
+--R      - 3.526034306709148 + 1.2813517459289936 %i,
+--R      - 3.5260343067094082 + 1.2813517459317825 %i,
+--R      2.6023627697213669E-13 - 2.7888802378583932E-12 %i,
+--R      - 3.526034306709148 + 1.2813517459289936 %i,
+--R      - 3.5260343067094082 + 1.2813517459317825 %i,
+--R      2.6023627697213669E-13 - 2.7888802378583932E-12 %i,
+--R      - 1.4788170688007085E-13 - 3.0064839506849239E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.2999999999999998 %i, - 3.667728110488 + 1.400010296576 %i,
+--R      - 3.6677281104880142 + 1.4000102965732348 %i,
+--R      - 3.667728110487861 + 1.4000102965763475 %i,
+--R      - 1.532107773982716E-13 - 3.1126212718390889E-12 %i,
+--R      - 3.6677281104880142 + 1.4000102965732348 %i,
+--R      - 3.667728110487861 + 1.4000102965763475 %i,
+--R      - 1.532107773982716E-13 - 3.1126212718390889E-12 %i,
+--R      - 1.4210854715202004E-14 - 2.7651214651314149E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.3999999999999999 %i, - 3.809881261823 + 1.5216522746729999 %i,
+--R      - 3.8098812618238078 + 1.5216522746692753 %i,
+--R      - 3.8098812618231559 + 1.5216522746726655 %i,
+--R      - 6.5192296005989192E-13 - 3.390177027995378E-12 %i,
+--R      - 3.8098812618238078 + 1.5216522746692753 %i,
+--R      - 3.8098812618231559 + 1.5216522746726655 %i,
+--R      - 6.5192296005989192E-13 - 3.390177027995378E-12 %i,
+--R      - 8.077982727172639E-13 - 3.7245762030124752E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.5 %i, - 3.9524671261890001 + 1.6461926242689999 %i,
+--R      - 3.9524671261902951 + 1.6461926242652614 %i,
+--R      - 3.9524671261890694 + 1.6461926242688742 %i,
+--R      - 1.2256862191861728E-12 - 3.6128877667351844E-12 %i,
+--R      - 3.9524671261902951 + 1.6461926242652614 %i,
+--R      - 3.9524671261890694 + 1.6461926242688745 %i,
+--R      - 1.2256862191861728E-12 - 3.6131098113401094E-12 %i,
+--R      - 1.2949641359227826E-12 - 3.7385650131227521E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.6000000000000001 %i, - 4.0954613204510002 + 1.773550922591 %i,
+--R      - 4.0954613204527295 + 1.7735509225871642 %i,
+--R      - 4.0954613204508536 + 1.7735509225909303 %i,
+--R      - 1.8758328224066645E-12 - 3.766098544133456E-12 %i,
+--R      - 4.0954613204527295 + 1.7735509225871642 %i,
+--R      - 4.0954613204508536 + 1.7735509225909305 %i,
+--R      - 1.8758328224066645E-12 - 3.766320588738381E-12 %i,
+--R      - 1.7292833831561438E-12 - 3.8358205500799158E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.7000000000000002 %i, - 4.2388414660710003 + 1.9036510190189999 %i,
+--R      - 4.2388414660738949 + 1.9036510190149798 %i,
+--R      - 4.2388414660713067 + 1.9036510190188067 %i,
+--R      - 2.5881519150061649E-12 - 3.8269387658829146E-12 %i,
+--R      - 4.2388414660738949 + 1.9036510190149798 %i,
+--R      - 4.2388414660713067 + 1.903651019018807 %i,
+--R      - 2.5881519150061649E-12 - 3.8271608104878396E-12 %i,
+--R      - 2.8945734698027081E-12 - 4.0201175721676918E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.7999999999999998 %i, - 4.3825869752279996 + 2.036420709693 %i,
+--R      - 4.3825869752317539 + 2.0364207096887958 %i,
+--R      - 4.3825869752283992 + 2.0364207096925875 %i,
+--R      - 3.354649891207373E-12 - 3.7916336736998346E-12 %i,
+--R      - 4.3825869752317539 + 2.0364207096887958 %i,
+--R      - 4.3825869752283992 + 2.0364207096925875 %i,
+--R      - 3.354649891207373E-12 - 3.7916336736998346E-12 %i,
+--R      - 3.7543301800724294E-12 - 4.2041925496505428E-12 %i]
+--R     ,
+--R
+--R     [1. + 3.8999999999999999 %i, - 4.5266788647159997 + 2.1717914436050001 %i,
+--R      - 4.5266788647203882 + 2.1717914436011432 %i,
+--R      - 4.5266788647162244 + 2.1717914436047852 %i,
+--R      - 4.1637804315541871E-12 - 3.6419756099803635E-12 %i,
+--R      - 4.5266788647203882 + 2.1717914436011432 %i,
+--R      - 4.5266788647162244 + 2.1717914436047852 %i,
+--R      - 4.1637804315541871E-12 - 3.6419756099803635E-12 %i,
+--R      - 4.3884895717383188E-12 - 3.8569147875477938E-12 %i]
+--R     ,
+--R
+--R     [1. + 4. %i, - 4.6710995934090001 + 2.3096980565730001 %i,
+--R      - 4.6710995934138815 + 2.3096980565691623 %i,
+--R      - 4.6710995934088881 + 2.3096980565725347 %i,
+--R      - 4.9933390755541041E-12 - 3.3724134596013755E-12 %i,
+--R      - 4.6710995934138815 + 2.3096980565691623 %i,
+--R      - 4.6710995934088881 + 2.3096980565725347 %i,
+--R      - 4.9933390755541041E-12 - 3.3724134596013755E-12 %i,
+--R      - 4.8814285946718883E-12 - 3.8378189515242411E-12 %i]
+--R     ,
+--R
+--R     [1. + 4.0999999999999996 %i, - 4.8158329197959997 + 2.450078529947 %i,
+--R      - 4.8158329198018643 + 2.4500785299441619 %i,
+--R      - 4.815832919796029 + 2.4500785299471368 %i,
+--R      - 5.8353322174298228E-12 - 2.9749536167855695E-12 %i,
+--R      - 4.8158329198018643 + 2.4500785299441619 %i,
+--R      - 4.815832919796029 + 2.4500785299471368 %i,
+--R      - 5.8353322174298228E-12 - 2.9749536167855695E-12 %i,
+--R      - 5.8646421052799269E-12 - 2.8381741401517502E-12 %i]
+--R     ,
+--R
+--R     [1. + 4.2000000000000002 %i, - 4.9608637766869998 + 2.5928737713190002 %i,
+--R      - 4.9608637766941683 + 2.5928737713163916 %i,
+--R      - 4.9608637766875017 + 2.592873771318831 %i,
+--R      - 6.66666721826914E-12 - 2.439382029706394E-12 %i,
+--R      - 4.9608637766941683 + 2.5928737713163916 %i,
+--R      - 4.9608637766875017 + 2.592873771318831 %i,
+--R      - 6.66666721826914E-12 - 2.439382029706394E-12 %i,
+--R      - 7.1684880253997108E-12 - 2.6085800186592678E-12 %i]
+--R     ,
+--R
+--R     [1. + 4.2999999999999998 %i, - 5.1061781606630001 + 2.7380274148199999 %i,
+--R      - 5.106178160670173 + 2.7380274148181059 %i,
+--R      - 5.1061781606626999 + 2.7380274148198751 %i,
+--R      - 7.4731332233568537E-12 - 1.7692514120426495E-12 %i,
+--R      - 5.106178160670173 + 2.7380274148181059 %i,
+--R      - 5.1061781606626999 + 2.7380274148198751 %i,
+--R      - 7.4731332233568537E-12 - 1.7692514120426495E-12 %i,
+--R      - 7.1729289174982114E-12 - 1.8940404800105171E-12 %i]
+--R     ,
+--R
+--R     [1. + 4.4000000000000004 %i, - 5.2517630342299997 + 2.8854856389269998 %i,
+--R      - 5.2517630342385004 + 2.885485638926045 %i,
+--R      - 5.2517630342302715 + 2.88548563892701 %i,
+--R      - 8.2289730585216603E-12 - 9.6500585300418606E-13 %i,
+--R      - 5.2517630342385004 + 2.885485638926045 %i,
+--R      - 5.2517630342302715 + 2.88548563892701 %i,
+--R      - 8.2289730585216603E-12 - 9.6500585300418606E-13 %i,
+--R      - 8.5007556549498986E-12 - 9.5479180117763462E-13 %i]
+--R     ,
+--R
+--R     [1. + 4.5 %i, - 5.3976062389840003 + 3.0351969999219999 %i,
+--R      - 5.3976062389928803 + 3.0351969999215886 %i,
+--R      - 5.3976062389839621 + 3.0351969999216122 %i,
+--R      - 8.9181995122089575E-12 - 2.3536728122053319E-14 %i,
+--R      - 5.3976062389928803 + 3.0351969999215886 %i,
+--R      - 5.3976062389839621 + 3.0351969999216122 %i,
+--R      - 8.9181995122089575E-12 - 2.3536728122053319E-14 %i,
+--R      - 8.8800078401618521E-12 - 4.1122660832115798E-13 %i]
+--R     ,
+--R
+--R     [1. + 4.5999999999999996 %i, - 5.5436964183040001 + 3.1871122793889999 %i,
+--R      - 5.5436964183137087 + 3.1871122793895621 %i,
+--R      - 5.5436964183041857 - 3.0960730277910646 %i,
+--R      - 9.5230490160247427E-12 + 6.2831853071806272 %i,
+--R      - 5.5436964183137087 + 3.1871122793895621 %i,
+--R      - 5.5436964183041857 + 3.1871122793885216 %i,
+--R      - 9.5230490160247427E-12 + 1.0405010186786967E-12 %i,
+--R      - 9.7086783057420689E-12 + 5.6221693967017927E-13 %i]
+--R     ,
+--R
+--R     [1. + 4.7000000000000002 %i, - 5.6900229483729996 + 3.341184344327 %i,
+--R      - 5.6900229483832865 + 3.3411843443292577 %i,
+--R      - 5.6900229483732598 - 2.9420009628525539 %i,
+--R      - 1.0026646179994714E-11 + 6.283185307181812 %i,
+--R      - 5.6900229483832865 + 3.3411843443292577 %i,
+--R      - 5.6900229483732598 + 3.3411843443270324 %i,
+--R      - 1.0026646179994714E-11 + 2.2253310305586638E-12 %i,
+--R      - 1.028688245696685E-11 + 2.2577495428777183E-12 %i]
+--R     ,
+--R
+--R     [1. + 4.7999999999999998 %i, - 5.8365758764539999 + 3.497368018615 %i,
+--R      - 5.8365758764642743 + 3.4973680186185057 %i,
+--R      - 5.8365758764538676 - 2.7858172885645978 %i,
+--R      - 1.0406786543626367E-11 + 6.2831853071831034 %i,
+--R      - 5.8365758764642743 + 3.4973680186185057 %i,
+--R      - 5.8365758764538676 + 3.4973680186149885 %i,
+--R      - 1.0406786543626367E-11 + 3.5171865420124959E-12 %i,
+--R      - 1.0274447959091049E-11 + 3.5056402225563943E-12 %i]
+--R     ,
+--R
+--R     [1. + 4.9000000000000004 %i, - 5.9833458655319998 + 3.6556199647119998 %i,
+--R      - 5.9833458655426615 + 3.6556199647169638 %i,
+--R      - 5.9833458655320113 - 2.6275653424675292 %i,
+--R      - 1.0650147430624202E-11 + 6.2831853071844925 %i,
+--R      - 5.9833458655426615 + 3.6556199647169638 %i,
+--R      - 5.9833458655320113 + 3.6556199647120571 %i,
+--R      - 1.0650147430624202E-11 + 4.9067416796333418E-12 %i,
+--R      - 1.0661693750080303E-11 + 4.9640291877039999E-12 %i]
+--R     ,
+--R
+--R     [1. + 5. %i, - 6.1303241445529997 + 3.8158985746149998 %i,
+--R      - 6.1303241445634962 + 3.8158985746213019 %i,
+--R      - 6.1303241445527474 - 2.467286732564661 %i,
+--R      - 1.0748735235210916E-11 + 6.2831853071859634 %i,
+--R      - 6.1303241445634962 + 3.8158985746213019 %i,
+--R      - 6.1303241445527474 + 3.8158985746149252 %i,
+--R      - 1.0748735235210916E-11 + 6.3766769642370491E-12 %i,
+--R      - 1.049649256401608E-11 + 6.3020699769822386E-12 %i]
+--R     ,
+--R
+--R     [1. + 5.0999999999999996 %i, - 6.2775024635839998 + 3.9781638691880001 %i,
+--R      - 6.2775024635948373 + 3.9781638691954653 %i,
+--R      - 6.2775024635841525 - 2.3050214379920333 %i,
+--R      - 1.0684786388992507E-11 + 6.2831853071874981 %i,
+--R      - 6.2775024635948373 + 3.9781638691954653 %i,
+--R      - 6.2775024635841525 + 3.9781638691875529 %i,
+--R      - 1.0684786388992507E-11 + 7.9123374518985656E-12 %i,
+--R      - 1.0837553077180928E-11 + 7.4651396175795526E-12 %i]
+--R     ,
+--R
+--R     [1. + 5.2000000000000002 %i, - 6.4248730533350003 + 4.1423774050860001 %i,
+--R      - 6.4248730533455438 + 4.1423774050956217 %i,
+--R      - 6.4248730533350971 - 2.1408079020934521 %i,
+--R      - 1.0446754572512873E-11 + 6.2831853071890738 %i,
+--R      - 6.4248730533455438 + 4.1423774050956217 %i,
+--R      - 6.4248730533350971 + 4.1423774050861342 %i,
+--R      - 1.0446754572512873E-11 + 9.4875218792367377E-12 %i,
+--R      - 1.0543566020260187E-11 + 9.6216368206114566E-12 %i]
+--R     ,
+--R
+--R     [1. + 5.2999999999999998 %i, - 6.5724285885290001 + 4.3085021885829997 %i,
+--R      - 6.5724285885392737 + 4.3085021885940744 %i,
+--R      - 6.5724285885292408 - 1.9746831185966061 %i,
+--R      - 1.0032863428932615E-11 + 6.2831853071906805 %i,
+--R      - 6.5724285885392737 + 4.3085021885940744 %i,
+--R      - 6.5724285885292408 + 4.3085021885829802 %i,
+--R      - 1.0032863428932615E-11 + 1.1094236640474264E-11 %i,
+--R      - 1.0273559780671349E-11 + 1.1074696715240862E-11 %i]
+--R     ,
+--R
+--R     [1. + 5.4000000000000004 %i, - 6.7201621547029999 + 4.4765025956680002 %i,
+--R      - 6.7201621547120922 + 4.47650259568056 %i,
+--R      - 6.7201621547026544 - 1.8066827115117343 %i,
+--R      - 9.4377838877335307E-12 + 6.2831853071922943 %i,
+--R      - 6.7201621547120922 + 4.47650259568056 %i,
+--R      - 6.7201621547026544 + 4.4765025956678519 %i,
+--R      - 9.4377838877335307E-12 + 1.2708056829069392E-11 %i,
+--R      - 9.092282482470182E-12 + 1.2559731032979471E-11 %i]
+--R     ,
+--R
+--R     [1. + 5.5 %i, - 6.868067218048 + 4.6463442978699998 %i,
+--R      - 6.8680672180567024 + 4.6463442978846725 %i,
+--R      - 6.8680672180480444 - 1.6368410093092187 %i,
+--R      - 8.6579632352368208E-12 + 6.2831853071938912 %i,
+--R      - 6.8680672180567024 + 4.6463442978846725 %i,
+--R      - 6.8680672180480444 + 4.6463442978703675 %i,
+--R      - 8.6579632352368208E-12 + 1.4305001627690217E-11 %i,
+--R      - 8.702372156221827E-12 + 1.4672707493446069E-11 %i]
+--R     ,
+--R
+--R     [1. + 5.5999999999999996 %i, - 7.0161375979759999 + 4.8179941933050001 %i,
+--R      - 7.0161375979838869 + 4.8179941933206978 %i,
+--R      - 7.0161375979761953 - 1.4651911138747613 %i,
+--R      - 7.6916251146030845E-12 + 6.2831853071954589 %i,
+--R      - 7.0161375979838869 + 4.8179941933206978 %i,
+--R      - 7.0161375979761953 + 4.8179941933048251 %i,
+--R      - 7.6916251146030845E-12 + 1.5872636538460938E-11 %i,
+--R      - 7.8870243669371121E-12 + 1.5697665389780013E-11 %i]
+--R     ,
+--R
+--R     [1. + 5.7000000000000002 %i, - 7.1643674421060002 + 4.9914203424889996 %i,
+--R      - 7.1643674421125283 + 4.9914203425067907 %i,
+--R      - 7.1643674421059877 - 1.2917649646901792 %i,
+--R      - 6.5405458826717222E-12 + 6.2831853071969697 %i,
+--R      - 7.1643674421125283 + 4.9914203425067907 %i,
+--R      - 7.1643674421059877 + 4.9914203424894072 %i,
+--R      - 6.5405458826717222E-12 + 1.7383428030370851E-11 %i,
+--R      - 6.5281113847959205E-12 + 1.7791101925013209E-11 %i]
+--R     ,
+--R
+--R     [1. + 5.7999999999999998 %i, - 7.3127512034300004 + 5.1665919085369998 %i,
+--R      - 7.3127512034347566 + 5.1665919085555689 %i,
+--R      - 7.3127512034295403 - 1.1165933986428442 %i,
+--R      - 5.2162718588988355E-12 + 6.2831853071984129 %i,
+--R      - 7.3127512034347566 + 5.1665919085555689 %i,
+--R      - 7.3127512034295403 + 5.1665919085367422 %i,
+--R      - 5.2162718588988355E-12 + 1.8826717962383555E-11 %i,
+--R      - 4.7561954374941706E-12 + 1.8569146220670518E-11 %i]
+--R     ,
+--R
+--R     [1. + 5.9000000000000004 %i, - 7.4612836194290004 + 5.3434791013530001 %i,
+--R      - 7.4612836194330985 + 5.3434791013727736 %i,
+--R      - 7.4612836194293806 - 0.93970620582698861 %i,
+--R      - 3.7179148648647242E-12 + 6.2831853071997621 %i,
+--R      - 7.4612836194330985 + 5.3434791013727736 %i,
+--R      - 7.4612836194293806 + 5.3434791013525977 %i,
+--R      - 3.7179148648647242E-12 + 2.0175860981908045E-11 %i,
+--R      - 4.0980552284963778E-12 + 1.9773516157783888E-11 %i]
+--R     ,
+--R
+--R     [1. + 6. %i, - 7.6099596929509996 + 5.5220531255149998 %i,
+--R      - 7.6099596929527342 + 5.5220531255361394 %i,
+--R      - 7.6099596929506781 - 0.76113218166486107 %i,
+--R      - 2.0561330416057899E-12 + 6.2831853072010002 %i,
+--R      - 7.6099596929527342 + 5.5220531255361394 %i,
+--R      - 7.6099596929506781 + 5.5220531255147254 %i,
+--R      - 2.0561330416057899E-12 + 2.1413981698970019E-11 %i,
+--R      - 1.7346124536743446E-12 + 2.1139534567282681E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.0999999999999996 %i, - 7.7587746746550001 + 5.7022861315349997 %i,
+--R      - 7.7587746746548047 + 5.7022861315579565 %i,
+--R      - 7.7587746746545623 - 0.58089917564415772 %i,
+--R      - 2.4247270857813419E-13 + 6.283185307202114 %i,
+--R      - 7.7587746746548047 + 5.7022861315579565 %i,
+--R      - 7.7587746746545623 + 5.7022861315354287 %i,
+--R      - 2.4247270857813419E-13 + 2.2527757437273976E-11 %i,
+--R      1.9539925233402755E-13 + 2.2956747613989137E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.2000000000000002 %i, - 7.9077240468980001 + 5.8841511702389999 %i,
+--R      - 7.9077240468964503 + 5.8841511702628972 %i,
+--R      - 7.9077240468981636 - 0.39903413694019135 %i,
+--R      1.7132961716015416E-12 + 6.2831853072030883 %i,
+--R      - 7.9077240468964503 + 5.8841511702628972 %i,
+--R      - 7.9077240468981636 + 5.8841511702393952 %i,
+--R      1.7132961716015416E-12 + 2.3502089163685014E-11 %i,
+--R      1.5498713423767185E-12 + 2.389732856045157E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.2999999999999998 %i, - 8.0568035089040002 + 6.0676221500130003 %i,
+--R      - 8.0568035089006376 + 6.0676221500375078 %i,
+--R      - 8.0568035089044336 - 0.21556315716640231 %i,
+--R      3.7960745657983352E-12 + 6.2831853072039099 %i,
+--R      - 8.0568035089006376 + 6.0676221500375078 %i,
+--R      - 8.0568035089044336 + 6.0676221500131842 %i,
+--R      3.7960745657983352E-12 + 2.432365420190763E-11 %i,
+--R      3.3626434969846741E-12 + 2.4507507134785556E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.4000000000000004 %i, - 8.2060089631000004 + 6.2526737967050003 %i,
+--R      - 8.2060089630938631 + 6.2526737967303392 %i,
+--R      - 8.2060089630998547 - 3.0511510474225532E-2 %i,
+--R      5.9916516192970448E-12 + 6.2831853072045645 %i,
+--R      - 8.2060089630938631 + 6.2526737967303392 %i,
+--R      - 8.2060089630998547 + 6.2526737967053609 %i,
+--R      5.9916516192970448E-12 + 2.4978241697226622E-11 %i,
+--R      6.1373128801278654E-12 + 2.5338842135624873E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.5 %i, - 8.3553365025109994 + 6.4392816159760002 %i,
+--R      - 8.3553365025030768 + 6.4392816160014412 %i,
+--R      - 8.3553365025113582 + 0.15609630879639777 %i,
+--R      8.2813755852839677E-12 + 6.2831853072050432 %i,
+--R      - 8.3553365025030768 + 6.4392816160014412 %i,
+--R      - 8.3553365025113582 + 6.4392816159759843 %i,
+--R      8.2813755852839677E-12 + 2.5456969865444989E-11 %i,
+--R      7.9225515037251171E-12 + 2.5440982653890387E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.5999999999999996 %i, - 8.5047823991250002 + 6.6274218579120001 %i,
+--R      - 8.5047823991147968 + 6.6274218579380832 %i,
+--R      - 8.5047823991254532 + 0.34423655073274489 %i,
+--R      1.0656364679562103E-11 + 6.2831853072053381 %i,
+--R      - 8.5047823991147968 + 6.6274218579380832 %i,
+--R      - 8.5047823991254532 + 6.6274218579123314 %i,
+--R      1.0656364679562103E-11 + 2.5751845100785431E-11 %i,
+--R      1.0203393685515039E-11 + 2.6083135651333578E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.7000000000000002 %i, - 8.6543430931229999 + 6.8170714837439998 %i,
+--R      - 8.6543430931095795 + 6.8170714837695128 %i,
+--R      - 8.654343093122673 + 0.53388617656407311 %i,
+--R      1.3093526263219246E-11 + 6.2831853072054393 %i,
+--R      - 8.6543430931095795 + 6.8170714837695128 %i,
+--R      - 8.654343093122673 + 6.8170714837436597 %i,
+--R      1.3093526263219246E-11 + 2.5853097440631245E-11 %i,
+--R      1.3420375921668892E-11 + 2.5512925105886097E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.7999999999999998 %i, - 8.8040151829099997 + 7.0082081345020004 %i,
+--R      - 8.8040151828940125 + 7.0082081345282035 %i,
+--R      - 8.804015182909593 + 0.72502282732285273 %i,
+--R      1.5580425838379597E-11 + 6.2831853072053505 %i,
+--R      - 8.8040151828940125 + 7.0082081345282035 %i,
+--R      - 8.804015182909593 + 7.0082081345024392 %i,
+--R      1.5580425838379597E-11 + 2.5764279598661233E-11 %i,
+--R      1.5987211554602254E-11 + 2.6203039737993095E-11 %i]
+--R     ,
+--R
+--R     [1. + 6.9000000000000004 %i, - 8.9537954158790001 + 7.2008101014930004 %i,
+--R      - 8.9537954158604087 + 7.2008101015179795 %i,
+--R      - 8.9537954158785062 + 0.91762479431292798 %i,
+--R      1.8097523479809752E-11 + 6.2831853072050512 %i,
+--R      - 8.9537954158604087 + 7.2008101015179795 %i,
+--R      - 8.9537954158785062 + 7.2008101014925145 %i,
+--R      1.8097523479809752E-11 + 2.5464963471222291E-11 %i,
+--R      1.8591350681163021E-11 + 2.4979129875646322E-11 %i]
+--R     ,
+--R
+--R     [1. + 7. %i, - 9.1036806798319994 + 7.3948562984360002 %i,
+--R      - 9.1036806798113208 + 7.3948562984612414 %i,
+--R      - 9.1036806798319478 + 1.1116709912566856 %i,
+--R      2.0627055619115708E-11 + 6.2831853072045556 %i,
+--R      - 9.1036806798113208 + 7.3948562984612414 %i,
+--R      - 9.1036806798319478 + 7.394856298436272 %i,
+--R      2.0627055619115708E-11 + 2.4969359913029621E-11 %i,
+--R      2.0678569967458316E-11 + 2.5241142509457859E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.0999999999999996 %i, - 9.2536679950150003 + 7.5903262351840004 %i,
+--R      - 9.2536679949923037 + 7.5903262352081597 %i,
+--R      - 9.253667995015455 + 1.3071409280042976 %i,
+--R      2.3151258687903464E-11 + 6.2831853072038619 %i,
+--R      - 9.2536679949923037 + 7.5903262352081597 %i,
+--R      - 9.253667995015455 + 7.5903262351838841 %i,
+--R      2.3151258687903464E-11 + 2.4275692567243823E-11 %i,
+--R      2.2696511337017E-11 + 2.4159341194263106E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.2000000000000002 %i, - 9.4037545067079993 + 7.7871999928770004 %i,
+--R      - 9.4037545066819188 + 7.7871999929003017 %i,
+--R      - 9.4037545067075801 + 1.5040146856973393 %i,
+--R      2.5661250901976018E-11 + 6.2831853072029622 %i,
+--R      - 9.4037545066819188 + 7.7871999929003017 %i,
+--R      - 9.4037545067075801 + 7.7871999928769258 %i,
+--R      2.5661250901976018E-11 + 2.3375967828087596E-11 %i,
+--R      2.6080471116074477E-11 + 2.3301360840832785E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.2999999999999998 %i, - 9.553937478321 + 7.9854582004679999 %i,
+--R      - 9.5539374782927702 + 7.9854582004898704 %i,
+--R      - 9.5539374783209006 + 1.7022728932880065 %i,
+--R      2.8130386908742366E-11 + 6.2831853072018635 %i,
+--R      - 9.5539374782927702 + 7.9854582004898704 %i,
+--R      - 9.5539374783209006 + 7.9854582004675931 %i,
+--R      2.8130386908742366E-11 + 2.2277291122918541E-11 %i,
+--R      2.822986289174878E-11 + 2.1870505406695884E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.4000000000000004 %i, - 9.7042142849720001 + 8.1850820125030008 %i,
+--R      - 9.704214284941953 + 8.1850820125237895 %i,
+--R      - 9.7042142849724993 + 1.9018967053232116 %i,
+--R      3.0546232210326707E-11 + 6.2831853072005774 %i,
+--R      - 9.704214284941953 + 8.1850820125237895 %i,
+--R      - 9.7042142849724993 + 8.1850820125027983 %i,
+--R      3.0546232210326707E-11 + 2.099120877119276E-11 %i,
+--R      3.0047075938455237E-11 + 2.0788704091501131E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.5 %i, - 9.8545824074859993 + 8.3860530880889996 %i,
+--R      - 9.8545824074530213 + 8.3860530881086959 %i,
+--R      - 9.8545824074859176 + 2.1028677809095977 %i,
+--R      3.2896352308853238E-11 + 6.2831853071990977 %i,
+--R      - 9.8545824074530213 + 8.3860530881086959 %i,
+--R      - 9.8545824074859176 + 8.3860530880891844 %i,
+--R      3.2896352308853238E-11 + 1.9511503523972351E-11 %i,
+--R      3.297806472346565E-11 + 1.9696244635269977E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.5999999999999996 %i, - 10.005039426790001 + 8.5883535709619991 %i,
+--R      - 10.005039426755229 + 8.5883535709799599 %i,
+--R      - 10.005039426790399 + 2.3051682637825208 %i,
+--R      3.5170089063285559E-11 + 6.2831853071974386 %i,
+--R      - 10.005039426755229 + 8.5883535709799599 %i,
+--R      - 10.005039426790399 + 8.5883535709621075 %i,
+--R      3.5170089063285559E-11 + 1.7852386235972517E-11 %i,
+--R      3.4772185131259903E-11 + 1.7960744003175932E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.7000000000000002 %i, - 10.155583018686 + 8.7919660705869997 %i,
+--R      - 10.155583018648864 + 8.7919660706032658 %i,
+--R      - 10.155583018686212 + 2.5087807634076618 %i,
+--R      3.7347902548390266E-11 + 6.2831853071956036 %i,
+--R      - 10.155583018648864 + 8.7919660706032658 %i,
+--R      - 10.155583018686212 + 8.7919660705872484 %i,
+--R      3.7347902548390266E-11 + 1.6017409620872058E-11 %i,
+--R      3.7136516084501636E-11 + 1.6266099578388094E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.7999999999999998 %i, - 10.306210948947999 + 8.9968736442289998 %i,
+--R      - 10.306210948908324 + 8.9968736442431059 %i,
+--R      - 10.306210948947749 + 2.7136883370494931 %i,
+--R      3.9424463693649159E-11 + 6.2831853071936123 %i,
+--R      - 10.306210948908324 + 8.9968736442431059 %i,
+--R      - 10.306210948947749 + 8.9968736442290798 %i,
+--R      3.9424463693649159E-11 + 1.4026113603904378E-11 %i,
+--R      3.9674930008004594E-11 + 1.4106049661677389E-11 %i]
+--R     ,
+--R
+--R     [1. + 7.9000000000000004 %i, - 10.456921068739 + 9.2030597799250007 %i,
+--R      - 10.456921068697145 + 9.203059779937302 %i,
+--R      - 10.456921068738524 + 2.9198744727458439 %i,
+--R      4.1378456216989434E-11 + 6.2831853071914576 %i,
+--R      - 10.456921068697145 + 9.203059779937302 %i,
+--R      - 10.456921068738524 + 9.2030597799254306 %i,
+--R      4.1378456216989434E-11 + 1.1871392757711874E-11 %i,
+--R      4.1854519849948701E-11 + 1.2301271112846734E-11 %i]
+--R     ,
+--R
+--R     [1. + 8. %i, - 10.607711310315 + 9.4105083803120007 %i,
+--R      - 10.607711310271373 + 9.4105083803211791 %i,
+--R      - 10.607711310314581 + 3.1273230731320214 %i,
+--R      4.3208103761571692E-11 + 6.2831853071891572 %i,
+--R      - 10.607711310271373 + 9.4105083803211791 %i,
+--R      - 10.607711310314581 + 9.4105083803116081 %i,
+--R      4.3208103761571692E-11 + 9.5710106506885495E-12 %i,
+--R      4.3627323975670151E-11 + 9.1784357891810942E-12 %i]
+--R     ,
+--R
+--R     [1. + 8.0999999999999996 %i, - 10.758579682995 + 9.6192037472420004 %i,
+--R      - 10.758579682949891 + 9.6192037472493066 %i,
+--R      - 10.758579682994794 - 2.9471668671170055 %i,
+--R      4.4902748186359531E-11 + 12.566370614366312 %i,
+--R      - 10.758579682949891 + 9.6192037472493066 %i,
+--R      - 10.758579682994794 + 9.6192037472421674 %i,
+--R      4.4902748186359531E-11 + 7.1391781375496066E-12 %i,
+--R      4.510880557972996E-11 + 7.3061556804532302E-12 %i]
+--R     ,
+--R
+--R     [1. + 8.1999999999999993 %i, - 10.909524269378 + 9.8291305671620002 %i,
+--R      - 10.909524269331923 + 9.8291305671662812 %i,
+--R      - 10.909524269378373 - 2.7372400471974712 %i,
+--R      4.6449954993477149E-11 + 12.566370614363752 %i,
+--R      - 10.909524269331923 + 9.8291305671662812 %i,
+--R      - 10.909524269378373 + 9.8291305671617017 %i,
+--R      4.6449954993477149E-11 + 4.5794479319738457E-12 %i,
+--R      4.6076920057203097E-11 + 4.2810199829546036E-12 %i]
+--R     ,
+--R
+--R     [1. + 8.3000000000000007 %i, - 11.060543221792001 + 10.040273897180001 %i,
+--R      - 11.060543221743844 + 10.040273897181736 %i,
+--R      - 11.060543221791693 - 2.5260967171793411 %i,
+--R      4.7849724182924547E-11 + 12.566370614361077 %i,
+--R      - 11.060543221743844 + 10.040273897181736 %i,
+--R      - 11.060543221791693 + 10.040273897179832 %i,
+--R      4.7849724182924547E-11 + 1.9042545318370685E-12 %i,
+--R      4.815703391614079E-11 + 1.7355006320940447E-12 %i]
+--R     ,
+--R
+--R     [1. + 8.4000000000000004 %i, - 11.211634758948 + 10.252619151809 %i,
+--R      - 11.211634758898732 + 10.252619151807744 %i,
+--R      - 11.211634758947826 - 2.3137514625505582 %i,
+--R      4.9093173970504722E-11 + 12.566370614358302 %i,
+--R      - 11.211634758898732 + 10.252619151807744 %i,
+--R      - 11.211634758947826 + 10.252619151808615 %i,
+--R      4.9093173970504722E-11 - 8.7041485130612273E-13 %i,
+--R      4.9267256940765947E-11 - 1.2558842854559771E-12 %i]
+--R     ,
+--R
+--R     [1. + 8.5 %i, - 11.362797162804 + 10.466152090324 %i,
+--R      - 11.36279716275364 + 10.466152090319857 %i,
+--R      - 11.362797162803814 - 2.100218524035578 %i,
+--R      5.0173198928860074E-11 + 12.566370614355435 %i,
+--R      - 11.36279716275364 + 10.466152090319857 %i,
+--R      - 11.362797162803814 + 10.466152090323595 %i,
+--R      5.0173198928860074E-11 - 3.737454790098127E-12 %i,
+--R      5.0359716396997101E-11 - 4.1424641494813841E-12 %i]
+--R     ,
+--R
+--R     [1. + 8.5999999999999996 %i, - 11.514028775602 + 10.680858804712001 %i,
+--R      - 11.514028775550621 + 10.680858804705615 %i,
+--R      - 11.514028775601707 - 1.8855118096468773 %i,
+--R      5.1086246344311803E-11 + 12.566370614352492 %i,
+--R      - 11.514028775550621 + 10.680858804705615 %i,
+--R      - 11.514028775601707 + 10.680858804712296 %i,
+--R      5.1086246344311803E-11 - 6.680878072984342E-12 %i,
+--R      5.1379345222812844E-11 - 6.3860028376439004E-12 %i]
+--R     ,
+--R
+--R     [1. + 8.6999999999999993 %i, - 11.665327997081 + 10.896725708177 %i,
+--R      - 11.665327997028827 + 10.89672570816688 %i,
+--R      - 11.665327997080658 - 1.6696449061826013 %i,
+--R      5.1830539860020508E-11 + 12.566370614349481 %i,
+--R      - 11.665327997028827 + 10.89672570816688 %i,
+--R      - 11.665327997080658 + 10.896725708176572 %i,
+--R      5.1830539860020508E-11 - 9.6918029157677665E-12 %i,
+--R      5.2173376730024756E-11 - 1.0119904914063227E-11 %i]
+--R     ,
+--R
+--R     [1. + 8.8000000000000007 %i, - 11.816693281848 + 11.113739524156999 %i,
+--R      - 11.816693281795935 + 11.113739524144647 %i,
+--R      - 11.816693281848337 - 1.452631090201765 %i,
+--R      5.2402526762307389E-11 + 12.566370614346411 %i,
+--R      - 11.816693281795935 + 11.113739524144647 %i,
+--R      - 11.816693281848337 + 11.113739524157408 %i,
+--R      5.2402526762307389E-11 - 1.2761347534251399E-11 %i,
+--R      5.2065018962821341E-11 - 1.2352785461189342E-11 %i]
+--R     ,
+--R
+--R     [1. + 8.9000000000000004 %i, - 11.968123136900999 + 11.331887275852999 %i,
+--R      - 11.968123136848055 + 11.331887275837042 %i,
+--R      - 11.968123136900861 - 1.2344833385062608 %i,
+--R      5.2805759764851246E-11 + 12.566370614343302 %i,
+--R      - 11.968123136848055 + 11.331887275837042 %i,
+--R      - 11.968123136900861 + 11.331887275852912 %i,
+--R      5.2805759764851246E-11 - 1.5869972003201838E-11 %i,
+--R      5.2944315598324465E-11 - 1.595701348833245E-11 %i]
+--R     ,
+--R
+--R     [1. + 9. %i, - 12.119616119281 + 11.551156276202001 %i,
+--R      - 12.119616119228253 + 11.551156276183157 %i,
+--R      - 12.119616119281286 - 1.0152143381569982 %i,
+--R      5.3033133440294478E-11 + 12.566370614340155 %i,
+--R      - 12.119616119228253 + 11.551156276183157 %i,
+--R      - 12.119616119281286 + 11.551156276202175 %i,
+--R      5.3033133440294478E-11 - 1.9017676322619081E-11 %i,
+--R      5.2747139989151037E-11 - 1.8843593352357857E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.0999999999999996 %i, - 12.271170833867 + 11.771534118309001 %i,
+--R      - 12.271170833814395 + 11.77153411828726 %i,
+--R      - 12.271170833867483 - 0.79483649604973161 %i,
+--R      5.3088200502315885E-11 + 12.566370614336991 %i,
+--R      - 12.271170833814395 + 11.77153411828726 %i,
+--R      - 12.271170833867483 + 11.771534118309441 %i,
+--R      5.3088200502315885E-11 - 2.2181367853590928E-11 %i,
+--R      5.2605031441999017E-11 - 2.1740831357419665E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.1999999999999993 %i, - 12.422785931281 + 11.993008666285 %i,
+--R      - 12.422785931227907 + 11.993008666259376 %i,
+--R      - 12.422785931280877 - 0.5733619480744393 %i,
+--R      5.2970960950915469E-11 + 12.566370614333815 %i,
+--R      - 12.422785931227907 + 11.993008666259376 %i,
+--R      - 12.422785931280877 + 11.993008666284734 %i,
+--R      5.2970960950915469E-11 - 2.5357493882438575E-11 %i,
+--R      5.3093529572834086E-11 - 2.5623947408348613E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.3000000000000007 %i, - 12.574460105908001 + 12.215568046479 %i,
+--R      - 12.574460105855573 + 12.215568046450077 %i,
+--R      - 12.574460105908262 - 0.35080256788055886 %i,
+--R      5.2688520213450829E-11 + 12.566370614330635 %i,
+--R      - 12.574460105855573 + 12.215568046450077 %i,
+--R      - 12.574460105908262 + 12.215568046478614 %i,
+--R      5.2688520213450829E-11 - 2.8537172624965024E-11 %i,
+--R      5.2427395758058992E-11 - 2.8922642059114878E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.4000000000000004 %i, - 12.726192094029001 + 12.43920063909 %i,
+--R      - 12.726192093977144 + 12.43920063905834 %i,
+--R      - 12.726192094029377 - 0.12716997526913024 %i,
+--R      5.2233772862564365E-11 + 12.56637061432747 %i,
+--R      - 12.726192093977144 + 12.43920063905834 %i,
+--R      - 12.726192094029377 + 12.439200639090043 %i,
+--R      5.2233772862564365E-11 - 3.170264051277627E-11 %i,
+--R      5.1857185212611512E-11 - 3.1660007948630664E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.5 %i, - 12.877980672044 + 12.663895070128 %i,
+--R      - 12.877980671991985 + 12.663895070093062 %i,
+--R      - 12.877980672043599 + 9.7524455768741289E-2 %i,
+--R      5.1613824325613678E-11 + 12.56637061432432 %i,
+--R      - 12.877980671991985 + 12.663895070093062 %i,
+--R      - 12.877980672043599 + 12.663895070127914 %i,
+--R      5.1613824325613678E-11 - 3.4852121189032914E-11 %i,
+--R      5.2015280971318134E-11 - 3.4937386317324126E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.5999999999999996 %i, - 13.029824654789 + 12.889640203708 %i,
+--R      - 13.029824654738606 + 12.889640203669721 %i,
+--R      - 13.02982465478944 + 0.32326958934851951 %i,
+--R      5.0834003673116968E-11 + 12.566370614321201 %i,
+--R      - 13.029824654738606 + 12.889640203669721 %i,
+--R      - 13.02982465478944 + 12.889640203707692 %i,
+--R      5.0834003673116968E-11 - 3.7971403799019754E-11 %i,
+--R      5.0393467176945705E-11 - 3.8278713532235997E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.6999999999999993 %i, - 13.181722893950999 + 13.116425134666001 %i,
+--R      - 13.181722893901259 + 13.116425134624947 %i,
+--R      - 13.181722893951155 + 0.55005452030683832 %i,
+--R      4.9896087261913635E-11 + 12.566370614318108 %i,
+--R      - 13.181722893901259 + 13.116425134624947 %i,
+--R      - 13.181722893951155 + 13.116425134666011 %i,
+--R      4.9896087261913635E-11 - 4.106404105641559E-11 %i,
+--R      4.9739767860046413E-11 - 4.1053382915379188E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.8000000000000007 %i, - 13.333674276547001 + 13.344239181477 %i,
+--R      - 13.33367427649825 + 13.344239181432879 %i,
+--R      - 13.333674276547052 + 0.77786856711780805 %i,
+--R      4.8801851448843081E-11 + 12.566370614315071 %i,
+--R      - 13.33367427649825 + 13.344239181432879 %i,
+--R      - 13.333674276547052 + 13.344239181476981 %i,
+--R      4.8801851448843081E-11 - 4.4101611251790018E-11 %i,
+--R      4.8750337100500474E-11 - 4.4121151177023421E-11 %i]
+--R     ,
+--R
+--R     [1. + 9.9000000000000004 %i, - 13.485677723495 + 13.573071879455 %i,
+--R      - 13.485677723446969 + 13.573071879407928 %i,
+--R      - 13.485677723494533 + 1.0067012650958465 %i,
+--R      4.7563730731781106E-11 + 12.566370614312081 %i,
+--R      - 13.485677723446969 + 13.573071879407928 %i,
+--R      - 13.485677723494533 + 13.57307187945502 %i,
+--R      4.7563730731781106E-11 - 4.709121981250064E-11 %i,
+--R      4.8030912580543372E-11 - 4.7071679887267237E-11 %i]
+--R     ,
+--R
+--R     [1. + 10. %i, - 13.637732188247 + 13.802912974230001 %i,
+--R      - 13.637732188201092 + 13.802912974179876 %i,
+--R      - 13.637732188247268 + 1.2365423598707301 %i,
+--R      4.6176396040209511E-11 + 12.566370614309145 %i,
+--R      - 13.637732188201092 + 13.802912974179876 %i,
+--R      - 13.637732188247268 + 13.802912974229903 %i,
+--R      4.6176396040209511E-11 - 5.0027537668029254E-11 %i,
+--R      4.5908166157460073E-11 - 5.0125237294196268E-11 %i]
+--R     ]
+--R                                          Type: List List Complex DoubleFloat
+--E 12
 )spool 
 )lisp (bye)
  
\start
Date: Fri, 22 Feb 2008 00:14:49 -0600
From: Tim Daly
To: Arthur Ralfs
Subject: mathML bug? (bug 7113)

-> x:=104348/33215

   104348
   ------
    33215

-> factor(numer x)/factor(denom x)

   2
  2 19 1373
  ---------
  5 7 13 73

but mathML output shows:

   2
  2 191373
  ---------
   571373

\start
Date: Thu, 21 Feb 2008 23:58:42 -0800
From: Arthur Ralfs
To: Tim Daly
Subject: Re: mathML bug? (bug 7113)

root wrote:
>> -> x:=104348/33215
>>
>>    104348
>>    ------
>>     33215
>>
>> -> factor(numer x)/factor(denom x)
>>
>>    2
>>   2 19 1373
>>   ---------
>>   5 7 13 73
>>
>> but mathML output shows:
>>
>>    2
>>   2 191373
>>   ---------
>>    571373
>>     
>
> The mathML lacks spaces so the factored form of the numerator
> and denominator look like random integers. The spaces need to
> be preserved in a factored object. So I'd expect the output
> to look like the algebra output.
>
> Tim
>
>   
I forgot to CC the list on my last email.

What I am wondering is if a space to denote multiplication is
best or would it be better,say, to put parentheses around the
factors.  Adding the space would be easiest since at present
the multiplication is denoted by the "InvisibleTimes" entity:
&#x02062; which could easily be changed to a space.

\start
Date: Fri, 22 Feb 2008 12:36:52 -0500
From: Tim Daly
To: Arthur Ralfs
Subject: Re: mathML bug? (bug 7113)

>>> -> x:=104348/33215
>>>
>>>    104348
>>>    ------
>>>     33215
>>>
>>> -> factor(numer x)/factor(denom x)
>>>
>>>    2
>>>   2 19 1373
>>>   ---------
>>>   5 7 13 73
>>>
>>> but mathML output shows:
>>>
>>>    2
>>>   2 191373
>>>   ---------
>>>    571373
>>>     
>>
>> The mathML lacks spaces so the factored form of the numerator
>> and denominator look like random integers. The spaces need to
>> be preserved in a factored object. So I'd expect the output
>> to look like the algebra output.
>>
>> Tim
>>
>>   
>I forgot to CC the list on my last email.
>
>What I am wondering is if a space to denote multiplication is
>best or would it be better,say, to put parentheses around the
>factors.  Adding the space would be easiest since at present
>the multiplication is denoted by the "InvisibleTimes" entity:
>&#x02062; which could easily be changed to a space.

I'd replace the InvisibleTimes character code to space to 
conform to the algebra output.

\start
Date: Fri, 22 Feb 2008 14:54:16 -0600
From: Tim Daly
To: list
Subject: 20080222.02.tpd.patch (add additional hyperdoc	page translations)

Fill out more of the page tree in the hyperdoc -> html translations

=======================================================================
diff --git a/changelog b/changelog
index c7ce080..77cfac3 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080222 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080222 tpd src/input/gamma.input 7099 logGamma vs log(Gamma) 
 20080221 wxh src/interp/sfsfun.boot increase precision of PI (236)
 20080221 tpd src/input/gamma.input investigate complex gamma issues
diff --git a/src/hyper/bookvol11.pamphlet b/src/hyper/bookvol11.pamphlet
index b9f36fc..1bfc01b 100644
--- a/src/hyper/bookvol11.pamphlet
+++ b/src/hyper/bookvol11.pamphlet
@@ -567,6 +567,7 @@ PAGES=rootpage.xhtml \
             dbopmonicdivide.xhtml \
             dbopmulmod.xhtml \
             dbopncols.xhtml \
+            dbopnegativeq.xhtml \
             dbopnew.xhtml \
             dbopnextprime.xhtml \
             dbopnorm.xhtml \
@@ -589,6 +590,7 @@ PAGES=rootpage.xhtml \
             dboppi.xhtml \
             dbopplus.xhtml \
             dboppolygamma.xhtml \
+            dboppositiveq.xhtml \
             dboppositiveremainder.xhtml \
             dbopprefixragits.xhtml \
             dbopprevprime.xhtml \
@@ -9254,6 +9256,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dbopnegativeq.xhtml}
+<<dbopnegativeq.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dbopnegativeq not implemented
+<<page foot>>
+@
+
 \subsection{dbopnew.xhtml}
 <<dbopnew.xhtml>>=
 <<standard head>>
@@ -9474,6 +9486,16 @@ the operations will have extra ones added at some stage.
 <<page foot>>
 @
 
+\subsection{dboppositiveq.xhtml}
+<<dboppositiveq.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+      dboppositiveq not implemented
+<<page foot>>
+@
+
 \subsection{dboppositiveremainder.xhtml}
 <<dboppositiveremainder.xhtml>>=
 <<standard head>>
@@ -38401,20 +38423,215 @@ to display the full list of operations defined by
 \subsection{numquotientfields.xhtml}
 <<numquotientfields.xhtml>>=
 <<standard head>>
+  <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+  </script>
  </head>
  <body>
 <<page head>>
-      numquotientfields not implemented
+The <a href="db.xhtml?Fraction">Fraction</a> domain implements quotients.
+The elements must belong to a domain of category 
+<a href="db.xhtml?IntegralDomain">IntegralDomain</a>: multiplication 
+must be commutative and the product of two non-zero elements must not be
+zero. This allows you to make fractions of most things you would think of,
+but don't expect to create a fraction of two matrices. The abbreviation for
+<a href="db.xhtml?Fraction">Fraction</a> is
+<a href="db.xhtml?Fraction">FRAC</a>.
+
+Use <a href="dbopdivide.xhtml">/</a> to create a fraction.
+<ul>
+ <li>
+  <input type="submit" id="p1" class="subbut" 
+    onclick="makeRequest('p1');"
+    value="a:=11/12" />
+  <div id="ansp1"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p2" class="subbut" 
+    onclick="makeRequest('p2');"
+    value="b:=23/24" />
+  <div id="ansp2"><div></div></div>
+ </li>
+</ul>
+The standard arithmetic operations are available.
+<ul>
+ <li>
+  <input type="submit" id="p3" class="subbut" 
+    onclick="handleFree(['p1','p2','p3']);"
+    value="3-a*b^2+a+b/a" />
+  <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+Extract the numerator and denominator by using 
+<a href="dbopnumer.xhtml">numer</a> and <a href="dbopdenom.xhtml">denom</a>,
+respectively.
+<ul>
+ <li>
+  <input type="submit" id="p4" class="subbut" 
+    onclick="handleFree(['p1','p4']);"
+    value="numer(a)" />
+  <div id="ansp4"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p5" class="subbut" 
+    onclick="handleFree(['p2','p5']);"
+    value="denom(b)" />
+  <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+Operations like 
+<a href="dbopmax.xhtml">max</a>, <a href="dbopmin.xhtml">min</a>,
+<a href="dbopnegativeq.xhtml">negative?</a>,
+<a href="dboppositiveq.xhtml">positive?</a>, and
+<a href="dbopzeroq.xhtml">zero?</a> are all available if they are
+provided for the numerators and denominators. See
+<a href="numintegers.xhtml?Integer">Integer</a> for examples.
+
+Don't expect a useful answer from 
+<a href="dbopfactor.xhtml">factor</a>,
+<a href="dbopgcd.xhtml">gcd</a>, or
+<a href="dboplcm.xhtml">lcm</a> if you apply them to fractions.
+<ul>
+ <li>
+  <input type="submit" id="p6" class="subbut" 
+    onclick="makeRequest('p6');"
+    value="r:=(x^2+2*x+1)/(x^2-2*x+1)" />
+  <div id="ansp6"><div></div></div>
+ </li>
+</ul>
+Since all non-zero fractions are invertible, these operations have
+trivial definitions.
+<ul>
+ <li>
+  <input type="submit" id="p7" class="subbut" 
+    onclick="handleFree(['p6','p7']);"
+    value="factor(r)" />
+  <div id="ansp7"><div></div></div>
+ </li>
+</ul>
+Use <a href="dbopmap.xhtml">map</a> to apply 
+<a href="dbopfactor.xhtml">factor</a> to the numerator and denominator,
+which is probably what you mean.
+<ul>
+ <li>
+  <input type="submit" id="p8" class="subbut" 
+    onclick="handleFree(['p6','p8']);"
+    value="map(factor,r)" />
+  <div id="ansp8"><div></div></div>
+ </li>
+</ul>
+
+Other forms of fractions are available, Use
+<a href="dbopcontinuedfraction.xhtml">continuedFraction</a>
+to create a continued fraction.
+<ul>
+ <li>
+  <input type="submit" id="p9" class="subbut" 
+    onclick="makeRequest('p9');"
+    value="continuedFraction(7/12)" />
+  <div id="ansp9"><div></div></div>
+ </li>
+</ul>
+Use <a href="dboppartialfraction.xhtml">partialFraction</a> to create a
+partial fraction. 
+See <a href="numcontinuedfractions.xhtml">continuedFraction</a>
+and <a href="numpartialfractions.xhtml">PartialFraction</a> for
+additional information and examples.
+<ul>
+ <li>
+  <input type="submit" id="p10" class="subbut" 
+    onclick="makeRequest('p10');"
+    value="partialFraction(7,12)" />
+  <div id="ansp10"><div></div></div>
+ </li>
+</ul>
+Use conversion to create alternative views of fractions with objects
+moved in and out of the numerator and denominator.
+<ul>
+ <li>
+  <input type="submit" id="p11" class="subbut" 
+    onclick="makeRequest('p11');"
+    value="g:=2/3+4/5*%i" />
+  <div id="ansp11"><div></div></div>
+ </li>
+</ul>
+Conversion is discussed in detail in 
+<a href="axbook/section-2.7.xhtml">Conversion</a>.
+<ul>
+ <li>
+  <input type="submit" id="p12" class="subbut" 
+    onclick="handleFree(['p11','p12']);"
+    value="g::FRAC COMPLEX INT" />
+  <div id="ansp12"><div></div></div>
+ </li>
+</ul>
 <<page foot>>
 @
 
 \subsection{numrationalnumbers.xhtml}
 <<numrationalnumbers.xhtml>>=
 <<standard head>>
+  <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+  </script>
  </head>
  <body>
 <<page head>>
-      numrationalnumbers not implemented
+Like integers, rational numbers can be arbitrarily large. For example:
+<ul>
+ <li>
+  <input type="submit" id="p1" class="subbut" 
+    onclick="makeRequest('p1');"
+    value="61657^10/999983^12" />
+  <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+Rational numbers will not be converted to decimals unless you explicitly
+ask Axiom to do so. To convert a rational number to a decimal, use the
+function <a href="dbopnumeric.xhtml">numeric</a>. Here's an example:
+<ul>
+ <li>
+  <input type="submit" id="p2" class="subbut" 
+    onclick="makeRequest('p2');"
+    value="x:=104348/33215" />
+  <div id="ansp2"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p3" class="subbut" 
+    onclick="handleFree(['p2','p3']);"
+    value="numeric x" />
+  <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+You can find the numerator and denominator of rational numbers using the
+functions <a href="dbopnumer.xhtml">numer</a> and
+<a href="dbopdenom.xhtml">denom</a>, respectively.
+<ul>
+ <li>
+  <input type="submit" id="p4" class="subbut" 
+    onclick="handleFree(['p2','p4']);"
+    value="numer(x)" />
+  <div id="ansp4"><div></div></div>
+ </li>
+ <li>
+  <input type="submit" id="p5" class="subbut" 
+    onclick="handleFree(['p2','p5']);"
+    value="denom(x)" />
+  <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+To factor the numerator and denominator of a fraction, use the following
+command:
+<ul>
+ <li>
+  <input type="submit" id="p6" class="subbut" 
+    onclick="handleFree(['p2','p6']);"
+    value="factor(numer x)/factor(denom x)" />
+  <div id="ansp6"><div></div></div>
+ </li>
+</ul>
 <<page foot>>
 @
 
\start
Date: Fri, 22 Feb 2008 15:13:24 -0600
From: Tim Daly
To: Matt Kaufmann, J Moore
Subject: ACL2/Axiom recommendation

Matt and J,

I've been looking at ACL2 in order to look at proving Axiom programs correct. 

Besides the proof mechanism, ACL2 has the desirable property that it
can co-exist with Axiom in the same image and thus have direct access
to internal Axiom data structures. The idea would be to decorate domains
with theorems and look at automatically propagating the theorems,
bringing theorems in and out of scope, based on the hierarchy.

I'm undecided what the most productive area might be to concentrate upon.
Perhaps you can make a suggestion.

Data Structure -- this might be useful because there is a large body
of literature about the issue of proving sorting correct.

Rational Arithmetic -- this has properties that fit in areas that ACL2
already knows, such as the properties of abs().

Special Functions -- this has properties of manipulation of floating point
values which ACL2 has already explored.

Finite Fields -- this might be easier due to the limits of the size and
number of elements under consideration.

Given your experience can you give me some high level advice and 
potential pointers to previous work?

\start
Date: Fri, 22 Feb 2008 17:36:36 -0600
From: Matt Kaufmann
To: Tim Daly
Subject: Re: ACL2/Axiom recommendation
Cc: J Moore

Hi, Tim --

Cool!  Sure, I can imagine reasoning about data structures and
rational arithmetic of Axiom.

I don't know what "Special Functions" means, but since you mention
floating point I should say that reasoning about floating point
operations can be tricky -- much trickier in general, I'd say, than
rational operations.  That's because rationals are a primitive data
type in ACL2, but floating point operations need to be implemented in
terms of bit-level and rational operations (grab exponent, mantissa
and sign fields; then do stuff to the corresponding rationals; then
transform back to floating point).  You're right that there's been
work on floating point -- see directory books/rtl/rel7/lib/ that comes
with ACL2 -- but still, that's relatively complex stuff I'd say.

Finite fields would be a cool application, but I don't know of
existing work, so you'd probably be building specifications and
theorems from the ground up.  You could query the acl2 or acl2-help
list in case someone knows of work with ACL2 in finite fields.  But
the limits you mention make me wonder if a tool based more directly on
decision procedures might be more appropriate -- where ACL2 could
shine is in proving general properties, rather than using "brute
force" to check properties of a particular finite field's addition and
multiplication tables.

I'm pretty bad at knowing about (or remembering) previous work, but
you could try the "SEARCH" link that's near the top of the ACL2 home
page, or query the mailing list(s) as mentioned above.

I hope this helps.  If you haven't used ACL2, you might want to look
at some introductory materials such as:

- The "Tours", "demos", and "Hyper-Card" links on the home page
- The topic ACL2-TUTORIAL in the user's manual
- The ACL2 books, especially "Computer-Aided Reasoning: An Approach"
  (see
  http://www.cs.utexas.edu/users/moore/publications/acl2-papers.html#Books)
- The introductory and tutorial stuff at
  http://www.cs.utexas.edu/users/moore/publications/how-to-prove-thms/index.html

-- Matt
   From: Tim Daly
   Date: Fri, 22 Feb 2008 15:13:24 -0600
   Cc: Tim Daly, list
   X-SpamAssassin-Status: No, hits=-2.6 required=5.0
   X-UTCS-Spam-Status: No, hits=-82 required=165

   Matt and J,

   I've been looking at ACL2 in order to look at proving Axiom programs correct. 

   Besides the proof mechanism, ACL2 has the desirable property that it
   can co-exist with Axiom in the same image and thus have direct access
   to internal Axiom data structures. The idea would be to decorate domains
   with theorems and look at automatically propagating the theorems,
   bringing theorems in and out of scope, based on the hierarchy.

   I'm undecided what the most productive area might be to concentrate upon.
   Perhaps you can make a suggestion.

   Data Structure -- this might be useful because there is a large body
   of literature about the issue of proving sorting correct.

   Rational Arithmetic -- this has properties that fit in areas that ACL2
   already knows, such as the properties of abs().

   Special Functions -- this has properties of manipulation of floating point
   values which ACL2 has already explored.

   Finite Fields -- this might be easier due to the limits of the size and
   number of elements under consideration.

   Given your experience can you give me some high level advice and 
   potential pointers to previous work?

\start
Date: Fri, 22 Feb 2008 19:14:33 -0600
From: Tim Daly
To: list
Subject: 20080222.03.tpd.patch (move hyperdoc bitmaps location)

=========================================================================
diff --git a/changelog b/changelog
index 77cfac3..78b70dc 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080222 tpd src/Makefile move hyperdoc bitmaps location
+20080222 tpd src/hyper/Makefile move hyperdoc bitmaps location
 20080222 tpd src/hyper/bookvol11 add additional hyperdoc page translations
 20080222 tpd src/input/gamma.input 7099 logGamma vs log(Gamma) 
 20080221 wxh src/interp/sfsfun.boot increase precision of PI (236)
diff --git a/src/Makefile.pamphlet b/src/Makefile.pamphlet
index 2039ca0..eab651f 100644
--- a/src/Makefile.pamphlet
+++ b/src/Makefile.pamphlet
@@ -151,7 +151,8 @@ hyperdir: ${SRC}/hyper/Makefile
 	@mkdir -p ${OBJ}/${SYS}/hyper
 	@mkdir -p ${OBJ}/${SYS}/bin
 	@mkdir -p ${OBJ}/${SYS}/lib
-	@mkdir -p ${MNT}/${SYS}/doc/hypertex/pages/bitmaps
+	@mkdir -p ${MNT}/${SYS}/doc/hypertex/bitmaps
+	@mkdir -p ${MNT}/${SYS}/doc/hypertex/pages
 	@mkdir -p ${MNT}/${SYS}/doc/src/hyper
 	@(cd hyper ; ${ENV} ${MAKE} )
 
diff --git a/src/hyper/Makefile.pamphlet b/src/hyper/Makefile.pamphlet
index 493fbb4..db88d1a 100644
--- a/src/hyper/Makefile.pamphlet
+++ b/src/hyper/Makefile.pamphlet
@@ -40,7 +40,7 @@ HYPER=${MNT}/${SYS}/doc/hypertex
 PAGES=${HYPER}/pages
 
 # this is where the hyperdoc bitmaps
-BMAPS=${PAGES}/bitmaps
+BMAPS=${HYPER}/bitmaps
 
 CFLAGS=	${CCF} -I${MID}
 LDFLAGS= -L${LIB} -lspad ${LDF}
@@ -1193,6 +1193,7 @@ all: ${INCLUDES} ${BITMAPS} ${OBJS} ${SCRIPTS} ${BINFILES} \
      ${PAGES}/ht.db ${DOCFILES} ${HYPER}/rootpage.xhtml \
      ${HYPER}/axbook ${MNT}/${SYS}/doc/bookvol11.dvi \
      ${HYPER}/bigbayou.png ${HYPER}/doctitle.png
+	@cp ${IN}/bitmaps/* ${HYPER}/bitmaps
 	@ echo 155 finished ${IN}
 
 clean:

\start
Date: Sat, 23 Feb 2008 15:30:27 -0600
From: Tim Daly
To: Matt Kaufmann, J Moore
Subject: ACL2/Axiom recommendations

It seems that BDDs have been studied rather extensively in ACL2.

I think the most productive approach might be to implement a BDD
domain in Axiom and then applying ACL2 to the new domain. This will
have the effect of bring Axiom "closer" to ACL2 and minimizing the
learning distance for getting questions answered, as well as the
distance to getting an effective first proof.

I've found several BDD libraries. Is there one you use and prefer?

\start
Date: Sat, 23 Feb 2008 20:23:54 -0600
From: Matt Kaufmann
To: Tim Daly
Subject: Re: ACL2/Axiom recommendations
Cc: J Moore

Hi, Tim --

Here are a couple of questions that would help me better understand
your goals.

- Why does you want to do something with BDDs if it's about "learning
  distance", rather than, say, something simpler?  For example, you
  could build a simple library about trees (write a function counting
  the number of nodes, define substitution and prove a theorem about
  how that affects the number of nodes, define a "mirror" reflecting
  function and prove that it preserves the bag of leaves, etc.).

- By "several BDD libraries" do you mean ACL2 libraries, or do you
  imagine recoding CUDD or such?  (The former makes more sense to me,
  but you might have something in mind that I'm missing.)

I think it would be particularly cool if there were ACL2-verified
applicative Lisp routines inside Axiom.  I think that's your ultimate
goal; am I right?

But I think your shorter-term goal is to learn to use ACL2 effectively
(excellent idea before getting in too deep).  In that case, I strongly
suggest that you spend time with "Recursion and Induction" and/or "How
to Prove Theorems Formally".  You can find links to these on the
"About ACL2" page of introductory and tutorial stuff at:

http://www.cs.utexas.edu/users/moore/publications/how-to-prove-thms/index.html

You can skip over the easy parts and work a few exercises.  The
second, in particular, has a lot of hints on how to use the mechanical
theorem prover effectively.

-- Matt
   From: Tim Daly
   Date: Sat, 23 Feb 2008 15:30:27 -0600
   Cc: Tim Daly, list
   X-SpamAssassin-Status: No, hits=-2.6 required=5.0
   X-UTCS-Spam-Status: No, hits=-82 required=165

   It seems that BDDs have been studied rather extensively in ACL2.

   I think the most productive approach might be to implement a BDD
   domain in Axiom and then applying ACL2 to the new domain. This will
   have the effect of bring Axiom "closer" to ACL2 and minimizing the
   learning distance for getting questions answered, as well as the
   distance to getting an effective first proof.

   I've found several BDD libraries. Is there one you use and prefer?

\start
Date: Sat, 23 Feb 2008 19:01:38 -0600
From: J Moore
To: Matt Kaufmann
Subject: Re: ACL2/Axiom recommendation

Hi Tim.  I don't have anything to add to Matt's
excellent response.  I too took note of the bogus
thought that ACL2 might do well with finite
fields.  The only way I can imagine ACL2 being
especially useful there is if you characterized
arbitrary finite fields of some parameterized
size.  Particular finite bounds, e.g., 271, don't
particularly help ACL2 unless it can just grind
out all the cases by evaluation.

\start
Date: Sun, 24 Feb 2008 00:06:27 -0500
From: Tim Daly
To: Matt Kaufmann
Subject: Re: ACL2/Axiom recommendations
Cc: J Moore

Well, the goal is clearly in the "research" category since there is no
clear roadmap for how to proceed in detail. I have been working my way
through the tutorials you suggested. I suspect that will take me a
while. I did use an early version of the Boyer-Moore work while at IBM
Research but that was years ago, on a different project.



The goal is to be able to prove Axiom's mathematical algorithms.
Axiom algorithms, for the most part, are written in a language
called Spad which lives above and apart from lisp. However, the
Spad code compiles directly to lisp code.

Since ACL2 knows nothing about Spad code directly we need to
understand how to span the gap, especially to span the gap in some
categorically useful way. This involves quite a few sub-puzzles, so to
speak. Ideally there is a useful example that does not go beyond what
ACL2 already knows. Thus, building "toy" categories and domains that
compile to specific code to fit the research question would minimize
the gap.



BDD forms are interesting since ACL2 seems to know how to reason about
them.  The exponential form of the BDD diagram is basically just a
fully developed tree structure which is a direct mapping of the domain
of the function to its range. If we ignore the shared version and just
look at the ordered BDD version it appears that there is a
straightforward way to define the "equals" function which would just
be a node-by-node compare of canonical forms. It seems one could prove
that the "equals" function was symmetric, reflexive, and transitive in
an automated way.

The same could be said of any of the "equals" functions in
Axiom, particularly in the tree domains. The caveat is that the
current domains were not developed with the idea of proofs in mind.

If Axiom had the theorems "attached" to the Spad code and ACL2 lived
under Axiom in the lisp layer, we could automate the proof of (small)
blocks of code.

Of course, there is the mundane issue of how to "attach" theorems
to categories and domains in effective ways, both from the ACL2
and Axiom viewpoints. This will likely involve hacking the Spad
compiler and interpreter.




Thinking in the longer term, though, the game is to figure out how to
really integrate ACL2 into an Axiom environment. Axiom is based on
category theory. Ideally we can control the theorems that are "in
scope" by attaching them to the category hierarchy.  That way it
should be possible to handle domains where functions like
multiplication are non-commutative. The hierarchically inherited
theorems for a commutative domain would differ from the hierarchically
inherited theorems for a non-commutative domain.

In Axiom, a domain can override the definition of categorically
defined functions (e.g. equals). It would be interesting to know if we
could prove that the newly created equals function really was an
equivalence relation, based on the categorical theorems inherited by
the domain.



In the really long term (30 year horizon version), the goal is to 
be able to prove the programs correct rather than test them. So 
the way we prove "equals" correct is more important than proving 
"equals" is correct in a particular instance.



Keeping your feedback in mind, there might be a good example of
"equals" already in the hierarchy which is both categorical and
domain defined. Provided the generated code is not too obscure
that could be a good place to start the struggle.

\start
Date: Wed, 27 Feb 2008 21:23:40 -0600
From: Tim Daly
To: list
Subject: GitHub Axiom gold mirror

As you know, Axiom silver is being maintained in a git repository.
Gold is avaiable in an arch repo, a cvs repo, and an svn repo.

Gold will now be available in a git repo on GitHub.

If you haven't upgraded to using git as your source code repository
I can't recommend it highly enough. It is a fantastic piece of software
that has changed the way I work. I can maintain 2 dozen branches 
locally, commit freely on each branch, and merge any completed work
back to the master branch trivially. This allows me to work on many
different problems in parallel so no single piece of work blocks
progress. Branching is cheap and easy.

In addition, I can commit to the master branch locally which means
that I can "close out and document" a piece of completed work without
being connected to the net. This allows me to "finish and move on".

These two features alone make git exceptionally useful. But wait, 
there's more! It has CVS/SVN "covers" so you don't have to change
the legacy command set you use, if you're in legacy-human mode.
And it is fast. Blindingly fast. Given a parallel change to git
and SVN (which I do all the time) I can do a git-push to the host
in the time it takes for SVN to print one of the dots in its row
of commit ......

Really, do yourself a favor and make the switch.




Axiom Gold will now be available on GitHub which is a new git hosting site.

The current checked-in version is silver, which is later than the 
January release. Future versions on this site will be updated for
each release of Axiom, planned for every other month.

This is a git repository. You can get a local cloned copy with:

git-clone git://github.com/daly/axiom.git




Silver, the bleeding edge of Axiom is on axiom-developer.org. 
(This git silver repository is mirrored into svn at sourceforge.net)

A copy of silver can be cloned from axiom-developer with:

git-clone ssh://git@axiom-developer.org/home/git/silver (linus)

\start
Date: Fri, 29 Feb 2008 10:27:21 +0100
From: Ralf Hemmecke
To: Martin Rubey
Subject: Re: [Axiom-mail] Setting elements in a matrix

On 02/29/2008 09:27 AM, Martin Rubey wrote:
 > make SQMATCAT inherit from MATCAT.

I am sure you don't want that.

We have

MatrixCategory(R,Row,Col): Category == Definition where
   R   : Ring
   Row : FiniteLinearAggregate R
   Col : FiniteLinearAggregate R

   Definition ==> TwoDimensionalArrayCategory(R,Row,Col) with
      ...
      coerce: Col -> %
      transpose: Row -> %
      horizConcat: (%,%) -> %
      vertConcat: (%,%) -> %
      ...

There are even more functions that allow the result to be a non-square 
matrix.

SquareMatrix *should not* inherit from MatrixCategory!!!

The better way would be to factor out a subcategory that doesn't change 
the structure of the matrix and let SquareMatrix and MatrixCategory 
inherit from that.

\start
Date: 29 Feb 2008 10:39:47 +0100
From: Martin Rubey
To: list
Subject: Re: Re: [Axiom-mail] Setting elements in a matrix

Ralf Hemmecke writes:

> On 02/29/2008 09:27 AM, Martin Rubey wrote:
>  > make SQMATCAT inherit from MATCAT.
> 
> I am sure you don't want that.

I'm not so sure...

> We have
> 
> MatrixCategory(R,Row,Col): Category == Definition where
>    R   : Ring
>    Row : FiniteLinearAggregate R
>    Col : FiniteLinearAggregate R
> 
>    Definition ==> TwoDimensionalArrayCategory(R,Row,Col) with
>       ...
>       coerce: Col -> %
>       transpose: Row -> %
>       horizConcat: (%,%) -> %
>       vertConcat: (%,%) -> %
>       ...
> 
> There are even more functions that allow the result to be a non-square 
> matrix.

I know that.  However, MatrixCategory also contains many functions that only
make sense for square matrices.

> The better way would be to factor out a subcategory that doesn't change the
> structure of the matrix and let SquareMatrix and MatrixCategory inherit from
> that.

This is probably a good possibility, I'll look into it.  The other one is to
throw errors when dimensions do not fit, which is the current approach.  One
problem is the "categorical" definition of multiplication of rectangular
matrices - what should it's signature be?  For me, it's fine to have
multiplication in MatrixCategory...  In Aldor it might be possible to do
better, but not in SPAD:

(M: RectangularMatrix(n, m, R)) * (N: RectangularMatrix(m, k, R)) -> RectangularMatrix(n, k, R)

To be honest, I doubt that this would be very useful.

\start
Date: 29 Feb 2008 15:07:54 +0100
From: Francois Maltey
To: Martin Rubey
Subject: Re: [Axiom-mail] Setting elements in a matrix

Dear Martin and Ralf,

> In Aldor it might be possible to do
> better, but not in SPAD:
> 
>    (M: RectangularMatrix(n, m, R)) * (N: RectangularMatrix(m, k, R)) 
> -> RectangularMatrix(n, k, R)
> 
> To be honest, I doubt that this would be very useful.

If this signature is too subtle for axiom, 
then bad size matrix must produce an error, 
and per homogeneity, all other mismatchs over dimensions 
must also produce an error.

But... type must remain fine in order to verify as easily as possible 
the Cayley-Hamilto theorem.

\start
Date: Fri, 29 Feb 2008 10:24:15 -0500
From: Bill Page
To: list
Subject: Re: Re: [Axiom-mail] Setting elements in a matrix

On 2/29/08, Ralf Hemmecke wrote:
>
>  On 02/29/2008 09:27 AM, Martin Rubey wrote:
>   > make SQMATCAT inherit from MATCAT.
>
>
> I am sure you don't want that.
>
>  We have
>
>  MatrixCategory(R,Row,Col): Category == Definition where
>    R   : Ring
>    Row : FiniteLinearAggregate R
>    Col : FiniteLinearAggregate R
>
>    Definition ==> TwoDimensionalArrayCategory(R,Row,Col) with
>       ...
>       coerce: Col -> %
>       transpose: Row -> %
>       horizConcat: (%,%) -> %
>       vertConcat: (%,%) -> %
>       ...
> There are even more functions that allow the result to be a
> non-square matrix.

Perhaps I am missing something but I do not understand why you think
that if MatrixCategory is used in the definition of SquareMatrix that
these operations would result in a non-square matrix.

% means "this *domain* ", not "this category".

>
>  SquareMatrix *should not* inherit from MatrixCategory!!!
>

That does not make any sense. Surely a SquareMatrix (no matter exactly
whatever that is) is a sub-type of MatrixCategory (whatever that is).
So it makes perfectly good sense for SquareMatrix to be a sub-category
of MatrixCategory category.

> The better way would be to factor out a subcategory that doesn't
> change the structure of the matrix and let SquareMatrix and
> MatrixCategory inherit from that.
>

I do not see any structure of SquareMatrix that is in conflict with
MatrixCategory. SquareMatrix is just something that has more
structure, i.e. it has some more operations and some of the inherited
operations become degenerate (since nrows=ncols). It seems to me that
this is quite normal in the Axiom library.

Regards,
Bill Page.



