diff options
Diffstat (limited to 'macros/generic/polexpr')
-rw-r--r-- | macros/generic/polexpr/README.md | 13 | ||||
-rw-r--r-- | macros/generic/polexpr/polexpr-changes.html | 285 | ||||
-rw-r--r-- | macros/generic/polexpr/polexpr-changes.rst.txt | 215 | ||||
-rw-r--r-- | macros/generic/polexpr/polexpr-examples.pdf | bin | 57444 -> 57444 bytes | |||
-rw-r--r-- | macros/generic/polexpr/polexpr-ref.html | 406 | ||||
-rw-r--r-- | macros/generic/polexpr/polexpr-ref.rst.txt | 106 | ||||
-rw-r--r-- | macros/generic/polexpr/polexpr.css | 4 | ||||
-rw-r--r-- | macros/generic/polexpr/polexpr.html | 18 | ||||
-rw-r--r-- | macros/generic/polexpr/polexpr.rst.txt | 27 | ||||
-rw-r--r-- | macros/generic/polexpr/polexpr.sty | 4 | ||||
-rw-r--r-- | macros/generic/polexpr/polexprcore.tex | 2 | ||||
-rw-r--r-- | macros/generic/polexpr/polexprexpr.tex | 2 | ||||
-rw-r--r-- | macros/generic/polexpr/polexprsturm.tex | 2 |
13 files changed, 562 insertions, 522 deletions
diff --git a/macros/generic/polexpr/README.md b/macros/generic/polexpr/README.md index 0f70c6cb34..7dd46d2f34 100644 --- a/macros/generic/polexpr/README.md +++ b/macros/generic/polexpr/README.md @@ -1,7 +1,7 @@ Package polexpr README ====================== -Version ``0.8.7`` of ``2022/05/14``. +Version ``0.8.7a`` of ``2022/05/19``. Abstract -------- @@ -21,7 +21,7 @@ rational rounds found exactly. In memoriam: Jürgen Gilg ------------------------ -`polexpr` is dedicated to the memory of Jürgen Gilg (1967-2022). +`polexpr` is dedicated to the memory of Jürgen Gilg (1966-2022). His question in January 2018 about using [xintexpr](http://www.ctan.org/pkg/xintexpr) to compute derivatives @@ -61,16 +61,16 @@ Recent changes G.C.D.'s, derivatives or indefinite integrals previously available via macros. - 0.8.1 (2021/04/12) - Bugfix: a typo broke the 0.8 ``diff1()`` and related functions. + Bug fix: a typo broke the 0.8 ``diff1()`` and related functions. - 0.8.2 (2021/05/05) Track `xintexpr` 1.4e changes - 0.8.3 (2021/05/27) Track `xintexpr` 1.4h changes - 0.8.4 (2021/11/01) - Bugfix: `PolSturmIsolateZeros**` did not declare the square free + Bug fix: `PolSturmIsolateZeros**` did not declare the square free part of the original polynomial if no real root existed. - 0.8.5 (2021/11/30) - Bugfix: `intfrom()` was documented at `0.8` but not declared to parser. + Bug fix: `intfrom()` was documented at `0.8` but not declared to parser. Track (belatedly) `xintexpr` 1.4g changes - 0.8.6 (2022/01/09) Separate `polexpr-examples.{tex,pdf}` from the `polexpr.html` reference. @@ -79,7 +79,8 @@ Recent changes three files. Catcode protection for `\poldef` now matches long-standing behaviour of `\xintdefvar`. This fixes issues with ``babel+french``. - +- 0.8.7a (2022/05/19) + Documentation improvements. License ------- diff --git a/macros/generic/polexpr/polexpr-changes.html b/macros/generic/polexpr/polexpr-changes.html index 51392f6565..3cce3e7612 100644 --- a/macros/generic/polexpr/polexpr-changes.html +++ b/macros/generic/polexpr/polexpr-changes.html @@ -6,7 +6,7 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" /> - <title>CHANGES — polexpr 0.8.7 documentation</title> + <title>CHANGES — polexpr 0.8.7a documentation</title> <link rel="stylesheet" type="text/css" href="polexpr.css" /> <link rel="prev" title="polexpr reference" href="polexpr-ref.html" /> </head><body> @@ -16,7 +16,7 @@ <li class="right" style="margin-right: 10px"> <a href="polexpr-ref.html" title="polexpr reference" accesskey="P">previous</a></li> - <li class="nav-item nav-item-0"><a href="polexpr.html">polexpr 0.8.7 documentation</a> »</li> + <li class="nav-item nav-item-0"><a href="polexpr.html">polexpr 0.8.7a documentation</a> »</li> <li class="nav-item nav-item-this"><a href="">CHANGES</a></li> </ul> </div> @@ -28,8 +28,8 @@ <section id="changes"> <h1>CHANGES</h1> -<section id="v0-1-2018-01-11-initial-release-features"> -<span id="firstrelease"></span><h2>v0.1 (2018/01/11): initial release. Features:</h2> +<section id="initial-release-features"> +<span id="firstrelease"></span><h2>0.1 (2018/01/11): initial release. Features:</h2> <ul class="simple"> <li><p>The <a class="reference internal" href="polexpr-ref.html#poldef"><span class="std std-ref">\poldef</span></a> parser itself,</p></li> <li><p>Differentiation and anti-differentiation,</p></li> @@ -40,8 +40,8 @@ </ul> <p>Only one-variable polynomials so far.</p> </section> -<section id="v0-2-2018-01-14"> -<h2>v0.2 (2018/01/14)</h2> +<section id="id1"> +<h2>0.2 (2018/01/14)</h2> <ul class="simple"> <li><p>Fix: <code class="docutils literal notranslate"><span class="pre">"README</span> <span class="pre">thinks</span> <span class="pre">\numexpr</span> <span class="pre">recognizes</span> <span class="pre">^</span> <span class="pre">operator"</span></code>.</p></li> <li><p>Convert README to reStructuredText markup.</p></li> @@ -52,12 +52,12 @@ <p>Due to lack of available time the test suite might not be extensive enough. Bug reports are very welcome!</p> </section> -<section id="v0-3-2018-01-17"> -<h2>v0.3 (2018/01/17)</h2> +<section id="id2"> +<h2>0.3 (2018/01/17)</h2> <ul> -<li><p>bug fixes:</p> +<li><p>Bug fixes:</p> <ul> -<li><p>the <code class="docutils literal notranslate"><span class="pre">0.1</span></code> <a class="reference internal" href="polexpr-ref.html#polevalat"><span class="std std-ref">\PolEval</span></a> accepted expressions for its +<li><p>The <code class="docutils literal notranslate"><span class="pre">0.1</span></code> <a class="reference internal" href="polexpr-ref.html#polevalat"><span class="std std-ref">\PolEval</span></a> accepted expressions for its second argument, but this was removed by mistake at <code class="docutils literal notranslate"><span class="pre">0.2</span></code>. Restored.</p> <p><strong>Attention</strong>: at <code class="docutils literal notranslate"><span class="pre">0.4</span></code> this has been reverted again, and <a class="reference internal" href="polexpr-ref.html#polevalatexpr"><span class="std std-ref">\PolEval{P}\AtExpr{foo}</span></a> syntax is needed for @@ -65,11 +65,11 @@ using expressions in the second argument.</p> </li> </ul> </li> -<li><p>incompatible or breaking changes:</p> +<li><p>Incompatible or breaking changes:</p> <ul class="simple"> <li><p><a class="reference internal" href="polexpr-ref.html#poltoexpr"><span class="std std-ref">\PolToExpr</span></a> now by default uses <em>descending</em> powers (it also treats differently coefficients equal to 1 or -1.) -Use <a class="reference internal" href="polexpr-ref.html#id78"><span class="std std-ref">\PolToExpr*</span></a> for <em>ascending</em> powers.</p></li> +Use <a class="reference internal" href="polexpr-ref.html#id79"><span class="std std-ref">\PolToExpr*</span></a> for <em>ascending</em> powers.</p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polevalat"><span class="std std-ref">\PolEval</span></a> reduced the output to smallest terms, but as this is costly with big fractions and not needed if e.g. wrapped in an <code class="docutils literal notranslate"><span class="pre">\xintRound</span></code> or <code class="docutils literal notranslate"><span class="pre">\xintFloat</span></code>, this step has been @@ -77,7 +77,7 @@ removed; the former meaning is available as <a class="reference internal" href="polexpr-ref.html#polevalreducedat"><span class="std std-ref">\PolEvalReduced</span></a>.</p></li> </ul> </li> -<li><p>new (or newly documented) macros:</p> +<li><p>New (or newly documented) macros:</p> <ul class="simple"> <li><p><a class="reference internal" href="polexpr-ref.html#poltypesetcmd"><span class="std std-ref">\PolTypesetCmd</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#poltypesetcmdprefix"><span class="std std-ref">\PolTypesetCmdPrefix</span></a></p></li> @@ -93,11 +93,11 @@ removed; the former meaning is available as <li><p><a class="reference internal" href="polexpr-ref.html#poltoexprtimes"><span class="std std-ref">\PolToExprTimes</span></a></p></li> </ul> </li> -<li><p>improvements:</p> +<li><p>Improvements:</p> <ul> -<li><p>documentation has a table of contents, internal hyperlinks, +<li><p>Documentation has a table of contents, internal hyperlinks, standardized signature notations and added explanations.</p></li> -<li><p>one can do <code class="docutils literal notranslate"><span class="pre">\PolLet{g}={f}</span></code> or <code class="docutils literal notranslate"><span class="pre">\PolLet{g}{f}</span></code>.</p></li> +<li><p>One can do <code class="docutils literal notranslate"><span class="pre">\PolLet{g}={f}</span></code> or <code class="docutils literal notranslate"><span class="pre">\PolLet{g}{f}</span></code>.</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">\PolToExpr{f}</span></code> is highly customizable.</p></li> <li><p><a class="reference internal" href="polexpr-ref.html#poldef"><span class="std std-ref">\poldef</span></a> and other defining macros prepare the polynomial functions for usage within <code class="docutils literal notranslate"><span class="pre">\xintthefloatexpr</span></code> (or @@ -113,16 +113,16 @@ generation floating point polynomial functions.</p> </li> </ul> </section> -<section id="v0-3-1-2018-01-18"> -<h2>v0.3.1 (2018/01/18)</h2> +<section id="id3"> +<h2>0.3.1 (2018/01/18)</h2> <p>Fixes two typos in example code included in the documentation.</p> </section> -<section id="v0-4-2018-02-16"> -<h2>v0.4 (2018/02/16)</h2> +<section id="id4"> +<h2>0.4 (2018/02/16)</h2> <ul> -<li><p>bug fixes:</p> +<li><p>Bug fixes:</p> <ul class="simple"> -<li><p>when Euclidean division gave a zero remainder, the internal +<li><p>When Euclidean division gave a zero remainder, the internal representation of this zero polynomial could be faulty; this could cause mysterious bugs in conjunction with other package macros such as <a class="reference internal" href="polexpr-ref.html#polmapcoeffs"><span class="std std-ref">\PolMapCoeffs</span></a>.</p></li> @@ -130,9 +130,9 @@ macros such as <a class="reference internal" href="polexpr-ref.html#polmapcoeffs of lesser degree than the second one.</p></li> </ul> </li> -<li><p>breaking changes:</p> +<li><p>Breaking changes:</p> <ul> -<li><p>formerly <a class="reference internal" href="polexpr-ref.html#polevalat"><span class="std std-ref">\PolEval{P}\At{foo}</span></a> allowed <code class="docutils literal notranslate"><span class="pre">foo</span></code> to +<li><p>Formerly <a class="reference internal" href="polexpr-ref.html#polevalat"><span class="std std-ref">\PolEval{P}\At{foo}</span></a> allowed <code class="docutils literal notranslate"><span class="pre">foo</span></code> to be an expression, which was transparently handled via <code class="docutils literal notranslate"><span class="pre">\xinttheexpr</span></code>. Now, <code class="docutils literal notranslate"><span class="pre">foo</span></code> must be a fraction (or a macro expanding to such) in the format acceptable by <code class="docutils literal notranslate"><span class="pre">xintfrac.sty</span></code> @@ -142,7 +142,7 @@ name of a variable known to <code class="docutils literal notranslate"><span cla <p>The same holds for <a class="reference internal" href="polexpr-ref.html#polevalreducedat"><span class="std std-ref">\PolEvalReduced</span></a> and <a class="reference internal" href="polexpr-ref.html#polfloatevalat"><span class="std std-ref">\PolFloatEval</span></a>.</p> </li> -<li><p>the <code class="docutils literal notranslate"><span class="pre">3.0</span></code> automatic generation of floating point variants has +<li><p>The <code class="docutils literal notranslate"><span class="pre">3.0</span></code> automatic generation of floating point variants has been reverted. Not only do <em>not</em> the package macros automatically generate floating point variants of newly created polynomials, they actually make pre-existing such variant undefined.</p> @@ -150,7 +150,7 @@ they actually make pre-existing such variant undefined.</p> </li> </ul> </li> -<li><p>new non-expandable macros:</p> +<li><p>New non-expandable macros:</p> <ul class="simple"> <li><p><a class="reference internal" href="polexpr-ref.html#polgenfloatvariant"><span class="std std-ref">\PolGenFloatVariant</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polgloballet"><span class="std std-ref">\PolGlobalLet</span></a></p></li> @@ -158,23 +158,23 @@ they actually make pre-existing such variant undefined.</p> <li><p><a class="reference internal" href="polexpr-ref.html#polquo"><span class="std std-ref">\PolQuo</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polrem"><span class="std std-ref">\PolRem</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#poltosturm"><span class="std std-ref">\PolToSturm</span></a></p></li> -<li><p><a class="reference internal" href="polexpr-ref.html#id35"><span class="std std-ref">\PolToSturm*</span></a></p></li> +<li><p><a class="reference internal" href="polexpr-ref.html#id36"><span class="std std-ref">\PolToSturm*</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polsettosturmchainsignchangesat"><span class="std std-ref">\PolSetToSturmChainSignChangesAt</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polsettonbofzeroswithin"><span class="std std-ref">\PolSetToNbOfZerosWithin</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polsturmisolatezeros"><span class="std std-ref">\PolSturmIsolateZeros</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polrefineinterval"><span class="std std-ref">\PolRefineInterval*</span></a></p></li> -<li><p><a class="reference internal" href="polexpr-ref.html#id46"><span class="std std-ref">\PolRefineInterval[N]</span></a></p></li> +<li><p><a class="reference internal" href="polexpr-ref.html#id47"><span class="std std-ref">\PolRefineInterval[N]</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polensureintervallength"><span class="std std-ref">\PolEnsureIntervalLength</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polensureintervallengths"><span class="std std-ref">\PolEnsureIntervalLengths</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervals"><span class="std std-ref">\PolPrintIntervals</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervalsprintexactzero"><span class="std std-ref">\PolPrintIntervalsPrintExactZero</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervalsprintleftendpoint"><span class="std std-ref">\PolPrintIntervalsPrintLeftEndPoint</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervalsprintrightendpoint"><span class="std std-ref">\PolPrintIntervalsPrintRightEndPoint</span></a></p></li> -<li><p><a class="reference internal" href="polexpr-ref.html#id20"><span class="std std-ref">\PolReduceCoeffs*</span></a></p></li> +<li><p><a class="reference internal" href="polexpr-ref.html#id21"><span class="std std-ref">\PolReduceCoeffs*</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polmakemonic"><span class="std std-ref">\PolMakeMonic</span></a></p></li> </ul> </li> -<li><p>new expandable macros:</p> +<li><p>New expandable macros:</p> <ul class="simple"> <li><p><a class="reference internal" href="polexpr-ref.html#poltoexpronetermstylea"><span class="std std-ref">\PolToExprOneTermStyleA</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polifcoeffisplusorminusone"><span class="std std-ref">\PolIfCoeffIsPlusOrMinusOne</span></a></p></li> @@ -193,24 +193,24 @@ they actually make pre-existing such variant undefined.</p> <li><p><a class="reference internal" href="polexpr-ref.html#poldectostring"><span class="std std-ref">\PolDecToString</span></a></p></li> </ul> </li> -<li><p>improvements:</p> +<li><p>Improvements:</p> <p>The main new feature is implementation of the <a class="reference external" href="https://en.wikipedia.org/wiki/Sturm%27s_theorem">Sturm algorithm</a> for localization of the real roots of polynomials.</p> </li> </ul> </section> -<section id="v0-4-1-2018-03-01"> -<h2>v0.4.1 (2018/03/01)</h2> +<section id="id5"> +<h2>0.4.1 (2018/03/01)</h2> <p>Synced with xint 1.3.</p> </section> -<section id="v0-4-2-2018-03-03"> -<h2>v0.4.2 (2018/03/03)</h2> +<section id="id6"> +<h2>0.4.2 (2018/03/03)</h2> <p>Documentation fix.</p> </section> -<section id="v0-5-2018-04-08"> -<h2>v0.5 (2018/04/08)</h2> +<section id="id7"> +<h2>0.5 (2018/04/08)</h2> <ul class="simple"> -<li><p>bug fixes:</p> +<li><p>Bug fix:</p> <ul> <li><p><a class="reference internal" href="polexpr-ref.html#polget"><span class="std std-ref">\PolGet{polname}\fromarray\macro</span></a> crashed when <code class="docutils literal notranslate"><span class="pre">\macro</span></code> was @@ -218,68 +218,68 @@ an <a class="reference external" href="https://www.ctan.org/pkg/xint">xinttools< polynomial.</p></li> </ul> </li> -<li><p>breaking changes:</p> +<li><p>Breaking changes:</p> <ul> <li><p><a class="reference internal" href="polexpr-ref.html#poltosturm"><span class="std std-ref">\PolToSturm</span></a> creates primitive integer coefficients polynomials. This speeds up localization of roots via <a class="reference internal" href="polexpr-ref.html#polsturmisolatezeros"><span class="std std-ref">\PolSturmIsolateZeros</span></a>. In case of user protests the author will make available again the code producing the bona fide Sturm polynomials as used formerly.</p></li> -<li><p>polynomials created from <a class="reference internal" href="polexpr-ref.html#polfromcsv"><span class="std std-ref">\PolFromCSV</span></a> or +<li><p>Polynomials created from <a class="reference internal" href="polexpr-ref.html#polfromcsv"><span class="std std-ref">\PolFromCSV</span></a> or <a class="reference internal" href="polexpr-ref.html#polget"><span class="std std-ref">\PolGet</span></a> get their coefficients normalized via <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a>‘s <code class="docutils literal notranslate"><span class="pre">\xintRaw</span></code>.</p></li> </ul> </li> -<li><p>experimental change:</p> +<li><p>Experimental change:</p> <ul> -<li><p>optional argument to <a class="reference internal" href="polexpr-ref.html#polsturmisolatezeros"><span class="std std-ref">\PolSturmIsolateZeros</span></a> +<li><p>Optional argument to <a class="reference internal" href="polexpr-ref.html#polsturmisolatezeros"><span class="std std-ref">\PolSturmIsolateZeros</span></a> (see <code class="docutils literal notranslate"><span class="pre">The</span> <span class="pre">degree</span> <span class="pre">41</span> <span class="pre">polynomial</span> <span class="pre">with</span> <span class="pre">-2,</span> <span class="pre">-1.9,</span> <span class="pre">-1.8,</span> <span class="pre">...,</span> <span class="pre">0,</span> <span class="pre">0.1,</span> <span class="pre">...,</span> <span class="pre">1.9,</span> <span class="pre">2</span> <span class="pre">as</span> <span class="pre">roots</span></code> in <code class="docutils literal notranslate"><span class="pre">polexpr-examples.pdf</span></code>). It will presumably be replaced in future by an interval specification.</p></li> </ul> </li> -<li><p>new non-expandable macro:</p> +<li><p>New non-expandable macro:</p> <ul> <li><p><a class="reference internal" href="polexpr-ref.html#polmakeprimitive"><span class="std std-ref">\PolMakePrimitive</span></a></p></li> </ul> </li> -<li><p>new expandable macro:</p> +<li><p>New expandable macro:</p> <ul> <li><p><a class="reference internal" href="polexpr-ref.html#policontent"><span class="std std-ref">\PolIContent</span></a></p></li> </ul> </li> </ul> </section> -<section id="v0-5-1-2018-04-22"> -<h2>v0.5.1 (2018/04/22)</h2> +<section id="id8"> +<h2>0.5.1 (2018/04/22)</h2> <ul class="simple"> -<li><p>new feature:</p> +<li><p>New feature:</p> <ul> -<li><p>the character <code class="docutils literal notranslate"><span class="pre">'</span></code> can be used in polynomial names.</p></li> +<li><p>The character <code class="docutils literal notranslate"><span class="pre">'</span></code> can be used in polynomial names.</p></li> </ul> </li> </ul> </section> -<section id="v0-6-2018-11-20"> -<h2>v0.6 (2018/11/20)</h2> +<section id="id9"> +<h2>0.6 (2018/11/20)</h2> <ul class="simple"> -<li><p>bugfix:</p> +<li><p>Bug fixes:</p> <ul> -<li><p>the starred variant -<a class="reference internal" href="polexpr-ref.html#id35"><span class="std std-ref">\PolToSturm*{<polname>}{<sturmname>}</span></a> +<li><p>The starred variant +<a class="reference internal" href="polexpr-ref.html#id36"><span class="std std-ref">\PolToSturm*{<polname>}{<sturmname>}</span></a> was broken. On the occasion of the fix, its meaning has been modified, see its documentation.</p></li> -<li><p>using <a class="reference internal" href="polexpr-ref.html#poltosturm"><span class="std std-ref">\PolToSturm</span></a> with a constant polynomial +<li><p>Using <a class="reference internal" href="polexpr-ref.html#poltosturm"><span class="std std-ref">\PolToSturm</span></a> with a constant polynomial caused a division by zero error.</p></li> </ul> </li> -<li><p>new macro:</p> +<li><p>New macro:</p> <ul> -<li><p><a class="reference internal" href="polexpr-ref.html#id38"><span class="std std-ref">\PolSturmIsolateZeros*</span></a> +<li><p><a class="reference internal" href="polexpr-ref.html#id39"><span class="std std-ref">\PolSturmIsolateZeros*</span></a> acts like the <a class="reference internal" href="polexpr-ref.html#polsturmisolatezeros"><span class="std std-ref">non-starred variant</span></a> then computes all the multiplicities.</p></li> </ul> </li> -<li><p>new expandable macros:</p> +<li><p>New expandable macros:</p> <ul> <li><p><a class="reference internal" href="polexpr-ref.html#polsturmisolatedzeromultiplicity"><span class="std std-ref">\PolSturmIsolatedZeroMultiplicity{<sturmname>}{<index>}</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polsturmnbofrootsoflessthanorequalto"><span class="std std-ref">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></a></p></li> @@ -290,12 +290,12 @@ acts like the <a class="reference internal" href="polexpr-ref.html#polsturmisola </li> </ul> </section> -<section id="v0-7-2018-12-08-v0-7-1-bugfix-v0-7-2-2nd-bugfix-2018-12-09"> -<h2>v0.7 (2018/12/08), v0.7.1 (bugfix), v0.7.2 (2nd bugfix) (2018/12/09)</h2> +<section id="bugfix-0-7-2-2nd-bugfix-2018-12-09"> +<h2>0.7 (2018/12/08), 0.7.1 (bugfix), 0.7.2 (2nd bugfix) (2018/12/09)</h2> <ul class="simple"> -<li><p>breaking changes:</p> +<li><p>Breaking changes:</p> <ul> -<li><p>although <a class="reference internal" href="polexpr-ref.html#polprintintervals"><span class="std std-ref">\PolPrintIntervals[<varname>]{<sturmname>}</span></a> default output +<li><p>Although <a class="reference internal" href="polexpr-ref.html#polprintintervals"><span class="std std-ref">\PolPrintIntervals[<varname>]{<sturmname>}</span></a> default output remains the same, some auxiliary macros for user-customization have been removed: <code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheEndPoint</span></code>, <code class="docutils literal notranslate"><span class="pre">\PolIfEndPointIsPositive{T}{F}</span></code>, @@ -303,9 +303,9 @@ have been removed: <code class="docutils literal notranslate"><span class="pre"> <code class="docutils literal notranslate"><span class="pre">\PolIfEndPointIsZero{T}{F}</span></code>.</p></li> </ul> </li> -<li><p>bugfix:</p> +<li><p>Bug fixes:</p> <ul> -<li><p>it could happen that, contrarily to documentation, an interval computed +<li><p>It could happen that, contrarily to documentation, an interval computed by <a class="reference internal" href="polexpr-ref.html#polsturmisolatezeros"><span class="std std-ref">\PolSturmIsolateZeros{<sturmname>}</span></a> had zero as an endpoint,</p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polensureintervallength"><span class="std std-ref">\PolEnsureIntervalLength{<sturmname>}{<index>}{<exponent>}</span></a> could under certain circumstances erroneously @@ -315,13 +315,13 @@ real roots, hence for which no isolation intervals existed (thanks to Thomas Söll for report).</p></li> </ul> </li> -<li><p>new macros:</p> +<li><p>New macros:</p> <ul> -<li><p><a class="reference internal" href="polexpr-ref.html#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a></p></li> +<li><p><a class="reference internal" href="polexpr-ref.html#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polsturmisolatezerosgetmultiplicitiesandrationalroots"><span class="std std-ref">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots{<sturmname>}</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polsturmisolatezerosandfindrationalroots"><span class="std std-ref">\PolSturmIsolateZerosAndFindRationalRoots{<sturmname>}</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polexprsetup"><span class="std std-ref">\polexprsetup</span></a></p></li> -<li><p><a class="reference internal" href="polexpr-ref.html#id61"><span class="std std-ref">\PolPrintIntervals*</span></a></p></li> +<li><p><a class="reference internal" href="polexpr-ref.html#id62"><span class="std std-ref">\PolPrintIntervals*</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervalsnorealroots"><span class="std std-ref">\PolPrintIntervalsNoRealRoots</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervalsbeginenv"><span class="std std-ref">\PolPrintIntervalsBeginEnv</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervalsendenv"><span class="std std-ref">\PolPrintIntervalsEndEnv</span></a></p></li> @@ -330,7 +330,7 @@ Thomas Söll for report).</p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervalsprintmultiplicity"><span class="std std-ref">\PolPrintIntervalsPrintMultiplicity</span></a></p></li> </ul> </li> -<li><p>new expandable macros:</p> +<li><p>New expandable macros:</p> <ul> <li><p><a class="reference internal" href="polexpr-ref.html#polsturmnbofrationalroots"><span class="std std-ref">\PolSturmNbOfRationalRoots{<sturmname>}</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polsturmnbofrationalrootswithmultiplicities"><span class="std std-ref">\PolSturmNbOfRationalRootsWithMultiplicities{<sturmname>}</span></a></p></li> @@ -344,16 +344,16 @@ Thomas Söll for report).</p></li> </li> </ul> </section> -<section id="v0-7-3-2019-02-04"> -<h2>v0.7.3 (2019/02/04)</h2> +<section id="id10"> +<h2>0.7.3 (2019/02/04)</h2> <ul class="simple"> -<li><p>bugfix:</p> +<li><p>Bug fixes:</p> <ul> <li><p>Debugging information not destined to user showed in log if root finding was done under <code class="docutils literal notranslate"><span class="pre">\xintverbosetrue</span></code> regime.</p></li> <li><p><a class="reference internal" href="polexpr-ref.html#polprintintervalsthevar"><span class="std std-ref">\PolPrintIntervalsTheVar</span></a> remained defined after <a class="reference internal" href="polexpr-ref.html#polprintintervals"><span class="std std-ref">\PolPrintIntervals</span></a> but was -left undefined after <a class="reference internal" href="polexpr-ref.html#id61"><span class="std std-ref">\PolPrintIntervals*</span></a> +left undefined after <a class="reference internal" href="polexpr-ref.html#id62"><span class="std std-ref">\PolPrintIntervals*</span></a> (reported by Jürgen Gilg). Now remains defined in both cases, and <a class="reference internal" href="polexpr-ref.html#polprintintervalsthesturmname"><span class="std std-ref">\PolPrintIntervalsTheSturmName</span></a> also.</p></li> @@ -363,10 +363,10 @@ Söll).</p></li> </li> </ul> </section> -<section id="v0-7-4-2019-02-12"> -<h2>v0.7.4 (2019/02/12)</h2> +<section id="id11"> +<h2>0.7.4 (2019/02/12)</h2> <ul class="simple"> -<li><p>bugfix:</p> +<li><p>Bug fix:</p> <ul> <li><p>20000000000 is too big for <code class="docutils literal notranslate"><span class="pre">\numexpr</span></code>, shouldn’t I know that? Thanks to Jürgen Gilg for report.</p></li> @@ -374,15 +374,15 @@ Thanks to Jürgen Gilg for report.</p></li> </li> </ul> </section> -<section id="v0-7-5-2020-01-31"> -<h2>v0.7.5 (2020/01/31)</h2> +<section id="id12"> +<h2>0.7.5 (2020/01/31)</h2> <p>Synced with xintexpr 1.4. Requires it.</p> </section> -<section id="v0-8-2021-03-29"> -<span id="polexpr08release"></span><h2>v0.8 (2021/03/29)</h2> +<section id="polexpr08release"> +<span id="id13"></span><h2>0.8 (2021/03/29)</h2> <p>Synced with xintexpr 1.4d. Requires it.</p> <ul class="simple"> -<li><p>breaking changes:</p> +<li><p>Breaking changes:</p> <ul> <li><p>As the usability of character <code class="docutils literal notranslate"><span class="pre">'</span></code> in names has been extended from <code class="docutils literal notranslate"><span class="pre">\poldef</span></code> to also generally <code class="docutils literal notranslate"><span class="pre">\xintexpr</span></code>, <code class="docutils literal notranslate"><span class="pre">\xintdefvar</span></code>, @@ -396,13 +396,13 @@ be replaced by the <code class="docutils literal notranslate"><span class="pre"> <a class="reference internal" href="polexpr-ref.html#poltoexprcaret"><span class="std std-ref">\PolToExprCaret</span></a>.</p></li> </ul> </li> -<li><p>deprecated:</p> +<li><p>Deprecated:</p> <ul> <li><p>Usage of <code class="docutils literal notranslate"><span class="pre">P/Q</span></code> for the euclidean quotient of two polynomials is deprecated. Start using <code class="docutils literal notranslate"><span class="pre">quo(P,Q)</span></code> in its place.</p></li> </ul> </li> -<li><p>bugfix:</p> +<li><p>Bug fixes:</p> <ul> <li><p>The <code class="docutils literal notranslate"><span class="pre">\xintglobaldefstrue</span></code> setting was obeyed only partially by the polexpr macros defining polynomials.</p></li> @@ -417,18 +417,18 @@ extended possibilities for xintexpr 1.4 user-declared functions. Hopefully <code class="docutils literal notranslate"><span class="pre">0.8</span></code> achieves full functionality in this context.</p></li> </ul> </li> -<li><p>new macros:</p> +<li><p>New macros:</p> <ul> <li><p><a class="reference internal" href="polexpr-ref.html#polnewpolverbosefalse"><span class="std std-ref">\polnewpolverbosefalse</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#poltoexprcaret"><span class="std std-ref">\PolToExprCaret</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#poltoexprinvar"><span class="std std-ref">\PolToExprInVar</span></a></p></li> -<li><p>alongside the major new functionalities described in the next item +<li><p>Alongside the major new functionalities described in the next item <a class="reference internal" href="polexpr-ref.html#poltypeset"><span class="std std-ref">\PolTypeset</span></a> and <a class="reference internal" href="polexpr-ref.html#poltoexpr"><span class="std std-ref">\PolToExpr</span></a> have been enhanced to accept as argument a general expression and not only a pre-declared polynomial name.</p></li> </ul> </li> -<li><p>new features:</p> +<li><p>New features:</p> <ul> <li><p>The package is usable under Plain and probably most any TeX format, and not only under LaTeX.</p></li> @@ -453,16 +453,16 @@ macro interface such as gcd computations.</p></li> <p>See the updated <a class="reference internal" href="polexpr-ref.html#quick"><span class="std std-ref">Quick syntax overview</span></a> and then <a class="reference internal" href="polexpr-ref.html#polexpr08"><span class="std std-ref">the extended syntax description</span></a>.</p> </section> -<section id="v0-8-1-2021-04-12"> -<h2>v0.8.1 (2021/04/12)</h2> +<section id="id14"> +<h2>0.8.1 (2021/04/12)</h2> <ul class="simple"> -<li><p>breaking changes:</p> +<li><p>Breaking changes:</p> <ul> -<li><p>renamed v0.8’s <code class="docutils literal notranslate"><span class="pre">icontent()</span></code> to <a class="reference internal" href="polexpr-ref.html#cont"><span class="std std-ref">cont()</span></a>.</p></li> -<li><p>renamed v0.8’s <code class="docutils literal notranslate"><span class="pre">lcoeff()</span></code> to <a class="reference internal" href="polexpr-ref.html#lc"><span class="std std-ref">lc()</span></a>.</p></li> +<li><p>Renamed 0.8’s <code class="docutils literal notranslate"><span class="pre">icontent()</span></code> to <a class="reference internal" href="polexpr-ref.html#cont"><span class="std std-ref">cont()</span></a>.</p></li> +<li><p>Renamed 0.8’s <code class="docutils literal notranslate"><span class="pre">lcoeff()</span></code> to <a class="reference internal" href="polexpr-ref.html#lc"><span class="std std-ref">lc()</span></a>.</p></li> </ul> </li> -<li><p>bugfix:</p> +<li><p>Bug fixes:</p> <ul> <li><p>Sadly, <code class="docutils literal notranslate"><span class="pre">diff1()</span></code>, <code class="docutils literal notranslate"><span class="pre">diff2()</span></code>, <code class="docutils literal notranslate"><span class="pre">diffn()</span></code> were broken for polynomials of degrees 8 or more, due to a typo and @@ -476,7 +476,7 @@ was broken by an end-of-line space, left-over from mass conversion from LaTeX to TeX syntax.</p></li> </ul> </li> -<li><p>added:</p> +<li><p>Added:</p> <ul> <li><p><a class="reference internal" href="polexpr-ref.html#lpol"><span class="std std-ref">lpol()</span></a></p></li> <li><p><a class="reference internal" href="polexpr-ref.html#lcoeffs"><span class="std std-ref">lcoeffs()</span></a></p></li> @@ -484,16 +484,16 @@ from mass conversion from LaTeX to TeX syntax.</p></li> </li> </ul> </section> -<section id="v0-8-2-2021-05-05"> -<h2>v0.8.2 (2021/05/05)</h2> +<section id="id15"> +<h2>0.8.2 (2021/05/05)</h2> <ul class="simple"> -<li><p>breaking change:</p> +<li><p>Breaking change:</p> <ul> -<li><p>usage of <code class="docutils literal notranslate"><span class="pre">\xintPFloat</span></code> in place of <code class="docutils literal notranslate"><span class="pre">\xintFloat</span></code> for +<li><p>Usage of <code class="docutils literal notranslate"><span class="pre">\xintPFloat</span></code> in place of <code class="docutils literal notranslate"><span class="pre">\xintFloat</span></code> for <a class="reference internal" href="polexpr-ref.html#poltofloatexprcmd"><span class="std std-ref">\PolToFloatExprCmd</span></a>.</p></li> </ul> </li> -<li><p>improved:</p> +<li><p>Improved:</p> <ul> <li><p>Some <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> functions such as <code class="docutils literal notranslate"><span class="pre">rseq()</span></code> use the semi-colon, and it was mentioned in the documentation that <a class="reference internal" href="polexpr-ref.html#poldef"><span class="std std-ref">\poldef</span></a> @@ -504,60 +504,66 @@ this work-around. With this relase only <a class="reference internal" href="pol not <a class="reference internal" href="polexpr-ref.html#id5"><span class="std std-ref">\PolDef</span></a> needs the work-around.</p></li> </ul> </li> -<li><p>track <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <code class="docutils literal notranslate"><span class="pre">1.4e</span></code> changes relative to powers.</p></li> +<li><p>Track <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <code class="docutils literal notranslate"><span class="pre">1.4e</span></code> changes relative to powers.</p></li> </ul> </section> -<section id="v0-8-3-2021-05-27"> -<h2>v0.8.3 (2021/05/27)</h2> +<section id="id16"> +<h2>0.8.3 (2021/05/27)</h2> <ul class="simple"> -<li><p>small internal update to track an <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <code class="docutils literal notranslate"><span class="pre">1.4h</span></code> change +<li><p>Small internal update to track an <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <code class="docutils literal notranslate"><span class="pre">1.4h</span></code> change regarding handling of exceptions. Will require this version at least on loading.</p></li> </ul> </section> -<section id="v0-8-4-2021-11-01"> -<h2>v0.8.4 (2021/11/01)</h2> +<section id="id17"> +<h2>0.8.4 (2021/11/01)</h2> <ul class="simple"> -<li><p>bugfix: <a class="reference internal" href="polexpr-ref.html#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> did not declare the <code class="docutils literal notranslate"><span class="pre"><sturmname>_norr</span></code> and +<li><p>Bug fix: <a class="reference internal" href="polexpr-ref.html#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> did not declare the <code class="docutils literal notranslate"><span class="pre"><sturmname>_norr</span></code> and <code class="docutils literal notranslate"><span class="pre"><sturmname>_sqf_norr</span></code> polynomials if original polynomial had no real root!</p></li> </ul> </section> -<section id="v0-8-5-2021-11-30"> -<h2>v0.8.5 (2021/11/30)</h2> +<section id="id18"> +<h2>0.8.5 (2021/11/30)</h2> <ul class="simple"> -<li><p>bugfix: support for the <code class="docutils literal notranslate"><span class="pre">intfrom()</span></code> function was in the code, +<li><p>Bug fix: support for the <code class="docutils literal notranslate"><span class="pre">intfrom()</span></code> function was in the code, but the declaration to the polynomial parser had not been done.</p></li> -<li><p>track (belatedly) upstream deprecation of <code class="docutils literal notranslate"><span class="pre">\xintSignedFrac</span></code> and +<li><p>Track (belatedly) upstream deprecation of <code class="docutils literal notranslate"><span class="pre">\xintSignedFrac</span></code> and <code class="docutils literal notranslate"><span class="pre">\xintSignedFwOver</span></code> at <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <code class="docutils literal notranslate"><span class="pre">1.4g</span></code></p></li> </ul> </section> -<section id="v0-8-6-2022-01-09"> -<h2>v0.8.6 (2022/01/09)</h2> +<section id="id19"> +<h2>0.8.6 (2022/01/09)</h2> <ul class="simple"> -<li><p>provide a separate <code class="docutils literal notranslate"><span class="pre">polexpr-examples.pdf</span></code> with examples formerly +<li><p>Provide a separate <code class="docutils literal notranslate"><span class="pre">polexpr-examples.pdf</span></code> with examples formerly shown as part of the html documentation.</p></li> -<li><p>minor improvement to the computation of a priori bounds on real roots.</p></li> -<li><p>add <a class="reference internal" href="polexpr-ref.html#polprintintervalsrowseparator"><span class="std std-ref">\PolPrintIntervalsRowSeparator</span></a> +<li><p>Minor improvement to the computation of a priori bounds on real roots.</p></li> +<li><p>Add <a class="reference internal" href="polexpr-ref.html#polprintintervalsrowseparator"><span class="std std-ref">\PolPrintIntervalsRowSeparator</span></a> and allow usage of <code class="docutils literal notranslate"><span class="pre">amsmath</span></code> environments in custom <a class="reference internal" href="polexpr-ref.html#polprintintervalsbeginenv"><span class="std std-ref">\PolPrintIntervalsBeginEnv</span></a> and <a class="reference internal" href="polexpr-ref.html#polprintintervalsendenv"><span class="std std-ref">\PolPrintIntervalsEndEnv</span></a>.</p></li> </ul> </section> -<section id="v0-8-7-2022-05-14"> -<h2>v0.8.7 (2022/05/14)</h2> +<section id="id20"> +<h2>0.8.7 (2022/05/14)</h2> <ul class="simple"> -<li><p>bugfix: catcode sanitization by <a class="reference internal" href="polexpr-ref.html#poldef"><span class="std std-ref">\poldef</span></a> was minimal +<li><p>Bug fix: catcode sanitization by <a class="reference internal" href="polexpr-ref.html#poldef"><span class="std std-ref">\poldef</span></a> was minimal ever since <code class="docutils literal notranslate"><span class="pre">0.1</span></code> and handled only the semi-colon. Thus e.g. the active <code class="docutils literal notranslate"><span class="pre">!</span></code> from babel-french caused errors and <code class="docutils literal notranslate"><span class="pre">\string!</span></code> was needed as work-around for factorials. Now the same sanitization as for <code class="docutils literal notranslate"><span class="pre">\xintdefvar</span></code> and <code class="docutils literal notranslate"><span class="pre">\xintdeffunc</span></code> is applied. This however can only work at locations where the catcodes are not yet frozen at the time <code class="docutils literal notranslate"><span class="pre">\poldef</span></code> expands.</p></li> -<li><p>split the html documentation into three files and enhance it via CSS +<li><p>Split the html documentation into three files and enhance it via CSS styling.</p></li> </ul> </section> +<section id="a-2022-05-19"> +<h2>0.8.7a (2022/05/19)</h2> +<ul class="simple"> +<li><p>Documentation updates.</p></li> +</ul> +</section> </section> @@ -569,28 +575,29 @@ styling.</p></li> <div class="sphinxsidebarwrapper"><h3>Contents of this page</h3> <ul> <li><a class="reference internal" href="#">CHANGES</a><ul> -<li><a class="reference internal" href="#v0-1-2018-01-11-initial-release-features">v0.1 (2018/01/11): initial release. Features:</a></li> -<li><a class="reference internal" href="#v0-2-2018-01-14">v0.2 (2018/01/14)</a></li> -<li><a class="reference internal" href="#v0-3-2018-01-17">v0.3 (2018/01/17)</a></li> -<li><a class="reference internal" href="#v0-3-1-2018-01-18">v0.3.1 (2018/01/18)</a></li> -<li><a class="reference internal" href="#v0-4-2018-02-16">v0.4 (2018/02/16)</a></li> -<li><a class="reference internal" href="#v0-4-1-2018-03-01">v0.4.1 (2018/03/01)</a></li> -<li><a class="reference internal" href="#v0-4-2-2018-03-03">v0.4.2 (2018/03/03)</a></li> -<li><a class="reference internal" href="#v0-5-2018-04-08">v0.5 (2018/04/08)</a></li> -<li><a class="reference internal" href="#v0-5-1-2018-04-22">v0.5.1 (2018/04/22)</a></li> -<li><a class="reference internal" href="#v0-6-2018-11-20">v0.6 (2018/11/20)</a></li> -<li><a class="reference internal" href="#v0-7-2018-12-08-v0-7-1-bugfix-v0-7-2-2nd-bugfix-2018-12-09">v0.7 (2018/12/08), v0.7.1 (bugfix), v0.7.2 (2nd bugfix) (2018/12/09)</a></li> -<li><a class="reference internal" href="#v0-7-3-2019-02-04">v0.7.3 (2019/02/04)</a></li> -<li><a class="reference internal" href="#v0-7-4-2019-02-12">v0.7.4 (2019/02/12)</a></li> -<li><a class="reference internal" href="#v0-7-5-2020-01-31">v0.7.5 (2020/01/31)</a></li> -<li><a class="reference internal" href="#v0-8-2021-03-29">v0.8 (2021/03/29)</a></li> -<li><a class="reference internal" href="#v0-8-1-2021-04-12">v0.8.1 (2021/04/12)</a></li> -<li><a class="reference internal" href="#v0-8-2-2021-05-05">v0.8.2 (2021/05/05)</a></li> -<li><a class="reference internal" href="#v0-8-3-2021-05-27">v0.8.3 (2021/05/27)</a></li> -<li><a class="reference internal" href="#v0-8-4-2021-11-01">v0.8.4 (2021/11/01)</a></li> -<li><a class="reference internal" href="#v0-8-5-2021-11-30">v0.8.5 (2021/11/30)</a></li> -<li><a class="reference internal" href="#v0-8-6-2022-01-09">v0.8.6 (2022/01/09)</a></li> -<li><a class="reference internal" href="#v0-8-7-2022-05-14">v0.8.7 (2022/05/14)</a></li> +<li><a class="reference internal" href="#initial-release-features">0.1 (2018/01/11): initial release. Features:</a></li> +<li><a class="reference internal" href="#id1">0.2 (2018/01/14)</a></li> +<li><a class="reference internal" href="#id2">0.3 (2018/01/17)</a></li> +<li><a class="reference internal" href="#id3">0.3.1 (2018/01/18)</a></li> +<li><a class="reference internal" href="#id4">0.4 (2018/02/16)</a></li> +<li><a class="reference internal" href="#id5">0.4.1 (2018/03/01)</a></li> +<li><a class="reference internal" href="#id6">0.4.2 (2018/03/03)</a></li> +<li><a class="reference internal" href="#id7">0.5 (2018/04/08)</a></li> +<li><a class="reference internal" href="#id8">0.5.1 (2018/04/22)</a></li> +<li><a class="reference internal" href="#id9">0.6 (2018/11/20)</a></li> +<li><a class="reference internal" href="#bugfix-0-7-2-2nd-bugfix-2018-12-09">0.7 (2018/12/08), 0.7.1 (bugfix), 0.7.2 (2nd bugfix) (2018/12/09)</a></li> +<li><a class="reference internal" href="#id10">0.7.3 (2019/02/04)</a></li> +<li><a class="reference internal" href="#id11">0.7.4 (2019/02/12)</a></li> +<li><a class="reference internal" href="#id12">0.7.5 (2020/01/31)</a></li> +<li><a class="reference internal" href="#polexpr08release">0.8 (2021/03/29)</a></li> +<li><a class="reference internal" href="#id14">0.8.1 (2021/04/12)</a></li> +<li><a class="reference internal" href="#id15">0.8.2 (2021/05/05)</a></li> +<li><a class="reference internal" href="#id16">0.8.3 (2021/05/27)</a></li> +<li><a class="reference internal" href="#id17">0.8.4 (2021/11/01)</a></li> +<li><a class="reference internal" href="#id18">0.8.5 (2021/11/30)</a></li> +<li><a class="reference internal" href="#id19">0.8.6 (2022/01/09)</a></li> +<li><a class="reference internal" href="#id20">0.8.7 (2022/05/14)</a></li> +<li><a class="reference internal" href="#a-2022-05-19">0.8.7a (2022/05/19)</a></li> </ul> </li> </ul> @@ -617,7 +624,7 @@ styling.</p></li> <li class="right" style="margin-right: 10px"> <a href="polexpr-ref.html" title="polexpr reference" >previous</a></li> - <li class="nav-item nav-item-0"><a href="polexpr.html">polexpr 0.8.7 documentation</a> »</li> + <li class="nav-item nav-item-0"><a href="polexpr.html">polexpr 0.8.7a documentation</a> »</li> <li class="nav-item nav-item-this"><a href="">CHANGES</a></li> </ul> </div> diff --git a/macros/generic/polexpr/polexpr-changes.rst.txt b/macros/generic/polexpr/polexpr-changes.rst.txt index c1f2c834ec..5ecc66f5f5 100644 --- a/macros/generic/polexpr/polexpr-changes.rst.txt +++ b/macros/generic/polexpr/polexpr-changes.rst.txt @@ -6,8 +6,8 @@ .. _firstrelease: -v0.1 (2018/01/11): initial release. Features: ---------------------------------------------- +0.1 (2018/01/11): initial release. Features: +-------------------------------------------- * The :ref:`\\poldef <poldef;>` parser itself, * Differentiation and anti-differentiation, @@ -18,8 +18,8 @@ v0.1 (2018/01/11): initial release. Features: Only one-variable polynomials so far. -v0.2 (2018/01/14) ------------------ +0.2 (2018/01/14) +---------------- * Fix: ``"README thinks \numexpr recognizes ^ operator"``. * Convert README to reStructuredText markup. @@ -30,18 +30,18 @@ v0.2 (2018/01/14) Due to lack of available time the test suite might not be extensive enough. Bug reports are very welcome! -v0.3 (2018/01/17) ------------------ +0.3 (2018/01/17) +---------------- -* bug fixes: +* Bug fixes: - - the ``0.1`` :ref:`\\PolEval <PolEvalAt>` accepted expressions for its + - The ``0.1`` :ref:`\\PolEval <PolEvalAt>` accepted expressions for its second argument, but this was removed by mistake at ``0.2``. Restored. **Attention**: at ``0.4`` this has been reverted again, and :ref:`\\PolEval{P}\\AtExpr{foo} <PolEvalAtExpr>` syntax is needed for using expressions in the second argument. -* incompatible or breaking changes: +* Incompatible or breaking changes: - :ref:`\\PolToExpr <PolToExpr>` now by default uses *descending* powers (it also treats differently coefficients equal to 1 or -1.) @@ -51,7 +51,7 @@ v0.3 (2018/01/17) wrapped in an ``\xintRound`` or ``\xintFloat``, this step has been removed; the former meaning is available as :ref:`\\PolEvalReduced <PolEvalReducedAt>`. -* new (or newly documented) macros: +* New (or newly documented) macros: - :ref:`\\PolTypesetCmd <PolTypesetCmd>` - :ref:`\\PolTypesetCmdPrefix <PolTypesetCmdPrefix>` @@ -65,11 +65,11 @@ v0.3 (2018/01/17) - :ref:`\\PolToExprTermPrefix <PolToExprTermPrefix>` - :ref:`\\PolToExprVar <PolToExprVar>` - :ref:`\\PolToExprTimes <PolToExprTimes>` -* improvements: +* Improvements: - - documentation has a table of contents, internal hyperlinks, + - Documentation has a table of contents, internal hyperlinks, standardized signature notations and added explanations. - - one can do ``\PolLet{g}={f}`` or ``\PolLet{g}{f}``. + - One can do ``\PolLet{g}={f}`` or ``\PolLet{g}{f}``. - ``\PolToExpr{f}`` is highly customizable. - :ref:`\\poldef <poldef;>` and other defining macros prepare the polynomial functions for usage within ``\xintthefloatexpr`` (or @@ -82,25 +82,25 @@ v0.3 (2018/01/17) :ref:`\\PolGenFloatVariant <PolGenFloatVariant>` must be used for generation floating point polynomial functions. -v0.3.1 (2018/01/18) -------------------- +0.3.1 (2018/01/18) +------------------ Fixes two typos in example code included in the documentation. -v0.4 (2018/02/16) ------------------ +0.4 (2018/02/16) +---------------- -* bug fixes: +* Bug fixes: - - when Euclidean division gave a zero remainder, the internal + - When Euclidean division gave a zero remainder, the internal representation of this zero polynomial could be faulty; this could cause mysterious bugs in conjunction with other package macros such as :ref:`\\PolMapCoeffs <PolMapCoeffs>`. - :ref:`\\PolGCD <PolGCD>` was buggy in case of first polynomial being of lesser degree than the second one. -* breaking changes: +* Breaking changes: - - formerly :ref:`\\PolEval{P}\\At{foo} <PolEvalAt>` allowed ``foo`` to + - Formerly :ref:`\\PolEval{P}\\At{foo} <PolEvalAt>` allowed ``foo`` to be an expression, which was transparently handled via ``\xinttheexpr``. Now, ``foo`` must be a fraction (or a macro expanding to such) in the format acceptable by ``xintfrac.sty`` @@ -110,13 +110,13 @@ v0.4 (2018/02/16) The same holds for :ref:`\\PolEvalReduced <PolEvalReducedAt>` and :ref:`\\PolFloatEval <PolFloatEvalAt>`. - - the ``3.0`` automatic generation of floating point variants has + - The ``3.0`` automatic generation of floating point variants has been reverted. Not only do *not* the package macros automatically generate floating point variants of newly created polynomials, they actually make pre-existing such variant undefined. See :ref:`\\PolGenFloatVariant <PolGenFloatVariant>`. -* new non-expandable macros: +* New non-expandable macros: - :ref:`\\PolGenFloatVariant <PolGenFloatVariant>` - :ref:`\\PolGlobalLet <PolGlobalLet>` @@ -138,7 +138,7 @@ v0.4 (2018/02/16) - :ref:`\\PolPrintIntervalsPrintRightEndPoint <PolPrintIntervalsPrintRightEndPoint>` - :ref:`\\PolReduceCoeffs* <PolReduceCoeffs*>` - :ref:`\\PolMakeMonic <PolMakeMonic>` -* new expandable macros: +* New expandable macros: - :ref:`\\PolToExprOneTermStyleA <PolToExprOneTermStyleA>` - :ref:`\\PolIfCoeffIsPlusOrMinusOne <PolIfCoeffIsPlusOrMinusOne>` @@ -155,80 +155,80 @@ v0.4 (2018/02/16) - ``\PolIfEndPointIsZero`` (removed at 0.7) - :ref:`\\PolIntervalWidth <PolIntervalWidth>` - :ref:`\\PolDecToString <PolDecToString>` -* improvements: +* Improvements: The main new feature is implementation of the `Sturm algorithm`_ for localization of the real roots of polynomials. -v0.4.1 (2018/03/01) -------------------- +0.4.1 (2018/03/01) +------------------ Synced with xint 1.3. -v0.4.2 (2018/03/03) -------------------- +0.4.2 (2018/03/03) +------------------ Documentation fix. -v0.5 (2018/04/08) ------------------ +0.5 (2018/04/08) +---------------- -* bug fixes: +* Bug fix: - :ref:`\\PolGet{polname}\\fromarray\\macro <PolGet>` crashed when ``\macro`` was an xinttools_ array macro with no items. It now produces the zero polynomial. -* breaking changes: +* Breaking changes: - :ref:`\\PolToSturm <PolToSturm>` creates primitive integer coefficients polynomials. This speeds up localization of roots via :ref:`\\PolSturmIsolateZeros <PolSturmIsolateZeros>`. In case of user protests the author will make available again the code producing the bona fide Sturm polynomials as used formerly. - - polynomials created from :ref:`\\PolFromCSV <PolFromCSV>` or + - Polynomials created from :ref:`\\PolFromCSV <PolFromCSV>` or :ref:`\\PolGet <PolGet>` get their coefficients normalized via xintfrac_\ 's ``\xintRaw``. -* experimental change: +* Experimental change: - - optional argument to :ref:`\\PolSturmIsolateZeros <PolSturmIsolateZeros>` + - Optional argument to :ref:`\\PolSturmIsolateZeros <PolSturmIsolateZeros>` (see ``The degree 41 polynomial with -2, -1.9, -1.8, ..., 0, 0.1, ..., 1.9, 2 as roots`` in ``polexpr-examples.pdf``). It will presumably be replaced in future by an interval specification. -* new non-expandable macro: +* New non-expandable macro: - :ref:`\\PolMakePrimitive <PolMakePrimitive>` -* new expandable macro: +* New expandable macro: - :ref:`\\PolIContent <PolIContent>` -v0.5.1 (2018/04/22) -------------------- +0.5.1 (2018/04/22) +------------------ -* new feature: +* New feature: - - the character ``'`` can be used in polynomial names. + - The character ``'`` can be used in polynomial names. -v0.6 (2018/11/20) ------------------ +0.6 (2018/11/20) +---------------- -* bugfix: +* Bug fixes: - - the starred variant + - The starred variant :ref:`\\PolToSturm*{\<polname\>}{\<sturmname\>} <PolToSturm*>` was broken. On the occasion of the fix, its meaning has been modified, see its documentation. - - using :ref:`\\PolToSturm <PolToSturm>` with a constant polynomial + - Using :ref:`\\PolToSturm <PolToSturm>` with a constant polynomial caused a division by zero error. -* new macro: +* New macro: - :ref:`\\PolSturmIsolateZeros* <PolSturmIsolateZeros*>` acts like the :ref:`non-starred variant <PolSturmIsolateZeros>` then computes all the multiplicities. -* new expandable macros: +* New expandable macros: - :ref:`\\PolSturmIsolatedZeroMultiplicity{\<sturmname\>}{\<index\>} <PolSturmIsolatedZeroMultiplicity>` - :ref:`\\PolSturmNbOfRootsOf{\<sturmname\>}\\LessThanOrEqualTo{\<value\>} <PolSturmNbOfRootsOfLessThanOrEqualTo>` @@ -236,21 +236,21 @@ v0.6 (2018/11/20) - :ref:`\\PolSturmNbWithMultOfRootsOf{\<sturmname\>}\\LessThanOrEqualTo{\<value\>} <PolSturmNbWithMultOfRootsOfLessThanOrEqualTo>` - :ref:`\\PolSturmNbWithMultOfRootsOf{\<sturmname\>}\\LessThanOrEqualToExpr{\<num. expr.\>} <PolSturmNbWithMultOfRootsOfLessThanOrEqualToExpr>` -v0.7 (2018/12/08), v0.7.1 (bugfix), v0.7.2 (2nd bugfix) (2018/12/09) --------------------------------------------------------------------- +0.7 (2018/12/08), 0.7.1 (bugfix), 0.7.2 (2nd bugfix) (2018/12/09) +----------------------------------------------------------------- -* breaking changes: +* Breaking changes: - - although :ref:`\\PolPrintIntervals[\<varname\>]{\<sturmname\>} <PolPrintIntervals>` default output + - Although :ref:`\\PolPrintIntervals[\<varname\>]{\<sturmname\>} <PolPrintIntervals>` default output remains the same, some auxiliary macros for user-customization have been removed: ``\PolPrintIntervalsTheEndPoint``, ``\PolIfEndPointIsPositive{T}{F}``, ``\PolIfEndPointIsNegative{T}{F}``, and ``\PolIfEndPointIsZero{T}{F}``. -* bugfix: +* Bug fixes: - - it could happen that, contrarily to documentation, an interval computed + - It could happen that, contrarily to documentation, an interval computed by :ref:`\\PolSturmIsolateZeros{\<sturmname\>} <PolSturmIsolateZeros>` had zero as an endpoint, - :ref:`\\PolEnsureIntervalLength{\<sturmname\>}{\<index\>}{\<exponent\>} @@ -261,7 +261,7 @@ v0.7 (2018/12/08), v0.7.1 (bugfix), v0.7.2 (2nd bugfix) (2018/12/09) real roots, hence for which no isolation intervals existed (thanks to Thomas Söll for report). -* new macros: +* New macros: - :ref:`\\PolSturmIsolateZeros**{\<sturmname\>} <PolSturmIsolateZeros**>` - :ref:`\\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots{\<sturmname\>} <PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots>` @@ -275,7 +275,7 @@ v0.7 (2018/12/08), v0.7.1 (bugfix), v0.7.2 (2nd bugfix) (2018/12/09) - :ref:`\\PolPrintIntervalsUnknownRoot <PolPrintIntervalsUnknownRoot>` - :ref:`\\PolPrintIntervalsPrintMultiplicity <PolPrintIntervalsPrintMultiplicity>` -* new expandable macros: +* New expandable macros: - :ref:`\\PolSturmNbOfRationalRoots{\<sturmname\>} <PolSturmNbOfRationalRoots>` - :ref:`\\PolSturmNbOfRationalRootsWithMultiplicities{\<sturmname\>} <PolSturmNbOfRationalRootsWithMultiplicities>` @@ -286,10 +286,10 @@ v0.7 (2018/12/08), v0.7.1 (bugfix), v0.7.2 (2nd bugfix) (2018/12/09) - :ref:`\\PolPrintIntervalsTheSturmName <PolPrintIntervalsTheSturmName>` - :ref:`\\PolPrintIntervalsTheMultiplicity <PolPrintIntervalsTheMultiplicity>` -v0.7.3 (2019/02/04) -------------------- +0.7.3 (2019/02/04) +------------------ -* bugfix: +* Bug fixes: - Debugging information not destined to user showed in log if root finding was done under ``\xintverbosetrue`` regime. @@ -302,27 +302,27 @@ v0.7.3 (2019/02/04) - Polynomial names ending in digits caused errors (reported by Thomas Söll). -v0.7.4 (2019/02/12) -------------------- +0.7.4 (2019/02/12) +------------------ -* bugfix: +* Bug fix: - 20000000000 is too big for ``\numexpr``, shouldn't I know that? Thanks to Jürgen Gilg for report. -v0.7.5 (2020/01/31) -------------------- +0.7.5 (2020/01/31) +------------------ Synced with xintexpr 1.4. Requires it. .. _polexpr08release: -v0.8 (2021/03/29) ------------------ +0.8 (2021/03/29) +---------------- Synced with xintexpr 1.4d. Requires it. -* breaking changes: +* Breaking changes: - As the usability of character ``'`` in names has been extended from ``\poldef`` to also generally ``\xintexpr``, ``\xintdefvar``, @@ -336,12 +336,12 @@ Synced with xintexpr 1.4d. Requires it. ``^``. See its documentation and the new configuration :ref:`\\PolToExprCaret <PolToExprCaret>`. -* deprecated: +* Deprecated: - Usage of ``P/Q`` for the euclidean quotient of two polynomials is deprecated. Start using ``quo(P,Q)`` in its place. -* bugfix: +* Bug fixes: - The ``\xintglobaldefstrue`` setting was obeyed only partially by the polexpr macros defining polynomials. @@ -358,17 +358,17 @@ Synced with xintexpr 1.4d. Requires it. extended possibilities for xintexpr 1.4 user-declared functions. Hopefully ``0.8`` achieves full functionality in this context. -* new macros: +* New macros: - :ref:`\\polnewpolverbosefalse <polnewpolverbosefalse>` - :ref:`\\PolToExprCaret <PolToExprCaret>` - :ref:`\\PolToExprInVar <PolToExprInVar>` - - alongside the major new functionalities described in the next item + - Alongside the major new functionalities described in the next item :ref:`\\PolTypeset <PolTypeset>` and :ref:`\\PolToExpr <PolToExpr>` have been enhanced to accept as argument a general expression and not only a pre-declared polynomial name. -* new features: +* New features: - The package is usable under Plain and probably most any TeX format, and not only under LaTeX. @@ -392,15 +392,15 @@ Synced with xintexpr 1.4d. Requires it. See the updated :ref:`Quick syntax overview <quick>` and then :ref:`the extended syntax description <polexpr08>`. -v0.8.1 (2021/04/12) -------------------- +0.8.1 (2021/04/12) +------------------ -* breaking changes: +* Breaking changes: - - renamed v0.8's ``icontent()`` to :ref:`cont() <cont>`. - - renamed v0.8's ``lcoeff()`` to :ref:`lc() <lc>`. + - Renamed 0.8's ``icontent()`` to :ref:`cont() <cont>`. + - Renamed 0.8's ``lcoeff()`` to :ref:`lc() <lc>`. -* bugfix: +* Bug fixes: - Sadly, ``diff1()``, ``diff2()``, ``diffn()`` were broken for polynomials of degrees 8 or more, due to a typo and @@ -415,20 +415,20 @@ v0.8.1 (2021/04/12) was broken by an end-of-line space, left-over from mass conversion from LaTeX to TeX syntax. -* added: +* Added: - :ref:`lpol() <lpol>` - :ref:`lcoeffs() <lcoeffs>` -v0.8.2 (2021/05/05) -------------------- +0.8.2 (2021/05/05) +------------------ -* breaking change: +* Breaking change: - - usage of ``\xintPFloat`` in place of ``\xintFloat`` for + - Usage of ``\xintPFloat`` in place of ``\xintFloat`` for :ref:`\\PolToFloatExprCmd <PolToFloatExprCmd>`. -* improved: +* Improved: - Some xintexpr_ functions such as ``rseq()`` use the semi-colon, and it was mentioned in the documentation that :ref:`\\poldef <poldef;>` @@ -438,49 +438,49 @@ v0.8.2 (2021/05/05) this work-around. With this relase only :ref:`\\poldef <poldef;>` but not :ref:`\\PolDef <PolDef>` needs the work-around. -* track xintexpr_ ``1.4e`` changes relative to powers. +* Track xintexpr_ ``1.4e`` changes relative to powers. -v0.8.3 (2021/05/27) -------------------- +0.8.3 (2021/05/27) +------------------ -* small internal update to track an xintexpr_ ``1.4h`` change +* Small internal update to track an xintexpr_ ``1.4h`` change regarding handling of exceptions. Will require this version at least on loading. -v0.8.4 (2021/11/01) -------------------- +0.8.4 (2021/11/01) +------------------ -* bugfix: :ref:`\\PolSturmIsolateZeros**{\<sturmname\>} +* Bug fix: :ref:`\\PolSturmIsolateZeros**{\<sturmname\>} <PolSturmIsolateZeros**>` did not declare the ``<sturmname>_norr`` and ``<sturmname>_sqf_norr`` polynomials if original polynomial had no real root! -v0.8.5 (2021/11/30) -------------------- +0.8.5 (2021/11/30) +------------------ -* bugfix: support for the ``intfrom()`` function was in the code, +* Bug fix: support for the ``intfrom()`` function was in the code, but the declaration to the polynomial parser had not been done. -* track (belatedly) upstream deprecation of ``\xintSignedFrac`` and +* Track (belatedly) upstream deprecation of ``\xintSignedFrac`` and ``\xintSignedFwOver`` at xintexpr_ ``1.4g`` -v0.8.6 (2022/01/09) -------------------- +0.8.6 (2022/01/09) +------------------ -* provide a separate ``polexpr-examples.pdf`` with examples formerly +* Provide a separate ``polexpr-examples.pdf`` with examples formerly shown as part of the html documentation. -* minor improvement to the computation of a priori bounds on real roots. +* Minor improvement to the computation of a priori bounds on real roots. -* add :ref:`\\PolPrintIntervalsRowSeparator <PolPrintIntervalsRowSeparator>` +* Add :ref:`\\PolPrintIntervalsRowSeparator <PolPrintIntervalsRowSeparator>` and allow usage of ``amsmath`` environments in custom :ref:`\\PolPrintIntervalsBeginEnv <PolPrintIntervalsBeginEnv>` and :ref:`\\PolPrintIntervalsEndEnv <PolPrintIntervalsEndEnv>`. -v0.8.7 (2022/05/14) -------------------- +0.8.7 (2022/05/14) +------------------ -* bugfix: catcode sanitization by :ref:`\\poldef <poldef;>` was minimal +* Bug fix: catcode sanitization by :ref:`\\poldef <poldef;>` was minimal ever since ``0.1`` and handled only the semi-colon. Thus e.g. the active ``!`` from babel-french caused errors and ``\string!`` was needed as work-around for factorials. Now the same sanitization as @@ -488,9 +488,14 @@ v0.8.7 (2022/05/14) only work at locations where the catcodes are not yet frozen at the time ``\poldef`` expands. -* split the html documentation into three files and enhance it via CSS +* Split the html documentation into three files and enhance it via CSS styling. +0.8.7a (2022/05/19) +------------------- + +* Documentation updates. + .. _xinttools: .. _xintfrac: diff --git a/macros/generic/polexpr/polexpr-examples.pdf b/macros/generic/polexpr/polexpr-examples.pdf Binary files differindex 5be0a95a42..943e251c82 100644 --- a/macros/generic/polexpr/polexpr-examples.pdf +++ b/macros/generic/polexpr/polexpr-examples.pdf diff --git a/macros/generic/polexpr/polexpr-ref.html b/macros/generic/polexpr/polexpr-ref.html index 9f3767c48d..7f1b54b749 100644 --- a/macros/generic/polexpr/polexpr-ref.html +++ b/macros/generic/polexpr/polexpr-ref.html @@ -6,7 +6,7 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" /> - <title>polexpr reference — polexpr 0.8.7 documentation</title> + <title>polexpr reference — polexpr 0.8.7a documentation</title> <link rel="stylesheet" type="text/css" href="polexpr.css" /> <link rel="next" title="CHANGES" href="polexpr-changes.html" /> <link rel="prev" title="Introduction to polexpr" href="polexpr.html" /> @@ -20,7 +20,7 @@ <li class="right" > <a href="polexpr.html" title="Introduction to polexpr" accesskey="P">previous</a> |</li> - <li class="nav-item nav-item-0"><a href="polexpr.html">polexpr 0.8.7 documentation</a> »</li> + <li class="nav-item nav-item-0"><a href="polexpr.html">polexpr 0.8.7a documentation</a> »</li> <li class="nav-item nav-item-this"><a href="">polexpr reference</a></li> </ul> </div> @@ -49,18 +49,15 @@ and, so far (but this may change in future) neither does <a class="reference int See <a class="reference internal" href="#rdcoeffs"><span class="std std-ref">rdcoeffs()</span></a> and the macro <a class="reference internal" href="#polreducecoeffs"><span class="std std-ref">\PolReduceCoeffs</span></a>.</p> </div> -<ul class="simple"> +<ul> <li><p>In place of <code class="docutils literal notranslate"><span class="pre">x</span></code> an arbitrary <em>dummy variable</em> is authorized, i.e. per default one <code class="docutils literal notranslate"><span class="pre">a,</span> <span class="pre">..,</span> <span class="pre">z,</span> <span class="pre">A,</span> <span class="pre">..,</span> <span class="pre">Z</span></code> (more letters can be declared under Unicode engines).</p></li> -<li><p><code class="docutils literal notranslate"><span class="pre">polname</span></code> consists of <em>letters</em>, <em>digits</em>, and also the <code class="docutils literal notranslate"><span class="pre">_</span></code> and -<code class="docutils literal notranslate"><span class="pre">'</span></code> characters are allowed. The polynomial name <strong>must</strong> start with -a letter: do not use the underscore <code class="docutils literal notranslate"><span class="pre">_</span></code> as <em>first character</em> of a -polynomial name (even if of catcode letter). No warning is emitted -but dire consequences will ensue. The <code class="docutils literal notranslate"><span class="pre">@</span></code> is also allowed -(independently of its catcode “letter” or “other”, which does not -matter). It is recommended to avoid using it as first character, -except for temporary polynomial variables.</p></li> +<li><p><code class="docutils literal notranslate"><span class="pre">polname</span></code> is a word (no space) built with <em>letters</em>, <em>digits</em>, and +the <code class="docutils literal notranslate"><span class="pre">@</span></code>, <code class="docutils literal notranslate"><span class="pre">_</span></code> and <code class="docutils literal notranslate"><span class="pre">'</span></code> characters are allowed. The polynomial +name <strong>must</strong> start with a letter.</p> +<p>For guidelines regarding <code class="docutils literal notranslate"><span class="pre">_</span></code> and <code class="docutils literal notranslate"><span class="pre">@</span></code> see <a class="reference internal" href="#technicalities">Technicalities</a>.</p> +</li> <li><p>The colon before the equality sign is optional and its (reasonable) catcode does not matter.</p></li> <li><p>The semi-colon at the end of the expression is mandatory. It is not @@ -248,7 +245,7 @@ coefficients.</p> <p>This is useful for console or file output. This syntax is Maple and PSTricks <code class="docutils literal notranslate"><span class="pre">\psplot[algebraic]</span></code> compatible; and also it is compatible with <code class="docutils literal notranslate"><span class="pre">\poldef</span></code> input syntax, of course. See -<a class="reference internal" href="#id69">\PolToExprCaret</a> for configuration of the <code class="docutils literal notranslate"><span class="pre">^</span></code>, for example to +<a class="reference internal" href="#id70">\PolToExprCaret</a> for configuration of the <code class="docutils literal notranslate"><span class="pre">^</span></code>, for example to use rather <code class="docutils literal notranslate"><span class="pre">**</span></code> for Python syntax compliance.</p> <p>Changed at <code class="docutils literal notranslate"><span class="pre">0.8</span></code>: the <code class="docutils literal notranslate"><span class="pre">^</span></code> in output is by default of catcode 12 so in a draft document one can use <code class="docutils literal notranslate"><span class="pre">\PolToExpr{P}</span></code> inside the @@ -966,7 +963,8 @@ coefficients in a private structure accessible later via other package macros, used with argument <code class="docutils literal notranslate"><span class="pre">polname</span></code>. Of course the <em>expression</em> can make use of previously defined polynomials.</p> <p>Polynomial names must start with a letter and are constituted of -letters, digits, underscores and the right tick <code class="docutils literal notranslate"><span class="pre">'</span></code>.</p> +letters, digits, underscores, the <code class="docutils literal notranslate"><span class="pre">@</span></code> (see <a class="reference internal" href="#technicalities">Technicalities</a>) and +the right tick <code class="docutils literal notranslate"><span class="pre">'</span></code>.</p> <p>The whole <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> syntax is authorized, as long as the final result is of polynomial type:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\poldef</span> polname(z) := add((-1)<span class="nb">^</span>i z<span class="nb">^</span>(2i+1)/(2i+1)!, i = 0..10); @@ -983,16 +981,16 @@ as well as in <code class="docutils literal notranslate"><span class="pre">\xint and also other polynomials (via their names, thanks to previous item).</p></li> </ul> -<p>Notice that any function defined via <code class="docutils literal notranslate"><span class="pre">\xintdeffunc</span></code> and using -only algebraic operations (and ople indexing or slicing operations) -should work fine in <code class="docutils literal notranslate"><span class="pre">\xintexpr/\xinteval</span></code> with such polynomial -names as argument.</p> -<p>In the case of a constant polynomial, the <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> variable (not the -internal data structure on which the package macros operate) +<p>Any function defined via <code class="docutils literal notranslate"><span class="pre">\xintdeffunc</span></code> and only algebraic +operations, as well as ople indexing or slicing operations, should +work fine in <code class="docutils literal notranslate"><span class="pre">\xintexpr/\xinteval</span></code> with such polynomial names as +argument.</p> +<p>In the case of a constant polynomial, the <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <em>variable</em> (not +the internal data structure on which the package macros operate) associated to it is indistinguishable from a scalar, it is actually a scalar and has lost all traces from its origins as a polynomial -(so for example can be used as argument to the <code class="docutils literal notranslate"><span class="pre">cos()</span></code> function).</p> -<p>The <em>function</em> on the other hand remains a one-argument function, +(so for example can be used as argument to the <code class="docutils literal notranslate"><span class="pre">cos()</span></code> function). +The <em>function</em> on the other hand remains a one-argument function, which simply has a constant value.</p> <div class="admonition attention"> <p class="admonition-title">Attention</p> @@ -1001,7 +999,7 @@ which simply has a constant value.</p> context. It will be unknown to <code class="docutils literal notranslate"><span class="pre">\xintfloateval</span></code>.</p> <p>Worse, a previously existing floating point function of the same name will -be let undefined again, to avoid hard to debug mismatches between +be made undefined again, to avoid hard to debug mismatches between exact and floating point polynomials. This also applies when the polynomial is produced not via <code class="docutils literal notranslate"><span class="pre">\poldef</span></code> or <code class="docutils literal notranslate"><span class="pre">\PolDef</span></code> but as result of usage of the other package macros.</p> @@ -1058,18 +1056,18 @@ the new polynomial is to be used in <code class="docutils literal notranslate">< </div></blockquote> </section> <section id="poltypeset"> -<span id="id7"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolTypeset{}</span></code></h3> -<p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolTypeset{<pol.</span> <span class="pre">expr.>}</span></code></p> +<span id="id7"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolTypeset[]{}</span></code></h3> +<p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolTypeset[<letter>]{<pol.</span> <span class="pre">expr.>}</span></code></p> <blockquote> <div><p>Typesets in descending powers, switching to math mode if in text mode, after evaluating the polynomial expression:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\PolTypeset</span><span class="nb">{</span>mul(x-i,i=1..5)<span class="nb">}</span><span class="c">% possible since polexpr 0.8</span> </pre></div> </div> -<p>The letter used in the input expression is by default <code class="docutils literal notranslate"><span class="pre">x</span></code>, -but can be modified by a redefinition of <a class="reference internal" href="#id67">\PolToExprInVar</a>.</p> -<p>It uses also by default the letter <code class="docutils literal notranslate"><span class="pre">x</span></code> on output but this one can -be changed via an optional argument:</p> +<p>The letter used in the input is by default assumed to be <code class="docutils literal notranslate"><span class="pre">x</span></code>, +but can be modified by a redefinition of <a class="reference internal" href="#id68">\PolToExprInVar</a>.</p> +<p>The letter used in the output is also by default <code class="docutils literal notranslate"><span class="pre">x</span></code>. This one +can be changed on-the-fly via the optional <code class="docutils literal notranslate"><span class="pre"><letter></span></code>:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\PolTypeset</span><span class="na">[z]</span><span class="nb">{</span>polname or polynomial expression<span class="nb">}</span> </pre></div> </div> @@ -1148,18 +1146,19 @@ separator in the typeset formula. Not used for the first term.</p> </section> </section> <section id="id13"> -<span id="id14"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolTypeset*{}</span></code></h3> -<p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolTypeset*{<pol.</span> <span class="pre">expr.>}</span></code></p> +<span id="id14"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolTypeset*[]{}</span></code></h3> +<p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolTypeset*[<letter>]{<pol.</span> <span class="pre">expr.>}</span></code></p> <blockquote> -<div><p>Typesets in ascending powers. Use <code class="docutils literal notranslate"><span class="pre">[<letter>]</span></code> optional argument -(after the <code class="docutils literal notranslate"><span class="pre">*</span></code>) to use another letter than <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p> +<div><p>Typesets in ascending powers. The <code class="docutils literal notranslate"><span class="pre"><letter></span></code> optional argument +(after the <code class="docutils literal notranslate"><span class="pre">*</span></code>) declares the letter to use in the <em>output</em>. +As for <a class="reference external" href="PolTypeset">\PolTypeset</a>, it defaults to <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p> +<p>To modify the expected <code class="docutils literal notranslate"><span class="pre">x</span></code> in the <em>input</em>, see <a class="reference internal" href="#id68">\PolToExprInVar</a>.</p> <p>Extended at <code class="docutils literal notranslate"><span class="pre">0.8</span></code> to accept general expressions and not only -polynomial names. Redefine <a class="reference internal" href="#id67">\PolToExprInVar</a> to use in the -expression another letter than default <code class="docutils literal notranslate"><span class="pre">x</span></code>.</p> +polynomial names.</p> </div></blockquote> </section> <section id="pollet"> -<span id="id15"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolLet{}={}</span></code></h3> +<span id="id16"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolLet{}={}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolLet{<polname_2>}={<polname_1>}</span></code></p> <blockquote> <div><p>Makes a copy of the already defined polynomial <code class="docutils literal notranslate"><span class="pre">polname_1</span></code> to a @@ -1170,7 +1169,7 @@ new one <code class="docutils literal notranslate"><span class="pre">polname_2</ </div></blockquote> </section> <section id="polgloballet"> -<span id="id16"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolGlobalLet{}={}</span></code></h3> +<span id="id17"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolGlobalLet{}={}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolGlobalLet{<polname_2>}={<polname_1>}</span></code></p> <blockquote> <div><p>Acts globally.</p> @@ -1212,7 +1211,7 @@ via <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac< </div></blockquote> </section> <section id="polfromcsv"> -<span id="id17"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolFromCSV{}{}</span></code></h3> +<span id="id18"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolFromCSV{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolFromCSV{<polname>}{<csv>}</span></code></p> <blockquote> <div><p>Defines a polynomial directly from the comma separated list of values @@ -1230,7 +1229,7 @@ form via <a class="reference external" href="https://www.ctan.org/pkg/xint">xint </div></blockquote> </section> <section id="polmapcoeffs"> -<span id="id18"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolMapCoeffs{}{}</span></code></h3> +<span id="id19"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolMapCoeffs{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolMapCoeffs{\macro}{<polname>}</span></code></p> <blockquote> <div><p>It modifies (‘in-place’: original coefficients get lost) each @@ -1251,15 +1250,15 @@ expressed in terms of macros from the <a class="reference external" href="https: </div></blockquote> </section> <section id="polreducecoeffs"> -<span id="id19"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs{}</span></code></h3> +<span id="id20"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs{<polname>}</span></code></p> <blockquote> <div><p>Reduces the internal representations of the coefficients to their lowest terms.</p> </div></blockquote> </section> -<section id="id20"> -<span id="id21"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs*{}</span></code></h3> +<section id="id21"> +<span id="id22"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs*{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs*{<polname>}</span></code></p> <blockquote> <div><p>Reduces the internal representations of the coefficients to their @@ -1275,18 +1274,18 @@ remain generally smaller.</p> </div></blockquote> </section> <section id="polmakemonic"> -<span id="id22"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolMakeMonic{}</span></code></h3> +<span id="id23"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolMakeMonic{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolMakeMonic{<polname>}</span></code></p> <blockquote> <div><p>Divides by the leading coefficient. It is recommended to execute -<a class="reference internal" href="#id20"><span class="std std-ref">\PolReduceCoeffs*{<polname>}</span></a> immediately afterwards. This is not +<a class="reference internal" href="#id21"><span class="std std-ref">\PolReduceCoeffs*{<polname>}</span></a> immediately afterwards. This is not done automatically, in case the original polynomial had integer coefficients and the user wants to keep the leading one as common denominator for typesetting purposes.</p> </div></blockquote> </section> <section id="polmakeprimitive"> -<span id="id23"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolMakePrimitive{}</span></code></h3> +<span id="id24"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolMakePrimitive{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolMakePrimitive{<polname>}</span></code></p> <blockquote> <div><p>Divides by the integer content see (<a class="reference internal" href="#policontent">\PolIContent</a>). @@ -1296,7 +1295,7 @@ coefficient is not modified.</p> </div></blockquote> </section> <section id="poldiff"> -<span id="id24"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDiff{}{}</span></code></h3> +<span id="id25"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDiff{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolDiff{<polname_1>}{<polname_2>}</span></code></p> <blockquote> <div><p>This sets <code class="docutils literal notranslate"><span class="pre">polname_2</span></code> to the first derivative of <code class="docutils literal notranslate"><span class="pre">polname_1</span></code>. It @@ -1306,8 +1305,8 @@ by <code class="docutils literal notranslate"><span class="pre">f'</span></code> (see <a class="reference internal" href="#technicalities">Technicalities</a> for the whole story.)</p> </div></blockquote> </section> -<section id="id25"> -<span id="id26"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDiff[]{}{}</span></code></h3> +<section id="id26"> +<span id="id27"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDiff[]{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolDiff[N]{<polname_1>}{<polname_2>}</span></code></p> <blockquote> <div><p>This sets <code class="docutils literal notranslate"><span class="pre">polname_2</span></code> to the <code class="docutils literal notranslate"><span class="pre">N</span></code>-th derivative of <code class="docutils literal notranslate"><span class="pre">polname_1</span></code>. @@ -1317,7 +1316,7 @@ using <code class="docutils literal notranslate"><span class="pre">\PolAntiDiff< </div></blockquote> </section> <section id="polantidiff"> -<span id="id27"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolAntiDiff{}{}</span></code></h3> +<span id="id28"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolAntiDiff{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolAntiDiff{<polname_1>}{<polname_2>}</span></code></p> <blockquote> <div><p>This sets <code class="docutils literal notranslate"><span class="pre">polname_2</span></code> to the primitive of <code class="docutils literal notranslate"><span class="pre">polname_1</span></code> vanishing @@ -1326,8 +1325,8 @@ at zero.</p> (see <a class="reference internal" href="#technicalities">Technicalities</a> for the whole story.)</p> </div></blockquote> </section> -<section id="id28"> -<span id="id29"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolAntiDiff[]{}{}</span></code></h3> +<section id="id29"> +<span id="id30"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolAntiDiff[]{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolAntiDiff[N]{<polname_1>}{<polname_2>}</span></code></p> <blockquote> <div><p>This sets <code class="docutils literal notranslate"><span class="pre">polname_2</span></code> to the result of <code class="docutils literal notranslate"><span class="pre">N</span></code> successive integrations on @@ -1335,7 +1334,7 @@ at zero.</p> </div></blockquote> </section> <section id="poldivide"> -<span id="id30"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDivide{}{}{}{}</span></code></h3> +<span id="id31"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDivide{}{}{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolDivide{<polname_1>}{<polname_2>}{<polname_Q>}{<polname_R>}</span></code></p> <blockquote> <div><p>This sets <code class="docutils literal notranslate"><span class="pre">polname_Q</span></code> and <code class="docutils literal notranslate"><span class="pre">polname_R</span></code> to be the quotient and @@ -1344,7 +1343,7 @@ remainder in the Euclidean division of <code class="docutils literal notranslate </div></blockquote> </section> <section id="polquo"> -<span id="id31"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolQuo{}{}{}</span></code></h3> +<span id="id32"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolQuo{}{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolQuo{<polname_1>}{<polname_2>}{<polname_Q>}</span></code></p> <blockquote> <div><p>This sets <code class="docutils literal notranslate"><span class="pre">polname_Q</span></code> to be the quotient in the Euclidean division @@ -1352,7 +1351,7 @@ of <code class="docutils literal notranslate"><span class="pre">polname_1</span> </div></blockquote> </section> <section id="polrem"> -<span id="id32"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolRem{}{}{}</span></code></h3> +<span id="id33"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolRem{}{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolRem{<polname_1>}{<polname_2>}{<polname_R>}</span></code></p> <blockquote> <div><p>This sets <code class="docutils literal notranslate"><span class="pre">polname_R</span></code> to be the remainder in the Euclidean division @@ -1360,7 +1359,7 @@ of <code class="docutils literal notranslate"><span class="pre">polname_1</span> </div></blockquote> </section> <section id="polgcd"> -<span id="id33"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolGCD{}{}{}</span></code></h3> +<span id="id34"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolGCD{}{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolGCD{<polname_1>}{<polname_2>}{<polname_GCD>}</span></code></p> <blockquote> <div><p>This sets <code class="docutils literal notranslate"><span class="pre">polname_GCD</span></code> to be the (monic) GCD of <code class="docutils literal notranslate"><span class="pre">polname_1</span></code> @@ -1377,7 +1376,7 @@ additional polynomial or scalar variables with names based on <code class="docut prefix, it is advisable to keep the <code class="docutils literal notranslate"><span class="pre"><sturmname></span></code> namespace separate from the one applying to <code class="docutils literal notranslate"><span class="pre">\xintexpr</span></code> variables generally, or to polynomials.</p> <section id="poltosturm"> -<span id="id34"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToSturm{}{}</span></code></h4> +<span id="id35"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToSturm{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToSturm{<polname>}{<sturmname>}</span></code></p> <blockquote> <div><p>With <code class="docutils literal notranslate"><span class="pre"><polname></span></code> being for example <code class="docutils literal notranslate"><span class="pre">P</span></code>, and <code class="docutils literal notranslate"><span class="pre"><sturmname></span></code> being @@ -1433,15 +1432,18 @@ other polynomials after having done latter will behave erroneously.</p> <div class="admonition note"> <p class="admonition-title">Note</p> -<p>The declaration of the <code class="docutils literal notranslate"><span class="pre">S_k</span></code>‘s will overwrite -with no warning previously declared polynomials with identical -names <code class="docutils literal notranslate"><span class="pre">S_k</span></code>. This is original reason why the macro expects two -names: <code class="docutils literal notranslate"><span class="pre"><polname></span></code> and <code class="docutils literal notranslate"><span class="pre"><sturmname></span></code>.</p> +<p>The declaration of the <code class="docutils literal notranslate"><span class="pre">S_k</span></code>‘s will overwrite with no warning +previously declared polynomials with identical names <code class="docutils literal notranslate"><span class="pre">S_k</span></code>, +i.e. <code class="docutils literal notranslate"><span class="pre"><sturmname>_k</span></code>. This is why the macro was designed +to expect two names: <code class="docutils literal notranslate"><span class="pre"><polname></span></code> and <code class="docutils literal notranslate"><span class="pre"><sturmname></span></code>.</p> <p>It is allowed to use the polynomial name <code class="docutils literal notranslate"><span class="pre">P</span></code> as Sturm chain -name <code class="docutils literal notranslate"><span class="pre">S</span></code>: <code class="docutils literal notranslate"><span class="pre">\PolToSturm{f}(f}</span></code>, but of course fusing the -namespaces is slightly dangerous. And, also <a class="reference internal" href="#polsturmisolatezeros">\PolSturmIsolateZeros</a> creates variables sharing -the <code class="docutils literal notranslate"><span class="pre"><sturmname></span></code> prefix, which must be taken into account to -avoid name clashes.</p> +name <code class="docutils literal notranslate"><span class="pre">S</span></code>: <code class="docutils literal notranslate"><span class="pre">\PolToSturm{P}{P}</span></code>, but this is considered bad +practice for the reason mentioned in the previous paragraph.</p> +<p>Furthermore, <a class="reference internal" href="#polsturmisolatezeros">\PolSturmIsolateZeros</a> +creates <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> variables whose names start with +<code class="docutils literal notranslate"><span class="pre"><sturmname>L_</span></code>, <code class="docutils literal notranslate"><span class="pre"><sturmname>R_</span></code>, and <code class="docutils literal notranslate"><span class="pre"><sturmname>Z_</span></code>, also +<code class="docutils literal notranslate"><span class="pre"><sturmname>M_</span></code> for holding the multiplicities, and this may +overwrite pre-existing user-defined <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> variables.</p> </div> <div class="admonition warning"> <p class="admonition-title">Warning</p> @@ -1462,8 +1464,8 @@ the number of distinct real roots is at most <code class="docutils literal notra most the degree of <code class="docutils literal notranslate"><span class="pre">S_0</span></code>.</p> </div></blockquote> </section> -<section id="id35"> -<span id="id36"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToSturm*{}{}</span></code></h4> +<section id="id36"> +<span id="id37"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToSturm*{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToSturm*{<polname>}{<sturmname>}</span></code></p> <blockquote> <div><p>Does the same as <a class="reference internal" href="#poltosturm">un-starred version</a> and additionally it @@ -1474,7 +1476,7 @@ polynomials <code class="docutils literal notranslate"><span class="pre">sturmna </div></blockquote> </section> <section id="polsturmisolatezeros"> -<span id="id37"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros{}</span></code></h4> +<span id="id38"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros{<sturmname>}</span></code></p> <blockquote> <div><p>The macro locates, using the <a class="reference external" href="https://en.wikipedia.org/wiki/Sturm%27s_theorem">Sturm Theorem</a>, as many disjoint @@ -1574,8 +1576,8 @@ are studied in numerical mathematics.</p> </div> </div></blockquote> </section> -<section id="id38"> -<span id="id39"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros*{}</span></code></h4> +<section id="id39"> +<span id="id40"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros*{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros*{<sturmname>}</span></code></p> <blockquote> <div><p>The macro does the same as <a class="reference internal" href="#polsturmisolatezeros"><span class="std std-ref">\PolSturmIsolateZeros{<sturmname>}</span></a> and @@ -1592,7 +1594,7 @@ computed.</p> <div class="admonition note"> <p class="admonition-title">Note</p> <p>Somewhat counter-intuitively, it is not necessary to have -executed the <a class="reference internal" href="#id35"><span class="std std-ref">\PolToSturm*</span></a> +executed the <a class="reference internal" href="#id36"><span class="std std-ref">\PolToSturm*</span></a> starred variant: during its execution, <a class="reference internal" href="#poltosturm"><span class="std std-ref">\PolToSturm</span></a>, even though it does not declare the @@ -1603,18 +1605,18 @@ polynomials, stores their data in private macros.</p> <span class="pre">roots</span></code> example in <code class="docutils literal notranslate"><span class="pre">polexpr-examples.pdf</span></code>.</p> </div></blockquote> <section id="polsturmisolatezerosandgetmultiplicities"> -<span id="id40"></span><h5><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosAndGetMultiplicities{}</span></code></h5> +<span id="id41"></span><h5><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosAndGetMultiplicities{}</span></code></h5> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosAndGetMultiplicities{<sturmname>}</span></code></p> <blockquote> -<div><p>This is another name for <a class="reference internal" href="#id38"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a>.</p> +<div><p>This is another name for <a class="reference internal" href="#id39"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a>.</p> </div></blockquote> </section> </section> -<section id="id41"> -<span id="id42"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros**{}</span></code></h4> +<section id="id42"> +<span id="id43"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros**{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros**{<sturmname>}</span></code></p> <blockquote> -<div><p>The macro does the same as <a class="reference internal" href="#id38"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a> and +<div><p>The macro does the same as <a class="reference internal" href="#id39"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a> and in addition it does the extra work to determine all the <em>rational</em> roots.</p> <div class="admonition note"> @@ -1634,18 +1636,18 @@ the original polynomial, with the same multiplicities.</p> <span class="pre">roots</span></code> in <code class="docutils literal notranslate"><span class="pre">polexpr-examples.pdf</span></code>.</p> </div></blockquote> <section id="polsturmisolatezerosgetmultiplicitiesandrationalroots"> -<span id="id43"></span><h5><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots</span></code></h5> +<span id="id44"></span><h5><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots</span></code></h5> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots</span></code></p> <blockquote> -<div><p>This is another name for <a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a>.</p> +<div><p>This is another name for <a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a>.</p> </div></blockquote> </section> </section> <section id="polsturmisolatezerosandfindrationalroots"> -<span id="id44"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosAndFindRationalRoots{}</span></code></h4> +<span id="id45"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosAndFindRationalRoots{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosAndFindRationalRoots{<sturmname>}</span></code></p> <blockquote> -<div><p>This works exactly like <a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> +<div><p>This works exactly like <a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> (inclusive of declaring the polynomials <code class="docutils literal notranslate"><span class="pre">sturmname_sqf_norr</span></code> and <code class="docutils literal notranslate"><span class="pre">sturmname_norr</span></code> with no rational roots) except that it does <em>not</em> compute the multiplicities of the <em>non-rational</em> roots.</p> @@ -1662,7 +1664,7 @@ multiplicities and it leaves the multiplicity array (whose accessor is <a class="reference internal" href="#polsturmisolatedzeromultiplicity"><span class="std std-ref">\PolSturmIsolatedZeroMultiplicity{<sturmname>}{<index>}</span></a>) into a broken state, as all non-rational roots will supposedly have multiplicity one. This means that the output of -<a class="reference internal" href="#id61">\PolPrintIntervals*</a> will be +<a class="reference internal" href="#id62">\PolPrintIntervals*</a> will be erroneous regarding the multiplicities of irrational roots.</p> <p>I decided to document it because finding multiplicities of the non rational roots is somewhat costly, and one may be interested @@ -1673,7 +1675,7 @@ rational root anyhow).</p> </div></blockquote> </section> <section id="polrefineinterval"> -<span id="id45"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolRefineInterval*{}{}</span></code></h4> +<span id="id46"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolRefineInterval*{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolRefineInterval*{<sturmname>}{<index>}</span></code></p> <blockquote> <div><p>The <code class="docutils literal notranslate"><span class="pre">index</span></code>-th interval (starting indexing at one) is further @@ -1683,8 +1685,8 @@ the original interval. As a consequence, the <code class="docutils literal notr strictly separated from the other roots.</p> </div></blockquote> </section> -<section id="id46"> -<span id="id47"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolRefineInterval[]{}{}</span></code></h4> +<section id="id47"> +<span id="id48"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolRefineInterval[]{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolRefineInterval[N]{<sturmname>}{<index>}</span></code></p> <blockquote> <div><p>The <code class="docutils literal notranslate"><span class="pre">index</span></code>-th interval (starting count at one) is further @@ -1693,7 +1695,7 @@ subdivided once, reducing its length by a factor of 10. This is done </div></blockquote> </section> <section id="polensureintervallength"> -<span id="id48"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolEnsureIntervalLength{}{}{}</span></code></h4> +<span id="id49"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolEnsureIntervalLength{}{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolEnsureIntervalLength{<sturmname>}{<index>}{<exponent>}</span></code></p> <blockquote> <div><p>The <code class="docutils literal notranslate"><span class="pre">index</span></code>-th interval is subdivided until its length becomes at @@ -1702,7 +1704,7 @@ after decimal mark of the <code class="docutils literal notranslate"><span class </div></blockquote> </section> <section id="polensureintervallengths"> -<span id="id49"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolEnsureIntervalLengths{}{}</span></code></h4> +<span id="id50"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolEnsureIntervalLengths{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolEnsureIntervalLengths{<sturmname>}{<exponent>}</span></code></p> <blockquote> <div><p>The intervals as obtained from <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros</span></code> are (if @@ -1713,7 +1715,7 @@ each of them to have length at most <code class="docutils literal notranslate">< </div></blockquote> </section> <section id="polsettosturmchainsignchangesat"> -<span id="id50"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSetToSturmChainSignChangesAt{}{}{}</span></code></h4> +<span id="id51"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSetToSturmChainSignChangesAt{}{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSetToSturmChainSignChangesAt{\foo}{<sturmname>}{<value>}</span></code></p> <blockquote> <div><p>Sets macro <code class="docutils literal notranslate"><span class="pre">\foo</span></code> to store the number of sign changes in the @@ -1726,7 +1728,7 @@ acceptable by the <a class="reference external" href="https://www.ctan.org/pkg/x </div></blockquote> </section> <section id="polsettonbofzeroswithin"> -<span id="id51"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSetToNbOfZerosWithin{}{}{}{}</span></code></h4> +<span id="id52"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSetToNbOfZerosWithin{}{}{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSetToNbOfZerosWithin{\foo}{<sturmname>}{<value_left>}{<value_right>}</span></code></p> <blockquote> <div><p>Sets, assuming the normalized Sturm chain has been already computed, @@ -1746,7 +1748,7 @@ which however requires prior execution of <a class="reference internal" href="#p <p>See also the expandable <a class="reference internal" href="#polsturmnbwithmultofrootsoflessthanorequalto"><span class="std std-ref">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualTo{value}</span></a> which requires prior execution of -<a class="reference internal" href="#id38">\PolSturmIsolateZeros*</a>.</p> +<a class="reference internal" href="#id39">\PolSturmIsolateZeros*</a>.</p> </div></blockquote> </section> </section> @@ -1773,7 +1775,7 @@ primitives.</p> <p>The next macros which govern its output.</p> </div></blockquote> <section id="polprintintervalsnorealroots"> -<span id="id52"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsNoRealRoots</span></code></h4> +<span id="id53"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsNoRealRoots</span></code></h4> <blockquote> <div><p>Executed in place of an <code class="docutils literal notranslate"><span class="pre">array</span></code> environment, when there are no real roots. Default definition:</p> @@ -1783,7 +1785,7 @@ real roots. Default definition:</p> </div></blockquote> </section> <section id="polprintintervalsbeginenv"> -<span id="id53"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsBeginEnv</span></code></h4> +<span id="id54"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsBeginEnv</span></code></h4> <blockquote> <div><p>Default definition (given here for LaTeX, Plain has a variant):</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\PolPrintIntervalsBeginEnv</span><span class="nb">{</span><span class="sb">\[</span><span class="nv">\begin</span><span class="nb">{array}{rcccl}}</span> @@ -1791,14 +1793,14 @@ real roots. Default definition:</p> </div> <p>A simpler <code class="docutils literal notranslate"><span class="pre">center</span></code> environment provides a straightforward way to obtain a display allowing pagebreaks. Of course redefinitions must -at any rate be kept in sync with <a class="reference internal" href="#id56">\PolPrintIntervalsKnownRoot</a> and -<a class="reference internal" href="#id57">\PolPrintIntervalsUnknownRoot</a>.</p> +at any rate be kept in sync with <a class="reference internal" href="#id57">\PolPrintIntervalsKnownRoot</a> and +<a class="reference internal" href="#id58">\PolPrintIntervalsUnknownRoot</a>.</p> <p>Prior to <code class="docutils literal notranslate"><span class="pre">0.8.6</span></code> it was not possible to use here for example <code class="docutils literal notranslate"><span class="pre">\begin{align}</span></code> due to the latter executing twice in contents.</p> </div></blockquote> </section> <section id="polprintintervalsendenv"> -<span id="id54"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsEndEnv</span></code></h4> +<span id="id55"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsEndEnv</span></code></h4> <blockquote> <div><p>Default definition:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\PolPrintIntervalsEndEnv</span><span class="nb">{</span><span class="k">\end</span><span class="nb">{</span>array<span class="nb">}</span><span class="k">\]</span><span class="nb">}</span> @@ -1807,14 +1809,14 @@ at any rate be kept in sync with <a class="reference internal" href="#id56">\Pol </div></blockquote> </section> <section id="polprintintervalsrowseparator"> -<span id="id55"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsRowSeparator</span></code></h4> +<span id="id56"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsRowSeparator</span></code></h4> <blockquote> <div><p>Expands by default to <code class="docutils literal notranslate"><span class="pre">\\</span></code> with LaTeX and to <code class="docutils literal notranslate"><span class="pre">\cr</span></code> with Plain</p> <p>Added at <code class="docutils literal notranslate"><span class="pre">0.8.6</span></code>.</p> </div></blockquote> </section> <section id="polprintintervalsknownroot"> -<span id="id56"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsKnownRoot</span></code></h4> +<span id="id57"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsKnownRoot</span></code></h4> <blockquote> <div><p>Default definition:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\PolPrintIntervalsKnownRoot</span><span class="nb">{</span><span class="c">%</span> @@ -1826,7 +1828,7 @@ at any rate be kept in sync with <a class="reference internal" href="#id56">\Pol </div></blockquote> </section> <section id="polprintintervalsunknownroot"> -<span id="id57"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsUnknownRoot</span></code></h4> +<span id="id58"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsUnknownRoot</span></code></h4> <blockquote> <div><p>Default definition:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\PolPrintIntervalsUnknownRoot</span><span class="nb">{</span><span class="c">%</span> @@ -1839,7 +1841,7 @@ at any rate be kept in sync with <a class="reference internal" href="#id56">\Pol </div></blockquote> </section> <section id="polprintintervalsprintexactzero"> -<span id="id58"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsPrintExactZero</span></code></h4> +<span id="id59"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsPrintExactZero</span></code></h4> <blockquote> <div><p>Default definition:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\PolPrintIntervalsPrintExactZero</span><span class="nb">{</span><span class="k">\PolPrintIntervalsTheLeftEndPoint</span><span class="nb">}</span> @@ -1848,7 +1850,7 @@ at any rate be kept in sync with <a class="reference internal" href="#id56">\Pol </div></blockquote> </section> <section id="polprintintervalsprintleftendpoint"> -<span id="id59"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsPrintLeftEndPoint</span></code></h4> +<span id="id60"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsPrintLeftEndPoint</span></code></h4> <blockquote> <div><p>Default definition:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\PolPrintIntervalsPrintLeftEndPoint</span><span class="nb">{</span><span class="k">\PolPrintIntervalsTheLeftEndPoint</span><span class="nb">}</span> @@ -1857,7 +1859,7 @@ at any rate be kept in sync with <a class="reference internal" href="#id56">\Pol </div></blockquote> </section> <section id="polprintintervalsprintrightendpoint"> -<span id="id60"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsPrintRightEndPoint</span></code></h4> +<span id="id61"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsPrintRightEndPoint</span></code></h4> <blockquote> <div><p>Default definition is:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\PolPrintIntervalsPrintRightEndPoint</span><span class="nb">{</span><span class="k">\PolPrintIntervalsTheRightEndPoint</span><span class="nb">}</span> @@ -1866,15 +1868,15 @@ at any rate be kept in sync with <a class="reference internal" href="#id56">\Pol </div></blockquote> </section> <section id="polprintintervals-varname"> -<span id="id61"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervals*[<varname>]{}</span></code></h4> +<span id="id62"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervals*[<varname>]{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolPrintIntervals*[<varname>]{<sturmname>}</span></code></p> <blockquote> <div><p>This starred variant produces an alternative output (which displays the root multiplicity), and is provided as an example of customization.</p> -<p>As replacement for <a class="reference internal" href="#id56">\PolPrintIntervalsKnownRoot</a>, -<a class="reference internal" href="#id58">\PolPrintIntervalsPrintExactZero</a>, -<a class="reference internal" href="#id57">\PolPrintIntervalsUnknownRoot</a> it uses its own +<p>As replacement for <a class="reference internal" href="#id57">\PolPrintIntervalsKnownRoot</a>, +<a class="reference internal" href="#id59">\PolPrintIntervalsPrintExactZero</a>, +<a class="reference internal" href="#id58">\PolPrintIntervalsUnknownRoot</a> it uses its own <code class="docutils literal notranslate"><span class="pre">\POL@@PrintIntervals...</span></code> macros. We only reproduce here one definition:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\POL</span>@@PrintIntervalsPrintExactZero<span class="nb">{</span><span class="c">%</span> @@ -1886,7 +1888,7 @@ definition:</p> <p>Multiplicities are printed using this auxiliary macro:</p> </div></blockquote> <section id="polprintintervalsprintmultiplicity"> -<span id="id62"></span><h5><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsPrintMultiplicity</span></code></h5> +<span id="id63"></span><h5><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsPrintMultiplicity</span></code></h5> <blockquote> <div><p>whose default definition is:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\newcommand\PolPrintIntervalsPrintMultiplicity</span><span class="nb">{</span>(<span class="k">\mbox</span><span class="nb">{</span>mult. <span class="nb">}</span><span class="k">\PolPrintIntervalsTheMultiplicity</span>)<span class="nb">}</span> @@ -1910,19 +1912,19 @@ if testing with a non LaTeX macro format.</p> <code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr</span></code> which need a <code class="docutils literal notranslate"><span class="pre">\write</span></code>, <code class="docutils literal notranslate"><span class="pre">\edef</span></code> or a <code class="docutils literal notranslate"><span class="pre">\csname...\endcsname</span></code> context.</p> <section id="poltoexpr"> -<span id="id63"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToExpr{}</span></code></h3> +<span id="id64"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToExpr{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToExpr{<pol.</span> <span class="pre">expr.>}</span></code></p> <blockquote> -<div><p>Produces expandably <a class="footnote-reference brackets" href="#id65" id="id64" role="doc-noteref"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a> the string <code class="docutils literal notranslate"><span class="pre">coeff_N*x^N+...</span></code>, i.e. the +<div><p>Produces expandably <a class="footnote-reference brackets" href="#id66" id="id65" role="doc-noteref"><span class="fn-bracket">[</span>3<span class="fn-bracket">]</span></a> the string <code class="docutils literal notranslate"><span class="pre">coeff_N*x^N+...</span></code>, i.e. the polynomial is using descending powers.</p> -<aside class="footnote brackets" id="id65" role="note"> -<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id64">3</a><span class="fn-bracket">]</span></span> +<aside class="footnote brackets" id="id66" role="note"> +<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id65">3</a><span class="fn-bracket">]</span></span> <p>requires exhaustive expansion, for example as triggered by <code class="docutils literal notranslate"><span class="pre">\write</span></code> or <code class="docutils literal notranslate"><span class="pre">\edef</span></code>.</p> </aside> <p>Since <code class="docutils literal notranslate"><span class="pre">0.8</span></code> the input is not restricted to be a polynomial name but is allowed to be an arbitrary expression. Then <code class="docutils literal notranslate"><span class="pre">x</span></code> is expected as -indeterminate but this can be customized via <a class="reference internal" href="#id67">\PolToExprInVar</a>.</p> +indeterminate but this can be customized via <a class="reference internal" href="#id68">\PolToExprInVar</a>.</p> <p>The output uses the letter <code class="docutils literal notranslate"><span class="pre">x</span></code> by default, this is customizable via <a class="reference internal" href="#poltoexprvar">\PolToExprVar</a>. The default output is compatible both with</p> <ul class="simple"> @@ -1930,7 +1932,7 @@ via <a class="reference internal" href="#poltoexprvar">\PolToExprVar</a>. The d <li><p>and the PSTricks <code class="docutils literal notranslate"><span class="pre">\psplot[algebraic]</span></code> input format.</p></li> </ul> <p>Attention that it is not compatible with Python, see further -<a class="reference internal" href="#id69">\PolToExprCaret</a> in this context.</p> +<a class="reference internal" href="#id70">\PolToExprCaret</a> in this context.</p> <p>The following applies:</p> <ul class="simple"> <li><p>vanishing coefficients are skipped (issue <code class="docutils literal notranslate"><span class="pre">\poltoexpralltrue</span></code> to @@ -1953,16 +1955,19 @@ is not supposed to be a typesetting macro.</p></li> redefinition must maintain the expandability property.</p> </div></blockquote> <section id="poltoexprvar"> -<span id="id66"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprVar</span></code></h4> +<span id="id67"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprVar</span></code></h4> <blockquote> <div><p>Defaults to <code class="docutils literal notranslate"><span class="pre">x</span></code>. The letter used in the macro output.</p> </div></blockquote> </section> <section id="poltoexprinvar"> -<span id="id67"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprInVar</span></code></h4> +<span id="id68"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprInVar</span></code></h4> <blockquote> <div><p>Defaults to <code class="docutils literal notranslate"><span class="pre">x</span></code>: the letter used as the polynomial indeterminate -in the macro input.</p> +in the macro input:</p> +<div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\def\PolToExprInVar</span><span class="nb">{</span>x<span class="nb">}</span><span class="c">% (default)</span> +</pre></div> +</div> <p>Recall that declared polynomials are more efficiently used in algebraic expressions without the <code class="docutils literal notranslate"><span class="pre">(x)</span></code>, i.e. <code class="docutils literal notranslate"><span class="pre">P*Q</span></code> is better than <code class="docutils literal notranslate"><span class="pre">P(x)*Q(x)</span></code>. Thus the input, even if an expression, does not @@ -1971,13 +1976,13 @@ have to contain any <code class="docutils literal notranslate"><span class="pre" </div></blockquote> </section> <section id="poltoexprtimes"> -<span id="id68"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprTimes</span></code></h4> +<span id="id69"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprTimes</span></code></h4> <blockquote> <div><p>Defaults to <code class="docutils literal notranslate"><span class="pre">*</span></code>.</p> </div></blockquote> </section> <section id="poltoexprcaret"> -<span id="id69"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprCaret</span></code></h4> +<span id="id70"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprCaret</span></code></h4> <blockquote> <div><p>Defaults to <code class="docutils literal notranslate"><span class="pre">^</span></code> of catcode 12. Set it to expand to <code class="docutils literal notranslate"><span class="pre">**</span></code> for Python compatible output.</p> @@ -1985,7 +1990,7 @@ expand to <code class="docutils literal notranslate"><span class="pre">**</span </div></blockquote> </section> <section id="poltoexprcmd"> -<span id="id70"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprCmd{}</span></code></h4> +<span id="id71"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprCmd{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToExprCmd{<raw_coeff>}</span></code></p> <blockquote> <div><p>Defaults to <code class="docutils literal notranslate"><span class="pre">\xintPRaw{\xintRawWithZeros{#1}}</span></code>.</p> @@ -2005,25 +2010,25 @@ and not their finite decimal expansion with no denominator.</p> </div></blockquote> </section> <section id="poltoexproneterm"> -<span id="id71"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprOneTerm{}{}</span></code></h4> +<span id="id72"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprOneTerm{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToExprOneTerm{<raw_coeff>}{<exponent>}</span></code></p> <blockquote> <div><p>This is the macro which from the coefficient and the exponent produces the corresponding term in output, such as <code class="docutils literal notranslate"><span class="pre">2/3*x^7</span></code>.</p> <p>For its default definition, see the source code. It uses <a class="reference internal" href="#poltoexprcmd">\PolToExprCmd</a>, <a class="reference internal" href="#poltoexprtimes">\PolToExprTimes</a>, <a class="reference internal" href="#poltoexprvar">\PolToExprVar</a> and -<a class="reference internal" href="#id69">\PolToExprCaret</a>.</p> +<a class="reference internal" href="#id70">\PolToExprCaret</a>.</p> </div></blockquote> </section> <section id="poltoexpronetermstylea"> -<span id="id72"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprOneTermStyleA{}{}</span></code></h4> +<span id="id73"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprOneTermStyleA{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToExprOneTermStyleA{<raw_coeff>}{<exponent>}</span></code></p> <blockquote> <div><p>This holds the default package meaning of <code class="docutils literal notranslate"><span class="pre">\PolToExprOneTerm</span></code>.</p> </div></blockquote> </section> <section id="poltoexpronetermstyleb"> -<span id="id73"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprOneTermStyleB{}{}</span></code></h4> +<span id="id74"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprOneTermStyleB{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToExprOneTermStyleB{<raw_coeff>}{<exponent>}</span></code></p> <blockquote> <div><p>This holds an alternative meaning, which puts the fractional part of @@ -2032,14 +2037,14 @@ a coefficient after the monomial, i.e. like this:</p> </pre></div> </div> <p><a class="reference internal" href="#poltoexprcmd">\PolToExprCmd</a> isn’t used at all in this style. But -<a class="reference internal" href="#poltoexprtimes">\PolToExprTimes</a>, <a class="reference internal" href="#poltoexprvar">\PolToExprVar</a> and <a class="reference internal" href="#id69">\PolToExprCaret</a> are obeyed.</p> +<a class="reference internal" href="#poltoexprtimes">\PolToExprTimes</a>, <a class="reference internal" href="#poltoexprvar">\PolToExprVar</a> and <a class="reference internal" href="#id70">\PolToExprCaret</a> are obeyed.</p> <p>To activate it use <code class="docutils literal notranslate"><span class="pre">\let\PolToExprOneTerm\PolToExprOneTermStyleB</span></code>. To revert to the package default behaviour, issue <code class="docutils literal notranslate"><span class="pre">\let\PolToExprOneTerm\PolToExprOneTermStyleA</span></code>.</p> </div></blockquote> </section> <section id="poltoexprtermprefix"> -<span id="id74"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprTermPrefix{}</span></code></h4> +<span id="id75"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToExprTermPrefix{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToExprTermPrefix{<raw_coeff>}</span></code></p> <blockquote> <div><p>It receives as argument the coefficient. Its default behaviour is @@ -2051,7 +2056,7 @@ positive coefficient does not output an explicit <code class="docutils literal n </section> </section> <section id="poltofloatexpr"> -<span id="id75"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr{}</span></code></h3> +<span id="id76"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr{<pol.</span> <span class="pre">expr.>}</span></code></p> <blockquote> <div><p>Similar to <a class="reference internal" href="#poltoexpr"><span class="std std-ref">\PolToExpr{<pol. expr.>}</span></a> but using @@ -2069,7 +2074,7 @@ in between).</p> <p>Extended at <code class="docutils literal notranslate"><span class="pre">0.8</span></code> to accept general expressions as input.</p> </div></blockquote> <section id="poltofloatexproneterm"> -<span id="id76"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToFloatExprOneTerm{}{}</span></code></h4> +<span id="id77"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToFloatExprOneTerm{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToFloatExprOneTerm{<raw_coeff>}{<exponent>}</span></code></p> <blockquote> <div><p>Similar to <a class="reference internal" href="#poltoexproneterm"><span class="std std-ref">\PolToExprOneTerm{<raw_coeff>}{<exponent>}</span></a>. But does not treat @@ -2077,7 +2082,7 @@ especially coefficients equal to plus or minus one.</p> </div></blockquote> </section> <section id="poltofloatexprcmd"> -<span id="id77"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToFloatExprCmd{}</span></code></h4> +<span id="id78"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolToFloatExprCmd{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToFloatExprCmd{<raw_coeff>}</span></code></p> <blockquote> <div><p>The one-argument macro used by <code class="docutils literal notranslate"><span class="pre">\PolToFloatExprOneTerm</span></code>. @@ -2087,8 +2092,8 @@ zeroes.</p> </div></blockquote> </section> </section> -<section id="id78"> -<span id="id79"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToExpr*{}</span></code></h3> +<section id="id79"> +<span id="id80"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToExpr*{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToExpr*{<pol.</span> <span class="pre">expr.>}</span></code></p> <blockquote> <div><p>Ascending powers: <code class="docutils literal notranslate"><span class="pre">coeff_0+coeff_1*x+coeff_2*x^2+...</span></code>.</p> @@ -2097,8 +2102,8 @@ zeroes.</p> <a class="reference internal" href="#poltoexpr"><span class="std std-ref">\PolToExpr{<pol. expr.>}</span></a>.</p> </div></blockquote> </section> -<section id="id80"> -<span id="id81"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr*{}</span></code></h3> +<section id="id81"> +<span id="id82"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr*{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr*{<pol.</span> <span class="pre">expr.>}</span></code></p> <blockquote> <div><p>Ascending powers.</p> @@ -2106,7 +2111,7 @@ zeroes.</p> </div></blockquote> </section> <section id="polnthcoeff"> -<span id="id82"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolNthCoeff{}{}</span></code></h3> +<span id="id83"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolNthCoeff{}{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolNthCoeff{<polname>}{<index>}</span></code></p> <blockquote> <div><p>It expands to the raw <code class="docutils literal notranslate"><span class="pre">N</span></code>-th coefficient (<code class="docutils literal notranslate"><span class="pre">N=0</span></code> corresponds to @@ -2118,14 +2123,14 @@ for <code class="docutils literal notranslate"><span class="pre">N<-1-degree< </div></blockquote> </section> <section id="polleadingcoeff"> -<span id="id83"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolLeadingCoeff{}</span></code></h3> +<span id="id84"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolLeadingCoeff{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolLeadingCoeff{<polname>}</span></code></p> <blockquote> <div><p>Expands to the leading coefficient.</p> </div></blockquote> </section> <section id="poldegree"> -<span id="id84"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDegree{}</span></code></h3> +<span id="id85"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDegree{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolDegree{<polname>}</span></code></p> <blockquote> <div><p>It expands to the degree. This is <code class="docutils literal notranslate"><span class="pre">-1</span></code> if zero polynomial but this @@ -2133,7 +2138,7 @@ may change in future. Should it then expand to <code class="docutils literal not </div></blockquote> </section> <section id="policontent"> -<span id="id85"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolIContent{}</span></code></h3> +<span id="id86"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolIContent{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolIContent{<polname>}</span></code></p> <blockquote> <div><p>It expands to the contents of the polynomial, i.e. to the positive @@ -2143,7 +2148,7 @@ with integer coefficients having no common prime divisor.</p> </div></blockquote> </section> <section id="poltolist"> -<span id="id86"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToList{}</span></code></h3> +<span id="id87"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToList{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToList{<polname>}</span></code></p> <blockquote> <div><p>Expands to <code class="docutils literal notranslate"><span class="pre">{coeff_0}{coeff_1}...{coeff_N}</span></code> with <code class="docutils literal notranslate"><span class="pre">N</span></code> = degree, and @@ -2153,7 +2158,7 @@ empty output.)</p> </div></blockquote> </section> <section id="poltocsv"> -<span id="id87"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToCSV{}</span></code></h3> +<span id="id88"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolToCSV{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolToCSV{<polname>}</span></code></p> <blockquote> <div><p>Expands to <code class="docutils literal notranslate"><span class="pre">coeff_0,</span> <span class="pre">coeff_1,</span> <span class="pre">coeff_2,</span> <span class="pre">.....,</span> <span class="pre">coeff_N</span></code>, starting @@ -2205,12 +2210,12 @@ been issued before.</p> </div> <p>To use the <em>exact coefficients</em> with <em>exactly executed</em> additions and multiplications and do the rounding only as the final last step, -the following syntax can be used: <a class="footnote-reference brackets" href="#id89" id="id88" role="doc-noteref"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></a></p> +the following syntax can be used: <a class="footnote-reference brackets" href="#id90" id="id89" role="doc-noteref"><span class="fn-bracket">[</span>4<span class="fn-bracket">]</span></a></p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\xintfloateval</span><span class="nb">{</span>3.27*<span class="k">\xintexpr</span> f(2.53)<span class="k">\relax</span><span class="nb">^</span>2<span class="nb">}</span> </pre></div> </div> -<aside class="footnote brackets" id="id89" role="note"> -<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id88">4</a><span class="fn-bracket">]</span></span> +<aside class="footnote brackets" id="id90" role="note"> +<span class="label"><span class="fn-bracket">[</span><a role="doc-backlink" href="#id89">4</a><span class="fn-bracket">]</span></span> <p>Cf. <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> documentation about nested expressions.</p> </aside> </div></blockquote> @@ -2226,7 +2231,7 @@ to) a format acceptable to the <a class="reference external" href="https://www.c <section id="expandable-macros-in-relation-to-root-localization-via-sturm-theorem"> <h3>Expandable macros in relation to root localization via <a class="reference external" href="https://en.wikipedia.org/wiki/Sturm%27s_theorem">Sturm Theorem</a></h3> <section id="polsturmchainlength"> -<span id="id90"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmChainLength{}</span></code></h4> +<span id="id91"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmChainLength{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmChainLength{<sturmname>}</span></code></p> <blockquote> <div><p>Returns the integer <code class="docutils literal notranslate"><span class="pre">N</span></code> such that <code class="docutils literal notranslate"><span class="pre">sturmname_N</span></code> is the last one @@ -2235,7 +2240,7 @@ in the Sturm chain <code class="docutils literal notranslate"><span class="pre"> </div></blockquote> </section> <section id="polsturmifzeroexactlyknown"> -<span id="id91"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIfZeroExactlyKnown{}{}{}{}</span></code></h4> +<span id="id92"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIfZeroExactlyKnown{}{}{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIfZeroExactlyKnown{<sturmname>}{<index>}{T}{F}</span></code></p> <blockquote> <div><p>Executes <code class="docutils literal notranslate"><span class="pre">T</span></code> if the <code class="docutils literal notranslate"><span class="pre">index</span></code>-th interval reduces to a singleton, @@ -2243,7 +2248,7 @@ i.e. the root is known exactly, else <code class="docutils literal notranslate"> </div></blockquote> </section> <section id="polsturmisolatedzeroleft"> -<span id="id92"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroLeft{}{}</span></code></h4> +<span id="id93"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroLeft{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroLeft{<sturmname>}{<index>}</span></code></p> <blockquote> <div><p>Expands to the left end-point for the <code class="docutils literal notranslate"><span class="pre">index</span></code>-th interval, as @@ -2251,14 +2256,14 @@ computed by some earlier <a class="reference internal" href="#polsturmisolatezer <div class="admonition note"> <p class="admonition-title">Note</p> <p>Execution of this macro after some -<a class="reference internal" href="#id46">\PolRefineInterval{<sturmname>}{<index>}</a> +<a class="reference internal" href="#id47">\PolRefineInterval{<sturmname>}{<index>}</a> will take into account the now known tighter bounds.</p> </div> <p>The value is pre-formatted using <a class="reference internal" href="#poldectostring">\PolDecTostring</a>.</p> </div></blockquote> </section> <section id="polsturmisolatedzeroright"> -<span id="id93"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroRight{}{}</span></code></h4> +<span id="id94"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroRight{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroRight{<sturmname>}{<index>}</span></code></p> <blockquote> <div><p>Expands to the right end-point for the <code class="docutils literal notranslate"><span class="pre">index</span></code>-th interval as @@ -2268,21 +2273,21 @@ possibly refined afterwards.</p> </div></blockquote> </section> <section id="polsturmisolatedzeromultiplicity"> -<span id="id94"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroMultiplicity{}{}</span></code></h4> +<span id="id95"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroMultiplicity{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmIsolatedZeroMultiplicity{<sturmname>}{<index>}</span></code></p> <blockquote> <div><p>Expands to the multiplicity of the unique root contained in the <code class="docutils literal notranslate"><span class="pre">index</span></code>-th interval.</p> <div class="admonition attention"> <p class="admonition-title">Attention</p> -<p>A prior execution of <a class="reference internal" href="#id38"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a> is mandatory.</p> +<p>A prior execution of <a class="reference internal" href="#id39"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a> is mandatory.</p> </div> <p>See <code class="docutils literal notranslate"><span class="pre">The</span> <span class="pre">degree</span> <span class="pre">nine</span> <span class="pre">polynomial</span> <span class="pre">with</span> <span class="pre">0.99,</span> <span class="pre">0.999,</span> <span class="pre">0.9999</span> <span class="pre">as</span> <span class="pre">triple</span> <span class="pre">roots</span></code> in <code class="docutils literal notranslate"><span class="pre">polexpr-examples.pdf</span></code>.</p> </div></blockquote> </section> <section id="polsturmnbofisolatedzeros"> -<span id="id95"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfIsolatedZeros{}</span></code></h4> +<span id="id96"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfIsolatedZeros{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfIsolatedZeros{<sturmname>}</span></code></p> <blockquote> <div><p>Expands to the number of real roots of the polynomial @@ -2339,7 +2344,7 @@ the polynomial used to create the Sturm chain) which are less than or equal to the given <code class="docutils literal notranslate"><span class="pre">value</span></code>.</p> <div class="admonition attention"> <p class="admonition-title">Attention</p> -<p><a class="reference internal" href="#id38"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a> (or the double starred +<p><a class="reference internal" href="#id39"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a> (or the double starred variant) must have been executed beforehand.</p> </div> </div></blockquote> @@ -2352,50 +2357,50 @@ variant) must have been executed beforehand.</p> which are less than or equal to the given <code class="docutils literal notranslate"><span class="pre">expression</span></code>.</p> <div class="admonition attention"> <p class="admonition-title">Attention</p> -<p><a class="reference internal" href="#id38"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a> (or the double starred +<p><a class="reference internal" href="#id39"><span class="std std-ref">\PolSturmIsolateZeros*{<sturmname>}</span></a> (or the double starred variant) must have been executed beforehand.</p> </div> </div></blockquote> </section> <section id="polsturmnbofrationalroots"> -<span id="id96"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfRationalRoots{}</span></code></h4> +<span id="id97"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfRationalRoots{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfRationalRoots{<sturmname>}</span></code></p> <blockquote> <div><p>Expands to the number of rational roots (without multiplicities).</p> <div class="admonition attention"> <p class="admonition-title">Attention</p> -<p><a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed +<p><a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed beforehand.</p> </div> </div></blockquote> </section> <section id="polsturmnbofrationalrootswithmultiplicities"> -<span id="id97"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfRationalRootsWithMultiplicities{}</span></code></h4> +<span id="id98"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfRationalRootsWithMultiplicities{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmNbOfRationalRootsWithMultiplicities{<sturmname>}</span></code></p> <blockquote> <div><p>Expands to the number of rational roots (counted with multiplicities).</p> <div class="admonition attention"> <p class="admonition-title">Attention</p> -<p><a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed +<p><a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed beforehand.</p> </div> </div></blockquote> </section> <section id="polsturmrationalroot"> -<span id="id98"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRoot{}{}</span></code></h4> +<span id="id99"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRoot{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRoot{<sturmname>}{<k>}</span></code></p> <blockquote> <div><p>Expands to the k-th rational root. They are enumerated from left to right starting at index value <code class="docutils literal notranslate"><span class="pre">1</span></code>.</p> <div class="admonition attention"> <p class="admonition-title">Attention</p> -<p><a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed +<p><a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed beforehand.</p> </div> </div></blockquote> </section> <section id="polsturmrationalrootindex"> -<span id="id99"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRootIndex{}{}</span></code></h4> +<span id="id100"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRootIndex{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRootIndex{<sturmname>}{<k>}</span></code></p> <blockquote> <div><p>Expands to the index of the <code class="docutils literal notranslate"><span class="pre">k</span></code>th rational root as part of the @@ -2407,25 +2412,25 @@ this nested call:</p> </div> <div class="admonition attention"> <p class="admonition-title">Attention</p> -<p><a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed +<p><a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed beforehand.</p> </div> </div></blockquote> </section> <section id="polsturmrationalrootmultiplicity"> -<span id="id100"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRootMultiplicity{}{}</span></code></h4> +<span id="id101"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRootMultiplicity{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolSturmRationalRootMultiplicity{<sturmname>}{<k>}</span></code></p> <blockquote> <div><p>Expands to the multiplicity of the <code class="docutils literal notranslate"><span class="pre">k</span></code>th rational root.</p> <div class="admonition attention"> <p class="admonition-title">Attention</p> -<p><a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed +<p><a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> must have been executed beforehand.</p> </div> </div></blockquote> </section> <section id="polintervalwidth"> -<span id="id101"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolIntervalWidth{}{}</span></code></h4> +<span id="id102"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolIntervalWidth{}{}</span></code></h4> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolIntervalWidth{<sturmname>}{<index>}</span></code></p> <blockquote> <div><p>The <code class="docutils literal notranslate"><span class="pre">10^E</span></code> width of the current <code class="docutils literal notranslate"><span class="pre">index</span></code>-th root localization @@ -2436,13 +2441,13 @@ interval. Output is in <a class="reference external" href="https://www.ctan.org/ <section id="expandable-macros-for-use-within-execution-of-polprintintervals"> <h3>Expandable macros for use within execution of <code class="docutils literal notranslate"><span class="pre">\PolPrintIntervals</span></code></h3> <p>These macros are for usage within custom user redefinitions of -<a class="reference internal" href="#id56">\PolPrintIntervalsKnownRoot</a>, <a class="reference internal" href="#id57">\PolPrintIntervalsUnknownRoot</a>, or +<a class="reference internal" href="#id57">\PolPrintIntervalsKnownRoot</a>, <a class="reference internal" href="#id58">\PolPrintIntervalsUnknownRoot</a>, or in redefinitions of <a class="reference internal" href="#polprintintervalsprintexactzero">PolPrintIntervalsPrintExactZero</a> (used in the -default for the former) and of <a class="reference internal" href="#id59">\PolPrintIntervalsPrintLeftEndPoint</a>, -<a class="reference internal" href="#id60">\PolPrintIntervalsPrintRightEndPoint</a> (used in the default for the +default for the former) and of <a class="reference internal" href="#id60">\PolPrintIntervalsPrintLeftEndPoint</a>, +<a class="reference internal" href="#id61">\PolPrintIntervalsPrintRightEndPoint</a> (used in the default for the latter).</p> <section id="polprintintervalsthevar"> -<span id="id102"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheVar</span></code></h4> +<span id="id103"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheVar</span></code></h4> <blockquote> <div><p>Expands to the name (default <code class="docutils literal notranslate"><span class="pre">Z</span></code>) used for representing the roots, which was passed as optional argument <code class="docutils literal notranslate"><span class="pre">varname</span></code> to @@ -2450,31 +2455,31 @@ which was passed as optional argument <code class="docutils literal notranslate" </div></blockquote> </section> <section id="polprintintervalstheindex"> -<span id="id103"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheIndex</span></code></h4> +<span id="id104"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheIndex</span></code></h4> <blockquote> <div><p>Expands to the index of the considered interval (indexing starting at 1 for the leftmost interval).</p> </div></blockquote> </section> <section id="polprintintervalsthesturmname"> -<span id="id104"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheSturmName</span></code></h4> +<span id="id105"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheSturmName</span></code></h4> <blockquote> <div><p>Expands to the argument which was passed as <code class="docutils literal notranslate"><span class="pre"><sturmname></span></code> to <a class="reference internal" href="#polprintintervals"><span class="std std-ref">\PolPrintIntervals[varname]{<sturmname>}</span></a>.</p> </div></blockquote> </section> <section id="polprintintervalstheleftendpoint"> -<span id="id105"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheLeftEndPoint</span></code></h4> +<span id="id106"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheLeftEndPoint</span></code></h4> <blockquote> <div><p>The left end point of the interval, as would be produced by <a class="reference internal" href="#polsturmisolatedzeroleft">\PolSturmIsolatedZeroLeft</a> if it was used with arguments the Sturm chain name and interval index returned -by <a class="reference internal" href="#id104">\PolPrintIntervalsTheSturmName</a> and -<a class="reference internal" href="#id103">\PolPrintIntervalsTheIndex</a>.</p> +by <a class="reference internal" href="#id105">\PolPrintIntervalsTheSturmName</a> and +<a class="reference internal" href="#id104">\PolPrintIntervalsTheIndex</a>.</p> </div></blockquote> </section> <section id="polprintintervalstherightendpoint"> -<span id="id106"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheRightEndPoint</span></code></h4> +<span id="id107"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheRightEndPoint</span></code></h4> <blockquote> <div><p>The right end point of the interval, as would be produced by <a class="reference internal" href="#polsturmisolatedzeroright">\PolSturmIsolatedZeroRight</a> for @@ -2482,10 +2487,10 @@ this Sturm chain name and index.</p> </div></blockquote> </section> <section id="polprintintervalsthemultiplicity"> -<span id="id107"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheMultiplicity</span></code></h4> +<span id="id108"></span><h4><code class="docutils literal notranslate"><span class="pre">\PolPrintIntervalsTheMultiplicity</span></code></h4> <blockquote> <div><p>The multiplicity of the unique root within the interval of index -<a class="reference internal" href="#id103">\PolPrintIntervalsTheIndex</a>. Makes sense only if the starred (or +<a class="reference internal" href="#id104">\PolPrintIntervalsTheIndex</a>. Makes sense only if the starred (or double-starred) variant of <a class="reference internal" href="#polsturmisolatezeros">\PolSturmIsolateZeros</a> was used earlier.</p> </div></blockquote> </section> @@ -2494,7 +2499,7 @@ double-starred) variant of <a class="reference internal" href="#polsturmisolatez <section id="tex-booleans-with-names-enacting-their-defaults"> <h2>TeX Booleans (with names enacting their defaults)</h2> <section id="xintverbosefalse"> -<span id="id108"></span><h3><code class="docutils literal notranslate"><span class="pre">\xintverbosefalse</span></code></h3> +<span id="id109"></span><h3><code class="docutils literal notranslate"><span class="pre">\xintverbosefalse</span></code></h3> <blockquote> <div><p>This is actually an <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> configuration. Setting it to <code class="docutils literal notranslate"><span class="pre">true</span></code> triggers the writing of information to the log when new @@ -2507,7 +2512,7 @@ considered unstable and undocumented internal structures.</p> </div></blockquote> </section> <section id="polnewpolverbosefalse"> -<span id="id109"></span><h3><code class="docutils literal notranslate"><span class="pre">\polnewpolverbosefalse</span></code></h3> +<span id="id110"></span><h3><code class="docutils literal notranslate"><span class="pre">\polnewpolverbosefalse</span></code></h3> <blockquote> <div><p>When <code class="docutils literal notranslate"><span class="pre">\poldef</span></code> is used, both a variable and a function are defined. The default <code class="docutils literal notranslate"><span class="pre">\polnewpolverbosefalse</span></code> setting suppresses @@ -2528,14 +2533,14 @@ roots obey only the <code class="docutils literal notranslate"><span class="pre" </div></blockquote> </section> <section id="poltypesetallfalse"> -<span id="id110"></span><h3><code class="docutils literal notranslate"><span class="pre">\poltypesetallfalse</span></code></h3> +<span id="id111"></span><h3><code class="docutils literal notranslate"><span class="pre">\poltypesetallfalse</span></code></h3> <blockquote> <div><p>If <code class="docutils literal notranslate"><span class="pre">true</span></code>, <a class="reference internal" href="#poltypeset">\PolTypeset</a> will also typeset the vanishing coefficients.</p> </div></blockquote> </section> <section id="poltoexprallfalse"> -<span id="id111"></span><h3><code class="docutils literal notranslate"><span class="pre">\poltoexprallfalse</span></code></h3> +<span id="id112"></span><h3><code class="docutils literal notranslate"><span class="pre">\poltoexprallfalse</span></code></h3> <blockquote> <div><p>If <code class="docutils literal notranslate"><span class="pre">true</span></code>, <a class="reference internal" href="#poltoexpr"><span class="std std-ref">\PolToExpr{<pol. expr.>}</span></a> and <a class="reference internal" href="#poltofloatexpr"><span class="std std-ref">\PolToFloatExpr{<pol. expr.>}</span></a> will also @@ -2546,7 +2551,7 @@ include the vanishing coefficients in their outputs.</p> <section id="utilities"> <h2>Utilities</h2> <section id="poldectostring"> -<span id="id112"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDecToString{}</span></code></h3> +<span id="id113"></span><h3><code class="docutils literal notranslate"><span class="pre">\PolDecToString{}</span></code></h3> <p>Syntax: <code class="docutils literal notranslate"><span class="pre">\PolDecToString{decimal</span> <span class="pre">number}</span></code></p> <blockquote> <div><p>This is a utility macro to print decimal numbers. It is an alias @@ -2571,11 +2576,11 @@ documentation.</p> <div><p>Serves to customize the package. Currently only two keys are recognized:</p> <ul class="simple"> -<li><p><code class="docutils literal notranslate"><span class="pre">norr</span></code>: the postfix that <a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> +<li><p><code class="docutils literal notranslate"><span class="pre">norr</span></code>: the postfix that <a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> should append to <code class="docutils literal notranslate"><span class="pre"><sturmname></span></code> to declare the primitive polynomial obtained from original one after removal of all rational roots. The default value is <code class="docutils literal notranslate"><span class="pre">_norr</span></code> (standing for “no rational roots”).</p></li> -<li><p><code class="docutils literal notranslate"><span class="pre">sqfnorr</span></code>: the postfix that <a class="reference internal" href="#id41"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> +<li><p><code class="docutils literal notranslate"><span class="pre">sqfnorr</span></code>: the postfix that <a class="reference internal" href="#id42"><span class="std std-ref">\PolSturmIsolateZeros**{<sturmname>}</span></a> should append to <code class="docutils literal notranslate"><span class="pre"><sturmname></span></code> to declare the primitive polynomial obtained from original one after removal of all rational roots and suppression of all multiplicities. @@ -2590,15 +2595,20 @@ no rational roots”).</p></li> <section id="technicalities"> <h2>Technicalities</h2> <ul> -<li><p>The <code class="docutils literal notranslate"><span class="pre">@</span></code> is allowed in the name of a polynomial (independently of -whether it is of catcode letter or other.) This has always been the -case, but was not documented by polexpr prior to <code class="docutils literal notranslate"><span class="pre">0.8</span></code>, as the -author has never found the time to provide some official guidelines on -how to name temporary variables and the <code class="docutils literal notranslate"><span class="pre">@</span></code> is used already as such -internally; time has still not yet been found to review the situation -but it seems reasonable to recommend at any rate to restrict usage of -<code class="docutils literal notranslate"><span class="pre">@</span></code> to scratch variables of defined macros and to avoid using it to -name document variable.</p></li> +<li><p>Do not use the underscore <code class="docutils literal notranslate"><span class="pre">_</span></code> as the <em>first character</em> of a +polynomial name, even if of catcode letter. This may cause an +infinite loop.</p></li> +<li><p>The <code class="docutils literal notranslate"><span class="pre">@</span></code> is allowed in the names of polynomials, independently of +whether it is of catcode letter or other. In defining macros which +will use <code class="docutils literal notranslate"><span class="pre">\poldef</span></code> to create polynomials it seems reasonable to +adopt the convention that <code class="docutils literal notranslate"><span class="pre">@</span></code> as <em>first</em> character in polynomial +names is to be reserved to temporary auxiliary polynomials.</p> +<div class="admonition attention"> +<p class="admonition-title">Attention</p> +<p>Do not use <code class="docutils literal notranslate"><span class="pre">@_</span></code> at start of polynomial names. This is reserved for +internal usage by the package.</p> +</div> +</li> <li><p>Catcodes are set temporarily by <a class="reference internal" href="#poldef">\poldef</a> macro to safe values prior to grab the polynomial expression up to the terminator <code class="docutils literal notranslate"><span class="pre">;</span></code>, and also by <a class="reference internal" href="#id5">\PolDef</a> prior to grab the @@ -2709,7 +2719,7 @@ documented and unstable. Don’t use them.</p></li> <li><a class="reference internal" href="#poldef-polname-letter-expression-using-the-letter-as-indeterminate"><code class="docutils literal notranslate"><span class="pre">\poldef</span> <span class="pre">polname(letter):=</span> <span class="pre">expression</span> <span class="pre">using</span> <span class="pre">the</span> <span class="pre">letter</span> <span class="pre">as</span> <span class="pre">indeterminate;</span></code></a></li> <li><a class="reference internal" href="#poldef-letter-polname-expr-using-the-letter-as-indeterminate"><code class="docutils literal notranslate"><span class="pre">\PolDef[<letter>]{<polname>}{<expr.</span> <span class="pre">using</span> <span class="pre">the</span> <span class="pre">letter</span> <span class="pre">as</span> <span class="pre">indeterminate>}</span></code></a></li> <li><a class="reference internal" href="#polgenfloatvariant"><code class="docutils literal notranslate"><span class="pre">\PolGenFloatVariant{}</span></code></a></li> -<li><a class="reference internal" href="#poltypeset"><code class="docutils literal notranslate"><span class="pre">\PolTypeset{}</span></code></a><ul> +<li><a class="reference internal" href="#poltypeset"><code class="docutils literal notranslate"><span class="pre">\PolTypeset[]{}</span></code></a><ul> <li><a class="reference internal" href="#poltypesetcmd"><code class="docutils literal notranslate"><span class="pre">\PolTypesetCmd{}</span></code></a><ul> <li><a class="reference internal" href="#polifcoeffisplusorminusone"><code class="docutils literal notranslate"><span class="pre">\PolIfCoeffIsPlusOrMinusOne{}{}</span></code></a></li> </ul> @@ -2719,7 +2729,7 @@ documented and unstable. Don’t use them.</p></li> <li><a class="reference internal" href="#poltypesetcmdprefix"><code class="docutils literal notranslate"><span class="pre">\PolTypesetCmdPrefix{}</span></code></a></li> </ul> </li> -<li><a class="reference internal" href="#id13"><code class="docutils literal notranslate"><span class="pre">\PolTypeset*{}</span></code></a></li> +<li><a class="reference internal" href="#id13"><code class="docutils literal notranslate"><span class="pre">\PolTypeset*[]{}</span></code></a></li> <li><a class="reference internal" href="#pollet"><code class="docutils literal notranslate"><span class="pre">\PolLet{}={}</span></code></a></li> <li><a class="reference internal" href="#polgloballet"><code class="docutils literal notranslate"><span class="pre">\PolGlobalLet{}={}</span></code></a></li> <li><a class="reference internal" href="#polassign-toarray"><code class="docutils literal notranslate"><span class="pre">\PolAssign{}\toarray{}</span></code></a></li> @@ -2727,32 +2737,32 @@ documented and unstable. Don’t use them.</p></li> <li><a class="reference internal" href="#polfromcsv"><code class="docutils literal notranslate"><span class="pre">\PolFromCSV{}{}</span></code></a></li> <li><a class="reference internal" href="#polmapcoeffs"><code class="docutils literal notranslate"><span class="pre">\PolMapCoeffs{}{}</span></code></a></li> <li><a class="reference internal" href="#polreducecoeffs"><code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs{}</span></code></a></li> -<li><a class="reference internal" href="#id20"><code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs*{}</span></code></a></li> +<li><a class="reference internal" href="#id21"><code class="docutils literal notranslate"><span class="pre">\PolReduceCoeffs*{}</span></code></a></li> <li><a class="reference internal" href="#polmakemonic"><code class="docutils literal notranslate"><span class="pre">\PolMakeMonic{}</span></code></a></li> <li><a class="reference internal" href="#polmakeprimitive"><code class="docutils literal notranslate"><span class="pre">\PolMakePrimitive{}</span></code></a></li> <li><a class="reference internal" href="#poldiff"><code class="docutils literal notranslate"><span class="pre">\PolDiff{}{}</span></code></a></li> -<li><a class="reference internal" href="#id25"><code class="docutils literal notranslate"><span class="pre">\PolDiff[]{}{}</span></code></a></li> +<li><a class="reference internal" href="#id26"><code class="docutils literal notranslate"><span class="pre">\PolDiff[]{}{}</span></code></a></li> <li><a class="reference internal" href="#polantidiff"><code class="docutils literal notranslate"><span class="pre">\PolAntiDiff{}{}</span></code></a></li> -<li><a class="reference internal" href="#id28"><code class="docutils literal notranslate"><span class="pre">\PolAntiDiff[]{}{}</span></code></a></li> +<li><a class="reference internal" href="#id29"><code class="docutils literal notranslate"><span class="pre">\PolAntiDiff[]{}{}</span></code></a></li> <li><a class="reference internal" href="#poldivide"><code class="docutils literal notranslate"><span class="pre">\PolDivide{}{}{}{}</span></code></a></li> <li><a class="reference internal" href="#polquo"><code class="docutils literal notranslate"><span class="pre">\PolQuo{}{}{}</span></code></a></li> <li><a class="reference internal" href="#polrem"><code class="docutils literal notranslate"><span class="pre">\PolRem{}{}{}</span></code></a></li> <li><a class="reference internal" href="#polgcd"><code class="docutils literal notranslate"><span class="pre">\PolGCD{}{}{}</span></code></a></li> <li><a class="reference internal" href="#root-localization-routines-via-the-sturm-theorem">Root localization routines via the Sturm Theorem</a><ul> <li><a class="reference internal" href="#poltosturm"><code class="docutils literal notranslate"><span class="pre">\PolToSturm{}{}</span></code></a></li> -<li><a class="reference internal" href="#id35"><code class="docutils literal notranslate"><span class="pre">\PolToSturm*{}{}</span></code></a></li> +<li><a class="reference internal" href="#id36"><code class="docutils literal notranslate"><span class="pre">\PolToSturm*{}{}</span></code></a></li> <li><a class="reference internal" href="#polsturmisolatezeros"><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros{}</span></code></a></li> -<li><a class="reference internal" href="#id38"><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros*{}</span></code></a><ul> +<li><a class="reference internal" href="#id39"><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros*{}</span></code></a><ul> <li><a class="reference internal" href="#polsturmisolatezerosandgetmultiplicities"><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosAndGetMultiplicities{}</span></code></a></li> </ul> </li> -<li><a class="reference internal" href="#id41"><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros**{}</span></code></a><ul> +<li><a class="reference internal" href="#id42"><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZeros**{}</span></code></a><ul> <li><a class="reference internal" href="#polsturmisolatezerosgetmultiplicitiesandrationalroots"><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots</span></code></a></li> </ul> </li> <li><a class="reference internal" href="#polsturmisolatezerosandfindrationalroots"><code class="docutils literal notranslate"><span class="pre">\PolSturmIsolateZerosAndFindRationalRoots{}</span></code></a></li> <li><a class="reference internal" href="#polrefineinterval"><code class="docutils literal notranslate"><span class="pre">\PolRefineInterval*{}{}</span></code></a></li> -<li><a class="reference internal" href="#id46"><code class="docutils literal notranslate"><span class="pre">\PolRefineInterval[]{}{}</span></code></a></li> +<li><a class="reference internal" href="#id47"><code class="docutils literal notranslate"><span class="pre">\PolRefineInterval[]{}{}</span></code></a></li> <li><a class="reference internal" href="#polensureintervallength"><code class="docutils literal notranslate"><span class="pre">\PolEnsureIntervalLength{}{}{}</span></code></a></li> <li><a class="reference internal" href="#polensureintervallengths"><code class="docutils literal notranslate"><span class="pre">\PolEnsureIntervalLengths{}{}</span></code></a></li> <li><a class="reference internal" href="#polsettosturmchainsignchangesat"><code class="docutils literal notranslate"><span class="pre">\PolSetToSturmChainSignChangesAt{}{}{}</span></code></a></li> @@ -2795,8 +2805,8 @@ documented and unstable. Don’t use them.</p></li> <li><a class="reference internal" href="#poltofloatexprcmd"><code class="docutils literal notranslate"><span class="pre">\PolToFloatExprCmd{}</span></code></a></li> </ul> </li> -<li><a class="reference internal" href="#id78"><code class="docutils literal notranslate"><span class="pre">\PolToExpr*{}</span></code></a></li> -<li><a class="reference internal" href="#id80"><code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr*{}</span></code></a></li> +<li><a class="reference internal" href="#id79"><code class="docutils literal notranslate"><span class="pre">\PolToExpr*{}</span></code></a></li> +<li><a class="reference internal" href="#id81"><code class="docutils literal notranslate"><span class="pre">\PolToFloatExpr*{}</span></code></a></li> <li><a class="reference internal" href="#polnthcoeff"><code class="docutils literal notranslate"><span class="pre">\PolNthCoeff{}{}</span></code></a></li> <li><a class="reference internal" href="#polleadingcoeff"><code class="docutils literal notranslate"><span class="pre">\PolLeadingCoeff{}</span></code></a></li> <li><a class="reference internal" href="#poldegree"><code class="docutils literal notranslate"><span class="pre">\PolDegree{}</span></code></a></li> @@ -2886,7 +2896,7 @@ documented and unstable. Don’t use them.</p></li> <li class="right" > <a href="polexpr.html" title="Introduction to polexpr" >previous</a> |</li> - <li class="nav-item nav-item-0"><a href="polexpr.html">polexpr 0.8.7 documentation</a> »</li> + <li class="nav-item nav-item-0"><a href="polexpr.html">polexpr 0.8.7a documentation</a> »</li> <li class="nav-item nav-item-this"><a href="">polexpr reference</a></li> </ul> </div> diff --git a/macros/generic/polexpr/polexpr-ref.rst.txt b/macros/generic/polexpr/polexpr-ref.rst.txt index 028e68626f..0c6ab082af 100644 --- a/macros/generic/polexpr/polexpr-ref.rst.txt +++ b/macros/generic/polexpr/polexpr-ref.rst.txt @@ -33,14 +33,11 @@ exactly arbitrarily big integers or fractions. i.e. per default one ``a, .., z, A, .., Z`` (more letters can be declared under Unicode engines). -- ``polname`` consists of *letters*, *digits*, and also the ``_`` and - ``'`` characters are allowed. The polynomial name **must** start with - a letter: do not use the underscore ``_`` as *first character* of a - polynomial name (even if of catcode letter). No warning is emitted - but dire consequences will ensue. The ``@`` is also allowed - (independently of its catcode "letter" or "other", which does not - matter). It is recommended to avoid using it as first character, - except for temporary polynomial variables. +- ``polname`` is a word (no space) built with *letters*, *digits*, and + the ``@``, ``_`` and ``'`` characters are allowed. The polynomial + name **must** start with a letter. + + For guidelines regarding ``_`` and ``@`` see Technicalities_. - The colon before the equality sign is optional and its (reasonable) catcode does not matter. @@ -1079,7 +1076,8 @@ Non-expandable macros *expression* can make use of previously defined polynomials. Polynomial names must start with a letter and are constituted of - letters, digits, underscores and the right tick ``'``. + letters, digits, underscores, the ``@`` (see Technicalities_) and + the right tick ``'``. The whole xintexpr_ syntax is authorized, as long as the final result is of polynomial type:: @@ -1100,17 +1098,16 @@ Non-expandable macros and also other polynomials (via their names, thanks to previous item). - Notice that any function defined via ``\xintdeffunc`` and using - only algebraic operations (and ople indexing or slicing operations) - should work fine in ``\xintexpr/\xinteval`` with such polynomial - names as argument. + Any function defined via ``\xintdeffunc`` and only algebraic + operations, as well as ople indexing or slicing operations, should + work fine in ``\xintexpr/\xinteval`` with such polynomial names as + argument. - In the case of a constant polynomial, the xintexpr_ variable (not the - internal data structure on which the package macros operate) + In the case of a constant polynomial, the xintexpr_ *variable* (not + the internal data structure on which the package macros operate) associated to it is indistinguishable from a scalar, it is actually a scalar and has lost all traces from its origins as a polynomial (so for example can be used as argument to the ``cos()`` function). - The *function* on the other hand remains a one-argument function, which simply has a constant value. @@ -1122,7 +1119,7 @@ Non-expandable macros Worse, a previously existing floating point function of the same name will - be let undefined again, to avoid hard to debug mismatches between + be made undefined again, to avoid hard to debug mismatches between exact and floating point polynomials. This also applies when the polynomial is produced not via ``\poldef`` or ``\PolDef`` but as result of usage of the other package macros. @@ -1187,21 +1184,21 @@ Syntax: ``\PolGenFloatVariant{<polname>}`` .. _PolTypeset: -``\PolTypeset{}`` -~~~~~~~~~~~~~~~~~ +``\PolTypeset[]{}`` +~~~~~~~~~~~~~~~~~~~ -Syntax: ``\PolTypeset{<pol. expr.>}`` +Syntax: ``\PolTypeset[<letter>]{<pol. expr.>}`` Typesets in descending powers, switching to math mode if in text mode, after evaluating the polynomial expression:: \PolTypeset{mul(x-i,i=1..5)}% possible since polexpr 0.8 - The letter used in the input expression is by default ``x``, + The letter used in the input is by default assumed to be ``x``, but can be modified by a redefinition of `\\PolToExprInVar`_. - It uses also by default the letter ``x`` on output but this one can - be changed via an optional argument:: + The letter used in the output is also by default ``x``. This one + can be changed on-the-fly via the optional ``<letter>``:: \PolTypeset[z]{polname or polynomial expression} @@ -1294,17 +1291,19 @@ Syntax: ``\PolTypesetCmdPrefix{<raw_coeff>}`` .. _PolTypeset*: -``\PolTypeset*{}`` -~~~~~~~~~~~~~~~~~~ +``\PolTypeset*[]{}`` +~~~~~~~~~~~~~~~~~~~~ -Syntax: ``\PolTypeset*{<pol. expr.>}`` +Syntax: ``\PolTypeset*[<letter>]{<pol. expr.>}`` - Typesets in ascending powers. Use ``[<letter>]`` optional argument - (after the ``*``) to use another letter than ``x``. + Typesets in ascending powers. The ``<letter>`` optional argument + (after the ``*``) declares the letter to use in the *output*. + As for `\\PolTypeset <PolTypeset>`_, it defaults to ``x``. + + To modify the expected ``x`` in the *input*, see `\\PolToExprInVar`_. Extended at ``0.8`` to accept general expressions and not only - polynomial names. Redefine `\\PolToExprInVar`_ to use in the - expression another letter than default ``x``. + polynomial names. .. _PolLet: @@ -1667,17 +1666,20 @@ Syntax: ``\PolToSturm{<polname>}{<sturmname>}`` .. note:: - The declaration of the ``S_k``\ 's will overwrite - with no warning previously declared polynomials with identical - names ``S_k``. This is original reason why the macro expects two - names: ``<polname>`` and ``<sturmname>``. + The declaration of the ``S_k``\ 's will overwrite with no warning + previously declared polynomials with identical names ``S_k``, + i.e. ``<sturmname>_k``. This is why the macro was designed + to expect two names: ``<polname>`` and ``<sturmname>``. It is allowed to use the polynomial name ``P`` as Sturm chain - name ``S``: ``\PolToSturm{f}(f}``, but of course fusing the - namespaces is slightly dangerous. And, also `\\PolSturmIsolateZeros - <PolSturmIsolateZeros_>`_ creates variables sharing - the ``<sturmname>`` prefix, which must be taken into account to - avoid name clashes. + name ``S``: ``\PolToSturm{P}{P}``, but this is considered bad + practice for the reason mentioned in the previous paragraph. + + Furthermore, `\\PolSturmIsolateZeros <PolSturmIsolateZeros_>`_ + creates xintexpr_ variables whose names start with + ``<sturmname>L_``, ``<sturmname>R_``, and ``<sturmname>Z_``, also + ``<sturmname>M_`` for holding the multiplicities, and this may + overwrite pre-existing user-defined xintexpr_ variables. .. warning:: @@ -2300,7 +2302,9 @@ Syntax: ``\PolToExpr{<pol. expr.>}`` ^^^^^^^^^^^^^^^^^^^ Defaults to ``x``: the letter used as the polynomial indeterminate - in the macro input. + in the macro input:: + + \def\PolToExprInVar{x}% (default) Recall that declared polynomials are more efficiently used in algebraic expressions without the ``(x)``, i.e. ``P*Q`` is better @@ -3086,16 +3090,20 @@ Syntax: ``\PolDecToString{decimal number}`` Technicalities -------------- +- Do not use the underscore ``_`` as the *first character* of a + polynomial name, even if of catcode letter. This may cause an + infinite loop. + +- The ``@`` is allowed in the names of polynomials, independently of + whether it is of catcode letter or other. In defining macros which + will use ``\poldef`` to create polynomials it seems reasonable to + adopt the convention that ``@`` as *first* character in polynomial + names is to be reserved to temporary auxiliary polynomials. + + .. attention:: -- The ``@`` is allowed in the name of a polynomial (independently of - whether it is of catcode letter or other.) This has always been the - case, but was not documented by polexpr prior to ``0.8``, as the - author has never found the time to provide some official guidelines on - how to name temporary variables and the ``@`` is used already as such - internally; time has still not yet been found to review the situation - but it seems reasonable to recommend at any rate to restrict usage of - ``@`` to scratch variables of defined macros and to avoid using it to - name document variable. + Do not use ``@_`` at start of polynomial names. This is reserved for + internal usage by the package. - Catcodes are set temporarily by `\\poldef <poldef;_>`_ macro to safe values prior to grab the polynomial expression up to the terminator diff --git a/macros/generic/polexpr/polexpr.css b/macros/generic/polexpr/polexpr.css index b95962ac84..c780cab085 100644 --- a/macros/generic/polexpr/polexpr.css +++ b/macros/generic/polexpr/polexpr.css @@ -230,6 +230,10 @@ blockquote::after { clear: both; } +.footnote { + background-color: #f8f9de; /* polexpr.css */ +} + .footnote:target { background-color: #ffa; } diff --git a/macros/generic/polexpr/polexpr.html b/macros/generic/polexpr/polexpr.html index 23dafab2c2..bcb4dba227 100644 --- a/macros/generic/polexpr/polexpr.html +++ b/macros/generic/polexpr/polexpr.html @@ -6,7 +6,7 @@ <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" /> - <title>Introduction to polexpr — polexpr 0.8.7 documentation</title> + <title>Introduction to polexpr — polexpr 0.8.7a documentation</title> <link rel="stylesheet" type="text/css" href="polexpr.css" /> <link rel="next" title="polexpr reference" href="polexpr-ref.html" /> </head><body> @@ -16,7 +16,7 @@ <li class="right" style="margin-right: 10px"> <a href="polexpr-ref.html" title="polexpr reference" accesskey="N">next</a></li> - <li class="nav-item nav-item-0"><a href="#">polexpr 0.8.7 documentation</a> »</li> + <li class="nav-item nav-item-0"><a href="#">polexpr 0.8.7a documentation</a> »</li> <li class="nav-item nav-item-this"><a href="">Introduction to polexpr</a></li> </ul> </div> @@ -28,6 +28,8 @@ <section id="introduction-to-polexpr"> <h1>Introduction to polexpr</h1> +<div class="toctree-wrapper compound"> +</div> <p><a class="reference external" href="https://www.ctan.org/pkg/polexpr">polexpr</a> is a TeX and LaTeX macro package.</p> <p>To use it with Plain or formats other than LaTeX:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="k">\input</span> polexpr.sty @@ -63,7 +65,7 @@ work):</p> <section id="usage-via-xintsession"> <h2>Usage via <a class="reference external" href="https://www.ctan.org/pkg/xintsession">xintsession</a></h2> <p>The simplest manner to get a feeling for the package abilities regarding -in particularl root localization is to use it on the command line +in particular root localization is to use it on the command line via the <a class="reference external" href="https://www.ctan.org/pkg/xintsession">xintsession</a> interface. Here is an example:</p> <div class="highlight-latex notranslate"><div class="highlight"><pre><span></span><span class="s">$</span><span class="nb"> rlwrap etex xintsession</span> <span class="o">[</span><span class="nb">...xintsession welcome message...</span><span class="o">]</span><span class="nb"></span> @@ -111,8 +113,8 @@ defined by <code class="docutils literal notranslate"><span class="pre">polexpr< LaTeX Project Public License version 1.3c.</p> <p>See README.md for details.</p> </section> -<section id="in-memoriam-jurgen-gilg-1967-2022"> -<h2>In memoriam: Jürgen Gilg (1967-2022)</h2> +<section id="in-memoriam-jurgen-gilg-1966-2022"> +<h2>In memoriam: Jürgen Gilg (1966-2022)</h2> <p>My first contact with Jürgen was in January 2018, and his <em>little question</em> about usage of <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> for differentiating polynomials proved the direct cause for the <a class="reference internal" href="polexpr-changes.html#firstrelease"><span class="std std-ref">creation of polexpr</span></a>. His regular comments and questions (often, jointly @@ -129,8 +131,6 @@ thought I had been knowing him for at least 10 years, but it is actually only a bit more than 4 years… I will sorely miss this friendship with a gentle soul from <em>over the Rhine</em>.</p> <p>I dedicate the work which has gone into <a class="reference external" href="https://www.ctan.org/pkg/polexpr">polexpr</a> to Jürgen’s memory.</p> -<div class="toctree-wrapper compound"> -</div> </section> </section> @@ -145,7 +145,7 @@ a gentle soul from <em>over the Rhine</em>.</p> <li><a class="reference internal" href="#">Introduction to polexpr</a><ul> <li><a class="reference internal" href="#usage-via-xintsession">Usage via xintsession</a></li> <li><a class="reference internal" href="#license-is-lppl-1-3c">License is LPPL 1.3c</a></li> -<li><a class="reference internal" href="#in-memoriam-jurgen-gilg-1967-2022">In memoriam: Jürgen Gilg (1967-2022)</a></li> +<li><a class="reference internal" href="#in-memoriam-jurgen-gilg-1966-2022">In memoriam: Jürgen Gilg (1966-2022)</a></li> </ul> </li> </ul> @@ -178,7 +178,7 @@ a gentle soul from <em>over the Rhine</em>.</p> <li class="right" style="margin-right: 10px"> <a href="polexpr-ref.html" title="polexpr reference" >next</a></li> - <li class="nav-item nav-item-0"><a href="#">polexpr 0.8.7 documentation</a> »</li> + <li class="nav-item nav-item-0"><a href="#">polexpr 0.8.7a documentation</a> »</li> <li class="nav-item nav-item-this"><a href="">Introduction to polexpr</a></li> </ul> </div> diff --git a/macros/generic/polexpr/polexpr.rst.txt b/macros/generic/polexpr/polexpr.rst.txt index 3186ab3680..c20ab4ba4f 100644 --- a/macros/generic/polexpr/polexpr.rst.txt +++ b/macros/generic/polexpr/polexpr.rst.txt @@ -1,9 +1,23 @@ .. comment: -*- fill-column: 72; mode: rst -*- + ========================= Introduction to polexpr ========================= +.. toctree:: + :hidden: + :maxdepth: 2 + + polexpr-ref + polexpr-changes + + +.. only :: latex + + Introduction to polexpr + ----------------------- + polexpr_ is a TeX and LaTeX macro package. To use it with Plain or formats other than LaTeX:: @@ -48,7 +62,7 @@ Usage via xintsession_ ---------------------- The simplest manner to get a feeling for the package abilities regarding -in particularl root localization is to use it on the command line +in particular root localization is to use it on the command line via the xintsession_ interface. Here is an example:: $ rlwrap etex xintsession @@ -101,7 +115,7 @@ LaTeX Project Public License version 1.3c. See README.md for details. -In memoriam: Jürgen Gilg (1967-2022) +In memoriam: Jürgen Gilg (1966-2022) ------------------------------------ My first contact with Jürgen was in January 2018, and his *little @@ -143,15 +157,6 @@ I dedicate the work which has gone into polexpr_ to Jürgen's memory. .. _DocUtils: http://docutils.sourceforge.net/docs/index.html -.. toctree:: - :hidden: - :maxdepth: 2 - - polexpr-ref - polexpr-changes - - - .. Local variables: .. sentence-end-double-space: t; .. End: diff --git a/macros/generic/polexpr/polexpr.sty b/macros/generic/polexpr/polexpr.sty index b652675d91..b6b6fba245 100644 --- a/macros/generic/polexpr/polexpr.sty +++ b/macros/generic/polexpr/polexpr.sty @@ -2,7 +2,7 @@ % License: LPPL 1.3c (author-maintained) % Usage: \input polexpr.sty (Plain or other macro formats) % or \usepackage{polexpr} (LaTeX macro format) -% Release 0.8.7 (2022/05/14) of polexpr.sty. This file inputs +% Release 0.8.7a (2022/05/19) of polexpr.sty. This file inputs % polexprcore.tex % polexprexpr.tex % polexprsturm.tex @@ -54,7 +54,7 @@ \XINTsetupcatcodes% (does \endlinechar13 in particular) \XINT_providespackage \ProvidesPackage{polexpr}% - [2022/05/14 v0.8.7 Polynomial expressions with rational coefficients (JFB)]% + [2022/05/19 v0.8.7a Polynomial expressions with rational coefficients (JFB)]% \begingroup \def\x#1/#2/#3 #4\xint:{#1#2#3}% \ifnum\expandafter\x\expanded{\csname ver@xintexpr.sty\endcsname}\xint: diff --git a/macros/generic/polexpr/polexprcore.tex b/macros/generic/polexpr/polexprcore.tex index 8bf7fe2fd0..d3e42d1f1f 100644 --- a/macros/generic/polexpr/polexprcore.tex +++ b/macros/generic/polexpr/polexprcore.tex @@ -1,5 +1,5 @@ %% filename: polexprcore.tex -%% Part of the polexpr package (0.8.7, 2022/05/14) +%% Part of the polexpr package (0.8.7a, 2022/05/19) %% %% Core routines for infix operators +, -, *, //, /:, ^, ** and functions %% diff --git a/macros/generic/polexpr/polexprexpr.tex b/macros/generic/polexpr/polexprexpr.tex index 91087bcf4d..ca4cff963b 100644 --- a/macros/generic/polexpr/polexprexpr.tex +++ b/macros/generic/polexpr/polexprexpr.tex @@ -1,5 +1,5 @@ %% filename: polexprexpr.tex -%% Part of the polexpr package (0.8.7, 2022/05/14) +%% Part of the polexpr package (0.8.7a, 2022/05/19) %% %% Polynomial extensions to the \xintexpr syntax: %% diff --git a/macros/generic/polexpr/polexprsturm.tex b/macros/generic/polexpr/polexprsturm.tex index 2f417c3333..59f0a5d244 100644 --- a/macros/generic/polexpr/polexprsturm.tex +++ b/macros/generic/polexpr/polexprsturm.tex @@ -1,5 +1,5 @@ %% filename: polexprsturm.tex -%% Part of the polexpr package (0.8.7, 2022/05/14) +%% Part of the polexpr package (0.8.7a, 2022/05/19) %% %% Implements the Sturm localization Algorithm %% Added at polexpr 0.4 |