Index: doc/papers/general/Paper.tex
===================================================================
--- doc/papers/general/Paper.tex	(revision 8f67d442595ccba6342b86d7428843dd8b34c353)
+++ doc/papers/general/Paper.tex	(revision cd310f7b1819825f5a2bf16fa41a5af95d9c83d2)
@@ -1791,5 +1791,5 @@
 struct Weight { double stones; };
 
-void ?{}( Weight & w ) { w.stones = 0; } $\C{// operations}$
+void ?{}( Weight & w ) { w.stones = 0; }	$\C{// operations}$
 void ?{}( Weight & w, double w ) { w.stones = w; }
 Weight ?+?( Weight l, Weight r ) { return (Weight){ l.stones + r.stones }; }
@@ -1800,10 +1800,10 @@
 
 int main() {
-	Weight w, hw = { 14 };			$\C{// 14 stone}$
+	Weight w, hw = { 14 };					$\C{// 14 stone}$
 	w = 11@`st@ + 1@`lb@;
 	w = 70.3@`kg@;
 	w = 155@`lb@;
-	w = 0x_9b_u@`lb@;				$\C{// hexadecimal unsigned weight (155)}$
-	w = 0_233@`lb@;					$\C{// octal weight (155)}$
+	w = 0x_9b_u@`lb@;						$\C{// hexadecimal unsigned weight (155)}$
+	w = 0_233@`lb@;							$\C{// octal weight (155)}$
 	w = 5@`st@ + 8@`kg@ + 25@`lb@ + hw;
 }
@@ -1813,4 +1813,182 @@
 
 \section{Libraries}
+
+As stated in Section~\ref{sec:poly-fns}, \CFA inherits a massive corpus of library code, where other programming languages must rewrite or provide fragile inter-language communication with C.
+\CFA has replacement libraries condensing hundreds of existing C functions into tens of \CFA overloaded functions, all without rewriting the actual computations.
+In many cases, the interface is an inline wrapper providing overloading during compilation but zero cost at runtime.
+The following sections give a gleams of the interface reduction to many C libraries.
+In many cases, @signed@/@unsigned@ @char@ and @short@ routines are available (but not shown) to ensure expression computations remain in a single type, as conversions can distort results.
+
+
+\subsection{Limits}
+
+C library @limits.h@ provides lower and upper bound constants for the basic types.
+\CFA name overloading is used to overload these constants, \eg:
+\begin{cquote}
+\lstDeleteShortInline@%
+\begin{tabular}{@{}l@{\hspace{3em}}l@{}}
+\multicolumn{1}{c@{\hspace{3em}}}{\textbf{Definition}}	& \multicolumn{1}{c}{\textbf{Usage}}	\\
+\begin{cfa}
+const short int `MIN` = -32768;
+const int `MIN` = -2147483648;
+const long int `MIN` = -9223372036854775808L;
+\end{cfa}
+&
+\begin{cfa}
+short int si = `MIN`;
+int i = `MIN`;
+long int li = `MIN`;
+\end{cfa}
+\end{tabular}
+\lstMakeShortInline@%
+\end{cquote}
+The result is a significant reduction in names to access typed constants, \eg:
+\begin{cquote}
+\lstDeleteShortInline@%
+\begin{tabular}{@{}l@{\hspace{3em}}l@{}}
+\multicolumn{1}{c@{\hspace{3em}}}{\textbf{\CFA}}	& \multicolumn{1}{c}{\textbf{C}}	\\
+\begin{cfa}
+MIN,
+MAX,
+M_PI,
+M_E
+\end{cfa}
+&
+\begin{cfa}
+SCHAR_MIN, CHAR_MIN, SHRT_MIN, INT_MIN, LONG_MIN, LLONG_MIN,
+SCHAR_MAX, UCHAR_MAX, SHRT_MAX, INT_MAX, LONG_MAX, LLONG_MAX,
+M_PI, M_PIl, M_CPI, M_CPIl,
+M_E, M_El, M_CE, M_CEl
+\end{cfa}
+\end{tabular}
+\lstMakeShortInline@%
+\end{cquote}
+
+
+\subsection{Math}
+
+C library @math.h@ provides lower and upper bound constants for the basic types.
+\CFA name overloading is used to overload these constants, \eg:
+\begin{cquote}
+\lstDeleteShortInline@%
+\begin{tabular}{@{}l@{\hspace{3em}}l@{}}
+\multicolumn{1}{c@{\hspace{3em}}}{\textbf{Definition}}	& \multicolumn{1}{c}{\textbf{Usage}}	\\
+\begin{cfa}
+float `log`( float x );
+double `log`( double );
+double _Complex `log`( double _Complex x );
+\end{cfa}
+&
+\begin{cfa}
+float f = `log`( 3.5 );
+double d = `log`( 3.5 );
+double _Complex dc = `log`( 3.5+0.5I );
+\end{cfa}
+\end{tabular}
+\lstMakeShortInline@%
+\end{cquote}
+The result is a significant reduction in names to access math routines, \eg:
+\begin{cquote}
+\lstDeleteShortInline@%
+\begin{tabular}{@{}l@{\hspace{3em}}l@{}}
+\multicolumn{1}{c@{\hspace{3em}}}{\textbf{\CFA}}	& \multicolumn{1}{c}{\textbf{C}}	\\
+\begin{cfa}
+log,
+sqrt,
+sin
+\end{cfa}
+&
+\begin{cfa}
+logf, log, logl, clogf, clog, clogl
+sqrtf, sqrt, sqrtl, csqrtf, csqrt, csqrtl
+sinf, sin, sinl, csinf, csin, csinl
+\end{cfa}
+\end{tabular}
+\lstMakeShortInline@%
+\end{cquote}
+
+
+\subsection{Standard}
+
+Library routines (@stdlib.h@) with multiple types.
+\begin{cquote}
+\lstDeleteShortInline@%
+\begin{tabular}{@{}l@{\hspace{3em}}l@{}}
+\multicolumn{1}{c@{\hspace{3em}}}{\textbf{Definition}}	& \multicolumn{1}{c}{\textbf{Usage}}	\\
+\begin{cfa}
+unsigned int `abs`( int );
+double `abs`( double );
+double cabs( double _Complex );
+\end{cfa}
+&
+\begin{cfa}
+unsigned int i = `abs`( -1 );
+double d = `abs`( -1.5 );
+double d = `abs`( -1.5+0.5I );
+\end{cfa}
+\end{tabular}
+\lstMakeShortInline@%
+\end{cquote}
+The result is a significant reduction in names to access math routines, \eg:
+\begin{cquote}
+\lstDeleteShortInline@%
+\begin{tabular}{@{}l@{\hspace{3em}}l@{}}
+\multicolumn{1}{c@{\hspace{3em}}}{\textbf{\CFA}}	& \multicolumn{1}{c}{\textbf{C}}	\\
+\begin{cfa}
+abs,
+strto,
+random
+\end{cfa}
+&
+\begin{cfa}
+abs, labs, llabs, fabsf, fabs, fabsl, cabsf, cabs, cabsl
+strtol, strtoul, strtoll, strtoull, strtof, strtod, strtold
+srand48, mrand48, lrand48, drand48
+\end{cfa}
+\end{tabular}
+\lstMakeShortInline@%
+\end{cquote}
+
+The following shows one example where \CFA \emph{extends} an existing standard C interface to reduce complexity and provide safety.
+C/\Celeven provide a number of complex and overlapping storage-management operation to support the following capabilities:
+\begin{description}
+\item[fill]
+after allocation the storage is filled with a specified character.
+\item[resize]
+an existing allocation is decreased or increased in size.
+In either case, new storage may or may not be allocated and, if there is a new allocation, as much data from the existing allocation is copied.
+For an increase in storage size, new storage after the copied data may be filled.
+\item[alignment]
+an allocation starts on a specified memory boundary, \eg, an address multiple of 64 or 128 for cache-line purposes.
+\item[array]
+the allocation size is scaled to the specified number of array elements.
+An array may be filled, resized, or aligned.
+\end{description}
+Table~\ref{t:StorageManagementOperations} shows the capabilities provided by C/\Celeven allocation-routines and how all the capabilities can be combined into two \CFA routines.
+\begin{table}[h]
+\centering
+\lstDeleteShortInline@%
+\lstMakeShortInline~%
+\begin{tabular}{@{}r|r|l|l|l|l@{}}
+\multicolumn{1}{c}{}&		& \multicolumn{1}{c|}{fill}	& resize	& alignment	& array	\\
+\hline
+C		& ~malloc~			& no			& no		& no		& no	\\
+		& ~calloc~			& yes (0 only)	& no		& no		& yes	\\
+		& ~realloc~			& no/copy		& yes		& no		& no	\\
+		& ~memalign~		& no			& no		& yes		& no	\\
+		& ~posix_memalign~	& no			& no		& yes		& no	\\
+\hline
+C11		& ~aligned_alloc~	& no			& no		& yes		& no	\\
+\hline
+\CFA	& ~alloc~			& no/copy/yes	& no/yes	& no		& yes	\\
+		& ~align_alloc~		& no/yes		& no		& yes		& yes	\\
+\end{tabular}
+\lstDeleteShortInline~%
+\lstMakeShortInline@%
+\caption{Storage-Management Operations}
+\label{t:StorageManagementOperations}
+\end{table}
+It is impossible to resize with alignment because the underlying @realloc@ allocates storage if more space is needed, and it does not honour alignment from the original allocation.
+
 
 \subsection{I/O}
@@ -1902,4 +2080,48 @@
 There are routines to set and get the separator string, and manipulators to toggle separation on and off in the middle of output.
 \end{list}
+The storage-management routines extend their C equivalents by overloading, alternate names, providing shallow type-safety, and removing the need to specify the allocation size for non-array types.
+
+
+\subsection{Multi-precision Integers}
+\label{s:MultiPrecisionIntegers}
+
+\CFA has an interface to the GMP multi-precision signed-integers~\cite{GMP}, similar to the \CC interface provided by GMP.
+The \CFA interface wraps GMP routines into operator routines to make programming with multi-precision integers identical to using fixed-sized integers.
+The \CFA type name for multi-precision signed-integers is @Int@ and the header file is @gmp@.
+The following factorial programs contrast using GMP with the \CFA and C interfaces.
+\begin{cquote}
+\lstDeleteShortInline@%
+\begin{tabular}{@{}l@{\hspace{\parindentlnth}}@{\hspace{\parindentlnth}}l@{}}
+\multicolumn{1}{c@{\hspace{\parindentlnth}}}{\textbf{\CFA}}	& \multicolumn{1}{@{\hspace{\parindentlnth}}c}{\textbf{C}}	\\
+\begin{cfa}
+#include <gmp>
+int main( void ) {
+	sout | "Factorial Numbers" | endl;
+	Int fact = 1;
+
+	sout | 0 | fact | endl;
+	for ( unsigned int i = 1; i <= 40; i += 1 ) {
+		fact *= i;
+		sout | i | fact | endl;
+	}
+}
+\end{cfa}
+&
+\begin{cfa}
+#include <gmp.h>
+int main( void ) {
+	`gmp_printf`( "Factorial Numbers\n" );
+	`mpz_t` fact;
+	`mpz_init_set_ui`( fact, 1 );
+	`gmp_printf`( "%d %Zd\n", 0, fact );
+	for ( unsigned int i = 1; i <= 40; i += 1 ) {
+		`mpz_mul_ui`( fact, fact, i );
+		`gmp_printf`( "%d %Zd\n", i, fact );
+	}
+}
+\end{cfa}
+\end{tabular}
+\lstMakeShortInline@%
+\end{cquote}
 
 
