texlive[61283] Master/texmf-dist: numerica (12dec21)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 12 23:29:10 CET 2021


Revision: 61283
          http://tug.org/svn/texlive?view=revision&revision=61283
Author:   karl
Date:     2021-12-12 23:29:10 +0100 (Sun, 12 Dec 2021)
Log Message:
-----------
numerica (12dec21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/numerica/README.txt
    trunk/Master/texmf-dist/tex/latex/numerica/numerica.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/numerica/numerica.pdf
    trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/numerica/numerica-basics.pdf
    trunk/Master/texmf-dist/doc/latex/numerica/numerica-basics.tex
    trunk/Master/texmf-dist/doc/latex/numerica/numerica-plus.pdf
    trunk/Master/texmf-dist/doc/latex/numerica/numerica-plus.tex
    trunk/Master/texmf-dist/doc/latex/numerica/numerica-tables.pdf
    trunk/Master/texmf-dist/doc/latex/numerica/numerica-tables.tex
    trunk/Master/texmf-dist/tex/latex/numerica/numerica-lyx.def
    trunk/Master/texmf-dist/tex/latex/numerica/numerica-plus.def
    trunk/Master/texmf-dist/tex/latex/numerica/numerica-tables.def

Modified: trunk/Master/texmf-dist/doc/latex/numerica/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/numerica/README.txt	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/doc/latex/numerica/README.txt	2021-12-12 22:29:10 UTC (rev 61283)
@@ -1,7 +1,7 @@
 numerica: a package to numerically evaluate mathematical 
-expressions in the LaTeX form in which they are typeset.
+          expressions in their LaTeX form.
 
-Andrew Parsloe (ajparsloe at gmail.com) 05 February 2021
+Andrew Parsloe (ajparsloe at gmail.com)
 
 This work may be distributed and/or modified under the conditions
 of the LaTeX Project Public License, either version 1.3c of this 
@@ -10,26 +10,18 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-This is version 1.0.0 of the numerica bundle
-The LaTeX3 bundles l3kernel and l3packages 
-are required; also amsmath and mathtools. 
+This is version 2.0.0 of the numerica package. The packages 
+l3kernel, l3packages, amsmath and mathtools are required. The 
+commands \nmcIterate, \nmcSolve, \nmcRecur and \nmcTabulate
+available in version 1 of numerica by means of package options 
+are now available as separate packages. See numerica.pdf for
+details on how to use the package.
 
-numerica-basics.pdf explains more.
-
 Manifest
 %%%%%%%%
 README.txt             this document
 
 numerica.sty           LaTeX .sty file
-numerica-plus.def      optionally loaded files for use 
-numerica-tables.def    with numerica.sty
-numerica-lyx.def 
-      
-numerica-basics.pdf    documentation for numerica.sty & 
-                       numerica-lyx.def
-numerica-plus.pdf      documentation for numerica-plus.def
-numerica-tables.pdf    documentation for numerica-tables.def
-       
-numerica-basics.tex    LaTeX documentation source files
-numerica-plus.tex
-numerica-tables.tex        
+numerica.pdf           documentation for use of numerica
+numerica.tex           documentation source file
+ 

Deleted: trunk/Master/texmf-dist/doc/latex/numerica/numerica-basics.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/numerica/numerica-basics.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/numerica/numerica-basics.tex	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/doc/latex/numerica/numerica-basics.tex	2021-12-12 22:29:10 UTC (rev 61283)
@@ -1,4743 +0,0 @@
-%% LyX 2.4.0-alpha1 created this file.  For more info, see https://www.lyx.org/.
-%% Do not edit unless you really know what you are doing.
-\documentclass[english,tableposition=top]{report}
-\usepackage{lmodern}
-\renewcommand{\sfdefault}{lmss}
-\renewcommand{\ttdefault}{lmtt}
-\usepackage[T1]{fontenc}
-\usepackage{textcomp}
-\usepackage[utf8]{inputenc}
-\setcounter{secnumdepth}{3}
-\usepackage{color}
-\definecolor{shadecolor}{rgb}{0.667969, 1, 1}
-\usepackage{babel}
-\usepackage{array}
-\usepackage{cprotect}
-\usepackage{wrapfig}
-\usepackage{booktabs}
-\usepackage{framed}
-\usepackage{url}
-\usepackage{amsmath}
-\usepackage{amssymb}
-\usepackage[unicode=true,pdfusetitle,
- bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,
- breaklinks=true,pdfborder={0 0 1},backref=section,colorlinks=true]
- {hyperref}
-
-\makeatletter
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
-\providecommand{\LyX}{\texorpdfstring{\ensureascii{%
-  L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}}{LyX}}
-\DeclareRobustCommand*{\lyxarrow}{%
-\@ifstar
-{\leavevmode\,$\triangleleft$\,\allowbreak}
-{\leavevmode\,$\triangleright$\,\allowbreak}}
-%% Because html converters don't know tabularnewline
-\providecommand{\tabularnewline}{\\}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
-\newenvironment{centred}%
-  {\begin{center}\baselineskip=13pt\parskip=1pt}{\end{center}}
-\newenvironment{lyxcode}
-	{\par\begin{list}{}{
-		\setlength{\rightmargin}{\leftmargin}
-		\setlength{\listparindent}{0pt}% needed for AMS classes
-		\raggedright
-		\setlength{\itemsep}{0pt}
-		\setlength{\parsep}{0pt}
-		\normalfont\ttfamily}%
-	 \item[]}
-	{\end{list}}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
-\usepackage{numerica}
-
-\newcommand\rel{\,\varrho\;}
-\DeclareMathOperator{\erf}{erf}
-\DeclareMathOperator{\gd}{gd}
-
-\reuse
-
-\usepackage{upquote}
-
-\makeatother
-
-\begin{document}
-\title{\texttt{numerica-basics}}
-\author{Andrew Parsloe\\
-(\url{ajparsloe at gmail.com})\\
-}
-\maketitle
-\begin{abstract}
-The \verb`numerica` package defines a command to wrap around a mathematical
-expression in its LaTeX form and, once values are assigned to variables,
-numerically evaluate it. The intent is to avoid the need to modify
-the LaTeX form of the expression being evaluated. For programs with
-a preview facility like LyX, or compile-as-you-go systems, interactive
-back-of-envelope calculations and numerical exploration are possible
-within the document being worked on. The package requires the bundles
-\verb`l3kernel` and \verb`l3packages`, and the \verb`amsmath` and
-\verb`mathtools` packages. Additional modules define commands to
-iterate and find fixed points of functions of a single variable, to
-find the zeros or extrema of such functions, to calculate the terms
-of recurrence relations, and to create multi-column tables of function
-values (which requires the \verb`booktabs` package).\\
-\\
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-
-\paragraph*{Note:}
-\begin{itemize}
-\item {\normalsize This document applies to version 1.0.0 of }{\normalsize\texttt{numerica.sty}}{\normalsize .}{\small\par}
-\item {\normalsize Reasonably recent versions of the \LaTeX 3 bundles }{\normalsize\texttt{l3kernel}}{\normalsize{}
-and }{\normalsize\texttt{l3packages}}{\normalsize{} are required.}{\small\par}
-\item {\normalsize The package requires }{\normalsize\texttt{amsmath}}{\normalsize{}
-and }{\normalsize\texttt{mathtools}}{\normalsize .}{\small\par}
-\item {\normalsize I refer many times in this document (especially §\ref{sec:Argument-parsing})
-to }{\normalsize\emph{Handbook of Mathematical Functions}}{\normalsize ,
-edited by Milton Abramowitz and Irene A. Segun, Dover, 1965. This
-is abbreviated to }{\normalsize\emph{HMF}}{\normalsize , often followed
-by a number like 1.2.3 to locate the actual expression referenced.}{\small\par}
-\end{itemize}
-\end{shaded}%
-\end{minipage}
-\end{abstract}
-\begin{center}
-\tableofcontents{}
-\par\end{center}
-
-\chapter{Introduction}
-
-\texttt{numerica} is a \LaTeX{} package offering the ability to numerically
-evaluate mathematical expressions in the \LaTeX{} form in which they
-are typeset.\footnote{\texttt{numerica} evolved from the author's \texttt{calculyx} package
-that was designed for use with the document processor \LyX{} and available
-for download from a link on the \LyX{} wiki website (but not from CTAN). }
-
-There are a number of packages which can do calculations in \LaTeX ,\footnote{A simple search finds the venerable \texttt{calc} in the \LaTeX{} base,
-\texttt{calculator }(including an associated \texttt{calculus} package),
-\texttt{fltpoint}, \texttt{fp} (\emph{fixed} rather than floating
-point), \texttt{spreadtab} (using either \texttt{fp} or \texttt{l3fp}
-as its calculational engine) if you want simple spreadsheeting with
-your calculations, the elaborate \texttt{xint}, \texttt{pst-calculate}
-(a limited interface to \texttt{l3fp}), \texttt{l3fp} in the \LaTeX 3
-kernel, and \texttt{xfp}, the \LaTeX 3 interface to \texttt{l3fp}.
-Other packages include a calculational element but are restricted
-in their scope. (\texttt{longdivision} for instance is elegant, but
-limited only to long division.) } but those I am aware of all require the mathematical expressions
-they operate on to be changed to an appropriate syntax. Of these packages
-\texttt{xfp} comes closest to my objective with \texttt{numerica}.
-For instance, given a formula
-\begin{centred}
-\verb`\frac{\sin (3.5)}{2} + 2\cdot 10^{-3}`
-\end{centred}
-(in a math environment), this can be evaluated using \texttt{xfp}
-by transforming the expression to \verb`sin(3.5)/2 + 2e-3` and wrapping
-this in the command \verb`\fpeval`. In \texttt{numerica} you don't
-need to transform the formula, just wrap it in an \verb`\eval` command
-(for the acutal calculation see §\ref{subsec:introSimple-examples}):
-\begin{centred}
-\verb`\eval{ \frac{\sin (3.5)}{2} + 2\cdot 10^{-3} }`.
-\end{centred}
-\texttt{numerica}, like \texttt{xfp} and a number of other packages,
-uses \texttt{l3fp} (the \LaTeX 3 floating point module in \texttt{l3kernel})
-as its calculational engine. To some extent the main command, \verb`\nmcEvaluate`,
-short-name form \verb`\eval`, is a pre-processor to \texttt{l3fp},
-converting mathematical expressions written in the \LaTeX\texttt{
-}form in which they will be typeset into an `fp-ified' form that
-is digestible by \texttt{l3fp}. The aim is to make the command act
-as a wrapper around such formulas. Ideally, one should not have to
-make \emph{any} adjustment to them, although any text on Fourier series
-suggests that hope in full generality is delusional. Surprisingly
-often however it \emph{is} possible. We will see shortly that even
-complicated formulas like
-
-\[
-\cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)\frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi},
-\]
-and
-\[
-\left(\frac{1-4\sin^{2}\tfrac{m}{3n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi}\right)\sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi,
-\]
-
-\noindent can be evaluated `as is' (see below, §\ref{subsec:introReassurance}).
-There is no need to shift the position of the superscript $2$ on
-the sines, no need to parenthesize the arguments of $\sin$ and $\cos$,
-no need to insert asterisks to indicate multiplication, no need to
-change the \verb`\frac` and \verb`\tfrac`-s to slashes, \texttt{/},
-no need to delete the \verb`\left` and \verb`\right` that qualify
-the big parentheses (in the underlying \LaTeX ) in the second expression.
-Of course, if there are variables in an expression, as in these examples,
-they will need to be assigned values. And how the result of the evaluation
-is presented also requires specifying, but the aim is always: to evaluate
-mathematical expressions in \LaTeX{} with as little adjustment as possible
-to the form in which they are typeset.
-
-\texttt{numerica} is written in \texttt{expl3}, the programming language
-of the \LaTeX 3 project. It uses the \LaTeX 3 module \texttt{l3fp}
-(part of \texttt{l3kernel}) as its calculational engine. This enables
-floating point operations to 16 significant figures, with exponents
-ranging between $-10000$ and $+10000$. Many functions and operations
-are built-in to \texttt{l3fp} – arithmetic operations, trigonometric,
-exponential and logarithm functions, factorials, absolute value, max
-and min. Others have been constructed for \texttt{numerica }from \texttt{l3fp}
-ingredients – binomial coefficients, hyperbolic functions, sums and
-products – but to the user there should be no discernible difference. 
-
-Associated modules provide for additional operations: iteration, finding
-zeros, recurrence relations, mathematical table building. Further
-modules are planned (e.g. calculus).
-
-\section{How to use \texttt{numerica}}
-
-The package is invoked in the usual way:\footnote{I use the angle-bracket notation to indicate optional user input.
-Of course what is input does not include the angle brackets.} put
-\begin{lyxcode}
-\textbackslash usepackage{[}<options>{]}\{numerica\}
-\end{lyxcode}
-\noindent in the \LaTeX{} preamble. \texttt{numerica} requires the
-\texttt{amsmath} and \texttt{mathtools} packages and loads these automatically.
-\texttt{numerica} will also accept use of some relational symbols
-from the \texttt{amssymb} package provided that package is loaded;
-see §\ref{subsec:evalBoolean-output}. 
-
-\subsection{Packages and package options}
-
-\label{subsec:introPackagesOptions}Version 1.0.0 of \texttt{numerica}
-has three package options. 
-\begin{description}
-\item [{\texttt{plus}}] By calling \texttt{numerica} with the \texttt{plus}
-package option,\\
-{\ttfamily{}%
-\noindent\begin{minipage}[t]{1\columnwidth}%
-~~~~\textbackslash usepackage{[}plus{]}\{numerica\}%
-\end{minipage}}\texttt{}~\\
-the file \texttt{numerica-plus.def }is loaded where a number of additional
-commands: \verb`\nmcIterate`, \verb`\nmcSolve`, \verb`\nmcRecur`
-are defined. These enable the iteration of functions of a single variable\footnote{At this stage!},
-including finding fixed points; the solving of equations of the form
-$f(x)=0$ (or the location of local maxima or minima); and the calculation
-of terms in recurrence relations (like the Fibonacci series or othogonal
-polynomials). See the associated document \texttt{numerica-plus.pdf}.
-\item [{\texttt{tables}}] By calling \texttt{numerica} with the \texttt{tables}
-package option\\
-{\ttfamily{}%
-\noindent\begin{minipage}[t]{1\columnwidth}%
-~~~~\textbackslash usepackage{[}tables{]}\{numerica\}%
-\end{minipage}}\texttt{}~\\
-the file \texttt{numerica-tables.def} is loaded with with the command
-\verb`\nmcTabulate` enabling the creation of multi-column tables
-of function values with a wide variety of formatting options (most
-of those employed in \emph{HMF} in fact). See the associated document
-\texttt{numerica-tables.pdf}.
-\item [{\texttt{lyx}}] By calling \texttt{numerica} with the \texttt{lyx}
-package option,\\
-{\ttfamily{}%
-\noindent\begin{minipage}[t]{1\columnwidth}%
-~~~~\textbackslash usepackage{[}lyx{]}\{numerica\}%
-\end{minipage}}\texttt{}~\\
-the file \texttt{numerica-lyx.def }is loaded with code enabling the
-full use of the \verb`\nmcReuse` command in the document processor
-\LyX{} (along with all other commands of the \texttt{numerica} package).
-Use of \texttt{numerica} in \LyX{} exploits the mini-\LaTeX{} runs of
-the instant preview facility of that program to give immediate feedback
-on calculations without requiring the whole document to be compiled.
-See Chapter~\ref{chap:LyX}.
-\end{description}
-More than one option can be used at a time by separating the options
-with a comma; e.g. \texttt{\textbackslash usepackage{[}plus,tables{]}\{numerica\}}.
-However, apart from Chapter~\ref{chap:LyX}, the present document
-focuses on \texttt{numerica} when called with no options: \texttt{\textbackslash usepackage\{numerica\}}.
-
-\subsection{Simple examples of use}
-
-\label{subsec:introSimple-examples}A simple example of use is provided
-by the document
-\begin{verbatim}
-    \documentclass{minimal} 
-    \usepackage{numerica}
-    \begin{document}
-
-        \eval{$ mc^2 $}[m=70,c=299 792 458][8x]
-
-    \end{document}
-
-\end{verbatim}
-\noindent We have a formula between math delimiters: \verb`$ mc^2 $`.
-We have wrapped a command \verb`\eval` around the lot, added an optional
-argument in parentheses specifying numericaal values for the quantities
-\texttt{m} and \texttt{c}, and concluded it all with a trailing optional
-argument specifying that the result should be presented to $8$ places
-of decimals and in scientific notation (the \verb`x`). Running \texttt{pdflatex}
-on this document generates a pdf displaying
-\begin{centred}
-\eval{$ mc^2 $}[m=70,c=299 792 458][8x]
-\end{centred}
-\noindent where the formula ($mc^{2})$ is equated to the numerical
-value resulting from substituting the given values of $m$ and $c$.
-Those values are displayed in a list following the result. The calculation
-is presented to $8$ decimal places in scientific notation. (According
-to Einstein's famous equation $E=mc^{2}$ this is the enormous energy
-content, in joules, of what was once considered an average adult Caucasian
-male. Only a minute fraction is ever available.) 
-
-A second example is provided by the formula in earlier remarks:
-\begin{verbatim}
-    \documentclass{minimal} 
-    \usepackage{numerica}
-    \begin{document}
-
-        \eval{\[ \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \]}
-
-    \end{document}
-
-\end{verbatim}
-Running \texttt{pdflatex} on this document produces the result
-
-\eval{\[ \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \]}
-
-The \verb`\eval` command used in these examples is the main command
-of the \texttt{numerica} package. It is discussed in full in the next
-chapter, but first some preliminaries.
-
-\subsection{Display of the result}
-
-\label{subsec:introResultDisplay}In what follows I shall write things
-like (but generally more complicated than)
-\begin{centred}
-\verb`$ \eval{ 1+1 } $` $\Longrightarrow \eval{ 1 + 1 } $
-\end{centred}
-to mean: run \texttt{pdflatex} on a document containing \verb`\eval{1+1}`
-in the document body to generate a pdf containing the calculated result
-($2$ in this instance). In this case the \verb`\eval` command is
-used \emph{within} a math environment (delimited by the dollar signs).
-It is not limited to this behaviour. The command can also wrap \emph{around}
-the math delimiters (as we saw in the previous examples):
-\begin{centred}
-\verb`\eval{$ 1+1 $}` $\Longrightarrow$ \eval{$ 1+1 $}.
-\end{centred}
-As you can see, the display that results is different. 
-\begin{itemize}
-\item When the \verb`\eval` command is used\emph{ within} a math environment,
-only the \emph{result,} followed possibly by the \emph{variable~=~value
-list} (see §\ref{subsec:evalVv-list}) is displayed.
-\end{itemize}
-Environments may include the various AMS environments as well as the
-standard \LaTeX{} inline ( \verb`$ $` ), \texttt{equation} ( \verb`\[ \]`
-) and \texttt{eqnarray} environments. For an example of \verb`\eval`
-within an \verb`align*` environment see §\ref{subsec:introExploring}
-below. 
-\begin{itemize}
-\item When the \verb`\eval` command is wrapped\emph{ around} a math environment,
-the result is displayed in the form, \emph{formula = result} (followed
-possibly by the \emph{variable~=~value list}) within that environment,
-\begin{itemize}
-\item If the formula is long or contains many variables then it may be desirable
-to split the display over two lines; see §\ref{subsec:evalChanging-display-format}
-and §\ref{subsec:settings New-line-display},
-\end{itemize}
-\end{itemize}
-the whole presented as an inline expression if \verb`$` delimiters
-are used, or as a display-style expression otherwise. (See the $mc^{2}$
-example for an illustration.) 
-
-It is not clear to me that wrapping \verb`\eval` \emph{around} the
-AMS environments, except for \texttt{multline}, makes much sense,
-although it can be done. Here is an example of \verb`\eval` wrapped
-around a \texttt{multline{*}} environment (the phantom is there so
-that the hanging $+$ sign spaces correctly),\medskip{}
-
-\begin{minipage}[t]{0.8\columnwidth}%
-\begin{verbatim}
-\eval{ \begin{multline*}
-          1+2+3+4+5+6+7+8+9+10+\phantom{0}\\
-            11+12+13+14+15+16+17+18+19 
-       \end{multline*} }
-\end{verbatim}
-%
-\end{minipage}
-
-\medskip{}$\Longrightarrow$ %
-\begin{minipage}[t]{0.8\columnwidth}%
-\vspace{-2ex}\eval{ \begin{multline*}       
-		1+2+3+4+5+6+7+8+9+10+\phantom{0}\\       		  11+12+13+14+15+16+17+18+19      
-\end{multline*} }%
-\end{minipage}
-\begin{itemize}
-\item It is also possible to dispense with math delimiters entirely, neither
-wrapped within nor wrapped around the \verb`\eval` command, but in
-that case \texttt{numerica} acts as if \verb`\eval` had been used
-within \verb`\[` and \verb`\]` and displays the result accordingly.
-\end{itemize}
-
-\subsection{Exploring}
-
-\label{subsec:introExploring}When working on \texttt{numerica}'s
-predecessor package, I constantly tested it against known results
-to check for coding errors. One test was to ensure that 
-\[
-\left(1+\frac{1}{n}\right)^{n}
-\]
-did indeed converge to the number $e$ as $n$ increased.\texttt{ }Let's
-do that here. Try first $n=10$:
-\begin{center}
-\verb`\eval{$ e-(1+1/n)^n $}[n=10][x]` $\Longrightarrow$ \eval{$ e-(1+1/n)^n $}[n=10][x].
-\par\end{center}
-
-\noindent (The default number of decimal places displayed is $6$.)
-The difference between $e$ and $(1+1/n)^{n}$ is about an eighth
-($0.125$) when $n=10$, which is encouraging but hardly decisive.
-The obvious thing to do is increase the value of $n$. I'll use an
-\verb`align*` environment to `prettify' the presentation of the
-results:
-\begin{verbatim}
-  \begin{align*}
-    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^5][*x],\\
-    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^6][*x],\\
-    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^7][*x],\\
-    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^8][*x].
-  \end{align*}
-\end{verbatim}
-(most of which was written using copy and paste) which produces
-
-\begin{align*}
-e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{5}][x],\\
-e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{6}][*x],\\
-e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{7}][x],\\
-e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{8}][x].
-\end{align*}
-Clearly $(1+1/n)^{n}$ converges to $e$, the difference between them
-being of order $1/n$, but that is not what catches the eye. There
-is an unanticipated regularity here. 1.35914? Double the number: \verb`$\eval{2\times 1.35914}[5]$`\texttt{
-}$\Longrightarrow\eval{2\times1.35914}[5]$ which is close enough
-to $e$ to suggest a relationship, namely,
-\[
-\lim_{n\to\infty}n\left(e-\left(1+\frac{1}{n}\right)^{n}\right)=\tfrac{1}{2}e.
-\]
-
-This was new to me. Is it true? From the familiar expansion of the
-logarithm
-
-\begin{align*}
-\ln\left(1+\frac{1}{n}\right)^{n} & =n\ln\left(1+\frac{1}{n}\right)\\
- & =n\left(\frac{1}{n}-\frac{1}{2}\frac{1}{n^{2}}+\frac{1}{3}\frac{1}{n^{3}}-\ldots\right)\\
- & =1-\frac{1}{2n}\left(1-\frac{2}{3}\frac{1}{n}+\frac{2}{4}\frac{1}{n^{2}}-\right)\\
- & \equiv1-\frac{1}{2n}E_{n},
-\end{align*}
-say. Since $E_{n}$ is an alternating series and the magnitudes of
-the terms of the series tend to $0$ monotonically, $1>E_{n}>1-2/3n$.
-From this and the inequalities $1/(1-x)>e^{x}>1+x$ when $x<1$ it
-proved a straightforward matter to verify the proposed limit.
-
-\subsection{Reassurance}
-
-\label{subsec:introReassurance}In the course of some hobbyist investigations
-in plane hyperbolic geometry I derived the formula
-\[
-\Phi_{1}(m,n)=\cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)\frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi},
-\]
-for $m=2,3,\ldots$ and integral $n\ge2m+1$. A key concern was: when
-is $\Phi_{1}$ positive? After an embarrassingly laborious struggle,
-I managed to work this expression into the form
-\[
-\Phi_{2}(m,n)=\left(\frac{1-4\sin^{2}\tfrac{m}{3n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi}\right)\sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi,
-\]
-in which the conditions for positivity are clear: with $n\ge2m+1$,
-so that $m\pi/3n<\pi/6$, the first factor is always positive, the
-second is positive for $m\ge2$, and the third is positive for $m\ge4$.
-All well and good, but given the struggle to derive $\Phi_{2}$, was
-I confident that $\Phi_{1}$ and $\Phi_{2}$ really\emph{ }are equal?
-It felt all too likely that I had made a mistake. 
-
-The simplest way to check was to see if the two expressions gave the
-same numericaal answers for a number of $m,\thinspace n$ values.
-I wrote \verb`\eval{\[ \]}[m=2,n=5]` twice and between the delimiters
-pasted the already composed expressions for $\Phi_{1}$ and $\Phi_{2}$,
-namely: 
-\begin{verbatim}
-    \eval{\[ 
-            \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
-            \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
-            {2\sin^{2}\tfrac{m}{3n}\pi} 
-          \]}[m=2,n=5]
-    \eval{\[ 
-            \left(
-              \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
-              {2\sin^{2}\tfrac{m}{3n}\pi}
-            \right)
-            \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
-          \]}[m=2,n=5]
-\end{verbatim}
-I have added some formatting – indenting, line breaks – to make the
-formulas more readable for the present document but otherwise left
-them unaltered. The \verb`\eval` command can be used for even quite
-complicated expressions without needing to tinker with their \LaTeX{}
-form, but you may wish – as here – to adjust white space to clarify
-the component parts of the formula. Running \texttt{pdflatex} on these
-expressions, the results were
-
-\eval{\[ 
-        \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
-        \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
-        {2\sin^{2}\tfrac{m}{3n}\pi} 
-      \]}[m=2,n=5]
-
-\eval{\[ 
-        \left(
-          \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
-          {2\sin^{2}\tfrac{m}{3n}\pi}
-        \right)
-       \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
-      \]}[m=2,n=5]
-
-\noindent which was reassuring. Doing it again but with different
-values of $m$ and $n$, again the results coincided:
-
-\eval{\[ 
-        \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
-        \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
-        {2\sin^{2}\tfrac{m}{3n}\pi} 
-      \]}[m=5,n=13]
-
-\eval{\[ 
-        \left(
-          \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
-          {2\sin^{2}\tfrac{m}{3n}\pi}
-        \right)
-       \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
-      \]}[m=5,n=13]
-
-\noindent Thus reassured that there was \emph{not }an error in my
-laborious derivation of $\Phi_{2}$ from $\Phi_{1}$, it was not difficult
-to work back from $\Phi_{2}$ to $\Phi_{1}$ then reverse the argument
-to find a straightforward derivation. 
-
-\chapter{\texttt{\textbackslash nmcEvaluate} (\texttt{\textbackslash eval)}}
-
-The main calculational command in \texttt{numerica} is \verb`\nmcEvaluate`.
-Unlike some other commands which are loaded optionally, \verb`\nmcEvaluate`
-is \emph{always} loaded, and therefore always available. Because \verb`\nmcEvaluate`
-would be tiresome to write too frequently,\texttt{ }particularly for
-back-of-envelope calculations, there is an equivalent short-name form,
-\verb`\eval`, used almost exclusively in the following. But note:
-wherever you see the command \verb`\eval`, you can substitute \verb`\nmcEvaluate`
-and obtain the same result.
-
-\verb`\eval` (like other short-name forms of other commands in the
-\texttt{numerica} suite) is defined using \verb`\ProvideDocumentCommand`
-from the \texttt{xparse} package. Hence if \verb`\eval` has already
-been defined in some other package already loaded, it will not be
-redefined by \texttt{numerica}. It will retain its meaning in the
-other package. Its consequent absence from \texttt{numerica} may be
-an irritant, but only that; \verb`\nmcEvaluate` is defined using
-\texttt{xparse}'s \verb`\DeclareDocumentCommand` which would override
-any (freakishly unlikely) previous definition of \verb`\nmcEvaluate`
-in another package and would therefore still be available.
-
-\section{Syntax of \texttt{\textbackslash nmcEvaluate (\textbackslash eval)}}
-
-There are five arguments to the \verb`\nmcEvaluate` (or \verb`\eval`)
-command, of which only one, the third, is mandatory. All others are
-optional. If all are deployed the command looks like
-\begin{centred}
-\noindent \verb`\eval*[settings]{expr.}[vv-list][num. format]`
-\end{centred}
-I discuss the various arguments in the referenced sections.
-\begin{enumerate}
-\item \verb`*` optional switch; if present ensures display of only the
-numerical result (suppresses display of the formula and vv-list);
-see §\ref{subsec:evalVvSuppresList}
-\item \verb`[settings]` optional comma-separated list of \emph{key=value
-}settings for this particular calculation; see §\ref{sec:settingsOption}
-\item \verb`{expr.}` the only mandatory argument; the mathematical expression/formula
-in \LaTeX{} form that is to be evaluated 
-\item \verb`[vv-list]` optional comma-separated list of \emph{variable=value
-}items; see §\ref{subsec:evalVv-list}
-\item \verb`[num. format]` optional format specification for presentation
-of the numerical result (rounding, padding with zeros, scientific
-notation, boolean output); see~§\ref{subsec:evalRoundingEtc}
-\end{enumerate}
-Note that arguments 4 and 5 are both square-bracket delimited optional
-arguments. Should only one such argument be used, \texttt{numerica}
-determines which is intended by looking for an equals sign within
-the argument. Its presence indicates the argument is the vv-list;
-its absence indicates the argument is the number format specification. 
-
-The vv-list and number-format specification are \emph{trailing} optional
-arguments. There is a possibility that the \verb`\eval` command could
-be followed by a square-bracketed mathematical expression which \texttt{numerica}
-might therefore confuse with one of its trailing arguments. Experience
-using \texttt{numerica} suggests that this will be a (very) rare occurrence
-and is easily prevented by inserting an empty brace pair (\verb`{}`)
-before the offending square-bracketed expression. Allowing spaces
-between the arguments enables complicated expressions and large vv-lists
-to be formatted, in the interests of clarity, with new lines and white
-space – without requiring the insertion of comment characters (\verb`%`).
-
-Recommended practice is to minimise the number of optional arguments
-used in \LaTeX{} commands by consolidating such arguments into a single
-\emph{key=value} list. Although \texttt{numerica} uses such an argument,
-the vv-list does not fit naturally into that scheme. And practice
-suggests that separating out the elements of the number format specification
-(rounding value, padding with zeros, scientific notation, boolean
-output) and placing them in a trailing argument feels natural for
-the kind of back-of-envelope calculations envisaged for \texttt{numerica}. 
-
-\section{The variable=value list}
-
-\label{subsec:evalVv-list}To evaluate algebraic, trigonometric and
-other formulas that involve \emph{variables} we need to give those
-variables values. This is done in the \emph{variable=value list} –
-or \emph{vv-list} for short. This is the fourth argument of the \texttt{\textbackslash nmcEvaluate}
-command and is a square-bracket delimited optional argument (optional
-because an expression may depend only on constants and numbers).
-
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-I was sorely tempted to use parentheses to delimit this argument,
-since then both the placement and delimiters of the vv-list would
-anticipate the way it is displayed in the evaluated result (see the
-$mc^{2}$ example in §\ref{subsec:introSimple-examples} above). But
-there is good reason not to. Parentheses will often occur in expressions
-in the vv-list. With parentheses nested within parentheses it is all
-too easy to get a pairing wrong, which would cause a \LaTeX{} error
-and halt compilation. As it is, using the standard square bracket
-delimiters, unbalanced parentheses cause a \texttt{numerica} error
-(see §\ref{subsec:errorsMismatched-brackets}), which does not halt
-compilation. (Of course unbalanced \emph{square} brackets now will
-cause a \LaTeX{} error, but such brackets are used less often in mathematical
-expressions and are rarely nested within other square-bracketed expressions.)\end{shaded}%
-\end{minipage}
-
-\subsection{Variable names}
-
-\label{subsec:evalVariableNames}In mathematical practice, variable
-names are generally single letters of the Roman or Greek alphabets,
-sometimes also from other alphabets, in a variety of fonts, and often
-with subscripts or primes or other decorations. In \texttt{numerica}
-a variable name is \emph{what lies to the left of the equals sign
-in an item} of the vv-list. Thus variables can be multi-token affairs:
-$x',x'',x^{iv},x_{n},x'_{n},x''_{mn}$, $^{k}C_{n},var,\mathrm{var},Fred,\mathbf{Fred},\mathcal{FRED}\ldots$
-Although variable names start and end with non-space tokens, a variable
-name may contain spaces – for instance \verb`x x` should not cause
-a \verb`numerica` error, but such names are not part of mathematical
-practice. Usually, for the kind of back-of-envelope calculations envisaged
-for \verb`numerica`, and for ease of typing, most variables will
-be single letters from the Roman or Greek alphabets. 
-
-Because equals signs and commas give structure to the vv-list, it
-should also be clear that a variable name should not contain a \emph{naked}
-equals sign or a \emph{naked} comma. They can be incorporated in a
-variable name but only when decently wrapped in braces, like \verb`R_{=}`
-displaying as $R_{=}$ or \verb`X_{,i}` displaying as $X_{,i}$. 
-
-Note that $x$ and $\mathrm{x}$ will be treated by \verb`numerica`
-as \emph{different} variables since, in the underlying \LaTeX , one
-is \texttt{x} and the other \verb`\mathrm{x}`. Even names that look
-identical in the pdf may well be distinct in \LaTeX . This is true
-particularly of superscripts and subscripts: \verb`x_0` and \verb`x_{0}`
-appear identical in the pdf but in the underlying \LaTeX{} they are
-distinct, and will be treated as distinct variables by \verb`numerica`. 
-
-Although multi-token variables are perfectly acceptable, \emph{internally}
-\verb`numerica` expects variables to be single tokens. Hence a necessary
-initial step for the package is to convert all multi-token variable
-names in the vv-list and the formula to single tokens. \verb`numerica`
-does this by turning the multi-token variable names into control sequences
-with names in the sequence \verb`\_nmca`, \verb`\_nmcb`, \verb`\_nmcc`,
-etc., then searches through the vv-list and the formula for every
-occurrence of the multi-token names and replaces them with the relevant
-control sequences. It does this in order of decreasing size of name,
-working from the names that contain most tokens down to names containing
-only two tokens. 
-
-The conversion process uses computer resources. Even if there are
-no multi-token variables present, \verb`numerica` still needs to
-check that this is so – unless the user alerts the program to the
-fact. This can be done by making a brief entry \texttt{xx=0 }in the
-settings option (the second optional argument of \verb`\nmcEvaluate`);
-see §\ref{subsec:settingsMultitokSwitch}. If the user never (or hardly
-ever) uses multi-token variables, then a more permanent solution is
-to create a file \verb`numerica.cfg`\texttt{ }with the line \texttt{multitoken-variables
-= false}; see §\ref{sec:settingsDefaults} for this.
-
-\subsection{The vv-list and its use}
-
-A vv-list is a comma-separated list where each item is of the form
-\emph{variable=value}. It might be something simple like
-\begin{lyxcode}
-{[}g=9.81,t=2{]}
-\end{lyxcode}
-or something more complicated like
-\begin{lyxcode}
-{[}V\_S=\textbackslash tfrac43\textbackslash pi~r\textasciicircum 3,V\_C=2\textbackslash pi~r\textasciicircum 2h,h=3/2,r=2{]}.
-\end{lyxcode}
-Spaces around the equals signs or the commas are stripped away during
-processing so that 
-\begin{lyxcode}
-{[}g=9.81,t=2{]}~\textrm{and}~{[}~g~=~9.81~,~t~=~2{]}
-\end{lyxcode}
-are the \emph{same} variable=value list.
-
-\subsubsection{Evaluation from right to left}
-
-In these examples, with variables depending on other variables, there
-is an implication: that the list is evaluated \emph{from the right}.
-Recall how a function of a function is evaluated, say\emph{ }$y=f(g(h(x)))$.
-To evaluate $y$, first $x$ is assigned a value then $h(x)$ is calculated,
-then $g(h(x))$ then $f(g(h(x)))=y$. We work from right to left,
-from the innermost to the outermost element. Or consider an example
-like calculating the area of a triangle by means of the formula
-\[
-A=\sqrt{s(s-a)(s-b)(s-c)}.
-\]
-First we write the formula; then we state how $s$ depends on $a,b,c$,
-namely $s=\frac{1}{2}(a+b+c)$, then we give values to $a,b,c$. In
-\texttt{numerica} this is mirrored in the layout of the \verb`\eval`
-command:
-\begin{verbatim}
-    \eval{$ \sqrt{s(s-a)(s-b)(s-c)} $}
-                 [s=\tfrac12(a+b+c),a=3,b=4,c=5]
-\end{verbatim}
-The formula in a sense is the leftmost extension of the vv-list. The
-entire evaluation occurs from right to left.
-
-This means that the rightmost variable in the vv-list can depend only
-on (mathematical) constants and numbers – although it may be a complicated
-expression of those elements. Other variables in the vv-list can depend
-on variables \emph{to their right} but not to their left.
-
-\subsubsection{Expressions in the variable=value list}
-
-Suppose our expression is $\tfrac{4}{3}\pi r^{3}$, the volume $V_{S}$
-of a sphere in terms of its radius $r$, and we want to calculate
-the volume for different values of $r$ to get a sense of how rapidly
-volume increases with radius.
-\begin{centred}
-\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=1] $` $\Longrightarrow$ $ V_S=\eval{ \tfrac43\pi r^3 }[r=1] $.
-\end{centred}
-Having set up this calculation it is now an easy matter to change
-the value of $r$ in the vv-list:
-\begin{centred}
-\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=1.5] $` $\Longrightarrow$
-$ V_S= \eval{ \tfrac43\pi r^3 }[r=1.5] $.
-
-\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=2] $` $  \Longrightarrow $ $V_S= \eval{ \tfrac43\pi r^3 }[r=2] $.
-\end{centred}
-To compute the volume $V_{C}=\pi r^{2}h$ of a cylinder, we have two
-variables to assign values to:
-\begin{centred}
-\verb`$ V_C=\eval{ \pi r^2h }[h=4/3,r=1] $` $\Longrightarrow$ $ V_C=\eval{ \pi r^2h }[h=4/3,r=1] $.
-\end{centred}
-Although values in the vv-list are generally either numbers or simple
-expressions (like \texttt{4/3}), that is not essential. A little more
-complicated is
-\begin{centred}
-\verb`$ V_C=\eval{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
-$ V_C=\eval{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $.
-\end{centred}
-where calculation of the volume of the cylinder has been split into
-two: first calculate the area $A_{C}$ of its circular base and then,
-once that has been effected, calculate the volume.
-
-A second example is provided by Brahmagupta's formula for the area
-of a triangle in terms of its semi-perimeter. In a triangle ABC, the
-sides are $a=3$, $b=4$ and $c=5$. (Of course we know this is a
-right-angled triangle with area $\tfrac{1}{2}ab=6$.) The semi-perimeter
-$s=\tfrac{1}{2}(a+b+c)$ and the area of ABC is \medskip{}
-\begin{verbatim}
-    \eval{$ \sqrt{s(s-a)(s-b)(s-c) $}
-                 [s=\tfrac12(a+b+c),a=3,b=4,c=5] 
-\end{verbatim}
-$\Longrightarrow$ \eval{$ \sqrt{s(s-a)(s-b)(s-c)} $}
-    [s=\tfrac12(a+b+c),a=3,b=4,c=5].
-
-\subsubsection{Constants}
-
-There are five constants built-in to \texttt{numerica}: \verb`\pi`,
-the ratio of circumference to diameter of a circle, \verb`e`, the
-base of natural logarithms, \verb`\gamma`, the limit of $\left(\sum_{1}^{N}1/n\right)-\ln N$
-as $N\to\infty$, \verb`\phi`, the golden ratio, equal to $\tfrac{1}{2}(1+\surd5)$,
-and the utilitarian constant \verb`\deg`, the number of radians in
-a degree.
-\begin{centred}
-\verb`\eval{$ \pi $}` $\Longrightarrow$ \eval{$ \pi $},
-
-\verb`\eval{$ e $}` $\Longrightarrow$ \eval{$ e $},
-
-\verb`\eval{$ \gamma $}` $\Longrightarrow$ \eval{$ \gamma $},
-
-\verb`\eval{$ \phi $}` $\Longrightarrow$ \eval{$ \phi $},
-
-\verb`\eval{$ \deg $}` $\Longrightarrow$ \eval{$ \deg $},
-\end{centred}
-so that \verb`\eval{$ 180\deg $}` $\Longrightarrow$ \eval{$ 180\deg $}
-(as it should).
-
-Let's combine two of these in a formula:
-\begin{centred}
-\verb`\eval{$ e^\pi-\pi^e $}` $\Longrightarrow$ \eval{$ e^\pi-\pi^e $},
-\end{centred}
-which is close-ish to $\tfrac{1}{4}e$: \verb`\eval{$ \tfrac14e $}`
-$\Longrightarrow$ \eval{$ \tfrac14e $}.
-
-\subsubsection{Use of \texttt{\textbackslash pi},\texttt{ e},\texttt{ \textbackslash gamma},\texttt{
-\textbackslash phi} as variables}
-
-In some contexts it may feel natural to use any or all of \verb`\pi`,
-\verb`e`, \verb`\gamma` and \verb`\phi` as variables by assigning
-values to them in the vv-list. \texttt{numerica} does not object.
-The values assigned in this way override the constants' values. For
-example, if the triangle we labelled ABC previously was instead labelled
-CDE then it has sides $c=3,d=4$ and (note!) $e=5$. It's area therefore
-is\medskip{}
-\begin{verbatim}
-    \eval{$ \sqrt{s(s-c)(s-d)(s-e)} $}
-              [s=\tfrac12(c+d+e),c=3,d=4,e=5]       
-\end{verbatim}
-$\Longrightarrow$ 
-
-\eval{$ \sqrt{s(s-c)(s-d)(s-e)} $}
-    [s=\tfrac12(c+d+e),c=3,d=4,e=5].\medskip{}
-
-\noindent Since this is the correct area we see that \texttt{e} has
-been treated as a variable with the assigned value $5$, not as the
-constant. But if \texttt{e} (or \verb`\pi` or \verb`\gamma` or \verb`\phi`)
-is not assigned a value in the vv-list then it has, by default, the
-value of the constant. 
-
-In the case of \texttt{e}, if you wish to use it as a variable, the
-constant is always available as \verb`\exp(1)`. There is no similar
-alternative available for \verb`\pi`, \verb`\gamma` or \verb`\phi`
-although you can always do something like \verb`[\pi=<new value>,\pi_0=\pi]`
-in the vv-list, so that \verb`\pi_0` now has the constant's value.
-
-\subsection{Display of the vv-list}
-
-By default, the vv-list is displayed with (in fact following) the
-numerical result. That and the format of the display can both be changed.
-
-\subsubsection{Star option: suppressing display of the vv-list}
-
-\label{subsec:evalVvSuppresList}If display of the vv-list is not
-wanted at all, only the numerical result, it suffices to attach an
-asterisk (star) to the \texttt{\textbackslash eval} command:
-\begin{centred}
-\verb`$ V_C=\eval*{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
-$ V_C=\eval*{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $,
-\end{centred}
-or simply the naked result:
-\begin{centred}
-\verb`\eval*{$ hA_C $}[A_C=\pi r^2,h=4/3,r=1]` $\Longrightarrow$
-\eval*{$ hA_C $}[A_C=\pi r^2,h=4/3,r=1].
-\end{centred}
-In the latter case, note that a negative result will display with
-a hyphen for the minus sign unless you, the user, explicitly write
-math delimiters around the \verb`\eval*` command:
-\begin{centred}
-\verb`\eval*{$ y $}[y=ax+b,x=2,a=-2,b=2]` $\Longrightarrow$ \eval*{$ y $}[y=ax+b,x=2,a=-2,b=2]
-\end{centred}
-The \verb`$` signs that \verb`\eval*` wraps around are ignored.
-The star option delivers a number, pure and simple, with no accompaniments.
-
-\subsubsection{Suppressing display of items}
-
-\label{subsec:evalVvSuppressVars}You may wish to retain some variables
-in the vv-list display, but not all. For those variables you wish
-omitted from the display, wrap each variable (but not the equals sign
-or value) in braces. When calculating the volume of a cylinder in
-the previous examples, the base area $A_{C}$ has a different status
-from the `fundamental' variables $r$ and $h$. It is an intermediate
-value, one that we pass through on the way to the final result. To
-suppress it from display enclose the variable in braces:
-\begin{centred}
-\verb`$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
-$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,h=4/3,r=1] $.
-\end{centred}
-As you can see, $A_{C}$ no longer appears in the displayed vv-list.
-Of course the name and its value are still recorded `behind the scenes'
-and can still be used in calculations.
-
-\subsubsection{Changing the display format}
-
-\label{subsec:evalChanging-display-format}In two examples above,
-we have calculated the area of a triangle using Brahmagupta's formula.
-Display of the result is crowded. Two remedies have just been suggested,
-but a third one and preferable in this case would be to force display
-of the vv-list and result to a new line. This can be done through
-the settings option to the \verb`\eval` command, discussed in §\ref{subsec:settings New-line-display}.
-However, if \verb`\eval` is wrapped around an \emph{appropriate}
-environment (like \verb`multline`, but not \verb`equation`) it can
-also be done simply by including \texttt{\textbackslash\textbackslash}
-at the end of the formula. 
-
-In the following example I use Brahmagupta's formula for calculating
-the area of a cyclic quadrilateral (of which his formula for a triangle
-is a special case). The cyclic quadrilateral in the example is formed
-by a 45-45-90 triangle of hypotenuse 2 joined along the hypotenuse
-to a 30-60-90 triangle. The sides are therefore $\surd2,\surd2,\surd3,1$.
-Adding the areas of the two triangles, the area of the quadrilateral
-is $A=1+\tfrac{1}{2}\surd3$, or in decimal form, \verb`$\eval{1+\tfrac12\surd3}$`
-$\Longrightarrow$ $\eval{1+\tfrac12\surd3}$. Let's check with Brahmagupta's
-formula:
-\begin{verbatim}
-    \eval{
-      \begin{multline*}
-        \sqrt{(s-a)(s-b)(s-c)(s-d)}\\
-      \end{multline*} 
-         }[s=\tfrac12(a+b+c+d),
-           a=\surd2,b=\surd2,c=\surd3,d=1] 
-\end{verbatim}
-$\Longrightarrow$     \eval{
-      \begin{multline*}
-        \sqrt{(s-a)(s-b)(s-c)(s-d)}\\
-      \end{multline*} 
-         }[s=\tfrac12(a+b+c+d),
-           a=\surd2,b=\surd2,c=\surd3,d=1]
-
-\section{Formatting the numerical result}
-
-\label{subsec:evalRoundingEtc} A result of a calculation is displayed,
-by default, to $6$ decimal places. All our results so far have been
-rounded to this figure, although not all digits are displayed, for
-instance if the sixth one is $0$, or the result is an integer. Like
-other elements of the display, both rounding value and the (dis)appearance
-of trailing zeros can be customized, in this case by means of an optional
-argument following the vv-list (or the formula if there is no vv-list).
-This optional argument may contain up to four juxtaposed items from
-seven possibilities:
-\begin{itemize}
-\item a question mark ?, which gives boolean output, or 
-\item an integer, the \emph{rounding value}, positive, negative or zero,
-specifying how many decimal places to display the result to, or
-\item an asterisk {*}, which pads the result with zeros should it not have
-as many decimal places as the rounding value specifies, or
-\item the character \texttt{x} (lower case!) which presents the result in
-`proper' scientific notation (a form like $1.234\times10^{5}$ for
-123450), or
-\item the character \texttt{t} (lower case!) which presents the result in
-a bastardized form of scientific notation useful in tables (a form
-like $(5)1.234$ for 123450), or
-\item a character other than \texttt{?}, \texttt{{*}}, \texttt{x}, \texttt{t}
-or a digit, usually (but not necessarily) one of the letters\texttt{
-e d} \texttt{E D}, which presents the result in scientific notation
-using that character as the exponent mark (a form like $1.234\text{e}5$
-for $123450$), or
-\item a prime 
-\begin{itemize}
-\item attached to the character specifying scientific notation, which extends
-that notation to numbers in the interval \texttt{{[}1,10)}, or
-\item attached to a question mark, which changes the format of boolean output.
-\end{itemize}
-\end{itemize}
-If you use \texttt{?} in the same specification as some other text
-character, the \texttt{?} prevails; if you use \texttt{x} in the same
-specification as some other text character except for \texttt{?},
-the \texttt{x} prevails; if you use \texttt{t} in the same specification
-as some other text character except for \texttt{?} or \texttt{x},
-the \texttt{t} prevails.
-
-\subsection{Rounding value }
-
-\label{subsec:evalRounding-value}The rounding value specifies the
-number of decimal places displayed:
-\begin{centred}
-\verb`$ \eval{ 1/3 }[4] $` $\Longrightarrow$ $ \eval{ 1/3 }[4] $
-\end{centred}
-The default rounding value is $6$:
-\begin{centred}
-\verb`$ \eval{ 35/3 } $` $\Longrightarrow$ $ \eval{ 35/3 } $
-\end{centred}
-Following the default behaviour in \texttt{l3fp}, `ties' are rounded
-to the nearest \emph{even} digit. Thus a number ending $55$ has a
-`choice' of rounding to $5$ or $6$ and rounds up to the even digit
-$6$, and a number ending $65$ with a `choice' of rounding to $6$
-or $7$ rounds down to the even digit $6$:
-\begin{centred}
-\verb`$ \eval{ 0.1234555 } $`  $\Longrightarrow\eval{0.1234555}$ 
-
-\verb`$ \eval{ 0.1234565 } $`  $\Longrightarrow\eval{0.1234565}$ 
-\end{centred}
-The calculational engine which \texttt{numerica} uses, \texttt{l3fp},
-works to 16 significant figures and never displays more than that
-number (and often less). 
-\begin{itemize}
-\item In the first of the following although I have specified a rounding
-value of $19$ only $16$ decimal places are displayed, with the final
-digit rounded up to $7$; 
-\item in the second I have added $10$ zeros after the decimal point, meaning
-that all $19$ decimal places specified by the rounding value can
-be displayed since the 10 initial zeros do not contribute to the significant
-figures; 
-\item in the third I have changed the figure \emph{before} the decimal point
-to $1$ so that the $10$ added zeros are now included among the significant
-figures; 
-\item and in the fourth, I have added $9$ digits before the decimal point:
-\end{itemize}
-\begin{centred}
-\verb`$ \eval{ 0.1234567890123456789 }[19] $` $\Longrightarrow$
-$\eval{ 0.1234567890123456789 }[19]$
-
-\verb`$ \eval{ 0.00000000001234567890123456789 }[19] $` $\Longrightarrow$
-$\eval{ 0.00000000001234567890123456789 }[19]$
-
-\verb`$ \eval{ 1.00000000001234567890123456789 }[19] $` $\Longrightarrow$
-$\eval{ 1.00000000001234567890123456789 }[19]$
-
-\verb`$ \eval{ 987654321.1234567890123456789 }[19] $` $\Longrightarrow$
-$\eval{ 987654321.1234567890123456789 }[19]$
-\end{centred}
-In all cases, no more than $16$ \emph{significant} figures are displayed,
-although the number of decimal places displayed may exceed $16$ as
-in the second example.
-
-It is possible to use \emph{negative} rounding values. Such a value
-zeroes the specified number of digits \emph{before} the decimal point.
-\begin{centred}
-\verb`$ \eval{ 987654321.123456789 }[-4] $` $\Longrightarrow$ $\eval{ 987654321.123456789 }[-4]$
-\end{centred}
-A rounding value of $0$ rounds to the nearest integer:
-\begin{centred}
-\verb`$ \eval{ 987654321.123456789 }[0] $` $\Longrightarrow$ $\eval{ 987654321.123456789 }[0]$
-\end{centred}
-If you wish to change the \emph{default} rounding value from $6$
-to some other value, this can be done by creating or editing a file
-\texttt{numerica.cfg} in a text editor; see §\ref{sec:settingsDefaults}.
-
-\subsection{Padding with zeros }
-
-\label{subsec:evalPadding-with-zeros}A result may contain fewer decimal
-places than the rounding value specifies, the trailing zeros being
-suppressed by default (this is how \texttt{l3fp} does it). Sometimes,
-perhaps for reasons of presentation like aligning columns of figures,
-it may be desirable to pad results with zeros. This is achieved by
-inserting an asterisk, {*}, into the final optional argument of the
-\verb`\eval` command:
-\begin{centred}
-\verb`$ \eval{ 1/4 }[4] $` $\Longrightarrow$ $ \eval{ 1/4 }[4] $,
-
-\verb`$ \eval{ 1/4 }[4*] $` $\Longrightarrow$ $ \eval{ 1/4 }[4*] $.
-\end{centred}
-
-\subsection{Scientific notation }
-
-\label{subsec:evalScientificNotation} The \texttt{l3fp} package can
-output numbers in scientific notation. For example, $1234$ is rendered
-as $\eval{1234}[e]$, denoting $1.234\times10^{3}$ , and $0.008$
-as $\eval{0.008}[e]$, denoting $8\times10^{-3}$. The `e' here,
-the \emph{exponent mark}, separates the \emph{significand} ($1.234$)
-from the \emph{exponent} ($3$). To switch on output in scientific
-notation in \texttt{numerica} enter \texttt{e} in the trailing optional
-argument: 
-\begin{centred}
-\verb`$ \eval{ 123456789 }[e] $` $\Longrightarrow$  $ \eval{ 123456789 }[e] $. 
-\end{centred}
-The default rounding value $6$ is in play here. In \texttt{numerica},
-when scientific notation is selected rounding takes a different meaning:
-it is the \emph{significand }which is rounded (not the number as a
-whole). One digit precedes the decimal point, at most $15$ follow
-it. 
-
-Negative rounding values are pointless for scientific notation. A
-zero might on occasion be relevant:
-\begin{centred}
-\verb`$ \eval{ 987654321 }[0e] $` $\Longrightarrow$ $ \eval{ 987654321 }[0e] $.
-\end{centred}
-Sometimes letters other than `e' are used to indicate scientific
-notation, like `E' or `d' or `D'. With a few exceptions, \texttt{numerica}
-allows any letter or text character to be used as the exponent marker:
-\begin{centred}
-\verb`\eval{$ 1/23456789 $}[4d]`\texttt{ $\Longrightarrow$} \eval{$ 1/23456789 $}[4d].
-\end{centred}
-But when \texttt{x} is inserted in the trailing optional argument,
-the output is in the form $d_{0}.d_{1}\ldots d_{m}\times10^{n}$ (except
-when $n=0$), where each $d_{i}$ denotes a digit.
-\begin{centred}
-\verb`\eval{$ 1/23456789 $}[4x]`\texttt{ $\Longrightarrow$ }\eval{$ 1/23456789 $}[4x] .
-\end{centred}
-The requirements of tables leads to another form of scientific notation.
-Placing \texttt{t} in the trailing argument turns on this table-ready
-form of notation:
-\begin{centred}
-\verb`\eval{$ 1/23456789 $}[4t]`\texttt{ $\Longrightarrow$ }\eval{$ 1/23456789 $}[4t].
-\end{centred}
-This is discussed more fully in the associated document \texttt{numerica-tables.pdf}.
-
-In the next example three options are used in the trailing argument.
-The order in which the items are entered does not matter: 
-\begin{centred}
-\verb`\eval{$ 1/125 $}[*e4]`  $\Longrightarrow$ \eval{$ 1/125 $}[*e4].
-\end{centred}
-Finally, to illustrate that `any' text character\footnote{Be sensible! An equals sign for instance might confuse \texttt{numerica}
-into thinking the number-format option is the vv-list, and will certainly
-confuse the reader.} save for \texttt{x} or \texttt{t} can be used to distinguish the
-exponent, I use an @ character:
-\begin{centred}
-\verb`\eval{$ 1/123 $}[@4]` $\Longrightarrow$ \eval{$ 1/123 $}[@4].
-\end{centred}
-
-\subsubsection{Numbers in \texttt{{[}1,10)}}
-
-Usually when scientific notation is being used, numbers with magnitude
-in the interval $[1,10)$ are rendered in their normal decimal form,
-$3.14159$ and the like. Occasionally it may be desired to present
-numbers in this range in scientific notation (this can be the case
-in tables where the alignment of a column of figures might be affected).
-\texttt{numerica} offers a means of extending scientific notation
-to numbers in this range by adding a prime to the letter chosen as
-the exponent mark in the trailing optional argument.
-\begin{centred}
-\verb`\eval{$ \pi $}[4t']` $\Longrightarrow$ \eval{$ \pi $}[4t'] 
-\end{centred}
-
-\subsubsection{\textbackslash eval{*} and scientific notation}
-
-Scientific notation can be used for the numerical result output by
-\verb`\eval*`:
-\begin{centred}
-\verb`\eval*{$ \pi $}[e']` $\Longrightarrow$ \eval*{$ \pi $}[e'] 
-\end{centred}
-There is one catch: if you substitute \texttt{x} for \texttt{e} here,
-\LaTeX{} will complain about a missing \verb`$`. An \texttt{x} in
-the number-format option produces a \verb`\times` in the output which
-requires a math environment. It is up to you, as the user, to provide
-the necessary delimiters outside the \verb`\eval*` command. (This
-applies even when \verb`\eval*` wraps around math delimiters.)
-
-(Because of the way \texttt{numerica} parses the number-format option,
-entering a prime with neither exponent character nor question mark
-specified will result in scientific output using \texttt{e} as the
-exponent mark. The last example could have been written \verb`\eval*{$ \pi $}[']`.)
-
-\subsection{Boolean output}
-
-\label{subsec:evalBoolean-output}\texttt{l3fp} can evaluate comparisons,
-outputting $0$ if the comparison is false, $1$ if it is true. By
-entering a question mark, \texttt{?}, in the trailing optional argument,
-you can force \texttt{numerica} to do the same depending as the result
-of a calculation is zero or not. The expression being evaluated does
-not need to be a comparison, \verb`$ \eval{\pi}[?] $` $\Longrightarrow$ $ \eval{\pi}[?]$,
-but comparisons are what this is designed for.
-
-Possible comparison relations are \verb`=`, \verb`<`, \verb`>`,
-\verb`\ne`, \verb`\neq`, \verb`\ge`, \verb`\geq`, \verb`\le`,
-\verb`\leq`. Although programming languages use combinations like
-\verb`<=` or \verb`>=`, \texttt{numerica} does \emph{not} accept
-these (they are not part of standard \emph{mathematical} usage) and
-will generate an error. An example where the relation is equality
-exhibits a numerological curiosity:\footnote{The \texttt{{[}p=.{]}} of this and the next example ensures a full
-stop appears in the correct place; see §\ref{subsec:settingsPunctuation}.}
-\begin{centred}
-\verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[5?]` $\Longrightarrow$
-\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[5?]
-\end{centred}
-Notice the $5$ alongside the question mark in the trailing argument.
-That is critical. Change the $5$ to a $6$ (or omit it since the
-default rounding value is $6$) and the outcome is different: 
-\begin{centred}
-\verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?]` $\Longrightarrow$
-\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?]
-\end{centred}
-Now the relation is false. Evaluating the fraction to more than $6$
-places, say to $9$, we can see what is going on:
-\begin{centred}
-\verb`\eval{$ 1/0.0123456789 $}[9]` $\Longrightarrow$ \eval{$ 1/0.0123456789 $}[9]. 
-\end{centred}
-
-\subsubsection{Outputting \texttt{T} or \texttt{F}}
-
-To my eye, outputting $0$ or $1$ in response to a `question' like
-$1/0.0123456789=81$ is confusing. It is easy to change the boolean
-output from $0,1$ to a more appropriate $F,T$, or \texttt{$\texttt{F,\texttt{T}}$}
-by adding a prime or two primes respectively to the question mark
-in the number-format option.
-\begin{centred}
-\verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?'']` $\Longrightarrow$
-\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?'']
-\end{centred}
-The default boolean output format is chosen to be $0,1$ in case an
-\verb`\eval*` command is used within another \verb`\eval` command
-(`nesting'– see Chapter~\ref{chap:Nesting}~). The inner command
-needs to output a \emph{numerical} answer.
-
-\subsubsection{Rounding error tolerance}
-
-\label{subsec:evalToleranceRounding}If at least one of the terms
-in a comparison is the result of a calculation, then it's value is
-likely to contain rounding errors. What level of rounding error can
-we tolerate before such errors interfere with the comparison being
-made? \texttt{l3fp} tolerates none. It decides the truth or falsity
-of a comparison to all $16$ significant figures: 1.000 0000 0000
-0000 and 1.000 0000 0000 0001 are \emph{not }equal in \texttt{l3fp}.
-But for most purposes this will be far too severe a criterion.
-
-Suppose our comparison relation is $\varrho$, denoting one of =,
-<, >, \verb`\le`, etc. If $X\rel Y$ then $X-Y\rel Y-Y$, i.e. $X-Y\rel0$.
-This is what \texttt{numerica} does. It takes the right-hand side
-of the relation from the left-hand side and then compares the \emph{rounded}
-difference under $\varrho$ to $0$. The rounding value used is the
-number specified with the question mark in the trailing argument of
-the \verb`\eval` command or, if no number is present, the default
-rounding value (`out of the box' this is $6$). Thus, in a recent
-example, $1/0.0123456789-81$ when rounded to $5$ decimal places
-is \@.$0.00000$, indistinguishable from zero at this rounding value;
-hence the equality $1/0.0123456789=81$ is true. But when rounded
-to $6$ places it is $0.000001$ which \emph{is} distinguishable from
-zero and so the equality is false. Truth or falsity depends on the
-rounding value. 
-
-When dealing with numbers generated purely mathematically, rounding
-values of $5$ or $6$ are likely to be too small. More useful would
-be rounding values closer to \texttt{l3fp}'s $16$ – perhaps $14$?
-– depending on how severe the calculations are that generate the numbers.
-However if the numbers we are dealing with come from outside mathematics,
-from practical experiments perhaps, then even a rounding value of
-$5$ or $6$ may be too large. 
-
-\subsubsection{Rationale}
-
-Mathematically, the claim that $X=Y$ at a rounding value $n$ is
-the claim that 
-\[
-\abs{X-Y}\le5\times10^{-(n+1)}.
-\]
-since this rounds \emph{down} to zero at $n$ places of decimals.
-This gives a more accurate test of equality than doing things in the
-opposite order – rounding each number first and then taking the difference.
-One might, for instance, have numbers like $X=0.12345$, $Y=0.12335$.
-Rounding to $n=4$ places, both round to $0.1234$ and yet the difference
-between them is $0.0001$ – they are distinguishable numbers to $4$
-places of decimals. This is why \texttt{numerica} forms the difference
-\emph{before }doing the rounding.
-
-\subsubsection{And, Or, Not}
-
-For logical And \LaTeX{} provides the symbols \verb`\wedge` and \verb`\land`,
-both displaying as $\land$, but \texttt{numerica} adds thin spaces
-( \verb`\,` ) around the symbol for \verb`\land` (copying the package
-\texttt{gn-logic14.sty}). For logical Or \LaTeX{} provides the symbols
-\verb`\vee` and \verb`\lor`, both displaying as $\lor$, but again
-\texttt{numerica} adds thin spaces around the symbol for \verb`\lor`. 
-\begin{centred}
-\verb`\eval{$ 1<2 \wedge 2<3 $}[?'']` $\Longrightarrow$ \eval{$ 1<2 \wedge 2<3 $}[?''],
-
-\verb`\eval{$ 1<2 \land 2<3 $}[?'']` $\Longrightarrow$ \eval{$ 1<2 \land 2<3 $}[?''].
-\end{centred}
-To my eye the second of these with its smidgen more space around the
-wedge symbol displays the meaning of the overall expression better
-than the first. Both And and Or have equal precedence; in cases of
-ambiguity the user needs to parenthesize as necessary to clarify what
-is intended.
-
-\LaTeX{} provides two commands for logical Not, \verb`\neg` and \verb`\lnot`,
-both displaying as $\lnot$ . Not binds tightly to its argument:
-\begin{centred}
-\verb`\eval{$ \lnot A \land B $}[A=0,B=0]` $\Longrightarrow$ \eval{$ \lnot A \land B $}[A=0,B=0].
-\end{centred}
-Here \verb`\lnot` acts only on the $A$; if it had acted on $A\land B$
-as a whole the result would have been $1$.
-
-For a little flourish, I evaluate a more complicated logical statement:\footnote{Quoting from an article in \emph{Quanta Magazine} (August 2020) by
-Kevin Hartnett: `Let’s say you and two friends are planning a party.
-The three of you are trying to put together the guest list, but you
-have somewhat competing interests. Maybe you want to either invite
-Avery or exclude Kemba. One of your co-planners wants to invite Kemba
-or Brad or both of them. Your other co-planner, with an ax to grind,
-wants to leave off Avery or Brad or both of them. Given these constraints,
-you could ask: Is there a guest list that satisfies all three party
-planners?' I have written $C$ for Kemba, $A$ and $B$ for Avery
-and Brad.}
-\begin{verbatim}
-    \eval{$(A\lor\lnot C)\land(C\lor B)\land
-                (\lnot A\lor\lnot B)$}[A=1,B=0,C=1][?'']
-\end{verbatim}
-$\Longrightarrow$ \eval{$(A\lor\lnot C)\land(C\lor B)\land
-                (\lnot A\lor\lnot B)$}[A=1,B=0,C=1][?'']
-
-\subsubsection{Chains of comparisons}
-
-\texttt{numerica} can handle chains of comparisons like $1<2<1+2<5-1$.
-`Behind the scenes' it inserts logical And-s into the chain, $1<2\land2<1+2\land1+2<5-1$,
-and evaluates the modified expression:
-\begin{centred}
-\verb`\eval{$ 1<2<1+2<5-1 $}[?'']` $\Longrightarrow$ \eval{$ 1<2<1+2<5-1 $}[?''].
-\end{centred}
-
-\subsubsection{\texttt{amssymb} comparison symbols}
-
-\label{subsec:evalAmssymb-comparisons}\texttt{numerica} accepts some
-alternative symbols for the basic comparison relations from the \texttt{amssymb}
-package provided that package is loaded, i.e. the preamble of your
-document includes the statement
-\begin{lyxcode}
-\textbackslash usepackage\{amssymb\}
-\end{lyxcode}
-The variants from this package are: \verb`\leqq` ( $\leqq$ ), \verb`\leqslant`
-( $\leqslant$ ), \verb`\geqq` (~$\geqq$~), and \verb`\geqslant`
-( $\geqslant$ ).\footnote{No, that is not \texttt{eggplant}.} There
-are also negations: \verb`\nless` ( $\nless$ ), \verb`\nleq` (~$\nleq$~),
-\verb`\nleqq` ( $\nleqq$ ), \verb`\nleqslant` ( $\nleqslant$ ),
-\verb`\ngtr` ( $\ngtr$ ), \verb`\ngeq` ( $\ngeq$ ), \verb`\ngeqq`
-( $\ngeqq$ ), \verb`\ngeqslant` ( $\ngeqslant$ ).
-
-\section{Calculational details}
-
-\subsection{Arithmetic}
-
-\label{subsec:evalArithmetic}Addition, subtraction, multiplication,
-division, square roots, \emph{$n$}-th roots, and exponentiating (raising
-to a power) are all available. 
-
-Multiplication can be rendered explicitly with an asterisk, 
-\begin{centred}
-\verb`\eval{$ 9*9 $}` $\Longrightarrow$ \eval{$ 9*9 $},
-\end{centred}
-but that's ugly. More elegant is to use \verb`\times`:
-\begin{centred}
-\verb`\eval{$ 9\times9 $}` $\Longrightarrow$ \eval{$ 9\times9 $}.
-\end{centred}
-\verb`\cdot` is also available and in many cases juxtaposition alone
-suffices: 
-\begin{centred}
-\verb`\eval{$ \surd2\surd2 $}` $\Longrightarrow$ \eval{$ \surd2\surd2 $},
-
-\verb`\eval{$ ab $}[a=123,b=1/123]` $\Longrightarrow$ \eval{$ ab $}[a=123,b=1/123].
-\end{centred}
-Division can be rendered in multiple ways too:
-\begin{centred}
-\verb`\eval{$ 42/6 $}` $\Longrightarrow$ \eval{$ 42/6 $},
-
-\verb`\eval{$ 42\div6 $}` $\Longrightarrow$ \eval{$ 42\div6 $},
-\end{centred}
-or by using \verb`\frac` or \verb`\tfrac` or \verb`\dfrac` as in
-\begin{centred}
-\verb`\eval{$ \frac{42}6 $}` $\Longrightarrow$ \eval{$ \frac{42}6 $}.
-\end{centred}
-But note that since juxtaposition means multiplication, it is also
-true that $42\tfrac{1}{6}$\texttt{ }evaluates to $7$ inside an \verb`\eval`
-command rather than denoting `forty two and a sixth'. Hence if you
-want to use `two and a half' and similar values in \texttt{numerica},
-they need to be entered as improper fractions like $\tfrac{5}{2}$
-or in decimal form, $2.5$ (as one does automatically in mathematical
-expressions anyway because of the ambiguity in a form like $2\tfrac{1}{2}$).
-
-\subsubsection{Square roots and $n$-th roots}
-
-\label{subsec:evalSquareRootsEtc}Let us check that 3, 4, 5 and 5,
-12, 13 really are Pythagorean triples (I use \verb`\sqrt` in the
-first, \verb`\surd` in the second):
-\begin{centred}
-\verb`\eval{$ \sqrt{3^2+4^2} $}` $\Longrightarrow$ \eval{$\sqrt{3^{2}+4^{2}}$},
-
-\verb`\eval{$ \surd(5^2+12^2) $}` $\Longrightarrow$ \eval{$ \surd(5^2+12^2) $}.
-\end{centred}
-The \verb`\sqrt` command has an optional argument which can be used
-for extracting $n$-th roots of a number. This notation is generally
-used when $n$ is a small positive integer like $3$ or $4$. This
-practice is followed in \texttt{numerica}: $n$ must be a (not necessarily
-small) \emph{positive integer}:
-\begin{centred}
-\verb`\eval{$ \sqrt[4]{81} $}` $\Longrightarrow$  \eval{$ \sqrt[4]{81} $},
-
-\verb`\eval{$ \sqrt[n]{125} $}[n=\floor{\pi}]` $\Longrightarrow$
-\eval{$ \sqrt[n]{125} $}[n=\floor{\pi}].
-\end{centred}
-If $n$ should not be a positive integer, an error message is generated;
-see §\ref{sec:evalErrors}.
-
-For display-style expressions, the \verb`\sqrt` command grows to
-accommodate the extra vertical height; the surd doesn't. Here is an
-example which anticipates a number of matters not discussed yet. It
-shows \verb`\eval` wrapping around a square root containing various
-formatting commands (negative spaces, \verb`\left` and \verb`\right`
-nested within \verb`\bigg` commands), all digested without complaint
-(see §\ref{subsec:evalFormatting-commands}; and see §\ref{subsec:settingsPunctuation}
-for the \verb`[p=.]`): \medskip{}
-\begin{verbatim}
-    \eval[p=.]
-      {\[ 
-        \sqrt[3]
-          {\!\biggl(\!\left.\frac AD\right/\!\frac BC\biggr)}
-      \]}[A=729,B=81,C=9,D=3]
-\end{verbatim}
-$\Longrightarrow$\eval[p=.]
-  {\[ 
-    \sqrt[3]
-      {\!\biggl(\!\left.\frac AD\right/\!\frac BC\biggr)}
-  \]}[A=729,B=81,C=9,D=3]
-
-As implemented in \texttt{numerica}, $n$-th roots found using \verb`\sqrt[n]`
-are \verb`n=<integer>`\emph{ }roots. This raises an interesting question:
-if the `$n$' of an $n$-th root is the result of a calculation,
-what happens with rounding errors? The calculation may not produce
-an \emph{exact} integer. (This problem also arises with factorials;
-see §\ref{subsec:evalFactorialsBinom}.) The solution employed in
-\texttt{numerica} is to make what is considered an integer depend
-on a rounding value. Most calculations will produce rounding errors
-in distant decimal places. For `int-ifying' calculations, \texttt{numerica}
-uses a rounding value of $14$: a calculation produces an integer
-if, when rounded to $14$ figures, the result is an integer. Since
-\texttt{l3fp} works to $16$ significant figures, a rounding value
-of $14$ allows ample `elbowroom' for rounding errors to be accommodated
-when judging what is an integer and what is not. As a practical matter
-problems should not arise. 
-
-\subsubsection{\emph{n}-th roots of negative numbers}
-
-Odd (in the sense of `not even') integral roots of \emph{negative}
-numbers are available with \verb`\sqrt`,
-\begin{centred}
-\verb`\eval{$ \sqrt[3]{-125} $}` $\Longrightarrow$ \eval{$ \sqrt[3]{-125} $},
-
-\verb`\eval{$ \sqrt[3]{-1.25} $}` $\Longrightarrow$ \eval{$ \sqrt[3]{-0.125} $}.
-\end{centred}
-
-\subsubsection{Inverse integer powers }
-
-Of course to find an $n$-th root we can also raise to the inverse
-power,
-\begin{centred}
-\verb`\eval{$ 81^{1/4} $}` $\Longrightarrow$ \eval{$ 81^{1/4} $}.
-\end{centred}
-However, raising a \emph{negative} number to an inverse power generates
-an error even when, mathematically, it should not. This matter is
-discussed below in §\ref{subsec:errorsInverse-powers}.
-
-\subsection{Precedence, parentheses}
-
-The usual precedence rules apply: multiplication and division bind
-equally strongly and more strongly than addition and subtraction which
-bind equally stongly. Exponentiating binds most strongly. Evaluation
-occurs from the left.
-\begin{centred}
-\verb`\eval{$ 4+5\times6+3 $}` $\Longrightarrow$ \eval{$ 4+5\times6+3 $},
-
-\verb`\eval{$ 6\times10^3/2\times10^2 $}` $\Longrightarrow$ \eval{$ 6\times10^3/2\times10^2 $},
-\end{centred}
-which may not be what was intended. Parentheses (or brackets or braces)
-retrieve the situation:
-\begin{centred}
-\verb`\eval{$ (4+5)(6+3) $}` $\Longrightarrow$ \eval{$ (4+5)(6+3) $},
-
-\verb`\eval{$ (6\times10^3)/(2\times10^2) $}` $\Longrightarrow$
-\eval{$ (6\times10^3)/(2\times10^2) $}.
-\end{centred}
-Because exponentiating binds most strongly, negative values must be
-parenthesized when raised to a power. If not,
-\begin{centred}
-\verb`\eval{$ -4^2 $}` $\Longrightarrow$ \eval{$ -4^2 $},
-\end{centred}
-which is clearly not $(-4)^{2}$. But
-\begin{centred}
-\verb`\eval{$ (-4)^2 $}` $\Longrightarrow$ \eval{$ (-4)^2 $}.
-\end{centred}
-
-\subsubsection{Command-form brackets}
-
-\label{subsec:evalCommandBrackets}Note that brackets of all three
-kinds are available also in command form: \verb`\lparen \rparen`
-(from \verb`mathtools`) for \verb`( )`, \verb`\lbrack \rbrack`
-for \verb`[ ]`, and \verb`\lbrace \rbrace` for \verb`\{ \}`.
-
-\subsection{Modifiers\texttt{ (\textbackslash left \textbackslash right}, etc.)}
-
-The  \verb`\left` and \texttt{\textbackslash right} modifiers and
-also the series of \verb`\big...` modifiers\texttt{ }(\texttt{\textbackslash}\verb`bigl \bigr`,
-\verb`\Bigl \Bigr`, \verb`\biggl \biggr`, \verb`\Biggl \Biggr`)
-are available for use with all brackets (parentheses, square brackets,
-braces):
-\begin{verbatim}
-    \eval[p=.]{\[ \exp\left(
-        \dfrac{\ln2}{4}+\dfrac{\ln8}{4} 
-      \right) \]}
-\end{verbatim}
-$\Longrightarrow$ \eval[p=.]{\[ \exp\left( \dfrac{\ln2}{4}+\dfrac{\ln8}{4} \right) \]}
-
-\texttt{numerica} also accepts their use with \texttt{.} (dot) and
-with \texttt{/} (as noted earlier, the \verb`[p]` and \verb`[p=.]`
-are explained at §\ref{subsec:settingsPunctuation}):
-\begin{centred}
-\verb`\eval[p]{\[ \left.\dfrac{3+4}{2+1}\right/\!\dfrac{1+2}{4+5} \]}`
-$\Longrightarrow$ \eval[p=.]{\[ \left. \dfrac{3+4}{2+1} \right/\!\dfrac{1+2}{4+5} \]}
-\end{centred}
-They can be nested.
-
-\subsection{Other formatting commands}
-
-\label{subsec:evalFormatting-commands}There are many formatting commands
-which change the layout of a formula on the page but do not alter
-its content. These include various spacing commands like \verb`\!`,
-\verb`\quad`, etc., phantoms (\verb`\phantom` etc.), \verb`\mathstrut`
-from \TeX{} and its \verb`mathtools` cousin \verb`\xmathstrut`.
-
-Consider the same package's \verb`\splitfrac` and \verb`\splitdfrac`.
-The \verb`mathtools` documentation gives an example to illustrate
-the use of these last two. I've mangled it to produce a ridiculous
-illustration of their use, and of the modifiers \verb`\left \right`,
-and of the command-form alternatives to parentheses \verb`\lparen \rparen`;
-also the use of \verb`\dfrac`. A little mental arithmetic will convince
-that we are evaluating the square root of $(9\times7)^{2}$ which
-indeed is what we get:\footnote{For the \texttt{{[}p=.,vvd={]}} see §\ref{subsec:settingsPunctuation}
-and §\ref{subsec:settingsVvDisplayChangeLocal}. The first puts the
-concluding full stop in the right place; the second suppresses the
-vv-list.} \medskip{}
-\begin{verbatim}
-	\eval[p=.,vvd=]{\[
-    \sqrt{\left\lparen
-      \frac{ \splitfrac{xy + xy + xy + xy + xy}
-              {+ xy + xy + xy + xy}
-           }
-           { \dfrac z7}
-          \right\rparen \left\lparen
-            \frac{ \splitdfrac{xy + xy + xy + xy + xy}
-                     {+ xy + xy + xy + xy}
-                 }
-                 {\dfrac z7}\right\rparen}
-      \]}[x=2,y=5,z=10]
-\end{verbatim}
-$\Longrightarrow$\eval[p=.,vvd=]{\[
-    \sqrt{\left\lparen
-      \frac{ \splitfrac{xy + xy + xy + xy + xy}
-              {+ xy + xy + xy + xy}
-           }
-           { \dfrac z7}
-          \right\rparen \left\lparen
-            \frac{ \splitdfrac{xy + xy + xy + xy + xy}
-                     {+ xy + xy + xy + xy}
-                 }
-                 {\dfrac z7}\right\rparen}
-      \]}[x=2,y=5,z=10]\texttt{numerica} essentially ignores formatting commands (the ones
-it knows of). They do not alter the mathematical content of a formula,
-only how it looks. But there will undoubtedly be formatting commands
-it does not recognize which will probably trigger an `Unknown token'
-message. Please contact the author in that case.\footnote{ajparsloe at gmail.com}
-
-\subsection{Trigonometric \& hyperbolic functions}
-
-\LaTeX{} provides all six trignometric functions, \verb`\sin`, \verb`\cos`,
-\verb`\tan`, \verb`\csc`, \verb`\sec`, \verb`\cot` and the three
-principal inverses \verb`\arcsin`, \verb`\arccos`, \verb`\arctan`.
-It also provides four of the six hyperbolic functions: \verb`\sinh`,
-\verb`\cosh`, \verb`\tanh`, \verb`\coth`, and \emph{no} inverses.
-\texttt{numerica} provides the missing hyperbolic functions, \verb`\csch`
-and \verb`\sech`, and all missing inverses, the three trigonometric
-and all six hyperbolic: \verb`\arccsc`, \verb`\arcsec`, \verb`\arccot`,
-and \verb`\asinh`, \verb`\acosh`, \verb`\atanh`, \verb`\acsch`,
-\verb`\asech`, \verb`\acoth`. (\emph{HMF} writes $\text{arcsinh}$,
-$\text{arccosh}$, etc. and ISO recommends $\text{arsinh}$, $\text{arcosh}$,
-etc. The first seems ill-advised, the second not widely adopted. At
-present neither is catered for in \texttt{numerica}.)\emph{ }
-\begin{centred}
-\verb`\eval{$ \arctan1/1\deg $}` $\Longrightarrow$ \eval{$ \arctan 1/1\deg $} ,
-
-\verb`\eval{$ \atanh\tanh3 $}` $\Longrightarrow$ \eval{$ \atanh\tanh3 $} .
-\end{centred}
-Inverses can also be constructed using the `$-1$' superscript notation.
-Thus
-\begin{centred}
-\verb`\eval{$ \sin^{-1}(1/\surd2)/1\deg $}` $\Longrightarrow$ \eval{$ \sin^{-1}(1/\surd2)/1\deg $} ,
-
-\verb`\eval{$ \tanh\tanh^{-1}0.5 $}` $\Longrightarrow$ \eval{$ \tanh\tanh^{-1}0.5 $} .
-\end{centred}
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-
-\subsubsection*{Hyperbolic functions}
-
-Please note that \texttt{l3fp} does not (as yet) provide \emph{any}
-hyperbolic functions natively. The values \texttt{numerica} provides
-for these functions are \emph{calculated} values using familiar formulas
-involving exponentials (for the direct functions) and natural logarithms
-and square roots for the inverses. Rounding errors mean the values
-calculated may not have $16$-figure accuracy. The worst `offenders'
-are likely to be the least used, \verb`\acsch` and \verb`\asech`.
-For instance,
-\[
-\acsch x=\ln\left[\frac{1}{x}+\left(\frac{1}{x^{2}}+1\right)^{1/2}\right],
-\]
-
-\begin{centred}
-\verb`\eval{$ \csch \acsch 7 $}[16]` $\Longrightarrow$ \eval{$ \csch \acsch 7 $}[16].
-\end{centred}
-\end{shaded}%
-\end{minipage}
-
-\subsection{Logarithms}
-
-The natural logarithm \verb`\ln`, base $10$ logarithm \verb`\lg`,
-and binary or base $2$ logarithm \verb`\lb` are all recognized,
-as is \verb`\log`, preferably with a subscripted base:
-\begin{centred}
-\verb`\eval{$ \log_{12}1728 $}` $\Longrightarrow$ \eval{$ \log_{12}1728 $}
-\end{centred}
-If there is no base indicated, base $10$ is assumed. (The notations
-\verb`\ln`, \verb`\lg`, and \verb`\lb` follow ISO 80000-2 recommendation,
-which frowns upon the use of the unsubscripted \verb`\log` although
-only \verb`\ln` appears widely used.) The base need not be explicitly
-entered as a number. It could be entered as an expression or be specified
-in the vv-list:
-\begin{centred}
-\verb`\eval*{$ \log_b c $}[b=2,c=1024]` $\Longrightarrow$ \eval*{$ \log_b c $}[b=2,c=1024],
-\end{centred}
-the log to base $2$ in this case. It is possible to use the unadorned
-\verb`\log` with a base different from $10$; if you wish to do this
-only for a particular calculation see §\ref{subsec:settingsLogBase},
-or see §\ref{sec:settingsDefaults} if you want to make this default
-behaviour.
-
-\subsection{Other unary functions}
-
-Other unary functions supported are the exponential function \verb`\exp`
-and signature function \verb`\sgn` (equal to $-1$, $0$, or $1$
-depending as its argument is $<0$, $=0$, or $>0$). 
-
-\subsection{Squaring, cubing, \ldots unary functions}
-
-\texttt{numerica} has no difficulty reading a familiar but `incorrectly
-formed' expression like 
-\[
-\sin^{2}1.234+\cos^{2}1.234.
-\]
-You do not have to render it $(\sin1.234)^{2}+(\cos1.234)^{2}$ or
-(heaven forbid) $(\sin(1.234))^{2}+(\cos(1.234))^{2}$. The everyday
-usage is fine:
-\begin{centred}
-\verb`\eval{$ \sin^2\theta+\cos^2\theta $}[\theta=1.234]` $\Longrightarrow$
-\eval{$ \sin^2\theta+\cos^2\theta $}[\theta=1.234] .
-\end{centred}
-Equally \texttt{numerica} has no difficulty reading the `correct'
-but pedantic form
-\begin{centred}
-\verb`\eval{$ (\sin(\theta))^2+(\cos(\theta))^2 $}[\theta=1.234]`
-$\Longrightarrow$ \eval{$ (\sin(\theta))^2+(\cos(\theta))^2 $}[\theta=1.234] .
-\end{centred}
-A hyperbolic identity is confirmed in this example:
-\begin{centred}
-\verb`\eval{$ \sinh 3x $}[x=1]` $\Longrightarrow$ \eval{$ \sinh 3x $}[x=1],\medskip{}
-
-\verb`\eval{$ 3\sinh x+4\sinh^3x $}[x=1]` $\Longrightarrow$ \eval{$ 3\sinh x+4\sinh^3x $}[x=1].
-\end{centred}
-In fact all named unary functions in \texttt{numerica} can be squared,
-cubed, etc., in this `incorrect' but familiar way, although the
-practice outside the trigonometric and hyperbolic context seems (vanishingly?)
-rare.
-
-When the argument of the function is parenthesized and raised to a
-power – like $\sin(\pi)^{2}$ – it is read by \texttt{numerica} as
-the `sine of the square of pi', $\sin(\pi^{2})$, and \emph{not
-}as the `square of the sine of pi', $(\sin\pi)^{2}$:
-\begin{centred}
-\verb`\eval{$ \sin(\pi)^2 $}` $\Longrightarrow$ \eval{$ \sin(\pi)^2  $} .
-\end{centred}
-Things are done like this in \texttt{numerica} above all to handle
-the logarithm in a natural way. Surely $\ln x^{n}=n\ln x=\ln(x^{n})$
-rather than $(\ln x)^{n}$? And if we wish to write (as we do) $\ln(1+1/n)^{n}=n\ln(1+1/n)=1-1/2n+1/3n^{2}-\ldots$
-to study the limiting behaviour of $(1+1/n)^{n}$, then we cannot
-avoid $\ln(x)^{n}=n\ln(x)=\ln(x^{n})$.
-
-\subsection{\emph{n}-ary functions}
-
-The functions of more than one variable ($n$-ary functions) that
-\texttt{numerica} supports are \verb`\max`, \verb`\min` and \verb`\gcd`,
-greatest common divisor. The comma list of arguments to \verb`\max`,
-\verb`\min` or \verb`\gcd` can be of arbitrary length. The arguments
-themselves can be expressions or numbers. For \verb`\gcd`, non-integer
-arguments are truncated to integers. Hence both $y$ and $3y$ are
-independently truncated in the following example – to $81$ and $243$
-respectively:
-\begin{centred}
-\verb`\eval{$ \gcd(12,10x^2,3y,y,63) $}[y=1/0.0123456789,x=3]` $\Longrightarrow$
-\eval{$ \gcd(12,10x^2,3y,y,63) $}[y=1/0.0123456789,x=3] .
-\end{centred}
-(The truncation occurs in the argument of \verb`\gcd`, not in the
-vv-list.) 
-
-For $n$-ary functions, squaring, cubing, etc. follows a different
-pattern from that for unary functions. For \verb`\max`, \verb`\min`,
-\verb`\gcd` the argument of the function is a comma list. Squaring
-the argument makes no sense. We understand the superscript as applying
-to the function as a whole. (Consistency is not the point here; it
-is what mathematicians do that \texttt{numerica} tries to accommodate.)
-\begin{centred}
-\verb`\eval{$ \gcd(3x,x,\arcsin 1/\deg)^2 $}[x=24]` $\Longrightarrow$
-\eval{$ \gcd(3x,x,\arcsin 1/\deg)^2 $}[x=24] .
-\end{centred}
-
-\subsection{Delimiting arguments with brackets \& modifiers }
-
-Arguments of unary and $n$-ary functions can be delimited not only
-with parentheses, but also with square brackets and braces, both in
-explicit character form and also in the command form of §\ref{subsec:evalCommandBrackets}.
-The brackets, of whatever kind, can be qualified with \verb`\left \right`,
-\verb`\bigl \bigr`, etc.\footnote{See §\ref{subsec:settingsPunctuation} for the \texttt{{[}p=.{]}}
-(which ensures the concluding full stop appears in the correct place.} 
-\begin{centred}
-\verb`\eval[p=.]{\[ \sin\left\lbrack \dfrac\pi{1+2+3}\right\rbrack \]}`
-$\Longrightarrow$\eval[p=.]{\[ \sin\left\lbrack\dfrac\pi{1+2+3}\right\rbrack \]}
-\end{centred}
-
-\subsection{Absolute value, floor \& ceiling functions}
-
-It is tempting to use the \texttt{|} key on the keyboard for inserting
-an absolute value sign. \texttt{numerica} accepts this usage, but
-it is deprecated. The spacing is incorrect – compare $|-l|$ using
-\texttt{|} against $\lvert-l\rvert$ using \verb`\lvert \rvert`.
-Also, the identity of the left and right delimiters makes nested absolute
-values difficult to parse. \texttt{numerica} does not attempt to do
-so. Placing an absolute value constructed with \texttt{|} within another
-absolute value constructed in the same way is likely to produce a
-compilation error or a spurious result. \verb`\lvert \rvert` are
-better in every way except ease of writing.\texttt{ }To aid such ease
-\texttt{numerica }provides the \verb`\abs` function (using the \texttt{\textbackslash DeclarePairedDelimiter}
-command of the \texttt{mathtools} package). This takes a mutually
-exclusive star (asterisk) or square bracketed optional argument, and
-a mandatory braced argument. The starred form expands to \verb`\left\lvert #1 \right\rvert`
-where \verb`#1` is the mandatory argument:
-\begin{centred}
-\verb`\eval[p=.]{\[ 3\abs*{\frac{\abs{n}}{21}-1} \]}[n=-7]` $\Longrightarrow$
-\eval[p=.]{\[ 3\abs*{\frac{\abs{n}}{21}-1} \]}[n=-7]
-\end{centred}
-The optional argument provides access to the \verb`\big...` modifiers:
-\begin{verbatim}
-    \eval[p=.]{\[
-      \abs[\Big]{\abs{a-c}-\abs[\big]{A-C}} 
-    \]}[A=12,a=-10,C=7,c=-5] 
-\end{verbatim}
-$\Longrightarrow$     \eval[p=.]{\[ 
-      \abs[\Big]{\abs{a-c}-\abs[\big]{A-C}} 
-    \]}[A=12,a=-10,C=7,c=-5] 
-
-The form without either star or square bracket option dispenses with
-the modifiers altogether:
-\begin{centred}
-\verb`\eval{$ \tfrac12(x+y)+\tfrac12\abs{x-y} $}[x=-3,y=7].` $\Longrightarrow$
-\eval{$ \tfrac12(x+y)+\tfrac12\abs{x-y} $}[x=-3,y=7].
-\end{centred}
-As noted, the star and square bracketed option are mutually exclusive
-arguments.
-
-\texttt{numerica} also provides the functions \verb`\floor` and \verb`\ceil`,
-defined in the same way, taking a mutually exclusive star or square
-bracketed optional argument and for the starred forms expanding to
-\verb`\left\lfloor #1 \right\rfloor` and \verb`\left\lceil #1 \right\rceil`
-where \verb`#1` is the mandatory argument, and for the square bracket
-option forms replacing the \verb`\left` and \verb`\right` with the
-corresponding \verb`\big` commands. The form without star or square-bracket
-option dispenses with any modifier at all.
-\begin{centred}
-\verb`\eval{$ \floor{-\pi} $}` $\Longrightarrow$ \eval{$ \floor{-\pi} $},
-
-\verb`\eval{$ \ceil{\pi} $}` $\Longrightarrow$ \eval{$ \ceil{\pi} $}.
-\end{centred}
-The floor function, $\lfloor x\rfloor$, is the greatest integer $\le x$;
-the ceiling function, $\lceil x\rceil$ is the smallest integer $\ge x$.
-Like the absolute value, the floor and ceiling functions, can be nested: 
-\begin{centred}
-\verb`\eval{$ \floor{-\pi+\ceil{e}} $}` $\Longrightarrow$ \eval{$ \floor{-\pi+\ceil{e}} $}.
-\end{centred}
-
-\subsubsection{Squaring, cubing, \ldots{} absolute values, etc.}
-
-These three functions can be raised to a power \emph{without} extra
-parentheses:
-\begin{centred}
-\verb`\eval{$ \ceil{e}^2 $},` $\Longrightarrow$ \eval{$ \ceil{e}^2 $},
-
-\verb`\eval{$ \abs{-4}^2 $}.` $\Longrightarrow$ \eval{$ \abs{-4}^2 $}.
-\end{centred}
-
-\subsection{Factorials, binomial coefficients}
-
-\label{subsec:evalFactorialsBinom}Factorials use the familiar trailing
-\texttt{!} notation: 
-\begin{centred}
-\verb`\eval{$ 7! $}` $\Longrightarrow$ \eval{$ 7! $},
-
-\verb`\eval{$ (\alpha+\beta)!-\alpha!-\beta! $}[\alpha=2,\beta=3]`
-$\Longrightarrow$ \eval{$ (\alpha+\beta)!-\alpha!-\beta! $}[\alpha=2,\beta=3].
-\end{centred}
-The examples illustrate how \texttt{numerica} interprets the argument
-of the factorial symbol:\texttt{ }it `digests' 
-\begin{enumerate}
-\item a preceding (possibly multi-digit) integer, or
-\item a preceding variable token, or
-\item a bracketed expression, or
-\item a bracket-like expression – an absolute value, floor or ceiling function,
-\end{enumerate}
-since they delimit arguments in a bracket-like way:
-\begin{centred}
-\verb`\eval{$ \abs{-4}!+\floor{\pi}!+\ceil{e}! $}` $\Longrightarrow$
-\eval{$ \abs{-4}!+\floor{\pi}!+\ceil{e}! $}.
-\end{centred}
-The result of feeding the factorial an expression different in kind
-from one of these four cases may give an error message or an unexpected
-result. Use parentheses around such an expression; for example write
-$(3^{2})!$, rather than $3^{2}!$.
-
-Nesting of brackets for factorials is accepted:
-\begin{centred}
-\verb`\eval{$ ((5-2)!+1)! $}` $\Longrightarrow$ \eval{$ ((5-2)!+1)! $}.
-\end{centred}
-The factorials of negative integers or of non-integers are not defined
-in \texttt{numerica}. Again there is the problem met in relation to
-$n$-th roots of what happens if the argument of a factorial is the
-result of a calculation and rounding errors mean it is not an exact
-integer. This problem is unlikely to be of practical concern since
-\texttt{numerica} rounds the result of such a calculation by default
-to $14$ significant figures before offering it to the factorial.
-Since \texttt{l3fp} works to $16$ significant figures, there is ample
-`elbowroom' to accommodate rounding errors before the result of
-a calculation ceases to round to an integer. 
-
-\subsubsection{Double factorials}
-
-The double factorial, written $n!!,$ is the product $n(n-2)(n-4)\ldots\times4\times2$
-when $n$ is even and the product $n(n-2)(n-4)\ldots\times3\times1$
-when $n$ is odd. 
-\begin{centred}
-\verb`\eval{$ 6!! $}` $\Longrightarrow$ \eval{$ 6!! $},
-
-\verb`\eval{$ n!! $}[n=\sqrt{49}]` $\Longrightarrow$ \eval{$ n!! $}[n=\sqrt{49}],
-\end{centred}
-Since $n!=n!!(n-1)!!$ it follows that
-\[
-n!!=\frac{n!}{(n-1)!!}=\frac{(n+1)!}{(n+1)!!}.
-\]
-Putting $n=0$ in the outer equality shows that $0!!=1$. Now putting
-$n=0$ in the left equality gives $(-1)!!=1$. Double factorials therefore
-are defined for integers $\ge-1$.
-
-\subsubsection{Binomial coefficients}
-
-Binomial coefficients are entered in \LaTeX{} with the \verb`\binom`\textbf{
-}command. It takes two arguments and has a text-style version \verb`\tbinom`
-and a display-style version \verb`\dbinom`. As implemented in \texttt{numerica},
-these are \emph{generalised} binomial coefficients:
-\[
-\binom{x}{k}=\frac{x(x-1)\dots(x-k+1)}{k(k-1)\dots1},\quad(x\in\mathbb{R},~k\in\mathbb{N}),
-\]
-where $x$ need not be a non-negative integer, and where $\binom{x}{0}=1$
-by definition. Although the first (or upper) argument can be any real
-number, the lower argument \emph{must} be a non-negative integer.
-Thus, \verb`\eval{$ \tbinom53 $}` $\Longrightarrow$ \eval{$\tbinom53$},
-\verb`\eval{$ \tbinom70 $}` $\Longrightarrow$ \eval{$\tbinom70$},
-\verb`\eval{$ \tbinom{4.2}3 $}` $\Longrightarrow$ \eval{$\tbinom{4.2}3$},
-but if the second (or lower) argument of \verb`\binom` is \emph{not}
-a non-negative integer, \texttt{numerica} displays a message; see
-§\ref{subsec:errorsIntegerArgs}. 
-
-\subsection{Sums and products}
-
-\texttt{numerica} recognizes sums (\verb`\sum` displaying as $\sum$)
-and products (\verb`\prod` displaying as $\prod$), and expects both
-symbols to have lower and upper summation/product limits specified.
-The lower limit must be given in the form \emph{sum/prod variable
-= initial value}; the upper limit requires only the final value to
-be specified (although it can also be given in the form \emph{sum/prod
-variable = final value}). The values may be expressions depending
-on other variables and values but must evaluate to integers (or infinity
-– see §\ref{sec:settingsInfiniteSumsProds}). Evaluating to an integer
-means that they \emph{round} to an integer, using a rounding value
-that is set by default to $14$; (recall that \texttt{l3fp} works
-to $16$ significant figures). If a limit evaluates to a non-integer
-at this `int-ifying' rounding value, an error message results. (To
-change this `int-ifying' rounding value, see §\ref{subsec:defaultsIntifyingRounding}.)
-
-As an example of expressions in the limits, this example uses the
-floor and ceiling functions to convert combinations of constants to
-integers (the \verb`[p]` is explained in §\ref{subsec:settingsPunctuation}),
-\begin{centred}
-\verb`\eval[p]{\[ \sum_{n=\floor{\pi/e}}^{\ceil{\pi e}}n \]}` $\Longrightarrow$\eval[p]{\[ \sum_{n=\floor{\pi/e}}^{\ceil{\pi e}}n \]}
-\end{centred}
-\noindent (which is $\sum_{n=1}^{9}n$).\emph{ }If the upper limit
-is less than the lower limit the result is zero. Notice that there
-is no vv-list. The summation variable does not need to be included
-there unless there are other variables that depend on it. However,
-in the case
-\begin{centred}
-\verb`\eval[p]{\[ \sum_{k=1}^N\frac1{k^3} \]}[N=100][4]` $\Longrightarrow$
-\eval[p]{\[ \sum_{k=1}^N\frac1{k^3} \]}[N=100][4]
-\end{centred}
-the upper limit $N$ is necessarily assigned a value in the vv-list. 
-
-To the author it seems natural to enter the lower limit first, immediately
-after the \verb`\sum` command (the sum is \emph{from }something \emph{to}
-something), but no problem will accrue if the upper limit is placed
-first (after all, the appearance of the formula in the pdf is the
-same):
-\begin{centred}
-\verb`\eval[p=.]{\[ \sum^N_{k=1}\frac1{k^3} \]}[N=100][4]` $\Longrightarrow$
-\eval[p=.]{\[ \sum^N_{k=1}\frac1{k^3} \]}[N=100][4]
-\end{centred}
-Another example of a sum, using binomial coefficients this time, is 
-\begin{centred}
-\verb`\eval[p]{\[ \sum_{m=0}^5\binom{5}{m}x^m y^{5-m} \]}[x=0.75,y=2.25]`
-$\Longrightarrow$ \eval[p]{\[ \sum_{m=0}^5\binom{5}{m}x^m y^{5-m} \]}[x=0.75,y=2.25]
-\end{centred}
-which is just \verb`\eval{$(x+y)^5$}[x=0.75,y=2.25]` $\Longrightarrow$
-\eval{$ (x+y)^5 $}[x=0.75,y=2.25], or $3^{5}$.
-
-Now let's calculate a product:
-\begin{verbatim}
-    \eval[p]{\[
-      \prod_{k=1}^{100} 
-        \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
-          \]}[x=1][3]
-\end{verbatim}
-$\Longrightarrow$ \eval[p]{\[\prod_{k=1}^{100} \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)\]}[x=1][3]
-
-\noindent to be compared with \verb`\eval{$ \sinh 1 $}[3]` $\Longrightarrow$
-\eval{$ \sinh1 $}[3]. Obviously more terms than $100$ are required
-in the product to achieve 3-figure accuracy. 
-
-\subsubsection{Infinite sums and products}
-
-There is a strong urge to use $\infty$ in the upper limit of this
-product. Let's do so:
-\begin{verbatim}
-    \eval[p=.]{\[
-      \prod_{k=1}^{\infty} 
-        \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
-          \]}[x=1][3] 
-\end{verbatim}
-$\Longrightarrow$ \eval[p=.]
-  {\[
-    \prod_{k=1}^{\infty} 
-      \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
-  \]}[x=1][3] 
-
-\noindent Disappointingly, we still get the same result, deficient
-by $1$ in the third decimal place. Obviously \texttt{numerica} has
-not multiplied an infinite number of terms and, just as obviously,
-the finite number of terms it \emph{has} multiplied are too few. How
-\texttt{numerica} decides when to stop evaluating additional terms
-in an infinite sum or product is discussed later, §\ref{sec:settingsInfiniteSumsProds}.
-
-For this particular product the problem is that it converges slowly.
-Any criterion for when to stop multiplying terms or, for an infinite
-sum adding terms, seems bound to fail for some product or series.
-Presumably any stopping criterion must measure smallness in some way.
-But terms of the divergent harmonic series, $\sum(1/n)$ can always
-be found smaller than any value we care to specify. It is not surprising
-that a sufficiently slowly converging product or series falls foul
-of a given criterion.
-
-The default criterion however can be changed. Because this involves
-values assigned in the settings option of the \verb`\eval` command,
-I discuss infinite sums and products in the section discussing that
-optional argument; see §\ref{sec:settingsInfiniteSumsProds}.
-
-Other infinite sums converge more rapidly, and the default settings
-work admirably. For example \verb`\eval{$ (1+0.1234)^{4.321} $}`
-$\Longrightarrow$ \eval{$ (1+0.1234)^{4.321} $}. Using binomial
-coefficients we can express this as an infinite sum:\medskip{}
-\begin{verbatim}
-    \eval[p=.]{\[
-        \sum_{n=0}^{\infty}\binom{\alpha}{n}x^{n}
-           \]}[\alpha=4.321,x=0.1234]
-\end{verbatim}
-$\Longrightarrow$ \eval[p=.]
-  {\[
-    \sum_{n=0}^{\infty}\binom{\alpha}{n}x^{n}
-  \]}[\alpha=4.321,x=0.1234]
-
-\section{Error messages }
-
-\label{sec:evalErrors}There are two kinds of error in \texttt{numerica}:
-those in the underlying \LaTeX{} which are reported in the \LaTeX{}
-log, shown on the terminal, and generally halt compilation, and specifically
-\texttt{numerica}-related errors which do not halt compilation and
-produce messages displayed in the pdf where one would expect the result
-of the calculation to be. The original reason for doing things this
-way was to enable \texttt{numerica} to be used effectively with the
-instant preview facility of the document processor \LyX . More philosophically,
-one might view such errors as similar to grammatical errors or spelling
-mistakes in text. It is not clear that they should halt compilation.
-Hence strictly \texttt{numerica}-related errors leave brief messages
-in the pdf at the offending places.
-
-Before discussing specific error messages, note that there is a debug
-facility (of a sort) discussed below in §\ref{subsec:settingsDebug}. 
-
-Error messages are in two parts: a \emph{what} part and a \emph{where}
-part.
-
-\subsection{Mismatched brackets}
-
-\label{subsec:errorsMismatched-brackets}An unmatched left parenthesis
-or other left bracket (in this case a missing right parenthesis) usually
-results in a \texttt{numerica} error:
-\begin{centred}
-\verb`$\eval{\sin(\pi/(1+x)}[x=1]$` $\Longrightarrow$ $\eval{\sin(\pi/(1+x)}[x=1]$
-\end{centred}
-For the same error in the vv-list, the what-part remains unchanged
-but the where-part is altered:
-\begin{centred}
-\verb`$\eval{ 1+y }[x=1,y=\sin(\pi/(1+x)]$` $\Longrightarrow$ $\eval{ 1+y }[y=\sin(\pi/(1+x),x=1]$
-\end{centred}
-The \emph{what} message is the same; the \emph{where} is different.
-
-An unmatched right parenthesis or other right bracket (in this case
-a missing \emph{left} parenthesis) usually results in a similar \texttt{numerica}
-error:
-\begin{centred}
-\verb`$\eval{2((x+y)/(y+z)))^2}[x=1,y=2,z=3]$` $\Longrightarrow$
-\eval{2((x+y)/(y+z)))^{2}}[x=1,y=2,z=3]
-\end{centred}
-But note that an unmatched modifier like \verb`\left` or \verb`\right`
-is a \LaTeX{} error and is caught by \LaTeX{} before \texttt{numerica}
-can respond and so results in a terminal and logfile message. 
-
-\subsection{Unknown tokens}
-
-An `Unknown token' message can arise in a number of ways. If an
-expression involves a number of variables, some of which depend on
-others, their order in the vv-list matters: 
-\noindent \begin{center}
-\verb`$\eval{\tfrac12 vt}[t=2,v=gt,g=9.8]$` $\Longrightarrow$ \eval{\tfrac{1}{2}vt}[t=2,v=gt,g=9.8] 
-\par\end{center}
-
-The vv-list is evaluated from the \emph{right} so that in this example
-the variable \texttt{v} depends on a quantity \texttt{t} that is not
-yet defined. Hence the message. The remedy is to move \texttt{t} to
-the right of \texttt{v} in the vv-list.
-
-Similarly, if we use a variable in the formula that has not been assigned
-a value in the vv-list, we again get the `Unknown token' message,
-but this time the location is the formula:
-\begin{centred}
-\verb`$\eval{\pi r^2h}[r=3]$` $\Longrightarrow$ \eval{\pi r^{2}h}[r=3]
-\end{centred}
-The remedy obviously is to assign a value to \texttt{h} in the vv-list\texttt{.}
-
-The same message will result if a mathematical operation or function
-is used that has not been implemented in \texttt{numerica}:
-\begin{centred}
-\verb`$\eval{u \bmod v }[v=7,u=3]$` $\Longrightarrow$ \eval{u\bmod v}[v=7,u=3] 
-\end{centred}
-A missing comma in the vv-list will generally result in an unknown
-token message:
-\begin{centred}
-\verb`$\eval{axy}[a=3 y=2,x=1]$` $\Longrightarrow$ \eval{axy}[a=3y=2,x=1] 
-\end{centred}
-Because of the missing comma, \texttt{numerica} assumes \texttt{a}
-has the `value' \texttt{3y=2} and has no knowledge of \texttt{y}
-as a variable.
-
-The presence of multi-token variables can also cause this error message
-if the check for such variables is turned off; see §\ref{subsec:settingsMultitokSwitch}.
-
-\subsection{Other vv-list errors}
-
-Other errors that can occur with the vv-list are overlooked value
-assignments to variables, or missing commas. For the first, it is
-essential that we do actually give a value to all variables occuring
-in the vv-list:
-\begin{centred}
-\verb`$\eval{axy}[a=3,y=,x=1]$` $\Longrightarrow$ \eval{axy}[a=3,y=,x=1] 
-\end{centred}
-The remedy is obvious – assign a value to \texttt{$y$}. 
-
-\emph{Extra} commas in the vv-list should cause no problems:
-\begin{centred}
-\verb`$\eval{axy}[,a=3,,y=2,x=1,]$` $\Longrightarrow$ $\eval{axy}[,a=3,,y=2,x=1,]$ 
-\end{centred}
-
-\subsection{Inverse powers of negative numbers}
-
-\label{subsec:errorsInverse-powers}Inverse integer powers of positive
-numbers should always be possible, but raising a \emph{negative} number
-to an inverse power generates an error even when, mathematically,
-it should not: 
-\begin{centred}
-\verb`\eval{$ (-125)^{1/3} $}` $\Longrightarrow$ \eval{$ (-125)^{1/3} $}
-\end{centred}
-This is a feature of floating point arithmetic. When a number is raised
-to a rational power, say $p/q$ where $p$ and $q$ are non-zero integers,
-then the result is the $p$-th power of the $q$-th root of the number.
-Can a $q$-th root be taken? If our floating point system used (for
-ease of illustration) only $4$ significant digits, $p/q=1/3$ would
-be the fraction $3333/10^{4}$, an odd numerator over an even denominator.
-But a negative number does not possess an even ($10^{4}$-th) root. 
-
-\subsection{Integer argument errors}
-
-\label{subsec:errorsIntegerArgs}Some functions require integer arguments
-– factorials, the second argument of a binomial coefficient, and (in
-\texttt{numerica}) $n$-th roots using the optional argument of \texttt{\textbackslash sqrt};
-also summation and product variables. If integers are explicitly entered
-for these arguments there is no problem, but if the value of the argument
-is the result of a calculation, rounding errors require thinking about.
-What accumulation of rounding errors is \emph{too} much so that the
-result of the calculation \emph{cannot} be considered an integer?
-\texttt{numerica} is generous: in the default setup, if a calculation
-rounds to an integer at rounding value $14$ the result of the calculation
-is considered an integer (obviously, the integer resulting from the
-rounding). Since \texttt{l3fp} works to $16$ significant figures
-that gives ample room for rounding errors to `get lost in' and be
-ignored, while still ruling out such things as (recall the example
-in §\ref{subsec:evalBoolean-output}),
-\begin{centred}
-\verb`\eval{\[ \sum_{n=1}^N n \]}[N=1/0.0123456789]` $\Longrightarrow$
-\eval{\[ \sum_{n=1}^N n \]}[N=1/0.0123456789]
-\end{centred}
-where $N$ differs from $81$ not until the seventh decimal place. 
-
-The default rounding value of $14$ for `int-ifying' calculations
-can be changed: see §\ref{subsec:defaultsIntifyingRounding}.
-
-\subsection{Comparison errors}
-
-Should a user try to make a comparison using a combination like \verb`>=`
-rather than \verb`\geq`, \texttt{numerica} admonishes like this: 
-\begin{centred}
-\verb`$\eval{ \pi^e >= e^\pi }[?]$` $\Longrightarrow$ $\eval{ \pi^e >= e^\pi }[?]$
-\end{centred}
-(The relation is false by the way.) 
-
-\subsection{Invalid base for \texttt{\textbackslash log}}
-
-ISO recommends using \verb`\log` only with a subscripted base specified.
-Otherwise how is one to know whether the base is \verb`e` or $10$
-or $2$ or whatever? Nonetheless \texttt{numerica} assumes that when
-\verb`\log` is used unsubscripted, the base is 10. Suppose you want
-to make $12$ the base, but forget to put braces around the $12$:
-\begin{centred}
-\verb`$\eval{ \log_12 1728 }$` $\Longrightarrow$ $\eval{ \log_12 1728 }$
-\end{centred}
-Here, \texttt{numerica} has taken \texttt{1} as the base (and $21728$
-as the argument) of the logarithm and responds accordingly.
-
-\subsection{\texttt{l3fp} errors}
-
-Some errors arising at the \texttt{l3fp} level are trapped and a message
-displayed. 
-\begin{itemize}
-\item Dividing by zero
-\end{itemize}
-\begin{centred}
-\verb`$\eval{1/\sin x}[x=0]$` $\Longrightarrow$ \eval{1/\sin x}[x=0] 
-\end{centred}
-Note however that \verb`$\eval{1/\sin x}[x=\pi]$` $\Longrightarrow\,\eval{1/\sin x}[x=\pi]$,
-because of rounding errors in distant decimal places. No doubt this
-is true for other functions as well.
-\begin{itemize}
-\item Invalid operation
-\end{itemize}
-\begin{centred}
-\verb`$\eval{\arccos x}[x=2]$` $\Longrightarrow$ \eval{\arccos x}[x=2]
-\end{centred}
-In this case the inverse cosine has been fed a value of $x$ outside
-its domain of definition, the interval $[-1,1]$. Trying to evaluate
-an expression that resolves to $0/0$ also produces this message:
-\begin{centred}
-\verb`$\eval{\frac{1-y}{x-2}}[x=2,y=1]$`$\Longrightarrow$ \eval{\frac{1-y}{x-2}}[x=2,y=1]
-\end{centred}
-\begin{itemize}
-\item Overflow/underflow
-\end{itemize}
-The factorial (discussed in §\ref{subsec:evalFactorialsBinom}) provides
-an example of overflow:
-\begin{centred}
-\verb`$\eval{3249!}$`\texttt{ }$\Longrightarrow$ \eval{3249!} 
-\end{centred}
-This is hardly surprising since
-\begin{centred}
-\verb`$\eval{3248!}[x]$` $\Longrightarrow$ $\eval{3248!}[x]$.
-\end{centred}
-There is a limit on the size of exponents that \texttt{l3fp} can handle.
-A number in the form $a\times10^{b}$ must have $-10001\le b<10000$.
-If this is not the case an overflow or underflow condition occurs.
-As the examples show, an overflow condition generates a \texttt{numerica}
-error. For underflow, where the number is closer to $0$ than $10^{-10001}$,
-\texttt{l3fp} assigns a zero value to the quantity. \texttt{numerica}
-accepts the zero value.
-
-\chapter{Settings}
-
-\label{chap:Settings}A calculation is effected against a background
-of default values for various quantities. For a particular calculation,
-these values may not be appropriate; or you may have different preferences.
-The way to change settings for a particular calculation is through
-the settings option of \verb`\nmcEvaluate` discussed next. The way
-to change a \emph{default} setting is by creating a configuration
-file \texttt{numerica.cfg} discussed in §\ref{sec:settingsDefaults}.
-
-\section{Settings option}
-
-\label{sec:settingsOption}The second argument of the \verb`\nmcEvaluate`
-command is the settings option, delimited by square brackets. This
-option is a \emph{key=value} list, hence comma-separated. \emph{Key=value
-}lists tend to be wordy. For back-of-envelope calculations one wants
-to be able to `dash off' the calculation, hence the short, cryptic
-nsture of the keys. Most settings are generic, applicable not only
-to \verb`\nmcEvaluate` but also to other commands that are available
-if \texttt{numerica} is loaded with the \texttt{plus} option; see
-the associated document \texttt{numerica-plus.pdf}. 
-
-\subsection{\textquoteleft Debug\textquoteright{} facility}
-
-\label{subsec:settingsDebug}It is rather grandiose to call this a
-debug facility, but if a calculation goes wrong or produces a surprising
-result, \texttt{numerica} offers a means of examining some intermediate
-stages on the way to the final result. To use the facility, enter 
-\begin{lyxcode}
-dbg~=~<integer>
-\end{lyxcode}
-into the settings option. (White space around the equals sign is optional.) 
-\begin{itemize}
-\item \texttt{dbg=0 }turns off the debug function, displays the result or
-error message (this is the default);
-\item \texttt{dbg=1 }equivalent to \texttt{dbg=2{*}3{*}5{*}7};
-\end{itemize}
-The `magic' integers are the following primes and their products:
-
-\begin{table}[t]
-\centering
-\noindent \centering{}\caption{Settings options}
-\noindent \begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}>{\raggedright}p{4cm}}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{dbg}} & {\small int} & {\small debug `magic' integer} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{reuse}} & {\small int} & {\small form of result saved with }{\small{\small\verb`\nmcReuse`}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{\textasciicircum}} & {\small char} & {\small exponent mark for sci. notation input} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{xx}} & {\small int (0/1)} & {\small multi-token variable switch} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{()}} & {\small int (0/1/2)} & {\small trig. arg. parsing} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{o}} &  & {\small degree switch for trig. funcions} & \tabularnewline
-{\small\texttt{log}} & {\small num} & {\small base of logarithms for }{\small{\small\verb`\log`}} & {\small\texttt{10}}\tabularnewline
-{\small\texttt{vvmode}} & {\small int (0/1)} & {\small vv-list calculation mode} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{vvd}} & {\small token(s)} & {\small vv-list display-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 12mu plus 6mu minus 9mu(vv)}}\tabularnewline
-{\small\texttt{vvi}} & {\small token(s)} & {\small vv-list text-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{*} &  & {\small suppress equation numbering if }{\small\texttt{\textbackslash\textbackslash}}{\small{}
-in }{\small\texttt{vvd}} & \tabularnewline
-{\small\texttt{p}} & token(s) & {\small punctuation (esp. in display-style)} & {\small\texttt{,}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-
-\begin{itemize}
-\item \texttt{dbg=2} displays the vv-list after multi-token variables have
-been converted to their single token form, \texttt{\textbackslash\_nmca},
-\texttt{\textbackslash\_nmcb}, etc.;
-\item \texttt{dbg=3} displays the formula after multi-token variables have
-been converted to their single token form;
-\item \texttt{dbg=5} displays the stored variables and their evaluated values
-(\texttt{dbg=2} lists the values as expressions; here they have been
-evaluated); note that any saved values (Chapter~\ref{chap:Saving-and-retrieving})
-that have been loaded will also feature in this list which might lead
-to a messy display depending on the nature of those values;
-\item \texttt{dbg=7} displays the formula after it has been fp-ified (but
-before it has been fed to \texttt{l3fp} to evaluate);
-\begin{itemize}
-\item should the formula successfully evaluate, the result of the evaluation
-is also displayed.
-\end{itemize}
-\end{itemize}
-\vspace{-1ex}
-
-\begin{wraptable}{o}{0.5\columnwidth}%
-\centering{}\caption{Magic integers}\label{tab:settingsMagic-integers}
-\begin{center}
-\begin{tabular}{rrl}
-\toprule 
-integer &  & \multicolumn{1}{c}{factors}\tabularnewline
-\midrule 
-6 &  & 2,3\tabularnewline
-10 &  & 2,5\tabularnewline
-14 &  & 2,7\tabularnewline
-15 &  & 3,5\tabularnewline
-21 &  & 3,7\tabularnewline
-30 &  & 2,3,5\tabularnewline
-35 &  & 5,7\tabularnewline
-42 &  & 2,3,7\tabularnewline
-70 &  & 2,5,7\tabularnewline
-105 &  & 3,5,7\tabularnewline
-210 &  & 2,3,5,7\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}\end{wraptable}%
-To display two or more of these elements simultaneously, use the product
-of their debug numbers for the magic integer. This can be entered
-either as the multiplied-out product, or as the `waiting to be evaluated'
-product with asterisks (stars) between the factors. Thus \texttt{dbg=6}
-or \verb`dbg=2*3` display both the vv-list and formula after multi-token
-variables have been converted to single token form; \texttt{dbg=10}
-or \verb`dbg=2*5` display both the vv-list after multi-token variables
-have been converted to single token form and the recorded variables
-with their evaluated values. And similarly for the other magic integers
-listed. For other integers, if they are divisible by $2$ or $3$
-or $5$ or $7$, they will display the corresponding component. Both
-\texttt{dbg=210} and \verb`dbg=2*3*5*7` display all four elements,
-but rather than remembering this product, it suffices to put \texttt{dbg=1}.
-This is equivalent and displays all elements.
-
-The debug option uses an \texttt{aligned }or \texttt{align{*}} environment
-to display its wares, depending on the presence or absence of math
-delimiters around the \texttt{\textbackslash eval} command. In the
-next example I have used multi-token variables to illustrate the different
-elements in the debug display, and a chain of comparisons to show
-how \texttt{numerica} treats these (§\ref{subsec:evalBoolean-output}).
-\begin{verbatim}
-    \eval[dbg=1]{ a_1<2a_2<3a_3<\pi+e }
-      [a_1=\pi,a_2=\phi,a_3=e\gamma][6?'']
-\end{verbatim}
-$\Longrightarrow$     \eval[dbg=1]{ a_1<2a_2<3a_3<\pi+e }
-      [a_1=\pi,a_2=\phi,a_3=e\gamma][6?'']
-
-Note that the four elements are displayed in temporal order: first
-comes the vv-list after conversion of multi-token to single-token
-variables, then the formula in the single-token variables; these are
-created essentially at the same time. The vv-list is presented in
-left-to-right order because that is the direction of evaluation \emph{internally}
-in \texttt{numerica}. Next the stored values of the variables are
-displayed. These are the values \emph{after }evaluation. The fourth
-element both in the display and chronologically is the fp-ified formula;
-this is often a thicket of parentheses. The final element of the display
-and chronologically is the result of evaluating the formula. This
-is displayed only if $7$ is a factor of the \texttt{dbg} integer,
-and there is no error. 
-
-When interpreting the fp-form, one should be aware of differences
-between \texttt{numerica} and \texttt{l3fp}. In particular be aware
-that in \texttt{l3fp} function calls bind most tightly so that, for
-example, \verb`sin 2pi` evaluates not to zero but to $(\sin2)\times\pi$
-and \verb`sin x^2` evaluates to $(\sin x)^{2}$. This should not
-be of any concern to the user except as here in debug mode when interpreting
-fp-forms. 
-
-Finally, note that those mathematical operations that have no direct
-representation in \texttt{l3fp} contribute only their value to the
-fp-form. This applies to sums and products, double factorials and
-partly to binomial coefficients as illustrated in the followng (ridiculous)
-example:
-\begin{verbatim}
-    \eval[dbg=1]{\[ 
-      \sum_{n=1}^5 n + \binom{10}{m}
-        + \prod_{n=2}^5 (1-1/n) + m!! \][m=6]
-\end{verbatim}
-$\Longrightarrow$     \eval[dbg=1]{\[ 
-      \sum_{n=1}^5 n+\binom{10}{m}
-        +\prod_{n=2}^5(1-1/n) +m!! \]}[m=6]
-
-\noindent The various contributions to the overall result are displayed
-simply as numbers because \texttt{l3fp} does not (at least as yet)
-handle these elements natively.
-
-\subsubsection{Negative \texttt{dbg} values}
-
-Negative \texttt{dbg} values are possible: \texttt{dbg=-2}, \texttt{dbg=-3},
-etc. (and \texttt{dbg=-1} meaning \texttt{dbg=-210}) have exactly
-the same effects as the corresponding positive values except for some
-details of display. The display for positive \texttt{dbg} values is
-the one evident in the examples above. Lines wrap, the left margin
-is not indented and the display occupies the page width. For negative
-\texttt{dbg} values, lines do not wrap, the left margin is indented
-and the display occupies the text width. An example is presented in
-§\ref{subsec:nestDebugging} below where the display for a nested
-\verb`\eval` is significantly improved with a negative \texttt{dbg}
-value.
-
-\subsection{Reuse setting}
-
-This setting determines whether the entire display or only the numerical
-result is saved to file with the \verb`\nmcReuse` command. See below,
-Chapter~\ref{chap:Saving-and-retrieving}, §\ref{subsec:reuse=00005Ceval's-reuse-setting}.
-
-\subsection{Inputting numbers in scientific notation}
-
-\label{subsec:settingsInputtingSciNotation}\emph{Outputting} numbers
-in scientific notation is controlled by the final trailing argument
-of the \texttt{\textbackslash eval} command. That is turned off by
-default and needs to be explicitly ordered. Similarly, \emph{inputting}
-numbers in scientific notation is turned off by default and needs
-to be explicitly ordered. To turn it on, write
-\begin{lyxcode}
-\textasciicircum ~=~<char>
-\end{lyxcode}
-\noindent in the settings option, where \texttt{<char>} is any single
-character, usually \texttt{e} or \texttt{d} or their upper-casings,
-but not restricted to them: \texttt{\textasciicircum =@} for instance
-is perfectly possible, and has the advantage over \texttt{e} or \texttt{d}
-that it doesn't conflict with the use of the character as a variable
-or constant. 
-\begin{centred}
-\verb`$ \eval[^=@]{ 1.23 at -1 } $` $\Longrightarrow$ $ \eval[^=@]{ 1.23 at -1 } $.
-\end{centred}
-With letters for the exponent mark – say \verb`d` or \verb`e` –
-the problem is interpreting forms like \texttt{8d-3} or \texttt{2e-1}.
-Does such a form denote a number in scientific notation or an algebraic
-expression? In \texttt{numerica}, if the settings option shows \texttt{\textasciicircum =d},
-then a form like \texttt{8d-3} is treated as a number in scientific
-notation. Similarly for \texttt{e} or any other letter used as the
-exponent marker for the input of scientific numbers. (But only one
-character can be so used at a time.) Note that the number \emph{must}
-start with a digit: \verb`e-1` for instance does not and will be
-treated as an algebraic expression involving the exponential constant
-(unless \verb`e` is assigned a different value in the vv-list).
-\begin{centred}
-\verb`$ \eval[^=e]{ x+e-1 }[x=2e-1] $` $\Longrightarrow$ $ \eval[^=e]{ x+e-1 }[x=2e-1] $. 
-\end{centred}
-The problem here is that \verb`2e-1` is treated as a number in scientific
-notation but displays in the vv-list as if it were an algebraic expression.
-The solution is to put \verb`2e-1` into an \verb`\mbox` or \verb`\text`
-command in the vv-list:
-\begin{centred}
-\verb`$ \eval[^=e]{ x+e-1 }[x=\text{2e-1}] $` $\Longrightarrow$
-$ \eval[^=e]{ x+e-1 }[x=\text{2e-1}] $. 
-\end{centred}
-If you use a particular character as the exponent marker for inputting
-numbers in scientific notation, it is good practice \emph{not} to
-use that character as a variable, not because it will cause an error
-but because it makes expressions harder to read. 
-
-\subsection{Multi-token variables}
-
-\label{subsec:settingsMultitokSwitch}Variables need not consist of
-a single character or token (like $x$ or $\alpha$). Multi-token
-symbols like $x'$ or $t_{i}$ or $var$ are perfectly acceptable.
-For its internal operations, \texttt{numerica} converts such multi-token
-names to single tokens (as discussed in §\ref{subsec:evalVariableNames}).
-This conversion takes time. Even if there are no multi-token variables
-used at all, \texttt{numerica} still needs to check that that is so.
-There is a setting that allows a user to turn off or turn on the check
-for such variables by entering
-\begin{lyxcode}
-xx~=~<integer>
-\end{lyxcode}
-into the settings option. If \texttt{<integer>} is \texttt{0}, the
-check for (and conversion of) multi-token variables is turned off;
-if \texttt{<integer>} is \texttt{1} (or any other\emph{ non-zero}
-integer), the check, and conversion if needed, goes ahead. By default,
-checking for multi-token variables and converting them if found is
-turned \emph{on}. (The name for the key, \texttt{xx}, is chosen because
-\texttt{x} is the most familiar variable of all, introduced in elementary
-algebra, and doubling it like this suggests multi-token-ness.)
-
-If checking is turned off when a multi-token variable is present,
-an error results. We don't need to enter \texttt{xx=1} in the first
-of the following examples because the check for multi-token variables
-is on by default. Explicitly turning it off in the second produces
-an error.
-\begin{centred}
-\verb`\eval{$ x_0^{\,2} $}[x_0=5]` $\Longrightarrow$ \eval{$ x_0^{\,2} $}[x_0=5],\medskip{}
-\verb`\eval[xx=0]{$ x_0^{\,2} $}[x_0=5]` $\Longrightarrow$ \eval[xx=0]{$ x_0^{\,2} $}[x_0=5]
-\end{centred}
-
-\subsection{Parsing arguments of trigonometric functions}
-
-This setting allows a wider range of arguments to trigonometric  functions
-to be used (think Fourier series) without needing to insert extra
-parentheses in order for them to be read correctly by \verb`\eval`;
-see §\ref{subsec:parseTrigFns}.
-
-\subsection{Using degrees rather than radians}
-
-\label{subsec:settingsDegrees}You may find it more convenient to
-use degrees rather than radians with trigonometric functions.This
-can be switched on simply by entering a lowercase \texttt{o} in the
-settings option. (The author's fond hope is that the charitable eye
-might see a degree symbol in the  \texttt{o}.) Thus
-\begin{centred}
-\verb`\eval[o]{$ \sin 30 $}` $\Longrightarrow$ \eval[o]{$ \sin 30 $},
-
-\verb`\eval[o]{$ \arcsin 0.5 $}` $\Longrightarrow$ \eval[o]{$ \arcsin 0.5 $}.
-\end{centred}
-
-\subsection{Specifying a logarithm base}
-
-\label{subsec:settingsLogBase}If you wish to use \verb`\log` without
-a subscripted base in a particular calculation, then add an entry
-like 
-\begin{lyxcode}
-log~=~<positive~number${}\,\mathtt{\ne1}$>
-\end{lyxcode}
-to the settings option of the \verb`\eval` command. The \verb`<positive number>`
-does not need to be an integer. It could be \verb`e` (if you object
-to writing \verb`\ln`) but is more likely to be $2$ or another small
-integer; $10$ is the default. If you want to use this changed base
-not for one but most calculations, then add an entry with your choice
-of base to a configuration file; see §\ref{sec:settingsDefaults}.
-
-\subsection{Calculation mode}
-
-\label{subsec:settingsRecalcMode}A variable may change in the course
-of a calculation. This is certainly true of sums and products. If
-a parameter in the vv-list depends on the variable then that parameter
-will need to be recalculated, perhaps repeatedly, in the course of
-a calculation. By entering \label{subsec:settingsCalculationMode}
-\begin{lyxcode}
-vvmode~=~<integer>
-\end{lyxcode}
-in the settings option it is possible to turn on or off the ability
-to repeatedly evaluate the vv-list; \verb`<integer>` here takes two
-possible values, \texttt{0} or \texttt{1}. \texttt{vvmode=0} means
-the vv-list is evaluated once at the start of the calculation; \texttt{vvmode=1}
-means the vv-list is recalculated every time the relevant variable
-changes.
-
-For example, it may be desirable to place the summand, or some part
-of it, in the vv-list. Since the summation variable obviously changes
-during the course of the calculation, we need to enter \texttt{vvmode=1}
-in the settings option. Repeating an earlier sum (the seting \verb`p=.`
-is discussed in §\ref{subsec:settingsPunctuation}) \medskip{}
-\begin{verbatim}
-    \eval[p=.,vvmode=1]{\[ \sum_{k=1}^N f(k) \]}
-      [N=100,f(k)=1/k^3,{k}=1][4] 
-\end{verbatim}
-$\Longrightarrow$      \eval[p=.,vvmode=1]{\[ \sum_{k=1}^N f(k) \]}
-        [N=100,f(k)=1/k^3,{k}=1][4]
-
-As you can see, the summand \texttt{f(k)} has been given explicit
-form in the vv-list – equated to \texttt{1/k\textasciicircum 3}.
-That means we need to give a preceding value to \texttt{k} in the
-vv-list; hence the rightmost entry. But we don't want \texttt{k=1}
-appearing in the final display, so we wrap \texttt{k} in braces (see
-§\ref{subsec:evalVvSuppressVars}). Since the value \texttt{k=1} applies
-only to the first term in the sum, to ensure it is not used for all
-terms, we enter \texttt{vvmode=1} in the settings option. This turns
-vv-recalculation mode on and ensures \texttt{k=1} is overwritten by
-\texttt{k=2}, \texttt{k=3} and so on, and the vv-list recalculated
-each time. The final result is the same as before, although recalculating
-the vv-list at each step is a more resource-hungry process. The difference
-may not be marked for this example; with more complicated expressions
-it noticeably takes longer.
-
-Because it is necessary to activate this switch when using \emph{implicit}
-notations – like $f(k)$ in the example – rather than the explicit
-form of the function in the main argumet it seems natural to call
-\texttt{vvmode=1} \emph{implicit }mode and \texttt{vvmode=0} (the
-default) \emph{explicit }mode. Most calculations are explicit mode
-– the vv-list is evaluated only once.\emph{ }
-
-\subsection{Changing the vv-list display format}
-
-\label{subsec:settingsVvDisplayChangeLocal}In previous formulas with
-variables the vv-list has been displayed following the result. It
-is wrapped in parentheses following a comma followed by a space. These
-formatting elements – comma, space, parentheses – can all be changed
-with the settings option.
-
-The default format specification is 
-\begin{lyxcode}
-\{,\}\textbackslash mskip~12mu~plus~6mu~minus~9mu(vv)
-\end{lyxcode}
-for a text-style display (an inline formula) and
-\begin{lyxcode}
-\{,\}\textbackslash mskip~36mu~minus~24mu(vv)
-\end{lyxcode}
-in a display-style context. The commas are wrapped in braces because
-these are items in a comma-separated list. Both entries exhibit the
-elements: punctuation (comma), preceding a variable space, preceding
-the parenthesized vv-list (the \texttt{vv} placeholder). No full stop
-is inserted after the closing parentheses because the \texttt{\textbackslash eval}
-command may occur in the middle of a sentence (even in display style).
-For inline use, the elasticity of the space becomes relevant when
-\TeX{} is adjusting individual lines to fit sentences into paragraphs
-and paragraphs into pages. The largest spacing that can be stretched
-to is a quad, $18$~mu (mu~=~math unit), and the smallest that
-can be shrunk to is a thin space, $3$~mu. In display style,\texttt{
-}the largest spacing specified is the double quad, in line with the
-recommendation in \emph{The \TeX{} Book}, Chapter~18, but this can
-shrink to a single quad, for instance if the vv-list is heavily populated
-with variables so that the evaluated result is pushed well to the
-left by the vv-list. (But see below, §\ref{subsec:settings New-line-display}.)
-
-If you want to change these defaults, enter in the settings option
-\begin{lyxcode}
-vvi~=~<new~specification>
-\end{lyxcode}
-to change the inline display and
-\begin{lyxcode}
-vvd~=~<new~specification>
-\end{lyxcode}
-to change the display-style display For example the settings
-\begin{lyxcode}
-vvi~=~\{,\}\textbackslash quad(vv)
-
-vvd~=~\{,\}\textbackslash qquad(vv)
-\end{lyxcode}
-would give a comma (in braces since the settings option is a comma-separated
-list) and a fixed space (of one or two quads) between the result and
-the parenthesized vv-list. 
-
-The vv-list itself in the display specification is represented by
-the placeholder \texttt{vv}. If the \texttt{vv} is omitted from the
-specification, then the vv-list will not appear at all:
-\begin{centred}
-\verb`\eval[vvi=?!]{$ \pi $}[\pi=3]` $\Longrightarrow$  \eval[vvi=?!]{$ \pi $}[\pi=3]
-\end{centred}
-More relevantly, it may well be the case that all variables in the
-vv-list are suppressed (wrapped in braces). In that case the display
-would look something like \verb`, ()`. To prevent this enter \verb`vvi=`
-in the vv-list, in the inline case, or \verb`vvd=` in the display-style
-case, i.e. enter an empty value. (Alternatively, use the star option
-of the \verb`\eval` command.)
-
-Another minor wrinkle occurs if you want to change parentheses around
-the vv-list to square brackets. Because the settings option is a square-bracket
-delimited argument, the square brackets in the specification will,
-like commas, need to be hidden in braces, although you can get away
-with braces around the whole spec.: 
-\begin{lyxcode}
-vvi=\{,\textbackslash mskip~12mu~plus~6mu~minus~9mu~{[}vv{]}\}
-\end{lyxcode}
-
-\subsection{Displaying the vv-list on a new line }
-
-\label{subsec:settings New-line-display}Display of a long formula
-with many variables, hence a full vv-list, may not fit comfortably
-on a line. In an earlier example I used Brahmagupta's formula to calculate
-the area of a triangle. It squeezed onto a line. I shall now use his
-formula for the area of a cyclic quadrilateral:
-\[
-A=\sqrt{(s-a)(s-b)(s-c)(s-d)}.
-\]
-The extra side (quadrilateral as against triangle) means there is
-a further variable to accommodate, not only in the formula but also
-in the vv-list. In the following example, the cyclic quadrilateral
-is formed by a 45-45-90 triangle of hypotenuse 2 joined along the
-hypotenuse to a 30-60-90 triangle. The sides are therefore $\surd2,\surd2,\surd3,1$.
-Adding the areas of the two triangles, the area of the quadrilateral
-is $A=1+\tfrac{1}{2}\surd3$, or in decimal form, \verb`$\eval{1+\tfrac12\surd3}$`
-$\Longrightarrow$ $\eval{1+\tfrac12\surd3}$. Let's check with Brahmagupta's
-formula:
-\begin{verbatim}
-    \eval[p=.,vvd={,}\\(vv),*]
-      {\[ \sqrt{(s-a)(s-b)(s-c)(s-d)} \]}
-        [s=\tfrac12(a+b+c+d),
-           a=\surd2,b=\surd2,c=\surd3,d=1] 
-\end{verbatim}
-$\Longrightarrow$     \eval[p=.,vvd={,}\\(vv),*]
-      {\[ \sqrt{(s-a)(s-b)(s-c)(s-d)} \]}
-        [s=\tfrac12(a+b+c+d), 
-           a=\surd2,b=\surd2,c=\surd3,d=1] 
-
-\noindent The values agree. The point to note here is the\texttt{
-vvd=\{,\}\textbackslash\textbackslash (vv)} and the \texttt{{*}}
-in the settings option. The \texttt{\textbackslash\textbackslash}
-in a specification for \texttt{vvd} acts as a trigger for \texttt{numerica}
-to replace whatever math delimiters are enclosed by the \verb`\eval`
-command with a \verb`multline` environment. As you can see, the specification
-inserts a comma after the formula and places the parenthesized vv-list
-on a new line. The star \texttt{{*}} if present suppresses equation
-numbering by turning the \verb`multline` into a \verb`multline*`
-environment. 
-
-Things to note in the use of\texttt{ \textbackslash\textbackslash}
-in a \texttt{vvd} specification are that
-\begin{itemize}
-\item it applies only to the \texttt{vvd} specification, not the \texttt{vvi}
-spec.;
-\item it applies only when\emph{ }\verb`\eval`\emph{ wraps around }a math
-environment of some kind; 
-\item it has no effect when the \verb`\eval` command is used \emph{within}
-a math environment when the presentation of the result is of the form
-\emph{result, vv-list}. The formula is not displayed and so the pressure
-on space is less and the `ordinary' vv-list specification is used.
-\end{itemize}
-
-\subsection{Punctuation}
-
-\label{subsec:settingsPunctuation}The \verb`\eval` command can be
-used within mathematical delimiters or it can be wrapped around mathematical
-delimiters. The latter gives a \emph{formula=result} style of display
-automatically, which is convenient. One doesn't need to write the
-\emph{formula=} part of the expression, but it causes a problem when
-\verb`\eval` wraps around a display-style or similar environment:
-how to display a following punctuation mark? For an inline display
-we can simply follow the \verb`\eval` command with the appropriate
-punctuation, for instance: \verb`\eval{$ 1+1 $}.` $\Longrightarrow$
-\eval{$ 1+1 $}. But with \verb`\[ \]` delimiters used \emph{within}
-the \verb`\eval` command – \verb`\eval{\[ 1+1 \]}.` – the fullstop
-slides off to the start of the next line, since it is beyond the closing
-delimiter. We want it to display as if it were the last element \emph{before}
-the closing delimiter.
-
-Explicitly putting it there – \verb`\eval{\[ 1+1. \]}` – means the
-punctuation mark becomes part of the formula. Potentially \texttt{numerica}
-then needs to check not just for a fullstop but also other possible
-punctuation marks like comma, semicolon, perhaps even exclamation
-and question marks. All these marks have roles in mathematics or \texttt{l3fp}.
-Including them in the formula means distinguishing their punctuation
-role from their mathematical role and can only cause difficulties
-(and code bloat).
-
-Instead, \texttt{numerica} uses the setting 
-\begin{lyxcode}
-p~=~<char(s)>~
-\end{lyxcode}
-to place the \texttt{char(s)} after the result but within the environment
-delimiters. The default punctuation mark is the comma so that simply
-entering \texttt{p} will produce a comma in the appropriate place.
-This saves having to write \texttt{p=\{,\}} as would otherwise be
-required, since the settings option is a \emph{comma}-separated list.
-
-Nor is one limited to a single punctuation mark: 
-\begin{centred}
-\verb`\eval[p=\ (but no 8!)]{\[ \frac{1}{81} \]}[9]` $\Longrightarrow$
-\eval[p=\ \text{(but no 8!)}]{\[ \frac{1}{81} \]}[9]
-\end{centred}
-
-\section{Infinite sums and products}
-
-\label{sec:settingsInfiniteSumsProds}There are ways of tweaking various
-default settings to nudge infinite sums and products to a correct
-limit. These tweaks are applied via the settings option of the \verb`\eval`
-command. 
-
-\begin{table}
-\centering
-\noindent \centering{}\caption{Settings for infinite sums \& products}\label{tab:settingsSumsProducts}
-\noindent \begin{center}
-{\small{}%
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-key & type & meaning & default\tabularnewline
-\midrule 
-\texttt{S+} & int & extra rounding for stopping criterion & \texttt{2}\tabularnewline
-\texttt{S?} & $\text{int}\ge0$ & stopping criterion query terms for sums & \texttt{0}\tabularnewline
-\texttt{P+} & int & extra rounding for stopping criterion & \texttt{2}\tabularnewline
-\texttt{P?} & $\text{int}\ge0$ & stopping criterion query terms for products & \texttt{0}\tabularnewline
-\bottomrule
-\end{tabular}}
-\par\end{center}
-\end{table}
-The normal convergence criterion used by \texttt{numerica} to determine
-when to stop adding/multiplying terms in an infinite sum/product is
-\emph{when the next term added/multiplied leaves the total unaltered
-when rounded to 2 more digits than the specified rounding value.}
-Suppose $T_{k}$ is the sum/product after the inclusion of $k$ terms,
-and $r$ is the rounding value. Denote $T_{k}$ rounded to $r$ figures
-by $\left(T_{k}\right)_{r}$. \emph{The infinite sum or product stops
-at the $(k+1)$-th term (and the value is attained at the $k$-th
-term) when }$\left(T_{k+1}\right)_{r+2}=\left(T_{k}\right)_{r+2}$.
-The hope is that if this is true at rounding value $r+2$ then at
-rounding value $r$ the series or product will have attained a stable
-value at that level of rounding.
-
-For a series of monotonic terms converging quickly to a limit, this
-stopping criterion works well, less so if convergence is slower, as
-seen earlier with the infinite product for $\sinh1$. The criterion
-can fail completely when terms behave in a non-monotonic manner. Distant
-terms of a Fourier series, for example, may take zero values; the
-criterion is necessarily satisfied but the series may still be far
-from its limit. In a product the equivalent would be a distant term
-taking unit value. Such series or products may also have initial `irregular'
-terms including zero/unit terms. A summation/product might stop after
-only one or two additions/multiplications if the criterion were applied
-to them. 
-
-To cope with these possibilities, \texttt{numerica} offers two settings
-for sums, two for products, summarized in Table~\ref{tab:settingsSumsProducts}.
-These are entered in the settings option of the \verb`\eval` command.
-\begin{itemize}
-\item \texttt{S+=<integer> }or \texttt{P+=<integer>} additional rounding
-on top of the specified (or default) rounding for the calculation;
-default = $2$
-\begin{itemize}
-\item the larger the additional \texttt{<integer>} is, the more likely that
-sum or product has attained a stable value at the specified rounding
-$r$ 
-\end{itemize}
-\item \texttt{S?=<integer${}\,\mathtt{\ge0}$> }or \texttt{P?=<integer${}\,\mathtt{\ge0}$>}
-the number of final terms to query after the stopping criterion has
-been achieved to confirm that it is not an `accident' of particular
-values; default = $0$
-\begin{itemize}
-\item a final few terms to be summed/multiplied and the rounded result after
-each such operation to be compared with the rounded result at the
-time the stopping criterion was achieved. Suppose the additional rounding
-(\texttt{S+} or \texttt{P+}) is $n$ on top of the specified rounding
-$r$ and let the number of final checking terms be $m$. Suppose $T_{k_{0}}$
-is the first term at which the stopping criterion is achieved: $\left(T_{k_{0}}\right)_{r+n}=\left(T_{k_{0}+1}\right)_{r+n}$.
-What we require of the final query terms is that $\left(T_{k_{0}}\right)_{r+n}=\left(T_{k_{0}+1+j}\right)_{r+n}$
-for $j=0,1,\ldots,m$.
-\end{itemize}
-\end{itemize}
-Previously we found that the infinite product for $\sinh1$ with the
-default settings gave the wrong value, $0.174$, deficient by $1$
-in the last digit. We now have the means to tweak the stopping criterion
-by increasing the additional rounding: 
-\begin{verbatim}
-    \eval[p,P+=3]{\[
-      \prod_{k=1}^{\infty}
-      \biggl(\frac{x^2}{k^2\pi^2} +1\biggr) 
-    \]}[x=1][3] \nmcInfo{prod}.
-\end{verbatim}
-\noindent $\Longrightarrow$ \noindent \eval[p,P+=3]{\[
-  \prod_{k=1}^{\infty}
-  \biggl(\frac{x^2}{k^2\pi^2} +1\biggr) 
-\]}[x=1][3]  \nmcInfo{prod}.
-
-\noindent To obtain that last item of information (350 factors), I've
-anticipated a little and used the command \verb`\nmcInfo` with the
-argument \verb`prod`; see Chapter~\ref{sec:info}. The product now
-produces the correct three-figure value, but it takes $350$ factors
-to do so. 
-
-Knowing how many terms or factors have been needed helps assess how
-trustworthy the result from an infinite sum or product is. For example,
-for the exponential series,
-\begin{verbatim}
-    \eval[p]{\[
-      \sum_{k=0}^\infty \frac1{k!} 
-    \]}[9] \nmcInfo{sum}.
-\end{verbatim}
-$\Longrightarrow$ \eval[p]{\[\sum_{k=0}^\infty \frac1{k!} \]}[9] \nmcInfo{sum}. 
-
-To $9$ places of decimals, using the default value \texttt{S+=2},
-the exponential series arrives at the right sum after only $15$ terms.
-Convergence is rapid. We can trust this result (and it is in fact
-the correct nine-figure value). By contrast, if we didn't know the
-value of $\sinh1$ beforehand, noting the number of factors required
-would make us justly cautious about accepting the result of the infinite
-product calculation. 
-
-One way to gain confidence in a result is to choose a possibly unrealistic
-rounding value – say, the default $6$ for the infinite product \-\-
-then use \emph{negative} values for the extra rounding, \texttt{S+=-5},
-\texttt{S+=-4}, \ldots{} , so that the stopping criterion applies at
-rounding values $s$ of $6+(-5)=1$, $6+(-4)=2$, and so on, but the
-result is always presented to $6$ decimal places. One can then see
-how the $6$-figure results behave relative to the number of terms
-it takes to meet the stopping criterion. A little experimenting shows
-that for our infinite product for $\sinh1$ the number of factors
-$N_{s}$ at a stopping rounding value $s$ increases in geometric
-proportion with a scale factor of about $3$: $N_{s+1}/N_{s}\approx3$.
-For the exponential series on the other hand $N_{s}=4+s$, the number
-of terms increasing in direct proportion to the stopping rounding
-value.
-
-A similar calculation for the sum of inverse fourth powers of the
-integers $\zeta(4)=\sum_{n=1}^{\infty}\frac{1}{n^{4}}$, inverse third
-powers, $\zeta(3)$, and inverse squares, $\zeta(2)$, using \verb`\nmcInfo`
-to find how many terms are required at each stopping rounding value,
-shows that at least over the rounding value range $1$ to $8$, for
-inverse fourth powers $N_{s+1}/N_{s}\approx1.7$, for inverse third
-powers $N_{s+1}/N_{s}\gtrsim2$ and for inverse squares $N_{s+1}/N_{s}\approx3$.
-All are geometric rather than arithmetic progressions, but for inverse
-fourth powers the scale factor ($\approx1.7$) is sufficiently small
-that for these low values of $s$ the number of terms required does
-not grow too quickly. It is a standard result (Euler) that the series
-sums to $\pi^{4}/90$: \verb`$ \eval{ \pi^4/90 } $` $\Longrightarrow$
-$ \eval{ \pi^4/90 } $ to six places, and indeed, with the default
-\texttt{S+=2}, 
-\begin{centred}
-\verb`\eval[p]{\[ \sum_{k=1}^\infty \frac1{k^4} \]}` $\Longrightarrow$
-\eval[p]{\[ \sum_{k=1}^\infty \frac1{k^4} \]}
-\end{centred}
-there is complete agreement. 
-
-For inverse third powers, the number of terms required to reach the
-stopping criterion grows rapidly for rounding values from $7$ onwards
-($2^{7}=128$, $2^{8}=256$, \ldots ). This suggests trying for a
-five-figure result (with the default setting \texttt{S+=2} the stopping
-rounding value is $7$). Doing this gives a result $1.20205$ to five
-decimal places. \emph{HMF} Table 23.3 has this quantity tabulated
-to $20$ places and shows our result is too small by $1$ in the final
-figure. 
-
-For inverse second powers, the number of terms required to reach the
-stopping criterion increase even more quickly: $3^{4}=81$, $3^{5}=243$,
-and so on. A three figure answer (with the default setting \texttt{S+=2}
-the stopping rounding value is $5$) seems the best we can hope for.
-Doing the evaluation gives $1.642$ whereas we know that $\zeta(2)=\pi^{2}/6$
-(Euler's famous result), evaluating to $1.645$. Even with \texttt{S+=3},
-the sum is still too small, $1.644$ after 1007 terms. Increasing
-the additional rounding to $4$, \texttt{S+=4}, does finally give
-the correct three-figure result, $1.645$, but only after summing
-$3180$ terms.
-
-\subsection{Premature ending of infinite sums}
-
-All the series considered so far have been monotonic. Trigonometric
-series will generally not be so, nor even single-signed. 
-
-Trigonometric sums are computationally intensive and so, for the following
-example, I have specified a rounding value of 2. The series 
-\[
-\sum_{n=1}^{\infty}\frac{4}{n^{2}\pi^{2}}(1-\cos n\pi)\cos2\pi nt
-\]
-is the Fourier series for the triangular wave function /\!\textbackslash\!/\!\textbackslash\!/\!\textbackslash\!/\!\textbackslash{} \ldots{}
-of period 1, symmetric about the origin where it takes its maximum
-value 1, crossing the axis at $t=0.25$ and descending to its minimum
-$-1$ at $t=0.5$, before ascending to a second maximum at $t=1$
-(and so on). In the interval $[0,0.5)$ the series should sum to $1-4t$.
-The problem is that the summand $\frac{4}{n^{2}\pi^{2}}(1-\cos n\pi)\cos2\pi nt$
-vanishes both when $n$ is even and when $4nt$ is an odd integer.
-If $t=0.1$ then $4nt$ is never an odd integer so the summand vanishes
-only for $n$ even, every second term. We expect the result to be
-$1-4\times0.1=0.6$.
-\begin{verbatim}
-    \eval[p]{\[
-      \sum_{n=1}^{\infty}
-        \frac{4}{n^{2}\pi^{2}}
-        (1-\cos n\pi)\cos2\pi nt 
-    \]}[t=0.1][2] \nmcInfo{sum}.
-\end{verbatim}
-$\Longrightarrow$ \eval[p]{\[
-  \sum_{n=1}^{\infty}
-    \frac{4}{n^{2}\pi^{2}}
-    (1-\cos n\pi)\cos2\pi nt 
-\]}[t=0.1][2]  \info{sum}.
-
-\noindent Only one term? Of course – since the second term $n$ is
-even; the term vanishes and the stopping criterion is satisfied. The
-way around this problem is to query terms \emph{beyond} the one where
-the stopping criterion is achieved, i.e., to set \texttt{S?} to a
-nonzero value. We try \texttt{S?=1}: 
-\begin{verbatim}
-    \eval[p,S?=1]{\[
-      \sum_{n=1}^{\infty}
-        \frac{4}{n^{2}\pi^{2}}
-        (1-\cos n\pi)\cos2\pi nt 
-    \]}[t=0.1][2] \nmcInfo{sum}.
-\end{verbatim}
-$\Longrightarrow$ \eval[p,S?=1]{\[
-  \sum_{n=1}^{\infty}
-    \frac{4}{n^{2}\pi^{2}}
-    (1-\cos n\pi)\cos2\pi nt 
-\]}[t=0.1][2] \info{sum}.
-
-Table~\ref{tab:settingsFinite-sums} lists the results of evaluating
-the \emph{finite }sums from $n=1$ to $N$ for values of $N$ around
-$65$. Since we have specified a rounding value of $2$ for the calculation,
-the stopping criterion\emph{ }applies at a rounding value of $2$
-more than that, $4$. Since $N=64$ is even, the summand for the $64$th
-term is zero and the sum takes the same value as for $N=63$. The
-$65$th term is the query term and the sum differs, so the summation
-continues. The $66$th term vanishes, so the stopping criterion is
-met. This time for the query term, the $67$th, the sum retains the
-same $4$-figure value, and the summation stops. The result was attained
-at the $65$th term.
-
-\begin{wraptable}{o}{0.5\columnwidth}%
-\centering{}\vspace{-4ex}
-\caption{Finite sums}\label{tab:settingsFinite-sums}
-\setlength{\abovetopsep}{1ex}%
-\begin{tabular}{cc}
-\toprule 
-$N$ & $\Sigma$\tabularnewline
-\midrule
-$63$ & $0.6001$\tabularnewline
-$64$ & $0.6001$\tabularnewline
-$65$ & $0.5999$\tabularnewline
-$66$ & $0.5999$\tabularnewline
-$67$ & $0.5999$\tabularnewline
-\bottomrule
-\end{tabular}\end{wraptable}%
-Should we be confident in the result? Increase the number of query
-terms to $3$ (there is no point in increasing \texttt{S?} to $2$
-because of the vanishing of the even terms), the sum stops after $113$
-terms, with the same $0.6$ result. Indeed, increasing \texttt{S?}
-to $5,7,\ldots$ makes no difference. It still takes $113$ terms
-to reach the stable two-figure result $0.6$. 
-
-For a final example, consider the error function 
-\[
-\erf z=\dfrac{2}{\sqrt{\pi}}\int_{0}^{z}e^{-t^{2}}dt
-\]
-which can also be rendered as an infinite sum (\emph{HMF }7.1.5):
-\[
-\erf z=\sum_{n=0}^{\infty}(-1)^{n}\frac{z^{2n+1}}{n!(2n+1)}.
-\]
-(\verb`\erf` expanding to \verb`erf` has been defined in the preamble
-to this document using \verb`\DeclareMathOperator`.) We calculate
-this sum for $z=2$ to $10$ places of decimals. Although this is
-an alternating series, it is obvious that the summand never vanishes
-when $z\ne0$ as here. Hence there seems no need to change the default
-value \texttt{S?=0}.
-\begin{verbatim}
-    \eval[p]{\[ 
-      \frac2{\sqrt{\pi}}
-        \sum_{n=0}^\infty(-1)^n
-          \frac{z^{2n+1}}{n!(2n+1)}   
-    \]}[z=2][10*] \nmcInfo{sum}.
-\end{verbatim}
-$\Longrightarrow$ \eval[p]{\[ 
-  \frac2{\sqrt{\pi}}
-    \sum_{n=0}^\infty(-1)^n
-      \frac{z^{2n+1}}{n!(2n+1)}   
-\]}[z=2][10*] \nmcInfo{sum}.
-
-According to \emph{HMF }Table 7.1, this calculated value of $\erf2$
-is correct to all $10$ places. But beyond $z=2$ errors will begin
-to interfere with the result. Note that $26$ terms means $n=26$
-was the last value of $n$ for which the summand was evaluated. (The
-sum stops at the $26$th term, $n=25$, but the next term $n=26$
-needs to be calculated for the stopping criterion.) Fortuitously,
-$2^{2\times26+1}=2^{53}$ is the greatest power of $2$ that can be
-\emph{exactly} rendered to the $16$ significant figures that \texttt{l3fp}
-uses. But $n!$ exceeds the $16$-significant figure limit of \texttt{l3fp}
-when $n>21$, so despite the 10-figure result, errors have already
-begun to occur in the denominator of the summand and accrue in the
-sum when $z=2$. For larger $z$ values the errors can only get worse
-and at some point will render the calculated value worthless at any
-meaningful rounding value. For example, when $z=7$ the sum apparently
-`evaluates' to over $929$ whereas we know that 
-\[
-\erf z<\dfrac{2}{\sqrt{\pi}}\int_{0}^{\infty}e^{-t^{2}}dt=1.
-\]
-
-
-\subsection{Double sums or products}
-
-Sums or products can be iterated. For instance, the exponential function
-can be calculated this way:
-\begin{centred}
-\verb`\eval[p]{\[ \sum_{k=0}^{\infty}\prod_{m=1}^{k}\frac{x}{m} \]}[x=2]`
-$\Longrightarrow$ \eval[p]{\[ \sum_{k=0}^{\infty}\prod_{m=1}^{k}\frac{x}{m} \]}[x=2]
-\end{centred}
-\noindent which is \verb`\eval{$ e^2 $}` $\Longrightarrow\eval{\ensuremath{e^{2}}}$.
-
-A second example is afforded by Euler's transformation of series (\emph{HMF}
-3.6.27). To calculate $e^{-1}$ we use 
-\begin{verbatim}
-    \eval[p={,}\quad \mbox{\nmcInfo{sum}}.]
-      {\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3] 
-\end{verbatim}
-$\Longrightarrow$ \eval[p={,}\quad \mbox{\nmcInfo{sum}}.]{\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3]
-
-(Note the placement of the information command as the value of the
-punctuation key. This keeps it \emph{within }the \texttt{\textbackslash{[}
-\textbackslash{]}} delimiters.) Following Euler, this series can
-be transformed to the form
-\begin{verbatim}
-    \eval[p,S?=1]{\[
-      \sum_{k=0}^\infty \frac{(-1)^k}{2^{k+1}}
-      \sum_{n=0}^k(-1)^n\binom kn \frac1{(k-n)!} 
-    \]}[3] \nmcInfo{sum}.
-\end{verbatim}
-$\Longrightarrow$ \eval[p,S?=1]{\[ \sum_{k=0}^\infty \frac{(-1)^k}{2^{k+1}}\sum_{n=0}^k(-1)^n\binom kn \frac1{(k-n)!} \]}[3] \nmcInfo{sum}.
-
-\noindent Note the setting \verb`S?=1`. Without it, the summation
-stops after $1$ term, the $k=0$ term, because the $k=1$ term vanishes.
-With \verb`S?=1` it takes $16$ terms of the \emph{outer }sum to
-reach the stopping criterion. Since that sum starts at $0$, that
-means that changing the upper limit from $\infty$ to $15$ should
-give the same result – which it does – but it takes $\tfrac{1}{2}\times16\times17=136$
-terms in total to get there, to be compared with the $9$ terms of
-the earlier simpler sum, and the terms are more complicated. Obviously
-such double sums are computationally intensive.
-
-\section{Changing default values}
-
-\label{sec:settingsDefaults}The settings option enables various settings
-to be changed for an individual calculation. You may find yourself
-wanting to make such changes sufficiently often that a change of default
-value is a better plan than encumbering each calculation with a list
-of settings.
-
-\begin{table}[h]
-\centering
-\noindent \centering{}\caption{Default values, \texttt{\textbackslash eval} command}\label{tab:settingsDefaults}
-\noindent \begin{center}
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small value}\tabularnewline
-\midrule
-{\small rounding} & {\small\texttt{6}}\tabularnewline
-{\small pad} & {\small\texttt{0}}\tabularnewline
-{\small output-sci-notation } & {\small\texttt{0}}\tabularnewline
-{\small output-exponent-char} & {\small\texttt{e}}\tabularnewline
-{\small\%} & \tabularnewline
-{\small input-sci-notation } & {\small\texttt{0}}\tabularnewline
-{\small input-exponent-char} & {\small\texttt{e}}\tabularnewline
-{\small multitoken-variables } & {\small\texttt{1}}\tabularnewline
-logarithm-base & {\small\texttt{10}}\tabularnewline
-{\small vv-display} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{\small vv-inline} & {\small\texttt{\{,\}\textbackslash mskip 12mu plus 6mu minus 9mu(vv)}}\tabularnewline
-{\small\%} & \tabularnewline
-{\small intify-rounding} & {\small\texttt{14}}\tabularnewline
-\% & \tabularnewline
-{\small sum-extra-rounding} & {\small\texttt{2}}\tabularnewline
-{\small sum-query-terms} & {\small\texttt{0}}\tabularnewline
-{\small prod-extra-rounding} & {\small\texttt{2}}\tabularnewline
-{\small prod-query-terms} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-The way to do that is to create a \emph{configuration file }with the
-name \texttt{numerica.cfg} in a text editor. Its entries, one per
-line, are of the form \emph{key=value} followed by a comma, and for
-clarity preferably one entry per line (although this is not essential).The
-key names are noticeably more verbose than the corresponding keys
-of the settings option.\emph{ }The possible keys are listed in Table~\ref{tab:settingsDefaults},
-together with their current default values. 
-
-Keys taking one of two possible values, \verb`0` (for \verb`false/off`)
-or \verb`1` (for \verb`true/on`), are \verb`pad` (the result with
-zeros), \verb`output-sci-notation`, \verb`input-sci-notation`, and
-(check for) \verb`multitoken-variables`.
-
-The table is divided into four parts. 
-\begin{itemize}
-\item The top four rows concern elements that can be changed for individual
-calculations with the trailing optional argument of \verb`\eval`:
-rounding, padding with zeros, and outputting in scientific notation;
-see §\ref{subsec:evalRoundingEtc}. 
-\begin{itemize}
-\item Note that to output the result always in scientific notation requires
-two settings, first setting \texttt{output-sci-notation} to \texttt{1},
-and then choosing a character to act as the exponent marker. Because
-\texttt{l3fp} uses \texttt{e} for this character, \texttt{numerica}
-has made \texttt{e} its default. But this option is turned off by
-default (hence the \texttt{0} against this key).
-\end{itemize}
-\item The next block of rows concern general elements that can be changed
-for individual calculations with the settings option of \verb`\eval`;
-see §\ref{sec:settingsOption}. Obviously the key names are more expansive
-in the present context but the effect is the same. 
-\begin{itemize}
-\item But note that to input numbers in scientific notation requires two
-settings, first setting \texttt{input-sci-notation} to \texttt{1},
-and then choosing a character to act as the exponent marker. Because
-\texttt{l3fp} uses \texttt{e} for this character, \texttt{numerica}
-has made \texttt{e} its default. The option is turned off by default
-(hence the \texttt{0} against this key). 
-\end{itemize}
-\item The third block is a single row specifying at what rounding value
-a floating point should be considered an integer; see §\ref{subsec:defaultsIntifyingRounding}
-below.
-\item The last four rows concern default settings for infinite sums and
-products. These correspond to the keys \texttt{S+}, \texttt{S?} and
-\texttt{P+}, \texttt{P?} of the settings option that can be used to
-tweak the behaviour of the stopping criterion for such sums or products;
-see §\ref{sec:settingsInfiniteSumsProds}.
-\end{itemize}
-If you are dissatisfied with any of the default values listed, then
-in a text editor create a new file called \texttt{numerica.cfg} and
-assign \emph{your} values to the relevant keys. For instance, if you
-find yourself working to $4$ figures, that rounding to $6$ is too
-many, then make the entry \texttt{rounding=}4. If also you want results
-always presented in proper scientific notation,\emph{ $d.d_{1}d_{2}d_{3}d_{4}\times10^{n}$},
-then add a comma after \texttt{4} and enter on a new line (recommended
-but not strictly necessary; the comma is the crucial thing), \texttt{output-sci-notation=1,}
-(note the comma) and on another new line, \texttt{output-exponent-char=x}. 
-
-Perhaps you also want a non-zero setting for the final query terms
-for infinite sums and products. This makes sense if you are largely
-dealing with non-monotonic series – like Fourier series. Even the
-Euler transformation of the exponential series for $e^{-1}$ discussed
-above required a non-zero \texttt{S?}. If you wish to make this change
-then add a comma and on a new line add (for instance) \texttt{sum-query-terms
-= 1,} and again on a new line, \texttt{prod-query-terms = }1. If this
-is all you wish to change, then no comma is necessary after this final
-entry. Your newly created file should look something like
-\begin{lyxcode}
-rounding~~~~~~~~~~~~~=~4,
-
-output-sci-notation~~=~1,
-
-output-exponent-char~=~x,
-
-sum-query-terms~~~~~~=~1,
-
-prod-query-terms~~~~~=~1
-\end{lyxcode}
-The white spacing may be different; white space is ignored by \texttt{numerica}
-when reading the file. Using it to align the equals signs helps \emph{us}
-read the file. Note that the last entry, because it is the last entry,
-lacks a comma. Now save the file with the name \texttt{numerica.cfg}.
-This file will be read by \texttt{numerica} near the end of its loading
-process. These settings will be \texttt{numerica}'s defaults for the
-relevant keys. 
-
-\subsection{Location of \texttt{numerica.cfg}}
-
-Save, yes, but where to? If the new settings are likely to apply only
-to your current document, then the document's directory is a sensible
-place to put it and \texttt{numerica} will certainly find it there
-since it is part of \LaTeX 3 file handling that file searches are
-not limited to the \TeX{} distribution (including your personal texmf
-tree) but also include the current document directory. But what happens
-when you start working on another document? Will you remember to copy
-\texttt{numerica.cfg} to its new location? That is why your \emph{personal
-texmf tree} is a better place. 
-
-\subsubsection{Personal texmf tree? }
-
-This is a directory for `waifs and strays' of the \TeX{} system that
-are not included in the standard distributions like MiK\TeX{} or \TeX Live.
-Here you place personal packages designed for your own particular
-circumstances. These may include your own \TeX{} or \LaTeX{} package,
-say \texttt{mypackage.sty}, achieving some small or singular effect
-that doesn't warrant wider distribution on CTAN. Here you might place
-configuration files for other packages with your preferences (unless
-the package requires some specific location). Here you can put your
-personal bibliography files. 
-
-Your personal texmf tree is structured like the standard MiK\TeX{}
-or \TeX Live hierarchy but placed in another location so that there
-is no chance of its being overwritten when packages in MiK\TeX{} or
-\TeX Live are updated. But these distributions need to be alerted
-to its existence. 
-
-For example, in the MiK\TeX{} console, click on \textsf{Settings},
-and then on the \textsf{Directories} tab of the resulting dialog.
-Here you get to add your personal texmf hierarchy to the list of paths
-that MiK\TeX{} searches, by clicking on the \textsf{+} button, browsing
-to your texmf folder and selecting it. By using the up and down arrow
-keys that the MiK\TeX{} console provides, ensure that it lies \emph{above
-}the the entry for the main MiK\TeX{} tree. That way, files in your
-personal texmf tree will be found first and loaded. Now go to the
-\textsf{Tasks} menu and click on \textsf{Refresh the filename database}.
-This will let MiK\TeX{} know what is held in your personal texmf tree.
-Files there can then be used like standard \LaTeX{} packages.
-
-\subsection{Rounding in \textquoteleft int-ifying\textquoteright{} calculations}
-
-\label{subsec:defaultsIntifyingRounding}Factorials, binomial coefficients,
-summation and product variables, and (in \texttt{numerica}) $n$-th
-roots from the \texttt{\textbackslash sqrt} command, all require
-integer arguments. These integers may indeed be entered explicitly
-as integers, but they can also be determined as the result of a calculation.
-Rounding errors may mean the result is not an exact integer. How much
-leeway should be allowed before it is clear that the calculation did
-not give an integer result? In the default setup, \texttt{numerica}
-is generous. A number is considered an integer if it rounds to an
-integer when the rounding value is $14$. Since \texttt{l3fp} works
-to $16$ significant figures this provides more than enough `elbowroom'
-for innocuous rounding errors to be accommodated. If a calculation
-does not round to an integer at a rounding value of $14$ then it
-seems reasonable to conclude that it has \emph{really }not given an
-integer answer, not just that rounding errors have accumulated. If
-you want to change this `int-ifying' value for a particular calculation,
-then add a line to \texttt{numerica.cfg} like
-\begin{lyxcode}
-intify-rounding~=~<integer>
-\end{lyxcode}
-Since \texttt{l3fp} works to $16$ significant figures, values of
-\texttt{integer} greater than $16$ are pointless. Generally int-ifying
-rounding values will be less than but close to $16$ (although when
-testing the code I used some ridiculous values like $3$ or $4$).
-If other entries follow this one in the file, then conclude the line
-with a comma.
-
-\section{Parsing mathematical arguments}
-
-\label{sec:Argument-parsing} A main aim of the \texttt{numerica}
-package is to require minimal, preferably no, adjustment to the \LaTeX{}
-form in which an expression is typeset in order to evaluate it. But
-mathematicians do not follow codified rules of the kind programming
-languages insist on when writing formulas – like parenthesizing the
-arguments of functions, or inserting explicit multiplication signs
-({*}) between juxtaposed terms. Hence the question of where the arguments
-of mathematical functions end is acute. For a few functions \LaTeX{}
-delimits the argument: think of \verb`\sqrt`, \verb`\frac`, \verb`\binom`;
-also \verb`^`. But for functions like \verb`\sin` or \verb`\tanh`
-or \verb`\ln`, unary functions, this is not so. Nor is it for sums
-and products, and comparisons.
-
-Before discussing the parsing rules for different groups of functions,
-I discuss the means \texttt{numerica} provides to handle exceptions
-to those rules, when one \emph{does} need to make some adjustment
-to a formula.
-
-\subsection{The cleave commands \texttt{\textbackslash q} and \texttt{\textbackslash Q}}
-
-\label{subsec:parseCleave}The word \emph{cleave} has two opposed
-meanings: to adhere or cling to, and to split or sever. \texttt{numerica}
-defines two commands, \verb`\q` and \verb`\Q` to achieve these opposite
-effects. When a mathematical argument is being parsed, the \verb`\q`
-command joins the next token to the argument (\emph{cleaves to});
-the \verb`\Q` command severs the next token from the argument (\emph{cleaves
-apart}). Neither command is added to the argument nor leaves a visible
-trace in the output. 
-
-Thus, without \verb`\q`, 
-\begin{centred}
-\verb`\eval{$ \sin(n+\tfrac12)(x-t) $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
-\eval{$ \sin(n+\tfrac12)(x-t) $}[n=3,x=t+\pi,t=1.234],
-\end{centred}
-which is $(\sin\tfrac{7}{2})\times\pi$. With \verb`\q` between the
-bracketed factors,
-\begin{centred}
-\verb`\eval{$ \sin(n+\tfrac12)\q(x-t) $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
-\eval{$ \sin(n+\tfrac12)\q(x-t) $}[n=3,x=t+\pi,t=1.234],
-\end{centred}
-which is $\sin(\tfrac{7}{2}\pi)$. Similarly, without \verb`\q`,
-\begin{centred}
-\verb`\eval[p]{\[ \cos\frac{2\pi}{T}n(t+\tfrac12T) \]}[T=2,t=1,n=3]`
-$\Longrightarrow$ \eval[p]{\[ \cos\frac{2\pi}{T}n(t+\tfrac12T) \]}[T=2,t=1,n=3]
-\end{centred}
-which is $(\cos\pi)\times3\times(1+\tfrac{1}{2}\times2)$. With \verb`\q`
-used twice, once after the fraction and once before the left parenthesis,
-\begin{centred}
-\verb`\eval[p]{\[ \cos\frac{2\pi}{T}\q n\q(t+\tfrac12T) \]}[T=2,t=1,n=3]`
-$\Longrightarrow$ \eval[p]{\[ \cos\frac{2\pi}{T}\q n\q(t+\tfrac12T) \]}[T=2,t=1,n=3]
-\end{centred}
-which is $\cos(\pi\times3\times2)$.
-
-It should be noted that for \emph{trigonometric }functions, because
-of their use in Fourier series especially, there is another way of
-handling arguments with parentheses (and fractions). This is discussed
-in §\ref{subsec:parseTrigFns} below.
-
-For the \verb`\Q` command which splits an argument we have, without
-it,
-\begin{centred}
-\verb`\eval{$ 1/2e $}` $\Longrightarrow$ \eval{$ 1/2e $}, 
-\end{centred}
-which is the reciprocal of $2e$, whereas with the \verb`\Q` command
-inserted before \verb`e`,
-\begin{centred}
-\verb`\eval{$ 1/2\Q e $}` $\Longrightarrow$ \eval{$ 1/2\Q e $},
-\end{centred}
-which is a half of $e$. Of course, the meaning in this example would
-be clearer if $1/2$ were parenthesized or presented as a \verb`\tfrac`.
-
-\subsubsection{Mnemonic}
-
-As mnemonic, best seen in sans serif for the Latin Modern fonts used
-in this document, think of the letter \textsf{q} as a circle \emph{clinging
-}to a vertical descender; think of the letter \textsf{Q} as a circle
-\emph{cut} by the diagonal stroke.
-
-\subsection{Parsing groups}
-
-The arguments of different groups of functions are handled in different
-ways. The criterion used for deciding when an argument ends for one
-group will not be that used for the others. Table §\ref{subsec:defaultsIntifyingRounding}
-lists the different groups that \texttt{numerica} takes account of.
-At the top are functions or operations that have the smallest reach
-when determining where their arguments end; at the bottom are operations
-that have the greatest reach. The denominator of a slash fraction
-is treated as a unary function and is assigned to group II. By default
-trigonometric functions are treated the same as other unary functions
-but there is a setting which enables the direct (rather than inverse)
-trigonometric functions to accept a wider range of arguments, as occurs
-in Fourier series. Hence they are separated into their own group.
-
-\begin{wraptable}{o}{0.5\columnwidth}%
-\noindent \centering{}\caption{Parsing groups}\label{tab:settingsParsing-groups}
-{\ttfamily\noindent \begin{center}
-{\ttfamily{}%
-\begin{tabular}{ll}
-\toprule 
-{\small\textrm{group}} & {\small\textrm{function/operation}}\tabularnewline
-\midrule
-{\small\textrm{I}} & {\small\textrm{surd, logical Not}}\tabularnewline
-{\small\textrm{II}} & {\small\textrm{unary functions, /}}\tabularnewline
-{\small\textrm{III}} & {\small\textrm{direct trig. functions}}\tabularnewline
-{\small\textrm{IV}} & {\small\textrm{sums, products}}\tabularnewline
-{\small\textrm{V}} & {\small\textrm{comparisons}}\tabularnewline
-{\small\textrm{VI}} & {\small\textrm{logical And, logical Or}}\tabularnewline
-\bottomrule
-\end{tabular}}
-\par\end{center}}\end{wraptable}%
- A formula is a sequence of tokens and brace groups. All parsing occurs
-from the left, \LaTeX{} argument by \LaTeX{} argument, where \emph{argument}
-means either a token (an N-type argument in \verb`expl3`-speak) or
-a brace group (an n-type argument). To distinguish \LaTeX{} arguments
-from mathematical arguments I shall when necessary refer to L-args
-and M-args. A mathematical argument may end \emph{at} an L-arg, meaning
-immediately before the L-arg, or end \emph{with} the L-arg, meaning
-immediately after the L-arg. Ending or not will in general depend
-on whether the argument is in \emph{first position} – the position
-immediately following a function token like \verb`\sin` or \verb`\log`
-– or in \emph{general position} – any later position (although for
-trigonometric functions we will also need to consider \emph{second}
-and even \emph{third }position). 
-
-For counting position, we need to allow for formatting elements and
-multi-token numbers – in both decimal and scientific formats. Formatting
-elements do not change the position count. This applies to things
-like thin spaces or phantoms (and their arguments) or modifiers like
-\verb`\left` or \verb`\biggl`. Multi-token numbers (in decimal or
-scientific formats) are treated as single items; they advance the
-position count by exactly one. \LaTeX{} functions – like \verb`\frac`
-– which take \LaTeX{} arguments again advance the position count only
-by one. Mathematically, the fraction is viewed as a single unit.
-
-I shall refer to a token or a token and its \LaTeX{} arguments – like
-\verb`\frac` and its arguments – as an \emph{item}. Similarly, a
-(possibly multi-token) number is an item. Also it will help to distinguish
-tokens within brackets where both brackets lie to the right of a function
-from those that do not. The former I call \emph{clothed}; the latter
-are \emph{naked}. Thus the plus sign in $(\sin x+y)$ is naked relative
-to the sine (one bracket to the left of the function), but is clothed
-in $\sin(x+y)$ (both brackets to the right of the function). 
-
-\subsubsection{Parsing group I}
-
-The only functions in this category are the surd and logical Not. 
-
-Why distinguish the surd from other unary functions? Surely we all
-agree that \verb`\sin2\pi`, displaying as $\sin2\pi$, vanishes?
-The argument of the sine extends beyond the $2$ to include the $\pi$.
-But \verb`\surd2\pi`, displaying as $\surd2\pi$, is understood to
-be the product $\surd2\times\pi$. The argument of the surd ends with
-the $2$. The surd binds more tightly to its argument than is true
-of unary functions generally. 
-
-For parsing group I
-\begin{enumerate}
-\item if a left bracket is in first position, the mathematical argument
-ends with the matching right bracket; otherwise
-\item the argument ends with the item in first position and any L- or M-args
-required by that item.
-\end{enumerate}
-If the factorial sign \verb`!` \emph{preceded} its argument, it too
-would belong to this parsing state, for it also binds tightly like
-the surd. This means that an expression like $\surd4!$ is intrinsically
-ambiguous. Is it the square root of $24$ or the factorial of $2$?
-In \texttt{numerica} it produces the (perhaps rather odd) error
-\begin{centred}
-\verb`\eval{$ \surd 4! $}` $\Longrightarrow$ \eval{$ \surd4! $}
-\end{centred}
-The surd has seized the argument; there is nothing for the factorial
-to operate on. The same error arises if the $4$ is parenthesized,
-but parenthesizing like either \verb`(\surd 4)!` or \verb`\surd(4!)`
-repairs the situation. Because other unary functions (like the sine
-or logarithm) do not bind as tightly, this ambiguity does not arise
-for them.
-
-Exponents cause no problem because taking square roots and raising
-to a power are commutative operations – the result is the same whichever
-is performed first. 
-\begin{centred}
-\verb`\eval{$ \surd 3^4 $}` $\Longrightarrow$ \eval{$ \surd 3^4 $}.
-\end{centred}
-
-\subsubsection{Parsing group II: unary functions, slash fractions}
-
-In the default setup this category includes the trigonometric and
-hyperbolic functions, their inverses, the various logarithms and the
-exponential functions, the signum function \verb`\sgn`, and the slash
-fraction \verb`/` where the argument to be determined is its denominator.
-Note however that there is a setting switch which enables trigonometric
- functions to handle parentheses in arguments more generally; see
-§\ref{subsec:parseTrigFns}. 
-\begin{itemize}
-\item In parsing group II we wish to accommodate usages like $\ln z^{n}=n\ln z$
-(\emph{HMF} 4.1.11), or $\gd z=2\arctan e^{z}-\frac{1}{2}\pi$ (\emph{HMF}
-4.3.117), defining the Gudermannian. The exponent is included in the
-argument. Considering $\ln(1+1/n)^{n}$ exponents must also be part
-of parenthesized arguments. 
-\item An approximation to Stirling's formula for the factorial is often
-written $\ln N!\approx N\ln N-N$ (widely used in texts on statistical
-mechanics). Hence the factorial sign should also be considered part
-of the argument.
-\item $\ln xy=\ln x+\ln y$ means the argument must reach over a product
-of variables. Identities like $\sin2z=2\sin z\cos z$ mean the argument
-also reaches over numbers, and expressions like $\sin\tfrac{1}{2}\pi x$
-(\emph{HMF} 4.3.104) mean that it further reaches over \verb`\tfrac`-s
-and constants.
-\item Essentially \emph{anything }can be in first position, and without
-parentheses; e.g.
-\begin{itemize}
-\item unary functions: $\ln\ln z$ (\emph{HMF} 4.1.52), $\ln\tan\dfrac{z}{2}$
-(\emph{HMF} 4.3.116),
-\item fractions: $\ln\dfrac{z_{1}}{z_{2}}$ (\emph{HMF} 4.1.9), $\arcsin\dfrac{(2ax+b)}{(b^{2}-4ac)^{1/2}}$
-(\emph{HMF} 3.3.36), $\ln\dfrac{\tan z}{z}$ (\emph{HMF} 4.3.73),
-\item absolute values: $\ln\abs*{\dfrac{a+x}{a-x}}$ (\emph{HMF} 3.3.25),
-\item square roots: $\arctan\sqrt{\dfrac{\nu_{1}}{\nu_{2}}F}$ (\emph{HMF
-}26.6.8)
-\end{itemize}
-\end{itemize}
-With these examples in mind, for parsing group II
-\begin{enumerate}
-\item if a left bracket is in first position, the mathematical argument
-ends with the matching right bracket and any attached exponent, or
-factorial or double factorial sign; otherwise
-\item the mathematical argument includes the item in first position and
-any L- or M-args required by that item; 
-\begin{enumerate}
-\item if the item in first position is a number, variable, constant or \verb`\tfrac` 
-\begin{enumerate}
-\item the argument appends the next item if it is a number, variable, constant
-or \verb`\tfrac`, and so on recursively; or
-\item the argument appends the next item if it is an exponent, or facorial
-or double factorial sign, and ends there; otherwise
-\item the argument ends.
-\end{enumerate}
-\item if the item in first position is not a number, variable, constant
-or \verb`\tfrac`
-\begin{enumerate}
-\item the argument appends the next item if it is an exponent, or factorial
-or double factorial sign, and ends there; otherwise
-\item the argument ends.
-\end{enumerate}
-\end{enumerate}
-\end{enumerate}
-An argument may extend over (see 2(a)i) numbers, constants, variables
-and \verb`\tfrac`-s: $\sin2\tfrac{p}{q}\pi x$ exhibits all elements.
-
-Illustrating 1, the exponent is included in the argument but not the
-following variable:
-\begin{centred}
-\verb`\eval{$ \log_{10}(1+2+3+4)^3n $}[n=5]` $\Longrightarrow$ \eval{$ \log_{10}(1+2+3+4)^3n $}[n=5].
-\end{centred}
-For the sake of the reader, and as one naturally does in any case
-to avoid ambiguity, the formula should be written with the variable
-$n$ preceding the logarithm: $n\log_{10}(1+2+3+4)^{3}$. The way
-the example is written suggests that the writer wished the $n$ to
-be considered part of the argument. If that is the case, an outer
-set of parentheses would make intentions clear, but it is possible
-to leave the argument as written but insert a \verb`\q` command before
-$n$: 
-\begin{centred}
-\verb`\eval{$ \log_{10}(1+2+3+4)^3\q n $}[n=5]` $\Longrightarrow$
-\eval{$ \log_{10}(1+2+3+4)^{3}\q n $}[n=5],
-\end{centred}
-which is $\log_{10}5000.$ 
-
-Illustrating 2(a)ii, again the exponent is included in the argument
-but not the following variable:
-\begin{centred}
-\verb`\eval{$ \log_{10}m^3n $}[m=10,n=5]` $\Longrightarrow$ \eval{$ \log_{10}m^3n $}[m=10,n=5].
-\end{centred}
-Again, for the sake of the reader and as one naturally does to avoid
-ambiguity, the variable $n$ should precede the logarithm. If in fact
-one wants the $n$ included in the argument of the logarithm, the
-\verb`\q` command is again available or, better in this case, the
-$n$ can be shifted to precede the $m$, which illustrates 2(a)i:
-\begin{centred}
-\verb`\eval{$ \log_{10}nm^3 $}[m=10,n=5]` $\Longrightarrow$ \eval{$ \log_{10}nm^3 $}[m=10,n=5].
-\end{centred}
-Is \texttt{numerica} being too strict when $nm^{3}$ is included in
-the argument of the logarithm, but $m^{3}n$ is not? Any criterion
-is going to miss some instances where a different outcome might be
-desirable. Where an argument ends is affected by visual appearance.
-It is simple and easy to remember if it is understood that anything
-that breaks the visual appearance of juxtaposed numbers, variables,
-constants and \verb`\tfrac`-s ends the argument. An exponent does
-just that.
-
-Illustrating 2(b)ii, the argument stops with the \verb`\dfrac` and
-its arguments and does not extend to the following constant:
-\begin{centred}
-\verb`\eval{$ \sin\dfrac12\pi $}` $\Longrightarrow$ \eval{$ \sin\dfrac12\pi $}.
-\end{centred}
-Obviously, someone writing an expression like this intends the $\pi$
-to be part of the argument. In that case, a \verb`\tfrac` should
-be used. The \verb`\dfrac` breaks the `visual flow' of an argument. 
-\begin{description}
-\item [{Fractions}]~
-
-But why not a plain \verb`\frac`? After all, for an inline expression
-it displays in the same way as a \verb`\tfrac`. I considered making
-the argument-behaviour of \verb`\frac` the same as \verb`\tfrac`
-for text-style contexts, and the same as \verb`\dfrac` for display-style
-contexts, but that would have meant the same expression evaluating
-to different results depending on the context, text-style or display-style,
-which ruled it out. Because \verb`\frac` sometimes displays as \verb`\dfrac`,
-it necessarily is treated like \verb`\dfrac` (but see §\ref{subsec:parseTrigFns},
-specifically \texttt{()=2}). 
-\item [{Slash~fractions}]~
-
-It is easy to write ambiguous expressions using the slash $/$ to
-indicate fractions or division. How should $\pi/2n$ be interpreted?
-With from-the-left evaluation and calculator precedence rules which
-give equal precedence to {*} (multiplication) and / (division), this
-would be interpreted as $(\pi/2)\times n$, but most people will instinctively
-interpret it as $\pi/(2n)$. By placing \verb`/` in parsing group
-II, this is what \texttt{numerica} does.
-
-It treats the right-hand argument of the slash \emph{as if it were
-the argument of a named function}. This means that $1/2\sin(\pi/6)$
-is parsed as $(1/2)\sin(\pi/6)$ rather than as $1/(2\sin(\pi/6))$.
-It also means that $1/2\exp(1)$ and $1/2e$ give different results,
-which is acceptable since (in the author's view) they display differently
-and are not instinctively read in the same way.
-\end{description}
-
-\subsubsection{Parsing group III}
-
-\label{subsec:parseTrigFns}By default trigonometric functions are
-set to parsing group II. This accommodates many instances of how arguments
-are used with these functions, but Fourier series in particular require
-more. For them we need to take account of how \emph{parentheses} are
-used in arguments. I find $\tan\tfrac{1}{2}(A+B)$ (\emph{HMF }4.3.148),
-$\sec\pi(\tfrac{1}{4}+\tfrac{1}{2}az)$ (\emph{HMF }19.3.3), $\cos(2m+p)z$
-(\emph{HMF }20.2.3), $\sin(2n+1)v$ (\emph{HMF }16.38.1). Looking
-through various texts discussing Fourier series it is easy to find
-examples like
-\[
-\cos\frac{2\pi}{T}nt,\quad\cos\frac{2\pi}{T}n(t+\tfrac{1}{2}T),
-\]
-and
-\[
-\cos(N+\tfrac{1}{2})\frac{2\pi\tau}{T},\quad\sin2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right).
-\]
-In the last of these \verb`\left` and \verb`\right` have been used
-to enlarge the parentheses. 
-
-All these usages can be accommodated by adjusting a setting in the
-settings option (§\ref{sec:settingsOption}) of the \verb`\eval`
-command:
-\begin{lyxcode}
-()~=~integer
-\end{lyxcode}
-where \texttt{integer} is one of \texttt{0, 1, 2}. For convenience
-of statement in what follows call parentheses, square brackets or
-braces \emph{brackets}. If preceded by a \verb`\left` or \verb`\right`
-or \verb`\biggl` or \verb`\biggr` etc. modifier, call them \emph{Brackets},
-with an uppercase `B'. Modifiers do not contribute to the position
-count, so that a left Bracket in first position means the modifier
-and left bracket are both considered to be in first position. When
-it is immaterial whether it is a bracket or a Bracket I write b/Bracket.
-The rules that follow do not prescribe what mathematicians \emph{ought}
-to do but are intended to be descriptive of certain patterns of mathematical
-practice as discerned in \emph{HMF} and a number of texts (about half
-a dozen) on Fourier series.
-\begin{description}
-\item [{\texttt{()=0}}] is the \emph{default} setting; b/Brackets are included
-in the argument only if
-\begin{itemize}
-\item the left b/Bracket is in first position;
-\begin{itemize}
-\item if the first item beyond the matching right b/Bracket is an exponent,
-or factorial or double factorial sign, it is appended to the argument,
-which ends there, otherwise
-\item the argument ends with the right b/Bracket.
-\end{itemize}
-\end{itemize}
-\item [{\texttt{()=1}}] includes a b/Bracketed expression in the argument,
-provided 
-\begin{itemize}
-\item the left Bracket is in first position;
-\begin{itemize}
-\item if the first item beyond the matching right Bracket is an exponent,
-or factorial or double factorial sign, it is appended to the argument,
-which ends there, otherwise
-\item the argument ends with the right Bracket.
-\end{itemize}
-\item or the item in first position is a number, variable, constant or \verb`\tfrac`
-and the left bracket is in second position;
-\begin{itemize}
-\item if the first item beyond the matching right bracket is an exponent,
-or factorial or double factorial sign, it is appended to the argument,
-which ends there, or
-\item if the first item beyond the matching right bracket is a number, variable,
-constant, or \verb`\tfrac` it is appended to the argument, and so
-on recursively, until
-\begin{itemize}
-\item an exponent, or factorial or double factorial sign is met, which is
-appended to the argument which ends there, or
-\item an item is met which is \emph{not} an exponent, or factorial or double
-factorial sign, or a number, variable, constant or \verb`\tfrac`,
-at which point the argument ends, or
-\item the end of the formula is reached.
-\end{itemize}
-\end{itemize}
-\end{itemize}
-\item [{\texttt{()=2}}] includes a b/Bracketed expression in the argument
-provided
-\begin{itemize}
-\item the left b/Bracket is in first position, or the item in first position
-is a number, variable, constant, \verb`\dfrac`, \verb`\frac` or
-\verb`\tfrac` and the left b/Bracket is in second position, or the
-items in first and second positions are numbers, variables, constants,
-\verb`\dfrac`-s, \verb`\frac`-s or \verb`\tfrac`-s and the left
-b/Bracket is in third position;
-\begin{itemize}
-\item if the first item beyond the matching right b/Bracket is an exponent,
-or factorial or double factorial sign, it is appended to the argument,
-which ends there, or
-\item if the first item beyond the matching right b/Bracket is a number,
-variable, constant, \verb`\dfrac`, \verb`\frac` or \verb`\tfrac`
-it is appended to the argument, and so on recursively, until
-\begin{itemize}
-\item an exponent, or factorial or double factorial sign is met, which is
-appended to the argument which ends there, or
-\item an item is met which is \emph{not} an exponent, or factorial or double
-factorial sign, or a number, variable, constant, \verb`\dfrac`, \verb`\frac`
-or \verb`\tfrac`, at which point the argument ends, or
-\item the end of the formula is reached.
-\end{itemize}
-\end{itemize}
-\end{itemize}
-\end{description}
-The default setting is \texttt{()=0} which is parsing group II behaviour. 
-
-\texttt{()=1} allows $\tan\tfrac{1}{2}(A+B)$ and $\sec\pi(\tfrac{1}{4}+\tfrac{1}{2}az)$,
-and $\cos(2m+p)z$ and $\sin(2n+1)v$, and also items on \emph{both}
-sides of the bracketed part like $\sin\tfrac{1}{2}(m+n)\pi$ provided
-there is only one item between the function and the left bracket:
-\begin{centred}
-\verb`\eval[()=1]{$ \sin\tfrac16(m+n)\pi $}[m=1,n=2]`. $\Longrightarrow$
-\eval[()=1]{$ \sin\tfrac16(m+n)\pi $}[m=1,n=2].
-\end{centred}
-Note that \texttt{numerica} does not check what is included between
-the brackets – it could be anything. However inserting \verb`\left`,
-\verb`\right` modifiers before the parentheses restricts the argument
-of the sine in this example to the \verb`\tfrac`:
-\begin{centred}
-\verb`\eval[()=1]{$ \sin\tfrac16\left(m+n\right)\pi $}[m=1,n=2]`.
-$\Longrightarrow$ \eval[()=1]{$ \sin\tfrac16\left(m+n\right)\pi $}[m=1,n=2].
-\end{centred}
-\texttt{()=2} draws no distinction between brackets and Brackets.
-It allows all \texttt{()=1} possibilities but also \emph{two }items
-(of a suitable kind) before the left b/Bracket; it also allows \verb`\dfrac`-s
-and \verb`\frac`-s in addition to \verb`\tfrac`-s. 
-
-The following examples are taken from different texts on Fourier series.
-The first shows a \verb`\frac` being included in the argument, the
-second shows \emph{two} items – including a \verb`\frac` – preceding
-the left parenthesis, the third shows a \verb`\frac` to the right
-of the parentheses, and the fourth shows parentheses using \verb`\left`-\verb`\right`
-modifiers with two items preceding them:
-\[
-\cos\frac{2\pi}{T}nt,\quad\cos\frac{2\pi}{T}n(t+\tfrac{1}{2}T),\quad\text{\ensuremath{\sin(N+\tfrac{1}{2})\frac{2\pi\tau}{T}}\ensuremath{\quad}and}\quad\sin2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right).
-\]
-All these usages are accommodated by the \verb`()=2` setting. For
-instance
-\begin{verbatim}
-    \eval[p,()=2]
-      { 
-        \[ \sin(N+\tfrac12)\frac{2\pi\tau}T \]
-      }[N=1,\tau=2,T=3]
-\end{verbatim}
-$\Longrightarrow$ \eval[p,()=2]
-      { 
-        \[ \sin(N+\tfrac12)\frac{2\pi\tau}T \]
-      }[N=1,\tau=2,T=3]which is the sine of $(\tfrac{3}{2})\times(\tfrac{4}{3}\pi)=2\pi$
-(and \emph{not }$(\sin\tfrac{3}{2})(\tfrac{4}{3}\pi)$ ), where a
-\verb`\frac` trailing the parentheses has been included in the argument.
-Or consider
-\begin{verbatim}
-    \eval[p,()=2]
-      {\[ 
-         \sin2\pi\left(\frac{x}{\lambda}
-            -\frac{t}{T}\right) 
-      \]}[x=1,\lambda=2,t=3,T=4]
-\end{verbatim}
-$\Longrightarrow$     \eval[p,()=2]
-      {\[ 
-         \sin2\pi\left(\frac{x}{\lambda}
-            -\frac{t}{T}\right) 
-      \]}[x=1,\lambda=2,t=3,T=4] which is the sine of $2\pi\times(-\tfrac{1}{4})=-\tfrac{1}{2}\pi$
-(and \emph{not} $\sin2\pi$ times the parenthesised expression) where
-there are two items before the parentheses which surround two \verb`\frac`-s
-and \verb`\left` and \verb`\right` modifiers have been used with
-the parentheses.
-
-However a usage like $\sin(n+\tfrac{1}{2})(x-t)$, noted in two different
-texts, is not available without explicit use of the \verb`\q` command
-between the parenthesized groups. 
-
-\subsubsection{Parsing group IV}
-
-The only members of this group are \verb`\sum` and \verb`\prod`.
-
-For parsing group IV
-\begin{enumerate}
-\item the argument ends 
-\begin{enumerate}
-\item at the first naked plus or minus sign encountered, or 
-\item at the first comparison sign or comparison command encountered, or
-\item at the first logical And or logical Or sign encountered, or
-\item at the end of the formula.
-\end{enumerate}
-\end{enumerate}
-In practice this means mainly (a) and (d), and seems to be the instinctive
-practice. \emph{HMF} has multiple examples in multiple chapters of
-the argument to a sum ending at a naked plus sign: 7.3.12 \& 7.3.14,
-9.1.11 \& 9.1.77, 9.6.35 \& 9.6.43, 11.1.9, \ldots{} (at that point
-I stopped looking). They were all of the form
-\[
-\sum\text{argument}+\ldots
-\]
- A minus sign serving the same purpose was harder to find but \emph{HMF}
-10.4.65 \& 10.4.67 are two instances. I considered whether a \verb`\times`
-or slash fraction sign \verb`/` might end the argument of a sum,
-but surely we need to allow things like $\sum1/n^{2}$ which rules
-out the slash and \emph{HMF} 9.9.11 provides two of a number of instances
-in \emph{HMF} of sum arguments continuing past explicit \verb`\times`
-signs (at line breaks when a summand spills onto a second line).
-
-Because they are evaluated using the same code as sums I (unthinkingly)
-placed products with sums but doubts later intruded. In \emph{HMF}
-products occur only occasionally and are almost all of the form
-\[
-\prod\left(\text{argument}\right)
-\]
-where the argument is bracketed (often with \verb`\left \right` modifiers)
-and the multiplicand ends with the right bracket. At least twice (\emph{HMF
-}6.1.25 and 24.2.2.1) an exponent ($-1$) is attached to the right
-bracket and the argument ends there. Looking further afield, a text
-on number theory has examples where the argument of the product extends
-to \emph{three} parenthesised factors, $\prod\left(\text{arg}1\right)\left(\text{arg2}\right)\left(\text{arg3}\right)$
-and a number of others where it extends to two. A text on theory of
-functions has 
-\[
-\prod_{n=1}^{\infty}\left(1+\frac{z}{n}\right)e^{z/n}
-\]
-although \emph{HMF}, for the same expression, encloses the two factors
-within (large) square brackets, as if some ambiguity existed as to
-how far the reach of the \verb`\prod` extended. 
-
-\emph{Tentatively} I retain products here in the same group as sums.
-
-\subsubsection{Parsing group V}
-
-Comparison symbols compose this group: \texttt{=}, \texttt{<}, \texttt{>},
-\verb`\ne`, \verb`\le`, \verb`\ge`, \verb`\leq`, \verb`\geq`,
-and the various comparison commands from the \texttt{amssymb} package
-listed in §\ref{subsec:evalAmssymb-comparisons}. Because of the way
-\texttt{numerica} handles comparisons, it is the argument on the right-hand
-side of the relation that needs determining.
-
-For parsing group V
-\begin{enumerate}
-\item the argument ends at
-\begin{enumerate}
-\item the first logical And or logical Or encountered, or
-\item the first comparison sign or command encountered, or
-\item the end of the formula.
-\end{enumerate}
-\end{enumerate}
-
-\subsubsection{Parsing group VI}
-
-Logical And and logical Or are the sole members of this group. It
-is the right-hand side of the And or Or command that needs determining.
-
-For parsing group VI
-\begin{enumerate}
-\item the argument ends at
-\begin{enumerate}
-\item the first logical And or logical Or encountered, or
-\item the end of the formula.
-\end{enumerate}
-\end{enumerate}
-
-\subsubsection{Disclaimer}
-
-The parsing rules of the different groups are not normative; they
-are not statements of how mathematical formulas should be written.
-Rather they are attempts to discern regularities in how mathematicians
-often do write formulas. It is how things look in the pdf, not \LaTeX ,
-that is the guide. You are always free to parenthesize as you see
-fit and to insert cleave commands (\verb`\q` or \verb`\Q`) to force
-outcomes. 
-
-(But note that parenthesizing has its limits. For sums, writing 
-\[
-\sum\left(\mathtt{<stuff>}\right)\mathtt{<more-stuff>}
-\]
- does not necessarily end the summand at the right parenthesis: it
-ends at the first naked $+$ or $-$ sign, or \verb`\Q` command,
-encountered.) 
-
-The rule should always be to write expressions that are clear to the
-reader of the pdf. An expression that is ambiguous to the reader,
-even if it fits within the parsing rules, is to be deplored. The \emph{intent}
-is that \verb`\eval` can parse unambiguous expressions correctly. 
-
-\chapter{Nesting \texttt{\textbackslash eval} commands}
-
-\label{chap:Nesting}\verb`\eval` commands can be used within \verb`\eval`
-commands, both as part of the formula being evaluated or as part of
-the vv-list or both. Only in special circumstances is this likely
-to be useful – perhaps when a calculation can be divided into two
-or more parts where different settings are appropriate for the different
-parts. One can imagine cases in which trigonometric functions are
-involved and different \texttt{()} settings would be helpful in different
-parts of the formula. Nesting of command within command becomes especially
-significant with the additional commands available when \texttt{numerica}
-is loaded with the \texttt{plus} or \texttt{tables} options; see the
-associated documents \texttt{numerica-plus.pdf} and \texttt{numerica-tables.pdf}.
-Since those additional commands are not available in this document,
-I restrict myself here to some `toy' examples of \verb`\eval` commands
-within \verb`\eval` commands to show how things work. 
-
-\section{Star option for inner \texttt{\textbackslash eval}}
-
-The \verb`\eval` command `digests' a \LaTeX{} formula to produce
-an \verb`l3fp`-readable formula. This is then fed to \verb`l3fp`
-to be evaluated. The evaluated output is then formatted in various
-ways to be displayed. If the inner \verb`\eval` command produces
-formatted output, it is \emph{that} that the outer \verb`\eval` command
-will attempt to digest – and fail. Hence \emph{always} use the star
-option for the inner \verb`\eval` command. That means the outer \verb`\eval`
-is feeding on a number only:
-\begin{centred}
-\verb`\eval{$ \sin(\eval*{\sin x}[x=\pi/6]\pi) + 1 $}` $\Longrightarrow$
-\eval{$ \sin(\eval*{\sin x}[x=\pi/6]\pi) + 1$}. 
-\end{centred}
-Also no math delimiters are used in the inner command. These are irrelevant
-with the star option in any case, but in the present context would
-cause error if included because they would be treated as part of the
-formula and thereby produce an `unknown token' error message. In
-the presentation of the overall result that the inner \verb`\eval`
-command is evaluated, showing as $0.5$.
-
-\section{Nesting in the vv-list}
-\begin{centred}
-\verb`\eval{$ \sin k\pi + 1 $}[k=\eval*{\sin x},x=\pi/6]` $\Longrightarrow$
-\eval{$ \sin k\pi + 1 $} [k=\eval*{\sin x},x=\pi/6].
-\end{centred}
-When the inner \verb`\eval` command is in the vv-list of the outer
-command and has a vv-list of its own, then the entire inner command
-needs to be placed in braces:
-\begin{centred}
-\verb`\eval{$ \sin k\pi + z $}[k={\eval*{y\sin x}[x=\pi/4,y=1/\surd2]},z=1]`
-$\Longrightarrow$ \eval{$ \sin k\pi + z $} [k={\eval*{y\sin x}[x=\pi/4,y=1/\surd2]},z=1].
-\end{centred}
-The vv-list of the inner \verb`\eval` command contains both a comma
-and square brackets. Both elements need to be hidden from the outer
-\verb`\eval` in order that \emph{its }vv-list be parsed correctly.
-Hence braces surround the inner \verb`\eval` and its arguments. The
-same need arises if the inner \verb`\eval` has a non-empty settings
-option – another comma-separated square-bracketed option.
-
-The values of variables used in an inner \verb`\eval` command are
-restricted to that command; they do not `leak' into the outer calculation.
-But variables and their values in the outer vv-list are available
-for use in the inner \verb`\eval` command (unless a value is explicitly
-changed in the inner vv-list).
-
-\subsection{Debugging}
-
-\label{subsec:nestDebugging}It is worth looking at the debug display
-when \verb`\eval` commands are nested. For the outer \verb`\eval`
-command:
-\begin{centred}
-\verb`\eval[dbg=210]{$ \sin \eval*{\sin x}[x=\pi/6]\pi + 1 $}` $\Longrightarrow$
-\eval[dbg=210]{$ \sin \eval*{\sin x}[x=\pi/6]\pi + 1 $}
-\end{centred}
-and when the inner \verb`\eval` is in the vv-list,
-\begin{centred}
-\verb`\eval[dbg=210]{$ \sin k\pi + 1 $}[k=\eval*{\sin x},x=\pi/6]`
-$\Longrightarrow$ \eval[dbg=210]{$ \sin k\pi + 1 $} [k=\eval*{\sin x},x=\pi/6]
-\end{centred}
-For the inner \verb`\eval` command debugging still works but in an
-idiosyncratic way. To clarify exactly what is going on I have added
-a \verb`\left( \right)` pair around the entire inner \verb`\eval`
-command. Note that I have also used a \emph{negative} \texttt{dbg}
-value. With a positive value, the right parenthesis is pressed toward
-the right margin of the page. The negative value limits the display
-to the text width and gives the much neater result shown.
-\begin{verbatim}
-    \eval[()=2]{$
-      \sin\left( 
-            \eval*[dbg=-210]{ \sin x }[x=\pi/6]
-          \right)\pi + 1 $}
-\end{verbatim}
-$\Longrightarrow$     \eval[()=2]{$ 
-      \sin\left( 
-            \eval*[dbg=-210]{ \sin x }[x=\pi/6]
-          \right)\pi + 7 $}
-
-\medskip{}
-The debug display from the inner \verb`\eval` command has been inserted
-into the formula of the outer \verb`\eval` in the position occupied
-by the inner \verb`\eval`. I did not deliberately code for this,
-but have decided to leave it as is, since there can be no confusion
-about which \verb`\eval` command is being `debugged', despite the
-potential for some rather odd displays. In this last example, in order
-to both use \verb`\left(...\right)` and have the calculation give
-the previous result I have employed the setting \verb`()=2` in the
-outer \verb`\eval`; see §\ref{subsec:parseTrigFns}.
-
-\chapter{\texttt{\textbackslash nmcInfo (\textbackslash info)}}
-
-\label{sec:info}Used after the evaluation of an `infinite' process,
-the \verb`\nmcInfo` command, or its equivalent short-name form \verb`\info`
-will tell you how many terms or factors or iterations or steps were
-needed to arrive at the result. The syntax of the \verb`\nmcInfo`
-command is 
-\begin{lyxcode}
-\textbackslash nmcInfo\{<arg>\}~
-\end{lyxcode}
-where \texttt{<arg>} is restricted to one of two choices at present,
-either \texttt{sum} or \texttt{prod}. If the package \texttt{numerica-plus.def}
-is loaded (see §\ref{subsec:introPackagesOptions} and the associated
-document \texttt{numerica-plus.pdf}) two further arguments are possible:
-\texttt{iter} and \texttt{solve}. 
-
-There is a starred form of the command:
-\begin{lyxcode}
-\textbackslash nmcInfo{*}\{<arg>\}
-\end{lyxcode}
-(or \verb`\info*{<arg>}`). As with the \verb`\eval` command the
-star has the effect of suppressing anything other than the numerical
-result from the display. 
-
-As an example, let's test a standard identity, $\cosh^{2}x-\sinh^{2}x=1$,
-`the hard way'. We know that $\cosh x=\sum_{n=0}^{\infty}\frac{x^{2n}}{(2n)!}$
-and $\sinh x=x\prod_{k=1}^{\infty}\left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)$.
-The difference of their squares should be $1$:
-\begin{verbatim}
-    \eval{\[  
-      \left[\sum_{n=0}^{\infty}
-        \frac{x^{2n}}{(2n)!}
-      \right]^2-
-        \left[x\prod_{k=1}^{\infty}
-          \left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)
-        \right]^2
-      \]}[x=1][3] \info{sum}\quad \info{prod}
-\end{verbatim}
-$\Longrightarrow$ \eval{\[  
-      \left[\sum_{n=0}^{\infty}
-        \frac{x^{2n}}{(2n)!}\right]^2-
-      \left[x\prod_{k=1}^{\infty}
-        \left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)\right]^2
-    \]}[x=1][3] \info{sum}\quad \info{prod}.
-
-Nearly right. Obviously the product converges only slowly which is
-where the error comes from (see the discussion in §\ref{sec:settingsInfiniteSumsProds},
-where we needed the extra rounding setting \texttt{P+=3} and $350$
-factors to get a correct 3-figure value). The point of the example
-is to show the information command being used for both sum and product
-in the one evaluation. One does not exclude the other.
-
-The information command can also be placed in the settings option
-as the value of the punctuation setting. An example of this has already
-been provided earlier which I'll repeat here:
-\begin{verbatim}
-    \eval[p=\mbox{,\quad\nmcInfo{sum}.}]
-      {\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3] 
-\end{verbatim}
-$\Longrightarrow$ \eval[p=\mbox{,\quad\nmcInfo{sum}.}]{\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3]
-
-Because of the \texttt{\textbackslash{[} \textbackslash{]}} delimiters,
-if the information command had been placed \emph{after} the \texttt{\textbackslash eval}
-command, it would have slid down to the next line. As it is, it resides
-\emph{inside} the \texttt{\textbackslash{[} \textbackslash{]}}
-delimiters, on the same line as the expression. This may be significant
-for adjusting vertical spacing of subsequent elements of the document.
-
-\section{Errors}
-
-Should the wrong argument be used in the \verb`\nmcInfo` command,
-no harm is done:
-\begin{verbatim}
-    \eval{$
-      \sum_{k=0}^{\infty}\binom \alpha k x^k
-         $}[x=1/2,\alpha=3], \ \info{prod} 
-\end{verbatim}
-$\Longrightarrow$  \eval{$ \sum_{k=0}^{\infty}\binom \alpha k x^k $}[x=1/2,\alpha=3],\ \info{prod}.
-
-$119$ \emph{factors}? The information command is remembering a previous
-result, the last time \verb`prod` was used as its argument. Changing
-the argument from \verb`prod` to \verb`sum` reveals the correct
-number of \emph{terms}.
-
-Should a non-existent argument be used, an error message is generated:
-\begin{verbatim}
-    \eval{$ 
-      \sum_{k=0}^{\infty}\binom \alpha k x^k 
-         $}[x=1/2,\alpha=3], \\ \info{Fred} 
-\end{verbatim}
-$\Longrightarrow$  \eval{$ \sum_{k=0}^{\infty}\binom \alpha k x^k $}[x=1/2,\alpha=3],\\  \info{Fred}
-
-\chapter{Saving and reusing results }
-
-\label{chap:Saving-and-retrieving}You may want to use at some place
-in a document a result calculated earlier. It would be good to be
-able to do so without having to do the calculation again at the new
-location. \texttt{numerica} offers a command \verb`\nmcReuse` which
-saves a result to a control sequence which can be used elsewhere in
-the document, expanding to the saved result. The control sequence
-and its content are also saved to file for use on other occasions. 
-
-The syntax of \verb`\nmcReuse` is simple. The command takes two optional
-arguments, a star (asterisk) and a conventional square-bracket delimited
-argument. If both are used it looks like
-\begin{lyxcode}
-{\small\textbackslash nmcReuse{*}{[}csname{]}}{\small\par}
-\end{lyxcode}
-where \texttt{csname} is the proposed name of what will become the
-control sequence \verb`\csname` containing the latest result from
-the \verb`\eval` command. The name should be composed of letters
-only. 
-
-As with \verb`\nmcEvaluate` and \verb`\nmcInfo` there is a short-name
-form, \verb`\reuse`, for \verb`\nmcReuse`. If a conflict with another
-package arises, it should be possible to fall back on \verb`\nmcReuse`. 
-
-\section{Use without optional argument: \texttt{\textbackslash nmcReuse}}
-
-Suppose your document is \verb`mydoc.tex` (so that the \LaTeX{} command
-{\small\verb`\jobname`} expands to \verb`mydoc`). If \verb`\nmcReuse`
-is used without optional arguments, then \texttt{numerica} checks
-for the existence of a file \verb`mydoc.nmc` in the current document
-directory\texttt{ }and if found loads and records the contents of
-\verb`mydoc.nmc`. The contents should be a comma separated list of
-control sequences and braced values like \texttt{\textbackslash csname1
-\{value1\},\textbackslash csname2 \{value2\},...} The control sequences
-can then be used elsewhere in the document. In particular, control
-sequences containing numerical values can be used in expressions within
-\verb`\eval` commands and in vv-lists.\footnote{The associated document \texttt{numerica-plus.pdf} describes how other
-quantities like tables and sequences of numerical values (iterates,
-recurrences) can also be saved and reused.} 
-
-Note that the control sequences are given \LaTeX{} definitions using
-\verb`xparse`'s \verb`\NewDocumentCommand` (a little more general
-than \LaTeXe 's \verb`\newcommand`) and can be used at any later
-point in the document simply by entering the control sequence (e.g.,
-\verb`\csname1`) there (but see §\ref{subsec:reuseGroup-level}).
-Should there already be a control sequence with the same name, \LaTeX{}
-will generate an error and halt compilation. 
-
-\section{Use with optional name: \texttt{\textbackslash nmcReuse{[}csname{]}}}
-
-If a name \emph{is} supplied, say \verb`\nmcReuse[csname]`, then
-not only does \texttt{numerica} first look for \verb`mydoc.nmc` (assuming
-your document is called \verb`mydoc.tex`) and load the values stored
-in that file if they have not already been loaded, but it also defines
-\verb`\csname` to contain the latest result from the \verb`\eval`
-command. Should \verb`\csname` already be present in \verb`mydoc.nmc`
-and so have been loaded with the other values from \verb`mydoc.nmc`,
-the old value is overwritten with the new value using \verb`xparse`'s
-\verb`\RenewDocumentCommand` and the new value is saved to the file
-\verb`mydoc.nmc`.
-
-\subsection{Group level}
-
-\label{subsec:reuseGroup-level}Control sequences like \verb`\csname`
-defined by \verb`\nmcReuse` are defined within the current group
-level. A usage like
-\begin{centred}
-\verb`$ \eval{1+1}\reuse[two] $`
-\end{centred}
-confines the definition of \verb`\two` to the environment delimited
-by the dollar signs. A usage like 
-\begin{centred}
-\verb`$ \eval{1+1} $ \reuse[two]`,
-\end{centred}
-where the command has been moved outside the math delimiters, still
-confines the definition of \verb`\two` to whatever larger environment
-the \verb`\reuse` command might lie within. If in fact the definition
-occurs at document level then \verb`\two` (in the present example)
-is available for use throughout the document, otherwise it is available
-only within the confines of the current environment. 
-
-This is likely to be \emph{not }what is wanted. The remedy is simple:
-precede the saved control sequence – \verb`\two` in the present instance
-– with a `naked' \verb`\reuse` command. This loads the value stored
-in \verb`mydoc.nmc`. In the following example, \verb`\reuse` is
-used within a math environment which is followed by some text (\verb`blah blah result:`)
-then a `naked' \verb`\reuse` command and the control sequence \verb`\two`
-(between math delimiters, which are necessary for reasons explained
-in the next section).
-\begin{centred}
-\verb`$ \eval{1+1} \reuse[two] $, blah blah result: \reuse $\two$.`
-$\Longrightarrow$ $ \eval{1+1} \reuse[two]$, blah blah result: \reuse $\two$. 
-\end{centred}
-
-\section{What is saved?}
-
-\label{sec:reuseWhat-is-saved}In the default configuration \verb`\nmcReuse`
-saves the entirety of the display resulting from the latest \verb`\eval`-uation.
-This may include invisible formatting elements meaning that what one
-expects to be only a number cannot be inserted into text without causing
-a \LaTeX{} error; it requires a math environment to print – see the
-last example.
-
-The simplest way to avoid this awkwardness is to use \verb`\eval`
-with the star option. This produces a numerical result with \emph{no
-}formatting. In the following example, I calculate \verb`11+11` with
-\verb`\eval*` and store the value in the control sequence \verb`\twos`.
-I then enter some text (\verb`Blah blah blah:`) and insert the control
-sequence \verb`\twos` into the text without math delimiters. As you
-can see, \verb`\twos` has expanded to $22$, the result of the calculation.
-\begin{centred}
-\verb`\eval*{$ 11+11 $}. \nmcReuse[twos] Blah blah blah: \twos` $\Longrightarrow$
- \eval*{$ 11+11 $}. \nmcReuse[twos] Blah blah blah: \twos
-\end{centred}
-
-\subsection{Viewing what is saved: \textbackslash reuse\texttt{{*}}}
-
-To view what is saved in the \verb`.nmc` file append a star (asterisk)
-to the \verb`\reuse` command. (This makes particular sense when using
-\texttt{numerica} in a program like \LyX{} with a preview facility;
-see Chapter~\ref{chap:LyX}.)
-\begin{centred}
-\verb`\reuse*` $\Longrightarrow$ \reuse*
-\end{centred}
-Particularly notable here is the invisible formatting \verb`\mathchoice{}{}{}{}`
-accompanying \verb`2` in the value of \verb`\two`. 
-
-The two options of the\verb`\reuse` command can be used together,
-in which case the control sequence resulting from the name supplied
-in the square-bracketed option will appear in the list resulting from
-the star option, i.e. the list contains not just what has been saved
-earlier but also the current control sequence saved.
-
-\subsection{\texttt{\textbackslash eval}'s \texttt{reuse} setting}
-
-\label{subsec:reuse=00005Ceval's-reuse-setting}The star option of
-the \verb`\eval` command allows a purely numerical result to be saved,
-but also only a number is displayed. By using the \verb`reuse` setting
-of the \verb`\eval` command it is possible to have both a full display
-of an evaluation, vv-list and all, and to save only a numerical result.
-
-For the \emph{starred} form of the \verb`\eval` command it is always
-\emph{only the numerical result} that is saved, whatever the value
-of the \texttt{reuse} key in the settings option of the \verb`\eval`
-command.
-
-For the \emph{unstarred} form of the \verb`\eval` command exactly
-what is saved with \verb`\nmcReuse` depends on the \texttt{reuse}
-setting:
-\begin{lyxcode}
-reuse~=~<integer>
-\end{lyxcode}
-where \verb`<integer>` can take one of two values,
-\begin{itemize}
-\item \texttt{reuse=0} (the default) saves\emph{ the form that is displayed}
-including a formatting component. If the result is displayed in the
-form \emph{formula=result (vv-list)} then that is what is saved; if
-the display is of the form \emph{result (vv-list)} then that is what
-is saved; if the vv-list is empty, an empty formatting component is
-still present in the saved result;
-\item \texttt{reuse=1} (or, indeed, any non-zero integer) saves only the
-numerical result with no other elements of the display (meaning no
-formatting component).
-\end{itemize}
-Thus, with the default setting (\texttt{reuse=0}) the full content
-of the display is saved:
-\begin{centred}
-\verb`\eval{$ x + y $}[x=1,y=1] \reuse[iandi]` $\Longrightarrow$
-\eval{$ x + y $}[x=1,y=1] \reuse[iandi].
-\end{centred}
-To check that this is the case, \verb`\reuse \iandi` $\Longrightarrow$
-\reuse \iandi .
-
-On the other hand, with \texttt{reuse=1} only the numerical value
-is saved:
-\begin{centred}
-\verb`\eval[reuse=1]{$ x + y $}[x=1,y=1] \reuse[iandi]` $\Longrightarrow$
-\eval[reuse=1]{$ x + y $}[x=1,y=1] \reuse[iandi],
-\end{centred}
-which we can check here: \verb`\reuse\iandi` $\Longrightarrow$ \reuse\iandi . 
-
-\subsubsection{\texttt{\textbackslash reuse} in the preamble}
-
-To gain access from the outset to the control sequences stored in
-the file \texttt{mydoc.nmc}, place \verb`\nmcReuse` without an optional
-argument in the preamble (but after \verb`\usepackage{numerica}`).
-
-\chapter{Using \texttt{numerica} with \protect\LyX}
-
-\label{chap:LyX}The document processor \LyX{} has a facility that
-enables snippets from a larger document to be compiled separately
-and the results presented to the user without having to compile the
-entire document. The present document was written in \LyX . The demonstration
-calculations were evaluated using this \emph{instant preview} facility. 
-
-To use \texttt{numerica} in \LyX{} go to \textsf{Document \lyxarrow{}
-Settings \lyxarrow{} LaTeX Preamble} and enter
-\begin{lyxcode}
-\textbackslash usepackage\{numerica\}
-\end{lyxcode}
-then click \textsf{OK}. However preview poses problems for the straightforward
-use of the \verb`\nmcReuse` command. If you wish to use this command
-in \LyX{} then \texttt{numerica} should be loaded with the \texttt{lyx}
-package option. Thus in \textsf{Document \lyxarrow{} Settings \lyxarrow{}
-LaTeX Preamble} enter
-\begin{lyxcode}
-\textbackslash usepackage{[}lyx{]}\{numerica\}
-\end{lyxcode}
-then click \textsf{OK}, or you may wish to follow the above line in
-the preamble with \verb`\nmcReuse`,
-\begin{lyxcode}
-\textbackslash usepackage{[}lyx{]}\{numerica\}
-
-\textbackslash nmcReuse
-\end{lyxcode}
-and \emph{then} click \textsf{OK}. The additional line ensures all
-saved values are available in your document from the outset.
-
-\section{Instant~preview}
-
-Preview performs localised mini-\LaTeX{} runs on selected parts of
-a document (for instance, the mathematical parts) and displays the
-results in \LyX{} while the user continues to work on the surrounding
-document.\texttt{ numerica} uses these local \LaTeX{} runs to do its
-evaluations and display their results. That means you get feedback
-on your calculations almost immediately.
-
-To use this facility first ensure that instant preview is turned on.
-This means selecting \textsf{Tools \lyxarrow Preferences \lyxarrow Look
-\& Feel \lyxarrow{} Display} and against \textsf{Instant preview} selecting
-\textsf{On}, then clicking \textsf{OK}.
-
-\subsection{Conflict with hyperref support?}
-
-There may be a conflict in \LyX{} between hyperref support and preview,
-not that the previews do not form but that their formation takes a
-circuitous path that noticeably slows their display.\footnote{At least there is on the author's Windows 10 system, but I'm not sure
-that this is general.} If this occurs on your system, go to \textsf{Document \lyxarrow{}
-Settings \lyxarrow{} PDF Properties} and ensure the check box \textsf{Use
-Hyperref Support} is cleared. By all means reset the check box when
-you come finally to compile your document, but until then it should
-result in a noticeably brisker display of previews if the checkbox
-is cleared.
-
-\section{Mathed}
-
-(Mathed = the \LyX{} mathematics editor.) If you have instant preview
-\emph{on} then one way to use \texttt{numerica} in \LyX{} is to enter
-an \verb`\eval` command in mathed. Clicking the cursor outside the
-editor with the mouse or moving it outside with the arrow keys will
-then trigger formation of a preview of the editor's contents – a snippet
-of what will be shown in the pdf. This will be displayed in mathed's
-place after a generally short `pause for thought' as the mini-\LaTeX{}
-run progresses behind the scenes. 
-
-The original expression can be recovered by clicking on the preview.
-The content of mathed is immediately displayed and can be edited.
-
-\subsection{\protect\LaTeX{} braces~\{~~\}}
-
-\LyX{} does not support \texttt{numerica}'s \verb`\eval` command `out
-of the box' as it does, say, \verb`\frac` or \verb`\sqrt`. To use
-the \verb`\eval` command in mathed you will need to supply the braces
-used to delimit its mandatory argument. (For \verb`\frac` and \verb`\sqrt`
-by contrast, \LyX{} supplies these automatically.) Unfortunately the
-\verb`{` key\footnote{\textsf{Shift+{[}} on my keyboard.} does not
-insert a left brace into the document but rather an escaped left brace
-\verb`\{` as you can see by looking at \textsf{View \lyxarrow{} Code
-Preview Pane}. Escaped braces like this are used for grouping terms
-in \emph{mathematics}; they are not the delimiters of a \LaTeX{} argument. 
-
-The brace delimiters for \LaTeX{} arguments are entered in mathed by
-typing a backslash \textsf{\textbackslash{} }then\textsf{ \{} (two
-separate key presses rather than a single combined press). This enters
-a balanced pair of (unescaped) braces with the cursor sitting between
-them waiting for input. Alternatively, if you have already written
-an expression that you want to place between braces, select it, then
-type \textsf{\textbackslash{} }then\textsf{ \{}.
-
-\section{Preview insets vs mathed}
-
-There are problems with using mathed for calculations.
-\begin{itemize}
-\item Expressions entered in mathed are necessarily of the form \verb`$ \eval... $`
-or more generally \verb`delimiter` \verb`\eval...` \verb`delimiter`.
-But you may wish to wrap the \verb`\eval` command \emph{around} the
-math delimiters to produce a \emph{formula=result} form of display.
-In mathed the only way to do that is to write the \emph{formula= }part
-yourself – which may involve no more than copy and paste but is still
-additional mouse work/key pressing. 
-\item Mathed does not accept carriage returns. If you want to format a complicated
-expression for readability by breaking it into separate lines, you
-can't. The expression is jammed into the one line, along with the
-settings option content and the vv-list. 
-\end{itemize}
-For these reasons I have come to prefer \emph{not} using mathed for
-calculations but instead to use preview insets wrapped around \TeX -code
-(ERT) insets. \LyX{} uses the shortcut \textsf{Ctrl+L} to insert an
-ERT inset. Since \LyX{} now does no printing itself, the shortcut \textsf{Ctrl+P}
-that was formerly used for printing is available for other purposes.
-On my keyboard, the \textsf{P} key lies diagonally up and to the right
-but adjacent to the \textsf{L} key. I suggest assigning \textsf{Ctrl+P}
-to inserting a preview inset. Then typing \textsf{Ctrl+P Ctrl+L} –
-which means holding the \textsf{Ctrl} key down and tapping two adjacent
-keys, \textsf{P} followed immediately by \textsf{L} – will insert
-an ERT inset inside a preview inset with the cursor sitting inside
-the ERT inset waiting for input. In the ERT inset you can enter carriage
-returns, and so format complicated expressions. You can place the
-vv-list on a separate line or onto consecutive lines. And when you
-have finished, clicking outside the preview inset will trigger preview
-into doing its thing and present the result `before your eyes'. 
-
-To assign the suggested shortcut, go to \textsf{Tools \lyxarrow{} Preferences
-\lyxarrow{} Editing \lyxarrow{} Shortcuts}. Under \textsf{Cursor, Mouse
-and Editing Functions} in the main window on the right, scroll down
-until you come to \textsf{preview-insert}, select it, then click \textsf{Modify}.
-Now press \textsf{Ctrl+P}. The shortcut will magically appear in the
-greyed, depressed key.\textsf{ }Click \textsf{OK} and then \textsf{OK}
-in the \textsf{Preferences} window to close it. (Most of the examples
-in this document have been evaluated in this way, using \textsf{Ctrl+P
-Ctrl+L.)}
-
-\section{Errors }
-
-Instant preview will display \texttt{numerica} error messages in \LyX{}
-just as it does the results of calculations. Clicking on the message
-will show the underlying expression which can then be edited. However
-\LaTeX{} errors will \emph{not} produce a preview; formation of the
-preview will stall. To find precisely what has gone wrong, you will
-need to look at the \LaTeX{} log, but not the log of the overall document;
-rather the \emph{preview} log. Unfortunately this is tucked away in
-a temporary directory and is not immediately accessible in \LyX{} (unlike
-the main \LaTeX{} log from \textsf{Document \lyxarrow{} \LaTeX{} Log}).
-When \LyX{} is started, it sets up a temporary directory in which to
-perform various tasks. On Windows systems this will be located in
-\texttt{C:\textbackslash Users\textbackslash <your name>\textbackslash AppData\textbackslash Local\textbackslash Temp}
-and will have a name like \texttt{lyx\_tmpdir.XOsSGhBc1344}. 
-
-One of the tasks \LyX{} uses this temporary directory for is to create
-preview images when a document is opened. If you look inside \LyX 's
-temporary directory when a document is first loaded, you will see
-a subdirectory created, with a name like \texttt{lyx\_tmpbuf0}. There
-may already be such directories there, in which case the number on
-the end will be greater than \texttt{0} – it depends on whether other
-documents are or have been open in the current instance of \LyX .
-Inside the appropriate \texttt{lyx\_tmpbuf}\texttt{\emph{n}} folder
-will be the preview log with a name like \texttt{lyxpreviewZL1344.log}.
-It will usually be accompanied by other files with extensions like
-\texttt{.dvi}, \texttt{.tex}, and perhaps quite a number with the
-extension \texttt{.png}, each one of which is a preview, or part of
-a preview. For a document just loaded there will be only the one preview
-log, but if you have added preview insets or math insets to your document\textsf{
-}in the current editing session there will be a number of such logs
-and you will need to determine the relevant one by the time stamp. 
-
-The log files are text files and can be opened in a text editor. The
-relevant part of the log is towards the end (just before the final
-statistical summary) where you will find a list of entries like \texttt{Preview: Snippet
-1 641947 163840 7864588}. If there is an error, it will be noted here
-among these snippets and will generally make clear what needs remedying.
-
-\subsection{CPU usage, \protect\LaTeX{} processes}
-
-It is possible when a preview fails to resolve that the \LaTeX{} process
-associated with the preview will continue to run, using CPU cycles,
-slowing overall computer performance, and perhaps resulting in extra
-fan use giving a different sound to the computer. In Windows 10, the
-\textsf{Task Manager} (\textsf{Ctrl+Shift+esc}) under the \textsf{Details}
-tab shows the current executables running. The \textsf{CPU} column
-will show which processes are preoccupying the CPU. Check whether
-one or more of these processes looks \LaTeX -related (e.g. \texttt{latex.exe}
-or \texttt{pdflatex.exe}, or \texttt{miktex-pdftex.exe} if using MiK\TeX ).
-Click the \textsf{Name} column to sort the processes by name and look
-for the relevant name in the list, select it, and end the process
-(click the \textsf{End Task} button). 
-
-I am not familiar with the corresponding situation on Linux or Mac.
-
-\section{Using \texttt{\textbackslash nmcReuse}}
-
-As noted, \LyX{} creates its previews in a temporary directory, not
-the document directory. If you want to save values from your current
-document – say, \texttt{mydoc.lyx} – to \texttt{mydoc.nmc} then you
-can do so without drama, but \texttt{mydoc.nmc} will be located in
-the temporary directory, and when \LyX{} is closed will be deleted
-along with the temporary directory.
-
-Suppose first that at the end of a session you manually copy \texttt{mydoc.nmc}
-back to the document directory. How can you ensure that the values
-saved in this file are available the next time you open \texttt{mydoc.lyx}?
-As noted at the start of this chapter entering 
-\begin{lyxcode}
-\textbackslash usepackage{[}lyx{]}\{numerica\}
-
-\textbackslash nmcReuse
-\end{lyxcode}
-in the preamble ensures that these saved values are available for
-use from the outset – available to the mini-\LaTeX{} runs creating
-previews in the temporary directory.
-
-That leaves the problem of saving new values from the current session,
-which are stored in \texttt{mydoc.nmc} in the \emph{temporary} directory,\texttt{
-}back to \texttt{mydoc.nmc} in the \emph{document} directory. When
-\LyX{} is closed the temporary directory with all its contents is deleted.
-As suggested already we could manually copy \texttt{mydoc.nmc} from
-the temporary directory to the document directory but that means remembering
-to do so before closing \LyX . Inevitably we will sometimes forget. 
-
-Fortunately \LyX{} has a copying mechanism for getting files out of
-the temporary directory. When a document is exported – say to pdf
-– it is possible to specify a \emph{copier} to automatically copy
-back to the document directory or subdirectory various files in the
-temporary directory. We want the \texttt{.nmc} file containing the
-saved values to be copied back. Go to \textsf{Tools \lyxarrow{} Preferences
-\lyxarrow{} File Handling \lyxarrow{} File Formats} and find \textsf{PDF
-(pdflatex)} (assuming export to \texttt{pdf} by this route) in the
-list of formats. In\textsf{ }the \textsf{Copier} slot of the dialogue
-insert the following line of code:
-\begin{lyxcode}
-{\small python~-tt~\$\$s/scripts/ext\_copy.py~-e~nmc,pdf~-d~\$\$i~\$\$o}{\small\par}
-\end{lyxcode}
-\verb`ext_copy.py` is a python script that is supplied with \LyX .
-The \texttt{-e nmc,pdf -d} part of the line tells \texttt{ext\_copy.py}
-that on export to \texttt{pdf} by the \texttt{pdflatex} route\texttt{
-}to copy any files with the extensions \texttt{.nmc} or \texttt{.pdf}
-from the temporary directory where \LyX{} does its work back to the
-document directory – the \verb`-d` option (which became available
-from \LyX{} 2.3.0). 
-
-But if you have a complex document, it may take too much time to want
-to export to pdf before closing \LyX , particularly if there are a
-lot of evaluations in the document. Much faster is to export to \emph{plain
-text}, not because you want a plain text version of your document
-but because it too can be used to trigger the copier mechanism. Go
-to \textsf{Tools \lyxarrow{} Preferences \lyxarrow{} File Handling \lyxarrow{}
-File Formats} and find \textsf{Plain text} in the list of formats.
-In the \textsf{Copier} slot enter
-\begin{lyxcode}
-{\small python~-tt~\$\$s/scripts/ext\_copy.py~-e~nmc~-d~\$\$i~\$\$o}{\small\par}
-\end{lyxcode}
-The only difference from the previous copier command is the absence
-of \texttt{pdf}.\footnote{I'm assuming that you don't actually want the plain text version of
-the file copied back. If you do, then change \texttt{-e nmc} to \texttt{-e
-nmc,txt}.} This will copy \texttt{mydoc.nmc} with its saved values from the
-temporary directory back to the document directory. To effect the
-export, go to \textsf{File \lyxarrow{} Export }and find \textsf{Plain
-text} in the list of formats and click on it. 
-
-A shortcut would be nice. For that go to \textsf{Tools \lyxarrow{}
-Preferences \lyxarrow{} Editing \lyxarrow{} Shortcuts}, click on \textsf{New},
-enter \texttt{buffer-export text} in the \textsf{Function:} slot,
-click on the blank key against \textsf{Shortcut:} and type your shortcut.
-You may have to try a number before you find one that hasn't already
-been assigned. (I'm using \textsf{Ctrl+}; for no particular reason
-beyond the fact that it fits under the fingers easily and saving values
-to the document directory has a punctuation-like feel to it, a pause
-in the process of writing.) It is now an easy matter to press the
-shortcut at the end of a \LyX{} session to copy all the values saved
-in \texttt{mydoc.nmc} back to a file of the same name in the document
-directory. And it is brisk, not least because plain text export ignores
-ERT insets (and hence preview insets wrapped around ERT insets), nor
-does it evaluate \verb`\eval` commands in math insets.
-
-\subsection{A final tweak?}
-
-But one still needs to \emph{remember} to press the shortcut. The
-thought arises: can \emph{closing} the current document trigger the
-copying process? \LyX{} provides a means of linking two commands and
-assigning a keyboard shortcut to them with its \texttt{command-sequence}
-\LyX{} function. I suggest assigning a shortcut\textsf{ }to
-\begin{lyxcode}
-command-sequence~buffer-export~text;~view-close
-\end{lyxcode}
-Indeed, why not reassign the current shortcut for \texttt{view-close},\texttt{
-}which is \textsf{Ctrl+W} on my system, to this command sequence?
-(I use the \texttt{cua} key bindings – check the \textsf{Bind file:}
-slot in \textsf{Tools \lyxarrow{} Preferences \lyxarrow{} Editing \lyxarrow{}
-Shortcuts}.)
-
-Please note, however, that \emph{this will work as intended only from
-\LyX{} 2.4.0}.\footnote{Due for release in the first half of 2021.}
-For \LyX{} 2.3 and earlier, the command sequence will generally fail
-because of `asynchronous' processing – \texttt{buffer-export }and
-\texttt{view-close} use different threads and the latter may well
-start before the former is complete. From \LyX{} 2.4.0 this defect
-has been fixed. You press your shortcut, the export to plain text
-occurs and the \texttt{.nmc} file is copied back to the document directory,
-then the current view is closed.
-
-\section{Using \protect\LyX{} notes}
-
-The central fact about a \LyX{} note is that it does not contribute
-to the pdf. But instant preview still works there. This suggests a
-possibility: that a calculation be performed within a \LyX{} note and
-the result saved using \verb`\nmcReuse` within the same preview inset.
-The saved value is now available \emph{from file} for use elsewhere
-in the document. In this way, some selected content from a LyX note
-\emph{can} find its way into the pdf when the document is compiled.
-
-\chapter{Reference summary}
-
-\section{Commands defined in \texttt{numerica}}
-\begin{enumerate}
-\item \texttt{\textbackslash nmcEvaluate, \textbackslash eval }
-\item \texttt{\textbackslash nmcInfo, \textbackslash info, }
-\item \texttt{\textbackslash nmcReuse, \textbackslash reuse}
-\item \texttt{\textbackslash q, \textbackslash Q }(`cleave' commands)
-\end{enumerate}
-Provided they have not already been defined when \texttt{numerica}
-is loaded, the following commands are defined in \texttt{numerica}
-using \verb`\DeclareMathOperator` from \texttt{amsmath} :
-\begin{enumerate}
-\item \texttt{\textbackslash arccsc, \textbackslash arcsec, \textbackslash arccot}
-\item \texttt{\textbackslash csch, \textbackslash sech}
-\item \texttt{\textbackslash asinh, \textbackslash acosh, \textbackslash atanh,
-\textbackslash acsch, \textbackslash asech, \textbackslash acoth}
-\item \texttt{\textbackslash sgn, \textbackslash lb}
-\end{enumerate}
-Provided they have not already been defined, the following commands
-are defined in \texttt{numerica} using \verb`\DeclarePairedDelimiter`
-from \texttt{mathtools}:
-\begin{lyxcode}
-\textbackslash abs,~\textbackslash ceil,~\textbackslash floor
-\end{lyxcode}
-The following commands have been redefined in \texttt{numerica} to
-give more spacing around the underlying \verb`\wedge` and \verb`\vee`
-symbols:
-\begin{lyxcode}
-\textbackslash land,~\textbackslash lor
-\end{lyxcode}
-
-\section{\textquoteleft Digestible\textquoteright{} content}
-
-\texttt{numerica} knows how to deal with the following content, meaning
-that any of these elements occurring within an \verb`\eval` command
-should not of itself cause a \texttt{numerica} error. Not all formatting
-commands affect display of the output.
-\begin{enumerate}
-\item variable names (sequences of tokens given values in the variable~=~value
-list)
-\item digits, decimal point
-\begin{enumerate}
-\item \texttt{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, .}
-\end{enumerate}
-\item constants
-\begin{enumerate}
-\item \texttt{e, \textbackslash pi, \textbackslash gamma, \textbackslash phi,
-\textbackslash deg, \textbackslash infty }(sometimes)
-\end{enumerate}
-\item arithmetic operators
-\begin{enumerate}
-\item \texttt{+, -, {*}, /, \textasciicircum , \textbackslash times, \textbackslash cdot,
-\textbackslash div}
-\end{enumerate}
-\item logical operators
-\begin{enumerate}
-\item \texttt{\textbackslash wedge, \textbackslash land, \textbackslash vee,
-\textbackslash lor, \textbackslash neg, \textbackslash lnot}
-\end{enumerate}
-\item comparisons
-\begin{enumerate}
-\item \texttt{=, <, >, \textbackslash ne, \textbackslash neq, \textbackslash le,
-\textbackslash leq, \textbackslash ge, \textbackslash geq}
-\item (if \texttt{amssymb} loaded) \texttt{\textbackslash nless, \textbackslash ngtr,
-\textbackslash geqq, \textbackslash geqslant, \textbackslash leqq,
-\textbackslash leqslant, \textbackslash ngeq, \textbackslash ngeqq,
-\textbackslash ngeqslant, \textbackslash nleq, \textbackslash nleqq,
-\textbackslash nleqslant}
-\end{enumerate}
-\item brackets, bracket-like elements, modifiers
-\begin{enumerate}
-\item \texttt{( ), {[} {]}, \textbackslash\{ \textbackslash\}}
-\item \texttt{\textbackslash lparen \textbackslash rparen} (from \texttt{mathtools})\texttt{,
-\textbackslash lbrack \textbackslash rbrack, \textbackslash lbrace
-\textbackslash rbrace}
-\item \texttt{\textbackslash lvert \textbackslash rvert, \textbackslash lfloor
-\textbackslash rfloor, \textbackslash lceil \textbackslash rceil}
-\item \texttt{| |} (no nesting, deprecated)
-\item \texttt{\textbackslash left \textbackslash right, \textbackslash bigl
-\textbackslash bigr, \textbackslash Bigl \textbackslash Bigr, \textbackslash biggl
-\textbackslash biggr, \textbackslash Biggl \textbackslash Biggr} 
-\item \texttt{.} \texttt{/ |} (used with a modifier)
-\item \texttt{\textbackslash abs{[}{]}\{\}, \textbackslash abs{*}\{\},
-\textbackslash floor{[}{]}\{\}, \textbackslash floor{*}\{\}, \textbackslash ceil{[}{]}\{\},
-\textbackslash ceil{*}\{\}} 
-\end{enumerate}
-\item unary functions (in the mathematical sense)
-\begin{enumerate}
-\item \texttt{\textbackslash sin, \textbackslash cos, \textbackslash tan,
-\textbackslash csc, \textbackslash sec, \textbackslash cot}
-\item \texttt{\textbackslash arcsin, \textbackslash arccos, \textbackslash arctan,
-arccsc, \textbackslash arcsec, \textbackslash arccot }
-\item \texttt{\textbackslash sin\textasciicircum\{-1\}, \textbackslash cos\textasciicircum\{-1\},
-\textbackslash tan\textasciicircum\{-1\}, \textbackslash csc\textasciicircum\{-1\},
-\textbackslash sec\textasciicircum\{-1\}, \textbackslash cot\textasciicircum\{-1\}}
-\item \texttt{\textbackslash sinh, \textbackslash cosh, \textbackslash tanh,
-\textbackslash csch, \textbackslash sech, \textbackslash coth }
-\item \texttt{\textbackslash asinh, \textbackslash acosh, \textbackslash atanh,
-\textbackslash csch, \textbackslash sech, \textbackslash acoth}
-\item \texttt{\textbackslash sinh\textasciicircum\{-1\}, \textbackslash cosh\textasciicircum\{-1\},
-\textbackslash tanh\textasciicircum\{-1\}, \textbackslash csch\textasciicircum\{-1\},
-\textbackslash sech\textasciicircum\{-1\}, \textbackslash acoth\textasciicircum\{-1\}}
-\item \texttt{\textbackslash exp, \textbackslash lb, \textbackslash lg,
-\textbackslash ln, \textbackslash log, \textbackslash log\_\{\},
-\textbackslash sgn, \textbackslash surd}
-\item \texttt{\textbackslash sqrt\{\}, \textbackslash abs{[}{]}\{\}, \textbackslash abs{*}\{\},
-\textbackslash floor{[}{]}\{\}, \textbackslash floor{*}\{\}, \textbackslash ceil{[}{]}\{\},
-\textbackslash ceil{*}\{\}}
-\item \texttt{!, !! }(prepended argument)
-\end{enumerate}
-\item binary functions 
-\begin{enumerate}
-\item \texttt{\textbackslash tfrac\{\}\{\}, \textbackslash frac\{\}\{\},
-\textbackslash dfrac\{\}\{\}}
-\item \texttt{\textbackslash tbinom\{\}\{\}, \textbackslash binom\{\}\{\},
-\textbackslash dbinom\{\}\{\}}
-\item \texttt{\textbackslash sqrt{[}{]}\{\}}
-\end{enumerate}
-\item $n$-ary functions
-\begin{enumerate}
-\item \texttt{\textbackslash min, \textbackslash max, \textbackslash gcd}
-\end{enumerate}
-\item sum, prod
-\begin{enumerate}
-\item \texttt{\textbackslash sum\_\{\}\textasciicircum , \textbackslash prod\_\{\}\textasciicircum{} }
-\end{enumerate}
-\item formatting commands
-\begin{enumerate}
-\item \texttt{,} (comma, in $n$-ary functions)
-\item \texttt{\{\}, \textbackslash\textbackslash , \&, \textbackslash to}
-\item \texttt{\textbackslash dots, \textbackslash ldots, \textbackslash cdots,}
-\item \texttt{\textbackslash{} , \textbackslash ,{}, \textbackslash ;,
-\textbackslash :, \textbackslash !, \textbackslash >}
-\item \texttt{\textbackslash thinspace, \textbackslash quad, \textbackslash qquad
-, \textbackslash hfill, \textbackslash hfil}
-\item \texttt{\textbackslash phantom\{\}, \textbackslash vphantom\{\},
-\textbackslash hphantom\{\}}
-\item \texttt{\textbackslash xmathstrut{[}{]}\{\}} \texttt{, \textbackslash splitfrac\{\}\{\},
-\textbackslash splitdfrac\{\}\{\} }(from \texttt{mathtools}), \texttt{\textbackslash mathstrut}
-\item \texttt{\textbackslash displaystyle, \textbackslash textstyle, \textbackslash scriptstyle,
-\textbackslash scriptscriptstyle}
-\item \texttt{\textbackslash label\{\}, \textbackslash ensuremath\{\},
-\textbackslash text\{\}, \textbackslash mbox\{\}}
-\item \texttt{\textbackslash begin\{\}, \textbackslash end\{\}}
-\end{enumerate}
-\item font commands
-\begin{enumerate}
-\item \texttt{\textbackslash mathrm\{\}, \textbackslash mathit\{\}, \textbackslash mathcal\{\},
-\textbackslash mathtt\{\}, \textbackslash mathbf\{\}, \textbackslash mathbb\{\},
-\textbackslash mathsf\{\}, \textbackslash mathfrak\{\}, \textbackslash mathscr\{\},
-\textbackslash mathnormal\{\}, \textbackslash boldsymbol\{\}}
-\end{enumerate}
-\end{enumerate}
-
-\section{Settings}
-
-\subsection{Available \texttt{\textbackslash nmcEvaluate} settings}
-\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}>{\raggedright}p{4cm}}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{dbg}} & {\small int} & {\small debug `magic' integer} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{\textasciicircum}} & {\small char} & {\small exponent mark for sci. notation input} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{xx}} & {\small int (0/1)} & {\small multi-token variable switch} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{()}} & {\small int (0/1/2)} & {\small trig. function arg. parsing} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{o}} &  & {\small degree switch for trig. funcions} & \tabularnewline
-{\small\texttt{log}} & {\small num} & {\small base of logarithms for }{\small{\small\verb`\log`}} & {\small\texttt{10}}\tabularnewline
-{\small\texttt{vvmode}} & {\small int (0/1)} & {\small vv-list calculation mode} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{vvd}} & {\small token(s)} & {\small vv-list display-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 12mu plus 6mu minus 9mu(vv)}}\tabularnewline
-{\small\texttt{vvi}} & {\small token(s)} & {\small vv-list text-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{*} &  & {\small switch to suppress equation numbering (if }{\small\texttt{\textbackslash\textbackslash}}{\small{}
-in }{\small\texttt{vvd}}{\small )} & \tabularnewline
-{\small\texttt{p}} & char(s) & {\small punctuation (esp. in display-style)} & {\small\texttt{,}}\tabularnewline
-{\small\texttt{S+}} & {\small int} & {\small extra rounding for stopping criterion, sums} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{S?}} & {\small$\text{int}\ge0$} & {\small query stopping with these final terms, sums} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{P+}} & {\small int} & {\small extra rounding for stopping criterion, products} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{P?}} & {\small$\text{int}\ge0$} & {\small query stopping with these final terms, products} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{reuse}} & {\small int} & {\small form of result saved with }{\small{\small\verb`\nmcReuse`}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-
-\subsection{Available configuration file settings}
-\begin{center}
-\bigskip{}
-\begin{tabular}{ll}
-\toprule 
-key & default\tabularnewline
-\midrule
-{\small\texttt{rounding}} & {\small\texttt{6}}\tabularnewline
-{\small\texttt{pad}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{output-sci-notation}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{output-exponent-char}} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{input-sci-notation}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{input-exponent-char}} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{multitoken-variables}} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{logarithm-base}} & {\small\texttt{10}}\tabularnewline
-{\small\texttt{intify-rounding}} & {\small\texttt{14}}\tabularnewline
-{\small\texttt{vv-display}} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{\small\texttt{vv-inline}} & {\small\texttt{\{,\}\textbackslash mskip 12mu plus 6mu minus 9mu(vv)}}\tabularnewline
-{\small\texttt{sum-extra-rounding}} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{sum-query-terms}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{prod-extra-rounding}} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{prod-query-terms}} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{eval-reuse}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{document}

Deleted: trunk/Master/texmf-dist/doc/latex/numerica/numerica-plus.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/numerica/numerica-plus.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/numerica/numerica-plus.tex	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/doc/latex/numerica/numerica-plus.tex	2021-12-12 22:29:10 UTC (rev 61283)
@@ -1,1973 +0,0 @@
-%% LyX 2.4.0-alpha1 created this file.  For more info, see https://www.lyx.org/.
-%% Do not edit unless you really know what you are doing.
-\documentclass[english,tableposition=top]{report}
-\usepackage{lmodern}
-\renewcommand{\sfdefault}{lmss}
-\renewcommand{\ttdefault}{lmtt}
-\usepackage[T1]{fontenc}
-\usepackage{textcomp}
-\usepackage[latin9]{inputenc}
-\setcounter{secnumdepth}{3}
-\usepackage{color}
-\definecolor{shadecolor}{rgb}{0.667969, 1, 1}
-\usepackage{babel}
-\usepackage{array}
-\usepackage{wrapfig}
-\usepackage{booktabs}
-\usepackage{framed}
-\usepackage{url}
-\usepackage{amsmath}
-\usepackage[unicode=true,pdfusetitle,
- bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,
- breaklinks=true,pdfborder={0 0 1},backref=section,colorlinks=true]
- {hyperref}
-
-\makeatletter
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
-%% Because html converters don't know tabularnewline
-\providecommand{\tabularnewline}{\\}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
-\newenvironment{centred}%
-  {\begin{center}\baselineskip=13pt\parskip=1pt}{\end{center}}
-\newenvironment{lyxcode}
-	{\par\begin{list}{}{
-		\setlength{\rightmargin}{\leftmargin}
-		\setlength{\listparindent}{0pt}% needed for AMS classes
-		\raggedright
-		\setlength{\itemsep}{0pt}
-		\setlength{\parsep}{0pt}
-		\normalfont\ttfamily}%
-	 \item[]}
-	{\end{list}}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
-\usepackage[plus]{numerica}
-
-\newcommand\rel{\,\varrho\;}
-\DeclareMathOperator{\erf}{erf}
-\DeclareMathOperator{\gd}{gd}
-
-\reuse
-
-\usepackage{upquote}
-
-\makeatother
-
-\begin{document}
-\title{\texttt{numerica-plus}~\\
-}
-\author{Andrew Parsloe\\
-(\url{ajparsloe at gmail.com})}
-\maketitle
-\begin{abstract}
-In this module of the \verb`numerica` package, commands are defined
-which iterate and find fixed points of functions of a single variable,
-which find the zeros or extrema of such functions, and which calculate
-the terms of recurrence relations.\\
-\\
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-
-\paragraph*{Note:}
-\begin{itemize}
-\item {\normalsize This document applies to version 1.0.0 of }{\normalsize\texttt{numerica-plus}}{\normalsize .def.}{\small\par}
-\item {\normalsize Reasonably recent versions of the \LaTeX 3 bundles }{\normalsize\texttt{l3kernel}}{\normalsize{}
-and }{\normalsize\texttt{l3packages}}{\normalsize{} are required.}{\small\par}
-\item {\normalsize I refer a number of times in this document to }{\normalsize\emph{Handbook
-of Mathematical Functions}}{\normalsize , edited by Milton Abramowitz
-and Irene A. Segun, Dover, 1965. This is abbreviated to }{\normalsize\emph{HMF}}{\normalsize .}{\small\par}
-\end{itemize}
-\end{shaded}%
-\end{minipage}
-\end{abstract}
-\tableofcontents{}
-
-\chapter{Introduction}
-
-By calling \texttt{numerica} with the \texttt{plus} package option
-in the preamble,
-\begin{lyxcode}
-\textbackslash usepackage{[}plus{]}\{numerica\}
-\end{lyxcode}
-a number of additional commands are loaded:
-\begin{itemize}
-\item \verb`\nmcIterate`, a command to iterate a function (apply it repeatedly
-to itself), including finding fixed points (values $x$ where $f(x)=x$);
-\item \verb`\nmcSolve`, a command to find the zeros of functions of a single
-variable (values $x$ for which $f(x)=0$) or, failing that, local
-maxima or minima of such functions;
-\item \verb`\nmcRecur`, a command to calculate the values of terms in recurrence
-relations in a single (recurrence) variable (like the terms of the
-Fibonacci sequence or Legendre polynomials).
-\end{itemize}
-These commands are defined in the package \texttt{numerica-plus.def}
-which is loaded with \texttt{numerica.sty} when the \texttt{plus}
-option is used. The new commands all share the syntax of the \verb`\nmcEvaluate`
-command. I will discuss them individually in later chapters but turn
-first to an example that illustrates their use and gives a sense of
-`what they are about'.
-
-\section{Example of use: the rotating disk}
-
-\label{sec:introExampleOfUse}Consider a disk rotating uniformly with
-angular velocity $\omega$ in an anticlockwise sense in an inertial
-system in which the disk's centre \textbf{0} is at rest. Three distinct
-points \textbf{1}, \textbf{2}, \textbf{3} are fixed in the disk and,
-in a co-rotating polar coordinate system centred at \textbf{0}, have
-polar coordinates $(r_{i},\theta_{i})$ ($i,j=1,2,3$). Choose \textbf{01}
-as initial line so that $\theta_{1}=0$.
-
-The cosine rule for solving triangles tells us that the time $t_{ij}$
-in the underlying inertial system for a signal to pass from \textbf{i}
-to \textbf{j} satisfies the equation
-\[
-t_{ij}=c^{-1}\sqrt{r_{i}^{2}+r_{j}^{2}-2r_{i}r_{j}\cos(\theta_{j}-\theta_{i}+\omega t_{ij})}\equiv f(t_{ij}),
-\]
-where $c$ is the speed of light. (Equally, we could be describing
-an acoustic signal between points on a disk rotating uniformly in
-a still, uniform atmosphere \textendash{} in which case $c$ would
-be the speed of sound.) Although the equation doesn't solve algebraically
-for the time $t_{ij},$ it does tell us that $t=t_{ij}$ is a \emph{fixed
-point} of the function $f(t)$. To calculate fixed points we use the
-command \verb`\nmcIterate`, or its short-name form \verb`\iter`,
-with the star option, \verb`\iter*`. For \verb`\iter` the star option
-means: continue iterating until a fixed point has been reached and,
-as with the \verb`\eval` command, suppress all elements from the
-display save for the numerical result. 
-
-First, though, values need to be assigned to the various parameters.
-Suppose we use units in which $c=30,$ $r_{1}=10$ and $r_{3}=20$;
-also $\omega=0.2$ radians per second and $\theta_{13}\equiv\theta_{3}-\theta_{1}=0.2$
-radians. We shall give $t$ an initial value $1$ (plucked from the
-air). Its position as the rightmost item in the vv-list tells \verb`\iter`
-that $t$ is the iteration variable:
-\begin{verbatim}
-    \iter*{ c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-              \cos(\theta_{13}+\omega t)}
-          }[ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-             \omega=0.2,t=1 ], \quad\info{iter}.
-\end{verbatim}
-$\Longrightarrow$ \iter*{ c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-              \cos(\theta_{13}+\omega t)}
-          }[ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-             \omega=0.2,t=1 ],
-\quad\info{iter}. The \verb`\nmcInfo` command or, more briefly \verb`\info`, can
-be used to display the number of iterations required to attain the
-fixed-point value. 
-
-To six figures, only five iterations are needed, which seems rapid
-but we can check this by substituting $t=0.356899$ back into the
-formula and \verb`\eval`-uating it:
-\begin{verbatim}
-    \eval*{ c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-              \cos(\theta_{13}+\omega t)}
-          }[ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-             \omega=0.2,t=0.356899 ]
-\end{verbatim}
-$\Longrightarrow$  \eval*{ c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-              \cos(\theta_{13}+\omega t)}
-          }[ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-             \omega=0.2,t=0.356899 ], confirming that we have indeed calculated a fixed point. That it
-took only $5$ iterations can be checked by omitting the asterisk
-from the \verb`\iter` command and specifying the total number of
-iterations to perform. I choose \texttt{do=}7 to show not just the
-$5$th iteration but also the next two just to confirm that the result
-is stable. We shall view all $7$: \texttt{see=7}. I have also suppressed
-display of the vv-list by giving the key \texttt{vvd}\emph{ }an empty
-value,\footnote{See the associated document \texttt{numerica-basics.pdf}, the chapter
-on settings.} since there are too many variables to display on a line:
-\begin{verbatim}
-    \iter[do=7,see=7,vvd=]
-      {\[ c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-        \cos(\theta_{13}+\omega t)} \]}
-          [ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-            \omega=0.2,t=1 ]
-\end{verbatim}
-$\Longrightarrow$ \iter[do=7,see=7,vvd=]
-      {\[ c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-        \cos(\theta_{13}+\omega t)} \]}
-          [ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-            \omega=0.2,t=1 ]
-\noindent \begin{flushleft}
-This display makes clear that on the $5$th iteration, the $6$-figure
-value has been attained. 
-\par\end{flushleft}
-
-Alternatively, we could use the \verb`\nmcRecur` command, or its
-short-name form \verb`\recur`, to view the successive iterations
-since an iteration is a first-order recurrence: $f_{n+1}=f(f_{n})$:
-\begin{verbatim}
-    \recur[do=8,see1=0,see2=5,vvd={,\\(vv)\\},*]
-      {\[ f_{n+1}=c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-        \cos(\theta_{13}+\omega f_{n})} \]}
-          [ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-            \omega=0.2, f_{0}=1 ]
-\end{verbatim}
-$\Longrightarrow$     \recur[do=8,see1=0,see2=5,vvd={\\(vv)\\},*]
-      {\[ f_{n+1}=c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-        \cos(\theta_{13}+\omega f_{n})} \]} 
-          [ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-            \omega=0.2, f_{0}=1 ]
-
-\noindent I have specified \texttt{do=8} terms rather than $7$ since
-the zero-th term ($f_{0}=1$) is included in the count. I've chosen
-to view the last $5$ of them but none prior to those by writing \texttt{see1=0,see2=5}.
-The vv-list has been suppressed from the display (\texttt{vvd=} )
-and the numerical results forced onto a new line (without an equation
-number \textendash{} the \texttt{{*}} in the vv-list).
-
-Another and perhaps more obvious way to find the value of $t_{13}$,
-is to look for a zero of the function $f(t)-t$. That means using
-the command \verb`\nmcSolve` or its short-name form \verb`\solve`.
-I shall do so with the star option \verb`\solve*` which suppresses
-display of all but the numerical result. A trial value for $t$ is
-required. I have chosen \texttt{t=0}:
-\begin{verbatim}
-    \solve*{ c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-      \cos(\theta_{13}+\omega t)} - t }
-        [ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-          \omega=0.2,t=0 ], \quad\nmcInfo{solve}.
-\end{verbatim}
-$\Longrightarrow$ \solve*{ c^{-1}\sqrt{r_1^2+r_3^2-2r_1 r_3
-              \cos(\theta_{13}+\omega t)}-t
-          }[ c=30,r_1=10,r_3=20,\theta_{13}=0.2,
-             \omega=0.2,t=0],
-\quad\nmcInfo{solve}. 
-
-Nearly the same answer as before is attained but this time many more
-steps have been required. This is to be expected. The \verb`\solve`
-command uses the bisection method. Since $1/2^{10}\approx1/10^{3}$
-or $10$ bisections for $3$ decimal places, we can expect about $20$
-bisections being needed for a $6$-decimal-place answer. The particular
-form of the \verb`\nmcInfo` command display, `$1+20$ steps', indicates
-that it took $1$ search step to find an interval in which the function
-vanished and, having found that interval, $20$ bisections to narrow
-the position of the zero to $6$-figures.
-
-\subsection{Circuits}
-
-Okay, so we can calculate the time taken in the underlying inertial
-system for a signal to pass from one point of the rotating disk to
-another. How long does it take to traverse the circuit \textbf{1}
-to \textbf{2} to \textbf{3} back to \textbf{1}? That means forming
-the sum $t_{12}+t_{23}+t_{31}$, hence calculating the separate $t_{ij}$
-and then using \verb`\eval` to calculate their sum. 
-
-To make things neater and easier to read, I assume a little symmetry.
-Let the coordinates of \textbf{1} be $(a,0),$ of \textbf{2} be $(r,-\theta)$,
-and of \textbf{3} be $(r,\theta)$: \textbf{2} and \textbf{3} are
-at the same radial distance from the centre \textbf{0} and at the
-same angular distance but on opposite sides of the line \textbf{01},
-\textbf{3} an angle $\theta$ ahead of \textbf{1}, \textbf{2} an angle
-$\theta$ behind \textbf{1}. The rotation is in the direction of positive
-$\theta$. Rather than just calculate $t_{12}+t_{23}+t_{31}$ for
-the circuit \textbf{1231}, I also calculate the time $t_{13}+t_{32}+t_{21}$
-for a signal to traverse the opposite circuit \textbf{1321} and compare
-them (form the difference). 
-
-Note that with \textbf{2} and \textbf{3} positioned as they are relative
-to \textbf{1}, 
-\[
-t_{31}=c^{-1}\sqrt{r^{2}+a^{2}-2ra\cos(\theta-\omega t_{31})}
-\]
-and 
-\[
-t_{12}=c^{-1}\sqrt{a^{2}+r^{2}-2ar\cos(\theta-\omega t_{12})}.
-\]
-Both $t_{12}$ and $t_{31}$ are fixed points of the same function
-\[
-F_{-1}(t)=c^{-1}\sqrt{r^{2}+a^{2}-2ra\cos(\theta-\omega t).}
-\]
-Similarly, both $t_{13}$ and $t_{21}$ are fixed points of 
-\[
-F_{+1}(t)=c^{-1}\sqrt{r^{2}+a^{2}-2ra\cos(\theta+\omega t)}.
-\]
- Geometrically one can show that $t_{31}=t_{12}$ and $t_{13}=t_{21}$.
-Analytically, with the values $c=30,a=10,r=20$, 
-\[
-0<F_{\pm1}(t)\le c^{-1}\sqrt{r^{2}+a^{2}+2ar}=c^{-1}(r+a)=1,
-\]
-so that we need look for fixed points only in the interval $[0,1]$.
-Differentiating $F_{-1}(t)$ shows the derivative is negative on $[0,1]$,
-hence that $F_{-1}$ is strictly decreasing there and can intersect
-the identity mapping at most once on the interval. Similarly, differentiating
-$F_{+1}(t)$ shows the derivative 
-\[
-\frac{ar\omega\sin(\theta+\omega t)}{c\sqrt{r^{2}+a^{2}-2ar\cos(\theta+\omega t)}}
-\]
-is positive on $[0,1]$, but with the given values for $c,a$ and
-$r$, and with $\theta=0.2,\omega=0.2$, $F'_{+1}(t)<0.1$ on $[0,1]$:
-hence $F_{+1}$ increases sufficiently slowly on the interval that
-the identity mapping can intersect it at most once there. In both
-cases, there can be at most one fixed point.
-
-It follows that $t_{12}=t_{31}$ and $t_{13}=t_{21}$ and the round
-trip times are $2t_{12}+t_{23}$ and $2t_{13}+t_{32}$.
-
-\subsubsection{Nesting commands}
-
-The calculation to compare the round trip times can be done `in one
-go' by nesting the \verb`\iter*` commands to calculate the $t_{ij}$
-inside an \verb`\eval*` command to form the sum of their results
-and then take the difference. 
-\begin{verbatim}
-    $ 
-    \eval*{ % circuit 1231
-        2\iter*{ c^{-1}\sqrt{a^2+r^2-2ar
-                  \cos(\theta-\omega t)} }
-      + \iter*{ c^{-1}\sqrt{2r^2-2r^2
-                  \cos(2\theta+\omega t)} }
-    % circuit 1321
-      - 2\iter*{ c^{-1}\sqrt{a^2+r^2-2ar
-                  \cos(\theta+\omega t)} }
-      - \iter*{ c^{-1}\sqrt{2r^2-2r^2
-                  \cos(2\theta-\omega t)} }
-          }[ c=30,a=10,r=20,\theta=0.2,\omega=0.2, t=1 ] 
-    $
-\end{verbatim}
-$\Longrightarrow$     $ 
-    \eval*{ % circuit 1231
-        2\iter*{ c^{-1}\sqrt{a^2+r^2-2ar
-                  \cos(\theta-\omega t)} }
-      + \iter*{ c^{-1}\sqrt{2r^2-2r^2
-                  \cos(2\theta+\omega t)} }
-    % circuit 1321
-      - 2\iter*{ c^{-1}\sqrt{a^2+r^2-2ar
-                  \cos(\theta+\omega t)} }
-      - \iter*{ c^{-1}\sqrt{2r^2-2r^2
-                  \cos(2\theta-\omega t)} }
-          }[ c=30,a=10,r=20,\theta=0.2,\omega=0.2, t=1 ] 
-    $. 
-
-By itself this result is of little interest beyond seeing that \texttt{numerica}
-can handle it. What \emph{is} interesting is to find values of $\theta$,
-say, given the other parameters and especially the value of $r$,
-such that the time difference vanishes. Is there a circuit, despite
-the rotation of the disk, such that it takes a signal the same time
-to travel in opposite directions around the circuit? That is a job
-for \verb`\nmcSolve` (or \verb`\solve`):
-\begin{verbatim}
-    \solve[p=.,var=\theta,vvi=]{$ % circuit 1231
-        2\times\iter*[var=t]{ c^{-1}\sqrt{a^2+r^2-2ar
-                  \cos(\theta-\omega t)} }
-      + \iter*[var=t]{ c^{-1}\sqrt{2r^2-2r^2
-                  \cos(2\theta+\omega t)} }
-    % circuit 1321
-      - 2\times\iter*[var=t]{ c^{-1}\sqrt{a^2+r^2-2ar
-                  \cos(\theta+\omega t)} }
-      - \iter*[var=t]{ c^{-1}\sqrt{2r^2-2r^2
-                  \cos(2\theta-\omega t)} }
-          $}[ c=30,a=10,r=20,\theta=0.1,\omega=0.2, {t}=1 ]
-\end{verbatim}
-$\Longrightarrow$ \solve[p=.,var=\theta,vvi=]{$ % circuit 1231
-        2\times\iter*[var=t]{ c^{-1}\sqrt{a^2+r^2-2ar
-                  \cos(\theta-\omega t)} }
-      + \iter*[var=t]{ c^{-1}\sqrt{2r^2-2r^2
-                  \cos(2\theta+\omega t)} }
-    % circuit 1321
-      - 2\times\iter*[var=t]{ c^{-1}\sqrt{a^2+r^2-2ar
-                  \cos(\theta+\omega t)} }
-      - \iter*[var=t]{ c^{-1}\sqrt{2r^2-2r^2
-                  \cos(2\theta-\omega t)} }
-          $}[ c=30,a=10,r=20,\theta=0.1,\omega=0.2, {t}=1 ]
-
-One point to note here is the use of \verb`\times` (in \verb`2\times\iter*`)
-as against the previous example with \verb`\eval*` where \verb`\times`
-was not used. In the present case the formula is displayed (\verb`\solve`
-wraps around math delimiters); the star on the \verb`\eval` command
-in the previous example suppressed display of the formula. Without
-the \verb`\times` the `$2$'s would be juxtaposed against the following
-decimals, making it look as if the signal travel times were $20.537778$
-and $20.614419$ and no doubt causing perplexity. Also note the \texttt{vvi=}
-to suppress display of the vv-list.
-
-But this is not a research paper on the rotating disk. I wished to
-show how the different commands of \texttt{numerica-plus} can be used
-to explore a meaningful problem. And although it looks as if a lot
-of typing is involved, once $c^{-1}\sqrt{r^{2}+a^{2}-2ra\cos(\theta-\omega t)}$
-has been formed in \LaTeX{} and values specified in the vv-list, much
-of the rest is copy-and-paste followed by minor editing.
-
-\section{Shared syntax of the new commands}
-
-\texttt{numerica-plus} offers three new commands for three processes:
-\verb`\nmcIterate` (short-name form \verb`\iter`) for iterating
-functions, \verb`\nmcSolve` (short-name form \verb`\solve`) for
-finding the zeros or (local) extrema of functions, and \verb`\nmcRecur`
-(short-name form \verb`\recur`) for calculating terms of recurrence
-relations.
-
-All three commands share the syntax of the \verb`\nmcEvaluate` (or
-\verb`\eval`) command detailed in the associated document \texttt{numerica-basics.pdf}.
-When all options are used then the command looks like
-\begin{centred}
-\noindent \verb`\nmcIterate*[settings]{expr.}[vv-list][num. format]`
-\end{centred}
-You can substitute \verb`\nmcSolve`, or \verb`\nmcRecur` for \verb`\nmcIterate`
-here. The arguments are similar to those for \verb`\nmcEvaluate`. 
-\begin{enumerate}
-\item \verb`*` optional switch; if present ensures a single number output
-with no formatting, or an appropriate error message if the single
-number cannot be produced;
-\item \verb`[settings]` optional comma-separated list of \emph{key=value
-}settings for this particular command and calculation;
-\item \verb`{expr.}` the only mandatory argument; the mathematical expression
-in \LaTeX{} form that is the object of interest;
-\item \verb`[vv-list]` optional comma-separated list of \emph{variable=value
-}items; for \verb`\iter` and \verb`\solve` the \emph{rightmost}
-(or innermost) variable in the vv-list may have special significance;
-\item \verb`[num. format]` optional format specification for presentation
-of the numerical result (rounding, padding with zeros, scientific
-notation); boolean output is suppressed for these commands.
-\end{enumerate}
-Boolean output makes little sense for these three commands and is
-turned \emph{off}. Entering a question mark in the trailing number-format
-option of each command has no effect \textendash{} see \xA7. 
-
-All commands also share with \verb`\nmcEvaluate` changes in the way
-the result is displayed depending on whether they wrap around math
-delimiters, or are wrapped within math delimiters, or are employed
-in the absence of math delimiters. These distinctions are relevant\emph{
-only if the optional star {*} is absent.}
-\begin{itemize}
-\item When the star option is used, the \emph{result} is a number only without
-any formatting or vv-list display, or an error message is displayed.
-\item When the star option is not used and one of the following is the case
-\begin{itemize}
-\item the command wraps around math delimiters, e.g. \verb`\iter{$ expr. $}`,
-then the result is displayed in the form \emph{expression~=~result}
-or the form \emph{expression~$\rightarrow$~result} as appropriate,
-where \emph{result} may be multi-line and may include the vv-list,
-\item the command is used within math delimiters, e.g. \verb`\[\iter...\]`,
-then only the \emph{result} is presented, where \emph{result} may
-be multi-line and may include the vv-list,
-\item the command is used in the absence of delimiters, then the result
-is presented as if it had been used between \verb`\[` and \verb`\]`.
-\end{itemize}
-\end{itemize}
-Looking at the various examples in the preceding section on the rotating
-disk you will see illustrations of all these situations.
-
-\subsection{Settings}
-
-\begin{table}
-\noindent \centering{}\caption{\protect\label{tab:introSettingsInherited}Inherited settings options}
-\noindent \begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}>{\raggedright}p{4cm}}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{dbg}} & {\small int} & {\small debug `magic' integer} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{\textasciicircum}} & {\small char} & {\small exponent mark for sci. notation input} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{xx}} & {\small int (0/1)} & {\small multi-token variable switch} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{()}} & {\small int (0/1/2)} & {\small trig. function arg. parsing} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{o}} &  & {\small degree switch for trig. funcions} & \tabularnewline
-{\small\texttt{log}} & {\small num} & {\small base of logarithms for }{\small{\small\verb`\log`}} & {\small\texttt{10}}\tabularnewline
-{\small\texttt{vvmode}} & {\small int (0/1)} & {\small vv-list calculation mode} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{vvd}} & {\small tokens} & {\small vv-list display-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 12mu plus 6mu minus 9mu(vv)}}\tabularnewline
-{\small\texttt{vvi}} & {\small token(s)} & {\small vv-list text-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{*} &  & {\small suppress equation numbering if }{\small\texttt{\textbackslash\textbackslash}}{\small{}
-in }{\small\texttt{vvd}} & \tabularnewline
-{\small\texttt{p}} & char(s) & {\small punctuation (esp. in display-style)} & {\small\texttt{, (comma)}}\tabularnewline
-{\small\texttt{S+}} & {\small int} & {\small extra rounding for stopping criterion for sums} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{S?}} & {\small$\text{int}\ge0$} & {\small stopping criterion query terms for sums} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{P+}} & {\small int} & {\small extra rounding for stopping criterion for products} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{P?}} & {\small$\text{int}\ge0$} & {\small stopping criterion query terms for products} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-Nearly all the settings available to the \verb`\eval` command are
-available to these other commands. To save switching between documents
-I reproduce in Table~\ref{tab:introSettingsInherited} the options
-found in \texttt{numerica-basics.pdf}, although for discussion of
-the options you will need to refer to that document. In addition,
-each of the present commands also has settings of its own, discussed
-at the relevant parts of the following chapters.
-
-\subsection{Nesting}
-
-Provided the starred form of a command actually does produce a numerical
-result and not an error message then it can be nested within the main
-argument of any one of the commands, including itself. The example
-of use, \xA7\ref{sec:introExampleOfUse} above, shows several examples
-of this. The starred form can also be used in the vv-list of any one
-of the commands, including itself. The associated document \texttt{numerica-basics.pdf}
-shows examples of an \verb`\eval*` command being used in the vv-list
-of an \verb`\eval` command. 
-
-\chapter{Iterating functions: \texttt{\textbackslash nmcIterate}}
-
-\label{chap:Iterating-functions}Only in desperation would one try
-to evaluate a continued fraction by stacking fraction upon fraction
-upon fraction like so:
-\[
-1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1+\frac{1}{1}}}}}}}}}}}}
-\]
-\texttt{numerica-plus} provides a command for tackling problems like
-this sensibly. In such problems a function is repeatedly applied to
-itself (\emph{iterated}). This can be achieved in \texttt{numerica}
-through the command \verb`\nmcIterate` or (short-name form) \verb`\iter`.
-Thus to evaluate this continued fraction we write
-\begin{centred}
-\verb`\iter[do=15,see=5]{\[ 1+1/x \]}[x=1]` $\Longrightarrow$ \iter[do=15,see=5]{\[ 1+1/x \]}[x=1]
-\end{centred}
-The \verb`\iter` command evaluates $1+1/x$ when $x=1$ and then
-uses this value as a new $x$-value to substitue into $1+1/x$, to
-once again evaluate and use as a new $x$-value, and so on. It looks
-as if the repeated iterations are approaching \verb`\eval{$ \tfrac{\sqrt{5}+1}2 $}`
-$\Longrightarrow$ \eval{$ \tfrac{\sqrt{5}+1}2 $}. 
-
-Increasing the number of iterations in the example from \texttt{do=15}
-to, say, \texttt{do=18}, shows that this is indeed the case. I've
-taken the opportunity to also put a question mark in the number-format
-option to get boolean output in order to show that it has \emph{no}
-effect:
-\begin{centred}
-\verb`\iter[do=18,see=5]{\[ 1+1/x \]}[x=1][?]` $\Longrightarrow$
-\iter[do=18,see=5]{\[ 1+1/x \]}[x=1][?] 
-\end{centred}
-But iteration of functions is not limited to continued fractions.
-Particularly since the emergence of chaos theory, iteration has become
-an important study in its own right. Any function whose range lies
-within its domain can be iterated \textendash{} repeatedly applied
-to itself. The cosine, for instance, 
-\begin{centred}
-\verb`\iter[do=20,see=4]{\[ \cos x \]}[x=\pi/2]` $\Longrightarrow$
-\iter[do=20,see=4]{\[ \cos x \]}[x=\pi/2]
-\end{centred}
-which displays the first one and last four of 20 iterations of $\cos x$
-when $x=\tfrac{\pi}{2}$. It looks as if the cosine is `cautiously'
-approaching a limit, perhaps around $0.738$ or $0.739$. You need
-to nearly double the number of iterations (\texttt{do=40}) to confirm
-that this is so.
-
-The logistic function $kx(1-x)$ exhibits a variety of behaviours
-depending on the value of $k$. For instance, with $k=3.5$ we get
-a period-4 cycle:
-\begin{centred}
-\verb`\iter[do=12,see=8]{\[ kx(1-x) \]}[k=3.5,x=0.5]` $\Longrightarrow$
- \iter[do=12,see=8]{\[ kx(1-x) \]}[k=3.5,x=0.5]
-\end{centred}
-and with $k=3.1$ we get a period-2 cycle, although it takes many
-more iterations to stabilize there:
-\begin{centred}
-\verb`\iter[do=44,see=8]{\[ kx(1-x) \]}[k=3.1,x=0.5]` $\Longrightarrow$
-\iter[do=44,see=8]{\[ kx(1-x) \]}[k=3.1,x=0.5]
-\end{centred}
-
-\section{Star (\texttt{{*}}) option: fixed points}
-
-In the first two of these examples, iteration eventually ended at
-a \emph{fixed point}. This is a point $x$ where $f(x)=x$ and, by
-induction, $f^{n}(x)=x$. Appending a star (asterisk) to the \verb`\iter`
-command is the signal for iteration to continue until a fixed point
-has been reached at the specified rounding value:
-\begin{centred}
-\verb`\iter*{ 1+a/x }[a=n(n+1),n=1,x=1]` $\Longrightarrow$ \iter*{ 1+a/x }[a=k(k+1),k=1,x=1]
-\end{centred}
-(with the default rounding value $6$).\footnote{For your own interest try also putting $n=2,3,4,\ldots$ .}
-The star overrides any value for the number of iterations to perform
-(the \texttt{do} key) that may have been entered in the settings option.
-It also overrides any elements of the display other than the numerical
-result. With the star option math delimiters are irrelevant \textendash{}
-other than displaying minus signs correctly when \verb`\iter*` is
-between them.
-
-A function may not approach a fixed point when iterated \textendash{}
-see the examples with the logistic function above. To prevent an infinite
-loop \verb`\iter*` counts the number of iterations performed and
-when that number reaches a certain cut-off value \textendash{} the
-default is $100$ \textendash{} the loop terminates and a message
-is displayed:
-\begin{centred}
-\verb`\iter*{kx(1-x)}[k=3.5,x=0.5]` $\Longrightarrow$ \iter*{kx(1-x)}[k=3.5,x=0.5]
-\end{centred}
-In this case we \emph{know} that a fixed point does not exist, but
-that may not always be the case. One response is to change parameter
-values or starting value of the iteration variable. For instance,
-changing the parameter value to $k=1.5$,
-\begin{centred}
-\verb`\iter*{kx(1-x)}[k=1.5,x=0.5]` $\Longrightarrow$ \iter*{kx(1-x)}[k=1.5,x=0.5],
-\end{centred}
-and a fixed point is now attained. 
-
-But should a fixed point still not eventuate after `fiddling' with
-parameter and start values, there are two general adjustments one
-might try: either 
-\begin{enumerate}
-\item reduce the rounding value, from the default $6$ (or the one specified),
-to a smaller value, or
-\item increase the cut-off figure from the default 100 to some higher value. 
-\end{enumerate}
-The former is done via the trailing \verb`[num format]` optional
-argument; the latter is done via the settings option, see \xA7\ref{sec:iterSettings-option}. 
-
-\subsection{Use with \texttt{\textbackslash nmcInfo}}
-
-It is of interest to know how many iterations are required to reach
-a fixed point at a particular rounding value. That knowledge allows
-a good guess as to whether a fixed point will be attained at a greater
-rounding value. Thus when iterating the function
-\[
-f(t_{ij})=c^{-1}\sqrt{r_{i}^{2}+r_{j}^{2}-2r_{i}r_{j}\cos(\theta_{j}-\theta_{i}+\omega t_{ij})}
-\]
-in \xA7\ref{sec:introExampleOfUse} only $5$ iterations were required
-to attain $6$-figure accuracy for the fixed point. That information
-came by following the \verb`\iter*` command with \verb`\nmcInfo`
-(or \verb`\info`) with the argument \verb`iter`. And generally,
-for any `infinite' process, follow the command with an \verb`\info`
-command if you want to know how many `steps' \textendash{} in the
-present case iterations \textendash{} are required to achieve the
-result. So, if $5$ iterations achieve $6$-figure accuracy, presumably
-something like $10$ iterations will achieve $12$-figure accuracy:
-\begin{verbatim}
-    \iter*{ c^{-1}\sqrt{r_i^2+r_j^2-2r_i r_j
-              \cos(\theta_{ij}+\omega t)}
-          }[ c=30,r_i=10,r_j=20,\theta_{ij}=0.2,
-             \omega=0.2,t=1 ][12],
-    \quad\info{iter}. 
-\end{verbatim}
-$\Longrightarrow$ \iter*{ c^{-1}\sqrt{r_i^2+r_j^2-2r_i r_j
-              \cos(\theta_{ij}+\omega t)}
-          }[ c=30,r_i=10,r_j=20,\theta_{ij}=0.2,
-             \omega=0.2,t=1 ][12],
-\quad\info{iter}. Only $9$ iterations suffice to achieve $12$-figure accuracy. Or
-again, with another earlier example,
-\begin{centred}
-\verb`$ \iter*{\cos x}[x=\pi/2] $,\ \info{iter}.` $\Longrightarrow$
-$\iter*{\cos x}[x=\pi/2] $,\ \info{iter}.
-\end{centred}
-That suggests that around $74$ iterations will give $12$-figure
-accuracy, well within the cut-off figure of $100$:
-\begin{centred}
-\verb`$ \iter*{\cos x}[x=\pi/2][12] $,\ \info{iter}.` $\Longrightarrow$
-$\iter*{\cos x}[x=\pi/2][12] $,\ \info{iter}.
-\end{centred}
-
-\section{Settings option}
-
-\label{sec:iterSettings-option}The settings option is a comma-separated
-list of items of the form \emph{key~=~value}.
-
-\subsection{Inherited settings}
-
-Nearly all of the keys discussed in the settings\emph{ }option for
-\verb`\nmcEvaluate` are available for \verb`\nmcIterate`. Table~\ref{tab:introSettingsInherited}
-above lists these, repeating a table from \texttt{numerica-basics.pdf}.
-Thus should a quantity in the vv-list depend on the iteration variable,
-forcing an implicit mode calculation, simply enter (as with \verb`\eval`)
-\texttt{vvmode=1} in the settings option:
-\begin{centred}
-\verb`\iter*[vvmode=1]{$ 1+f(x) $}[f(x)=a/x,a=12,x=1]` $\Longrightarrow$
-\iter*[vvmode=1]{$ 1+f(x) $}[f(x)=a/x,a=12,x=1].
-\end{centred}
-Implicit in this example is the default multi-token setting \texttt{xx=1}
-inherited from \verb`\eval` and ensuring that the multi-token variable
-$f(x)$ is treated correctly. 
-
-Let's add \verb`dbg=1` to the example:
-\begin{centred}
-\verb`\iter*[dbg=1,vvmode=1]{$ 1+f(x) $}[f(x)=a/x,a=12,x=1]` $\Longrightarrow$
-\iter*[dbg=1,vvmode=1]{$ 1+f(x) $}[f(x)=a/x,a=12,x=1]
-\end{centred}
-The multi-token variable \verb`f(x)` has been changed to the single-token
-\verb`\_nmcu`. The values of \verb`x` and \verb`\_nmcu` shown are
-those of the \emph{final} iteration.
-
-\subsection{\texttt{\textbackslash iter}-specific settings}
-
-In addition to the inherited settings there are some specific to \verb`\nmcIterate`.
-These are listed in Table~\ref{tab:iterSettings}.
-
-\subsubsection{Iteration variable}
-
-In nearly all of the examples so far, the iteration variable has been
-the rightmost variable in the vv-list and has not needed to be otherwise
-specified. However it is sometimes not feasible to indicate the variable
-in this way. In that case, entering
-\begin{lyxcode}
-var~=~<variable~name>
-\end{lyxcode}
-in the settings option enables the variable to be specified, irrespective
-of what the rightmost variable in the vv-list is. Here, \texttt{<variable
-name>} will generally be a character like \texttt{x} or \texttt{t}
-or a token like \verb`\alpha`, but it could also be a multi-token
-name like {\ttfamily\verb`x'`}\texttt{ }or \texttt{\textbackslash beta\_\{ij\}}
-(or even \texttt{Fred} if you so chose). Although the iteration variable
-can be independently specified like this, it must still be given an
-initial \emph{value} in the vv-list \textendash{} only it need not
-be the rightmost variable.
-
-In the following example the rightmost variable is $a$ which is clearly
-\emph{not} the iteration variable:
-\begin{centred}
-\verb`\iter[var=x'',do=40,see=5]{$ 1+a/x'' $}[x''=a/6,a=6][*]` $\Longrightarrow$
-\iter[var=x'',do=40,see=5]{$ 1+a/x'' $}[x''=a/6,a=6][*]
-\end{centred}
-
-\subsubsection{Extra rounding for fixed-point calculations}
-
-\begin{table}
-\centering{}\caption{\protect\label{tab:iterSettings}Settings for \texttt{\textbackslash nmcIterate}}
-\begin{center}
-\begin{tabular}{llll}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{var}} & {\small token(s)} & {\small iteration variable} & \tabularnewline
-{\small\texttt{+}} & {\small int} & {\small fixed point extra rounding} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{max}} & {\small int > 0} & {\small max. iteration count (fixed points)} & {\small\texttt{100}}\tabularnewline
-{\small\texttt{do}} & {\small int > 0} & {\small number of iterations to perform} & {\small\texttt{5}}\tabularnewline
-{\small\texttt{see}} & {\small int > 0} & {\small number of final iterations to view} & {\small\texttt{4}}\tabularnewline
-{\small\texttt{reuse}} & {\small int ($\mathtt{0}/\mathtt{1}/\mathtt{2}$)} & {\small form of result saved with }{\small{\small\verb`\reuse`}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-\texttt{numerica} determines that a fixed point has been reached when
-the difference between successive iterations vanishes when rounded
-to the current rounding value. One might want reassurance that this
-really is the correct value by seeking a fixed point at a higher rounding
-value than that displayed. This extra rounding is achieved by entering 
-\begin{lyxcode}
-+~=~<integer>
-\end{lyxcode}
-in the settings option. By default this extra rounding is set to zero. 
-
-We have seen before that $\cos x$ starting at $x=\tfrac{1}{2}\pi$
-takes $37$ iterations to reach a $6$-figure fixed point $0.739085$,
-about $6$ iterations per decimal place. By entering \texttt{+=1}
-in the settings option the number of iterations is increased to $43$,
-$6$ more than $37$ but, reassuringly, the $6$-figure result that
-is displayed remains unchanged:
-\begin{centred}
-\verb`$ \iter*[+=1]{\cos x}[x=\pi/2] $,\ \info{iter}.` $\Longrightarrow$
-$ \iter*[+=1]{\cos x}[x=\pi/2] $,\ \info{iter}.
-\end{centred}
-
-\subsubsection{Maximum {\small iteration count for fixed point searches}}
-
-To prevent a fixed-point search from continuing indefinitely when
-no fixed point exists, there needs to be a maximum number of iterations
-specified after which point the search is called off. By default this
-number is $100$. To change it enter
-\begin{lyxcode}
-max~=~<positive~integer>
-\end{lyxcode}
-in the settings option.
-
-\subsubsection{Number of iterations to perform}
-
-To specify the number of iterations to perform enter
-\begin{lyxcode}
-do~=~<positive~integer>
-\end{lyxcode}
-in the settings option. Note that if the \verb`*` option is present
-this value will be ignored and iteration will continue until either
-a fixed point or the maximum iteration count is reached. By default
-\texttt{do} is set to $5$. (Note that \texttt{do} can be set to a
-greater number than \texttt{max}; \texttt{max} applies only to \verb`\iter*`.)
-
-\subsubsection{Number of iterations to view}
-
-To specify the number of final iteations to view enter 
-\begin{lyxcode}
-see~=~<positive~integer>
-\end{lyxcode}
-in the settings option. By default \texttt{see} is set to $4$. Always
-it is the \emph{last} \texttt{see} iterations that are displayed.
-If \texttt{see} is set to a greater value than \texttt{do}, all iterations
-are shown. If the star option is used the \texttt{see} value is ignored.
-
-\subsubsection{Form of result saved by \texttt{\textbackslash reuse}}
-
-By entering
-\begin{lyxcode}
-reuse~=~<integer>
-\end{lyxcode}
-in the settings option of the \verb`iter` command it is possible
-to specify the form of result that is saved when using \verb`\nmcReuse`.
-(This setting has no effect when the star option is used with \verb`\nmcIterate`.
-In that case only the numerical result of the fixed point calculation
-\textendash{} if successful \textendash{} is saved.) The possibilities
-are:
-\begin{itemize}
-\item \texttt{int=0} (or any integer $\mathtt{\ne1,2}$) saves the display
-resulting from the \verb`\iter` command (the default);
-\item \texttt{int=1} saves a comma-separated list of pairs of the form:\texttt{ }~\\
-\texttt{\{$k$, value-of-$k$-th-iterate\}};
-\item \texttt{int=2} saves a comma-separated list of iterate values.
-\end{itemize}
-Note that the number and content of the items in the lists are those
-resulting from the \texttt{see} setting (the number of iterations
-to view).
-\begin{verbatim}
-    \iter[reuse=1,do=12,see=4]
-      {\[ kx(1-x) \]}[k=3.5,x=0.5]
-        \reuse[logistic]
-\end{verbatim}
-$\Longrightarrow$ \iter[reuse=1,do=12,see=4]{\[ kx(1-x) \]}[k=3.5,x=0.5] \reuse[logistic]
-
-\noindent whence \verb`\logistic` $\Longrightarrow$ \logistic.
-As you can see the control sequence \verb`\logistic` displays as
-a comma-separated list of numbers, alternating between the ordinal
-of the iterate, and the iterate value. In fact these values are grouped
-as braced pairs separated by commas in \verb`\logistic`, as can be
-seen by using \TeX 's \verb`\meaning` command: 
-\begin{centred}
-\verb`\meaning\logistic` $\Longrightarrow$ \meaning\logistic
-\end{centred}
-
-\subsection{Changing default values}
-
-\begin{wraptable}[12]{o}{0.5\columnwidth}%
-\centering{}\caption{\protect\label{tab:iterSettingsDefaults}Defaults for \texttt{\textbackslash nmcIterate}}
-\begin{center}
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small default}\tabularnewline
-\midrule
-{\small iter-extra-rounding} & {\small\texttt{0}}\tabularnewline
-{\small iter-max-iterations} & {\small\texttt{100}}\tabularnewline
-{\small iter-do} & {\small\texttt{5}}\tabularnewline
-{\small iter-see-last} & {\small\texttt{4}}\tabularnewline
-{\small iter-reuse} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}\end{wraptable}%
-If you wish to change the default values of the various settings for
-\verb`\nmcIterate` this can be done by entering new values in a configuration
-file \texttt{numerica.cfg} as described in the chapter on settings
-in the associated document \texttt{numerica-basics.pdf}. The relevant
-keys are listed in Table~\ref{tab:iterSettingsDefaults}, corresponding
-to the \verb`+`, \verb`max`, \verb`do`, \verb`see` and \verb`reuse`
-settings of the \verb`\iter` command. (Obviously it makes no sense
-to have a default setting for the iteration variable. That will change
-from case to case.)
-
-\section{Errors}
-
-By errors I refer to \texttt{numerica} errors rather than \LaTeX{}
-errors. We have already met one in the discussion of fixed points:
-\begin{centred}
-\verb`\iter*{kx(1-x)}[k=3.5,x=0.5]` $\Longrightarrow$ \iter*{kx(1-x)}[k=3.5,x=0.5]
-\end{centred}
-For a function to be iterated indefinitely, its range must lie within
-or be equal to its domain. If even part of the range of a function
-lies outside its domain, then on repeated iteration there is a chance
-that a value will eventually be calculated which lies in this `outside'
-region. Iteration cannot continue beyond this point and an error message
-is generated. As an example consider the inverse cosine, \verb`\arccos`.
-This can be iterated only so far as the iterated values lie between
-$\pm1$ inclusive. If we try to iterate \verb`\arccos` at 0 for example,
-since $\cos\frac{1}{2}\pi=0$, $\arccos0=\eval{0.5\pi}[4]$ (which
-is $\tfrac{1}{2}\pi$) so only a first iterate is possible. But we
-could choose an initial value more carefully; $37$ iterations of
-the cosine at $\tfrac{1}{2}\pi$ led to a fixed point $0.739085$,
-so let's choose $0.739085$ as initial point and perform $37$ iterations:
-\begin{centred}
-\verb`\iter[do=37,see=4]{\[ \arccos x \]}[x=0.739085]` $\Longrightarrow$
-\iter[do=37,see=4]{\[ \arccos x \]}[x=0.739085]
-\end{centred}
-The result of the $37$th iteration is greater than $1$. Thus increasing
-the number of iterations to 38 should generate an error message:
-\begin{centred}
-\verb`\iter[do=38,see=4]{\[ \arccos x \]}[x=0.739085]` $\Longrightarrow$\iter[do=38,see=4]{\[ \arccos x \]} [x=0.739085]  
-\end{centred}
-\verb`l3fp` objects when asked to find the inverse cosine of a number
-greater than $1$.
-
-\chapter{Finding zeros and extrema: \texttt{\textbackslash nmcSolve}}
-
-\texttt{numerica} provides a command\textbf{ }\verb`\nmcSolve` (short-name
-form \verb`\solve`) for finding a zero of a function, should it have
-one. In the following example, 
-\begin{centred}
-\verb`\solve[p]{\[ e^{ax}-bx^2 \]}[a=2,b=3,{x}=0]` $\Longrightarrow$
-\solve[p]{\[ e^{ax}-bx^2 \]}[a=2,b=3,{x}=0]
-\end{centred}
-I have sought and found a solution $x$ to the equation $e^{ax/2}-bx^{2}=0$
-when $a=2$ and $b=3$, starting with a trial value $x=0$, entered
-as the \emph{rightmost} variable in the vv-list (and em-braced since
-I don't want this trial value displaying in the presentation of the
-result). Although $x$ has been found to the default six-figure accuracy,
-it is evident that the function vanishes only to five figures. Let's
-check:
-\begin{centred}
-\verb`\eval{$ bx^2 $}[b=3,x=x=-0.390647]` $\Longrightarrow$ \eval{$ bx^2 $}[b=3,x=-0.390647], 
-
-\verb`\eval{$ e^{ax} $}[a=2,x=-0.390646]` $\Longrightarrow$ \eval{$ e^{ax} $}[a=2,x=-0.390647]; 
-\end{centred}
-the values agree save in the final digit.
-
-This discrepancy in the final decimal place or places is a general
-feature of solutions found by \verb`\solve`. It is the value of $x$,
-not the value of $f(x)$, that is being found (in this case) to six
-figures. If the graph of a function crosses the $x$-axis steeply
-then the $x$ value (the zero) may be located to a higher precision
-than the function value. Conversely, if the graph of a function crosses
-the $x$-axis gently (at a shallow angle) then the function value
-will vanish to a greater number of decimal places than the zero (the
-$x$ value) is located.
-
-A second example, which we can check with values tabulated in \emph{HMF},
-is 
-\begin{centred}
-\verb`\solve{$ \tan x - \lambda x $}[\lambda=-1/0.8,{x}=1][5]` $\Longrightarrow$
-\solve{$ \tan x - \lambda x $}[\lambda=-1/0.8,{x}=1][5].
-\end{centred}
-Table 4.19 of \emph{HMF }lists values of $x$ against $\lambda$ and
-this is the value tabulated there.
-
-\section{Extrema}
-
-A function may not have a zero or for the given initial trial value
-and initial step in the search for a zero there may be a local extremum
-in the way. In that case \texttt{numerica} may well locate the local
-extremum (maximum or minimum but not a saddle point). For example
-for the quadratic $(2x-1)^{2}+3x+1$ the \verb`\solve` command gives
-the result 
-\begin{centred}
-\verb`\solve[vvi=]{$ (2x-1)^2+3x+1 $}[x=2]` $\Longrightarrow$\solve[vvi=]{$ (2x-1)^2+3x+1 $}[{x}=2]. 
-\end{centred}
-Since $(2x-1)^{2}+3x+1\ne0$ for any (real number) $x$, we deduce
-that the quadratic takes a minimum value $1.9375$ at $x=0.125$ \textendash{}
-easily confirmed analytically. This particular minimum is a global
-minimum but in general any extremum found is only \emph{local}. The
-function may well take larger or smaller values (or vanish for that
-matter) further afield.
-
-It is also worth noting in this example the \verb`vvi=` in the settings
-option which suppresses display of the vv-list. (The only member of
-the vv-list is the trial value \verb`x=2` which we do not want to
-display.)
-
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-Note that the function for which a zero is being sought is \emph{not}
-equated to zero when entered in the \verb`\solve` command. It is
-\verb`\solve{ f(x) }`, not \verb`\solve{ f(x)=0 }`. This is precisely
-because it may be an extremum that is found rather than a zero (if
-extremum or zero is found at all \textendash{} think $e^{x}$). The
-display of the result makes clear which is which, equating $f(x)$
-to its value, zero or extremum depending on what has been found, as
-you can see in the preceding examples.\end{shaded}%
-\end{minipage}
-
-\subsection{The search strategy}
-
-\label{subsec:solveSearch-strategy}If you have some sense of where
-a function has a zero, then choose a trial value in that vicinity.
-\verb`\solve` uses a bisection method to home in on the zero. It
-therefore needs \emph{two} initial values. For the first it uses the
-trial value you specify, call it $a$ and for the second, by default,
-it uses $a+1$. (The default value $1$ for the initial step from
-the trial value can be changed in the settings option; see \xA7\ref{sec:solveSettings-option}.)
-If $f(a)$ and $f(a+1)$ have opposite signs then that is good. Bisection
-of the interval $[a,a+1]$ can begin immediately in order to home
-in on the precise point where $f$ vanishes. Write $b=a+1$.
-\begin{itemize}
-\item Let $c=\tfrac{1}{2}(a+b)$; if $f(c)=0$ the zero is found; otherwise
-either $f(a),f(c)$ are of opposite signs or $f(c),f(b)$ are of opposite
-signs. In the former case write $a_{1}=a,$ $b_{1}=c$; in the latter
-case write $a_{1}=c$, $b_{1}=b$ and then redefine $c=\tfrac{1}{2}(a_{1}+b_{1})$.
-Continue the bisection process, either until an exact zero $c$ of
-$f$ is reached ($f(c)=0$) or a value $c$ is reached where the difference
-between $a_{n+1}$ and $b_{n+1}$ is zero at the specified rounding
-value. (But note, $f(c)$ may not vanish at that rounding value \textendash{}
-the zero might be elsewhere in the interval and $f$ might cross the
-axis at a steep slope.)
-\end{itemize}
-However $f(a)$ and $f(b)=f(a+1)$ may not have opposite signs. If
-we graph the function $y=f(x)$ and suppose $f(a),f(b)$ are distinct
-but of the same sign, then the line through the points $(a,f(a))$,
-$(b,f(b))$ will intersect the $x$-axis to the left of $a$ or the
-right of $b$ depending on its slope. We search always \emph{towards
-the $x$-axis} in steps of $b-a$ ($=1$ with default values).
-\begin{itemize}
-\item If the line intersects the axis to the left of $a$ then $c=a-(b-a)$
-and we set $a_{1}=c,b_{1}=a$; if the line intersects the axis to
-the right of $b$ then $c=b+(b-a)$ and we set $b_{1}=c,a_{1}=b$.
-The hope is that by always taking steps in the direction towards the
-$x$-axis that eventually $f(c)$ will be found to lie on the \emph{opposite}
-side of the axis from $f(a_{n})$ or $f(b_{n})$, at which point the
-bisection process begins.
-\item Of course this may not happen. At some point $c$ may lie to the left
-of $a_{n}$ but $\left|f(c)\right|>\left|f(a_{n})\right|$, or $c$
-may lie to the right of $b_{n}$ but $\left|f(c)\right|>\left|f(b_{n})\right|$.
-The slope has reversed. In that case we halve the step value to $\tfrac{1}{2}(b-a)$
-and try again in the same direction as before from the same point
-as before ($a_{n}$ or $b_{n}$ as the case may be).
-\item Should we find at some point that $f(a_{n})=f(b_{n})$ then the previous
-strategy does not apply. In this case we choose $a_{n+1}$ and \textbf{$b_{n+1}$}
-at the quarter and three-quarter marks between $a_{n}$ and $b_{n}$.
-Either $f(a_{n+1})$ and $f(b_{n+1})$ will differ and the previous
-search strategy can start again or we are on the way to finding an
-extremum of $f$.
-\end{itemize}
-As already noted it is also possible that our function has neither
-zeros nor extrema. To prevent the search continuing indefinitely,
-\texttt{numerica} uses a cut-off value for the maximum number of steps
-pursued \textendash{} by default set at 100.
-
-\subsubsection{Elusive extrema}
-
-The strategy `search always towards the $x$-axis' has a consequence:
-it means that a local maximum above the $x$-axis will almost certainly
-not be found, since `towards the $x$-axis' pulls the search away
-from the maximum. Similarly a local minimum below the $x$-axis will
-also not be found since `towards the $x$-axis' pulls the search
-away from the minimum. 
-
-One way of countering this elusiveness is to add a constant value
-(possibly negative) to the function whose zeros and extrema are being
-sought. The zeros of the function will change but the abscissae ($x$
-values) of the extrema remain unchanged. If the constant is big enough
-it will push a local minimum above the axis where it can be found
-or, for a negative constant, push a local maximum below the axis where
-it can be found.
-
-For example $f(x)=x^{3}-x$ has roots at $-1,0,1$, a local maximum
-at $-\tfrac{1}{\surd3}$ and a local minimum at $\tfrac{1}{\surd3}$.
-To locate the minimum, I have added an unnecessarily large constant
-$k$ to $f(x)$. ($k=1$ would have sufficed, but note, $k=0$ fails.)
-\begin{centred}
-\verb`\solve{$ x^3-x+k $}[k=5,{x}=0.5]` $\Longrightarrow$ \solve{$ x^3-x+k $}[k=5,{x}=0.5].
-\end{centred}
-Checking, \verb`\eval{$\tfrac1{\surd 3}$}` $\Longrightarrow$ \eval{$\tfrac1{\surd 3}$}.
-There is a discrepancy in the $6$th decimal place which can be eliminated
-by using the extra rounding setting; see \xA7\ref{subsec:solveExtraRounding}.
-
-\section{Star (\texttt{{*}}) option}
-
-A starred form of the\textbf{ }\verb`\nmcSolve` command suppresses
-all elements of display of the result apart from the numerical value.
-When nesting a \verb`\solve` command within another command this
-is the form to use. Thus with the `elusive' extremum example above,
-we can find the actual value of the minimum by nesting the starred
-\verb`\solve` command within the vv-list of an \verb`\eval` command:
-\begin{centred}
-\verb`\eval{$ x^3-x $}[x={\solve*{y^3-y+k}[k=5,y=0.5]}]` $\Longrightarrow$
-\eval{$ x^3-x $}[x={\solve*{y^3-y+k}[k=5,y=0.5]}].
-\end{centred}
-(Note the braces around the \verb`\solve*` and arguments to hide
-\emph{its} square-bracketed vv-list from the parsing of the vv-list
-of the \verb`\eval` command.) The result is to be compared with \verb`$\eval*{x^3-x}[x=\tfrac1{\surd3}]$`
-$\Longrightarrow$ $\eval*{x^3-x}[x=\tfrac1{\surd3}]$. 
-
-\section{Settings option}
-
-\label{sec:solveSettings-option}The settings option is a comma-separated
-list of items of the form \emph{key~=~value}.
-
-\subsection{Inherited settings}
-
-The keys discussed in the settings\emph{ }option for \verb`\nmcEvaluate`
-are also available for \verb`\nmcSolve`. The very first example in
-this chapter used the punctuation option \texttt{p} (\verb`\solve[p]{\[... `)
-inherited from the \verb`\eval` command to ensure a comma after the
-display-style presentation of the result. We also saw in the quadratic
-example illustrating extrema the use of \texttt{vvi} with no value
-to suppress display of the vv-list: \verb`\solve[vvi=]{$ ...`. 
-
-Putting \verb`dbg=1` produces a familiar kind of display. Using the
-function 
-\[
-ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)}
-\]
-from the rotating disk problem,
-\begin{verbatim}
-    \solve[dbg=1,var=t,p=.,vvd={,}\\(vv)\\,*]
-      {$ ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)} 
-      $}[c=30,a=10,b=20,\beta=1,\omega=0.1,{t}=0][4]
-\end{verbatim}
-$\Longrightarrow$     \solve[dbg=1,var=t,p=.,vvd={,}\\(vv)\\,*]
-      {$ ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)} 
-      $}[c=30,a=10,b=20,\beta=1,\omega=0.1,{t}=1][4]
-
-\subsubsection{Multi-line display of the result}
-
-\label{subsec:solveMulti-line-display}By default the result is presented
-on a single line. Unless the star option is being used, this can be
-of the form \emph{function = function value, (vv-list) $\rightarrow$
-result}. It takes only a slightly complicated formula and only a few
-variables in the vv-list before this becomes a crowded line, likely
-to exceed the line width and extend into the margin. To split the
-display over two lines choose a \texttt{vvd} specification in the
-vv-list like, for instance, \texttt{vvd=\{,\}\textbackslash\textbackslash (vv)}.
-The \texttt{\textbackslash\textbackslash} is a trigger for \texttt{numerica}
-to replace whatever environment the \texttt{\textbackslash eval}
-command is wrapped around with a \texttt{multline} environment. An
-asterisk in the vv-list replaces \texttt{multline} with \texttt{multline{*}}
-so that no equation number is used:
-\begin{verbatim}
-    \solve[p=.,vvd={,}\\(vv),*]
-      {$ ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)} 
-      $}[c=30,a=10,b=20,\beta=1,\omega=0.1,{t}=0][4]
-\end{verbatim}
-$\Longrightarrow$ \solve[p=.,vvd={,}\\(vv),*]
-      {$ ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)} 
-      $}[c=30,a=10,b=20,\beta=1,\omega=0.1,{t}=0][4]
-\begin{verbatim}
-
-\end{verbatim}
-You could introduce a third line if you wished to display the result
-on a line of its own by using the spec. \texttt{vvd=\{,\}\textbackslash\textbackslash (vv)\textbackslash\textbackslash}:
-\begin{verbatim}
-    \solve[p=.,vvd={,}\\(vv)\\,*]
-      {$ ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)} 
-      $}[c=30,a=10,b=20,\beta=1,\omega=0.1,{t}=0][4]
-\end{verbatim}
-$\Longrightarrow$ \solve[p=.,vvd={,}\\(vv)\\,*]
-      {$ ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)} 
-      $}[c=30,a=10,b=20,\beta=1,\omega=0.1,{t}=0][4]
-
-The function evaluates to $-0.0015$. Is this a zero that has been
-found or an extremum? To find out, the calculation needs to be carried
-out to a higher rounding value which is the reason why \verb`\nmcSolve`
-has an extra rounding setting; see \xA7\ref{subsec:solveExtraRounding}
-below.
-
-\subsection{\texttt{\textbackslash solve}-specific settings}
-
-In addition there are some settings peculiar to \verb`\nmcSolve`.
-These are listed in Table~\ref{tab:solveSettings}.
-
-\begin{table}
-\centering{}\caption{\protect\label{tab:solveSettings}Settings for \texttt{\textbackslash nmcSolve}}
-\begin{center}
-\begin{tabular}{llll}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{var}} & {\small token(s)} & {\small equation variable} & \tabularnewline
-{\small\texttt{dvar}} & {\small real $\ne0$ } & {\small initial step size} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{+}} & {\small int} & {\small extra rounding} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{max}} & {\small int > 0} & {\small max. number of steps before cut off} & {\small\texttt{100}}\tabularnewline
-{\small\texttt{reuse}} & {\small int ($\mathtt{0}/\mathtt{1}$)} & {\small form of result saved with }{\small{\small\verb`\reuse`}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-
-
-\subsubsection{Equation variable}
-
-By default the equation variable is the \emph{rightmost} variable
-in the vv-list. This may not always be convenient. A different equation
-variable can be specified by entereing
-\begin{lyxcode}
-var~=~<variable~name>
-\end{lyxcode}
-in the vv-list. \texttt{<variable name>} will generally be a single
-character or token \textendash{} $x$, $t$, $\alpha$, $\omega$
-\textendash{} but is not necessarily of this kind. Multi-token names
-are perfectly acceptable (with the default \texttt{xx=1} multi-token
-setting).
-
-\subsubsection{Initial step size}
-
-The vv-list must contain the equation variable set to some trial value.
-But \verb`\solve` needs \emph{two} initial values to begin its search
-for a zero or extremum; see \xA7\ref{subsec:solveSearch-strategy}. If
-the equation variable is set to a trial value $a$ then by default
-the second value is $a+1$. The `$+1$' here can be changed by entering
-in the settings option
-\begin{lyxcode}
-dvar~=~<non-zero~real~number>
-\end{lyxcode}
-For instance, \texttt{dvar=-1}, or \texttt{dvar=\textbackslash pi}
-are two valid specifications of initial step size.
-
-The notation is prompted by the use of expressions like $x+dx$ in
-calculus.
-
-An example where the default step value is too big and a smaller one
-needs to be specified is provided by Planck's radiation function (\emph{HMF
-}Table 27.2),
-\[
-f(x)=\frac{1}{x^{5}(e^{1/x}-1)}.
-\]
-From the (somewhat coarse-grained) table in \emph{HMF }it is clear
-that there is a maximum of about 21.2 when $x$ is a little more than
-$0.2$. This is a maximum above the $x$-axis and hence `elusive'.
-To find it, substract $100$ (say) from the formula and again use
-the ability to nest commands to display the result. Note the \verb`dvar=0.1`
-in the settings option of the \verb`\solve*` command: 
-\begin{verbatim}
-    \eval[p=.]{\[ \frac1{x^5(e^{1/x}-1)} \]}
-      [ x={ \solve*[dvar=0.1]
-              { \frac1{y^5(e^{1/y}-1)}-100 }[y=0.1]
-          } ]
-\end{verbatim}
-$\Longrightarrow$     \eval[p=.]{\[ \frac1{x^5(e^{1/x}-1)} \]}
-      [ x={ \solve*[dvar=0.1]
-              { \frac1{y^5(e^{1/y}-1)}-100 }[y=0.1]
-          } ]
-
-\noindent The maximum is indeed a little over $21.2$ and the $x$
-value a little more than $0.2$. 
-
-The default \verb`dvar=1` is too big for this problem. From the table
-in \emph{HMF},\emph{ }$f(0.1)=4.540$ and $f(1.1)=0.419$. By subtracting
-$100$ from $f(x)$ the `towards the $x$-axis' search strategy
-leads to negative values of $x$, an artifact of the subtraction.
-
-\subsubsection{Extra rounding}
-
-\label{subsec:solveExtraRounding}\verb`\solve` determines that a
-zero or an extremum has been reached when the difference between two
-successive bisection values or step values vanishes at the specified
-rounding value (the value in the final trailing optional argument
-of the \verb`\solve` command; $6$ by default). If our function is
-$f(x)$ then $\abs{x_{n+1}-x_{n}}=0$ to the specified rounding value
-and (assuming $x_{n+1}>x_{n}$) there is a critical value $x_{c}\in[x_{n},x_{n+1}]$
-such that $f(x_{c})=0$ (to all 16 places of decimals that \texttt{l3fp}
-works to). But in general the critical value $x_{c}$ will not coincide
-with $x_{n}$ or $x_{n+1}$. If $f(x)$ crosses the $x$-axis at a
-steep angle it may well be that although $f(x_{c})$ vanishes to all
-$16$ places of decimals, $f(x_{n}),f(x_{n+1})$ may well not vanish
-at the (generally smaller) specified rounding value. For instance,
-suppose $f(x)=1000x-3000$.
-\begin{centred}
-\verb`\solve[vvi=]{$ 1000x-3000 $}[x=e][4*]` $\Longrightarrow$ \solve[vvi=]{$ 1000x-3000 $}[x=e][4*].
-\end{centred}
-In this example, although the difference between successive $x$ values
-vanishes to $4$ places of decimals, $f(x)$ does not, not even to
-$2$ places. 
-
-This suggests it would be helpful to be able to use two rounding values,
-one to determine when a zero has been found and one for the visible
-display. This is done through the extra rounding key in the settings
-option. Enter
-\begin{lyxcode}
-+~=~<integer>
-\end{lyxcode}
-in the settings option of the \verb`\solve` command to add \texttt{<integer>}
-to the rounding value determining the conclusion of the calculation.
-By default the setting is \texttt{+=}0. The extra rounding setting
-leaves the display rounding unaffected. 
-
-With this option available it is easy to check that \verb`+=3` suffices
-to ensure that both $x$ and $f(x)$ vanish to $4$ places of decimals,
-\begin{centred}
-\verb`\solve[+=3]{$ 1000x-3000 $}[x=e][4*]` $\Longrightarrow$ \solve[+=3]{$ 1000x-3000 $}[x=e][4*],
-\end{centred}
-and that \texttt{+=2} does not, i.e., we need to locate the zero to
-$4+3=7$ figures to ensure the function vanishes to $4$ figures. 
-
-There is no need for the \texttt{<integer>} to be positive. In fact
-negative values can illuminate what is going on. In the first of the
-following, the display is to $10$ places but the calculation is only
-to $10-4=6$ places. In the second, the display is again to $10$
-places, but the calculation is to $10-3=7$ places.
-\begin{centred}
-\verb`\solve[+=-4]{$ 1000x-3000 $}[x=e][10*]` $\Longrightarrow$
-\solve[+=-4]{$ 1000x-3000 $}[x=e][10*],
-
-\verb`\solve[+=-3]{$ 1000x-3000 $}[x=e][10*]` $\Longrightarrow$
-\solve[+=-3]{$ 1000x-3000 $}[x=e][10*].
-\end{centred}
-Only in the second does $f(x)=1000x-3000$ vanish when rounded to
-$4$ figures. 
-
-Returning to an earlier example (\xA7\ref{subsec:solveMulti-line-display})
-in which it was not entirely clear whether a zero or an extremum had
-been found, we can now resolve the confusion. Use the extra rounding
-setting (and pad with zeros to emphasize the $4$-figure display by
-adding an asterisk in the trailing optional argument):
-\begin{verbatim}
-    \solve[+=2,vvd={,}\\(vv),*]
-      {$ 
-        ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)} 
-      $}[c=30,a=10,b=20,\beta=1,\omega=0.1,{t}=0][4*]
-\end{verbatim}
-$\Longrightarrow$ \solve[+=2,vvd={,}\\(vv),*]
-      {$
-        ct-\sqrt{a^{2}+b^{2}-2ab\cos(\beta+\omega t)} 
-      $}[c=30,a=10,b=20,\beta=1,\omega=0.1,{t}=0][4*]
-
-\subsubsection{Maximum number of steps before cut-off}
-
-Once two function values have been found of opposite sign, bisection
-is guaranteed to arrive at a result. The problem is the \emph{search}
-for two such values. This may not terminate \textendash{} think of
-functions like $e^{x}$or $1/x$ which lack both zeros and extrema.
-To prevent an infinite loop, \verb`\solve` cuts off the search after
-$100$ steps. This cut-off value can be changed for a calculation
-by entering 
-\begin{lyxcode}
-max~=~<positive~integer>
-\end{lyxcode}
-in the settings option.
-
-To illustrate, we know that $1/x$ has neither zero nor extremum,
-but we do not get an infinite loop; we get an error message if we
-attempt to `solve' $1/x$:
-\begin{centred}
-\verb`\solve{ 1/x }[x=1]` $\Longrightarrow$ \solve{ 1/x }[x=1]
-\end{centred}
-
-\subsubsection{Form of result saved by \texttt{\textbackslash reuse}}
-
-As wth \verb`\eval` and \verb`\iter` it is possible to specify to
-some extent what is saved to file when using \verb`\reuse` after
-a \verb`\solve` command. The form of entry in the settings option
-is
-\begin{lyxcode}
-reuse~=~<integer>
-\end{lyxcode}
-If the star option is used with the \verb`\solve` command the numerical
-result is the only thing saved, but in the absence of the star option,
-\begin{itemize}
-\item \texttt{reuse=0} saves\emph{ the form that is displayed}. For example,
-if the display is of the form \emph{function = function value, (vv-list)
-$\rightarrow$ result} then that is what is saved; this is the default
-behaviour;
-\item \texttt{reuse=1} (or any non-zero integer) saves only the numerical
-result.
-\end{itemize}
-
-\subsection{Changing default values}
-
-\begin{wraptable}[12]{o}{0.5\columnwidth}%
-\centering{}\caption{\protect\label{tab:solveSettingsDefaults}Defaults for \texttt{\textbackslash nmcSolve}}
-\begin{center}
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small default}\tabularnewline
-\midrule
-{\small solve-first-step} & 1\tabularnewline
-{\small solve-extra-rounding} & {\small\texttt{0}}\tabularnewline
-{\small solve-max-steps} & {\small\texttt{100}}\tabularnewline
-{\small solve-reuse} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}\end{wraptable}%
-If you wish to change the default values of the various settings for
-\verb`\nmcSolve` this can be done by entering new values in a configuration
-file \texttt{numerica.cfg} as described in the chapter on settings
-in the associated document \texttt{numeric-basics.pdf}. The relevant
-keys are listed in Table~\ref{tab:solveSettingsDefaults}, corresponding
-to the \verb`dvar`, \verb`+`, \verb`max` and \verb`reuse` settings
-of the \verb`\solve` command. (Obviously it makes no sense to have
-a default setting for the solution variable. That will change from
-case to case.)
-
-\chapter{Recurrence relations: \texttt{\textbackslash nmcRecur}}
-
-One of the simplest recurrence relations is that determining the Fibonacci
-numbers, $f_{n+2}=f_{n+1}+f_{n}$, with initial values $f_{0}=f_{1}=1$.
-The command \verb`\nmcRecur`, short-name form \verb`\recur`, allows
-calculation of the terms of this sequence:
-\begin{verbatim}
-    $ \nmcRecur[do=8,see1=8,...]
-      { f_{n+2}=f_{n+1}+f_{n} }
-        [f_{1}=1,f_{0}=1] $
-\end{verbatim}
-$\Longrightarrow$     $\nmcRecur[do=8,see1=8,...]
-      { f_{n+2}=f_{n+1}+f_{n} }
-        [f_{1}=1,f_{0}=1]$
-
-The recurrence relation is entered in the main argument (between braces),
-the initial values in the vv-list trailing the main argument, and
-the display specification is placed in the settings option: \texttt{do=8}
-terms to be calculated, all $8$ to be viewed (\texttt{see1=8}), and
-the display to be concluded by an ellipsis to indicate that the sequence
-continues (but those are three dots/periods/full stops in the settings
-option).
-
-A more complicated recurrence relation determines the Legendre polynomials:
-\[
-(n+2)P_{n+2}(x)-(2n+3)xP_{n+1}(x)+(n+1)P_{n}(x)=0.
-\]
-For the purposes of \verb`\recur` we need $P_{n+2}$ expressed in
-terms of the lower order terms:
-\[
-P_{n+2}(x)=\frac{1}{n+2}\left((2n+3)xP_{n+1}(x)-(n+1)P_{n}(x)\right).
-\]
- It is this standard form \textendash{} the term to be calculated
-on the left, equated to an expression involving a fixed number of
-lower-order terms on the right \textendash{} that \texttt{numerica}
-works with. For $P_{0}(x)=1,~P_{1}(x)=x$ and $x=0.5$, the terms
-are calculated thus:
-\begin{verbatim}
-    \recur[p,do=11,see1=4,see2=2,vvd={,}\\(vv)\\,*]
-      {\[ P_{n+2}(x)=\frac{1}{n+2}
-        \Bigl((2n+3)xP_{n+1}(x)-(n+1)P_{n}(x)\Bigr)
-      \]}[P_{1}(x)=x,P_{0}(x)=1,x=0.5]
-\end{verbatim}
-$\Longrightarrow$     \recur[p,do=11,see1=4,see2=2,vvd={,}\\(vv)\\,*]
-      {\[ P_{n+2}(x)=\frac{1}{n+2}
-        \Bigl((2n+3)xP_{n+1}(x)-(n+1)P_{n}(x)\Bigr)
-      \]}[P_{1}(x)=x,P_{0}(x)=1,x=0.5] 
-
-\noindent where $P_{9}(0.5)$ and $P_{10}(0.5)$ are the last two
-displayed values (and to $6$-figures are the values listed in \emph{HMF
-}Table 8.1).
-
-These examples also illustrate a common behaviour of the \texttt{numerica}
-commands: when wrapped around math delimiters: the display is of the
-\emph{expression=result} form, and when placed between math delimiters
-the display is simply of the \emph{result}. When used without math
-delimiters, \texttt{numerica} treats the command as if it had been
-placed between \texttt{\textbackslash{[} \textbackslash}{]}.
-
-\section{Notational niceties}
-
-More than the other commands in \texttt{numerica}, \verb`\nmcRecur`
-depends on getting the notation into a standard form.
-\begin{itemize}
-\item The terms of the recurrence must be \emph{subscripted}: $f_{n}$,
-$P_{n}(x)$ are examples.
-\item The recurrence relation is placed in the main (mandatory) argument
-of \verb`\nmcRecur` in the form: \emph{high-order term=function of
-lower-order terms}.
-\item The initial-value terms in the vv-list must occur left-to-right in
-the order \emph{high }to \emph{low} order.
-\item The recurrence variable changes by $1$ between successive terms.
-\end{itemize}
-The example for Legendre polynomials in particular shows what is required.
-The Fibonacci example is simpler, since the recurrence variable does
-not occur independently in the recurrence relation as it does with
-the Legendre polynomials. In both cases though the recurrence variable
-is absent from the vv-list.
-
-\subsection{Vv-list and recurrence variable}
-
-The recurrence variable is required in the vv-list only when an implicit
-mode calculation is undertaken. Suppose we write $A$ and $B$ for
-the coefficients $2n+3$ and $n+1$ respectively in the Legendre recurrence.
-$A$ and $B$ will now need entries in the vv-list which means the
-recurrence variable will need a value assigned to it there too, and
-we will need to add \texttt{vvmode=1} to the settings option.
-\begin{verbatim}
-    \recur[p,vvmode=1,do=11,see1=4,see2=2,vvd={,}\\(vv)\\,*]
-      {\[ P_{n+2}(x)=\frac{1}{n+2}
-        \Bigl(AxP_{n+1}(x)-BP_{n}(x)\Bigr)
-      \]}[P_{1}(x)=x,P_{0}(x)=1,x=0.5,A=2n+3,B=n+1,n=0]
-\end{verbatim}
-$\Longrightarrow$     \recur[p,vvmode=1,do=11,see1=4,see2=2,vvd={,}\\(vv)\\,*]
-      {\[ P_{n+2}(x)=\frac{1}{n+2}
-        \Bigl(AxP_{n+1}(x)-BP_{n}(x)\Bigr)
-      \]}[P_{1}(x)=x,P_{0}(x)=1,x=0.5,A=2n+3,B=n+1,n=0] 
-
-Since the vv-list is evaluated from the right, the left-to-right high-to-low
-ordering of the initial-value terms means the value of the lowest
-order term is read first. Although \texttt{numerica} depends on this
-order of occurrence of the terms, they do not need to be \emph{consecutive}
-as in the examples so far (although it is natural to enter them in
-this way). \texttt{numerica} reads the value of the subscript of only
-the right-most term (the lowest order term), increments it by $1$
-when reading the next recurrence term to the left, and so on. The
-reading of the subscript of the lowest order term in the vv-list provides
-the initial value of the recurrence variable.
-
-In the following example I have placed other items between $P_{1}(x)$
-and $P_{0}(x)$ in the vv-list (but maintained their left-to-right
-order) and given the recurrence variable $n$ a ridiculous initial
-value $\pi^{2}/12$. (Because of the order in which things get done
-`behind the scenes', \emph{some} value is necessary so that the
-$n$ in `$B=n+1$' does not generate an `unknown token' message.)
-The result is unchanged.
-\begin{verbatim}
-    \recur[p,vvmode=1,do=11,see1=4,see2=2,vvd={,}\\(vv)\\,*]
-      {\[ P_{n+2}(x)=\frac{1}{n+2}
-        \Bigl(AxP_{n+1}(x)-BP_{n}(x)\Bigr)
-      \]}[A=2n+3,P_{1}(x)=x,B=n+1,n=\pi^2/12,P_{0}(x)=1,x=0.5]
-\end{verbatim}
-$\Longrightarrow$     \recur[p,vvmode=1,do=11,see1=4,see2=2,vvd={,}\\(vv)\\,*]
-      {\[ P_{n+2}(x)=\frac{1}{n+2}
-        \Bigl(AxP_{n+1}(x)-BP_{n}(x)\Bigr)
-      \]}[A=2n+3,P_{1}(x)=x,B=n+1,n=\pi^2/12,P_{0}(x)=1,x=0.5]
-
-\subsection{Form of the recurrence relation}
-
-As noted earler, the form of the recurrence must be entered in the
-main argument in the form: \emph{highest order term = function of
-consecutive lower order terms}. The number of lower\emph{ }order terms
-is the order of the recurrence. The Fibonacci and Legendre polynomial
-recurrences are both second order and presented in the form: \emph{$n+2$-th
-term = function of $n+1$-th term and $n$-th term}. We could equally
-have done
-\begin{verbatim}
-    \nmcRecur[p,do=8,see1=8,...]
-      {$ f_{n}=f_{n-1}+f_{n-2} $}
-        [f_{1}=1,f_{0}=1]
-\end{verbatim}
-$\Longrightarrow$     \nmcRecur[p,do=8,see1=8,...]
-      {$ f_{n}=f_{n-1}+f_{n-2} $}
-        [f_{1}=1,f_{0}=1] where now the recurrence is of the form $n$\emph{-th term = function
-of $n-1$-th term and $n-2$-th term}, or (adjusting the coefficients
-as well as the recurrence terms),
-\begin{verbatim}
-    \recur[p=.,do=10,see1=4,see2=2,vvd={,}\\(vv)\\,*]{\[
-      P_{n+1}(x)=\frac{1}{n+1}
-        \Bigl((2n+1)xP_{n}(x)-nP_{n-1}(x)\Bigr)
-          \]}[P_{2}(x)=-0.125,P_{1}(x)=x,x=0.5]
-\end{verbatim}
-$\Longrightarrow$     \recur[p=.,do=10,see1=4,see2=2,vvd={,}\\(vv)\\,*]{\[
-      P_{n+1}(x)=\frac{1}{n+1}
-        \Bigl((2n+1)xP_{n}(x)-nP_{n-1}(x)\Bigr)
-          \]}[P_{2}(x)=-0.125,P_{1}(x)=x,x=0.5]
-
-\noindent The recurrence here is of the form $n+1$\emph{-th term
-= function of $n$-th term and $n-1$-th term}. This last example
-has one further `wrinkle'. I've made $P_{1}(x)$ the lowest order
-term and decreased the number of terms to calculate by $1$ accordingly. 
-
-\subsection{First order recurrences (iteration)}
-
-The recurrence relations for both the Fibonacci sequence and Legendre
-polynomials are second order. There is no reason why the recurrence
-should not be of third or higher order or, indeed, lower. A first
-order recurrence provides an alternative means of iterating functions.
-\verb`\recur` therefore provides a means to display the results of
-an iteration in a different form from \verb`\iter`. 
-
-Iterating $1+a/x$ in this way, $16$ terms gives the sequence
-\begin{verbatim}
-    \recur[do=16,see1=0,see2=3,...]{$
-      x_{n+1}=1+a/x_{n}
-        $}[x_{0}=1,a=1]
-\end{verbatim}
-$\Longrightarrow$     \recur[do=16,see1=0,see2=3,...]{$
-      x_{n+1}=1+a/x_{n} 
-        $}[x_{0}=1,a=1]
-
-\noindent to be compared with the example near the start of Chapter~\ref{chap:Iterating-functions}.
-(\emph{That} effected $15$ iterations; \emph{this} uses $16$ terms
-because of the extra $x_{0}=1$ term.) 
-
-\section{Star (\texttt{{*}}) option}
-
-When the star option is used with the \verb`\nmcRecur` command, only
-a single term, the \emph{last}, is presented as the result. Repeating
-the last calculation, but with the star option produces
-\begin{verbatim}
-    \recur*[p=.,do=10]{\[
-      P_{n+1}(x)=\frac{1}{n+1}
-        \Bigl((2n+1)xP_{n}(x)-nP_{n-1}(x)\Bigr)
-          \]}[P_{2}(x)=-0.125,P_{1}(x)=x,x=0.5]
-\end{verbatim}
-$\Longrightarrow$     \recur*[p=.,do=10]{\[
-      P_{n+1}(x)=\frac{1}{n+1}
-        \Bigl((2n+1)xP_{n}(x)-nP_{n-1}(x)\Bigr)
-          \]}[P_{2}(x)=-0.125,P_{1}(x)=x,x=0.5]
-
-Although punctuation (a full stop) was specified in the settings,
-it has been ignored in the display of the result. Other settings would
-also have been ignored with the exception of the \verb`do` key which
-is required to know exactly which term to calculate. The star option
-produces a purely numerical answer without any trimmings.
-
-\section{Settings}
-
-The settings option is a comma-separated list of items of the form
-\emph{key~=~value}.
-
-\subsection{Inherited settings}
-
-Because recurrence terms are necessarily multi-token, the multi-token
-key is hard-coded in \verb`\recur` to \texttt{xx=1}. 
-
-\subsubsection{Multi-line formatting of result}
-
-When the \verb`\recur` command wraps around math delimiters, the
-\texttt{vvd} setting is available to split display of the result over
-two or more lines. For example, \texttt{vvd=\{,\}\textbackslash\textbackslash (vv)}pushes
-the vv-list and sequence of calculated values to a second line; or,
-\texttt{vvd=\{,\}\textbackslash qquad(vv)\textbackslash\textbackslash}
-pushes only the sequence of calculated values to a second line; or
-\texttt{vvd=\{,\}\textbackslash\textbackslash (vv)\textbackslash\textbackslash}
-pushes the vv-list, centred, to a second line and the sequence of
-values, right aligned, to a third line. The \texttt{{*}} setting is
-available to suppress equation numbering (by substituting \verb`multline*`
-for \verb`multline`).
-\begin{verbatim}
- \nmcRecur[do=8,see1=8,...,vvd={,}\qquad(vv)\\,*]
-      {$ f_{n+2}=f_{n+1}+f_{n} $}
-        [f_{1}=1,f_{0}=1]
-\end{verbatim}
-$\Longrightarrow$     \nmcRecur[do=8,see1=8,...,vvd={,}\qquad(vv)\\,*]
-      {$ f_{n+2}=f_{n+1}+f_{n} $}
-        [f_{1}=1,f_{0}=1]
-
-\subsection{\texttt{\textbackslash recur}-specific settings}
-
-\label{subsec:recurSpecific-settings}
-
-\subsubsection{Number of terms to calculate}
-
-By entering
-\begin{lyxcode}
-do~=~<integer>
-\end{lyxcode}
-in the settings option you can specify how many terms of a recurrence
-to calculate. The default is set to $7$ (largely to show a sufficient
-number of terms of the Fibonacci series to begin to be interesting).
-Note that \texttt{<integer>} will generally not correspond to the
-subscript on the last term calculated since that also depends on the
-value of the subscript of the lowest order term in the vv-list.
-
-\subsubsection{Number of terms to display}
-
-\begin{table}
-\centering{}\caption{\protect\label{tab:solveSettings-1}Settings for \texttt{\textbackslash nmcRecur}}
-\begin{center}
-\begin{tabular}{llll}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{do}} & {\small int$\ge0$} & {\small number of terms to calculate} & {\small\texttt{7}}\tabularnewline
-{\small\texttt{see1}} & {\small int$\ge0$} & {\small number of initial terms to display} & {\small\texttt{3}}\tabularnewline
-{\small\texttt{see2}} & {\small int$\ge0$} & {\small number of final terms to display} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{...}} & {\small chars} & {\small follow display of values with an ellipsis} & \tabularnewline
-{\small\texttt{reuse}} & {\small int ($\mathtt{0}/\mathtt{1}/\mathtt{2}$)} & {\small form of result saved with }{\small{\small\verb`\reuse`}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-By entering
-\begin{lyxcode}
-see1~=~<integer1>,~see2=<integer2>
-\end{lyxcode}
-in the settings option, you can specify how many initial terms of
-the recurrence and how many of the final terms calculated you want
-to view. If the sum of these settings is less than the \texttt{do}
-setting, then the terms are displayed with an intervening ellipsis.
-If the sum is greater than the \texttt{do} setting, then the values
-are adjusted so that their sum equals the \texttt{do} setting and
-all terms are displayed. 
-
-The adjustment is preferentially to \texttt{see1}. Suppose \texttt{do=}7,
-\texttt{see1=5}, \texttt{see2=4}. Then \texttt{see2} is left unchanged
-but \texttt{see1} is reduced to \texttt{7-4=3}. If, say, \texttt{do=}7,
-\texttt{see1=5}, \texttt{see2=8}, then \texttt{see2} is reduced to
-\texttt{7} and \texttt{see1} to \texttt{-1} (rather than zero, for
-technical reasons). The reason for preserving \texttt{see2} over \texttt{see1}
-is for the functioning of the \texttt{reuse} setting (see above).
-
-The default value for \texttt{see1} is $3$; the default value for
-\texttt{see2} is $2$.
-
-\subsubsection{Ellipsis}
-
-Including three dots in the settings option
-\begin{lyxcode}
-...
-\end{lyxcode}
-ensures that a (proper) ellipsis is inserted after the final term
-is displayed. An example is provided by the display of the Fibonacci
-sequence at the start of this chapter. By default this option is turned
-off.
-
-\subsubsection{Form of result saved by \texttt{\textbackslash reuse}}
-
-By entering
-\begin{lyxcode}
-reuse~=~<integer>
-\end{lyxcode}
-it is possible to specify the form of result that is saved when using
-\verb`\nmcReuse`. (This setting has no effect when the star option
-is used with \verb`\nmcRecur`. In that case only the numerical result
-of the final term calculated is saved.) There are three different
-outputs possible:
-\begin{itemize}
-\item \texttt{int=0} (or any integer $\mathtt{\ne1,2}$) saves the full
-display (the default);
-\item \texttt{int=1} saves a comma-separated list of braced pairs of the
-form: \texttt{\{$k$, value-of-term-$k$\}} for the last \texttt{see2}
-terms calculated;
-\item \texttt{int=2} saves a comma-separated list of the values of the last
-\texttt{see2} terms calculated.
-\end{itemize}
-As an example, using \texttt{reuse=1},
-\begin{verbatim}
-    \recur[reuse=1,p=.,vvmode=1,do=11,see1=4,see2=2,
-      vvd={,}\\(vv)\\,*]
-      {\[ P_{n+2}(x)=\frac{1}{n+2} 
-            \Bigl(kxP_{n+1}(x)-(n+1)P_{n}(x)\Bigr)
-      \]}[k=2n+3,n=123,P_{1}(x)=x,P_{0}(x)=1,x=0.5]
-    \reuse[legendre]
-\end{verbatim}
-$\Longrightarrow$     \recur[reuse=1,p=.,vvmode=1,do=11,see1=4,see2=2,
-      vvd={,}\\(vv)\\,*]
-      {\[ P_{n+2}(x)=\frac{1}{n+2} 
-            \Bigl(kxP_{n+1}(x)-(n+1)P_{n}(x)\Bigr)
-      \]}[k=2n+3,n=123,P_{1}(x)=x,P_{0}(x)=1,x=0.5]
-    \reuse[legendre]
-
-\noindent Now check to see what has been saved: 
-\begin{centred}
-\verb`$\legendre$` $\Longrightarrow$ $ \legendre$.
-\end{centred}
-As you can see, the final two (because of \texttt{see2=2}) of the
-$12$ Legendre polynomials calculated have been saved, each value
-preceded by its index value. If the setting had been \texttt{reuse=2},
-only the two values would have been saved. The \verb`\legendre` control
-sequence contains the values as comma-separated braced pairs, as can
-be seen by using \TeX 's \verb`\meaning` command:
-\begin{centred}
-\verb`\meaning\legendre` $\Longrightarrow$ \meaning\legendre
-\end{centred}
-
-\subsection{Changing default values}
-
-\begin{wraptable}[12]{o}{0.5\columnwidth}%
-\centering{}\caption{\protect\label{tab:recurSettingsDefaults}Defaults for \texttt{\textbackslash nmcRecur}}
-\begin{center}
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small default}\tabularnewline
-\midrule
-{\small recur-do} & {\small\texttt{7}}\tabularnewline
-{\small recur-see-first} & {\small\texttt{3}}\tabularnewline
-{\small recur-see-last} & {\small\texttt{2}}\tabularnewline
-{\small recur-reuse} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}\end{wraptable}%
-If you wish to change the default values of the various settings for
-\verb`\nmcRecur` this can be done by entering new values in a configuration
-file \texttt{numerica.cfg} as described in the chapter on settings
-in the associated document \texttt{numerica-basics.pdf}. The relevant
-keys are listed in Table~\ref{tab:recurSettingsDefaults}, corresponding
-to the \verb`do`, \verb`see1`, \verb`see2` and \verb`reuse` settings
-of the \verb`\recur` command. 
-
-\subsection{Orthogonal polynomials}
-
-I've used Legendre polynomials in examples above, but orthogonal polynomials
-generally lend themselves to the \verb`\recur` treatment. Quoting
-from \emph{HMF} 22.7, orthogonal polynomials $f_{n}$ satisfy recurrence
-relations of the form
-\[
-a_{1n}f_{n+1}(x)=(a_{2n}+a_{3n}x)f_{n}(x)-a_{4n}f_{n-1}(x),
-\]
-or in the standard form required by \verb`\recur`,
-\[
-f_{n+1}(x)=\frac{a_{2n}+a_{3n}x}{a_{1n}}f_{n}(x)-\frac{a_{4n}}{a_{1n}}f_{n-1}(x).
-\]
-\emph{HMF} 22.7 provides a listing of the coefficients $a_{in}$ for
-the polynomials of Jacobi, Chebyshev, Legendre, Laguerre, Hermite
-and others, and tables for these polynomials.
-
-For example, Laguerre polynomials satisfy the recurrence 
-\[
-L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-\frac{n}{n+1}L_{n-1}(x).
-\]
-with initial values $L_{0}(x)=1$ and $L_{1}(x)=1-x$. So let's calculate
-the first $13$ Laguerre polynomials for, say, $x=0.5$: 
-\begin{verbatim}
-    \recur[do=13,see1=4,see2=2,vvd={,}\\(vv)\\,*]{\[
-      L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-
-        \frac{n}{n+1}L_{n-1}(x) 
-           \]}[L_{1}(x)=1-x,L_{0}(x)=1,x=0.5]
-\end{verbatim}
-$\Longrightarrow$     \recur[do=13,see1=4,see2=2,vvd={,}\\(vv)\\,*]{\[
-      L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-
-        \frac{n}{n+1}L_{n-1}(x) 
-           \]}[L_{1}(x)=1-x,L_{0}(x)=1,x=0.5]
-
-\noindent and for $x=5$: 
-\begin{verbatim}
-    \recur[p=.,do=13,see1=4,see2=2,vvd={,}\\(vv)\\,*]{\[
-      L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-
-        \frac{n}{n+1}L_{n-1}(x) 
-           \]}[L_{1}(x)=1-x,L_{0}(x)=1,x=5]
-\end{verbatim}
-$\Longrightarrow$    \recur[p=.,do=13,see1=4,see2=2,vvd={,}\\(vv)\\,*]{\[
-      L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-
-        \frac{n}{n+1}L_{n-1}(x) 
-           \]}[L_{1}(x)=1-x,L_{0}(x)=1,x=5]
-
-\noindent The results (reassuringly) coincide with those provided
-in \emph{HMF }Table 22.11.
-
-\subsection{Nesting}
-
-It is possible to use the \verb`\recur*` command (but only the starred
-form) in the \verb`\eval`, \verb`\iter`, and \verb`\solve` commands,
-and indeed in \verb`\recur` itself, but with this caveat: if \verb`\recur*`
-is nested within another command, the initial terms of the recurrence
-\textendash{} e.g., $f_{1}=1,f_{0}=1$, for the Fibonacci series,
-or $L_{1}(x)=1-x,L_{0}(x)=1$ for the Laguerre polynomials \textendash{}
-\emph{must be located in the vv-list of that inner }\verb`\recur*`\emph{
-command}. Other shared variables can often be shifted to the vv-list
-of the outer command, but not these initial terms.
-
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-The terms of a recurrence relation are multi-token variables but \texttt{numerica}
-requires single tokens for its calculations. The problem for \verb`\recur`
-is that the terms in the recurrence relation in the main (mandatory)
-argument differ from the terms in the vv-list: for instance $f_{n}$
-in the main argument, $f_{0}$ in the vv-list. If left like that,
-when \texttt{numerica} does its conversion from multi-token to single
-token variables, $f_{n}$ would not be found since it differs from
-$f_{0}$. Hence a crucial first step for \verb`\recur` is to reconcile
-the different forms, which it does by converting the forms in the
-vv-list to the forms in the recurrence in the main argument. To be
-available for this form change, they must reside in the \emph{inner}
-vv-list. In the outer vv-list they would be inaccessible to the inner
-command.
-
-{*}{*}{*}
-
-This suggests an alternative way of proceeding: write the inital values
-of the recurrence terms in the \emph{same} form in which they occur
-in the recurrence relation, together with an initial value for the
-recurrence variable: $f_{n+1}=1,f_{n}=1,n=0$, say. This is not how
-mathematicians write the initial values in recurrence relations, which
-is why I did not pursue it, but it neatly sidesteps what is otherwise
-an initial awkwardness. \end{shaded}%
-\end{minipage}
-
-In the following example I multiply together (rather futilely) the
-third and fourth members of the sequence of Laguerre polynomials for
-$x=5$ (the answer expected is \verb`$ \eval{3.5\times2.666667} $`
-$\Longrightarrow$ $ \eval{3.5\times2.666667} $). Note that although
-it is tempting to shift the shared vv-lists of the inner \verb`\recur*`
-commands to the vv-list of the outer \verb`\eval` command, in fact
-only the \verb`x=5` entry has been transferred:
-\begin{verbatim}
-    \eval[p=.]{$
-      \recur*[do=3]
-        { L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-
-            \frac{n}{n+1}L_{n-1}(x)}
-          [L_{1}(x)=1-x,L_{0}(x)=1]
-      \times 
-      \recur*[do=4]
-        { L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-
-            \frac{n}{n+1}L_{n-1}(x)}
-          [L_{1}(x)=1-x,L_{0}(x)=1]
-    $}[x=5]
-\end{verbatim}
-$\Longrightarrow$     \eval[p=.]{$
-      \recur*[do=3]
-        { L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-
-            \frac{n}{n+1}L_{n-1}(x)}
-              [L_{1}(x)=1-x,L_{0}(x)=1,x=5]
-      \times 
-      \recur*[do=4]
-        { L_{n+1}(x)=\frac{2n+1-x}{n+1}L_{n}(x)-
-            \frac{n}{n+1}L_{n-1}(x)}
-              [L_{1}(x)=1-x,L_{0}(x)=1,x=5]
-    $}
-
-\chapter{Reference summary}
-
-\section{Commands defined in \texttt{numerica-plus}}
-\begin{enumerate}
-\item \texttt{\textbackslash nmcIterate, \textbackslash iter}
-\item \texttt{\textbackslash nmcSolve, \textbackslash solve}
-\item \textbackslash\texttt{nmcRecur, \textbackslash recur}
-\end{enumerate}
-
-\section{Settings for the three commands}
-
-\subsection{Settings for \texttt{\textbackslash nmcIterate}}
-
-Settings option of \verb`\nmcIterate`:
-
-\begin{center}
-\begin{tabular}{llll}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{var}} & {\small token(s)} & {\small iteration variable} & \tabularnewline
-{\small\texttt{+}} & {\small int} & {\small fixed point extra rounding} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{max}} & {\small int > 0} & {\small max. iteration count (fixed points)} & {\small\texttt{100}}\tabularnewline
-{\small\texttt{do}} & {\small int > 0} & {\small number of iterations to perform} & {\small\texttt{5}}\tabularnewline
-{\small\texttt{see}} & {\small int > 0} & {\small number of final iterations to view} & {\small\texttt{4}}\tabularnewline
-{\small\texttt{reuse}} & {\small int ($\mathtt{0}/\mathtt{1}/\mathtt{2}$)} & {\small form of result saved with }{\small{\small\verb`\reuse`}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-
-Configuration settings for \verb`\nmcIterate`:
-
-\begin{center}
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small default}\tabularnewline
-\midrule
-{\small iter-extra-rounding} & {\small\texttt{0}}\tabularnewline
-{\small iter-max-iterations} & {\small\texttt{100}}\tabularnewline
-{\small iter-do} & {\small\texttt{5}}\tabularnewline
-{\small iter-see-last} & {\small\texttt{4}}\tabularnewline
-{\small iter-reuse} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-
-\subsection{Settings for \texttt{\textbackslash nmcSolve}}
-
-Settings option of \verb`\nmcSolve`:
-
-\begin{center}
-\begin{tabular}{llll}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{var}} & {\small token(s)} & {\small equation variable} & \tabularnewline
-{\small\texttt{dvar}} & {\small real $\ne0$} & {\small initial step size} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{+}} & {\small int} & {\small extra rounding} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{max}} & {\small int > 0} & {\small max. number of steps before cut off} & {\small\texttt{100}}\tabularnewline
-{\small\texttt{reuse}} & {\small int ($\mathtt{0}/\mathtt{1}$)} & {\small form of result saved with }{\small{\small\verb`\reuse`}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-
-Configuration settings for \verb`\nmcSolve`:
-
-\begin{center}
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small default}\tabularnewline
-\midrule
-{\small solve-first-step} & 1\tabularnewline
-{\small solve-extra-rounding} & {\small\texttt{0}}\tabularnewline
-{\small solve-max-steps} & {\small\texttt{100}}\tabularnewline
-{\small solve-reuse} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-
-\subsection{Settings for \texttt{\textbackslash nmcRecur}}
-
-Settings option of \verb`\nmcRecur`:
-
-\begin{center}
-\begin{tabular}{llll}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{do}} & {\small int$\ge0$} & {\small number of terms to calculate} & {\small\texttt{7}}\tabularnewline
-{\small\texttt{see1}} & {\small int$\ge0$} & {\small number of initial terms to display} & {\small\texttt{3}}\tabularnewline
-{\small\texttt{see2}} & {\small int$\ge0$} & {\small number of final terms to display} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{...}} & {\small chars} & {\small follow display of values with an ellipsis} & \tabularnewline
-{\small\texttt{reuse}} & {\small int ($\mathtt{0}/\mathtt{1}/\mathtt{2}$)} & {\small form of result saved with }{\small{\small\verb`\reuse`}} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-
-Configuration settings for \verb`\nmcRecur`:
-
-\begin{center}
-\begin{tabular}{ll}
-\toprule 
-{\small key} & {\small default}\tabularnewline
-\midrule
-{\small recur-do} & {\small\texttt{7}}\tabularnewline
-{\small recur-see-first} & {\small\texttt{3}}\tabularnewline
-{\small recur-see-last} & {\small\texttt{2}}\tabularnewline
-{\small recur-reuse} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{document}

Deleted: trunk/Master/texmf-dist/doc/latex/numerica/numerica-tables.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/numerica/numerica-tables.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/numerica/numerica-tables.tex	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/doc/latex/numerica/numerica-tables.tex	2021-12-12 22:29:10 UTC (rev 61283)
@@ -1,1801 +0,0 @@
-%% LyX 2.4.0-alpha1 created this file.  For more info, see https://www.lyx.org/.
-%% Do not edit unless you really know what you are doing.
-\documentclass[english,tableposition=top]{report}
-\usepackage{lmodern}
-\renewcommand{\sfdefault}{lmss}
-\renewcommand{\ttdefault}{lmtt}
-\usepackage[T1]{fontenc}
-\usepackage{textcomp}
-\usepackage[latin9]{inputenc}
-\setcounter{secnumdepth}{3}
-\usepackage{color}
-\definecolor{shadecolor}{rgb}{0.667969, 1, 1}
-\usepackage{babel}
-\usepackage{array}
-\usepackage{float}
-\usepackage{booktabs}
-\usepackage{framed}
-\usepackage{url}
-\usepackage{multirow}
-\usepackage{amsmath}
-\usepackage[unicode=true,pdfusetitle,
- bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,
- breaklinks=false,pdfborder={0 0 1},backref=section,colorlinks=true]
- {hyperref}
-
-\makeatletter
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
-%% Because html converters don't know tabularnewline
-\providecommand{\tabularnewline}{\\}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
-\newenvironment{centred}%
-  {\begin{center}\baselineskip=13pt\parskip=1pt}{\end{center}}
-\newenvironment{lyxcode}
-	{\par\begin{list}{}{
-		\setlength{\rightmargin}{\leftmargin}
-		\setlength{\listparindent}{0pt}% needed for AMS classes
-		\raggedright
-		\setlength{\itemsep}{0pt}
-		\setlength{\parsep}{0pt}
-		\normalfont\ttfamily}%
-	 \item[]}
-	{\end{list}}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
-\usepackage[tables]{numerica}
-
-\newcommand\rel{\,\varrho\;}
-\DeclareMathOperator{\erf}{erf}
-\DeclareMathOperator{\gd}{gd}
-
-\reuse
-
-\usepackage{upquote}
-
-\makeatother
-
-\begin{document}
-\title{\texttt{numerica-tables}~\\
-}
-\author{Andrew Parsloe\\
-(\url{ajparsloe at gmail.com})}
-\maketitle
-\begin{abstract}
-In this module of the \verb`numerica` package a command is defined
-which enables the creation of multi-column tables of function values
-in a wide variety of table styles. \\
-\\
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-
-\paragraph*{Note:}
-\begin{itemize}
-\item {\normalsize This document applies to version 1.0.0 of }{\normalsize\texttt{numerica-tables.def}}{\normalsize .}{\small\par}
-\item {\normalsize Reasonably recent versions of the \LaTeX 3 bundles }{\normalsize\texttt{l3kernel}}{\normalsize{}
-and }{\normalsize\texttt{l3packages}}{\normalsize{} are required.}{\small\par}
-\item {\normalsize The }{\normalsize\texttt{booktabs}}{\normalsize{} package
-is required.}{\small\par}
-\item {\normalsize I refer many times in this document to }{\normalsize\emph{Handbook
-of Mathematical Functions}}{\normalsize , edited by Milton Abramowitz
-and Irene A. Segun, Dover, 1965. This is abbreviated to }{\normalsize\emph{HMF}}{\normalsize ,
-often followed by a reference to a specific table like Table 1.2.}{\small\par}
-\end{itemize}
-\end{shaded}%
-\end{minipage}
-
-\tableofcontents{}
-\end{abstract}
-
-\chapter{Introduction}
-
-Calling \texttt{numerica} with the \texttt{tables} package option
-in the preamble,
-\begin{lyxcode}
-~\textbackslash usepackage{[}tables{]}\{numerica\}
-\end{lyxcode}
-\noindent gives access to a command \verb`\nmcTabulate` for creating
-tables of function values. This command is defined in the package
-\texttt{numerica-tables.def} which is loaded with \texttt{numerica.sty}
-when the \texttt{tables} option is used. Note that \verb`\nmcTabulate`
-uses the \texttt{booktabs} package for the construction of its tables.
-The \texttt{booktabs} package is loaded automatically (provided it
-is available in your \TeX{} system) when \texttt{numerica} is loaded
-with the \texttt{tables} option.
-
-\section{Shared syntax}
-
-The \verb`\nmcTabulate` command (short-name form \verb`\tabulate`)
-shares the syntax of \verb`\nmcEvaluate` (see \texttt{numerica-basics.pdf})
-and of \verb`\nmcIterate`, \verb`\nmcSolve` and \verb`\nmcRecur`
-(see \texttt{numerica-plus.pdf}). When all options are used the command
-looks like 
-\begin{lyxcode}
-\noindent \textbackslash nmcTabulate{*}{[}settings{]}\{expr.\}{[}vv-list{]}{[}num.~format{]}
-\end{lyxcode}
-\begin{enumerate}
-\item \verb`*` optional switch; if present ensures a single number output
-with no formatting or an appropriate error message if the single number
-cannot be produced;
-\item \verb`[settings]` comma-separated list of \emph{key=value }settings; 
-\item \verb`{expr.}` mandatory argument specifying the mathematical expression
-in \LaTeX{} form to be tabulated;
-\item \verb`[vv-list]` comma-separated list of \emph{variable=value }items; 
-\item \verb`[num. format]` optional format specification for presentation
-of the numerical result (rounding, padding with zeros, scientific
-notation)
-\end{enumerate}
-Unlike \verb`\nmcEvaluate` and the other commands, for \verb`\nmcTabulate` 
-\begin{itemize}
-\item it makes no difference to the display of the result whether the command
-wraps around math delimiters, is wrapped within math delimters, or
-if there are no math delimiters involved whatever;
-\item the two apparently optional arguments straddling the main argument
-(\verb`settings` and \verb`vv-list`) are \emph{essential}; although
-neither is mandatory in the \LaTeX{} sense, each contains items necessary
-for the construction of any table of function values.
-\end{itemize}
-
-\subsection{Inherited settings}
-
-\label{subsec:Inherited-settings}
-\begin{table}
-\noindent \centering{}\caption{\protect\label{tab:introSettingsInherited}Settings options inherited
-from \texttt{\textbackslash nmcEvaluate}}
-\noindent \begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}>{\raggedright}p{4cm}}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{dbg}} & {\small int} & {\small debug `magic' integer} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{\textasciicircum}} & {\small char} & {\small exponent mark for sci. notation input} & {\small\texttt{e}}\tabularnewline
-{\small\texttt{xx}} & {\small int (}{\small\texttt{0}}{\small /}{\small\texttt{1}}{\small )} & {\small multi-token variable switch} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{()}} & {\small int (}{\small\texttt{0}}{\small /}{\small\texttt{1}}{\small /}{\small\texttt{2}}{\small )} & {\small trig. function arg. parsing} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{o}} &  & {\small degree switch for trig. functions} & \tabularnewline
-{\small\texttt{log}} & {\small num} & {\small base of logarithms for }{\small{\small\verb`\log`}} & {\small\texttt{10}}\tabularnewline
-{\small\texttt{vvmode}} & {\small int (0/1)} & {\small vv-list calculation mode} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{vvd}} & {\small tokens} & {\small vv-list display-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 12mu plus 6mu minus 9mu(vv)}}\tabularnewline
-{\small\texttt{vvi}} & {\small tokens} & {\small vv-list text-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
-{*} &  & {\small suppress equation numbering if }{\small\texttt{\textbackslash\textbackslash}}{\small{}
-in }{\small\texttt{vvd}} & \tabularnewline
-{\small\texttt{S+}} & {\small int} & {\small extra rounding for stopping criterion for sums} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{S?}} & {\small$\text{int}\ge0$} & {\small stopping criterion query terms for sums} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{P+}} & {\small int} & {\small extra rounding for stopping criterion for products} & {\small\texttt{2}}\tabularnewline
-{\small\texttt{P?}} & {\small$\text{int}\ge0$} & {\small stopping criterion query terms for products} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-To create a table we need to specify a function to tabulate \textendash{}
-this fills the main (mandatory) argument. We also need to decide how
-the function values are to be displayed \textendash{} to how many
-decimal places and whether padded with zeros. These matters are determined
-by what is entered in the trailing optional argument, just as with
-\verb`\eval`, \verb`\iter`, \verb`\solve` and \verb`\recur`, although
-there are some addtional complications peculiar to tables which are
-more appropriately treated in the next chapter.
-
-Many of the settings available to the \verb`\eval` command are also
-available to \verb`\nmcTabulate`. To save switching between documents
-I reproduce the table of options found in \texttt{numerica-basics.pdf}
-(with only the punctuation \texttt{p} setting missing), although for
-discussion of the options you will need to refer to that document.
-But note that the \texttt{dbg} key is of limited usefulness for tables:
-\texttt{dbg=5} and \texttt{dbg=7} display floating point values in
-their `internal' format, and for \texttt{dbg=7}, no result is displayed. 
-
-\chapter{\texttt{\textbackslash nmcTabulate}-specific settings}
-
-In addition to the shared settings, \verb`\nmcTabulate` has many
-settings specific to it. They are discussed in groups in subsequent
-sections, some in more than one place.
-
-\section{Row variable settings}
-
-\label{sec:Row-variable-settings}Deciding on a function to tabulate
-(entered in the main or mandatory argument of \verb`\nmcTablate`)
-will inevitably also mean deciding on the tabulation variable (the
-\emph{row} variable \verb`rvar`), and then what value to start tabulating
-from (specified in the vv-list), what value to tabulate to (\verb`rstop`),
-and how fine-grained the tabulation is to be, the step size (\verb`rstep`). 
-
-\begin{table}[b]
-\centering{}\caption{Row variable specification}
-\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}>{\raggedright}p{3cm}}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small comment}\tabularnewline
-\midrule
-{\small\texttt{rvar}} & {\small token(s)} & {\small row variable} & \tabularnewline
-{\small\texttt{rstep}} & {\small real num.} & {\small step size} & \tabularnewline
-{\small\texttt{rstop}} & {\small real num.} & {\small stop value} & \multirow{2}{3cm}{either {\small\texttt{rstop}}{\small{} or }{\small\texttt{rows}}}\tabularnewline
-{\small\texttt{rows}} & {\small int} & {\small number of rows} & \tabularnewline
-{\small\texttt{rspec}} & {\small comma list} & {\small\texttt{\{start}}{\small , }{\small\texttt{step}}{\small , }{\small\texttt{stop\}}}{\small{}
-or }{\small\texttt{\{start}}{\small , }{\small\texttt{step}}{\small ,
-}{\small\texttt{(rows)\}}} & {\small short form spec.}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-The two tables in the first example below tabulate $\sin x$ and $\cos x$
-between $0$ and $1$ in increments of $0.2$. Note the start value
-of the tabulation variable in the vv-list. The reason for this placement
-is that for more complicated functions other parameters in the function
-and therefore in the vv-list may depend on the row variable. Therefore
-it is always placed in the vv-list.
-
-The difference in appearance of the tables results from padding with
-zeros in the second (the asterisk in the trailing optional argument).
-As you can see, padding applies not only to the values of the function
-but also to the values of the row variable \textendash{} and makes
-an obvious improvement to the table's appearance.
-\begin{verbatim}
-    \tabulate[rvar=x,rstep=0.2,rstop=1]
-      { \sin x  }[x=0]\qquad
-    \tabulate[rvar=x,rstep=0.2,rstop=1]
-      { \cos x }[x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rvar=x,rstep=0.2,rstop=1]
-      { \sin x }[x=0] \qquad
-    \tabulate[rvar=x,rstep=0.2,rstop=1]
-      { \cos x }[x=0][*]\medskip{}
-
-Sometimes (perhaps often) it may prove more convenient to specify
-the number of rows (\texttt{rows}) rather than a stop value. Only
-one of \texttt{rows} and \texttt{rstop} should be given, but if both
-(inadvertently) are present, it is the value of \texttt{rows} that
-prevails.
-
-The second and third tables in the next example use an abbreviated
-form of the row variable specification (\texttt{rspec}). This is a
-$3$-element comma list of the form \verb`{rvar,rstep,rstop}` or
-\verb`{rvar,rstep,(rows)}`. Parentheses around the third item signify
-that it is \verb`rows` rather than \verb`rstop` that is being specified.
-In the example below, the second table specifies \texttt{rstop} (value
-\texttt{1}), the third \texttt{rows} (value \texttt{6}). 
-
-It is worth noting that \verb`rstep` and \verb`rstop` can be \LaTeX{}
-expressions \textendash{} for instance \texttt{rstop=\textbackslash sin
-\textbackslash pi/2} (just as the expression for the initial value
-in the vv-list can be). However \verb`rows` can only be a simple
-integer expression \textendash{} an integer or integers linked by
-some or all of \verb`+ - * / ( )`. 
-\begin{verbatim}
-    \tabulate[rvar=x,rstep=0.2,rows=6]
-      { \sin x/\cos x }[x=0][*] \qquad
-    \tabulate[rspec={x,0.2,1}]
-      { \tan x }[x=0][*] \qquad
-    \tabulate[rspec={x,0.2,(6)}]
-      { \sqrt{\sec^2 x - 1} }[x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rvar=x,rstep=0.2,rows=6]
-      { \sin x/\cos x }[x=0][*] \qquad
-    \tabulate[rspec={x,0.2,1}]
-      { \tan x }[x=0][*] \qquad
-    \tabulate[rspec={x,0.2,(6)}]
-      { \sqrt{\sec^2 x - 1} }[x=0][*]
-
-\subsection{Row-variable column formatting}
-
-\label{subsec:Row-var-col-formatting}Various settings are available
-to format the row variable column in addition to the padding option
-({*}) of the trailing optional argument.
-\begin{table}[H]
-\centering{}\caption{Row-variable column formatting}
-\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{rround}} & {\small int} & {\small rounding} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{ralign}} & {\small char (}{\small\texttt{r/c/l}}{\small )} & {\small horizontal alignment} & {\small\texttt{r}}\tabularnewline
-{\small\texttt{rfont}} & {\small chars} & {\small font (}{\small\verb`\math<chars>`}{\small )} & \tabularnewline
-{\small\texttt{rhead}} & {\small tokens} & {\small header} & {\small\texttt{rvar}}\tabularnewline
-{\small\texttt{rhnudge}} & int & {\small nudge header }{\small{\small\verb`<int>`}}{\small{} mu} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{rpos}} & {\small int (}{\small\texttt{0}}{\small\ldots}{\small\texttt{4}}{\small )} & {\small column position(s) } & {\small\texttt{1}}\tabularnewline
-{\small\texttt{rvar'}} & {\small tokens} & {\small 2nd row variable col. spec. } & {\small\texttt{rvar}}\tabularnewline
-{\small\texttt{rhead'}} & {\small tokens} & {\small header of 2nd rv col. (if it exists)} & {\small\texttt{rvar'}}\tabularnewline
-{\small\texttt{rhnudge'}} & int & {\small nudge 2nd rv col. header }{\small{\small\verb`<int>`}}{\small{}
-mu} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-
-
-\subsubsection{Rounding: \texttt{rround}}
-
-After studying the previous tables, we might decide to adjust the
-step size, say from $0.2$ to $0.25$. But changing \texttt{rstep}
-to the new value gives a disconcerting and \emph{prima facie} false
-result (the first table below). \texttt{numerica} uses a default rounding
-value of $1$ for the row variable and has rounded $0.25$ down to
-$0.2$ and $0.75$ up to $0.8$ accordingly. The second table corrects
-matters by adjusting the row variable rounding (\texttt{rround}) to
-\texttt{2}.
-\begin{verbatim}
-    \tabulate[rvar=x,rstep=0.25,rstop=1]
-      { \sin x  }[x=0][*]\qquad
-    \tabulate[rvar=x,rstep=0.25,rstop=1,rround=2]
-      { \sin x }[x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rvar=x,rstep=0.25,rstop=1]
-      { \sin x }[x=0][*] \qquad
-    \tabulate[rvar=x,rstep=0.25,rstop=1,rround=2]
-      { \sin x }[x=0][*]
-
-\subsubsection{Alignment: \texttt{ralign}}
-
-By default, the alignment of all columns is to the right, as in the
-previous examples. This lends itself to neat output when padding with
-zeros is activated (the \verb`*` in the trailing argument) and when
-some values are negative \textendash{} the minus signs can interfere
-with neat output in left or centred alignments. But in a case like
-the second table in the last example, you might prefer to centre the
-headers for both the row and function value columns. These alignments
-are independently set. For the row variable column the default alignment
-is to the right \texttt{ralign=r}; \texttt{ralign=l} (lowercase L)
-aligns entries in the row variable column to the left, and \texttt{ralign=c}
-centres entries in the row variable column. The tables of the next
-example use a \texttt{c} alignment to centre the row variable column
-header. The third of those tables shows how minus signs spoil the
-effect.
-
-\subsubsection{Font: \texttt{rfont}}
-
-In the second table bolding (\texttt{rfont=bf}) has been applied to
-emphasize the distinction between the row variable values and the
-function values. Possible values for this key are those characters
-that can be adjoined to \verb`\math` to give a meaningful result.
-Thus other valid values are \verb`it` (italic), \verb`sf` (sans
-serif), \verb`tt` (typewriter); \verb`frak` (Fraktur); also \verb`rm`
-(roman) is available, but that is the default.
-
-\subsubsection{Header: \texttt{rhead}}
-
-In the second and third tables, the header for the row variable column
-has also been bolded. The default header is the row variable. That
-can be replaced by giving a value to the key \texttt{rhead}. I have
-used \texttt{rhead=\textbackslash boldsymbol\{x\}} (rather than \verb`\mathbf{x}`)
-in order to get an italicized bold symbol.
-\begin{verbatim}
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=1,
-        rround=2,ralign=c]
-      { \sin x  }[x=0][*]\qquad
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=1,rround=2,
-        ralign=c,rfont=bf,rhead=\boldsymbol{x}]
-      { \sin x }[x=0][*]
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=0.5,rround=2,
-        ralign=c,rfont=bf,rhead=\boldsymbol{x}]
-      { \sin x }[x=-0.5][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rvar=x,rstep=0.25,rstop=1,
-        rround=2,ralign=c]
-      { \sin x }[x=0][*]\qquad
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=1,
-        rround=2,ralign=c,rfont=bf,rhead=\boldsymbol{x}]
-      { \sin x }[x=0][*]\qquad
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=0.5,rround=2,
-        ralign=c,rfont=bf,rhead=\boldsymbol{x}]
-      { \sin x }[x=-0.5][*]\medskip{}
-
-In these tables the row variable column has been given a centred alignment.
-The third table shows what goes wrong when \emph{some} values are
-negative. Better then is to use padding, a right alignment (the default),
-and to use a phantom in the header. The first table below does this.
-The second table incorporates kerning into the header to achieve the
-same effect:
-\begin{verbatim}
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=0.5,rround=2,
-        rfont=bf,rhead=\boldsymbol{x}\hphantom{0}]
-      { \sin x }[x=-0.5][*]\qquad
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=0.5,rround=2,
-        rfont=bf,rhead=\boldsymbol{x}\mkern 9 mu]
-      { \sin x }[x=-0.5][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rvar=x,rstep=0.25,rstop=0.5,rround=2,
-        rfont=bf,rhead=\boldsymbol{x}\hphantom{0}]
-      { \sin x }[x=-0.5][*]\qquad
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=0.5,rround=2,
-        rfont=bf,rhead=\boldsymbol{x}\mkern 9 mu]
-      { \sin x }[x=-0.5][*]\medskip{}
-
-(To my eye, aligning the $\boldsymbol{x}$ above the first column
-of digits after the decimal point gives a better result than truly
-centring it in the column; compare these examples with the first two
-tables of the previous example.)
-
-\subsubsection{Nudging~the~header: \texttt{rhnudge}}
-
-However, you might prefer to avoid inserting positioning commands
-into the actual row variable header, obscuring its true content. You
-can avoid doing this by using \texttt{numerica}'s nudge setting \texttt{rhnudge}. 
-
-The first table below reverts to the default right alignment, avoids
-any positioning commands in the row variable header, but instead nudges
-it into position with the setting \texttt{rhnudge=9}. For positive
-nudge values, nudging works in the opposite sense to the alignment.
-The units for nudging are mu (math units, 18 to a quad), but only
-a number \textendash{} generally an integer \textendash{} should be
-specified; the mu is supplied by \texttt{numerica}.
-
-In the second table below the row variable takes single digit integer
-values, while the row variable name now occupies more than one character.
-With a right alignment the header would protrude out to the left.
-Giving \texttt{rhnudge} a \emph{negative} value (\texttt{rhnudge=-12}
-in the example) brings it back to a centred position in the row variable
-column. 
-\begin{verbatim}
-    \tabulate
-      [rvar=x,rstep=0.25,rstop=0.5,rround=2,
-        rfont=bf,rhead=\boldsymbol{x},rhnudge=9]
-      { \sin x }[x=-0.5][4*]\qquad
-    \tabulate
-      [rvar=x_{\text{int}},rstep=1,rstop=4,
-        rround=0,rfont=bf,rhnudge=-12,
-        rhead=\boldsymbol{x_{\text{int}}}]
-      { \sin x_{\text{int}} }[x_{\text{int}}=0][4*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rvar=x,rstep=0.25,rstop=0.5,rround=2,
-        rfont=bf,rhead=\boldsymbol{x},rhnudge=9]
-      { \sin x }[x=-0.5][4*]\qquad
-    \tabulate
-      [rvar=x_{\text{int}},rstep=1,rstop=4,
-        rround=0,rfont=bf,rhnudge=-12,
-        rhead=\boldsymbol{x_{\text{int}}}]
-      { \sin x_{\text{int}} }[x_{\text{int}}=0][4*]
-
-\subsubsection{Position in the table: \texttt{rpos}}
-
-\label{subsec:Row-var-col-pos}By default, the row variable column
-is the \emph{first} column of the table. Its position is determined
-by the value of the key \texttt{rpos}: 
-\begin{itemize}
-\item \texttt{rpos=0}, suppressed (no row variable column); 
-\item \texttt{rpos=1}, first column (the default); 
-\item \texttt{rpos=2}, last column; 
-\item \texttt{rpos=3}, first and last columns;\texttt{ }
-\item \texttt{rpos=4}, first and last columns, with the values in the last
-column a user-defined function of the first; see \xA7\ref{subsec:Second-row-var-col};
-\item Any other integer acts like \texttt{rpos=1}.
-\end{itemize}
-An example with \texttt{rpos=3} is given shortly below, \xA7\ref{subsec:Multiple-function-tables}. 
-
-\subsubsection{\texttt{rvar'}, \texttt{rhead'}, \texttt{rhnudge'}}
-
-These settings become relevant only when \texttt{rpos=4}; see \xA7\ref{subsec:Second-row-var-col}.
-
-\subsection{Multiple function tables}
-
-How might one tabulate multiple functions simultaneously? \emph{HMF}
-has many, many examples where multiple functions (like the trigonometric
-or the hyperbolic functions) are tabulated in separate columns of
-the same table. 
-
-\subsubsection{By adjoining tables}
-
-\label{subsec:Adjoining-tables} With the settings described so far,
-one way is to adjoin single column tables. In the tables below, which
-display as a single multi-columned table, I have used three different
-\texttt{rpos} settings (\texttt{rpos=1} is implicit in the first).
-This is one way to build a table that displays as multi-column. If
-you use this method, note that the \texttt{\%} comment characters
-are essential at the end of the last argument of the \verb`\tabulate`
-commands if you want the tables to abut exactly. Omitting them results
-in a space between the tables.
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rhnudge=9]
-      { \sin x }[x=0][*]%
-    \tabulate
-      [rpos=0,rspec={x,0.2,(6)},rround=2]
-      { \cos x }[x=0][*]%
-    \tabulate
-      [rpos=2,rspec={x,0.2,(6)},rhnudge=9]
-      { \tan x }[x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.2,(6)},rhnudge=9]
-      { \sin x }[x=0][*]%
-    \tabulate
-      [rpos=0,rspec={x,0.2,(6)},rround=2]
-      { \cos x }[x=0][*]%
-    \tabulate
-      [rpos=2,rspec={x,0.2,(6)},rhnudge=9]
-      { \tan x }[x=0][*]
-
-\subsubsection{Multiple functions in a single table}
-
-\label{subsec:Multiple-function-tables}However, tabulating more than
-one function at a time is too common a need to have to resort to adjoining
-tables. Instead, it suffices to enter the functions in the main argument
-separated by commas. The critical thing to do is to \emph{precede
-the first function with a comma}. That initial comma is the signal
-\texttt{numerica} needs to make the internal adjustments for a multi-function
-table (and note the \verb`o` setting, to indicate the arguments of
-$\sin$ and $\cos$ are in degrees):
-\begin{verbatim}
-    \tabulate[o,rpos=3.rvar=\theta,rstep=10,rstop=90,
-        rround=0,rules=ThB]
-  	{ ,\sin \theta,\cos \theta }[\theta=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[o,rpos=3,rvar=\theta,rstep=10,rstop=90,
-        rround=0,rules=ThB]
-  	{ ,\sin \theta,\cos \theta }[\theta=0][*]\medskip{}
-
-This table also suggests a space saving possibility: since $\sin$
-and $\cos$ are complementary functions ($\cos\theta=\sin(90-\theta)$),
-the values in the bottom half of the table duplicate values in the
-top half, only with the columns reversed. This is the reason for the
-space saving \texttt{rpos=4} setting (\xA7\ref{subsec:Second-row-var-col})
-which enables complementary functions to be tabulated in `half tables';
-see \emph{HMF} Tables 4.10\textendash 4.12 for the trigonometric functions.
-
-\section{Column variable settings}
-
-\label{sec:Column-variable-settings}When a function of \emph{two}
-variables is being tabulated, we generally think of one variable as
-the primary variable and the other as a parameter. To tabulate such
-a function, one way to proceed, would be to create and adjoin separate
-tables, one per parameter value. But this is clumsy. A more systematic
-procedure is to specify, in addition to the row variable, a \emph{column}
-variable and its start, step and stop values. 
-
-\begin{table}[b]
-\caption{Column variable specification}
-
-\centering{}\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{cvar}} & {\small token(s)} & {\small column variable} & \tabularnewline
-{\small\texttt{cstep}} & {\small real num.} & {\small step size} & \tabularnewline
-{\small\texttt{cstop}} & {\small real num.} & {\small stop value} & {\small either }{\small\texttt{cstop}}\tabularnewline
-{\small\texttt{cols}} & {\small int} & {\small number of columns} & {\small or }{\small\texttt{cols}}\tabularnewline
-{\small\texttt{cspec}} & {\small comma list} & {\small\texttt{\{cvar,cstep}}{\small , }{\small\texttt{cstop\}}}{\small{}
-or}{\small\texttt{ \{cvar,cstep}}{\small ,}{\small\texttt{(cols)\}}} & {\small short form spec.}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-In the following example \verb`cvar=k` is the column variable. I
-have chosen a step size (\texttt{cstep}) of \texttt{2} and a stop
-value (\texttt{cstop}) of \texttt{9}. As with the row variable, the
-start value (\texttt{k=3}) of the column variable is specified in
-the vv-list. Although in the example these values are numbers, all
-three values could be \LaTeX{} expressions that evaluate to numbers.
-Note also the setting for \texttt{rhead} which shows the reader of
-the table that the numerical values displayed in the column headers
-are values of \verb`k`. This usage occurs throughout \emph{HMF}.
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,
-         rhead=x\backslash k,
-         cvar=k,cstep=2,cstop=9]
-      { \sin kx }[k=3,x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhead=x\backslash k,
-         cvar=k,cstep=2,cstop=9]
-      { \sin kx }[k=3,x=0][*] \medskip{}
-
-Again, as with the row variable, rather than using an explicit stop
-value (\texttt{cstop}), you might prefer to specify the number of
-columns (\texttt{cols}) explicitly. I could have replaced \texttt{cstop=9}
-with \texttt{cols=4} to get the same result. Note that the number
-of columns specified here is the number of \emph{function value} columns;
-the row variable column is ignored for this count.
-
-And again, as with the row variable, it is possible to condense the
-specification into a comma list (\texttt{cspec}). This is a $3$-element
-comma list of the form \verb`{cvar,cstep,cstop}` or \verb`{cvar,cstep,(cols)}`
-where the parentheses distinguish \texttt{cols} from \texttt{cstop}
-in the third item. Thus, for the preceding table I could have written
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhead=x\backslash k,
-         cvar=k,cstep=2,cols=4]
-      { \sin kx }[k=3,x=0][*]
-\end{verbatim}
-or
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhead=x\backslash k,
-         cspec={k,2,(4)}]
-      { \sin kx }[k=3,x=0][*]
-\end{verbatim}
-or
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhead=x\backslash k,
-         cspec={k,2,9}]
-      { \sin kx }[k=3,x=0][*]
-\end{verbatim}
-and produced the same table. 
-
-Although \verb`cstep` and \verb`cstop` can be \LaTeX{} expressions
-\textendash{} for instance \texttt{cstop=\textbackslash pi/2} \textendash{}
-\verb`cols` can only be a simple integer expression \textendash{}
-an integer, or integers linked by some or all of \verb`+ - * / ( )`.
-
-\subsection{Column header formatting}
-
-\label{subsec:Column-header-formatting}
-\begin{table}
-\begin{centering}
-\caption{Column variable header formatting}
-\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{chstyle}} & {\small int (0/1/2/3)} & {\small header style} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{ctitle}} & {\small tokens} & {\small single col. alternative header} & \tabularnewline
-{\small\texttt{chead}} & {\small tokens} & {\small user-defined header} & \tabularnewline
-{\small\texttt{calign}} & {\small char (r/c/l)} & {\small column alignment} & {\small\texttt{r}}\tabularnewline
-{\small\texttt{chnudge}} & {\small int} & {\small nudge header }{\small{\small\verb`int`}}{\small{} mu} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{chround}} & {\small int} & {\small column header rounding} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\par\end{centering}
-\end{table}
-There are four built-in style settings for the header to the column
-variable (or function value) columns (the `ch' prefix evoking `column
-header'). If these don't meet your needs or otherwise satisfy, then
-it is possible to define your own header to the function value columns
-using the key \texttt{chead}. First I discuss the built-in styles.
-
-\subsubsection{Header style: single-column case}
-
-When there is only one column of function values, the function being
-tabulated is by default set as the header to the column. This corresponds
-to setting \texttt{ctitle={*}} (see \xA7\ref{subsec:Title:-ctitle-setting}
-below). You may want some other header. Then give \texttt{ctitle}
-some other value (although note that giving it the value \texttt{{*}{*}}
-will set both the function and the vv-list as the header; again see
-\xA7\ref{subsec:Title:-ctitle-setting}). Whatever value you set, it
-will be typeset between math delimiters (\verb`$` signs) and can
-be nudged (see \xA7\ref{subsec:Nudgingtheheaders:-chnudge}) left or
-right to fine-tune its position in the column. (If you want an asterisk
-as the header, you will need to place it between two pairs of braces,
-\texttt{ctitle=\{\{{*}\}\}} to prevent it being misinterpreted as
-the default setting.)
-
-If you want some more complicated header, perhaps not constrained
-by the \verb`$` delimiters, then give \texttt{chead} a value. This
-key I discuss below in \xA7\ref{subsec:chead}. \texttt{chead} is entirely
-up to the user to specify, including any math environment and positioning. 
-
-If both \texttt{ctitle} and \texttt{chead} are given, the \texttt{chead}
-value prevails.
-
-\subsubsection{Header~style: multi-column case}
-
-\texttt{chstyle=0} which is the default gives a header of the form
-displayed in the last example, with only the column-variable value
-at the head of each column. This style generally requires the row-variable
-header to indicate what the values denote, as in \texttt{rhead=x\textbackslash backslash
-k} where the backslash separates row from column variable. \emph{HMF}
-contains a multitude of instances; see Tables~9.7, 17.5, 21.1, 24.3,
-27.4, etc. for examples.
-
-\texttt{chstyle=1} changes the header of the \emph{first} function
-value column to the form \emph{variable=value} \textendash{} in the
-example below, to $k=3$. This may be an apt choice when the columns
-are narrow, perhaps from using a small rounding value. I can find
-only one real instance in \emph{HMF}, Table~26.7. Note that the row
-variable setting \texttt{rhead} no longer needs the `\texttt{\textbackslash backslash
-k}' part since the column variable is now explicitly indicated.
-
-\texttt{chstyle=2} changes the header of all function value columns
-to the form \emph{variable=value}.\emph{ }In \emph{HMF} examples are
-Tables~7.4, 7.9, 10.10, 16.6, etc. Note that the row variable setting
-\texttt{rhead} no longer needs the `\texttt{\textbackslash backslash
-k}' part since the column variable is now explicitly indicated (the
-right-hand table).
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,
-         cspec={k,2,(2)},chstyle=1]
-      { \sin kx }[k=3,x=0][3*]\quad
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,
-         cspec={k,2,(3)},chstyle=2]
-      { \sin kx }[k=3,x=0][3*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.2,(6)},rround=2,
-         cspec={k,2,(3)},chstyle=1]
-      { \sin kx }[k=3,x=0][3*]\quad
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,
-         cspec={k,2,(3)},chstyle=2]
-      { \sin kx }[k=3,x=0][3*]\medskip{}
-
-Finally, \texttt{chstyle=3} fills each column-variable header with
-the expression being tabulated but with the column variable replaced
-by its respective values. See \emph{HMF} Tables~5.4, 8.1, 9.1, 19.1,
-etc. for examples.
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,
-         cspec={k,2,(3)},chstyle=3]
-      { \sin kx }[k=3,x=0][4*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.2,(6)},rround=2,
-         cspec={k,2,(3)},chstyle=3]
-      { \sin kx }[k=3,x=0][4*]
-
-\subsubsection{User-defined header: \texttt{chead}}
-
-\label{subsec:chead}Perhaps none of the built-in styles appeal? By
-assigning content to the key \texttt{chead}, users can create their
-own header to the function value columns. \texttt{chead} must contain
-the correct number of tab characters (\verb`&`), allowing for any
-\verb`\multicolumn`-s used, but ignoring the row variable column
-or columns. It is a header only to the function value columns. The
-user will need to insert \verb`$` signs as appropriate. 
-
-Non-empty content for the \texttt{chead} key overrides any \texttt{chstyle}
-setting and in the case of a single function value column, overrides
-any \texttt{ctitle} setting.
-
-\subsubsection{Alignment: \texttt{calign}}
-
-The function value columns are aligned right (\texttt{calign=r}) by
-default. Also available are \texttt{calign=c} for centred alignment
-and \texttt{calign=l} (lowercase L) for left alignment. Using centred
-alignment with {\ttfamily\verb`chstyle=2`} in the now familiar
-example table gives
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,ralign=c,
-         cspec={k,2,(3)},chstyle=2,calign=c]
-      { \sin kx }[k=3,x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhead=x,ralign=c,
-         cspec={k,2,(3)},chstyle=2,calign=c]
-      { \sin kx }[k=3,x=0][*]\medskip{}
-
-\noindent The first column of function values looks better, but the
-minus signs spoil the effect in the others. Handling signs in tables
-is discussed below; see \xA7\ref{subsec:Signs}.
-
-\subsubsection{Nudging~the~headers: \texttt{chnudge}}
-
-\label{subsec:Nudgingtheheaders:-chnudge}In left or right alignment
-it is possible to nudge the headers in the opposite direction by giving
-a numerical value to the the key \texttt{chnudge}. The header is moved
-by the specified number of mu (math units; 18 to a quad). Note that
-the `mu' does not need to be written. \texttt{numerica} provides
-that. In the example I have chosen \texttt{chnudge=12} to nudge the
-column headers to the left to give a centred effect to the header
-but leaving the function values with their (potentially) awkward minus
-signs right aligned.
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhnudge=9,
-         cspec={k,2,(3)},chstyle=2,chnudge=12]
-      { \sin kx }[k=3,x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhnudge=9,
-         cspec={k,2,(3)},chstyle=2,chnudge=12]
-      { \sin kx }[k=3,x=0][*]\medskip{}
-
-The \texttt{chnudge} value does not need to be positive. Negative
-nudges can be useful when a column header is \emph{longer} than the
-rounded function values. In the second example below, I've reduced
-the rounding value for function values to $3$, and chosen an initial
-$k$ value of $100$ to ensure this circumstance. To centre the column
-headers I have used \texttt{chnudge=-9}.
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhnudge=9,
-         cspec={k,2,(3)},chstyle=2,chnudge=-9]
-      { \sin kx }[k=100,x=0][3*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhnudge=9,
-         cspec={k,2,(3)},chstyle=2,chnudge=-9]
-      { \sin kx }[k=100,x=0][3*]
-
-\subsubsection{Rounding: \texttt{chround}}
-
-In the examples so far, the column variable has incremented in integer
-steps. The default rounding value for the column variable is $0$
-(for the row variable it is $1$), so if it increments by some non-integer
-amount, the result will be confusing \textendash{} if $k$ incremented
-by, say, $0.25$, starting from $k=3$, then the next column would
-also have a header $k=3$ (since $3.25$ with a rounding value $0$
-rounds to $3$). The appropriate key to remedy this state of affairs
-is \texttt{chround}. For a step size of $0.25$ the appropriate setting
-is \texttt{chround=2}.
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,chround=2]
-      { \sin kx }[k=3,x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.2,(6)},rround=2,rhead=x,ralign=r,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,chround=2]
-      { \sin kx }[k=3,x=0][*]
-
-\section{Whole-of-table formatting}
-
-\label{sec:Whole-of-table-formatting}There are a number of settings
-pertaining to the appearance of the table as a whole, things like
-the position of the row variable column, division of the function
-values into blocks to aid readability, the presence of horizontal
-rules or of a collective column title or of a footer row. I discuss
-these here.
-
-\begin{table}[H]
-\noindent \centering{}\caption{\protect\label{tab:Table-formatting-settings}Table formatting}
-\noindent \begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{ctitle}} & {\small tokens} & {\small collective title for function-value columns} & \tabularnewline
-{\small\texttt{rules}} & {\small chars} & {\small horizontal rules template} & {\small\texttt{ThB}}\tabularnewline
-{\small\texttt{foot}} & {\small tokens} & {\small content of footer line} & \tabularnewline
-{\small\texttt{rpos}} & {\small int (}{\small\texttt{0}}{\small\ldots}{\small\texttt{4}}{\small )} & {\small row-variable column position(s)} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{rbloc}} & {\small comma list} & {\small division of rows into blocks} & \tabularnewline
-{\small\texttt{rblocsep}} & {\small length} & {\small extra spacing between blocks of rows} & {\small\texttt{1 ex}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-
-
-\subsection{Title for function-value columns: \texttt{ctitle}}
-
-\label{subsec:Title:-ctitle-setting}The function value columns have
-individual headers, formatted in the various ways provided by the
-settings discussed above, but it can also be helpful to have a collective
-title for these columns. This is provided by the \texttt{ctitle} key.
-This can be set to whatever you like (e.g. \texttt{ctitle=\textbackslash text\{Fred\}}),
-but for more relevant titles there are two in-built settings: \texttt{ctitle={*}},
-which makes the formula the title, and \texttt{ctitle={*}{*}}, which
-makes a title of the formula and vv-list. In the example below, it
-makes no sense to display the vv-list since it contains only the initial
-values of the row and column variables, already obvious in the table;
-hence \texttt{ctitle={*}}. 
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.25,(5)},rround=2,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,chround=2,ctitle=*]
-      { \sin kx }[k=3,x=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.25,(5)},rround=2,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,chround=2,ctitle=*]
-      { \sin kx }[k=3,x=0][*]\medskip{}
-
-For an example of \texttt{ctitle={*}{*}} see \xA7\ref{subsec:Rules:-rules-setting}.
-
-\subsection{Rules: \texttt{rules} setting}
-
-\label{subsec:Rules:-rules-setting}The \texttt{booktabs} package
-which \texttt{numerica} uses is most emphatic that one should `1.
-Never, ever use vertical rules. 2. Never use double rules.' Most
-of the tables proper in \emph{HMF} lack rules of any kind although
-closer inspection shows smaller tables within the text generally \emph{are}
-delimited by horizontal rules (often also with vertical rules).\footnote{The tables in \emph{HMF} are often inelegantly typeset, and sometimes
-ugly. For all that, I have used it as a source of table types, of
-the variety of structures that the editors found necessary or at least
-useful for presenting a multitude of different kinds of numerical
-data.} I have used horizontal rules in the various examples in the present
-document because these too are tables within text. Some form of delineation
-seems necessary. Also, to my eye, the table title, $\sin kx$, in
-the last example seems `naked' without a rule to emphasize its domain. 
-
-The \texttt{rules} key enables precisely which rules are used to be
-specified. The value of the key is a `word' \textendash{} a sequence
-of letters \textendash{} where the characters have the significance
-and default thicknesses (from \texttt{booktabs}) shown in Table~\ref{tab:Rules}.
-The default setting is \texttt{rules=ThB}. To insert a rule beneath
-the title, for example, change this to \texttt{rules=TthB}. If in
-addition you are using a footer row and want a rule above it, then
-the specification is \texttt{rules=TthfB}. 
-
-\begin{table}[H]
-\noindent \centering{}\caption{\protect\label{tab:Rules}Rules}
-\noindent \begin{center}
-\begin{tabular}{llll}
-\toprule 
-{\small char} & {\small rule} & {\small position} & {\small default rule thickness}\tabularnewline
-\midrule
-{\small\texttt{T}} & {\small top rule} & {\small above table} & {\small\texttt{\textbackslash heavyrulewidth=.08em}}\tabularnewline
-{\small\texttt{t}} & {\small title rule} & {\small below title} & {\small\texttt{\textbackslash cmidrulewidth =.03em}}\tabularnewline
-{\small\texttt{h}} & {\small header rule} & {\small below header} & {\small\texttt{\textbackslash lightrulewidth=.05em}}\tabularnewline
-{\small\texttt{f}} & {\small footer rule} & {\small above footer} & {\small\texttt{\textbackslash cmidrulewidth =.03em}}\tabularnewline
-{\small\texttt{B}} & {\small bottom rule} & {\small below table} & {\small\texttt{\textbackslash heavyrulewidth=.08em}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\end{table}
-If you wish to change the thickness of a rule from its default, then
-enter new values for any or all of {\small\texttt{\textbackslash heavyrulewidth}},
-{\small\texttt{\textbackslash lightrulewidth}}, {\small\texttt{\textbackslash cmidrulewidth}}
-in the preamble. The values listed in Table~\ref{tab:Rules} are
-the default values in the \texttt{booktabs} package (except for the
-footer rule, which \texttt{booktabs} does not cover; in \texttt{numerica}
-the footer rule is assigned a thickness of {\small\texttt{\textbackslash cmidrulewidth}}).
-
-In the example table below, a rule for the column title has been specified
-(the \verb`t` in the setting \verb`rules=TthB`). Also note the use
-of \texttt{ctitle={*}{*}}. The fornula contains an extra parameter
-$a$, assigned a value in the vv-list. It now makes sense to display
-the vv-list in the column title (but note the braces around \texttt{k}
-and \texttt{x} so that they don't show in the vv-list).
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.25,(5)},rround=2,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,chround=2,
-           ctitle=**,rules=TthB]
-      { a\sin kx }[a=2/\pi,{k}=3,{x}=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.25,(5)},rround=2,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,chround=2,
-           ctitle=**,rules=TthB]
-      { a\sin kx }[a=2/\pi,{k}=3,{x}=0][*]
-
-\subsection{Footer row: \texttt{foot} setting}
-
-Some tables have a footer row and \texttt{numerica} allows such a
-row to be inserted, but its entire content, with one exception, is
-the responsibility of the user, including insertion of the necessary
-number of tab characters \verb`&`. This will be $1$ less than the
-total number of columns (including row variable columns) in the table
-\textendash{} or some adjustment thereof if you use \verb`\multicol`.
-You can put into the footer what you wish. 
-\begin{lyxcode}
-foot=<tokens>
-\end{lyxcode}
-\emph{HMF} uses the footer mainly for cryptic descriptions of the
-accuracy and needs of interpolation methods.
-
-The one exception is when \texttt{foot={*}}. This will fill the footer
-with the header, but \emph{reversed}. This is useful for tabulating
-complementary functions like the sine and cosine or, more generally,
-$f(x)$ and $g(x)$ where $g(x)=f(k-x)$ for some constant $k$. Values
-for the complementary function are read from the bottom up and require
-a reversed row variable column on the right of the table; see \xA7\ref{subsec:Second-row-var-col}.
-
-\subsubsection{Footer functions}
-
-It is also possible to use the footer for displaying the values of
-certain column functions. \texttt{numerica} provides five of these.
-They can be used in the footer (and only in the footer): \verb`SUM`,
-\verb`AVE` (average), \verb`MAX`, \verb`MIN` and \verb`DEL` (for
-$\Delta$=\verb`MAX-MIN`). These functions act on the function values
-of the column they are in. They \emph{do not} combine mathematically:
-entering \verb`MAX-MIN` in the footer of a given column will produce
-a footer entry containing two values (those of \verb`MAX` and \verb`MIN`)
-separated by a minus sign, not the value of \verb`DEL`. The numerical
-output from each function is automatically wrapped in math delimiters
-(\verb`$`) so that minus signs display correctly.
-
-In the following example, I have chosen a column variable step size
-of zero. This is possible because in the column spec., I have also
-specified the exact number of columns. Zeroing the step size means
-the same set of figures can be used for the five footer functions
-to act on.
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.25,(5)},rround=2,rhead=x,ralign=r,rhnudge=9,
-         cspec={k,0,(5)},chstyle=2,
-         chround=2,calign=r,ctitle=**,rules=TthfB,
-         foot={\small Func:} & SUM & AVE & MAX & MIN & DEL ]
-      { a\sin kx }[a=2/\pi,{k}=3.5,{x}=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.25,(5)},rround=2,rhead=x,ralign=r,rhnudge=9,
-         cspec={k,0,(5)},chstyle=2,
-         chround=2,calign=r,ctitle=**,rules=TthfB,
-         foot={\small Func:}&SUM&AVE&MAX&MIN&DEL] 
-      { a\sin kx }[a=2/\pi,{k}=3.5,{x}=0][*]
-
-\subsection{Second row variable column}
-
-\label{subsec:Second-row-var-col}In \xA7\ref{subsec:Row-var-col-pos}
-I discussed \texttt{rpos=0,1,2,3}. There is another value available
-for this key, \texttt{rpos=}4. Like \texttt{rpos=3} this adds the
-row variable column to both left and right sides of the table, but
-for the right column the values are functions of those in the left
-column.
-
-For example, the sine and cosine are complementary functions; when
-working in degrees $\cos\theta=\sin(90-\theta)$. We can exploit this
-fact to halve the table size needed to tabulate the two functions.
-\begin{verbatim}
-    \tabulate[o,rpos=4,rspec={\theta,5,45},rround=0,
-      chnudge=14,rvar'=90-\theta,rhead'=\theta',
-          rules=ThfB,foot=*]
-      { ,\sin\theta,\cos\theta }[\theta=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[o,rspec={\theta,5,45},rround=0,rpos=4,
-      chnudge=14,rvar'=90-\theta,rhead'=\theta',
-        rules=ThfB,foot=*] 
-      { ,\sin\theta,\cos\theta }[\theta=0][*]\ \medskip{}
-
-\noindent where $\theta'=90-\theta$. The first half of the tabulation
-is read normally, down and from the left. The second half of the tabulation
-is read up and from the right. Note the degree setting \verb`o` in
-the settings option and
-\begin{itemize}
-\item the use of \verb`rvar'` to specify the values tabulated on the right
-(\verb`rvar'` defaults to \verb`rvar`);
-\item the use of \verb`rhead'` to specify the content of the header for
-the right-hand row variable column (\verb`rhead'` defaults to \verb`rvar'`);
-\item the footer setting \texttt{foot={*}} to obtain the header reversed
-in the footer;
-\item a rule \emph{above} the footer row specified by the \verb`f` added
-to the \verb`rules` setting, \verb`rules=ThfB`.
-\end{itemize}
-Although there is a significant space saving with tables of this kind
-(see \emph{HMF} Tables 4.10, 4.11, 4.12), they are not `kind to the
-reader'. They require a certain concentration to read and in my view
-should be avoided unless space is seriously constrained. 
-
-\emph{HMF} Tables 6.1 and 6.2 are tables of the gamma function and
-its relatives where $y=x-1$ is used (stemming from $y!=\Gamma(x-1)$)
-in the row variable column on the right; Table 6.5 in effect uses
-$\langle1/x\rangle$ (the nearest integer to $1/x$) for the row variable
-on the right.
-
-\subsection{Separating blocks of rows: \texttt{rbloc}}
-
-Readability of long columns of figures can be aided by breaking the
-columns into blocks with extra white space between blocks of rows.
-This is achieved with the \texttt{rbloc} key:
-\begin{lyxcode}
-rbloc~=~<comma~list~of~positive~integers>
-\end{lyxcode}
-specifies how many rows belong to each block. For example, \texttt{rbloc=\{5,5,6\}}
-breaks the table into blocks of $5$ rows, $5$ rows, then $6$ rows.
-If the number of rows in the table is greater than the sum of the
-entries in the comma list, then division into blocks continues as
-specified by the last entry in the comma list. Thus \texttt{rbloc=5}
-(strictly \texttt{rbloc=\{5\}} but the braces can be omitted in this
-case since no comma is enclosed) divides a table into blocks of $5$
-rows; \texttt{rbloc=\{1,5\}} divides a table into $1$ row followed
-by blocks of $5$ rows. A division of this kind may be appropriate
-when, say, the row variable runs from $0$ to $1$ in increments of
-$0.1$ \textendash{} there are $11$ rows of which the first (when
-the row variable is zero) may have distinctive values. 
-
-\noindent\begin{minipage}[t]{1\columnwidth}%
-\begin{shaded}%
-
-\subsubsection*{The pull of the nice round number}
-
-However, this is not how \emph{HMF} sets out its tables.\emph{ }The
-dominant practice in \emph{HMF} is division into blocks of (generally)
-$5$ rows, many of which start with a zero value for the row variable.
-Rather than isolate this initial value, they include it in the first
-block of $5$, then continue with blocks of $5$ until a single isolated
-row is left at the bottom of the page or the table. There seems to
-be a psychological need to finish a page or table with the row variable
-set to a nice round number. Thus: tabulate from $0$ to $10$ rather
-than $0$ to $9$, from $0$ to $1$ rather than $0$ to $0.9$, and
-even from $0$ to $30$ or $0$ to $2$ rather than $0$ to $29$
-or $0$ to $1.9$. Using blocks of $5$ the consequence is that there
-is always an isolated line at the end \textendash{} a kind of punctuation,
-marking the end of the page or the table.\end{shaded}%
-\end{minipage}
-
-\medskip{}
-In the next example I have divided the columns into blocks of $5$
-rows by means of the setting \texttt{rbloc=5}.
-\begin{verbatim}
-    \tabulate[o,rspec={\theta,10,90},rround=0,rbloc=5]
-		{ ,\sin \theta, \cos \theta}[\theta=0][*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[o,rspec={\theta,10,90},rround=0,rbloc=5]
-		{ ,\sin \theta, \cos \theta}[\theta=0][*]
-
-\subsubsection{Adjusting the extra space\texttt{ rblocsep} }
-
-By default \texttt{numerica} sets the extra space between blocks of
-rows at \verb`1 ex`. This value can easily by changed with the setting
-\texttt{rblocsep=<length>}. The units need to be included in the specification.
-The default is $1$ \texttt{ex.}
-
-\section{Function value formatting}
-
-\label{sec:Function-value-formatting}
-\begin{table}
-
-\noindent \begin{centering}
-\caption{\protect\label{tab:Function-value-formatting}Function value formatting}
-\noindent \begin{center}
-\begin{tabular}{cc>{\raggedright}p{4cm}c}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{(pad)}} & {\small int} & {\small (t-notation) phantom padding} & \tabularnewline
-{\small\texttt{signs}} & {\small int} & {\small sign handling for function values} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{diffs}} & {\small int } & {\small insert differences \& pre-pad with zeros} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{Q?}} & {\small tokens} & {\small special cell conditional} & \tabularnewline
-{\small\texttt{A!}} & {\small tokens} & {\small special cell formatting } & \tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\par\end{centering}
-\end{table}
-In the examples used so far, function values have been limited to
-a narrow range, generally $[-1,1]$. What happens when function values
-span orders of magnitude?
-
-\subsection{Trailing optional argument}
-
-The primary tool for function value formatting is the trailing optional
-argument of the \verb`\tabulate` command where the rounding value
-is specified, padding with zeros is set or not (generally \emph{set}),
-and scientific notation is set or not. Elegant scientific notation,
-set with an \texttt{x} in the trailing optional argument, is generally
-not appropriate for use in tables; see the first table below. Adding
-a prime to the \texttt{x} in the trailing optional argument (the second
-table) so that scientific notation extends to numbers in the range
-$[1,10)$ helps, particularly with the \emph{left} alignment chosen
-for the function value column, but the result is wasteful of space
-and the repetition of the `$\times10$' is borderline distracting
-and would certainly be so for a larger table. The \texttt{x} specification
-should be used in tables, if at all, only for small tables \textendash{}
-a few function values at most.
-\begin{verbatim}
-    \tabulate[rspec={x,1,3},rround=0]
-      { e^x}[x=-5][*x]\qquad
-    \tabulate[rspec={x,1,3},rround=0,calign=l]
-      { e^x}[x=-3][*x']\qquad
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rspec={x,1,3},rround=0]
-      { e^x }[x=-3][*x]\qquad
-    \tabulate[rspec={x,1,3},rround=0,calign=l]
-      { e^x}[x=-3][*x']\qquad
-
-\subsubsection{The \texttt{t} option}
-
-\emph{HMF} uses a special notation for coping with function values
-spanning orders of magnitude. This notation can be invoked by inserting
-\texttt{t} in the trailing optional argument. Repeating the previous
-two tables, and adding a \texttt{chnudge} value, gives a more compact
-and visually appealing result:
-\begin{verbatim}
-    \tabulate[rspec={x,1,3},rround=0,chnudge=24]
-      { e^x}[x=-3][*t]\qquad
-    \tabulate[rspec={x,1,3},rround=0,chnudge=24]
-      { e^x}[x=-3][*t']
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rspec={x,1,3},rround=0,chnudge=24]
-      { e^x}[x=-3][*t]\qquad
-    \tabulate[rspec={x,1,3},rround=0,chnudge=24]
-      { e^x}[x=-3][*t']
-
-\subsection{Padding the exponent: \texttt{(pad)}}
-
-In the second table of the last example some might quibble at the
-lack of alignment of the left parentheses. \emph{HMF} tends to align
-these and \texttt{numerica} offers the setting 
-\begin{lyxcode}
-(pad)~=~<integer>
-\end{lyxcode}
-to achieve the effect. \texttt{<integer>} is the number of digits/characters
-to pad to. In the last example, the setting is \texttt{(pad)=2}. Here
-it is repeated with this setting:
-\begin{verbatim}
-    \tabulate[rspec={x,1,3},rround=0,chnudge=24,(pad)=2]
-      { e^x}[x=-3][*t]\qquad
-    \tabulate[rspec={x,1,3},rround=0,chnudge=24,(pad)=2]
-      { e^x}[x=-3][*t']
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rspec={x,1,3},rround=0,chnudge=24,(pad)=2]
-      { e^x}[x=-3][*t]\qquad
-    \tabulate[rspec={x,1,3},rround=0,chnudge=24,(pad)=2]
-      { e^x}[x=-3][*t']\medskip{}
-
-Note that this setting is relevant only when the \texttt{t} option
-is used in the trailing number-formatting argument of the \verb`\tabulate`
-command. Examples in \emph{HMF} of the style exemplified by the first
-table are, among others, Tables 8.6, 9.2, 20.1, and of the style exemplified
-by the second table, among many, Tables 9.9, 10.5, 13.1, 14.1, 19.1.
-
-\subsection{Accommodating signs: \texttt{signs}}
-
-\label{subsec:Signs}Instead of $e^{x}$ as the test function, use
-$e^{x}-1.$ Now there are positive, zero and negative function values
-to contend with. Recall that in the `t-notation' the \emph{exponent}
-is the parenthesized integer part of a number, the \emph{significand}
-the following decimal figures. \texttt{numerica} offers the \texttt{signs}
-key to align (or not) the exponents. The setting is
-\begin{lyxcode}
-signs~=~<integer>
-\end{lyxcode}
-There are four effective values for \texttt{<integer>} and the do-nothing
-default (\texttt{signs=0}):
-\begin{itemize}
-\item \texttt{signs=2 }inserts a $+$ sign between exponent and significand
-of every non-negative number;
-\item \texttt{signs=1 }inserts a $+$ sign between exponent and significand
-of every non-negative number immediately preceding or following a
-negative number;
-\item \texttt{signs=-1 }inserts a $+$ sign between exponent and significand
-of any non-negative number immediately preceding or following a negative
-number, and a phantom $-$ sign between exponent and significand of
-every other non-negative number;
-\item \texttt{signs=-2 }inserts a phantom $-$ sign between exponent and
-significand of every non-negative number;
-\end{itemize}
-With the `t-notation', the negative values and \verb`signs=2` seem
-the appropriate ones to use :
-\begin{verbatim}
-    \tabulate[rspec={x,1,3},rround=0,chnudge=9,
-        (pad)=2,signs=-2]
-      { e^x-1}[x=-3][4*t']\qquad
-    \tabulate[rspec={x,1,3},rround=0,chnudge=9,
-        (pad)=2,signs=-1]
-      { e^x-1}[x=-3][4*t']\qquad
-    \tabulate[rspec={x,1,3},rround=0,chnudge=9,
-        (pad)=2,signs=2]
-      { e^x-1}[x=-3][4*t']
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rspec={x,1,3},rround=0,chnudge=9,
-      (pad)=2,signs=-2]
-      { e^x-1}[x=-3][4*t']\quad
-    \tabulate[rspec={x,1,3},rround=0,chnudge=9,
-      (pad)=2,signs=-1]
-      { e^x-1}[x=-3][4*t']\quad
-    \tabulate[rspec={x,1,3},rround=0,chnudge=9,
-      (pad)=2,signs=2]
-      { e^x-1}[x=-3][4*t']\medskip{}
-
-\noindent In \emph{HMF} Table 23.2 illustrates \verb`signs=-2`; Tables
-10.1, 13.1, 14.1, 19.1 among many others illustrate \verb`signs=-1`;
-and Tables 9.4, 10.6, 20.2, 22.11 among others illustrate \verb`signs=2`.
-
-However the \texttt{signs} key is not limited to the `t-notation'.
-In the following tables where the notation is not used, positive values
-for the key give appropriate results (I've included also the default
-setting):
-\begin{verbatim}
-    \tabulate[rspec={x,0.1,0.4},(pad)=2,signs=2]
-      { 10\sin 5x}[x=-0.4][*4]\qquad
-    \tabulate[rspec={x,0.1,0.4},(pad)=2,signs=1]
-      { 10\sin 5x}[x=-0.4][*4]\qquad
-    \tabulate[rspec={x,0.1,0.4},(pad)=2]
-      { 10\sin 5x}[x=-0.4][*4]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rspec={x,0.1,0.4},(pad)=2,signs=2]
-      { 10\sin 5x}[x=-0.4][*4]\qquad
-    \tabulate[rspec={x,0.1,0.4},(pad)=2,signs=1]
-      { 10\sin 5x}[x=-0.4][*4]\qquad
-    \tabulate[rspec={x,0.1,0.4},(pad)=2]
-      { 10\sin 5x}[x=-0.4][*4]\medskip{}
-
-\emph{HMF} seems to use \verb`signs=2` when the sign of function
-values changes every few entries and \verb`signs=1` when there are
-runs of entries of the same sign. They would use the middle table
-of the three here. 
-
-\subsection{Differences: \texttt{diffs}}
-
-In fine-grained tables where function values change only slowly from
-entry to entry it can be helpful to include a difference entry between
-function value entries as an aid to interpolation (and a test of eyesight).
-By entering 
-\begin{lyxcode}
-diffs~=~<non-negative~integer>
-\end{lyxcode}
-the \verb`tabulate` command will include differences in a table.
-The \texttt{<non-negative integer>} is the maximum number of digits
-in a difference. 
-\begin{verbatim}
-    \tabulate[rspec={x,0.01,1.05},rround=2,
-      rhnudge=9,chnudge=21,diffs=3]
-        { \sinh x }[x=1][*4]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rspec={x,0.01,1.05},rround=2,
-      rhnudge=9,chnudge=21,diffs=3]
-        { \sinh x }[x=1][*4]\medskip{}
-
-I have deliberately chosen the function and settings here \textendash{}
-particularly \texttt{diffs=3} \textendash{} to give a good result.
-It is easy to get this wrong. The evidence will be in the misalignment
-of the first row of function values or unnecessary padding of differences
-with leading zeros. It is a good idea to create your table first,
-see how function values change between successive rows and judge how
-many digits there will be in a difference. In the following examples
-I have deliberately put \texttt{diffs=2} and \texttt{diffs=4} to show
-the effect of a misjudgement. In the second table the function is
-\emph{decreasing}, $-\sinh x$, to show how it is the absolute value
-of the difference between successive function values that is tabulated.
-A difference is always a non-negative value.
-\begin{verbatim}
-    \tabulate[rspec={x,0.01,1.05},rround=2,
-      rhnudge=9,chnudge=21,diffs=2]
-        { \sinh x }[x=1][*4]\qquad
-    \tabulate[rspec={x,0.01,1.05},rround=2,
-      rhnudge=9,chnudge=21,diffs=4]
-        { -\sinh x }[x=1][*4]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rspec={x,0.01,1.05},rround=2,
-      rhnudge=9,chnudge=21,diffs=2]
-        { \sinh x }[x=1][*4]\qquad
-    \tabulate[rspec={x,0.01,1.05},rround=2,
-      rhnudge=9,chnudge=21,diffs=4]
-        { -\sinh x }[x=1][*4]\medskip{}
-
-\noindent When the \texttt{diffs} setting is too small, function values
-in the first row are misaligned, the amount depending on how much
-too small. When the \texttt{diffs} setting is too big, alignment is
-fine but differences are padded with unnecessary leading zeros, meaning
-the column header will need a bigger nudge to bring \emph{it} into
-alignment. 
-
-\subsection{Formatting special values: \texttt{Q?} and \texttt{A!}}
-
-You may wish to highlight or display in some special way a particular
-function value or values. \verb`\nmcTabulate` has two related settings
-that enable this: \texttt{Q?=<tokens>} and \texttt{A!=<tokens>}. As
-the names suggest: Question? and Answer! 
-
-The question should be an expression that \texttt{l3fp} can digest
-and produce a boolean answer to (1 for `true' or 0 for `false').
-\texttt{numerica} uses \texttt{@} to denote the current function value,
-so queries like \texttt{Q?=@<0} (Is the current function value negative?)
-or \texttt{Q?=\{}@\texttt{>=pi\}} (Is the current function value greater
-than or equal to $\pi$?) are valid questions. (Note the braces in
-the second question, used to hide the equality sign.) Other possible
-useful components of such questions are \texttt{exp(1)} for the number
-$e$, || for logical Or, \texttt{\&\&} for logical And, and \texttt{!}
-for logical Not,\texttt{ }as well as the familiar arithmetic symbols,
-\texttt{+ - {*} /} and \texttt{\textasciicircum}, relation symbols
-\texttt{< > =} and their combinations like \texttt{!= >= <=} etc.,
-and parentheses. For everything \texttt{l3fp} makes available see
-the relevant chapter in \texttt{Interface3.pdf}, part of the documentation
-that comes with the \LaTeX 3 package \texttt{l3kernel}. In addition
-to these components, \texttt{numerica} offers \texttt{MAX} and \texttt{MIN}
-which are the maximum and minimum function values tabulated, so that,
-e.g., \texttt{Q?=\{@=MIN\}} (note the braces) is the question: Is
-the current function value equal to the minimum function value for
-the whole table?
-
-The answer must be in the form of a \LaTeXe{} formatting statement,
-again using \texttt{@} to denote the current function value. Thus
-\texttt{A!=\textbackslash mathbf\{@\}} is a valid answer; so is \texttt{A!=\textbackslash color\{red\}\{@\}}
-(provided you have \texttt{\textbackslash usepackage\{color\}} in
-the preamble); and so is \texttt{A!=(@)}. Another valid answer is
-\texttt{A!=} , meaning that function values satisfying the \texttt{Q?}
-question are omitted from the output.
-
-For example, suppose we wish to focus on the values of $\cos(m\pi/n)$
-lying between $0$ and $\tfrac{1}{2}$ inclusive for certain values
-of $m$ and $n$. Rather than cluttering the table with values outside
-that interval, we suppress them (the two occurrences of `\texttt{1e-14}'
-in the query are there to prevent rounding errors confusing the result):
-\begin{verbatim}
-    \tabulate
-      [rspec={n,1,15},rround=0,rpos=2,rules=Tth,
-         cspec={m,1,5},ctitle=*,chstyle=2,
-           Q?={@<-1e-14||@>0.5+1e-14},A!=]
-      { \cos(m\pi/n) }[n=4,m=2][*4]
-\end{verbatim}
-$\Longrightarrow$      \tabulate[rspec={n,1,15},rround=0,rpos=2,rules=Tth,
-                cspec={m,1,5},ctitle=*,chstyle=2, 
-			    Q?={@<-1e-14||@>0.5+1e-14},A!=]
-      { \cos(m\pi/n)}[n=4,m=2][*4]
-
-\section{Table placement}
-
-\label{sec:Table-placement}There is only one setting in this category
-that is part of \texttt{numerica} as such, the tabular vertical alignment
-option; see \xA7\ref{subsec:Verticalalignment}. But \LaTeX{} allows one
-to insert vertical space with its \verb`\bigskip`, \verb`\medskip`,
-\verb`\smallskip`, usually about one line space, a half line space,
-and a quarter line space (with stretch and shrink), and \verb`booktabs`
-provides \verb`\abovetopsep` and \verb`\belowbottomsep`, both set
-by default to \verb`0ex` (or any other unit you care to use) and
-easily changed by writing, e.g., \verb`\abovetopsep=1.25ex` if you
-want to insert \verb`1.25ex` of space above the table (perhaps to
-fit captions).
-
-\subsection{Vertical~alignment}
-
-\label{subsec:Verticalalignment}By writing\texttt{ }
-\begin{lyxcode}
-valign~=~<char>~
-\end{lyxcode}
-where \texttt{<char>} is one of \texttt{t} or \texttt{b} the vertical
-alignment of the table can be set relative to the text baseline.\texttt{ valign=t
-}aligns the top of the table with the text baseline, \texttt{valign=b}
-the bottom of the table with the text baseline. By default (no \texttt{valign}
-setting or \texttt{valign} equated to some character other than \texttt{t}
-or \texttt{b}) the middle of the table is aligned with the text baseline.
-Repeating an example from earlier (\xA7\ref{sec:Row-variable-settings})
-I have added letters A, B, C to show where the baseline is. In the
-first table the top of the table aligns with the baseline; in the
-second table (default case) the middle of the table aligns with the
-baseline; in the third table, the bottom of the table aligns with
-the baseline.
-\begin{verbatim}
-    A \tabulate[valign=t,rvar=x,rstep=0.2,rows=6]
-      { \sin x/\cos x }[x=0][*] \qquad
-    B \tabulate[rspec={x,0.2,1}]
-      { \tan x }[x=0][*] \qquad
-    C \tabulate[valign=b,rspec={x,0.2,(6)}]
-      { \sqrt{\sec^2 x - 1} }[x=0][*]
-\end{verbatim}
-$\Longrightarrow$     A \tabulate[valign=t,rvar=x,rstep=0.2,rows=6,rstop=2]
-      { \sin x/\cos x }[x=0][*] \qquad
-    B \tabulate[rspec={x,0.2,1}]
-      { \tan x }[x=0][*] \qquad
-    C \tabulate[valign=b,rspec={x,0.2,(6)}]
-      { \sqrt{\sec^2 x - 1} }[x=0][*]\medskip{}
-
-As explained in \xA7\ref{subsec:Adjoining-tables}, tables can be adjoined
-to give the appearance of a single larger table. If tables with different
-numbers of rows are adjoined in this manner, then a middle alignment
-fails and either a top or bottom alignment is necessary.
-
-\section{Star option}
-
-If the \texttt{Q?} question is satisfied by at least one function
-value then adding a star (asterisk) to the \verb`\tabulate` command
-will display the first such instance. I.e., like the other starred
-commands, \verb`\eval*`, \verb`\iter*`, \verb`\solve*` and \verb`\recur*`,
- \verb`\tabulate*` outputs a single number:
-\begin{verbatim}
-    \tabulate*
-      [rspec={n,1,15},cspec={m,1,5},
-           Q?={@<-1e-14||@>0.5+1e-14}]
-      { \cos(m\pi/n) }[n=4,m=2][*4]
-\end{verbatim}
-$\Longrightarrow$      \tabulate*
-      [rspec={n,1,15},cspec={m,1,5},
-           Q?={@<-1e-14||@>0.5+1e-14}]
-      { \cos(m\pi/n) }[n=4,m=2][*4]. Ineed, if you omit the \texttt{Q?} and \texttt{A!} settings from
-the previous table then this is the value that follows $0.5000$ in
-the \texttt{m=2} column \textendash{} the first function value encountered
-satisfying the query \texttt{Q?}. 
-
-If \emph{no} function value satisfies the query then a message is
-generated:
-\begin{verbatim}
-    \tabulate*
-      [rspec={n,1,15},cspec={m,1,5},
-           Q?=|@>1]
-      { \cos(m\pi/n) }[n=4,m=2][*4]
-\end{verbatim}
-$\Longrightarrow$      \tabulate*
-      [rspec={n,1,15},cspec={m,1,5},
-           Q?=@>1]
-      { \cos(m\pi/n) }[n=4,m=2][*4]
-
-And if there is no query at all when the star option is chosen, another
-message is shown:
-\begin{verbatim}
-    \tabulate*
-      [rspec={n,1,15},cspec={m,1,5}]
-      { \cos(m\pi/n) }[n=4,m=2][*4]
-\end{verbatim}
-$\Longrightarrow$      \tabulate*
-      [ rspec={n,1,15}, cspec={m,1,5}]
-      { \cos(m\pi/n) }[n=4,m=2][*4]
-
-\subsection{Scientific notation}
-
-If you want the number output in scientific notation when the star
-option is chosen, then enter the exponent mark in the trailing number-format
-option. This is straightforward for a letter like the commonly used
-\texttt{e}, but remember that if it is the \texttt{x} option that
-you enter, then you will need to place the \verb`\tabulate*` command
-between math delimiters, otherwise the \verb`\times` symbol resulting
-from the \texttt{x} option will generate a \LaTeX{} error (`Missing
-\$ inserted'):
-\begin{verbatim}
-    $ 
-    \tabulate*
-      [rspec={n,1,15},cspec={m,1,5},
-           Q?={@<-1e-14||@>0.5+1e-14},A!=]
-      { \cos(m\pi/n) }[n=4,m=2][*4x]
-    $
-\end{verbatim}
-$\Longrightarrow$      $ 
-    \tabulate*
-      [rspec={n,1,15},cspec={m,1,5},
-           Q?={@<-1e-14||@>0.5+1e-14},A!=]
-      { \cos(m\pi/n) }[n=4,m=2][*4x]
-    $.
-
-\section{The \texttt{reuse} setting}
-
-By entering 
-\begin{lyxcode}
-reuse~=~<non-negative~integer>
-\end{lyxcode}
-it is possible to specify what is saved when the \verb`\tabulate`
-command is followed by a \verb`\reuse` command.
-\begin{itemize}
-\item \texttt{reuse=0} saves the table as displayed (the default);
-\item \texttt{reuse=n} saves the $n$-th \emph{column} of function values
-\begin{itemize}
-\item if \texttt{rpos} is non-zero: in a comma-separated list of braced
-pairs \texttt{\{row-variable value,function value}\};
-\item if \texttt{rpos=0}: in a comma-separated list of function values.
-\end{itemize}
-\item \texttt{reuse=-n} saves the $n$-th \emph{row} of function values
-in a comma-separated list that includes the row variable value in
-its appropriate position(s) if \texttt{rpos} is non-zero.
-\end{itemize}
-In the following example the third row is saved to the control sequence
-\verb`\rowiii` by using the setting \verb`reuse=-3`.
-\begin{verbatim}
-    \tabulate
-      [rspec={x,0.25,(5)},rround=2,rhead=x,ralign=r,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,
-         chround=2,calign=r,ctitle=**,
-           rules=TthB,reuse=-3]
-      { a\sin kx }[a=2/\pi,{k}=3,{x}=0][*] \reuse[rowiii]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.25,(5)},rround=2,
-         rhead=x,ralign=r,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,
-         chround=2,calign=r,ctitle=**,rules=TthB,reuse=-3]
-      { a\sin kx }[a=2/\pi,{k}=3,{x}=0][*] \reuse[rowiii]\medskip{}
-
-\noindent Now test the content of the control sequence
-\begin{lyxcode}
-\noindent \verb`\rowiii`~$\Longrightarrow$~\rowiii ~
-\end{lyxcode}
-\noindent You can see that indeed the third row has been `captured
-for posterity'.
-
-Alternatively, we could save the second column in the control sequence
-\verb`\colii`:
-\begin{verbatim}
-  [rspec={x,0.25,(5)},rround=2,rhead=x,ralign=r,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,
-         chround=2,calign=r,ctitle=**,
-           rules=TthB,reuse=2]
-      { a\sin kx }[a=2/\pi,{k}=3,{x}=0][*] \reuse[colii]
-\end{verbatim}
-$\Longrightarrow$     \tabulate
-      [rspec={x,0.25,(5)},rround=2,
-         rhead=x,ralign=r,rhnudge=9,
-         cspec={k,0.25,(3)},chstyle=2,
-         chround=2,calign=r,ctitle=**,rules=TthB,reuse=2]
-      { a\sin kx }[a=2/\pi,{k}=3,{x}=0][*] \reuse[colii]\medskip{}
-
-To see what is saved in \verb`\colii` I use \TeX 's \verb`\meaning`
-command to show that it is indeed braced pairs:
-\begin{verbatim}
-    \meaning \colii
-\end{verbatim}
-$\Longrightarrow$ \meaning\colii
-
-\chapter{Nesting}
-
-\label{sec:tableNesting}Provided the starred form of any one of \verb`\eval`,
-\verb`\iter`, \verb`\solve`, \verb`recur` actually does produce
-a numerical result and not an error message then it can be nested
-within the main argument of any one of the other commands, including
-itself. The associated document \texttt{numerica-plus.pdf} has a number
-of illustrations of this. The starred form can also be used in the
-vv-list of any one of the commands, including itself. \texttt{numerica-plus.pdf}
-has an example of \verb`\solve*` being used in the vv-list of an
-\verb`\eval` command, and the document \texttt{numerica-basics.pdf}
-shows examples of \verb`\eval*` being used in the vv-list of an \verb`\eval`
-command.
-
-These nesting properties are also true of \verb`\tabulate`. It's
-starred form can be used in other commands. Other commands' starred
-forms can be used in \verb`\tabulate`. 
-
-For the first, \verb`\tabulate*` inside \verb`\eval`, I have also
-used the example to show how formatting settings (shown for the first
-\verb`\tabulate*` in the example) can in fact be dispensed with (as
-shown for the second \verb`\tabulate*`). Only \emph{functional} settings
-are required. Hence there is no \verb`A!` setting in either. It is
-the \emph{question}, \verb`Q?`, not the answer, that isolates the
-single-value that is the result of \verb`\tabulate*`.
-\begin{verbatim}
-    \eval{$ 
-      (\tabulate*
-        [rspec={n,1,15},rround=0,rpos=2,rules=Tth,
-           cspec={m,1,5},ctitle=*,chstyle=2,
-             Q?={@=MAX}]
-      { \cos(m\pi/n) }[n=4,m=2][*4])\sinh t + 
-     (\tabulate*
-        [rspec={n,1,15},cspec={m,1,5},
-             Q?={@=MIN}]
-      { \sin(m\pi/n) }[n=4,m=2][*4])\cosh t
-         $}[t=2][4]
-\end{verbatim}
-$\Longrightarrow$     \eval{$ 
-      (\tabulate*
-        [rspec={n,1,15},rround=0,rpos=2,rules=Tth,
-           cspec={m,1,5},ctitle=*,chstyle=2,
-             Q?={@=MAX}]
-      { \cos(m\pi/n) }[n=4,m=2][*4])\sinh t + 
-     (\tabulate*
-        [rspec={n,1,15},rround=0,rpos=2,rules=Tth,
-           cspec={m,1,5},ctitle=*,chstyle=2,
-             Q?={@=MIN}]
-      { \sin(m\pi/n) }[n=4,m=2][*4])\cosh t
-         $}[t=2][4]. 
-
-For using the starred forms of other commands inside \verb`\tabulate`,
-it makes more sense to use one or more of \verb`\iter*`, \verb`\solve*`
-or \verb`\recur*` inside \verb`\tabulate` than it does \verb`\eval*`,
-but that assumes the reader is familiar with those com$\frac{}{}$mands
-and that \texttt{numerica-plus.def} is loaded for this document, which
-it is not. So, here is a rather pointless illustration of nesting
-\verb`\eval*` in \verb`\tabulate`. (At least it is reassuring that
-the values of $\Delta(N)$ are identical in the two columns.)
-\begin{verbatim}
-    \tabulate[rspec={N,100,500},rround=0,ctitle=\Delta(N),
-              chead=eval*&direct]
-       { ,\eval*{ \sum_{n=1}^N 1/n-\ln N-\gamma },
-                  \sum_{n=1}^N 1/n-\ln N-\gamma }[N=100][4*]
-\end{verbatim}
-$\Longrightarrow$     \tabulate[rspec={N,100,500},rround=0,ctitle=\Delta(N),
-              chead=eval*&direct]
-       { ,\eval*{ \sum_{n=1}^N 1/n-\ln N-\gamma },
-                  \sum_{n=1}^N 1/n-\ln N-\gamma }[N=100][4*]
-
-\chapter{Reference summary}
-
-\section{Commands defined in \texttt{numerica-tables}}
-
-\texttt{\textbackslash nmcTabulate, \textbackslash tabulate}
-
-\section{Settings for \texttt{\textbackslash nmcTabulate}}
-
-\subsubsection*{Row variable specification \xA7\ref{sec:Row-variable-settings}}
-\begin{center}
-\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}>{\raggedright}p{3cm}}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small comment}\tabularnewline
-\midrule
-{\small\texttt{rvar}} & {\small token(s)} & {\small row variable} & \tabularnewline
-{\small\texttt{rstep}} & {\small real num.} & {\small step size} & \tabularnewline
-{\small\texttt{rstop}} & {\small real num.} & {\small stop value} & \multirow{2}{3cm}{either {\small\texttt{rstop}}{\small{} or }{\small\texttt{rows}}{\small ,
-not both}}\tabularnewline
-{\small\texttt{rows}} & {\small int} & {\small number of rows} & \tabularnewline
-{\small\texttt{rspec}} & {\small comma list} & {\small\texttt{\{start}}{\small , }{\small\texttt{step}}{\small , }{\small\texttt{stop\}}}{\small{}
-or }{\small\texttt{\{start}}{\small , }{\small\texttt{step}}{\small ,
-}{\small\texttt{(rows)\}}} & {\small short form spec.}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\par\end{center}
-
-\subsubsection*{Row variable column formatting \xA7\ref{subsec:Row-var-col-formatting}}
-\begin{center}
-\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{rround}} & {\small int} & {\small rounding} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{ralign}} & {\small char (}{\small\texttt{r/c/l}}{\small )} & {\small horizontal alignment} & {\small\texttt{r}}\tabularnewline
-{\small\texttt{rfont}} & {\small chars} & {\small font (}{\small\verb`\math<chars>`}{\small )} & \tabularnewline
-{\small\texttt{rhead}} & {\small tokens} & {\small header} & {\small\texttt{rvar}}\tabularnewline
-{\small\texttt{rhnudge}} & int & {\small nudge header }{\small{\small\verb`<int>`}}{\small{} mu} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{rpos}} & {\small int (}{\small\texttt{0}}{\small\ldots}{\small\texttt{4}}{\small )} & {\small column position(s)} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{rvar'}} & {\small tokens} & {\small 2nd row variable col. spec.} & {\small\texttt{rvar}}\tabularnewline
-{\small\texttt{rhead'}} & {\small tokens} & {\small header of 2nd rv col. (if it exists)} & {\small\texttt{rvar'}}\tabularnewline
-{\small\texttt{rhnudge'}} & int & {\small nudge 2nd rv col. header }{\small{\small\verb`<int>`}}{\small{}
-mu} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\par\end{center}
-
-\subsubsection*{Column variable specification \xA7\ref{sec:Column-variable-settings}.}
-\begin{center}
-\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{cvar}} & {\small token(s)} & {\small column variable} & \tabularnewline
-{\small\texttt{cstep}} & {\small real num.} & {\small step size} & \tabularnewline
-{\small\texttt{cstop}} & {\small real num.} & {\small stop value} & {\small either }{\small\texttt{cstop}}\tabularnewline
-{\small\texttt{cols}} & {\small int} & {\small number of columns} & {\small or }{\small\texttt{cols}}{\small , not both}\tabularnewline
-{\small\texttt{cspec}} & {\small comma list} & {\small\texttt{\{cvar,cstep}}{\small , }{\small\texttt{cstop\}}}{\small{}
-or}{\small\texttt{ \{cvar,cstep}}{\small ,}{\small\texttt{(cols)\}}} & {\small short form spec.}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\par\end{center}
-
-\subsubsection*{Column variable header formatting \xA7\ref{subsec:Column-header-formatting}.}
-\begin{center}
-\begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{chstyle}} & {\small int (0/1/2/3)} & {\small header style} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{ctitle}} & {\small tokens} & {\small single col. alternative header} & \tabularnewline
-{\small\texttt{chead}} & {\small tokens} & {\small user-defined header} & \tabularnewline
-{\small\texttt{calign}} & {\small char (r/c/l)} & {\small column alignment} & {\small\texttt{r}}\tabularnewline
-{\small\texttt{chnudge}} & {\small int} & {\small nudge header }{\small{\small\verb`int`}}{\small{} mu} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{chround}} & {\small int} & {\small column header rounding} & {\small\texttt{0}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}\newpage{}
-\par\end{center}
-
-\subsubsection*{Function value formatting \xA7\ref{sec:Function-value-formatting}.}
-\noindent \begin{center}
-\noindent \begin{center}
-\begin{tabular}{cc>{\raggedright}p{4cm}c}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{(pad)}} & {\small int} & {\small (t-notation) phantom padding} & \tabularnewline
-{\small\texttt{signs}} & {\small int} & {\small sign handling for function values} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{diffs}} & {\small int} & {\small insert differences \& pre-pad with zeros} & {\small\texttt{0}}\tabularnewline
-{\small\texttt{Q?}} & {\small tokens} & {\small special cell conditional} & \tabularnewline
-{\small\texttt{A!}} & {\small tokens} & {\small special cell formatting} & \tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\par\end{center}
-
-\subsubsection*{Whole-of-table formatting \xA7\ref{sec:Whole-of-table-formatting}.}
-\noindent \begin{center}
-\noindent \begin{center}
-\begin{tabular}{ll>{\raggedright}p{4cm}l}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{ctitle}} & {\small tokens} & {\small collective title for function-value columns} & \tabularnewline
-{\small\texttt{rules}} & {\small chars} & {\small horizontal rules template} & {\small\texttt{ThB}}\tabularnewline
-{\small\texttt{foot}} & {\small tokens} & {\small content of footer line} & \tabularnewline
-{\small\texttt{rpos}} & {\small int (}{\small\texttt{0}}{\small\ldots}{\small\texttt{4}}{\small )} & {\small row-variable column position(s)} & {\small\texttt{1}}\tabularnewline
-{\small\texttt{rbloc}} & {\small comma list} & {\small division of rows into blocks} & \tabularnewline
-{\small\texttt{rblocsep}} & {\small length} & {\small extra spacing between blocks of rows} & {\small\texttt{1 ex}}\tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\par\end{center}
-
-\subsubsection*{Table placement \xA7\ref{subsec:Verticalalignment}.}
-\noindent \begin{center}
-\noindent \begin{center}
-\begin{tabular}{cc>{\raggedright}p{4cm}c}
-\toprule 
-{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
-\midrule
-{\small\texttt{valign}} & {\small char (t/b)} & {\small vertical alignment} & \tabularnewline
-\bottomrule
-\end{tabular}
-\par\end{center}
-\par\end{center}
-\end{document}

Added: trunk/Master/texmf-dist/doc/latex/numerica/numerica.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/numerica/numerica.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/numerica/numerica.pdf	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/doc/latex/numerica/numerica.pdf	2021-12-12 22:29:10 UTC (rev 61283)

Property changes on: trunk/Master/texmf-dist/doc/latex/numerica/numerica.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex	2021-12-12 22:29:10 UTC (rev 61283)
@@ -0,0 +1,6184 @@
+%% LyX 2.4.0-alpha3 created this file.  For more info, see https://www.lyx.org/.
+%% Do not edit unless you really know what you are doing.
+\documentclass[english,tableposition=top]{report}
+\usepackage{lmodern}
+\renewcommand{\sfdefault}{lmss}
+\renewcommand{\ttdefault}{lmtt}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage[utf8]{inputenc}
+\setcounter{secnumdepth}{3}
+\setcounter{tocdepth}{3}
+\usepackage{color}
+\definecolor{shadecolor}{rgb}{0.667969, 1, 1}
+\usepackage{babel}
+\usepackage{array}
+\usepackage{cprotect}
+\usepackage{wrapfig}
+\usepackage{booktabs}
+\usepackage{framed}
+\usepackage{url}
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage[unicode=true,pdfusetitle,
+ bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,
+ breaklinks=true,pdfborder={0 0 1},backref=section,colorlinks=true]
+ {hyperref}
+
+\makeatletter
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
+\providecommand{\LyX}{\texorpdfstring{\ensureascii{%
+  L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}}{LyX}}
+\DeclareRobustCommand*{\lyxarrow}{%
+\@ifstar
+{\leavevmode\,$\triangleleft$\,\allowbreak}
+{\leavevmode\,$\triangleright$\,\allowbreak}}
+%% Because html converters don't know tabularnewline
+\providecommand{\tabularnewline}{\\}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
+\newenvironment{centred}%
+  {\begin{center}\baselineskip=13pt\parskip=1pt}{\end{center}}
+\newenvironment{lyxcode}
+	{\par\begin{list}{}{
+		\setlength{\rightmargin}{\leftmargin}
+		\setlength{\listparindent}{0pt}% needed for AMS classes
+		\raggedright
+		\setlength{\itemsep}{0pt}
+		\setlength{\parsep}{0pt}
+		\normalfont\ttfamily}%
+	 \item[]}
+	{\end{list}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
+\usepackage{numerica}
+
+\usepackage{upquote}
+\newcommand\rel{\,\varrho\;}
+\DeclareMathOperator{\erf}{erf}
+\DeclareMathOperator{\gd}{gd}
+
+\reuse{}
+
+\makeatother
+
+\begin{document}
+\title{\texttt{numerica}}
+\author{Andrew Parsloe\\
+(\url{ajparsloe at gmail.com})\\
+}
+\maketitle
+\begin{abstract}
+The \verb`numerica` package defines a command to numerically evaluate
+mathematical expressions in the LaTeX form in which they are typeset.
+For programs like LyX with a preview facility, or compile-as-you-go
+systems, interactive back-of-envelope calculations and numerical exploration
+are possible within the document being worked on. The package requires
+the bundles \verb`l3kernel` and \verb`l3packages`, and the \verb`amsmath`
+and \verb`mathtools` packages. \\
+\\
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+
+\paragraph*{Note:}
+\begin{itemize}
+\item {\normalsize This document applies to version 2.0.0 of }{\normalsize\texttt{numerica.sty}}{\normalsize .}{\small\par}
+\item {\normalsize Reasonably recent versions of the \LaTeX 3 bundles }{\normalsize\texttt{l3kernel}}{\normalsize{}
+and }{\normalsize\texttt{l3packages}}{\normalsize{} are required (although
+much of }{\normalsize\verb`l3kernel`}{\normalsize{} has
+been incorporated into \LaTeXe{} since February 2020).}{\small\par}
+\item {\normalsize The package requires }{\normalsize\texttt{amsmath}}{\normalsize{}
+and }{\normalsize\texttt{mathtools}}{\normalsize .}{\small\par}
+\item {\normalsize I refer many times in this document (especially §\ref{sec:Argument-parsing})
+to }{\normalsize\emph{Handbook of Mathematical Functions}}{\normalsize ,
+edited by Milton Abramowitz and Irene A. Segun, Dover, 1965. This
+is abbreviated to }{\normalsize\emph{HMF}}{\normalsize , often followed
+by a number like 1.2.3 to locate the actual expression referenced.}{\small\par}
+\item {\normalsize Version 2.0.0 of }{\normalsize\texttt{numerica}}{\small\par}
+\begin{itemize}
+\item {\normalsize splits into distinct packages the additional functionality
+previously available with the }{\normalsize\texttt{plus}}{\normalsize{}
+and }{\normalsize\texttt{tables}}{\normalsize{} package options of version
+1;}{\small\par}
+\item {\normalsize allows for user-defined macros and constants (with the
+}{\normalsize\texttt{\textbackslash nmcMacros }}{\normalsize and }{\normalsize\texttt{\textbackslash nmcConstants}}{\normalsize{}
+commands) to be used in expressions to be evaluated;}{\small\par}
+\item {\normalsize rewrites the code and changes the behaviour of }{\normalsize\texttt{\textbackslash nmcReuse}}{\normalsize{}
+to maintain uniformity across all commands (}{\normalsize\texttt{\textbackslash nmcEvaluate}}{\normalsize ,
+}{\normalsize\texttt{\textbackslash nmcInfo}}{\normalsize , }{\normalsize\texttt{\textbackslash nmcMacros}}{\normalsize ,
+}{\normalsize\texttt{\textbackslash nmcConstants}}{\normalsize , }{\normalsize\texttt{\textbackslash nmcReuse}}{\normalsize );
+this command is no longer compatible with its use in v.1;}{\small\par}
+\item {\normalsize changes the behaviour of }{\normalsize\texttt{\textbackslash text}}{\normalsize{}
+and }{\normalsize\texttt{\textbackslash mbox}}{\normalsize{} in the
+}{\normalsize\texttt{\textbackslash eval}}{\normalsize{} command; adds
+}{\normalsize\texttt{\textbackslash textrm}}{\normalsize , }{\normalsize\texttt{\textbackslash textsf}}{\normalsize ,
+and }{\normalsize\texttt{\textbackslash texttt}}{\normalsize{} to compensate;}{\small\par}
+\item {\normalsize includes many adjustments to the code, including around
+nesting of commands;}{\small\par}
+\item {\normalsize adds to and amends documentation.}{\small\par}
+\end{itemize}
+\end{itemize}
+\end{shaded}%
+\end{minipage}
+\end{abstract}
+\begin{center}
+\tableofcontents{}
+\par\end{center}
+
+\chapter{Introduction}
+
+\texttt{numerica} is a \LaTeX{} package offering the ability to numerically
+evaluate mathematical expressions in the \LaTeX{} form in which they
+are typeset.\footnote{\texttt{numerica} evolved from the author's \texttt{calculyx} package
+that was designed for use with the document processor \LyX{} (and available
+for download from a link on the \LyX{} wiki website but not CTAN). }
+
+There are a number of packages which can do calculations in \LaTeX ,\footnote{A simple search finds the venerable \texttt{calc} in the \LaTeX{} base,
+\texttt{calculator }(including an associated \texttt{calculus} package),
+\texttt{fltpoint}, \texttt{fp} (\emph{fixed} rather than floating
+point), \texttt{spreadtab} (using either \texttt{fp} or \texttt{l3fp}
+as its calculational engine) if you want simple spreadsheeting with
+your calculations, the elaborate \texttt{xint}, \texttt{pst-calculate}
+(a limited interface to \texttt{l3fp}), \texttt{l3fp} in the \LaTeX 3
+kernel, and \texttt{xfp}, the \LaTeX 3 interface to \texttt{l3fp}.
+Other packages include a calculational element but are restricted
+in their scope. (\texttt{longdivision} for instance is elegant, but
+limited only to long division.) } but those I am aware of all require the mathematical expressions
+they operate on to be changed to an appropriate syntax. Of these packages
+\texttt{xfp} comes closest to my objective with \texttt{numerica}.
+For instance, given a formula
+\begin{centred}
+\verb`\frac{\sin (3.5)}{2} + 2\cdot 10^{-3}`
+\end{centred}
+(in a math environment), this can be evaluated using \texttt{xfp}
+by transforming the expression to \verb`sin(3.5)/2 + 2e-3` and wrapping
+this in the command \verb`\fpeval`. In \texttt{numerica} you don't
+need to transform the formula, just wrap it in an \verb`\eval` command:
+\begin{centred}
+\verb`\eval{ \frac{\sin (3.5)}{2} + 2\cdot 10^{-3} }`.
+\end{centred}
+(for the acutal calculation see §\ref{subsec:introSimple-examples}).\texttt{ }
+
+\texttt{numerica}, like \texttt{xfp} and a number of other packages,
+uses \texttt{l3fp} (the \LaTeX 3 floating point module in \texttt{l3kernel})
+as its calculational engine. To some extent the main command, \verb`\nmcEvaluate`,
+short-name form \verb`\eval`, is a pre-processor to \texttt{l3fp},
+converting mathematical expressions written in the \LaTeX\texttt{
+}form in which they will be typeset into an `fp-ified' form that
+is digestible by \texttt{l3fp}. The aim is to make the command act
+as a wrapper around such formulas. Ideally, one should not have to
+make \emph{any} adjustment to them, although any text on Fourier series
+suggests that hope in full generality is delusional. Surprisingly
+often however it \emph{is} possible. We shall see shortly that even
+complicated formulas like
+
+\[
+\cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)\frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi},
+\]
+and
+\[
+\left(\frac{1-4\sin^{2}\tfrac{m}{3n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi}\right)\sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi,
+\]
+
+\noindent can be evaluated `as is' (see below, §\ref{subsec:introReassurance}).
+There is no need to shift the position of the superscript $2$ on
+the sines, no need to parenthesize the arguments of $\sin$ and $\cos$,
+no need to insert asterisks to indicate multiplication, no need to
+change the \verb`\frac` and \verb`\tfrac`-s to slashes, \texttt{/},
+no need to delete the \verb`\left` and \verb`\right` that qualify
+the big parentheses (in the underlying \LaTeX ) in the second expression.
+Of course, if there are variables in an expression, as in these examples,
+they will need to be assigned values. And how the result of the evaluation
+is presented also requires specifying, but the aim is always: to evaluate
+mathematical expressions in \LaTeX{} with as little adjustment as possible
+to the form in which they are typeset.
+
+\texttt{numerica} is written in \texttt{expl3}, the programming language
+of the \LaTeX 3 project. It uses the \LaTeX 3 module \texttt{l3fp}
+(part of \texttt{l3kernel}) as its calculational engine. This enables
+floating point operations to 16 significant figures, with exponents
+ranging between $-10000$ and $+10000$. Many functions and operations
+are built into \texttt{l3fp} – arithmetic operations, trigonometric,
+exponential and logarithm functions, factorials, absolute value, max
+and min. Others have been constructed for \texttt{numerica }from \texttt{l3fp}
+ingredients – binomial coefficients, hyperbolic functions, sums and
+products – but to the user there should be no discernible difference. 
+
+Associated packages provide for additional operations: iteration of
+functions, finding zeros of functions, recurrence relations, mathematical
+table building; others are planned (e.g. calculus).
+
+\section{How to use \texttt{numerica}}
+
+The package is invoked in the usual way: put
+\begin{lyxcode}
+\textbackslash usepackage\{numerica\}
+\end{lyxcode}
+\noindent in the \LaTeX{} preamble. \texttt{numerica} requires the
+\texttt{amsmath} and \texttt{mathtools} packages and loads these automatically.
+\texttt{numerica} will also accept use of some relational symbols
+from the \texttt{amssymb} package provided that package is loaded
+by the user; see §\ref{subsec:evalBoolean-output}. 
+
+\subsection{Package options}
+
+\label{subsec:introPackagesOptions}Currently there are none. With
+version 2.0.0 of \verb`numerica` a change has been made to how additional
+functionality for the package is invoked; see §\ref{subsec:Related-packages}
+below. This means that the options available in version 1 have been
+discontinued.
+
+\subsection{Associated packages}
+
+\label{subsec:Related-packages}In version 1 of \verb`numerica` some
+additional functionality for the package could be gained by specifying
+package options – for instance the ability to create tables of function
+values or to iterate or find fixed points of functions. However this
+manner of invoking the addtional functionality makes the maintaining
+of semantic version numbering across the whole \verb`numerica` package
+difficult. With version 2.0.0 of the package, the addtional functionality
+has been separated into separate \LaTeX{} packages. Currently there
+are two of these, \verb`numerica-plus` and \verb`numerica-tables`.
+They are loaded with the familiar \verb`\usepackage` command in the
+document preamble and require the availability of the \verb`numerica`
+package in your \TeX{} distribution. Neither package requires a \verb`\usepackage{numerica}`
+statement; they take care of that themselves. So, if you enter
+\begin{lyxcode}
+\textbackslash usepackage\{numerica-plus\}
+\end{lyxcode}
+in the preamble of your document you gain access not only to the commands
+in the \verb`numerica` package but also to the commands \verb`\nmcIterate`,
+\verb`\nmcSolve`, and \verb`\nmcRecur`. \verb`\nmcIterate` enables
+the iteration of functions of a single variable, including finding
+fixed points. \verb`\nmcSolve` enables the solving of equations of
+the form $f(x)=0$ (i.e. finding the zeros of $f$), or the finding
+of local maxima or minima of a function of one variable. \verb`\nmcRecur`
+enables the calculation of terms in recurrence relations, like the
+terms of the Fibonacci series, or othogonal polynomials defined recurrently.
+See the associated document \verb`numerica-plus.pdf` for details.
+
+If you enter
+\begin{lyxcode}
+\textbackslash usepackage\{numerica-tables\}
+\end{lyxcode}
+in the preamble of your document you gain access not only to the commands
+in the \verb`numerica` package but also to the command \verb`\nmcTabulate`
+which enables the creation of (possibly multi-column) tables of function
+values and makes available most of the table formats evident in \emph{HMF}.
+See the associated document \verb`numerica-tables.pdf` for details. 
+
+A package \verb`numerica-calculus` is currently being developed.
+
+\subsection{Simple examples of use}
+
+\label{subsec:introSimple-examples}A simple example of use is provided
+by the document
+\begin{verbatim}
+    \documentclass{article} 
+    \usepackage{numerica}
+    \begin{document}
+
+        \eval{$ mc^2 $}[m=70,c=299 792 458][8x]
+
+    \end{document}
+
+\end{verbatim}
+\noindent We have a formula between math delimiters: \verb`$ mc^2 $`.
+We have wrapped a command \verb`\eval` around the lot, added an optional
+argument in parentheses specifying numericaal values for the quantities
+\texttt{m} and \texttt{c}, and concluded it all with a trailing optional
+argument specifying that the result should be presented to $8$ places
+of decimals and in scientific notation (the \verb`x`). Running \texttt{pdflatex}
+on this document generates a pdf displaying
+\begin{centred}
+\eval{$ mc^2 $}[m=70,c=299 792 458][8x]
+\end{centred}
+\noindent where the formula ($mc^{2})$ is equated to the numerical
+value resulting from substituting the given values of $m$ and $c$.
+Those values are displayed in a list following the result. The calculation
+is presented to $8$ decimal places in scientific notation. (According
+to Einstein's famous equation $E=mc^{2}$ this is the enormous energy
+content, in joules, of what was once considered an average adult Caucasian
+male. Only a minute fraction is ever available.) 
+
+A second example is provided by the formula in earlier remarks:
+\begin{verbatim}
+    \documentclass{article} 
+    \usepackage{numerica}
+    \begin{document}
+
+        \eval{\[ \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \]}
+
+    \end{document}
+
+\end{verbatim}
+Running \texttt{pdflatex} on this document produces the result
+
+\eval{\[ \frac{\sin(3.5)}{2} + 2\cdot 10^{-3} \]}
+
+The \verb`\eval` command used in these examples is the main command
+of the \texttt{numerica} package. It is discussed in full in the next
+chapter, but first some preliminaries.
+
+\subsection{Display of the result}
+
+\label{subsec:introResultDisplay}In what follows I shall write things
+like (but generally more complicated than)
+\begin{centred}
+\verb`$ \eval{ 1+1 } $` $\Longrightarrow \eval{ 1 + 1 } $
+\end{centred}
+to mean: run \texttt{pdflatex} on a document containing \verb`\eval{1+1}`
+in the document body to generate a pdf containing the calculated result
+($2$ in this instance). The reader will note that I have used dollar
+signs to delimit the math environment. I could (and perhaps should)
+have used the more \LaTeX -pure \verb`\( \)`, which will do equally
+well, but habit has won out. In the example the \verb`\eval` command
+is used \emph{within} a math environment (delimited by the dollar
+signs). It is not limited to this behaviour. The command can also
+wrap \emph{around} the math delimiters (as we saw in the previous
+examples):
+\begin{centred}
+\verb`\eval{$ 1+1 $}` $\Longrightarrow$ \eval{$ 1+1 $}.
+\end{centred}
+As you can see, the display that results is different. 
+\begin{itemize}
+\item When the \verb`\eval` command is used\emph{ within} a math environment,
+only the \emph{result,} followed possibly by the \emph{variable~=~value
+list} (see §\ref{subsec:evalVv-list}) is displayed.
+\end{itemize}
+Environments may include the various AMS environments as well as the
+standard \LaTeX{} inline ( \verb`$ $` or \verb`\( \)` ), \texttt{equation}
+( \verb`\[ \]` ) and \texttt{eqnarray} environments. For an example
+of \verb`\eval` within an \verb`align*` environment see §\ref{subsec:introExploring}
+below. 
+\begin{itemize}
+\item When the \verb`\eval` command is wrapped\emph{ around} a math environment,
+the result is displayed in the form, \emph{formula = result} (followed
+possibly by the \emph{variable~=~value list}) within that environment,
+\begin{itemize}
+\item If the formula is long or contains many variables then it may be desirable
+to split the display over two lines; see §\ref{subsec:evalChanging-display-format}
+and §\ref{subsec:settings New-line-display},
+\end{itemize}
+\end{itemize}
+the whole presented as an inline expression if \verb`$` delimiters
+are used, or as a display-style expression otherwise. (See the $mc^{2}$
+example for an illustration.) 
+
+It is not clear to me that wrapping \verb`\eval` \emph{around} the
+AMS environments, except for \texttt{multline}, makes much sense,
+although it can be done. Here is an example of \verb`\eval` wrapped
+around a \texttt{multline{*}} environment (the phantom is there so
+that the hanging $+$ sign spaces correctly),\medskip{}
+
+\begin{minipage}[t]{0.8\columnwidth}%
+\begin{verbatim}
+\eval{ \begin{multline*}
+          1+2+3+4+5+6+7+8+9+10+\phantom{0}\\
+            11+12+13+14+15+16+17+18+19 
+       \end{multline*} }
+\end{verbatim}
+%
+\end{minipage}
+
+\medskip{}$\Longrightarrow$ %
+\begin{minipage}[t]{0.8\columnwidth}%
+\vspace{-2ex}\eval{ \begin{multline*}       
+		1+2+3+4+5+6+7+8+9+10+\phantom{0}\\       		  11+12+13+14+15+16+17+18+19      
+\end{multline*} }%
+\end{minipage}
+\begin{itemize}
+\item It is also possible to dispense with math delimiters entirely, neither
+wrapped within nor wrapped around the \verb`\eval` command, but in
+that case \texttt{numerica} acts as if \verb`\eval` had been used
+within \verb`\[` and \verb`\]` and displays the result accordingly.
+\end{itemize}
+
+\subsection{Checking}
+
+A question I found on the internet that caught my attention was to
+simplify $\sqrt{220-30\sqrt{35}}$. I found myself intrigued. After
+some bumbling and fumbling, I let 
+\[
+x=\sqrt{220-30\sqrt{35}},\qquad y=\sqrt{220+30\sqrt{35}},
+\]
+(which seems an obvious thiing to do). Then 
+\[
+xy=10\sqrt{484-315}=10\sqrt{13^{2}}=130.
+\]
+Since $x^{2}+y^{2}=440$ it was then easy to form both $(x+y)^{2}$
+and $(x-y)^{2}$ and by separating the resulting numbers into their
+prime factors, to work out that $x=5\sqrt{7}-3\sqrt{5}$. Was I right? 
+\begin{centred}
+\verb`\eval{$ \sqrt{220-30\sqrt{35}} $}` $\Longrightarrow$ \eval{$ \sqrt{220-30\sqrt{35}} $},
+
+\verb`\eval{$ 5\sqrt{7}-3\sqrt{5} $}` $\Longrightarrow$ \eval{$ 5\sqrt{7}-3\sqrt{5} $}.
+\end{centred}
+Yes, the simplification was correct. And indeed $y=5\sqrt{7}+3\sqrt{5}$:
+\begin{centred}
+\verb`\eval{$ \sqrt{220+30\sqrt{35}} $}` $\Longrightarrow$ \eval{$ \sqrt{220+30\sqrt{35}} $},
+
+\verb`\eval{$ 5\sqrt{7}+3\sqrt{5} $}` $\Longrightarrow$ \eval{$ 5\sqrt{7}+3\sqrt{5} $}.
+\end{centred}
+As a final flourish,
+\begin{verbatim}
+    \eval{$ xy $}
+       [ x=5\sqrt{7}-3\sqrt{5}, 
+         y=5\sqrt{7}+3\sqrt{5} ]
+\end{verbatim}
+$\Longrightarrow$     \eval{$ xy $}
+       [x=5\sqrt{7}-3\sqrt{5}, 
+        y=5\sqrt{7}+3\sqrt{5}].
+
+\subsection{Exploring}
+
+\label{subsec:introExploring}When working on \texttt{numerica}'s
+predecessor package, I constantly tested it against known results
+to check for coding errors. One test was to ensure that 
+\[
+\left(1+\frac{1}{n}\right)^{n}
+\]
+did indeed converge to the number $e$ as $n$ increased.\texttt{ }Let's
+do that here. Try first $n=10$:
+\begin{center}
+\verb`\eval{$ e-(1+1/n)^n $}[n=10][x]` $\Longrightarrow$ \eval{$ e-(1+1/n)^n $}[n=10][x].
+\par\end{center}
+
+\noindent (The default number of decimal places displayed is $6$.)
+The difference between $e$ and $(1+1/n)^{n}$ is about an eighth
+($0.125$) when $n=10$, which is encouraging but hardly decisive.
+The obvious thing to do is increase the value of $n$. I'll use an
+\verb`align*` environment to `prettify' the presentation of the
+results:
+\begin{verbatim}
+  \begin{align*}
+    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^5][*x],\\
+    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^6][*x],\\
+    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^7][*x],\\
+    e-(1+1/n)^{n} & =\eval{e-(1+1/n)^n}[n=1\times10^8][*x].
+  \end{align*}
+\end{verbatim}
+(most of which was written using copy and paste) which produces
+\begin{align*}
+e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{5}][x],\\
+e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{6}][*x],\\
+e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{7}][x],\\
+e-(1+1/n)^{n} & =\eval{e-(1+1/n)^{n}}[n=1\times10^{8}][x].
+\end{align*}
+Clearly $(1+1/n)^{n}$ converges to $e$, the difference between them
+being of order $1/n$, but that is not what catches the eye. There
+is an unanticipated regularity here. 1.35914? Double the number: \verb`$\eval{2\times 1.35914}[5]$`\texttt{
+}$\Longrightarrow\eval{2\times1.35914}[5]$ which is close enough
+to $e$ to suggest a relationship, namely,
+\[
+\lim_{n\to\infty}n\left(e-\left(1+\frac{1}{n}\right)^{n}\right)=\tfrac{1}{2}e.
+\]
+
+This was new to me. Is it true? From the familiar expansion of the
+logarithm
+
+\begin{align*}
+\ln\left(1+\frac{1}{n}\right)^{n} & =n\ln\left(1+\frac{1}{n}\right)\\
+ & =n\left(\frac{1}{n}-\frac{1}{2}\frac{1}{n^{2}}+\frac{1}{3}\frac{1}{n^{3}}-\ldots\right)\\
+ & =1-\frac{1}{2n}\left(1-\frac{2}{3}\frac{1}{n}+\frac{2}{4}\frac{1}{n^{2}}-\right)\\
+ & \equiv1-\frac{1}{2n}E_{n},
+\end{align*}
+say. Since $E_{n}$ is an alternating series and the magnitudes of
+the terms of the series tend to $0$ monotonically, $1>E_{n}>1-2/3n$.
+From this and the inequalities $1/(1-x)>e^{x}>1+x$ when $x<1$ it
+proved a straightforward matter to verify the proposed limit.
+
+\subsection{Reassuring}
+
+\label{subsec:introReassurance}In the course of some hobbyist investigations
+in plane hyperbolic geometry I derived the formula
+\[
+\Phi_{1}(m,n)=\cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)\frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi},
+\]
+for $m=2,3,\ldots$ and integral $n\ge2m+1$. A key concern was: when
+is $\Phi_{1}$ positive? After an embarrassingly laborious struggle,
+I managed to work this expression into the form
+\[
+\Phi_{2}(m,n)=\left(\frac{1-4\sin^{2}\tfrac{m}{3n}\pi}{2\sin^{2}\tfrac{m}{3n}\pi}\right)\sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi,
+\]
+in which the conditions for positivity are clear: with $n\ge2m+1$,
+so that $m\pi/3n<\pi/6$, the first factor is always positive, the
+second is positive for $m\ge2$, and the third is positive for $m\ge4$.
+All well and good, but given the struggle to derive $\Phi_{2}$, was
+I confident that $\Phi_{1}$ and $\Phi_{2}$ really\emph{ }are equal?
+It felt all too likely that I had made a mistake. 
+
+The simplest way to check was to see if the two expressions gave the
+same numerical answers for a number of $m,\thinspace n$ values. I
+wrote \verb`\eval{\[ \]}[m=2,n=5]` twice and between the delimiters
+pasted the already composed expressions for $\Phi_{1}$ and $\Phi_{2}$,
+namely: 
+\begin{verbatim}
+    \eval{\[ 
+            \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
+            \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
+            {2\sin^{2}\tfrac{m}{3n}\pi} 
+          \]}[m=2,n=5]
+    \eval{\[ 
+            \left(
+              \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
+              {2\sin^{2}\tfrac{m}{3n}\pi}
+            \right)
+            \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
+          \]}[m=2,n=5]
+\end{verbatim}
+I have added some formatting – indenting, line breaks – to make the
+formulas more readable for the present document but otherwise left
+them unaltered. The \verb`\eval` command can be used for even quite
+complicated expressions without needing to tinker with their \LaTeX{}
+form, but you may wish – as here – to adjust white space to clarify
+the component parts of the formula. Running \texttt{pdflatex} on these
+expressions, the results were
+
+\eval{\[ 
+        \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
+        \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
+        {2\sin^{2}\tfrac{m}{3n}\pi} 
+      \]}[m=2,n=5]
+
+\eval{\[ 
+        \left(
+          \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
+          {2\sin^{2}\tfrac{m}{3n}\pi}
+        \right)
+       \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
+      \]}[m=2,n=5]
+
+\noindent which was reassuring. Doing it again but with different
+values of $m$ and $n$, again the results coincided:
+
+\eval{\[ 
+        \cos\tfrac{m}{n}\pi-(1-4\sin^{2}\tfrac{m}{3n}\pi)
+        \frac{\sin\tfrac{1}{n}\pi\sin\tfrac{m-1}{n}\pi}
+        {2\sin^{2}\tfrac{m}{3n}\pi} 
+      \]}[m=5,n=13]
+
+\eval{\[ 
+        \left(
+          \frac{1-4\sin^{2}\tfrac{m}{3n}\pi}
+          {2\sin^{2}\tfrac{m}{3n}\pi}
+        \right)
+       \sin\tfrac{2m-3}{3n}\pi\sin\tfrac{m-3}{3n}\pi
+      \]}[m=5,n=13]
+
+\noindent Thus reassured that there was \emph{not }an error in my
+laborious derivation of $\Phi_{2}$ from $\Phi_{1}$, it was not difficult
+to work back from $\Phi_{2}$ to $\Phi_{1}$ then reverse the argument
+to find a straightforward derivation. 
+
+\chapter{\texttt{\textbackslash nmcEvaluate} (\texttt{\textbackslash eval)}}
+
+The main calculational command in \texttt{numerica} is \verb`\nmcEvaluate`.
+Unlike some other commands which are loaded optionally, \verb`\nmcEvaluate`
+is \emph{always} loaded, and therefore always available. Because \verb`\nmcEvaluate`
+would be tiresome to write too frequently,\texttt{ }particularly for
+back-of-envelope calculations, there is an equivalent short-name form,
+\verb`\eval`, used almost exclusively in the following. But note:
+wherever you see the command \verb`\eval`, you can substitute \verb`\nmcEvaluate`
+and obtain the same result.
+
+\verb`\eval` (like other short-name forms of other commands in the
+\texttt{numerica} suite) is defined using \verb`\ProvideDocumentCommand`
+from the \texttt{xparse} package. Hence if \verb`\eval` has already
+been defined in some other package already loaded, it will not be
+redefined by \texttt{numerica}. It will retain its meaning in the
+other package. Its consequent absence from \texttt{numerica} may be
+an irritant, but only that; \verb`\nmcEvaluate` is defined using
+\texttt{xparse}'s \verb`\DeclareDocumentCommand` which would override
+any (freakishly unlikely) previous definition of \verb`\nmcEvaluate`
+in another package and would therefore still be available.
+
+\section{Syntax of \texttt{\textbackslash nmcEvaluate (\textbackslash eval)}}
+
+There are five arguments to the \verb`\nmcEvaluate` (or \verb`\eval`)
+command, of which only one, the third, is mandatory. All others are
+optional. If all are deployed the command looks like
+\begin{centred}
+\noindent \verb`\nmcEvaluate*[settings]{expr.}[vv-list][num. format]`
+\end{centred}
+I discuss the various arguments in the referenced sections.
+\begin{enumerate}
+\item \verb`*` optional switch; if present ensures display of only the
+numerical result (suppresses display of the formula and vv-list);
+see §\ref{subsec:evalVvSuppresList}
+\item \verb`[settings]` optional comma-separated list of \emph{key=value
+}settings for this particular calculation; see §\ref{sec:settingsOption}
+\item \verb`{expr.}` the only mandatory argument; the mathematical expression/formula
+in \LaTeX{} form that is to be evaluated 
+\item \verb`[vv-list]` optional comma-separated list of \emph{variable=value
+}items; see §\ref{subsec:evalVv-list}
+\item \verb`[num. format]` optional format specification for presentation
+of the numerical result (rounding, padding with zeros, scientific
+notation, boolean output); see~§\ref{subsec:evalRoundingEtc}
+\end{enumerate}
+Note that arguments 4 and 5 are both square-bracket delimited optional
+arguments. Should only one such argument be used, \texttt{numerica}
+determines which is intended by looking for an equals sign within
+the argument. Its presence indicates the argument is the vv-list;
+its absence indicates the argument is the number format specification. 
+
+The vv-list and number-format specification are \emph{trailing} optional
+arguments. They do not need to be hard against their preceding arguments;
+intervening spaces are allowed. This means there is a possibility
+that should the \verb`\eval` command be followed by a square-bracketed
+mathematical expression \texttt{numerica} might confuse it with one
+of its trailing arguments. Experience using \texttt{numerica} suggests
+that this will be a (very) rare occurrence and is easily prevented
+by inserting an empty brace pair (\verb`{}`) before the offending
+square-bracketed expression. Allowing spaces between the arguments
+enables complicated expressions and large vv-lists to be formatted
+with new lines and white space to aid clarity – without requiring
+the insertion of comment characters (\verb`%`).
+
+Recommended practice is to minimise the number of optional arguments
+used in \LaTeX{} commands by consolidating such arguments into a single
+\emph{key=value} list. Although \texttt{numerica} uses such an argument,
+the vv-list does not fit naturally into that scheme. And practice
+suggests that separating out the elements of the number format specification
+(rounding value, padding with zeros, scientific notation, boolean
+output) and placing them in a trailing argument is both convenient
+and intuitive for the kind of back-of-envelope calculations envisaged
+for \texttt{numerica}. 
+
+\section{The variable=value list}
+
+\label{subsec:evalVv-list}To evaluate algebraic, trigonometric and
+other formulas that involve \emph{variables} we need to give those
+variables values. This is done in the \emph{variable=value list} –
+or \emph{vv-list} for short. This is the fourth argument of the \texttt{\textbackslash nmcEvaluate}
+command and is a square-bracket delimited optional argument (optional
+because an expression may depend only on constants and numbers).
+
+\subsection{Variable names}
+
+\label{subsec:evalVariableNames}In mathematical practice, variable
+names are generally single letters of the Roman or Greek alphabets,
+sometimes also from other alphabets, in a variety of fonts, and often
+with subscripts or primes or other decorations. In \texttt{numerica}
+a variable name is \emph{what lies to the left of the equals sign
+in an item} of the vv-list. Thus variables can be multi-token affairs:
+$x',x'',x^{iv},x_{n},x'_{n},x''_{mn}$, $^{k}C_{n},var,\mathrm{var},Fred,\mathbf{Fred},\mathcal{FRED}\ldots$
+(This criterion for what makes a variable name means a name may contain
+spaces – for instance \verb`x x` should not cause a \verb`numerica`
+error – but such names are not part of mathematical practice.) Usually,
+for the kind of back-of-envelope calculations envisaged for \verb`numerica`,
+and for ease of typing, most variables will be single letters from
+the Roman or Greek alphabets. 
+
+Because equals signs and commas give structure to the vv-list, it
+should also be clear that a variable name should not contain a \emph{naked}
+equals sign or a \emph{naked} comma. They can be incorporated in a
+variable name but only when decently wrapped in braces, like \verb`R_{=}`
+displaying as $R_{=}$ or \verb`X_{,i}` displaying as $X_{,i}$. 
+
+Note that $x$ and $\mathrm{x}$ will be treated by \verb`numerica`
+as \emph{different} variables since, in the underlying \LaTeX , one
+is \texttt{x} and the other \verb`\mathrm{x}`. Even names that look
+identical in the pdf may well be distinct in \LaTeX . This is true
+particularly of superscripts and subscripts: \verb`x_0` and \verb`x_{0}`
+appear identical in the pdf but in the underlying \LaTeX{} they are
+distinct, and will be treated as distinct variables by \verb`numerica`. 
+
+Although multi-token variables are perfectly acceptable, \emph{internally}
+\verb`numerica` works with single tokens. Variable names can be so
+different in structure, one from another, that to ease the parsing
+of formulas, all \emph{internal} variable names are assumed to be
+single tokens. Hence a necessary initial step for the package is to
+map all multi-token variable names in the vv-list and the formula
+to single tokens. \verb`numerica` does this by turning the multi-token
+variable names into control sequences with names in the sequence \verb`\nmc_a`,
+\verb`\nmc_b`, \verb`\nmc_c`, etc., then searches through the vv-list
+and the formula for every occurrence of the multi-token names and
+replaces them with the relevant control sequences. It does this in
+order of decreasing size of name, working from the names that contain
+most tokens down to names containing only two tokens. (Doing the replacing
+in this order prevents \emph{parts} of longer names possibly being
+mistaken for shorter variable names.) 
+
+The conversion process uses computer resources. Even if there are
+no multi-token variables present, \verb`numerica` still needs to
+check that this is so – unless the user alerts the program to the
+fact. This can be done by making a brief entry \texttt{xx=0 }in the
+settings option (the second optional argument of \verb`\nmcEvaluate`);
+see §\ref{subsec:settingsMultitokSwitch}. If the user never (or hardly
+ever) uses multi-token variables, then a more permanent solution is
+to create a file \verb`numerica.cfg`\texttt{ }with the line \texttt{multitoken-variables
+= false}; see §\ref{sec:settingsDefaults} for this.
+
+\subsection{The vv-list and its use}
+
+A vv-list is a comma-separated list where each item is of the form
+\emph{variable=value}. It might be something simple like
+\begin{lyxcode}
+{[}g=9.81,t=2{]}
+\end{lyxcode}
+or something more complicated like
+\begin{lyxcode}
+{[}V\_S=\textbackslash tfrac43\textbackslash pi~r\textasciicircum 3,V\_C=2\textbackslash pi~r\textasciicircum 2h,h=3/2,r=2{]}.
+\end{lyxcode}
+Spaces around the equals signs or the commas are stripped away during
+processing so that 
+\begin{lyxcode}
+{[}g=9.81,t=2{]}~\textrm{and}~{[}~g~=~9.81~,~t~=~2{]}
+\end{lyxcode}
+are the \emph{same} variable=value list.
+
+\subsubsection{Evaluation from right to left}
+
+In these examples, with variables depending on other variables, there
+is an implication: that the list is evaluated \emph{from the right}.
+Recall how a function of a function is evaluated, say\emph{ }$y=f(g(h(x)))$.
+To evaluate $y$, first $x$ is assigned a value then $h(x)$ is calculated,
+then $g(h(x))$ then $f(g(h(x)))=y$. We work from right to left,
+from the innermost to the outermost element. Or consider an example
+like calculating the area of a triangle by means of the formula
+\[
+A=\sqrt{s(s-a)(s-b)(s-c)}.
+\]
+First we write the formula; then we state how $s$ depends on $a,b,c$,
+namely $s=\frac{1}{2}(a+b+c)$, then we give values to $a,b,c$. In
+\texttt{numerica} this is mirrored in the layout of the \verb`\eval`
+command:
+\begin{verbatim}
+    \eval{$ \sqrt{s(s-a)(s-b)(s-c)} $}
+                 [s=\tfrac12(a+b+c),a=3,b=4,c=5]
+\end{verbatim}
+The formula in a sense is the leftmost extension of the vv-list. The
+entire evaluation occurs from right to left.
+
+This means that the rightmost variable in the vv-list can depend only
+on constants and numbers – although it may be a complicated expression
+of those elements. Other variables in the vv-list can depend on variables
+\emph{to their right} but not to their left.
+
+\subsubsection{Expressions in the variable=value list}
+
+Suppose our expression is $\tfrac{4}{3}\pi r^{3}$, the volume $V_{S}$
+of a sphere in terms of its radius $r$, and we want to calculate
+the volume for different values of $r$ to get a sense of how rapidly
+volume increases with radius.
+\begin{centred}
+\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=1] $` $\Longrightarrow$ $ V_S=\eval{ \tfrac43\pi r^3 }[r=1] $.
+\end{centred}
+Having set up this calculation it is now an easy matter to change
+the value of $r$ in the vv-list:
+\begin{centred}
+\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=1.5] $` $\Longrightarrow$
+$ V_S= \eval{ \tfrac43\pi r^3 }[r=1.5] $.
+
+\verb`$ V_S=\eval{ \tfrac43\pi r^3 }[r=2] $` $  \Longrightarrow $ $V_S= \eval{ \tfrac43\pi r^3 }[r=2] $.
+\end{centred}
+To compute the volume $V_{C}=\pi r^{2}h$ of a cylinder, we have two
+variables to assign values to:
+\begin{centred}
+\verb`$ V_C=\eval{ \pi r^2h }[h=4/3,r=1] $` $\Longrightarrow$ $ V_C=\eval{ \pi r^2h }[h=4/3,r=1] $.
+\end{centred}
+Although values in the vv-list are generally either numbers or simple
+expressions (like \texttt{4/3}), that is not essential. A little more
+complicated is
+\begin{centred}
+\verb`$ V_C=\eval{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
+$ V_C=\eval{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $.
+\end{centred}
+where calculation of the volume of the cylinder has been split into
+two: first calculate the area $A_{C}$ of its circular base and then,
+once that has been effected, calculate the volume.
+
+A second example is provided by Brahmagupta's formula for the area
+of a triangle in terms of its semi-perimeter. In a triangle ABC, the
+sides are $a=3$, $b=4$ and $c=5$. (Of course we know this is a
+right-angled triangle with area $\tfrac{1}{2}ab=6$.) The semi-perimeter
+$s=\tfrac{1}{2}(a+b+c)$ and the area of ABC is \medskip{}
+\begin{verbatim}
+    \eval{$ \sqrt{s(s-a)(s-b)(s-c) $}
+                 [s=\tfrac12(a+b+c),a=3,b=4,c=5] 
+\end{verbatim}
+$\Longrightarrow$ \eval{$ \sqrt{s(s-a)(s-b)(s-c)} $}
+    [s=\tfrac12(a+b+c),a=3,b=4,c=5].
+
+\subsubsection{Constants}
+
+\label{subsec:Built-in-Constants}\verb`numerica` has five built-in
+constants and can also accept user-defined constants. For the latter,
+see §\ref{sec:supplConstants}. The five built-in constants known
+to \texttt{numerica} are \verb`\pi`, the ratio of circumference to
+diameter of a circle; \verb`e`, the base of natural logarithms; Euler's
+constant \verb`\gamma`, the limit of $\left(\sum_{1}^{N}1/n\right)-\ln N$
+as $N\to\infty$; the golden ratio \verb`\phi`, equal to $\tfrac{1}{2}(1+\surd5)$;
+and the utilitarian constant \verb`\deg`, the number of radians in
+a degree.
+\begin{centred}
+\verb`\eval{$ \pi $}` $\Longrightarrow$ \eval{$ \pi $},
+
+\verb`\eval{$ e $}` $\Longrightarrow$ \eval{$ e $},
+
+\verb`\eval{$ \gamma $}` $\Longrightarrow$ \eval{$ \gamma $},
+
+\verb`\eval{$ \phi $}` $\Longrightarrow$ \eval{$ \phi $},
+
+\verb`\eval{$ \deg $}` $\Longrightarrow$ \eval{$ \deg $},
+\end{centred}
+so that \verb`\eval{$ 180\deg $}` $\Longrightarrow$ \eval{$ 180\deg $}
+(as it should).
+
+Let's combine two of these in a formula:
+\begin{centred}
+\verb`\eval{$ e^\pi-\pi^e $}` $\Longrightarrow$ \eval{$ e^\pi-\pi^e $},
+\end{centred}
+which is close-ish to $\tfrac{1}{4}e$: \verb`\eval{$ \tfrac14e $}`
+$\Longrightarrow$ \eval{$ \tfrac14e $}.
+
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+In some contexts it may feel natural to use any or all of \verb`\pi`,
+\verb`e`, \verb`\gamma` and \verb`\phi` as variables by assigning
+values to them in the vv-list. \cprotect\texttt{numerica} does not
+object. The values assigned in this way override the constants' values.
+For example, if the triangle we labelled ABC previously was instead
+labelled CDE then it has sides $c=3,d=4$ and (note!) $e=5$. It's
+area therefore is\medskip{}
+\begin{verbatim}
+    \eval{$ \sqrt{s(s-c)(s-d)(s-e)} $}
+              [s=\tfrac12(c+d+e),c=3,d=4,e=5]       
+\end{verbatim}
+$\Longrightarrow$ 
+
+\eval{$ \sqrt{s(s-c)(s-d)(s-e)} $}
+    [s=\tfrac12(c+d+e),c=3,d=4,e=5].\medskip{}
+
+\noindent Since this is the correct area we see that \cprotect\texttt{e}
+has been treated as a variable with the assigned value $5$, not as
+the constant. But if \cprotect\texttt{e} (or \verb`\pi` or \verb`\gamma`
+or \verb`\phi`) is not assigned a value in the vv-list then it has,
+by default, the value of the constant. In the case of \cprotect\texttt{e},
+if you wish to use it as a variable, the constant is always available
+as \verb`\exp(1)`. There is no similar alternative available for
+\verb`\pi`, \verb`\gamma` or \verb`\phi`. \end{shaded}%
+\end{minipage}
+
+\subsection{Display of the vv-list}
+
+By default, the vv-list is displayed with (in fact following) the
+numerical result. That and the format of the display can both be changed.
+
+\subsubsection{Star option: suppressing display of the vv-list}
+
+\label{subsec:evalVvSuppresList}If display of the vv-list is not
+wanted at all, only the numerical result, it suffices to attach an
+asterisk (star) to the \texttt{\textbackslash eval} command:
+\begin{centred}
+\verb`$ V_C=\eval*{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
+$ V_C=\eval*{ hA_C }[A_C=\pi r^2,h=4/3,r=1] $,
+\end{centred}
+or simply the naked result:
+\begin{centred}
+\verb`\eval*{$ hA_C $}[A_C=\pi r^2,h=4/3,r=1]` $\Longrightarrow$
+\eval*{$ hA_C $}[A_C=\pi r^2,h=4/3,r=1].
+\end{centred}
+In the latter case, note that a negative result will display with
+a hyphen for the minus sign unless you, the user, explicitly write
+math delimiters around the \verb`\eval*` command as a whole. Wrapping
+them around the formula has no effect:
+\begin{centred}
+\verb`\eval*{$ y $}[y=ax+b,x=2,a=-2,b=2]` $\Longrightarrow$ \eval*{$ y $}[y=ax+b,x=2,a=-2,b=2],
+
+\verb`$ \eval*{ y }[y=ax+b,x=2,a=-2,b=2] $` $\Longrightarrow$ $ \eval*{ y }[y=ax+b,x=2,a=-2,b=2] $.
+\end{centred}
+The star option delivers a number as result, pure and simple.
+
+\subsubsection{Suppressing display of items}
+
+\label{subsec:evalVvSuppressVars}You may wish to retain some variables
+in the vv-list display, but not all. For those variables you wish
+omitted from the display, wrap each variable (but not the equals sign
+or value) in braces. When calculating the volume of a cylinder in
+the previous examples, the base area $A_{C}$ has a different status
+from the `fundamental' variables $r$ and $h$. It is an intermediate
+value, one that we pass through on the way to the final result. To
+suppress it from display enclose the variable in braces:
+\begin{centred}
+\verb`$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,h=4/3,r=1] $` $\Longrightarrow$
+$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,h=4/3,r=1] $.
+\end{centred}
+As you can see, $A_{C}$ no longer appears in the displayed vv-list.
+Of course the name and its value are still recorded `behind the scenes'
+and can still be used in calculations.
+
+\subsubsection{Empty vv-list suppressed}
+
+Should the vv-list be empty, or display of \emph{all} variables is
+suppressed by wrapping each in braces, then \emph{nothing} is displayed
+where the vv-list would normally be, not even any punctuation:
+\begin{centred}
+\verb`$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,{h}=4/3,{r}=1] $` $\Longrightarrow$
+$ V_C=\eval{ hA_C }[{A_C}=\pi r^2,{h}=4/3,{r}=1] $
+\end{centred}
+If you want a full stop after the result then you will need to add
+it by hand or use the \verb`p=.` setting of §\ref{subsec:settingsPunctuation}.
+
+\subsubsection{Changing the display format}
+
+\label{subsec:evalChanging-display-format}In two examples above,
+we have calculated the area of a triangle using Brahmagupta's formula.
+Display of the result is crowded. Two remedies have just been suggested,
+but a third one and preferable in this case would be to force display
+of the vv-list and result to a new line. This can be done through
+the settings option to the \verb`\eval` command, discussed in §\ref{subsec:settings New-line-display}.
+However, if \verb`\eval` is wrapped around an \emph{appropriate}
+environment (like \verb`multline`, but not \verb`equation`) it can
+also be done simply by including \texttt{\textbackslash\textbackslash}
+at the end of the formula. 
+
+In the following example I use Brahmagupta's formula for calculating
+the area of a cyclic quadrilateral (of which his formula for a triangle
+is a special case). The cyclic quadrilateral in the example is formed
+by a 45-45-90 triangle of hypotenuse 2 joined along the hypotenuse
+to a 30-60-90 triangle. The sides are therefore $\surd2,\surd2,\surd3,1$.
+Adding the areas of the two triangles, the area of the quadrilateral
+is $A=1+\tfrac{1}{2}\surd3$, or in decimal form, \verb`$\eval{1+\tfrac12\surd3}$`
+$\Longrightarrow$ $\eval{1+\tfrac12\surd3}$. Let's check with Brahmagupta's
+formula:
+\begin{verbatim}
+    \eval{
+      \begin{multline*}
+        \sqrt{(s-a)(s-b)(s-c)(s-d)}\\
+      \end{multline*} 
+         }[s=\tfrac12(a+b+c+d),
+           a=\surd2,b=\surd2,c=\surd3,d=1] 
+\end{verbatim}
+$\Longrightarrow$     \eval{
+      \begin{multline*}
+        \sqrt{(s-a)(s-b)(s-c)(s-d)}\\
+      \end{multline*} 
+         }[s=\tfrac12(a+b+c+d),
+           a=\surd2,b=\surd2,c=\surd3,d=1]
+
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+
+\subsubsection{Abusing multi-token variable names}
+
+\label{subsec:evalDon't-do-this!}A variable name is what lies to
+the left of the equals sign of an item in the vv-list. Since multi-token
+variables are converted to single tokens (like \verb`\nmc_a`) before
+any calculating is done, it is possible to sin. Thus :
+\begin{centred}
+\verb`\eval{$ \sin\pi $}[{\sin\pi}=1]` $\Longrightarrow$ \eval{$ \sin\pi $}[{\sin\pi}=1];
+\end{centred}
+and (more?) egregiously,
+\begin{centred}
+\verb`\eval{$ 10 $}[{10}=20]` $\Longrightarrow$ \eval{$ 10 $}[{10}=20].
+\end{centred}
+What is happening here is that the multi-token `variables' \verb`\sin\pi`
+and \verb`10` are being converted, right at the start of proceedings,
+to single tokens like \verb`\nmc_a`, which in \TeX -speak are macros
+containing their respective multiple tokens. For display purposes
+they expand to those multiple tokens, but for calculating within \verb`numerica`
+the single token is used. By this means one can easily create further
+grotesqueries:
+\begin{centred}
+\verb`\eval{$ ++ + ++ $}[{++}=1]` $\Longrightarrow$ \eval{$ ++ + ++ $}[{++}=1],
+
+\verb`\eval{$ 2(1+1) $}[{2(1}=3,{+1)}=5]` $\Longrightarrow$ \eval{$ 2(1+1) $}[{2(1}=3,{+1)}=5],
+
+\verb`\eval{$ 1!! $}[{!!}=42]` $\Longrightarrow$ \eval{$ 1!! $}[{!!}=42].
+\end{centred}
+Should \verb`numerica` try to check variable names to avoid consequences
+like this? I don't see any reasonable way of doing that. Symbols like
+\verb`(` and \verb`+` can easily be part of valid variable names
+– $k^{+},\,k^{-}$, $C_{n}^{(0)}$ and so on. It is left to the user,
+in any \emph{public} document, to avoid such sins. (And they could
+easily construct the displayed expressions in \LaTeX{} if they so wished
+without recourse to \verb`\eval` at all.) See also §\ref{subsec:supplMacrosDisplay}
+where a similar issue arises with user-defined macros.\end{shaded}%
+\end{minipage}
+
+\section{Formatting the numerical result}
+
+\label{subsec:evalRoundingEtc}Internally, values are stored to $16$
+significant figures (if available), calculations are carried out to
+$16$ significant figures, but only rarely do we want to view the
+result to $16$ figures. Generally, we round to some smaller number
+of figures. The default rounding value is $6$, meaning by default
+at most $6$ decimal places are shown. So far, all results have been
+rounded to this figure, although not all digits are always displayed
+– for instance if the sixth one is $0$, or the result is an integer. 
+
+Like other elements of the display, both rounding value and the (dis)appearance
+of trailing zeros can be customized, in this case by means of an optional
+argument following the vv-list (or the formula if there is no vv-list).
+This optional argument may contain up to four juxtaposed items from
+six possibilities:
+\begin{itemize}
+\item a question mark ?, which gives boolean output, or 
+\item an integer, the \emph{rounding value}, positive, negative or zero,
+specifying how many decimal places to display the result to, or
+\item an asterisk {*}, which pads the result with zeros should it not have
+as many decimal places as the rounding value specifies, or
+\item the character \texttt{x} (lower case!) which presents the result in
+`proper' scientific notation (a form like $1.2345\times10^{5}$
+for 123450), or
+\item the character \texttt{t} (lower case!) which presents the result in
+a bastardized scientific notation useful in tables (a form like $(5)1.2345$
+for 123450), or
+\item a character other than \texttt{?}, \texttt{{*}}, \texttt{x}, \texttt{t}
+or an integer, usually  one of the letters\texttt{ e d} \texttt{E
+D}, which presents the result in scientific notation with that character
+as the exponent mark (a form like $1.2345\text{e}5$ for $123450$).
+\end{itemize}
+If you use \texttt{?} in the same specification as some other character,
+the \texttt{?} prevails; if you use \texttt{x} in the same specification
+as some other character except for \texttt{?}, the \texttt{x} prevails;
+if you use \texttt{t} in the same specification as some other character
+except for \texttt{?} or \texttt{x}, the \texttt{t} prevails.
+
+If you repeat the character serving as the exponent mark in scientific
+notation – say \verb`xx` or \verb`dd` – then scientific notation
+extends to numbers in the interval \verb`[1,10)`.
+
+If you repeat a question mark specifying boolean output, then the
+formatting of that output is changed from \verb`1/0` to $T/F$ or
+\verb`T/F` depending as there are two or three question marks used.
+
+\subsection{Rounding value }
+
+\label{subsec:evalRounding-value}If the number is displayed as a
+decimal, the rounding value specifies the number of decimal places
+displayed. If a number is displayed in scientific notation (see below
+§\ref{subsec:evalScientificNotation}) that is still true, but it
+can mean differences in the overall number of digits displayed. For
+the moment, I show the effect of rounding in a purely decimal display:
+\begin{centred}
+\verb`$ \eval{ 1/3 }[4] $` $\Longrightarrow$ $ \eval{ 1/3 }[4] $
+\end{centred}
+In this case \verb`4` was entered in the number-format option and
+the result is displayed to four decimal places. The default rounding
+value is $6$:
+\begin{centred}
+\verb`$ \eval{ 35/3 } $` $\Longrightarrow$ $ \eval{ 35/3 } $
+\end{centred}
+Following the default behaviour in \verb`l3fp`, the calculational
+engine which \verb`numerica` uses, `ties' are rounded to the nearest
+\emph{even} digit. Thus a number ending $55$ with a `choice' of
+rounding to $5$ or $6$ rounds up to the even digit $6$, and a number
+ending $65$ with a `choice' of rounding to $6$ or $7$ rounds
+down to the even digit $6$:
+\begin{centred}
+\verb`$ \eval{ 0.1234555 } $`  $\Longrightarrow\eval{0.1234555}$ 
+
+\verb`$ \eval{ 0.1234565 } $`  $\Longrightarrow\eval{0.1234565}$ 
+\end{centred}
+\verb`l3fp` works to 16 significant figures and never displays more
+than that number (and often fewer). 
+\begin{itemize}
+\item In the first of the following although I have specified a rounding
+value of $19$ only $16$ decimal places are displayed, with the final
+digit rounded up to $7$; 
+\item in the second I have added $10$ zeros after the decimal point, meaning
+that all $19$ decimal places specified by the rounding value can
+be displayed since the 10 initial zeros do not contribute to the significant
+figures; 
+\item in the third I have changed the figure \emph{before} the decimal point
+to $1$ so that the $10$ added zeros are now included among the significant
+figures; 
+\item and in the fourth, I have added $9$ digits before the decimal point:
+\end{itemize}
+\begin{centred}
+\verb`$ \eval{ 0.1234567890123456789 }[19] $` $\Longrightarrow$
+$\eval{ 0.1234567890123456789 }[19]$
+
+\verb`$ \eval{ 0.00000000001234567890123456789 }[19] $` $\Longrightarrow$
+$\eval{ 0.00000000001234567890123456789 }[19]$
+
+\verb`$ \eval{ 1.00000000001234567890123456789 }[19] $` $\Longrightarrow$
+$\eval{ 1.00000000001234567890123456789 }[19]$
+
+\verb`$ \eval{ 987654321.1234567890123456789 }[19] $` $\Longrightarrow$
+$\eval{ 987654321.1234567890123456789 }[19]$
+\end{centred}
+In all cases, no more than $16$ \emph{significant} figures are displayed,
+although the number of decimal places displayed may exceed $16$ as
+in the second example.
+
+It is possible to use \emph{negative} rounding values. Such a value
+zeroes the specified number of digits \emph{before} the decimal point.
+\begin{centred}
+\verb`$ \eval{ 987654321.123456789 }[-4] $` $\Longrightarrow$ $\eval{ 987654321.123456789 }[-4]$
+\end{centred}
+A rounding value of $0$ rounds to the nearest integer:
+\begin{centred}
+\verb`$ \eval{ 987654321.123456789 }[0] $` $\Longrightarrow$ $\eval{ 987654321.123456789 }[0]$
+\end{centred}
+If you wish to change the \emph{default} rounding value from $6$
+to some other value, this can be done by creating or editing a file
+\texttt{numerica.cfg} in a text editor; see §\ref{sec:settingsDefaults}.
+
+\subsection{Padding with zeros }
+
+\label{subsec:evalPadding-with-zeros}A result may contain fewer decimal
+places than the rounding value specifies, the trailing zeros being
+suppressed by default (this is how \texttt{l3fp} does it). Sometimes,
+perhaps for reasons of presentation like aligning columns of figures,
+it may be desirable to pad results with zeros. This is achieved by
+inserting an asterisk, {*}, into the final optional argument of the
+\verb`\eval` command:
+\begin{centred}
+\verb`$ \eval{ 1/4 }[4] $` $\Longrightarrow$ $ \eval{ 1/4 }[4] $,
+
+\verb`$ \eval{ 1/4 }[4*] $` $\Longrightarrow$ $ \eval{ 1/4 }[4*] $.
+\end{centred}
+
+\subsection{Scientific notation }
+
+\label{subsec:evalScientificNotation} \verb`l3fp` can output numbers
+in scientific notation. For example, $1234$ is rendered as $\eval{1234}[e]$,
+denoting $1.234\times10^{3}$ , and $0.008$ as $\eval{0.008}[e]$,
+denoting $8\times10^{-3}$. The `e' here, the \emph{exponent mark},
+separates the \emph{significand} ($1.234$) from the \emph{exponent}
+($3$). In scientific notation, the significand always has one \emph{non-zero}
+digit before the decimal point.\footnote{Except for $0$ itself.}
+
+For scientific notation rounding still means the number of decimal
+places displayed, but it can result in very different numbers of digits
+being shown from the number shown in decimal form. To switch on output
+in scientific notation in \verb`numerica` enter \verb`e` in the
+trailing optional argument: 
+\begin{centred}
+\verb`$ \eval{ 123.456789 }[e] $` $\Longrightarrow$ $ \eval{ 123.456789 }[e] $. 
+\end{centred}
+The default rounding value $6$ is in play here, with seven digits
+of the significand displayed overall, one preceding the decimal point,
+six following it. Compare this with the same number rounded in decimal
+form:
+\begin{centred}
+\verb`$ \eval{ 123.456789012345 } $` $\Longrightarrow$ $ \eval{ 123.456789012345 } $. 
+\end{centred}
+In this instance, nine digits are displayed, three before the decimal
+point and six after. Similarly compare
+\begin{centred}
+\verb`$ \eval{ 0.0123456789 }[e] $` $\Longrightarrow$ $ \eval{ 0.0123456789 }[e] $ 
+\end{centred}
+with
+\begin{centred}
+\verb`$ \eval{ 0.0123456789 } $` $\Longrightarrow$ $ \eval{ 0.0123456789 } $.
+\end{centred}
+This time scientific notation has gained two extra decimal digits
+to display.
+
+Negative rounding values are pointless for scientific notation. A
+zero might on occasion be relevant:
+\begin{centred}
+\verb`$ \eval{ 987654321 }[0e] $` $\Longrightarrow$ $ \eval{ 987654321 }[0e] $.
+\end{centred}
+Sometimes letters other than `e' are used to indicate scientific
+notation, like `E' or `d' or `D'. With a few exceptions, \texttt{numerica}
+allows any letter or text character to be used as the exponent marker:
+\begin{centred}
+\verb`\eval{$ 1/23456789 $}[4d]`\texttt{ $\Longrightarrow$} \eval{$ 1/23456789 $}[4d].
+\end{centred}
+But when \texttt{x} is inserted in the trailing optional argument,
+the output is in the form $d_{0}.d_{1}\ldots d_{m}\times10^{n}$ (except
+when $n=0$), where each $d_{i}$ denotes a digit.
+\begin{centred}
+\verb`\eval{$ 1/23456789 $}[4x]`\texttt{ $\Longrightarrow$ }\eval{$ 1/23456789 $}[4x] .
+\end{centred}
+The requirements of tables leads to another form of scientific notation.
+Placing \texttt{t} in the trailing argument turns on this table-ready
+form of notation:
+\begin{centred}
+\verb`\eval{$ 1/23456789 $}[4t]`\texttt{ $\Longrightarrow$ }\eval{$ 1/23456789 $}[4t].
+\end{centred}
+This is discussed more fully in the documentation for the \texttt{numerica-tables}
+package.
+
+In the next example three options are used in the trailing argument.
+The order in which the items are entered does not matter: 
+\begin{centred}
+\verb`\eval{$ 1/125 $}[*e4]`  $\Longrightarrow$ \eval{$ 1/125 $}[*e4].
+\end{centred}
+Finally, to illustrate that `any' text character\footnote{Be sensible! An equals sign for instance might confuse \texttt{numerica}
+into thinking the number-format option is the vv-list, and will certainly
+confuse the reader.} save for \texttt{x} or \texttt{t} can be used to distinguish the
+exponent, I use an @ character:
+\begin{centred}
+\verb`\eval{$ 1/125 $}[@4]` $\Longrightarrow$ \eval{$ 1/125 $}[@4].
+\end{centred}
+
+\subsubsection{Numbers in the interval \texttt{{[}1,10)}}
+
+Usually when scientific notation is being used, numbers with magnitude
+in the interval $[1,10)$ are rendered in their normal decimal form,
+$3.14159$ and the like. Occasionally it may be desired to present
+numbers in this range in scientific notation (this can be the case
+in tables where the alignment of a column of figures might be affected).
+\texttt{numerica} offers a means of extending scientific notation
+to numbers in this range by repeating the letter chosen as the exponent
+mark in the trailing optional argument.
+\begin{centred}
+\verb`\eval{$ \pi $}[4tt]` $\Longrightarrow$ \eval{$ \pi $}[4tt] 
+\end{centred}
+
+\subsubsection{\textbackslash eval{*} and scientific notation}
+
+Scientific notation can be used for the numerical result output by
+\verb`\eval*`:
+\begin{centred}
+\verb`\eval*{ \pi }[ee]` $\Longrightarrow$ \eval*{ \pi }[ee] 
+\end{centred}
+There is one catch: if you substitute \texttt{x} for \texttt{e} here,
+\LaTeX{} will complain about a missing \verb`$`. An \texttt{x} in
+the number-format option produces a \verb`\times` in the output which
+requires a math environment. It is up to you, as the user, to provide
+the necessary delimiters outside the \verb`\eval*` command. (This
+applies even when \verb`\eval*` wraps around math delimiters.)
+
+\subsection{Boolean output}
+
+\label{subsec:evalBoolean-output}\verb`l3fp` can evaluate comparisons,
+outputting $0$ if the comparison is false, $1$ if it is true. By
+entering a question mark, \texttt{?}, in the trailing optional argument,
+you can force \verb`numerica` to do the same depending as the result
+of a calculation is zero or not. The expression being evaluated does
+not need to be a comparison, \verb`$ \eval{\pi}[?] $` $\Longrightarrow$ $ \eval{\pi}[?]$,
+but comparisons are what this is designed for.
+
+Possible comparison relations are \verb`=`, \verb`<`, \verb`>`,
+\verb`\ne`, \verb`\neq`, \verb`\ge`, \verb`\geq`, \verb`\le`,
+\verb`\leq`. Although programming languages use combinations like
+\verb`<=` or \verb`>=`, \texttt{numerica} does \emph{not} accept
+these (they are not part of standard \emph{mathematical} usage) and
+will generate an error. An example where the relation is equality
+exhibits a numerological curiosity:\footnote{The \texttt{{[}p=.{]}} of this and the next example ensures a full
+stop appears in the correct place; see §\ref{subsec:settingsPunctuation}.}
+\begin{centred}
+\verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[5?]` $\Longrightarrow$
+\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[5?]\smallskip{}
+\end{centred}
+Notice the $5$ alongside the question mark in the trailing argument.
+That is critical. Change the $5$ to a $6$ (or omit it since the
+default rounding value is $6$) and the outcome is different: 
+\begin{centred}
+\verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?]` $\Longrightarrow$
+\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6?]
+\end{centred}
+Now the relation is false. Evaluating the fraction to more than $6$
+places, say to $9$, we can see what is going on:
+\begin{centred}
+\verb`\eval{$ 1/0.0123456789 $}[9]` $\Longrightarrow$ \eval{$ 1/0.0123456789 $}[9]. 
+\end{centred}
+
+\subsubsection{Outputting \texttt{T} or \texttt{F}}
+
+To my eye, outputting $0$ or $1$ in response to a `question' like
+$1/0.0123456789=81$ is confusing. It is easy to change the boolean
+output from $0,1$ to a more appropriate $F,T$, or \texttt{$\texttt{F,\texttt{T}}$}
+by adding one or two more question marks respectively in the number-format
+option.
+\begin{centred}
+\verb`\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6???]` $\Longrightarrow$
+\eval[p=.]{\[ \frac1{0.0123456789}=81 \]}[6???]
+\end{centred}
+The default boolean output format is chosen to be $0,1$ in case an
+\verb`\eval` command is used within another \verb`\eval` command
+(`nesting'– see Chapter~\ref{chap:Nesting}~). The inner command
+needs to output a \emph{numerical} answer.
+
+\subsubsection{Rounding error tolerance}
+
+\label{subsec:evalToleranceRounding}If at least one of the terms
+in a comparison is the result of a calculation, then it's value is
+likely to contain rounding errors. What level of rounding error can
+we tolerate before such errors interfere with the comparison being
+made? \texttt{l3fp} tolerates none. It decides the truth or falsity
+of a comparison to all $16$ significant figures: 1.000 0000 0000
+0000 and 1.000 0000 0000 0001 are \emph{not }equal in \texttt{l3fp}.
+But for most purposes this will be far too severe a criterion.
+
+Suppose our comparison relation is $\varrho$, denoting one of =,
+<, >, \verb`\le`, etc. If $X\rel Y$ then $X-Y\rel Y-Y$, i.e. $X-Y\rel0$.
+This is what \texttt{numerica} does. It takes the right-hand side
+of the relation from the left-hand side and then compares the \emph{rounded}
+difference under $\varrho$ to $0$. The rounding value used is the
+number specified with the question mark in the trailing argument of
+the \verb`\eval` command or, if no number is present, the default
+rounding value (`out of the box' this is $6$). Thus, in a recent
+example, $1/0.0123456789-81$ when rounded to $5$ decimal places
+is $0.00000$, indistinguishable from zero at this rounding value;
+hence the equality $1/0.0123456789=81$ is true. But when rounded
+to $6$ places it is $0.000001$ which \emph{is} distinguishable from
+zero and so the equality is false. Truth or falsity depends on the
+rounding value. 
+
+When dealing with numbers generated purely mathematically, rounding
+values of $5$ or $6$ are likely to be too small. More useful would
+be rounding values closer to \texttt{l3fp}'s $16$ – perhaps $14$?
+– depending on how severe the calculations are that generate the numbers.
+However if the numbers we are dealing with come from outside mathematics,
+from practical experiments perhaps, then even a rounding value of
+$5$ or $6$ may be too large. 
+
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+Mathematically, the claim that $X=Y$ at a rounding value $n$ is
+the claim that 
+\[
+\abs{X-Y}\le5\times10^{-(n+1)}.
+\]
+since this rounds \emph{down} to zero at $n$ places of decimals.
+This gives a more accurate test of equality than doing things in the
+opposite order – rounding each number first and then taking the difference.
+One might, for instance, have numbers like $X=0.12345$, $Y=0.12335$.
+Rounding to $n=4$ places, both round to $0.1234$ and yet the difference
+between them is $0.0001$ – they are distinguishable numbers to $4$
+places of decimals. This is why \texttt{numerica} forms the difference
+\emph{before }doing the rounding.\end{shaded}%
+\end{minipage}
+
+\subsubsection{And, Or, Not}
+
+For logical And \LaTeX{} provides the symbols \verb`\wedge` and \verb`\land`,
+both displaying as $\land$, but \texttt{numerica} adds thin spaces
+( \verb`\,` ) around the symbol for \verb`\land` (copying the package
+\texttt{gn-logic14.sty}). For logical Or \LaTeX{} provides the symbols
+\verb`\vee` and \verb`\lor`, both displaying as $\lor$, but again
+\texttt{numerica} adds thin spaces around the symbol for \verb`\lor`. 
+\begin{centred}
+\verb`\eval{$ 1<2 \wedge 2<3 $}[??]` $\Longrightarrow$ \eval{$ 1<2 \wedge 2<3 $}[??],
+
+\verb`\eval{$ 1<2 \land 2<3 $}[???]` $\Longrightarrow$ \eval{$ 1<2 \land 2<3 $}[???].
+\end{centred}
+To my eye the second of these with its increased space around the
+wedge symbol displays the meaning of the overall expression better
+than the first. Both And and Or have equal precedence; in cases of
+ambiguity the user needs to parenthesize as necessary to clarify what
+is intended.
+
+\LaTeX{} provides two commands for logical Not, \verb`\neg` and \verb`\lnot`,
+both displaying as $\lnot$ . Not binds tightly to its argument:
+\begin{centred}
+\verb`\eval{$ \lnot A \land B $}[A=0,B=0]` $\Longrightarrow$ \eval{$ \lnot A \land B $}[A=0,B=0].
+\end{centred}
+Here \verb`\lnot` acts only on the $A$; if it had acted on $A\land B$
+as a whole the result would have been different:
+\begin{centred}
+\verb`\eval{$ \lnot(A \land B) $}[A=0,B=0]` $\Longrightarrow$ \eval{$ \lnot(A \land B) $}[A=0,B=0].
+\end{centred}
+For a little flourish, I evaluate a more complicated logical statement:\footnote{Quoting from an article in \emph{Quanta Magazine} (August 2020) by
+Kevin Hartnett: `Let’s say you and two friends are planning a party.
+The three of you are trying to put together the guest list, but you
+have somewhat competing interests. Maybe you want to either invite
+Avery or exclude Kemba. One of your co-planners wants to invite Kemba
+or Brad or both of them. Your other co-planner, with an ax to grind,
+wants to leave off Avery or Brad or both of them. Given these constraints,
+you could ask: Is there a guest list that satisfies all three party
+planners?' I have written $C$ for Kemba, $A$ and $B$ for Avery
+and Brad.}
+\begin{verbatim}
+    \eval{$(A\lor\lnot C)\land(C\lor B)\land
+           (\lnot A\lor\lnot B)$}[A=1,B=0,C=1][???]
+\end{verbatim}
+$\Longrightarrow$ \eval{$(A\lor\lnot C)\land(C\lor B)\land
+                (\lnot A\lor\lnot B)$}[A=1,B=0,C=1][???].
+
+\subsubsection{Chains of comparisons}
+
+\texttt{numerica} can handle chains of comparisons like $1<2<1+2<5-1$.
+`Behind the scenes' it inserts logical And-s into the chain, $1<2\land2<1+2\land1+2<5-1$,
+and evaluates the modified expression:
+\begin{centred}
+\verb`\eval{$ 1<2<1+2<5-1 $}[?'']` $\Longrightarrow$ \eval{$ 1<2<1+2<5-1 $}[?''].
+\end{centred}
+
+\subsubsection{\texttt{amssymb} comparison symbols}
+
+\label{subsec:evalAmssymb-comparisons}\texttt{numerica} accepts some
+alternative symbols for the basic comparison relations from the \texttt{amssymb}
+package provided that package is loaded, i.e. the preamble of your
+document includes the statement
+\begin{lyxcode}
+\textbackslash usepackage\{amssymb\}
+\end{lyxcode}
+The variants from this package are: \verb`\leqq` ( $\leqq$ ), \verb`\leqslant`
+( $\leqslant$ ), \verb`\geqq` (~$\geqq$~), and \verb`\geqslant`
+( $\geqslant$ ).\footnote{No, that is not \texttt{eggplant}.} There
+are also negations: \verb`\nless` ( $\nless$ ), \verb`\nleq` (~$\nleq$~),
+\verb`\nleqq` ( $\nleqq$ ), \verb`\nleqslant` ( $\nleqslant$ ),
+\verb`\ngtr` ( $\ngtr$ ), \verb`\ngeq` ( $\ngeq$ ), \verb`\ngeqq`
+( $\ngeqq$ ), \verb`\ngeqslant` ( $\ngeqslant$ ).
+
+\section{Calculational details}
+
+\subsection{Arithmetic}
+
+\label{subsec:evalArithmetic}Addition, subtraction, multiplication,
+division, square roots, \emph{$n$}th roots, and exponentiating (raising
+to a power) are all available. 
+
+Multiplication can be rendered explicitly with an asterisk, 
+\begin{centred}
+\verb`\eval{$ 9*9 $}` $\Longrightarrow$ \eval{$ 9*9 $},
+\end{centred}
+but that's ugly. More elegant is to use \verb`\times`:
+\begin{centred}
+\verb`\eval{$ 9\times9 $}` $\Longrightarrow$ \eval{$ 9\times9 $}.
+\end{centred}
+\verb`\cdot` is also available and in many cases juxtaposition alone
+suffices: 
+\begin{centred}
+\verb`\eval{$ \surd2\surd2 $}` $\Longrightarrow$ \eval{$ \surd2\surd2 $},
+
+\verb`\eval{$ ab $}[a=123,b=1/123]` $\Longrightarrow$ \eval{$ ab $}[a=123,b=1/123].
+\end{centred}
+Division can be rendered in multiple ways too:
+\begin{centred}
+\verb`\eval{$ 42/6 $}` $\Longrightarrow$ \eval{$ 42/6 $},
+
+\verb`\eval{$ 42\div6 $}` $\Longrightarrow$ \eval{$ 42\div6 $},
+\end{centred}
+or by using \verb`\frac` or \verb`\tfrac` or \verb`\dfrac` as in
+\begin{centred}
+\verb`\eval{$ \frac{42}6 $}` $\Longrightarrow$ \eval{$ \frac{42}6 $}.
+\end{centred}
+But note that since juxtaposition means multiplication, it is also
+true that $42\tfrac{1}{6}$\texttt{ }evaluates to $7$ inside an \verb`\eval`
+command rather than denoting `forty two and a sixth'. Hence if you
+want to use `two and a half' and similar values in \texttt{numerica},
+they need to be entered as improper fractions like $\tfrac{5}{2}$
+or in decimal form, $2.5$ (as one does automatically in mathematical
+expressions anyway because of the ambiguity in a form like $2\tfrac{1}{2}$).
+
+Powers are indicated with the superscript symbol \verb`^`:
+\begin{centred}
+\verb` \eval{$ 3^{2^2} $}` $\Longrightarrow$ \eval{$ 3^{2^2} $} .
+\end{centred}
+
+\subsubsection{Square roots and $n$th roots}
+
+\label{subsec:evalSquareRootsEtc}Let us check that 3, 4, 5 and 5,
+12, 13 really are Pythagorean triples (I use \verb`\sqrt` in the
+first, \verb`\surd` in the second):
+\begin{centred}
+\verb`\eval{$ \sqrt{3^2+4^2} $}` $\Longrightarrow$ \eval{$\sqrt{3^{2}+4^{2}}$},
+
+\verb`\eval{$ \surd(5^2+12^2) $}` $\Longrightarrow$ \eval{$ \surd(5^2+12^2) $}.
+\end{centred}
+The \verb`\sqrt` command has an optional argument which can be used
+for extracting $n$th roots of a number. This notation is generally
+used when $n$ is a small positive integer like $3$ or $4$. This
+practice is followed in \texttt{numerica}: $n$ must be a (not necessarily
+small) \emph{positive integer}:
+\begin{centred}
+\verb`\eval{$ \sqrt[4]{81} $}` $\Longrightarrow$  \eval{$ \sqrt[4]{81} $},
+
+\verb`\eval{$ \sqrt[n]{125} $}[n=\floor{\pi}]` $\Longrightarrow$
+\eval{$ \sqrt[n]{125} $}[n=\floor{\pi}].
+\end{centred}
+If $n$ should not be a positive integer, an error message is generated;
+see §\ref{sec:evalErrors}.
+
+For display-style expressions, the \verb`\sqrt` command grows to
+accommodate the extra vertical height; the surd doesn't. Here is an
+example which anticipates a number of matters not discussed yet. It
+shows \verb`\eval` wrapping around a square root containing various
+formatting commands (negative spaces, \verb`\left` and \verb`\right`
+nested within \verb`\bigg` commands), all digested without complaint
+(see §\ref{subsec:evalFormatting-commands}; and see §\ref{subsec:settingsPunctuation}
+for the \verb`[p=.]`): \medskip{}
+\begin{verbatim}
+    \eval[p=.]{\[ \sqrt[3]{\!
+      \biggl(\!\left.\frac AD\right/\!\frac BC\biggr)
+        }\]}[A=729,B=81,C=9,D=3]
+\end{verbatim}
+$\Longrightarrow$\eval[p=.]
+  {\[ 
+    \sqrt[3]
+      {\!\biggl(\!\left.\frac AD\right/\!\frac BC\biggr)}
+  \]}[A=729,B=81,C=9,D=3]
+
+As implemented in \texttt{numerica}, $n$th roots found using \verb`\sqrt[n]`
+are \verb`n=<integer>`\emph{ }roots. This raises an interesting question:
+if the `$n$' of an $n$th root is the result of a calculation,
+what happens with rounding errors? The calculation may not produce
+an \emph{exact} integer. (This problem also arises with factorials;
+see §\ref{subsec:evalFactorialsBinom}.) The solution employed in
+\texttt{numerica} is to make what is considered an integer depend
+on a rounding value. Most calculations will produce rounding errors
+in distant decimal places. For `int-ifying' calculations, \texttt{numerica}
+uses a rounding value of $14$: a calculation produces an integer
+if, when rounded to $14$ figures, the result is an integer. Since
+\texttt{l3fp} works to $16$ significant figures, a rounding value
+of $14$ allows ample `elbowroom' for rounding errors to be accommodated
+when judging what is an integer and what is not. As a practical matter
+problems should not arise. 
+
+\subsubsection{\emph{n}th roots of negative numbers}
+
+Odd (in the sense of `not even') integral roots of \emph{negative}
+numbers are available with \verb`\sqrt`,
+\begin{centred}
+\verb`\eval{$ \sqrt[3]{-125} $}` $\Longrightarrow$ \eval{$ \sqrt[3]{-125} $},
+
+\verb`\eval{$ \sqrt[3]{-1.25} $}` $\Longrightarrow$ \eval{$ \sqrt[3]{-0.125} $}.
+\end{centred}
+
+\subsubsection{Inverse integer powers }
+
+Of course to find an $n$th root we can also raise to the inverse
+power,
+\begin{centred}
+\verb`\eval{$ 81^{1/4} $}` $\Longrightarrow$ \eval{$ 81^{1/4} $}.
+\end{centred}
+However, raising a \emph{negative} number to an inverse power generates
+an error even when, mathematically, it should not. This matter, which
+is a product of floating point representation of numbers, is discussed
+below in §\ref{subsec:errorsInverse-powers}.
+
+\subsection{Precedence, parentheses}
+
+The usual precedence rules apply: multiplication and division bind
+equally strongly and more strongly than addition and subtraction which
+bind equally stongly. Exponentiating binds most strongly. Evaluation
+occurs from the left.
+\begin{centred}
+\verb`\eval{$ 4+5\times6+3 $}` $\Longrightarrow$ \eval{$ 4+5\times6+3 $},
+
+\verb`\eval{$ 6\times10^3/2\times10^2 $}` $\Longrightarrow$ \eval{$ 6\times10^3/2\times10^2 $},
+\end{centred}
+which may not be what was intended. Parentheses (or brackets or braces)
+retrieve the situation:
+\begin{centred}
+\verb`\eval{$ (4+5)(6+3) $}` $\Longrightarrow$ \eval{$ (4+5)(6+3) $},
+
+\verb`\eval{$ (6\times10^3)/(2\times10^2) $}` $\Longrightarrow$
+\eval{$ (6\times10^3)/(2\times10^2) $}.
+\end{centred}
+Because exponentiating binds most strongly, negative values must be
+parenthesized when raised to a power. If not,
+\begin{centred}
+\verb`\eval{$ -4^2 $}` $\Longrightarrow$ \eval{$ -4^2 $},
+\end{centred}
+which is clearly not $(-4)^{2}$. But
+\begin{centred}
+\verb`\eval{$ (-4)^2 $}` $\Longrightarrow$ \eval{$ (-4)^2 $}.
+\end{centred}
+
+\subsubsection{Command-form brackets}
+
+\label{subsec:evalCommandBrackets}Note that brackets of all three
+kinds are available also in command form: \verb`\lparen \rparen`
+(from \verb`mathtools`) for \verb`( )`, \verb`\lbrack \rbrack`
+for \verb`[ ]`, and \verb`\lbrace \rbrace` for \verb`\{ \}`.
+
+\subsection{Modifiers\texttt{ (\textbackslash left \textbackslash right}, etc.)}
+
+The  \verb`\left` and \texttt{\textbackslash right} modifiers and
+also the series of \verb`\big...` modifiers\texttt{ }(\texttt{\textbackslash}\verb`bigl \bigr`,
+\verb`\Bigl \Bigr`, \verb`\biggl \biggr`, \verb`\Biggl \Biggr`)
+are available for use with all brackets (parentheses, square brackets,
+braces):
+\begin{verbatim}
+    \eval[p=.]{\[ \exp\left(
+        \dfrac{\ln2}{4}+\dfrac{\ln8}{4} 
+      \right) \]}
+\end{verbatim}
+$\Longrightarrow$ \eval[p=.]{\[ \exp\left( \dfrac{\ln2}{4}+\dfrac{\ln8}{4} \right) \]}
+
+\texttt{numerica} also accepts their use with \texttt{.} (dot) and
+with \texttt{/} (as noted earlier, the \verb`[p]` and \verb`[p=.]`
+are explained at §\ref{subsec:settingsPunctuation}):
+\begin{centred}
+\verb`\eval[p]{\[ \left.\dfrac{3+4}{2+1}\right/\!\dfrac{1+2}{4+5} \]}`
+$\Longrightarrow$ \eval[p=.]{\[ \left. \dfrac{3+4}{2+1} \right/\!\dfrac{1+2}{4+5} \]}
+\end{centred}
+They can be nested.
+
+\subsection{Trigonometric \& hyperbolic functions}
+
+\LaTeX{} provides all six trignometric functions, \verb`\sin`, \verb`\cos`,
+\verb`\tan`, \verb`\csc`, \verb`\sec`, \verb`\cot` and the three
+principal inverses \verb`\arcsin`, \verb`\arccos`, \verb`\arctan`.
+It also provides four of the six hyperbolic functions: \verb`\sinh`,
+\verb`\cosh`, \verb`\tanh`, \verb`\coth`, and \emph{no} inverses.
+\texttt{numerica} provides the missing hyperbolic functions, \verb`\csch`
+and \verb`\sech`, and all missing inverses, the three trigonometric
+and all six hyperbolic: \verb`\arccsc`, \verb`\arcsec`, \verb`\arccot`,
+and \verb`\asinh`, \verb`\acosh`, \verb`\atanh`, \verb`\acsch`,
+\verb`\asech`, \verb`\acoth`. (\emph{HMF} writes $\text{arcsinh}$,
+$\text{arccosh}$, etc. and ISO recommends $\text{arsinh}$, $\text{arcosh}$,
+etc. The first seems ill-advised, the second not widely adopted. At
+present neither is catered for in \texttt{numerica}.)\emph{ }
+\begin{centred}
+\verb`\eval{$ \arctan1/1\deg $}` $\Longrightarrow$ \eval{$ \arctan 1/1\deg $} ,
+
+\verb`\eval{$ \atanh\tanh3 $}` $\Longrightarrow$ \eval{$ \atanh\tanh3 $} .
+\end{centred}
+Inverses can also be constructed using the `$-1$' superscript notation.
+Thus
+\begin{centred}
+\verb`\eval{$ \sin^{-1}(1/\surd2)/1\deg $}` $\Longrightarrow$ \eval{$ \sin^{-1}(1/\surd2)/1\deg $} ,
+
+\verb`\eval{$ \tanh\tanh^{-1}0.5 $}` $\Longrightarrow$ \eval{$ \tanh\tanh^{-1}0.5 $} .
+\end{centred}
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+
+\subsubsection*{Hyperbolic functions}
+
+Please note that \texttt{l3fp} does not (as yet) provide \emph{any}
+hyperbolic functions natively. The values \texttt{numerica} provides
+for these functions are \emph{calculated} values using familiar formulas
+involving exponentials (for the direct functions) and natural logarithms
+and square roots for the inverses. Rounding errors mean the values
+calculated may not have $16$-figure accuracy. The worst `offenders'
+are likely to be the least used, \verb`\acsch` and \verb`\asech`.
+For instance,
+\[
+\acsch x=\ln\left[\frac{1}{x}+\left(\frac{1}{x^{2}}+1\right)^{1/2}\right],
+\]
+
+\begin{centred}
+\verb`\eval{$ \csch \acsch 7 $}[16]` $\Longrightarrow$ \eval{$ \csch \acsch 7 $}[16].
+\end{centred}
+\end{shaded}%
+\end{minipage}
+
+\subsection{Logarithms}
+
+The natural logarithm \verb`\ln`, base $10$ logarithm \verb`\lg`,
+and binary or base $2$ logarithm \verb`\lb` are all recognized,
+as is \verb`\log`, preferably with a subscripted base:
+\begin{centred}
+\verb`\eval{$ \log_{12}1728 $}` $\Longrightarrow$ \eval{$ \log_{12}1728 $}
+\end{centred}
+If there is no base indicated, base $10$ is assumed. (The notations
+\verb`\ln`, \verb`\lg`, and \verb`\lb` follow ISO 80000-2 recommendation,
+which frowns upon the use of the unsubscripted \verb`\log` although
+only \verb`\ln` appears widely used.) The base need not be explicitly
+entered as a number. It could be entered as an expression or be specified
+in the vv-list:
+\begin{centred}
+\verb`\eval*{$ \log_b c $}[b=2,c=1024]` $\Longrightarrow$ \eval*{$ \log_b c $}[b=2,c=1024],
+\end{centred}
+the log to base $2$ in this case. It is possible to use the unadorned
+\verb`\log` with a base different from $10$; if you wish to do this
+only for a particular calculation see §\ref{subsec:settingsLogBase},
+or see §\ref{sec:settingsDefaults} if you want to make this default
+behaviour.
+
+\subsection{Other unary functions}
+
+Other unary functions supported are the exponential function \verb`\exp`
+and signature function \verb`\sgn` (equal to $-1$, $0$, or $1$
+depending as its argument is $<0$, $=0$, or $>0$). 
+
+\subsection{Squaring, cubing, \ldots unary functions}
+
+\texttt{numerica} has no difficulty reading a familiar but `incorrectly
+formed' expression like 
+\[
+\sin^{2}1.234+\cos^{2}1.234.
+\]
+You do not have to render it $(\sin1.234)^{2}+(\cos1.234)^{2}$ or
+(heaven forbid) $(\sin(1.234))^{2}+(\cos(1.234))^{2}$. The everyday
+usage is fine:
+\begin{centred}
+\verb`\eval{$ \sin^2\theta+\cos^2\theta $}[\theta=1.234]` $\Longrightarrow$
+\eval{$ \sin^2\theta+\cos^2\theta $}[\theta=1.234] .
+\end{centred}
+Equally \texttt{numerica} has no difficulty reading the `correct'
+but pedantic form
+\begin{centred}
+\verb`\eval{$ (\sin(\theta))^2+(\cos(\theta))^2 $}[\theta=1.234]`
+$\Longrightarrow$ \eval{$ (\sin(\theta))^2+(\cos(\theta))^2 $}[\theta=1.234] .
+\end{centred}
+A hyperbolic identity is corroborated in this example:
+\begin{centred}
+\verb`\eval{$ \sinh 3x $}[x=1]` $\Longrightarrow$ \eval{$ \sinh 3x $}[x=1],\medskip{}
+
+\verb`\eval{$ 3\sinh x+4\sinh^3x $}[x=1]` $\Longrightarrow$ \eval{$ 3\sinh x+4\sinh^3x $}[x=1].
+\end{centred}
+In fact all named unary functions in \texttt{numerica} can be squared,
+cubed, etc., in this `incorrect' but familiar way, although the
+practice outside the trigonometric and hyperbolic context seems (vanishingly?)
+rare.
+
+When the argument of the function is parenthesized and raised to a
+power – like $\sin(\pi)^{2}$ – it is read by \texttt{numerica} as
+the `sine of the square of pi', $\sin(\pi^{2})$, and \emph{not
+}as the `square of the sine of pi', $(\sin\pi)^{2}$:
+\begin{centred}
+\verb`\eval{$ \sin(\pi)^2 $}` $\Longrightarrow$ \eval{$ \sin(\pi)^2  $} .
+\end{centred}
+Things are done like this in \texttt{numerica} above all to handle
+the logarithm in a natural way. Surely $\ln x^{n}=n\ln x$, i.e. $\ln x^{n}=\ln(x^{n})$
+rather than $(\ln x)^{n}$? And if we wish to write (as we do) $\ln(1+1/n)^{n}=n\ln(1+1/n)=1-1/2n+1/3n^{2}-\ldots$
+to study the limiting behaviour of $(1+1/n)^{n}$, then we cannot
+avoid $\ln(x)^{n}=n\ln(x)=\ln(x^{n})$ too.
+
+\subsection{\emph{n}-ary functions}
+
+The functions of more than one variable ($n$-ary functions) that
+\texttt{numerica} supports are \verb`\max`, \verb`\min` and \verb`\gcd`,
+greatest common divisor. The comma list of arguments to \verb`\max`,
+\verb`\min` or \verb`\gcd` can be of arbitrary length. The arguments
+themselves can be expressions or numbers. For \verb`\gcd`, \emph{non-integer
+arguments are truncated to integers}. Hence both $y$ and $3y$ are
+independently truncated in the following example – to $81$ and $243$
+respectively:
+\begin{centred}
+\verb`\eval{$ \gcd(12,10x^2,3y,y,63) $}[y=1/0.0123456789,x=3]` $\Longrightarrow$
+\eval{$ \gcd(12,10x^2,3y,y,63) $}[y=1/0.0123456789,x=3] .
+\end{centred}
+(The truncation occurs in the argument of \verb`\gcd`, not in the
+vv-list.) 
+
+For $n$-ary functions, squaring, cubing, etc. follows a different
+pattern from that for unary functions. For \verb`\max`, \verb`\min`,
+\verb`\gcd` the argument of the function is a comma list. Squaring
+the argument makes no sense. We understand the superscript as applying
+to the function as a whole. (Consistency is not the point here; it
+is what mathematicians do that \texttt{numerica} tries to accommodate.)
+\begin{centred}
+\verb`\eval{$ \gcd(3x,x,\arcsin 1/\deg)^2 $}[x=24]` $\Longrightarrow$
+\eval{$ \gcd(3x,x,\arcsin 1/\deg)^2 $}[x=24] .
+\end{centred}
+
+\subsection{Delimiting arguments with brackets \& modifiers }
+
+Arguments of unary and $n$-ary functions can be delimited not only
+with parentheses, but also with square brackets and braces, both in
+explicit character form and also in the command form of §\ref{subsec:evalCommandBrackets}.
+The brackets, of whatever kind, can be qualified with \verb`\left \right`,
+\verb`\bigl \bigr`, etc.\footnote{See §\ref{subsec:settingsPunctuation} for the \texttt{{[}p=.{]}}
+(which ensures the concluding full stop appears in the correct place.} 
+\begin{centred}
+\verb`\eval[p=.]{\[ \sin\left\lbrack \dfrac\pi{1+2+3}\right\rbrack \]}`
+$\Longrightarrow$\eval[p=.]{\[ \sin\left\lbrack\dfrac\pi{1+2+3}\right\rbrack \]}
+\end{centred}
+
+\subsection{Absolute value, floor \& ceiling functions}
+
+It is tempting to use the \texttt{|} key on the keyboard for inserting
+an absolute value sign. \texttt{numerica} accepts this usage, but
+it is deprecated. The spacing is incorrect – compare $|-l|$ using
+\texttt{|} against $\lvert-l\rvert$ using \verb`\lvert \rvert`.
+Also, the identity of the left and right delimiters makes nested absolute
+values difficult to parse. \texttt{numerica} does not attempt to do
+so. Placing an absolute value constructed with \texttt{|} within another
+absolute value constructed in the same way is likely to produce a
+compilation error or a spurious result. \verb`\lvert \rvert` are
+better in every way except ease of writing.\texttt{ }To aid such ease
+\texttt{numerica }provides the \verb`\abs` function (using the \texttt{\textbackslash DeclarePairedDelimiter}
+command of the \texttt{mathtools} package). This takes a mutually
+exclusive star (asterisk) or square bracketed optional argument, and
+a mandatory braced argument. The starred form expands to \verb`\left\lvert #1 \right\rvert`
+where \verb`#1` is the mandatory argument:
+\begin{centred}
+\verb`\eval[p=.]{\[ 3\abs*{\frac{\abs{n}}{21}-1} \]}[n=-7]` $\Longrightarrow$
+\eval[p=.]{\[ 3\abs*{\frac{\abs{n}}{21}-1} \]}[n=-7]
+\end{centred}
+The optional argument provides access to the \verb`\big...` modifiers:
+\begin{verbatim}
+    \eval[p=.]{\[
+      \abs[\Big]{\abs{a-c}-\abs[\big]{A-C}} 
+    \]}[A=12,a=-10,C=7,c=-5] 
+\end{verbatim}
+$\Longrightarrow$     \eval[p=.]{\[ 
+      \abs[\Big]{\abs{a-c}-\abs[\big]{A-C}} 
+    \]}[A=12,a=-10,C=7,c=-5] 
+
+The form without either star or square bracket option dispenses with
+the modifiers altogether:
+\begin{centred}
+\verb`\eval{$ \tfrac12(x+y)+\tfrac12\abs{x-y} $}[x=-3,y=7].` $\Longrightarrow$
+\eval{$ \tfrac12(x+y)+\tfrac12\abs{x-y} $}[x=-3,y=7].
+\end{centred}
+As noted, the star and square bracketed option are mutually exclusive
+arguments.
+
+\texttt{numerica} also provides the functions \verb`\floor` and \verb`\ceil`,
+defined in the same way, taking a mutually exclusive star or square
+bracketed optional argument and for the starred forms expanding to
+\verb`\left\lfloor #1 \right\rfloor` and \verb`\left\lceil #1 \right\rceil`
+where \verb`#1` is the mandatory argument, and for the square bracket
+option forms replacing the \verb`\left` and \verb`\right` with the
+corresponding \verb`\big` commands. The form without star or square-bracket
+option dispenses with any modifier at all.
+\begin{centred}
+\verb`\eval{$ \floor{-\pi} $}` $\Longrightarrow$ \eval{$ \floor{-\pi} $},
+
+\verb`\eval{$ \ceil{\pi} $}` $\Longrightarrow$ \eval{$ \ceil{\pi} $}.
+\end{centred}
+The floor function, $\lfloor x\rfloor$, is the greatest integer $\le x$;
+the ceiling function, $\lceil x\rceil$ is the smallest integer $\ge x$.
+Like the absolute value, the floor and ceiling functions, can be nested: 
+\begin{centred}
+\verb`\eval{$ \floor{-\pi+\ceil{e}} $}` $\Longrightarrow$ \eval{$ \floor{-\pi+\ceil{e}} $}.
+\end{centred}
+
+\subsubsection{Squaring, cubing, \ldots{} absolute values, etc.}
+
+These three functions can be raised to a power \emph{without} extra
+parentheses:
+\begin{centred}
+\verb`\eval{$ \ceil{e}^2 $},` $\Longrightarrow$ \eval{$ \ceil{e}^2 $},
+
+\verb`\eval{$ \abs{-4}^2 $}.` $\Longrightarrow$ \eval{$ \abs{-4}^2 $}.
+\end{centred}
+
+\subsection{Factorials, binomial coefficients}
+
+\label{subsec:evalFactorialsBinom}Factorials use the familiar trailing
+\texttt{!} notation: 
+\begin{centred}
+\verb`\eval{$ 7! $}` $\Longrightarrow$ \eval{$ 7! $},
+
+\verb`\eval{$ (\alpha+\beta)!-\alpha!-\beta! $}[\alpha=2,\beta=3]`
+$\Longrightarrow$ \eval{$ (\alpha+\beta)!-\alpha!-\beta! $}[\alpha=2,\beta=3].
+\end{centred}
+The examples illustrate how \texttt{numerica} interprets the argument
+of the factorial symbol:\texttt{ }it `digests' 
+\begin{itemize}
+\item a preceding (possibly multi-digit) integer, or
+\item a preceding variable token, or
+\item a bracketed expression, or
+\item a bracket-like expression.
+\end{itemize}
+A bracket-like expression is an absolute value, floor or ceiling function,
+since they delimit arguments in a bracket-like way:
+\begin{centred}
+\verb`\eval{$ \abs{-4}!+\floor{\pi}!+\ceil{e}! $}` $\Longrightarrow$
+\eval{$ \abs{-4}!+\floor{\pi}!+\ceil{e}! $}.
+\end{centred}
+The result of feeding the factorial an expression different in kind
+from one of these four cases may give an error message or an unexpected
+result. Use parentheses around such an expression; for example write
+$(3^{2})!$, rather than $3^{2}!$.
+
+Nesting of brackets for factorials is accepted:
+\begin{centred}
+\verb`\eval{$ ((5-2)!+1)! $}` $\Longrightarrow$ \eval{$ ((5-2)!+1)! $}.
+\end{centred}
+The factorials of negative integers or of non-integers are not defined
+in \texttt{numerica}, and again there is the problem met in relation
+to $n$th roots of what happens if the argument of a factorial is
+the result of a calculation and rounding errors mean it is not an
+exact integer. This problem is unlikely to be of practical concern
+since \texttt{numerica} rounds the result of such a calculation by
+default to $14$ significant figures before offering it to the factorial.
+Since \texttt{l3fp} works to $16$ significant figures, there is ample
+`elbowroom' to accommodate rounding errors before the result of
+a calculation ceases to round to an integer. 
+
+\subsubsection{Double factorials}
+
+The double factorial, written $n!!,$ is the product $n(n-2)(n-4)\ldots\times4\times2$
+when $n$ is even and the product $n(n-2)(n-4)\ldots\times3\times1$
+when $n$ is odd. 
+\begin{centred}
+\verb`\eval{$ 6!! $}` $\Longrightarrow$ \eval{$ 6!! $},
+
+\verb`\eval{$ n!! $}[n=\sqrt{49}]` $\Longrightarrow$ \eval{$ n!! $}[n=\sqrt{49}],
+\end{centred}
+Since $n!=n!!(n-1)!!$ it follows that
+\[
+n!!=\frac{n!}{(n-1)!!}=\frac{(n+1)!}{(n+1)!!}.
+\]
+Putting $n=0$ in the outer equality shows that $0!!=1$. Now putting
+$n=0$ in the left equality gives $(-1)!!=1$. Double factorials therefore
+are defined for integers $\ge-1$.
+
+\subsubsection{Binomial coefficients}
+
+Binomial coefficients are entered in \LaTeX{} with the \verb`\binom`\textbf{
+}command. It takes two arguments and has a text-style version \verb`\tbinom`
+and a display-style version \verb`\dbinom`. As implemented in {\ttfamily\verb`numerica`},
+these are \emph{generalised} binomial coefficients:
+\[
+\binom{x}{k}=\frac{x(x-1)\dots(x-k+1)}{k(k-1)\dots1},\quad(x\in\mathbb{R},~k\in\mathbb{N}),
+\]
+where $x$ need not be a non-negative integer, and where $\binom{x}{0}=1$
+by definition. Although the first (or upper) argument can be any real
+number, the lower argument \emph{must} be a non-negative integer.
+Thus, \verb`\eval{$ \tbinom53 $}` $\Longrightarrow$ \eval{$\tbinom53$},
+\verb`\eval{$ \tbinom70 $}` $\Longrightarrow$ \eval{$\tbinom70$},
+\verb`\eval{$ \tbinom{4.2}3 $}` $\Longrightarrow$ \eval{$\tbinom{4.2}3$},
+but if the second (or lower) argument of \verb`\binom` is \emph{not}
+a non-negative integer, {\ttfamily\verb`numerica`} displays
+a message; see §\ref{subsec:errorsIntegerArgs}. 
+
+\subsection{Sums and products}
+
+\verb`numerica` recognizes sums (\verb`\sum` displaying as $\sum$)
+and products (\verb`\prod` displaying as $\prod$), and expects both
+symbols to have lower and upper summation/product limits specified.
+The lower limit must be given in the form \emph{sum/prod variable
+= initial value}; the upper limit requires only the final value to
+be specified (although it can also be given in the form \emph{sum/prod
+variable = final value}). The values may be expressions depending
+on other variables and values but must evaluate to integers (or infinity
+– see §\ref{sec:settingsInfiniteSumsProds}). Evaluating to an integer
+means that they \emph{round} to an integer, using a rounding value
+that is set by default to $14$; (recall that \texttt{l3fp} works
+to $16$ significant figures). If a limit evaluates to a non-integer
+at this `int-ifying' rounding value, an error message results. (To
+change this `int-ifying' rounding value, see §\ref{subsec:defaultsIntifyingRounding}.)
+
+As an example of expressions in the limits, this example uses the
+floor and ceiling functions to convert combinations of constants to
+integers (the \verb`[p]` is explained in §\ref{subsec:settingsPunctuation}),
+\begin{centred}
+\verb`\eval[p]{\[ \sum_{n=\floor{\pi/e}}^{\ceil{\pi e}}n \]}` $\Longrightarrow$\eval[p]{\[ \sum_{n=\floor{\pi/e}}^{\ceil{\pi e}}n \]}
+\end{centred}
+\noindent (which is $\sum_{n=1}^{9}n$).\emph{ }If the upper limit
+is less than the lower limit the result is zero. Notice that there
+is no vv-list. The summation variable does not need to be included
+there unless there are other variables that depend on it. However,
+in the case
+\begin{centred}
+\verb`\eval[p]{\[ \sum_{k=1}^N\frac1{k^3} \]}[N=100][4]` $\Longrightarrow$
+\eval[p]{\[ \sum_{k=1}^N\frac1{k^3} \]}[N=100][4]
+\end{centred}
+the upper limit $N$ is necessarily assigned a value in the vv-list. 
+
+To the author it seems natural to enter the lower limit first, immediately
+after the \verb`\sum` command (the sum is \emph{from }something \emph{to}
+something), but no problem will accrue if the upper limit is placed
+first (after all, the appearance of the formula in the pdf is the
+same):
+\begin{centred}
+\verb`\eval[p=.]{\[ \sum^N_{k=1}\frac1{k^3} \]}[N=100][4]` $\Longrightarrow$
+\eval[p=.]{\[ \sum^N_{k=1}\frac1{k^3} \]}[N=100][4]
+\end{centred}
+Another example of a sum, using binomial coefficients this time, is 
+\begin{centred}
+\verb`\eval[p]{\[ \sum_{m=0}^5\binom{5}{m}x^m y^{5-m} \]}[x=0.75,y=2.25]`
+$\Longrightarrow$ \eval[p]{\[ \sum_{m=0}^5\binom{5}{m}x^m y^{5-m} \]}[x=0.75,y=2.25]
+\end{centred}
+which is just \verb`\eval{$(x+y)^5$}[x=0.75,y=2.25]` $\Longrightarrow$
+\eval{$ (x+y)^5 $}[x=0.75,y=2.25], or $3^{5}$.
+
+Now let's calculate a product:
+\begin{verbatim}
+    \eval[p]{\[
+      \prod_{k=1}^{100} 
+        \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
+          \]}[x=1][3]
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[\prod_{k=1}^{100} \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)\]}[x=1][3]
+
+\noindent to be compared with \verb`\eval{$ \sinh 1 $}[3]` $\Longrightarrow$
+\eval{$ \sinh1 $}[3]. Obviously more terms than $100$ are required
+in the product to achieve 3-figure accuracy. 
+
+\subsubsection{Infinite sums and products}
+
+How many more? Let's `go the whole hog' and put $\infty$ in the
+upper limit of this product:
+\begin{verbatim}
+    \eval[p=.]{\[
+      \prod_{k=1}^{\infty} 
+        \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
+          \]}[x=1][3] 
+\end{verbatim}
+$\Longrightarrow$ \eval[p=.]
+  {\[
+    \prod_{k=1}^{\infty} 
+      \biggl(\frac{x^2}{k^2\pi^2} +1\biggr)
+  \]}[x=1][3] 
+
+\noindent Disappointingly, we still get the same result, deficient
+by $1$ in the third decimal place. Obviously \texttt{numerica} has
+not multiplied an infinite number of terms and, just as obviously,
+the finite number of terms it \emph{has} multiplied are too few. How
+\texttt{numerica} decides when to stop evaluating additional terms
+in an infinite sum or product is discussed later, §\ref{sec:settingsInfiniteSumsProds}.
+
+For this particular product the problem is that it converges slowly.
+Any criterion for when to stop multiplying terms or, for an infinite
+sum adding terms, seems bound to fail for some product or series.
+Presumably any stopping criterion must measure smallness in some way.
+But terms of, for example, the divergent harmonic series $\sum(1/n)$
+can always be found smaller than any value we care to specify. It
+is not surprising that a sufficiently slowly converging product or
+series falls foul of a given criterion.
+
+The default criterion however can be changed. Because this involves
+values assigned in the settings option of the \verb`\eval` command,
+I discuss infinite sums and products in the section discussing that
+optional argument; see §\ref{sec:settingsInfiniteSumsProds}.
+
+Other infinite sums converge more rapidly, and the default settings
+work admirably. For example \verb`\eval{$ (1+0.1234)^{4.321} $}`
+$\Longrightarrow$ \eval{$ (1+0.1234)^{4.321} $}. Using binomial
+coefficients we can express this as an infinite sum:\medskip{}
+\begin{verbatim}
+    \eval[p=.]{\[
+        \sum_{n=0}^{\infty}\binom{\alpha}{n}x^{n}
+           \]}[\alpha=4.321,x=0.1234]
+\end{verbatim}
+$\Longrightarrow$ \eval[p=.]
+  {\[
+    \sum_{n=0}^{\infty}\binom{\alpha}{n}x^{n}
+  \]}[\alpha=4.321,x=0.1234]
+
+\subsection{Formatting commands}
+
+\label{subsec:evalFormatting-commands}There are many formatting commands
+which change the layout of a formula on the page but do not alter
+its calculational content. \verb`numerica` copes with a great many
+of these formatting commands, although there will surely be some that
+it has overlooked and which will trigger an `Unknown token' message;
+see §\ref{sec:evalErrors}. \footnote{Please contact the author in that case: ajparsloe at gmail.com}
+
+\subsubsection{Spaces, phantoms, struts}
+
+These include cryptic forms like \verb`\,` \verb`\:` and \verb`\>`,
+\verb`\;` and the corresponding `verbose' forms, \verb`\thinspace`,
+\verb`\medspace` and \verb`\thickspace` and their negative equivalents
+\verb`\!` or \verb`\negthinspace`, \verb`\negmedspace` and \verb`\negthickspace`:
+\begin{centred}
+\verb`\eval{$ 1\negthickspace+\negthickspace 1 $}` $\Longrightarrow$
+\eval{$ 1\negthickspace+\negthickspace 1 $}
+\end{centred}
+which gives the text spacing of 1+1 as against the usual math spacing
+$1+1$ but doesn't affect the result of the calculation. 
+
+Other spacing commands are \verb`\quad` and \verb`\qquad`, and \verb`\hspace{arg}`
+and \verb`\mspace{arg}`. For \verb`\hspace` there is also a starred
+form, \verb`\hspace*{arg}`. Phantoms similarly take an argument:
+\verb`\phantom{arg}`, \verb`\hphantom{arg}` and \verb`\vphantom{arg}`.
+\begin{centred}
+\verb`\eval{$ 1\hphantom{mmm}+\hphantom{mmm}1 $}` $\Longrightarrow$
+\eval{$ 1\hphantom{mmm}+ \hphantom{mmm}1 $}.
+\end{centred}
+Like \verb`\vphantom`, struts allow vertical spacing adjustments.
+\verb`numerica` should digest both \verb`\xmathstrut[optarg]{arg}`
+from \verb`mathtools` and its `baby cousin' \verb`\mathstrut`
+from \TeX . An example from \emph{The \TeX{} book} demonstrating the
+use of \verb`\mathstrut` is
+\begin{verbatim}
+     \eval{$\sqrt{\mathstrut a}+\sqrt{\mathstrut d}+
+           \sqrt{\mathstrut y}$}[a=4,d=9,y=16] 
+\end{verbatim}
+$\Longrightarrow$ \eval{$\sqrt{\mathstrut a}+\sqrt{\mathstrut d}+\sqrt{\mathstrut y}$}[a=4,d=9,y=16], 
+
+And here is an evaluation of an expression from the \verb`mathtools`
+documentation using \verb`\xmathstrut`:
+\begin{verbatim}
+    \eval{\[ \frac{ \frac{ \xmathstrut{0.1} x-1 }
+           { \xmathstrut{0.25} x-\sin{ x} } }
+             {\xmathstrut{0.4} \sqrt{ 10-x } } \]}
+               [x=\pi/6]
+\end{verbatim}
+$\Longrightarrow$ \eval{\[ \frac{ \frac{ \xmathstrut{0.1} x-1 }
+           { \xmathstrut{0.25} x-\sin{ x} } }
+             {\xmathstrut{0.4} \sqrt{ 1-x } } \]}
+               [x=\pi/6]
+
+\subsubsection{\texttt{\textbackslash splitfrac}}
+
+The \verb`mathtools` package provides \verb`\splitfrac` and \verb`\splitdfrac`
+to aid handling of clumsy fractions. The documentation gives an (artificial)
+example of use. I've mangled it to produce an even more ridiculous
+illustration, adding to the mess an enormous square root, the modifiers
+\verb`\left` and \verb`\right`, and the command-form alternatives
+to parentheses, \verb`\lparen` and \verb`\rparen`; also the use
+of \verb`\dfrac`. A little mental arithmetic will convince that we
+are evaluating the square root of $(9\times7)^{2}$ which indeed is
+what we get:\footnote{For the \texttt{{[}p=.,vvd={]}} see §\ref{subsec:settingsPunctuation}
+and §\ref{subsec:settingsVvDisplayChangeLocal}. The first puts the
+concluding full stop in the right place; the second suppresses the
+vv-list.} \medskip{}
+\begin{verbatim}
+	\eval[p=.,vvd=]{\[
+    \sqrt{\left\lparen
+      \frac{ \splitfrac{xy + xy + xy + xy + xy}
+              {+ xy + xy + xy + xy}
+           }
+           { \dfrac z7}
+          \right\rparen \left\lparen
+            \frac{ \splitdfrac{xy + xy + xy + xy + xy}
+                     {+ xy + xy + xy + xy}
+                 }
+                 {\dfrac z7}\right\rparen}
+      \]}[x=2,y=5,z=10]
+\end{verbatim}
+$\Longrightarrow$ \eval[p=.,vvd=]{\[
+    \sqrt{\left\lparen
+      \frac{ \splitfrac{xy + xy + xy + xy + xy}
+              {+ xy + xy + xy + xy}
+           }
+           { \dfrac z7}
+          \right\rparen \left\lparen
+            \frac{ \splitdfrac{xy + xy + xy + xy + xy}
+                     {+ xy + xy + xy + xy}
+                 }
+                 {\dfrac z7}\right\rparen}
+      \]}[x=2,y=5,z=10]
+
+\subsubsection{Colour}
+
+\label{subsec:Colour}(Anglicised spelling at least for the heading!)
+If you add to the preamble of your document the line
+\begin{lyxcode}
+\textbackslash usepackage\{color\}
+\end{lyxcode}
+two commands become available, \verb`\textcolor[optarg]{arg1}{arg2}`
+and the declaration form of command, \verb`\color[optarg]{arg}`.
+\verb`numerica` readily accepts the former in a formula to be evaluated:
+\begin{centred}
+\verb`\eval{$ \sin \tfrac\pi6n\textcolor{red}{T}+1 $}[T=9,n=3]` $\Longrightarrow$
+\eval{$ \sin \tfrac\pi6n\textcolor{red}{T}+1  $}[T=9,n=3]
+\end{centred}
+(assuming you had some wish to highlight the time $T$). 
+
+However there are restrictions on the use of \verb`\color` in \verb`\eval`
+commands. \verb`\color` is a \emph{declaration} form of command.
+It has effect until the end of the current group or environment. If
+you want to restrict it to only part of that group you need to em-brace
+the command and what it is to apply to,
+\begin{lyxcode}
+<pre-stuff>\{\textbackslash color\{red\}<red-stuff>\}<post-stuff\}
+\end{lyxcode}
+but that is where the problem arises. \verb`numerica` does not check
+for `unannounced' brace groups. It expects a brace group to be introduced
+by a preceding instruction like \verb`\sqrt` or \verb`\frac` or
+\verb`^`. When announced in this way, \verb`numerica` can handle
+the brace group appropriately. But the brace group \verb`{\color{red}<red-stuff>}`
+is not so announced. \verb`numerica`'s parsing routine will not recognize
+what it has just swallowed and a \LaTeX{} error will result. So, \verb`\color`
+cannot be used in a formula in a `naked' or unannounced brace group.
+Writing \verb`\eval{$ \color{red} \sin \tfrac\pi6nT+1 $}[T=9,n=3]`
+is fine, as is 
+\begin{centred}
+\verb`\eval{$  \sin \tfrac\pi6nT+1 \color{red} $}[T=9,n=3]` $\Longrightarrow$
+\eval{$ \sin \tfrac\pi6nT+1 \color{red} $}[T=9,n=3].
+\end{centred}
+So too, because the \verb`\frac` introduces the confining brace group,
+is
+\begin{centred}
+\verb`\eval{$ \frac{\color[gray]{0.5}A}B $}[A=12,b=4]` $\Longrightarrow$\eval{$ \frac{\color[gray]{0.5}A}B $}[A=12,B=4],
+\end{centred}
+where both arguments of the \verb`\color` command are used for grayscale
+output. 
+
+But trying something like \verb`\eval{$ 3{\color[gray]{0.5}x}+1 $}[x=2]`
+will cause a \LaTeX{} error and halt compilation since there is no
+command announcing the brace group confining the \verb`\color` command.
+
+\subsubsection{\texttt{\textbackslash text}, \texttt{\textbackslash mbox}, font
+commands}
+
+\label{subsec:Text-mbox-fonts}Following a rethink of the behaviour
+of a number of font and formatting commands, in version 2 of \verb`numerica`
+the content of a \verb`\text` or \verb`\mbox` command is \emph{invisible}
+to the \verb`\eval` command. \emph{This behaviour is different from
+that of version 1.} Now the content is ignored in a calculation,
+\begin{centred}
+\verb`\eval*{ 1/0.0123456789 \mbox{approx.} }[5]` $\Longrightarrow$
+\eval*{ 1/0.0123456789 \mbox{approx.}}[5],
+\end{centred}
+even when the \verb`\text` or \verb`\mbox` contains mathematical
+content.
+
+Conversely, the content of font commands (like \verb`\mathbf` or
+\verb`\mathcal`) is \emph{visible} to \verb`\eval`. This becomes
+useful should numbers be input in scientific notation (see §\ref{subsec:settingsInputtingSciNotation}).
+As well as the math font commands, \verb`\eval` also accepts \verb`\textrm`,
+\verb`\textsf` and \verb`\texttt`. Thus a number in scientific notation
+like \verb`2e-1` appearing in the formula or the vv-list can display
+correctly by wrapping it in a \verb`\textrm` or \verb`\texttt` command,
+rather than displaying inappropriately as the algebraic expression
+$2e-1$. 
+
+\subsubsection{\texttt{\textbackslash ensuremath},\texttt{ \$},\texttt{ \textbackslash (},\texttt{
+\textbackslash )},\texttt{ \textbackslash{[}},\texttt{ \textbackslash{]}}}
+
+Should \verb`\ensuremath` be included in a formula for evaluation
+(but why?) it is digested without demur, irrespective of whether explicit
+math delimiters are present or not. More generally, should math delimiters
+(through some momentary oversight) be used both within and outside
+an \verb`\eval` command, the command is processed as if only the
+outside environment is involved; the inner delimiters are ignored:
+\begin{centred}
+\verb`$ \eval{\[ -4^2 \]} $` $\Longrightarrow$ $ \eval{\[ -4^2 \]} $.
+\end{centred}
+
+\section{Error messages }
+
+\label{sec:evalErrors}There are two kinds of error in \texttt{numerica}:
+those in the underlying \LaTeX{} which are reported in the \LaTeX{}
+log, shown on the terminal, and generally halt compilation, and specifically
+\texttt{numerica}-related errors which do not halt compilation and
+produce messages displayed in the pdf where one would expect the result
+of the calculation to be. The original reason for doing things this
+way was to enable \texttt{numerica} to be used effectively with the
+instant preview facility of the document processor \LyX . More philosophically,
+one might view such errors as similar to errors of grammar or spelling
+mistakes in text. It is not clear that they should halt compilation.
+Hence strictly \texttt{numerica}-related errors leave brief messages
+in the pdf at the offending places.
+
+Before discussing specific error messages, note that there is a debug
+facility (of a sort) discussed below in §\ref{subsec:settingsDebug}. 
+
+Error messages are in two parts: a \emph{what} part and a \emph{where}
+part.
+
+\subsection{Mismatched brackets}
+
+\label{subsec:errorsMismatched-brackets}An unmatched left parenthesis
+or other left bracket (in this case a missing right parenthesis) usually
+results in a \texttt{numerica} error:
+\begin{centred}
+\verb`$\eval{\sin(\pi/(1+x)}[x=1]$` $\Longrightarrow$ $\eval{\sin(\pi/(1+x)}[x=1]$
+\end{centred}
+For the same error in the vv-list, the what-part remains unchanged
+but the where-part is altered:
+\begin{centred}
+\verb`$\eval{ 1+y }[x=1,y=\sin(\pi/(1+x)]$` $\Longrightarrow$ $\eval{ 1+y }[y=\sin(\pi/(1+x),x=1]$
+\end{centred}
+The \emph{what} message is the same; the \emph{where} is different.
+
+An unmatched right parenthesis or other right bracket (in this case
+a missing \emph{left} parenthesis) usually results in a similar \texttt{numerica}
+error:
+\begin{centred}
+\verb`$\eval{2((x+y)/(y+z)))^2}[x=1,y=2,z=3]$` $\Longrightarrow$
+\eval{2((x+y)/(y+z)))^{2}}[x=1,y=2,z=3]
+\end{centred}
+But note that an unmatched modifier like \verb`\left` or \verb`\right`
+is a \LaTeX{} error and is caught by \LaTeX{} before \texttt{numerica}
+can respond and so results in a terminal and logfile message. 
+
+\subsection{Unknown tokens}
+
+An `Unknown token' message can arise in a number of ways. If an
+expression involves a number of variables, some of which depend on
+others, their order in the vv-list matters: 
+\noindent \begin{center}
+\verb`$\eval{\tfrac12 vt}[t=2,v=gt,g=9.8]$` $\Longrightarrow$ \eval{\tfrac{1}{2}vt}[t=2,v=gt,g=9.8] 
+\par\end{center}
+
+The vv-list is evaluated from the \emph{right} so that in this example
+the variable \texttt{v} depends on a quantity \texttt{t} that is not
+yet defined. Hence the message. The remedy is to move \texttt{t} to
+the right of \texttt{v} in the vv-list.
+
+Similarly, if we use a variable in the formula that has not been assigned
+a value in the vv-list, we again get the `Unknown token' message,
+but this time the location is the formula:
+\begin{centred}
+\verb`$\eval{\pi r^2h}[r=3]$` $\Longrightarrow$ \eval{\pi r^{2}h}[r=3]
+\end{centred}
+The remedy obviously is to assign a value to \texttt{h} in the vv-list\texttt{.}
+
+The same message will result if a mathematical operation or function
+is used that has not been implemented in \texttt{numerica}:
+\begin{centred}
+\verb`$\eval{u \bmod v }[v=7,u=3]$` $\Longrightarrow$ \eval{u\bmod v}[v=7,u=3] 
+\end{centred}
+A missing comma in the vv-list will generally result in an unknown
+token message:
+\begin{centred}
+\verb`$\eval{axy}[a=3 y=2,x=1]$` $\Longrightarrow$ \eval{axy}[a=3y=2,x=1] 
+\end{centred}
+Because of the missing comma, \verb`numerica` assumes \verb`a` has
+the `value' \verb`3y=2`, an expression which it then tries to evaluate,
+but the variable \verb`y` in this expression has not been assigned
+a value, which generates the message.
+
+\emph{Extra} commas in the vv-list should cause no problems:
+\begin{centred}
+\verb`$\eval{axy}[,a=3,,y=2,x=1,]$` $\Longrightarrow$ $\eval{axy}[,a=3,,y=2,x=1,]$ 
+\end{centred}
+The presence of multi-token variables can also cause an unknown token
+message if the check for such variables is turned off; see §\ref{subsec:settingsMultitokSwitch}.
+
+\subsection{Overlooked value assignments}
+
+Perhaps if one is evaluating a formula with a number of variables
+and assigning different experimental values to them to see the effect,
+a variable might be overlooked:
+\begin{centred}
+\verb`$\eval{axy}[a=3,y=,x=1]$` $\Longrightarrow$ \eval{axy}[a=3,y=,x=1] 
+\end{centred}
+In the example the variable \verb`y` has been overlooked. The remedy
+is obvious – assign a value to it.
+
+\subsection{Integer argument errors}
+
+\label{subsec:errorsIntegerArgs}Some functions require integer arguments
+– factorials, the second argument of a binomial coefficient, and (in
+\texttt{numerica}) $n$th roots using the optional argument of \texttt{\textbackslash sqrt};
+also summation and product variables. If integers are explicitly entered
+for these arguments there is no problem, but if the value of the argument
+is the result of a calculation, rounding errors require thinking about.
+What accumulation of rounding errors is \emph{too} much so that the
+result of the calculation \emph{cannot} be considered an integer?
+\texttt{numerica} is generous: in the default setup, if a calculation
+rounds to an integer at rounding value $14$ the result of the calculation
+is considered an integer (obviously, the value resulting from the
+rounding). Since \texttt{l3fp} works to $16$ significant figures
+that gives ample room for rounding errors to `get lost in' and be
+ignored, while still ruling out such things as (recall the example
+in §\ref{subsec:evalBoolean-output}),
+\begin{centred}
+\verb`\eval{\[ \sum_{n=1}^N n \]}[N=1/0.0123456789]` $\Longrightarrow$
+\eval{\[ \sum_{n=1}^N n \]}[N=1/0.0123456789]
+\end{centred}
+where $N$ differs from $81$ not until the seventh decimal place. 
+
+The default rounding value of $14$ for `int-ifying' calculations
+can be changed: see §\ref{subsec:defaultsIntifyingRounding}.
+
+\subsection{Comparison errors}
+
+Should a user try to make a comparison using a combination like \verb`>=`
+rather than \verb`\geq`, \texttt{numerica} admonishes like this: 
+\begin{centred}
+\verb`$\eval{ e^\pi >= \pi^e }[?]$` $\Longrightarrow$ $\eval{ e^\pi >= \pi^e }[?]$
+\end{centred}
+(The relation is true by the way.) The same error is generated by
+other multi-token comparisons. They are used in programming languages,
+yes, but \emph{not} in mathematics.
+
+\subsection{Invalid base for \texttt{\textbackslash log}}
+
+ISO recommends using \verb`\log` only with a subscripted base specified.
+Otherwise how is one to know whether the base is \verb`e` or $10$
+or $2$ or whatever? Nonetheless \texttt{numerica} assumes that when
+\verb`\log` is used unsubscripted, the base is 10. Suppose you want
+to make $12$ the base, but forget to put braces around the $12$:
+\begin{centred}
+\verb`$\eval{ \log_12 1728 }$` $\Longrightarrow$ $\eval{ \log_12 1728 } $
+\end{centred}
+Here, \texttt{numerica} has taken \texttt{1} as the base (and $21728$
+as the argument) of the logarithm and responds accordingly.
+
+\subsection{\texttt{l3fp} errors}
+
+Some errors arising at the \texttt{l3fp} level are trapped and a message
+displayed. 
+
+\subsubsection{Dividing by zero}
+\begin{centred}
+\verb`$\eval{1/\sin x}[x=0]$` $\Longrightarrow$ \eval{1/\sin x}[x=0] 
+\end{centred}
+Note however that \verb`$\eval{1/\sin x}[x=\pi]$` $\Longrightarrow\,\eval{1/\sin x}[x=\pi]$,
+because of rounding errors in distant decimal places. No doubt this
+is true for other functions as well.
+
+\subsubsection{Invalid operation}
+
+\label{subsec:errorsInverse-powers}Finding inverse integer powers
+of \emph{positive} numbers should always be possible, but raising
+a \emph{negative} number to an inverse power generates an error even
+when – mathematically – it should not: 
+\begin{centred}
+\verb`\eval{$ (-125)^{1/3} $}` $\Longrightarrow$ \eval{$ (-125)^{1/3} $}
+\end{centred}
+This is a feature of floating point arithmetic. When a number is raised
+to a rational power, say $p/q$ where $p$ and $q$ are non-zero integers,
+then the result is the $p$th power of the $q$th root of the number.
+Can a $q$th root be taken? If our floating point system used (for
+ease of illustration) only $4$ significant digits, $p/q=1/3$ would
+be the fraction $3333/10^{4}$, an odd numerator over an even denominator.
+But a negative number does not possess an even ($10^{4}$th) root. 
+
+Trying to evaluate a function like a factorial or square root or inverse
+trig. function outside its domain of definition also produces this
+error:
+\begin{centred}
+\verb`$\eval{\arccos x}[x=2]$` $\Longrightarrow$ \eval{\arccos x}[x=2]
+\end{centred}
+In this case the inverse cosine, which is defined only on the interval
+$[-1,1]$, has been fed the value $2$. 
+
+Trying to evaluate an expression that resolves to $0/0$ also produces
+this message:
+\begin{centred}
+\verb`$\eval{\frac{1-y}{x-2}}[x=2,y=1]$` $\Longrightarrow$ \eval{\frac{1-y}{x-2}}[x=2,y=1]
+\end{centred}
+
+\subsubsection{Overflow/underflow}
+
+The factorial (discussed in §\ref{subsec:evalFactorialsBinom}) provides
+an example of overflow:
+\begin{centred}
+\verb`$\eval{3249!}$`\texttt{ }$\Longrightarrow$ \eval{3249!} 
+\end{centred}
+This is hardly surprising since
+\begin{centred}
+\verb`$\eval{3248!}[x]$` $\Longrightarrow$ $\eval{3248!}[x]$.
+\end{centred}
+There is a limit on the size of exponents that \texttt{l3fp} can handle.
+A number in the form $a\times10^{b}$ must have $-10001\le b<10000$.
+If this is not the case an overflow or underflow condition occurs.
+As the examples show, an overflow condition generates a \texttt{numerica}
+error. 
+
+For underflow, where the number is closer to $0$ than $10^{-10001}$,
+\texttt{l3fp} assigns a zero value to the quantity. \texttt{numerica}
+accepts the zero value and the error is ignored.
+
+\chapter{Settings}
+
+\label{chap:Settings}A calculation is effected against a background
+of default values for various quantities. For a particular calculation,
+these values may not be appropriate; or you may have different preferences.
+The way to change settings for a particular calculation is through
+the settings option of \verb`\nmcEvaluate` discussed next. The way
+to change a \emph{default} setting is by creating a configuration
+file \texttt{numerica.cfg} discussed in §\ref{sec:settingsDefaults}.
+
+\section{Settings option}
+
+\label{sec:settingsOption}The second argument of the \verb`\nmcEvaluate`
+command is the settings option, delimited by square brackets. This
+option is a \emph{key=value} list, hence comma-separated. \emph{Key=value
+}lists tend to be wordy. For back-of-envelope calculations one wants
+to be able to `dash off' the calculation, hence the short, cryptic
+nature of the keys. Most settings are generic, applicable not only
+to \verb`\nmcEvaluate` but also to other commands that are available
+if the packages \texttt{numerica-plus} or \texttt{numerica-tables}
+are loaded; see §\ref{subsec:Related-packages}. 
+
+\subsection{\textquoteleft Debug\textquoteright{} facility}
+
+\label{subsec:settingsDebug}It is rather grandiose to call this a
+debug facility, but if a calculation goes wrong or produces a surprising
+result, \texttt{numerica} offers a means of examining various quantities
+at some intermediate stages on the way to the final result. To use
+the facility, enter 
+\begin{lyxcode}
+dbg~=~<integer>
+\end{lyxcode}
+into the settings option. (White space around the equals sign is optional.) 
+\begin{itemize}
+\item \texttt{dbg=0 }turns off the debug function, displays the result or
+error message (this is the default);
+\item \texttt{dbg=1 }equivalent to \texttt{dbg=2{*}3{*}5{*}7};
+\end{itemize}
+\begin{table}[t]
+\centering
+\noindent \centering{}\caption{Settings options}
+\noindent \begin{center}
+\begin{tabular}{ll>{\raggedright}p{4cm}>{\raggedright}p{4cm}}
+\toprule 
+{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
+\midrule
+{\small\texttt{dbg}} & {\small int} & {\small debug `magic' integer} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{view}} &  & {\small equivalent to }{\small\texttt{dbg=1}} & \tabularnewline
+{\small\texttt{\textasciicircum}} & {\small char} & {\small exponent mark for sci. notation input} & {\small\texttt{e}}\tabularnewline
+{\small\texttt{xx}} & {\small int (0/1)} & {\small multi-token variable switch} & {\small\texttt{1}}\tabularnewline
+{\small\texttt{()}} & {\small int (0/1/2)} & {\small trig. arg. parsing} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{o}} & {\small int (0/1)} & {\small degree switch for trig. functions} & {\small\texttt{1}}\tabularnewline
+{\small\texttt{log}} & {\small num} & {\small base of logarithms for }{\small{\small\verb`\log`}} & {\small\texttt{10}}\tabularnewline
+{\small\texttt{vv@}} & {\small int (0/1)} & {\small vv-list calculation mode} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{vvd}} & {\small token(s)} & {\small vv-list display-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 12mu  6mu minus 9mu(vv)}}\tabularnewline
+{\small\texttt{vvi}} & {\small token(s)} & {\small vv-list text-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
+{*} &  & {\small suppress equation numbering if }{\small\texttt{\textbackslash\textbackslash}}{\small{}
+in }{\small\texttt{vvd}} & \tabularnewline
+{\small\texttt{p}} & token(s) & {\small punctuation (esp. in display-style)} & {\small\texttt{,}}\tabularnewline
+{\small\texttt{reuse}} & {\small int} & {\small form of result saved with }{\small{\small\verb`\nmcReuse`}} & {\small\texttt{0}}\tabularnewline
+\bottomrule
+\end{tabular}
+\par\end{center}
+\end{table}
+
+The `magic' integers are the following primes and their products
+\begin{itemize}
+\item \texttt{dbg=2} displays the vv-list after multi-token variables have
+been converted to their single token form, \texttt{\textbackslash nmc\_a},
+\texttt{\textbackslash nmc\_b}, etc.;
+\item \texttt{dbg=3} displays the formula after multi-token variables have
+been converted to their single token form;
+\item \texttt{dbg=5} displays the stored variables and their \emph{evaluated}
+values (\texttt{dbg=2} lists the values as expressions);
+\item \texttt{dbg=7} displays the formula after it has been fp-ified but
+before it has been fed to \texttt{l3fp} to evaluate; 
+\begin{itemize}
+\item should the formula successfully evaluate, the result of the evaluation
+is also displayed (but without any formatting).
+\end{itemize}
+\end{itemize}
+To display two or more of the debug elements simultaneously, use the
+product of their debug numbers for the magic integer. This can be
+entered either as the multiplied-out product, or as the `waiting
+to be evaluated' product with asterisks (stars) between the factors.
+Thus \texttt{dbg=6} or \verb`dbg=2*3` display both the vv-list and
+formula after multi-token variables have been converted to single
+token form; \texttt{dbg=10} or \verb`dbg=2*5` display both the vv-list
+after multi-token variables have been converted to single token form
+and the recorded variables with their evaluated values. And similarly
+for the other magic integers listed. For other integers, if they are
+divisible by $2$ or $3$ or $5$ or $7$, they will display the corresponding
+component. Both \texttt{dbg=210} and \verb`dbg=2*3*5*7` display all
+four elements, but rather than remembering this product, it suffices
+to put \texttt{dbg=1}. This is equivalent and displays all elements.
+
+The debug option uses an \verb`aligned`\texttt{ }or \verb`align*`
+environment to display its wares, depending on the presence or absence
+of math delimiters around the \verb`\eval` command. The following
+uses \verb`align*` and shows how multi-token variables are handled,
+how a chain of comparisons is evaluated (§\ref{subsec:evalBoolean-output})
+and how formatting instructions in the number-format option are ignored
+in the debug display:
+\begin{verbatim}
+    \eval[dbg=1]{ a < 2a' < 3a'' }
+      [a=\pi,a'=\phi,a''=e\gamma][4???]
+\end{verbatim}
+$\Longrightarrow$     \eval[dbg=1]{ a < 2a' < 3a'' }
+      [a=\pi,a'=\phi,a''=e\gamma][4???]
+
+\noindent The various items are displayed in chronological order.
+First comes the vv-list after conversion of multi-token to single-token
+variables, then the formula in those single-token variables; these
+are created essentially at the same time. Next the stored values of
+the variables are displayed. These are the values \emph{after }evaluation.
+The fourth element both in the display and chronologically is the
+fp-ified formula. Often this can be a thicket of parentheses, especially
+if unary functions or fractions are involved. The final element of
+both the display and chronologically is the result from evaluating
+the formula. This is shown only if $7$ is a factor of the \texttt{dbg}
+integer, and there is no error. Despite the appearance of \verb`???`
+in the number-format option, the result displays as 1. Results are
+never rounded or formatted in the debug display, although as is apparent
+here, the rounding number \verb`4` is used in the comparisons.
+
+When interpreting the fp-form, differences in the ways \texttt{numerica}
+and \texttt{l3fp} read formulas can lead to more or less parentheses
+than seem strictly necessary. In particular be aware that in \texttt{l3fp}
+function calls bind most tightly so that, for example, \verb`sin 2pi`
+evaluates not to zero but to $(\sin2)\times\pi$, and \verb`sin x^2`
+evaluates to $(\sin x)^{2}$. \verb`numerica` takes care of the former
+by inserting extra parentheses and exploits the latter by not inserting
+parentheses:
+\begin{verbatim}
+    \eval[dbg=1]{ \sin 2x \cos^2 y }
+         [x=\pi/12,y=\pi/4]
+\end{verbatim}
+$\Longrightarrow$ \eval[dbg=1]{ \sin 2x \cos^2 y }[x=\pi/12,y=\pi/4]Finally,
+note that those mathematical operations that have no direct representation
+in \verb`l3fp` contribute only their value to the fp-form. This applies
+to sums and products, double factorials, partly to binomial coefficients,
+and also to \verb`\eval` and other commands when nested one within
+another (see Chapter~\ref{chap:Nesting}). The following (ridiculous)
+example illustrates the matter:
+\begin{verbatim}
+    \eval[dbg=1]{\[ 
+      \sum_{n=1}^k n + \binom{2k}{m} - \frac1{4k} + 
+        \prod_{n=2}^k (1-1/n) + m!! \]}[m=6,k=5]
+\end{verbatim}
+$\Longrightarrow$     \eval[dbg=1]{\[ 
+      \sum_{n=1}^k n + \binom{2k}{m} - \frac1{4k} + 
+        \prod_{n=2}^k (1-1/n) + m!! \]}[m=6,k=5]
+
+\noindent ($0$\textdegree{}~C in kelvin!) In the \verb`fp-form`
+line, the various contributions to the overall result are displayed
+simply as numbers because \verb`l3fp` does not (at least as yet)
+handle these elements natively.
+
+\subsection{Negative \texttt{dbg} values}
+
+Negative \texttt{dbg} values are possible: \texttt{dbg=-2}, \texttt{dbg=-3},
+etc. (and \texttt{dbg=-1} meaning \texttt{dbg=-210}) have exactly
+the same effects as the corresponding positive values except for some
+details of display. The display for positive \texttt{dbg} values is
+the one evident in the examples above. Lines wrap, the left margin
+is not indented and the display occupies the page width. For negative
+\texttt{dbg} values, lines do not wrap, the left margin is indented
+and the display occupies the text width. An example is presented in
+§\ref{subsec:nestDebugging} below where the display for a nested
+\verb`\eval` is significantly improved with a negative \texttt{dbg}
+value.
+
+\subsection{\texttt{view} setting}
+
+Putting \texttt{dbg=1} may seem a little obscure in order to view
+internal values of \verb`numerica`. In that case, simply writing
+\verb`view` in the settings option will produce the same effect as
+entering \verb`dbg=1`.
+
+\subsection{Inputting numbers in scientific notation}
+
+\label{subsec:settingsInputtingSciNotation}\emph{Outputting} numbers
+in scientific notation is controlled by the final trailing argument
+of the \texttt{\textbackslash eval} command. Such output is turned
+off by default and needs to be explicitly ordered. Similarly, \emph{inputting}
+numbers in scientific notation is turned off by default and needs
+to be explicitly ordered. To turn it on, write
+\begin{lyxcode}
+\textasciicircum ~=~<char>
+\end{lyxcode}
+\noindent in the settings option, where \texttt{<char>} is any single
+character, usually \texttt{e} or \texttt{d} or their upper-casings,
+but not restricted to them: \texttt{\textasciicircum =@} for instance
+is perfectly possible, and has the advantage over \texttt{e} or \texttt{d}
+that it doesn't conflict with the use of the character as a variable
+or constant. 
+\begin{centred}
+\verb`$ \eval[^=@]{ 1.23 at -1 } $` $\Longrightarrow$ $ \eval[^=@]{ 1.23 at -1 } $.
+\end{centred}
+With letters for the exponent mark – say \verb`d` or \verb`e` –
+the problem is interpreting forms like \texttt{8d-3} or \texttt{2e-1}.
+Does such a form denote a number in scientific notation or an algebraic
+expression? In \texttt{numerica}, if the settings option shows \texttt{\textasciicircum =d},
+then a form like \texttt{8d-3} is treated as a number in scientific
+notation. Similarly for \texttt{e} or any other letter used as the
+exponent marker for the input of scientific numbers. (But only one
+character can be so used at a time.) Note that the number \emph{must}
+start with a digit: \verb`e-1` for instance does not, and will be
+treated as an algebraic expression involving the exponential constant:
+\begin{centred}
+\verb`$ \eval[^=e]{ x+e-1 }[x=1] $` $\Longrightarrow$ $ \eval[^=e]{ x+e-1 }[x=1] $ 
+\end{centred}
+but
+\begin{centred}
+\verb`$ \eval[^=e]{ x+1e-1 }[x=1] $` $\Longrightarrow$ $ \eval[^=e]{ x+1e-1 }[x=1] $. 
+\end{centred}
+A problem of appearance arises if scientific numbers appear in the
+vv-list or formula and either is displayed in the result. A number
+like \verb`2e-1` will display as $2e-1$, as if it were an algebraic
+expression. In version 1 of \verb`numerica` the cure was to wrap
+\verb`2e-1` in a \verb`\text` or \verb`\mbox` command. In version
+2 of \verb`numerica` the behaviour of \verb`\text` and \verb`\mbox`
+has been re-thought; see §\ref{subsec:Text-mbox-fonts}. Their contents
+are now invisible to the \verb`\eval` command. The solution is to
+wrap \verb`2e-1` in a \verb`\textrm` or \verb`\textsf` or \verb`\texttt`
+command. These commands were not recognized by \verb`\eval` in version
+1 but \emph{are} in version 2:
+\begin{centred}
+\verb`\eval[^=e]{$  5x $ }[x=\texttt{2e-1}]` $\Longrightarrow$ \eval[^=e]{$  5x $ }[x=\texttt{2e-1}]
+,
+
+\verb`\eval[^=e]{$ 5\texttt{2e-1} $ }` $\Longrightarrow$ \eval[^=e]{$  5(\texttt{2e-1}) $ }
+.
+\end{centred}
+If you use a particular character as the exponent marker for inputting
+numbers in scientific notation, it is good practice \emph{not} to
+use that character as a variable, not because it will cause an error
+but because it makes expressions harder to read. 
+
+\subsection{Multi-token variables}
+
+\label{subsec:settingsMultitokSwitch}Variables need not consist of
+a single character or token (like $x$ or $\alpha$). Multi-token
+symbols like $x'$ or $t_{i}$ or $var$ are perfectly acceptable.
+For its internal operations, \texttt{numerica} converts such multi-token
+names to single tokens (as discussed in §\ref{subsec:evalVariableNames}).
+This conversion takes time. Even if there are no multi-token variables
+used at all, \texttt{numerica} still needs to check that that is so.
+There is a setting that allows a user to turn off or turn on the check
+for such variables by entering
+\begin{lyxcode}
+xx~=~<integer>
+\end{lyxcode}
+into the settings option. If \texttt{<integer>} is \texttt{0}, the
+check for (and conversion of) multi-token variables is turned off;
+if \texttt{<integer>} is \texttt{1} (or any other\emph{ non-zero}
+integer), the check, and conversion if needed, goes ahead. By default,
+checking for multi-token variables and converting them if found is
+turned \emph{on}. (The name for the key, \texttt{xx}, is chosen because
+\texttt{x} is the most familiar variable of all, introduced in elementary
+algebra, and doubling it like this suggests multi-token-ness.)
+
+If checking is turned off when a multi-token variable is present,
+an error results. We don't need to enter \texttt{xx=1} in the first
+of the following examples because the check for multi-token variables
+is on by default. Explicitly turning it off in the second produces
+an error.
+\begin{centred}
+\verb`\eval{$ x_0^{\,2} $}[x_0=5]` $\Longrightarrow$ \eval{$ x_0^{\,2} $}[x_0=5],\medskip{}
+\verb`\eval[xx=0]{$ x_0^{\,2} $}[x_0=5]` $\Longrightarrow$ \eval[xx=0]{$ x_0^{\,2} $}[x_0=5]
+\end{centred}
+
+\subsection{Parsing arguments of trigonometric functions}
+
+This setting allows a wider range of arguments to trigonometric  functions
+to be parsed (think Fourier series) without needing to insert extra
+parentheses in order for them to be read correctly by \verb`\eval`;
+see §\ref{subsec:parseTrigFns}.
+
+\subsection{Using degrees rather than radians}
+
+\label{subsec:settingsDegrees}You may find it more convenient to
+use degrees rather than radians with trigonometric functions. This
+can be switched on simply by entering a lowercase \texttt{o} in the
+settings option. (The author hopes the charitable eye sees a degree
+symbol in the  \texttt{o}.) Thus
+\begin{centred}
+\verb`\eval[o]{$ \sin 30 $}` $\Longrightarrow$ \eval[o]{$ \sin 30 $},
+
+\verb`\eval[o]{$ \arcsin 0.5 $}` $\Longrightarrow$ \eval[o]{$ \arcsin 0.5 $}.
+\end{centred}
+This is a \verb`0/1` switch, \verb`0` signifying \verb`off` or
+`don't use degrees', \verb`1` signifying \verb`on` or `do use
+degrees'. Although the \verb`o` default is \verb`1`, out-of-the-box
+\verb`numerica` assumes radians are being used. Thus if \verb`o`
+is absent from the settings option of an \verb`\eval` command, the
+out-of-the-box setting prevails and radians are used, but if \verb`o`
+is present, it is equivalent to \verb`o=1`. To explicitly turn off
+the use of degrees requires the full setting, \verb`o=0`. 
+
+If you want to change the out-of-the-box setting you need to put the
+line \verb`use-degrees = 1` into a configuration file; see §\ref{sec:settingsDefaults}.
+
+\subsection{Specifying a logarithm base}
+
+\label{subsec:settingsLogBase}If you wish to use \verb`\log` without
+a subscripted base in a particular calculation, then add an entry
+like 
+\begin{lyxcode}
+log~=~<positive~number>
+\end{lyxcode}
+where \verb`<positive number>`~$\ne1$ to the settings option of
+the \verb`\eval` command. The \verb`<positive number>` does not
+need to be an integer. It could be \verb`e` (if you object to writing
+\verb`\ln`) but is more likely to be $2$ or another small integer;
+$10$ is the default. If you want to use this changed base not for
+one but most calculations, then add an entry with your choice of base
+to a configuration file; see §\ref{sec:settingsDefaults}.
+
+\subsection{Calculation mode}
+
+\label{subsec:settingsRecalcMode}A variable may change in the course
+of a calculation. This is certainly true of sums and products. If
+a parameter in the vv-list depends on the variable then that parameter
+will need to be recalculated, perhaps repeatedly, in the course of
+a calculation. By entering either
+\begin{lyxcode}
+vv@~=~<integer>
+\end{lyxcode}
+or (as in version 1 of \verb`numerica`),
+\begin{lyxcode}
+vvmode~=~<integer>
+\end{lyxcode}
+in the settings option it is possible to turn on or off the ability
+to repeatedly evaluate the vv-list; \verb`<integer>` here takes two
+possible values, \texttt{0} or \texttt{1}. \texttt{vv@=0} (or \texttt{vvmode=0})
+means the vv-list is evaluated once at the start of the calculation;
+\texttt{vv@=1} (or\texttt{ vvmode=1}) means the vv-list is recalculated
+every time the relevant variable changes.\footnote{In version 1 of \texttt{numerica} only the \texttt{vvmode} name for
+this setting was available. To the author's eye, the \texttt{@} sign
+seems sufficiently close to a symbol like $\circlearrowleft$, suggesting\texttt{
+}redo or recalculate, that \texttt{vv@} is now preferred. The \texttt{@}
+symbol is – universally? – available on keyboards and \texttt{vv@}
+is only half as many keypresses as \texttt{vvmode}.}
+
+For example, in a sum it may be desirable to place the summand, or
+some part of it, in the vv-list. Since the summation variable obviously
+changes during the course of the calculation, we need to enter \texttt{vv@=1}
+in the settings option. Repeating an earlier sum (the seting \verb`p=.`
+is discussed in §\ref{subsec:settingsPunctuation}), \medskip{}
+\begin{verbatim}
+    \eval[p=.,vv@=1]{\[ \sum_{k=1}^N f(k) \]}
+      [N=100,f(k)=1/k^3,{k}=1][4] 
+\end{verbatim}
+$\Longrightarrow$      \eval[p=.,vv@=1]{\[ \sum_{k=1}^N f(k) \]}
+        [N=100,f(k)=1/k^3,{k}=1][4]
+
+As you can see, the summand \texttt{f(k)} has been given explicit
+form in the vv-list – equated to \texttt{1/k\textasciicircum 3}.
+That means we need to give a preceding value to \texttt{k} in the
+vv-list to avoid an unknown token message, hence the rightmost entry.
+But we don't want \texttt{k=1} appearing in the final display, so
+we wrap \texttt{k} in braces (see §\ref{subsec:evalVvSuppressVars}).
+Since the value \texttt{k=1} applies only to the first term in the
+sum, to ensure it is not used for all terms, we enter \texttt{vv@=1}
+in the settings option. This turns vv-recalculation mode on and ensures
+\texttt{k=1} is overwritten by \texttt{k=2}, \texttt{k=3} and so on,
+and the vv-list recalculated each time. The final result is the same
+as before, although recalculating the vv-list at each step is a more
+resource-hungry process. The difference may not be marked for this
+example; with more complicated expressions it noticeably takes longer.
+
+Because it is necessary to activate this switch when using \emph{implicit}
+notations – like $f(k)$ in the example – rather than the explicit
+form of the function in the main argument, it seems natural to call
+\texttt{vv@=1} \emph{implicit }mode and \texttt{vv@=0} (the default)
+\emph{explicit }mode. Most calculations are explicit mode – the vv-list
+is evaluated only once.\emph{ }
+
+\subsection{Changing the vv-list display format}
+
+\label{subsec:settingsVvDisplayChangeLocal}In previous formulas with
+variables the vv-list has been displayed following the result. It
+is wrapped in parentheses following a comma followed by a space. These
+formatting elements – comma, space, parentheses – can all be changed
+with the settings option.
+
+The default format specification is 
+\begin{lyxcode}
+\{,\}\textbackslash mskip~12mu~plus~6mu~minus~9mu(vv)
+\end{lyxcode}
+for a text-style display (an inline formula) and
+\begin{lyxcode}
+\{,\}\textbackslash mskip~36mu~minus~24mu(vv)
+\end{lyxcode}
+in a display-style context. The commas are wrapped in braces because
+these are items in a comma-separated list. Both entries exhibit the
+elements: punctuation (comma), preceding a variable space, preceding
+the parenthesized vv-list (the \texttt{vv} placeholder). No full stop
+is inserted after the closing parentheses because the \texttt{\textbackslash eval}
+command may occur in the middle of a sentence (even in display style).
+For inline use, the elasticity of the space becomes relevant when
+\TeX{} is adjusting individual lines to fit sentences into paragraphs
+and paragraphs into pages. The largest spacing that can be stretched
+to is a quad, $18$~mu (mu~=~math unit), and the smallest that
+can be shrunk to is a thin space, $3$~mu. In display style,\texttt{
+}the largest spacing specified is the double quad, in line with the
+recommendation in \emph{The \TeX{} Book}, Chapter~18, but this can
+shrink to a single quad, for instance if the vv-list is heavily populated
+with variables so that the evaluated result is pushed well to the
+left by the vv-list. (But see below, §\ref{subsec:settings New-line-display}.)
+
+If you want to change these defaults, enter in the settings option
+\begin{lyxcode}
+vvi~=~<new~specification>
+\end{lyxcode}
+to change the inline display and
+\begin{lyxcode}
+vvd~=~<new~specification>
+\end{lyxcode}
+to change the display-style display For example the settings
+\begin{lyxcode}
+vvi~=~\{,\}\textbackslash quad(vv)
+
+vvd~=~\{,\}\textbackslash qquad(vv)
+\end{lyxcode}
+would give a comma (in braces since the settings option is a comma-separated
+list) and a fixed space (of one or two quads) between the result and
+the parenthesized vv-list. 
+
+The vv-list itself in the display specification is represented by
+the placeholder \texttt{vv}. If the \texttt{vv} is omitted from the
+specification, then the vv-list will not appear at all:
+\begin{centred}
+\verb`\eval[vvi=?!]{$ \pi $}[\pi=3]` $\Longrightarrow$  \eval[vvi=?!]{$ \pi $}[\pi=3]
+\end{centred}
+More relevantly, it may well be the case that all variables in the
+vv-list are suppressed (wrapped in braces). In that case nothing is
+displayed. Compare the last example with
+\begin{centred}
+\verb`\eval[vvi=?!]{$ \pi $}[{\pi}=3]` $\Longrightarrow$ \eval[vvi=?!]{$ \pi $}[{\pi}=3]
+\end{centred}
+and
+\begin{centred}
+\verb`\eval[vvi=?!]{$ \pi $}` $\Longrightarrow$ \eval[vvi=?!]{$ \pi $}
+\end{centred}
+See also the punctuation setting below, §\ref{subsec:settingsPunctuation}.
+
+\subsection{Displaying the vv-list on a new line }
+
+\label{subsec:settings New-line-display}Display of a long formula
+with many variables, hence a full vv-list, may not fit comfortably
+on a line. In an earlier example I used Brahmagupta's formula to calculate
+the area of a triangle. It squeezed onto a line. I shall now use his
+formula for the area of a cyclic quadrilateral:
+\[
+A=\sqrt{(s-a)(s-b)(s-c)(s-d)}.
+\]
+The extra side (quadrilateral as against triangle) means there is
+a further variable to accommodate, not only in the formula but also
+in the vv-list. In the following example, the cyclic quadrilateral
+is formed by a 45-45-90 triangle of hypotenuse 2 joined along the
+hypotenuse to a 30-60-90 triangle. The sides are therefore $\surd2,\surd2,\surd3,1$.
+Adding the areas of the two triangles, the area of the quadrilateral
+is $A=1+\tfrac{1}{2}\surd3$, or in decimal form, \verb`$\eval{1+\tfrac12\surd3}$`
+$\Longrightarrow$ $\eval{1+\tfrac12\surd3}$. Let's check with Brahmagupta's
+formula:
+\begin{verbatim}
+    \eval[p=.,vvd={,}\\(vv),*]
+      {\[ \sqrt{(s-a)(s-b)(s-c)(s-d)} \]}
+        [s=\tfrac12(a+b+c+d),
+           a=\surd2,b=\surd2,c=\surd3,d=1] 
+\end{verbatim}
+$\Longrightarrow$     \eval[p=.,vvd={,}\\(vv),*]
+      {\[ \sqrt{(s-a)(s-b)(s-c)(s-d)} \]}
+        [s=\tfrac12(a+b+c+d), 
+           a=\surd2,b=\surd2,c=\surd3,d=1] 
+
+\noindent The values agree. The point to note here is the\texttt{
+vvd=\{,\}\textbackslash\textbackslash (vv)} and the \texttt{{*}}
+in the settings option. The \texttt{\textbackslash\textbackslash}
+in a specification for \texttt{vvd} acts as a trigger for \texttt{numerica}
+to replace whatever math delimiters are enclosed by the \verb`\eval`
+command with a \verb`multline` environment. As you can see, the specification
+inserts a comma after the formula and places the parenthesized vv-list
+on a new line. The star \texttt{{*}} if present suppresses equation
+numbering by turning the \verb`multline` into a \verb`multline*`
+environment. 
+
+Things to note in the use of\texttt{ \textbackslash\textbackslash}
+in a \texttt{vvd} specification are that
+\begin{itemize}
+\item it applies only to the \texttt{vvd} specification, not the \texttt{vvi}
+spec.;
+\item it applies only when\emph{ }\verb`\eval`\emph{ wraps around }a math
+environment of some kind; 
+\item it has no effect when the \verb`\eval` command is used \emph{within}
+a math environment when the presentation of the result is of the form
+\emph{result, vv-list}. The formula is not displayed and so the pressure
+on space is less and the `ordinary' vv-list specification is used.
+\end{itemize}
+
+\subsection{Punctuation}
+
+\label{subsec:settingsPunctuation}The \verb`\eval` command can be
+used within mathematical delimiters or it can be wrapped around mathematical
+delimiters. The latter gives a \emph{formula=result} style of display
+automatically, which is convenient. One doesn't need to write the
+\emph{formula=} part of the expression, but it causes a problem when
+\verb`\eval` wraps around a display-style or similar environment:
+how to display a following punctuation mark? For an inline display
+we can simply follow the \verb`\eval` command with the appropriate
+punctuation, for instance: \verb`\eval{$ 1+1 $}.` $\Longrightarrow$
+\eval{$ 1+1 $}. But with \verb`\[ \]` delimiters used \emph{within}
+the \verb`\eval` command a trailing fullstop will slide off to the
+start of the next line, since it is beyond the closing delimiter.
+We want it to display as if it were the last element \emph{before}
+the closing delimiter.
+
+Explicitly putting it there – \verb`\eval{\[ 1+1. \]}` – means the
+punctuation mark becomes part of the formula. Potentially \texttt{numerica}
+then needs to check not just for a fullstop but also other possible
+punctuation marks like comma, semicolon, perhaps even exclamation
+and question marks. All these marks have roles in mathematics or \texttt{l3fp}.
+Including them in the formula means distinguishing their punctuation
+role from their mathematical role and can only cause difficulties
+and slow evaluation.
+
+Instead, \texttt{numerica} uses the setting 
+\begin{lyxcode}
+p~=~<char(s)>~
+\end{lyxcode}
+to place the {\ttfamily\verb`<char(s)>`} after the result
+but within the environment delimiters. The default punctuation mark
+is the comma so that simply entering \texttt{p} will produce a comma
+in the appropriate place. This saves having to write \texttt{p=\{,\}}
+as would otherwise be required, since the settings option is a \emph{comma}-separated
+list.
+
+Nor is one limited to a single punctuation mark: 
+\begin{centred}
+\verb`\eval[p=\ (but no 8!)]{\[ \frac{1}{81} \]}[9]` $\Longrightarrow$
+\eval[p=\ \text{(but no 8!)}]{\[ \frac{1}{81} \]}[9]
+\end{centred}
+
+\subsection{Reuse setting}
+
+This setting determines whether the entire display or only the numerical
+result is saved to file with the \verb`\nmcReuse` command. See below,
+§\ref{subsec:supplReuseEvalSetting}.
+
+\section{Infinite sums and products}
+
+\label{sec:settingsInfiniteSumsProds}There are ways of tweaking various
+default settings to nudge infinite sums and products to a correct
+limit. These tweaks are applied via the settings option of the \verb`\eval`
+command. 
+
+The normal convergence criterion used by \texttt{numerica} to determine
+when to stop adding/multiplying terms in an infinite sum/product is
+\emph{when the next term added/multiplied leaves the total unaltered
+when rounded to 2 more digits than the specified rounding value.}
+Suppose $T_{k}$ is the sum/product after the inclusion of $k$ terms,
+and $r$ is the rounding value. Denote $T_{k}$ rounded to $r$ figures
+by $\left(T_{k}\right)_{r}$. \emph{The infinite sum or product stops
+at the $(k+1)$th term (and the value is attained at the $k$th term)
+when }$\left(T_{k+1}\right)_{r+2}=\left(T_{k}\right)_{r+2}$. The
+hope is that if this is true at rounding value $r+2$ then at rounding
+value $r$ the series or product will have attained a stable value
+at that level of rounding.
+
+For a series of monotonic terms converging quickly to a limit, this
+stopping criterion works well, less so if convergence is slower, as
+seen earlier with the infinite product for $\sinh1$. The criterion
+can fail completely when terms behave in a non-monotonic manner. Terms
+of a Fourier series, for example, may take zero values; the criterion
+is necessarily satisfied but the series may still be far from its
+limit. In a product the equivalent would be a term taking unit value.
+Sometimes the initial terms of series or products are `irregular'
+and take these `stopping' values meaning sum or product would stop
+after only one or two additions/multiplications and far from any limit. 
+
+\begin{table}[t]
+\centering
+\noindent \centering{}\caption{Settings for infinite sums \& products}\label{tab:settingsSumsProducts}
+\noindent \begin{center}
+{\small{}%
+\begin{tabular}{ll>{\raggedright}p{4cm}l}
+\toprule 
+key & type & meaning & default\tabularnewline
+\midrule 
+\texttt{S+} & int & extra rounding for stopping criterion & \texttt{2}\tabularnewline
+\texttt{S?} & $\text{int}\ge0$ & stopping criterion query terms for sums & \texttt{0}\tabularnewline
+\texttt{P+} & int & extra rounding for stopping criterion & \texttt{2}\tabularnewline
+\texttt{P?} & $\text{int}\ge0$ & stopping criterion query terms for products & \texttt{0}\tabularnewline
+\bottomrule
+\end{tabular}}
+\par\end{center}
+\end{table}
+To cope with these possibilities, \texttt{numerica} offers two settings
+for sums, two for products, summarized in Table~\ref{tab:settingsSumsProducts}.
+These are entered in the settings option of the \verb`\eval` command.
+\begin{itemize}
+\item \texttt{S+=<integer> }or \texttt{P+=<integer>} additional rounding
+on top of the specified (or default) rounding for the calculation;
+default = $2$
+\begin{itemize}
+\item the larger the additional \texttt{<integer>} is, the more likely that
+sum or product has attained a stable value at the specified rounding
+$r$ 
+\end{itemize}
+\item \texttt{S?=<integer${}\,\mathtt{\ge0}$> }or \texttt{P?=<integer${}\,\mathtt{\ge0}$>}
+the number of final terms to query after the stopping criterion has
+been achieved to confirm that it is not an `accident' of particular
+values; default = $0$
+\begin{itemize}
+\item a final few terms to be summed/multiplied and the rounded result after
+each such operation to be compared with the rounded result at the
+time the stopping criterion was achieved. Suppose the additional rounding
+(\texttt{S+} or \texttt{P+}) is $n$ on top of the specified rounding
+$r$ and let the number of final checking terms be $m$. Suppose $T_{k_{0}}$
+is the first term at which the stopping criterion is achieved: $\left(T_{k_{0}}\right)_{r+n}=\left(T_{k_{0}+1}\right)_{r+n}$.
+What we require of the final query terms is that $\left(T_{k_{0}}\right)_{r+n}=\left(T_{k_{0}+1+j}\right)_{r+n}$
+for $j=0,1,\ldots,m$.
+\end{itemize}
+\end{itemize}
+Previously we found that the infinite product for $\sinh1$ with the
+default settings gave the wrong value, $0.174$, deficient by $1$
+in the last digit. We now have the means to tweak the stopping criterion
+by increasing the additional rounding: 
+\begin{verbatim}
+    \eval[p,P+=3]{\[
+      \prod_{k=1}^{\infty}
+      \biggl(\frac{x^2}{k^2\pi^2} +1\biggr) 
+    \]}[x=1][3] \nmcInfo{prod}.
+\end{verbatim}
+\noindent $\Longrightarrow$ \noindent \eval[p,P+=3]{\[
+  \prod_{k=1}^{\infty}
+  \biggl(\frac{x^2}{k^2\pi^2} +1\biggr) 
+\]}[x=1][3]  \nmcInfo{prod}.
+
+\noindent To obtain that last item of information (350 factors), I've
+anticipated a little and used the command \verb`\nmcInfo` with the
+argument \verb`prod`; see §\ref{sec:supplInfo}. The product now
+produces the correct three-figure value, but it takes $350$ factors
+to do so. 
+
+Knowing how many terms or factors have been needed helps assess how
+trustworthy the result from an infinite sum or product is. For example,
+for the exponential series,
+\begin{verbatim}
+    \eval[p]{\[
+      \sum_{k=0}^\infty \frac1{k!} 
+    \]}[9] \nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[\sum_{k=0}^\infty \frac1{k!} \]}[9] \nmcInfo{sum}. 
+
+To $9$ places of decimals, using the default value \texttt{S+=2},
+the exponential series arrives at the right sum after only $15$ terms.
+Convergence is rapid. We can trust this result (and it is in fact
+the correct nine-figure value). By contrast, if we didn't know the
+value of $\sinh1$ beforehand, noting the number of factors required
+would make us justly cautious about accepting the result of the infinite
+product calculation. 
+
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+One way to gain confidence in a result is to choose a possibly unrealistic
+rounding value – say, the default $6$ for the infinite product –
+then use \emph{negative} values for the extra rounding, \texttt{S+=-5},
+\texttt{S+=-4}, \ldots{} , so that the stopping criterion applies at
+rounding values $s$ of $6+(-5)=1$, one decimal place, $6+(-4)=2$,
+two decimal places, and so on, but the result is always presented
+to $6$ decimal places. You can then see how the $6$-figure results
+behave relative to the number of terms it takes to meet the stopping
+criterion. A little experimenting shows that for the infinite product
+for $\sinh1$ the number of factors $N_{s}$ required at a stopping
+rounding value $s$ increases in geometric proportion with a scale
+factor of about $3$: $N_{s}\approx\text{const}\times3^{s}$. This
+rapidly becomes large ($3^{4}=81,3^{5}=243\dots$). For the exponential
+series on the other hand $N_{s}=4+s$, the number of terms increases
+only slowly, in direct proportion to the stopping rounding value.
+Similar experiments with the sums of inverse fourth, third and second
+powers of the integers using \verb`\nmcInfo` to find how many terms
+are required at each stopping rounding value, show that at least over
+the rounding value range $1$ to $8$, for inverse fourth powers $N_{s}\approx\text{const}\times1.7^{s}$,
+for inverse third powers $N_{s}\approx\text{const}\times2^{s}$ and
+for inverse squares $N_{s}\approx\text{const}\times3^{s}$. All are
+geometric rather than arithmetic progressions, but for inverse fourth
+powers the scale factor ($\approx1.7$) is sufficiently small that
+for these low values of $s$ the number of terms required does not
+grow too quickly (e.g. $1.7^6\approx\eval{1.7^6}[0]$). It is a standard
+result (Euler) that the series sums to $\pi^{4}/90$: \verb`$ \eval{ \pi^4/90 } $`
+$\Longrightarrow$ $ \eval{ \pi^4/90 } $ to six places, and indeed,
+with the default \texttt{S+=2},
+\begin{centred}
+\verb`\eval[p]{\[ \sum_{k=1}^\infty \frac1{k^4} \]}` $\Longrightarrow$
+\eval[p=.]{\[ \sum_{k=1}^\infty \frac1{k^4} \]}
+\end{centred}
+\end{shaded}%
+\end{minipage}
+
+\subsection{Premature ending of infinite sums}
+
+All the series considered so far have been monotonic. Trigonometric
+series will generally not be so, nor even single-signed. 
+
+Trigonometric sums are computationally intensive and so, for the following
+example, I have specified a rounding value of 2. The series 
+\[
+\sum_{n=1}^{\infty}\frac{4}{n^{2}\pi^{2}}(1-\cos n\pi)\cos2\pi nt
+\]
+is the Fourier series for the triangular wave function \textbackslash\!/\!\textbackslash\!/\!\textbackslash\!/\!\textbackslash{}
+\ldots{} of period 1, symmetric about the origin where it takes its
+maximum value 1, crossing the axis at $t=0.25$ and descending to
+its minimum $-1$ at $t=0.5$, before ascending to a second maximum
+at $t=1$ (and so on). In the interval $[0,0.5)$ the series should
+sum to $1-4t$. The problem is that the summand $\frac{4}{n^{2}\pi^{2}}(1-\cos n\pi)\cos2\pi nt$
+vanishes both when $n$ is even and when $4nt$ is an odd integer.
+If $t=0.1$ then $4nt$ is never an odd integer so the summand vanishes
+only for $n$ even, every second term. We expect the result to be
+$1-4\times0.1=0.6$.
+\begin{verbatim}
+    \eval[p]{\[
+      \sum_{n=1}^{\infty}
+        \frac{4}{n^{2}\pi^{2}}
+        (1-\cos n\pi)\cos2\pi nt 
+    \]}[t=0.1][2] \nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[
+  \sum_{n=1}^{\infty}
+    \frac{4}{n^{2}\pi^{2}}
+    (1-\cos n\pi)\cos2\pi nt 
+\]}[t=0.1][2]  \info{sum}.
+
+\noindent Only one term? Of course – since for the second term $n$
+is even, the term vanishes and the stopping criterion is satisfied.
+The way around this problem is to query terms \emph{beyond} the one
+where the stopping criterion is achieved, i.e., to set \texttt{S?}
+to a nonzero value. We try \texttt{S?=1}: 
+\begin{verbatim}
+    \eval[p,S?=1]{\[
+      \sum_{n=1}^{\infty}
+        \frac{4}{n^{2}\pi^{2}}
+        (1-\cos n\pi)\cos2\pi nt 
+    \]}[t=0.1][2] \nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p,S?=1]{\[
+  \sum_{n=1}^{\infty}
+    \frac{4}{n^{2}\pi^{2}}
+    (1-\cos n\pi)\cos2\pi nt 
+\]}[t=0.1][2] \info{sum}.
+
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+\begin{wraptable}{o}{0.35\columnwidth}%
+\centering{}\vspace{-5ex}
+\caption{Finite sums}\label{tab:settingsFinite-sums}
+\abovetopsep=2ex %
+\begin{tabular}{cc}
+\toprule 
+$N$ & $\Sigma$\tabularnewline
+\midrule
+$63$ & $0.6001$\tabularnewline
+$64$ & $0.6001$\tabularnewline
+$65$ & $0.5999$\tabularnewline
+$66$ & $0.5999$\tabularnewline
+$67$ & $0.5999$\tabularnewline
+\bottomrule
+\end{tabular}\end{wraptable}%
+Table~\ref{tab:settingsFinite-sums} lists the results of evaluating
+the \emph{finite }sums from $n=1$ to $N$ for values of $N$ around
+$65$. Since the specified rounding value is $2$ for the calculation,
+the stopping criterion\emph{ }applies at a rounding value of $2$
+more than that, $4$. Since $N=64$ is even, the summand for the $64$th
+term is zero and the sum takes the same value as for $N=63$. The
+$65$th term is the query term and the sum differs, so the summation
+continues. The $66$th term vanishes, so the stopping criterion is
+met. This time for the query term, the $67$th, the sum retains the
+same $4$-figure value, and the summation stops. The result was attained
+at the $65$th term. Should we be confident in the result? Increase
+the number of query terms to $3$ (there is no point in increasing
+\texttt{S?} to $2$ because of the vanishing of the even terms), the
+sum stops after $113$ terms, with the same $0.6$ result.  \end{shaded}%
+\end{minipage}
+
+For a final example, consider the error function 
+\[
+\erf z=\dfrac{2}{\sqrt{\pi}}\int_{0}^{z}e^{-t^{2}}dt
+\]
+which can also be rendered as an infinite sum (\emph{HMF }7.1.5):
+\[
+\erf z=\sum_{n=0}^{\infty}(-1)^{n}\frac{z^{2n+1}}{n!(2n+1)}.
+\]
+(\verb`\erf` expanding to \verb`erf` has been defined in the preamble
+to this document using \verb`\DeclareMathOperator`.) We calculate
+this sum for $z=2$ to $10$ places of decimals. Although this is
+an alternating series, it is obvious that the summand never vanishes
+when $z\ne0$ as here. Hence there seems no need to change the default
+value \texttt{S?=0}.
+\begin{verbatim}
+    \eval[p]{\[ 
+      \frac2{\sqrt{\pi}}
+        \sum_{n=0}^\infty(-1)^n
+          \frac{z^{2n+1}}{n!(2n+1)}   
+    \]}[z=2][10*] \nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[ 
+  \frac2{\sqrt{\pi}}
+    \sum_{n=0}^\infty(-1)^n
+      \frac{z^{2n+1}}{n!(2n+1)}   
+\]}[z=2][10*] \nmcInfo{sum}.
+
+According to \emph{HMF }Table 7.1, this calculated value of $\erf2$
+is correct to all $10$ places. But beyond $z=2$ errors will begin
+to interfere with the result. Note that $26$ terms means $n=26$
+was the last value of $n$ for which the summand was evaluated. (The
+sum stops at the $26$th term, $n=25$, but the next term $n=26$
+needs to be calculated for the stopping criterion.) Fortuitously,
+$2^{2\times26+1}=2^{53}$ is the greatest power of $2$ that can be
+\emph{exactly} rendered to the $16$ significant figures that \texttt{l3fp}
+uses. But $n!$ exceeds the $16$-significant figure limit of \texttt{l3fp}
+when $n>21$, so despite the 10-figure result, errors have already
+begun to occur in the denominator of the summand and accrue in the
+sum when $z=2$. For larger $z$ values the errors can only get worse
+and at some point will render the calculated value worthless at any
+meaningful rounding value. For example, when $z=7$ the sum apparently
+`evaluates' to over $929$ whereas we know that 
+\[
+\erf z<\dfrac{2}{\sqrt{\pi}}\int_{0}^{\infty}e^{-t^{2}}dt=1.
+\]
+
+
+\subsection{Double sums or products}
+
+Sums or products can be iterate d. For instance, the exponential function
+can be calculated this way:
+\begin{verbatim}
+    \eval[p]
+      {\[ \sum_{k=0}^{\infty}
+        \prod_{m=1}^{k}\frac{x}{m} \]}[x=2]
+\end{verbatim}
+$\Longrightarrow$     \eval[p]
+     {\[ \sum_{k=0}^{\infty}
+       \prod_{m=1}^{k}\frac{x}{m} \]}[x=2]
+
+\noindent which is \verb`\eval{$ e^2 $}` $\Longrightarrow\eval{\ensuremath{e^{2}}}$.
+
+A second example is afforded by Euler's transformation of series (\emph{HMF~}3.6.27).
+To calculate $e^{-1}$ we use 
+\begin{verbatim}
+    \eval[p]
+      {\[ \sum_{n=0}^{\infty}
+              \frac{(-1)^{n}}{n!} \]}[3] \info{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3] \info{sum}.
+
+Following Euler, this series can be transformed to the form
+\begin{verbatim}
+    \eval[p,S?=1]{\[
+      \sum_{k=0}^\infty \frac{(-1)^k}{2^{k+1}}
+      \sum_{n=0}^k(-1)^n\binom kn \frac1{(k-n)!} 
+    \]}[3] \nmcInfo{sum}.
+\end{verbatim}
+$\Longrightarrow$ \eval[p,S?=1]{\[ \sum_{k=0}^\infty \frac{(-1)^k}{2^{k+1}}\sum_{n=0}^k(-1)^n\binom kn \frac1{(k-n)!} \]}[3] \nmcInfo{sum}.
+
+\noindent Note the setting \verb`S?=1`. Without it, the summation
+stops after $1$ term, the $k=0$ term, because the $k=1$ term vanishes.
+With \verb`S?=1` it takes $16$ terms of the \emph{outer }sum to
+reach the stopping criterion. Since that sum starts at $0$, that
+means that changing the upper limit from $\infty$ to $15$ should
+give the same result – which it does – but it takes $\tfrac{1}{2}\times16\times17=136$
+terms in total to get there, to be compared with the $9$ terms of
+the earlier simpler sum, and the terms are more complicated. Obviously
+such double sums are computationally intensive.
+
+\section{Changing default values}
+
+\label{sec:settingsDefaults}The settings option enables various settings
+to be changed for an individual calculation. You may find yourself
+wanting to make such changes sufficiently often that a change of default
+value is a better plan than encumbering each calculation with a list
+of settings.
+
+The way to do that is to create a \emph{configuration file} named
+\texttt{numerica.cfg} in a text editor. Its entries are of the form
+\emph{key=value} followed by a comma, and for clarity preferably one
+entry per line (although this is not essential).The key names are
+noticeably more verbose than the corresponding keys of the settings
+option.\emph{ }The possible keys are listed in Table~\ref{tab:settingsDefaults},
+together with their current default values. 
+
+\begin{table}[t]
+\centering
+\noindent \centering{}\caption{Default values, \texttt{\textbackslash eval} command}\label{tab:settingsDefaults}
+\noindent \begin{center}
+\begin{tabular}{ll}
+\toprule 
+{\small key} & {\small value}\tabularnewline
+\midrule
+{\small rounding} & {\small\texttt{6}}\tabularnewline
+{\small pad} & {\small\texttt{0}}\tabularnewline
+{\small output-sci-notation} & {\small\texttt{0}}\tabularnewline
+{\small output-exponent-char} & {\small\texttt{e}}\tabularnewline
+{\small\%} & \tabularnewline
+{\small input-sci-notation} & {\small\texttt{0}}\tabularnewline
+{\small input-exponent-char} & {\small\texttt{e}}\tabularnewline
+{\small multitoken-variables} & {\small\texttt{1}}\tabularnewline
+{\small use-degrees} & {\small\texttt{0}}\tabularnewline
+{\small logarithm-base} & {\small\texttt{10}}\tabularnewline
+{\small vv-display} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
+{\small vv-inline} & {\small\texttt{\{,\}\textbackslash mskip 12mu 6mu minus 9mu(vv)}}\tabularnewline
+{\small\%} & \tabularnewline
+{\small sum-extra-rounding} & {\small\texttt{2}}\tabularnewline
+{\small sum-query-terms} & {\small\texttt{0}}\tabularnewline
+{\small prod-extra-rounding} & {\small\texttt{2}}\tabularnewline
+{\small prod-query-terms} & {\small\texttt{0}}\tabularnewline
+\% & \tabularnewline
+{\small intify-rounding} & {\small\texttt{14}}\tabularnewline
+{\small eval-reuse} & {\small\texttt{0}}\tabularnewline
+\bottomrule
+\end{tabular}
+\par\end{center}
+\end{table}
+Keys taking one of two possible values, \verb`0` (for \verb`false/off`)
+or \verb`1` (for \verb`true/on`), are \verb`pad` (the result with
+zeros), \verb`output-sci-notation`, \verb`input-sci-notation`, (check
+for) \verb`multitoken-variables`, and \verb`use-degrees` (for trig.
+functions).
+
+The table is divided into four parts. 
+\begin{itemize}
+\item The top four rows concern elements that can be changed for individual
+calculations with the trailing optional argument of \verb`\eval`:
+rounding, padding with zeros, and outputting in scientific notation;
+see §\ref{subsec:evalRoundingEtc}. 
+\begin{itemize}
+\item Note that to output the result always in scientific notation requires
+two settings, first setting \texttt{output-sci-notation} to \texttt{1},
+and then choosing a character to act as the exponent marker. Because
+\texttt{l3fp} uses \texttt{e} for this character, \texttt{numerica}
+has made \texttt{e} its default. But this option is turned off by
+default (hence the \texttt{0} against this key).
+\end{itemize}
+\item The next block of rows concern general elements that can be changed
+for individual calculations with the settings option of \verb`\eval`;
+see §\ref{sec:settingsOption}. The key names are more expansive here
+but the effect is the same. 
+\begin{itemize}
+\item Note that to input numbers in scientific notation requires two settings,
+first setting \texttt{input-sci-notation} to \texttt{1}, and then
+choosing a character to act as the exponent marker. Because \texttt{l3fp}
+uses \texttt{e} for this character, \texttt{numerica} has made \texttt{e}
+its default. The option is turned off by default (hence the \texttt{0}
+against this key). 
+\end{itemize}
+\item The third block of rows concern default settings for infinite sums
+and products. These correspond to the keys \texttt{S+}, \texttt{S?}
+and \texttt{P+}, \texttt{P?} of the settings option that can be used
+to tweak the behaviour of the stopping criterion for such sums or
+products; see §\ref{sec:settingsInfiniteSumsProds}.
+\item The last block is for `left-overs': specifying at what rounding
+value a floating point should be considered an integer (see §\ref{subsec:defaultsIntifyingRounding}
+below), and specifying what kind of result is saved to file when the
+\verb`\nmcReuse` command is used (see §\ref{subsec:supplReuseEvalSetting}).
+\end{itemize}
+If you are dissatisfied with any of the default values listed, then
+in a text editor create a new file called \texttt{numerica.cfg} and
+assign \emph{your} values to the relevant keys. For instance, if you
+find yourself working to $4$ figures, that rounding to $6$ is too
+many, then make the entry \texttt{rounding~=}~4. If also you want
+results always presented in proper scientific notation,\emph{ $d.d_{1}d_{2}d_{3}d_{4}\times10^{n}$},
+then add a comma after \texttt{4} and enter on a new line (recommended
+but not strictly necessary; the comma is the crucial thing), \texttt{output-sci-notation~=~1,}
+(note the comma) and on another new line, \texttt{output-exponent-char~=~x}. 
+
+Perhaps you also want a non-zero setting for the final query terms
+for infinite sums and products. This makes sense if you are largely
+dealing with non-monotonic series – like Fourier series. Even the
+Euler transformation of the exponential series for $e^{-1}$ discussed
+above required a non-zero \texttt{S?}. If you wish to make this change
+then add a comma and on a new line add (for instance) \texttt{sum-query-terms~=~1,}
+and again on a new line, \texttt{prod-query-terms~=}~1. If this
+is all you wish to change, then no comma is necessary after this final
+entry. Your newly created file should look something like
+\begin{lyxcode}
+rounding~~~~~~~~~~~~~=~4,
+
+output-sci-notation~~=~1,
+
+output-exponent-char~=~x,
+
+sum-query-terms~~~~~~=~1,
+
+prod-query-terms~~~~~=~1
+\end{lyxcode}
+The white spacing may be different; white space is ignored by \texttt{numerica}
+when reading the file. Using it to align the equals signs helps \emph{us}
+read the file. Note that the last entry, because it is the last entry,
+lacks a comma. Now save the file with the name \texttt{numerica.cfg}.
+This file will be read by \texttt{numerica} near the end of its loading
+process. These settings will be \texttt{numerica}'s defaults for the
+relevant keys. 
+
+\subsection{Location of \texttt{numerica.cfg}}
+
+Save, yes, but where to? If the new settings are likely to apply only
+to your current document, then the document's directory is a sensible
+place to put it and \texttt{numerica} will certainly find it there
+since it is part of \LaTeX 3 file handling that file searches are
+not limited to the \TeX{} distribution (including your personal texmf
+tree) but also include the current document directory. But what happens
+when you start working on another document? Will you remember to copy
+\texttt{numerica.cfg} to its new location? That is why your \emph{personal
+texmf tree} is a better place. 
+
+\subsubsection{Personal texmf tree? }
+
+\label{subsec:settingsPersonal-texmf-tree}This is a directory for
+`waifs and strays' of the \TeX{} system that are not included in
+the standard distributions like MiK\TeX{} or \TeX Live. Here you place
+personal packages designed for your own particular circumstances.
+These may include your own \TeX{} or \LaTeX{} package, say \texttt{mypackage.sty},
+achieving some small or singular effect that doesn't warrant wider
+distribution on CTAN. Here you might place configuration files for
+other packages with your preferences (unless the package requires
+some specific location). Here you can put your personal bibliography
+files. 
+
+Your personal texmf tree is structured like the standard MiK\TeX{}
+or \TeX Live hierarchy but placed in another location so that there
+is no chance of its being overwritten when packages in MiK\TeX{} or
+\TeX Live are updated. But these distributions need to be alerted
+to its existence. 
+
+For example, in the MiK\TeX{} console, click on \textsf{Settings},
+and then on the \textsf{Directories} tab of the resulting dialog.
+Here you get to add your personal texmf hierarchy to the list of paths
+that MiK\TeX{} searches, by clicking on the \textsf{+} button, browsing
+to your texmf folder and selecting it. By using the up and down arrow
+keys that the MiK\TeX{} console provides, ensure that it lies \emph{above
+}the the entry for the main MiK\TeX{} tree. That way, files in your
+personal texmf tree will be found first and loaded. Now go to the
+\textsf{Tasks} menu and click on \textsf{Refresh the filename database}.
+This will let MiK\TeX{} know what is held in your personal texmf tree.
+Files there can then be used like standard \LaTeX{} packages.
+
+\subsection{Rounding in \textquoteleft int-ifying\textquoteright{} calculations}
+
+\label{subsec:defaultsIntifyingRounding}Factorials, binomial coefficients,
+summation and product variables, and (in \texttt{numerica}) $n$th
+roots from the \texttt{\textbackslash sqrt} command, all require
+integer arguments. These integers may indeed be entered explicitly
+as integers, but they can also be determined as the result of a calculation.
+Rounding errors may mean the result is not an exact integer. How much
+leeway should be allowed before it is clear that the calculation did
+not give an integer result? In the default setup, \texttt{numerica}
+is generous. A number is considered an integer if it rounds to an
+integer when the rounding value is $14$. Since \texttt{l3fp} works
+to $16$ significant figures this provides more than enough `elbowroom'
+for innocuous rounding errors to be accommodated. If a calculation
+does not round to an integer at a rounding value of $14$ then it
+seems reasonable to conclude that it has \emph{really }not given an
+integer answer, not just that rounding errors have accumulated. If
+you want to change this `int-ifying' value for a particular calculation,
+then add a line to \texttt{numerica.cfg} like
+\begin{lyxcode}
+intify-rounding~=~<integer>
+\end{lyxcode}
+Since \texttt{l3fp} works to $16$ significant figures, values of
+{\ttfamily\verb`<integer>`} greater than $16$ are pointless.
+Generally int-ifying rounding values will be less than but close to
+$16$ (although when testing the code I used some ridiculous values
+like $3$ or $4$). If other entries follow this one in the file,
+then conclude the line with a comma.
+
+\section{Parsing mathematical arguments}
+
+\label{sec:Argument-parsing} A main aim of the \texttt{numerica}
+package is to require minimal, preferably no, adjustment to the \LaTeX{}
+form in which an expression is typeset in order to evaluate it. But
+mathematicians do not follow codified rules of the kind programming
+languages insist on when writing formulas – like parenthesizing the
+arguments of functions, or inserting explicit multiplication signs
+({*}) between juxtaposed terms. Hence the question of where the arguments
+of mathematical functions end is acute. For a few functions \LaTeX{}
+delimits the argument: think of \verb`\sqrt`, \verb`\frac`, \verb`\binom`;
+also \verb`^`. But for functions like \verb`\sin` or \verb`\tanh`
+or \verb`\ln`, unary functions, this is not so; nor is it for sums
+and products, and comparisons.
+
+Before discussing the parsing rules for different groups of functions,
+I discuss the means \texttt{numerica} provides to handle exceptions
+to those rules, when one \emph{does} need to make some adjustment
+to a formula.
+
+\subsection{The cleave commands \texttt{\textbackslash q} and \texttt{\textbackslash Q}}
+
+\label{subsec:parseCleave}The word \emph{cleave} has two opposed
+meanings: to adhere or cling to, and to split apart or separate. \texttt{numerica}
+defines two commands, \verb`\q` and \verb`\Q` to achieve these opposite
+effects. When a mathematical argument is being parsed, the \verb`\q`
+command joins the next token to the argument (\emph{cleaves to});
+the \verb`\Q` command severs the next token from the argument (\emph{cleaves
+apart}). Neither command is added to the argument nor leaves a visible
+trace in the output. 
+
+Thus, without \verb`\q`, 
+\begin{centred}
+\verb`\eval{$ \sin(n+\tfrac12)(x-t) $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
+\eval{$ \sin(n+\tfrac12)(x-t) $}[n=3,x=t+\pi,t=1.234],
+\end{centred}
+which is $(\sin\tfrac{7}{2})\times\pi$. With \verb`\q` between the
+bracketed factors,
+\begin{centred}
+\verb`\eval{$ \sin(n+\tfrac12)\q(x-t) $}[n=3,x=t+\pi,t=1.234]` $\Longrightarrow$
+\eval{$ \sin(n+\tfrac12)\q(x-t) $}[n=3,x=t+\pi,t=1.234],
+\end{centred}
+which is $\sin(\tfrac{7}{2}\pi)$. Similarly, without \verb`\q`,
+\begin{centred}
+\verb`\eval[p]{\[ \cos\frac{2\pi}{T}n(t+\tfrac12T) \]}[T=2,t=1,n=3]`
+$\Longrightarrow$ \eval[p]{\[ \cos\frac{2\pi}{T}n(t+\tfrac12T) \]}[T=2,t=1,n=3]
+\end{centred}
+which is $(\cos\pi)\times3\times(1+\tfrac{1}{2}\times2)$. With \verb`\q`
+used twice, once after the fraction and once before the left parenthesis,
+\begin{verbatim}
+    \eval[p]{\[ 
+      \cos\frac{2\pi}{T}\q n\q(t+\tfrac12T)
+        \]}[T=2,t=1,n=3]
+\end{verbatim}
+$\Longrightarrow$ \eval[p]{\[ \cos\frac{2\pi}{T}\q n\q(t+\tfrac12T) \]}[T=2,t=1,n=3]
+
+\noindent which is $\cos(\pi\times3\times2)$.
+
+It should be noted that for \emph{trigonometric }functions, because
+of their use in Fourier series especially, there is another way of
+handling arguments that contain parentheses (and fractions). This
+is discussed in §\ref{subsec:parseTrigFns} below.
+
+For the \verb`\Q` command which splits an argument we have, without
+it,
+\begin{centred}
+\verb`\eval{$ 1/2e $}` $\Longrightarrow$ \eval{$ 1/2e $}, 
+\end{centred}
+which is the reciprocal of $2e$, whereas with the \verb`\Q` command
+inserted before \verb`e`,
+\begin{centred}
+\verb`\eval{$ 1/2\Q e $}` $\Longrightarrow$ \eval{$ 1/2\Q e $},
+\end{centred}
+which is one half of $e$, although it is unlikely to be read that
+way. If one half of $e$ is intended then parenthesize the $1/2$
+or present as a \verb`\tfrac`.
+
+\subsubsection{Mnemonic}
+
+As mnemonic, best seen in sans serif for the Latin Modern fonts used
+in this document, think of the letter \textsf{q} as a circle \emph{cleaving
+to} a vertical descender; think of the letter \textsf{Q} as a circle
+\emph{cleaved apart} by the diagonal stroke.
+
+\subsection{Parsing groups}
+
+The arguments of different groups of functions are handled in different
+ways. The criterion used for deciding when an argument ends for one
+group will not be that used for others. Table §\ref{subsec:defaultsIntifyingRounding}
+lists the different groups that \texttt{numerica} takes account of.
+At the top are functions or operations that have the smallest reach
+when determining where their arguments end; at the bottom are operations
+that have the greatest reach. The denominator of a slash fraction
+is treated as a unary function and is assigned to group II. By default
+trigonometric functions are treated the same as other unary functions
+but there is a setting which enables the direct (rather than inverse)
+trigonometric functions to accept a wider range of arguments, as occurs
+in Fourier series. Hence they are separated into their own group.
+
+\begin{table}
+\centering
+
+\caption{ Parsing groups}\label{tab:settingsParsing-groups}
+{\ttfamily{}%
+\begin{tabular}{ll}
+\toprule 
+{\small\textrm{group}} & {\small\textrm{function/operation}}\tabularnewline
+\midrule
+{\small\textrm{I}} & {\small\textrm{surd, logical Not}}\tabularnewline
+{\small\textrm{II}} & {\small\textrm{unary functions (direct trig. functions default), /}}\tabularnewline
+{\small\textrm{III}} & {\small\textrm{direct trig. functions with special setting}}\tabularnewline
+{\small\textrm{IV}} & {\small\textrm{sums, products}}\tabularnewline
+{\small\textrm{V}} & {\small\textrm{comparisons}}\tabularnewline
+{\small\textrm{VI}} & {\small\textrm{logical And, logical Or}}\tabularnewline
+\bottomrule
+\end{tabular}}
+
+\end{table}
+ A formula is a sequence of tokens and brace groups. All parsing occurs
+from the left, \LaTeX{} argument by \LaTeX{} argument, where \emph{argument}
+means either a token (an N-type argument in \verb`expl3`-speak) or
+a brace group (an n-type argument). To distinguish \LaTeX{} arguments
+from mathematical arguments I shall when necessary refer to L-args
+and M-args. A mathematical argument may end \emph{at} an L-arg, meaning
+immediately before the L-arg, or end \emph{with} the L-arg, meaning
+immediately after the L-arg. Ending or not will in general depend
+on whether the argument is in \emph{first position} – the position
+immediately following a function token like \verb`\sin` or \verb`\log`
+– or in \emph{general position} – any later position (although for
+trigonometric functions we will also need to consider \emph{second}
+and even \emph{third }positions). 
+
+For counting position, we need to allow for formatting elements and
+multi-token numbers – in both decimal and scientific formats. Formatting
+elements do not change the position count. This applies to things
+like thin spaces or phantoms (and their arguments) or modifiers like
+\verb`\left` or \verb`\biggl`. Multi-token numbers (in decimal or
+scientific formats) are treated as single items; they advance the
+position count by exactly one. \LaTeX{} functions – like \verb`\frac`
+– which take \LaTeX{} arguments again advance the position count only
+by one. Mathematically, the fraction is viewed as a single unit.
+
+I shall refer to a token or a token and its \LaTeX{} arguments – like
+\verb`\frac` and its arguments – as an \emph{item}. Similarly, a
+(possibly multi-token) number is an item. Also it will help to distinguish
+tokens within brackets where both brackets lie to the right of a function
+from those that do not. The former I call \emph{clothed}; the latter
+are \emph{naked}. Thus the plus sign in $(\sin x+y)$ is naked relative
+to the sine (one bracket to the left of the function), but is clothed
+in $\sin(x+y)$ (both brackets to the right of the function). 
+
+\subsubsection{Parsing group I}
+
+The only functions in this category are the surd and logical Not. 
+
+Why distinguish the surd from other unary functions? Surely we all
+agree that \verb`\sin2\pi`, displaying as $\sin2\pi$, vanishes?
+The argument of the sine extends beyond the $2$ to include the $\pi$.
+But \verb`\surd2\pi`, displaying as $\surd2\pi$, is understood to
+be the product $\surd2\times\pi$. The argument of the surd ends with
+the $2$. The surd binds more tightly to its argument than is true
+of unary functions generally. 
+
+For parsing group I
+\begin{enumerate}
+\item if a left bracket is in first position, the mathematical argument
+ends with the matching right bracket; otherwise
+\item the argument ends with the item in first position and any L- or M-args
+required by that item.
+\end{enumerate}
+If the factorial sign \verb`!` \emph{preceded} its argument, it too
+would belong to this parsing state, for it also binds tightly like
+the surd. This means that an expression like $\surd4!$ is intrinsically
+ambiguous. Is it the square root of $24$ or the factorial of $2$?
+In \texttt{numerica} it produces the (perhaps rather odd) error
+\begin{centred}
+\verb`\eval{$ \surd 4! $}` $\Longrightarrow$ \eval{$ \surd4! $}
+\end{centred}
+The surd has seized the argument; there is nothing for the factorial
+to operate on. The same error arises if the $4$ is parenthesized,
+but parenthesizing like either \verb`(\surd 4)!` or \verb`\surd(4!)`
+repairs the situation. Because other unary functions (like the sine
+or logarithm) do not bind as tightly, this ambiguity does not arise
+for them.
+
+Exponents cause no problem because taking square roots and raising
+to a power are commutative operations – the result is the same whichever
+is performed first. 
+\begin{centred}
+\verb`\eval{$ \surd 3^4 $}` $\Longrightarrow$ \eval{$ \surd 3^4 $}.
+\end{centred}
+
+\subsubsection{Parsing group II}
+
+In the default setup this category includes the trigonometric and
+hyperbolic functions, their inverses, the various logarithms and the
+exponential functions, the signum function \verb`\sgn`, and the denominators
+of slash fractions \verb`/`. Note however that there is a setting
+switch which enables trigonometric  functions to handle parentheses
+in arguments more generally; see §\ref{subsec:parseTrigFns}. 
+\begin{itemize}
+\item In parsing group II we wish to accommodate usages like $\ln z^{n}=n\ln z$
+(\emph{HMF} 4.1.11), or $\gd z=2\arctan e^{z}-\frac{1}{2}\pi$ (\emph{HMF}
+4.3.117), defining the Gudermannian. The exponent is included in the
+argument. Considering $\ln(1+1/n)^{n}$ exponents must also be part
+of parenthesized arguments. 
+\item An approximation to Stirling's formula for the factorial is often
+written $\ln N!\approx N\ln N-N$ (widely used in texts on statistical
+mechanics). Hence the factorial sign should also be considered part
+of the argument.
+\item $\ln xy=\ln x+\ln y$ means the argument must reach over a product
+of variables. Identities like $\sin2z=2\sin z\cos z$ mean the argument
+also reaches over numbers, and expressions like $\sin\tfrac{1}{2}\pi x$
+(\emph{HMF} 4.3.104) mean that it further reaches over \verb`\tfrac`-s
+and constants.
+\item Essentially \emph{anything }can be in first position, and without
+parentheses; e.g.
+\begin{itemize}
+\item unary functions: $\ln\ln z$ (\emph{HMF} 4.1.52), $\ln\tan\dfrac{z}{2}$
+(\emph{HMF} 4.3.116),
+\item fractions: $\ln\dfrac{z_{1}}{z_{2}}$ (\emph{HMF} 4.1.9), $\arcsin\dfrac{(2ax+b)}{(b^{2}-4ac)^{1/2}}$
+(\emph{HMF} 3.3.36), $\ln\dfrac{\tan z}{z}$ (\emph{HMF} 4.3.73),
+\item absolute values: $\ln\abs*{\dfrac{a+x}{a-x}}$ (\emph{HMF} 3.3.25),
+\item square roots: $\arctan\sqrt{\dfrac{\nu_{1}}{\nu_{2}}F}$ (\emph{HMF
+}26.6.8)
+\end{itemize}
+\end{itemize}
+With these examples in mind, for parsing group II
+\begin{enumerate}
+\item if a left bracket is in first position, the mathematical argument
+ends with the matching right bracket and any attached exponent, or
+factorial or double factorial sign; otherwise
+\item the mathematical argument includes the item in first position and
+any L- or M-args required by that item; 
+\begin{enumerate}
+\item if the item in first position is a number, variable, constant or \verb`\tfrac` 
+\begin{enumerate}
+\item the argument appends the next item if it is a number, variable, constant
+or \verb`\tfrac`, and so on recursively; or
+\item the argument appends the next item if it is an exponent, or facorial
+or double factorial sign, and ends there; otherwise
+\item the argument ends.
+\end{enumerate}
+\item if the item in first position is not a number, variable, constant
+or \verb`\tfrac`
+\begin{enumerate}
+\item the argument appends the next item if it is an exponent, or factorial
+or double factorial sign, and ends there; otherwise
+\item the argument ends.
+\end{enumerate}
+\end{enumerate}
+\end{enumerate}
+An argument may extend over (see 2(a)i) numbers, constants, variables
+and \verb`\tfrac`-s, as instanced with $\sin2\tfrac{p}{q}\pi x$
+which exhibits all elements.
+
+Illustrating 1, the exponent is included in the argument but not the
+following variable:
+\begin{centred}
+\verb`\eval{$ \log_{10}(1+2+3+4)^3n $}[n=5]` $\Longrightarrow$ \eval{$ \log_{10}(1+2+3+4)^3n $}[n=5].
+\end{centred}
+For the sake of the reader, and as one naturally does in any case
+to avoid ambiguity, the formula should be written with the variable
+$n$ preceding the logarithm: $n\log_{10}(1+2+3+4)^{3}$. The way
+the example is written suggests that the writer wished the $n$ to
+be considered part of the argument of the logarithm. If that is the
+case, inserting a \verb`\q` command before \verb`n` would achieve
+this, but that would still be confusing for the reader of the pdf.
+Inserting parentheses is the only sensible thing to do. 
+
+Illustrating 2(a)ii, again the exponent is included in the argument
+but not the following variable:
+\begin{centred}
+\verb`\eval{$ \log_{10}m^3n $}[m=10,n=5]` $\Longrightarrow$ \eval{$ \log_{10}m^3n $}[m=10,n=5].
+\end{centred}
+Again, for the sake of the reader and as one naturally does to avoid
+ambiguity, the variable $n$ should precede the logarithm. If in fact
+the intention was for the $n$ to be included in the argument of the
+logarithm, then again the \verb`\q` command could be used or, better
+in this case, the $n$ could be shifted to precede the $m$, which
+illustrates 2(a)i:
+\begin{centred}
+\verb`\eval{$ \log_{10}nm^3 $}[m=10,n=5]` $\Longrightarrow$ \eval{$ \log_{10}nm^3 $}[m=10,n=5],
+\end{centred}
+the logarithm of $5000$, or better still, $m^{3}n$ could (and should)
+be parenthesized for the sake of the reader.
+
+Why the difference between $nm^{3}$ where $n$ and $m^{3}$ are included
+in the argument, and $m^{3}n$ where $n$ is not? Any criterion is
+going to miss some instances where a different outcome might be desirable.
+Where an argument ends is affected by visual appearance in the pdf.
+It is simple and easy to remember if it is understood that anything
+that breaks the `visual flow' of juxtaposed numbers, variables,
+constants and \verb`\tfrac`-s ends the argument. An exponent does
+just that. If you feel there is ambiguity, parenthesize to clarify.
+
+Illustrating 2(b)ii, the argument stops with the \verb`\dfrac` and
+its arguments and does not extend to the following constant:
+\begin{centred}
+\verb`\eval{$ \sin\dfrac12\pi $}` $\Longrightarrow$ \eval{$ \sin\dfrac12\pi $}.
+\end{centred}
+Obviously, someone writing an expression like this intends the $\pi$
+to be part of the argument. In that case, a \verb`\tfrac` should
+be used since the \verb`\dfrac` breaks the `visual flow' of the
+argument. 
+\begin{description}
+\item [{Fractions}]~
+
+But why not a plain \verb`\frac`? After all, for an inline expression
+it displays in the same way as a \verb`\tfrac`. I considered making
+the argument-behaviour of \verb`\frac` the same as \verb`\tfrac`
+for text-style contexts, and the same as \verb`\dfrac` for display-style
+contexts, but that would have meant the same expression evaluating
+to different results depending on whether it lay between \verb`$ $`
+or \verb`\[ \]` delimiters, which ruled it out. Because \verb`\frac`
+sometimes displays as \verb`\dfrac`, it is treated like \verb`\dfrac`
+(but see §\ref{subsec:parseTrigFns}, specifically \texttt{()=2}). 
+\item [{Slash~fractions}]~
+
+It is easy to write ambiguous expressions using the slash $/$ to
+indicate fractions or division. How should $\pi/2n$ be interpreted?
+With from-the-left evaluation and calculator precedence rules which
+give equal precedence to {*} (multiplication) and / (division), this
+would be interpreted as $(\pi/2)\times n$, but most people will instinctively
+interpret it as $\pi/(2n)$. By placing \verb`/` in parsing group
+II, this is what \texttt{numerica} does. It treats the right-hand
+argument of the slash \emph{as if it were the argument of a named
+function}. This means that $1/2\sin(\pi/6)$ is parsed as $(1/2)\sin(\pi/6)$
+rather than as $1/(2\sin(\pi/6))$. It also means that $1/2\exp(1)$
+and $1/2e$ give different results, which (in the author's view) is
+acceptable since they display differently and are not instinctively
+read in the same way. 
+\end{description}
+
+\subsubsection{Parsing group III}
+
+\label{subsec:parseTrigFns}By default trigonometric functions are
+set to parsing group II. This accommodates many instances of how arguments
+are used with these functions, but Fourier series in particular require
+more. For them we need to take account of how \emph{parentheses} are
+used in arguments. I find $\tan\tfrac{1}{2}(A+B)$ (\emph{HMF }4.3.148),
+$\sec\pi(\tfrac{1}{4}+\tfrac{1}{2}az)$ (\emph{HMF }19.3.3), $\cos(2m+p)z$
+(\emph{HMF }20.2.3), $\sin(2n+1)v$ (\emph{HMF }16.38.1). Looking
+through various texts discussing Fourier series it is easy to find
+examples like
+\[
+\cos\frac{2\pi}{T}nt,\quad\cos\frac{2\pi}{T}n(t+\tfrac{1}{2}T),
+\]
+and
+\[
+\cos(N+\tfrac{1}{2})\frac{2\pi\tau}{T},\quad\sin2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right).
+\]
+In the last of these \verb`\left` and \verb`\right` have been used
+to enlarge the parentheses. 
+
+All these usages can be accommodated by adjusting a setting in the
+settings option (§\ref{sec:settingsOption}) of the \verb`\eval`
+command:
+\begin{lyxcode}
+()~=~<integer>
+\end{lyxcode}
+where \texttt{<integer>} is one of \texttt{0, 1, 2}. 
+
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+I remain unsure whether to persist with the \texttt{()} setting. A
+principal aim of \texttt{numerica} is to avoid having to modify a
+formula to bring it into a form that can be evaluated. The \texttt{()}
+setting arose in that context, but it complicates the code and may
+well confuse the user. Inserting cleave functions, \texttt{\textbackslash q}
+or \texttt{\textbackslash Q}, to achieve the same effects does mean
+modifying formulas, but is straightforward and easier to understand.
+(And \texttt{\textbackslash q} and \texttt{\textbackslash Q} have
+no effect on the visual appearance of formulas.)\end{shaded}%
+\end{minipage}
+
+For convenience of statement in what follows call parentheses, square
+brackets or braces \emph{brackets}. If preceded by a \verb`\left`
+or \verb`\right` or \verb`\biggl` or \verb`\biggr` etc. modifier,
+call them \emph{Brackets}, with an uppercase `B'. Modifiers do not
+contribute to the position count, so that a left Bracket in first
+position means the modifier and left bracket are both considered to
+be in first position. When it is immaterial whether it is a bracket
+or a Bracket I write b/Bracket. The rules that follow do not prescribe
+what mathematicians \emph{ought} to do but are intended to be descriptive
+of certain patterns of mathematical practice as discerned in \emph{HMF}
+and a number of texts (about half a dozen) on Fourier series.
+\begin{description}
+\item [{\texttt{()=0}}] is the \emph{default} setting, parsing group II
+behaviour; b/Brackets are included in the argument only if
+\begin{itemize}
+\item the left b/Bracket is in first position;
+\begin{itemize}
+\item if the first item beyond the matching right b/Bracket is an exponent,
+or factorial or double factorial sign, it is appended to the argument,
+which ends there, otherwise
+\item the argument ends with the right b/Bracket.
+\end{itemize}
+\end{itemize}
+\end{description}
+The default setting allows things like $\sin\tfrac{1}{2}a$, $\cos2\pi nt$
+and $\tan(A+B)$. It does \emph{not} encompass examples like $\tan\tfrac{1}{2}(A+B)$
+or $\cos2(n+\tfrac{1}{2})\pi$. For that we need the setting \verb`()=1`:
+\begin{description}
+\item [{\texttt{()=1}}] includes a b/Bracketed expression in the argument,
+provided 
+\begin{itemize}
+\item the left Bracket is in first position;
+\begin{itemize}
+\item if the first item beyond the matching right Bracket is an exponent,
+or factorial or double factorial sign, it is appended to the argument,
+which ends there, otherwise
+\item the argument ends with the right Bracket.
+\end{itemize}
+\item or the item in first position is a number, variable, constant or \verb`\tfrac`
+and the left bracket is in second position;
+\begin{itemize}
+\item if the first item beyond the matching right bracket is an exponent,
+or factorial or double factorial sign, it is appended to the argument,
+which ends there, or
+\item if the first item beyond the matching right bracket is a number, variable,
+constant, or \verb`\tfrac` it is appended to the argument, and so
+on recursively, until
+\begin{itemize}
+\item an exponent, or factorial or double factorial sign is met, which is
+appended to the argument which ends there, or
+\item an item is met which is \emph{not} an exponent, or factorial or double
+factorial sign, or a number, variable, constant or \verb`\tfrac`,
+at which point the argument ends, or
+\item the end of the formula is reached.
+\end{itemize}
+\end{itemize}
+\end{itemize}
+\end{description}
+With the \verb`()=1` setting, the arguments of $\tan\tfrac{1}{2}(A+B)$,
+$\sec\pi(\tfrac{1}{4}+\tfrac{1}{2}az)$, $\cos(2m+p)z$, $\sin(2n+1)v$
+are all accommodated, as is $\sin\tfrac{1}{2}(m+n)\pi$ with items
+on both sides of the parentheses. But, note, there must be at most
+\emph{one} item before the left parenthesis:
+\begin{centred}
+\verb`\eval[()=1]{$ \sin\tfrac16(m+n)\pi $}[m=1,n=2]`. $\Longrightarrow$
+\eval[()=1]{$ \sin\tfrac16(m+n)\pi $}[m=1,n=2],
+\end{centred}
+whereas, with two items before the left parenthesis,
+\begin{centred}
+\verb`\eval[()=1]{$ \sin2\tfrac1{12}(m+n)\pi $}[m=1,n=2]`. $\Longrightarrow$
+
+\eval[()=1]{$ \sin2\tfrac1{12}(m+n)\pi $}[m=1,n=2].
+\end{centred}
+Whatever the \verb`()` setting, \texttt{numerica} does not check
+what is included between the parentheses (or brackets generally) –
+it could be anything. However inserting \verb`\left`, \verb`\right`
+or other modifiers before the parentheses restricts the argument of
+the sine in this example, despite the \verb`()=1` setting, to the
+\verb`\tfrac`:
+\begin{centred}
+\verb`\eval[()=1]{$ \sin\tfrac16\left(m+n\right)\pi $}[m=1,n=2]`
+$\Longrightarrow$ \eval[()=1]{$ \sin\tfrac16\left(m+n\right)\pi $}[m=1,n=2].
+\end{centred}
+Although \verb`()=1` serves well for the kinds of expressions and
+identities involved in trigonometry, perusal of any text on Fourier
+series will show it does not cover the kinds of expressions met there.
+For that we need
+\begin{description}
+\item [{\texttt{()=2}}] includes a b/Bracketed expression in the argument
+provided
+\begin{itemize}
+\item the left b/Bracket is in first position, or the item in first position
+is a number, variable, constant, \verb`\dfrac`, \verb`\frac` or
+\verb`\tfrac` and the left b/Bracket is in second position, or the
+items in first and second positions are numbers, variables, constants,
+\verb`\dfrac`-s, \verb`\frac`-s or \verb`\tfrac`-s and the left
+b/Bracket is in third position;
+\begin{itemize}
+\item if the first item beyond the matching right b/Bracket is an exponent,
+or factorial or double factorial sign, it is appended to the argument,
+which ends there, or
+\item if the first item beyond the matching right b/Bracket is a number,
+variable, constant, \verb`\dfrac`, \verb`\frac` or \verb`\tfrac`
+it is appended to the argument, and so on recursively, until
+\begin{itemize}
+\item an exponent, or factorial or double factorial sign is met, which is
+appended to the argument which ends there, or
+\item an item is met which is \emph{not} an exponent, or factorial or double
+factorial sign, or a number, variable, constant, \verb`\dfrac`, \verb`\frac`
+or \verb`\tfrac`, at which point the argument ends, or
+\item the end of the formula is reached.
+\end{itemize}
+\end{itemize}
+\end{itemize}
+\end{description}
+{\ttfamily\verb`()=2`} draws no distinction between brackets
+and Brackets. It allows all \verb`()=1` possibilities but also \emph{two
+}items (of a suitable kind) before a left b/Bracket; it also treats
+\verb`\dfrac`-s and \verb`\frac`-s like \verb`\tfrac`-s for determining
+the scope of arguments. 
+
+The following examples are taken from different texts on Fourier series.
+The first shows a \verb`\frac` being included in the argument, the
+second shows \emph{two} items – including a \verb`\frac` – preceding
+the left parenthesis, the third shows a \verb`\frac` to the right
+of the parentheses, and the fourth shows parentheses using \verb`\left`-\verb`\right`
+modifiers with two items preceding them:
+\[
+\cos\frac{2\pi}{T}nt,\quad\cos\frac{2\pi}{T}n(t+\tfrac{1}{2}T),\quad\text{\ensuremath{\sin(N+\tfrac{1}{2})\frac{2\pi\tau}{T}}\ensuremath{\quad}and}\quad\sin2\pi\left(\frac{x}{\lambda}-\frac{t}{T}\right).
+\]
+All these usages are accommodated by the \verb`()=2` setting. For
+instance
+\begin{verbatim}
+    \eval[p,()=2]
+      { 
+        \[ \sin(N+\tfrac12)\frac{2\pi\tau}T \]
+      }[N=1,\tau=2,T=3]
+\end{verbatim}
+$\Longrightarrow$     \eval[p,()=2]
+      { 
+        \[ \sin(N+\tfrac12)\frac{2\pi\tau}T \]
+      }[N=1,\tau=2,T=3]which is the sine of $2\pi=(\tfrac{3}{2})\times(\tfrac{4}{3}\pi)$
+where a \verb`\frac` trailing the parentheses has been included in
+the argument, and \emph{not }$(\sin\tfrac{3}{2})(\tfrac{4}{3}\pi)$.
+Or consider
+\begin{verbatim}
+    \eval[p,()=2]
+      {\[ 
+         \sin2\pi\left(\frac{x}{\lambda}
+            -\frac{t}{T}\right) 
+      \]}[x=1,\lambda=2,t=3,T=4]
+\end{verbatim}
+$\Longrightarrow$     \eval[p,()=2]
+      {\[ 
+         \sin2\pi\left(\frac{x}{\lambda}
+            -\frac{t}{T}\right) 
+      \]}[x=1,\lambda=2,t=3,T=4]which is the sine of $-\tfrac{1}{2}\pi=2\pi\times(-\tfrac{1}{4})$
+where there are two items before the parentheses and \verb`\left`
+and \verb`\right` modifiers, and \emph{not} $\sin2\pi$ times the
+parenthesised expression.
+
+However a usage like $\sin(n+\tfrac{1}{2})(x-t)$, noted in two different
+texts, is not available without explicit use of the \verb`\q` command
+between the parenthesized groups. 
+
+\subsubsection{Parsing group IV}
+
+The only members of this group are \verb`\sum` and \verb`\prod`.
+
+For parsing group IV
+\begin{enumerate}
+\item the argument ends 
+\begin{enumerate}
+\item at the first naked plus or minus sign encountered, or 
+\item at the first comparison sign or comparison command encountered, or
+\item at the first logical And or logical Or sign encountered, or
+\item at the end of the formula.
+\end{enumerate}
+\end{enumerate}
+In practice this means mainly (a) and (d), and seems to be the instinctive
+practice. \emph{HMF} has multiple examples in multiple chapters of
+the argument to a sum ending at a naked plus sign: 7.3.12 \& 7.3.14,
+9.1.11 \& 9.1.77, 9.6.35 \& 9.6.43, 11.1.9, \ldots{} (at that point
+I stopped looking). They were all of the form
+\[
+\sum\text{argument}+\ldots
+\]
+ A minus sign serving the same purpose was harder to find but \emph{HMF}
+10.4.65 \& 10.4.67 are two instances. I considered whether a \verb`\times`
+or slash fraction sign \verb`/` might end the argument of a sum,
+but surely we need to allow things like $\sum1/n^{2}$ which rules
+out the slash and \emph{HMF} 9.9.11 provides two of a number of instances
+in \emph{HMF} of sum arguments continuing past explicit \verb`\times`
+signs (at line breaks when a summand spills onto a second line).
+
+Because they are evaluated using the same code as sums I (unthinkingly)
+placed products with sums but doubts later intruded. In \emph{HMF}
+products occur only occasionally and are almost all of the form
+\[
+\prod\left(\text{argument}\right)
+\]
+where the argument is bracketed (often with \verb`\left \right` modifiers)
+and the multiplicand ends with the right bracket. At least twice (\emph{HMF
+}6.1.25 and 24.2.2.1) an exponent ($-1$) is attached to the right
+bracket and the argument ends there. Looking further afield, a text
+on number theory has examples where the argument of the product extends
+to \emph{three} parenthesised factors, $\prod\left(\text{arg}1\right)\left(\text{arg2}\right)\left(\text{arg3}\right)$
+and a number of others where it extends to two. A text on theory of
+functions has 
+\[
+\prod_{n=1}^{\infty}\left(1+\frac{z}{n}\right)e^{z/n}
+\]
+although \emph{HMF}, for the same expression, encloses the two factors
+within (large) square brackets, as if some ambiguity existed as to
+how far the reach of the \verb`\prod` extended. 
+
+\emph{Tentatively} I retain products here in the same group as sums.
+
+\subsubsection{Parsing group V}
+
+Comparison symbols compose this group: \texttt{=}, \texttt{<}, \texttt{>},
+\verb`\ne`, \verb`\le`, \verb`\ge`, \verb`\leq`, \verb`\geq`,
+and the various comparison commands from the \texttt{amssymb} package
+listed in §\ref{subsec:evalAmssymb-comparisons}. Because of the way
+\texttt{numerica} handles comparisons, it is the argument on the right-hand
+side of the relation that needs determining.
+
+For parsing group V
+\begin{enumerate}
+\item the argument ends at
+\begin{enumerate}
+\item the first logical And or logical Or encountered, or
+\item the first comparison sign or command encountered, or
+\item the end of the formula.
+\end{enumerate}
+\end{enumerate}
+
+\subsubsection{Parsing group VI}
+
+Logical And and logical Or are the sole members of this group. It
+is the right-hand side of the And or Or command that needs determining.
+
+For parsing group VI
+\begin{enumerate}
+\item the argument ends at
+\begin{enumerate}
+\item the first logical And or logical Or encountered, or
+\item the end of the formula.
+\end{enumerate}
+\end{enumerate}
+
+\subsubsection{Disclaimer}
+
+The parsing rules of the different groups are not normative; they
+are not statements of how mathematical formulas should be written.
+Rather they are attempts to discern regularities in how mathematicians
+often do write formulas. It is \emph{how things look in the pdf},
+not \LaTeX , that is the guide. You are always free to parenthesize
+as you see fit and to insert cleave commands (\verb`\q` or \verb`\Q`)
+to force outcomes. 
+
+(But note that parenthesizing has its limits. For sums, writing 
+\[
+\sum\left(\mathtt{<stuff>}\right)\mathtt{<more\ stuff>}
+\]
+ does not necessarily end the summand at the right parenthesis: it
+ends at the first naked $+$ or $-$ sign, or \verb`\Q` command,
+encountered.) 
+
+The rule should always be to write expressions that are clear to the
+reader of the pdf. An expression that is ambiguous to the reader,
+even if it fits within the parsing rules, is to be deprecated. The
+\emph{intent} is that \verb`\eval` can parse unambiguous expressions
+correctly. 
+
+\chapter{Supplementary commands}
+
+\label{chap:Supplementary-commands}This chapter introduces four commands,
+\verb`\nmcInfo` (which we have already met), \verb`\nmcMacros`,
+\verb`\nmcConstants` and \verb`\nmcReuse`, supplementary to the
+principal command \verb`\nmcEvaluate`. They use the same machinery
+as \verb`\nmcEvaluate` and so have the same syntax. If all arguments
+are present it is
+\begin{centred}
+\noindent \verb`\nmc<cmd>*[settings]{main arg}[vv-list][rounding]`
+\end{centred}
+where \verb`<cmd>` is one of \verb`Info`, \verb`Macros`, \verb`Constants`
+and \verb`Reuse`. All four commands have short-name forms: \verb`\info`,
+\verb`\macros`, \verb`\constants`, \verb`\reuse`.
+
+Generally the final two optional arguments will not be used. The user
+should be aware of this if following a command with a square bracketed
+expression – the expression will be absorbed without trace unless
+it is preceded by, for example, an empty brace pair.
+
+Because the commands share the machinery of \verb`\nmcEvaluate`,
+the settings discussed earlier (Chapter~\ref{chap:Settings}) for
+the \verb`\eval` command are also available for these commands, although
+they will, in the main, be irrelevant. The `debug' code has been
+used by the \verb`view` setting of some of these supplementary commands
+to produce its effects. 
+
+The starred form of command is available in all four cases and in
+all cases produces a pure number. If both star and \verb`view` are
+used at the same time, the \verb`view` setting prevails over starring.
+
+\section{Feedback on \textquoteleft infinite\textquoteright{} processes:\texttt{ \textbackslash nmcInfo}}
+
+\label{sec:supplInfo}Used after the evaluation of an `infinite'
+process, the \verb`\nmcInfo` command, or its short-name form \verb`\info`
+will tell you how many terms or factors or other operations\footnote{It also applies to the commands \texttt{\textbackslash nmcIterate
+}and \texttt{\textbackslash nmcSolve} from the \texttt{numerica-plus
+}package and to derivatives and integrals from the \texttt{numerica-calculus}
+package.} were needed to arrive at the result.The main argument contains an
+identifier for the `infinite' process: 
+\begin{lyxcode}
+\textbackslash nmcInfo\{<arg>\}~
+\end{lyxcode}
+(or \verb`\info{<arg>}`) where, at this stage, \verb`<arg>` is either
+\verb`sum` or \verb`prod`. The display, as we have seen in earlier
+examples, is a number followed by a space then a descriptor. For \verb`sum`
+and \verb`prod` the descriptors are \verb`terms` and \verb`factors`.
+Starring \verb`\nmcInfo` – \verb`\nmcInfo*{arg}` or \verb`\info*{arg}`
+– suppresses the descriptor and leaves only the number. This allows
+the starred form to be nested in an \verb`\eval` command, which might
+sometimes be convenient. 
+
+As an example, let's test `the hard way' a standard identity, $\cosh^{2}x-\sinh^{2}x=1$.
+We know that $\cosh x=\sum_{n=0}^{\infty}\frac{x^{2n}}{(2n)!}$ and
+$\sinh x=x\prod_{k=1}^{\infty}\left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)$.
+The difference of their squares should be $1$:
+\begin{verbatim}
+    \eval{\[  
+      \left[\sum_{n=0}^{\infty}
+        \frac{x^{2n}}{(2n)!}
+      \right]^2-
+        \left[x\prod_{k=1}^{\infty}
+          \left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)
+        \right]^2
+      \]}[x=1][3] \info{sum},\quad \info{prod}
+\end{verbatim}
+$\Longrightarrow$     \eval{\[  
+      \left[\sum_{n=0}^{\infty}
+        \frac{x^{2n}}{(2n)!}\right]^2-
+      \left[x\prod_{k=1}^{\infty}
+        \left(1+\frac{x^{2}}{k^{2}\pi^{2}}\right)
+    \right]^2
+        \]}[x=1][3] \info{sum},\quad\info{prod}.
+
+Nearly right. Obviously the product converges only slowly which is
+where the error comes from (see the discussion in §\ref{sec:settingsInfiniteSumsProds},
+where we needed the extra rounding setting \texttt{P+=3} and $350$
+factors to get a correct 3-figure value). The point of the example
+is to show the information command being used for both sum and product
+in the one evaluation. One does not exclude the other. 
+
+\subsection{Suppressing the descriptor: \texttt{\textbackslash nmcInfo{*}}}
+
+The starred form of the \verb`\info` command suppresses the descriptor
+(`terms', `factors') and gives a purely numerical result: 
+\begin{verbatim}
+    \eval{$
+      \sum_{k=0}^{\infty}\binom \alpha k x^k
+        $}[x=1/2,\alpha=3], 
+    requiring $ \info*{sum}-1 $ additions. 
+\end{verbatim}
+$\Longrightarrow$     \eval{$
+      \sum_{k=0}^{\infty}\binom \alpha k x^k
+         $}[x=1/2,\alpha=3], 
+requiring $ \info*{sum}-1 $ additions. (Four terms added, therefore $3$ additions.)
+
+\subsection{Errors}
+
+Should the \emph{wrong} argument be used in the \verb`\nmcInfo` command,
+no harm is done:
+\begin{verbatim}
+    \eval{$
+      \sum_{k=0}^{\infty}\binom \alpha k x^k
+         $}[x=1/2,\alpha=3], \ \info{prod} 
+\end{verbatim}
+$\Longrightarrow$  \eval{$ \sum_{k=0}^{\infty}\binom \alpha k x^k $}[x=1/2,\alpha=3],\ \info{prod}.\medskip{}
+
+$119$ \emph{factors}? The information command is remembering a previous
+result, the last time \verb`prod` was used as its argument. Changing
+the argument from \verb`prod` to \verb`sum` reveals the correct
+number of \emph{terms}.
+
+Should a non-existent argument be used, an error message is generated:
+\begin{verbatim}
+    \eval{$ 
+      \sum_{k=0}^{\infty}\binom \alpha k x^k 
+         $}[x=1/2,\alpha=3], \\ \info{Fred} 
+\end{verbatim}
+$\Longrightarrow$  \eval{$ \sum_{k=0}^{\infty}\binom \alpha k x^k $}[x=1/2,\alpha=3],\\  \info{Fred}
+
+\subsection{\texttt{view} setting}
+
+As noted at the start of this chapter, \verb`\nmcInfo` uses the `machinery'
+of \verb`\nmcEvaluate`. Most of the settings available for \verb`\eval`
+are also available for \verb`\info` but of these only one seems relevant:
+the \verb`dbg` setting. However, rather than use the obscure \verb`dbg=<integer>`
+(which is possible), it suffices to enter \verb`view` in this argument:
+\begin{centred}
+\verb`\info[view]{}` $\Longrightarrow$ \info[view] {}
+\end{centred}
+The result is a display of all the current values of all the `infinite'
+processes available. All such values are initialized to $0$. (Further
+processes \verb`iter` and \verb`solve` become relevant if the \verb`numerica-plus`
+package is used; \verb`deriv` and \verb`integ` become relevant if
+the \verb`numerica-calculus` package, currently under development,
+is used.)
+
+\section{User-defined macros: \texttt{\textbackslash nmcMacros}}
+
+\label{sec:supplMacros}The \verb`\nmcMacros` and \verb`\nmcConstants`
+commands were prompted by a question on \TeX{} Stack Exchange.\cprotect\footnote{A question from Giacomo Petrillo on \TeX{} Stack Exchange and a response
+by `egreg' prompted the introduction of the \cprotect\texttt{\textbackslash nmcMacros}
+and \cprotect\texttt{\textbackslash nmcConstants} commands. See \url{https://tex.stackexchange.com/questions/602993/use-macros-in-numerica-vv-list/602998#602998}} Some time later the maintainer of the \verb`mandi` package\footnote{The maintainer is Joe Heafner, who explains that `mandi' is an abbreviation
+of `matter and interactions' after a physics textbook of that name
+(by different authors). Among other things, the package defines a
+long list of macros, each containing the value of a physical constant.} approached me with a similar problem. Suppose one has defined a macro
+to contain a value, say 
+\begin{itemize}
+\item \verb`\def\myvalue{0.35}`, or
+\item \verb`\newcommand\myvalue{0.35}`, or
+\item \verb`\NewDocumentCommand\myvalue{}{0.35}`, if you're using \verb`xparse`.
+\end{itemize}
+(If you're using the document processor \LyX{} then there is good reason
+to prefer \verb`\gdef` to define your macro, \verb`\gdef\myvalue{0.35}`;
+see Chapter~\ref{chap:LyX}). After one of these commands, \verb`\myvalue`
+is now known to \LaTeX , but it is not known to \verb`numerica`.
+The quantities \verb`numerica` \emph{does }know about are variables
+in the vv-list of an \verb`\eval` command, and those \LaTeX{} (and
+\verb`amsmath` and \verb`mathtools`) commands used for writing mathematical
+expressions. These quantities are stored in \verb`numerica` in structures
+called property lists. Since \verb`\myvalue` is not recorded in these
+lists yet, putting \verb`x=\myvalue` in the formula or vv-list of
+an \verb`\eval` command will produce an `Unknown token' error message:
+\begin{verbatim}
+    \NewDocumentCommand \myvalue {} {0.35}
+    \eval{ \myvalue }
+\end{verbatim}
+$\Longrightarrow$     \NewDocumentCommand \myvalue {} {0.35}
+    \eval{ \myvalue }
+
+With version 2 of \verb`numerica` a command is now available, \verb`\nmcMacros`,
+to register macros and their values with the property lists used internally
+by \verb`numerica`. (This command was not available in version 1.)
+The macro must have been defined earlier in the document or in a supporting
+package. 
+
+The basic usage is simple. If you have a list of macros you wish to
+make available to \verb`\nmcEvaluate`, enter them in a comma list
+in the mandatory argument of \verb`\nmcMacros`:
+\begin{lyxcode}
+\textbackslash nmcMacros\{~\textbackslash macro1,~\textbackslash macro2,~\ldots ~\}
+\end{lyxcode}
+There is an equivalent short-name form of the command, \verb`\macros`. 
+
+Multiple \verb`\nmcMacros` commands can be used in a document. If
+the command is placed in the preamble (\emph{after} the definition
+of the macros)\emph{ }then the user-defined macros and their values
+are available throughout the document, otherwise they are available
+from the position of the \verb`\macros` statement. However, macros
+do not need to be defined in your current document provided they are
+defined and accessible from elsewhere – for example from a loaded
+\LaTeX{} package. But always an \verb`\nmcMacros` command is required
+to `register' them with \verb`numerica` for use in an \verb`\eval`
+command. 
+
+\subsection{What can be stored in a macro?}
+
+Generally a user-defined macro will store a number. This macro might
+well be defined in an external package – for example the \verb`mandi`
+package defines a large number of macros containing the values of
+physical constants, some fundamental like the speed of light, others
+contingent like the earth–moon distance. If the \verb`mandi` package
+is loaded then writing, for instance, 
+\begin{verbatim}
+    \macros{ \electronmassprecisevalue,
+             \protonmassprecisevalue }
+\end{verbatim}
+will make these two macros available for use in \verb`numerica`.
+One could then write in the vv-list of an \verb`\eval` command
+\begin{verbatim}
+m_e=\electronmassprecisevalue,m_p=\protonmassprecisevalue
+\end{verbatim}
+which would allow (among other things) calculation of the mass ratio
+$m_{p}/m_{e}$ of proton to electron. (The length of name of some
+of the macros in the \verb`mandi` package has a pedagogical purpose,
+but makes them unwieldy for direct use in mathematical expressions.)
+
+\subsubsection{Macros containing formulas }
+
+Numbers are not the only quantities that can be stored in a macro
+for use in \verb`numerica`. In fact any mathematical expression that
+can be \verb`\eval`-uated can be stored in a macro:
+\begin{verbatim}
+    \NewDocumentCommand \mysumC {}
+        { \sum_{n=1}^{100}1/n - \ln 100 }
+    \macros{ \mysumC }
+    \eval{$ \mysumC $}[4]
+\end{verbatim}
+$\Longrightarrow$     \NewDocumentCommand \mysumC {}
+        { \sum_{n=1}^{100}1/n - \ln 100 }
+    \macros{ \mysumC }
+    \eval{$ \mysumC $}[4], \medskip{}
+
+\noindent (to be compared with Euler's constant \eval{$ \gamma $}[4]
+– obviously many more terms are needed). The \verb`\eval` command
+wraps around math delimiters in the example. Hence the result is presented
+in the form \emph{formula=result}. In that presentation, note how
+\verb`\mysumC` displays as the formula it contains.
+
+\paragraph{The essential space: }
+
+But the critical thing to notice in the example is \emph{the space
+preceding }\verb`\sum`\emph{ in the definition of }\verb`\mysumC`.
+When a formula starts with an expandable token, \emph{this space is
+essential}. For macros to register successfully with \verb`numerica`,
+the first character in their definition must be \emph{un}expandable.
+Thus a digit is fine: storing a number in a macro is straightforward
+and you don't need to fuss about such niceties. But a control sequence
+like \verb`\sum` does expand (to $\sum$ ). If it is the initial
+token of the formula, then it will cause a possibly obscure error
+– see §\ref{subsec:supplMacrosErrors} – unless preceded by an unexpandable
+token. Hence the space before \verb`\sum` in the \verb`\NewDocumentCommand`
+statement. (On the other hand the spacing in the \verb`\macros` statement
+is purely aesthetic.)
+
+When using macros from another package, this is a matter to be aware
+of. If the macros contain only numbers, there should be no problem,
+but if they contain more complicated expressions, the absence of an
+initial space could make them unusable in \verb`numerica`.
+
+\subsubsection{Vv-list}
+
+In the example it would be nice to be able to vary the number of terms
+summed. This is easily done by using a vv-list in the \verb`\macros`
+statement:
+\begin{verbatim}
+    \NewDocumentCommand \mysumN {}
+        { \sum_{n=1}^{N}1/n - \ln N }
+    \macros{ \mysumN }[N=150]
+    \eval{$ \mysumN $}
+\end{verbatim}
+$\Longrightarrow$     \NewDocumentCommand \mysumN {}
+        { \sum_{n=1}^{N}1/n - \ln N }
+    \macros{ \mysumN }[N=150]
+    \eval{$ \mysumN $}.\medskip{}
+
+\noindent \verb`numerica` needs a definite value to store; it does
+not store the formula as such. To give \verb`\mysumN` a definite
+value, give the variable \verb`N` a value. This is done in the vv-list
+added to the \verb`\macros` statement: \verb`N=150`. In this way
+a definite value is stored in \verb`numerica` against the macro \verb`\mysumN`.
+The definition of the macro is unaffected. If a new value is given
+to \verb`N` in the \verb`\macros` statement (which is the point
+of using a variable), the old value is overwritten and the new value
+is used in subsequent calculations.
+
+\subsection{Seeing what macros are available}
+
+Perhaps your document has a number of \verb`\nmcMacros` statements
+scattered through it and you want to remind yourself of what exactly
+has been stored. \verb`\nmcMacros` has the \verb`view` setting for
+this purpose. Writing
+\begin{centred}
+\verb`\macros[view]{}` $\Longrightarrow$ \macros[view]{}
+\end{centred}
+produces a list of all macros registered with \verb`numerica` and
+their values, as you can see. 
+
+If the braced argument is not empty, the display is slightly modified:
+\begin{verbatim}
+    \def\mydef{ \sin(m\pi/n) }
+    \newcommand\mynewcmd{ \cos(m\pi/n) }
+    \macros[view]{ \mydef,\mynewcmd }[m=3,n=18]
+\end{verbatim}
+$\Longrightarrow$     \def\mydef{ \sin(m\pi/n) }
+    \newcommand\mynewcmd{ \cos(m\pi/n) }
+    \macros[view]{ \mydef,\mynewcmd }[m=3,n=18]
+
+\noindent \verb`\mydef` and \verb`\mynewcmd` have been added to
+those available for use in \verb`numerica`. 
+
+\subsubsection{Freeing macros from storage}
+
+Rather than cluttering \verb`numerica`'s property lists with no-longer-needed
+macros, it is possible to remove them from there with the \verb`free`
+setting. This has no effect on the \LaTeX{} definition of the macro.
+It merely `de-registers' the macro with \verb`numerica`.
+\begin{centred}
+\verb`\macros[free,view]{ \mysumC }` $\Longrightarrow$ \macros[free,view]{ \mysumC }
+\end{centred}
+If you want to free \emph{all} macros registered with \verb`numerica`
+use an empty main argument with the \verb`free` setting. For an example,
+see just below.
+
+\subsubsection{Counting how many macros are available}
+
+You can count how many macros are currently registered with \verb`numerica`
+by starring the \verb`\nmcMacros`~command:
+\begin{centred}
+\verb`\macros*{}` $\Longrightarrow$ \macros*{}.
+\end{centred}
+If the braced argument is not empty, the list of macros it contains
+will be added to those registered with \verb`numerica` and included
+in the overall count.
+
+Note that the \verb`view` setting prevails over starring if both
+are used. 
+
+The star can also be used with the \verb`free` setting. As mentioned
+above, if the main argument is empty, then \emph{all} macros are freed:
+\begin{centred}
+\verb`\macros*[free]{}` $\Longrightarrow$ \macros*[free]{ }
+\end{centred}
+
+\subsection{Errors}
+
+\label{subsec:supplMacrosErrors}If a macro is used in a \verb`\macros`
+statement and the macro has not been defined in the document or a
+supporting package it will cause an error:
+\begin{verbatim}
+    \macros{ \mymacro }
+\end{verbatim}
+$\Longrightarrow$ \macros{\mymacro }
+
+\noindent As noted in the introduction to this section, an undefined
+macro used in an \verb`\eval`-uation will cause an `Unknown token'
+message in \verb`numerica`. The solution in this and the preceding
+case is (obviously) to define the macro.
+
+If a macro contains a formula which begins with an expandable token
+and a preceding space is omitted (see above), then entering that macro
+in a \verb`\macros` statement to register it with \verb`numerica`
+will generally cause a puzzling error:
+\begin{verbatim}
+    \newcommand\mysin{\sin(\pi/7)}
+    \macros{ \mysin }
+\end{verbatim}
+$\Longrightarrow$     \newcommand\mysin{\sin(\pi/7)}
+    \macros{ \mysin }
+
+\noindent The \verb`\protect` seems to be plucked from nowhere. In
+fact it comes from the expansion of \verb`\sin`. If \verb`\sum`
+had been the first token in the macro definition, again with no preceding
+space, then \verb`\protect` would have been replaced by the even
+more puzzling \verb`\DOTSB`. The solution is to insert a space as
+the first token in the macro definition.
+
+If a macro is defined but the \verb`\macros` statement is overlooked,
+and the macro is used in an \verb`\eval`-uation, it will generate
+an `Unknown token' message.
+
+If your macro stores a formula with variables, and you forget to give
+those variables values in the \verb`\macros` statement that will
+produce a message:
+\begin{verbatim}
+    \def\mysumk{ \sum_{n=1}^k n }
+    \macros{ \mysumk }
+\end{verbatim}
+$\Longrightarrow$     \def\mysumk{ \sum_{n=1}^k n } 
+    \macros{ \mysumk }
+
+\noindent The `where' part of the message is specific in this case,
+but is generally `\verb`\nmcMacros` command'. 
+
+And of course there can be `all the usual suspects' discussed at
+§\ref{sec:evalErrors} in the evaluation of the vv-list or the formula.
+
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+
+\subsubsection{Display of macros}
+
+\label{subsec:supplMacrosDisplay}As shown in earlier examples, macros
+display as their content. Thus \verb`\mysumC` displayed as $\sum_{n=1}^{100}1/n-\ln100$.
+But once a macro is known to \LaTeX{} (not necessarily to \verb`numerica`)
+it can be used as a variable name. This has the same potential for
+abuse as noted earler for multi-token variables (§\ref{subsec:evalDon't-do-this!}).
+In the following example note that there is no \verb`\macros` statement.
+It suffices for the macro to be known to \LaTeX . 
+\begin{verbatim}
+    \def\mymac{1}
+    \eval[vvi=\,???]{$ \mymac+\mymac $}[\mymac=2]
+\end{verbatim}
+$\Longrightarrow$     \def\mymac{1}
+    \eval[vvi=\,???]{$ \mymac+\mymac $}[\mymac=2]
+
+The value assigned to a variable name – in this case \verb`\mymac`
+– by \verb`numerica` for \cprotect\emph{calculational} purposes and
+how that variable name \cprotect\emph{displays} in \LaTeX{} are two
+separate things. One relies on the user not to do something deliberately
+deceptive.\end{shaded}%
+\end{minipage}
+
+\subsection{Rounding value}
+
+\label{subsec:supplMacrosRounding}Values are stored to $16$ significant
+figures (if available). In most cases appending a rounding value to
+a \verb`\macros` statement has no effect on the value stored. In
+the following example note the \verb`o` setting, meaning the sine
+reads angles in degrees:
+\begin{verbatim}
+    \NewDocumentCommand\testi{}{ \sin 60 }
+    \NewDocumentCommand\testii{}{ \sin 60 }
+    \macros[o]{ \testi }[10]
+    \macros[o]{ \testii }[3]
+    \macros[view]{}
+\end{verbatim}
+$\Longrightarrow$     \NewDocumentCommand\testi{}{ \sin 60 }
+    \NewDocumentCommand\testii{}{ \sin 60 }
+    \macros[o]{ \testi }[10]
+    \macros[o]{ \testii }[3]
+    \macros[view]{}
+
+\noindent Despite the different rounding values the same $16$ figures
+are stored in both \verb`\testi` and \verb`\testii`. 
+
+For the \verb`\eval` command, rounding values specify how results
+are \emph{displayed}. The rounding value matters only \emph{after},
+not during, the calculation. Only for infinite sums or products is
+this otherwise. There the rounding value is used to determine when
+to stop adding further terms or factors. The same is true of the \verb`\macros`
+command. Only if a macro contains an infinite sum or product does
+the rounding value become relevant. Sixteen figures are still stored,
+but most of them will be `wrong' since the infinite sum or product
+has stopped early, after only a finite number of terms or factors.
+Exactly how many of the first few figures are correct depends on the
+rounding value. An example may clarify the matter.
+\begin{verbatim}
+    \macros[free]{}
+    \def\zetaiii{ \sum_{n=1}^\infty 1/n^3 }
+    \macros[view]{ \zetaiii }[3]
+    \info{sum}
+    \macros[view]{ \zetaiii }[6]
+    \info{sum}
+\end{verbatim}
+$\Longrightarrow$     \macros[free]{} 
+    \def\zetaiii{ \sum_{n=1}^\infty 1/n^3 }
+    \macros[view]{ \zetaiii }[3]
+    \info{sum}
+    \macros[view]{ \zetaiii }[6]
+    \info{sum}
+
+\emph{HMF }Table 23.3 tells me that $\zeta(3)=1.202056903159594\dots$
+The different rounding numbers have restricted the infinite sums to
+the very finite $47$ and $468$ terms respectively. Although $16$
+figures are stored, only the first few are correct. Just how many
+depends on the number of terms summed which depends on when the stopping
+criterion is met which depends on the rounding value.
+
+\section{User-defined constants:\texttt{ \textbackslash nmcConstants}}
+
+\label{sec:supplConstants}As noted much earlier in this document
+(§\ref{subsec:Built-in-Constants}), there are five built-in constants:
+\verb`\pi`, \verb`e`, \verb`\phi`, \verb`\gamma` and \verb`\deg`,
+but a user may well want to define their own constant or constants.
+There are contexts where it would make sense to permanently record
+fundamental constants like the speed of light or Planck's constant,
+or more down-to-earth constants like the acceleration due to gravity
+or the viscosity of water, rather than having to enter them in the
+vv-list for each calculation. Or a parameter might be held constant
+for a particular problem or class of problems where other variables
+change – for example triangles of constant perimeter but varying sides.
+This is the purpose of the \verb`\nmcConstants` command.
+
+The symbols used to denote constants are subject to exactly the same
+constraints and freedoms as the symbols used to denote variables.
+They might be single latin letters like \verb`c` (e.g. $c=3\times10^{8}$),
+or greek letters like \verb`\alpha` (e.g. $\alpha=1/137)$, or multitoken
+combinations like the Rydberg constants \verb`R_\infty` or \verb`R_{\mathrm{H}}`
+from atomic physics, or \verb`\mu_0` and \verb`\epsilon_0` used
+to denote the permeability and permittivity of free space, or personal
+constants like \verb`total` of no wider significance. \verb`numerica`
+handles all these different forms of constant with the command \verb`\nmcConstants`:
+\begin{verbatim}
+    \nmcConstants{  const-n=value-n, ... ,
+                    const2=value2, const1=value1 }
+\end{verbatim}
+This is the simplest use – each constant is assigned a (numerical)
+value. But it is easy to envisage situations where it would be convenient
+to have a constant with value $1/\sqrt{2\pi}$ say, or another with
+value $e^{\tfrac{\pi}{2}}$, and so on. That is easy: simply put the
+expession for the value on the right:
+\begin{verbatim}
+    \constants{ a=1/\sqrt{2\pi},b=e^{\tfrac\pi2} } 
+\end{verbatim}
+Or the values could be expressions depending on parameters:
+\begin{verbatim}
+    \constants{ s=\tfrac12(a+b+c) }[a=3,b=5,c=7]
+\end{verbatim}
+Some constants might depend on earlier constants in the list:
+\begin{verbatim}
+    \constants{ A=\sqrt{s(s-a)(s-b)(s-c),
+                s=\tfrac12(a+b+c) }[a=3,b=5,c=7]
+\end{verbatim}
+Or the values could involve an `infinite' process, requiring a rounding
+number:
+\begin{verbatim}
+    \constants{ \zeta=\sum_{n=1}^\infty(1/n^k) }[k=4][5]
+\end{verbatim}
+In this, although $16$ figures will be stored, only the first few
+will be accurate, the precise number depending on the value of \verb`k`
+and the rounding number (\verb`5` in the example); see the discussion
+on this issue for user-defined macros, §\ref{subsec:supplMacrosRounding}.
+
+\subsection{New list replaces old by default}
+
+A particular group of constants may be relevant only to a particular
+part of a document. Another part of the document may use other constants.
+By default, a second list of constants \emph{replaces }the first list.
+Thus each of the \verb`\constants` statements above would replace
+the previous one.
+
+There is a technical reason why replacing rather than appending is
+the default. For each calculation all \emph{multi-token} constants
+(e.g. \verb`R_\infty`, \verb`N_0`, \ldots ) are added internally
+to the start of the vv-list of the \verb`\eval` command. Even if
+the vv-list is empty, this is still the case since the formula might
+well use constants. Like multi-token variables and for the same reason
+(see §\ref{subsec:evalVariableNames}), multi-token constants are
+mapped internally to single tokens. This occurs afresh for each calculation.
+If there are a lot of multi-token constants then each calculation
+is going to involve not only this mapping from multi- to single tokens
+but the evaluation of a long vv-list. In that case it seems better
+to make the default behaviour replacement of one constant list by
+another, rather than appending them. 
+
+\subsection{Adding constants to a list}
+
+Despite the default behaviour, there will be occasions when you want
+to add a new constant or constants to the current list. This is easily
+done with the \verb`add` setting. For instance,
+\begin{verbatim}
+    \nmcConstants[add]{ \sigma=5.67\times10^{-8},
+                          k_B = 1.381\times10^{-23} }
+\end{verbatim}
+would add \verb`\sigma` and \verb`k_B` to the current list. The
+presence of the \verb`add` setting triggers appending rather than
+replacement.
+
+\subsection{Examples of use}
+
+\subsubsection{Example 1: atomic constants}
+
+In the following example, the values of various atomic constants are
+taken from the \verb`mandi` package. I use two \verb`\constants`
+statements in order to show the use of the \verb`add` setting. I've
+also included a \verb`view` setting in the second \verb`\constants`
+statement.
+
+The constants are used to calculate the fine-structure constant \verb`\alpha`
+in the vv-list of the \verb`\eval` command, and its well-known reciprocal
+(close to $137)$ in the main argument. Note that the constants do
+not need to be entered in the vv-list of the \verb`\eval` command.
+Their values are available from the \verb`\constants` statements.
+\begin{verbatim}
+    \constants{ c=2.99792458\times10^{8},
+                h=6.62607015\times10^{-34},
+                e=1.602176634\times10^{-19} }
+    \constants[view,add]
+      { \epsilon_0=8.854187817\times10^{-12} }
+    \eval{$ 1/\alpha $}[\alpha=e^2/2\epsilon_0hc]
+\end{verbatim}
+$\Longrightarrow$     \constants{ c=2.99792458\times10^{8},
+                h=6.62607015\times10^{-34},
+                e=1.602176634\times10^{-19} }
+    \constants[view,add]{
+       \epsilon_0=8.854187817\times10^{-12} }
+    \eval{$ 1/\alpha $}[\alpha=e^2/2\epsilon_0hc].
+
+The \verb`view` setting produces a now familiar kind of display.
+It shows that the three-token \verb`\epsilon_0` (the control sequence
+\verb`\epsilon`, the underscore \verb`_` and the digit \verb`0`)
+has been replaced by \verb`\nmc_q` – which may look as if it is also
+three tokens but is in fact a single control sequence.
+
+\subsubsection{Example 2: local constants}
+
+Long ago, when there were such creatures as reference librarians,
+I was asked about a school physics project along these lines.
+
+A\emph{ car is travelling at 50 km/hr when it hits a lamppost. The
+bonnet crumples 1 metre and the car comes to an immediate halt. Although
+she herself is wearing a seat-belt, a woman in the passenger cabin
+is holding her 5 kg baby. Does the baby survive?}
+
+The enquirer was familiar with the equations describing constant acceleration,
+\[
+x=ut+\tfrac{1}{2}at^{2},\quad\text{and}\quad v^{2}-u^{2}=2ax,
+\]
+and Newton's second law, $F=ma$, force equals mass times acceleration.
+The question was really about understanding these laws and how to
+think with them. Here, $s$ is the distance travelled in time $t,$
+with initial speed $u$ at $t=0$, speed $v$ at time $t$, and constant
+acceleration $a$ – a deceleration in this case. 
+
+The given data provide our constants: distance $x=1$ metre, initial
+speed $u=1000*50/(60*60)=(10/36)*50$ metres per second, final speed
+$v=0$. To estimate whether the woman can hold on to her baby, we
+will need to make a comparison with forces we have personally experienced.
+Most of us have tried lifting someone else, so let's use a characteristic
+human weight as our test mass. Thus, we have the (baby's) mass $m=5$
+kilograms, and a test mass, $M$ say, which we will leave as a variable.
+But dealing with weight, we will need the acceleration due to gravity.
+For the kind of rough estimating we are doing, $g=10$ metres per
+second per second will be an adequate approximation.
+\begin{verbatim}
+    \constants{ x=1,v=0,u=(10/36)50,m=5,g=10 }
+\end{verbatim}
+The deceleration experienced by the woman is found from the second
+equation of constant acceleration, $a=(v^{2}-u^{2})/2x$. Even if
+the deceleration isn't constant this will give an estimate of its
+magnitude. (If some of the deceleration is less than this $a$, some
+must be greater.) This is also the deceleration experienced by the
+baby as long as the woman holds onto her. Hence the magnitude of the
+force exerted by the baby on the woman's arms is $ma=m(v^{2}-u^{2})/2x=-mu^{2}/2x$
+which we want to compare with our test force, say that required to
+lift $M=70$ kilograms, which was once considered the mass of an average
+western adult male (but is doubtless a considerable underestimate
+now). Hence the test force is $Mg$. Let's do the calculations. (I
+have altered the \verb`\constants` statement to allow for a later
+comparison with the effect of a small increase in speed.)
+\begin{verbatim}
+    \constants{ x=1,u=(10/36)U,m=5,g=10 }[U=50]
+    \eval{$ mu^2/2x $}[0], \par
+    \eval{$ Mg $}[M=70].
+\end{verbatim}
+$\Longrightarrow$     \constants{ x=1,u=(10/36)U,m=5,g=10 }[U=50]
+    \eval{$ mu^2/2x $}[0], \par
+    \eval{$ Mg $}[M=70].
+
+The force required to hold on to the baby is noticeably less than
+that required to lift a $70$~kg person – in fact about the same
+as that needed to lift a $50$~kg person. But we have ignored the
+force experienced by the mothers forearms – perhaps doubling $m$
+(baby plus forearms) would give a better estimate of the force she
+experiences. In that case $mu^{2}/2x$ obviously doubles and the total
+force required by the woman to retain her baby – now $964$ newtons
+– is significantly more than that required to lift a $70$~kg person.
+I think it almost certain that the baby is torn from her arms. 
+
+What difference does increasing the speed to 60 km/hr make? 
+\begin{verbatim}
+    \constants{ x=1,u=(10/36)U,m=5,g=10 }[U=60]
+    \eval{$ mu^2/2x $}[1], \par
+    \eval{$ Mg $}[M=70].
+\end{verbatim}
+$\Longrightarrow$     \constants{ x=1,u=(10/36)U,m=5,g=10 }[U=60]
+    \eval{$ mu^2/2x $}[0], \par
+    \eval{$ Mg $}[M=70].
+
+Now the force of baby alone is comparable to that required to lift
+a $70$ kg person. Including the woman's forearms in $m$, doubling
+$m$ say, will result in a force twice as great – like that required
+to lift two $70$~kg people or one $140$~kg person. There is no
+chance of the woman holding on to her baby. The force is too great. 
+
+\subsubsection{Example 3: macros and constants}
+
+Constants can depend on previously defined and registered user macros.
+Suppose I have defined two macros
+\begin{verbatim}
+    \NewDocumentCommand\electronmassprecisevalue {}
+                       {9.1093837015\times10^{-31}}
+    \NewDocumentCommand\protonmassprecisevalue {}
+                       {1.672621898\times10^{-27}}
+\end{verbatim}
+(I have taken both the names and the values from the \verb`mandi`
+package.) The long explicit names of the macros has a pedagogic purpose,
+but they are too cumbersome to use in calculations. For that purpose
+we need, first, a \verb`\macros` statement registering the two macros
+with \verb`numerica`, and then a \verb`\constants` statement like
+\begin{verbatim}
+    \nmcConstants{ m_e=\electronmassprecisevalue,
+                   m_p=\protonmassprecisevalue }
+\end{verbatim}
+With that \verb`m_e` and \verb`m_p` could be entered in formulas,
+taking the values contained in the macros. Let's do it:
+\begin{verbatim}
+    \NewDocumentCommand\electronmassprecisevalue {}
+                       {9.1093837015\times10^{-31}}
+    \NewDocumentCommand\protonmassprecisevalue {}
+                       {1.672621898\times10^{-27}}
+    \nmcMacros{ \electronmassprecisevalue,
+                \protonmassprecisevalue }
+    \nmcConstants{ m_e=\electronmassprecisevalue,
+                   m_p=\protonmassprecisevalue }
+    \eval{$ m_p/m_e $}
+\end{verbatim}
+$\Longrightarrow$ \NewDocumentCommand\electronmassprecisevalue {}
+                       {9.1093837015\times10^{-31}}
+\NewDocumentCommand\protonmassprecisevalue {}
+                       {1.672621898\times10^{-27}}
+\nmcMacros{ \electronmassprecisevalue,
+                \protonmassprecisevalue }
+\nmcConstants{ m_e=\electronmassprecisevalue,
+                   m_p=\protonmassprecisevalue }
+\eval{$ m_p/m_e $},
+
+\noindent the familiar mass ratio of proton and electron.
+
+\subsection{Viewing, counting constants}
+
+To see all constants currently `in play', use the \verb`view` setting
+in the \verb`\constants` command. The main argument can be empty,
+\begin{centred}
+\verb`\constants[view]{}` $\Longrightarrow$ \constants[view]{}
+\end{centred}
+or contain a list of constants. In the latter case, the display is
+of the above form but featuring the constants of the new list or,
+if the \verb`add` setting is used, featuring the joined lists, old
+and new:
+\begin{centred}
+\verb`\constants[view,add]{X=42}` $\Longrightarrow$ \constants[view,add]{X=42}
+\end{centred}
+To count how many constants are currently in play, star the \verb`\constants`
+command. The number will depend on whether the main argument is empty
+or not, and whether the \verb`add` setting is active:
+\begin{centred}
+\verb`\constants*{}` $\Longrightarrow$ \constants*{}.
+\end{centred}
+If the \verb`view` setting is being used at the same time as the
+star, the \verb`view` prevails.
+
+\subsection{Errors}
+
+When contemplating error messages from \verb`numerica` it needs to
+be remembered that \emph{multi-token} constants are added to the vv-list
+for every calculation. Hence an error may not be in the vv-list as
+indicated in the message but in the \verb`\constants` statement,
+specifically, the multi-token constants. 
+
+\section{Saving and reusing results: \texttt{\textbackslash nmcReuse}}
+
+\label{sec:supplReuse}You may want to use at some place in a document
+a result calculated earlier. It would be good to be able to do so
+without having to do the calculation again at the new location. \texttt{numerica}
+offers a command \verb`\nmcReuse` (short-name form, \verb`\reuse`)
+which saves a result to a control sequence that can then be used elsewhere
+in the document, expanding to the saved result. The control sequence
+and its content are also saved to file, allowing the possibility of
+using the result in other documents. 
+
+\noindent\begin{minipage}[t]{1\columnwidth}%
+\begin{shaded}%
+The \texttt{\textbackslash nmcReuse} command in version 2 of \texttt{numerica
+}has been completely rewritten. Its use is not compatible with how
+the command was used in version 1. I found that I could bring \texttt{\textbackslash nmcReuse}
+along with \texttt{\textbackslash nmcMacros} and \texttt{\textbackslash nmcConstants}
+into the coding scheme used for \texttt{\textbackslash nmcEvaluate}
+and the reasons for doing so were too compelling. \end{shaded}%
+\end{minipage}
+
+\subsection{Use of \texttt{\textbackslash nmcReuse}}
+
+As noted, all the supplementary commands share the syntax of the \verb`\eval`
+command, so that \verb`\nmcReuse` has an optional settings argument
+preceding a mandatory main argument, followed by two trailing optional
+arguments. \verb`\nmcReuse` does not use the last two. The command
+is used mainly in two ways:
+\begin{enumerate}
+\item {\small\verb`\nmcReuse{}`}{\small , which loads the saved control
+sequences from file, if not already loaded; and}{\small\par}
+\item {\small\verb`\nmcReuse{csname}`}{\small , which loads the saved
+control sequences from file, if not already loaded, assigns the latest
+result from }{\small\verb`\eval`}{\small{} to the control sequence
+}{\small\verb`\csname`}{\small , and saves }{\small\verb`\csname`}{\small{}
+to file.}{\small\par}
+\end{enumerate}
+You may wish to put \verb`\nmcReuse{}` in the preamble of your document
+(\emph{after} \verb`\usepackage{numerica}` of course). In that way,
+saved control sequences are available from the start. Indeed, control
+sequences saved from later in the document can be used in earlier
+sections in a later \LaTeX{} run.
+
+Note that only the \emph{name}, \verb`csname`, of the control sequence
+is supplied to \verb`\reuse`, not the control sequence (\verb`\csname`).
+The name should be composed of letters only. If the name has already
+been defined in \LaTeX{} a \verb`numerica` error is produced, see
+below §\ref{subsec:reuseDeletingOverwriting:}, although if you want
+to save a \emph{new} value in a previously saved control sequence,
+that can be done without invoking a message; see §\ref{subsec:reuseDeletingOverwriting:}.
+
+Once defined {\small with a }{\small\verb`\nmcReuse{csname}`}
+command, \verb`\csname` becomes available for use elsewhere in the
+document.
+
+\subsubsection{What is saved?}
+
+What is saved is the most recent result of an \verb`\eval`-uation.
+This is the \emph{full} result. It may include the vv-list; it may
+include formatting elements; it may include math delimiters. Thus,
+using \verb`\csname` in your document (after the command \verb`\nmcReuse{csname}`)
+may not be straightforward – simply writing \verb`\csname` where
+you want the value it expands to, may produce a \LaTeX{} error and
+halt compilation. You may have to write \verb`$ \csname $` or provide
+some other math environment in order for the control sequence to display
+correctly.
+
+It can be helpful to see \emph{exactly} what has been saved; to do
+that see §\ref{subsec:reuseSeeingSaved}.
+
+\paragraph{Use of \texttt{\textbackslash eval{*}}}
+
+Users will make life simpler for themselves if they make a habit of
+using the starred form \verb`\eval*` to produce the results to save.
+\verb`\eval*` produces solely a number with no formatting or delimiters;
+even a negative result uses a hyphen for the minus sign, just as one
+would type it. In this case \verb`\csname` can be used freely in
+both text and math environments.
+
+\subsubsection{The \texttt{.nmc} file}
+
+\label{subsec:suppleReuse.nmc-file}The file that control sequences
+are saved to has a filename composed of the document name with the
+extension \verb`.nmc`. If your document is \verb`mydoc.tex` (so
+that the \LaTeX{} command {\small\verb`\jobname`} expands to
+\verb`mydoc`) then the file to which results are saved is \verb`mydoc.nmc`,
+located in the document directory. 
+
+\verb`mydoc.nmc` is a comma list of pairs of the form \verb`\csname {value}`.
+Thus, the contents of \verb`mydoc.nmc` might be \texttt{\textbackslash csname1
+\{value1\},\textbackslash csname2 \{value2\},..., \textbackslash csname$n$
+\{value$n$\}}. If \verb`mydoc.nmc` does not already exist then it
+is created in the document directory, and \verb`\csname {value}`
+becomes its first element.
+
+\paragraph{Editing the \texttt{.nmc} file externally}
+
+The \verb`.nmc` file is a text file and can be edited in a text editor.
+Thus it is possible to externally add control sequences and values
+to it provided the structure of the file is strictly adhered to. It
+is also possible to delete items from it or rename control sequences
+or edit values by the same mechanism. Editing the file externally
+like this, or renaming it, or transferring items from one \verb`.nmc`
+file to another, provides a way of using saved values in multiple
+documents.
+
+\subsubsection{Messages}
+
+If a control sequence \verb`\csname` is already known to \LaTeX ,
+then writing \verb`\reuse` \verb`{csname}` will produce a \verb`numerica`
+message and the result of the latest \verb`\eval`-uation will \emph{not}
+be saved:
+\begin{verbatim}
+    \eval*{\sum_{n=1}^{10}n}\par
+    \reuse{sigma}
+\end{verbatim}
+$\Longrightarrow$ \eval*{\sum_{n=1}^{10}n} \par \reuse{sigma}
+
+If there is no result to save – perhaps an \verb`\eval`-uation produces
+an error message instead – then another message is generated:
+\begin{verbatim}
+    \eval*{1/0}\par
+    \reuse{oops}
+\end{verbatim}
+$\Longrightarrow$     \eval*{1/0}\par
+    \reuse{oops}
+
+\subsubsection{Deleting and renewing}
+
+\label{subsec:reuseDeletingOverwriting:}There may be occasions when
+you wish to change a previously saved value and yet, irritatingly,
+the control sequence name will now be known to \LaTeX{} and so will
+generate an `already known' message. If you choose a different name
+for the control sequence to save the new value to, do you want the
+old name cluttering the \verb`.nmc` file? Deleting and renewing the
+values of saved control sequences are controlled by the settings \verb`delete`
+and \verb`renew`.
+
+Entering \verb`delete` in the settings option \emph{deletes} a control
+sequence and its value from the \verb`.nmc` file and undefines it
+in \LaTeX{} terms. Thus \verb`\reuse[delete]` \verb`{csname}` would
+delete \verb`\csname` and its value from the \verb`.nmc` file and
+undefine \verb`\csname`. If \verb`\csname` is not present in the
+file, nothing happens. Entering \verb`renew` replaces the value of
+a saved control sequence with a new value. If there is no such \emph{saved}
+control sequence but the control sequence is otherwise known to \LaTeX{}
+the `already defined' message will still be generated. This prevents
+giving control sequences like \verb`\sin`~or \verb`\frac` new meanings
+with the \verb`renew` setting.
+\begin{itemize}
+\item \verb`\reuse[delete]{csname}` deletes \verb`\csname` and its value
+from the \verb`.nmc` file and from memory if present; otherwise has
+no effect;
+\item \verb`\reuse{csname}` (the default) saves the result of the latest
+\verb`\eval` command to \verb`\csname`, provided \verb`\csname`
+is not already defined; in that case a warning message is presented
+and the result is not saved;
+\item \verb`\reuse[renew]{csname}` behaves like the default mode unless
+\verb`\csname` is already a saved control sequence in the \verb`.nmc`
+file, in which case its previous value is replaced by the result of
+the latest \verb`\eval` command; 
+\item if \verb`delete` and \verb`renew` are used together, whichever occurs
+second prevails.
+\end{itemize}
+In the following example, the first \verb`\reuse` deletes \verb`\suma`
+should it be present in the \verb`.nmc` file, the second saves the
+result, $55$, of the latest \verb`\eval`-uation (in fact an \verb`\eval*`-uation)
+and the third overwrites that saved value with the new value, $210$. 
+\begin{verbatim}
+    \reuse[delete]{suma}
+    \eval*{\sum_{n=1}^{10}n} \par
+    \reuse{suma}
+    \eval*{\sum_{n=1}^{20}n} \par 
+    \reuse[renew]{suma}
+\end{verbatim}
+$\Longrightarrow$ \reuse[delete]{suma}
+\eval*{\sum_{n=1}^{10}n} \par 
+\reuse{suma}
+\eval*{\sum_{n=1}^{20}n} \par 
+\reuse[renew]{suma}
+
+\subsubsection{Viewing what has been saved}
+
+\label{subsec:reuseSeeingSaved}It would be good in this example to
+see that the new value $210$ has in fact been saved. That is easy.
+Simply enter \verb`view` in the settings option of \verb`\nmcReuse`
+(I've removed the now unnecessary \verb`\par` tokens from the example.)
+\begin{verbatim}
+    \reuse[delete]{suma}
+    \eval*{\sum_{n=1}^{10}n}
+    \reuse[view]{suma}
+    \eval*{\sum_{n=1}^{20}n} 
+    \reuse[renew,view]{suma}
+\end{verbatim}
+$\Longrightarrow$     \reuse[delete]{suma}
+    \eval*{\sum_{n=1}^{10}n}
+    \reuse[view]{suma}
+    \eval*{\sum_{n=1}^{20}n}
+    \reuse[renew,view]{suma}
+
+\noindent First the original value $55$ was saved to \verb`\suma`
+but then the value was overwritten by the new value $210$. 
+
+The \verb`view` setting allows us to see how formatting is stored
+if the \emph{un}starred form of the \verb`\eval` command is used.
+In the following example, \verb`\eval` wraps around math delimiters:
+\begin{centred}
+\verb`\eval{$ 1+1 $} \reuse[view,renew]{two}` $\Longrightarrow$
+\eval{$ 1+1 $} \reuse[view,renew]{two}
+\end{centred}
+The full \emph{formula=result} display has been captured in \verb`\two`
+along with the math delimiters. If a vv-list is also involved, things
+become messy (but informative):
+\begin{verbatim}
+    \eval{$ x+y $}[x=1,y=2]
+    \reuse[view,renew]{three}
+\end{verbatim}
+$\Longrightarrow$     \eval{$ x+y $}[x=1,y=2]
+    \reuse[view,renew]{three}
+
+You may want to see \emph{all} saved control sequences. In that case
+use an \emph{empty} main argument: \verb`\nmcReuse[view]{}`. We now
+have enough saved control sequences to make this worthwhile: 
+\begin{verbatim}
+    \reuse[view]{}
+\end{verbatim}
+$\Longrightarrow$ \reuse [view]{} 
+
+\noindent (The \verb`\seven` that appears here is defined shortly.
+Its appearance \emph{before} definition is presumably due to \LaTeX{}
+making a number of passes when compiling this document.)
+
+\subsubsection{Counting saved control sequences: \texttt{\textbackslash nmcReuse{*}}}
+
+Because \verb`\nmcReuse` uses the same machinery as \verb`\nmcEvaluate`,
+it has a starred form, \verb`\nmcReuse*`, which produces a purely
+numerical result (just like \verb`\eval*`, \verb`info*`, \verb`\macros*`
+and \verb`\constants*`). In this case, the number is the count of
+how many control sequences have been saved:
+\begin{centred}
+\verb`\reuse*{}` $\Longrightarrow$ \reuse*{ }.
+\end{centred}
+
+\subsection{\texttt{reuse} setting of \texttt{\textbackslash eval} command}
+
+\label{subsec:supplReuseEvalSetting}Using \verb`\eval*` for a calculation
+ensures a purely numerical result, with no vv-list or formatting in
+the display of the result. But sometimes we might want the full display
+yet wish to save only the numerical result. This is the point of the
+\verb`reuse` setting of the \verb`\eval` command. 
+
+For the \emph{starred} form of the \verb`\eval` command it is always
+\emph{only the numerical result} that is saved, whatever the value
+of the \texttt{reuse} key in the settings option of the \verb`\eval`
+command.
+
+For the \emph{unstarred} form of the \verb`\eval` command exactly
+what is saved with \verb`\nmcReuse` depends on the \texttt{reuse}
+setting:
+\begin{lyxcode}
+reuse~=~<integer>
+\end{lyxcode}
+where \verb`<integer>` can take one of two values,
+\begin{itemize}
+\item \texttt{reuse=0} (the default) saves\emph{ the form that is displayed}
+including the vv-list if there is one and possibly a formatting component
+(like math delimiters). Note that if the vv-list is empty, a formatting
+component (math delimiters) may still be present in the saved result; 
+\item \texttt{reuse=1} (or, indeed, any non-zero integer) saves only the
+numerical result with no other elements of the display (no vv-list,
+no formatting component, no math delimiters).
+\end{itemize}
+As we saw earlier, saving the result from \verb`\eval{$ x+y $}[x=1,y=2]`,
+corresponding to \verb`reuse=0`, means the full display is saved.
+Check by writing \verb`\three` $\Longrightarrow$ \three. The full
+display was saved (including math delimiters).
+
+On the other hand, with {\ttfamily\verb`reuse=1`} only
+the numerical value is saved:
+\begin{centred}
+\verb`\eval[reuse=1]{$ x + y $}[x=3,y=4] \reuse[renew]{seven}` $\Longrightarrow$
+\eval[reuse=1]{$ x + y $}[x=3,y=4] \reuse[renew]{seven}.
+\end{centred}
+The numerical result only of the calculation should be saved, although
+the formula and vv-list are displayed as the result of the \verb`\eval`-uation.
+We can easily check: \verb`\seven` $\Longrightarrow$ \seven. Indeed,
+only the numerical result was saved.
+
+\chapter{Nesting  commands}
+
+\label{chap:Nesting} The \verb`\eval` command and the supplementary
+commands of the previous chapter can be \emph{nested} –\emph{ }used
+within other \verb`\eval` or supplementary commands. Nesting may
+occur in the main argument, or the vv-list, or the settings option,
+or some combination of all three. With the commands currently introduced,
+nesting is unlikely to be a major concern, but it becomes significant
+for the commands defined in the associated package \texttt{numerica-plus}
+(see §\ref{subsec:Related-packages}). Since those additional commands
+are not available for this document, the examples below use the commands
+introduced earlier: \verb`\eval`, \verb`\info`, \verb`\macros`,
+\verb`\constants` and \verb`\reuse`.
+
+\section{Nesting in the formula}
+
+Consider a statement like \verb`\eval{...\eval...}`. There is an
+inner \verb`\eval` and an outer \verb`\eval`. The inner \verb`\eval`
+`digests' \emph{its} \LaTeX{} formula to produce an \verb`l3fp`-readable
+expression which is fed to \verb`l3fp` to evaluate. The result is
+then returned to (the inner) \verb`\eval` to display. In version
+1 of \verb`numerica` that meant the inner command \emph{had} to be
+starred, \verb`\eval*`, so that no display formatting was fed to
+the outer command to try to digest (and cause an error).\emph{ }In
+version 2 of \verb`numerica` this is no longer the case. \verb`numerica`
+detects whether a command is inner or outer, and if inner, suppresses
+all display formatting, producing only a number, as if the command
+had been starred: 
+\begin{centred}
+\verb`\eval{$ \sin(\eval{\sin x}[x=\pi/6]\pi) + 1 $}` $\Longrightarrow$
+\eval{$ \sin(\eval{\sin x}[x=\pi/6]\pi) + 1$}.
+\end{centred}
+In the presentation of the overall result, the inner \verb`\eval`
+command is evaluated, displaying as a number.
+
+In this example, the \verb`x=\pi/6` could be removed from the inner
+\verb`\eval` and placed in the vv-list of the outer command since
+outer variables are available to the inner command:
+\begin{centred}
+\verb`\eval{$ \sin(\eval{\sin x}\pi) + 1 $}[x=\pi/6]` $\Longrightarrow$
+\eval{$ \sin(\eval{\sin x}\pi) + 1$}[x=\pi/6].
+\end{centred}
+Just to show that it is possible, the next example shows \verb`\eval`
+being used in a \verb`\constants` command. The \verb`o` setting
+in the \verb`\constants` command pervades its argument; hence it
+needs to be explicitly turned off for the \verb`\eval` if \verb`\sin(\pi/6)`
+is to evaluate as expected.
+\begin{verbatim}
+    \constants[o]{ y=\sin 30,x=\eval[o=0]{\sin(\pi/6)} }
+    \eval{$ x+y $}
+\end{verbatim}
+$\Longrightarrow$     \constants[o]{ y=\sin 30,x=\eval[o=0]{\sin(\pi/6)} }
+    \eval{$ x+y $}.
+
+\subsection{Math delimiters and double evaluations}
+
+Any math delimiters in the inner \verb`\eval` are ignored. (This
+also differs from version 1 of \verb`numerica` where they caused
+an error.) Obviously it is simpler to omit them as I have done in
+the examples. 
+
+However, math delimiters in the \emph{outer} \verb`\eval` command
+still have their normal effect and produce a \emph{formula = result,
+(vv-list)} display. One consequence of such a display is that the
+formula in the \emph{inner} \verb`\eval` command is evaluated \emph{twice}
+– once when the overall result is being calculated (i.e. the formula
+of the \emph{outer} \verb`\eval`) and later when the overall display
+of the result is created. In the \emph{formula} part of the \emph{formula
+= result, {[}vv-list{]}} display, the tokens in the \emph{formula}
+are expanded to their display form. For example, \verb`\sin` is expanded
+to $\sin$, \verb`\pi` is expanded to $\pi$ – and the inner \verb`\eval`
+is expanded to the numerical result of its evaluation – a second evaluation.
+If the inner formula is simple, this will be of little moment, but
+should the inner formula contain, say, a slowly converging infinite
+series, then evaluating it twice is a bad idea and it would be better
+to remove the delimiters from the outer \verb`\eval`. That prevents
+the second evaluation. 
+
+The problem does not arise if the outer \verb`\eval` lies within
+a math environment (e.g. \verb`$ \eval{...} $`) since that produces
+a display of the form \emph{result, {[}vv-list{]}.} The formula is
+not displayed and so the second evaluation does not occur. The inner
+\verb`\eval` is evaluated once only  to calculate the result.
+
+\section{Nesting in the vv-list}
+
+The inner \verb`\eval` can be placed in the vv-list of the outer
+command. If the vv-list of the inner \verb`\eval` contains a comma
+(meaning there are at least two variables), then the entire inner
+\verb`\eval` and its \LaTeX{} arguments needs to be wrapped in braces
+to hide the comma or commas of its vv-list from the outer \verb`\eval`.
+To show the effect of not doing so, I have slightly complicated the
+previous example by adding a second (unnecessary) variable. The first
+example is with braces, the second without:
+\begin{centred}
+\verb`\eval{$ \sin k\pi + 1 $}[k={\eval{y\sin x}[x=\pi/6,y=1]}]`
+$\Longrightarrow$ \eval{$ \sin k\pi + 1 $} [k={\eval{y\sin x}[x=\pi/6,y=1]}].
+
+\verb`\eval{$ \sin k\pi + 1 $}[k=\eval{y\sin x}[x=\pi/6,y=1]]` $\Longrightarrow$
+\eval{$ \sin k\pi + 1 $}[k=\eval{y\sin x}[x=\pi/6,y=1]].
+\end{centred}
+The vv-list of the outer \verb`\eval` is parsed as containing two
+entries, \verb`k=\eval` \verb`{y\sin x}[x=\pi/6` and \verb`y=1]`.
+Both will cause errors but since the vv-list is evaluated from the
+right, it is \verb`y=1]` which actually does so. 
+
+\section{Nesting in the settings option}
+
+This will be rare, but commands can occur in the settings option of
+the outer command. The \verb`\info` command provides a good example.
+I have included it in the punctuation setting of an \verb`\eval`-uation. 
+\begin{verbatim}
+    \eval[p=\mbox{,\qquad\info{sum} terms.}]
+      {\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3] 
+\end{verbatim}
+$\Longrightarrow$ \eval[p=\mbox{,\qquad\info{sum} terms.}]{\[ \sum_{n=0}^{\infty}\frac{(-1)^{n}}{n!} \]}[3]
+
+Because of the \verb`\[ \]` math delimiters, if the \verb`\info`
+command had been placed \emph{after} the \texttt{\textbackslash eval}
+command, it would have slid down to the next line. Used in the settings,
+as here, the display is \emph{inside} the \verb`\[ \]` delimiters,
+on the same line as the expression. This may be significant for adjusting
+vertical spacing of later parts of the document – widow and orphan
+control for instance.
+
+A point to note is the explicit writing of the `terms' descriptor.
+Normally \verb`\info{sum}` would automatically supply the descriptor,
+but as noted earlier, nesting of one command in another suppresses
+all elements of display of the inner command beyond the numerical
+result. It is as if the inner command is starred. Because the \verb`\info`
+command is nested in the \verb`\eval` command, the `terms' descriptor
+is suppressed and has had to be explicitly supplied by hand.
+
+\section{Rounding and display}
+
+In the display of the overall result, it is the result of the inner
+command which is shown, not the formula that the inner command acts
+on. How that number is displayed is determined by the number-format
+specification of the \emph{inner} command. Note however that this
+specification affects only how the result of the inner command is
+shown. Always 16 figures are passed from the inner command to the
+outer, as you can see in this example:
+\begin{verbatim}
+    \eval{$ \pi - \eval{ \pi }[4] $}[15]
+\end{verbatim}
+$\Longrightarrow$ \eval{$ \pi - \eval{ \pi }[4] $}[15].
+
+\noindent The outer result would not be zero to $15$ places of decimals
+if the inner result were restricted to $4$ decimal places. It is
+only the \emph{display} of the inner result which is so restricted.
+
+For infinite sums and products (and for \verb`\nmcIterate` and \verb`\nmcSolve`
+of the \verb`numerica-plus` package), the rounding value is not just
+for display purposes but is also used to determine the result. This
+may require judicious use of the extra rounding setting to get a sensible
+display. In the first instance below, the second sum stops at an effective
+rounding value of $5+2=7$, since the default extra rounding is $+2$,
+and the first sum (the inner one) also stops at $7=4+3$. No surprise
+then that the overall result is $0$. In the second instance, the
+inner sum stops at a rounding value of $4+2=6$. Although the left-hand
+side of the display is unaltered, the result is no longer $0$.
+\begin{verbatim}
+     \eval{$ \eval[S+=3]{\sum_{n=1}^\infty 1/n^3}[4*]
+       - \sum_{n=1}^\infty 1/n^3$}[5]
+\end{verbatim}
+$\Longrightarrow$      \eval{$ \eval[S+=3]{\sum_{n=1}^\infty 1/n^3}[4*]
+       - \sum_{n=1}^\infty 1/n^3$}[5]
+
+\noindent whereas
+\begin{verbatim}
+    \eval{$ \eval[S+=2]{\sum_{n=1}^\infty 1/n^3}[4*]
+       - \sum_{n=1}^\infty 1/n^3$}[5]
+\end{verbatim}
+$\Longrightarrow$      \eval{$ \eval[S+=2]{\sum_{n=1}^\infty 1/n^3}[4*]
+       - \sum_{n=1}^\infty 1/n^3$}[5].
+
+\section{Error messages}
+
+Errors in an inner command create a small change in error message
+display.
+\begin{centred}
+\verb`\eval{ 1 + \eval{ 1 + \eval{ k } } }` $\Longrightarrow$ \eval{ 1 + \eval{ 1 + \eval{ k } } }
+
+\verb`\eval{ x + \eval{ k }[k=\arcsin 2] }[x=1]` $\Longrightarrow$
+\eval{ x + \eval{ k }[k=\arcsin 2] }[x=1]
+\end{centred}
+An integer is added to the `where' part of the error message. The
+integer indicates the \emph{level of nesting} where the error occurs.
+
+If there is no nesting where the error occurs, the integer is suppressed,
+even though there may be nesting elsewhere in the overall expression.
+This is in the interests of straightforwardness when nesting is absent,
+which will be overwhelmingly the most common situation.
+\begin{centred}
+\verb`\eval{ k + \eval{ x }[x=1] }[k=\arcsin 2]` $\Longrightarrow$
+\eval{ k + \eval{ x }[x=1] }[k=\arcsin 2]
+\end{centred}
+
+\section{Debugging}
+
+\label{subsec:nestDebugging}It is worth looking at the debug display
+when \verb`\eval` commands are nested. For the outer \verb`\eval`
+command:
+\begin{centred}
+\verb`\eval[dbg=1]{$ \sin \eval*{\sin x}[x=\pi/6]\pi + 1 $}` $\Longrightarrow$
+\eval[dbg=210]{$ \sin \eval*{\sin x}[x=\pi/6]\pi + 1$}
+\end{centred}
+There is no vv-list for the outer command whence the two empty slots
+in the display but when the inner \verb`\eval` is in the vv-list,
+they are filled:
+\begin{centred}
+\verb`\eval[dbg=1]{$ \sin k\pi + 1 $}[k=\eval*{\sin x}[x=\pi/6]]`
+$\Longrightarrow$ \eval[dbg=1]{$ \sin k\pi + 1$} [k=\eval*{\sin x}[x=\pi/6]]
+\end{centred}
+For the inner \verb`\eval` command debugging may still work but in
+an idiosyncratic way. To clarify exactly what is going on I have added
+a \verb`\left( \right)` pair around the entire inner \verb`\eval`
+command. Note that I have also used a \emph{negative} \texttt{dbg}
+value. With a positive value, the right parenthesis is pressed toward
+the right margin of the page. The negative value limits the display
+to the text width and gives the much neater result shown.
+\begin{verbatim}
+    \eval[()=2]{$
+      \sin\left( 
+            \eval*[dbg=-1]{ \sin x }[x=\pi/6]
+          \right)\pi + 1 $}
+\end{verbatim}
+$\Longrightarrow$     \eval[()=2]{$
+      \sin\left( 
+            \eval*[dbg=-1]{ \sin x }[x=\pi/6]
+          \right)\pi + 1 $}
+
+\medskip{}
+The debug display from the inner \verb`\eval` command has been inserted
+into the formula of the outer \verb`\eval` in the position occupied
+by the inner \verb`\eval`. I did not deliberately code for this,
+but have decided to leave it as is despite the potential for some
+rather odd displays, since there can be no confusion about which \verb`\eval`
+command is being `debugged'. In this last example, in order to both
+use \verb`\left(...\right)` and have the calculation give the previous
+result I have employed the setting \verb`()=2` in the outer \verb`\eval`;
+see §\ref{subsec:parseTrigFns}.
+
+\chapter{Using \texttt{numerica} with \protect\LyX}
+
+\label{chap:LyX}The document processor \LyX{} has a facility that
+enables snippets from a document to be compiled separately and the
+results presented to the user without having to compile the entire
+document. The present document was written in \LyX . The demonstration
+calculations were evaluated using this \emph{instant preview} facility. 
+
+To use \texttt{numerica} in \LyX{} go to \textsf{Document \lyxarrow{}
+Settings \lyxarrow{} LaTeX Preamble} and enter
+\begin{lyxcode}
+\textbackslash usepackage\{numerica\}
+\end{lyxcode}
+then click \textsf{OK}. You may wish to follow the above line in the
+preamble with \verb`\nmcReuse{}`:
+\begin{lyxcode}
+\textbackslash usepackage{[}lyx{]}\{numerica\}
+
+\textbackslash nmcReuse\{\}
+\end{lyxcode}
+In that case, type the extra line and \emph{then} click \textsf{OK}.
+The additional line ensures all saved values are available in your
+document from the outset.
+
+\section{Instant~preview}
+
+The instant preview facility of \LyX{} performs mini-\LaTeX{} runs on
+selected parts of a document (for instance, the mathematical parts)
+and displays the results in \LyX{} while the user continues to work
+on the surrounding document.\texttt{ numerica} uses these mini-\LaTeX{}
+runs to do its evaluations and display their results. That means you
+get feedback on your calculations almost immediately.
+
+To use this facility first ensure that instant preview is turned on.
+This means selecting \textsf{Tools \lyxarrow Preferences \lyxarrow Look
+\& Feel \lyxarrow{} Display}, ensuring that the \textsf{Display graphics}
+checkbox is checked, and against \textsf{Instant preview} selecting
+\textsf{On}, then clicking \textsf{OK}.
+
+\subsection{Document location}
+
+It also matters where your document is located. You may have your
+own local or personal texmf tree (see §\ref{subsec:settingsPersonal-texmf-tree}).
+If your document is located there, perhaps in the \verb`doc` folder,
+then not all features of preview will work as expected. Presumably
+this is because both \LyX{} and your \LaTeX{} distribution (e.g. \TeX Live
+or MiK\TeX ) are interacting with the location and interfere. Move
+your document to another location which your \LaTeX{} distribution
+has no interest in, and open it in \LyX{} there.
+
+\subsection{Global vs local previewing}
+
+\label{subsec:LyXGlobal-vs-local}Compilation of previews occurs in
+two distinct modes. 
+
+\paragraph{Global preview generation:}
+
+When a document is opened (and preview is \emph{on}), all previews
+in the document are formed in sequence in the one \LaTeX{} run. This
+is the global mode. The mini-\LaTeX{} run may well be substantial.
+It compiles a \verb`.tex` file that begins with the document's preamble
+with some additions then comes \verb`\begin{document}`. That is followed
+by a sequence of preview environments,
+\begin{lyxcode}
+\textbackslash begin\{preview\}
+
+<stuff>
+
+\textbackslash end\{preview\}
+\end{lyxcode}
+one for each preview in the document. Finally there is an \verb`\end{document}`
+statement. The critical point is that all previews are between the
+same \verb`\begin{document}`, \verb`\end{document}` statements,
+and so earlier previews in the sequence can communicate with later
+ones.
+
+\paragraph{Local preview generation:}
+
+The other mode in which preview operates is local. Suppose you have
+your document open and want to add to it, for instance with a simple
+evaluation, \verb`\eval{x+y}[x=1,y=2]` in an ERT inset in a preview
+inset. The resulting mini-\LaTeX{} run is of the form
+\begin{lyxcode}
+<preamble>
+
+\textbackslash begin\{document\}
+
+\textbackslash begin\{preview\}
+
+\textbackslash eval\{x+y\}{[}x=1,y=2{]}
+
+\textbackslash end\{preview\}
+
+\textbackslash end\{document\}
+\end{lyxcode}
+The preamble is as before but there is only \emph{one} preview between
+the \verb`\begin{document}`, \verb`\end{document}` statements. That
+preview is isolated from all other, previous previews and will be
+isolated from all other, later previews. 
+
+This has implications for the supplementary commands of the previous
+chapter and means that if you want to transfer information (a macro,
+a constant, a result) from one preview to another, you need to do
+it through the preamble or by means of an external file or, in some
+cases, by forcing a global preview run in which all previews are recompiled
+between the same \verb`\begin{document}`, \verb`\end{document}`
+statements.
+
+\subsubsection{Forcing a global preview run}
+
+Closing then opening a document is one way to force a global preview
+compilation. Another is to change the zoom level. This causes \LyX{}
+to recompile all previews at the new zoom level. But you may not want
+to work at the new zoom level. Going back to the old zoom level will
+force a second recompilation of all previews. For a large document
+\emph{two} recompilations is too heavy a burden. The secret is to
+combine a zoom in and a zoom out into one command and attach it to
+a shortcut.
+
+If you go to \textsf{Tools \lyxarrow{} Preferences \lyxarrow{} Editing
+\lyxarrow{} Shortcuts}, click on the \textsf{New} button and enter
+\begin{lyxcode}
+command-sequence~buffer-zoom-in;~buffer-zoom-out
+\end{lyxcode}
+then assign a shortcut to it (\verb`Alt+Z` for zoom?) you will gain
+a simple means of forcing a global recompilation of previews. 
+
+\section{Mathed}
+
+(Mathed = the \LyX{} mathematics editor.) If you have instant preview
+\emph{on} then one way to use \texttt{numerica} in \LyX{} is to enter
+an \verb`\eval` command in mathed. Clicking the cursor outside the
+editor with the mouse or moving it outside with the arrow keys will
+then trigger formation of a preview of the editor's contents – a snippet
+of what will be shown in the pdf. This will be displayed in mathed's
+place after a generally short `pause for thought' as the mini-\LaTeX{}
+run progresses behind the scenes. 
+
+The original expression can be recovered by clicking on the preview.
+The content of mathed is immediately displayed and can be edited.
+
+\subsection{\protect\LaTeX{} braces~\{~~\}}
+
+\LyX{} does not support \texttt{numerica}'s \verb`\eval` command `out
+of the box' as it does, say, \verb`\frac` or \verb`\sqrt`. To use
+the \verb`\eval` command in mathed you will need to supply the braces
+used to delimit its mandatory argument. (For \verb`\frac` and \verb`\sqrt`
+by contrast, \LyX{} supplies these automatically in the form of blue-outlined
+boxes.) Unfortunately the \verb`{` key\footnote{\textsf{Shift+{[}} on my keyboard.}
+does not insert a left brace into the document but rather an escaped
+left brace \verb`\{` as you can see by looking at \textsf{View \lyxarrow{}
+Code Preview Pane}. Escaped braces like this are used for grouping
+terms in \emph{mathematics}; they are not the delimiters of a \LaTeX{}
+argument. 
+
+The brace delimiters for \LaTeX{} arguments are entered in mathed by
+typing a backslash \textsf{\textbackslash{} }then a left brace\textsf{
+\{} – two separate key presses rather than a single combined press.
+This enters a balanced pair of (unescaped) braces with the cursor
+sitting between them waiting for input. Alternatively, if you have
+already written an expression that you want to place between braces,
+select it, then type \textsf{\textbackslash{} }then\textsf{ \{}.
+
+\section{Preview insets}
+
+There are problems with using mathed for calculations.
+\begin{itemize}
+\item Expressions entered in mathed are necessarily of the form \verb`$ \eval... $`
+or more generally \verb`delimiter` \verb`\eval...` \verb`delimiter`.
+But you may wish to wrap the \verb`\eval` command \emph{around} the
+math delimiters to produce a \emph{formula=result} form of display.
+In mathed the only way to effect such a display is to write the \emph{formula=
+}part yourself – which may involve no more than copy and paste but
+is still additional mouse work/key pressing. 
+\item Mathed does not accept carriage returns. If you want to format a complicated
+expression for readability by breaking it into separate lines, you
+can't. The expression is jammed into the one line, along with the
+settings option content and the vv-list, often extending well beyond
+the edge of the screen. 
+\end{itemize}
+For these reasons I have come to prefer \emph{not} using mathed for
+calculations but instead to use preview insets wrapped around \TeX -code
+(ERT) insets. \LyX{} uses the shortcut \textsf{Ctrl+L} to insert an
+ERT inset. Since \LyX{} now does no printing itself, the shortcut \textsf{Ctrl+P}
+that was formerly used for printing is available for other purposes.
+On my keyboard, the \textsf{P} key lies diagonally up and to the right
+but adjacent to the \textsf{L} key. I suggest assigning \textsf{Ctrl+P}
+to inserting a preview inset. Then typing \textsf{Ctrl+P Ctrl+L} –
+which means holding the \textsf{Ctrl} key down and tapping two diagonally
+adjacent keys, \textsf{P} followed immediately by \textsf{L} – will
+insert an ERT inset inside a preview inset with the cursor sitting
+inside the ERT inset waiting for input. In the ERT inset you can enter
+carriage returns, and so format complicated expressions. You can place
+the vv-list on a separate line or onto consecutive lines. And when
+you have finished, clicking outside the preview inset will trigger
+preview into doing its thing and present the result `before your
+eyes'. 
+
+To assign the suggested shortcut, go to \textsf{Tools \lyxarrow{} Preferences
+\lyxarrow{} Editing \lyxarrow{} Shortcuts}. Under \textsf{Cursor, Mouse
+and Editing Functions} in the main window on the right, scroll down
+until you come to \textsf{preview-insert}, select it, then click \textsf{Modify}.
+Now press \textsf{Ctrl+P}. The shortcut will magically appear in the
+greyed, depressed key.\textsf{ }Click \textsf{OK} and then \textsf{OK}
+in the \textsf{Preferences} window to close it. (Most of the examples
+in this document have been evaluated in this way, using \textsf{Ctrl+P
+Ctrl+L.)}
+
+\section{Errors }
+
+Instant preview will display error messages generated by \verb`numerica`
+in \LyX{} just as it does the results of calculations. Clicking on
+the message will show the underlying expression which can then be
+edited. However \LaTeX{} errors will \emph{not} produce a preview;
+formation of the preview will stall. To find precisely what has gone
+wrong, you will need to look at the \LaTeX{} log, but not the log of
+the overall document; rather the \emph{preview} log. 
+
+\subsection{Temporary directory of \protect\LyX}
+
+Unfortunately this is tucked away in a temporary directory and is
+not immediately accessible in \LyX{} (unlike the main \LaTeX{} log from
+\textsf{Document \lyxarrow{} \LaTeX{} Log}). When \LyX{} is started,
+it sets up a temporary directory in which to perform various tasks.
+On Windows systems this will be located in \texttt{C:\textbackslash Users\textbackslash <your
+name>\textbackslash AppData\textbackslash Local\textbackslash Temp}
+and will have a name like \texttt{lyx\_tmpdir.XOsSGhBc1344}. 
+
+One of the tasks \LyX{} uses this temporary directory for is to create
+preview images when a document is opened. If you look inside \LyX 's
+temporary directory when a document is first loaded, you will see
+a subdirectory created, with a name like \texttt{lyx\_tmpbuf0}. There
+may already be such directories there, in which case the number on
+the end will be greater than \texttt{0} – it depends on whether other
+documents are or have been open in the current instance of \LyX .
+Inside the appropriate \texttt{lyx\_tmpbuf}\texttt{\emph{n}} folder
+will be the preview log with a name like \texttt{lyxpreviewZL1344.log}.
+It will usually be accompanied by other files with extensions like
+\texttt{.dvi}, \texttt{.tex}, and – depending on the number of previews
+in your document – a number, perhaps a lot, of image files with the
+extension \texttt{.png}, each one of which is a preview. For a document
+just loaded there will be only the one preview log, but if you have
+added preview insets or math insets to your document\textsf{ }in the
+current editing session there will be a number of such logs and you
+will need to determine the relevant one by the time stamp. 
+
+The log files are text files and can be opened in a text editor. The
+relevant part of the log is towards the end (just before the final
+statistical summary) where you will find a list of entries like \texttt{Preview: Snippet
+1 641947 163840 7864588}. If there is an error, it will be noted here
+among these snippets and will generally make clear what needs remedying.
+
+\subsection{CPU usage, \protect\LaTeX{} processes}
+
+It is possible when a preview stalls that the \LaTeX{} process associated
+with the preview will continue to run, using CPU cycles, slowing overall
+computer performance, and perhaps resulting in extra fan use giving
+a different sound to the computer. In Windows 10, the \textsf{Task
+Manager} (\textsf{Ctrl+Shift+esc}) under the \textsf{Details} tab
+shows the current executables running. The \textsf{CPU} column will
+show which processes are preoccupying the CPU. Check whether one or
+more of these processes looks \LaTeX -related (e.g. \texttt{latex.exe}
+or \texttt{pdflatex.exe}, or \texttt{miktex-pdftex.exe} if using MiK\TeX ).
+Click the \textsf{Name} column to sort the processes by name and look
+for the relevant name in the list, select it, and end the process
+(click the \textsf{End Task} button). 
+
+I am not familiar with the corresponding situation on Linux or Mac.
+
+\section{Hyperref support vs speed}
+
+If you want the pdf produced from your document to support hyperref
+links and show an outline window in your pdf viewer (generally placed
+on the left in the viewer) then you need to ensure the checkbox at
+\textsf{Document Settings \lyxarrow{} PDF Properties \lyxarrow{} Use
+Hyperref Support} is indeed checked. But you don't need to do this
+until the final compilation of the document. The advantage of leaving
+this until the last is that in a large document with many previews
+the time for preview generation is essentially halved. If hyperref
+support is enabled, preview generation not only creates all the individual
+image files that are the previews (files of extension \verb`.png`)
+but also requires the compilation of a single pdf document showing
+all the previews in sequence. (Like the previews, the pdf document
+`hides' in the termporary directory where \LyX{} does its work.)
+In other words, \emph{two} images are created for each preview, the
+\verb`.png` image which is the one \LyX{} displays, and another image
+buried inside the pdf of all images. That second step does not occur
+if hyperref support is disabled. In a small document, this is not
+going to matter; in a large document it becomes significant. It is
+well worth temporarily turning off hyperref support and then, when
+the time for final compilation comes, turning it back on.
+
+\section{Supplementary commands in \protect\LyX}
+
+There are some difficulties using the supplementary commands successfully
+with instant preview. 
+
+\subsection{Reuse of earlier previews}
+
+One is that whenever \LyX{} has generated a preview image for a particular
+\LaTeX{} expression, it will use that same image whenever it meets
+that same \LaTeX{} expression later. That means that a statement like
+\verb`\macros[view]{}` and the same statement later will display
+the same image, even though there may have been macros defined or
+freed in between. The same goes for all the other supplementary functions,
+including, for example, \verb`\info{sum}`. A second instance of \verb`\info{sum}`
+will display the image generated by the first instance even though
+further infinite sums may have been evaluated between the \verb`\info`
+statements. 
+
+The remedy is to make some small but insignificant difference to the
+\LaTeX{} expression  in the second instance – generally a change in
+white space will do. For example: first time \verb`\macros[view]{}`,
+second time \verb`\macros[view]{ }` where a space has been inserted
+between the braces; or: first time \verb`\info{sum}`, second time
+\verb`\info{ sum}` where a space has been inserted before \verb`sum`.
+This will ensure \LyX{} doesn't fall back on the previously generated
+image.
+
+\subsection{\textquoteleft Stalled\textquoteright{} previews}
+
+It is possible to put content into an ERT inset inside a preview inset
+(\textsf{Ctrl+P Ctrl+L}) and for nothing to happen. The preview has
+apparently stalled. Certainly this can be the case if there is an
+error in the input (e.g. a missing brace) but it also occurs if there
+is no output to display. For instance \verb`\constants{ c=300000000 }`
+does not produce any visual output. There is nothing for the preview
+to display and so the preview inset sits there, apparently stalled.
+This is a security measure for previews in \LyX{} to provide at least
+some guard against malicious code being run in the preview. If the
+preview resolved, it would disappear completely from view in the \LyX{}
+window. 
+
+If you find the visual appearance of such apparently stalled previews
+distracting, the addition of some displayable content to the preview
+will result in it resolving to that content; the content could be
+as small as a full stop.
+
+\subsection{Using \texttt{\textbackslash nmcMacros}}
+
+As noted earlier, previews are mini-\LaTeX{} runs, either local or
+global. Each local preview is of the form<preamble>
+\begin{lyxcode}
+\textbackslash begin\{document\}
+
+\textbackslash begin\{preview\}
+
+<stuff>
+
+\textbackslash end\{preview\}
+
+\textbackslash end\{document\}
+\end{lyxcode}
+Whatever goes into or comes out of the preview is isolated from any
+other local preview, unless it is through the preamble or an external
+file. Sometimes a global preview run can overcome this problem for
+then all the previews lie between the same \verb`\begin{document}`,
+\verb`end{document}` statements. However, this does not help with
+macro definitions. \verb`\def`, \verb`\newcommand`, \verb`\NewDocumentCommand`
+all provide \emph{local} definitions which remain trapped within their
+own \verb`\begin{preview}`, \verb`\end{preview}`) statements. Another
+preview, say containing an \verb`\eval` command, between a different
+pair of \verb`\begin{preview}`, \verb`\end{preview}`) statements,
+will not know about the macro definition.
+
+There are (at least) three ways out:
+\begin{enumerate}
+\item Confine everything to the same preview inset: the definition of a
+macro, the \verb`\macros` statement, and the use of the macro in
+an \verb`\eval` command. 
+\item Confine macro definitions to the preamble (\textsf{Document \lyxarrow{}
+Settings \lyxarrow{} \LaTeX{} Preamble}).
+\item Within previews use \verb`\gdef` (or \verb`\global\def`) exclusively
+for making your macro definitions; this makes the macro available
+to all later previews.
+\end{enumerate}
+
+\subsection{Using \texttt{\textbackslash nmcConstants}}
+
+Because \verb`\nmcConstants` doesn't use \verb`\def` or \verb`\newcommand`
+or \verb`\NewDocumentCommand` it is not subject to the same localisation
+problem as \verb`\nmcMacros`, but the reach of a \verb`\constants`
+command will still be confined to its own preview unless a \emph{global}
+preview run is forced; see above §\ref{subsec:LyXGlobal-vs-local}.
+
+\subsection{Using \texttt{\textbackslash nmcReuse}}
+
+As noted earlier, \LyX{} creates its previews in a temporary directory,
+not the document directory. If you want to save values from your current
+document – say, \texttt{mydoc.lyx} – to \texttt{mydoc.nmc} then you
+do so as described earlier (§\ref{sec:supplReuse}), but the file
+\texttt{mydoc.nmc} containing the saved results will be located in
+the temporary directory. When \LyX{} is closed the file will be deleted
+along with all the other contents of that directory.
+
+Fortunately \LyX{} has a copying mechanism for getting files out of
+the temporary directory and into the document directory. When a document
+is exported – say to pdf – it is possible to specify a \emph{copier}
+to automatically copy back to the document directory or subdirectory
+various files in the temporary directory. We want the \texttt{.nmc}
+file containing the saved values to be copied back. Go to \textsf{Tools
+\lyxarrow{} Preferences \lyxarrow{} File Handling \lyxarrow{} File Formats}
+and find \textsf{PDF (pdflatex)} (assuming export to \texttt{pdf}
+by this route) in the list of formats. In\textsf{ }the \textsf{Copier}
+slot of the dialogue insert the following line of code:
+\begin{lyxcode}
+{\small python~-tt~\$\$s/scripts/ext\_copy.py~-e~nmc,pdf~-d~\$\$i~\$\$o}{\small\par}
+\end{lyxcode}
+\verb`ext_copy.py` is a python script that is supplied with \LyX .
+The \texttt{-e nmc,pdf -d} part of the line tells \texttt{ext\_copy.py}
+that on export to \texttt{pdf} by the \texttt{pdflatex} route\texttt{
+}to copy any files with the extensions \texttt{.nmc} or \texttt{.pdf}
+from the temporary directory where \LyX{} does its work back to the
+document directory – the \verb`-d` option (which became available
+with \LyX{} 2.3.0). 
+
+But if you have a complex document, it may take too much time to want
+to export to pdf before closing \LyX , particularly if there are a
+lot of evaluations in the document. Much faster is to export to \emph{plain
+text}, not because you want a plain text version of your document
+but because it too can be used to trigger the copier mechanism. Go
+to \textsf{Tools \lyxarrow{} Preferences \lyxarrow{} File Handling \lyxarrow{}
+File Formats} and find \textsf{Plain text} in the list of formats.
+In the \textsf{Copier} slot enter
+\begin{lyxcode}
+{\small python~-tt~\$\$s/scripts/ext\_copy.py~-e~nmc~-d~\$\$i~\$\$o}{\small\par}
+\end{lyxcode}
+The only difference from the previous copier command is the absence
+of \texttt{pdf}.\footnote{I'm assuming that you don't actually want the plain text version of
+the file copied back. If you do, then change \texttt{-e nmc} to \texttt{-e
+nmc,txt}.} This will copy \texttt{mydoc.nmc} with its saved values from the
+temporary directory back to the document directory. To effect the
+export, go to \textsf{File \lyxarrow{} Export }and find \textsf{Plain
+text} in the list of formats and click on it. 
+
+A shortcut would be nice. For that go to \textsf{Tools \lyxarrow{}
+Preferences \lyxarrow{} Editing \lyxarrow{} Shortcuts}, click on \textsf{New},
+enter \texttt{buffer-export text} in the \textsf{Function:} slot,
+click on the blank key against \textsf{Shortcut:} and type your shortcut.
+You may have to try a number before you find one that hasn't already
+been assigned. (I'm using \textsf{Ctrl+}; for no particular reason
+beyond the fact that it fits under the fingers easily and saving values
+to the document directory has a punctuation-like feel to it, a pause
+in the process of writing.) It is now an easy matter to press the
+shortcut at the end of a \LyX{} session to copy all the values saved
+in \texttt{mydoc.nmc} back to a file of the same name in the document
+directory. And it is brisk, not least because plain text export ignores
+ERT insets (and hence preview insets wrapped around ERT insets), nor
+does it evaluate \verb`\eval` commands in math insets.
+
+\subsubsection{A final tweak?}
+
+But one still needs to \emph{remember} to press the shortcut. The
+thought arises: can \emph{closing} the current document trigger the
+copying process? \LyX{} provides a means of linking two commands and
+assigning a keyboard shortcut to them with its \texttt{command-sequence}
+\LyX{} function. I suggest assigning a shortcut\textsf{ }to
+\begin{lyxcode}
+command-sequence~buffer-export~text;~view-close
+\end{lyxcode}
+Indeed, why not reassign the current shortcut for \texttt{view-close},\texttt{
+}which is \textsf{Ctrl+W} on my system, to this command sequence?
+(I use the \texttt{cua} key bindings – check the \textsf{Bind file:}
+slot in \textsf{Tools \lyxarrow{} Preferences \lyxarrow{} Editing \lyxarrow{}
+Shortcuts}.)
+
+Please note, however, that \emph{this will work as intended only from
+\LyX{} 2.4.0}.\footnote{Due for release in 2021.} For \LyX{} 2.3 and
+earlier, the command sequence will generally fail because of `asynchronous'
+processing – \texttt{buffer-export }and \texttt{view-close} use different
+threads and the latter may well start before the former is complete.
+From \LyX{} 2.4.0 this defect has been fixed. You press your shortcut,
+the export to plain text occurs and the \texttt{.nmc} file is copied
+back to the document directory, then the current view is closed.
+
+Note that in the other direction, the \verb`.nmc` file in your document
+directory is \emph{automatically} copied to the temporary directory
+when needed. Nothing needs to be done by you, the user.
+
+\subsubsection{Use of \protect\LyX{} notes}
+
+The central fact about a \LyX{} note is that it does not contribute
+to the pdf. But instant preview still works there. This suggests a
+possibility: that a calculation be performed within a \LyX{} note and
+the result saved using \verb`\nmcReuse` within the same note. The
+saved value is now available \emph{from file} for use elsewhere in
+the document. In this way, some selected content from a LyX note \emph{can}
+find its way into the pdf when the document is compiled.
+
+\chapter{Reference summary}
+
+\section{Commands defined in \texttt{numerica}}
+\begin{enumerate}
+\item \texttt{\textbackslash nmcEvaluate, \textbackslash eval }
+\item \texttt{\textbackslash q, \textbackslash Q }(`cleave' commands)
+\item \texttt{\textbackslash nmcInfo, \textbackslash info}
+\item \texttt{\textbackslash nmcMacros, \textbackslash macros}
+\item \texttt{\textbackslash nmcConstants, \textbackslash constants}
+\item \texttt{\textbackslash nmcReuse, \textbackslash reuse}
+\end{enumerate}
+Provided they have not already been defined when \texttt{numerica}
+is loaded, the following commands are defined in \texttt{numerica}
+using \verb`\DeclareMathOperator` from \texttt{amsmath} :
+\begin{enumerate}
+\item \texttt{\textbackslash arccsc, \textbackslash arcsec, \textbackslash arccot}
+\item \texttt{\textbackslash csch, \textbackslash sech}
+\item \texttt{\textbackslash asinh, \textbackslash acosh, \textbackslash atanh,
+\textbackslash acsch, \textbackslash asech, \textbackslash acoth}
+\item \texttt{\textbackslash sgn, \textbackslash lb}
+\end{enumerate}
+Provided they have not already been defined, the following commands
+are defined in \texttt{numerica} using \verb`\DeclarePairedDelimiter`
+from \texttt{mathtools}:
+\begin{lyxcode}
+\textbackslash abs,~\textbackslash ceil,~\textbackslash floor
+\end{lyxcode}
+The following commands have been redefined in \texttt{numerica} to
+give more spacing around the underlying \verb`\wedge` and \verb`\vee`
+symbols:
+\begin{lyxcode}
+\textbackslash land,~\textbackslash lor
+\end{lyxcode}
+
+\section{\textquoteleft Digestible\textquoteright{} content}
+
+\texttt{numerica} knows how to deal with the following content, meaning
+that any of these elements occurring within an \verb`\eval` command
+should not of itself cause a \texttt{numerica} error. Not all formatting
+commands affect display of the output.
+\begin{enumerate}
+\item variable names (sequences of tokens given values in the variable~=~value
+list)
+\item digits, decimal point
+\begin{enumerate}
+\item \texttt{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, .}
+\end{enumerate}
+\item constants
+\begin{enumerate}
+\item \texttt{e, \textbackslash pi, \textbackslash gamma, \textbackslash phi,
+\textbackslash deg, \textbackslash infty}
+\end{enumerate}
+\item arithmetic operators
+\begin{enumerate}
+\item \texttt{+, -, {*}, /, \textasciicircum , \textbackslash times, \textbackslash cdot,
+\textbackslash div}
+\end{enumerate}
+\item logical operators
+\begin{enumerate}
+\item \texttt{\textbackslash wedge, \textbackslash land, \textbackslash vee,
+\textbackslash lor, \textbackslash neg, \textbackslash lnot}
+\end{enumerate}
+\item comparisons
+\begin{enumerate}
+\item \texttt{=, <, >, \textbackslash ne, \textbackslash neq, \textbackslash le,
+\textbackslash leq, \textbackslash ge, \textbackslash geq}
+\item (if \texttt{amssymb} loaded) \texttt{\textbackslash nless, \textbackslash ngtr,
+\textbackslash geqq, \textbackslash geqslant, \textbackslash leqq,
+\textbackslash leqslant, \textbackslash ngeq, \textbackslash ngeqq,
+\textbackslash ngeqslant, \textbackslash nleq, \textbackslash nleqq,
+\textbackslash nleqslant}
+\end{enumerate}
+\item brackets, bracket-like elements, modifiers
+\begin{enumerate}
+\item \texttt{( ), {[} {]}, \textbackslash\{ \textbackslash\}}
+\item \texttt{\textbackslash lparen \textbackslash rparen} (from \texttt{mathtools})\texttt{,
+\textbackslash lbrack \textbackslash rbrack, \textbackslash lbrace
+\textbackslash rbrace}
+\item \texttt{\textbackslash lvert \textbackslash rvert, \textbackslash lfloor
+\textbackslash rfloor, \textbackslash lceil \textbackslash rceil}
+\item \texttt{| |} (no nesting, deprecated)
+\item \texttt{\textbackslash left \textbackslash right, \textbackslash bigl
+\textbackslash bigr, \textbackslash Bigl \textbackslash Bigr, \textbackslash biggl
+\textbackslash biggr, \textbackslash Biggl \textbackslash Biggr} 
+\item \texttt{.} \texttt{/ |} (used with a modifier)
+\item \texttt{\textbackslash abs{[}{]}\{\}, \textbackslash abs{*}\{\},
+\textbackslash floor{[}{]}\{\}, \textbackslash floor{*}\{\}, \textbackslash ceil{[}{]}\{\},
+\textbackslash ceil{*}\{\}} 
+\end{enumerate}
+\item unary functions (in the mathematical sense)
+\begin{enumerate}
+\item \texttt{\textbackslash sin, \textbackslash cos, \textbackslash tan,
+\textbackslash csc, \textbackslash sec, \textbackslash cot}
+\item \texttt{\textbackslash arcsin, \textbackslash arccos, \textbackslash arctan,
+arccsc, \textbackslash arcsec, \textbackslash arccot }
+\item \texttt{\textbackslash sin\textasciicircum\{-1\}, \textbackslash cos\textasciicircum\{-1\},
+\textbackslash tan\textasciicircum\{-1\}, \textbackslash csc\textasciicircum\{-1\},
+\textbackslash sec\textasciicircum\{-1\}, \textbackslash cot\textasciicircum\{-1\}}
+\item \texttt{\textbackslash sinh, \textbackslash cosh, \textbackslash tanh,
+\textbackslash csch, \textbackslash sech, \textbackslash coth }
+\item \texttt{\textbackslash asinh, \textbackslash acosh, \textbackslash atanh,
+\textbackslash csch, \textbackslash sech, \textbackslash acoth}
+\item \texttt{\textbackslash sinh\textasciicircum\{-1\}, \textbackslash cosh\textasciicircum\{-1\},
+\textbackslash tanh\textasciicircum\{-1\}, \textbackslash csch\textasciicircum\{-1\},
+\textbackslash sech\textasciicircum\{-1\}, \textbackslash acoth\textasciicircum\{-1\}}
+\item \texttt{\textbackslash exp, \textbackslash lb, \textbackslash lg,
+\textbackslash ln, \textbackslash log, \textbackslash log\_\{\},
+\textbackslash sgn, \textbackslash surd}
+\item \texttt{\textbackslash sqrt\{\}, \textbackslash abs{[}{]}\{\}, \textbackslash abs{*}\{\},
+\textbackslash floor{[}{]}\{\}, \textbackslash floor{*}\{\}, \textbackslash ceil{[}{]}\{\},
+\textbackslash ceil{*}\{\}}
+\item \texttt{!, !! }(prepended argument)
+\end{enumerate}
+\item binary functions 
+\begin{enumerate}
+\item \texttt{\textbackslash tfrac\{\}\{\}, \textbackslash frac\{\}\{\},
+\textbackslash dfrac\{\}\{\}}
+\item \texttt{\textbackslash tbinom\{\}\{\}, \textbackslash binom\{\}\{\},
+\textbackslash dbinom\{\}\{\}}
+\item \texttt{\textbackslash sqrt{[}{]}\{\}}
+\end{enumerate}
+\item $n$-ary functions
+\begin{enumerate}
+\item \texttt{\textbackslash min, \textbackslash max, \textbackslash gcd}
+\end{enumerate}
+\item sum, prod
+\begin{enumerate}
+\item \texttt{\textbackslash sum\_\{\}\textasciicircum , \textbackslash prod\_\{\}\textasciicircum{} }
+\end{enumerate}
+\item formatting commands
+\begin{enumerate}
+\item \texttt{,} (comma, in $n$-ary functions)
+\item \texttt{\{\}, \textbackslash\textbackslash , \&, \textbackslash to}
+\item \texttt{\textbackslash begin\{\}, \textbackslash end\{\}, \$, \textbackslash{[},
+\textbackslash{]}}
+\item \texttt{\textbackslash dots, \textbackslash ldots, \textbackslash cdots}
+\item \texttt{\textbackslash{} , \textbackslash ,{}, \textbackslash ;,
+\textbackslash :, \textbackslash !, \textbackslash >}
+\item \texttt{\textbackslash thinspace, \textbackslash medspace, \textbackslash thickspace,}
+\item \textbackslash\texttt{negthinspace, \textbackslash negmedspace,
+\textbackslash negthickspace,}
+\item \textbackslash\texttt{hspace{*}\{\}, \textbackslash mspace\{\},}
+\item \texttt{\textbackslash quad, \textbackslash qquad , \textbackslash hfill,
+\textbackslash hfil}
+\item \texttt{\textbackslash phantom\{\}, \textbackslash vphantom\{\},
+\textbackslash hphantom\{\}}
+\item \texttt{\textbackslash xmathstrut{[}{]}\{\}} \texttt{, \textbackslash splitfrac\{\}\{\},
+\textbackslash splitdfrac\{\}\{\} }(from \texttt{mathtools}), \texttt{\textbackslash mathstrut}
+\item \texttt{\textbackslash displaystyle, \textbackslash textstyle, \textbackslash scriptstyle,
+\textbackslash scriptscriptstyle}
+\item \texttt{\textbackslash label\{\}, \textbackslash ensuremath\{\},
+\textbackslash text\{\}, \textbackslash mbox\{\}, \textbackslash smash\{\}}
+\item \texttt{\textbackslash color{[}{]}\{\}, \textbackslash textcolor{[}{]}\{\}\{\}}
+\end{enumerate}
+\item font commands
+\begin{enumerate}
+\item \texttt{\textbackslash mathrm\{\}, \textbackslash mathit\{\}, \textbackslash mathcal\{\},
+\textbackslash mathtt\{\}, \textbackslash mathbf\{\}, \textbackslash mathbb\{\},
+\textbackslash mathsf\{\}, \textbackslash mathfrak\{\}, \textbackslash mathscr\{\}}
+\item \texttt{\textbackslash mathnormal\{\}, \textbackslash boldsymbol\{\}}
+\item \texttt{\textbackslash textrm, \textbackslash textsf, \textbackslash texttt}
+\end{enumerate}
+\end{enumerate}
+
+\section{Settings}
+
+\subsection{Available \texttt{\textbackslash nmcEvaluate} settings}
+\begin{center}
+\begin{tabular}[t]{>{\raggedright}p{1.5cm}l>{\raggedright}m{4cm}>{\raggedright}m{4cm}}
+\toprule 
+{\small key} & {\small type} & {\small meaning} & {\small default}\tabularnewline
+\midrule
+{\small\texttt{dbg}} & {\small int} & {\small debug `magic' integer} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{view}}  &  & {\small equivalent to }{\small\texttt{dbg=1}} & \tabularnewline
+{\small\texttt{\textasciicircum}} & {\small char} & {\small exponent mark for sci. notation input} & {\small\texttt{e}}\tabularnewline
+{\small\texttt{xx}} & {\small int (0/1)} & {\small multi-token variable switch} & {\small\texttt{1}}\tabularnewline
+{\small\texttt{()}} & {\small int (0/1/2)} & {\small trig. function arg. parsing} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{o}} & {\small int (0/1)} & {\small degree switch for trig. funcions} & {\small\texttt{1}}\tabularnewline
+{\small\texttt{log}} & {\small num} & {\small base of logarithms for }{\small{\small\verb`\log`}} & {\small\texttt{10}}\tabularnewline
+{\small\texttt{vv@}} & {\small int (0/1)} & {\small vv-list calculation mode} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{vvmode}} & {\small int (0/1)} & {\small equivalent to }{\small\texttt{vv@}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{vvd}} & {\small token(s)} & {\small vv-list display-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 12mu plus 6mu minus 9mu(vv)}}\tabularnewline
+{\small\texttt{vvi}} & {\small token(s)} & {\small vv-list text-style spec.} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
+{*} &  & {\small switch to suppress equation numbering (if }{\small\texttt{\textbackslash\textbackslash}}{\small{}
+in }{\small\texttt{vvd}}{\small )} & \tabularnewline
+{\small\texttt{p}} & char(s) & {\small punctuation (esp. in display-style)} & {\small\texttt{,}}\tabularnewline
+{\small\texttt{S+}} & {\small int} & {\small extra rounding for stopping criterion, sums} & {\small\texttt{2}}\tabularnewline
+{\small\texttt{S?}} & {\small$\text{int}\ge0$} & {\small query stopping with these final terms, sums} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{P+}} & {\small int} & {\small extra rounding for stopping criterion, products} & {\small\texttt{2}}\tabularnewline
+{\small\texttt{P?}} & {\small$\text{int}\ge0$} & {\small query stopping with these final terms, products} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{reuse}} & {\small int} & {\small form of result saved with }{\small{\small\verb`\nmcReuse`}} & {\small\texttt{0}}\tabularnewline
+\bottomrule
+\end{tabular}
+\par\end{center}
+
+\subsection{Available settings for supplementary commands}
+
+All settings for \verb`\nmcEvaluate`, the \verb`view` setting in
+particular (although most will be irrelevant), plus for
+\begin{itemize}
+\item \verb`\nmcMacros`
+\begin{itemize}
+\item \verb`free` `deregister' a macro from \verb`numerica`
+\end{itemize}
+\item \verb`\nmcConstants`
+\begin{itemize}
+\item \verb`add` add the new list of constants to the current one
+\end{itemize}
+\item \verb`\nmcReuse`
+\begin{itemize}
+\item \verb`delete` remove the listed control sequences from the \verb`.nmc`
+file
+\item \verb`renew` change the value of a control sequence in the \verb`.nmc`
+file
+\end{itemize}
+\end{itemize}
+
+\subsection{Available configuration file settings}
+\begin{center}
+\bigskip{}
+\begin{tabular}{ll}
+\toprule 
+key & default\tabularnewline
+\midrule
+{\small\texttt{rounding}} & {\small\texttt{6}}\tabularnewline
+{\small\texttt{pad}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{output-sci-notation}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{output-exponent-char}} & {\small\texttt{e}}\tabularnewline
+{\small\texttt{input-sci-notation}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{input-exponent-char}} & {\small\texttt{e}}\tabularnewline
+{\small\texttt{multitoken-variables}} & {\small\texttt{1}}\tabularnewline
+{\small\texttt{use-degrees}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{logarithm-base}} & {\small\texttt{10}}\tabularnewline
+{\small\texttt{intify-rounding}} & {\small\texttt{14}}\tabularnewline
+{\small\texttt{vv-display}} & {\small\texttt{\{,\}\textbackslash mskip 36mu minus 24mu(vv)}}\tabularnewline
+{\small\texttt{vv-inline}} & {\small\texttt{\{,\}\textbackslash mskip 12mu  6mu minus 9mu(vv)}}\tabularnewline
+{\small\texttt{sum-extra-rounding}} & {\small\texttt{2}}\tabularnewline
+{\small\texttt{sum-query-terms}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{prod-extra-rounding}} & {\small\texttt{2}}\tabularnewline
+{\small\texttt{prod-query-terms}} & {\small\texttt{0}}\tabularnewline
+{\small\texttt{eval-reuse}} & {\small\texttt{0}}\tabularnewline
+\bottomrule
+\end{tabular} 
+\par\end{center}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/numerica/numerica.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/tex/latex/numerica/numerica-lyx.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/numerica/numerica-lyx.def	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/tex/latex/numerica/numerica-lyx.def	2021-12-12 22:29:10 UTC (rev 61283)
@@ -1,44 +0,0 @@
-% This is file `numerica-lyx.def',
-% part of the `numerica' package
-%
-% This work may be distributed and/or modified under the conditions
-% of the LaTeX Project Public License, either version 1.3c of this 
-% license or any later version; see
-% http://www.latex-project.org/lppl.txt
-%
-% Andrew Parsloe (ajparsloe at gmail.com)
-%
-\ProvidesExplFile
-  {numerica-lyx.def}
-  {2021/02/15}
-  {1.0.0}
-  { Enable reuse command to preview in LyX }
-%----------------------------------------------------------
-% copy (only once) .nmc file from doc to temp 
-% directory; use nmcDummy.txt to mark success
-\tl_set:NV \l_tmpb_tl \jobname
-\tl_put_right:Nn \l_tmpb_tl {.nmc}
-\file_if_exist:nTF { nmcDummy.txt }
-  { \tl_gset_eq:NN \g__nmc_reuse_filename_tl \l_tmpb_tl }
-  {
-    \iow_open:Nn \g__nmc_iow { nmcDummy.txt }
-    \iow_close:N \g__nmc_iow
-    \makeatletter
-      \tl_set:Nx \l_tmpa_tl \input at path
-    \makeatother
-    \exp_last_unbraced:NNV
-        \tl_gset:Nn \g__nmc_reuse_filename_tl \l_tmpa_tl
-    \tl_gput_right:NV  \g__nmc_reuse_filename_tl \l_tmpb_tl
-    \file_get:VnNTF \g__nmc_reuse_filename_tl {} \l__nmc_reuse_retrieved_tl
-      { 
-        \tl_gset_eq:NN \g__nmc_reuse_filename_tl \l_tmpb_tl
-        \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
-        \bool_lazy_or:nnF 
-            { \tl_if_blank_p:V \l__nmc_reuse_retrieved_tl }
-            { \tl_if_head_eq_meaning_p:VN \l__nmc_reuse_retrieved_tl \par }
-          { \iow_now:NV \g__nmc_iow \l__nmc_reuse_retrieved_tl }
-        \iow_close:N \g__nmc_iow
-      }
-      { \tl_gset_eq:NN \g__nmc_reuse_filename_tl \l_tmpb_tl }
-  }
-% end of `numerica-lyx.def'
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/tex/latex/numerica/numerica-plus.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/numerica/numerica-plus.def	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/tex/latex/numerica/numerica-plus.def	2021-12-12 22:29:10 UTC (rev 61283)
@@ -1,876 +0,0 @@
-% This is file `numerica-plus.def',
-% part of the `numerica' package.
-%
-% This work may be distributed and/or modified under the conditions
-% of the LaTeX Project Public License, either version 1.3c of this 
-% license or any later version; see
-% http://www.latex-project.org/lppl.txt
-%
-% Andrew Parsloe (ajparsloe at gmail.com)
-% 
-\ProvidesExplFile
-  {numerica-plus.def}
-  {2021/02/15}
-  {1.0.0}
-  { Iterate functions, find fixed points, zeros, extrema and recurrence terms }
-%----------------------------------------------------------
-\cs_new_protected:Npn \__nmc_plus_reuse:nNN #1#2#3
-  {
-    \int_case:nnF { #1 }
-      { 
-        { 1 }
-          {
-            \seq_pop:NN #2 \l_tmpa_tl
-            \seq_pop:NN #3 \l_tmpb_tl
-            \tl_gset:Nx \g__nmc_reuse_tl { { \l_tmpa_tl , \l_tmpb_tl } }
-            \seq_mapthread_function:NNN #2 #3 \__nmc_plus_reuse_display:nn
-          }
-        { 2 }
-          { 
-            \tl_gset:Nx \g__nmc_reuse_tl 
-                { \seq_use:Nn #3 { , } } 
-          }
-      }
-      { \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl }
-  }
-\cs_new_protected:Npn \__nmc_plus_reuse_display:nn #1#2
-  { \tl_gput_right:Nx \g__nmc_reuse_tl { , { #1 , #2 } } }
-%--------------------------------------
-% \nmcIterate
-\int_new:N \l__nmc_iter_total_int
-\int_new:N \l__nmc_iter_view_int
-\int_new:N \l__nmc_iter_round_int
-\tl_new:N  \l__nmc_iter_var_tl
-\fp_new:N  \l__nmc_iter_first_fp
-\seq_new:N \l__nmc_iter_result_seq
-\seq_new:N \l__nmc_iter_index_seq
-
-\fp_new:N \l__nmc_iter_fixedpti_fp
-\fp_new:N \l__nmc_iter_fixedptii_fp
-
-\tl_new:N \l__nmc_iter_begin_tl
-\tl_new:N \l__nmc_iter_end_tl
-\tl_new:N \g__nmc_iter_info_tl
-
-\nmc_define:nnN { \nmcIterate } { iter } \iter
-
-\cs_new_protected:Npn \__nmc_iter_settings_digest:
-  {
-    \bool_set_false:N \l__nmc_allow_TF_out_bool
-    \int_set:Nn \l__nmc_iter_total_int 
-        { \int_max:nn { \l__nmc_iter_total_int } { 1 } }
-    \int_set:Nn \l__nmc_iter_view_int 
-        { \int_min:nn { \int_max:nn { \l__nmc_iter_view_int } 
-            { 1 } } { \l__nmc_iter_total_int } }
-  }
-\cs_new_protected:Npn \__nmc_iter_vv_digest:N #1
-  {
-    \tl_if_empty:NTF \l__nmc_iter_var_tl
-      { \__nmc_vv_digest:N #1 }
-      { 
-        \clist_push:NV \l__nmc_formula_tl \l__nmc_iter_var_tl
-        \__nmc_vv_digest:N #1
-        \clist_pop:NN \l__nmc_formula_tl \l__nmc_iter_var_tl
-      }
-  }
-\cs_new_protected:Npn \__nmc_iter_process:
-  { 
-    \int_set:Nn \l__nmc_iter_round_int 
-        { \l__nmc_round_int + \l__nmc_iter_extra_int }
-    % first iterate
-    \__nmc_error_where:n { formula }
-    \tl_clear:N \l__nmc_fp_expr_tl
-    \__nmc_fpify:VN \l__nmc_formula_tl \l__nmc_fp_expr_tl
-    \fp_set:Nn \l__nmc_result_fp { \l__nmc_fp_expr_tl }
-    \__nmc_error_fpflag:
-
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \fp_set_eq:NN \l__nmc_iter_first_fp \l__nmc_result_fp
-        \tl_if_empty:NT \l__nmc_iter_var_tl
-          { % get iter. var if unspecified
-            \seq_get:NN \l__nmc_vv_all_seq \l_tmpa_tl
-            \__nmc_vv_split_item:V \l_tmpa_tl
-            \tl_set_eq:NN \l__nmc_iter_var_tl \l__nmc_eq_var_tl
-          }
-        \__nmc_iter_do:
-        \tl_set_eq:NN \l__nmc_fp_expr_tl \l__nmc_fp_exprn_tl
-      }
-    \bool_if:nF { \g__nmc_error_bool || \l__nmc_num_only_bool }
-      { 
-        \__nmc_iter_environ:
-        \__nmc_iter_write:
-      }
-  }
-%--------------------------------------
-\cs_new_protected:Npn \__nmc_iter_do:
-  { 
-    \bool_if:NTF \l__nmc_num_only_bool
-      { 
-        \__nmc_iter_fixed_pt:
-        \bool_if:NF \g__nmc_error_bool
-          { 
-            \__nmc_num_format:nNnN { \l__nmc_iter_fixedpti_fp }
-                \l_nmc_result_tl { \l__nmc_round_int } 
-                    \l__nmc_sci_num_out_bool
-            \int_decr:N \l__nmc_iter_total_int
-            \tl_gset:Nx \g__nmc_iter_info_tl 
-              { \int_use:N \l__nmc_iter_total_int }
-          }
-      }
-      { % don't print initial iterations
-        \int_step_function:nnnN { 1 } { 1 }
-            { \l__nmc_iter_total_int - \l__nmc_iter_view_int - 1 }
-                \__nmc_iter_current:n
-        \bool_if:NF \g__nmc_error_bool
-          { % store then print these ones
-            \seq_clear:N \l__nmc_iter_result_seq
-            \int_step_function:nnnN { 1 } { 1 } 
-              { \int_min:nn { \l__nmc_iter_view_int } 
-                  { \l__nmc_iter_total_int - 1 } } \__nmc_iter_current_store:n
-          }
-      }
-  }
-\cs_new_protected:Npn \__nmc_iter_current:n #1
-  { % stepping function
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \__nmc_calc_fn_val:VNnN \l__nmc_iter_var_tl \l__nmc_formula_tl
-            { \l__nmc_result_fp } \l__nmc_result_fp
-      }
-  }
-\cs_new_protected:Npn \__nmc_iter_current_store:n #1
-  { % stepping function
-    \__nmc_calc_fn_val:VNnN \l__nmc_iter_var_tl \l__nmc_formula_tl 
-        { \l__nmc_result_fp } \l__nmc_result_fp
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \__nmc_num_format:nNnN { \l__nmc_result_fp } \l_nmc_result_tl
-             { \l__nmc_round_int } \l__nmc_sci_num_out_bool 
-        \seq_put_right:NV \l__nmc_iter_result_seq \l_nmc_result_tl
-        \int_set:Nn \l_tmpa_int
-            { \l__nmc_iter_total_int - \l__nmc_iter_view_int + #1 }
-        \seq_put_right:Nx \l__nmc_iter_index_seq { \int_use:N \l_tmpa_int }
-      }
-  }
-\cs_new_protected:Npn \__nmc_iter_fixed_pt:
-  { % already 1 iteration
-    \int_set:Nn \l__nmc_iter_total_int { 1 }
-    \fp_set_eq:NN \l__nmc_iter_fixedpti_fp \l__nmc_iter_first_fp
-    \fp_set:Nn \l__nmc_iter_fixedptii_fp { \l__nmc_iter_fixedpti_fp + 1 }
-    \bool_until_do:nn
-        { 
-          \fp_compare_p:nNn { 0 } = 
-              { round( \l__nmc_iter_fixedpti_fp - \l__nmc_iter_fixedptii_fp,
-                  \l__nmc_iter_round_int ) }
-          || \g__nmc_error_bool
-        }
-      {
-        \int_incr:N \l__nmc_iter_total_int
-        \fp_set_eq:NN \l__nmc_iter_fixedptii_fp \l__nmc_iter_fixedpti_fp
-        \__nmc_calc_fn_val:VNnN \l__nmc_iter_var_tl \l__nmc_formula_tl
-            { \l__nmc_result_fp } \l__nmc_result_fp
-        \fp_set_eq:NN \l__nmc_iter_fixedpti_fp \l__nmc_result_fp
-        \int_compare:nNnF { \l__nmc_iter_total_int } < 
-              { \l__nmc_iter_max_int }
-          {
-            \bool_gset_true:N \g__nmc_error_bool
-            \__nmc_error_what:n 
-                { 
-                  No~fixed~point~attained~after~$\int_use:N 
-                  \l__nmc_iter_total_int$~iterations~of 
-                }
-          }
-      }
-  }
-\cs_new_protected:Npn \__nmc_iter_environ:
-  {
-    \tl_set:Nx \l__nmc_iter_begin_tl 
-        { 
-          \mode_if_math:F { \exp_not:o \l__nmc_math_delimi_tl } 
-          \exp_not:N \begin{array}{r@{}l} 
-          \bool_if:NTF \l__nmc_wraps_math_bool
-            { \exp_not:o \l__nmc_formula_dup_tl &{}= }
-            { &{} }
-        }
-    \tl_set:Nx \l__nmc_iter_end_tl 
-        { 
-          \exp_not:N \end{array}
-          \mode_if_math:F { \exp_not:o \l__nmc_math_delimii_tl } 
-        }
-  }
-\cs_new_protected:Npn \__nmc_iter_write:
-  { 
-    \__nmc_num_format:nNnN { \l__nmc_iter_first_fp } \l_tmpa_tl
-         { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \tl_gset:Nx \g__nmc_iter_info_tl { \int_use:N \l__nmc_iter_total_int }
-    \__nmc_if_mod_zero:nnTF { \l__nmc_debug_int } { 7 }
-      { \seq_get_right:NN \l__nmc_iter_result_seq \l_nmc_result_tl }
-      {
-        \tl_set:Nx \l_nmc_result_tl 
-          {
-            \exp_not:o \l__nmc_iter_begin_tl
-            \l_tmpa_tl \l__nmc_vv_display_tl
-            \int_compare:nNnT 
-                { \l__nmc_iter_total_int } > { \l__nmc_iter_view_int + 1 }
-              {
-                \\ & \exp_not:N \ldots
-                \ \exp_not:N\mbox{final\ 
-                \int_use:N \l__nmc_iter_view_int\ of\ \g__nmc_iter_info_tl :}
-              }
-            \int_compare:nNnT { \l__nmc_iter_total_int } > { 1 }
-              { \\ & \exp_not:N \hookrightarrow }
-            \seq_use:Nn \l__nmc_iter_result_seq { \\ & \hookrightarrow } 
-            \exp_not:o \l__nmc_iter_end_tl
-          }
-        }
-  }
-\cs_new_protected:Npn \__nmc_iter_display:
-  { 
-    \bool_if:NTF \l__nmc_num_only_bool
-      { \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl }
-      {
-        \__nmc_plus_reuse:nNN { \l__nmc_iter_reuse_int }
-            \l__nmc_iter_index_seq \l__nmc_iter_result_seq
-      }
-    \l_nmc_result_tl
-  }
-%--------------------------------------
-%\nmcSolve
-\int_new:N \l__nmc_solve_round_int
-\int_new:N \l__nmc_solve_steps_int
-\int_new:N \l__nmc_solve_slope_int
-\int_new:N \l__nmc_solve_slopei_int 
-\int_new:N \l__nmc_solve_signs_int
-\fp_new:N \l__nmc_solvea_fp
-\fp_new:N \l__nmc_solveb_fp
-\fp_new:N \l__nmc_solvec_fp
-\fp_new:N \l__nmc_solved_fp
-
-\fp_new:N \l__nmc_solvefa_fp
-\fp_new:N \l__nmc_solvefb_fp
-\fp_new:N \l__nmc_solvefc_fp
-\bool_new:N \l__nmc_solve_stop_bool
-\tl_new:N \g__nmc_sove_info_tl
-
-\nmc_define:nnN { \nmcSolve } { solve } \solve
-
-\cs_new_protected:Npn \__nmc_solve_settings_digest: 
-  {
-    \bool_set_false:N \l__nmc_allow_TF_out_bool
-    \tl_if_empty:NF \l__nmc_solve_step_tl
-      { 
-        \__nmc_fpify_set:NN \l__nmc_solve_step_fp \l__nmc_solve_step_tl 
-        \fp_compare:nNnT \l__nmc_solve_step_fp = { 0 }
-          { \__nmc_error_what:n { Non-zero~initial~step~required~in } }
-      } 
-  }
-\cs_new_protected:Npn \__nmc_solve_vv_digest:N #1
-  {
-    \tl_if_empty:NTF \l__nmc_solve_var_tl
-      { \__nmc_vv_digest:N #1 }
-      { 
-        \clist_push:NV \l__nmc_formula_tl \l__nmc_solve_var_tl
-        \__nmc_vv_digest:N #1
-        \clist_pop:NN \l__nmc_formula_tl \l__nmc_solve_var_tl
-      }
-  }
-\cs_new_protected:Npn \__nmc_solve_process:
-  { 
-    \int_set:Nn \l__nmc_solve_round_int 
-        { \l__nmc_round_int + \l__nmc_solve_extra_int }
-    % get equation var if unspecified
-    \tl_if_empty:NT \l__nmc_solve_var_tl
-      { 
-        \seq_get:NN \l__nmc_vv_all_seq \l_tmpa_tl
-        \__nmc_vv_split_item:V \l_tmpa_tl
-        \tl_set_eq:NN \l__nmc_solve_var_tl \l__nmc_eq_var_tl
-      }
-    \bool_if:NF \g__nmc_error_bool
-      { \__nmc_solve_get_trial_vals: }
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \__nmc_error_where:n { function }
-        \__nmc_solve_do:
-      }
-    \bool_if:NF \g__nmc_error_bool
-      { 
-        \__nmc_num_format:nNnN { \l__nmc_solvea_fp } \l_nmc_result_tl
-            { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-        \tl_gset:Nx \g__nmc_solve_info_tl 
-          { \clist_use:Nn \g__nmc_solve_info_tl { + } }
-        \tl_set_eq:NN \l__nmc_fp_expr_tl \l__nmc_fp_exprn_tl
-      }
-  }
-\cs_new_protected:Npn \__nmc_solve_get_trial_vals:
-  {
-    \prop_get:NVN \g__nmc_subst_var_prop 
-        \l__nmc_solve_var_tl \l__nmc_subst_tl
-    % ensure a < b
-    \int_case:nn { \fp_sign:n { \l__nmc_solve_step_fp } }
-      { 
-        { 1 } 
-          { 
-            \fp_set:Nn \l__nmc_solvea_fp { \l__nmc_subst_tl }
-            \fp_set:Nn \l__nmc_solveb_fp 
-                  { \l__nmc_solvea_fp + \l__nmc_solve_step_fp }
-          }
-        { -1 } 
-          { 
-            \fp_set:Nn \l__nmc_solveb_fp { \l__nmc_subst_tl }
-            \fp_set:Nn \l__nmc_solvea_fp 
-                  { \l__nmc_solveb_fp + \l__nmc_solve_step_fp }
-          }
-      }
-  }
-% find opp. signs, zero, or fn min.
-% a b = var vals; fa fb = fn vals
-\cs_new_protected:Npn \__nmc_solve_do:
-  { 
-    \__nmc_solve_calc_values:
-    \int_zero:N \l__nmc_solve_steps_int
-    \tl_gclear:N \g__nmc_solve_info_tl
-    \bool_do_until:nn 
-        {
-          \g__nmc_error_bool || \l__nmc_solve_stop_bool
-          || \int_compare_p:nNn 
-              { \l__nmc_solve_steps_int } > { \l__nmc_solve_max_int } 
-          || \fp_compare_p:nNn { 0 } = 
-                  { round(\l__nmc_solveb_fp - \l__nmc_solvea_fp, 
-                      \l__nmc_solve_round_int) }
-        }
-      {
-        \int_incr:N \l__nmc_solve_steps_int
-        \int_case:nn { \l__nmc_solve_signs_int }
-          {
-            { 0 }  { \__nmc_solve_do_bingo: }
-            { -1 } { \__nmc_solve_do_bisect: }
-            { 1 }  { \__nmc_solve_do_slope: }
-          }
-      }
-    \bool_if:nF { \g__nmc_error_bool || \l__nmc_solve_stop_bool }
-      {
-        \__nmc_error_where:n { $\l__nmc_formula_tl$ }
-        \__nmc_error_what:n 
-            { 
-              No~zero/extremum~found~after~$\int_use:N 
-              \l__nmc_solve_max_int$~steps~for~function 
-            }
-      } 
-  }
-\cs_new_protected:Npn \__nmc_solve_do_bingo:
-  { % fn = 0 to 16 figures
-    \fp_compare:nNnTF { \l__nmc_solvefb_fp } = { 0 }
-      { 
-        \fp_set_eq:NN \l__nmc_solvea_fp \l__nmc_solveb_fp
-        \fp_set_eq:NN \l__nmc_solvefa_fp \l__nmc_solvefb_fp
-      }
-      {
-        \fp_set_eq:NN \l__nmc_solveb_fp \l__nmc_solvea_fp
-        \fp_set_eq:NN \l__nmc_solvefb_fp \l__nmc_solvefa_fp
-      }
-    \bool_set_true:N \l__nmc_solve_stop_bool
-  }
-\cs_new_protected:Npn \__nmc_solve_do_bisect:
-  { 
-    \tl_gset:Nx \g__nmc_solve_info_tl { \int_use:N \l__nmc_solve_steps_int }
-    \int_zero:N \l__nmc_solve_steps_int
-    \fp_set:Nn \l__nmc_solvec_fp { ( \l__nmc_solvea_fp + \l__nmc_solveb_fp ) / 2 }
-    \__nmc_calc_fn_val:VNnN \l__nmc_solve_var_tl \l__nmc_formula_tl 
-        { \l__nmc_solvec_fp } \l__nmc_solvefc_fp 
-    \fp_set:Nn \l__nmc_solved_fp { \l__nmc_solvec_fp + 1 }
-    \bool_until_do:nn
-        { 
-          \g__nmc_error_bool ||
-          \fp_compare_p:nNn { 0 } =
-              { round( \l__nmc_solvec_fp - \l__nmc_solved_fp ,
-                  \l__nmc_solve_round_int ) }
-        }
-      { 
-        \int_incr:N \l__nmc_solve_steps_int
-        \fp_set_eq:NN \l__nmc_solved_fp \l__nmc_solvec_fp
-        \fp_compare:nNnTF { 0 } = { \l__nmc_solvefc_fp }
-          { 
-            \fp_set_eq:NN \l__nmc_solvea_fp \l__nmc_solvec_fp 
-            \fp_set_eq:NN \l__nmc_solvefa_fp \l__nmc_solvefc_fp
-          }
-          {
-            \fp_compare:nNnTF 
-                { sign(\l__nmc_solvefa_fp)sign(\l__nmc_solvefc_fp) } = { 1 }
-              { 
-                \fp_set_eq:NN \l__nmc_solvea_fp \l__nmc_solvec_fp 
-                \fp_set_eq:NN \l__nmc_solvefa_fp \l__nmc_solvefc_fp
-              }
-              { 
-                \fp_set_eq:NN \l__nmc_solveb_fp \l__nmc_solvec_fp 
-                \fp_set_eq:NN \l__nmc_solvefb_fp \l__nmc_solvefc_fp
-              }
-            \fp_set:Nn \l__nmc_solvec_fp 
-                { ( \l__nmc_solvea_fp + \l__nmc_solveb_fp ) / 2 }
-            \__nmc_calc_fn_val:VNnN \l__nmc_solve_var_tl 
-                \l__nmc_formula_tl { \l__nmc_solvec_fp } \l__nmc_solvefc_fp 
-          }
-      }
-    \bool_set_true:N \l__nmc_solve_stop_bool
-    \clist_gput_right:Nx \g__nmc_solve_info_tl { \int_use:N \l__nmc_solve_steps_int }
-  }
-\cs_new_protected:Npn \__nmc_solve_do_slope:
-  {
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \int_if_zero:nTF { \l__nmc_solve_slope_int }
-          { % contract
-            \fp_add:Nn \l__nmc_solvea_fp 
-                { ( \l__nmc_solveb_fp - \l__nmc_solvea_fp ) / 4 }
-            \fp_sub:Nn \l__nmc_solveb_fp 
-                { ( \l__nmc_solveb_fp - \l__nmc_solvea_fp ) / 4 }
-          }
-          { % always towards x-axis
-            \fp_compare:nNnTF { 0 } <
-                { \l__nmc_solvefa_fp * \l__nmc_solve_slope_int }
-              { \__nmc_solve_do_slope_left: }
-              { \__nmc_solve_do_slope_right: }
-          }
-        \fp_set_eq:NN \l__nmc_solved_fp \l__nmc_solvea_fp
-        \int_set_eq:NN \l__nmc_solve_slopei_int \l__nmc_solve_slope_int
-        \__nmc_solve_calc_values:
-      }
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \int_compare:nNnF { \l__nmc_solve_slope_int } = 
-            { \l__nmc_solve_slopei_int }
-          { 
-            \fp_set:Nn \l__nmc_solvec_fp { ( \l__nmc_solvea_fp + \l__nmc_solveb_fp ) / 2 }
-            \int_case:nn { \l__nmc_solve_slopei_int }
-              {
-                { 1 }  { \fp_set_eq:NN \l__nmc_solvea_fp \l__nmc_solvec_fp }
-                { -1 } { \fp_set_eq:NN \l__nmc_solveb_fp \l__nmc_solvec_fp }
-              }
-            \__nmc_solve_calc_values:
-          }
-      }
-    \fp_compare:nNnT { 0 } = 
-        { round(\l__nmc_solveb_fp - \l__nmc_solvea_fp,
-            \l__nmc_solve_round_int) }
-      { \bool_set_true:N \l__nmc_solve_stop_bool }
-  }
-\cs_new_protected:Npn \__nmc_solve_do_slope_left:
-  {
-    \fp_set:Nn \l__nmc_solvec_fp { 2 \l__nmc_solvea_fp - \l__nmc_solveb_fp }
-    \fp_set_eq:NN \l__nmc_solveb_fp \l__nmc_solvea_fp
-    \fp_set_eq:NN \l__nmc_solvea_fp \l__nmc_solvec_fp
-  }
-\cs_new_protected:Npn \__nmc_solve_do_slope_right:
-  {
-    \fp_set:Nn \l__nmc_solvec_fp { 2 \l__nmc_solveb_fp - \l__nmc_solvea_fp }
-    \fp_set_eq:NN \l__nmc_solvea_fp \l__nmc_solveb_fp
-    \fp_set_eq:NN \l__nmc_solveb_fp \l__nmc_solvec_fp
-  }
-\cs_new_protected:Npn \__nmc_solve_calc_values:
-  {
-    \__nmc_calc_fn_val:VNnN \l__nmc_solve_var_tl \l__nmc_formula_tl 
-        { \l__nmc_solvea_fp } \l__nmc_solvefa_fp 
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \__nmc_calc_fn_val:VNnN \l__nmc_solve_var_tl \l__nmc_formula_tl 
-            { \l__nmc_solveb_fp } \l__nmc_solvefb_fp 
-      }
-    \bool_if:NF \g__nmc_error_bool
-      { 
-        \int_set:Nn \l__nmc_solve_slope_int 
-          { \fp_eval:n { sign(\l__nmc_solvefb_fp - \l__nmc_solvefa_fp) } }
-        \int_set:Nn \l__nmc_solve_signs_int 
-          { \fp_eval:n { sign(\l__nmc_solvefa_fp) sign(\l__nmc_solvefb_fp) } }
-      }
-  }
-\cs_new_protected:Npn \__nmc_solve_display:
-  { 
-    \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl
-    \bool_if:NF \l__nmc_num_only_bool
-      { 
-        \__nmc_num_format:nNnN { \l__nmc_solvefa_fp } \l_tmpa_tl
-             { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-        \tl_set:Nx \l_nmc_result_tl
-            { 
-              \exp_not:o \l__nmc_math_delimi_tl
-              \bool_if:NTF \l__nmc_wraps_math_bool
-                { 
-                  \exp_not:o \l__nmc_formula_tl = \l_tmpa_tl
-                  \bool_if:NTF \l__nmc_vv_multline_bool
-                    { \exp_not:o \l__nmc_vv_display_tl }
-                    { 
-                     \mathchoice{ \exp_not:o \l__nmc_vv_display_tl }
-                          { \exp_not:o \l__nmc_vv_inline_tl }{}{} 
-                    }
-                  \rightarrow \exp_not:N \quad 
-                  \l__nmc_solve_var_tl = \l_nmc_result_tl
-                }
-                {                
-                  \l__nmc_solve_var_tl = \l_nmc_result_tl 
-                  \mathchoice{ \exp_not:o \l__nmc_vv_display_tl }
-                      { \exp_not:o \l__nmc_vv_inline_tl }{}{}
-                }
-              \l__nmc_punc_tl
-              \exp_not:o \l__nmc_math_delimii_tl
-            }
-        \int_if_zero:nT { \l__nmc_solve_reuse_int }
-          { \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl }
-      }
-    \l_nmc_result_tl
-  }
-%--------------------------------------
-% \nmcRecur
-\bool_new:N \l__nmc_recur_ellipsis_bool
-\int_new:N \l__nmc_recur_last_int
-\fp_new:N  \l__nmc_recur_result_fp
-
-\int_new:N \l__nmc_recur_subscr_ini_int
-\int_new:N \l__nmc_recur_subscr_val_int
-\int_new:N \l__nmc_recur_order_int
-\int_new:N \l__nmc_recur_var_int
-
-\tl_new:N \l__nmc_recurrence_tl
-\tl_new:N \l__nmc_recur_base_var_tl
-\tl_new:N \l__nmc_recur_subscr_var_tl
-
-\seq_new:N \l__nmc_recur_result_seq
-\seq_new:N \l__nmc_recur_index_seq
-\seq_new:N \l__nmc_recur_vars_seq
-
-\nmc_define:nnN { \nmcRecur } { recur } \recur
-
-\cs_new_protected:Npn \__nmc_recur_settings_digest:
-  { 
-    \bool_set_false:N \l__nmc_allow_TF_out_bool
-    \int_set:Nn \l__nmc_recur_total_int 
-        { \int_max:nn { \l__nmc_recur_total_int } { 1 } }
-    \int_set:Nn \l__nmc_recur_last_int
-        { \int_max:nn { 0 } { \int_min:nn
-             { \l__nmc_recur_last_int } { \l__nmc_recur_total_int } } }
-    \int_set:Nn \l__nmc_recur_first_int
-        { \int_max:nn { 0 } { \int_min:nn { \l__nmc_recur_first_int }
-             { \l__nmc_recur_total_int - \l__nmc_recur_last_int } } }
-    \int_if_zero:nT { \l__nmc_recur_first_int }
-      { \int_decr:N \l__nmc_recur_first_int }
-  }
-\cs_new_protected:Npn \__nmc_recur_vv_digest:N #1
-  { % #1 = reversed vv clist
-    \bool_set_true:N \l__nmc_multitok_bool
-    \__nmc_recur_elements:
-    \__nmc_recur_vars_change:N #1
-    \__nmc_vv_digest:N #1
-    \__nmc_recur_vv_post:
-    \tl_set_eq:NN \l__nmc_formula_tl \l__nmc_recurrence_tl
-  }
-% \l__nmc_recurrence_tl, \l__nmc_recur_base_var_tl,
-% \l__nmc_recur_subscr_var_tl, \l__nmc_recur_subscr_val_int
-\cs_new_protected:Npn \__nmc_recur_elements:
-  {
-    \tl_clear:N \l_tmpa_tl
-    \bool_set_false:N \l_tmpa_bool
-    \tl_map_inline:Nn \l__nmc_formula_tl
-      {
-        \bool_if:NTF \l_tmpa_bool
-          { 
-            \tl_set:Nn \l_tmpa_tl { ##1 } 
-            \tl_map_break:
-          }
-          {
-            \token_if_math_subscript:NTF ##1
-              { 
-                \tl_set:NV \l__nmc_recur_base_var_tl \l_tmpa_tl 
-                \bool_set_true:N \l_tmpa_bool
-              }
-              { \tl_put_right:Nn \l_tmpa_tl { ##1 } }
-          }
-      }
-    \__nmc_recur_parse_subscr:N \l_tmpa_tl
-    \exp_last_unbraced:NV\__nmc_split_eq:w \l__nmc_formula_tl \q_stop
-    \tl_set:NV \l__nmc_recurrence_tl \l__nmc_eq_val_tl
-     \tl_set_rescan:Nno \l__nmc_recurrence_tl { \ExplSyntaxOn } \l__nmc_recurrence_tl
-  }
-\cs_new_protected:Npn \__nmc_recur_parse_subscr:N #1
-  {
-    \tl_clear:N \l__nmc_recur_subscr_var_tl
-    \tl_set:Nn \l_tmpb_tl { 0 }
-    \int_zero:N \l__nmc_recur_subscr_val_int
-    \bool_set_false:N \l_tmpa_bool
-    \tl_map_inline:Nn #1
-      {
-        \bool_if:NTF \l_tmpa_bool
-          { \tl_put_right:Nn \l_tmpb_tl { ##1 } }
-          {
-            \tl_if_in:nnTF { +- } { ##1 }
-              { 
-                \tl_put_right:Nn \l_tmpb_tl { ##1 }
-                \bool_set_true:N \l_tmpa_bool
-              }
-              { \tl_put_right:Nn \l__nmc_recur_subscr_var_tl { ##1 } }
-          }
-      }
-    \int_set:Nn \l__nmc_recur_subscr_val_int { \l_tmpb_tl }
-  }
-\cs_new_protected:Npn \__nmc_recur_vars_change:N #1
-  { % f_{1} etc ==> f_{n-1} etc in #1 (reverse order vv-list)
-    \clist_reverse:N #1
-    \int_zero:N \l__nmc_recur_order_int
-    \clist_clear:N \l_tmpa_clist % --> \l__nmc_recur_vars_seq
-    \clist_clear:N \l_tmpb_clist % --> #1
-    \int_set:Nn \l_tmpb_int { \l__nmc_recur_subscr_val_int - 1 }
-    \tl_set_rescan:Nno #1 { \ExplSyntaxOn } #1 
-    \clist_map_inline:Nn #1
-      {
-        \seq_set_split:Nnn \l_tmpa_seq {_} { ##1 }
-        \seq_pop:NN \l_tmpa_seq \l_tmpa_tl
-        \seq_if_empty:NTF \l_tmpa_seq
-          { \clist_put_left:NV \l_tmpb_clist \l_tmpa_tl }
-          {
-            \tl_if_eq:NNTF \l_tmpa_tl \l__nmc_recur_base_var_tl
-              { % change e.g. f_{1}(x) to f_{n-1}(x)
-                \int_incr:N \l__nmc_recur_order_int
-                \tl_put_right:Nn \l_tmpa_tl { _ }
-                \tl_set_eq:NN \l_tmpb_tl \l__nmc_recur_subscr_var_tl
-                \int_case:nn { \int_sign:n { \l_tmpb_int } }
-                  { 
-                    { -1 } 
-                      { 
-                        \tl_put_right:Nx \l_tmpb_tl 
-                            { \int_use:N \l_tmpb_int }
-                      }
-                    { 0 } { \prg_do_nothing: }
-                    { 1 } 
-                      { 
-                        \tl_put_right:Nn \l_tmpb_tl { + }
-                        \tl_put_right:Nx \l_tmpb_tl 
-                            { \int_use:N \l_tmpb_int } 
-                      }
-                  }
-                \tl_put_right:Nx \l_tmpa_tl { { \l_tmpb_tl } }
-                \int_decr:N \l_tmpb_int
-                \seq_pop:NN \l_tmpa_seq \l_tmpb_tl
-                \int_set:Nn \l__nmc_recur_subscr_ini_int 
-                    { \tl_head:N \l_tmpb_tl }
-                \tl_put_right:Nx \l_tmpa_tl 
-                    { \tl_range:Nnn \l_tmpb_tl { 2 } { -1 } }
-                \clist_put_left:NV \l_tmpb_clist \l_tmpa_tl
-                \seq_set_split:NnV \l_tmpb_seq { = } \l_tmpa_tl
-                \seq_pop:NN \l_tmpb_seq \l_tmpa_tl
-                \clist_put_left:NV \l_tmpa_clist \l_tmpa_tl
-              }
-              { \clist_put_left:Nn \l_tmpb_clist { ##1 } }
-          }
-      }
-    \int_set:Nn \l__nmc_recur_var_int 
-        { \l__nmc_recur_subscr_ini_int + \l__nmc_recur_order_int
-            - \l__nmc_recur_subscr_val_int  }
-    \clist_set_eq:NN #1 \l_tmpb_clist
-    \clist_put_left:NV \l_tmpa_clist \l__nmc_recur_subscr_var_tl
-    \clist_concat:NNN \l__nmc_formula_tl \l__nmc_recurrence_tl \l_tmpa_clist
-  }
-\cs_new_protected:Npn \__nmc_recur_vv_post:
-  {
-    \clist_pop:NN \l__nmc_formula_tl \l__nmc_recurrence_tl
-    \clist_pop:NN \l__nmc_formula_tl \l__nmc_recur_subscr_var_tl
-    \tl_set:Nx \l_tmpa_tl { \int_use:N \l__nmc_recur_var_int }
-    \__nmc_vv_record:NVN \l__nmc_recur_subscr_var_tl \l_tmpa_tl \c_empty_prop
-    \tl_set_eq:NN \l_tmpa_tl \l__nmc_recur_subscr_var_tl
-    \tl_put_right:Nn \l_tmpa_tl { =0 } % formal value
-    \seq_put_left:NV \l__nmc_calc_fn_seq \l_tmpa_tl
-    \seq_set_from_clist:NN \l__nmc_recur_vars_seq \l__nmc_formula_tl
-  }
-%%%%%%%%%%%%%%%%%%%
-\cs_new_protected:Npn \__nmc_recur_process:
-  { % store initial vals; generate later vals
-    \__nmc_recur_store_ini:
-    \__nmc_error_where:n { recurrence~formula }
-    \__nmc_recur_generate:
-    \seq_get_right:NN \l__nmc_recur_result_seq \l_nmc_result_tl
-    \tl_set_eq:NN \l__nmc_fp_expr_tl \l__nmc_fp_exprn_tl
-  }
-\cs_new_protected:Npn \__nmc_recur_store_ini:
-  {
-    \seq_set_eq:NN \l_tmpa_seq \l__nmc_recur_vars_seq
-    \int_step_inline:nnnn { 1 } { 1 } { \l__nmc_recur_order_int } 
-      {
-        \seq_pop:NN \l_tmpa_seq \l_tmpa_tl
-        \prop_get:NVN \g__nmc_subst_var_prop \l_tmpa_tl \l__nmc_subst_tl
-        \__nmc_num_format:nNnN { \l__nmc_subst_tl } \l_tmpa_tl 
-            { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-        \seq_put_right:NV \l__nmc_recur_result_seq \l_tmpa_tl
-        \tl_set:Nx \l_tmpb_tl { \int_eval:n 
-            { \l__nmc_recur_subscr_ini_int + ##1 -1 } }
-        \seq_put_right:NV \l__nmc_recur_index_seq \l_tmpb_tl
-      }
-  }
-\cs_new_protected:Npn \__nmc_recur_generate:
-  {
-    \prop_get:NVN \g__nmc_subst_var_prop 
-        \l__nmc_recur_subscr_var_tl \l__nmc_subst_tl
-    \int_set:Nn \l__nmc_recur_var_int { \l__nmc_subst_tl }
-    \int_set:Nn \l_tmpa_int { \l__nmc_recur_var_int +
-        \l__nmc_recur_total_int - \l__nmc_recur_order_int - 1 }
-    \__nmc_error_where:n { recurrence~relation }
-    \__nmc_if_mod_zero:nnT { \l__nmc_debug_int } { 7 }
-      { \__nmc_fpify:VN \l__nmc_recurrence_tl \l__nmc_fp_expr_tl }
-    \int_step_function:nnnN { \l__nmc_recur_var_int } { 1 }
-         {\l_tmpa_int } \__nmc_recur_generate_loop:n
-  }
-\cs_new_protected:Npn \__nmc_recur_generate_loop:n #1
-  { 
-    \bool_if:NF \g__nmc_error_bool
-      { % calc. the next term
-        \fp_set:Nn \l_tmpa_fp { #1 }
-        \__nmc_calc_fn_val:VNnN \l__nmc_recur_subscr_var_tl
-            \l__nmc_recurrence_tl { \l_tmpa_fp } \l__nmc_recur_result_fp
-      }
-    \bool_if:NF \g__nmc_error_bool
-      { % store the result
-        \__nmc_num_format:nNnN { \l__nmc_recur_result_fp } 
-            \l_tmpa_tl { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-        \seq_put_right:NV \l__nmc_recur_result_seq \l_tmpa_tl
-        \seq_put_right:Nn \l__nmc_recur_index_seq { #1 }
-        % shift vals "down variable"; tmpa above, tmpb below
-        \seq_set_eq:NN \l_tmpa_seq \l__nmc_recur_vars_seq
-        \seq_pop:NN \l_tmpa_seq \l_tmpb_tl % low var
-        \int_step_inline:nnnn {2} { 1 } { \l__nmc_recur_order_int }
-          {
-            \seq_pop:NN \l_tmpa_seq \l_tmpa_tl % hi var
-            \prop_get:NVN \g__nmc_subst_var_prop \l_tmpa_tl \l__nmc_subst_tl
-            \prop_put:NVV \g__nmc_subst_var_prop \l_tmpb_tl \l__nmc_subst_tl
-            \prop_put:NVV \l__nmc_vv_change_prop \l_tmpb_tl \l__nmc_subst_tl
-            \tl_set_eq:NN \l_tmpb_tl \l_tmpa_tl
-          }
-          % use tmpb, not tmpa, in case order = 1
-          \prop_put:NVx \g__nmc_subst_var_prop \l_tmpb_tl
-              { \fp_use:N \l__nmc_recur_result_fp }
-          \prop_put:NVx \l__nmc_vv_change_prop \l_tmpb_tl
-              { \fp_use:N \l__nmc_recur_result_fp }
-      }
-  }
-\cs_new_protected:Npn \__nmc_recur_display:
-  { 
-    \bool_if:NTF \l__nmc_num_only_bool
-      { \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl }
-      { 
-        \seq_clear:N \l_tmpa_seq
-        \seq_clear:N \l_tmpb_seq
-        \seq_clear:N \l_tmpc_seq
-        \__nmc_recur_result:NN \l_tmpa_seq \l_tmpb_seq
-        \tl_set:Nx \l_nmc_result_tl
-            { 
-              \exp_not:o \l__nmc_math_delimi_tl
-              \bool_if:NT \l__nmc_wraps_math_bool
-                { 
-                  \exp_not:o \l__nmc_formula_dup_tl
-                  \bool_if:NTF \l__nmc_vv_multline_bool
-                    { \exp_not:o \l__nmc_vv_display_tl }
-                    { 
-                      \mathchoice{ \exp_not:o \l__nmc_vv_display_tl }
-                          { \exp_not:o \l__nmc_vv_inline_tl }{}{} 
-                    }
-                  \rightarrow \exp_not:N \quad 
-                } 
-              \seq_use:Nn \l_tmpa_seq { ,\ }
-              \l__nmc_punc_tl
-              \exp_not:o \l__nmc_math_delimii_tl
-            }
-        \__nmc_plus_reuse:nNN { \l__nmc_recur_reuse_int } \l_tmpc_seq \l_tmpb_seq 
-      }
-    \l_nmc_result_tl
-  }
-\cs_new_protected:Npn \__nmc_recur_result:NN #1#2
-  {
-    \int_zero:N \l_tmpa_int
-    \seq_map_inline:Nn \l__nmc_recur_result_seq
-      { 
-        \seq_pop:NN \l__nmc_recur_index_seq \l__nmc_toss_tl
-        \int_compare:nNnTF { \l_tmpa_int } < { \l__nmc_recur_first_int }
-          { \seq_put_right:Nn #1 { ##1 } }
-          {
-            \int_compare:nTF { \l_tmpa_int = \l__nmc_recur_first_int 
-                < \l__nmc_recur_total_int - \l__nmc_recur_last_int }
-              { \seq_put_right:Nn #1 { \ldots } }
-              {
-                \int_compare:nNnT { 1 + \l_tmpa_int } > 
-                    { \l__nmc_recur_total_int - \l__nmc_recur_last_int }
-                  { 
-                    \seq_put_right:Nn #1 { ##1 }
-                    \seq_put_right:Nn #2 { ##1 }
-                    \seq_put_right:Nx \l_tmpc_seq { \int_eval:n { \l_tmpa_int + \l__nmc_recur_subscr_val_int } }
-                  }
-              }
-          }
-        \int_incr:N \l_tmpa_int
-      }
-    \bool_if:NT \l__nmc_recur_ellipsis_bool
-      { \seq_put_right:Nn #1{ \ldots } }
-  }
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\keys_define:nn { numerica }
-  { 
-    iter-do             .int_set:N = \l__nmc_iter_total_int,
-    iter-see-last       .int_set:N = \l__nmc_iter_view_int,
-    iter-max-iterations .int_set:N = \l__nmc_iter_max_int,
-    iter-extra-rounding .int_set:N = \l__nmc_iter_extra_int,
-    iter-reuse          .int_set:N = \l__nmc_iter_reuse_int,
-
-    iter-do             .default:n = 5,
-    iter-see-last       .default:n = 4,
-    iter-max-iterations .default:n = 100,
-    iter-extra-rounding .default:n = 0,
-    iter-reuse          .default:n = 0,
-%
-    solve-max-steps      .int_set:N = \l__nmc_solve_max_int,
-    solve-extra-rounding .int_set:N = \l__nmc_solve_extra_int,
-    solve-first-step      .tl_set:N = \l__nmc_solve_step_tl,
-    solve-reuse          .int_set:N = \l__nmc_solve_reuse_int,
-
-    solve-max-steps      .default:n = 100,
-    solve-extra-rounding .default:n = 0,
-    solve-first-step     .default:n = 1,
-    solve-reuse          .default:n = 0,
-%
-    recur-do         .int_set:N = \l__nmc_recur_total_int,
-    recur-see-first  .int_set:N = \l__nmc_recur_first_int,
-    recur-see-last   .int_set:N = \l__nmc_recur_last_int,
-    recur-reuse      .int_set:N = \l__nmc_recur_reuse_int,
-    
-    recur-do         .default:n = 7,
-    recur-see-first  .default:n = 3,
-    recur-see-last   .default:n = 2,
-    recur-reuse      .default:n = 0
-  }
-\keys_set_known:nn { numerica } 
-  { 
-    iter-do,iter-see-last,iter-max-iterations,
-    iter-extra-rounding,iter-reuse,
-    solve-variable,solve-first-step,solve-max-steps,
-    solve-extra-rounding,solve-reuse,
-    recur-do,recur-see-first,recur-see-last,recur-reuse
-  }
-\keys_define:nn { numerica/iter }
-  {
-    var    .tl_set:N = \l__nmc_iter_var_tl,
-    +     .int_set:N = \l__nmc_iter_extra_int,
-    max   .int_set:N = \l__nmc_iter_max_int,
-    do    .int_set:N = \l__nmc_iter_total_int,
-    see   .int_set:N = \l__nmc_iter_view_int,
-    reuse .int_set:N = \l__nmc_iter_reuse_int
-  }
-\keys_define:nn { numerica/solve }
-  {
-    var    .tl_set:N = \l__nmc_solve_var_tl,
-    +     .int_set:N = \l__nmc_solve_extra_int,
-    max   .int_set:N = \l__nmc_solve_max_int,
-    dvar   .tl_set:N = \l__nmc_solve_step_tl,
-    reuse .int_set:N = \l__nmc_solve_reuse_int
-  }
-\keys_define:nn { numerica/recur }
-  {
-    do    .int_set:N = \l__nmc_recur_total_int,
-    see1  .int_set:N = \l__nmc_recur_first_int,
-    see2  .int_set:N = \l__nmc_recur_last_int,
-    ...      .code:n = \bool_set_true:N \l__nmc_recur_ellipsis_bool,
-    reuse .int_set:N = \l__nmc_recur_reuse_int
-  }
-% end of `numerica-plus.def'
\ No newline at end of file

Deleted: trunk/Master/texmf-dist/tex/latex/numerica/numerica-tables.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/numerica/numerica-tables.def	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/tex/latex/numerica/numerica-tables.def	2021-12-12 22:29:10 UTC (rev 61283)
@@ -1,1138 +0,0 @@
-% This is file `numerica-tables.def',
-% part of the `numerica' package.
-%
-% This work may be distributed and/or modified under the conditions
-% of the LaTeX Project Public License, either version 1.3c of this 
-% license or any later version; see
-% http://www.latex-project.org/lppl.txt
-%
-% Andrew Parsloe (ajparsloe at gmail.com)
-%
-\RequirePackage{booktabs}
-%
-\ProvidesExplFile
-  {numerica-tables.def}
-  {2021/02/15}
-  {1.0.0}
-  {Create tables of function values}
-%----------------------------------------------------------
-\cs_new_protected:Npn \__nmc_table_prepad:Nnn #1#2#3
-  { 
-    \tl_put_left:Nx #1 { \prg_replicate:nn 
-        { \int_max:nn { #2 - \tl_count:N #1 } { 0 } } { #3 } }
-  }
-\cs_new:Npn \__nmc_sci_num_table_plus:nn #1#2
-  { % #1 significand, #2 exponent
-    \fp_compare:nTF { #1 >= 0 }
-      { ( #2 )\,{ \__nmc_sci_num_table:n { #1 } } }
-      { ( #2 )\,{ #1 } }
-  }
-\cs_new:Npn \__nmc_sci_num_table:n #1
-  {  
-    \int_compare:nNnF { \l__nmc_num_sgn_int } < { 0 }
-      { 
-        \int_case:nn { \l__nmc_table_signs_int }
-          {
-            {-2 } { \exp_not:N \hphantom{-} }
-            {-1 } { \bool_if:NTF \l__nmc_table_signs_bool 
-                        { + }{ \exp_not:N \hphantom{-} } }
-            { 1 } { \bool_if:NT \l__nmc_table_signs_bool { + } }
-            { 2 } { + }
-          }
-      } 
-    #1
-  }
-%--------------------------------------
-\tl_new:N \l__nmc_x_tl 
-\seq_new:N \l_tmpd_seq
-\tl_const:Nn \c__nmc_r_tl { r }
-\tl_const:Nn \c__nmc_l_tl { l }
-\bool_new:N \l__nmc_table_clist_bool
-\clist_new:N \l__nmc_formula_clist
-\tl_new:N \l__nmc_table_valign_tl
-\seq_new:N \l_nmc_table_reuse_seq
-
-\tl_new:N \l__nmc_table_rvar_tl
-\tl_new:N \l__nmc_table_rvari_tl
-\tl_new:N \l__nmc_table_rstart_tl
-\tl_new:N \l__nmc_table_rstop_tl
-\tl_new:N \l__nmc_table_rstep_tl
-\fp_new:N \l__nmc_table_rstart_fp
-\fp_new:N \l__nmc_table_rstop_fp
-\fp_new:N \l__nmc_table_rstep_fp
-\fp_new:N \l__nmc_table_r_fp
-\fp_new:N \l__nmc_table_c_fp
-\int_new:N \l__nmc_table_rnum_int
-\clist_new:N \l__nmc_table_rspec_clist
-\bool_new:N \l__nmc_table_rspec_bool
-
-\tl_new:N \l__nmc_table_cvar_tl
-\tl_new:N \l__nmc_table_cstart_tl
-\tl_new:N \l__nmc_table_cstop_tl
-\tl_new:N \l__nmc_table_cstep_tl
-\fp_new:N \l__nmc_table_cstart_fp
-\fp_new:N \l__nmc_table_cstop_fp
-\fp_new:N \l__nmc_table_cstep_fp
-\int_new:N \l__nmc_table_cnum_int
-\clist_new:N \l__nmc_table_cspec_clist
-\bool_new:N \l__nmc_table_cspec_bool
-
-\seq_new:N \l__nmc_table_rvraw_seq
-\seq_new:N \l__nmc_table_rvcol_seq
-\seq_new:N \l__nmc_table_rvcoli_seq
-\seq_new:N \l__nmc_table_this_col_seq
-\seq_new:N \l__nmc_table_body_cols_seq
-\seq_new:N \l__nmc_table_body_rows_seq
-
-\seq_new:N \l__nmc_table_header_seq
-\tl_new:N  \l__nmc_table_header_tl
-\tl_new:N \l__nmc_table_rfont_tl
-\tl_new:N \l__nmc_table_rhead_tl
-\tl_new:N \l__nmc_table_rheadi_tl
-\tl_new:N \l__nmc_table_rhnudge_tl
-\tl_new:N \l__nmc_table_rhnudgei_tl
-\int_new:N \l__nmc_table_chround_int
-\int_new:N \l__nmc_table_chstyle_int
-\tl_new:N \l__nmc_table_chnudge_tl
-
-\tl_new:N \l__nmc_table_ctitle_tl
-\bool_new:N \l__nmc_table_ctitle_bool 
-\bool_new:N \l__nmc_table_ctitle_vv_bool 
-\int_new:N \l__nmc_table_rules_int
-\tl_new:N \l__nmc_table_footer_tl
-\bool_new:N \l__nmc_table_foot_bool
-\bool_new:N \l__nmc_table_footops_bool
-\tl_new:N \l__nmc_table_csum_tl
-\tl_new:N \l__nmc_table_cave_tl
-\tl_new:N \l__nmc_table_cmax_tl
-\tl_new:N \l__nmc_table_cmin_tl
-\tl_new:N \l__nmc_table_cdel_tl
-\tl_new:N \l__nmc_table_rbloc_tl
-\tl_new:N \l__nmc_table_rblock_tl
-\int_new:N \l__nmc_table_rbloc_int
-\clist_new:N \l__nmc_table_rbloc_clist
-
-\int_new:N \l__nmc_table_signs_int
-\int_new:N \l__nmc_table_tsigns_int
-\int_new:N \l__nmc_table_c_int
-\int_new:N \l__nmc_table_b_int
-\int_new:N \l__nmc_table_a_int
-\bool_new:N \l__nmc_table_signs_bool
-\bool_new:N \l__nmc_table_diffs_bool
-\tl_new:N \l__nmc_table_diff_tl
-\tl_new:N \l__nmc_table_diff_null_tl
-
-\tl_new:N \l__nmc_table_Q_tl
-\tl_new:N \l__nmc_table_A_tl
-\fp_new:N \l__nmc_table_max_fp
-\fp_new:N \l__nmc_table_min_fp
-\bool_new:N \l__nmc_table_QA_max_bool
-\bool_new:N \l__nmc_table_QA_min_bool
-\bool_new:N \l__nmc_table_QA_bool
-\bool_new:N \l__nmc_table_num_only_bool 
-\tl_new:N \l__nmc_table_num_only_tl
-\tl_new:N \l__nmc_table_query_tl
-%------------------------------------------------
-\nmc_define:nnN { \nmcTabulate } { table } \tabulate
-
-\cs_new_protected:Npn \__nmc_table_settings_digest:
-  { 
-    \bool_set_false:N \l__nmc_allow_TF_out_bool
-    \int_compare:nTF { 0 <= \l__nmc_table_rpos_int <= 4 }
-      { 
-        \int_compare:nNnT { \l__nmc_table_rpos_int } = { 4 }
-          { \int_incr:N \l__nmc_table_rpos_int }
-      }
-      { \int_set:Nn \l__nmc_table_rpos_int { 1 } }
-    \clist_if_empty:NF \l__nmc_table_rspec_clist
-      { \__nmc_table_settings_spec:N r }
-    \clist_if_empty:NF \l__nmc_table_cspec_clist
-      { \__nmc_table_settings_spec:N c }
-    \tl_if_empty:NT \l__nmc_table_rhead_tl
-      { \tl_set_eq:NN \l__nmc_table_rhead_tl \l__nmc_table_rvar_tl }
-    \tl_if_empty:NT \l__nmc_table_rheadi_tl
-      { 
-        \tl_if_empty:NTF \l__nmc_table_rvari_tl
-          { \tl_set_eq:NN \l__nmc_table_rheadi_tl \l__nmc_table_rhead_tl } 
-          { \tl_set_eq:NN \l__nmc_table_rheadi_tl \l__nmc_table_rvari_tl }
-      }
-    \tl_if_empty:NT \l__nmc_table_rhnudgei_tl
-      { \tl_set_eq:NN \l__nmc_table_rhnudgei_tl \l__nmc_table_rhnudge_tl }
-
-    \tl_if_empty:NF \l__nmc_table_ctitle_tl
-      { \l__nmc_table_settings_ctitle: }
-    \tl_if_empty:NTF \l__nmc_table_Q_tl
-      { \tl_set:Nn \l__nmc_table_query_tl { *~option~ } }
-      { 
-        \tl_set:Nn \l__nmc_table_query_tl { table~value~satisfies~ }
-        \__nmc_table_settings_QA: 
-      }
-    \clist_if_empty:NTF \l__nmc_table_rbloc_clist
-      { \tl_set:Nn \l__nmc_table_rbloc_tl { 10000 } }
-      { \clist_pop:NN \l__nmc_table_rbloc_clist \l__nmc_table_rbloc_tl }
-    \tl_set_eq:NN \l__nmc_table_rblock_tl \l__nmc_table_rbloc_tl
-    \int_set:Nn \l__nmc_table_rbloc_int { \l__nmc_table_rbloc_tl }
-
-    \__nmc_table_settings_rules:
-    \int_if_zero:nTF \l__nmc_table_diffs_int
-      { \bool_set_false:N \l__nmc_table_diffs_bool } 
-      { \bool_set_true:N \l__nmc_table_diffs_bool  }
-    \tl_if_empty:NF \l__nmc_table_chead_tl
-      { \int_set:Nn \l__nmc_table_chstyle_int { 4 } }
-    \tl_if_empty:NF \l__nmc_table_footer_tl
-      { 
-        \tl_if_eq:VnTF \l__nmc_table_footer_tl { * }
-          { \bool_set_true:N \l__nmc_table_foot_bool }
-          { \__nmc_table_footer:N \l__nmc_table_footer_tl }
-      }
-  }
-\cs_new_protected:Npn \l__nmc_table_settings_ctitle:
-  {
-    \bool_set_true:N \l__nmc_table_ctitle_bool
-    \tl_if_head_eq_charcode:VNT \l__nmc_table_ctitle_tl *
-      {
-        \tl_if_eq:VnT \l__nmc_table_ctitle_tl { ** }
-          { \bool_set_true:N \l__nmc_table_ctitle_vv_bool }
-        \tl_if_head_eq_charcode:VNT \l__nmc_table_ctitle_tl *
-          { 
-            \tl_set:Nn \l__nmc_table_ctitle_tl 
-              { \exp_not:o \l__nmc_formula_dup_tl }
-          }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_settings_rules:
-  {
-    \tl_replace_once:Nnn \l__nmc_table_rules_tl { T } { *2 }
-    \tl_replace_once:Nnn \l__nmc_table_rules_tl { t } { *3 }
-    \tl_replace_once:Nnn \l__nmc_table_rules_tl { h } { *5 }
-    \tl_replace_once:Nnn \l__nmc_table_rules_tl { f } { *7 }
-    \tl_replace_once:Nnn \l__nmc_table_rules_tl { B } { *11 }
-    \int_set:Nn \l__nmc_table_rules_int { 1 \l__nmc_table_rules_tl }
-  }
-\cs_new_protected:Npn \__nmc_table_settings_QA:
-  {
-    \bool_set_true:N \l__nmc_table_QA_bool
-    \regex_replace_all:nnN { (\@) } { \c{l_tmpb_fp} } \l__nmc_table_Q_tl
-    \tl_set_rescan:Nno \l__nmc_table_Q_tl { \ExplSyntaxOn } \l__nmc_table_Q_tl
-    \regex_replace_all:nnN { (\cC.) } { \c{exp_not:N}\1 } \l__nmc_table_A_tl
-    \regex_replace_all:nnN { (\@) } { \c{l_tmpb_tl} } \l__nmc_table_A_tl
-    \tl_if_in:NnT \l__nmc_table_Q_tl { MAX }
-      { 
-        \bool_set_true:N \l__nmc_table_QA_max_bool 
-        \regex_replace_all:nnN { MAX } { \c{l__nmc_table_max_fp} }
-            \l__nmc_table_Q_tl
-        \fp_set:Nn \l__nmc_table_max_fp { -inf }    
-      }
-    \tl_if_in:NnT \l__nmc_table_Q_tl { MIN }
-      { 
-        \bool_set_true:N \l__nmc_table_QA_min_bool 
-        \regex_replace_all:nnN { MIN } { \c{l__nmc_table_min_fp} }
-            \l__nmc_table_Q_tl
-        \fp_set:Nn \l__nmc_table_min_fp { inf }    
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_footer:N #1
-  {
-    \tl_set_eq:NN \l_tmpa_tl #1
-    \regex_replace_all:nnN { SUM } { \c{l__nmc_table_csum_tl} } #1
-    \regex_replace_all:nnN { AVE } { \c{l__nmc_table_cave_tl} } #1
-    \regex_replace_all:nnN { MAX } { \c{l__nmc_table_cmax_tl} } #1
-    \regex_replace_all:nnN { MIN } { \c{l__nmc_table_cmin_tl} } #1
-    \regex_replace_all:nnN { DEL } { \c{l__nmc_table_cdel_tl} } #1
-    \tl_if_eq:NNF \l_tmpa_tl #1
-      { \bool_set_true:N \l__nmc_table_footops_bool }
-  }
-\cs_new_protected:Npn \__nmc_table_settings_spec:N #1  
-  {
-    \bool_set_true:c { l__nmc_table_ #1 spec_bool }
-    \clist_pop:cc { l__nmc_table_#1spec_clist } { l__nmc_table_ #1 var_tl }
-    \clist_pop:cc { l__nmc_table_ #1 spec_clist } { l__nmc_table_ #1 step_tl }
-    \clist_pop:cN { l__nmc_table_ #1 spec_clist } \l_tmpa_tl
-    \tl_if_head_eq_charcode:VNTF \l_tmpa_tl (
-      { 
-        \int_set:cn { l__nmc_table_ #1 num_int } 
-            { \exp_last_unbraced:NV \__nmc_paren_arg:w \l_tmpa_tl } 
-      }
-      { \tl_set_eq:cN { l__nmc_table_ #1 stop_tl } \l_tmpa_tl }
-  }
-\cs_new:Npn \__nmc_paren_arg:w (#1) { #1 }
- 
-\cs_new_protected:Npn \__nmc_table_vv_digest:N #1
-  {
-    \bool_if:NTF \l__nmc_multitok_bool
-      { 
-        \clist_push:NV \l__nmc_formula_tl \l__nmc_table_cvar_tl
-        \clist_push:NV \l__nmc_formula_tl \l__nmc_table_rvar_tl
-        \__nmc_vv_digest:N #1
-        \clist_pop:NN \l__nmc_formula_tl \l__nmc_table_rvar_tl
-        \tl_if_empty:NF \l__nmc_table_cvar_tl
-          { \clist_pop:NN \l__nmc_formula_tl \l__nmc_table_cvar_tl }
-       }
-      { \__nmc_vv_digest:N #1 }
-    \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
-    \__nmc_table_get_ini_vals:
-    \bool_if:nT
-        { 
-          \int_if_zero_p:n { \l__nmc_table_rpos_int } &&
-          \int_if_zero_p:n { \l__nmc_table_cnum_int }
-        }
-      { \__nmc_error_what:n { Null~table~specified~in } }
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \bool_if:NT \l__nmc_table_ctitle_vv_bool 
-          {
-            \exp_args:NNnx\tl_replace_once:Nnn \l__nmc_vv_inline_tl { vv } 
-                { \seq_use:Nn \l__nmc_vv_visible_seq { , } }
-            \tl_put_right:Nn \l__nmc_table_ctitle_tl 
-                { \exp_not:o \l__nmc_vv_inline_tl }
-          }
-       }
-  }
-\cs_new_protected:Npn \__nmc_table_get_ini_vals:
-  {
-    \__nmc_error_where:n { settings }
-    \__nmc_table_get_ini_vals_aux:N r 
-    \tl_if_empty:NTF \l__nmc_table_cvar_tl
-      { 
-        \int_set:Nn \l__nmc_table_cnum_int
-          {
-            \int_compare:nNnTF { \l__nmc_table_cnum_int } = { -1 }
-              { 1 } { \int_min:nn { 1 } 
-                      { \int_abs:n { \l__nmc_table_cnum_int } } } 
-          }
-      }
-      { \__nmc_table_get_ini_vals_aux:N c }
-    \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
-  }
-\cs_new_protected:Npn \__nmc_table_get_ini_vals_aux:N #1
-  { 
-    \prop_get:NvNTF \g__nmc_subst_var_prop { l__nmc_table_ #1 var_tl } \l_tmpa_tl
-      { 
-        \fp_set:cn { l__nmc_table_ #1 start_fp } { \l_tmpa_tl }
-        \bool_if:cTF { l__nmc_table_ #1 spec_bool }
-          { 
-            \__nmc_fpify_set:cc { l__nmc_table_ #1 step_fp } 
-                { l__nmc_table_ #1 step_tl }
-            \int_compare:vNnT { l__nmc_table_ #1 num_int } = { -1 }
-              {
-                \__nmc_fpify_set:cc { l__nmc_table_ #1 stop_fp } 
-                    { l__nmc_table_ #1 stop_tl }
-                \l__nmc_table_calc_num:cnnn { l__nmc_table_ #1 num_int } 
-                    { l__nmc_table_ #1 stop_fp } { l__nmc_table_ #1 start_fp } 
-                    { l__nmc_table_ #1 step_fp }  
-              }
-          }
-          { \__nmc_table_get_individual_ini_vals:N #1 }
-        }
-      { \__nmc_error_what:n { No~ \__nmc_table_rc:N #1 ~variable~specified~in } }
-  }
-\cs_new:Npn \__nmc_table_rc:N #1
-  { \tl_if_eq:NNTF #1 \c__nmc_r_tl { row } { column } }
-  
-\cs_new_protected:Npn \l__nmc_table_calc_num:Nnnn #1#2#3#4
-  { 
-    \int_set:Nn #1 { \fp_to_int:n { ( \exp_not:v { #2 } - \exp_not:v { #3 } )
-        / \exp_not:v { #4 } } + 1 } 
-  }
-\cs_generate_variant:Nn \l__nmc_table_calc_num:Nnnn { c }
-
-\cs_new_protected:Npn  \__nmc_table_get_individual_ini_vals:N #1
-  {      
-    \int_case:vnTF { l__nmc_table_ #1 num_int } 
-      {
-        { -1 }
-          { 
-            \__nmc_fpify_set:cc { l__nmc_table_ #1 step_fp } 
-                { l__nmc_table_ #1 step_tl }
-            \bool_if:NF \g__nmc_error_bool
-              { \__nmc_fpify_set:cc { l__nmc_table_ #1 stop_fp } 
-                    { l__nmc_table_ #1 stop_tl } }
-            \bool_if:NF \g__nmc_error_bool
-              {        
-                \l__nmc_table_calc_num:cnnn { l__nmc_table_ #1 num_int } 
-                        { l__nmc_table_ #1 stop_fp } { l__nmc_table_ #1 start_fp } 
-                        { l__nmc_table_ #1 step_fp }
-              }
-          }
-        { 0 }
-          { 
-            \fp_set:cn { l__nmc_table_ #1 stop_fp } 
-                { \exp_not:v { l__nmc_table_ #1 start_fp } - 1 }
-            \fp_set:cn { l__nmc_table_ #1 step_fp } { 1 }
-          }
-        { 1 }
-          {
-            \fp_set_eq:cc { l__nmc_table_ #1 stop_fp } 
-                { l__nmc_table_ #1 start_fp }
-            \fp_set:cn { l__nmc_table_ #1 step_fp } { 1 }
-          }
-      }
-      { 
-        \bool_if:NT \g__nmc_error_bool
-          { \__nmc_error_what:n {  Missing~ 
-              \__nmc_table_rc:N #1-related~variable~in } }
-      }
-      {
-        \int_compare:vNnTF { l__nmc_table_ #1 num_int } > { 1 }
-          { \__nmc_fpify_set:cc { l__nmc_table_ #1 step_fp } 
-              { l__nmc_table_ #1 step_tl } }
-          { \__nmc_error_what:n { Check~number~of~
-              \__nmc_table_rc:N #1s~specified~in } }
-      }
-  }
-%----------------------------------------------------------
-\cs_new_protected:Npn \__nmc_table_process:
-  {
-    \__nmc_error_where:n { formula }
-    \__nmc_table_calc_rvar_col:
-    \seq_clear:N \l__nmc_table_header_seq
-    \tl_if_head_eq_charcode:VNT \l__nmc_formula_tl ,
-      { \__nmc_table_multifn: }
-    \__nmc_table_calc_cvar_cols:
-    \tl_clear:N \l_nmc_result_tl
-    \__nmc_table_form_body:N \l_nmc_result_tl
-    \tl_set_eq:NN \l__nmc_fp_expr_tl \l__nmc_fp_exprn_tl
-    \bool_if:NT \l__nmc_num_only_bool
-      { 
-        \bool_if:NTF \l__nmc_table_num_only_bool
-          { 
-            \tl_set_eq:NN \l_nmc_result_tl \l__nmc_table_num_only_tl
-            \tl_gset_eq:NN \g__nmc_reuse_tl \l__nmc_table_num_only_tl
-          }
-          {
-            \__nmc_error_where:n { settings }
-            \__nmc_error_what:n  
-                { No~ \l__nmc_table_query_tl query~\__nmc_verb:n {Q?}~in }
-            \tl_clear:N \l_nmc_result_tl
-          }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_multifn:
-  {
-    \bool_set_true:N \l__nmc_table_clist_bool
-    \clist_set:NV \l__nmc_formula_clist \l__nmc_formula_tl
-    \seq_set_from_clist:NN \l__nmc_table_header_seq \l__nmc_formula_clist
-    \int_set:Nn \l__nmc_table_cnum_int 
-      { \clist_count:N \l__nmc_formula_clist }
-    \fp_set:Nn \l__nmc_table_cstep_fp { 0 }
-    \fp_set:Nn \l__nmc_table_cstart_fp { 0 }
-    \tl_set:Nn \l__nmc_table_cvar_tl { \l__nmc_x_tl }
-    \prop_put:Nnn \g__nmc_subst_var_prop { \l__nmc_x_tl } { 1 }
-    \int_set:Nn \l__nmc_table_chstyle_int { 4 }
-  }
-\cs_new_protected:Npn \__nmc_table_calc_rvar_col:
-  { 
-    \fp_set_eq:NN \l__nmc_table_r_fp \l__nmc_table_rstart_fp
-    \int_step_inline:nnnn { 1 } { 1 } { \l__nmc_table_rnum_int }
-      { 
-        \seq_put_right:NV \l__nmc_table_rvraw_seq \l__nmc_table_r_fp
-        \fp_add:Nn \l__nmc_table_r_fp { \l__nmc_table_rstep_fp }
-      }
-  }
-\cs_new:Npn \__nmc_table_calc_cvar_cols:
-  {
-    \fp_set_eq:NN \l__nmc_table_c_fp \l__nmc_table_cstart_fp
-    \int_step_inline:nn { \l__nmc_table_cnum_int }
-      { 
-        \bool_if:NTF \l__nmc_table_clist_bool
-          { \clist_pop:NN \l__nmc_formula_clist \l__nmc_formula_tl }
-          { \seq_put_right:NV \l__nmc_table_header_seq { \l__nmc_table_c_fp } }
-        \bool_if:NF \g__nmc_error_bool
-          {
-            \seq_clear:N \l__nmc_table_this_col_seq 
-            \fp_set_eq:NN \l__nmc_table_r_fp \l__nmc_table_rstart_fp
-            \int_step_function:nN { \l__nmc_table_rnum_int }
-                \__nmc_table_rvar_step_fn:n
-          }
-        \bool_if:NF \g__nmc_error_bool
-          {
-            \seq_put_right:NV \l__nmc_table_body_cols_seq 
-                \l__nmc_table_this_col_seq
-            \fp_add:Nn \l__nmc_table_c_fp \l__nmc_table_cstep_fp
-            \__nmc_table_prop_mode:n {\l__nmc_mode_int}
-                \l__nmc_table_rvar_tl \l__nmc_table_rstart_fp
-            \__nmc_calc_fn_val:VNnN \l__nmc_table_cvar_tl \l__nmc_formula_tl
-                 { \l__nmc_table_c_fp } \l__nmc_table_fn_val_fp
-          }
-      }
-  }
-\cs_new:Npn \__nmc_table_prop_mode:n #1
-  { 
-    \int_if_zero:nTF { #1 }
-      { \prop_put:NVV \g__nmc_subst_var_prop } 
-      { \prop_put:NVV \l__nmc_vv_change_prop }
-  }
-\cs_new_protected:Npn \__nmc_table_rvar_step_fn:n #1
-  { 
-    \bool_if:NF \g__nmc_error_bool
-      { 
-        \__nmc_calc_fn_val:VNnN \l__nmc_table_rvar_tl
-             \l__nmc_formula_tl { \l__nmc_table_r_fp } \l_tmpa_fp
-        \seq_put_right:NV \l__nmc_table_this_col_seq \l_tmpa_fp
-        \bool_if:NT \l__nmc_table_QA_bool
-          { \__nmc_table_maxmin_do:n { \l_tmpa_fp } }
-        \fp_add:Nn \l__nmc_table_r_fp { \l__nmc_table_rstep_fp }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_maxmin_do:n #1
-  {
-    \bool_if:NT \l__nmc_table_QA_max_bool
-      { \fp_set:Nn \l__nmc_table_max_fp 
-            { \fp_max:nn { \l__nmc_table_max_fp } { #1} } }
-    \bool_if:NT \l__nmc_table_QA_min_bool
-      { \fp_set:Nn \l__nmc_table_min_fp 
-            { \fp_min:nn { \l__nmc_table_min_fp } { #1 } } }
-  }
-%----------------------------------------------------------
-\cs_new_protected:Npn \__nmc_table_display:
-  {  
-    \bool_if:NF \l__nmc_num_only_bool
-      {
-        \__nmc_table_headercnum:
-        \tl_set:Nx \l__nmc_table_header_tl { \__nmc_table_header: }
-        \bool_if:NT \l__nmc_table_foot_bool
-          {
-            \seq_set_split:NnV \l_tmpa_seq { & }\l__nmc_table_header_tl
-            \seq_reverse:N \l_tmpa_seq 
-            \tl_set:Nx \l__nmc_table_footer_tl { \seq_use:Nn \l_tmpa_seq { & } }
-          }
-        \tl_put_left:Nx \l_nmc_result_tl 
-          { 
-            \__nmc_table_upper: 
-            \exp_not:o \l__nmc_table_header_tl
-            \tabularnewline
-            \__nmc_if_mod_zero:nnT { \l__nmc_table_rules_int } { 5 }
-              { \exp_not:N \midrule }
-          }
-        \tl_put_right:Nx \l_nmc_result_tl { \__nmc_table_form_lower: }
-        \__nmc_table_reuse:
-      }
-    \l_nmc_result_tl
-  }
-\cs_new:Npn \__nmc_table_upper:
-  { 
-    \exp_not:n { \begin{tabular} }
-    \exp_not:o \l__nmc_table_valign_tl 
-    { 
-      \int_if_odd:nT { \l__nmc_table_rpos_int }
-        { \l__nmc_table_rcalign_tl } 
-      \prg_replicate:nn 
-        { \l__nmc_table_cnum_int } \l__nmc_table_ccalign_tl
-      \int_compare:nNnT { \l__nmc_table_rpos_int } > { 1 }
-        { \l__nmc_table_rcalign_tl }
-    }
-    \__nmc_if_mod_zero:nnT { \l__nmc_table_rules_int } { 2 }
-      { \exp_not:N \toprule }
-    \bool_if:NT \l__nmc_table_ctitle_bool
-      { \__nmc_table_form_ctitle:  } 
-  }
-\cs_new:Npn \__nmc_table_form_ctitle:
-  {
-    \int_compare:nNnTF { \l__nmc_table_rpos_int } = { 0 }
-      { 
-        \int_compare:nNnF { \l__nmc_table_cnum_int } = { 1 }
-          {
-            \__nmc_table_form_ctitle:nnnn {} {} { 1 }
-                { \l__nmc_table_cnum_int } 
-          }
-      }
-      { 
-        \int_compare:nNnT { \l__nmc_table_cnum_int } > { 1 }
-          { 
-            \int_case:nnF { \l__nmc_table_rpos_int }
-              { 
-                { 1 } { \__nmc_table_form_ctitle:nnnn { & } {} { 2 }
-                          { \l__nmc_table_cnum_int + 1 } }
-                { 2 } { \__nmc_table_form_ctitle:nnnn {} { & } { 1 }
-                          { \l__nmc_table_cnum_int } }
-              } 
-              { % 3,4/5
-                 \__nmc_table_form_ctitle:nnnn { & } { & } { 2 }
-                      { \l__nmc_table_cnum_int + 1 } 
-              }
-          }
-      }
-  }
-\cs_new:Npn \__nmc_table_form_ctitle:nnnn #1#2#3#4
-  {
-    #1 \exp_not:N \multicolumn
-    { \int_eval:n { \l__nmc_table_cnum_int } } { c }
-    { $ \l__nmc_table_ctitle_tl $  }
-    #2 \tabularnewline
-    \__nmc_if_mod_zero:nnT { \l__nmc_table_rules_int } { 3 }
-      {
-        \exp_not:N \cmidrule(lr)
-        { #3-\int_eval:n { #4 } }
-      }
-  }
-%%%%%%%%%%%%%%%%%%%%
-\cs_new:Npn \__nmc_table_header:
-  { 
-    \int_if_zero:nTF { \l__nmc_table_cnum_int }
-      { 
-        \__nmc_table_header_rvar:nn { \exp_not:o \l__nmc_table_rhead_tl }
-            \l__nmc_table_rhnudge_tl 
-      }
-      { 
-        \int_case:nnF { \l__nmc_table_rpos_int }
-          {
-            { 0 } { \exp_not:o \l__nmc_table_chead_tl }
-            { 1 } 
-              { 
-                \__nmc_table_header_rvar:nn 
-                    { \exp_not:o \l__nmc_table_rhead_tl } 
-                        \l__nmc_table_rhnudge_tl
-                & \exp_not:o \l__nmc_table_chead_tl
-              }
-            { 2 }
-              { 
-                \exp_not:o \l__nmc_table_chead_tl & 
-                \__nmc_table_header_rvar:nn 
-                    { \exp_not:o \l__nmc_table_rhead_tl } 
-                        \l__nmc_table_rhnudge_tl 
-              }
-          }
-          { % 3,4/5
-            \__nmc_table_header_rvar:nn 
-                { \exp_not:o \l__nmc_table_rhead_tl } 
-                    \l__nmc_table_rhnudge_tl 
-            & \exp_not:o \l__nmc_table_chead_tl & 
-            \__nmc_table_header_rvar:nn 
-                { \exp_not:o  \l__nmc_table_rheadi_tl }
-                    \l__nmc_table_rhnudgei_tl 
-          }
-      }
-  }
-\cs_new:Npn \__nmc_table_headercnum:
-  {
-    \int_compare:nNnTF { \l__nmc_table_cnum_int } = { 1 }
-      { \__nmc_table_headeri: }
-      { \__nmc_table_headern: }
-  }
-\cs_new:Npn \__nmc_table_header_rvar:nn #1#2
-  { \__nmc_table_header_nudge:Nnn r { #1 } { #2 } }
-
-\cs_new:Npn \__nmc_table_headeri:
-  { 
-    \tl_if_empty:NT \l__nmc_table_chead_tl
-      {
-        \tl_set:Nx \l__nmc_table_chead_tl 
-          {
-            \__nmc_table_header_nudge:Nnn c  
-              {
-                \bool_if:NTF \l__nmc_table_ctitle_bool
-                  { \exp_not:o \l__nmc_table_ctitle_tl }
-                  { \exp_not:o \l__nmc_formula_dup_tl }
-              } 
-              \l__nmc_table_chnudge_tl
-          }
-      }
-  }
-\cs_new:Npn \__nmc_table_headern:
-  { 
-    \tl_if_empty:NT \l__nmc_table_chead_tl
-      {
-        \seq_clear:N \l_tmpa_seq
-        \bool_set_true:N \l__nmc_table_coli_only_bool
-        \bool_if:NTF \l__nmc_table_clist_bool
-          {
-            \seq_map_inline:Nn \l__nmc_table_header_seq
-              { \__nmc_table_header_auxi:Nn \l_tmpa_seq { ##1 } }
-          }
-          { 
-            \seq_map_inline:Nn \l__nmc_table_header_seq
-              { 
-                \__nmc_num_format:nNnN { ##1 } \l_tmpb_tl 
-                    { \l__nmc_table_chround_int } \l__nmc_sci_num_out_bool
-                \__nmc_table_chstyler:NN \l_tmpa_seq \l_tmpb_tl
-              }
-          }
-        \tl_set:Nx \l__nmc_table_chead_tl { \seq_use:Nn \l_tmpa_seq { & }  }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_chstyler:NN #1 #2
-  {
-    \int_case:nnF { \l__nmc_table_chstyle_int }
-      {
-        { 0 } { \__nmc_table_header_auxi:NV #1 #2 }
-        { 1 } 
-          {
-            \bool_if:NTF \l__nmc_table_coli_only_bool
-              { 
-                \__nmc_table_header_auxi:Nx #1 { \l__nmc_table_cvar_tl = #2 } 
-                \bool_set_false:N \l__nmc_table_coli_only_bool
-              }
-              { \seq_put_right:NV #1 #2 }
-          }
-        { 2 } { \__nmc_table_header_auxi:Nx #1 { \l__nmc_table_cvar_tl = #2 } }
-        { 3 } { \__nmc_table_header_auxiii:NV #1 #2 }
-        { 4 } { \seq_set_split:NnV #1 { & } \l__nmc_table_chead_tl }
-      }
-      { \__nmc_table_header_auxi:NV #1 #2 }
-  }
-\cs_new_protected:Npn \__nmc_table_header_auxi:Nn #1#2
-  { 
-    \seq_put_right:Nx #1 { \__nmc_table_header_nudge:Nnn c
-         { \exp_not:n { #2 } } \l__nmc_table_chnudge_tl }
-  }
-\cs_generate_variant:Nn \__nmc_table_header_auxi:Nn { NV,Nx }
-
-\cs_new_protected:Npn \__nmc_table_header_auxiii:Nn #1#2
-  { 
-    \tl_set_eq:NN \l_tmpa_tl \l__nmc_formula_dup_tl
-    \regex_replace_all:nnNT { \u{l__nmc_table_cvar_tl} } { #2 } \l_tmpa_tl
-      { \__nmc_table_header_auxi:NV #1 \l_tmpa_tl }
-  }
-\cs_generate_variant:Nn \__nmc_table_header_auxiii:Nn { NV }
-
-\cs_new:Npn \__nmc_table_header_nudge:Nnn #1#2#3
-  { % #1=r(ow)/c(ol), #2=var, #3=nudge
-   \tl_if_eq:cNTF { l__nmc_table_ #1 calign_tl } \c__nmc_r_tl
-      { $  #2 #3 $ }
-      { 
-        \tl_if_eq:cNTF { l__nmc_table_ #1 calign_tl } \c__nmc_l_tl
-          { $ #3 #2 $ } { $ #2 $ }
-      }
-  }
-%%%%%%%%%%  
-\cs_new_protected:Npn \__nmc_table_form_body:N #1
-  { % #1 \l_nmc_result_tl
-    \int_if_zero:nF { \l__nmc_table_rpos_int }
-      { 
-        \__nmc_table_form_rvcol:NN 
-            \l__nmc_table_rvraw_seq \l__nmc_table_rvcol_seq 
-      } 
-    \int_zero:N \l__nmc_table_rbloc_int
-    \int_if_zero:nTF { \l__nmc_table_cnum_int }
-      { \__nmc_table_form_body_rvcol_only:N #1 } 
-      { \__nmc_table_form_body_cvcols:N #1 }
-  }
-\cs_new_protected:Npn \__nmc_table_form_rvcol:NN #1#2
-  { 
-    \seq_clear:N \l_tmpb_seq
-    \seq_map_variable:NNn #1 \l_tmpa_tl
-      {
-        \__nmc_num_format:nNnN \l_tmpa_tl \l_tmpb_tl 
-            { \l__nmc_table_rround_int } \c_false_bool
-        \seq_put_right:Nx \l_tmpb_seq 
-            { \exp_not:o \l__nmc_table_rfont_tl { \l_tmpb_tl } }
-      }
-    \seq_set_eq:NN #2 \l_tmpb_seq 
-    \int_compare:nNnTF { \l__nmc_table_rpos_int } > { 3 }
-      { \__nmc_table_form_rvcoli:NN #1 #2 } % reverse/pivot
-      { \seq_set_eq:NN \l__nmc_table_rvcoli_seq #2 }
-  }
-\cs_new_protected:Npn \__nmc_table_form_rvcoli:NN #1 #2
-  {
-    \seq_clear:N \l__nmc_table_rvcoli_seq
-    \seq_map_variable:NNn #1 \l_tmpa_tl
-      { 
-        \__nmc_calc_fn_val:VNnN \l__nmc_table_rvar_tl 
-              \l__nmc_table_rvari_tl \l_tmpa_tl \l_tmpa_fp
-        \__nmc_num_format:nNnN { \l_tmpa_fp } \l_tmpb_tl 
-            { \l__nmc_table_rround_int } \c_false_bool
-        \seq_put_right:Nx \l__nmc_table_rvcoli_seq 
-          { \exp_not:o \l__nmc_table_rfont_tl { \l_tmpb_tl } }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_form_body_rvcol_only:N #1
-  { % #1 = \l_nmc_result_tl
-    \seq_clear:N \l_tmpb_seq
-    \seq_map_variable:NNn \l__nmc_table_rvcol_seq \l_tmpa_tl
-      {
-        \tl_put_right:Nx #1 
-            { \exp_not:o \l_tmpa_tl \tabularnewline }
-        \__nmc_table_rbloc_spc:NN \l__nmc_table_rbloc_int \l_tmpa_bool
-        \bool_if:NT \l_tmpa_bool
-          { 
-            \tl_put_right:Nx #1
-              { \exp_not:o \addlinespace[\l__nmc_table_blocsep_tl] }
-          }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_form_body_cvcols:N #1
-  { % #1 \l_nmc_result_tl
-    \seq_clear:N \l_tmpd_seq
-    \seq_map_variable:NNn \l__nmc_table_body_cols_seq \l_tmpa_seq 
-      { 
-        \seq_clear:N \l_tmpb_seq
-        \__nmc_table_form_cols:NN \l_tmpa_seq \l_tmpb_seq 
-        \seq_put_right:NV \l_tmpd_seq \l_tmpb_seq
-      }
-    \bool_if:NT \l__nmc_table_footops_bool
-      { \__nmc_table_footops:N \l_tmpd_seq }
-    \__nmc_table_transpose:NN \l_tmpd_seq \l__nmc_table_body_rows_seq
-    
-    \seq_map_variable:NNn \l__nmc_table_body_rows_seq \l_tmpa_seq
-      {
-        \__nmc_table_rbloc_spc:NN \l__nmc_table_rbloc_int \l_tmpa_bool
-        \tl_put_right:Nx #1
-          { 
-            \seq_use:Nn \l_tmpa_seq { & }
-            \tabularnewline
-            \bool_if:NT \l_tmpa_bool
-              { \exp_not:o \addlinespace[\l__nmc_table_blocsep_tl] }
-          }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_footops:N #1
-  {
-    \group_begin:
-    \seq_clear:N \l_tmpb_seq
-    \seq_set_split:NnV \l_tmpa_seq { & } \l__nmc_table_footer_tl
-    \int_if_odd:nT { \l__nmc_table_rpos_int }
-      { 
-        \seq_pop:NN \l_tmpa_seq \l_tmpa_tl 
-        \seq_put_left:NV \l_tmpb_seq \l_tmpa_tl
-      }
-    \seq_mapthread_function:NNN #1 \l_tmpa_seq \__nmc_table_footops:nn
-    \int_compare:nNnT { \l__nmc_table_rpos_int } > { 1 }
-      { 
-        \seq_pop:NN \l_tmpa_seq \l_tmpa_tl 
-        \seq_put_right:NV \l_tmpb_seq \l_tmpa_tl
-      }
-    \tl_set:Nx \l__nmc_table_footer_tl { \seq_use:Nn \l_tmpb_seq { & } }
-    \exp_args:NNNV
-    \group_end:
-        \tl_set:Nn \l__nmc_table_footer_tl \l__nmc_table_footer_tl
-  }
-\cs_new_protected:Npn \__nmc_table_footops:nn #1#2
-  { 
-    \tl_set:Nn \l_tmpc_seq { #1 }
-    \tl_set:Nx \l_tmpa_tl { \seq_use:Nn \l_tmpc_seq { + } }
-    \fp_set:Nn \l_tmpa_fp { \l_tmpa_tl }
-    \fp_set:Nn \l_tmpb_fp { \l_tmpa_fp / \l__nmc_table_rnum_int }
-    \__nmc_num_format:nNnN \l_tmpa_fp \l__nmc_table_csum_tl
-      { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \__nmc_num_format:nNnN \l_tmpb_fp \l__nmc_table_cave_tl
-      { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \tl_set:Nx \l_tmpa_tl { max(\seq_use:Nn \l_tmpc_seq { , }) }
-    \fp_set:Nn \l_tmpa_fp { \l_tmpa_tl }
-    \__nmc_num_format:nNnN \l_tmpa_fp \l__nmc_table_cmax_tl
-      { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \tl_set:Nx \l_tmpa_tl { min(\seq_use:Nn \l_tmpc_seq { , }) }
-    \fp_set:Nn \l_tmpb_fp { \l_tmpa_tl }
-    \__nmc_num_format:nNnN \l_tmpb_fp \l__nmc_table_cmin_tl
-      { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \__nmc_num_format:nNnN { \l_tmpa_fp - \l_tmpb_fp } \l__nmc_table_cdel_tl
-      { \l__nmc_round_int } \l__nmc_sci_num_out_bool  
-    \seq_put_right:Nx \l_tmpb_seq { $ #2 $ }
-  }
-\cs_new_protected:Npn \__nmc_table_transpose:NN #1#2
-  { % #1 seq of seq in #2 seq of seq out
-    \int_if_zero:nF { \l__nmc_table_rpos_int }
-      {
-        \int_compare:nNnF { \l__nmc_table_rpos_int } = { 2 }
-          {  \seq_put_left:NV #1 \l__nmc_table_rvcol_seq }
-        \int_compare:nNnT { \l__nmc_table_rpos_int } > { 1 }
-          { \seq_put_right:NV #1 \l__nmc_table_rvcoli_seq } 
-      }
-    \int_step_inline:nn { \l__nmc_table_rnum_int }
-      {
-        \seq_clear:N \l_tmpb_seq
-        \seq_clear:N \l_tmpc_seq
-        \seq_map_variable:NNn #1 \l_tmpa_seq
-          {  
-            \seq_pop:NN \l_tmpa_seq \l_tmpa_tl
-            \seq_put_right:Nx \l_tmpb_seq { $\exp_not:o\l_tmpa_tl $ }
-            \seq_put_right:NV \l_tmpc_seq \l_tmpa_seq
-          }
-        \seq_put_right:NV \l__nmc_table_body_rows_seq \l_tmpb_seq
-        \seq_set_eq:NN #1 \l_tmpc_seq        
-      }
-  }
-\cs_new:Npn \__nmc_table_rbloc_spc:NN #1#2
-  { %
-    \int_incr:N #1 
-    \bool_set_false:N #2
-    \int_compare:nNnT { #1 } = { \l__nmc_table_rblock_tl }
-      { 
-        \int_compare:nNnF { #1 } = { \l__nmc_table_rnum_int }
-          { \bool_set_true:N #2 }
-        \clist_if_empty:NF \l__nmc_table_rbloc_clist
-          { \clist_pop:NN \l__nmc_table_rbloc_clist \l__nmc_table_rbloc_tl }
-        \tl_set:Nx \l__nmc_table_rblock_tl 
-            { \int_eval:n { \l__nmc_table_rblock_tl + \l__nmc_table_rbloc_tl } }
-      }
-  } 
-\cs_new_protected:Npn \__nmc_table_form_cols:NN #1#2
-  { % #1 raw cseq, #2 <--formatted cseq
-    \int_case:nnF { \l__nmc_table_rnum_int }
-      {
-        { 0 } { \prg_do_nothing: }
-        { 1 } { \__nmc_table_form_cols_ri:NN #1#2 }
-        { 2 } { \__nmc_table_form_cols_rii:NN #1#2 }
-      }
-      { \__nmc_table_form_cols_riii:NN #1#2 }
-  }
-\cs_new_protected:Npn \__nmc_table_form_cols_ri:NN #1#2
-  {
-    \seq_pop:NN #1 \l_tmpb_fp
-    \__nmc_num_format:nNnN \l_tmpb_fp \l_tmpb_tl 
-        { \l__nmc_round_int } \l__nmc_sci_num_table_bool
-    \bool_if:NT \l__nmc_table_QA_bool
-      { \__nmc_table_QA:N \l_tmpb_tl }
-    \seq_put_right:Nx #2 {  \exp_not:o \l_tmpb_tl  }
-  }
-\cs_new_protected:Npn \__nmc_table_form_cols_rii:NN #1#2
-  { 
-    \__nmc_table_form_cols_rii_aux:NN #1#2
-    \__nmc_table_signs:
-    \__nmc_num_format:nNnN \l_tmpb_fp \l_tmpb_tl 
-        { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \__nmc_table_num_format:N \l_tmpb_tl
-    \seq_put_right:Nx #2 
-        {  \exp_not:o \l_tmpb_tl  \exp_not:o \l__nmc_table_diff_tl  }
-  }
-\cs_new_protected:Npn \__nmc_table_form_cols_rii_aux:NN #1#2
-  { 
-    \seq_pop:NN #1 \l_tmpb_fp
-    \int_if_zero:nF \l__nmc_table_diffs_int
-      { \__nmc_table_form_diffs_null:n { \l__nmc_table_diffs_int } }
-    \seq_pop:NN #1 \l_tmpa_fp
-    \int_set:Nn \l__nmc_table_c_int { 1 }    
-    \int_set:Nn \l__nmc_table_b_int { \fp_sign:n { \l_tmpb_fp } }
-    \int_set:Nn \l__nmc_table_a_int { \fp_sign:n { \l_tmpa_fp } }
-    \__nmc_table_signs:
-    \__nmc_num_format:nNnN \l_tmpb_fp \l_tmpb_tl 
-        { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \__nmc_table_num_format:N \l_tmpb_tl
-    \seq_put_right:Nx #2 
-        {  \exp_not:o \l_tmpb_tl \exp_not:o \l__nmc_table_diff_tl  }
-    \int_if_zero:nF \l__nmc_table_diffs_int
-      { \__nmc_table_calc_diffs:nn 
-          { \l_tmpb_fp } { \l_tmpa_fp } }
-    \fp_set_eq:NN \l_tmpb_fp \l_tmpa_fp 
-  }
-\cs_new_protected:Npn \__nmc_table_form_cols_riii:NN #1#2
-  { 
-    \__nmc_table_form_cols_rii_aux:NN #1#2
-    \int_set_eq:NN \l__nmc_table_c_int \l__nmc_table_b_int
-    \int_set_eq:NN \l__nmc_table_b_int \l__nmc_table_a_int 
-    \seq_map_variable:NNn #1 \l_tmpa_fp
-      { 
-        \int_set:Nn \l__nmc_table_a_int { \fp_sign:n { \l_tmpa_fp } } 
-        \__nmc_table_signs:
-        \__nmc_num_format:nNnN \l_tmpb_fp \l_tmpb_tl 
-            { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-        \__nmc_table_num_format:N \l_tmpb_tl
-        \seq_put_right:Nx #2 
-            {  \exp_not:o \l_tmpb_tl \exp_not:o \l__nmc_table_diff_tl  }
-        \int_if_zero:nF \l__nmc_table_diffs_int
-          { \__nmc_table_calc_diffs:nn { \l_tmpb_fp } { \l_tmpa_fp } }
-        \fp_set_eq:NN \l_tmpb_fp \l_tmpa_fp
-        \int_set_eq:NN \l__nmc_table_c_int \l__nmc_table_b_int
-        \int_set_eq:NN \l__nmc_table_b_int \l__nmc_table_a_int 
-      }
-    \int_set:Nn \l__nmc_table_a_int { 1 } 
-    \__nmc_table_signs:
-    \__nmc_num_format:nNnN \l_tmpb_fp \l_tmpb_tl 
-        { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \__nmc_table_num_format:N \l_tmpb_tl
-    \seq_put_right:Nx #2 
-        {  \exp_not:o \l_tmpb_tl \exp_not:o \l__nmc_table_diff_tl }
-  }
-\cs_new_protected:Npn \__nmc_table_num_format:N #1
-  { 
-    \bool_if:NTF \l__nmc_sci_num_table_bool
-      { 
-        \tl_if_head_eq_charcode:VNTF #1 ( 
-          { % for nums in [1,10)
-            \exp_last_unbraced:NV 
-                \__nmc_table_t_format:wN #1\q_stop \l_tmpa_tl
-            \tl_set_eq:NN #1 \l_tmpa_tl
-          }
-          { \tl_set:Nx #1 { \__nmc_sci_num_table:n { #1 } } }
-      }
-      { \tl_set:Nx #1 { \__nmc_sci_num_table:n { #1 } } }
-    \bool_if:NT \l__nmc_table_QA_bool
-      { \__nmc_table_QA:N #1 }
-  }
-\cs_new_protected:Npn \__nmc_table_QA:N #1
-  {
-    \fp_compare:nNnT { \l__nmc_table_Q_tl } = { 1 }
-      { 
-        \bool_lazy_and:nnT 
-            { \l__nmc_num_only_bool } { !\l__nmc_table_num_only_bool }
-          { 
-            \tl_set_eq:NN \l__nmc_table_num_only_tl \l_tmpb_tl 
-            \bool_set_true:N \l__nmc_table_num_only_bool
-          }
-        \tl_set:Nx #1 { \l__nmc_table_A_tl }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_t_format:wN (#1)#2#3\q_stop #4
-  { 
-    \tl_set:Nn \l__nmc_toss_tl { #1 }
-   \__nmc_table_prepad:Nnn \l__nmc_toss_tl
-     { \l__nmc_table_tsigns_int } { \exp_not:o \hphantom{-} }
-    \tl_set:Nx #4 { \__nmc_sci_num_table_plus:nn 
-        { #3 } { \exp_not:o\l__nmc_toss_tl } }
-  } 
-\cs_new_protected:Npn \__nmc_table_signs:
-  { % A prev, B current, C next
-    \int_compare:nNnTF \l__nmc_table_b_int > { -1 } 
-      {
-        \bool_lazy_or:nnTF
-            { \int_compare_p:nNn \l__nmc_table_a_int = { -1 } }
-            { \int_compare_p:nNn \l__nmc_table_c_int = { -1 } }
-          { \bool_set_true:N \l__nmc_table_signs_bool }
-          { \bool_set_false:N \l__nmc_table_signs_bool }
-      }
-      { \bool_set_false:N \l__nmc_table_signs_bool }
-  }
-%%%%%%%%%%
-\cs_new_protected:Npn \__nmc_table_calc_diffs:nn #1#2
-  { 
-    \__nmc_num_format:nNnN 
-      { \fp_abs:n {round( #1,\l__nmc_round_int ) 
-          - round( #2, \l__nmc_round_int) } } \l_tmpb_tl
-        { \l__nmc_round_int } \c_false_bool    
-    \tl_set:Nx \l_tmpb_tl { \fp_eval:n { round( 10^{ \l__nmc_round_int }
-        * \l_tmpb_tl, \l__nmc_round_int + 1) } }
-    \__nmc_table_prepad:Nnn \l_tmpb_tl { \l__nmc_table_diffs_int } { 0 }
-    \tl_set:Nx \l__nmc_table_diff_tl { ^{\,^{ \l_tmpb_tl } } }
-  }
-\cs_new_protected:Npn \__nmc_table_form_diffs_null:n #1
-  {
-    \tl_set:Nn \l_tmpb_tl { 0 }
-    \__nmc_table_prepad:Nnn \l_tmpb_tl { #1 } { 0 }
-    \tl_set:Nx \l__nmc_table_diff_tl 
-        { ^{\,^{ \exp_not:o \hphantom{ \l_tmpb_tl } } } }
-  }
-%%%%%%%%%%%%%%%%%%%
-\cs_new:Npn \__nmc_table_form_lower:
-  { 
-    \tl_if_empty:NF \l__nmc_table_footer_tl
-      { 
-        \__nmc_if_mod_zero:nnT { \l__nmc_table_rules_int } { 7 }
-          { \exp_not:N \midrule[\cmidrulewidth] }
-        \exp_not:o \l__nmc_table_footer_tl \tabularnewline
-      }
-    \__nmc_if_mod_zero:nnT { \l__nmc_table_rules_int } { 11 }
-      { \exp_not:N \bottomrule }  
-    \exp_not:n { \end{tabular} }
-  } 
-%%%%%%%%%%%%%%%%%%%
-\cs_new_protected:Npn \__nmc_table_reuse:
-  {
-    \bool_if:NF \l__nmc_num_only_bool
-      {
-        \int_case:nnF { \int_sign:n { \l__nmc_table_reuse_int } }
-          {
-            { -1 } { \__nmc_table_reuse_row:n { \l__nmc_table_reuse_int } } 
-             
-            {  1 } { \__nmc_table_reuse_col:n { \l__nmc_table_reuse_int } } 
-          }
-          { \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_reuse_row:n #1
-  { 
-    \tl_set:Nx \l_tmpa_seq 
-        { \seq_item:Nn \l__nmc_table_body_rows_seq { -#1 } }
-    \tl_gset:Nx \g__nmc_reuse_tl { \seq_use:Nn \l_tmpa_seq { , } }
-  }
-\cs_new_protected:Npn \__nmc_table_reuse_col:n #1
-  {
-    \int_zero:N \l_tmpa_int
-    \seq_map_variable:NNn \l__nmc_table_body_cols_seq \l_tmpa_seq
-      { 
-        \int_incr:N \l_tmpa_int
-        \int_compare:nNnT { \l_tmpa_int } = { #1 }
-          {
-            \seq_mapthread_function:NNN \l__nmc_table_rvraw_seq  
-                \l_tmpa_seq \__nmc_table_reuse:nn
-            \seq_map_break:
-          }
-      }
-  }
-\cs_new_protected:Npn \__nmc_table_reuse:nn #1#2
-  { 
-    \__nmc_num_format:nNnN { #1 } \l_tmpa_tl 
-        { \l__nmc_table_rround_int } \c_false_bool
-    \__nmc_num_format:nNnN { #2 } \l_tmpb_tl 
-        { \l__nmc_round_int } \l__nmc_sci_num_out_bool
-    \int_if_zero:nTF \l__nmc_table_rpos_int
-      { \seq_put_right:NV \l_nmc_table_reuse_seq \l_tmpb_tl }
-      { 
-        \seq_put_right:Nx \l_nmc_table_reuse_seq 
-            { { \l_tmpa_tl , \l_tmpb_tl } }
-      }
-    \tl_gset:Nx \g__nmc_reuse_tl { \seq_use:Nn \l_nmc_table_reuse_seq {,} }
-  }
-%------------------------------------------------
-\keys_define:nn { numerica }
-  { 
-    table-rvar-rounding .int_set:N = \l__nmc_table_rround_int,
-    table-rvar-col-pos  .int_set:N = \l__nmc_table_rpos_int,
-    table-rvar-align     .tl_set:N = \l__nmc_table_rcalign_tl,
-    table-cvar-align     .tl_set:N = \l__nmc_table_ccalign_tl,
-    table-block-sep      .tl_set:N = \l__nmc_table_blocsep_tl,
-    table-rules          .tl_set:N = \l__nmc_table_rules_tl,
-    table-form-diffs    .int_set:N = \l__nmc_table_diffs_int,
-    table-reuse         .int_set:N = \l__nmc_table_reuse_int,
-    table-rvar-rounding .default:n = 1,
-    table-rvar-align    .default:n = r,
-    table-rvar-col-pos  .default:n = 1,
-    table-cvar-align    .default:n = r,
-    table-block-sep     .default:n = 1ex,
-    table-rules         .default:n = ThB,
-    table-form-diffs    .default:n = 0,
-    table-reuse         .default:n = 0
-  }
-\keys_set_known:nn { numerica } 
-  { 
-    table-rvar-rounding,table-rvar-align,table-rvar-col-pos,
-    table-cvar-align,table-block-sep,table-rules,table-fontsize,
-    table-form-diffs,table-reuse
-  }
-\keys_define:nn { numerica/table }
-  {
-    rvar     .tl_set:N = \l__nmc_table_rvar_tl,
-    rstop    .tl_set:N = \l__nmc_table_rstop_tl,
-    rstep    .tl_set:N = \l__nmc_table_rstep_tl,
-    rows    .int_set:N = \l__nmc_table_rnum_int,
-    rows    .initial:n = -1,
-    rspec .clist_set:N = \l__nmc_table_rspec_clist,
-    rround  .int_set:N = \l__nmc_table_rround_int,
-    rfont      .code:n = \tl_set:Nn \l__nmc_table_rfont_tl 
-                              { \use:c { math#1 } },
-    ralign   .tl_set:N = \l__nmc_table_rcalign_tl,
-    rhead    .tl_set:N = \l__nmc_table_rhead_tl,
-    rhnudge    .code:n = \tl_set:Nn \l__nmc_table_rhnudge_tl 
-                             { \mkern #1 mu },
-    rpos    .int_set:N = \l__nmc_table_rpos_int,
-    rvar'    .tl_set:N = \l__nmc_table_rvari_tl,
-    rhead'   .tl_set:N = \l__nmc_table_rheadi_tl,
-    rhnudge'   .code:n = \tl_set:Nn \l__nmc_table_rhnudgei_tl 
-                             { \mkern #1 mu },
-%
-    cvar     .tl_set:N = \l__nmc_table_cvar_tl,
-    cstop    .tl_set:N = \l__nmc_table_cstop_tl,
-    cstep    .tl_set:N = \l__nmc_table_cstep_tl,
-    cols    .int_set:N = \l__nmc_table_cnum_int,
-    cols    .initial:n = -1,
-    cspec .clist_set:N = \l__nmc_table_cspec_clist,
-    calign   .tl_set:N = \l__nmc_table_ccalign_tl,
-    chstyle .int_set:N = \l__nmc_table_chstyle_int,
-    chnudge    .code:n = \tl_set:Nn \l__nmc_table_chnudge_tl 
-                             { \mkern #1 mu },
-    chead    .tl_set:N = \l__nmc_table_chead_tl,
-    chround .int_set:N = \l__nmc_table_chround_int,
-%
-    ctitle   .tl_set:N = \l__nmc_table_ctitle_tl,
-    rules    .tl_set:N = \l__nmc_table_rules_tl,
-    foot     .tl_set:N = \l__nmc_table_footer_tl,
-    rbloc .clist_set:N = \l__nmc_table_rbloc_clist,
-    rblocsep .tl_set:N = \l__nmc_table_blocsep_tl,
-    signs   .int_set:N = \l__nmc_table_signs_int,
-    (pad)   .int_set:N = \l__nmc_table_tsigns_int,
-    diffs   .int_set:N = \l__nmc_table_diffs_int,
-%
-    Q?       .tl_set:N = \l__nmc_table_Q_tl,
-    A!       .tl_set:N = \l__nmc_table_A_tl,
-    reuse   .int_set:N = \l__nmc_table_reuse_int,
-    valign     .code:n = \tl_set:Nn \l__nmc_table_valign_tl { [#1] },
-  }
-% end of `numerica-tables.def'
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/numerica/numerica.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/numerica/numerica.sty	2021-12-12 22:28:50 UTC (rev 61282)
+++ trunk/Master/texmf-dist/tex/latex/numerica/numerica.sty	2021-12-12 22:29:10 UTC (rev 61283)
@@ -1,5 +1,4 @@
-% This is file `numerica.sty',
-% the base of the `numerica' package.
+% This is file `numerica.sty'.
 %
 % This work may be distributed and/or modified under the conditions
 % of the LaTeX Project Public License, either version 1.3c of this 
@@ -8,16 +7,14 @@
 %
 % Andrew Parsloe (ajparsloe at gmail.com)
 %
-\RequirePackage{expl3}[2017/07/15]
-\RequirePackage{xparse,l3keys2e}
-\RequirePackage{amsmath,mathtools}
-
+\RequirePackage{l3keys2e}
+\RequirePackage{amsmath,mathtools,etoolbox}
 \ProvidesExplPackage
   {numerica}
-  {2021/02/15}
-  {1.0.0}
-  {Evaluate math expressions in the LaTeX form they are typeset}
-%------------------------------------------------
+  {2021/12/07}
+  {2.0.0}
+  {Numerically evaluate mathematical expressions in their LaTeX form}
+% needs amsmath
 \cs_if_free:NT \arccsc { \DeclareMathOperator{\arccsc}{arccsc} }
 \cs_if_free:NT \arcsec { \DeclareMathOperator{\arcsec}{arcsec} }
 \cs_if_free:NT \arccot { \DeclareMathOperator{\arccot}{arccot} }
@@ -31,15 +28,28 @@
 \cs_if_free:NT \acoth  { \DeclareMathOperator{\acoth}{acoth} }
 \cs_if_free:NT \sgn    { \DeclareMathOperator{\sgn}{sgn} }
 \cs_if_free:NT \lb     { \DeclareMathOperator{\lb}{lb} }
-% mathtools
+% needs mathtools
 \cs_if_free:NT \abs {\DeclarePairedDelimiter{\abs}{\lvert}{\rvert} }
 \cs_if_free:NT \ceil { \DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} }
 \cs_if_free:NT \floor { \DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} }
+%
 \RenewDocumentCommand \land {} { \,\wedge\, }
 \RenewDocumentCommand \lor {} { \,\vee\, }
-% Qleave apart; qleave to 
-\NewDocumentCommand \Q {} { \prg_do_nothing: }
-\NewDocumentCommand \q {} { \prg_do_nothing: }
+\NewDocumentCommand \Q {} { \prg_do_nothing: } % Qleave apart
+\NewDocumentCommand \q {} { \prg_do_nothing: } % qleave to 
+%
+\int_const:Nn \c__nmc_and_int { 0 }
+\int_const:Nn \c__nmc_cmp_int { 1 }
+\int_const:Nn \c__nmc_sum_int { 2 }
+\int_const:Nn \c__nmc_trg_int { 3 }
+\int_const:Nn \c__nmc_uny_int { 4 }
+\int_const:Nn \c__nmc_prn_int { 5 }
+\int_const:Nn \c__nmc_srd_int { 6 }
+\int_new:N \l__nmc_trg_int
+\int_new:N \l__nmc_num_sgn_int % tables
+\tl_new:N \l__nmc_toss_tl
+\seq_new:N \l_tmpc_seq
+% 
 \prg_new_conditional:Npnn \int_if_zero:n #1 { p,T,F,TF }
   { 
     \int_compare:nNnTF { #1 } = { 0 } 
@@ -56,80 +66,59 @@
       { \prg_return_true: } 
       { \prg_return_false: }
   }
-% constants
-\tl_const:Nn \c__nmc_digits_tl   { 123456789   }
-\tl_const:Nn \c__nmc_decimals_tl { 1234567890. }
-\tl_const:Nn \c__nmc_sdigits_tl  { -1234567890 }
-\tl_const:Nn \c__nmc_comparisons_tl { <=> }
-\tl_const:Nn \c__nmc_modds_tl { |./ }
-\int_const:Nn \c__nmc_and_int { 0 }
-\int_const:Nn \c__nmc_cmp_int { 1 }
-\int_const:Nn \c__nmc_sum_int { 2 }
-\int_const:Nn \c__nmc_trg_int { 3 }
-\int_const:Nn \c__nmc_uny_int { 4 }
-\int_const:Nn \c__nmc_prn_int { 5 }
-\int_const:Nn \c__nmc_srd_int { 6 }
-\seq_const_from_clist:Nn \c__nmc_T_out_seq { 1,T,\texttt{T} }
-\seq_const_from_clist:Nn \c__nmc_F_out_seq { 0,F,\texttt{F} }
-\int_new:N \l__nmc_trg_int
-\int_new:N \l__nmc_num_sgn_int
-\tl_new:N \l__nmc_toss_tl
-\seq_new:N \l_tmpc_seq
-%-----------------------------------------------------------
-% processing and substitution property lists
-% #1 clist of keys; #2 tl of values
+% fpify & delim property lists
+\prop_new:N \g__nmc_class_prop % latex tokens
+
+% #1(clist) tokens; #2(tl) { fpify: delim: } routines
 \cs_new_protected:Npn \__nmc_fill_class:nn #1#2
   {
     \clist_map_inline:nn { #1 }
       { \prop_gput:Nnn \g__nmc_class_prop { ##1 } { #2 } }
   }
-% math token classes
-\prop_new:N \g__nmc_class_prop
-% decimals
+%
 \__nmc_fill_class:nn { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, . } 
   { \__nmc_fpify_dec: \__nmc_delim_dec: }
-% constants
 \__nmc_fill_class:nn { e, \pi, \gamma, \phi, \deg, \infty }
-    { \__nmc_fpify_const: \__nmc_delim_const: }
-% plus minus
+  { \__nmc_fpify_const: \__nmc_delim_const: }
+% arith
 \__nmc_fill_class:nn { +, - }
-    { \__nmc_fpify_arith: \__nmc_delim_pm: }
-% arith.
+  { \__nmc_fpify_arith: \__nmc_delim_pm: }
 \prop_put:Nnn \g__nmc_class_prop { * }
-    { \__nmc_fpify_arith: \__nmc_delim_arith: }
-% slash
+  { \__nmc_fpify_arith: \__nmc_delim_arith: }
 \prop_put:Nnn \g__nmc_class_prop { / }
-    { \__nmc_fpify_slash: \__nmc_delim_arith: }
-% arith. alternatives
+  { \__nmc_fpify_slash: \__nmc_delim_arith: }
 \__nmc_fill_class:nn { \times, \cdot, \div }
   { \__nmc_fpify_arith_alt: \__nmc_delim_arith: }
+\prop_put:Nnn \g__nmc_class_prop { ^ }
+  { \__nmc_fpify_power: \__nmc_delim_power: }
+\__nmc_fill_class:nn { \frac, \dfrac }
+  { \__nmc_fpify_frac: \__nmc_delim_frac: }
+\prop_put:Nnn \g__nmc_class_prop { \tfrac }
+  { \__nmc_fpify_frac: \__nmc_delim_tfrac: }
 % comparisons
 \__nmc_fill_class:nn 
-  {
-    =, <, >, 
-    \ne, \neq, \nless, \ngtr,
-    \ge, \geq, \geqq, \geqslant,
-    \le, \leq, \leqq, \leqslant,
-    \ngeq, \ngeqq, \ngeqslant,
-    \nleq, \nleqq, \nleqslant,
-  } 
+    {
+      =, <, >, \ne, \neq, \nless, \ngtr,
+      \ge, \geq, \geqq, \geqslant, \le, \leq, \leqq, \leqslant,
+      \ngeq, \ngeqq, \ngeqslant, nleq, \nleqq, \nleqslant,
+    } 
   { \__nmc_fpify_comparison: \__nmc_delim_comparison: }
-% and or
+% logic, surd
 \__nmc_fill_class:nn { \wedge, \land, \vee, \lor }
   { \__nmc_fpify_andor: \__nmc_delim_andor: }
-% lparen
+\__nmc_fill_class:nn { \surd, \neg, \lnot }
+    { \__nmc_fpify_surd: \__nmc_delim_surd: }
+% left
 \__nmc_fill_class:nn { (, [, \{, \lparen, \lbrack, \lbrace }
   { \__nmc_fpify_lparen: \__nmc_delim_lparen: }
-% lvert etc.
 \__nmc_fill_class:nn { |, \lvert, \lfloor, \lceil }
   { \__nmc_fpify_lvert: \__nmc_delim_lvert: }
-% lmodifiers 
 \__nmc_fill_class:nn { \left, \bigl, \Bigl, \biggl, \Biggl }
   { \__nmc_fpify_lmod: \__nmc_delim_lmod: } 
-% rmodifiers 
+% right
 \__nmc_fill_class:nn { \right, \bigr, \Bigr, \biggr, \Biggr }
   { \prg_do_nothing: \__nmc_delim_rparen: } 
-% trig, hyper, other unary fns
+% unary fns: f 
 \__nmc_fill_class:nn { \sin, \cos, \tan, \csc, \sec, \cot }
   { 
     { \__nmc_fpify_unary:n { \l__nmc_trg_int } } 
@@ -146,87 +135,75 @@
     { \__nmc_fpify_unary:n { \c__nmc_uny_int } } 
     { \__nmc_delim_unary:n { \c__nmc_uny_int } } 
   }
-% power
-\prop_put:Nnn \g__nmc_class_prop { ^ }
-    { \__nmc_fpify_power: \__nmc_delim_power: }
-% (d)frac
-\__nmc_fill_class:nn { \frac, \dfrac }
-  { \__nmc_fpify_frac: \__nmc_delim_frac: }
-% tfrac
-\prop_put:Nnn \g__nmc_class_prop { \tfrac }
-  { \__nmc_fpify_frac: \__nmc_delim_tfrac: }
-% binom  
+% f!
+\prop_put:Nnn \g__nmc_class_prop { ! }
+  { \__nmc_fpify_fact: \__nmc_delim_fact: }
+% f{}
+\__nmc_fill_class:nn  { \sqrt, \abs, \floor, \ceil }
+  { \__nmc_fpify_unarybrace: \__nmc_delim_unarybrace: }
+% binary ( f_{arg1}{arg2}, f{arg1}{arg2} )
+\prop_put:Nnn \g__nmc_class_prop { \log }
+  { \__nmc_fpify_unarysub: \__nmc_delim_log: }
 \__nmc_fill_class:nn {  \tbinom, \binom, \dbinom }
   { \__nmc_fpify_binom: \__nmc_delim_frac: }
-% unary with braced arg 
-\__nmc_fill_class:nn  { \sqrt, \abs, \floor, \ceil }
-    { \__nmc_fpify_unarybrace: \__nmc_delim_unarybrace: }
-% unary subscripted
-\prop_put:Nnn \g__nmc_class_prop { \log }
-    { \__nmc_fpify_unarysub: \__nmc_delim_log: }
-% surd, not
-\__nmc_fill_class:nn { \surd, \neg, \lnot }
-    { \__nmc_fpify_surd: \__nmc_delim_surd: }
-% factorial
-\prop_put:Nnn \g__nmc_class_prop { ! }
-    { \__nmc_fpify_fact: \__nmc_delim_fact: }
-% cleave
-\__nmc_fill_class:nn { \q, \Q  }
-    { \prg_do_nothing: \__nmc_delim_qleave: }
-% n-ary
+% nary f(arg1,...)
 \__nmc_fill_class:nn { \min, \max, \gcd }
   { \__nmc_fpify_nary: \__nmc_delim_nary: }
-% comma (n-ary fns)
 \prop_put:Nnn \g__nmc_class_prop { , }
-    { \__nmc_fpify_comma: \__nmc_delim_comma: }
+  { \__nmc_fpify_comma: \__nmc_delim_comma: }
+% fontlike (ignore cmd; heed {arg} )
+\__nmc_fill_class:nn
+    { 
+      \mathrm, \mathit, \mathcal, \mathtt, \mathbf, \mathbb, 
+      \mathsf, \mathfrak, \mathscr, \mathnormal, \boldsymbol,
+      \ensuremath, \smash, \textrm, \textsf, \texttt
+    }
+  { \__nmc_fpify_font: \__nmc_delim_font: }
+% ignore cmd, [arg1], {arg2}; heed {arg3}
+\prop_put:Nnn \g__nmc_class_prop { \textcolor }
+  { \__nmc_fpify_color: \__nmc_delim_color: }  
+% splitfrac ( ignore cmd, heed {arg1}{arg2} )
+\__nmc_fill_class:nn { \splitfrac, \splitdfrac }
+  { \__nmc_fpify_splitfrac: \__nmc_delim_append_twobraced: }
 % absorb
 \__nmc_fill_class:nn
     { 
-      {{}}, \\, &, \to, \q_nil,
-      \dots, \ldots, \cdots, 
-      \ , \,, \;, \:, \!, \>,
-      \thinspace, \quad, \qquad , \hfill, \hfil,
-      \mathstrut, \displaystyle, \textstyle, 
-      \scriptstyle, \scriptscriptstyle
+      {{}}, \\, &, \to, \q_nil, \dots, \ldots, \cdots,
+      \quad, \qquad, \hfill, \hfil, \mathstrut, $, \(, \), \[, \],
+      \ , \,, \;, \:, \!, \>, \thinspace, \medspace, \thickspace, \negthinspace, \negmedspace, \negthickspace,
+      \displaystyle, \textstyle, \scriptstyle, \scriptscriptstyle,
     }
   { \prg_do_nothing: \__nmc_delim_absorb: }
-% absorbm
-\__nmc_fill_class:nn { \vphantom, \hphantom, \phantom, \label }
-  { \__nmc_fpify_absorbm: \__nmc_delim_absorbm: }
-% absorbom
-\__nmc_fill_class:nn { \xmathstrut }
-  { \__nmc_fpify_absorbom: \__nmc_delim_absorbom: } 
+\__nmc_fill_class:nn 
+  { \vphantom, \hphantom, \phantom, \label, \mspace, \mbox, \text }
+  { \__nmc_fpify_absorb_m: \__nmc_delim_absorb_i: }
+\__nmc_fill_class:nn { \hspace }
+  { \__nmc_fpify_absorb_sm: \__nmc_delim_absorb_ii: } 
+\__nmc_fill_class:nn  { \xmathstrut, \color }
+  { \__nmc_fpify_absorb_om: \__nmc_delim_absorb_ii: }
+% ams environs f{arg1} (& f{arg1}{arg2} for aligned, aligned*) 
+\__nmc_fill_class:nn { \begin, \end } 
+  { \__nmc_fpify_BE: \__nmc_delim_BE: }
+% cleave
+\__nmc_fill_class:nn { \q, \Q  }
+  { \prg_do_nothing: \__nmc_delim_cleave: }
 % sum, prod
 \__nmc_fill_class:nn { \sum, \prod }
-    { \__nmc_fpify_sum: \__nmc_delim_sum: }
-% begin end
-\__nmc_fill_class:nn { \begin, \end }
-  {  \__nmc_fpify_BE: \__nmc_delim_BE: }
-% font
-\__nmc_fill_class:nn
-    { 
-      \mathrm, \mathit, \mathcal, \mathtt, \mathbf, \mathbb, 
-      \mathsf, \mathfrak, \mathscr, \mathnormal, \boldsymbol
-    }
-  { \__nmc_fpify_font: \__nmc_delim_font: }
-% meta  
-\__nmc_fill_class:nn { \ensuremath, \text, \mbox }
-  { \__nmc_fpify_meta: \__nmc_delim_stop: }
-% meta2
-\__nmc_fill_class:nn { \splitfrac, \splitdfrac }
-  { \__nmc_fpify_metamm: \__nmc_delim_metamm: }
+  { \__nmc_fpify_sum: \__nmc_delim_sum: }
 % nmcFn
 \__nmc_fill_class:nn 
     { 
-      \eval, \iter, \solve, \recur, \tabulate,
-      \nmcEvaluate, \nmcIterate, \nmcSolve,
-      \nmcRecur, \nmcTabulate
+      \eval, \nmcEvaluate, \iter, \nmcIterate, \solve, \nmcSolve,
+      \recur, \nmcRecur, \tabulate, \nmcTabulate, \info, \nmcInfo,
+      \constants, \nmcConstants, \reuse, \nmcReuse
     }
   { \__nmc_fpify_cmd: \__nmc_delim_cmd: }
-  
-\__nmc_fill_class:nn { \nmcInfo } { \__nmc_fpify_info: \__nmc_delim_info: }   
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% math token replacements for l3fp evaluation
+% substitution classes %%%%%%%%%%%%%%%%%%%%%%%%%%
+\prop_new:N \l__nmc_subst_var_prop % variables
+\prop_new:N \g__nmc_subst_var_prop % macros (user & reuse)
+\prop_new:N \g__nmc_subst_fpfn_prop % math toks for l3fp eval
+\prop_new:N \g__nmc_subst_misc_prop % misc subst
+
 % #1 prop; #2 seq (keys); #3 seq (values)
 \cs_new_protected:Npn \__nmc_subst:NNN #1#2#3
   {
@@ -234,7 +211,6 @@
       { \prop_gput:Nnn #1 { ##1 } { ##2 } }
     \seq_mapthread_function:NNN #2 #3 \__nmc_substitutions:nn
   }
-\prop_new:N \g__nmc_subst_fpfn_prop
 \seq_set_from_clist:Nn \l_tmpa_seq 
   {
     e, \pi, \gamma, \phi, \deg, \infty,
@@ -243,10 +219,8 @@
     \sinh, \cosh, \tanh, \csch, \sech, \coth, 
     \asinh, \acosh, \atanh, \acsch, \asech, \acoth,
     \exp, \ln, \lg, \lb, \sgn, 
-    \max, \min, \surd, \sqrt,
-    \abs, \floor, \ceil,
-    \lvert, \lfloor, \lceil,
-    \times, \cdot, \div, 
+    \max, \min, \surd, \sqrt, \times, \cdot, \div,
+    \abs, \floor, \ceil, \lvert, \lfloor, \lceil,
     \neg, \lnot, \wedge, \land, \vee, \lor,
     \le, \leq, \leqq, \leqslant, 
     \ge, \geq, \geqq, \geqslant,
@@ -264,20 +238,14 @@
     sinh, cosh, tanh, csch, sech, coth,  
     asinh, acosh, atanh, acsch, asech, acoth,
     exp, ln, (0.4342944819032518)ln, (1.442695040888963)ln, sign, 
-    max, min, sqrt, sqrt,
-    abs, floor, ceil,
-    abs, floor, ceil,
-    *, *, /, 
+    max, min, sqrt, sqrt, *, *, /, 
+    abs, floor, ceil, abs, floor, ceil,
     !, !, &&, &&, ||, ||,
-    <=, <=, <=, <=, 
-    >=, >=, >=, >=,
-    !=, !=, !<, !>, 
-    !<=, !<=, !<=, !>=, !>=, !>=
+    <=, <=, <=, <=, >=, >=, >=, >=,
+    !=, !=, !<, !>, !<=, !<=, !<=, !>=, !>=, !>=
   }
 \__nmc_subst:NNN \g__nmc_subst_fpfn_prop \l_tmpa_seq \l_tmpb_seq 
 
-% property list for some miscellaneous substitutions
-\prop_new:N \g__nmc_subst_misc_prop
 \seq_set_from_clist:Nn \l_tmpa_seq
     { 
       \cosh, \sinh, \tanh, \csch, \sech, \coth,
@@ -284,7 +252,10 @@
       (, [, \{, \lparen, \lbrack, \lbrace,
       \left, \bigl, \Bigl, \biggl, \Biggl, 
       \lvert, \lceil, \lfloor,
-      sum, prod, iter, solve
+      sum, prod, deriv, integ, iter, solve,
+      \eval, \nmcEvaluate, \iter, \nmcIterate, \solve, \nmcSolve,
+      \recur, \nmcRecur, \tabulate, \nmcTabulate, \info, \nmcInfo,
+      \constants, \nmcConstants, \reuse, \nmcReuse
     } 
 \seq_set_from_clist:Nn \l_tmpb_seq
     { 
@@ -292,14 +263,14 @@
       ), ], \}, \rparen, \rbrack, \rbrace,
       \right, \bigr, \Bigr, \biggr, \Biggr, 
       \rvert, \rceil, \rfloor,
-      term, factor, iteration, step
+      term, factor, bisection, subdivision, iteration, step,
+      eval, eval, iter, iter, solve, solve,
+      recur, recur, table, table, info, info,
+      consts, consts, reuse, reuse
     }
 \__nmc_subst:NNN \g__nmc_subst_misc_prop \l_tmpa_seq \l_tmpb_seq
 
-% for variables & \reuse \cs
-\prop_new:N \g__nmc_subst_var_prop
-%---------------------------------------------------------------------------
-% base function variants
+% base function variants %%%%%%%%%%%%%%%%%%%%%%%%
 \cs_generate_variant:Nn \tl_if_head_eq_meaning:nNTF { V }
 \cs_generate_variant:Nn \tl_if_head_eq_meaning:nNF { V }
 \cs_generate_variant:Nn \tl_if_head_eq_meaning_p:nN { V }
@@ -326,14 +297,10 @@
 \cs_generate_variant:Nn \file_get:nnN { V }
 \cs_generate_variant:Nn \file_get:nnNT { V }
 \cs_generate_variant:Nn \file_get:nnNTF { V }
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% general purpose routines
-\tl_new:N \l__nmc_A_tl
-\tl_new:N \l__nmc_B_tl
-\tl_new:N \l__nmc_C_tl
-\tl_new:N \l__nmc_L_tl
-\tl_new:N \l__nmc_R_tl
-% prune head from A, place in B; record new head of A in C
+% general purpose routines %%%%%%%%%%%%%%%%%%%%%%
+% \tl_new:N \l__nmc_A_tl etc.
+\clist_map_inline:nn { A,B,C,L,R } { \tl_new:c { l__nmc_#1_tl } }
+% prune head from A, put in B; record new head of A in C
 \cs_new_protected:Npn \__nmc_next:
   { \exp_last_unbraced:NV\__nmc_next:w \l__nmc_A_tl\q_stop }
 \cs_new_protected:Npn \__nmc_next:w #1#2#3\q_stop
@@ -355,9 +322,9 @@
   { \tl_set:Nx #1 { ( \exp_not:o #1 ) } }  
 \cs_new_protected:Npn \__nmc_accum_fn_parenth:NNn #1#2#3
   { \tl_put_right:Nx #1 { #3( \exp_not:o #2 ) } }
-
+% (fpify) #2, append to #1
 \cs_new_protected:Npn \__nmc_accum_fpify_parenth:NN #1#2
-  { % fpify #2, wrap in ( ), append to #1
+  {
     \group_begin:
     \tl_clear:N \l_tmpa_tl
     \__nmc_fpify:VN #2 \l_tmpa_tl
@@ -365,8 +332,9 @@
     \group_end:
         \__nmc_accum_fn_parenth:NNn #1\l_tmpa_tl{}
   }
+ % (fp-ify) next braced arg, append to #1
 \cs_new_protected:Npn \__nmc_fpify_next_braced:N #1
-  { % fp-ify next braced argument, parenthesize, append to #1
+  { 
     \__nmc_next:
     \__nmc_accum_fpify_parenth:NN #1 \l__nmc_B_tl
   }
@@ -373,7 +341,6 @@
 % wrap #3 in #2 & #4, & append to #1
 \cs_new_protected:Npn \__nmc_put_right_wrap:NnNn #1#2#3#4
   { \tl_put_right:Nx #1 { #2 \exp_not:o #3 #4 } }
-
 \cs_new_protected:Npn \__nmc_get_arg_L:nN #1#2
   {
     \tl_set:Nn \l__nmc_L_tl { #1 }
@@ -386,8 +353,8 @@
   { \__nmc_get_arg_LR:NNN #1#2#3 }
 \cs_generate_variant:Nn \__nmc_get_arg_L_aux:NNn { NNV }
 
-% #1 left delim; #2 <-- arg (delims *not* included)
-% #3 right delim (*must* differ from #1)
+% #1 ldelim; #2 <-- arg (delims *not* included)
+% #3 rdelim (*must* differ from #1)
 \cs_new_protected:Npn \__nmc_get_arg_LR:NNN #1#2#3
   { 
     \int_set:Nn \l_tmpa_int { 1 }
@@ -404,6 +371,7 @@
           { \tl_put_right:Nn #2 { ##1 } }
           { \tl_put_right:Nn #2 { {##1} } }
       }
+      
   }
 \cs_new_protected:Npn \__nmc_get_arg_LR_rdelim:
   {
@@ -417,11 +385,11 @@
     \tl_map_break: 
   }
 % #1 <== multi-char num poss. in sci notation
-% #2 delim only bool
+% #2 delim: vs fpify: bool
 \cs_new_protected:Npn \__nmc_get_dec:NN #1#2 
-  { 
+  {         
     \tl_set:NV #1 \l__nmc_B_tl
-    \__nmc_get_dec_digits:NN #1 \c__nmc_decimals_tl
+    \__nmc_get_dec_digits:Nn #1 { 1234567890. }
     \bool_lazy_and:nnT { \l__nmc_sci_num_in_bool } 
         { \tl_if_eq_p:NN \l__nmc_C_tl \l__nmc_sci_num_in_tl }
       { \__nmc_get_dec_aux:NN #1#2 }
@@ -438,12 +406,12 @@
   }
  \cs_new_protected:Npn \__nmc_get_dec_aux:NNn #1#2#3
   {
-    \tl_if_in:NVTF \c__nmc_digits_tl \l__nmc_C_tl
+    \tl_if_in:nVTF { 123456789 } \l__nmc_C_tl
       { 
         \bool_if:NTF #2
           { \tl_put_right:NV #1 \l__nmc_sci_num_in_tl }
           { \tl_put_right:Nn #1 { #3 } }
-        \__nmc_get_dec_digits:NN #1 \c__nmc_sdigits_tl
+        \__nmc_get_dec_digits:Nn #1 { -1234567890 }
       }
       { 
         \tl_set_eq:NN \l__nmc_C_tl \l__nmc_sci_num_in_tl
@@ -452,12 +420,12 @@
         \tl_put_left:NV \l__nmc_A_tl \l__nmc_sci_num_in_tl
       }
   }
-\cs_new_protected:Npn \__nmc_get_dec_digits:NN #1#2
+\cs_new_protected:Npn \__nmc_get_dec_digits:Nn #1#2
   {
     \tl_map_inline:Nn \l__nmc_A_tl
-      {
-        \tl_if_in:NnTF #2 { ##1 }
-          { 
+      {    
+        \tl_if_in:nnTF { #2 } { ##1 }
+          {
             \tl_put_right:Nn #1 { ##1 }
             \__nmc_next:
           }
@@ -464,11 +432,12 @@
           { \tl_map_break: }
       }
   }
-% for factorial, binom, n-th root, sum/prod
+% intify fp (for !, binom, n-th root, sum/prod)
+% #2(e.g. = 0,1,-1) <= #1(tl) <-- int 
 \cs_new_protected:Npn \__nmc_intify:Nn #1#2
-  { % #1 value; #2 lower bound (e.g. 0,1,-1)
-    \int_set:Nn \l_tmpa_int { \l__nmc_intify_round_tl }
-    \fp_compare:nTF { { #2 } <= round(#1+0,\l_tmpa_int) = round(#1+0) }
+  { 
+    \fp_compare:nTF 
+        { { #2 } <= round(#1+0,\l__nmc_intify_round_tl) = round(#1+0) }
       {  \tl_set:Nx #1 { \fp_eval:n { round(#1+0) } } }
       { 
         \fp_compare:nNnTF { #2 } = { -inf }
@@ -476,19 +445,20 @@
           { \__nmc_error_what:n { Integer~$\ge#2$~required~in } }
       }
   }
-%------------------------------------------------  
-% explicit/implicit calc. of fn vals (sum/prod, tables, etc.)
-% #1 var; #2 fn; #3 var val (fp); #4 <= fn val  at #3
+% calc fn vals; explicit/implicit eval. of vv-list
+% #1(tl) var; #2(tl) fn; #3(fp) var val; #4(fp) <-- fn val
+% mode 0 (no vals in vv-list change)
 \cs_new_protected:Npn \__nmc_calc_fn_val:nNnN #1#2#3#4
-  { 
-    \prop_put:Nnx \g__nmc_subst_var_prop { #1 } { \fp_eval:n { #3 } }
-    \__nmc_fpify_set:NN #4 #2
+  {
+    \prop_put:Nnx \l__nmc_subst_var_prop { #1 } { \fp_to_tl:n { #3 } }
+    \__nmc_fpify_set:NV #4 #2
   }
+\cs_generate_variant:Nn \__nmc_calc_fn_val:nNnN { V } 
 \cs_new_protected:Npn \__nmc_calc_mode:n #1
   {
-    \int_set:Nn \l__nmc_mode_int { #1 }
-    \int_case:nn { #1 }
-      {
+    \tl_set:Nx \l__nmc_mode_tl { \int_eval:n { #1 } }
+    \str_case:Vn \l__nmc_mode_tl
+      { 
         { 1 } { \cs_set_eq:NN \__nmc_calc_fn_val:nNnN
                     \__nmc_calc_fn_vali:nNnN }
         { 2 } { \cs_set_eq:NN \__nmc_calc_fn_val:nNnN
@@ -495,48 +465,57 @@
                     \__nmc_calc_fn_valii:nNnN }
       }
   }
-\cs_generate_variant:Nn \__nmc_calc_fn_val:nNnN { V }  
-
+\cs_generate_variant:Nn \__nmc_calc_mode:n { V }
+% mode 1 (all vals in vv-list may change)
 \cs_new_protected:Npn \__nmc_calc_fn_vali:nNnN #1#2#3#4
-  { % mode 1 (all vals in vv-list may change)
-    \prop_put:Nnx \l__nmc_vv_change_prop { #1 } { \fp_eval:n { #3 } }
+  { 
+    \prop_put:Nnx \l__nmc_vv_change_prop { #1 } { \fp_to_tl:n { #3 } }
     \__nmc_vv_get_vars_vals:NN \l__nmc_calc_fn_seq \l__nmc_vv_change_prop
-    \__nmc_fpify_set:NN #4 #2
+    \__nmc_fpify_set:NV #4 #2
   }
+% mode 2 (some vals in vv-list held const.)  
 \cs_new_protected:Npn \__nmc_calc_fn_valii:nNnN #1#2#3#4
-  { % mode 2 (some vals in vv-list held const.) 
-    \prop_put:Nnx \l__nmc_vv_change_prop { #1 } { \fp_eval:n { #3 } }
+  { 
+    \prop_put:Nnx \l__nmc_vv_change_prop { #1 } { \fp_to_tl:n { #3 } }
     \clist_map_inline:Nn \g__nmc_unchanged_clist
       {
-        \prop_get:NnN \g__nmc_subst_var_prop { ##1 } \l__nmc_subst_tl
+        \prop_get:NnN \l__nmc_subst_var_prop { ##1 } \l__nmc_subst_tl
         \prop_put:NnV \l__nmc_vv_change_prop { ##1 } \l__nmc_subst_tl
       }
     \__nmc_vv_get_vars_vals:NN \l__nmc_calc_fn_seq \l__nmc_vv_change_prop
-    \__nmc_fpify_set:NN #4 #2
+    \__nmc_fpify_set:NV #4 #2
   }
-\cs_new_protected:Npn \__nmc_fpify_set:NN #1#2
-  { % fp-set #1 to fpified #2
+% fp-set #1 to fpified #2  
+\cs_new_protected:Npn \__nmc_fpify_set:Nn #1#2
+  { 
     \group_begin:
     \tl_clear:N \l_tmpa_tl
-    \__nmc_fpify:VN #2 \l_tmpa_tl
+    \__nmc_fpify:nN { #2 } \l_tmpa_tl
     \exp_args:NNNV
     \group_end:
-        \tl_set:Nn \l__nmc_fp_exprn_tl { \l_tmpa_tl }
+        \tl_set:Nn \l__nmc_fp_exprn_tl \l_tmpa_tl
         \fp_set:Nn #1 { \l__nmc_fp_exprn_tl }
     \__nmc_error_fpflag:
   }
-\cs_generate_variant:Nn \__nmc_fpify_set:NN { cc }
-\cs_new_protected:Npn \__nmc_verb:n #1
-  { \texttt{ \tl_trim_spaces:n { \tl_to_str:n { #1 } } } }
+\cs_generate_variant:Nn \__nmc_fpify_set:Nn { NV, cv }
+
+\cs_new:Npn \__nmc_verb:n #1
+  { \texttt{\string #1} }
 \cs_generate_variant:Nn \__nmc_verb:n { V }
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Error handling
+\cs_new:Npn \__nmc_verb:N #1
+  { \texttt{\string #1} }
+\cs_generate_variant:Nn \__nmc_verb:N { c }
+% Error handling %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \seq_new:N  \g__nmc_error_where_seq
 \bool_new:N \g__nmc_error_bool
-%--------------------------------------  
 \cs_new_protected:Npn \__nmc_error_where:n #1
-  { \seq_gpush:Nn \g__nmc_error_where_seq { #1 } }
-
+  { 
+    \seq_gpush:Nn \g__nmc_error_where_seq 
+      { #1
+        \int_compare:nNnT { \l__nmc_depth_int } > { 1 }
+          { ~(\int_eval:n { (\l__nmc_depth_int-1)/2 } ) } 
+      }
+  }
 \cs_new_protected:Npn \__nmc_error_what:n #1
   { 
     \bool_gset_true:N \g__nmc_error_bool
@@ -545,6 +524,7 @@
   }
 \cs_new_protected:Npn \__nmc_error_msg:n #1
   { 
+    \tl_set:Nn \l_tmpa_tl { ??? }
     \seq_if_empty:NF \g__nmc_error_where_seq
       { 
         \seq_gpop:NN \g__nmc_error_where_seq \l_tmpa_tl
@@ -551,10 +531,11 @@
         \hbox:n { !!!~  #1 :~\l_tmpa_tl.~!!! }
       }
   }
-% l3fp exceptions; invalid op triggers a LaTeX *error*, hence:
+% l3fp exceptions; ln(1),cos(90),sin(360) underflow ignored!
+%  Invalid op --> LaTeX *error*, hence
 \fp_trap:nn { invalid_operation } { flag }
 \cs_new_protected:Npn \__nmc_error_fpflag:
-  { % ln(1),cos(90),sin(360) => underflow. Ignored!
+  { 
     \flag_if_raised:nTF { fp_overflow  } { \__nmc_flag:n { 1 } }
       { \flag_if_raised:nTF { fp_division_by_zero } { \__nmc_flag:n { 2 } } 
          { \flag_if_raised:nT { fp_invalid_operation }
@@ -566,24 +547,17 @@
   { 
     \__nmc_error_what:n 
       { 
-        \__nmc_verb:n{l3fp}~error~
-        \int_case:nnT { #1 }
-          { 
-            { 1 } { `Overflow' }
-            { 2 } { `Division~by~zero' }
-            { 3 } { `Invalid~operation' }
-          } 
-          { ~in } 
+        \__nmc_verb:n{l3fp}~error~` \clist_item:nn
+            { Overflow, Division~by~zero, Invalid~operation }{ #1 }'~in
       }
-  }   
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% multi-tok vars (primed, subscripted, ...) to single tok
-% assumes math delims absent
+  }  
+%%%%%%%% multi-tok --> single token vars %%%%%%%%
+% no math delims; #1(seq) vv-list; #2(tl) formula 
 \int_new:N \g__nmc_prep_multitok_int
 \tl_new:N \l_nmc_multitoka_tl
 \tl_new:N \l_nmc_multitokb_tl
 \cs_new_protected:Npn \__nmc_prep_multitok:NN #1#2
-  { % #1 vv-list (seq); #2 formula (tl) 
+  { 
     \seq_clear:N \l_tmpa_seq
     \seq_map_inline:Nn #1
       {
@@ -599,12 +573,12 @@
           { \sort_return_same: } 
       }
     \seq_map_inline:Nn \l_tmpa_seq
-      {  % multitoks => \_nmca, \_nmcb, etc
+      {  % multitoks => \nmc_a, \nmc_b, etc
         \int_gincr:N \g__nmc_prep_multitok_int
         \tl_set:Nn \l_nmc_multitoka_tl { ##1 }
-        \tl_set:Nx \l_nmc_multitokb_tl { \cs:w _nmc\int_to_alph:n 
+        \tl_set:Nx \l_nmc_multitokb_tl { \cs:w nmc_\int_to_alph:n 
             { \g__nmc_prep_multitok_int } \cs_end: }
-        \tl_set:cn { _nmc\int_to_alph:n { \g__nmc_prep_multitok_int } }
+        \tl_set:cn { nmc_\int_to_alph:n { \g__nmc_prep_multitok_int } }
             { ##1 }
         \regex_replace_all:nnN 
             { \u{l_nmc_multitoka_tl} } { \u{l_nmc_multitokb_tl} } #1
@@ -612,203 +586,231 @@
             { \u{l_nmc_multitoka_tl} } { \u{l_nmc_multitokb_tl} } #2
       }
   }
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \nmcInfo (no. of terms/loops/steps in "infinite" processes)
-\tl_new:N \g__nmc_sum_info_tl
-\tl_new:N \g__nmc_prod_info_tl
-\NewDocumentCommand \nmcInfo { s m }
-  { 
-    \prop_if_in:NnTF \g__nmc_subst_misc_prop { #2 }
-      { 
-        \tl_if_empty:cT { g__nmc_#2_info_tl }
-          { \tl_set:cn { g__nmc_#2_info_tl } { 0 } }
-        \tl_use:c { g__nmc_#2_info_tl }
-        \IfBooleanF { #1 }
-          { 
-            \prop_get:NnN \g__nmc_subst_misc_prop { #2 } \l_tmpb_tl
-            \ \l_tmpb_tl % pluralise?
-            \int_if_zero:nF { \tl_use:c { g__nmc_#2_info_tl } - 1 } { s } 
-          }
-      }
-      {
-        \__nmc_error_where:n { info~command }
-        \__nmc_error_what:n { Unknown~argument~\__nmc_verb:n { #2 }~in }
-      }
-  }
-\ProvideDocumentCommand \info {} { \nmcInfo }
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\int_new:N \l__nmc_mode_int
-\tl_new:N \l__nmc_formula_tl
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\int_new:N \l__nmc_depth_int
+\tl_new:N \l__nmc_mode_tl
+\tl_new:N \l_nmc_formula_tl
+\fp_new:N \l__nmc_result_fp
+\tl_new:N \l_nmc_result_tl
 \tl_new:N \l__nmc_formula_dup_tl
 \tl_new:N \l__nmc_fp_expr_tl      
 \tl_new:N \l__nmc_fp_exprn_tl
-\tl_new:N \l_nmc_result_tl
-\bool_new:N  \l__nmc_vv_val_only_bool
-\clist_new:N \l__nmc_vv_clist
-\seq_new:N   \l__nmc_vv_visible_seq
-\seq_new:N   \l__nmc_vv_all_seq
-\seq_new:N   \l__nmc_calc_fn_seq
-\prop_new:N \l__nmc_vv_change_prop
-\tl_new:N \l__nmc_eq_var_tl
-\tl_new:N \l__nmc_eq_val_tl
-\tl_new:N \l__nmc_vv_fp_expr_tl
+\bool_new:N \l__nmc_dbg_count_bool
+\tl_new:N \l__nmc_dbg_vv_tl
+\tl_new:N \l__nmc_dbg_idii_tl
+\tl_new:N \l__nmc_dbg_idiii_tl
+\tl_new:N \l__nmc_dbg_idv_tl
+\seq_new:N \l__nmc_dbg_stored_seq
 \int_new:N \l__nmc_round_int
-\int_new:N \l__nmc_sci_num_int
-\int_new:N \l__nmc_prime_int
+\int_new:N \l__nmc_sci_expon_int
+\int_new:N \l__nmc_num_alt_int
 \tl_new:N  \l__nmc_bool_F_tl
 \tl_new:N  \l__nmc_bool_T_tl
 \bool_new:N \l__nmc_TF_out_bool
 \bool_new:N \l__nmc_allow_TF_out_bool
 \bool_new:N \l__nmc_sci_num_x_bool
-\bool_new:N \l__nmc_sci_num_table_bool 
-\tl_new:N   \l__nmc_punc_tl 
-\tl_new:N   \l__nmc_math_delimi_tl
-\tl_new:N   \l__nmc_math_delimii_tl
+\bool_new:N \l__nmc_sci_num_table_bool
+\bool_new:N \l__nmc_vv_val_only_bool
+\bool_new:N \l__nmc_vv_invisible_bool
+\clist_new:N \l__nmc_vv_clist
+\seq_new:N \l__nmc_vv_visible_seq
+\seq_new:N \l__nmc_vv_no_consts_seq
+\seq_new:N \l__nmc_vv_all_seq
+\seq_new:N \l__nmc_calc_fn_seq
+\prop_new:N \l__nmc_vv_change_prop
+\tl_new:N \l__nmc_eq_var_tl
+\tl_new:N \l__nmc_eq_val_tl
+\tl_new:N \l__nmc_vv_fp_expr_tl
+\tl_new:N \l__nmc_punc_tl 
+\tl_new:N \l__nmc_math_delimi_tl
+\tl_new:N \l__nmc_math_delimii_tl
 \bool_new:N \l__nmc_wraps_math_bool
 % ##1 = number-only switch, ##2 = keyval settings,
-% ##3 = formula, ##4 = vv-list, ##5 = number format,
-% #1 = \nmcCommand, #2 = id, #3 =short-name cmd
-\cs_new_protected:Npn \nmc_define:nnN  #1#2#3
-  {
-    \NewDocumentCommand { #1 } { s O{} m O{} O{} }
-      { 
-        \bool_gset_false:N \g__nmc_error_bool
+% ##3 = formula, ##4 = vv-list, ##5 = number-format spec.,
+% #1 = \nmcCommand, #2 = cmd id, #3 = short-name cmd
+\cs_new_protected:Npn \nmc_define:NnN  #1#2#3
+  { 
+    \NewDocumentCommand #1 { s O{} m O{} O{} }
+      {
         \group_begin:
-          \bool_set_eq:NN \l__nmc_num_only_bool ##1
-          \__nmc_get_inputs:nnnnn { #2 } { ##2 } { ##3 } {##4 } {##5 }
-          \bool_if:NF \g__nmc_error_bool
-            { \use:c { __nmc_#2_process: } }
-          \int_if_zero:nTF { \l__nmc_debug_int } 
-            { 
-              \bool_if:NF \g__nmc_error_bool
-                { \use:c { __nmc_#2_display: } }
-            }
-            { \__nmc_debug_display:nn { \l__nmc_debug_int } { #2 } }  
+        \__nmc_initialize:Nn ##1 { #2 }
+        \__nmc_inputs_get:nnnnn { #2 } { ##2 } { ##3 } {##4 } {##5 }
+        \bool_if:NF \g__nmc_error_bool
+          { \use:c { __nmc_#2_process: } }
+        \int_if_zero:nTF { \l__nmc_dbg_int } 
+          { 
+            \bool_if:NF \g__nmc_error_bool
+              { \use:c { __nmc_#2_display: } }
+          }
+          { \__nmc_dbg_display:nn { \l__nmc_dbg_int } { #2 } } 
         \group_end:
       }
-    \ProvideDocumentCommand { #3 } { } { #1 }
+    \ProvideDocumentCommand #3 {} { #1 }
+    \cs_new_protected:cpn { __nmc_#2_vv_digest:N } ##1 
+        { }
+    \clist_map_inline:nn { initialize, settings_digest, process, display }
+      { \cs_new_protected:cpn { __nmc_#2_##1: } { \prg_do_nothing: } }
   } 
-\nmc_define:nnN { \nmcEvaluate } { eval } \eval
+\nmc_define:NnN \nmcEvaluate { eval } \eval
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\cs_new_protected:Npn \__nmc_get_inputs:nnnnn #1#2#3#4#5
+\cs_new_protected:Npn \__nmc_initialize:Nn #1#2
   {
-    \__nmc_settings_get:nn { #1 }{ #2 }
+    \bool_gset_false:N \g__nmc_error_bool
+    \bool_set_eq:NN \l__nmc_num_only_bool #1
+    \bool_set_false:N \l__nmc_sci_num_out_bool
+    \bool_set_false:N \l__nmc_sci_num_x_bool
+    \bool_set_false:N \l__nmc_sci_num_table_bool
+    \int_incr:N \l__nmc_depth_int 
+    \int_compare:nNnT \l__nmc_depth_int > { 1 } % for nesting
+      { \bool_set_true:N \l__nmc_num_only_bool }
+    \prop_concat:NNN \l__nmc_subst_var_prop 
+        \g__nmc_subst_var_prop \l__nmc_subst_var_prop
+    \tl_set:Nn \l__nmc_dbg_idii_tl { vv-list }
+    \use:c { __nmc_#2_initialize: }
+  }
+\cs_new_protected:Npn \__nmc_inputs_get:nnnnn #1#2#3#4#5
+  { 
+    \__nmc_error_where:n { settings }
+    \tl_if_empty:nF { #2 } 
+      { 
+        \keys_set_known:nn { numerica/generic } { #2 } 
+        \keys_set_known:xn { numerica/#1 }{ #2 }
+      }
     \use:c { __nmc_#1_settings_digest: }
+    \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
     \bool_if:NF \g__nmc_error_bool
       { 
         \mode_if_math:TF 
-          { \tl_set:Nn \l__nmc_formula_tl { #3 } }
+          { \tl_set:Nn \l_nmc_formula_tl { #3 } }
           { \__nmc_math_delims:n { #3 } } 
-        \tl_set_eq:NN \l__nmc_formula_dup_tl \l__nmc_formula_tl
+        \tl_set_eq:NN \l__nmc_formula_dup_tl \l_nmc_formula_tl 
       }
     \bool_if:NF \g__nmc_error_bool
-      { 
-        \tl_if_in:nnTF { #4 } { = }
-          { % vv-list
+      {  
+        \tl_if_in:nnTF { #4 } { = }% vv-list
+          { 
+            \__nmc_get_num_format:n { #5 } 
+            \__nmc_error_where:n { variable\,=\,value~list }
             \__nmc_vv_extract_visible:nN { #4 } \l__nmc_vv_clist
             \use:c { __nmc_#1_vv_digest:N } \l__nmc_vv_clist
-            \bool_if:NF \g__nmc_error_bool
-              { % number format
-                \tl_if_empty:nF { #5 }
-                  { \__nmc_get_num_format:nn { #5 } { #1 } }
-              }
           }
-          { % if empty vv-list
+          { % empty vv-list
+            \__nmc_get_num_format:n { #4#5 }
+            \use:c { __nmc_#1_vv_digest:N } \c_empty_clist
             \tl_clear:N \l__nmc_vv_inline_tl
             \tl_clear:N \l__nmc_vv_display_tl
-            \__nmc_get_num_format:nn { #4#5 } { #1 }
+            \bool_set_true:N \l__nmc_vv_invisible_bool
           }
+        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl  
       }
   }
-\cs_new_protected:Npn \__nmc_settings_get:nn #1#2
-  { % #1 = iter,solve,recur,table; #2 = settings
-    \__nmc_error_where:n { settings }
-    \tl_if_empty:nF { #2 } 
-      { 
-        \keys_set_known:nn { numerica/generic } { #2 } 
-        \keys_set_known:xn { numerica/#1 }{ #2 }
-      }
-  }
-\cs_new_protected:Npn \__nmc_debug_display:nn #1#2
-  { \__nmc_debug_display:xnn { \mode_if_math:TF { ed }{ * } } { #1 } { #2 } }
-\cs_new_protected:Npn \__nmc_debug_display:nnn #1#2#3
-  { % #2 dbg int #3 fn id
-    \__nmc_if_mod_zero:nnT { #2 } { 5 }
-      { \__nmc_debug_stored:N \l_tmpb_tl } 
-    \raggedright
+%%%%%%%%%%%%%%%%% debug routines %%%%%%%%%%%%%%%%
+\cs_new_protected:Npn \__nmc_dbg_display:nn #1#2
+  { \__nmc_dbg_display:xnn { \mode_if_math:TF { ed }{ * } } { #1 } { #2 } }
+\cs_new_protected:Npn \__nmc_dbg_display:nnn #1#2#3
+  { % #2 dbg int, #3 fn id
+    \seq_reverse:N \l__nmc_vv_all_seq
+    \raggedright 
     \begin{ align#1 }
-      \__nmc_debug_display:xnnn { \seq_use:Nn \l__nmc_vv_all_seq { ,~ } }
-          { #2 } { 2 } { vv-list } 
-      \__nmc_debug_display:Vnnn \l__nmc_formula_tl { #2 } { 3 } { formula } 
-      \__nmc_debug_display:Vnnn \l_tmpb_tl { #2 } { 5 } { stored  } 
-      \__nmc_debug_display:Vnnn \l__nmc_fp_expr_tl { #2 } { 7 } { fp-form }
-      \bool_if:nT 
-          { 
-            !\g__nmc_error_bool && 
-            \__nmc_if_mod_zero_p:nn { #2 } { 7 } &&
-            !\str_if_eq_p:nn { #3 } { table }
-          }
-        { \text{result:} & \quad \l_nmc_result_tl }
-      \__nmc_debug_display:Vnnn \l__nmc_reuse_retrieved_tl 
-          { #2 } { 99991 } { Saved }
+      \__nmc_if_mod_zero:nnT { #2 } { 2 }
+        { \__nmc_dbg:Nnn \l__nmc_dbg_vv_tl { #2 } \l__nmc_dbg_idii_tl } 
+      \__nmc_if_mod_zero:nnT { #2 } { 3 }
+        { \__nmc_dbg:Nnn \l_nmc_formula_tl { #2 } \l__nmc_dbg_idiii_tl }
+      \__nmc_if_mod_zero:nnT { #2 } { 5 }
+        {
+          \__nmc_dbg_stored:
+          \__nmc_dbg:Nnn \l_tmpa_tl { #2 } \l__nmc_dbg_idv_tl 
+        }
+      \__nmc_if_mod_zero:nnT { #2 } { 7 }
+        {
+          \__nmc_dbg:Nnn \l__nmc_fp_expr_tl { #2 } { fp-form }
+          \bool_if:nT { !\g__nmc_error_bool 
+                        && !\str_if_eq_p:nn { #3 } { table } }
+            { \\ \text{result:} & \quad \text{\l_nmc_result_tl } }
+        }
     \end{ align#1 }
+    \bool_set_false:N \l__nmc_dbg_count_bool
   }
-\cs_generate_variant:Nn \__nmc_debug_display:nnn { x }
-
-\cs_new_protected:Npn \__nmc_debug_stored:N #1 
-  {
-    \tl_clear:N \l_tmpa_tl
-    \tl_if_empty:NF \l__nmc_reuse_retrieved_tl
+\cs_generate_variant:Nn \__nmc_dbg_display:nnn { x }
+ 
+\cs_new_protected:Npn \__nmc_dbg_vv_view:n #1
+ { 
+    \seq_set_eq:NN \l__nmc_vv_no_consts_seq \l__nmc_vv_all_seq
+    \int_step_inline:nn { \seq_count:N \g__nmc_consts_vv_seq }
+      { \seq_pop:NN \l__nmc_vv_no_consts_seq \l__nmc_toss_tl }
+    \seq_reverse:N \l__nmc_vv_no_consts_seq
+    \int_step_inline:nn { #1 }
+      { \seq_pop:NN \l__nmc_vv_no_consts_seq \l__nmc_toss_tl }
+    \tl_gset:Nx \l__nmc_dbg_vv_tl
+        { \seq_use:Nn \l__nmc_vv_no_consts_seq {,~} }
+  }
+\cs_new_protected:Npn \__nmc_dbg_get_data:
+  { 
+    \seq_clear:N \l__nmc_dbg_stored_seq
+    \__nmc_dbg_vv_view:n { 0 }
+    \seq_map_inline:Nn \l__nmc_vv_no_consts_seq
       { 
-        \clist_map_inline:Nn \l__nmc_reuse_retrieved_tl
-          { \tl_put_left:Nx \l_tmpa_tl { \exp_not:o { \use_i:nn ##1 }; } }
-        \tl_replace_all:Nnn \l_tmpa_tl { ~; } { ; }
+        \__nmc_split_eq:w ##1\q_stop
+        \prop_get:NVN \l__nmc_subst_var_prop \l__nmc_eq_var_tl \l_tmpa_tl
+        \tl_put_left:Nn \l_tmpa_tl { = }
+        \tl_put_left:NV \l_tmpa_tl \l__nmc_eq_var_tl
+        \seq_put_right:NV \l__nmc_dbg_stored_seq \l_tmpa_tl
       }
-    \tl_clear:N #1
-    \prop_map_inline:Nn \g__nmc_subst_var_prop 
+  }
+\cs_new_protected:Npn \__nmc_dbg_stored:
+  { 
+    \seq_clear:N \l_tmpa_seq
+    \seq_map_inline:Nn \l__nmc_dbg_stored_seq
       {
-        \str_if_in:NnF \l_tmpa_tl { ##1; }
-          { \tl_put_right:Nn #1 { ##1=##2,~ } } 
+        \prop_get:NnNTF \l__nmc_subst_var_prop { ##1 } \l_tmpa_tl
+          {
+            \tl_put_left:Nn \l_tmpa_tl { ##1= }
+            \seq_put_right:NV \l_tmpa_seq \l_tmpa_tl
+          }
+          { \seq_put_right:Nn \l_tmpa_seq { ##1 } }
       }
-    \tl_set:Nx #1 { \tl_range:Nnn #1 { 1 } { -2 } }
+    \tl_gset:Nx \l_tmpa_tl { \seq_use:Nn \l_tmpa_seq {,~} }
   }
-\cs_new:Npn \__nmc_debug_display:nnnn #1#2#3#4
+\cs_new:Npn \__nmc_dbg:Nnn #1#2#3
   { 
-    \__nmc_if_mod_zero:nnT { #2 } { #3 }
-      { \hbox:n { #4:} & \quad 
-        \int_compare:nNnTF { #2 } > { 0 }
-          { \vbox_top:n } { \hbox:n } { \tl_to_str:n { #1 } } \\ }
+    \bool_if:NT \l__nmc_dbg_count_bool { \\ }
+    \hbox:n { #3:} & \quad 
+    \int_compare:nNnTF { #2 } > { 0 }
+      { \vbox_top:n } { \hbox:n } { \tl_to_str:N #1 } 
+    \bool_set_true:N \l__nmc_dbg_count_bool
   }
-\cs_generate_variant:Nn \__nmc_debug_display:nnnn { V, x }
-%%%%%%%%% formula, delimiters %%%%%%%%%%%
-% delimiters
-% #1(tl) = formula
+\cs_generate_variant:Nn \__nmc_dbg_display:nnnn { V, x }
+%%%%%%%%%%%%%% formula, delimiters %%%%%%%%%%%%%%
 \cs_new_protected:Npn \__nmc_math_delims:n #1
-  {
-    \tl_set:Nn \l__nmc_formula_tl { #1 }
-    \tl_trim_spaces:N \l__nmc_formula_tl
+  { % #1 formula 
+    \tl_set:Nn \l_nmc_formula_tl { #1 }
+    \tl_trim_spaces:N \l_nmc_formula_tl
     \bool_set_true:N \l__nmc_wraps_math_bool
     % $ ?
-    \tl_if_head_eq_meaning:VNTF \l__nmc_formula_tl $
+    \tl_if_head_eq_meaning:VNTF \l_nmc_formula_tl $
       { \__nmc_math_delims_aux:n { 1 } }
-      { % \[ ?
-        \tl_if_head_eq_meaning:VNTF \l__nmc_formula_tl \[
+      {
+        \tl_if_head_eq_meaning:VNTF \l_nmc_formula_tl \(
           { \__nmc_math_delims_aux:n { 1 } }
-          { %\begin{environ} ?
-            \tl_if_head_eq_meaning:VNTF \l__nmc_formula_tl \begin
-              { \__nmc_math_delims_aux:n { 2 } }
-              { 
-                \__nmc_math_delims_aux:nn { \[ } { \] } 
-                \bool_set_false:N \l__nmc_wraps_math_bool
-              }
-          }
+            { % \[ ?
+              \tl_if_head_eq_meaning:VNTF \l_nmc_formula_tl \[
+                { \__nmc_math_delims_aux:n { 1 } }
+                { %\begin{environ} ?
+                  \tl_if_head_eq_meaning:VNTF \l_nmc_formula_tl \begin
+                    { \__nmc_math_delims_aux:n { 2 } }
+                    { 
+                      \__nmc_math_delims_aux:nn { \[ } { \] } 
+                      \bool_set_false:N \l__nmc_wraps_math_bool
+                    }
+                }
+            }
       }
-    \tl_trim_spaces:N \l__nmc_formula_tl
+    \tl_trim_spaces:N \l_nmc_formula_tl
     \bool_if:NTF \l__nmc_num_only_bool
       { \__nmc_math_delims_aux:nn {}{} }
       { 
         \bool_if:NT \l__nmc_vv_multline_bool
-          { \__nmc_math_delims_mliner:V \l__nmc_eq_num_tl }
+          { \__nmc_math_delims_mliner:V \l__nmc_eqn_num_tl }
       }
   }
 \cs_new:Npn \__nmc_math_delims_mliner:n #1
@@ -823,12 +825,11 @@
 \cs_new_protected:Npn \__nmc_math_delims_aux:n #1
   {
     \__nmc_math_delims_aux:xx
-        { \tl_range:Nnn \l__nmc_formula_tl { 1 } { #1 } }
-        { \tl_range:Nnn \l__nmc_formula_tl { -#1 } { -1 } } 
+        { \tl_range:Nnn \l_nmc_formula_tl { 1 } { #1 } }
+        { \tl_range:Nnn \l_nmc_formula_tl { -#1 } { -1 } } 
     \int_set:Nn \l_tmpa_int { #1 + 1 }
-    \tl_set:Nx \l__nmc_formula_tl 
-        { \tl_range:Nnn \l__nmc_formula_tl { \l_tmpa_int } 
-        { -\l_tmpa_int } }
+    \tl_set:Nx \l_nmc_formula_tl 
+        { \tl_range:Nnn \l_nmc_formula_tl { \l_tmpa_int } { -\l_tmpa_int } }
   }
 \cs_new_protected:Npn \__nmc_math_delims_aux:nn #1#2
   {
@@ -836,50 +837,213 @@
     \tl_set:Nn \l__nmc_math_delimii_tl { #2 }
   }
 \cs_generate_variant:Nn \__nmc_math_delims_aux:nn { xx }
-%%%%%%%%%% vv-list routines %%%%%%%%%%%
+
+%%%%%%%%%% number-formatting routines %%%%%%%%%%%
+\cs_new_protected:Npn \__nmc_get_num_format:n #1
+  {
+    \__nmc_error_where:n { result~format~spec. }
+    \str_set:Nn \l_tmpa_str { #1 }
+    \tl_clear:N \l_tmpa_tl
+    \int_zero:N \l__nmc_num_alt_int
+    \str_if_in:NnTF \l_tmpa_str { ? }
+      { \__nmc_num_bool_spec: }
+      {
+        \str_if_in:NnT \l_tmpa_str { * }
+          { 
+            \bool_set_true:N \l__nmc_pad_zeros_bool 
+            \str_remove_all:Nn \l_tmpa_str { * }
+          }
+      }
+    \str_map_inline:Nn \l_tmpa_str
+      {
+        \str_if_in:nnTF { 1234567890- } { ##1 }
+          { \tl_put_right:Nn \l_tmpa_tl { ##1 } }
+          { \__nmc_num_sci_spec:n { ##1 } }
+      }
+    \tl_if_empty:NF \l_tmpa_tl
+      { \int_set:Nn \l__nmc_round_int \l_tmpa_tl }
+    \int_compare:nNnT { \l__nmc_depth_int } > { 2 }
+      { \__nmc_num_deep_output:N \l_tmpa_tl }
+    \bool_if:NF \g__nmc_error_bool
+      { \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl }
+  }
+\cs_new_protected:Npn \__nmc_num_bool_spec:
+  { 
+    \bool_set_eq:NN \l__nmc_TF_out_bool \l__nmc_allow_TF_out_bool
+    \int_incr:N \l__nmc_num_alt_int
+    \str_remove_once:Nn \l_tmpa_str { ? }
+    \str_if_in:NnT \l_tmpa_str { ? }
+      { 
+        \int_incr:N \l__nmc_num_alt_int
+        \str_remove_once:Nn \l_tmpa_str { ? }
+        \str_if_in:NnT \l_tmpa_str { ? }
+          {
+            \int_incr:N \l__nmc_num_alt_int
+            \str_remove_all:Nn \l_tmpa_str { ? }
+          }
+      }
+    \bool_if:NT \l__nmc_num_only_bool 
+      { \int_set:Nn \l__nmc_num_alt_int { 1 }  }
+  }
+\cs_new_protected:Npn \__nmc_num_sci_spec:n #1
+  {
+    \str_case:nn { #1 }
+      {
+        { x } { \bool_set_true:N \l__nmc_sci_num_x_bool }
+        { t } { \bool_set_true:N \l__nmc_sci_num_table_bool }
+      }
+    \tl_set:Nn \l__nmc_sci_num_out_tl { #1 }
+    \bool_set_true:N \l__nmc_sci_num_out_bool
+    \int_incr:N \l__nmc_num_alt_int 
+  }
+\cs_new_protected:Npn \__nmc_num_deep_output:N #1
+  {
+    \bool_set_true:N \l__nmc_sci_num_out_bool
+    \bool_set_false:N \l__nmc_sci_num_x_bool
+    \bool_set_false:N \l__nmc_sci_num_table_bool
+    \tl_set:Nn \l__nmc_sci_num_out_tl { e }
+    \bool_set_false:N \l__nmc_pad_zeros_bool
+    \int_zero:N \l__nmc_num_alt_int
+  }
+%%%%%%%%%%
+% #1=fpify-ed in; #2=tl fmt'ed out; #3=int rnd; #4 sci bool
+\cs_new_protected:Npn \__nmc_num_format:nNnN #1#2#3#4
+  { 
+    \bool_if:NTF \l__nmc_TF_out_bool
+      { \__nmc_num_bool_out:nNn { #1 } #2 { \l__nmc_num_alt_int } }
+      { 
+        \bool_if:NTF #4
+          { 
+            \exp_last_unbraced:Nx \__nmc_sci_output_aux:wNn 
+                { \fp_to_scientific:n { #1 } } \q_stop #2 { #3 }
+          }
+          { \__nmc_num_format_decimal:nNn { #1 } #2 { #3 } }
+      }
+  }
+\cs_new_protected:Npn \__nmc_num_bool_out:nNn #1#2#3
+  {
+    \fp_compare:nNnTF { 0 } = { #1 }
+      { \tl_set:Nx #2 { \clist_item:nn {0,F,\texttt{F}} { #3 } } }
+      { \tl_set:Nx #2 { \clist_item:nn {1,T,\texttt{T}} { #3 } } } 
+  }
+\cs_new_protected:Npn \__nmc_num_format_decimal:nNn #1#2#3
+  {
+    \tl_set:Nx #2 { \fp_eval:n { 0 + round( #1, #3 ) } }
+    \__nmc_error_fpflag:
+    \bool_if:NF \g__nmc_error_bool
+      {
+        \int_set:Nn \l__nmc_num_sgn_int { \fp_sign:n { #2 } }
+        \bool_lazy_and:nnT { \l__nmc_pad_zeros_bool } 
+            { \int_compare_p:nNn { #3 } > { 0 } } 
+          { \__nmc_num_pad:Nn #2 { #3 } }
+      }
+  }
+\cs_new_protected:Npn \__nmc_num_pad:Nn #1#2
+  { 
+    \tl_if_in:NnTF #1 { . }
+      { \tl_set:Nx #1 { \__nmc_num_pad_aux:Vn  #1 { #2 } } }
+      { \tl_set:Nx #1 { \__nmc_num_pad_aux:Vn  { #1.} { #2 } } }
+  }
+\cs_new:Npn \__nmc_num_pad_aux:nn #1#2
+  { \__nmc_num_pad:wN #1\q_stop { #2 } }
+\cs_generate_variant:Nn \__nmc_num_pad_aux:nn { V }
+\cs_new:Npn \__nmc_num_pad:wN #1.#2\q_stop#3
+  { 
+    \int_if_zero:nTF { #3 } { #1 }
+        { #1.#2\prg_replicate:nn { #3 - \tl_count:n { #2 } } { 0 } }
+  }
+\cs_new_protected:Npn \__nmc_sci_output_aux:wNn #1e#2\q_stop#3#4
+  { % #1e#2=fp input; #3=formatted tl out; #4 = rounding 
+    \tl_set:Nx #3 { \fp_eval:n { 0 + round( #1, #4 ) } }
+    \__nmc_error_fpflag:
+    \bool_if:NF \g__nmc_error_bool
+      {
+        \int_set:Nn \l__nmc_sci_expon_int { #2 }
+        \tl_if_eq:VnT #3 { 10 }
+          {
+            \int_incr:N \l__nmc_sci_expon_int
+            \tl_set:Nn #3 { 1 }
+          }
+        \bool_if:NT \l__nmc_pad_zeros_bool
+          { \__nmc_num_pad:Nn #3 { #4 } }
+        \bool_lazy_or:nnT { !\int_if_zero_p:n { \l__nmc_sci_expon_int } }
+            { \int_compare_p:nNn { \l__nmc_num_alt_int } > { 1 } }
+          { 
+            \bool_if:NTF \l__nmc_sci_num_table_bool
+              { \tl_put_left:Nx #3 { \__nmc_sci_num_table:n { #2 } } }
+              {
+                \tl_put_right:Nx #3 { \__nmc_sci_write:n 
+                    { \int_use:N \l__nmc_sci_expon_int } }
+              }
+          }
+      }
+    \int_set:Nn \l__nmc_num_sgn_int { \fp_sign:n { #1 } } % tables
+  }
+\cs_new:Npn \__nmc_sci_write:n #1
+  { % #1 exponent
+    \int_compare:nNnTF { \l__nmc_depth_int } > { 2 }
+      { e#1 }
+      {
+        \bool_if:NTF \l__nmc_sci_num_x_bool
+          { \exp_not:N \times 10^{#1} } 
+          { \hbox:n { \l__nmc_sci_num_out_tl {#1} } }
+      }
+  }
+\cs_new:Npn \__nmc_sci_num_table:n #1
+  { (#1)\exp_not:n {\,} }
+% vv-list routines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \cs_new_protected:Npn \__nmc_vv_extract_visible:nN #1#2
   { % #2 reverses #1
-    \clist_clear:N #2
     \seq_clear:N \l__nmc_vv_visible_seq
     \clist_set:Nn \l_tmpa_clist { #1 } 
     \mode_if_math:F
       {
-        \tl_remove_all:Nn \l_tmpa_clist { $ }
-        \tl_if_head_eq_charcode:VNT \l_tmpa_clist \[
-          { 
-            \tl_remove_once:Nn \l_tmpa_clist { \[ } 
-            \tl_remove_once:Nn \l_tmpa_clist { \] } 
-          }
+        \__nmc_vv_remove_delims:N \l_tmpa_clist
         \tl_trim_spaces:N \l_tmpa_clist
-      } 
-    \clist_map_inline:Nn \l_tmpa_clist 
-      {
+      }
+    \clist_clear:N #2 
+    \clist_map_inline:Nn \l_tmpa_clist % to remove { }
+      { 
         \tl_if_head_is_group:nTF { ##1 }
-          { % to remove { }
-            \clist_put_left:Nx #2
-                { \tl_head:n { ##1 } \tl_tail:n { ##1 } }
-          }
+          { \clist_put_left:Nx #2 { \tl_head:n { ##1 } \tl_tail:n { ##1 } } }
           { 
             \seq_put_right:Nn \l__nmc_vv_visible_seq { ##1 } 
-            \tl_if_head_eq_meaning:nNF { ##1 } \\
-              { \clist_put_left:Nn #2 { ##1 } }
+            \clist_put_left:Nn #2 { ##1 }
           }
       }
-    \tl_replace_once:Nnx \l__nmc_vv_inline_tl { vv } 
-        { \seq_use:Nn \l__nmc_vv_visible_seq { , } }
-    \tl_replace_once:Nnx \l__nmc_vv_display_tl { vv }
-        { \seq_use:Nn \l__nmc_vv_visible_seq { , } }
+    \__nmc_vv_subst_style:
   }
+\cs_new_protected:Npn \__nmc_vv_remove_delims:N #1 
+  {
+    \exp_args:Nx\str_case:nn { \tl_head:N #1 }
+      {
+        { $ } { \tl_remove_all:Nn #1 { $ } }
+        { \( } { \tl_map_inline:nn {\(\)} { \tl_remove_once:Nn #1 { ##1 } } }
+        { \[ } { \tl_map_inline:nn {\[\]} { \tl_remove_once:Nn #1 { ##1 } } }
+      }
+  }
+\cs_new_protected:Npn \__nmc_vv_subst_style:
+  {
+    \seq_if_empty:NTF \l__nmc_vv_visible_seq
+      { \bool_set_true:N \l__nmc_vv_invisible_bool }
+      { 
+        \tl_map_inline:nn { \l__nmc_vv_inline_tl \l__nmc_vv_display_tl }
+            { \tl_replace_once:Nnx ##1 { vv } 
+                { \seq_use:Nn \l__nmc_vv_visible_seq { , } } }
+      }
+  }
 \cs_new_protected:Npn \__nmc_vv_digest:N #1
-  {
+  { 
     \seq_set_from_clist:NN \l__nmc_vv_all_seq #1
-    \__nmc_error_where:n { variable\,=\,value~list }
+    \seq_concat:NNN \l__nmc_vv_all_seq 
+        \g__nmc_consts_vv_seq \l__nmc_vv_all_seq 
     \bool_if:NT \l__nmc_multitok_bool
-      { \__nmc_prep_multitok:NN \l__nmc_vv_all_seq \l__nmc_formula_tl }
+      { \__nmc_prep_multitok:NN \l__nmc_vv_all_seq \l_nmc_formula_tl }
     \__nmc_vv_get_vars_vals:NN \l__nmc_vv_all_seq \c_empty_prop
   } 
+% #1(seq) vv-list;#2(prop) changed vars (implicit-mode)
 \cs_new_protected:Npn \__nmc_vv_get_vars_vals:NN #1#2
-  { % #1(seq) vv-list;#2(prop) changed vars (implicit-mode)
+  { 
     \seq_set_eq:NN \l_tmpa_seq #1
     \seq_clear:N \l__nmc_calc_fn_seq
     \seq_map_inline:Nn \l_tmpa_seq
@@ -897,15 +1061,11 @@
     \bool_if:NF \g__nmc_error_bool
       { \__nmc_vv_record:NVN \l__nmc_eq_var_tl \l__nmc_eq_val_tl #2 }
   }
+% changed `var=vals in prop #3
 \cs_new_protected:Npn \__nmc_vv_record:NnN #1#2#3
   { 
-    \bool_if:NF \l__nmc_vv_val_only_bool
-      { % record the var
-        \prop_put_if_new:Non \g__nmc_class_prop #1 
-            { \__nmc_fpify_var: \__nmc_delim_var: } 
-      }
     \prop_get:NVNF #3 #1 \l__nmc_vv_fp_expr_tl
-      { % fp-ify & calc. (changed `var=val's in prop #3)
+      { 
         \tl_clear:N \l__nmc_vv_fp_expr_tl
         \__nmc_fpify:nN { #2 } \l__nmc_vv_fp_expr_tl
       }
@@ -917,22 +1077,18 @@
       { \__nmc_vv_write:VN #1 \l__nmc_vv_fp_expr_tl }
   }
 \cs_generate_variant:Nn \__nmc_vv_record:NnN { NV }
-
+% #1 = var; #2 = val as fp expr.
 \cs_new_protected:Npn \__nmc_vv_write:nN #1#2
-  { % #1 = var; #2 = val as fp expr.
+  { 
     \tl_if_empty:NF #2
       { 
         \tl_if_eq:VnTF #2 { inf }
-          { \prop_put:Nnn \g__nmc_subst_var_prop { #1 } { inf } }
-          { 
-            \prop_put:Nnx \g__nmc_subst_var_prop 
-                { #1 } { \fp_eval:n { #2 } }
-            \__nmc_error_fpflag:
-          }
+          { \prop_put:Nnn \l__nmc_subst_var_prop { #1 } { inf } }
+          { \prop_put:Nnx \l__nmc_subst_var_prop { #1 } { \fp_to_tl:n {#2} } } 
+        \__nmc_error_fpflag:
       }
   }
 \cs_generate_variant:Nn \__nmc_vv_write:nN { V }
-% split var=val
 \cs_new_protected:Npn \__nmc_vv_split_item:n #1
   {
     \bool_set_false:N \l__nmc_vv_val_only_bool
@@ -949,163 +1105,48 @@
   }
 \cs_generate_variant:Nn \__nmc_vv_split_item:n { V }
 \cs_new_protected:Npn \__nmc_split_eq:w #1=#2\q_stop
-  {
+  { 
     \tl_set:Nn \l__nmc_eq_var_tl { #1 }
     \tl_trim_spaces:N \l__nmc_eq_var_tl
     \tl_set:Nn \l__nmc_eq_val_tl { #2 }
   }
-%%%%%%%%%% number-formatting routines %%%%%%%%%%
-\cs_new_protected:Npn \__nmc_get_num_format:nn #1#2
-  { 
-    \__nmc_error_where:n { result~format~spec. }
-    \tl_clear:N \l_tmpa_tl
-    \str_map_inline:nn { #1 }
-      {
-        \str_if_in:NnTF \c__nmc_sdigits_tl { ##1 }
-          { \tl_put_right:Nn \l_tmpa_tl { ##1 } }
-          { 
-            \str_if_eq:nnTF { ##1 } { * }
-              { \bool_set_true:N \l__nmc_pad_zeros_bool }
-              {
-                \bool_set_true:N \l__nmc_sci_num_out_bool
-                \str_case:nnF { ##1 }
-                  {
-                    { x } { \bool_set_true:N \l__nmc_sci_num_x_bool
-                              \tl_set:Nn \l__nmc_sci_num_out_tl { ##1 } }
-                    { t } { \bool_set_true:N \l__nmc_sci_num_table_bool }
-                    { ' } { \int_incr:N \l__nmc_prime_int }
-                  }
-                  { \tl_set:Nn \l__nmc_sci_num_out_tl { ##1 } }
-              }
-          }
-      }
-    \str_if_in:nnT { #1 } { ? }
-      { 
-        \bool_set_eq:NN \l__nmc_TF_out_bool \l__nmc_allow_TF_out_bool
-        \bool_set_false:N \l__nmc_sci_num_out_bool
-      }
-    \tl_if_empty:NF \l_tmpa_tl
-      { \int_set:Nn \l__nmc_round_int \l_tmpa_tl }
-    \bool_if:NT \l__nmc_TF_out_bool
-      { 
-        \bool_if:NTF \l__nmc_num_only_bool
-          { \__nmc_num_TF_format:n { 1 } }
-          { \__nmc_num_TF_format:n { 1 + \l__nmc_prime_int } }
-      }
-    \bool_if:NF \g__nmc_error_bool
-      { \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl }
-  }
-%%%%%%%%%%
-\cs_new_protected:Npn \__nmc_num_TF_format:n #1
-  { 
-    \tl_set:Nx \l__nmc_bool_F_tl { \seq_item:Nn \c__nmc_F_out_seq { #1 } }
-    \tl_set:Nx \l__nmc_bool_T_tl { \seq_item:Nn \c__nmc_T_out_seq { #1 } }
-  }
-\cs_new_protected:Npn \__nmc_num_format:nNnN #1#2#3#4
-  { % #1=fpf'ied in; #2=tl fmt'ed out; #3=int rnd; #4 sci bool
-    \bool_if:NTF \l__nmc_TF_out_bool
-      { 
-        \tl_set:Nx #2 { \fp_compare:nNnTF { 0 } = { #1 }
-            { \exp_not:o \l__nmc_bool_F_tl } 
-            { \exp_not:o \l__nmc_bool_T_tl } } 
-      }
-      { 
-        \bool_if:NTF #4
-          { 
-            \exp_last_unbraced:Nx \__nmc_sci_output_aux:wNn 
-                { \fp_to_scientific:n { #1 } } \q_stop #2 { #3 }
-          }
-          { \__nmc_num_format_decimal:nNn { #1 } #2 { #3 } }
-      }
-  }
-\cs_new_protected:Npn \__nmc_num_format_decimal:nNn #1#2#3
+% eval-specific routines %%%%%%%%%%%%%%%%%%%%%%%%
+\cs_gset_protected:Npn \__nmc_eval_initialize:
   {
-    \tl_set:Nx #2 { \fp_eval:n { 0 + round( #1, #3 ) } }
-    \__nmc_error_fpflag:
-    \bool_if:NF \g__nmc_error_bool
-      {
-        \int_set:Nn \l__nmc_num_sgn_int { \fp_sign:n { #2 } }
-        \bool_lazy_and:nnT { \l__nmc_pad_zeros_bool } 
-            { \int_compare_p:nNn { #3 } > { 0 } } 
-          { 
-            \tl_if_in:NnTF #2 { . }
-              { \__nmc_num_pad:Nnn #2 {} { #3 } }
-              { \__nmc_num_pad:Nnn { #2 } {.} { #3 } }
-          }
-      }
+    \tl_set:Nn \l__nmc_dbg_idiii_tl { formula }
+    \tl_set:Nn \l__nmc_dbg_idv_tl { stored }
   }
-\cs_new_protected:Npn \__nmc_num_pad:Nnn #1#2#3
-  { % pad with 0s: #1 number; #2 point  #3 rounding
-    \tl_set:Nx #1 { \exp_last_unbraced:NV 
-        \__nmc_num_pad:wnN #1#2\q_stop{ #3 } }
-  }
-\cs_new:Npn \__nmc_num_pad:wnN #1.#2\q_stop#3
+\cs_gset_protected:Npn \__nmc_eval_settings_digest: 
+  { \bool_set_true:N \l__nmc_allow_TF_out_bool }
+
+\cs_gset_eq:NN \__nmc_eval_vv_digest:N \__nmc_vv_digest:N
+
+\cs_gset_protected:Npn \__nmc_eval_process:
   { 
-    \int_if_zero:nTF { #3 } { #1 }
-        { #1.#2\prg_replicate:nn { #3 - \tl_count:n { #2 } } { 0 } }
-  }
-\cs_new_protected:Npn \__nmc_sci_output_aux:wNn #1e#2\q_stop#3#4
-  { % #1e#2=fp input; #3=formatted tl out; #4 = rounding 
-    \tl_set:Nx #3
-        { \fp_eval:n { 0 + round( #1, #4 ) } }
-    \__nmc_error_fpflag:
+    \__nmc_error_where:n { formula }
+    \tl_clear:N \l__nmc_fp_expr_tl
+    \__nmc_fpify:VN \l_nmc_formula_tl \l__nmc_fp_expr_tl
     \bool_if:NF \g__nmc_error_bool
       {
-        \int_set:Nn \l__nmc_sci_num_int { #2 }
-        \tl_if_eq:VnT #3 { 10 }
-          {
-            \int_incr:N \l__nmc_sci_num_int
-            \tl_set:Nn #3 { 1 }
-          }
-        \bool_if:NT \l__nmc_pad_zeros_bool
-          { 
-            \tl_if_in:NnTF #3 {.}
-              { \__nmc_num_pad:Nnn #3 {} { #4 } }
-              { \__nmc_num_pad:Nnn #3 {.} { #4 } }
-          }
-        \bool_lazy_or:nnT { !\int_if_zero_p:n { \l__nmc_sci_num_int } }
-            { \int_compare_p:nNn { \l__nmc_prime_int } > { 0 } }
-          { \__nmc_sci_write:Nx #3 { \int_use:N \l__nmc_sci_num_int } } 
+        \tl_set:Nx \l_nmc_result_tl { \fp_to_tl:n { \l__nmc_fp_expr_tl } }
+        \__nmc_error_fpflag:
       }
-    \int_set:Nn \l__nmc_num_sgn_int { \fp_sign:n { #1 } }
+    \int_if_zero:nF \l__nmc_dbg_int
+      { \__nmc_dbg_get_data: }
   }
-\cs_new_protected:Npn \__nmc_sci_write:Nn #1#2
-  { % #1 significand #2 exponent
-    \bool_if:NTF \l__nmc_sci_num_x_bool
-      { \tl_put_right:Nn #1 { \times 10^{#2} } }
-      { 
-        \bool_if:NTF \l__nmc_sci_num_table_bool
-          { \tl_set:Nx #1 { \__nmc_sci_num_table:nn { #1 } { #2 } } }
-          { \tl_put_right:Nx #1 { \hbox:n { \l__nmc_sci_num_out_tl {#2} } } }
-      }
-  }
-\cs_generate_variant:Nn \__nmc_sci_write:Nn { Nx }
-\cs_new:Npn \__nmc_sci_num_table:nn #1#2
-  { (#2)\exp_not:n {\,}{#1} }
-%%%%%%%%%%%%%% eval-specific routines %%%%%%%%%%%%%%%
-\cs_new:Npn \__nmc_eval_settings_digest: 
-  { \bool_set_true:N \l__nmc_allow_TF_out_bool }
-\cs_set_eq:NN \__nmc_eval_vv_digest:N \__nmc_vv_digest:N
-\cs_new_protected:Npn \__nmc_eval_process:
-  {           
-    \__nmc_error_where:n { formula }
-    \tl_clear:N \l__nmc_fp_expr_tl
-    \__nmc_fpify:VN \l__nmc_formula_tl \l__nmc_fp_expr_tl
-    \bool_if:NF \g__nmc_error_bool
-      { \__nmc_num_format:nNnN { \l__nmc_fp_expr_tl } \l_nmc_result_tl
-          { \l__nmc_round_int } \l__nmc_sci_num_out_bool }
-  }
-\cs_new_protected:Npn \__nmc_eval_display:
+\cs_gset_protected:Npn \__nmc_eval_display:
   {
+    \__nmc_num_format:nNnN { \l_nmc_result_tl } \l_nmc_result_tl
+        { \l__nmc_round_int } \l__nmc_sci_num_out_bool
     \tl_gset_eq:NN \g__nmc_reuse_tl \l_nmc_result_tl
-    \bool_if:NF \l__nmc_num_only_bool 
-      {     
+    \bool_if:NF \l__nmc_num_only_bool
+      {  
         \tl_set:Nx \l_nmc_result_tl 
           { 
             \exp_not:o \l__nmc_math_delimi_tl
             \bool_if:NT \l__nmc_wraps_math_bool
               { 
-                \exp_not:o \l__nmc_formula_dup_tl 
+                \exp_not:o \l__nmc_formula_dup_tl
                 \bool_if:NTF \l__nmc_TF_out_bool 
                   { \rightarrow } { = }
               }
@@ -1113,8 +1154,11 @@
             \bool_if:NTF \l__nmc_vv_multline_bool
               { \exp_not:o \l__nmc_vv_display_tl }
               { 
-                \mathchoice{ \exp_not:o \l__nmc_vv_display_tl }
-                    { \exp_not:o \l__nmc_vv_inline_tl }{}{}
+                \bool_if:NF \l__nmc_vv_invisible_bool
+                  { 
+                    \mathchoice{ \exp_not:o \l__nmc_vv_display_tl }
+                        { \exp_not:o \l__nmc_vv_inline_tl }{}{}
+                  }
               }
             \l__nmc_punc_tl 
             \exp_not:o \l__nmc_math_delimii_tl 
@@ -1124,8 +1168,7 @@
       }
     \l_nmc_result_tl
   }  
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \__nmc_fpify:nN 
+% fpify LaTeX math expr %%%%%%%%%%%%%%%%%%%%%%%%%
 \bool_new:N \l__nmc_insert_aster_bool
 \tl_new:N \l__nmc_subst_tl
 \tl_new:N \l__nmc_accum_tl
@@ -1162,9 +1205,10 @@
 \fp_new:N \l__nmc_sum_total_fp
 \fp_new:N \l__nmc_sum_prev_fp
 \fp_new:N \l__nmc_sum_rounded_fp
+
 % #1 = latex expr #2 = fp-ified result
 \cs_new_protected:Npn \__nmc_fpify:nN #1#2
-  {  
+  {
     \group_begin:
     \bool_set_false:N \l__nmc_superscript_bool
     \bool_set_false:N \l__nmc_insert_aster_bool
@@ -1183,15 +1227,14 @@
         \__nmc_next:
         \prop_get:NVNTF \g__nmc_class_prop \l__nmc_B_tl \l_tmpb_tl
           { \exp_last_unbraced:NV \use_i:nn \l_tmpb_tl }
-          { \__nmc_fpify_unknown: }
-      }
+          { \__nmc_fpify_var: }
+      } 
     \exp_args:NNNV
     \group_end:
-        \tl_put_right:Nn #2 \l__nmc_accum_tl 
-  }
+        \tl_put_right:Nn #2 \l__nmc_accum_tl
+ }
 \cs_generate_variant:Nn \__nmc_fpify:nN { V }
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \cs_new_protected:Npn \__nmc_fpify_unknown:
   {
     \tl_if_in:nVTF { )]\}\rbrace } \l__nmc_B_tl
@@ -1198,6 +1241,7 @@
       { \__nmc_error_what:n { Unmatched~\__nmc_verb:V \l__nmc_B_tl{}~in } }
       { \__nmc_error_what:n { Unknown~token~\__nmc_verb:V \l__nmc_B_tl{}~in } }
   }
+% to avoid e.g. 34 instead of 3*4
 \cs_new_protected:Npn \__nmc_insert_aster:
   {
     \bool_if:NT \l__nmc_insert_aster_bool
@@ -1204,7 +1248,7 @@
       { \tl_put_right:Nn \l__nmc_accum_tl { * } }
   }
 \cs_new_protected:Npn \__nmc_fpify_dec:
-  {
+  { 
     \__nmc_get_dec:NN \l__nmc_fact_arg_tl \c_false_bool
     \tl_if_eq:VnF \l__nmc_C_tl { ! }
       {
@@ -1215,15 +1259,11 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_var:
   { % ( ) in case var < 0 raised to power
-    \prop_get:NVNTF \g__nmc_subst_var_prop \l__nmc_B_tl \l__nmc_subst_tl
+    \prop_get:NVNTF \l__nmc_subst_var_prop \l__nmc_B_tl \l__nmc_subst_tl
       {
         \tl_set_eq:NN \l__nmc_fact_arg_tl \l__nmc_subst_tl
-        \tl_if_in:noTF { !' } \l__nmc_C_tl
+        \tl_if_in:noF { ! } \l__nmc_C_tl
           { 
-            % \tl_if_eq:VnT \l__nmc_C_tl { ' }
-              % { \__nmc_deriv_dot_from_prime: }
-          }
-          { 
             \__nmc_accum_fn_parenth:NNn \l__nmc_accum_tl \l__nmc_subst_tl {}
             \bool_set_true:N \l__nmc_insert_aster_bool
           }
@@ -1232,7 +1272,7 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_const:
   { % if const used as var
-    \prop_get:NVNTF \g__nmc_subst_var_prop \l__nmc_B_tl \l__nmc_subst_tl
+    \prop_get:NVNTF \l__nmc_subst_var_prop \l__nmc_B_tl \l__nmc_subst_tl
       { \__nmc_fpify_var: }
       {
         \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l__nmc_subst_tl
@@ -1262,7 +1302,7 @@
   }
 \cs_new_protected:Npn \__nmc_fpify_comparison:
   { 
-    \tl_if_in:NVTF \c__nmc_comparisons_tl \l__nmc_C_tl 
+    \tl_if_in:noTF { <=> } \l__nmc_C_tl 
       { \__nmc_error_what:n { Multi-token~comparison~in } }
       {
         \prop_get:NVNF \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l_tmpa_tl 
@@ -1284,14 +1324,11 @@
   { 
     \prop_get:NVN \g__nmc_subst_fpfn_prop \l__nmc_B_tl \l_tmpa_tl 
     \tl_put_right:NV \l__nmc_accum_tl \l_tmpa_tl
-% \tl_show:N \l__nmc_A_tl     
     \__nmc_delim_arg:Nnn \l__nmc_arg_tl { 1 } { \c__nmc_and_int }
-% \tl_show:N \l__nmc_arg_tl
     \tl_clear:N \l_tmpa_tl
     \__nmc_fpify:VN \l__nmc_arg_tl \l_tmpa_tl
     \tl_put_right:NV \l__nmc_accum_tl \l_tmpa_tl
     \bool_set_false:N \l__nmc_insert_aster_bool  
-   
   }
 \cs_new_protected:Npn \__nmc_fpify_lparen:
   {
@@ -1299,7 +1336,7 @@
     \tl_set_eq:NN \l__nmc_fact_arg_tl \l__nmc_arg_tl
     \tl_if_eq:VnTF \l__nmc_C_tl { ! }
       { \bool_set_false:N \l__nmc_insert_aster_bool }
-      { 
+      {
         \__nmc_accum_fpify_parenth:NN \l__nmc_accum_tl \l__nmc_arg_tl 
         \bool_set_true:N \l__nmc_insert_aster_bool
       }
@@ -1569,13 +1606,12 @@
         \fp_compare:nF { 0 < \l__nmc_arg_tl != 1 }
           {
             \__nmc_error_what:n 
-                { Valid~base~required~for~\__nmc_verb:n { \log } in } 
+                { Valid~base~required~for~\__nmc_verb:n { \log }~in } 
           }
       }
     \bool_if:NF \g__nmc_error_bool
       { 
-        \tl_set:Nx \l_tmpa_tl 
-            { \fp_eval:n { 1 / ( ln ( \l__nmc_arg_tl ) ) } } 
+        \tl_set:Nx \l_tmpa_tl { \fp_eval:n { 1/(ln(\l__nmc_arg_tl)) } }
         \__nmc_error_fpflag:
       }
     \bool_if:NF \g__nmc_error_bool
@@ -1735,17 +1771,23 @@
     \__nmc_fpify_fact_do:nNn { #1 } #2 { 1 }
     \tl_put_right:Nx \l__nmc_accum_tl { \fp_use:N \l__nmc_fact_fp }
   }
-\cs_new_protected:Npn \__nmc_fpify_BE:
+\cs_new_protected:Npn \__nmc_fpify_font:
   { 
-    \__nmc_next: 
-    \tl_if_in:VnT \l__nmc_B_tl { alignat }
-      { \__nmc_next: }
+    \__nmc_next:
+    \__nmc_accum_fpify_parenth:NN \l__nmc_accum_tl \l__nmc_B_tl
   }
-% \cs { m }
-\cs_new_protected:Npn \__nmc_fpify_absorbm:
+\cs_new_protected:Npn \__nmc_fpify_splitfrac:
+  {
+    \__nmc_next:
+    \tl_set_eq:NN \l_tmpb_tl \l__nmc_B_tl
+    \__nmc_next:
+    \tl_put_right:NV \l_tmpb_tl \l__nmc_B_tl
+    \__nmc_accum_fpify_parenth:NN \l__nmc_accum_tl \l_tmpb_tl 
+  }
+% \cs { m }, \cs { o m }, \cs { * m }
+\cs_new_protected:Npn \__nmc_fpify_absorb_m:
   { \__nmc_next:  }
-% \cs { o m }
-\cs_new_protected:Npn \__nmc_fpify_absorbom:
+\cs_new_protected:Npn \__nmc_fpify_absorb_om:
   { 
     \str_if_eq:VnT \l__nmc_C_tl { [ }
       { 
@@ -1754,18 +1796,70 @@
       }
     \__nmc_next:  
   }
-\cs_new_protected:Npn \__nmc_fpify_font:
-  { \__nmc_fpify_meta: }
-
-\cs_new_protected:Npn \__nmc_fpify_meta:
+\cs_new_protected:Npn \__nmc_fpify_absorb_sm:
   { 
+    \str_if_eq:VnT \l__nmc_C_tl { * }
+      { \__nmc_next: }
     \__nmc_next:
-    \__nmc_fpify:VN \l__nmc_B_tl \l__nmc_accum_tl
   }
-\cs_new_protected:Npn \__nmc_fpify_metamm:
-  { \prg_replicate:nn { 2 } { \__nmc_fpify_meta: } }
-%%%%%%%%%%%%%%%%%%%
-% sum/prod
+\cs_new_protected:Npn  \__nmc_fpify_color:
+  { 
+    \__nmc_fpify_absorb_om:
+    \__nmc_fpify_next_braced:N \l__nmc_accum_tl
+    \bool_set_true:N \l__nmc_insert_aster_bool
+  }
+\cs_new_protected:Npn \__nmc_fpify_BE:
+  { 
+    \__nmc_next: 
+    \tl_if_in:VnT \l__nmc_B_tl { alignat }
+      { \__nmc_next: }
+  }
+\cs_new_protected:Npn \__nmc_fpify_cmd:
+  { 
+    \__nmc_insert_aster:
+    \prop_get:NoNT \g__nmc_subst_misc_prop \l__nmc_B_tl \l_tmpa_tl
+      { 
+        \exp_args:NV \__nmc_cmd:n \l_tmpa_tl
+        \bool_set_false:N \l__nmc_insert_aster_bool
+        \bool_set_false:N \l__nmc_wraps_math_bool
+      }
+  }
+\cs_new_protected:Npn \__nmc_cmd:n #1
+  { % \cm { s O m O O }
+    \tl_set:Nn \l__nmc_delim_arg_tl { { #1 } } % cmd
+    \tl_if_eq:VnT \l__nmc_C_tl { * }
+      { \__nmc_next: }
+    \bool_set_true:N \l__nmc_num_only_bool
+    \__nmc_append_sqbrarg: % settings
+    \__nmc_next:
+    \tl_put_right:Nx \l__nmc_delim_arg_tl { { \exp_not:o \l__nmc_B_tl } }
+    \__nmc_append_sqbrarg: % vv-list
+    \__nmc_append_sqbrarg: % num format
+    \tl_put_right:Nn \l__nmc_accum_tl { ( }
+    \group_begin:
+      \int_add:Nn \l__nmc_depth_int { 2 }
+      \exp_last_unbraced:No \__nmc_inputs_get:nnnnn \l__nmc_delim_arg_tl
+      \bool_if:NF \g__nmc_error_bool
+        { \use:c { __nmc_#1_process: } }
+      \exp_args:NNNV
+      \group_end:
+          \tl_put_right:Nn \l__nmc_accum_tl \l_nmc_result_tl
+      \tl_put_right:Nn \l__nmc_accum_tl { ) }
+  }
+\cs_new_protected:Npn \__nmc_append_sqbrarg:
+  {
+    \tl_if_eq:VnTF \l__nmc_C_tl { [ }
+      { \__nmc_append_sqbrarg_aux: }
+      { \tl_put_right:Nx \l__nmc_delim_arg_tl { {} } }
+  }
+\cs_new_protected:Npn \__nmc_append_sqbrarg_aux:
+  { 
+    \__nmc_next:
+    \tl_clear:N \l_tmpa_tl
+    \__nmc_get_arg_LR:NNN [ \l_tmpa_tl ]
+    \tl_put_right:Nx \l__nmc_delim_arg_tl { { \exp_not:o \l_tmpa_tl } }
+  }
+% sum/prod %%%%%%%%%%%%%%%%%%
 \cs_new_protected:Npn \__nmc_fpify_sum:
   {
     \__nmc_insert_aster:
@@ -1782,7 +1876,7 @@
         \tl_set:Nn \l__nmc_sum_op_tl { * }
         \fp_set:Nn \l__nmc_sum_total_fp { 1 }
         \fp_set:Nn \l__nmc_sum_prev_fp { 2 }
-        \tl_set:Nn \l__nmc_sum_type_tl { product }
+        \tl_set:Nn \l__nmc_sum_type_tl { prod }
         \bool_set_false:N \l__nmc_sum_bool
       }
     \__nmc_error_where:n { \l__nmc_sum_type_tl }
@@ -1792,6 +1886,7 @@
         \__nmc_error_where:n { \l__nmc_sum_type_tl~\ limits }
         \__nmc_sum_get_limits:NNN \l__nmc_sum_var_tl
             \l__nmc_sum_index_int \l__nmc_sum_end_int
+        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
       }
     \bool_if:NTF \g__nmc_error_bool
       { \group_end: }
@@ -1800,18 +1895,19 @@
         \tl_if_eq:VnF \l__nmc_C_tl { ( }
           { \__nmc_parenth:N \l__nmc_arg_tl }
         \tl_set_eq:NN \l__nmc_summand_tl \l__nmc_arg_tl
-        % do the sum/prod; result in \l__nmc_sum_total_fp
+        % do the sum/prod
         \__nmc_error_where:n { \l__nmc_sum_type_tl }
-        \__nmc_sum_do:nnN { \l__nmc_sum_index_int } 
-            { \l__nmc_sum_end_int } \l__nmc_sum_total_fp
-        \fp_gset_eq:NN \g_tmpa_fp \l__nmc_sum_total_fp 
+        \__nmc_sum_do:nn { \l__nmc_sum_index_int } { \l__nmc_sum_end_int }
         \tl_gset_eq:NN \g_tmpa_tl \l__nmc_A_tl
+        \tl_gset_eq:NN \g_tmpb_tl \l__nmc_C_tl
         \exp_args:NNNV
         \group_end:
-            \tl_set:Nn \l__nmc_C_tl \l__nmc_C_tl
-        \tl_put_right:Nx \l__nmc_accum_tl { \fp_use:N \g_tmpa_fp }
+            \fp_set:Nn \l__nmc_sum_total_fp { \l__nmc_sum_total_fp }
         \tl_set_eq:NN \l__nmc_A_tl \g_tmpa_tl 
-        \bool_set_false:N \l__nmc_insert_aster_bool
+        \tl_set_eq:NN \l__nmc_C_tl \g_tmpb_tl
+        \tl_put_right:Nx \l__nmc_accum_tl { \fp_use:N \l__nmc_sum_total_fp }
+        \bool_set_true:N \l__nmc_insert_aster_bool
+        \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
       }
   }
 \cs_new_protected:Npn \__nmc_sum_get_limits:NNN #1#2#3
@@ -1822,7 +1918,7 @@
         \bool_if:NF \g__nmc_error_bool
           { \__nmc_sum_limit_upper:N #3 }
       }
-      {
+      {   
         \__nmc_sum_limit_upper:N #3
         \__nmc_sum_limit_lower:NN #1#2
       }
@@ -1853,8 +1949,10 @@
 \cs_new_protected:Npn \__nmc_sum_limit_upper:N #1
   {
     \__nmc_next: \__nmc_next:
+
     \__nmc_vv_get_vars_vals_lims:NN \l__nmc_B_tl \c_empty_prop
-    \__nmc_sum_limit_assign:NN #1 \l__nmc_vv_fp_expr_tl
+    \bool_if:NF \g__nmc_error_bool
+      { \__nmc_sum_limit_assign:NN #1 \l__nmc_vv_fp_expr_tl }
   }
 \cs_new_protected:Npn \__nmc_sum_limit_assign:NN #1#2
   { 
@@ -1870,24 +1968,25 @@
           }
       }
   }
-\cs_new_protected:Npn \__nmc_sum_do:nnN #1#2#3
-  { % #1,#2 lower, upper limits (int), #3 <-- total (fp)
+% #1#2 lower/upper limits (int); result in \l__nmc_sum_total_fp
+\cs_new_protected:Npn \__nmc_sum_do:nn #1#2
+  { 
     \int_compare:nNnTF  { \c_max_int } = 
         { \int_max:nn { \int_abs:n { #1 } } { \int_abs:n { #2 } } }
       { 
         \bool_if:NTF \l__nmc_sum_bool
-          { \__nmc_sum_do_infinite:Nn #1 { sum }  }
+          { \__nmc_sum_do_infinite:Nn #1 { sum } }
           { \__nmc_sum_do_infinite:Nn #1 { prod } }
+          
       }
       { \int_step_function:nnnN { #1 } { 1 } { #2 } \__nmc_sum_eval:n }
     \bool_if:NF \g__nmc_error_bool
       {
-        \int_compare:nTF { #1 <= #2 }
-          { \fp_set:Nn #3 { \l__nmc_sum_total_fp } }
+        \int_compare:nNnT { #2 } < {  #1 }
           {
             \tl_if_eq:VnTF \l__nmc_sum_op_tl { * }
-              { \fp_set:Nn #3 { 1 } }
-              { \fp_set:Nn #3 { 0 } }
+              { \fp_set:Nn \l__nmc_sum_total_fp { 1 } }
+              { \fp_set:Nn \l__nmc_sum_total_fp { 0 } }
           }
       }
   }
@@ -1918,7 +2017,7 @@
               \__nmc_sum_query:n { \l__nmc_suma_int }
             }
       }
-    \tl_gset:cx { g__nmc_ \tl_range:Nnn \l__nmc_sum_type_tl{1}{4} _info_tl }
+    \tl_gset:cx { g__nmc_info_\tl_range:Nnn \l__nmc_sum_type_tl{1}{4} _tl }
         { \int_eval:n { \l__nmc_suma_int - #1 
             - \use:c { l__nmc_#2_query_int } } }
   }
@@ -1925,7 +2024,7 @@
 \cs_new_protected:Npn \__nmc_sum_eval:n #1
   { 
     \__nmc_calc_fn_val:VNnN \l__nmc_sum_var_tl \l__nmc_summand_tl 
-        { #1 } \l_tmpb_fp
+        { #1 } \l_tmpb_fp 
     \fp_set:Nn \l__nmc_sum_total_fp
         { \l__nmc_sum_total_fp \l__nmc_sum_op_tl \l_tmpb_fp }
   }
@@ -1940,64 +2039,7 @@
         \int_set_eq:NN \l__nmc_sumb_int \l__nmc_suma_int
       }  
   } 
-\cs_new_protected:Npn \__nmc_fpify_cmd:
-  { 
-    \__nmc_insert_aster:
-    \str_case:onT \l__nmc_B_tl
-      {
-        { \eval } { \__nmc_cmd:n { eval } }
-        { \iter } { \__nmc_cmd:n { iter } }
-        { \solve } { \__nmc_cmd:n { solve } }
-        { \recur } { \__nmc_cmd:n { recur } }
-        { \tabulate } { \__nmc_cmd:n { table } }
-        { \nmcInfo } { \nmcInfo }
-        { \nmcEvaluate } { \__nmc_cmd:n { eval } }
-        { \nmcIterate } { \__nmc_cmd:n { iter } }
-        { \nmcSolve } { \__nmc_cmd:n { solve } }
-        { \nmcRecur } { \__nmc_cmd:n { recur } }
-        { \nmcTabulate } { \__nmc_cmd:n { table } }
-      }
-      { 
-        \bool_set_false:N \l__nmc_insert_aster_bool
-        \bool_set_false:N \l__nmc_wraps_math_bool
-      }
-  }
-\cs_new_protected:Npn \__nmc_cmd:n #1
-  { % \cm { s O m O O }
-    \tl_set:Nn \l__nmc_delim_arg_tl { { #1 } } % cmd
-    \tl_if_eq:VnT \l__nmc_C_tl { * }
-      { \__nmc_next: }
-    \__nmc_append_sqbrarg: % settings
-    \__nmc_next:
-    \tl_put_right:Nx \l__nmc_delim_arg_tl { { \exp_not:o \l__nmc_B_tl } }
-    \__nmc_append_sqbrarg: % vv-list
-    \__nmc_append_sqbrarg: % num format
-    \tl_put_right:Nn \l__nmc_accum_tl { ( }
-    \group_begin:
-      \bool_set_true:N \l__nmc_num_only_bool
-      \exp_last_unbraced:No \__nmc_get_inputs:nnnnn \l__nmc_delim_arg_tl
-      \bool_set_false:N \l__nmc_sci_num_out_bool
-      \bool_if:NF \g__nmc_error_bool
-        { \use:c { __nmc_#1_process: } }
-    \exp_args:NNNV
-    \group_end:
-        \tl_put_right:Nn \l__nmc_accum_tl { \l_nmc_result_tl ) }
-  }
-\cs_new_protected:Npn \__nmc_append_sqbrarg:
-  {
-    \tl_if_eq:VnTF \l__nmc_C_tl { [ }
-      { \__nmc_append_sqbrarg_aux: }
-      { \tl_put_right:Nx \l__nmc_delim_arg_tl { {} } }
-  }
-\cs_new_protected:Npn \__nmc_append_sqbrarg_aux:
-  { 
-    \__nmc_next:
-    \tl_clear:N \l_tmpa_tl
-    \__nmc_get_arg_LR:NNN [ \l_tmpa_tl ]
-    \tl_put_right:Nx \l__nmc_delim_arg_tl { { \exp_not:o \l_tmpa_tl } }
-  }
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \nmc_delim_arg:Nnn
+% delimit math args %%%%%%%%%%%%%%%%%%%
 \tl_new:N \l__nmc_delim_arg_tl
 \tl_new:N \l__nmc_delim_argi_tl
 \int_new:N \l__nmc_delim_pas_int
@@ -2004,7 +2046,6 @@
 \int_new:N \l__nmc_delim_pos_int
 \bool_new:N \l__nmc_delim_stop_bool
 \bool_new:N \l__nmc_delim_lmod_bool
-
 \prg_new_conditional:Npnn \__nmc_if_pospas_gtr:nn #1#2 { p, TF }
   {
     \bool_if:nTF
@@ -2016,12 +2057,10 @@
       { \prg_return_true: }
       { \prg_return_false: }
   }
-%--------------------------------------------------------------------
-% #1(tlvar) receives arg (\l__nmc_delim_arg_tl)
-% #2 (int) initial pos
+% #1 <-- \l__nmc_delim_arg_tl; % #2 (int) initial pos
 % #3 (int) parsing state
 \cs_new_protected:Npn \__nmc_delim_arg:Nnn #1#2#3
-  { 
+  {
     \group_begin:
     \bool_set_false:N \__nmc_delim_stop_bool
     \bool_set_false:N \l__nmc_delim_lmod_bool
@@ -2036,7 +2075,7 @@
       { 
         \prop_get:NVNTF \g__nmc_class_prop \l__nmc_C_tl \l__nmc_class_tl
           { \exp_last_unbraced:NV \use_ii:nn \l__nmc_class_tl }
-          { \__nmc_delim_var: } % unknown; treat as var 
+          { \__nmc_delim_var: } 
         \int_incr:N \l__nmc_delim_pos_int
       }
     \tl_gset_eq:NN \g_tmpa_tl \l__nmc_A_tl
@@ -2047,7 +2086,7 @@
     \tl_set_eq:NN \l__nmc_A_tl \g_tmpa_tl
     \tl_set_eq:NN #1 \g_tmpb_tl
   }
-%%%%%%%%% delimit arg routines %%%%%%%%
+% delimit arg routines %%%%%%%%%%%%%%%%
 \cs_new_protected:Npn \__nmc_delim_stop:
   { 
     \tl_if_eq:VnTF \l__nmc_C_tl { \q }  
@@ -2230,7 +2269,7 @@
       { \__nmc_delim_stop: }
       { 
         \__nmc_next:
-        \tl_if_in:NVTF \c__nmc_modds_tl \l__nmc_C_tl
+        \tl_if_in:nVTF { |./ } \l__nmc_C_tl
           {
             \prop_get:NVN \g__nmc_subst_misc_prop \l__nmc_B_tl \l_tmpb_tl
             \__nmc_delim_lparen:VV \l__nmc_B_tl \l_tmpb_tl 
@@ -2283,11 +2322,15 @@
   }
 \cs_new_protected:Npn \__nmc_delim_frac: % also \(d)binom
   { 
-    \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
-      { \__nmc_delim_stop: }
-      { 
-        \__nmc_delim_append_twobraced:
-        \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
+    \int_compare:nNnTF { \l__nmc_posi_int } = { 3 }
+      { \__nmc_delim_tfrac: }
+      {
+        \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
+          { \__nmc_delim_stop: }
+          { 
+            \__nmc_delim_append_twobraced:
+            \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
+          }
       }
   }
 \cs_new_protected:Npn \__nmc_delim_unarybrace:
@@ -2349,14 +2392,12 @@
         \__nmc_delim_stop_if_gtr:n { \c__nmc_sum_int }
       }
   }
-\cs_new_protected:Npn \__nmc_delim_qleave:
+\cs_new_protected:Npn \__nmc_delim_cleave:
   { 
     \__nmc_next:
     \tl_if_eq:VnTF \l__nmc_B_tl { \q } 
       { \int_zero:N \l__nmc_delim_pos_int } % adhere
       { \bool_set_true:N \l__nmc_delim_stop_bool } % sever
-    \tl_if_eq:VnT \l__nmc_C_tl { ' }
-      { \__nmc_next: }
   }
 \cs_new_protected:Npn \__nmc_delim_nary:
   {
@@ -2392,24 +2433,40 @@
       }
   }
 \cs_new_protected:Npn \__nmc_delim_absorb:
-  { % \cs
+  { 
     \__nmc_next: 
     \int_decr:N \l__nmc_delim_pos_int
   }
-\cs_new_protected:Npn \__nmc_delim_absorbm:
-  { % \cs { m }
-    \__nmc_next: \__nmc_next: 
-    \int_decr:N \l__nmc_delim_pos_int
+\cs_new_protected:Npn \__nmc_delim_absorb_i:
+  { 
+    \__nmc_delim_absorb:
+    \__nmc_next:
   }
-\cs_new_protected:Npn \__nmc_delim_absorbom:
-  { % \cs { o m }
-    \__nmc_next: 
+\cs_new_protected:Npn \__nmc_delim_absorb_ii:
+  { 
+    \__nmc_delim_absorb_i:
+    \str_case:VnT \l__nmc_B_tl
+      {
+        { * } { }
+        { [ } { \__nmc_get_arg_LR:NNN [ \l__nmc_toss_tl ] }
+      }
+      { \__nmc_next: }
+  }
+\cs_new_protected:Npn \__nmc_delim_color:
+  { 
+    \__nmc_next:
     \str_if_eq:VnT \l__nmc_C_tl { [ }
       { 
-        \__nmc_next: 
+        \__nmc_next:
         \__nmc_get_arg_LR:NNN [ \l__nmc_toss_tl ]
       }
-    \__nmc_next: 
+    \__nmc_delim_font:
+  }
+\cs_new_protected:Npn \__nmc_delim_font:
+  { 
+    \__nmc_next: \__nmc_next:
+    \tl_put_left:NV \l__nmc_A_tl \l__nmc_B_tl
+    \tl_set:Nx \l__nmc_C_tl { \tl_head:N \l__nmc_B_tl }
     \int_decr:N \l__nmc_delim_pos_int
   }
 \cs_new_protected:Npn \__nmc_delim_BE:
@@ -2426,19 +2483,6 @@
         \__nmc_next:
       }
   }
-\cs_new_protected:Npn \__nmc_delim_font:
-  {
-    \__nmc_next:
-    \tl_put_left:NV \l__nmc_A_tl \l__nmc_B_tl
-    \int_decr:N \l__nmc_delim_pos_int
-  }
-\cs_new_protected:Npn \__nmc_delim_metamm:
-  { 
-    \__nmc_next:
-    \__nmc_delim_append_braced:
-    \__nmc_delim_append_braced:
-    \int_decr:N \l__nmc_delim_pos_int
-  }
 \cs_new_protected:Npn \__nmc_delim_cmd:
   { % \cmd { s O m O O }
     \__nmc_if_pospas_gtr:nnTF { 1 } { \c__nmc_sum_int } 
@@ -2468,138 +2512,461 @@
             { #1 } \l_tmpa_tl { #2 }
       }
   }
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% save & retrieve 
-\tl_new:N \g__nmc_reuse_tl
-\tl_new:N \g__nmc_reuse_filename_tl
-\tl_new:N \l__nmc_reuse_retrieved_tl
-\bool_new:N \l__nmc_reuse_retrieved_bool
-\bool_new:N \g__nmc_lyx_bool
-\ior_new:N \g__nmc_ior
-\iow_new:N \g__nmc_iow
-\tl_gset:NV \g__nmc_reuse_filename_tl \jobname
-\tl_gput_right:Nn \g__nmc_reuse_filename_tl { .nmc }
-% 
-\NewDocumentCommand \nmcReuse { s >{ \TrimSpaces } O{} }
-  { % save \eval result to csname #2
-    \tl_if_empty:nTF { #2 }
-      { \__nmc_reuse_retrieve: }
+%%%%%%%%% info on "infinite" processes %%%%%%%%%%
+\nmc_define:NnN \nmcInfo { info } \info
+
+\clist_map_inline:nn { sum,prod } 
+  { 
+    \tl_new:c { g__nmc_info_#1_tl } 
+    \tl_gset:cn { g__nmc_info_#1_tl } { 0 }
+  }
+\clist_new:N \g__nmc_info_proc_clist 
+\clist_gset:Nn \g__nmc_info_proc_clist { sum, prod }
+\cs_gset_protected:Npn \__nmc_info_initialize:
+  { 
+    \seq_clear:N \l_tmpa_seq
+    \tl_set:Nn \l__nmc_dbg_idii_tl { process } 
+    \clist_map_inline:Nn \g__nmc_info_proc_clist
       { 
-        \tl_if_empty:NTF \g__nmc_reuse_tl
+        \seq_put_right:Nx \l_tmpa_seq
+            { ##1~{ \use:c { g__nmc_info_##1_tl } } }
+      }
+    \tl_set:Nx \l__nmc_dbg_vv_tl { \seq_use:Nn \l_tmpa_seq {,~} }
+  }
+\cs_gset_protected:Npn \__nmc_info_process:
+  { \tl_set_eq:Nc \l_nmc_result_tl { g__nmc_info_\l_nmc_formula_tl _tl } 
+  }
+\cs_gset_protected:Npn \__nmc_info_display:
+  { 
+    \bool_if:NTF \l__nmc_num_only_bool
+      { \l_nmc_result_tl }
+      {
+        \prop_if_in:NVTF \g__nmc_subst_misc_prop \l_nmc_formula_tl
+          { 
+            \tl_if_empty:cT { g__nmc_info_\l_nmc_formula_tl _tl }
+              { \tl_set:Nn \l_nmc_result_tl { 0 } }
+            \tl_use:N \l_nmc_result_tl
+            \prop_get:NVN \g__nmc_subst_misc_prop \l_nmc_formula_tl \l_tmpb_tl
+            \ \l_tmpb_tl % pluralise?
+            \int_if_zero:nF { \l_nmc_result_tl - 1 } { s } 
+            \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl
+          }
           {
-            \__nmc_error_where:n { \__nmc_verb:n { \nmcReuse }~command }
-            \__nmc_error_what:n { No~value~to~save~with } 
+            \__nmc_error_where:n { \__nmc_verb:n {\nmcInfo}~command }
+            \__nmc_error_what:n 
+                { Unknown~process~\__nmc_verb:V \l_nmc_formula_tl\ in }
           }
-          { \__nmc_reuse_result:c { #2 } }
       }
-    \IfBooleanT #1 { \__nmc_debug_display:nn { 99991 } { reuse } }
   }
-\ProvideDocumentCommand\reuse {} { \nmcReuse }
-\cs_new_protected:Npn \__nmc_reuse_retrieve:
+%%%%%%%%%%%%% user-defined macros %%%%%%%%%%%%%%%
+\clist_new:N \g__nmc_macros_clist
+\bool_new:N \l__nmc_macros_free_bool
+
+\nmc_define:NnN \nmcMacros { macros } \macros
+
+\cs_gset_protected:Npn \__nmc_macros_initialize:
   {
-    \file_get:VnNT \g__nmc_reuse_filename_tl {} \l__nmc_reuse_retrieved_tl
+    \tl_set:Nn \l__nmc_dbg_idiii_tl { macros }
+    \tl_set:Nn \l__nmc_dbg_idv_tl { stored }
+  }
+\cs_gset_protected:Npn \__nmc_macros_vv_digest:N #1
+  { 
+    \__nmc_error_where:n {  \__nmc_verb:n { \nmcMacros }\ command }
+    \clist_set:No \l_tmpa_clist \l_nmc_formula_tl
+    \clist_clear:N \l_tmpb_clist
+    \clist_map_inline:Nn \l_tmpa_clist
+      { 
+        \cs_if_exist:NTF ##1
+          {
+            \clist_put_right:Nx \l_tmpb_clist 
+                {\exp_not:N ##1 {~\exp_not:f ##1} } 
+          }
+          { 
+            \__nmc_error_what:n { Undefined~macro~\__nmc_verb:n {##1}\ in } 
+            \clist_map_break:
+          }
+      }
+    \bool_if:NF \g__nmc_error_bool
       {
-        \bool_lazy_or:nnF 
-            { \tl_if_blank_p:V \l__nmc_reuse_retrieved_tl }
-            { \tl_if_head_eq_meaning_p:VN \l__nmc_reuse_retrieved_tl \par }
+        \tl_set:No \l_nmc_formula_tl \l_tmpb_clist
+        \__nmc_vv_digest:N #1
+        \int_if_zero:nF \l__nmc_dbg_int
+          { \__nmc_dbg_vv_view:n { 0 } }
+        \clist_set:No \l_tmpb_clist \l_nmc_formula_tl
+      }
+  }
+\cs_gset_protected:Npn \__nmc_macros_process:
+  {
+    \bool_if:NTF \l__nmc_macros_free_bool
+      { \__nmc_macros_deregister:N \l_tmpa_clist }
+      { \__nmc_macros_register:N \l_tmpb_clist  }
+    \clist_gremove_duplicates:N \g__nmc_macros_clist
+    \bool_if:NT \l__nmc_num_only_bool
+      { 
+        \tl_set:Nx \l_nmc_result_tl 
+            { \int_eval:n { \clist_count:N \g__nmc_macros_clist } }
+      }
+  }
+\cs_gset:Npn \__nmc_macros_display:
+  { \bool_if:NT \l__nmc_num_only_bool { \l_nmc_result_tl } }
+%%%%%%%%%%
+\cs_gset_protected:Npn \__nmc_macros_deregister:N #1
+  {
+    \clist_if_empty:NT #1 
+      { 
+        \clist_set_eq:NN #1 \g__nmc_macros_clist
+        \tl_set:No \l_nmc_formula_tl \g__nmc_macros_clist
+      }
+    \clist_map_inline:Nn #1
+      { 
+        \cs_if_exist:NT ##1
+          {
+            \clist_gremove_all:Nn \g__nmc_macros_clist { ##1 }
+            \prop_gremove:NV \g__nmc_subst_var_prop { ##1 }
+          }
+      }
+    \__nmc_macros_reg_dbg_aux:Nn \c_true_bool { freed }
+  }
+\cs_gset_protected:Npn \__nmc_macros_register:N #1
+  { 
+    \__nmc_error_where:n { \__nmc_verb:n { \nmcMacros } }
+    \clist_reverse:N #1
+    \clist_map_inline:Nn #1
+      { 
+        \__nmc_macros_reg_split:w ##1\q_stop
+        \bool_if:NT \g__nmc_error_bool
+          { \clist_map_break: }
+      }
+    \bool_if:NF \g__nmc_error_bool
+      { \__nmc_macros_reg_props: }
+  }
+\cs_new_protected:Npn \__nmc_macros_reg_split:w #1#2\q_stop
+  { 
+    \tl_clear:N \l__nmc_vv_fp_expr_tl
+    \__nmc_fpify:nN { #2 } \l__nmc_vv_fp_expr_tl
+    \bool_if:NF \g__nmc_error_bool 
+      { 
+        \prop_put:Nnx \l__nmc_subst_var_prop { #1 }
+            { \fp_eval:n \l__nmc_vv_fp_expr_tl }
+        \__nmc_error_fpflag:
+      }
+  }
+\cs_new_protected:Npn \__nmc_macros_reg_props:
+  {
+    \clist_gconcat:NNN \g__nmc_macros_clist \l_tmpa_clist \g__nmc_macros_clist
+    \clist_remove_duplicates:N \g__nmc_macros_clist
+    \clist_map_inline:Nn \l_tmpa_clist
+      {
+        \prop_get:NnN \l__nmc_subst_var_prop { ##1 } \l_tmpa_tl
+        \prop_gput:Nno \g__nmc_subst_var_prop { ##1 } \l_tmpa_tl
+      }
+    \seq_gpop:NN \g__nmc_error_where_seq \l__nmc_toss_tl 
+    \int_if_zero:nF { \l__nmc_dbg_int }
+      { \__nmc_macros_reg_dbg: }
+  }
+\cs_new_protected:Npn \__nmc_macros_reg_dbg:
+  {
+    \tl_if_empty:NTF \l_nmc_formula_tl
+      { 
+        \__nmc_macros_reg_dbg_aux:Nn \c_true_bool { macros }
+        \clist_clear:N \l_tmpb_clist
+        \clist_map_inline:Nn \g__nmc_macros_clist 
           { 
-            \seq_set_split:NnV \l_tmpa_seq {,} \l__nmc_reuse_retrieved_tl
-            \seq_map_inline:Nn \l_tmpa_seq
-              { \__nmc_reuse_defcmds:Nnn ##1 { _props } }
+            \clist_put_right:Nx \l_tmpb_clist 
+              { \exp_not:N ##1 {~\exp_not:f ##1} }
           }
+        \tl_set:No \l_nmc_formula_tl \l_tmpb_clist
       }
-    \bool_set_true:N \l__nmc_reuse_retrieved_bool
-  } 
-\cs_new_protected:Npn \__nmc_reuse_result:N #1
+      { \__nmc_macros_reg_dbg_aux:Nn \l__nmc_macros_free_bool { added } }
+  }
+\cs_new_protected:Npn \__nmc_macros_reg_dbg_aux:Nn #1#2
   { 
-    \tl_set:Nn \l_tmpb_tl { #1 }
-    \tl_put_right:Nx \l_tmpb_tl { { \tl_to_str:N \g__nmc_reuse_tl } }
-    \bool_if:NF \l__nmc_reuse_retrieved_bool
-      { \__nmc_reuse_retrieve: }
-    \clist_put_right:NV \l__nmc_reuse_retrieved_tl \l_tmpb_tl
-    \exp_last_unbraced:NV\__nmc_reuse_defcmds:Nnn \l_tmpb_tl {}  
-    \tl_gclear:N \g__nmc_reuse_tl
+    \tl_set:Nn \l__nmc_dbg_idiii_tl { #2 }
+    \bool_if:NT #1
+      { 
+        \int_if_zero:nF { \l__nmc_dbg_int }
+          { \int_set:Nn \l__nmc_dbg_int { 3*5 } }
+      }
+    \seq_set_from_clist:NN \l__nmc_dbg_stored_seq \g__nmc_macros_clist 
+  }  
+%%%%%%%%%%%% user-defined constants %%%%%%%%%%%%%
+\seq_new:N \g__nmc_consts_seq % all
+\seq_new:N \g__nmc_consts_vv_seq % multitok in vv-list
+\int_new:N \g__nmc_consts_vv_int % count multitok + 1
+\bool_new:N \l__nmc_consts_add_bool
+\nmc_define:NnN \nmcConstants { consts } \constants
+
+\cs_gset_protected:Npn \__nmc_consts_initialize:
+  {
+    \__nmc_error_where:n { \__nmc_verb:n { \nmcConstants } }
+    \tl_set:Nn \l__nmc_dbg_idiii_tl { added }
+    \tl_set:Nn \l__nmc_dbg_idv_tl { constants }
   }
-\cs_generate_variant:Nn \__nmc_reuse_result:N { c }
+\cs_gset_protected:Npn \__nmc_consts_vv_digest:N #1
+  { % #1=*reversed* vv-list
+    \bool_if:nT { !\l__nmc_consts_add_bool &&
+                  !\tl_if_empty_p:N \l_nmc_formula_tl }
+      { \__nmc_consts_clear: }
+    \clist_set:NV \l_tmpa_clist \l_nmc_formula_tl
+    \clist_reverse:N \l_tmpa_clist
+    \clist_concat:NNN \l_tmpb_clist #1 \l_tmpa_clist
+    \__nmc_vv_digest:N \l_tmpb_clist
+    \clist_set:No \l_nmc_formula_tl \l_nmc_formula_tl
+    \clist_reverse:N \l_nmc_formula_tl
+    \int_if_zero:nF \l__nmc_dbg_int
+      { \__nmc_dbg_vv_view:n { \clist_count:N \l_tmpa_clist } }
+  }
+\cs_gset_protected:Npn \__nmc_consts_clear:
+  {
+    \seq_gclear:N \g__nmc_consts_vv_seq 
+    \seq_map_inline:Nn \g__nmc_consts_seq
+      {
+        \__nmc_split_eq:w ##1\q_stop
+        \prop_gremove:NV \g__nmc_subst_var_prop \l__nmc_eq_var_tl
+      }
+    \seq_gclear:N \g__nmc_consts_seq
+  }
+\cs_gset_protected:Npn \__nmc_consts_process:
+  { 
+    \tl_if_empty:NF \l_nmc_formula_tl
+      {
+        \seq_set_from_clist:NN \l_tmpa_seq \l_nmc_formula_tl
+        \seq_map_inline:Nn \l_tmpa_seq
+          { 
+            \__nmc_split_eq:w ##1\q_stop
+            \prop_get:NVN \l__nmc_subst_var_prop \l__nmc_eq_var_tl \l_tmpb_tl
+            \clist_pop:NN \l_tmpa_clist \l_tmpa_tl
+            \exp_last_unbraced:No\__nmc_split_eq:w \l_tmpa_tl\q_stop
+            \int_compare:nNnTF { \tl_count:N \l__nmc_eq_var_tl } = { 1 }
+              { 
+                \prop_gput:NVV \g__nmc_subst_var_prop 
+                    \l__nmc_eq_var_tl \l_tmpb_tl
+                \tl_put_right:Nn \l__nmc_eq_var_tl { = }
+                \tl_put_right:NV \l__nmc_eq_var_tl \l_tmpb_tl
+              }
+              {
+                \tl_put_right:Nn \l__nmc_eq_var_tl { = }
+                \tl_set:Nx \l_tmpa_tl 
+                    { \exp_not:o\l__nmc_eq_var_tl { \fp_eval:n \l_tmpb_tl } }
+                \tl_put_right:NV \l__nmc_eq_var_tl \l_tmpb_tl
+                \seq_gput_right:NV \g__nmc_consts_vv_seq \l_tmpa_tl
+              }
+            \seq_gput_right:NV \g__nmc_consts_seq \l__nmc_eq_var_tl
+          }
+        \int_gset:Nn \g__nmc_consts_vv_int
+            { 1 + \seq_count:N \g__nmc_consts_vv_seq }
+      }
+    \bool_if:nT 
+        { 
+          (\tl_if_empty_p:N \l_nmc_formula_tl) && 
+          (\int_compare_p:nNn { \l__nmc_dbg_int } = { 30 })
+        }
+      { \int_set:Nn \l__nmc_dbg_int { 5 } }
+    \seq_set_eq:NN \l__nmc_dbg_stored_seq \g__nmc_consts_seq
+    \bool_if:NT \l__nmc_num_only_bool
+      { 
+        \tl_set:Nx \l_nmc_result_tl 
+            { \int_eval:n { \seq_count:N \g__nmc_consts_seq }  }
+      }
+  }
+\cs_gset_protected:Npn \__nmc_consts_display:
+  { \bool_if:NT \l__nmc_num_only_bool { \l_nmc_result_tl } }
 
-\cs_new_protected:Npn \__nmc_reuse_defcmds:Nnn #1#2#3
+%%%%%%% save/retrieve results to/from file %%%%%%
+\tl_new:N \g__nmc_reuse_tl
+\tl_new:N \l__nmc_reuse_loaded_tl
+\bool_new:N \l__nmc_reuse_loaded_bool
+\int_new:N \l__nmc_reuse_mode_int
+\ior_new:N \g__nmc_ior
+\iow_new:N \g__nmc_iow
+\tl_gset:Nn \g__nmc_reuse_filename_tl { .nmc }
+\tl_gput_left:NV \g__nmc_reuse_filename_tl \jobname
+% save last \eval-uation to \#1
+\nmc_define:NnN \nmcReuse { reuse } \reuse
+
+\cs_gset_protected:Npn \__nmc_reuse_settings_digest:
   { 
-    \prop_get:NnNTF \g__nmc_subst_var_prop { #1 } \l__nmc_toss_tl
-      { \RenewDocumentCommand #1{}{#2} }
-      { \NewDocumentCommand #1{}{#2} }
-    \tl_set_rescan:Nnn #1 { \ExplSyntaxOn } { #2 }
-    \use:c { __nmc_reuse_write#3:Nn } #1{#2}
+    \tl_set:Nn \l__nmc_dbg_idii_tl { saved }
+    \__nmc_reuse_load: 
   }
-\cs_new_protected:Npn \__nmc_reuse_write:Nn #1#2
+\cs_gset_protected:Npn \__nmc_reuse_process:
   {
-    \__nmc_reuse_write_props:Nn #1{#2}
-    \file_get:VnNTF \g__nmc_reuse_filename_tl {} \l_tmpa_tl
+    \__nmc_error_where:n { \__nmc_verb:n { \nmcReuse }~command }
+    \tl_if_empty:NTF \l_nmc_formula_tl
+      {
+        \int_if_zero:nTF { 1 + \l__nmc_reuse_mode_int }
+          { \__nmc_reuse_delete_all: }
+          { \__nmc_reuse_load: }
+      }
+      { \__nmc_reuse_mode:Nn \l_nmc_formula_tl { \l__nmc_reuse_mode_int } }
+    \bool_if:NT \l__nmc_num_only_bool
       { 
-        \tl_if_head_eq_meaning:VNTF \l_tmpa_tl \par
-          { \tl_clear:N \l_tmpa_tl }
-          {
-            \__nmc_reuse_delete:NN #1 \l_tmpa_tl 
-            \tl_if_blank:VF \l_tmpa_tl 
+        \tl_set:Nx \l_nmc_result_tl
+          { \int_eval:n { \clist_count:N \l__nmc_reuse_loaded_tl } }
+      }
+    \__nmc_reuse_dbg_display:Nn \l_nmc_formula_tl { \l__nmc_dbg_int }
+  }
+\cs_gset_protected:Npn \__nmc_reuse_display:
+  { \bool_if:NT \l__nmc_num_only_bool { \l_nmc_result_tl } }
+%%%%%%%%%%
+\cs_new_protected:Npn \__nmc_reuse_load:
+  { 
+    \bool_if:NF \l__nmc_reuse_loaded_bool
+      { 
+        \file_get:VnNT \g__nmc_reuse_filename_tl {} \l_tmpa_tl
+          { 
+            \clist_set:No \l__nmc_reuse_loaded_tl \l_tmpa_tl
+            \bool_lazy_or:nnTF 
+                { \tl_if_blank_p:V \l__nmc_reuse_loaded_tl }
+                { \tl_if_head_eq_meaning_p:VN \l__nmc_reuse_loaded_tl \par }
+              { \tl_clear:N \l__nmc_reuse_loaded_tl }  
               { 
-                \tl_trim_spaces:N \l_tmpa_tl
-                \tl_put_right:Nn \l_tmpa_tl {,} 
-              } 
+                \seq_set_split:NnV \l_tmpa_seq {,} \l__nmc_reuse_loaded_tl
+                \seq_map_inline:Nn \l_tmpa_seq
+                    { \__nmc_reuse_write_props:Nn ##1 }
+              }
           }
+        \bool_set_true:N \l__nmc_reuse_loaded_bool
       }
-      { \tl_clear:N \l_tmpa_tl }
-    \tl_put_right:Nn \l_tmpa_tl { #1 {#2} }
+  } 
+\cs_new_protected:Npn \__nmc_reuse_mode:Nn #1#2
+  { 
+    \int_if_zero:nTF { 1 + #2 } % if #2=-1
+      { \__nmc_reuse_delete_one:c #1 }
+      {
+        \tl_if_empty:NTF \g__nmc_reuse_tl
+          { \__nmc_error_what:n  { No~result~available~for~\__nmc_verb:V #1\ in } }
+          { 
+            \exp_args:NNc \tl_set:Nn \l_tmpa_tl #1
+            \prop_if_in:NVTF \g__nmc_subst_var_prop \l_tmpa_tl
+              {
+                \int_if_zero:nTF { #2 }
+                  { \__nmc_reuse_already_def:N \l_nmc_formula_tl }
+                  { 
+                    \__nmc_reuse_delete_one:c #1 
+                    \__nmc_reuse_save:c #1
+                  }
+              }
+              { \__nmc_reuse_save:c #1 }
+        }
+      }
+  }
+\cs_new_protected:Npn \__nmc_reuse_dbg_display:Nn #1#2
+  {
+    \bool_if:nTF 
+        { 
+          !\int_if_zero_p:n { #2 } && 
+          ( \int_if_zero_p:n { 1 + \l__nmc_reuse_mode_int } 
+            || \tl_if_empty_p:N #1 ) 
+        }
+      {
+        \tl_set:Nx \l__nmc_dbg_vv_tl 
+            { \clist_use:Nn \l__nmc_reuse_loaded_tl {,~} }  
+      }
+      { \clist_pop:NN \l__nmc_reuse_loaded_tl \l__nmc_dbg_vv_tl }
+  }
+\cs_new_protected:Npn \__nmc_reuse_save:N #1
+  {
+    \__nmc_reuse_load:
+    \tl_set:Nn \l_tmpb_tl { #1 } 
+    \tl_put_right:Nx \l_tmpb_tl { { \exp_not:o \g__nmc_reuse_tl } }
+    \prop_get:NnNTF \l__nmc_subst_var_prop { #1 } \l_tmpa_tl
+      { \exp_last_unbraced:NV\__nmc_reuse_defcmds:Nn \l_tmpb_tl }
+      { 
+        \cs_if_exist:NTF #1
+          { \__nmc_reuse_already_def:N \l_nmc_formula_tl }
+          { \exp_last_unbraced:NV\__nmc_reuse_defcmds:Nn \l_tmpb_tl }
+      }
+  }
+\cs_generate_variant:Nn \__nmc_reuse_save:N { c }
+
+\cs_new_protected:Npn \__nmc_reuse_defcmds:Nn #1#2
+  { 
+    \tl_set_rescan:Nnn #1 { \ExplSyntaxOn } { #2 }
+    \__nmc_reuse_write_props:Nn #1{#2}
+    \tl_if_empty:NF \l__nmc_reuse_loaded_tl
+      { \__nmc_reuse_delete:N #1 }
+    \clist_put_left:Nn \l__nmc_reuse_loaded_tl { #1 {#2} }
     \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
-    \iow_now:NV \g__nmc_iow \l_tmpa_tl
+    \str_set:NV \l_tmpa_str \l__nmc_reuse_loaded_tl
+    \iow_now:NV \g__nmc_iow \l_tmpa_str
     \iow_close:N \g__nmc_iow
   }
-\cs_new_protected:Npn \__nmc_reuse_delete:NN #1#2
+\cs_new_protected:Npn \__nmc_reuse_write_props:Nn #1#2
   {
+    \prop_gput:Nnn \g__nmc_subst_var_prop { #1 } { #2 }
+    \tl_gset:Nn #1 { #2 }
+  }
+\cs_new_protected:Npn \__nmc_reuse_delete:N #1
+  {
     \seq_clear:N \l_tmpb_seq
-    \seq_set_split:NnV \l_tmpa_seq {,} #2
+    \seq_set_split:NnV \l_tmpa_seq {,} \l__nmc_reuse_loaded_tl
     \seq_map_inline:Nn \l_tmpa_seq
-      {
-        \tl_if_head_eq_meaning:nNF { ##1 } #1
+      { 
+        \exp_args:No\str_if_eq:nnF { \use_i:nn ##1 } { #1 }
           { \seq_put_right:Nn \l_tmpb_seq { ##1 } }
       }
-    \tl_set:Nx #2 { \seq_use:Nn \l_tmpb_seq {,} }
+    \tl_set:Nx \l__nmc_reuse_loaded_tl { \seq_use:Nn \l_tmpb_seq {,} }
   }
-\cs_new_protected:Npn \__nmc_reuse_write_props:Nn #1#2
+\cs_new_protected:Npn \__nmc_reuse_delete:Nn #1#2
   { 
-    \prop_put_if_new:Nnn \g__nmc_class_prop { #1 } 
-        { \__nmc_fpify_var: \__nmc_delim_var: }
-    \prop_put:Nnn \g__nmc_subst_var_prop { #1 } { #2 }
+    \prop_gremove:Nn \g__nmc_subst_var_prop { #1 }
+    \cs_undefine:N #1
   }
+\cs_new_protected:Npn \__nmc_reuse_delete_one:N #1
+  { 
+    \__nmc_reuse_load:
+    \tl_if_empty:NF \l__nmc_reuse_loaded_tl
+      { \__nmc_reuse_delete:N #1 }
+    \__nmc_reuse_delete:Nn #1 {}
+    \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
+    \iow_now:NV \g__nmc_iow \l__nmc_reuse_loaded_tl
+    \iow_close:N \g__nmc_iow
+  }
+\cs_generate_variant:Nn \__nmc_reuse_delete_one:N { c }
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% settings
+\cs_new_protected:Npn \__nmc_reuse_delete_all:
+  {
+    \__nmc_reuse_load:
+    \tl_if_empty:NF \l__nmc_reuse_loaded_tl
+      {
+        \seq_set_split:NnV \l_tmpa_seq {,} \l__nmc_reuse_loaded_tl
+        \seq_map_inline:Nn \l_tmpa_seq { \__nmc_reuse_delete:Nn ##1 }
+        \tl_clear:N \l__nmc_reuse_loaded_tl
+      }
+    \iow_open:NV \g__nmc_iow \g__nmc_reuse_filename_tl
+    \iow_close:N \g__nmc_iow  
+  }
+\cs_new_protected:Npn \__nmc_reuse_already_def:N #1
+  { \__nmc_error_what:n { \__nmc_verb:c #1\ already~defined~in } }
+%%%%%%%%%%%%%%%%%%% settings %%%%%%%%%%%%%%%%%%%%
 \bool_new:N \l__nmc_multitok_bool
 \bool_new:N \l__nmc_vv_multline_bool
 \bool_new:N \l__nmc_deg_bool 
-\tl_new:N \l__nmc_eq_num_tl
+\tl_new:N \l__nmc_eqn_num_tl
 \int_new:N \l__nmc_posi_int
+\int_set:Nn \l__nmc_posi_int { 1 }
 \int_new:N \l__nmc_eval_reuse_int
-\int_new:N \l__nmc_debug_int
-\tl_new:N \l__nmc_reuse_sep_tl % numerica-plus
-\int_set_eq:NN \l__nmc_posi_int \c_one_int
-
+\int_new:N \l__nmc_dbg_int
+\cs_new_protected:Npn \__nmc_dbg_int:nn #1#2
+  { 
+    \int_set:Nn \l__nmc_dbg_int 
+        { 
+          \int_compare:nNnTF { \int_abs:n { #1 } } = { 1 } 
+            { \int_sign:n { #1 }*#2 } { #1 } 
+        }
+  }
 \cs_new_protected:Npn \__nmc_set_trig_parsing:n #1
   { % #1=1,2,3
-    \int_set:Nn\l__nmc_posi_int { #1 }
+    \int_set:Nn \l__nmc_posi_int { #1 }
     \int_compare:nNnTF { #1 } > { 1 }
-      { % #1=2,3
-        \int_set_eq:NN \l__nmc_trg_int \c__nmc_trg_int 
-        \int_compare:nNnT { #1 } > { 2 }
-          { % #1=3
-            \__nmc_fill_class:nn { \frac, \dfrac }
-                { \__nmc_fpify_frac: \__nmc_delim_tfrac: }
-          }
-      }
+      { \int_set_eq:NN \l__nmc_trg_int \c__nmc_trg_int } % #1=2,3
       { \int_set_eq:NN \l__nmc_trg_int \c__nmc_uny_int } % #1=1
   }
+\cs_new:Npn \__nmc_int_to_bool:Nn #1#2
+  { \bool_set:Nn #1 { !\int_if_zero_p:n { #2 } } }
 \cs_new:Npn \__nmc_deg:
   { \bool_if:NT { \l__nmc_deg_bool } { d } } 
-\cs_new:Npn \__nmc_int_to_bool:Nn #1#2
-  { \bool_set:Nn #1 { !\int_if_zero_p:n { #2 } } }
 \keys_define:nn { numerica }
   { 
     rounding            .int_set:N = \l__nmc_round_int,
@@ -2609,10 +2976,12 @@
                                        \l__nmc_sci_num_out_bool { #1 },
     output-exponent-char .tl_set:N = \l__nmc_sci_num_out_tl,
     input-sci-notation     .code:n = \__nmc_int_to_bool:Nn
-                                       \l__nmc_sci_num_in_bool { #1 },
+                                        \l__nmc_sci_num_in_bool { #1 },
     input-exponent-char  .tl_set:N = \l__nmc_sci_num_in_tl,
     multitoken-variables   .code:n = \__nmc_int_to_bool:Nn 
                                        \l__nmc_multitok_bool { #1 },
+    use-degrees            .code:n = \__nmc_int_to_bool:Nn
+                                       \l__nmc_deg_bool { #1 },
     logarithm-base       .tl_set:N = \l__nmc_log_base_tl,
     intify-rounding      .tl_set:N = \l__nmc_intify_round_tl,
     vv-display           .tl_set:N = \l__nmc_vv_display_tl,
@@ -2630,6 +2999,7 @@
     input-sci-notation   .default:n = 0,
     input-exponent-char  .default:n = e,
     multitoken-variables .default:n = 1,
+    use-degrees          .default:n = 0,
     logarithm-base       .default:n = 10,
     intify-rounding      .default:n = 14,
     vv-display           .default:n = {,}\mskip 36mu minus 24mu(vv),
@@ -2643,7 +3013,7 @@
 \keys_set_known:nn { numerica } 
   { 
     rounding,pad,output-sci-notation,output-exponent-char,
-    input-sci-notation,input-exponent-char,
+    input-sci-notation,input-exponent-char,use-degrees,
     multitoken-variables,logarithm-base,intify-rounding, 
     vv-display,vv-inline,sum-extra-rounding,sum-query-terms,
     prod-extra-rounding,prod-query-terms,eval-reuse
@@ -2650,24 +3020,25 @@
   }
 \keys_define:nn { numerica/generic }
   {
-    dbg    .code:n = \int_set:Nn \l__nmc_debug_int 
-                     { \int_compare:nNnTF { \int_abs:n { #1 } } = { 1 } 
-                        { \int_sign:n { #1 }*2*3*5*7 } { #1 } },
+    dbg    .code:n = \__nmc_dbg_int:nn { #1 } { 2*3*5*7 },
+    dbg .initial:n = 0,
+    view   .code:n = \__nmc_dbg_int:nn { 1 } { 2*3*5*7 },
     ^      .code:n = \bool_set_true:N \l__nmc_sci_num_in_bool
                      \tl_set:Nn \l__nmc_sci_num_in_tl { #1 },
     xx     .code:n = \__nmc_int_to_bool:Nn \l__nmc_multitok_bool { #1 },
     ()     .code:n = \__nmc_set_trig_parsing:n { 2+\int_sign:n { #1-1 } },
     ()  .initial:n = 0,
-    o      .code:n = \bool_set_true:N \l__nmc_deg_bool,
+    o      .code:n = \__nmc_int_to_bool:Nn \l__nmc_deg_bool { #1 },
+    o   .default:n = 1,
     log  .tl_set:N = \l__nmc_log_base_tl,
     vvmode .code:n = \__nmc_calc_mode:n { \int_sign:n { #1*#1 } },
+    vv@    .code:n = \__nmc_calc_mode:n { \int_sign:n { #1*#1 } },
+    vv@ .initial:n = 0,
     vvd    .code:n = \tl_set:Nn \l__nmc_vv_display_tl { #1 }
                      \tl_if_in:NnT \l__nmc_vv_display_tl { \\ }
                        { \bool_set_true:N \l__nmc_vv_multline_bool },
     vvi  .tl_set:N = \l__nmc_vv_inline_tl,
-    *      .code:n = \tl_set:Nn \l__nmc_eq_num_tl { * },
-    p    .tl_set:N = \l__nmc_punc_tl,
-    p   .default:n = {,},
+    *      .code:n = \tl_set:Nn \l__nmc_eqn_num_tl { * },
     S+  .int_set:N = \l__nmc_sum_extra_int,
     S?  .int_set:N = \l__nmc_sum_query_int,
     P+  .int_set:N = \l__nmc_prod_extra_int,
@@ -2674,19 +3045,32 @@
     P?  .int_set:N = \l__nmc_prod_query_int,
   }
 \keys_define:nn { numerica/eval }
-  { reuse .int_set:N = \l__nmc_eval_reuse_int }
-\keys_define:nn { numerica/package }
   { 
-    plus         .code:n = \file_input:n { numerica-plus.def },
-    tables       .code:n = \file_input:n { numerica-tables.def },
-    % calculus     .code:n = \file_input:n { numerica-calculus.def },
-    lyx          .code:n = \file_input:n { numerica-lyx.def }
+    p      .tl_set:N = \l__nmc_punc_tl,
+    p     .default:n = {,},
+    reuse .int_set:N = \l__nmc_eval_reuse_int
   }
-\ProcessKeysPackageOptions { numerica/package }
-
+\keys_define:nn { numerica/info }
+  { view .code:n = \__nmc_dbg_int:nn { 1 } { 2 } }
+\keys_define:nn { numerica/macros }
+  { 
+    view .code:n = \__nmc_dbg_int:nn { 1 } { 2*3*5 },
+    free .code:n = \bool_set_true:N \l__nmc_macros_free_bool
+  }
+\keys_define:nn { numerica/consts }
+  { 
+    view .code:n = \__nmc_dbg_int:nn { 1 } { 2*3*5 },
+    add  .code:n = \bool_set_true:N \l__nmc_consts_add_bool
+  } 
+\keys_define:nn { numerica/reuse }
+  {
+    view   .code:n = \__nmc_dbg_int:nn { 1 } { 2 },
+    delete .code:n = \int_set:Nn \l__nmc_reuse_mode_int { -1 },
+    renew  .code:n = \int_set:Nn \l__nmc_reuse_mode_int { 1 }
+  }
 \file_if_exist:nT { numerica.cfg }
   { 
     \file_get:nnN { numerica.cfg } {} \l_tmpa_tl
     \exp_args:NnV \keys_set_known:nn { numerica } \l_tmpa_tl
   }
-% end of `numerica.sty'
\ No newline at end of file
+% end of file `numerica.sty'
\ No newline at end of file



More information about the tex-live-commits mailing list.