texlive[59088] Master/texmf-dist: polexpr (5may21)

commits+karl at tug.org commits+karl at tug.org
Wed May 5 21:35:59 CEST 2021


Revision: 59088
          http://tug.org/svn/texlive?view=revision&revision=59088
Author:   karl
Date:     2021-05-05 21:35:58 +0200 (Wed, 05 May 2021)
Log Message:
-----------
polexpr (5may21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/polexpr/README.md
    trunk/Master/texmf-dist/doc/generic/polexpr/polexpr.html
    trunk/Master/texmf-dist/tex/generic/polexpr/polexpr.sty
    trunk/Master/texmf-dist/tex/generic/polexpr/polexprcore.tex
    trunk/Master/texmf-dist/tex/generic/polexpr/polexprexpr.tex
    trunk/Master/texmf-dist/tex/generic/polexpr/polexprsturm.tex

Modified: trunk/Master/texmf-dist/doc/generic/polexpr/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/polexpr/README.md	2021-05-05 19:35:42 UTC (rev 59087)
+++ trunk/Master/texmf-dist/doc/generic/polexpr/README.md	2021-05-05 19:35:58 UTC (rev 59088)
@@ -85,8 +85,10 @@
   and enhancement of xintexpr 1.4.
 - 0.8.1 (2021/04/12)
   Bugfix: a typo broke the 0.8 ``diff1()`` and related functions.
+- 0.8.2 (2021/05/05)
+  Track `xintexpr` 1.4e changes
 
-Files of 0.8.1 release:
+Files of 0.8.2 release:
 
 - polexpr.sty, polexprcore.tex, polexprexpr.tex, polexprsturm.tex,
 - README.md,
@@ -96,7 +98,7 @@
 ---------------
 
 Thanks to Jürgen Gilg whose question about
-[xintexpr](http://www.ctan.org/pkg/xintexpr) usage for differentiating
+[xintexpr](http://www.ctan.org/pkg/xint) 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.
 

Modified: trunk/Master/texmf-dist/doc/generic/polexpr/polexpr.html
===================================================================
--- trunk/Master/texmf-dist/doc/generic/polexpr/polexpr.html	2021-05-05 19:35:42 UTC (rev 59087)
+++ trunk/Master/texmf-dist/doc/generic/polexpr/polexpr.html	2021-05-05 19:35:58 UTC (rev 59088)
@@ -598,7 +598,7 @@
 <body>
 <div class="document" id="package-polexpr-documentation">
 <h1 class="title">Package polexpr documentation</h1>
-<p class="subtitle" id="id1">0.8.1 (2021/04/12)</p>
+<p class="subtitle" id="id1">0.8.2 (2021/05/05)</p>
 
 <div class="contents topic" id="contents">
 <p class="topic-title">Contents</p>
@@ -1209,23 +1209,7 @@
 Only in case of a scalar denominator is it to be considered stable.
 Please use rather <span class="docutils literal">quo()</span>.</p>
 </blockquote>
-<div class="admonition warning">
-<p class="admonition-title">Warning</p>
-<p>The <span class="docutils literal">pow(x,a)</span> function of <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> for <span class="docutils literal">x^a</span> with fractional
-<span class="docutils literal">a</span> will not (with current <a class="reference external" href="http://www.ctan.org/pkg/xint">xintexpr</a> <span class="docutils literal">1.4d</span>) accept a polynomial
-as first variable even if the second argument is an integer.</p>
-<p>It is possible (via <span class="docutils literal">\poormanloghack</span>) to instruct <span class="docutils literal">\xintexpr</span> to
-let <span class="docutils literal"><span class="pre">x**a</span></span> or <span class="docutils literal">x^a</span> be as <span class="docutils literal">pow(x,a)</span>.  If this is done <span class="docutils literal">**</span>
-(resp. <span class="docutils literal">^</span>) will become unusable with polynomials (i.e. will create
-a low-level TeX error).</p>
-<p>And vice versa if polexpr gets loaded after the <span class="docutils literal">\poormanloghack</span>
-was used, <span class="docutils literal">**</span> and <span class="docutils literal">^</span> in <span class="docutils literal"><span class="pre">\xintexpr/\xinteval</span></span> will again only
-accept integer powers.</p>
-<p>Thus employ <span class="docutils literal">\poormanloghack</span> for at most one of <span class="docutils literal">**</span> or <span class="docutils literal">^</span>
-in order to keep one of them available for polynomials and integer
-powers.</p>
 </div>
-</div>
 <div class="section" id="experimental-infix-operators">
 <h2><a class="toc-backref" href="#id42">Experimental infix operators <span class="docutils literal">//, /:</span></a></h2>
 <blockquote>
@@ -3239,20 +3223,9 @@
 <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>
 <blockquote>
 <p>The one-argument macro used by <span class="docutils literal">\PolToFloatExprOneTerm</span>.
-It defaults to <span class="docutils literal"><span class="pre">\xintFloat{#1}</span></span>.</p>
-<div class="admonition caution">
-<p class="admonition-title">Caution!</p>
-<p>Currently <span class="docutils literal">\xintFloat{0}</span> outputs <span class="docutils literal">0.e0</span>
-which is perfectly acceptable input for Python, but not for
-Maple. Thus, one should better leave the <span class="docutils literal">\\ifpoltoexprall</span> TeX
-Boolean to its default <a class="reference internal" href="#poltoexprallfalse">\poltoexprallfalse</a>, if one intends to use
-the output in a Maple worksheet.</p>
-<p>But even then the zero polynomial will cause a problem. Workaround:</p>
-<pre class="literal-block">\renewcommand\PolToFloatExprCmd[1]{\xintiiifZero{#1}{0.0}{\xintFloat{#1}}}</pre>
-<p>Usage of <span class="docutils literal">\xintiiifZero</span> and not <span class="docutils literal">\xintifZero</span> is only for
-optimization (I can't help it) because <span class="docutils literal">#1</span> is known to be
-in <span class="docutils literal">xintfrac</span> raw format.</p>
-</div>
+It defaults to <span class="docutils literal"><span class="pre">\xintPFloat{#1}</span></span>, which trims trailing
+zeroes.</p>
+<p><em>changed at 0.8.2</em> Formerly it was using <span class="docutils literal">\xintFloat</span>.</p>
 </blockquote>
 </div>
 </div>
@@ -4176,13 +4149,13 @@
 </li>
 <li><p>bugfix:</p>
 <ul>
-<li><p>sadly, <span class="docutils literal">diff1()</span>, <span class="docutils literal">diff2()</span>,  <span class="docutils literal">diffn()</span> were broken
+<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
+<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
 <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
+<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>
 </ul>
 </li>
@@ -4194,7 +4167,33 @@
 </li>
 </ul>
 </li>
+<li><p>v0.8.2 (2021/05/05)</p>
+<ul class="simple">
+<li><p>breaking change:</p>
+<ul>
+<li><p>usage of <span class="docutils literal">\xintPFloat</span> in place of <span class="docutils literal">\xintFloat</span> for
+<a class="reference internal" href="#poltofloatexprcmd">\PolToFloatExprCmd</a>.</p></li>
 </ul>
+</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,
+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
+this documentation that also <a class="reference internal" href="#id8">\PolDef</a> required
+this work-around.  With this relase only <a class="reference internal" href="#poldef">\poldef</a> but
+not <a class="reference internal" href="#id8">\PolDef</a> needs the work-around.</p></li>
+</ul>
+</li>
+</ul>
+<blockquote>
+<ul class="simple">
+<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>
+</ul>
+</blockquote>
+</li>
+</ul>
 </div>
 <div class="section" id="acknowledgments">
 <h1><a class="toc-backref" href="#id201">Acknowledgments</a></h1>

Modified: trunk/Master/texmf-dist/tex/generic/polexpr/polexpr.sty
===================================================================
--- trunk/Master/texmf-dist/tex/generic/polexpr/polexpr.sty	2021-05-05 19:35:42 UTC (rev 59087)
+++ trunk/Master/texmf-dist/tex/generic/polexpr/polexpr.sty	2021-05-05 19:35:58 UTC (rev 59088)
@@ -2,7 +2,7 @@
 % License: LPPL 1.3c (author-maintained)
 % Usage: \input polexpr.sty   (Plain or other macro formats)
 %    or  \usepackage{polexpr} (LaTeX macro format)
-% Release 0.8.1 (2021/04/12) of polexpr.sty. This file inputs
+% Release 0.8.2 (2021/05/05) of polexpr.sty. This file inputs
 %   polexprcore.tex
 %   polexprexpr.tex
 %   polexprsturm.tex
@@ -54,11 +54,11 @@
 \XINTsetupcatcodes% (does \endlinechar13 in particular)
 \XINT_providespackage
 \ProvidesPackage{polexpr}%
-  [2021/04/12 v0.8.1 Polynomial expressions with rational coefficients (JFB)]%
+  [2021/05/05 v0.8.2 Polynomial expressions with rational coefficients (JFB)]%
 \begingroup
  \def\x#1/#2/#3 #4\xint:{#1#2#3}%
  \ifnum\expandafter\x\expanded{\csname ver at xintexpr.sty\endcsname}\xint:
-       <20210329 %
+       <20210505 %
  \immediate\write128{! Package polexpr error: xintexpr too old, aborting input}%
  \else\expandafter\xint_gobble_i
  \fi
@@ -200,7 +200,7 @@
 %% \poldef
 %%
 \def\PolDef{\POL at chkopt\POL at oPolDef[x]}%
-\def\POL at oPolDef[#1]#2#3{\poldef #2(#1):=#3;}%
+\def\POL at oPolDef[#1]#2#3{\poldef #2(#1):={#3};}%
 \def\poldef{\edef\POL at restoresemicolon{\catcode59=\the\catcode59\relax}%
                 \catcode59 12 \POL at defpol}%
 \def\POL at defpol #1(#2)#3=#4;{%
@@ -919,7 +919,7 @@
 \def\PolIContent#1{\xintGCDof{\PolToList{#1}}}%
 %
 \def\PolToExprCmd#1{\xintPRaw{\xintRawWithZeros{#1}}}%
-\def\PolToFloatExprCmd#1{\xintFloat{#1}}%
+\def\PolToFloatExprCmd#1{\xintPFloat{#1}}% CHANGED AT 0.8.2! was \xintFloat
 % \def\PolTypesetCmdPrefix#1{\xintiiifSgn{#1}{}{+}{+}}%
 \let\PolToExprTermPrefix\PolTypesetCmdPrefix
 \def\PolToExprOneTermStyleA#1#2{%
@@ -1055,4 +1055,4 @@
   \if\relax#4\expandafter\xint_gob_til_dot\fi
   #1{#4}#2{#3}\the\numexpr\@ne+#3.%
 }%
-\XINT_restorecatcodes_endinput%
+\XINTrestorecatcodesendinput%

Modified: trunk/Master/texmf-dist/tex/generic/polexpr/polexprcore.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/polexpr/polexprcore.tex	2021-05-05 19:35:42 UTC (rev 59087)
+++ trunk/Master/texmf-dist/tex/generic/polexpr/polexprcore.tex	2021-05-05 19:35:58 UTC (rev 59088)
@@ -1,4 +1,4 @@
-%% This file polexprcore.tex is part of the polexpr package (0.8.1, 2021/04/12)
+%% This file polexprcore.tex is part of the polexpr package (0.8.2, 2021/05/05)
 %% Core routines to match infix operators +, -, *, //, /:, ^, ** and some
 %% functions
 %% The atoms representing polynomials inside \xintexpr are
@@ -383,10 +383,10 @@
 \def\POL_pow_in #1\xint:#2%
 {%
     {%
-    \expandafter\POL_pow_fork\the\numexpr \xintNum{#2}.#1\empty
+    \expandafter\POL_pow_fork\romannumeral0\xintraw{#2}.#1\empty
     }%
 }%
-\def\POL_pow_fork #1#2.%
+\def\POL_pow_fork #1%#2.%
 {%
     \xint_UDzerominusfork
       #1-\POL_pow_zero
@@ -393,7 +393,7 @@
       0#1\POL_pow_neg
        0-\POL_pow_pos
     \krof
-    #1#2.%
+    #1%#2.%
 }%
 \def\POL_pow_zero #1\empty{1/1[0]}%
 \def\POL_pow_neg #1.#2%
@@ -402,7 +402,7 @@
 }%
 \def\POL_pow_pos #1.#2%
 {%
-    \POL_Pfork #2{\POL_pow_a}P{\POL_pow_scalar}\krof #1.#2%
+    \POL_Pfork #2{\POL_pow_aa}P{\POL_pow_scalar}\krof #1.#2%
 }%
 \def\POL_pow_scalar #1.#2\empty
 {%
@@ -413,6 +413,7 @@
     \romannumeral0\XINT_signalcondition{InvalidOperation}%
     {Not supported: polynomial to negative power #1}{}{1/1[0]}%
 }%
+\def\POL_pow_aa #1.{\expandafter\POL_pow_a\the\numexpr\xintNum{#1}.}%
 \def\POL_pow_a #1.%
 {%
 % trailing \empty will disappear in expanded context (old comment)

Modified: trunk/Master/texmf-dist/tex/generic/polexpr/polexprexpr.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/polexpr/polexprexpr.tex	2021-05-05 19:35:42 UTC (rev 59087)
+++ trunk/Master/texmf-dist/tex/generic/polexpr/polexprexpr.tex	2021-05-05 19:35:58 UTC (rev 59088)
@@ -1,4 +1,4 @@
-%% This file polexprexpr.tex is part of the polexpr package (0.8.1, 2021/04/12)
+%% This file polexprexpr.tex is part of the polexpr package (0.8.2, 2021/05/05)
 %% Extending \xintexpr syntax:
 %%
 %% 1. Authorize ' in variable and function names

Modified: trunk/Master/texmf-dist/tex/generic/polexpr/polexprsturm.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/polexpr/polexprsturm.tex	2021-05-05 19:35:42 UTC (rev 59087)
+++ trunk/Master/texmf-dist/tex/generic/polexpr/polexprsturm.tex	2021-05-05 19:35:58 UTC (rev 59088)
@@ -1,4 +1,4 @@
-%% This file polexprsturm.tex is part of the polexpr package (0.8.1, 2021/04/12)
+%% This file polexprsturm.tex is part of the polexpr package (0.8.2, 2021/05/05)
 %% Sturm Algorithm (polexpr 0.4)
 %% 0.5 uses primitive polynomials for faster evaluations afterwards
 %% 0.6 corrects misuse of \@ifstar! (mumble). \PolToSturm* was broken.



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