diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-10 21:27:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-10 21:27:44 +0000 |
commit | 37c0ee026c3e506a1ccc5e62115138fa5cfd3cfe (patch) | |
tree | c47337ef6bc24af743b1fc77a26ba030c3fa9871 /Master/texmf-dist/doc/generic/polexpr/polexpr.html | |
parent | fab27e1b949bb2078b26cb126c6354388070ae45 (diff) |
polexpr (10jan22)
git-svn-id: svn://tug.org/texlive/trunk@61559 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/polexpr/polexpr.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/polexpr/polexpr.html | 1263 |
1 files changed, 428 insertions, 835 deletions
diff --git a/Master/texmf-dist/doc/generic/polexpr/polexpr.html b/Master/texmf-dist/doc/generic/polexpr/polexpr.html index 9b6f99138d3..5f695deb4b7 100644 --- a/Master/texmf-dist/doc/generic/polexpr/polexpr.html +++ b/Master/texmf-dist/doc/generic/polexpr/polexpr.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"/> <meta name="generator" content="Docutils 0.16: http://docutils.sourceforge.net/" /> -<title>Package polexpr documentation</title> +<title>polexpr reference documentation</title> <style type="text/css"> /* Minimal style sheet for the HTML output of Docutils. */ @@ -596,16 +596,83 @@ a { text-decoration: none; } </style> </head> <body> -<div class="document" id="package-polexpr-documentation"> -<h1 class="title">Package polexpr documentation</h1> -<p class="subtitle" id="id1">0.8.5 (2021/11/30)</p> - +<div class="document" id="polexpr-reference-documentation"> +<h1 class="title">polexpr reference documentation</h1> +<p class="subtitle" id="id1">0.8.6 (2022/01/09)</p> + +<div class="section" id="introduction"> +<h1><a class="toc-backref" href="#id35">Introduction</a></h1> +<p>This is a TeX and LaTeX macro package.</p> +<p>To use it with Plain or formats other than LaTeX:</p> +<pre class="literal-block">\input polexpr.sty</pre> +<p>To use it with LaTeX:</p> +<pre class="literal-block">\usepackage{polexpr}</pre> +<p>The capabilities of the package are implemented via:</p> +<ul class="simple"> +<li><p>a parser <span class="docutils literal">\poldef</span> allowing to define polynomials via the usual +algebraic notations,</p></li> +<li><p>many functions available for use directly in the powerful <span class="docutils literal">\poldef</span> or +<span class="docutils literal"><span class="pre">\xintexpr/\xinteval</span></span> expandable functional syntax,</p></li> +<li><p>and macros acting on named polynomials which may serve either as +alternative to the functional interface or to provide further +capabilities, such as root localization to arbitrary precision.</p></li> +</ul> +</div> +<div class="section" id="examples-of-root-localization"> +<h1><a class="toc-backref" href="#id36">Examples of root localization</a></h1> +<p>This legacy section has been moved to the +<a class="reference external" href="polexpr-examples.pdf">polexpr-examples.pdf</a> document. +To access it (if previous link does not work):</p> +<pre class="literal-block">texdoc polexpr-examples</pre> +</div> +<div class="section" id="usage-via-xintsession"> +<h1>Usage via <a class="reference external" href="https://www.ctan.org/pkg/xintsession">xintsession</a></h1> +<p>The simplest manner to get a feeling for the package abilities regarding +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> +<pre class="literal-block">$ rlwrap etex xintsession +[...xintsession welcome message...] +Starting in exact mode (floating point evaluations use 16 digits) +>>> &pol +pol mode (i.e. function definitions use \poldef) +>>> f(x) := x^7 - x^6 - 2x + 1; +f = x^7-x^6-2*x+1 + --> &GenFloat(f) lets f become usable as function in fp mode + --> &ROOTS(f) (resp. &ROOTS(f,N)) finds all rational roots exactly and + all irrational roots with at least 10 (resp. N) fractional digits +>>> &ROOTS(f) +Solving for real roots of f and assigning them (please wait...) +(mult. 1) Rootf_1 = -1.0719678841... +(mult. 1) Rootf_2 = 0.4962386948... +(mult. 1) Rootf_3 = 1.3151140860... +Square-free irrational part: x^7-x^6-2*x+1 + --> &REFINEROOTS(f,N) to extend real irr. roots to N fractional digits +>>> &REFINEROOTS(f,40) +Refining real roots of f to 40 digits (please wait...) +(mult. 1) Rootf_1 = -1.0719678841080266034109100331975342338141... +(mult. 1) Rootf_2 = 0.4962386948771497344730618510143671567979... +(mult. 1) Rootf_3 = 1.3151140860165192656960005018679846354234...</pre> +<p>The <a class="reference external" href="https://www.ctan.org/pkg/xintsession">xintsession</a> interface allows to define polynomial variables via its +<span class="docutils literal">&pol</span> mode. It also exposes <a class="reference internal" href="#polexpr08">all polynomial functions added to the +xintexpr syntax</a> by <span class="docutils literal">polexpr</span>. Further, as seen in the +example above it also covers some of the <span class="docutils literal">polexpr</span> capabilities +currently implemented via user macros. This is to be considered a work +in progress, the above <span class="docutils literal">&ROOTS</span> and <span class="docutils literal">&REFINEROOTS</span> may be renamed +into something else, and may have been so already since this +documentation was written.</p> +<p>Any input on the command line at the <a class="reference external" href="https://www.ctan.org/pkg/xintsession">xintsession</a> <span class="docutils literal">>>></span> prompt which +starts with a backslash is executed as TeX macros, so all macros of +<span class="docutils literal">polexpr</span> are in fact already available, including those typesetting +material in background of the interactive session on command line. The +<span class="docutils literal">&ROOTS</span> and <span class="docutils literal">&REFINEROOTS</span> direct their outputs to the +terminal rather than to the TeX page as would the typesetting macros +defined by <span class="docutils literal">polexpr</span> itself.</p> <div class="contents topic" id="contents"> <p class="topic-title">Contents</p> <ul class="simple"> -<li><p><a class="reference internal" href="#usage" id="id35">Usage</a></p></li> -<li><p><a class="reference internal" href="#abstract" id="id36">Abstract</a></p></li> -<li><p><a class="reference internal" href="#prerequisites" id="id37">Prerequisites</a></p></li> +<li><p><a class="reference internal" href="#introduction" id="id35">Introduction</a></p></li> +<li><p><a class="reference internal" href="#examples-of-root-localization" id="id36">Examples of root localization</a></p></li> +<li><p><a class="reference internal" href="#usage-via-xintsession" id="id37">Usage via xintsession</a></p></li> <li><p><a class="reference internal" href="#quick-syntax-overview" id="id38">Quick syntax overview</a></p></li> <li><p><a class="reference internal" href="#the-polexpr-0-8-extensions-to-the-xintexpr-syntax" id="id39">The polexpr <span class="docutils literal">0.8</span> extensions to the <span class="docutils literal">\xintexpr</span> syntax</a></p> <ul> @@ -645,261 +712,182 @@ a { text-decoration: none; } <li><p><a class="reference internal" href="#integral-pol-expr-p-pol-expr-a-pol-expr-b" id="id73"><span class="docutils literal"><span class="pre">integral(<pol.</span> expr. P>, [<pol. expr. a>, <pol. expr. <span class="pre">b>])</span></span></a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#examples-of-localization-of-roots" id="id74">Examples of localization of roots</a></p> -<ul> -<li><p><a class="reference internal" href="#a-typical-example" id="id75">A typical example</a></p></li> -<li><p><a class="reference internal" href="#a-degree-four-polynomial-with-nearby-roots" id="id76">A degree four polynomial with nearby roots</a></p></li> -<li><p><a class="reference internal" href="#the-degree-nine-polynomial-with-0-99-0-999-0-9999-as-triple-roots" id="id77">The degree nine polynomial with 0.99, 0.999, 0.9999 as triple roots</a></p></li> -<li><p><a class="reference internal" href="#a-degree-five-polynomial-with-three-rational-roots" id="id78">A degree five polynomial with three rational roots</a></p></li> -<li><p><a class="reference internal" href="#a-mignotte-type-polynomial" id="id79">A Mignotte type polynomial</a></p></li> -<li><p><a class="reference internal" href="#the-wilkinson-polynomial" id="id80">The Wilkinson polynomial</a></p></li> -<li><p><a class="reference internal" href="#the-second-wilkinson-polynomial" id="id81">The second Wilkinson polynomial</a></p></li> -<li><p><a class="reference internal" href="#the-degree-41-polynomial-with-2-1-9-1-8-0-0-1-1-9-2-as-roots" id="id82">The degree 41 polynomial with -2, -1.9, -1.8, ..., 0, 0.1, ..., 1.9, 2 as roots</a></p></li> -<li><p><a class="reference internal" href="#roots-of-chebyshev-polynomials" id="id83">Roots of Chebyshev polynomials</a></p></li> -</ul> -</li> -<li><p><a class="reference internal" href="#non-expandable-macros" id="id84">Non-expandable macros</a></p> +<li><p><a class="reference internal" href="#non-expandable-macros" id="id74">Non-expandable macros</a></p> <ul> -<li><p><a class="reference internal" href="#poldef-polname-letter-expression-using-the-letter-as-indeterminate" id="id85"><span class="docutils literal">\poldef <span class="pre">polname(letter):=</span> expression using the letter as indeterminate;</span></a></p></li> -<li><p><a class="reference internal" href="#poldef-letter-polname-expr-using-the-letter-as-indeterminate" id="id86"><span class="docutils literal"><span class="pre">\PolDef[<letter>]{<polname>}{<expr.</span> using the letter as indeterminate>}</span></a></p></li> -<li><p><a class="reference internal" href="#polgenfloatvariant-polname" id="id87"><span class="docutils literal"><span class="pre">\PolGenFloatVariant{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poltypeset-pol-expr" id="id88"><span class="docutils literal"><span class="pre">\PolTypeset{<pol.</span> <span class="pre">expr.>}</span></span></a></p> +<li><p><a class="reference internal" href="#poldef-polname-letter-expression-using-the-letter-as-indeterminate" id="id75"><span class="docutils literal">\poldef <span class="pre">polname(letter):=</span> expression using the letter as indeterminate;</span></a></p></li> +<li><p><a class="reference internal" href="#poldef-letter-polname-expr-using-the-letter-as-indeterminate" id="id76"><span class="docutils literal"><span class="pre">\PolDef[<letter>]{<polname>}{<expr.</span> using the letter as indeterminate>}</span></a></p></li> +<li><p><a class="reference internal" href="#polgenfloatvariant-polname" id="id77"><span class="docutils literal"><span class="pre">\PolGenFloatVariant{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltypeset-pol-expr" id="id78"><span class="docutils literal"><span class="pre">\PolTypeset{<pol.</span> <span class="pre">expr.>}</span></span></a></p> <ul> -<li><p><a class="reference internal" href="#poltypesetcmd-raw-coeff" id="id89"><span class="docutils literal"><span class="pre">\PolTypesetCmd{<raw_coeff>}</span></span></a></p> +<li><p><a class="reference internal" href="#poltypesetcmd-raw-coeff" id="id79"><span class="docutils literal"><span class="pre">\PolTypesetCmd{<raw_coeff>}</span></span></a></p> <ul> -<li><p><a class="reference internal" href="#polifcoeffisplusorminusone-t-f" id="id90"><span class="docutils literal"><span class="pre">\PolIfCoeffIsPlusOrMinusOne{T}{F}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polifcoeffisplusorminusone-t-f" id="id80"><span class="docutils literal"><span class="pre">\PolIfCoeffIsPlusOrMinusOne{T}{F}</span></span></a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#poltypesetone-raw-coeff" id="id91"><span class="docutils literal"><span class="pre">\PolTypesetOne{<raw_coeff>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#id9" id="id92"><span class="docutils literal">\PolTypesetMonomialCmd</span></a></p></li> -<li><p><a class="reference internal" href="#poltypesetcmdprefix-raw-coeff" id="id93"><span class="docutils literal"><span class="pre">\PolTypesetCmdPrefix{<raw_coeff>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltypesetone-raw-coeff" id="id81"><span class="docutils literal"><span class="pre">\PolTypesetOne{<raw_coeff>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#id9" id="id82"><span class="docutils literal">\PolTypesetMonomialCmd</span></a></p></li> +<li><p><a class="reference internal" href="#poltypesetcmdprefix-raw-coeff" id="id83"><span class="docutils literal"><span class="pre">\PolTypesetCmdPrefix{<raw_coeff>}</span></span></a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#id11" id="id94"><span class="docutils literal"><span class="pre">\PolTypeset*{<pol.</span> <span class="pre">expr.>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#non-expandable-macros-related-to-the-root-localization-routines" id="id95">Non-expandable macros related to the root localization routines</a></p> +<li><p><a class="reference internal" href="#id11" id="id84"><span class="docutils literal"><span class="pre">\PolTypeset*{<pol.</span> <span class="pre">expr.>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#non-expandable-macros-related-to-the-root-localization-routines" id="id85">Non-expandable macros related to the root localization routines</a></p> <ul> -<li><p><a class="reference internal" href="#poltosturm-polname-sturmname" id="id96"><span class="docutils literal"><span class="pre">\PolToSturm{<polname>}{<sturmname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#id13" id="id97"><span class="docutils literal"><span class="pre">\PolToSturm*{<polname>}{<sturmname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmisolatezeros-sturmname" id="id98"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros{<sturmname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#id15" id="id99"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros*{<sturmname>}</span></span></a></p> +<li><p><a class="reference internal" href="#poltosturm-polname-sturmname" id="id86"><span class="docutils literal"><span class="pre">\PolToSturm{<polname>}{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#id13" id="id87"><span class="docutils literal"><span class="pre">\PolToSturm*{<polname>}{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmisolatezeros-sturmname" id="id88"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#id15" id="id89"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros*{<sturmname>}</span></span></a></p> <ul> -<li><p><a class="reference internal" href="#polsturmisolatezerosandgetmultiplicities-sturmname" id="id100"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosAndGetMultiplicities{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmisolatezerosandgetmultiplicities-sturmname" id="id90"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosAndGetMultiplicities{<sturmname>}</span></span></a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#id17" id="id101"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros**{<sturmname>}</span></span></a></p> +<li><p><a class="reference internal" href="#id17" id="id91"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros**{<sturmname>}</span></span></a></p> <ul> -<li><p><a class="reference internal" href="#polsturmisolatezerosgetmultiplicitiesandrationalroots-sturmname" id="id102"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmisolatezerosgetmultiplicitiesandrationalroots-sturmname" id="id92"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots{<sturmname>}</span></span></a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#polsturmisolatezerosandfindrationalroots-sturmname" id="id103"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosAndFindRationalRoots{<sturmname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polrefineinterval-sturmname-index" id="id104"><span class="docutils literal"><span class="pre">\PolRefineInterval*{<sturmname>}{<index>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polrefineinterval-n-sturmname-index" id="id105"><span class="docutils literal"><span class="pre">\PolRefineInterval[N]{<sturmname>}{<index>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polensureintervallength-sturmname-index-exponent" id="id106"><span class="docutils literal"><span class="pre">\PolEnsureIntervalLength{<sturmname>}{<index>}{<exponent>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polensureintervallengths-sturmname-exponent" id="id107"><span class="docutils literal"><span class="pre">\PolEnsureIntervalLengths{<sturmname>}{<exponent>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervals-varname-sturmname" id="id108"><span class="docutils literal"><span class="pre">\PolPrintIntervals[<varname>]{<sturmname>}</span></span></a></p> +<li><p><a class="reference internal" href="#polsturmisolatezerosandfindrationalroots-sturmname" id="id93"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosAndFindRationalRoots{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polrefineinterval-sturmname-index" id="id94"><span class="docutils literal"><span class="pre">\PolRefineInterval*{<sturmname>}{<index>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polrefineinterval-n-sturmname-index" id="id95"><span class="docutils literal"><span class="pre">\PolRefineInterval[N]{<sturmname>}{<index>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polensureintervallength-sturmname-index-exponent" id="id96"><span class="docutils literal"><span class="pre">\PolEnsureIntervalLength{<sturmname>}{<index>}{<exponent>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polensureintervallengths-sturmname-exponent" id="id97"><span class="docutils literal"><span class="pre">\PolEnsureIntervalLengths{<sturmname>}{<exponent>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervals-varname-sturmname" id="id98"><span class="docutils literal"><span class="pre">\PolPrintIntervals[<varname>]{<sturmname>}</span></span></a></p> <ul> -<li><p><a class="reference internal" href="#polprintintervalsnorealroots" id="id109"><span class="docutils literal">\PolPrintIntervalsNoRealRoots</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalsbeginenv" id="id110"><span class="docutils literal">\PolPrintIntervalsBeginEnv</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalsendenv" id="id111"><span class="docutils literal">\PolPrintIntervalsEndEnv</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalsknownroot" id="id112"><span class="docutils literal">\PolPrintIntervalsKnownRoot</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalsunknownroot" id="id113"><span class="docutils literal">\PolPrintIntervalsUnknownRoot</span></a></p></li> -<li><p><a class="reference internal" href="#id18" id="id114"><span class="docutils literal">\PolPrintIntervalsPrintExactZero</span></a></p></li> -<li><p><a class="reference internal" href="#id19" id="id115"><span class="docutils literal">\PolPrintIntervalsPrintLeftEndPoint</span></a></p></li> -<li><p><a class="reference internal" href="#id20" id="id116"><span class="docutils literal">\PolPrintIntervalsPrintRightEndPoint</span></a></p></li> -</ul> -</li> -<li><p><a class="reference internal" href="#id22" id="id117"><span class="docutils literal"><span class="pre">\PolPrintIntervals*[<varname>]{<sturmname>}</span></span></a></p> +<li><p><a class="reference internal" href="#polprintintervalsnorealroots" id="id99"><span class="docutils literal">\PolPrintIntervalsNoRealRoots</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalsbeginenv" id="id100"><span class="docutils literal">\PolPrintIntervalsBeginEnv</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalsendenv" id="id101"><span class="docutils literal">\PolPrintIntervalsEndEnv</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalsrowseparator" id="id102"><span class="docutils literal">\PolPrintIntervalsRowSeparator</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalsknownroot" id="id103"><span class="docutils literal">\PolPrintIntervalsKnownRoot</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalsunknownroot" id="id104"><span class="docutils literal">\PolPrintIntervalsUnknownRoot</span></a></p></li> +<li><p><a class="reference internal" href="#id18" id="id105"><span class="docutils literal">\PolPrintIntervalsPrintExactZero</span></a></p></li> +<li><p><a class="reference internal" href="#id19" id="id106"><span class="docutils literal">\PolPrintIntervalsPrintLeftEndPoint</span></a></p></li> +<li><p><a class="reference internal" href="#id20" id="id107"><span class="docutils literal">\PolPrintIntervalsPrintRightEndPoint</span></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#id22" id="id108"><span class="docutils literal"><span class="pre">\PolPrintIntervals*[<varname>]{<sturmname>}</span></span></a></p> <ul> -<li><p><a class="reference internal" href="#polprintintervalsprintmultiplicity" id="id118"><span class="docutils literal">\PolPrintIntervalsPrintMultiplicity</span></a></p></li> -</ul> -</li> -<li><p><a class="reference internal" href="#polsettosturmchainsignchangesat-foo-sturmname-value" id="id119"><span class="docutils literal"><span class="pre">\PolSetToSturmChainSignChangesAt{\foo}{<sturmname>}{<value>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsettonbofzeroswithin-foo-sturmname-value-left-value-right" id="id120"><span class="docutils literal"><span class="pre">\PolSetToNbOfZerosWithin{\foo}{<sturmname>}{<value_left>}{<value_right>}</span></span></a></p></li> -</ul> -</li> -<li><p><a class="reference internal" href="#pollet-polname-2-polname-1" id="id121"><span class="docutils literal"><span class="pre">\PolLet{<polname_2>}={<polname_1>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polgloballet-polname-2-polname-1" id="id122"><span class="docutils literal"><span class="pre">\PolGlobalLet{<polname_2>}={<polname_1>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polassign-polname-toarray-macro" id="id123"><span class="docutils literal"><span class="pre">\PolAssign{<polname>}\toarray\macro</span></span></a></p></li> -<li><p><a class="reference internal" href="#polget-polname-fromarray-macro" id="id124"><span class="docutils literal"><span class="pre">\PolGet{<polname>}\fromarray\macro</span></span></a></p></li> -<li><p><a class="reference internal" href="#polfromcsv-polname-csv" id="id125"><span class="docutils literal"><span class="pre">\PolFromCSV{<polname>}{<csv>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polmapcoeffs-macro-polname" id="id126"><span class="docutils literal"><span class="pre">\PolMapCoeffs{\macro}{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polreducecoeffs-polname" id="id127"><span class="docutils literal"><span class="pre">\PolReduceCoeffs{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#id24" id="id128"><span class="docutils literal"><span class="pre">\PolReduceCoeffs*{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polmakemonic-polname" id="id129"><span class="docutils literal"><span class="pre">\PolMakeMonic{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polmakeprimitive-polname" id="id130"><span class="docutils literal"><span class="pre">\PolMakePrimitive{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poldiff-polname-1-polname-2" id="id131"><span class="docutils literal"><span class="pre">\PolDiff{<polname_1>}{<polname_2>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poldiff-n-polname-1-polname-2" id="id132"><span class="docutils literal"><span class="pre">\PolDiff[N]{<polname_1>}{<polname_2>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polantidiff-polname-1-polname-2" id="id133"><span class="docutils literal"><span class="pre">\PolAntiDiff{<polname_1>}{<polname_2>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polantidiff-n-polname-1-polname-2" id="id134"><span class="docutils literal"><span class="pre">\PolAntiDiff[N]{<polname_1>}{<polname_2>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poldivide-polname-1-polname-2-polname-q-polname-r" id="id135"><span class="docutils literal"><span class="pre">\PolDivide{<polname_1>}{<polname_2>}{<polname_Q>}{<polname_R>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polquo-polname-1-polname-2-polname-q" id="id136"><span class="docutils literal"><span class="pre">\PolQuo{<polname_1>}{<polname_2>}{<polname_Q>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polrem-polname-1-polname-2-polname-r" id="id137"><span class="docutils literal"><span class="pre">\PolRem{<polname_1>}{<polname_2>}{<polname_R>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polgcd-polname-1-polname-2-polname-gcd" id="id138"><span class="docutils literal"><span class="pre">\PolGCD{<polname_1>}{<polname_2>}{<polname_GCD>}</span></span></a></p></li> -</ul> -</li> -<li><p><a class="reference internal" href="#expandable-macros" id="id139">Expandable macros</a></p> +<li><p><a class="reference internal" href="#polprintintervalsprintmultiplicity" id="id109"><span class="docutils literal">\PolPrintIntervalsPrintMultiplicity</span></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#polsettosturmchainsignchangesat-foo-sturmname-value" id="id110"><span class="docutils literal"><span class="pre">\PolSetToSturmChainSignChangesAt{\foo}{<sturmname>}{<value>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsettonbofzeroswithin-foo-sturmname-value-left-value-right" id="id111"><span class="docutils literal"><span class="pre">\PolSetToNbOfZerosWithin{\foo}{<sturmname>}{<value_left>}{<value_right>}</span></span></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#pollet-polname-2-polname-1" id="id112"><span class="docutils literal"><span class="pre">\PolLet{<polname_2>}={<polname_1>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polgloballet-polname-2-polname-1" id="id113"><span class="docutils literal"><span class="pre">\PolGlobalLet{<polname_2>}={<polname_1>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polassign-polname-toarray-macro" id="id114"><span class="docutils literal"><span class="pre">\PolAssign{<polname>}\toarray\macro</span></span></a></p></li> +<li><p><a class="reference internal" href="#polget-polname-fromarray-macro" id="id115"><span class="docutils literal"><span class="pre">\PolGet{<polname>}\fromarray\macro</span></span></a></p></li> +<li><p><a class="reference internal" href="#polfromcsv-polname-csv" id="id116"><span class="docutils literal"><span class="pre">\PolFromCSV{<polname>}{<csv>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polmapcoeffs-macro-polname" id="id117"><span class="docutils literal"><span class="pre">\PolMapCoeffs{\macro}{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polreducecoeffs-polname" id="id118"><span class="docutils literal"><span class="pre">\PolReduceCoeffs{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#id24" id="id119"><span class="docutils literal"><span class="pre">\PolReduceCoeffs*{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polmakemonic-polname" id="id120"><span class="docutils literal"><span class="pre">\PolMakeMonic{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polmakeprimitive-polname" id="id121"><span class="docutils literal"><span class="pre">\PolMakePrimitive{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poldiff-polname-1-polname-2" id="id122"><span class="docutils literal"><span class="pre">\PolDiff{<polname_1>}{<polname_2>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poldiff-n-polname-1-polname-2" id="id123"><span class="docutils literal"><span class="pre">\PolDiff[N]{<polname_1>}{<polname_2>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polantidiff-polname-1-polname-2" id="id124"><span class="docutils literal"><span class="pre">\PolAntiDiff{<polname_1>}{<polname_2>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polantidiff-n-polname-1-polname-2" id="id125"><span class="docutils literal"><span class="pre">\PolAntiDiff[N]{<polname_1>}{<polname_2>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poldivide-polname-1-polname-2-polname-q-polname-r" id="id126"><span class="docutils literal"><span class="pre">\PolDivide{<polname_1>}{<polname_2>}{<polname_Q>}{<polname_R>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polquo-polname-1-polname-2-polname-q" id="id127"><span class="docutils literal"><span class="pre">\PolQuo{<polname_1>}{<polname_2>}{<polname_Q>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polrem-polname-1-polname-2-polname-r" id="id128"><span class="docutils literal"><span class="pre">\PolRem{<polname_1>}{<polname_2>}{<polname_R>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polgcd-polname-1-polname-2-polname-gcd" id="id129"><span class="docutils literal"><span class="pre">\PolGCD{<polname_1>}{<polname_2>}{<polname_GCD>}</span></span></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#expandable-macros" id="id130">Expandable macros</a></p> <ul> -<li><p><a class="reference internal" href="#poltoexpr-pol-expr" id="id140"><span class="docutils literal"><span class="pre">\PolToExpr{<pol.</span> <span class="pre">expr.>}</span></span></a></p> +<li><p><a class="reference internal" href="#poltoexpr-pol-expr" id="id131"><span class="docutils literal"><span class="pre">\PolToExpr{<pol.</span> <span class="pre">expr.>}</span></span></a></p> <ul> -<li><p><a class="reference internal" href="#id27" id="id141"><span class="docutils literal">\PolToExprVar</span></a></p></li> -<li><p><a class="reference internal" href="#poltoexprinvar" id="id142"><span class="docutils literal">\PolToExprInVar</span></a></p></li> -<li><p><a class="reference internal" href="#id28" id="id143"><span class="docutils literal">\PolToExprTimes</span></a></p></li> -<li><p><a class="reference internal" href="#poltoexprcaret" id="id144"><span class="docutils literal">\PolToExprCaret</span></a></p></li> -<li><p><a class="reference internal" href="#poltoexprcmd-raw-coeff" id="id145"><span class="docutils literal"><span class="pre">\PolToExprCmd{<raw_coeff>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poltoexproneterm-raw-coeff-exponent" id="id146"><span class="docutils literal"><span class="pre">\PolToExprOneTerm{<raw_coeff>}{<exponent>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poltoexpronetermstylea-raw-coeff-exponent" id="id147"><span class="docutils literal"><span class="pre">\PolToExprOneTermStyleA{<raw_coeff>}{<exponent>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poltoexpronetermstyleb-raw-coeff-exponent" id="id148"><span class="docutils literal"><span class="pre">\PolToExprOneTermStyleB{<raw_coeff>}{<exponent>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poltoexprtermprefix-raw-coeff" id="id149"><span class="docutils literal"><span class="pre">\PolToExprTermPrefix{<raw_coeff>}</span></span></a></p></li> -</ul> -</li> -<li><p><a class="reference internal" href="#poltofloatexpr-pol-expr" id="id150"><span class="docutils literal"><span class="pre">\PolToFloatExpr{<pol.</span> <span class="pre">expr.>}</span></span></a></p> +<li><p><a class="reference internal" href="#id27" id="id132"><span class="docutils literal">\PolToExprVar</span></a></p></li> +<li><p><a class="reference internal" href="#poltoexprinvar" id="id133"><span class="docutils literal">\PolToExprInVar</span></a></p></li> +<li><p><a class="reference internal" href="#id28" id="id134"><span class="docutils literal">\PolToExprTimes</span></a></p></li> +<li><p><a class="reference internal" href="#poltoexprcaret" id="id135"><span class="docutils literal">\PolToExprCaret</span></a></p></li> +<li><p><a class="reference internal" href="#poltoexprcmd-raw-coeff" id="id136"><span class="docutils literal"><span class="pre">\PolToExprCmd{<raw_coeff>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltoexproneterm-raw-coeff-exponent" id="id137"><span class="docutils literal"><span class="pre">\PolToExprOneTerm{<raw_coeff>}{<exponent>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltoexpronetermstylea-raw-coeff-exponent" id="id138"><span class="docutils literal"><span class="pre">\PolToExprOneTermStyleA{<raw_coeff>}{<exponent>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltoexpronetermstyleb-raw-coeff-exponent" id="id139"><span class="docutils literal"><span class="pre">\PolToExprOneTermStyleB{<raw_coeff>}{<exponent>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltoexprtermprefix-raw-coeff" id="id140"><span class="docutils literal"><span class="pre">\PolToExprTermPrefix{<raw_coeff>}</span></span></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#poltofloatexpr-pol-expr" id="id141"><span class="docutils literal"><span class="pre">\PolToFloatExpr{<pol.</span> <span class="pre">expr.>}</span></span></a></p> <ul> -<li><p><a class="reference internal" href="#poltofloatexproneterm-raw-coeff-exponent" id="id151"><span class="docutils literal"><span class="pre">\PolToFloatExprOneTerm{<raw_coeff>}{<exponent>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poltofloatexprcmd-raw-coeff" id="id152"><span class="docutils literal"><span class="pre">\PolToFloatExprCmd{<raw_coeff>}</span></span></a></p></li> -</ul> -</li> -<li><p><a class="reference internal" href="#id30" id="id153"><span class="docutils literal"><span class="pre">\PolToExpr*{<pol.</span> <span class="pre">expr.>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#id32" id="id154"><span class="docutils literal"><span class="pre">\PolToFloatExpr*{<pol.</span> <span class="pre">expr.>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polnthcoeff-polname-index" id="id155"><span class="docutils literal"><span class="pre">\PolNthCoeff{<polname>}{<index>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polleadingcoeff-polname" id="id156"><span class="docutils literal"><span class="pre">\PolLeadingCoeff{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poldegree-polname" id="id157"><span class="docutils literal"><span class="pre">\PolDegree{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#policontent-polname" id="id158"><span class="docutils literal"><span class="pre">\PolIContent{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poltolist-polname" id="id159"><span class="docutils literal"><span class="pre">\PolToList{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poltocsv-polname" id="id160"><span class="docutils literal"><span class="pre">\PolToCSV{<polname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poleval-polname-atexpr-num-expr" id="id161"><span class="docutils literal"><span class="pre">\PolEval{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#poleval-polname-at-value" id="id162"><span class="docutils literal"><span class="pre">\PolEval{<polname>}\At{<value>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polevalreduced-polname-atexpr-num-expr" id="id163"><span class="docutils literal"><span class="pre">\PolEvalReduced{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polevalreduced-polname-at-value" id="id164"><span class="docutils literal"><span class="pre">\PolEvalReduced{<polname>}\At{<value>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polfloateval-polname-atexpr-num-expr" id="id165"><span class="docutils literal"><span class="pre">\PolFloatEval{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polfloateval-polname-at-value" id="id166"><span class="docutils literal"><span class="pre">\PolFloatEval{<polname>}\At{<value>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#expandable-macros-related-to-the-root-localization-routines" id="id167">Expandable macros related to the root localization routines</a></p> +<li><p><a class="reference internal" href="#poltofloatexproneterm-raw-coeff-exponent" id="id142"><span class="docutils literal"><span class="pre">\PolToFloatExprOneTerm{<raw_coeff>}{<exponent>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltofloatexprcmd-raw-coeff" id="id143"><span class="docutils literal"><span class="pre">\PolToFloatExprCmd{<raw_coeff>}</span></span></a></p></li> +</ul> +</li> +<li><p><a class="reference internal" href="#id30" id="id144"><span class="docutils literal"><span class="pre">\PolToExpr*{<pol.</span> <span class="pre">expr.>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#id32" id="id145"><span class="docutils literal"><span class="pre">\PolToFloatExpr*{<pol.</span> <span class="pre">expr.>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polnthcoeff-polname-index" id="id146"><span class="docutils literal"><span class="pre">\PolNthCoeff{<polname>}{<index>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polleadingcoeff-polname" id="id147"><span class="docutils literal"><span class="pre">\PolLeadingCoeff{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poldegree-polname" id="id148"><span class="docutils literal"><span class="pre">\PolDegree{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#policontent-polname" id="id149"><span class="docutils literal"><span class="pre">\PolIContent{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltolist-polname" id="id150"><span class="docutils literal"><span class="pre">\PolToList{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poltocsv-polname" id="id151"><span class="docutils literal"><span class="pre">\PolToCSV{<polname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poleval-polname-atexpr-num-expr" id="id152"><span class="docutils literal"><span class="pre">\PolEval{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#poleval-polname-at-value" id="id153"><span class="docutils literal"><span class="pre">\PolEval{<polname>}\At{<value>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polevalreduced-polname-atexpr-num-expr" id="id154"><span class="docutils literal"><span class="pre">\PolEvalReduced{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polevalreduced-polname-at-value" id="id155"><span class="docutils literal"><span class="pre">\PolEvalReduced{<polname>}\At{<value>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polfloateval-polname-atexpr-num-expr" id="id156"><span class="docutils literal"><span class="pre">\PolFloatEval{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polfloateval-polname-at-value" id="id157"><span class="docutils literal"><span class="pre">\PolFloatEval{<polname>}\At{<value>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#expandable-macros-related-to-the-root-localization-routines" id="id158">Expandable macros related to the root localization routines</a></p> <ul> -<li><p><a class="reference internal" href="#polsturmchainlength-sturmname" id="id168"><span class="docutils literal"><span class="pre">\PolSturmChainLength{<sturmname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmifzeroexactlyknown-sturmname-index-t-f" id="id169"><span class="docutils literal"><span class="pre">\PolSturmIfZeroExactlyKnown{<sturmname>}{<index>}{T}{F}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmisolatedzeroleft-sturmname-index" id="id170"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroLeft{<sturmname>}{<index>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmisolatedzeroright-sturmname-index" id="id171"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroRight{<sturmname>}{<index>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmisolatedzeromultiplicity-sturmname-index" id="id172"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroMultiplicity{<sturmname>}{<index>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmnbofisolatedzeros-sturmname" id="id173"><span class="docutils literal"><span class="pre">\PolSturmNbOfIsolatedZeros{<sturmname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmnbofrootsof-sturmname-lessthanorequalto-value" id="id174"><span class="docutils literal"><span class="pre">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmnbofrootsof-sturmname-lessthanorequaltoexpr-num-expr" id="id175"><span class="docutils literal"><span class="pre">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualToExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmnbwithmultofrootsof-sturmname-lessthanorequalto-value" id="id176"><span class="docutils literal"><span class="pre">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmnbwithmultofrootsof-sturmname-lessthanorequaltoexpr-num-expr" id="id177"><span class="docutils literal"><span class="pre">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualToExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmnbofrationalroots-sturmname" id="id178"><span class="docutils literal"><span class="pre">\PolSturmNbOfRationalRoots{<sturmname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmnbofrationalrootswithmultiplicities-sturmname" id="id179"><span class="docutils literal"><span class="pre">\PolSturmNbOfRationalRootsWithMultiplicities{<sturmname>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmrationalroot-sturmname-k" id="id180"><span class="docutils literal"><span class="pre">\PolSturmRationalRoot{<sturmname>}{<k>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmrationalrootindex-sturmname-k" id="id181"><span class="docutils literal"><span class="pre">\PolSturmRationalRootIndex{<sturmname>}{<k>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polsturmrationalrootmultiplicity-sturmname-k" id="id182"><span class="docutils literal"><span class="pre">\PolSturmRationalRootMultiplicity{<sturmname>}{<k>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#polintervalwidth-sturmname-index" id="id183"><span class="docutils literal"><span class="pre">\PolIntervalWidth{<sturmname>}{<index>}</span></span></a></p></li> -<li><p><a class="reference internal" href="#expandable-macros-for-use-within-execution-of-polprintintervals" id="id184">Expandable macros for use within execution of <span class="docutils literal">\PolPrintIntervals</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalsthevar" id="id185"><span class="docutils literal">\PolPrintIntervalsTheVar</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalstheindex" id="id186"><span class="docutils literal">\PolPrintIntervalsTheIndex</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalsthesturmname" id="id187"><span class="docutils literal">\PolPrintIntervalsTheSturmName</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalstheleftendpoint" id="id188"><span class="docutils literal">\PolPrintIntervalsTheLeftEndPoint</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalstherightendpoint" id="id189"><span class="docutils literal">\PolPrintIntervalsTheRightEndPoint</span></a></p></li> -<li><p><a class="reference internal" href="#polprintintervalsthemultiplicity" id="id190"><span class="docutils literal">\PolPrintIntervalsTheMultiplicity</span></a></p></li> -</ul> -</li> -</ul> -</li> -<li><p><a class="reference internal" href="#booleans-with-default-setting-as-indicated" id="id191">Booleans (with default setting as indicated)</a></p> +<li><p><a class="reference internal" href="#polsturmchainlength-sturmname" id="id159"><span class="docutils literal"><span class="pre">\PolSturmChainLength{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmifzeroexactlyknown-sturmname-index-t-f" id="id160"><span class="docutils literal"><span class="pre">\PolSturmIfZeroExactlyKnown{<sturmname>}{<index>}{T}{F}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmisolatedzeroleft-sturmname-index" id="id161"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroLeft{<sturmname>}{<index>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmisolatedzeroright-sturmname-index" id="id162"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroRight{<sturmname>}{<index>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmisolatedzeromultiplicity-sturmname-index" id="id163"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroMultiplicity{<sturmname>}{<index>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmnbofisolatedzeros-sturmname" id="id164"><span class="docutils literal"><span class="pre">\PolSturmNbOfIsolatedZeros{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmnbofrootsof-sturmname-lessthanorequalto-value" id="id165"><span class="docutils literal"><span class="pre">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmnbofrootsof-sturmname-lessthanorequaltoexpr-num-expr" id="id166"><span class="docutils literal"><span class="pre">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualToExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmnbwithmultofrootsof-sturmname-lessthanorequalto-value" id="id167"><span class="docutils literal"><span class="pre">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmnbwithmultofrootsof-sturmname-lessthanorequaltoexpr-num-expr" id="id168"><span class="docutils literal"><span class="pre">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualToExpr{<num.</span> <span class="pre">expr.>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmnbofrationalroots-sturmname" id="id169"><span class="docutils literal"><span class="pre">\PolSturmNbOfRationalRoots{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmnbofrationalrootswithmultiplicities-sturmname" id="id170"><span class="docutils literal"><span class="pre">\PolSturmNbOfRationalRootsWithMultiplicities{<sturmname>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmrationalroot-sturmname-k" id="id171"><span class="docutils literal"><span class="pre">\PolSturmRationalRoot{<sturmname>}{<k>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmrationalrootindex-sturmname-k" id="id172"><span class="docutils literal"><span class="pre">\PolSturmRationalRootIndex{<sturmname>}{<k>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polsturmrationalrootmultiplicity-sturmname-k" id="id173"><span class="docutils literal"><span class="pre">\PolSturmRationalRootMultiplicity{<sturmname>}{<k>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#polintervalwidth-sturmname-index" id="id174"><span class="docutils literal"><span class="pre">\PolIntervalWidth{<sturmname>}{<index>}</span></span></a></p></li> +<li><p><a class="reference internal" href="#expandable-macros-for-use-within-execution-of-polprintintervals" id="id175">Expandable macros for use within execution of <span class="docutils literal">\PolPrintIntervals</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalsthevar" id="id176"><span class="docutils literal">\PolPrintIntervalsTheVar</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalstheindex" id="id177"><span class="docutils literal">\PolPrintIntervalsTheIndex</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalsthesturmname" id="id178"><span class="docutils literal">\PolPrintIntervalsTheSturmName</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalstheleftendpoint" id="id179"><span class="docutils literal">\PolPrintIntervalsTheLeftEndPoint</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalstherightendpoint" id="id180"><span class="docutils literal">\PolPrintIntervalsTheRightEndPoint</span></a></p></li> +<li><p><a class="reference internal" href="#polprintintervalsthemultiplicity" id="id181"><span class="docutils literal">\PolPrintIntervalsTheMultiplicity</span></a></p></li> +</ul> +</li> +</ul> +</li> +<li><p><a class="reference internal" href="#booleans-with-default-setting-as-indicated" id="id182">Booleans (with default setting as indicated)</a></p> <ul> -<li><p><a class="reference internal" href="#xintverbosefalse" id="id192"><span class="docutils literal">\xintverbosefalse</span></a></p></li> -<li><p><a class="reference internal" href="#polnewpolverbosefalse" id="id193"><span class="docutils literal">\polnewpolverbosefalse</span></a></p></li> -<li><p><a class="reference internal" href="#poltypesetallfalse" id="id194"><span class="docutils literal">\poltypesetallfalse</span></a></p></li> -<li><p><a class="reference internal" href="#poltoexprallfalse" id="id195"><span class="docutils literal">\poltoexprallfalse</span></a></p></li> +<li><p><a class="reference internal" href="#xintverbosefalse" id="id183"><span class="docutils literal">\xintverbosefalse</span></a></p></li> +<li><p><a class="reference internal" href="#polnewpolverbosefalse" id="id184"><span class="docutils literal">\polnewpolverbosefalse</span></a></p></li> +<li><p><a class="reference internal" href="#poltypesetallfalse" id="id185"><span class="docutils literal">\poltypesetallfalse</span></a></p></li> +<li><p><a class="reference internal" href="#poltoexprallfalse" id="id186"><span class="docutils literal">\poltoexprallfalse</span></a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#utilies" id="id196">Utilies</a></p> +<li><p><a class="reference internal" href="#utilies" id="id187">Utilies</a></p> <ul> -<li><p><a class="reference internal" href="#poldectostring-decimal-number" id="id197"><span class="docutils literal">\PolDecToString{decimal number}</span></a></p></li> -<li><p><a class="reference internal" href="#polexprsetup" id="id198"><span class="docutils literal">\polexprsetup</span></a></p></li> +<li><p><a class="reference internal" href="#poldectostring-decimal-number" id="id188"><span class="docutils literal">\PolDecToString{decimal number}</span></a></p></li> +<li><p><a class="reference internal" href="#polexprsetup" id="id189"><span class="docutils literal">\polexprsetup</span></a></p></li> </ul> </li> -<li><p><a class="reference internal" href="#technicalities" id="id199">Technicalities</a></p></li> -<li><p><a class="reference internal" href="#change-log" id="id200">CHANGE LOG</a></p></li> -<li><p><a class="reference internal" href="#acknowledgments" id="id201">Acknowledgments</a></p></li> +<li><p><a class="reference internal" href="#technicalities" id="id190">Technicalities</a></p></li> +<li><p><a class="reference internal" href="#change-log" id="id191">CHANGE LOG</a></p></li> +<li><p><a class="reference internal" href="#acknowledgments" id="id192">Acknowledgments</a></p></li> </ul> </div> -<div class="section" id="usage"> -<h1><a class="toc-backref" href="#id35">Usage</a></h1> -<p>The package can be used with TeX based formats incorporating the e-TeX -primitives. The <span class="docutils literal">\expanded</span> primitive available generally since -TeXLive 2019 is required.</p> -<pre class="literal-block">\input polexpr.sty</pre> -<p>with Plain or other non-LaTeX macro formats, or:</p> -<pre class="literal-block">\usepackage{polexpr}</pre> -<p>with the LaTeX macro format.</p> -<p>The package requires <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> <span class="docutils literal">1.4d</span> or later.</p> -<div class="admonition note"> -<p class="admonition-title">Note</p> -<p>Until <span class="docutils literal">0.8</span> the package only had a LaTeX interface. As a result, -parts of this documentation may still give examples using LaTeX syntax such -as <span class="docutils literal">\newcommand</span>. Please convert to the syntax appropriate to the -TeX macro format used if needed.</p> -</div> -</div> -<div class="section" id="abstract"> -<h1><a class="toc-backref" href="#id36">Abstract</a></h1> -<p>The package provides a parser <span class="docutils literal">\poldef</span> of algebraic polynomial -expressions. As it is based on <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> -the coefficients are allowed to be arbitrary rational numbers.</p> -<p>Once defined, a polynomial is usable by its name either as a numerical -function in <span class="docutils literal"><span class="pre">\xintexpr/\xinteval</span></span>, or for additional polynomial -definitions, or as argument to the package macros. The localization of -real roots to arbitrary precision as well as the determination of all -rational roots is implemented via such macros.</p> -<p>Since release <span class="docutils literal">0.8</span>, polexpr extends the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> -syntax to recognize -polynomials as a new variable type (and not only as functions). -Functionality which previously was implemented via macros such as the -computation of a greatest common divisor is now available directly in -<span class="docutils literal">\xintexpr</span>, <span class="docutils literal">\xinteval</span> or <span class="docutils literal">\poldef</span> via infix or functional -syntax.</p> -</div> -<div class="section" id="prerequisites"> -<h1><a class="toc-backref" href="#id37">Prerequisites</a></h1> -<ul> -<li><p>The user must have some understanding of TeX as a macro-expansion -based programming interface, and in particular of how <span class="docutils literal">\edef</span> -differs from <span class="docutils literal">\def</span>: functionalities of the package as described in -the <a class="reference internal" href="#expandable-macros">Expandable macros</a> section are suitable for usage in <span class="docutils literal">\edef</span>, -<span class="docutils literal">\write</span> or <span class="docutils literal">\xinteval</span> context. At <span class="docutils literal">0.8</span> some of these -macros have an even more convenient functional interface inside -<span class="docutils literal">\xinteval</span>, as is described in a <a class="reference internal" href="#polexpr08">dedicated section</a>.</p> -<p>Despite its name <span class="docutils literal">\poldef</span> is more to be seen as an <span class="docutils literal">\edef</span> -although it does not define a TeX macro (at user level); and of course -<span class="docutils literal">\edef</span> would do usually nothing on the typical input parsed by -<span class="docutils literal">\poldef</span> which generally has no backslash in it: but if this input -does contain macros, they will then be expanded fully and are supposed to -produce recognizable syntax elements in this expansion only context.</p> -<p>Note that the <span class="docutils literal">def</span> in <span class="docutils literal">\poldef</span> reminds us that the macro does -some assignments hence is not usable in expandable only context. Its -whole point is rather to define entities which, them, can then be used -in the expandable only <span class="docutils literal">\xinteval</span> (or <span class="docutils literal">\poldef</span>) context.</p> -</li> -<li><p>The user must have some familiarity with <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> and in -particular must know what <span class="docutils literal">\xintexpr</span>, <span class="docutils literal">\xinttheexpr</span>, -<span class="docutils literal">\xinteval</span> and <span class="docutils literal">\xintfloatexpr</span>, <span class="docutils literal">\xintthefloatexpr</span>, -<span class="docutils literal">\xintfloateval</span> mean and what are the good practices with them.</p></li> -<li><p>The user will become quickly aware that exact computations with -fractions easily lead to very big ones in very few steps; see -<a class="reference internal" href="#polreducecoeffs-polname">\PolReduceCoeffs{<polname>}</a> in this context.</p></li> -<li><p>Finally, it is mandatory to read the entire documentation before -starting to use the package.</p></li> -</ul> </div> <div class="section" id="quick-syntax-overview"> <h1><a class="toc-backref" href="#id38">Quick syntax overview</a></h1> <p>The syntax to define a new polynomial is:</p> <pre class="literal-block">\poldef polname(x):= expression in variable x;</pre> <p>The package is focused on exact computations, so this expression will be -parsed by the services of <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> and accept arbitrarily big integers +parsed by the services of <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> and accept arbitrarily big integers or fractions.</p> <p>If you are interested into numerical evaluations, for example for plotting, it is advisable to use the <span class="docutils literal"><span class="pre">\xintfloatexpr/\xintfloateval</span></span> context, as exact evaluations will quickly lead to manipulating numbers with dozens of digits (when the number of digits exceeds five hundreds, -computation with <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> will become noticeably too slow, if many +computation with <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> will become noticeably too slow, if many evaluations need to be done). For the polynomial to be usable as a function in floating point context, an extra step beyond <span class="docutils literal">\poldef</span> is required: see <a class="reference internal" href="#polgenfloatvariant">\PolGenFloatVariant</a>.</p> @@ -910,7 +898,7 @@ function, are only available in the <span class="docutils literal"><span class=" context. The <a class="reference internal" href="#polgenfloatvariant">\PolGenFloatVariant</a> must be used each time the polynomial gets modified or a new polynomial created out of it, if continuing computations in <span class="docutils literal">\xintfloatexpr</span> are to follow. But (see -<a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> documentation) one can always use a sub-expression such as +<a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> documentation) one can always use a sub-expression such as <span class="docutils literal">\xintexpr <span class="pre">deg(P)\relax</span></span> as sub-component inside a <span class="docutils literal"><span class="pre">\xintfloatexpr/\xintfloateval</span></span>.</p> <p>Conversely if perhaps the coefficients of your polynomial have become @@ -950,10 +938,10 @@ naturally no problem either if <span class="docutils literal">\poldef</span> is text of some other macro which is defined at a time the <span class="docutils literal">;</span> has its standard catcode, as is the case in LaTeX in the document preamble, even with babel+french loaded.</p> -<p>The semi-colon intervenes in certain <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> syntax elements, within +<p>The semi-colon intervenes in certain <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> syntax elements, within parentheses. This (except if the inner semi-colons are hidden within braces: <span class="docutils literal">{;}</span>) will break <span class="docutils literal">\poldef</span> which, contrarily to -<a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a>'s <span class="docutils literal">\xintdefvar</span>, does not balance parentheses when +<a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a>'s <span class="docutils literal">\xintdefvar</span>, does not balance parentheses when fetching the semi-colon delimited polynomial expression.</p> </li> </ul> @@ -1000,7 +988,7 @@ But then it gives zero!</p> <span class="docutils literal"><span class="pre">(1/2)*x^2</span></span> for disambiguation: <span class="docutils literal">x - 1/2*x^2 + <span class="pre">1/3*x^3...</span></span>. It is simpler to move the denominator to the right: <span class="docutils literal">x - x^2/2 + x^3/3 - ...</span>.</p> <p>It is worth noting that <span class="docutils literal"><span class="pre">1/2(x-1)(x-2)</span></span> suffers the same issue: -<a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a>'s tacit multiplication always "ties more", hence this +<a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a>'s tacit multiplication always "ties more", hence this gets interpreted as <span class="docutils literal"><span class="pre">1/(2*(x-1)*(x-2))</span></span> which gives zero by polynomial division. Thus, use in such cases one of <span class="docutils literal"><span class="pre">(1/2)(x-1)(x-2)</span></span>, <span class="docutils literal"><span class="pre">1/2*(x-1)(x-2)</span></span> or <span class="docutils literal"><span class="pre">(x-1)(x-2)/2</span></span>.</p> @@ -1042,10 +1030,10 @@ polynomials</em>.</p> as a <em>function</em>, but <em>only as a variable of polynomial type</em>. Even worse:</p> <pre class="literal-block">(P)(3)% <--- attention!</pre> -<p>will compute <span class="docutils literal">P*3</span>, because one can not in current <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> syntax +<p>will compute <span class="docutils literal">P*3</span>, because one can not in current <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> syntax enclose a function name in parentheses: consequently it is the variable which is used here. There is a <em>meager possibility</em> that in future -some internal changes to <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> would let <span class="docutils literal"><span class="pre">(P)(3)</span></span> actually +some internal changes to <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> would let <span class="docutils literal"><span class="pre">(P)(3)</span></span> actually compute <span class="docutils literal">P(3)</span> and <span class="docutils literal"><span class="pre">(P+Q)(3)</span></span> compute <span class="docutils literal">P(3) + Q(3)</span>, but note that <span class="docutils literal"><span class="pre">(P)(P)</span></span> will then do <span class="docutils literal">P(P)</span> and not <span class="docutils literal">P*P</span>, the latter, current interpretation, looking more @@ -1248,10 +1236,10 @@ about behaviour with <span class="docutils literal">pol2</span> a scalar.</p> <h2><a class="toc-backref" href="#id43">Comparison operators <span class="docutils literal"><, >, <=, >=, ==, !=</span></a></h2> <blockquote> <p><strong>NOT YET IMPLEMENTED</strong></p> -<p>As the internal representation by <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> and <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> of +<p>As the internal representation by <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> and <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> of fractions does not currently require them to be in reduced terms, such operations would be a bit costly as they could not benefit from -the <span class="docutils literal">\pdfstrcmp</span> engine primitive. In fact <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> does not use +the <span class="docutils literal">\pdfstrcmp</span> engine primitive. In fact <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> does not use it yet anywhere, even for normalized pure integers, although it could speed up signifcantly certain aspects of core arithmetic.</p> <p>Equality of polynomials can currently be tested by computing the @@ -1348,7 +1336,7 @@ required:</p> <p>If the first argument is an already declared polynomial <span class="docutils literal">P</span>, use rather the functional form <span class="docutils literal">P()</span> (which can accept a numerical as well as polynomial argument) as it is more efficient.</p> -<p>One can also use <span class="docutils literal">subs()</span> syntax <a class="footnote-reference brackets" href="#id5" id="id4">2</a> (see <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> documentation):</p> +<p>One can also use <span class="docutils literal">subs()</span> syntax <a class="footnote-reference brackets" href="#id5" id="id4">2</a> (see <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> documentation):</p> <pre class="literal-block">\poldef K(x):= subs(-3y^3-5y+1, y = -27x^4+5x-2);</pre> <p>but the <span class="docutils literal">evalp()</span> will use a Horner evaluation scheme which is usually more efficient.</p> @@ -1356,7 +1344,7 @@ usually more efficient.</p> <dt class="label" id="id5"><span class="brackets"><a class="fn-backref" href="#id4">2</a></span></dt> <dd><p>by the way Maple uses the opposite, hence wrong, order <span class="docutils literal"><span class="pre">subs(x=...,</span> P)</span> but was written before computer science -reached the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> heights. However it makes validating +reached the <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> heights. However it makes validating Maple results by polexpr sometimes cumbersome, but perhaps they will update it at some point.</p> </dd> @@ -1395,7 +1383,7 @@ polynomial...).</p> <p><strong>name unstable</strong></p> <p>I am considering in particular using <span class="docutils literal">polcoeffs()</span> to avoid having to overload <span class="docutils literal">coeffs()</span> in future when matrix type -will be added to <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a>.</p> +will be added to <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a>.</p> </blockquote> </blockquote> </div> @@ -1416,7 +1404,7 @@ higher than the degree.</p> <p><strong>name, syntax and output unstable</strong></p> <p>I am hesitating with <span class="docutils literal">coeff(n,pol)</span> syntax and also perhaps using <span class="docutils literal">polcoeff()</span> in order to avoid having to overload <span class="docutils literal">coeff()</span> -when matrix type will be added to <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a>.</p> +when matrix type will be added to <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a>.</p> <p>The current behaviour is at odds with legacy <a class="reference internal" href="#polnthcoeff-polname-index">\PolNthCoeff{<polname>}{<index>}</a> regarding negative indices. Accessing leading or sub-leading coefficients can be done with @@ -1431,7 +1419,7 @@ negative indices do vanish, so I am for time being maintaining this.</p> <blockquote> <p>The leading coefficient. The same result can be obtained from <span class="docutils literal"><span class="pre">coeffs(pol)[-1]</span></span>, which shows also how to generalize to access -sub-leading coefficients. See the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> documentation for +sub-leading coefficients. See the <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> documentation for Python-like indexing syntax.</p> </blockquote> </div> @@ -1443,7 +1431,7 @@ Python-like indexing syntax.</p> <p><strong>unstable</strong></p> <p>Currently the coefficients are reduced to lowest terms (contrarily to legacy behaviour of <a class="reference internal" href="#polmakemonic">\PolMakeMonic</a>), and -additionally the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> <span class="docutils literal">\xintREZ</span> macro is applied which +additionally the <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> <span class="docutils literal">\xintREZ</span> macro is applied which extracts powers of ten from numerator or denominator and stores them internally separately. This is generally beneficial to efficiency of multiplication.</p> @@ -1538,7 +1526,7 @@ coefficients polynomials.</p> <span class="docutils literal"><span class="pre">subs(last(x)/first(x),x=prem(P,Q))</span></span> syntax as it avoids computing <span class="docutils literal">prem(P,Q)</span> twice. This does the trick both in <span class="docutils literal">\poldef</span> or in <span class="docutils literal">\xintdefvar</span>.</p> -<p>However, as is explained in the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> documentation, using +<p>However, as is explained in the <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> documentation, using such syntax in an <span class="docutils literal">\xintdeffunc</span> is (a.t.t.o.w) illusory, due to technicalities of how <span class="docutils literal">subs()</span> gets converted into nested expandable macros. One needs an auxiliary function like this:</p> @@ -1593,7 +1581,7 @@ inputs vanish.</p> alternatively, only one argument which then must be a bracketed list or some expression or variable evaluating to such a "nutple" whose items are polynomials (see the documentation of the scalar <span class="docutils literal">gcd()</span> -in <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a>).</p> +in <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a>).</p> <blockquote> <p>The two variable case could (and was, during development) have been defined at user level like this:</p> @@ -1656,7 +1644,7 @@ experimental status is as follows:</p> <blockquote> <p>This is currently implemented at high level via <span class="docutils literal">\xintdeffunc</span> and recursive definitions, which were copied over from a scalar example -in the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> manual:</p> +in the <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> manual:</p> <pre class="literal-block">\xintdeffunc polpowmod_(P, m, Q) := isone(m)? % m=1: return P modulo Q @@ -1759,10 +1747,13 @@ maintaining this feature whose interest appears dubious.</p> <h2><a class="toc-backref" href="#id73"><span class="docutils literal"><span class="pre">integral(<pol.</span> expr. P>, [<pol. expr. a>, <pol. expr. <span class="pre">b>])</span></span></a></h2> <blockquote> <p><span class="docutils literal">\int_a^b P(t)dt</span>.</p> +<div class="admonition warning"> +<p class="admonition-title">Warning</p> <p>The brackets here are not denoting an optional argument but a <em>mandatory</em> nutple argument <span class="docutils literal">[a, b]</span> with <em>two items</em>.</p> -<p><span class="docutils literal">a</span> and <span class="docutils literal">b</span> are not restricted to be scalars, they can be -polynomials.</p> +</div> +<p><span class="docutils literal">a</span> and <span class="docutils literal">b</span> are not restricted to be scalars, they are allowed to +be themselves polynomial variables or even polynomial expressions.</p> <blockquote> <p>To compute <span class="docutils literal"><span class="pre">\int_{x-1}^x</span> P(t)dt</span> it is more efficient to use <span class="docutils literal"><span class="pre">intfrom(x-1)</span></span>.</p> @@ -1774,431 +1765,16 @@ overhead to the pure scalar case ?</p> </blockquote> </div> </div> -<div class="section" id="examples-of-localization-of-roots"> -<h1><a class="toc-backref" href="#id74">Examples of localization of roots</a></h1> -<div class="admonition note"> -<p class="admonition-title">Note</p> -<p>As of <span class="docutils literal">0.8</span>, <span class="docutils literal">polexpr</span> is usable with Plain TeX and not only with -LaTeX, the examples of this section have been converted to use a -syntax which (at least at time of writing, March 2021) works in both.</p> -<p>This is done in order for the examples to be easy to copy-paste to -documents using either macro format.</p> -</div> -<p>This (slightly over-extended) section gives various examples of usage of -the package macros such as <a class="reference internal" href="#poltosturm">\PolToSturm</a>, <a class="reference internal" href="#polsturmisolatezeros">\PolSturmIsolateZeros</a> -and <a class="reference internal" href="#polprintintervals">\PolPrintIntervals</a> for root localization, which exist since -release <span class="docutils literal">0.4</span> (2018/02/16). The capacity to find all rational roots -exactly was added at <span class="docutils literal">0.7.2</span> (2018/12/09).</p> -<p>The examples demonstrate that the package can find all real roots to -arbitrary precision, find the multiplicities of real roots, and find -exactly all rational roots.</p> -<p>Perhaps future releases will implement other approaches, which are known -to be generically computationally more efficient, at least in high -degrees, than the <a class="reference external" href="https://en.wikipedia.org/wiki/Sturm%27s_theorem">Sturm theorem</a> based approach. This is not -immediate priority though (perhaps support of multivariate polynomials -would be more important feature; or localization of complex roots).</p> -<ul> -<li><p>To make printed decimal numbers more enjoyable than via -<span class="docutils literal">\xintTeXsignedFrac</span> (or <span class="docutils literal">\xintTeXsignedOver</span> with Plain):</p> -<pre class="literal-block">\def\PolTypesetOne#1{\PolDecToString{\xintREZ{#1}}}%</pre> -<p><span class="docutils literal">\PolDecToString</span> will use decimal notation to incorporate the power -of ten part; and the <span class="docutils literal">\xintREZ</span> will have the effect to suppress -trailing zeros if present in raw numerator (if those digits end up -after decimal mark.) Notice that the above are expandable macros and -that one can also do:</p> -<pre class="literal-block">\def\PolToExprCmd#1{\PolDecToString{\xintREZ{#1}}}%</pre> -<p>to modify output of <a class="reference internal" href="#poltoexpr-pol-expr">\PolToExpr{<pol. expr.>}</a>.</p> -</li> -<li><p>For extra info in log file use <span class="docutils literal">\xintverbosetrue</span>.</p></li> -</ul> -<div class="admonition warning"> -<p class="admonition-title">Warning</p> -<p>Package macros related to root localization create (user-level) new -polynomials, or numeric variables, via a naming scheme which -postfixes a root name <span class="docutils literal"><sturmname></span> in various ways (see -<a class="reference internal" href="#poltosturm-polname-sturmname">\PolToSturm{<polname>}{<sturmname>}</a> and -<a class="reference internal" href="#polsturmisolatezeros-sturmname">\PolSturmIsolateZeros{<sturmname>}</a>). It is thus advisable to -keep the <span class="docutils literal"><sturmname></span> name-space separate from the one used to -name polynomial or scalar variables.</p> -<p>Regrettably all examples here use the condemnable -<span class="docutils literal"><span class="pre">\PolToSturm{f}{f}</span></span> practice which fuses the name-spaces. This can -lead to problems if one is not aware of the consequances.</p> -</div> -<div class="section" id="a-typical-example"> -<h2><a class="toc-backref" href="#id75">A typical example</a></h2> -<p>In this example the polynomial is square-free.</p> -<pre class="literal-block">\poldef f(x) := x^7 - x^6 - 2x + 1; - -\PolToSturm{f}{f} -\PolSturmIsolateZeros{f} -The \PolTypeset{f} polynomial has \PolSturmNbOfIsolatedZeros{f} distinct real -roots which are located in the following intervals: -\PolPrintIntervals{f} -Here is the second root with ten more decimal digits: -\PolRefineInterval[10]{f}{2} -$$\PolSturmIsolatedZeroLeft{f}{2}<Z_2<\PolSturmIsolatedZeroRight{f}{2}$$ -And here is the first root with twenty digits after decimal mark: -\PolEnsureIntervalLength{f}{1}{-20} -$$\PolSturmIsolatedZeroLeft{f}{1}<Z_1<\PolSturmIsolatedZeroRight{f}{1}$$ -The first element of the Sturm chain has degree $\PolDegree{f_0}$. As -this is the original degreee $\PolDegree{f}$ we know that $f$ is square free. -Its derivative is up to a constant \PolTypeset{f_1} (in this example -it is identical with it). -\PolToSturm{f_1}{f_1}\PolSturmIsolateZeros{f_1}% -The derivative has \PolSturmNbOfIsolatedZeros{f_1} distinct real -roots: -\PolPrintIntervals[W]{f_1} -\PolEnsureIntervalLengths{f_1}{-10}% -Here they are with ten digits after decimal mark: -\PolPrintIntervals[W]{f_1} -\PolDiff{f_1}{f''} -\PolToSturm{f''}{f''} -\PolSturmIsolateZeros{f''} -The second derivative is \PolTypeset{f''}. -It has \PolSturmNbOfIsolatedZeros{f''} distinct real -roots: -\PolPrintIntervals[X]{f''} -Here is the positive one with 20 digits after decimal mark: -\PolEnsureIntervalLength{f''}{2}{-20}% -$$X_2 = \PolSturmIsolatedZeroLeft{f''}{2}\dots$$ -The more mathematically advanced among our dear readers will be able -to give the exact value for $X_2$!</pre> -</div> -<div class="section" id="a-degree-four-polynomial-with-nearby-roots"> -<h2><a class="toc-backref" href="#id76">A degree four polynomial with nearby roots</a></h2> -<p>Notice that this example is a bit outdated as <span class="docutils literal">0.7</span> release has -added <span class="docutils literal"><span class="pre">\PolSturmIsolateZeros**{<sturmname>}</span></span> which would find exactly -the roots. The steps here retain their interest when one is interested -in finding isolating intervals for example to prepare some demonstration -of dichotomy method.</p> -<pre class="literal-block">\PolDef{Q}{(x-1.050001)(x-1.105001)(x-1.110501)(x-1.111051)} -\PolTypeset{Q} -\PolToSturm{Q}{Q} % it is allowed to use same prefix for Sturm chain -\PolSturmIsolateZeros{Q} -\PolPrintIntervals{Q} -% reports 1.0 < Z_1 < 1.1, 1.10 < Z_2 < 1.11, 1.110 < Z_3 < 1.111, and 1.111 < Z_4 < 1.112 -% but the above bounds do not allow minimizing separation between roots -% so we refine: -\PolRefineInterval*{Q}{1} -\PolRefineInterval*{Q}{2} -\PolRefineInterval*{Q}{3} -\PolRefineInterval*{Q}{4} -\PolPrintIntervals{Q} -% reports 1.05 < Z_1 < 1.06, 1.105 < Z_2 < 1.106, 1.1105 < Z_3 < 1.1106, -% and 1.11105 < Z_4 < 1.11106. -\PolEnsureIntervalLengths{Q}{-6} -\PolPrintIntervals{Q} -% of course finds here all roots exactly</pre> -</div> -<div class="section" id="the-degree-nine-polynomial-with-0-99-0-999-0-9999-as-triple-roots"> -<h2><a class="toc-backref" href="#id77">The degree nine polynomial with 0.99, 0.999, 0.9999 as triple roots</a></h2> -<pre class="literal-block">% define a user command (xinttools is loaded automatically by polexpr) -\def\showmultiplicities#1{% #1 = "sturmname" -\xintFor* ##1 in {\xintSeq{1}{\PolSturmNbOfIsolatedZeros{#1}}}\do{% - The multiplicity is \PolSturmIsolatedZeroMultiplicity{#1}{##1} - \PolSturmIfZeroExactlyKnown{#1}{##1}% - {at the root $x=\PolSturmIsolatedZeroLeft{#1}{##1}$} - {for the root such that - $\PolSturmIsolatedZeroLeft{#1}{##1}<x<\PolSturmIsolatedZeroRight{#1}{##1}$} - \par -}}% -\PolDef{f}{(x-0.99)^3(x-0.999)^3(x-0.9999)^3} -\def\PolTypesetOne#1{\PolDecToString{\xintREZ{#1}}} -\PolTypeset{f}\par -\PolToSturm{f}{f}% it is allowed to use "polname" as "sturmname" too -\PolSturmIsolateZerosAndGetMultiplicities{f}% use the "sturmname" here -% or \PolSturmIsolateZeros*{f} which is exactly the same, but shorter.. - -\showmultiplicities{f}</pre> -<p>In this example, the output will look like this (but using math mode):</p> -<pre class="literal-block">x^9 - 8.9667x^8 + 35.73400293x^7 - 83.070418400109x^6 + 124.143648875193123x^5 -- 123.683070924326075877x^4 + 82.149260397553075617891x^3 -- 35.07602992699900159127007x^2 + 8.7364078733314648368671733x -- 0.967100824643585986488103299 - -The multiplicity is 3 at the root x = 0.99 -The multiplicity is 3 at the root x = 0.999 -The multiplicity is 3 at the root x = 0.9999</pre> -<p>On first pass, these rational roots were found (due to their relative -magnitudes, using <span class="docutils literal">\PolSturmIsolateZeros**</span> was not needed here). But -multiplicity computation works also with (decimal) roots not yet -identified or with non-decimal or irrational roots.</p> -<p>It is fun to modify only a tiny bit the polynomial and see if polexpr -survives:</p> -<pre class="literal-block">\PolDef{g}{f(x)+1e-27} -\PolTypeset{g}\par -\PolToSturm{g}{g} -\PolSturmIsolateZeros*{g} - -\showmultiplicities{g}</pre> -<p>This produces:</p> -<pre class="literal-block">x^9 - 8.9667x^8 + 35.73400293x^7 - 83.070418400109x^6 + 124.143648875193123x^5 -- 123.683070924326075877x^4 + 82.149260397553075617891x^3 -- 35.07602992699900159127007x^2 + 8.7364078733314648368671733x -- 0.967100824643585986488103298 - -The multiplicity is 1 for the root such that 0.98 < x < 0.99 -The multiplicity is 1 for the root such that 0.9991 < x < 0.9992 -The multiplicity is 1 for the root such that 0.9997 < x < 0.9998</pre> -<p>Which means that the multiplicity-3 roots each became a real and a pair of -complex ones. Let's see them better:</p> -<pre class="literal-block">\PolEnsureIntervalLengths{g}{-10} - -\showmultiplicities{g}</pre> -<p>which produces:</p> -<pre class="literal-block">The multiplicity is 1 for the root such that 0.9899888032 < x < 0.9899888033 -The multiplicity is 1 for the root such that 0.9991447980 < x < 0.9991447981 -The multiplicity is 1 for the root such that 0.9997663986 < x < 0.9997663987</pre> -</div> -<div class="section" id="a-degree-five-polynomial-with-three-rational-roots"> -<h2><a class="toc-backref" href="#id78">A degree five polynomial with three rational roots</a></h2> -<pre class="literal-block">\poldef Q(x) := 1581755751184441 x^5 - -14907697165025339 x^4 - +48415668972339336 x^3 - -63952057791306264 x^2 - +46833913221154895 x - -49044360626280925; - -\PolToSturm{Q}{Q} - \def\PolTypesetCmdPrefix#1{\allowbreak\xintiiifSgn{#1}{}{+}{+}}% - $Q_0(x) = \PolTypeset{Q_0}$ -\PolSturmIsolateZeros**{Q} -\PolPrintIntervals{Q} - -$Q_{norr}(x) = \PolTypeset{Q_norr}$</pre> -<p>Here, all real roots are rational:</p> -<pre class="literal-block">Z_1 = 833719/265381 -Z_2 = 165707065/52746197 -Z_3 = 355/113 - -Q_norr(x) = x^2 + 1</pre> -<p>And let's get their decimal expansion too:</p> -<pre class="literal-block">% print decimal expansion of the found roots -\def\PolPrintIntervalsPrintExactZero - {\xintTrunc{20}{\PolPrintIntervalsTheLeftEndPoint}\dots} -\PolPrintIntervals{Q} - -Z_1 = 3.14159265358107777120... -Z_2 = 3.14159265358979340254... -Z_3 = 3.14159292035398230088...</pre> -</div> -<div class="section" id="a-mignotte-type-polynomial"> -<h2><a class="toc-backref" href="#id79">A Mignotte type polynomial</a></h2> -<pre class="literal-block">\PolDef{P}{x^10 - (10x-1)^2}% -\PolTypeset{P} % prints it in expanded form -\PolToSturm{P}{P} % we can use same prefix for Sturm chain -\PolSturmIsolateZeros{P} % finds 4 real roots -This polynomial has \PolSturmNbOfIsolatedZeros{P} distinct real roots: -\PolPrintIntervals{P}% -% reports -2 < Z_1 < -1, 0.09 < Z_2 < 0.10, 0.1 < Z_3 < 0.2, 1 < Z_4 < 2 -Let us refine the second and third intervals to separate the corresponding -roots: -\PolRefineInterval*{P}{2}% will refine to 0.0999990 < Z_2 < 0.0999991 -\PolRefineInterval*{P}{3}% will refine to 0.100001 < Z_3 < 0.100002 -\PolPrintIntervals{P}% -Let us now get to know all roots with 10 digits after decimal mark: -\PolEnsureIntervalLengths{P}{-10}% -\PolPrintIntervals{P}% now all roots are known 10 decimal digits after mark -Finally, we display 20 digits of the second root: -\PolEnsureIntervalLength{P}{2}{-20}% makes Z_2 known with 20 digits after mark -$$\PolSturmIsolatedZeroLeft{P}{2}<Z_2<\PolSturmIsolatedZeroRight{P}{2}$$</pre> -<p>The last line produces:</p> -<pre class="literal-block">0.09999900004999650028 < Z_2 < 0.09999900004999650029</pre> -</div> -<div class="section" id="the-wilkinson-polynomial"> -<h2><a class="toc-backref" href="#id80">The Wilkinson polynomial</a></h2> -<p>See <a class="reference external" href="https://en.wikipedia.org/wiki/Wilkinson%27s_polynomial">Wilkinson polynomial</a>.</p> -<pre class="literal-block">%\xintverbosetrue % for the curious... - -\poldef f(x) := mul((x - i), i = 1..20); - -\def\PolTypesetCmdPrefix#1{\allowbreak\xintiiifSgn{#1}{}{+}{+}}% -\def\PolTypesetOne#1{\xintDecToString{#1}}% - -\noindent\PolTypeset{f} - -\PolToSturm{f}{f} -\PolSturmIsolateZeros{f} -\PolPrintIntervals{f} - -% \vfill\eject - -% This page is commented out because it takes about 30s on a 2GHz CPU -% \poldef g(x) := f(x) - 2**{-23} x**19; - -% \PolToSturm{g}{g} -% \noindent\PolTypeset{g_0}% integer coefficient primitive polynomial - -% \PolSturmIsolateZeros{g} -% \PolEnsureIntervalLengths{g}{-10} - -% \let\PolPrintIntervalsPrintMultiplicity\empty -% \PolPrintIntervals*{g}</pre> -<p>The first polynomial:</p> -<pre class="literal-block">f(x) = x**20 -- 210 x**19 -+ 20615 x**18 -- 1256850 x**17 -+ 53327946 x**16 -- 1672280820 x**15 -+ 40171771630 x**14 -- 756111184500 x**13 -+ 11310276995381 x**12 -- 135585182899530 x**11 -+ 1307535010540395 x**10 -- 10142299865511450 x**9 -+ 63030812099294896 x**8 -- 311333643161390640 x**7 -+ 1206647803780373360 x**6 -- 3599979517947607200 x**5 -+ 8037811822645051776 x**4 -- 12870931245150988800 x**3 -+ 13803759753640704000 x**2 -- 8752948036761600000 x -+ 2432902008176640000</pre> -<p>is handled fast enough, but the modified one <span class="docutils literal">f(x) - <span class="pre">2**-23</span> <span class="pre">x**19</span></span> takes about 20x longer.</p> -<p>The Sturm chain polynomials -have integer coefficients with up to 321 digits, whereas (surprisingly -perhaps) those of the Sturm chain polynomials derived from <span class="docutils literal">f</span> never -have more than 21 digits ...</p> -<p>Once the Sturm chain is computed and the zeros isolated, obtaining their -decimal digits is relatively faster. Here is for the ten real roots of -<span class="docutils literal">f(x) - <span class="pre">2**-23</span> <span class="pre">x**19</span></span> as computed by the code above:</p> -<pre class="literal-block">Z_1 = 0.9999999999... -Z_2 = 2.0000000000... -Z_3 = 2.9999999999... -Z_4 = 4.0000000002... -Z_5 = 4.9999999275... -Z_6 = 6.0000069439... -Z_7 = 6.9996972339... -Z_8 = 8.0072676034... -Z_9 = 8.9172502485... -Z_10 = 20.8469081014...</pre> -</div> -<div class="section" id="the-second-wilkinson-polynomial"> -<h2><a class="toc-backref" href="#id81">The second Wilkinson polynomial</a></h2> -<pre class="literal-block">\poldef f(x) := mul(x - 2^-i, i = 1..20); - -%\PolTypeset{f} - -\PolToSturm{f}{f} -\PolSturmIsolateZeros**{f} -\PolPrintIntervals{f}</pre> -<p>This takes more time than the polynomial with 1, 2, .., 20 as roots but -less than the latter modified by the <span class="docutils literal"><span class="pre">2**-23</span></span> tiny change to one of its -coefficient.</p> -<p>Here is the output (with release 0.7.2):</p> -<pre class="literal-block">Z_1 = 0.00000095367431640625 -Z_2 = 0.0000019073486328125 -Z_3 = 0.000003814697265625 -Z_4 = 0.00000762939453125 -Z_5 = 0.0000152587890625 -Z_6 = 0.000030517578125 -Z_7 = 0.00006103515625 -Z_8 = 0.0001220703125 -Z_9 = 1/4096 -Z_10 = 1/2048 -Z_11 = 1/1024 -Z_12 = 1/512 -Z_13 = 1/256 -Z_14 = 1/128 -Z_15 = 0.015625 -Z_16 = 0.03125 -Z_17 = 0.0625 -Z_18 = 0.125 -Z_19 = 0.25 -Z_20 = 0.5</pre> -<p>There is some incoherence in output format which has its source in the -fact that some roots are found in branches which can only find decimal -roots, whereas some are found in branches which could find general -fractions and they use <span class="docutils literal">\xintIrr</span> before storage of the found root. -This may evolve in future.</p> -</div> -<div class="section" id="the-degree-41-polynomial-with-2-1-9-1-8-0-0-1-1-9-2-as-roots"> -<h2><a class="toc-backref" href="#id82">The degree 41 polynomial with -2, -1.9, -1.8, ..., 0, 0.1, ..., 1.9, 2 as roots</a></h2> -<pre class="literal-block">\PolDef{P}{mul((x-i*1e-1), i=-20..20)}% i/10 is same but less efficient</pre> -<p>In the defining expression we could have used <span class="docutils literal">i/10</span> but this gives -less efficient internal form for the coefficients (the <span class="docutils literal">10</span>'s end up -in denominators).</p> -<p>Using <span class="docutils literal">\PolToExpr{P}</span> after having done</p> -<pre class="literal-block">\def\PolToExprCmd#1{\PolDecToString{\xintREZ{#1}}}</pre> -<p>we get this expanded form:</p> -<pre class="literal-block">x^41 --28.7*x^39 -+375.7117*x^37 --2975.11006*x^35 -+15935.28150578*x^33 --61167.527674162*x^31 -+173944.259366417394*x^29 --373686.963560544648*x^27 -+613012.0665016658846445*x^25 --771182.31133138163125495*x^23 -+743263.86672885754888959569*x^21 --545609.076599482896371978698*x^19 -+301748.325708943677229642930528*x^17 --123655.8987669450434698869844544*x^15 -+36666.1782054884005855608205864192*x^13 --7607.85821367459445649518380016128*x^11 -+1053.15135918687298508885950223794176*x^9 --90.6380005918141132650786081964032*x^7 -+4.33701563847327366842552218288128*x^5 --0.0944770968420804735498178265088*x^3 -+0.00059190121813899276854174416896*x</pre> -<p>which shows coefficients with up to 36 significant digits...</p> -<p>Stress test: not a hard challenge to <span class="docutils literal">xint + polexpr</span>, but be a bit -patient!</p> -<pre class="literal-block">\PolDef{P}{mul((x-i*1e-1), i=-20..20)}% -\PolToSturm{P}{S} % dutifully computes S_0, ..., S_{41} -% the [1] optional argument limits the search to interval (-10,10) -\PolSturmIsolateZeros[1]{S} % finds *exactly* (but a bit slowly) all 41 roots! -\PolPrintIntervals{S} % nice, isn't it?</pre> -<div class="admonition note"> -<p class="admonition-title">Note</p> -<p>Release <span class="docutils literal">0.5</span> has <em>experimental</em> addition of optional argument -<span class="docutils literal">E</span> to <span class="docutils literal">\PolSturmIsolateZeros</span>. It instructs to search roots only -in interval <span class="docutils literal"><span class="pre">(-10^E,</span> 10^E)</span>. Important: the extremities are -<em>assumed to not be roots</em>. In this example, the <span class="docutils literal">[1]</span> in -<span class="docutils literal"><span class="pre">\PolSturmIsolateZeros[1]{S}</span></span> gives some speed gain; without it, it -turns out in this case that <span class="docutils literal">polexpr</span> would have started with -<span class="docutils literal"><span class="pre">(-10^6,</span> 10^6)</span> interval.</p> -<p>Please note that this will probably get replaced in future by the -specification of a general interval. Do not rely on meaning of this -optional argument keeping the same.</p> -</div> -</div> -<div class="section" id="roots-of-chebyshev-polynomials"> -<h2><a class="toc-backref" href="#id83">Roots of Chebyshev polynomials</a></h2> -<pre class="literal-block">\poldef T_0(x) := 1; -\poldef T_1(x) := x; -\catcode`@ 11 -\count@ 2 -\xintloop - \poldef T_\the\count@(x) := - 2x*T_\the\numexpr\count@-1\relax - - T_\the\numexpr\count@-2\relax; -\ifnum\count@<15 -\advance\count@ 1 -\repeat -\catcode`@ 12 - -$$T_{15} = \PolTypeset[X]{T_15}$$ -\PolToSturm{T_15}{T_15} -\PolSturmIsolateZeros{T_15} -\PolEnsureIntervalLengths{T_15}{-10} -\PolPrintIntervals{T_15}</pre> -</div> -</div> <div class="section" id="non-expandable-macros"> -<h1><a class="toc-backref" href="#id84">Non-expandable macros</a></h1> +<h1><a class="toc-backref" href="#id74">Non-expandable macros</a></h1> <div class="admonition note"> <p class="admonition-title">Note</p> <p>At <span class="docutils literal">0.8</span> <span class="docutils literal">polexpr</span> is usable with Plain TeX and not only with LaTeX. Some examples given in this section may be using LaTeX syntax -such as <span class="docutils literal">\renewcommand</span>. Convert to TeX primitives as appropriate -if testing with a non LaTeX macro format.</p> +such as <span class="docutils literal">\renewcommand</span>.</p> </div> <div class="section" id="poldef-polname-letter-expression-using-the-letter-as-indeterminate"> -<span id="poldef"></span><h2><a class="toc-backref" href="#id85"><span class="docutils literal">\poldef <span class="pre">polname(letter):=</span> expression using the letter as indeterminate;</span></a></h2> +<span id="poldef"></span><h2><a class="toc-backref" href="#id75"><span class="docutils literal">\poldef <span class="pre">polname(letter):=</span> expression using the letter as indeterminate;</span></a></h2> <blockquote> <p>This evaluates the <em>polynomial expression</em> and stores the coefficients in a private structure accessible later via other @@ -2206,7 +1782,7 @@ package macros, used with argument <span class="docutils literal">polname</span> <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 <span class="docutils literal">'</span>.</p> -<p>The whole <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> syntax is authorized, as long as the final +<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> <pre class="literal-block">\poldef polname(z) := add((-1)^i z^(2i+1)/(2i+1)!, i = 0..10);</pre> <p>With fractional coefficients, beware the <a class="reference internal" href="#warningtacit">tacit multiplication issue</a>.</p> @@ -2224,7 +1800,7 @@ item).</p></li> only algebraic operations (and ople indexing or slicing operations) should work fine in <span class="docutils literal"><span class="pre">\xintexpr/\xinteval</span></span> with such polynomial names as argument.</p> -<p>In the case of a constant polynomial, the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> variable (not the +<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) associated to it is indistinguishable from a scalar, it is actually a scalar and has lost all traces from its origins as a polynomial @@ -2267,7 +1843,7 @@ the original expression has to be done manually, if needed.</p> </blockquote> </div> <div class="section" id="poldef-letter-polname-expr-using-the-letter-as-indeterminate"> -<span id="id8"></span><h2><a class="toc-backref" href="#id86"><span class="docutils literal"><span class="pre">\PolDef[<letter>]{<polname>}{<expr.</span> using the letter as indeterminate>}</span></a></h2> +<span id="id8"></span><h2><a class="toc-backref" href="#id76"><span class="docutils literal"><span class="pre">\PolDef[<letter>]{<polname>}{<expr.</span> using the letter as indeterminate>}</span></a></h2> <blockquote> <p>Does the same as <a class="reference internal" href="#poldef">\poldef</a> in an undelimited macro format, the main interest is to avoid potential problems with the @@ -2277,7 +1853,7 @@ of a <span class="docutils literal">[<letter>]</span> optional argument, t </blockquote> </div> <div class="section" id="polgenfloatvariant-polname"> -<span id="polgenfloatvariant"></span><h2><a class="toc-backref" href="#id87"><span class="docutils literal"><span class="pre">\PolGenFloatVariant{<polname>}</span></span></a></h2> +<span id="polgenfloatvariant"></span><h2><a class="toc-backref" href="#id77"><span class="docutils literal"><span class="pre">\PolGenFloatVariant{<polname>}</span></span></a></h2> <blockquote> <p>Makes the polynomial also usable in the <span class="docutils literal"><span class="pre">\xintfloatexpr/\xintfloateval</span></span> parser. It will therein evaluates @@ -2294,7 +1870,7 @@ the new polynomial is to be used in <span class="docutils literal">\xintfloateva </blockquote> </div> <div class="section" id="poltypeset-pol-expr"> -<span id="poltypeset"></span><h2><a class="toc-backref" href="#id88"><span class="docutils literal"><span class="pre">\PolTypeset{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="poltypeset"></span><h2><a class="toc-backref" href="#id78"><span class="docutils literal"><span class="pre">\PolTypeset{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Typesets in descending powers, switching to math mode if in text mode, after evaluating the polynomial expression:</p> @@ -2311,7 +1887,7 @@ can be re-defined for customization. Their default definitions are expandable, but this is not a requirement.</p> </blockquote> <div class="section" id="poltypesetcmd-raw-coeff"> -<span id="poltypesetcmd"></span><h3><a class="toc-backref" href="#id89"><span class="docutils literal"><span class="pre">\PolTypesetCmd{<raw_coeff>}</span></span></a></h3> +<span id="poltypesetcmd"></span><h3><a class="toc-backref" href="#id79"><span class="docutils literal"><span class="pre">\PolTypesetCmd{<raw_coeff>}</span></span></a></h3> <blockquote> <p>Its package definition checks if the coefficient is <span class="docutils literal">1</span> or <span class="docutils literal"><span class="pre">-1</span></span> and then skips printing the <span class="docutils literal">1</span>, except for the coefficient of @@ -2321,7 +1897,7 @@ degree zero. Also it sets the conditional deciding behaviour of minus one, is handled by <a class="reference internal" href="#poltypesetone-raw-coeff">\PolTypesetOne{<raw_coeff>}</a>.</p> </blockquote> <div class="section" id="polifcoeffisplusorminusone-t-f"> -<span id="polifcoeffisplusorminusone"></span><h4><a class="toc-backref" href="#id90"><span class="docutils literal"><span class="pre">\PolIfCoeffIsPlusOrMinusOne{T}{F}</span></span></a></h4> +<span id="polifcoeffisplusorminusone"></span><h4><a class="toc-backref" href="#id80"><span class="docutils literal"><span class="pre">\PolIfCoeffIsPlusOrMinusOne{T}{F}</span></span></a></h4> <blockquote> <p>This macro is a priori undefined.</p> <p>It is defined via the default <a class="reference internal" href="#poltypesetcmd-raw-coeff">\PolTypesetCmd{<raw_coeff>}</a> to be @@ -2335,10 +1911,10 @@ plus or minus one, and <span class="docutils literal">F</span> if not. It choos </div> </div> <div class="section" id="poltypesetone-raw-coeff"> -<span id="poltypesetone"></span><h3><a class="toc-backref" href="#id91"><span class="docutils literal"><span class="pre">\PolTypesetOne{<raw_coeff>}</span></span></a></h3> +<span id="poltypesetone"></span><h3><a class="toc-backref" href="#id81"><span class="docutils literal"><span class="pre">\PolTypesetOne{<raw_coeff>}</span></span></a></h3> <blockquote> <p>Defaults to <span class="docutils literal">\xintTeXsignedFrac</span> (LaTeX) or <span class="docutils literal">\xintTeXsignedOver</span> -(else). But these <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> old legacy macros are a bit +(else). But these <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> old legacy macros are a bit annoying as they insist in exhibiting a power of ten rather than using simpler decimal notation.</p> <p>As alternative, one can do definitions such as:</p> @@ -2350,7 +1926,7 @@ using simpler decimal notation.</p> </blockquote> </div> <div class="section" id="id9"> -<span id="poltypesetmonomialcmd"></span><h3><a class="toc-backref" href="#id92"><span class="docutils literal">\PolTypesetMonomialCmd</span></a></h3> +<span id="poltypesetmonomialcmd"></span><h3><a class="toc-backref" href="#id82"><span class="docutils literal">\PolTypesetMonomialCmd</span></a></h3> <blockquote> <p>This decides how a monomial (in variable <span class="docutils literal">\PolVar</span> and with exponent <span class="docutils literal">\PolIndex</span>) is to be printed. The default does nothing @@ -2361,7 +1937,7 @@ for the constant term, <span class="docutils literal">\PolVar</span> for the fir </blockquote> </div> <div class="section" id="poltypesetcmdprefix-raw-coeff"> -<span id="poltypesetcmdprefix"></span><h3><a class="toc-backref" href="#id93"><span class="docutils literal"><span class="pre">\PolTypesetCmdPrefix{<raw_coeff>}</span></span></a></h3> +<span id="poltypesetcmdprefix"></span><h3><a class="toc-backref" href="#id83"><span class="docutils literal"><span class="pre">\PolTypesetCmdPrefix{<raw_coeff>}</span></span></a></h3> <blockquote> <p>Expands to a <span class="docutils literal">+</span> if the <span class="docutils literal">raw_coeff</span> is zero or positive, and to nothing if <span class="docutils literal">raw_coeff</span> is negative, as in latter case the @@ -2373,7 +1949,7 @@ separator in the typeset formula. Not used for the first term.</p> </div> </div> <div class="section" id="id11"> -<span id="id10"></span><h2><a class="toc-backref" href="#id94"><span class="docutils literal"><span class="pre">\PolTypeset*{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="id10"></span><h2><a class="toc-backref" href="#id84"><span class="docutils literal"><span class="pre">\PolTypeset*{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Typesets in ascending powers. Use <span class="docutils literal">[<letter>]</span> optional argument (after the <span class="docutils literal">*</span>) to use another letter than <span class="docutils literal">x</span>.</p> @@ -2383,14 +1959,14 @@ expression another letter than default <span class="docutils literal">x</span>.< </blockquote> </div> <div class="section" id="non-expandable-macros-related-to-the-root-localization-routines"> -<h2><a class="toc-backref" href="#id95">Non-expandable macros related to the root localization routines</a></h2> +<h2><a class="toc-backref" href="#id85">Non-expandable macros related to the root localization routines</a></h2> <p>As <a class="reference internal" href="#poltosturm-polname-sturmname">\PolToSturm{<polname>}{<sturmname>}</a> and <a class="reference internal" href="#polsturmisolatezeros-sturmname">\PolSturmIsolateZeros{<sturmname>}</a> and variants declare additional polynomial or scalar variables with names based on <span class="docutils literal"><sturmname></span> as prefix, it is advisable to keep the <span class="docutils literal"><sturmname></span> namespace separate from the one applying to <span class="docutils literal">\xintexpr</span> variables generally, or to polynomials.</p> <div class="section" id="poltosturm-polname-sturmname"> -<span id="poltosturm"></span><h3><a class="toc-backref" href="#id96"><span class="docutils literal"><span class="pre">\PolToSturm{<polname>}{<sturmname>}</span></span></a></h3> +<span id="poltosturm"></span><h3><a class="toc-backref" href="#id86"><span class="docutils literal"><span class="pre">\PolToSturm{<polname>}{<sturmname>}</span></span></a></h3> <blockquote> <p>With <span class="docutils literal"><polname></span> being for example <span class="docutils literal">P</span>, and <span class="docutils literal"><sturmname></span> being for example <span class="docutils literal">S</span>, the macro starts by computing the derivative @@ -2475,7 +2051,7 @@ most the degree of <span class="docutils literal">S_0</span>.</p> </blockquote> </div> <div class="section" id="id13"> -<span id="id12"></span><h3><a class="toc-backref" href="#id97"><span class="docutils literal"><span class="pre">\PolToSturm*{<polname>}{<sturmname>}</span></span></a></h3> +<span id="id12"></span><h3><a class="toc-backref" href="#id87"><span class="docutils literal"><span class="pre">\PolToSturm*{<polname>}{<sturmname>}</span></span></a></h3> <blockquote> <p>Does the same as <a class="reference internal" href="#poltosturm">un-starred version</a> and additionally it keeps for user usage the memory of the <em>un-normalized</em> (but still @@ -2485,7 +2061,7 @@ polynomials <span class="docutils literal">sturmname_k_</span>, <span class="doc </blockquote> </div> <div class="section" id="polsturmisolatezeros-sturmname"> -<span id="polsturmisolatezeros"></span><h3><a class="toc-backref" href="#id98"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros{<sturmname>}</span></span></a></h3> +<span id="polsturmisolatezeros"></span><h3><a class="toc-backref" href="#id88"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros{<sturmname>}</span></span></a></h3> <blockquote> <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 intervals as there are distinct real roots.</p> @@ -2495,7 +2071,7 @@ intervals as there are distinct real roots.</p> <a class="reference internal" href="#poltosturm-polname-sturmname">\PolToSturm{<polname>}{<sturmname>}</a>.</p> </div> <p>After its execution they are two types of such intervals (stored in -memory and accessible via macros or <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> variables, see below):</p> +memory and accessible via macros or <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> variables, see below):</p> <ul class="simple"> <li><p>singleton <span class="docutils literal">{a}</span>: then <span class="docutils literal">a</span> is a root, (necessarily a decimal number, but not all such decimal numbers are exactly identified yet).</p></li> @@ -2528,7 +2104,7 @@ this issue.</p> for future computations in <span class="docutils literal">\xintexpr/xinteval</span> or <span class="docutils literal">\poldef</span> as variables <span class="docutils literal">SL_1</span>, <span class="docutils literal">SL_2</span>, etc..., for the left end-points and <span class="docutils literal">SR_1</span>, <span class="docutils literal">SR_2</span>, ..., for the right end-points.</p> -<p>Additionally, <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> variable <span class="docutils literal">SZ_1_isknown</span> will have value +<p>Additionally, <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> variable <span class="docutils literal">SZ_1_isknown</span> will have value <span class="docutils literal">1</span> if the root in the first interval is known, and <span class="docutils literal">0</span> otherwise. And similarly for the other intervals.</p> <div class="admonition important"> @@ -2566,8 +2142,8 @@ subsequent usage of <a class="reference internal" href="#polrefineinterval-sturm other localization improving macros.</p> <div class="admonition note"> <p class="admonition-title">Note</p> -<p>The current polexpr implementation defines the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> variables -and <a class="reference external" href="http://www.ctan.org/pkg/xint">xinttools</a> arrays as described above with global scope. On the +<p>The current polexpr implementation defines the <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> variables +and <a class="reference external" href="https://www.ctan.org/pkg/xint">xinttools</a> arrays as described above with global scope. On the other hand the Sturm sequence polynomials obey the current scope.</p> <p>This is perhaps a bit inconsistent and may change in future.</p> </div> @@ -2585,7 +2161,7 @@ are studied in numerical mathematics.</p> </blockquote> </div> <div class="section" id="id15"> -<span id="id14"></span><h3><a class="toc-backref" href="#id99"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros*{<sturmname>}</span></span></a></h3> +<span id="id14"></span><h3><a class="toc-backref" href="#id89"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros*{<sturmname>}</span></span></a></h3> <blockquote> <p>The macro does the same as <a class="reference internal" href="#polsturmisolatezeros-sturmname">\PolSturmIsolateZeros{<sturmname>}</a> and then in addition it does the extra work to determine all @@ -2595,7 +2171,7 @@ multiplicities of the real roots.</p> to the multiplicity of the root located in the <span class="docutils literal">index</span>-th interval (intervals are enumerated from left to right, with index starting at <span class="docutils literal">1</span>).</p> -<p>Furthermore, if for example the <span class="docutils literal"><sturmname></span> is <span class="docutils literal">S</span>, <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> +<p>Furthermore, if for example the <span class="docutils literal"><sturmname></span> is <span class="docutils literal">S</span>, <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> variables <span class="docutils literal">SM_1</span>, <span class="docutils literal">SM_2</span>... hold the multiplicities thus computed.</p> <div class="admonition note"> @@ -2606,18 +2182,17 @@ execution, <a class="reference internal" href="#poltosturm">\PolToSturm</a>, eve non-square-free Sturm chain polynomials as user-level genuine polynomials, stores their data in private macros.</p> </div> -<p>See <a class="reference internal" href="#the-degree-nine-polynomial-with-0-99-0-999-0-9999-as-triple-roots">The degree nine polynomial with 0.99, 0.999, 0.9999 as triple -roots</a> for an example.</p> +<p>See <span class="docutils literal">The degree nine polynomial with 0.99, 0.999, 0.9999 as triple roots</span> example in <span class="docutils literal"><span class="pre">polexpr-examples.pdf</span></span>.</p> </blockquote> <div class="section" id="polsturmisolatezerosandgetmultiplicities-sturmname"> -<span id="polsturmisolatezerosandgetmultiplicities"></span><h4><a class="toc-backref" href="#id100"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosAndGetMultiplicities{<sturmname>}</span></span></a></h4> +<span id="polsturmisolatezerosandgetmultiplicities"></span><h4><a class="toc-backref" href="#id90"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosAndGetMultiplicities{<sturmname>}</span></span></a></h4> <blockquote> <p>This is another name for <a class="reference internal" href="#id15">\PolSturmIsolateZeros*{<sturmname>}</a>.</p> </blockquote> </div> </div> <div class="section" id="id17"> -<span id="id16"></span><h3><a class="toc-backref" href="#id101"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros**{<sturmname>}</span></span></a></h3> +<span id="id16"></span><h3><a class="toc-backref" href="#id91"><span class="docutils literal"><span class="pre">\PolSturmIsolateZeros**{<sturmname>}</span></span></a></h3> <blockquote> <p>The macro does the same as <a class="reference internal" href="#id15">\PolSturmIsolateZeros*{<sturmname>}</a> and in addition it does the extra work to determine all the <em>rational</em> @@ -2637,18 +2212,17 @@ between the degrees of these two polynomials (see also roots have been removed (see <a class="reference internal" href="#polexprsetup">\polexprsetup</a>), i.e. it contains the irrational roots of the original polynomial, with the same multiplicities.</p> -<p>See <a class="reference internal" href="#a-degree-five-polynomial-with-three-rational-roots">A degree five polynomial with three rational -roots</a> for an example.</p> +<p>See <span class="docutils literal">A degree five polynomial with three rational roots</span> in <span class="docutils literal"><span class="pre">polexpr-examples.pdf</span></span>.</p> </blockquote> <div class="section" id="polsturmisolatezerosgetmultiplicitiesandrationalroots-sturmname"> -<span id="polsturmisolatezerosgetmultiplicitiesandrationalroots"></span><h4><a class="toc-backref" href="#id102"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots{<sturmname>}</span></span></a></h4> +<span id="polsturmisolatezerosgetmultiplicitiesandrationalroots"></span><h4><a class="toc-backref" href="#id92"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosGetMultiplicitiesAndRationalRoots{<sturmname>}</span></span></a></h4> <blockquote> <p>This is another name for <a class="reference internal" href="#id17">\PolSturmIsolateZeros**{<sturmname>}</a>.</p> </blockquote> </div> </div> <div class="section" id="polsturmisolatezerosandfindrationalroots-sturmname"> -<h3><a class="toc-backref" href="#id103"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosAndFindRationalRoots{<sturmname>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id93"><span class="docutils literal"><span class="pre">\PolSturmIsolateZerosAndFindRationalRoots{<sturmname>}</span></span></a></h3> <blockquote> <p>This works exactly like <a class="reference internal" href="#id17">\PolSturmIsolateZeros**{<sturmname>}</a> (inclusive of declaring the polynomials <span class="docutils literal">sturmname_sqf_norr</span> and @@ -2661,7 +2235,7 @@ their multiplicities at the same time.</p> </div> <div class="admonition attention"> <p class="admonition-title">Attention!</p> -<p>This macro does <em>not</em> define <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> variables +<p>This macro does <em>not</em> define <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> variables <span class="docutils literal">sturmnameM_1</span>, <span class="docutils literal">sturmnameM_2</span>, ... holding the multiplicities and it leaves the multiplicity array (whose accessor is <a class="reference internal" href="#polsturmisolatedzeromultiplicity-sturmname-index">\PolSturmIsolatedZeroMultiplicity{<sturmname>}{<index>}</a>) into @@ -2678,7 +2252,7 @@ rational root anyhow).</p> </blockquote> </div> <div class="section" id="polrefineinterval-sturmname-index"> -<span id="polrefineinterval"></span><h3><a class="toc-backref" href="#id104"><span class="docutils literal"><span class="pre">\PolRefineInterval*{<sturmname>}{<index>}</span></span></a></h3> +<span id="polrefineinterval"></span><h3><a class="toc-backref" href="#id94"><span class="docutils literal"><span class="pre">\PolRefineInterval*{<sturmname>}{<index>}</span></span></a></h3> <blockquote> <p>The <span class="docutils literal">index</span>-th interval (starting indexing at one) is further subdivided as many times as is necessary in order for the newer @@ -2688,7 +2262,7 @@ strictly separated from the other roots.</p> </blockquote> </div> <div class="section" id="polrefineinterval-n-sturmname-index"> -<span id="polrefineinterval-n"></span><h3><a class="toc-backref" href="#id105"><span class="docutils literal"><span class="pre">\PolRefineInterval[N]{<sturmname>}{<index>}</span></span></a></h3> +<span id="polrefineinterval-n"></span><h3><a class="toc-backref" href="#id95"><span class="docutils literal"><span class="pre">\PolRefineInterval[N]{<sturmname>}{<index>}</span></span></a></h3> <blockquote> <p>The <span class="docutils literal">index</span>-th interval (starting count at one) is further subdivided once, reducing its length by a factor of 10. This is done @@ -2696,7 +2270,7 @@ subdivided once, reducing its length by a factor of 10. This is done </blockquote> </div> <div class="section" id="polensureintervallength-sturmname-index-exponent"> -<span id="polensureintervallength"></span><h3><a class="toc-backref" href="#id106"><span class="docutils literal"><span class="pre">\PolEnsureIntervalLength{<sturmname>}{<index>}{<exponent>}</span></span></a></h3> +<span id="polensureintervallength"></span><h3><a class="toc-backref" href="#id96"><span class="docutils literal"><span class="pre">\PolEnsureIntervalLength{<sturmname>}{<index>}{<exponent>}</span></span></a></h3> <blockquote> <p>The <span class="docutils literal">index</span>-th interval is subdivided until its length becomes at most <span class="docutils literal">10^E</span>. This means (for <span class="docutils literal">E<0</span>) that the first <span class="docutils literal"><span class="pre">-E</span></span> digits @@ -2704,7 +2278,7 @@ after decimal mark of the <span class="docutils literal">k</span>th root will th </blockquote> </div> <div class="section" id="polensureintervallengths-sturmname-exponent"> -<span id="polensureintervallengths"></span><h3><a class="toc-backref" href="#id107"><span class="docutils literal"><span class="pre">\PolEnsureIntervalLengths{<sturmname>}{<exponent>}</span></span></a></h3> +<span id="polensureintervallengths"></span><h3><a class="toc-backref" href="#id97"><span class="docutils literal"><span class="pre">\PolEnsureIntervalLengths{<sturmname>}{<exponent>}</span></span></a></h3> <blockquote> <p>The intervals as obtained from <span class="docutils literal">\PolSturmIsolateZeros</span> are (if necessary) subdivided further by (base 10) dichotomy in order for @@ -2714,7 +2288,7 @@ each of them to have length at most <span class="docutils literal">10^E</span>.< </blockquote> </div> <div class="section" id="polprintintervals-varname-sturmname"> -<span id="polprintintervals"></span><h3><a class="toc-backref" href="#id108"><span class="docutils literal"><span class="pre">\PolPrintIntervals[<varname>]{<sturmname>}</span></span></a></h3> +<span id="polprintintervals"></span><h3><a class="toc-backref" href="#id98"><span class="docutils literal"><span class="pre">\PolPrintIntervals[<varname>]{<sturmname>}</span></span></a></h3> <blockquote> <p>This is a convenience macro which prints the bounds for the roots <span class="docutils literal">Z_1</span>, <span class="docutils literal">Z_2</span>, ... (the optional argument <span class="docutils literal">varname</span> allows to @@ -2735,7 +2309,7 @@ primitives.</p> <p>See next macros which govern its output.</p> </blockquote> <div class="section" id="polprintintervalsnorealroots"> -<h4><a class="toc-backref" href="#id109"><span class="docutils literal">\PolPrintIntervalsNoRealRoots</span></a></h4> +<h4><a class="toc-backref" href="#id99"><span class="docutils literal">\PolPrintIntervalsNoRealRoots</span></a></h4> <blockquote> <p>Executed in place of an <span class="docutils literal">array</span> environment, when there are no real roots. Default definition:</p> @@ -2743,21 +2317,34 @@ real roots. Default definition:</p> </blockquote> </div> <div class="section" id="polprintintervalsbeginenv"> -<h4><a class="toc-backref" href="#id110"><span class="docutils literal">\PolPrintIntervalsBeginEnv</span></a></h4> +<h4><a class="toc-backref" href="#id100"><span class="docutils literal">\PolPrintIntervalsBeginEnv</span></a></h4> <blockquote> -<p>Default definition:</p> +<p>Default definition (given here for LaTeX, Plain has a variant):</p> <pre class="literal-block">\newcommand\PolPrintIntervalsBeginEnv{\[\begin{array}{rcccl}}</pre> +<p>A simpler <span class="docutils literal">center</span> 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="#polprintintervalsknownroot">\PolPrintIntervalsKnownRoot</a> and +<a class="reference internal" href="#polprintintervalsunknownroot">\PolPrintIntervalsUnknownRoot</a>.</p> +<p>Prior to <span class="docutils literal">0.8.6</span> it was not possible to use here for example +<span class="docutils literal">\begin{align}</span> due to the latter executing twice in contents.</p> </blockquote> </div> <div class="section" id="polprintintervalsendenv"> -<h4><a class="toc-backref" href="#id111"><span class="docutils literal">\PolPrintIntervalsEndEnv</span></a></h4> +<h4><a class="toc-backref" href="#id101"><span class="docutils literal">\PolPrintIntervalsEndEnv</span></a></h4> <blockquote> <p>Default definition:</p> <pre class="literal-block">\newcommand\PolPrintIntervalsEndEnv{\end{array}\]}</pre> </blockquote> </div> +<div class="section" id="polprintintervalsrowseparator"> +<h4><a class="toc-backref" href="#id102"><span class="docutils literal">\PolPrintIntervalsRowSeparator</span></a></h4> +<blockquote> +<p>Expands by default to <span class="docutils literal">\\</span> with LaTeX and to <span class="docutils literal">\cr</span> with Plain</p> +<p>Added at <span class="docutils literal">0.8.6</span>.</p> +</blockquote> +</div> <div class="section" id="polprintintervalsknownroot"> -<h4><a class="toc-backref" href="#id112"><span class="docutils literal">\PolPrintIntervalsKnownRoot</span></a></h4> +<h4><a class="toc-backref" href="#id103"><span class="docutils literal">\PolPrintIntervalsKnownRoot</span></a></h4> <blockquote> <p>Default definition:</p> <pre class="literal-block">\newcommand\PolPrintIntervalsKnownRoot{% @@ -2767,7 +2354,7 @@ real roots. Default definition:</p> </blockquote> </div> <div class="section" id="polprintintervalsunknownroot"> -<h4><a class="toc-backref" href="#id113"><span class="docutils literal">\PolPrintIntervalsUnknownRoot</span></a></h4> +<h4><a class="toc-backref" href="#id104"><span class="docutils literal">\PolPrintIntervalsUnknownRoot</span></a></h4> <blockquote> <p>Default definition:</p> <pre class="literal-block">\newcommand\PolPrintIntervalsUnknownRoot{% @@ -2778,21 +2365,21 @@ real roots. Default definition:</p> </blockquote> </div> <div class="section" id="id18"> -<span id="polprintintervalsprintexactzero"></span><h4><a class="toc-backref" href="#id114"><span class="docutils literal">\PolPrintIntervalsPrintExactZero</span></a></h4> +<span id="polprintintervalsprintexactzero"></span><h4><a class="toc-backref" href="#id105"><span class="docutils literal">\PolPrintIntervalsPrintExactZero</span></a></h4> <blockquote> <p>Default definition:</p> <pre class="literal-block">\newcommand\PolPrintIntervalsPrintExactZero{\PolPrintIntervalsTheLeftEndPoint}</pre> </blockquote> </div> <div class="section" id="id19"> -<span id="polprintintervalsprintleftendpoint"></span><h4><a class="toc-backref" href="#id115"><span class="docutils literal">\PolPrintIntervalsPrintLeftEndPoint</span></a></h4> +<span id="polprintintervalsprintleftendpoint"></span><h4><a class="toc-backref" href="#id106"><span class="docutils literal">\PolPrintIntervalsPrintLeftEndPoint</span></a></h4> <blockquote> <p>Default definition:</p> <pre class="literal-block">\newcommand\PolPrintIntervalsPrintLeftEndPoint{\PolPrintIntervalsTheLeftEndPoint}</pre> </blockquote> </div> <div class="section" id="id20"> -<span id="polprintintervalsprintrightendpoint"></span><h4><a class="toc-backref" href="#id116"><span class="docutils literal">\PolPrintIntervalsPrintRightEndPoint</span></a></h4> +<span id="polprintintervalsprintrightendpoint"></span><h4><a class="toc-backref" href="#id107"><span class="docutils literal">\PolPrintIntervalsPrintRightEndPoint</span></a></h4> <blockquote> <p>Default definition is:</p> <pre class="literal-block">\newcommand\PolPrintIntervalsPrintRightEndPoint{\PolPrintIntervalsTheRightEndPoint}</pre> @@ -2800,7 +2387,7 @@ real roots. Default definition:</p> </div> </div> <div class="section" id="id22"> -<span id="id21"></span><h3><a class="toc-backref" href="#id117"><span class="docutils literal"><span class="pre">\PolPrintIntervals*[<varname>]{<sturmname>}</span></span></a></h3> +<span id="id21"></span><h3><a class="toc-backref" href="#id108"><span class="docutils literal"><span class="pre">\PolPrintIntervals*[<varname>]{<sturmname>}</span></span></a></h3> <blockquote> <p>This starred variant produces an alternative output (which displays the root multiplicity), and is provided as an @@ -2817,7 +2404,7 @@ definition:</p> <p>Multiplicities are printed using this auxiliary macro:</p> </blockquote> <div class="section" id="polprintintervalsprintmultiplicity"> -<h4><a class="toc-backref" href="#id118"><span class="docutils literal">\PolPrintIntervalsPrintMultiplicity</span></a></h4> +<h4><a class="toc-backref" href="#id109"><span class="docutils literal">\PolPrintIntervalsPrintMultiplicity</span></a></h4> <blockquote> <p>whose default definition is:</p> <pre class="literal-block">\newcommand\PolPrintIntervalsPrintMultiplicity{(\mbox{mult. }\PolPrintIntervalsTheMultiplicity)}</pre> @@ -2825,19 +2412,19 @@ definition:</p> </div> </div> <div class="section" id="polsettosturmchainsignchangesat-foo-sturmname-value"> -<span id="polsettosturmchainsignchangesat"></span><h3><a class="toc-backref" href="#id119"><span class="docutils literal"><span class="pre">\PolSetToSturmChainSignChangesAt{\foo}{<sturmname>}{<value>}</span></span></a></h3> +<span id="polsettosturmchainsignchangesat"></span><h3><a class="toc-backref" href="#id110"><span class="docutils literal"><span class="pre">\PolSetToSturmChainSignChangesAt{\foo}{<sturmname>}{<value>}</span></span></a></h3> <blockquote> <p>Sets macro <span class="docutils literal">\foo</span> to store the number of sign changes in the already computed normalized Sturm chain with name prefix <span class="docutils literal"><sturmname></span>, at location <span class="docutils literal"><value></span> (which must be in format as -acceptable by the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> macros.)</p> +acceptable by the <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> macros.)</p> <p>The definition is made with global scope. For local scope, use <span class="docutils literal">[\empty]</span> as extra optional argument.</p> <p>One can use this immediately after creation of the Sturm chain.</p> </blockquote> </div> <div class="section" id="polsettonbofzeroswithin-foo-sturmname-value-left-value-right"> -<span id="polsettonbofzeroswithin"></span><h3><a class="toc-backref" href="#id120"><span class="docutils literal"><span class="pre">\PolSetToNbOfZerosWithin{\foo}{<sturmname>}{<value_left>}{<value_right>}</span></span></a></h3> +<span id="polsettonbofzeroswithin"></span><h3><a class="toc-backref" href="#id111"><span class="docutils literal"><span class="pre">\PolSetToNbOfZerosWithin{\foo}{<sturmname>}{<value_left>}{<value_right>}</span></span></a></h3> <blockquote> <p>Sets, assuming the normalized Sturm chain has been already computed, macro <span class="docutils literal">\foo</span> to store the number of roots of <span class="docutils literal">sturmname_0</span> in @@ -2861,7 +2448,7 @@ which requires prior execution of </div> </div> <div class="section" id="pollet-polname-2-polname-1"> -<span id="pollet"></span><h2><a class="toc-backref" href="#id121"><span class="docutils literal"><span class="pre">\PolLet{<polname_2>}={<polname_1>}</span></span></a></h2> +<span id="pollet"></span><h2><a class="toc-backref" href="#id112"><span class="docutils literal"><span class="pre">\PolLet{<polname_2>}={<polname_1>}</span></span></a></h2> <blockquote> <p>Makes a copy of the already defined polynomial <span class="docutils literal">polname_1</span> to a new one <span class="docutils literal">polname_2</span>. This has the same effect as @@ -2871,20 +2458,20 @@ new one <span class="docutils literal">polname_2</span>. This has the same effec </blockquote> </div> <div class="section" id="polgloballet-polname-2-polname-1"> -<span id="polgloballet"></span><h2><a class="toc-backref" href="#id122"><span class="docutils literal"><span class="pre">\PolGlobalLet{<polname_2>}={<polname_1>}</span></span></a></h2> +<span id="polgloballet"></span><h2><a class="toc-backref" href="#id113"><span class="docutils literal"><span class="pre">\PolGlobalLet{<polname_2>}={<polname_1>}</span></span></a></h2> <blockquote> <p>Acts globally.</p> </blockquote> </div> <div class="section" id="polassign-polname-toarray-macro"> -<span id="polassign"></span><h2><a class="toc-backref" href="#id123"><span class="docutils literal"><span class="pre">\PolAssign{<polname>}\toarray\macro</span></span></a></h2> +<span id="polassign"></span><h2><a class="toc-backref" href="#id114"><span class="docutils literal"><span class="pre">\PolAssign{<polname>}\toarray\macro</span></span></a></h2> <blockquote> <p>Defines a one-argument expandable macro <span class="docutils literal"><span class="pre">\macro{#1}</span></span> which expands to the (raw) #1th polynomial coefficient.</p> <ul class="simple"> <li><p>Attention, coefficients here are indexed starting at 1. This is an unfortunate legacy situation related to the original indexing -convention in <a class="reference external" href="http://www.ctan.org/pkg/xint">xinttools</a> arrays.</p></li> +convention in <a class="reference external" href="https://www.ctan.org/pkg/xint">xinttools</a> arrays.</p></li> <li><p>With #1=-1, -2, ..., <span class="docutils literal"><span class="pre">\macro{#1}</span></span> returns leading coefficients.</p></li> <li><p>With #1=0, returns the number of coefficients, i.e. <span class="docutils literal">1 + deg f</span> for non-zero polynomials.</p></li> @@ -2894,12 +2481,12 @@ for non-zero polynomials.</p></li> </blockquote> </div> <div class="section" id="polget-polname-fromarray-macro"> -<span id="polget"></span><h2><a class="toc-backref" href="#id124"><span class="docutils literal"><span class="pre">\PolGet{<polname>}\fromarray\macro</span></span></a></h2> +<span id="polget"></span><h2><a class="toc-backref" href="#id115"><span class="docutils literal"><span class="pre">\PolGet{<polname>}\fromarray\macro</span></span></a></h2> <blockquote> <p>Does the converse operation to <span class="docutils literal"><span class="pre">\PolAssign{<polname>}\toarray\macro</span></span>. Each individual <span class="docutils literal"><span class="pre">\macro{<value>}</span></span> gets expanded in an <span class="docutils literal">\edef</span> and then normalized -via <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a>'s macro <span class="docutils literal">\xintRaw</span>.</p> +via <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a>'s macro <span class="docutils literal">\xintRaw</span>.</p> <p>The leading zeros are removed from the polynomial.</p> <p>(contrived) Example:</p> <pre class="literal-block">\xintAssignArray{1}{-2}{5}{-3}\to\foo @@ -2908,14 +2495,14 @@ via <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</ </blockquote> </div> <div class="section" id="polfromcsv-polname-csv"> -<span id="polfromcsv"></span><h2><a class="toc-backref" href="#id125"><span class="docutils literal"><span class="pre">\PolFromCSV{<polname>}{<csv>}</span></span></a></h2> +<span id="polfromcsv"></span><h2><a class="toc-backref" href="#id116"><span class="docutils literal"><span class="pre">\PolFromCSV{<polname>}{<csv>}</span></span></a></h2> <blockquote> <p>Defines a polynomial directly from the comma separated list of values (or a macro expanding to such a list) of its coefficients, the <em>first item</em> gives the constant term, the <em>last item</em> gives the leading coefficient, except if zero, then it is dropped (iteratively). List items are each expanded in an <span class="docutils literal">\edef</span> and then put into normalized -form via <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a>'s macro <span class="docutils literal">\xintRaw</span>.</p> +form via <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a>'s macro <span class="docutils literal">\xintRaw</span>.</p> <p>As leading zero coefficients are removed:</p> <pre class="literal-block">\PolFromCSV{f}{0, 0, 0, 0, 0, 0, 0, 0, 0, 0}</pre> <p>defines the zero polynomial, which holds only one coefficient.</p> @@ -2923,7 +2510,7 @@ form via <a class="reference external" href="http://www.ctan.org/pkg/xint">xintf </blockquote> </div> <div class="section" id="polmapcoeffs-macro-polname"> -<span id="polmapcoeffs"></span><h2><a class="toc-backref" href="#id126"><span class="docutils literal"><span class="pre">\PolMapCoeffs{\macro}{<polname>}</span></span></a></h2> +<span id="polmapcoeffs"></span><h2><a class="toc-backref" href="#id117"><span class="docutils literal"><span class="pre">\PolMapCoeffs{\macro}{<polname>}</span></span></a></h2> <blockquote> <p>It modifies ('in-place': original coefficients get lost) each coefficient of the defined polynomial via the <em>expandable</em> macro @@ -2931,9 +2518,9 @@ coefficient of the defined polynomial via the <em>expandable</em> macro coefficients vanish after the operation.</p> <p>In the replacement text of <span class="docutils literal">\macro</span>, <span class="docutils literal">\index</span> expands to the coefficient index (starting at zero for the constant term).</p> -<p>Notice that <span class="docutils literal">\macro</span> will have to handle inputs in the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> +<p>Notice that <span class="docutils literal">\macro</span> will have to handle inputs in the <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> internal format. This means that it probably will have to be -expressed in terms of macros from the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> package.</p> +expressed in terms of macros from the <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> package.</p> <p>Example:</p> <pre class="literal-block">\def\foo#1{\xintMul{#1}{\the\numexpr\index*\index\relax}}</pre> <p>(or with <span class="docutils literal"><span class="pre">\xintSqr{\index}</span></span>) to replace <span class="docutils literal">n</span>-th coefficient @@ -2941,20 +2528,20 @@ expressed in terms of macros from the <a class="reference external" href="http:/ </blockquote> </div> <div class="section" id="polreducecoeffs-polname"> -<span id="polreducecoeffs"></span><h2><a class="toc-backref" href="#id127"><span class="docutils literal"><span class="pre">\PolReduceCoeffs{<polname>}</span></span></a></h2> +<span id="polreducecoeffs"></span><h2><a class="toc-backref" href="#id118"><span class="docutils literal"><span class="pre">\PolReduceCoeffs{<polname>}</span></span></a></h2> <blockquote> <p>Reduces the internal representations of the coefficients to their lowest terms.</p> </blockquote> </div> <div class="section" id="id24"> -<span id="id23"></span><h2><a class="toc-backref" href="#id128"><span class="docutils literal"><span class="pre">\PolReduceCoeffs*{<polname>}</span></span></a></h2> +<span id="id23"></span><h2><a class="toc-backref" href="#id119"><span class="docutils literal"><span class="pre">\PolReduceCoeffs*{<polname>}</span></span></a></h2> <blockquote> <p>Reduces the internal representations of the coefficients to their lowest terms, but ignoring a possible separated "power of ten part".</p> -<p>For example, <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> stores an <span class="docutils literal">30e2/50</span> input as <span class="docutils literal">30/50</span> with +<p>For example, <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> stores an <span class="docutils literal">30e2/50</span> input as <span class="docutils literal">30/50</span> with a separate <span class="docutils literal">10^2</span> part. This will thus get replaced by <span class="docutils literal">3e^2/5</span> -(or rather whatever <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> uses for internal representation), and +(or rather whatever <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> uses for internal representation), and not by <span class="docutils literal">60</span> as would result from complete reduction.</p> <p>Evaluations with polynomials treated by this can be much faster than with those handled by the non-starred variant @@ -2963,7 +2550,7 @@ remain generally smaller.</p> </blockquote> </div> <div class="section" id="polmakemonic-polname"> -<span id="polmakemonic"></span><h2><a class="toc-backref" href="#id129"><span class="docutils literal"><span class="pre">\PolMakeMonic{<polname>}</span></span></a></h2> +<span id="polmakemonic"></span><h2><a class="toc-backref" href="#id120"><span class="docutils literal"><span class="pre">\PolMakeMonic{<polname>}</span></span></a></h2> <blockquote> <p>Divides by the leading coefficient. It is recommended to execute <a class="reference internal" href="#id24">\PolReduceCoeffs*{<polname>}</a> immediately afterwards. This is not @@ -2973,7 +2560,7 @@ denominator for typesetting purposes.</p> </blockquote> </div> <div class="section" id="polmakeprimitive-polname"> -<span id="polmakeprimitive"></span><h2><a class="toc-backref" href="#id130"><span class="docutils literal"><span class="pre">\PolMakePrimitive{<polname>}</span></span></a></h2> +<span id="polmakeprimitive"></span><h2><a class="toc-backref" href="#id121"><span class="docutils literal"><span class="pre">\PolMakePrimitive{<polname>}</span></span></a></h2> <blockquote> <p>Divides by the integer content see (<a class="reference internal" href="#policontent">\PolIContent</a>). This thus produces a polynomial with integer @@ -2982,7 +2569,7 @@ coefficient is not modified.</p> </blockquote> </div> <div class="section" id="poldiff-polname-1-polname-2"> -<span id="poldiff"></span><h2><a class="toc-backref" href="#id131"><span class="docutils literal"><span class="pre">\PolDiff{<polname_1>}{<polname_2>}</span></span></a></h2> +<span id="poldiff"></span><h2><a class="toc-backref" href="#id122"><span class="docutils literal"><span class="pre">\PolDiff{<polname_1>}{<polname_2>}</span></span></a></h2> <blockquote> <p>This sets <span class="docutils literal">polname_2</span> to the first derivative of <span class="docutils literal">polname_1</span>. It is allowed to issue <span class="docutils literal"><span class="pre">\PolDiff{f}{f}</span></span>, effectively replacing <span class="docutils literal">f</span> @@ -2992,7 +2579,7 @@ by <span class="docutils literal">f'</span>.</p> </blockquote> </div> <div class="section" id="poldiff-n-polname-1-polname-2"> -<span id="poldiff-n"></span><h2><a class="toc-backref" href="#id132"><span class="docutils literal"><span class="pre">\PolDiff[N]{<polname_1>}{<polname_2>}</span></span></a></h2> +<span id="poldiff-n"></span><h2><a class="toc-backref" href="#id123"><span class="docutils literal"><span class="pre">\PolDiff[N]{<polname_1>}{<polname_2>}</span></span></a></h2> <blockquote> <p>This sets <span class="docutils literal">polname_2</span> to the <span class="docutils literal">N</span>-th derivative of <span class="docutils literal">polname_1</span>. Identical arguments is allowed. With <span class="docutils literal">N=0</span>, same effect as @@ -3001,7 +2588,7 @@ using <span class="docutils literal">\PolAntiDiff</span>.</p> </blockquote> </div> <div class="section" id="polantidiff-polname-1-polname-2"> -<span id="polantidiff"></span><h2><a class="toc-backref" href="#id133"><span class="docutils literal"><span class="pre">\PolAntiDiff{<polname_1>}{<polname_2>}</span></span></a></h2> +<span id="polantidiff"></span><h2><a class="toc-backref" href="#id124"><span class="docutils literal"><span class="pre">\PolAntiDiff{<polname_1>}{<polname_2>}</span></span></a></h2> <blockquote> <p>This sets <span class="docutils literal">polname_2</span> to the primitive of <span class="docutils literal">polname_1</span> vanishing at zero.</p> @@ -3010,14 +2597,14 @@ at zero.</p> </blockquote> </div> <div class="section" id="polantidiff-n-polname-1-polname-2"> -<span id="polantidiff-n"></span><h2><a class="toc-backref" href="#id134"><span class="docutils literal"><span class="pre">\PolAntiDiff[N]{<polname_1>}{<polname_2>}</span></span></a></h2> +<span id="polantidiff-n"></span><h2><a class="toc-backref" href="#id125"><span class="docutils literal"><span class="pre">\PolAntiDiff[N]{<polname_1>}{<polname_2>}</span></span></a></h2> <blockquote> <p>This sets <span class="docutils literal">polname_2</span> to the result of <span class="docutils literal">N</span> successive integrations on <span class="docutils literal">polname_1</span>. With negative <span class="docutils literal">N</span>, it switches to using <span class="docutils literal">\PolDiff</span>.</p> </blockquote> </div> <div class="section" id="poldivide-polname-1-polname-2-polname-q-polname-r"> -<span id="poldivide"></span><h2><a class="toc-backref" href="#id135"><span class="docutils literal"><span class="pre">\PolDivide{<polname_1>}{<polname_2>}{<polname_Q>}{<polname_R>}</span></span></a></h2> +<span id="poldivide"></span><h2><a class="toc-backref" href="#id126"><span class="docutils literal"><span class="pre">\PolDivide{<polname_1>}{<polname_2>}{<polname_Q>}{<polname_R>}</span></span></a></h2> <blockquote> <p>This sets <span class="docutils literal">polname_Q</span> and <span class="docutils literal">polname_R</span> to be the quotient and remainder in the Euclidean division of <span class="docutils literal">polname_1</span> by @@ -3025,21 +2612,21 @@ remainder in the Euclidean division of <span class="docutils literal">polname_1< </blockquote> </div> <div class="section" id="polquo-polname-1-polname-2-polname-q"> -<span id="polquo"></span><h2><a class="toc-backref" href="#id136"><span class="docutils literal"><span class="pre">\PolQuo{<polname_1>}{<polname_2>}{<polname_Q>}</span></span></a></h2> +<span id="polquo"></span><h2><a class="toc-backref" href="#id127"><span class="docutils literal"><span class="pre">\PolQuo{<polname_1>}{<polname_2>}{<polname_Q>}</span></span></a></h2> <blockquote> <p>This sets <span class="docutils literal">polname_Q</span> to be the quotient in the Euclidean division of <span class="docutils literal">polname_1</span> by <span class="docutils literal">polname_2</span>.</p> </blockquote> </div> <div class="section" id="polrem-polname-1-polname-2-polname-r"> -<span id="polrem"></span><h2><a class="toc-backref" href="#id137"><span class="docutils literal"><span class="pre">\PolRem{<polname_1>}{<polname_2>}{<polname_R>}</span></span></a></h2> +<span id="polrem"></span><h2><a class="toc-backref" href="#id128"><span class="docutils literal"><span class="pre">\PolRem{<polname_1>}{<polname_2>}{<polname_R>}</span></span></a></h2> <blockquote> <p>This sets <span class="docutils literal">polname_R</span> to be the remainder in the Euclidean division of <span class="docutils literal">polname_1</span> by <span class="docutils literal">polname_2</span>.</p> </blockquote> </div> <div class="section" id="polgcd-polname-1-polname-2-polname-gcd"> -<span id="polgcd"></span><h2><a class="toc-backref" href="#id138"><span class="docutils literal"><span class="pre">\PolGCD{<polname_1>}{<polname_2>}{<polname_GCD>}</span></span></a></h2> +<span id="polgcd"></span><h2><a class="toc-backref" href="#id129"><span class="docutils literal"><span class="pre">\PolGCD{<polname_1>}{<polname_2>}{<polname_GCD>}</span></span></a></h2> <blockquote> <p>This sets <span class="docutils literal">polname_GCD</span> to be the (monic) GCD of <span class="docutils literal">polname_1</span> and <span class="docutils literal">polname_2</span>. It is a unitary polynomial except if both @@ -3049,7 +2636,7 @@ zero polynomial.</p> </div> </div> <div class="section" id="expandable-macros"> -<h1><a class="toc-backref" href="#id139">Expandable macros</a></h1> +<h1><a class="toc-backref" href="#id130">Expandable macros</a></h1> <div class="admonition note"> <p class="admonition-title">Note</p> <p>At <span class="docutils literal">0.8</span> <span class="docutils literal">polexpr</span> is usable with Plain TeX and not only with @@ -3061,7 +2648,7 @@ if testing with a non LaTeX macro format.</p> <span class="docutils literal">\PolToFloatExpr</span> which need a <span class="docutils literal">\write</span>, <span class="docutils literal">\edef</span> or a <span class="docutils literal"><span class="pre">\csname...\endcsname</span></span> context.</p> <div class="section" id="poltoexpr-pol-expr"> -<span id="poltoexpr"></span><h2><a class="toc-backref" href="#id140"><span class="docutils literal"><span class="pre">\PolToExpr{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="poltoexpr"></span><h2><a class="toc-backref" href="#id131"><span class="docutils literal"><span class="pre">\PolToExpr{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Produces expandably <a class="footnote-reference brackets" href="#id26" id="id25">4</a> the string <span class="docutils literal"><span class="pre">coeff_N*x^N+...</span></span>, i.e. the polynomial is using descending powers.</p> @@ -3072,19 +2659,17 @@ polynomial is using descending powers.</p> </dd> </dl> <p>Since <span class="docutils literal">0.8</span> the input is not restricted to be a polynomial name but -is allowed to be an arbitrary expression (where by default the -letter <span class="docutils literal">x</span> is recognized as the indeterminate; see -<a class="reference internal" href="#poltoexprinvar">\PolToExprInVar</a>).</p> -<p>The default output (which also by default uses the letter <span class="docutils literal">x</span> and is -completely configurable, see in particular <a class="reference internal" href="#poltoexprvar">\PolToExprVar</a>) is -compatible with both</p> +is allowed to be an arbitrary expression. Then <span class="docutils literal">x</span> is expected as +indeterminate but this can be customized via <a class="reference internal" href="#poltoexprinvar">\PolToExprInVar</a>.</p> +<p>The output uses the letter <span class="docutils literal">x</span> 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"> <li><p>the Maple's input format,</p></li> <li><p>and the PSTricks <span class="docutils literal">\psplot[algebraic]</span> input format.</p></li> </ul> -<p>Attention that it is not compatible with Python, but see -<a class="reference internal" href="#poltoexprcaret">\PolToExprCaret</a> in this regard.</p> -<p>It has the following characteristics:</p> +<p>Attention that it is not compatible with Python, see further +<a class="reference internal" href="#poltoexprcaret">\PolToExprCaret</a> in this context.</p> +<p>The following applies:</p> <ul class="simple"> <li><p>vanishing coefficients are skipped (issue <span class="docutils literal">\poltoexpralltrue</span> to override this and produce output such as <span class="docutils literal">x^3+0*x^2+0*x^1+0</span>),</p></li> @@ -3106,15 +2691,16 @@ is not supposed to be a typesetting macro.</p></li> redefinition must maintain the expandability property.</p> </blockquote> <div class="section" id="id27"> -<span id="poltoexprvar"></span><h3><a class="toc-backref" href="#id141"><span class="docutils literal">\PolToExprVar</span></a></h3> +<span id="poltoexprvar"></span><h3><a class="toc-backref" href="#id132"><span class="docutils literal">\PolToExprVar</span></a></h3> <blockquote> -<p>Defaults to <span class="docutils literal">x</span>. The letter used in input.</p> +<p>Defaults to <span class="docutils literal">x</span>. The letter used in the macro output.</p> </blockquote> </div> <div class="section" id="poltoexprinvar"> -<h3><a class="toc-backref" href="#id142"><span class="docutils literal">\PolToExprInVar</span></a></h3> +<h3><a class="toc-backref" href="#id133"><span class="docutils literal">\PolToExprInVar</span></a></h3> <blockquote> -<p>Defaults to <span class="docutils literal">x</span>: the letter used as the polynomial indeterminate.</p> +<p>Defaults to <span class="docutils literal">x</span>: the letter used as the polynomial indeterminate +in the macro input.</p> <p>Recall that declared polynomials are more efficiently used in algebraic expressions without the <span class="docutils literal">(x)</span>, i.e. <span class="docutils literal">P*Q</span> is better than <span class="docutils literal"><span class="pre">P(x)*Q(x)</span></span>. Thus the input, even if an expression, does not @@ -3123,13 +2709,13 @@ have to contain any <span class="docutils literal">x</span>.</p> </blockquote> </div> <div class="section" id="id28"> -<span id="poltoexprtimes"></span><h3><a class="toc-backref" href="#id143"><span class="docutils literal">\PolToExprTimes</span></a></h3> +<span id="poltoexprtimes"></span><h3><a class="toc-backref" href="#id134"><span class="docutils literal">\PolToExprTimes</span></a></h3> <blockquote> <p>Defaults to <span class="docutils literal">*</span>.</p> </blockquote> </div> <div class="section" id="poltoexprcaret"> -<h3><a class="toc-backref" href="#id144"><span class="docutils literal">\PolToExprCaret</span></a></h3> +<h3><a class="toc-backref" href="#id135"><span class="docutils literal">\PolToExprCaret</span></a></h3> <blockquote> <p>Defaults to <span class="docutils literal">^</span> of catcode 12. Set it to expand to <span class="docutils literal">**</span> for Python compatible output.</p> @@ -3137,7 +2723,7 @@ expand to <span class="docutils literal">**</span> for Python compatible output </blockquote> </div> <div class="section" id="poltoexprcmd-raw-coeff"> -<span id="poltoexprcmd"></span><h3><a class="toc-backref" href="#id145"><span class="docutils literal"><span class="pre">\PolToExprCmd{<raw_coeff>}</span></span></a></h3> +<span id="poltoexprcmd"></span><h3><a class="toc-backref" href="#id136"><span class="docutils literal"><span class="pre">\PolToExprCmd{<raw_coeff>}</span></span></a></h3> <blockquote> <p>Defaults to <span class="docutils literal"><span class="pre">\xintPRaw{\xintRawWithZeros{#1}}</span></span>.</p> <p>This means that the coefficient value is printed-out as a fraction @@ -3156,7 +2742,7 @@ and not their finite decimal expansion with no denominator.</p> </blockquote> </div> <div class="section" id="poltoexproneterm-raw-coeff-exponent"> -<span id="poltoexproneterm"></span><h3><a class="toc-backref" href="#id146"><span class="docutils literal"><span class="pre">\PolToExprOneTerm{<raw_coeff>}{<exponent>}</span></span></a></h3> +<span id="poltoexproneterm"></span><h3><a class="toc-backref" href="#id137"><span class="docutils literal"><span class="pre">\PolToExprOneTerm{<raw_coeff>}{<exponent>}</span></span></a></h3> <blockquote> <p>This is the macro which from the coefficient and the exponent produces the corresponding term in output, such as <span class="docutils literal">2/3*x^7</span>.</p> @@ -3166,13 +2752,13 @@ produces the corresponding term in output, such as <span class="docutils literal </blockquote> </div> <div class="section" id="poltoexpronetermstylea-raw-coeff-exponent"> -<span id="poltoexpronetermstylea"></span><h3><a class="toc-backref" href="#id147"><span class="docutils literal"><span class="pre">\PolToExprOneTermStyleA{<raw_coeff>}{<exponent>}</span></span></a></h3> +<span id="poltoexpronetermstylea"></span><h3><a class="toc-backref" href="#id138"><span class="docutils literal"><span class="pre">\PolToExprOneTermStyleA{<raw_coeff>}{<exponent>}</span></span></a></h3> <blockquote> <p>This holds the default package meaning of <span class="docutils literal">\PolToExprOneTerm</span>.</p> </blockquote> </div> <div class="section" id="poltoexpronetermstyleb-raw-coeff-exponent"> -<span id="poltoexpronetermstyleb"></span><h3><a class="toc-backref" href="#id148"><span class="docutils literal"><span class="pre">\PolToExprOneTermStyleB{<raw_coeff>}{<exponent>}</span></span></a></h3> +<span id="poltoexpronetermstyleb"></span><h3><a class="toc-backref" href="#id139"><span class="docutils literal"><span class="pre">\PolToExprOneTermStyleB{<raw_coeff>}{<exponent>}</span></span></a></h3> <blockquote> <p>This holds an alternative meaning, which puts the fractional part of a coefficient after the monomial, i.e. like this:</p> @@ -3185,7 +2771,7 @@ To revert to the package default behaviour, issue </blockquote> </div> <div class="section" id="poltoexprtermprefix-raw-coeff"> -<span id="poltoexprtermprefix"></span><h3><a class="toc-backref" href="#id149"><span class="docutils literal"><span class="pre">\PolToExprTermPrefix{<raw_coeff>}</span></span></a></h3> +<span id="poltoexprtermprefix"></span><h3><a class="toc-backref" href="#id140"><span class="docutils literal"><span class="pre">\PolToExprTermPrefix{<raw_coeff>}</span></span></a></h3> <blockquote> <p>It receives as argument the coefficient. Its default behaviour is to produce a <span class="docutils literal">+</span> if the coefficient is positive, which will thus @@ -3196,7 +2782,7 @@ positive coefficient does not output an explicit <span class="docutils literal"> </div> </div> <div class="section" id="poltofloatexpr-pol-expr"> -<span id="poltofloatexpr"></span><h2><a class="toc-backref" href="#id150"><span class="docutils literal"><span class="pre">\PolToFloatExpr{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="poltofloatexpr"></span><h2><a class="toc-backref" href="#id141"><span class="docutils literal"><span class="pre">\PolToFloatExpr{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Similar to <a class="reference internal" href="#poltoexpr-pol-expr">\PolToExpr{<pol. expr.>}</a> but using <a class="reference internal" href="#poltofloatexprcmd-raw-coeff">\PolToFloatExprCmd{<raw_coeff>}</a> which by default rounds and @@ -3213,14 +2799,14 @@ in between).</p> <p>Extended at <span class="docutils literal">0.8</span> to accept general expressions as input.</p> </blockquote> <div class="section" id="poltofloatexproneterm-raw-coeff-exponent"> -<span id="poltofloatexproneterm"></span><h3><a class="toc-backref" href="#id151"><span class="docutils literal"><span class="pre">\PolToFloatExprOneTerm{<raw_coeff>}{<exponent>}</span></span></a></h3> +<span id="poltofloatexproneterm"></span><h3><a class="toc-backref" href="#id142"><span class="docutils literal"><span class="pre">\PolToFloatExprOneTerm{<raw_coeff>}{<exponent>}</span></span></a></h3> <blockquote> <p>Similar to <a class="reference internal" href="#poltoexproneterm-raw-coeff-exponent">\PolToExprOneTerm{<raw_coeff>}{<exponent>}</a>. But does not treat especially coefficients equal to plus or minus one.</p> </blockquote> </div> <div class="section" id="poltofloatexprcmd-raw-coeff"> -<span id="poltofloatexprcmd"></span><h3><a class="toc-backref" href="#id152"><span class="docutils literal"><span class="pre">\PolToFloatExprCmd{<raw_coeff>}</span></span></a></h3> +<span id="poltofloatexprcmd"></span><h3><a class="toc-backref" href="#id143"><span class="docutils literal"><span class="pre">\PolToFloatExprCmd{<raw_coeff>}</span></span></a></h3> <blockquote> <p>The one-argument macro used by <span class="docutils literal">\PolToFloatExprOneTerm</span>. It defaults to <span class="docutils literal"><span class="pre">\xintPFloat{#1}</span></span>, which trims trailing @@ -3230,7 +2816,7 @@ zeroes.</p> </div> </div> <div class="section" id="id30"> -<span id="id29"></span><h2><a class="toc-backref" href="#id153"><span class="docutils literal"><span class="pre">\PolToExpr*{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="id29"></span><h2><a class="toc-backref" href="#id144"><span class="docutils literal"><span class="pre">\PolToExpr*{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Ascending powers: <span class="docutils literal"><span class="pre">coeff_0+coeff_1*x+coeff_2*x^2+...</span></span>.</p> <p>Extended at <span class="docutils literal">0.8</span> to accept general expressions as input.</p> @@ -3239,38 +2825,38 @@ zeroes.</p> </blockquote> </div> <div class="section" id="id32"> -<span id="id31"></span><h2><a class="toc-backref" href="#id154"><span class="docutils literal"><span class="pre">\PolToFloatExpr*{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="id31"></span><h2><a class="toc-backref" href="#id145"><span class="docutils literal"><span class="pre">\PolToFloatExpr*{<pol.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Ascending powers.</p> <p>Extended at <span class="docutils literal">0.8</span> to accept general expressions as input.</p> </blockquote> </div> <div class="section" id="polnthcoeff-polname-index"> -<span id="polnthcoeff"></span><h2><a class="toc-backref" href="#id155"><span class="docutils literal"><span class="pre">\PolNthCoeff{<polname>}{<index>}</span></span></a></h2> +<span id="polnthcoeff"></span><h2><a class="toc-backref" href="#id146"><span class="docutils literal"><span class="pre">\PolNthCoeff{<polname>}{<index>}</span></span></a></h2> <blockquote> <p>It expands to the raw <span class="docutils literal">N</span>-th coefficient (<span class="docutils literal">N=0</span> corresponds to the constant coefficient). If <span class="docutils literal">N</span> is out of range, zero (in its -default <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> format <span class="docutils literal">0/1[0]</span>) is returned.</p> +default <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> format <span class="docutils literal">0/1[0]</span>) is returned.</p> <p>Negative indices <span class="docutils literal"><span class="pre">N=-1</span></span>, <span class="docutils literal"><span class="pre">-2</span></span>, ... return the leading coefficient, sub-leading coefficient, ..., and finally <span class="docutils literal">0/1[0]</span> for <span class="docutils literal"><span class="pre">N<-1-degree</span></span>.</p> </blockquote> </div> <div class="section" id="polleadingcoeff-polname"> -<span id="polleadingcoeff"></span><h2><a class="toc-backref" href="#id156"><span class="docutils literal"><span class="pre">\PolLeadingCoeff{<polname>}</span></span></a></h2> +<span id="polleadingcoeff"></span><h2><a class="toc-backref" href="#id147"><span class="docutils literal"><span class="pre">\PolLeadingCoeff{<polname>}</span></span></a></h2> <blockquote> <p>Expands to the leading coefficient.</p> </blockquote> </div> <div class="section" id="poldegree-polname"> -<span id="poldegree"></span><h2><a class="toc-backref" href="#id157"><span class="docutils literal"><span class="pre">\PolDegree{<polname>}</span></span></a></h2> +<span id="poldegree"></span><h2><a class="toc-backref" href="#id148"><span class="docutils literal"><span class="pre">\PolDegree{<polname>}</span></span></a></h2> <blockquote> <p>It expands to the degree. This is <span class="docutils literal"><span class="pre">-1</span></span> if zero polynomial but this may change in future. Should it then expand to <span class="docutils literal"><span class="pre">-\infty</span></span> ?</p> </blockquote> </div> <div class="section" id="policontent-polname"> -<span id="policontent"></span><h2><a class="toc-backref" href="#id158"><span class="docutils literal"><span class="pre">\PolIContent{<polname>}</span></span></a></h2> +<span id="policontent"></span><h2><a class="toc-backref" href="#id149"><span class="docutils literal"><span class="pre">\PolIContent{<polname>}</span></span></a></h2> <blockquote> <p>It expands to the contents of the polynomial, i.e. to the positive fraction such that dividing by this fraction produces a polynomial @@ -3279,7 +2865,7 @@ with integer coefficients having no common prime divisor.</p> </blockquote> </div> <div class="section" id="poltolist-polname"> -<span id="poltolist"></span><h2><a class="toc-backref" href="#id159"><span class="docutils literal"><span class="pre">\PolToList{<polname>}</span></span></a></h2> +<span id="poltolist"></span><h2><a class="toc-backref" href="#id150"><span class="docutils literal"><span class="pre">\PolToList{<polname>}</span></span></a></h2> <blockquote> <p>Expands to <span class="docutils literal"><span class="pre">{coeff_0}{coeff_1}...{coeff_N}</span></span> with <span class="docutils literal">N</span> = degree, and <span class="docutils literal">coeff_N</span> the leading coefficient @@ -3288,7 +2874,7 @@ empty output.)</p> </blockquote> </div> <div class="section" id="poltocsv-polname"> -<span id="poltocsv"></span><h2><a class="toc-backref" href="#id160"><span class="docutils literal"><span class="pre">\PolToCSV{<polname>}</span></span></a></h2> +<span id="poltocsv"></span><h2><a class="toc-backref" href="#id151"><span class="docutils literal"><span class="pre">\PolToCSV{<polname>}</span></span></a></h2> <blockquote> <p>Expands to <span class="docutils literal">coeff_0, coeff_1, coeff_2, <span class="pre">.....,</span> coeff_N</span>, starting with constant term and ending with leading coefficient. Converse @@ -3296,35 +2882,35 @@ to <a class="reference internal" href="#polfromcsv-polname-csv">\PolFromCSV{< </blockquote> </div> <div class="section" id="poleval-polname-atexpr-num-expr"> -<span id="polevalatexpr"></span><h2><a class="toc-backref" href="#id161"><span class="docutils literal"><span class="pre">\PolEval{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="polevalatexpr"></span><h2><a class="toc-backref" href="#id152"><span class="docutils literal"><span class="pre">\PolEval{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Same output as <span class="docutils literal">\xinteval{polname(numerical expression)}</span>.</p> </blockquote> </div> <div class="section" id="poleval-polname-at-value"> -<span id="polevalat"></span><h2><a class="toc-backref" href="#id162"><span class="docutils literal"><span class="pre">\PolEval{<polname>}\At{<value>}</span></span></a></h2> +<span id="polevalat"></span><h2><a class="toc-backref" href="#id153"><span class="docutils literal"><span class="pre">\PolEval{<polname>}\At{<value>}</span></span></a></h2> <blockquote> <p>Evaluates the polynomial at the given value which must be in (or -expand to) a format acceptable to the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> macros.</p> +expand to) a format acceptable to the <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> macros.</p> </blockquote> </div> <div class="section" id="polevalreduced-polname-atexpr-num-expr"> -<span id="polevalreducedatexpr"></span><h2><a class="toc-backref" href="#id163"><span class="docutils literal"><span class="pre">\PolEvalReduced{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="polevalreducedatexpr"></span><h2><a class="toc-backref" href="#id154"><span class="docutils literal"><span class="pre">\PolEvalReduced{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Same output as <span class="docutils literal">\xinteval{reduce(polname(numerical <span class="pre">expression))}</span></span>.</p> </blockquote> </div> <div class="section" id="polevalreduced-polname-at-value"> -<span id="polevalreducedat"></span><h2><a class="toc-backref" href="#id164"><span class="docutils literal"><span class="pre">\PolEvalReduced{<polname>}\At{<value>}</span></span></a></h2> +<span id="polevalreducedat"></span><h2><a class="toc-backref" href="#id155"><span class="docutils literal"><span class="pre">\PolEvalReduced{<polname>}\At{<value>}</span></span></a></h2> <blockquote> <p>Evaluates the polynomial at the value which must be in (or expand -to) a format acceptable to the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> macros, and outputs an +to) a format acceptable to the <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> macros, and outputs an irreducible fraction.</p> </blockquote> </div> <div class="section" id="polfloateval-polname-atexpr-num-expr"> -<span id="polfloatevalatexpr"></span><h2><a class="toc-backref" href="#id165"><span class="docutils literal"><span class="pre">\PolFloatEval{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h2> +<span id="polfloatevalatexpr"></span><h2><a class="toc-backref" href="#id156"><span class="docutils literal"><span class="pre">\PolFloatEval{<polname>}\AtExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h2> <blockquote> <p>Same output as <span class="docutils literal">\xintfloateval{polname(numerical expression)}</span>.</p> <div class="admonition attention"> @@ -3338,22 +2924,22 @@ the following syntax can be used: <a class="footnote-reference brackets" href="# <pre class="literal-block">\xintfloateval{3.27*\xintexpr f(2.53)\relax^2}</pre> <dl class="footnote brackets"> <dt class="label" id="id34"><span class="brackets"><a class="fn-backref" href="#id33">5</a></span></dt> -<dd><p>Cf. <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> documentation about nested expressions.</p> +<dd><p>Cf. <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> documentation about nested expressions.</p> </dd> </dl> </blockquote> </div> <div class="section" id="polfloateval-polname-at-value"> -<span id="polfloatevalat"></span><h2><a class="toc-backref" href="#id166"><span class="docutils literal"><span class="pre">\PolFloatEval{<polname>}\At{<value>}</span></span></a></h2> +<span id="polfloatevalat"></span><h2><a class="toc-backref" href="#id157"><span class="docutils literal"><span class="pre">\PolFloatEval{<polname>}\At{<value>}</span></span></a></h2> <blockquote> <p>Evaluates the polynomial at the value which must be in (or expand -to) a format acceptable to the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> macros.</p> +to) a format acceptable to the <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> macros.</p> </blockquote> </div> <div class="section" id="expandable-macros-related-to-the-root-localization-routines"> -<h2><a class="toc-backref" href="#id167">Expandable macros related to the root localization routines</a></h2> +<h2><a class="toc-backref" href="#id158">Expandable macros related to the root localization routines</a></h2> <div class="section" id="polsturmchainlength-sturmname"> -<span id="polsturmchainlength"></span><h3><a class="toc-backref" href="#id168"><span class="docutils literal"><span class="pre">\PolSturmChainLength{<sturmname>}</span></span></a></h3> +<span id="polsturmchainlength"></span><h3><a class="toc-backref" href="#id159"><span class="docutils literal"><span class="pre">\PolSturmChainLength{<sturmname>}</span></span></a></h3> <blockquote> <p>Returns the integer <span class="docutils literal">N</span> such that <span class="docutils literal">sturmname_N</span> is the last one in the Sturm chain <span class="docutils literal">sturmname_0</span>, <span class="docutils literal">sturmname_1</span>, ...</p> @@ -3361,14 +2947,14 @@ in the Sturm chain <span class="docutils literal">sturmname_0</span>, <span clas </blockquote> </div> <div class="section" id="polsturmifzeroexactlyknown-sturmname-index-t-f"> -<span id="polsturmifzeroexactlyknown"></span><h3><a class="toc-backref" href="#id169"><span class="docutils literal"><span class="pre">\PolSturmIfZeroExactlyKnown{<sturmname>}{<index>}{T}{F}</span></span></a></h3> +<span id="polsturmifzeroexactlyknown"></span><h3><a class="toc-backref" href="#id160"><span class="docutils literal"><span class="pre">\PolSturmIfZeroExactlyKnown{<sturmname>}{<index>}{T}{F}</span></span></a></h3> <blockquote> <p>Executes <span class="docutils literal">T</span> if the <span class="docutils literal">index</span>-th interval reduces to a singleton, i.e. the root is known exactly, else <span class="docutils literal">F</span>.</p> </blockquote> </div> <div class="section" id="polsturmisolatedzeroleft-sturmname-index"> -<span id="polsturmisolatedzeroleft"></span><h3><a class="toc-backref" href="#id170"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroLeft{<sturmname>}{<index>}</span></span></a></h3> +<span id="polsturmisolatedzeroleft"></span><h3><a class="toc-backref" href="#id161"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroLeft{<sturmname>}{<index>}</span></span></a></h3> <blockquote> <p>Expands to the left end-point for the <span class="docutils literal">index</span>-th interval, as computed by some earlier <a class="reference internal" href="#polsturmisolatezeros-sturmname">\PolSturmIsolateZeros{<sturmname>}</a>.</p> @@ -3382,7 +2968,7 @@ will take into account the now known tighter bounds.</p> </blockquote> </div> <div class="section" id="polsturmisolatedzeroright-sturmname-index"> -<span id="polsturmisolatedzeroright"></span><h3><a class="toc-backref" href="#id171"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroRight{<sturmname>}{<index>}</span></span></a></h3> +<span id="polsturmisolatedzeroright"></span><h3><a class="toc-backref" href="#id162"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroRight{<sturmname>}{<index>}</span></span></a></h3> <blockquote> <p>Expands to the right end-point for the <span class="docutils literal">index</span>-th interval as computed by some earlier <a class="reference internal" href="#polsturmisolatezeros-sturmname">\PolSturmIsolateZeros{<sturmname>}</a> and @@ -3391,7 +2977,7 @@ possibly refined afterwards.</p> </blockquote> </div> <div class="section" id="polsturmisolatedzeromultiplicity-sturmname-index"> -<span id="polsturmisolatedzeromultiplicity"></span><h3><a class="toc-backref" href="#id172"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroMultiplicity{<sturmname>}{<index>}</span></span></a></h3> +<span id="polsturmisolatedzeromultiplicity"></span><h3><a class="toc-backref" href="#id163"><span class="docutils literal"><span class="pre">\PolSturmIsolatedZeroMultiplicity{<sturmname>}{<index>}</span></span></a></h3> <blockquote> <p>Expands to the multiplicity of the unique root contained in the <span class="docutils literal">index</span>-th interval.</p> @@ -3399,12 +2985,11 @@ possibly refined afterwards.</p> <p class="admonition-title">Attention!</p> <p>A prior execution of <a class="reference internal" href="#id15">\PolSturmIsolateZeros*{<sturmname>}</a> is mandatory.</p> </div> -<p>See <a class="reference internal" href="#the-degree-nine-polynomial-with-0-99-0-999-0-9999-as-triple-roots">The degree nine polynomial with 0.99, 0.999, 0.9999 as triple -roots</a> for an example of use.</p> +<p>See <span class="docutils literal">The degree nine polynomial with 0.99, 0.999, 0.9999 as triple roots</span> in <span class="docutils literal"><span class="pre">polexpr-examples.pdf</span></span>.</p> </blockquote> </div> <div class="section" id="polsturmnbofisolatedzeros-sturmname"> -<span id="polsturmnbofisolatedzeros"></span><h3><a class="toc-backref" href="#id173"><span class="docutils literal"><span class="pre">\PolSturmNbOfIsolatedZeros{<sturmname>}</span></span></a></h3> +<span id="polsturmnbofisolatedzeros"></span><h3><a class="toc-backref" href="#id164"><span class="docutils literal"><span class="pre">\PolSturmNbOfIsolatedZeros{<sturmname>}</span></span></a></h3> <blockquote> <p>Expands to the number of real roots of the polynomial <span class="docutils literal"><sturmname>_0</span>, i.e. the number of distinct real roots of the @@ -3421,11 +3006,11 @@ documented package macros anyway.</p> </div> </div> <div class="section" id="polsturmnbofrootsof-sturmname-lessthanorequalto-value"> -<h3><a class="toc-backref" href="#id174"><span class="docutils literal"><span class="pre">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id165"><span class="docutils literal"><span class="pre">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></span></a></h3> <blockquote> <p>Expands to the number of distinct roots (of the polynomial used to create the Sturm chain) less than or equal to the <span class="docutils literal">value</span> (i.e. a -number of fraction recognizable by the <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> macros).</p> +number of fraction recognizable by the <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> macros).</p> <div class="admonition attention"> <p class="admonition-title">Attention!</p> <p><a class="reference internal" href="#polsturmisolatezeros-sturmname">\PolSturmIsolateZeros{<sturmname>}</a> must have been executed @@ -3437,7 +3022,7 @@ of the above constraint.</p> </blockquote> </div> <div class="section" id="polsturmnbofrootsof-sturmname-lessthanorequaltoexpr-num-expr"> -<span id="polsturmnbofrootsof"></span><h3><a class="toc-backref" href="#id175"><span class="docutils literal"><span class="pre">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualToExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h3> +<span id="polsturmnbofrootsof"></span><h3><a class="toc-backref" href="#id166"><span class="docutils literal"><span class="pre">\PolSturmNbOfRootsOf{<sturmname>}\LessThanOrEqualToExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h3> <blockquote> <p>Expands to the number of distinct roots (of the polynomial used to create the Sturm chain) which are less than or equal to the @@ -3450,7 +3035,7 @@ beforehand.</p> </blockquote> </div> <div class="section" id="polsturmnbwithmultofrootsof-sturmname-lessthanorequalto-value"> -<h3><a class="toc-backref" href="#id176"><span class="docutils literal"><span class="pre">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id167"><span class="docutils literal"><span class="pre">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualTo{<value>}</span></span></a></h3> <blockquote> <p>Expands to the number counted with multiplicities of the roots (of the polynomial used to create the Sturm chain) which are less than @@ -3463,7 +3048,7 @@ variant) must have been executed beforehand.</p> </blockquote> </div> <div class="section" id="polsturmnbwithmultofrootsof-sturmname-lessthanorequaltoexpr-num-expr"> -<h3><a class="toc-backref" href="#id177"><span class="docutils literal"><span class="pre">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualToExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id168"><span class="docutils literal"><span class="pre">\PolSturmNbWithMultOfRootsOf{<sturmname>}\LessThanOrEqualToExpr{<num.</span> <span class="pre">expr.>}</span></span></a></h3> <blockquote> <p>Expands to the total number of roots (counted with multiplicities) which are less than or equal to the given <span class="docutils literal">expression</span>.</p> @@ -3475,7 +3060,7 @@ variant) must have been executed beforehand.</p> </blockquote> </div> <div class="section" id="polsturmnbofrationalroots-sturmname"> -<h3><a class="toc-backref" href="#id178"><span class="docutils literal"><span class="pre">\PolSturmNbOfRationalRoots{<sturmname>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id169"><span class="docutils literal"><span class="pre">\PolSturmNbOfRationalRoots{<sturmname>}</span></span></a></h3> <blockquote> <p>Expands to the number of rational roots (without multiplicities).</p> <div class="admonition attention"> @@ -3486,7 +3071,7 @@ beforehand.</p> </blockquote> </div> <div class="section" id="polsturmnbofrationalrootswithmultiplicities-sturmname"> -<h3><a class="toc-backref" href="#id179"><span class="docutils literal"><span class="pre">\PolSturmNbOfRationalRootsWithMultiplicities{<sturmname>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id170"><span class="docutils literal"><span class="pre">\PolSturmNbOfRationalRootsWithMultiplicities{<sturmname>}</span></span></a></h3> <blockquote> <p>Expands to the number of rational roots (counted with multiplicities).</p> <div class="admonition attention"> @@ -3497,7 +3082,7 @@ beforehand.</p> </blockquote> </div> <div class="section" id="polsturmrationalroot-sturmname-k"> -<h3><a class="toc-backref" href="#id180"><span class="docutils literal"><span class="pre">\PolSturmRationalRoot{<sturmname>}{<k>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id171"><span class="docutils literal"><span class="pre">\PolSturmRationalRoot{<sturmname>}{<k>}</span></span></a></h3> <blockquote> <p>Expands to the k-th rational root. They are enumerated from left to right starting at index value <span class="docutils literal">1</span>.</p> @@ -3509,7 +3094,7 @@ beforehand.</p> </blockquote> </div> <div class="section" id="polsturmrationalrootindex-sturmname-k"> -<h3><a class="toc-backref" href="#id181"><span class="docutils literal"><span class="pre">\PolSturmRationalRootIndex{<sturmname>}{<k>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id172"><span class="docutils literal"><span class="pre">\PolSturmRationalRootIndex{<sturmname>}{<k>}</span></span></a></h3> <blockquote> <p>Expands to the index of the <span class="docutils literal">k</span>th rational root as part of the ordered real roots (counted without multiplicities). So @@ -3524,7 +3109,7 @@ beforehand.</p> </blockquote> </div> <div class="section" id="polsturmrationalrootmultiplicity-sturmname-k"> -<h3><a class="toc-backref" href="#id182"><span class="docutils literal"><span class="pre">\PolSturmRationalRootMultiplicity{<sturmname>}{<k>}</span></span></a></h3> +<h3><a class="toc-backref" href="#id173"><span class="docutils literal"><span class="pre">\PolSturmRationalRootMultiplicity{<sturmname>}{<k>}</span></span></a></h3> <blockquote> <p>Expands to the multiplicity of the <span class="docutils literal">k</span>th rational root.</p> <div class="admonition attention"> @@ -3535,14 +3120,14 @@ beforehand.</p> </blockquote> </div> <div class="section" id="polintervalwidth-sturmname-index"> -<span id="polintervalwidth"></span><h3><a class="toc-backref" href="#id183"><span class="docutils literal"><span class="pre">\PolIntervalWidth{<sturmname>}{<index>}</span></span></a></h3> +<span id="polintervalwidth"></span><h3><a class="toc-backref" href="#id174"><span class="docutils literal"><span class="pre">\PolIntervalWidth{<sturmname>}{<index>}</span></span></a></h3> <blockquote> <p>The <span class="docutils literal">10^E</span> width of the current <span class="docutils literal">index</span>-th root localization -interval. Output is in <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> raw <span class="docutils literal">1/1[E]</span> format (if not zero).</p> +interval. Output is in <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> raw <span class="docutils literal">1/1[E]</span> format (if not zero).</p> </blockquote> </div> <div class="section" id="expandable-macros-for-use-within-execution-of-polprintintervals"> -<h3><a class="toc-backref" href="#id184">Expandable macros for use within execution of <span class="docutils literal">\PolPrintIntervals</span></a></h3> +<h3><a class="toc-backref" href="#id175">Expandable macros for use within execution of <span class="docutils literal">\PolPrintIntervals</span></a></h3> <p>These macros are for usage within custom user redefinitions of <a class="reference internal" href="#polprintintervalsknownroot">\PolPrintIntervalsKnownRoot</a>, <a class="reference internal" href="#polprintintervalsunknownroot">\PolPrintIntervalsUnknownRoot</a>, or in redefinitions of <a class="reference internal" href="#polprintintervalsprintexactzero">PolPrintIntervalsPrintExactZero</a> (used in the @@ -3551,7 +3136,7 @@ default for the former) and of <a class="reference internal" href="#polprintinte latter).</p> </div> <div class="section" id="polprintintervalsthevar"> -<h3><a class="toc-backref" href="#id185"><span class="docutils literal">\PolPrintIntervalsTheVar</span></a></h3> +<h3><a class="toc-backref" href="#id176"><span class="docutils literal">\PolPrintIntervalsTheVar</span></a></h3> <blockquote> <p>Expands to the name (default <span class="docutils literal">Z</span>) used for representing the roots, which was passed as optional argument <span class="docutils literal">varname</span> to @@ -3559,21 +3144,21 @@ which was passed as optional argument <span class="docutils literal">varname</sp </blockquote> </div> <div class="section" id="polprintintervalstheindex"> -<h3><a class="toc-backref" href="#id186"><span class="docutils literal">\PolPrintIntervalsTheIndex</span></a></h3> +<h3><a class="toc-backref" href="#id177"><span class="docutils literal">\PolPrintIntervalsTheIndex</span></a></h3> <blockquote> <p>Expands to the index of the considered interval (indexing starting at 1 for the leftmost interval).</p> </blockquote> </div> <div class="section" id="polprintintervalsthesturmname"> -<h3><a class="toc-backref" href="#id187"><span class="docutils literal">\PolPrintIntervalsTheSturmName</span></a></h3> +<h3><a class="toc-backref" href="#id178"><span class="docutils literal">\PolPrintIntervalsTheSturmName</span></a></h3> <blockquote> <p>Expands to the argument which was passed as <span class="docutils literal"><sturmname></span> to <a class="reference internal" href="#polprintintervals-varname-sturmname">\PolPrintIntervals[<varname>]{<sturmname>}</a>.</p> </blockquote> </div> <div class="section" id="polprintintervalstheleftendpoint"> -<h3><a class="toc-backref" href="#id188"><span class="docutils literal">\PolPrintIntervalsTheLeftEndPoint</span></a></h3> +<h3><a class="toc-backref" href="#id179"><span class="docutils literal">\PolPrintIntervalsTheLeftEndPoint</span></a></h3> <blockquote> <p>The left end point of the interval, as would be produced by <a class="reference internal" href="#polsturmisolatedzeroleft">\PolSturmIsolatedZeroLeft</a> if it was @@ -3583,7 +3168,7 @@ by <a class="reference internal" href="#polprintintervalsthesturmname">\PolPrint </blockquote> </div> <div class="section" id="polprintintervalstherightendpoint"> -<h3><a class="toc-backref" href="#id189"><span class="docutils literal">\PolPrintIntervalsTheRightEndPoint</span></a></h3> +<h3><a class="toc-backref" href="#id180"><span class="docutils literal">\PolPrintIntervalsTheRightEndPoint</span></a></h3> <blockquote> <p>The right end point of the interval, as would be produced by <a class="reference internal" href="#polsturmisolatedzeroright">\PolSturmIsolatedZeroRight</a> for @@ -3591,7 +3176,7 @@ this Sturm chain name and index.</p> </blockquote> </div> <div class="section" id="polprintintervalsthemultiplicity"> -<h3><a class="toc-backref" href="#id190"><span class="docutils literal">\PolPrintIntervalsTheMultiplicity</span></a></h3> +<h3><a class="toc-backref" href="#id181"><span class="docutils literal">\PolPrintIntervalsTheMultiplicity</span></a></h3> <blockquote> <p>The multiplicity of the unique root within the interval of index <a class="reference internal" href="#polprintintervalstheindex">\PolPrintIntervalsTheIndex</a>. Makes sense only if the starred (or @@ -3601,11 +3186,11 @@ double-starred) variant of <a class="reference internal" href="#polsturmisolatez </div> </div> <div class="section" id="booleans-with-default-setting-as-indicated"> -<h1><a class="toc-backref" href="#id191">Booleans (with default setting as indicated)</a></h1> +<h1><a class="toc-backref" href="#id182">Booleans (with default setting as indicated)</a></h1> <div class="section" id="xintverbosefalse"> -<h2><a class="toc-backref" href="#id192"><span class="docutils literal">\xintverbosefalse</span></a></h2> +<h2><a class="toc-backref" href="#id183"><span class="docutils literal">\xintverbosefalse</span></a></h2> <blockquote> -<p>This is actually an <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> configuration. Setting it to +<p>This is actually an <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> configuration. Setting it to <span class="docutils literal">true</span> triggers the writing of information to the log when new polynomial or scalar variables are defined.</p> <div class="admonition caution"> @@ -3616,7 +3201,7 @@ considered unstable and undocumented internal structures.</p> </blockquote> </div> <div class="section" id="polnewpolverbosefalse"> -<h2><a class="toc-backref" href="#id193"><span class="docutils literal">\polnewpolverbosefalse</span></a></h2> +<h2><a class="toc-backref" href="#id184"><span class="docutils literal">\polnewpolverbosefalse</span></a></h2> <blockquote> <p>When <span class="docutils literal">\poldef</span> is used, both a variable and a function are defined. The default <span class="docutils literal">\polnewpolverbosefalse</span> setting suppresses @@ -3636,14 +3221,14 @@ roots obey only the <span class="docutils literal"><span class="pre">\xintverbos </blockquote> </div> <div class="section" id="poltypesetallfalse"> -<h2><a class="toc-backref" href="#id194"><span class="docutils literal">\poltypesetallfalse</span></a></h2> +<h2><a class="toc-backref" href="#id185"><span class="docutils literal">\poltypesetallfalse</span></a></h2> <blockquote> <p>If <span class="docutils literal">true</span>, <a class="reference internal" href="#poltypeset">\PolTypeset</a> will also typeset the vanishing coefficients.</p> </blockquote> </div> <div class="section" id="poltoexprallfalse"> -<h2><a class="toc-backref" href="#id195"><span class="docutils literal">\poltoexprallfalse</span></a></h2> +<h2><a class="toc-backref" href="#id186"><span class="docutils literal">\poltoexprallfalse</span></a></h2> <blockquote> <p>If <span class="docutils literal">true</span>, <a class="reference internal" href="#poltoexpr-pol-expr">\PolToExpr{<pol. expr.>}</a> and <a class="reference internal" href="#poltofloatexpr-pol-expr">\PolToFloatExpr{<pol. expr.>}</a> will also include the vanishing coefficients in their outputs.</p> @@ -3651,9 +3236,9 @@ also include the vanishing coefficients in their outputs.</p> </div> </div> <div class="section" id="utilies"> -<h1><a class="toc-backref" href="#id196">Utilies</a></h1> +<h1><a class="toc-backref" href="#id187">Utilies</a></h1> <div class="section" id="poldectostring-decimal-number"> -<span id="poldectostring"></span><h2><a class="toc-backref" href="#id197"><span class="docutils literal">\PolDecToString{decimal number}</span></a></h2> +<span id="poldectostring"></span><h2><a class="toc-backref" href="#id188"><span class="docutils literal">\PolDecToString{decimal number}</span></a></h2> <blockquote> <p>This is a utility macro to print decimal numbers. It is an alias for <span class="docutils literal">\xintDecToString</span>.</p> @@ -3667,12 +3252,12 @@ illustrates that trailing zeros are not trimmed.</p> <span class="docutils literal"><span class="pre">\PolDecToString{\xintREZ{#1}}</span></span>.</p> <p>Attention that a.t.t.o.w. if the argument is for example <span class="docutils literal">1/5</span>, the macro does not identify that this is in fact a number with a finite -decimal expansion and it outputs <span class="docutils literal">1/5</span>. See current <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> +decimal expansion and it outputs <span class="docutils literal">1/5</span>. See current <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> documentation.</p> </blockquote> </div> <div class="section" id="polexprsetup"> -<h2><a class="toc-backref" href="#id198"><span class="docutils literal">\polexprsetup</span></a></h2> +<h2><a class="toc-backref" href="#id189"><span class="docutils literal">\polexprsetup</span></a></h2> <blockquote> <p>Serves to customize the package. Currently only two keys are recognized:</p> @@ -3693,14 +3278,14 @@ no rational roots”).</p></li> </div> </div> <div class="section" id="technicalities"> -<h1><a class="toc-backref" href="#id199">Technicalities</a></h1> +<h1><a class="toc-backref" href="#id190">Technicalities</a></h1> <ul> <li><p>The catcode of the semi-colon is reset temporarily by <a class="reference internal" href="#poldef">\poldef</a> macro in case some other package (for example the French babel module) may have made it active. This will fail though if the whole thing was already part of a macro argument, in such cases one can use <a class="reference internal" href="#id8">\PolDef</a> rather. The colon in <span class="docutils literal">:=</span> may be active with no consequences.</p></li> -<li><p>As a consequence of <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> addition and subtraction always using +<li><p>As a consequence of <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a> addition and subtraction always using least common multiples for the denominators, user-chosen common denominators survive additions and multiplications. For example, this:</p> <pre class="literal-block">\poldef P(x):= 1/2 + 2/2*x + 3/2*x^3 + 4/2*x^4; @@ -3731,7 +3316,7 @@ documented and unstable. Don't use them.</p></li> </ul> </div> <div class="section" id="change-log"> -<h1><a class="toc-backref" href="#id200">CHANGE LOG</a></h1> +<h1><a class="toc-backref" href="#id191">CHANGE LOG</a></h1> <ul> <li><p>v0.1 (2018/01/11): initial release. Features:</p> <ul class="simple"> @@ -3910,7 +3495,7 @@ for localization of the real roots of polynomials.</p> <li><p>bug fixes:</p> <ul> <li><p><a class="reference internal" href="#polget-polname-fromarray-macro">\PolGet{<polname>}\fromarray\macro</a> crashed when <span class="docutils literal">\macro</span> was -an <a class="reference external" href="http://www.ctan.org/pkg/xint">xinttools</a> array macro with no items. It now produces the zero +an <a class="reference external" href="https://www.ctan.org/pkg/xint">xinttools</a> array macro with no items. It now produces the zero polynomial.</p></li> </ul> </li> @@ -3922,14 +3507,13 @@ This speeds up localization of roots via 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="#polfromcsv">\PolFromCSV</a> or <a class="reference internal" href="#polget">\PolGet</a> -get their coefficients normalized via <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a>'s <span class="docutils literal">\xintRaw</span>.</p></li> +get their coefficients normalized via <a class="reference external" href="https://www.ctan.org/pkg/xint">xintfrac</a>'s <span class="docutils literal">\xintRaw</span>.</p></li> </ul> </li> <li><p>experimental change:</p> <ul> -<li><p>optional argument to <a class="reference internal" href="#polsturmisolatezeros">\PolSturmIsolateZeros</a> (see <a class="reference internal" href="#the-degree-41-polynomial-with-2-1-9-1-8-0-0-1-1-9-2-as-roots">The -degree 41 polynomial with -2, -1.9, -1.8, ..., 0, 0.1, ..., 1.9, 2 -as roots</a> for usage). It will presumably be replaced in future by +<li><p>optional argument to <a class="reference internal" href="#polsturmisolatezeros">\PolSturmIsolateZeros</a> (see <span class="docutils literal">The degree 41 polynomial with <span class="pre">-2,</span> <span class="pre">-1.9,</span> <span class="pre">-1.8,</span> <span class="pre">...,</span> 0, 0.1, <span class="pre">...,</span> 1.9, 2 as roots</span> in <span class="docutils literal"><span class="pre">polexpr-examples.pdf</span></span>). +It will presumably be replaced in future by an interval specification.</p></li> </ul> </li> @@ -4124,7 +3708,7 @@ start letting <span class="docutils literal">\xintexpr</span> recognize a polyno variable. This has allowed:</p> <ul> <li><p>to solve the reduced inter-operability problems between polexpr -and <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> which arose as consequences to the deep <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> <span class="docutils literal">1.4</span> +and <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> which arose as consequences to the deep <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <span class="docutils literal">1.4</span> evolution,</p></li> <li><p>to make available most of the functionality associated to expandable macros directly in the <span class="docutils literal">\xinteval</span> syntax as @@ -4153,8 +3737,8 @@ description</a>.</p> <li><p>Sadly, <span class="docutils literal">diff1()</span>, <span class="docutils literal">diff2()</span>, <span class="docutils literal">diffn()</span> were broken for polynomials of degrees 8 or more, due to a typo and insufficient testing.</p></li> -<li><p>The package should have (as documented) required <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> 1.4d -but in practice it accepted to work with <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> 1.4c, whose +<li><p>The package should have (as documented) required <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> 1.4d +but in practice it accepted to work with <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> 1.4c, whose <span class="docutils literal">\xinteval</span> does not know how to "output" a polynomial.</p></li> <li><p>The definition of one of the two variants of <a class="reference internal" href="#polsturmnbofrootsof">\PolSturmNbOfRootsOf</a> was broken by an end-of-line space, left-over from mass conversion from LaTeX to TeX syntax.</p></li> @@ -4178,7 +3762,7 @@ from mass conversion from LaTeX to TeX syntax.</p></li> </li> <li><p>improved:</p> <ul> -<li><p>Some <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> functions such as <span class="docutils literal">rseq()</span> use the semi-colon, +<li><p>Some <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> functions such as <span class="docutils literal">rseq()</span> use the semi-colon, and it was mentioned in the documentation that <a class="reference internal" href="#poldef">\poldef</a> will be confused by this and that inner semi-colons could be set within braces <span class="docutils literal">{;}</span> as a work-around. It was not clear from @@ -4187,12 +3771,12 @@ this work-around. With this relase only <a class="reference internal" href="#po not <a class="reference internal" href="#id8">\PolDef</a> needs the work-around.</p></li> </ul> </li> -<li><p>track <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> <span class="docutils literal">1.4e</span> changes relative to powers.</p></li> +<li><p>track <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <span class="docutils literal">1.4e</span> changes relative to powers.</p></li> </ul> </li> <li><p>v0.8.3 (2021/05/27)</p> <ul class="simple"> -<li><p>small internal update to track an <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> <span class="docutils literal">1.4h</span> change +<li><p>small internal update to track an <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <span class="docutils literal">1.4h</span> change regarding handling of exceptions. Will require this version at least on loading.</p></li> </ul> @@ -4209,14 +3793,23 @@ polynomials if original polynomial had no real root!</p></li> <li><p>bugfix: support for the <span class="docutils literal">intfrom()</span> 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 <span class="docutils literal">\xintSignedFrac</span> and -<span class="docutils literal">\xintSignedFwOver</span> at <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> <span class="docutils literal">1.4g</span></p></li> +<span class="docutils literal">\xintSignedFwOver</span> at <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> <span class="docutils literal">1.4g</span></p></li> +</ul> +</li> +<li><p>v0.8.6 (2022/01/09)</p> +<ul class="simple"> +<li><p>separate <span class="docutils literal"><span class="pre">polexpr-examples.pdf</span></span> from this reference 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="#polprintintervalsrowseparator">\PolPrintIntervalsRowSeparator</a> and allow usage of +<span class="docutils literal">amsmath</span> environments in custom <a class="reference internal" href="#polprintintervalsbeginenv">\PolPrintIntervalsBeginEnv</a> +and <a class="reference internal" href="#polprintintervalsendenv">\PolPrintIntervalsEndEnv</a>.</p></li> </ul> </li> </ul> </div> <div class="section" id="acknowledgments"> -<h1><a class="toc-backref" href="#id201">Acknowledgments</a></h1> -<p>Thanks to Jürgen Gilg whose question about <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> usage for +<h1><a class="toc-backref" href="#id192">Acknowledgments</a></h1> +<p>Thanks to Jürgen Gilg whose question about <a class="reference external" href="https://www.ctan.org/pkg/xintexpr">xintexpr</a> usage for differentiating polynomials was the initial trigger leading to this package, and to Jürgen Gilg and Thomas Söll for testing it on some concrete problems.</p> |