summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/polexpr/polexpr.html
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/polexpr/polexpr.html')
-rw-r--r--Master/texmf-dist/doc/latex/polexpr/polexpr.html820
1 files changed, 627 insertions, 193 deletions
diff --git a/Master/texmf-dist/doc/latex/polexpr/polexpr.html b/Master/texmf-dist/doc/latex/polexpr/polexpr.html
index d5f3237a0b2..962771bdfa7 100644
--- a/Master/texmf-dist/doc/latex/polexpr/polexpr.html
+++ b/Master/texmf-dist/doc/latex/polexpr/polexpr.html
@@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<title>Package polexpr documentation</title>
<style type="text/css">
-body{font-size: 14pt;}
+body{font-size: 13pt;}
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
@@ -362,35 +362,101 @@ ul.auto-toc {
<body>
<div class="document" id="package-polexpr-documentation">
<h1 class="title">Package polexpr documentation</h1>
+<h2 class="subtitle" id="id1">0.3.1 (2018/01/18)</h2>
<!-- comment: -*- fill-column: 72; mode: rst; -*- -->
+<div class="contents topic" id="contents">
+<p class="topic-title first">Contents</p>
+<ul class="simple">
+<li><a class="reference internal" href="#first-examples" id="id15">First Examples</a></li>
+<li><a class="reference internal" href="#non-expandable-macros" id="id16">Non-expandable macros</a><ul>
+<li><a class="reference internal" href="#poldef-polname-letter-expression-in-letter" id="id17"><tt class="docutils literal">\poldef <span class="pre">polname(letter):=</span> expression in letter;</tt></a></li>
+<li><a class="reference internal" href="#poldef-letter-polname-expression-in-letter" id="id18"><tt class="docutils literal"><span class="pre">\PolDef[letter]{polname}{expression</span> in letter}</tt></a></li>
+<li><a class="reference internal" href="#pollet-polname-2-polname-1" id="id19"><tt class="docutils literal"><span class="pre">\PolLet{polname_2}={polname_1}</span></tt></a></li>
+<li><a class="reference internal" href="#polassign-polname-toarray-macro" id="id20"><tt class="docutils literal"><span class="pre">\PolAssign{polname}\toarray\macro</span></tt></a></li>
+<li><a class="reference internal" href="#polget-polname-fromarray-macro" id="id21"><tt class="docutils literal"><span class="pre">\PolGet{polname}\fromarray\macro</span></tt></a></li>
+<li><a class="reference internal" href="#polfromcsv-polname-csv" id="id22"><tt class="docutils literal"><span class="pre">\PolFromCSV{polname}{&lt;csv&gt;}</span></tt></a></li>
+<li><a class="reference internal" href="#poltypeset-polname" id="id23"><tt class="docutils literal">\PolTypeset{polname}</tt></a><ul>
+<li><a class="reference internal" href="#poltypesetcmd-raw-coeff" id="id24"><tt class="docutils literal">\PolTypesetCmd{raw_coeff}</tt></a></li>
+<li><a class="reference internal" href="#poltypesetcmdprefix-raw-coeff" id="id25"><tt class="docutils literal">\PolTypesetCmdPrefix{raw_coeff}</tt></a></li>
+<li><a class="reference internal" href="#poltypesetmonomialcmd" id="id26"><tt class="docutils literal">\PolTypesetMonomialCmd</tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#id5" id="id27"><tt class="docutils literal"><span class="pre">\PolTypeset*{polname}</span></tt></a></li>
+<li><a class="reference internal" href="#poldiff-polname-1-polname-2" id="id28"><tt class="docutils literal"><span class="pre">\PolDiff{polname_1}{polname_2}</span></tt></a></li>
+<li><a class="reference internal" href="#poldiff-n-polname-1-polname-2" id="id29"><tt class="docutils literal"><span class="pre">\PolDiff[N]{polname_1}{polname_2}</span></tt></a></li>
+<li><a class="reference internal" href="#polantidiff-polname-1-polname-2" id="id30"><tt class="docutils literal"><span class="pre">\PolAntiDiff{polname_1}{polname_2}</span></tt></a></li>
+<li><a class="reference internal" href="#polantidiff-n-polname-1-polname-2" id="id31"><tt class="docutils literal"><span class="pre">\PolAntiDiff[N]{polname_1}{polname_2}</span></tt></a></li>
+<li><a class="reference internal" href="#poldivide-polname-1-polname-2-polname-q-polname-r" id="id32"><tt class="docutils literal"><span class="pre">\PolDivide{polname_1}{polname_2}{polname_Q}{polname_R}</span></tt></a></li>
+<li><a class="reference internal" href="#polgcd-polname-1-polname-2-polname-gcd" id="id33"><tt class="docutils literal"><span class="pre">\PolGCD{polname_1}{polname_2}{polname_GCD}</span></tt></a></li>
+<li><a class="reference internal" href="#polmapcoeffs-macro-polname" id="id34"><tt class="docutils literal"><span class="pre">\PolMapCoeffs{\macro}{polname}</span></tt></a></li>
+<li><a class="reference internal" href="#polreducecoeffs-polname" id="id35"><tt class="docutils literal">\PolReduceCoeffs{polname}</tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#expandable-macros" id="id36">Expandable macros</a><ul>
+<li><a class="reference internal" href="#poleval-polname-at-numerical-expression" id="id37"><tt class="docutils literal"><span class="pre">\PolEval{polname}\At{numerical</span> expression}</tt></a></li>
+<li><a class="reference internal" href="#polevalreduced-polname-at-numerical-expression" id="id38"><tt class="docutils literal"><span class="pre">\PolEvalReduced{polname}\At{numerical</span> expression}</tt></a></li>
+<li><a class="reference internal" href="#polfloateval-polname-at-numerical-expression" id="id39"><tt class="docutils literal"><span class="pre">\PolFloatEval{polname}\At{numerical</span> expression}</tt></a></li>
+<li><a class="reference internal" href="#polnthcoeff-polname-number" id="id40"><tt class="docutils literal"><span class="pre">\PolNthCoeff{polname}{number}</span></tt></a></li>
+<li><a class="reference internal" href="#poldegree-polname" id="id41"><tt class="docutils literal">\PolDegree{polname}</tt></a></li>
+<li><a class="reference internal" href="#poltoexpr-polname" id="id42"><tt class="docutils literal">\PolToExpr{polname}</tt></a><ul>
+<li><a class="reference internal" href="#poltoexproneterm-raw-coeff-number" id="id43"><tt class="docutils literal"><span class="pre">\PolToExprOneTerm{raw_coeff}{number}</span></tt></a></li>
+<li><a class="reference internal" href="#poltoexpronetermstyleb-raw-coeff-number" id="id44"><tt class="docutils literal"><span class="pre">\PolToExprOneTermStyleB{raw_coeff}{number}</span></tt></a></li>
+<li><a class="reference internal" href="#poltoexprcmd-raw-coeff" id="id45"><tt class="docutils literal">\PolToExprCmd{raw_coeff}</tt></a></li>
+<li><a class="reference internal" href="#poltoexprtermprefix-raw-coeff" id="id46"><tt class="docutils literal">\PolToExprTermPrefix{raw_coeff}</tt></a></li>
+<li><a class="reference internal" href="#poltoexprvar" id="id47"><tt class="docutils literal">\PolToExprVar</tt></a></li>
+<li><a class="reference internal" href="#poltoexprtimes" id="id48"><tt class="docutils literal">\PolToExprTimes</tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#id12" id="id49"><tt class="docutils literal"><span class="pre">\PolToExpr*{polname}</span></tt></a></li>
+<li><a class="reference internal" href="#poltofloatexpr-polname" id="id50"><tt class="docutils literal">\PolToFloatExpr{polname}</tt></a><ul>
+<li><a class="reference internal" href="#poltofloatexproneterm-raw-coeff-number" id="id51"><tt class="docutils literal"><span class="pre">\PolToFloatExprOneTerm{raw_coeff}{number}</span></tt></a></li>
+<li><a class="reference internal" href="#poltofloatexprcmd-raw-coeff" id="id52"><tt class="docutils literal">\PolToFloatExprCmd{raw_coeff}</tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#id13" id="id53"><tt class="docutils literal"><span class="pre">\PolToFloatExpr*{polname}</span></tt></a></li>
+<li><a class="reference internal" href="#poltolist-polname" id="id54"><tt class="docutils literal">\PolToList{polname}</tt></a></li>
+<li><a class="reference internal" href="#poltocsv-polname" id="id55"><tt class="docutils literal">\PolToCSV{polname}</tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#booleans-with-default-setting-as-indicated" id="id56">Booleans (with default setting as indicated)</a><ul>
+<li><a class="reference internal" href="#xintverbosefalse" id="id57"><tt class="docutils literal">\xintverbosefalse</tt></a></li>
+<li><a class="reference internal" href="#poltypesetallfalse" id="id58"><tt class="docutils literal">\poltypesetallfalse</tt></a></li>
+<li><a class="reference internal" href="#poltoexprallfalse" id="id59"><tt class="docutils literal">\poltoexprallfalse</tt></a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#technicalities" id="id60">Technicalities</a></li>
+<li><a class="reference internal" href="#releases" id="id61">RELEASES</a></li>
+<li><a class="reference internal" href="#acknowledgments" id="id62">Acknowledgments</a></li>
+</ul>
+</div>
<div class="section" id="first-examples">
-<h1>First Examples</h1>
+<h1><a class="toc-backref" href="#id15">First Examples</a></h1>
<p>The syntax is:</p>
<pre class="literal-block">
-\poldef &lt;name&gt;(x):=&lt;expression in variable x&gt;;
+\poldef polname(x):= expression in variable x;
</pre>
<p>where in place of <tt class="docutils literal">x</tt> an arbitrary <em>dummy variable</em> is authorized
-(i.e. per default any of <tt class="docutils literal"><span class="pre">[a..z|A..Z]</span></tt>; more letters can be declared
+(i.e. per default any of <tt class="docutils literal"><span class="pre">[a-z|A-Z]</span></tt>; more letters can be declared
under Unicode engines.) One can also issue:</p>
<pre class="literal-block">
-\PolDef{name}{expression in variable x}
+\PolDef{polname}{expression in variable x}
</pre>
<p>which admits an optional first argument to modify the variable letter
from its default <tt class="docutils literal">x</tt>.</p>
<dl class="docutils">
<dt><tt class="docutils literal">\poldef <span class="pre">f(x):=</span> <span class="pre">1-x+x^2;</span></tt></dt>
-<dd>defines polynomial <tt class="docutils literal">f</tt>. Polynomial names must start with a letter
-and may contain letters, digits, and underscores. The variable must
-be a single letter. The colon character is optional. The semi-colon
-at end of expression is mandatory.</dd>
+<dd>defines polynomial <tt class="docutils literal">f</tt>. Polynomial names must start with a
+letter and may contain letters, digits, and underscores. The
+variable must be a single letter. The colon character is optional.
+The semi-colon at end of expression is mandatory.</dd>
<dt><tt class="docutils literal"><span class="pre">\PolDef{f}{1-x+x^2}</span></tt></dt>
<dd>does the same as <tt class="docutils literal">\poldef <span class="pre">f(x):=</span> <span class="pre">1-x+x^2;</span></tt> To use another letter
than <tt class="docutils literal">x</tt> in the expression, one must pass it as an extra optional
argument to <tt class="docutils literal">\PolDef</tt>. Useful if the semi-colon has been assigned
some non-standard catcode by some package.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolLet{g}{f}</span></tt></dt>
-<dd>saves a copy of <tt class="docutils literal">f</tt> under name <tt class="docutils literal">g</tt>.</dd>
+<dt><tt class="docutils literal"><span class="pre">\PolLet{g}={f}</span></tt></dt>
+<dd>saves a copy of <tt class="docutils literal">f</tt> under name <tt class="docutils literal">g</tt>. Also usable without <tt class="docutils literal">=</tt>.</dd>
<dt><tt class="docutils literal">\poldef <span class="pre">f(z):=</span> <span class="pre">f(z)^2;</span></tt></dt>
<dd>redefines <tt class="docutils literal">f</tt> in terms of itself.</dd>
<dt><tt class="docutils literal">\poldef <span class="pre">f(T):=</span> <span class="pre">f(f(T));</span></tt></dt>
@@ -429,68 +495,127 @@ a parsed polynomial expression does the Euclidean quotient:</p>
\poldef k(x):= (x-1)(x-2)(x-3)(x-4)/(x^2-5x+4);
</pre>
</div>
-<div class="admonition attention">
+<div class="admonition attention" id="warningtacit">
<p class="first admonition-title">Attention!</p>
-<p class="last"><tt class="docutils literal">1/2 x</tt> skips the space and is treated like <tt class="docutils literal"><span class="pre">1/(2x)</span></tt> because of
-the tacit multiplication rules of xintexpr. But this means it gives
-zero! Thus one must use <tt class="docutils literal">(1/2)x</tt> or <tt class="docutils literal">1/2*x</tt> or <tt class="docutils literal"><span class="pre">(1/2)*x</span></tt> for
-disambiguation: <tt class="docutils literal"><span class="pre">x-1/2*x^2+1/3*x^3...</span></tt></p>
+<p><tt class="docutils literal">1/2 x^2</tt> skips the space and is treated like <tt class="docutils literal"><span class="pre">1/(2*x^2)</span></tt> because
+of the tacit multiplication rules of xintexpr. But this means it
+gives zero! Thus one must use <tt class="docutils literal">(1/2)x^2</tt> or <tt class="docutils literal">1/2*x^2</tt> or
+<tt class="docutils literal"><span class="pre">(1/2)*x^2</span></tt> for disambiguation: <tt class="docutils literal">x - 1/2*x^2 + <span class="pre">1/3*x^3...</span></tt>. It is
+even simpler to move the denominator to the right: <tt class="docutils literal">x - x^2/2 +
+x^3/3 - ...</tt>.</p>
+<p class="last">It is worth noting that <tt class="docutils literal"><span class="pre">1/2(x-1)(x-2)</span></tt> suffers the same issue:
+<a class="reference external" href="http://www.ctan.org/pkg/xint">xint</a> tacit multiplication always &quot;ties more&quot;, hence this gets
+interpreted as <tt class="docutils literal"><span class="pre">1/(2*(x-1)*(x-2))</span></tt> which gives zero by polynomial
+division. Thus, use one of <tt class="docutils literal"><span class="pre">(1/2)(x-1)(x-2)</span></tt>, <tt class="docutils literal"><span class="pre">1/2*(x-1)(x-2)</span></tt> or
+<tt class="docutils literal"><span class="pre">(x-1)(x-2)/2</span></tt>.</p>
</div>
<p>After:</p>
<pre class="literal-block">
-\poldef f1(x):= 25(x-1)(x^2-2)(x-3)(x-4)(x-5);%
-\poldef f2(x):= 37(x-1)(x^2-2)(x-6)(x-7)(x-8);%
+\poldef f_1(x):= 25(x-1)(x^2-2)(x-3)(x-4)(x-5);%
+\poldef f_2(x):= 37(x-1)(x^2-2)(x-6)(x-7)(x-8);%
</pre>
-<p>the macro call <tt class="docutils literal"><span class="pre">\PolGCD{f1}{f2}{k}</span></tt> sets <tt class="docutils literal">k</tt> to the (unitary) GCD of
-<tt class="docutils literal">f1</tt> and <tt class="docutils literal">f2</tt>.</p>
+<p>the macro call <tt class="docutils literal"><span class="pre">\PolGCD{f_1}{f_2}{k}</span></tt> sets <tt class="docutils literal">k</tt> to the (unitary) GCD of
+<tt class="docutils literal">f_1</tt> and <tt class="docutils literal">f_2</tt> (hence to the expansion of <tt class="docutils literal"><span class="pre">(x-1)(x^2-2)</span></tt>.)</p>
<dl class="docutils">
<dt><tt class="docutils literal">\PolToExpr{k}</tt></dt>
-<dd>will thus (expandably) give in this case <tt class="docutils literal"><span class="pre">2-2*x^1-1*x^2+1*x^3</span></tt>.
-This is useful for console or file output (the syntax is Maple- and
-PSTricks-compatible; currently the letter <tt class="docutils literal">x</tt> in output is not
-customizable, but this can easily be added if requested from author.)</dd>
+<dd>will (expandably) give in this case <tt class="docutils literal"><span class="pre">x^3-x^2-2*x+2</span></tt>. This is
+useful for console or file output (the syntax is Maple- and
+PSTricks-compatible; the letter used in output can be
+(non-expandably) changed via a redefinition of <a class="reference internal" href="#poltoexprvar">\PolToExprVar</a>.)</dd>
+<dt><tt class="docutils literal"><span class="pre">\PolToExpr*{k}</span></tt></dt>
+<dd>gives ascending powers: <tt class="docutils literal"><span class="pre">2-2*x-x^2+x^3</span></tt>.</dd>
</dl>
</div>
<div class="section" id="non-expandable-macros">
-<h1>Non-expandable macros</h1>
-<dl class="docutils">
-<dt><tt class="docutils literal">\poldef <span class="pre">name(letter):=</span> polynomial expression using letter;</tt></dt>
-<dd><p class="first">This evaluates the polynomial expression and stores the coefficients
+<h1><a class="toc-backref" href="#id16">Non-expandable macros</a></h1>
+<div class="section" id="poldef-polname-letter-expression-in-letter">
+<span id="poldef"></span><h2><a class="toc-backref" href="#id17"><tt class="docutils literal">\poldef <span class="pre">polname(letter):=</span> expression in letter;</tt></a></h2>
+<blockquote>
+<p>This evaluates the <em>polynomial expression</em> and stores the coefficients
in a private structure accessible later via other package macros,
-under the user-chosen <tt class="docutils literal">name</tt>. Of course previously defined
-polynomials are allowed in a new expression. Names must start with a
+under the user-chosen <tt class="docutils literal">polname</tt>. Of course the <em>expression</em> can
+use other previously defined polynomials. Names must start with a
letter and are constituted of letters, digits and underscore
-characters. See Examples above.</p>
-<p>As a side effect the function <tt class="docutils literal">name()</tt> is recognized as a genuine
-<tt class="docutils literal"><span class="pre">\xintexpr...\relax</span></tt> function for (exact) numerical evaluation. It
-computes values not according to the original expression but via
-the Horner scheme corresponding to the polynomial coefficients.</p>
-<p class="last">The original expression is lost after parsing, and in particular
+characters. The whole <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> syntax is authorized:</p>
+<pre class="literal-block">
+\poldef sin(z) := add((-1)^i z^(2i+1)/(2i+1)!, i = 0..10);
+</pre>
+<p>With fractional coefficients, beware the <a class="reference internal" href="#warningtacit">tacit multiplication issue</a>.</p>
+<p>As a side effect the function <tt class="docutils literal">polname()</tt> is recognized as a
+genuine <tt class="docutils literal"><span class="pre">\xintexpr...\relax</span></tt> function for (exact) numerical
+evaluation (or within an <tt class="docutils literal">\xintdefvar</tt> assignment.) It computes
+values not according to the original expression but via the Horner
+scheme corresponding to the polynomial coefficients.</p>
+<p>Also, a function with the same name is created for use within
+<tt class="docutils literal">\xintfloatexpr</tt> (or <tt class="docutils literal">\xintdeffloatvar</tt>.) This is indispensible
+for numerical algorithms as exact computations very quickly lead to
+very big fractions. Addition and multiplication steps of the Horner
+scheme will be executed as floating-point operations. The
+coefficients have already been rounded at time of definition,
+according to the then prevailing <tt class="docutils literal">\xinttheDigits</tt> value.</p>
+<div class="admonition important">
+<p class="first admonition-title">Important</p>
+<p>Package macros (such as derivatives or Euclidean division)
+operate with the &quot;exact&quot; polynomials; &quot;floating point&quot;
+polynomials are always obtained in a second step.</p>
+<p>To modifiy &quot;in-place&quot; the original coefficients of a polynomial
+and round them to float precision:</p>
+<pre class="literal-block">
+\PolMapCoeffs{\xintFloat}{polname}
+% or \xintFloat[P] for precision P digits
+</pre>
+<p class="last">See <a class="reference internal" href="#polmapcoeffs-macro-polname">\PolMapCoeffs{\macro}{polname}</a>.</p>
+</div>
+<p>The original expression is lost after parsing, and in particular
the package provides no way to typeset it. This has to be done
manually, if needed.</p>
-</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolDef{name}{P(x)}</span></tt></dt>
-<dd>Does the same but the variable is assumed to be <tt class="docutils literal">x</tt>. To use
-another letter, pass it as first optional argument:
-<tt class="docutils literal"><span class="pre">\PolDef[X]{name}{P(X)}</span></tt>.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolLet{g}{f}</span></tt></dt>
-<dd>Makes a copy of already defined polynomial f to new one g. Same
-effect as <tt class="docutils literal"><span class="pre">\PolDef{g}{f(x)}</span></tt> but faster.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolAssign{f}\toarray\Array</span></tt></dt>
-<dd><p class="first">Defines a one-argument expandable macro <tt class="docutils literal"><span class="pre">\Array{#1}</span></tt> which expands
+</blockquote>
+</div>
+<div class="section" id="poldef-letter-polname-expression-in-letter">
+<span id="id2"></span><h2><a class="toc-backref" href="#id18"><tt class="docutils literal"><span class="pre">\PolDef[letter]{polname}{expression</span> in letter}</tt></a></h2>
+<blockquote>
+Does the same in an undelimited macro format (thus avoiding
+potential problems with the catcode of the semi-colon in presence of
+some packages.) In absence of the <tt class="docutils literal">[letter]</tt> optional argument,
+the variable is assumed to be <tt class="docutils literal">x</tt>.</blockquote>
+</div>
+<div class="section" id="pollet-polname-2-polname-1">
+<h2><a class="toc-backref" href="#id19"><tt class="docutils literal"><span class="pre">\PolLet{polname_2}={polname_1}</span></tt></a></h2>
+<blockquote>
+Makes a copy of the already defined polynomial <tt class="docutils literal">polname_1</tt> to a
+new one <tt class="docutils literal">polname_2</tt>. Same effect as
+<tt class="docutils literal"><span class="pre">\PolDef{polname_2}{polname_1(x)}</span></tt> but with less overhead. The
+<tt class="docutils literal">=</tt> is optional.</blockquote>
+</div>
+<div class="section" id="polassign-polname-toarray-macro">
+<h2><a class="toc-backref" href="#id20"><tt class="docutils literal"><span class="pre">\PolAssign{polname}\toarray\macro</span></tt></a></h2>
+<blockquote>
+<p>Defines a one-argument expandable macro <tt class="docutils literal"><span class="pre">\macro{#1}</span></tt> which expands
to the (raw) #1th polynomial coefficient.</p>
-<ul class="last simple">
+<ul class="simple">
<li>Attention, coefficients here are indexed starting at 1.</li>
-<li>With #1=-1, -2, ..., <tt class="docutils literal"><span class="pre">\Array{#1}</span></tt> returns leading coefficients.</li>
+<li>With #1=-1, -2, ..., <tt class="docutils literal"><span class="pre">\macro{#1}</span></tt> returns leading coefficients.</li>
<li>With #1=0, returns the number of coefficients, i.e. <tt class="docutils literal">1 + deg f</tt>
for non-zero polynomials.</li>
<li>Out-of-range #1's return <tt class="docutils literal">0/1[0]</tt>.</li>
</ul>
-</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolGet{f}\fromarray\Array</span></tt></dt>
-<dd><p class="first">Does the converse operation to <tt class="docutils literal"><span class="pre">\PolAssign{f}\toarray\Array</span></tt>. No
+<p>See also <a class="reference internal" href="#polnthcoeff-polname-number">\PolNthCoeff{polname}{number}</a>. The main difference is that
+with <tt class="docutils literal">\PolAssign</tt>, <tt class="docutils literal">\macro</tt> is made a prefix to <tt class="docutils literal">1 + deg f</tt>
+already defined (hidden to user) macros holding individually the
+coefficients but <a class="reference internal" href="#polnthcoeff-polname-number">\PolNthCoeff{polname}{number}</a> does each time the job
+to expandably recover the <tt class="docutils literal">Nth</tt> coefficient, and due to
+expandability can not store it in a macro for future usage (of course,
+it can be an argument in an <tt class="docutils literal">\edef</tt>.) The other difference
+is the shift by one in indexing, mentioned above (negative
+indices act the same in both.)</p>
+</blockquote>
+</div>
+<div class="section" id="polget-polname-fromarray-macro">
+<h2><a class="toc-backref" href="#id21"><tt class="docutils literal"><span class="pre">\PolGet{polname}\fromarray\macro</span></tt></a></h2>
+<blockquote>
+<p>Does the converse operation to <tt class="docutils literal"><span class="pre">\PolAssign{polname}\toarray\macro</span></tt>. No
error checks on validity of coefficients as numbers. Each
-<tt class="docutils literal">\Array{index}</tt> is expanded in an <tt class="docutils literal">\edef</tt> before being assigned
+<tt class="docutils literal">\macro{number}</tt> is expanded in an <tt class="docutils literal">\edef</tt> before being assigned
to a coefficient. Leading zero coefficients are removed from the
polynomial.</p>
<p>(contrived) Example:</p>
@@ -498,159 +623,441 @@ polynomial.</p>
\xintAssignArray{1}{-2}{5}{-3}\to\foo
\PolGet{f}\fromarray\foo
</pre>
-<p class="last">This will define <tt class="docutils literal">f</tt> as would have <tt class="docutils literal">\poldef <span class="pre">f(x):=1-2x+5x^2-3x^3;</span></tt>.
+<p>This will define <tt class="docutils literal">f</tt> as would have <tt class="docutils literal">\poldef <span class="pre">f(x):=1-2x+5x^2-3x^3;</span></tt>.
However the coefficients are still in their original form (i.e.
they were not subjected to <tt class="docutils literal">\xintRaw</tt> or similar xintfrac macro.)</p>
-</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolFromCSV{f}{comma</span> separated coefficients}</tt></dt>
-<dd><p class="first">Defines a polynomial directly from the comma separated list (or a
-macro expanding to such a list) of its coefficients, the constant
-term being the first item. No validity checks. Spaces from the list
-argument are trimmed. List items are expanded in an <tt class="docutils literal">\edef</tt>, but
-currently left in their original form like e.g. <tt class="docutils literal">1.5e3</tt> which is
-not converted to <tt class="docutils literal">15/1[2]</tt> <em>raw</em> xintfrac format (this may
-change).</p>
+</blockquote>
+</div>
+<div class="section" id="polfromcsv-polname-csv">
+<h2><a class="toc-backref" href="#id22"><tt class="docutils literal"><span class="pre">\PolFromCSV{polname}{&lt;csv&gt;}</span></tt></a></h2>
+<blockquote>
+<p>Defines a polynomial directly from the comma separated list of
+values (or a macro expanding to such a list) of its coefficients,
+the constant term being the first item. No validity checks. Spaces
+from the list argument are trimmed. List items are each expanded in
+an <tt class="docutils literal">\edef</tt>, but currently left in their original form like e.g.
+<tt class="docutils literal">1.5e3</tt> which is not converted to <tt class="docutils literal">15/1[2]</tt> <em>raw</em> xintfrac
+format (this may change).</p>
<p>Leading zero coefficients are removed:</p>
<pre class="literal-block">
-\PolFromCSV{J}{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
+\PolFromCSV{f}{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
</pre>
<p>defines the zero polynomial, which has only one (zero) coefficient.</p>
-<p class="last">See also expandable macro <tt class="docutils literal">\PolToCSV</tt>.</p>
-</dd>
-<dt><tt class="docutils literal">\PolTypeset{name}</tt></dt>
-<dd><p class="first">Typesets in descending powers in math mode. It uses letter <tt class="docutils literal">x</tt> but
+<p>See also expandable macro <a class="reference internal" href="#poltocsv-polname">\PolToCSV</a>.</p>
+</blockquote>
+</div>
+<div class="section" id="poltypeset-polname">
+<h2><a class="toc-backref" href="#id23"><tt class="docutils literal">\PolTypeset{polname}</tt></a></h2>
+<blockquote>
+<p>Typesets in descending powers in math mode. It uses letter <tt class="docutils literal">x</tt> but
this can be changed via an optional argument:</p>
<pre class="literal-block">
-\PolTypeset[z]{name}
+\PolTypeset[z]{polname}
</pre>
<p>By default zero coefficients are skipped (issue <tt class="docutils literal">\poltypesetalltrue</tt>
to get all of them in output).</p>
-<p class="last">Macros <tt class="docutils literal">\PolTypesetCmd</tt>, <tt class="docutils literal">\PolTypesetPlus</tt>, <tt class="docutils literal">\PolTypesetMonomial</tt>
-can help configure the output. See the package code.</p>
-</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolTypeset*{name}</span></tt></dt>
-<dd>Typesets in ascending powers. Change the letter from its default
-<tt class="docutils literal">x</tt> by optional argument.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolDiff{f1}{f2}</span></tt></dt>
-<dd><p class="first">This sets f2 to the first derivative of <tt class="docutils literal">f1</tt>. It is allowed to
-issue <tt class="docutils literal"><span class="pre">\PolDiff{f}{f}</span></tt>, effectively replacing <tt class="docutils literal">f</tt> by <tt class="docutils literal">f'</tt>.</p>
-<p class="last">Coefficients of the result <tt class="docutils literal">f2</tt> are irreducible fractions
+<p>These commands (whose meanings will be found in the package code)
+can be re-defined for customization. Their default definitions are
+expandable, but this is not a requirement.</p>
+</blockquote>
+<div class="section" id="poltypesetcmd-raw-coeff">
+<h3><a class="toc-backref" href="#id24"><tt class="docutils literal">\PolTypesetCmd{raw_coeff}</tt></a></h3>
+<blockquote>
+<p>Basically will use <tt class="docutils literal">\xintSignedFrac</tt> from <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a>, but checks if
+the coefficient is <tt class="docutils literal">1</tt> or <tt class="docutils literal"><span class="pre">-1</span></tt> and then skips printing the
+<tt class="docutils literal">1</tt>, except for the constant term...</p>
+<p>One can do things such as for example: <a class="footnote-reference" href="#id4" id="id3">[1]</a></p>
+<pre class="literal-block">
+\renewcommand\PolTypesetCmd[1]{\num{\xintPFloat[5]{#1}}}
+\renewcommand\PolTypesetCmd[1]{\num{\xintRound{4}{#1}}}
+</pre>
+<p>where e.g. we used the <tt class="docutils literal">\num</tt> macro of <tt class="docutils literal">siunitx</tt> as it
+understands floating point notation.</p>
+<table class="docutils footnote" frame="void" id="id4" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id3">[1]</a></td><td>the difference in the syntaxes of <tt class="docutils literal">\xintPFloat</tt> and
+<tt class="docutils literal">\xintRound</tt> is explained from the fact that
+<tt class="docutils literal">\xintPFloat</tt> by default uses the prevailing precision
+hence the extra argument like here <tt class="docutils literal">5</tt> is an optional one.</td></tr>
+</tbody>
+</table>
+</blockquote>
+</div>
+<div class="section" id="poltypesetcmdprefix-raw-coeff">
+<h3><a class="toc-backref" href="#id25"><tt class="docutils literal">\PolTypesetCmdPrefix{raw_coeff}</tt></a></h3>
+<blockquote>
+Expands to a <tt class="docutils literal">+</tt> if the <tt class="docutils literal">raw_coeff</tt> is zero or positive, and to
+nothing if <tt class="docutils literal">raw_coeff</tt> is negative, as in latter case the
+<tt class="docutils literal">\xintSignedFrac</tt> used by <a class="reference internal" href="#poltypesetcmd-raw-coeff">\PolTypesetCmd{raw_coeff}</a> will put
+the <tt class="docutils literal">-</tt> sign in front of the fraction (if it is a fraction) and
+this will thus serve as separator in the typeset formula. Not used
+for the first term.</blockquote>
+</div>
+<div class="section" id="poltypesetmonomialcmd">
+<h3><a class="toc-backref" href="#id26"><tt class="docutils literal">\PolTypesetMonomialCmd</tt></a></h3>
+<blockquote>
+This decides how a monomial (in variable <tt class="docutils literal">\PolVar</tt> and with
+exponent <tt class="docutils literal">\PolIndex</tt>) is to be printed. The default does nothing
+for the constant term, <tt class="docutils literal">\PolVar</tt> for the first degree and
+<tt class="docutils literal"><span class="pre">\PolVar^{\PolIndex}</span></tt> for higher degrees monomials. Beware that
+<tt class="docutils literal">\PolIndex</tt> expands to digit tokens and needs termination in
+<tt class="docutils literal">\ifnum</tt> tests.</blockquote>
+</div>
+</div>
+<div class="section" id="id5">
+<h2><a class="toc-backref" href="#id27"><tt class="docutils literal"><span class="pre">\PolTypeset*{polname}</span></tt></a></h2>
+<blockquote>
+Typesets in ascending powers. Use e.g. <tt class="docutils literal">[h]</tt> optional argument
+(after the <tt class="docutils literal">*</tt>) to use letter <tt class="docutils literal">h</tt> rather than <tt class="docutils literal">x</tt>.</blockquote>
+</div>
+<div class="section" id="poldiff-polname-1-polname-2">
+<h2><a class="toc-backref" href="#id28"><tt class="docutils literal"><span class="pre">\PolDiff{polname_1}{polname_2}</span></tt></a></h2>
+<blockquote>
+<p>This sets <tt class="docutils literal">polname_2</tt> to the first derivative of <tt class="docutils literal">polname_1</tt>. It
+is allowed to issue <tt class="docutils literal"><span class="pre">\PolDiff{f}{f}</span></tt>, effectively replacing <tt class="docutils literal">f</tt>
+by <tt class="docutils literal">f'</tt>.</p>
+<p>Coefficients of the result <tt class="docutils literal">polname_2</tt> are irreducible fractions
(see <a class="reference internal" href="#technicalities">Technicalities</a> for the whole story.)</p>
-</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolDiff[N]{f1}{f2}</span></tt></dt>
-<dd>This sets <tt class="docutils literal">f2</tt> to the <tt class="docutils literal">N</tt>-th derivative of <tt class="docutils literal">f1</tt>. Identical
-arguments is allowed. With <tt class="docutils literal">N=0</tt>, same effect as
-<tt class="docutils literal"><span class="pre">\PolLet{f2}{f1}</span></tt>. With negative <tt class="docutils literal">N</tt>, switches to using
-<tt class="docutils literal">\PolAntiDiff</tt>.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolAntiDiff{f1}{f2}</span></tt></dt>
-<dd><p class="first">This sets <tt class="docutils literal">f2</tt> to the primitive of <tt class="docutils literal">f1</tt> vanishing at zero.</p>
-<p class="last">Coefficients of the result <tt class="docutils literal">f2</tt> are irreducible fractions
+</blockquote>
+</div>
+<div class="section" id="poldiff-n-polname-1-polname-2">
+<h2><a class="toc-backref" href="#id29"><tt class="docutils literal"><span class="pre">\PolDiff[N]{polname_1}{polname_2}</span></tt></a></h2>
+<blockquote>
+This sets <tt class="docutils literal">polname_2</tt> to the <tt class="docutils literal">N</tt>-th derivative of <tt class="docutils literal">polname_1</tt>.
+Identical arguments is allowed. With <tt class="docutils literal">N=0</tt>, same effect as
+<tt class="docutils literal"><span class="pre">\PolLet{polname_2}={polname_1}</span></tt>. With negative <tt class="docutils literal">N</tt>, switches to
+using <tt class="docutils literal">\PolAntiDiff</tt>.</blockquote>
+</div>
+<div class="section" id="polantidiff-polname-1-polname-2">
+<h2><a class="toc-backref" href="#id30"><tt class="docutils literal"><span class="pre">\PolAntiDiff{polname_1}{polname_2}</span></tt></a></h2>
+<blockquote>
+<p>This sets <tt class="docutils literal">polname_2</tt> to the primitive of <tt class="docutils literal">polname_1</tt> vanishing
+at zero.</p>
+<p>Coefficients of the result <tt class="docutils literal">polname_2</tt> are irreducible fractions
(see <a class="reference internal" href="#technicalities">Technicalities</a> for the whole story.)</p>
-</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolAntiDiff[N]{f1}{f2}</span></tt></dt>
-<dd>This sets <tt class="docutils literal">f2</tt> to the result of <tt class="docutils literal">N</tt> successive integrations on
-<tt class="docutils literal">f1</tt>. With negative <tt class="docutils literal">N</tt>, it switches to using <tt class="docutils literal">\PolDiff</tt>.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolDivide{f1}{f2}{Q}{R}</span></tt></dt>
-<dd>This sets <tt class="docutils literal">Q</tt> and <tt class="docutils literal">R</tt> to be the quotient and remainder in the
-Euclidean division of <tt class="docutils literal">f1</tt> by <tt class="docutils literal">f2</tt>.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolGCD{f}{g}{k}</span></tt></dt>
-<dd>This sets <tt class="docutils literal">k</tt> to be the G.C.D. It is a unitary polynomial except
-if both <tt class="docutils literal">f</tt> and <tt class="docutils literal">g</tt> vanish, then <tt class="docutils literal">k</tt> is the zero polynomial.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolMapCoeffs{\macro}{name}</span></tt></dt>
-<dd><p class="first">It modifies each coefficient of the defined polynomial via the
-<em>expandable</em> macro <tt class="docutils literal">\macro</tt>. The degree is adjusted as necessary
-if some leading coefficients vanish after the operation. In
-replacement text of <tt class="docutils literal">\macro</tt>, <tt class="docutils literal">\index</tt> expands to the
-coefficient index (which is defined to be zero for the constant
-term).</p>
+</blockquote>
+</div>
+<div class="section" id="polantidiff-n-polname-1-polname-2">
+<h2><a class="toc-backref" href="#id31"><tt class="docutils literal"><span class="pre">\PolAntiDiff[N]{polname_1}{polname_2}</span></tt></a></h2>
+<blockquote>
+This sets <tt class="docutils literal">polname_2</tt> to the result of <tt class="docutils literal">N</tt> successive integrations on
+<tt class="docutils literal">polname_1</tt>. With negative <tt class="docutils literal">N</tt>, it switches to using <tt class="docutils literal">\PolDiff</tt>.</blockquote>
+</div>
+<div class="section" id="poldivide-polname-1-polname-2-polname-q-polname-r">
+<h2><a class="toc-backref" href="#id32"><tt class="docutils literal"><span class="pre">\PolDivide{polname_1}{polname_2}{polname_Q}{polname_R}</span></tt></a></h2>
+<blockquote>
+This sets <tt class="docutils literal">polname_Q</tt> and <tt class="docutils literal">polname_R</tt> to be the quotient and
+remainder in the Euclidean division of <tt class="docutils literal">polname_1</tt> by
+<tt class="docutils literal">polname_2</tt>.</blockquote>
+</div>
+<div class="section" id="polgcd-polname-1-polname-2-polname-gcd">
+<h2><a class="toc-backref" href="#id33"><tt class="docutils literal"><span class="pre">\PolGCD{polname_1}{polname_2}{polname_GCD}</span></tt></a></h2>
+<blockquote>
+This sets <tt class="docutils literal">polname_GCD</tt> to be the G.C.D. It is a unitary
+polynomial except if both <tt class="docutils literal">polname_1</tt> and <tt class="docutils literal">polname_2</tt> vanish,
+then <tt class="docutils literal">polname_GCD</tt> is the zero polynomial.</blockquote>
+</div>
+<div class="section" id="polmapcoeffs-macro-polname">
+<h2><a class="toc-backref" href="#id34"><tt class="docutils literal"><span class="pre">\PolMapCoeffs{\macro}{polname}</span></tt></a></h2>
+<blockquote>
+<p>It modifies ('in-place': original coefficients get lost) each
+coefficient of the defined polynomial via the <em>expandable</em> macro
+<tt class="docutils literal">\macro</tt>. The degree is adjusted as necessary if some leading
+coefficients vanish after the operation. In replacement text of
+<tt class="docutils literal">\macro</tt>, <tt class="docutils literal">\index</tt> expands to the coefficient index (which is
+defined to be zero for the constant term).</p>
<p>Notice that <tt class="docutils literal">\macro</tt> will have to handle inputs of the shape
-<tt class="docutils literal">A/B[N]</tt> (xintfrac internal notation). This means that it probably
+<tt class="docutils literal">A/B[N]</tt> (<a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> internal notation). This means that it probably
will have to be expressed in terms of macros from xintfrac package.</p>
<p>Example:</p>
<pre class="literal-block">
\def\foo#1{\xintMul{#1}{\the\numexpr\index*\index\relax}}
</pre>
-<p class="last">(or with <tt class="docutils literal"><span class="pre">\xintSqr{\xindex}</span></tt>) to replace <tt class="docutils literal">n</tt>-th coefficient
+<p>(or with <tt class="docutils literal"><span class="pre">\xintSqr{\index}</span></tt>) to replace <tt class="docutils literal">n</tt>-th coefficient
<tt class="docutils literal">f_n</tt> by <tt class="docutils literal">f_n*n^2</tt>.</p>
-</dd>
-<dt><tt class="docutils literal">\PolReduceCoeffs{name}</tt></dt>
-<dd>About the same as <tt class="docutils literal"><span class="pre">\PolMapCoeffs{\xintIrr}{name}</span></tt> (but adds
-<tt class="docutils literal">[0]</tt> postfix which speeds up xintfrac operations when
-evaluating.)</dd>
-</dl>
+</blockquote>
+</div>
+<div class="section" id="polreducecoeffs-polname">
+<h2><a class="toc-backref" href="#id35"><tt class="docutils literal">\PolReduceCoeffs{polname}</tt></a></h2>
+<blockquote>
+About the same as <tt class="docutils literal"><span class="pre">\PolMapCoeffs{\xintIrr}{polname}</span></tt> (but
+maintaining a <tt class="docutils literal">[0]</tt> postfix for speedier <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> parsing when
+polynomial function is used for computations.) This is a
+one-argument macro, working 'in-place'.</blockquote>
+</div>
</div>
<div class="section" id="expandable-macros">
-<h1>Expandable macros</h1>
+<h1><a class="toc-backref" href="#id36">Expandable macros</a></h1>
<p>All these macros expand completely in two steps except <tt class="docutils literal">\PolToExpr</tt>
-which needs a <tt class="docutils literal">\write</tt>, <tt class="docutils literal">\edef</tt> or a <tt class="docutils literal"><span class="pre">\csname...\endcsname</span></tt> context.</p>
-<dl class="docutils">
-<dt><tt class="docutils literal"><span class="pre">\PolEval{name}\At{value}</span></tt></dt>
-<dd>It boils down to <tt class="docutils literal">\xinttheexpr <span class="pre">reduce(name(value))\relax</span></tt>.</dd>
-<dt><tt class="docutils literal"><span class="pre">\PolNthCoeff{name}{N}</span></tt></dt>
-<dd>It expands to the raw <tt class="docutils literal">N</tt>-th coefficient (<tt class="docutils literal">0/1[0]</tt> if index is
-out of range). With <tt class="docutils literal"><span class="pre">N=-1</span></tt>, <tt class="docutils literal"><span class="pre">-2</span></tt>, ... expands to the leading
-coefficients.</dd>
-<dt><tt class="docutils literal">\PolDegree{name}</tt></dt>
-<dd>It expands to the degree. This is <tt class="docutils literal"><span class="pre">-1</span></tt> if zero polynomial but this
-may change in future. Should it then expand to <tt class="docutils literal"><span class="pre">-\infty</span></tt> ?</dd>
-<dt><tt class="docutils literal">\PolToExpr{f}</tt></dt>
-<dd><p class="first">Expands to <tt class="docutils literal">f_0 + f_1*x + f_2*x^2 + ...</tt> (ascending powers). <a class="footnote-reference" href="#id3" id="id1">[1]</a>,
-<a class="footnote-reference" href="#id4" id="id2">[2]</a></p>
-<table class="docutils footnote" frame="void" id="id3" rules="none">
+and <tt class="docutils literal">\PolToFloatExpr</tt> (and their auxiliaries) which need a
+<tt class="docutils literal">\write</tt>, <tt class="docutils literal">\edef</tt> or a <tt class="docutils literal"><span class="pre">\csname...\endcsname</span></tt> context.</p>
+<div class="section" id="poleval-polname-at-numerical-expression">
+<h2><a class="toc-backref" href="#id37"><tt class="docutils literal"><span class="pre">\PolEval{polname}\At{numerical</span> expression}</tt></a></h2>
+<blockquote>
+<p>It boils down to <tt class="docutils literal">\xinttheexpr polname(numerical <span class="pre">expression)\relax</span></tt>.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p>The <tt class="docutils literal">0.2</tt> version stupidly tried to be clever and as a result
+of a misguided optimization choked if <tt class="docutils literal">value</tt> was not a number
+but a numerical expression (a sum e.g.), but the more powerful
+behaviour has been reinstored at <tt class="docutils literal">0.3</tt> release.</p>
+<p class="last">The <tt class="docutils literal">0.1</tt> and <tt class="docutils literal">0.2</tt> version did a <tt class="docutils literal">reduce</tt> which however is
+costly on big fractions and irrelevant if the output is served as
+argument of <tt class="docutils literal">\xintRound</tt> or <tt class="docutils literal">\xintFloat</tt>. Thus <tt class="docutils literal">reduce</tt> was
+removed, and former meaning is now available as
+<a class="reference internal" href="#polevalreduced-polname-at-numerical-expression">\PolEvalReduced{polname}\At{numerical expression}</a></p>
+</div>
+</blockquote>
+</div>
+<div class="section" id="polevalreduced-polname-at-numerical-expression">
+<h2><a class="toc-backref" href="#id38"><tt class="docutils literal"><span class="pre">\PolEvalReduced{polname}\At{numerical</span> expression}</tt></a></h2>
+<blockquote>
+Boils down to <tt class="docutils literal">\xinttheexpr reduce(polname(numerical <span class="pre">expression))\relax</span></tt>.</blockquote>
+</div>
+<div class="section" id="polfloateval-polname-at-numerical-expression">
+<h2><a class="toc-backref" href="#id39"><tt class="docutils literal"><span class="pre">\PolFloatEval{polname}\At{numerical</span> expression}</tt></a></h2>
+<blockquote>
+<p>Boils down to <tt class="docutils literal">\xintthefloatexpr polname(numerical <span class="pre">expression)\relax</span></tt>.</p>
+<p>This is done via a Horner Scheme (see <a class="reference internal" href="#poldef">\poldef</a>), with
+already rounded coefficients. <a class="footnote-reference" href="#id8" id="id6">[2]</a> To use the <em>exact coefficients</em>
+(and <em>exact</em> additions and multiplications), just insert it in the
+float expression as in this example: <a class="footnote-reference" href="#id9" id="id7">[3]</a></p>
+<pre class="literal-block">
+\xintthefloatexpr 3.27*\xintexpr f(2.53)\relax^2\relax
+</pre>
+<p>The <tt class="docutils literal">f(2.53)</tt> is exactly computed then rounded at the time of
+getting raised to the power <tt class="docutils literal">2</tt>. Moving the <tt class="docutils literal">^2</tt> inside, that
+operation would also be treated exactly.</p>
+<table class="docutils footnote" frame="void" id="id8" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>in a <tt class="docutils literal">\write</tt>, <tt class="docutils literal">\edef</tt>, or <tt class="docutils literal"><span class="pre">\csname...\endcsname</span></tt>, but
-not under <tt class="docutils literal"><span class="pre">\romannumeral-`0</span></tt>.</td></tr>
+<tr><td class="label"><a class="fn-backref" href="#id6">[2]</a></td><td>Anyway each floating point operation starts by rounding its
+operands to the floating point precision.</td></tr>
</tbody>
</table>
-<table class="docutils footnote" frame="void" id="id4" rules="none">
+<table class="docutils footnote" frame="void" id="id9" rules="none">
+<colgroup><col class="label" /><col /></colgroup>
+<tbody valign="top">
+<tr><td class="label"><a class="fn-backref" href="#id7">[3]</a></td><td>The <tt class="docutils literal">\xintexpr</tt> could be <tt class="docutils literal">\xinttheexpr</tt> but that would be
+less efficient. Cf. <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> documentation about nested
+expressions.</td></tr>
+</tbody>
+</table>
+</blockquote>
+</div>
+<div class="section" id="polnthcoeff-polname-number">
+<h2><a class="toc-backref" href="#id40"><tt class="docutils literal"><span class="pre">\PolNthCoeff{polname}{number}</span></tt></a></h2>
+<blockquote>
+It expands to the raw <tt class="docutils literal">N</tt>-th coefficient (<tt class="docutils literal">0/1[0]</tt> if the index
+number is out of range). With <tt class="docutils literal"><span class="pre">N=-1</span></tt>, <tt class="docutils literal"><span class="pre">-2</span></tt>, ... expands to the
+leading coefficients.</blockquote>
+</div>
+<div class="section" id="poldegree-polname">
+<h2><a class="toc-backref" href="#id41"><tt class="docutils literal">\PolDegree{polname}</tt></a></h2>
+<blockquote>
+It expands to the degree. This is <tt class="docutils literal"><span class="pre">-1</span></tt> if zero polynomial but this
+may change in future. Should it then expand to <tt class="docutils literal"><span class="pre">-\infty</span></tt> ?</blockquote>
+</div>
+<div class="section" id="poltoexpr-polname">
+<h2><a class="toc-backref" href="#id42"><tt class="docutils literal">\PolToExpr{polname}</tt></a></h2>
+<blockquote>
+<p>Expands <a class="footnote-reference" href="#id11" id="id10">[4]</a> to <tt class="docutils literal"><span class="pre">coeff_N*x^N+...</span></tt> (descending powers.)</p>
+<table class="docutils footnote" frame="void" id="id11" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
-<tr><td class="label"><a class="fn-backref" href="#id2">[2]</a></td><td>the letter <tt class="docutils literal">x</tt> is (in this release) not customizable.</td></tr>
+<tr><td class="label"><a class="fn-backref" href="#id10">[4]</a></td><td>in a <tt class="docutils literal">\write</tt>, <tt class="docutils literal">\edef</tt>, or <tt class="docutils literal"><span class="pre">\csname...\endcsname</span></tt>, but
+not under <tt class="docutils literal"><span class="pre">\romannumeral-`0</span></tt>.</td></tr>
</tbody>
</table>
-<p>By default zero coefficients are skipped (issue <tt class="docutils literal">\poltoexprtrue</tt> to
+<p>By default zero coefficients are skipped (issue <tt class="docutils literal">\poltoexpralltrue</tt> to
get all of them in output).</p>
-<p>No <tt class="docutils literal">+</tt> sign before negative coefficients, for compliance with Maple
-input format. This means though that parsing the result back via
-naive delimited macros is difficult, see <tt class="docutils literal">\PolToList</tt> and <tt class="docutils literal">\PolToCSV</tt>
-for more low-level formats making it easier to get expandably some
-output of one's choice, which may possibly be parsed later on by
-other macros of one's design, or from other packages.</p>
-<p>Of course <tt class="docutils literal">\PolToExpr{f}</tt> can be inserted in a poldef, as the
+<p>By default, no <tt class="docutils literal">+</tt> sign before negative coefficients, for
+compliance with Maple input format (but see
+<a class="reference internal" href="#poltoexprtermprefix-raw-coeff">\PolToExprTermPrefix{raw_coeff}</a>.) Also, like the default
+behaviour of <a class="reference internal" href="#poltypeset-polname">\PolTypeset{polname}</a>, does not print (for the non
+constant terms) coefficients equal to plus or minus one. The degree
+one monomial is output as <tt class="docutils literal">x</tt>, not <tt class="docutils literal">x^1</tt>. Complete customization is
+possible, see next macros.</p>
+<p>Of course <tt class="docutils literal">\PolToExpr{f}</tt> can be inserted in a <tt class="docutils literal">\poldef</tt>, as the
latter expands token by token, hence will force complete expansion
-of <tt class="docutils literal">\PolToExpr{f}</tt>, but simply <tt class="docutils literal">f(x)</tt> will be more efficient for the
-identical result.</p>
-<p class="last"><tt class="docutils literal">\PolToExprCmd</tt> is the one-argument macro used by <tt class="docutils literal">\PolToExpr</tt> for the
-coefficients, it defaults to <tt class="docutils literal"><span class="pre">\xintPRaw{\xintRawWithZeros{#1}}</span></tt>. One
-will have to redefine it to use <tt class="docutils literal"><span class="pre">\xintIrr{#1}</span></tt> in place of
-<tt class="docutils literal"><span class="pre">\xintRawWithZeros{#1}</span></tt> to get in output reduced coefficients.</p>
-</dd>
-<dt><tt class="docutils literal">\PolToList{f}</tt></dt>
-<dd>Expands to <tt class="docutils literal"><span class="pre">{f_0}{f_1}...{f_N}</span></tt> with <tt class="docutils literal">N</tt> = degree of f (except
-zero polynomial which does give <tt class="docutils literal">{0/1[0]}</tt> and not an empty
-output.)</dd>
-<dt><tt class="docutils literal">\PolToCSV{f}</tt></dt>
-<dd>Expands to <tt class="docutils literal">f_0, f_1, f_2, <span class="pre">.....,</span> f_N</tt>. Converse to
-<tt class="docutils literal">\PolFromCSV</tt>.</dd>
-</dl>
+of <tt class="docutils literal">\PolToExpr{f}</tt>, but a simple <tt class="docutils literal">f(x)</tt> is more efficient for
+the identical result.</p>
+</blockquote>
+<div class="section" id="poltoexproneterm-raw-coeff-number">
+<h3><a class="toc-backref" href="#id43"><tt class="docutils literal"><span class="pre">\PolToExprOneTerm{raw_coeff}{number}</span></tt></a></h3>
+<blockquote>
+<p>This two argument expandable command takes care of the monomial and
+its coefficient. The default definition is done in order for
+coefficients of absolute value <tt class="docutils literal">1</tt> not be printed explicitely
+(except of course for the constant term). Also by default, the
+monomial of degree one is <tt class="docutils literal">x</tt> not <tt class="docutils literal">x^1</tt>, and <tt class="docutils literal">x^0</tt> is skipped.</p>
+<p>For compatibility with Maple input requirements, by default a <tt class="docutils literal">*</tt>
+always precedes the <tt class="docutils literal">x^number</tt>, except if the coefficient is a one
+or a minus one. See <a class="reference internal" href="#poltoexprtimes">\PolToExprTimes</a>.</p>
+</blockquote>
+</div>
+<div class="section" id="poltoexpronetermstyleb-raw-coeff-number">
+<h3><a class="toc-backref" href="#id44"><tt class="docutils literal"><span class="pre">\PolToExprOneTermStyleB{raw_coeff}{number}</span></tt></a></h3>
+<blockquote>
+<p>For output in this style:</p>
+<pre class="literal-block">
+2*x^11/3+3*x^8/7-x^5−x^4/4−x^3−x^2/2−2*x+1
+</pre>
+<p>issue <tt class="docutils literal">\let\PolToExprOneTerm\PolToExprOneTermStyleB</tt> before using
+<tt class="docutils literal">\PolToExpr</tt>. Note that then <tt class="docutils literal">\PolToExprCmd</tt> isn't used at all.</p>
+<p>To suppress the <tt class="docutils literal">*</tt>'s, cf. <a class="reference internal" href="#poltoexprtimes">\PolToExprTimes</a>.</p>
+</blockquote>
+</div>
+<div class="section" id="poltoexprcmd-raw-coeff">
+<h3><a class="toc-backref" href="#id45"><tt class="docutils literal">\PolToExprCmd{raw_coeff}</tt></a></h3>
+<blockquote>
+It is the one-argument macro used by the package definition of
+<tt class="docutils literal">\PolToExprOneTerm</tt> for the coefficients themselves (when not
+equal to plus or minus one), and it defaults to
+<tt class="docutils literal"><span class="pre">\xintPRaw{\xintRawWithZeros{#1}}</span></tt>. One will have to redefine it
+to <tt class="docutils literal"><span class="pre">\xintIrr{#1}</span></tt> or to <tt class="docutils literal"><span class="pre">\xintPRaw{\xintIrr{#1}}</span></tt> to obtain in the
+output forcefully reduced coefficients.</blockquote>
+</div>
+<div class="section" id="poltoexprtermprefix-raw-coeff">
+<h3><a class="toc-backref" href="#id46"><tt class="docutils literal">\PolToExprTermPrefix{raw_coeff}</tt></a></h3>
+<blockquote>
+Defined identically as <a class="reference internal" href="#poltypesetcmdprefix-raw-coeff">\PolTypesetCmdPrefix{raw_coeff}</a>. It
+prefixes with a plus sign for non-negative coefficients, because
+they don't carry one by themselves.</blockquote>
+</div>
+<div class="section" id="poltoexprvar">
+<h3><a class="toc-backref" href="#id47"><tt class="docutils literal">\PolToExprVar</tt></a></h3>
+<blockquote>
+This expands to the variable to use in output (it does not have to
+be a single letter, may be an expandable macro.) Initial definition
+is <tt class="docutils literal">x</tt>.</blockquote>
+</div>
+<div class="section" id="poltoexprtimes">
+<h3><a class="toc-backref" href="#id48"><tt class="docutils literal">\PolToExprTimes</tt></a></h3>
+<blockquote>
+This expands to the symbol used for multiplication of an
+<tt class="docutils literal"><span class="pre">x^{number}</span></tt> by the corresponding coefficient. The default is
+<tt class="docutils literal">*</tt>. Redefine the macro to expand to nothing to get rid of it (but
+this will give output incompatible with some professional computer
+algebra software).</blockquote>
+</div>
+</div>
+<div class="section" id="id12">
+<h2><a class="toc-backref" href="#id49"><tt class="docutils literal"><span class="pre">\PolToExpr*{polname}</span></tt></a></h2>
+<blockquote>
+Expands to <tt class="docutils literal"><span class="pre">coeff_0+coeff_1*x+coeff_2*x^2+...</span></tt> (ascending powers).
+Customizable like <a class="reference internal" href="#poltoexpr-polname">\PolToExpr{polname}</a> via the same macros.</blockquote>
+</div>
+<div class="section" id="poltofloatexpr-polname">
+<h2><a class="toc-backref" href="#id50"><tt class="docutils literal">\PolToFloatExpr{polname}</tt></a></h2>
+<blockquote>
+<p>Similar to <a class="reference internal" href="#poltoexpr-polname">\PolToExpr{polname}</a> but uses <a class="reference external" href="\PolToFloatExprCmd{raw_coeff}">\PolToFloatExprCmd</a>
+which by default rounds and converts the coefficients to floating
+point format.</p>
+<div class="admonition note">
+<p class="first admonition-title">Note</p>
+<p>The polynomial function for usage in <tt class="docutils literal">\xintfloatexpr</tt> is
+already prepared with the rounded coefficients, but the latter
+are not easily recoverable (and especially not expandably) from
+this. Thus <tt class="docutils literal">\PolToFloatExprCmd</tt> operates from the <em>exact</em>
+coefficients anew. This means though that if the prevailing float
+precision was changed with <tt class="docutils literal"><span class="pre">\xintDigits:=P;</span></tt> syntax, the output
+will obey this precision <tt class="docutils literal">P</tt>, but the polynomial function was
+defined earlier and operates on floating point numbers with
+coefficients which were rounded at time of definition.</p>
+<p class="last">This may change in future, if the pre-rounded coefficients are
+stored in a more easily accessible data structure.</p>
+</div>
+</blockquote>
+<div class="section" id="poltofloatexproneterm-raw-coeff-number">
+<h3><a class="toc-backref" href="#id51"><tt class="docutils literal"><span class="pre">\PolToFloatExprOneTerm{raw_coeff}{number}</span></tt></a></h3>
+<blockquote>
+Similar to <a class="reference external" href="\PolToExprOneTerm{raw_coeff}{number}">\PolToExprOneTerm</a>. But does not treat
+especially coefficients equal to plus or minus one.</blockquote>
+</div>
+<div class="section" id="poltofloatexprcmd-raw-coeff">
+<h3><a class="toc-backref" href="#id52"><tt class="docutils literal">\PolToFloatExprCmd{raw_coeff}</tt></a></h3>
+<blockquote>
+<p>It is the one-argument macro used by <tt class="docutils literal">\PolToFloatExprOneTerm</tt>.
+Its package definition is <tt class="docutils literal"><span class="pre">\xintFloat{#1}</span></tt>.</p>
+<div class="admonition caution">
+<p class="first admonition-title">Caution!</p>
+<p>Currently (<a class="reference external" href="http://www.ctan.org/pkg/xint">xint</a> <tt class="docutils literal">1.2p</tt>) <tt class="docutils literal">\xintFloat{0}</tt> outputs <tt class="docutils literal">0.e0</tt>
+which is perfectly acceptable input for Python, but not for
+Maple. Thus, one should better leave the <a class="reference internal" href="#poltoexprallfalse">\poltoexprallfalse</a>
+toggle to its default <tt class="docutils literal">\iffalse</tt> state, if one intends to use
+the output in a Maple worksheet.</p>
+<p>But even then the zero polynomial will cause a problem. Workaround:</p>
+<pre class="literal-block">
+\renewcommand\PolToFloatExprCmd[1]{\xintiiifZero{#1}{0.0}{\xintFloat{#1}}}
+</pre>
+<p class="last">Usage of <tt class="docutils literal">\xintiiifZero</tt> and not <tt class="docutils literal">\xintifZero</tt> is only for
+optimization (I can't help it) because <tt class="docutils literal">#1</tt> is known to be
+in <tt class="docutils literal">xintfrac</tt> raw format.</p>
+</div>
+</blockquote>
+</div>
+</div>
+<div class="section" id="id13">
+<h2><a class="toc-backref" href="#id53"><tt class="docutils literal"><span class="pre">\PolToFloatExpr*{polname}</span></tt></a></h2>
+<blockquote>
+Typesets in ascending powers.</blockquote>
+</div>
+<div class="section" id="poltolist-polname">
+<h2><a class="toc-backref" href="#id54"><tt class="docutils literal">\PolToList{polname}</tt></a></h2>
+<blockquote>
+Expands to <tt class="docutils literal"><span class="pre">{coeff_0}{coeff_1}...{coeff_N}</span></tt> with <tt class="docutils literal">N</tt> = degree
+(except zero polynomial which does give <tt class="docutils literal">{0/1[0]}</tt> and not an
+empty output.)</blockquote>
+</div>
+<div class="section" id="poltocsv-polname">
+<h2><a class="toc-backref" href="#id55"><tt class="docutils literal">\PolToCSV{polname}</tt></a></h2>
+<blockquote>
+Expands to <tt class="docutils literal">coeff_0, coeff_1, coeff_2, <span class="pre">.....,</span> coeff_N</tt>. Converse
+to <a class="reference internal" href="#polfromcsv-polname-csv">\PolFromCSV</a>.</blockquote>
+</div>
+</div>
+<div class="section" id="booleans-with-default-setting-as-indicated">
+<h1><a class="toc-backref" href="#id56">Booleans (with default setting as indicated)</a></h1>
+<div class="section" id="xintverbosefalse">
+<h2><a class="toc-backref" href="#id57"><tt class="docutils literal">\xintverbosefalse</tt></a></h2>
+<blockquote>
+<p>This is actually an <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> configuration. Setting it to
+<tt class="docutils literal">true</tt> triggers the writing of information to the log when new
+polynomials are defined.</p>
+<div class="admonition caution">
+<p class="first admonition-title">Caution!</p>
+<p class="last">The macro meanings as written to the log are to be considered
+unstable and undocumented internal structures.</p>
+</div>
+</blockquote>
+</div>
+<div class="section" id="poltypesetallfalse">
+<h2><a class="toc-backref" href="#id58"><tt class="docutils literal">\poltypesetallfalse</tt></a></h2>
+<blockquote>
+If <tt class="docutils literal">true</tt>, <a class="reference internal" href="#poltypeset-polname">\PolTypeset{polname}</a> will also typeset the vanishing
+coefficients.</blockquote>
+</div>
+<div class="section" id="poltoexprallfalse">
+<h2><a class="toc-backref" href="#id59"><tt class="docutils literal">\poltoexprallfalse</tt></a></h2>
+<blockquote>
+If <tt class="docutils literal">true</tt>, <a class="reference internal" href="#poltoexpr-polname">\PolToExpr{polname}</a> and <a class="reference internal" href="#poltofloatexpr-polname">\PolToFloatExpr{polname}</a> will
+also include the vanishing coefficients in their outputs.</blockquote>
+</div>
</div>
<div class="section" id="technicalities">
-<h1>Technicalities</h1>
+<h1><a class="toc-backref" href="#id60">Technicalities</a></h1>
<ul>
-<li><p class="first">The catcode of the semi-colon is reset temporarily by <tt class="docutils literal">\poldef</tt> macro in
-case some other package (for example the French babel module) may have
-made it active. This will fail though if the whole thing was already
-part of a macro argument, in such cases one can use <tt class="docutils literal">\PolDef</tt> rather.
-The colon in <tt class="docutils literal">:=</tt> may be active with no consequences.</p>
-</li>
-<li><p class="first">Beware the <tt class="docutils literal">1/2 x</tt> problem: as mentioned above, it will be give zero due
-to the tacit multiplication rules of <tt class="docutils literal">\xintexpr</tt> and to the fact that
-the package will do the Euclidean division of <tt class="docutils literal">1</tt> by polynomial <tt class="docutils literal">2x</tt>.</p>
+<li><p class="first">The catcode of the semi-colon is reset temporarily by <a class="reference internal" href="#poldef">\poldef</a> macro in case some other package (for example the French
+babel module) may have made it active. This will fail though if the
+whole thing was already part of a macro argument, in such cases one
+can use <a class="reference internal" href="#id2">\PolDef{f}{P(x)}</a>
+rather. The colon in <tt class="docutils literal">:=</tt> may be active with no consequences.</p>
</li>
<li><p class="first">During execution of polynomial operations by <tt class="docutils literal">\poldef</tt> (but not
during the initial purely numerical parsing of the expression), the
-xintfrac macro <tt class="docutils literal">\xintAdd</tt> is temporarily patched to always express
+<a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> macro <tt class="docutils literal">\xintAdd</tt> is temporarily patched to always express
<tt class="docutils literal">a/b + c/d</tt> with <tt class="docutils literal"><span class="pre">l.c.m.(b,d)</span></tt> as denominator. Indeed the current
(xint 1.2p) <tt class="docutils literal">\xintAdd</tt> uses <tt class="docutils literal"><span class="pre">(ad+bc)/bd</span></tt> formula except if <tt class="docutils literal">b</tt>
divides <tt class="docutils literal">d</tt> or <tt class="docutils literal">d</tt> divides <tt class="docutils literal">b</tt>, which quickly leads in real life
@@ -677,33 +1084,41 @@ survive addition and multiplications:</p>
<p>where all coefficients have the same denominator 6 (which in this
example is the <tt class="docutils literal">l.c.m</tt> of the denominators of the reduced coefficients.)</p>
</li>
-<li><p class="first"><tt class="docutils literal">\PolDiff</tt> always applies <tt class="docutils literal">\xintIrr</tt> to the resulting coefficients, except
-that the <em>power of ten</em> part <tt class="docutils literal">[N]</tt> (for example an input in scientific
-notation such as <tt class="docutils literal">1.23e5</tt> gives <tt class="docutils literal">123/1[3]</tt> internally in xintfrac) is not
-taken into account in the reduction of the fraction. This is tentative
-and may change.</p>
-<p>Same remark for <tt class="docutils literal">\PolAntiDiff</tt>.</p>
+<li><p class="first"><a class="reference internal" href="#poldiff-polname-1-polname-2">\PolDiff{polname_1}{polname_2}</a> always applies <tt class="docutils literal">\xintIrr</tt> to the
+resulting coefficients, except that the <em>power of ten</em> part <tt class="docutils literal">[N]</tt>
+(for example an input in scientific notation such as <tt class="docutils literal">1.23e5</tt> gives
+<tt class="docutils literal">123/1[3]</tt> internally in xintfrac) is not taken into account in the
+reduction of the fraction. This is tentative and may change.</p>
+<p>Same remark for <a class="reference internal" href="#polantidiff-polname-1-polname-2">\PolAntiDiff{polname_1}{polname_2}</a>.</p>
</li>
-<li><p class="first">If <tt class="docutils literal">f</tt> was created from comma separated values by macro PolFromCSV,
-then the coefficients will be in the output of <tt class="docutils literal">\PolToList</tt> and
-<tt class="docutils literal">\PolToCSV</tt> in the same format as originally in input: a <tt class="docutils literal">1.3e2</tt>
-will again be a <tt class="docutils literal">1.3e2</tt>.</p>
+<li><p class="first">If <tt class="docutils literal">f</tt> was created from comma separated values by macro
+<a class="reference internal" href="#polfromcsv-polname-csv">\PolFromCSV{polname}{&lt;csv&gt;}</a>, then the coefficients will be in
+the output of <a class="reference internal" href="#poltolist-polname">\PolToList{polname}</a> and <a class="reference internal" href="#poltocsv-polname">\PolToCSV{polname}</a> in
+the same format as originally in input: a <tt class="docutils literal">1.3e2</tt> will again be a
+<tt class="docutils literal">1.3e2</tt>.</p>
<p>In contrast when such coefficients are used in a <tt class="docutils literal">\poldef</tt> (or
<tt class="docutils literal">\PolDef</tt>) expression, they get transformed during the parsing to
-the xintfrac <em>raw</em> format. This is an unavoidable consequence of usage
-by poldef of <tt class="docutils literal">\xintdeffunc</tt> which itself is based on <tt class="docutils literal">\xintexpr.</tt>
+the xintfrac <em>raw</em> format.
This <em>raw</em> format speeds up expansion of xintfrac macros for numerical
evaluations.</p>
</li>
-<li><p class="first">Currently, the package does not as a result of <tt class="docutils literal">\poldef</tt> add to the TeX
-memory an already pre-computed <em>array</em> structure for the polynomial
-coefficients, as would be constructed by <tt class="docutils literal"><span class="pre">\PolAssign{f}\toarray\macro</span></tt>.
-Such structures are used, but for internal calculations in temporarily
-restricted scopes. Apart from the function <tt class="docutils literal">f()</tt> known to the
-(numerical) <tt class="docutils literal">\xintexpr</tt> parser (whose meaning can be found in the log
-file after xintverbosetrue), the data is (currently) stored in a
-single other macro encapsulating the degree, and the coefficients as a
-list. This may evolve in future.</p>
+<li><p class="first">Currently, the package stores all coefficients from index <tt class="docutils literal">0</tt> to
+index equal to the polynomial degree inside a single macro, as a list.
+This data structure is obviously very inefficient for polynomials of
+high degree and few coefficients (as an example with <tt class="docutils literal">\poldef
+<span class="pre">f(x):=x^1000</span> + x^500;</tt> the subsequent definition <tt class="docutils literal">\poldef <span class="pre">g(x):=</span>
+<span class="pre">f(x)^2;</span></tt> will do of the order of 1,000,000 multiplications and
+additions involvings only zeroes... which does take time). This
+may change in the future.</p>
+</li>
+<li><p class="first">Tests have been made with Newton's iteration (for which computing
+exactly the derivative is precisely what this package is made for) or
+Regula Falsi method for locating roots: using exact computations leads
+quickly to gigantic fractions (but dichotomy method much less so). It
+is thus recommended to use <tt class="docutils literal">\xintdeffloatvar</tt> or
+<tt class="docutils literal">\xintthefloatexpr</tt> contexts for any kind of numerical mathematics.
+Of course, exact computations are invaluable for number theory or
+combinatorics...</p>
</li>
<li><p class="first">As is to be expected internal structures of the package are barely
documented and unstable. Don't use them.</p>
@@ -711,19 +1126,38 @@ documented and unstable. Don't use them.</p>
</ul>
</div>
<div class="section" id="releases">
-<h1>RELEASES</h1>
-<ul class="simple">
-<li>0.1 (2018/01/11): initial release (files README, polexpr.sty).</li>
-<li>0.2 (2018/01/14): documentation moved to polexpr.{txt,html}.</li>
+<h1><a class="toc-backref" href="#id61">RELEASES</a></h1>
+<ul>
+<li><p class="first">0.1 (2018/01/11)</p>
+<p>Initial release (files README, polexpr.sty).</p>
+</li>
+<li><p class="first">0.2 (2018/01/14)</p>
+<p>Documentation moved to polexpr.{txt,html}.</p>
+</li>
+<li><p class="first">0.3 (2018/01/17)</p>
+<p>Make polynomials known to <tt class="docutils literal">\xintfloatexpr</tt> and improve
+documentation.</p>
+</li>
+<li><p class="first">0.3.1 (2018/01/18)</p>
+<p>Fix two typos in documentation.</p>
+</li>
</ul>
-<p>Files of 0.2 release:</p>
+<p>Files of 0.3.1 release:</p>
<ul class="simple">
<li>README.md,</li>
<li>polexpr.sty (package file),</li>
<li>polexpr.txt (documentation),</li>
<li>polexpr.html (conversion via <a class="reference external" href="http://docutils.sourceforge.net/docs/index.html">DocUtils</a> rst2html.py)</li>
</ul>
-<p>See README.md for the License and the change log.</p>
+<p>See README.md for the License and the change log (there were
+some breaking changes from 0.2 to 0.3).</p>
+</div>
+<div class="section" id="acknowledgments">
+<h1><a class="toc-backref" href="#id62">Acknowledgments</a></h1>
+<p>Thanks to Jürgen Gilg whose question about <a class="reference external" href="http://www.ctan.org/pkg/xint">xint</a> usage for
+differentiating polynomials was the initial trigger leading to this
+package, and to Jürgen Gilg and Thomas Söll for testing it on some
+concrete problems.</p>
</div>
</div>
</body>