texlive[46789] Master/texmf-dist: polexpr (2mar18)

commits+karl at tug.org commits+karl at tug.org
Fri Mar 2 23:42:11 CET 2018


Revision: 46789
          http://tug.org/svn/texlive?view=revision&revision=46789
Author:   karl
Date:     2018-03-02 23:42:11 +0100 (Fri, 02 Mar 2018)
Log Message:
-----------
polexpr (2mar18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/polexpr/README.md
    trunk/Master/texmf-dist/doc/latex/polexpr/polexpr.html
    trunk/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
    trunk/Master/texmf-dist/tex/latex/polexpr/polexpr.sty

Modified: trunk/Master/texmf-dist/doc/latex/polexpr/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polexpr/README.md	2018-03-02 22:41:58 UTC (rev 46788)
+++ trunk/Master/texmf-dist/doc/latex/polexpr/README.md	2018-03-02 22:42:11 UTC (rev 46789)
@@ -61,8 +61,10 @@
       `polexpr.html`.
   - Main new feature: root localization via [Sturm
       Theorem](https://en.wikipedia.org/wiki/Sturm%27s_theorem).
+- 0.4.1 (2018/03/01)
+  Synced with xint 1.3.
 
-Files of 0.4 release:
+Files of 0.4.1 release:
 
 - README.md,
 - polexpr.sty (package file),

Modified: trunk/Master/texmf-dist/doc/latex/polexpr/polexpr.html
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polexpr/polexpr.html	2018-03-02 22:41:58 UTC (rev 46788)
+++ trunk/Master/texmf-dist/doc/latex/polexpr/polexpr.html	2018-03-02 22:42:11 UTC (rev 46789)
@@ -362,7 +362,7 @@
 <body>
 <div class="document" id="package-polexpr-documentation">
 <h1 class="title">Package polexpr documentation</h1>
-<h2 class="subtitle" id="id1">0.4 (2018/02/16)</h2>
+<h2 class="subtitle" id="id1">0.4.1 (2018/03/01)</h2>
 
 <!-- comment: -*- fill-column: 72; mode: rst; -*- -->
 <div class="contents topic" id="contents">
@@ -604,6 +604,11 @@
 </ul>
 <div class="section" id="a-typical-example">
 <h2><a class="toc-backref" href="#id35">A typical example</a></h2>
+<p>In this example the polynomial is square-free; we can make sure of that by
+comparing the degree of the first element of the Sturm chain with the
+degree of the original polynomial. In such case the second element of
+the Sturm chain is still the polynomial first derivative, because there
+was no further reduction.</p>
 <pre class="literal-block">
 \poldef f(x) := x^7 - x^6 - 2x + 1;
 
@@ -618,7 +623,8 @@
 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 derivative polynomial is \PolTypeset{f_1}.
+The derivative polynomial is \PolTypeset{f_1} (from
+$\PolDegree{f_0}=7$ we know that original polynomial was square-free).
 \PolToSturm{f_1}{f_1}\PolSturmIsolateZeros{f_1}%
 It has \PolSturmNbOfIsolatedZeros{f_1} distinct real
 roots:
@@ -1740,21 +1746,17 @@
 <div class="section" id="poldectostring-decimal-number">
 <span id="poldectostring"></span><h2><a class="toc-backref" href="#id119"><tt class="docutils literal">\PolDecToString{decimal number}</tt></a></h2>
 <blockquote>
-<p>This is a utility macro to print decimal numbers. Indeed for legacy
-reasons, <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> does not yet have user-level ready-to-use macros
-handling specifically the printing of decimal numbers from their
-internal representations such as <tt class="docutils literal">A/1[N]</tt>.</p>
+<p>This is a utility macro to print decimal numbers. It has been
+backported to <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> (release <tt class="docutils literal">1.3</tt> of <tt class="docutils literal">2018/03/01</tt>) under
+the name <tt class="docutils literal">\xintDecToString</tt>, and the <tt class="docutils literal">polexpr</tt> macro is simply
+now an alias to it.</p>
 <p>For example
 <tt class="docutils literal"><span class="pre">\PolDecToString{123.456e-8}</span></tt> will expand to <tt class="docutils literal">0.00000123456</tt>
-and <tt class="docutils literal"><span class="pre">\PolDecToString{123.450e-8}</span></tt> to <tt class="docutils literal">0.00000123450</tt>. This
-illustrates that trailing zeros are not trimmed (to achieve that one
-can use <tt class="docutils literal"><span class="pre">\PolDecToString{\xintREZ{#1}}</span></tt>.)</p>
-<p>The macro does not try to identify if the fraction has a denominator
-consisting only of two's and five's; such a denominator will be left
-at right-end of output.</p>
-<p>This utility macro will presumably be incorporated (possibly in a
-more powerful form) to <a class="reference external" href="http://www.ctan.org/pkg/xint">xintfrac</a> (or rather to a decimal module) in
-a future <a class="reference external" href="http://www.ctan.org/pkg/xint">xint</a> release.</p>
+and <tt class="docutils literal"><span class="pre">\PolDecToString{123.450e-8}</span></tt> to <tt class="docutils literal">0.00000123450</tt> which
+illustrates that trailing zeros are not trimmed. To trim trailing
+zeroes, one can use <tt class="docutils literal"><span class="pre">\PolDecToString{\xintREZ{#1}}</span></tt>.</p>
+<p>The exact behaviour of this macro may evolve in future releases of
+<a class="reference external" href="http://www.ctan.org/pkg/xint">xint</a>.</p>
 </blockquote>
 </div>
 </div>
@@ -2029,6 +2031,9 @@
 </li>
 </ul>
 </li>
+<li><p class="first">v0.4.1 (2018/03/01)</p>
+<p>Synced with xint 1.3.</p>
+</li>
 </ul>
 </div>
 <div class="section" id="acknowledgments">

Modified: trunk/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/polexpr/polexpr.txt	2018-03-02 22:41:58 UTC (rev 46788)
+++ trunk/Master/texmf-dist/doc/latex/polexpr/polexpr.txt	2018-03-02 22:42:11 UTC (rev 46789)
@@ -4,8 +4,8 @@
  Package polexpr documentation
 ===============================
 
-0.4 (2018/02/16)
-================
+0.4.1 (2018/03/01)
+==================
 
 .. contents::
 
@@ -145,6 +145,12 @@
 A typical example
 ~~~~~~~~~~~~~~~~~
 
+In this example the polynomial is square-free; we can make sure of that by
+comparing the degree of the first element of the Sturm chain with the
+degree of the original polynomial. In such case the second element of
+the Sturm chain is still the polynomial first derivative, because there
+was no further reduction.
+
 ::
 
   \poldef f(x) := x^7 - x^6 - 2x + 1;
@@ -160,7 +166,8 @@
   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 derivative polynomial is \PolTypeset{f_1}.
+  The derivative polynomial is \PolTypeset{f_1} (from
+  $\PolDegree{f_0}=7$ we know that original polynomial was square-free).
   \PolToSturm{f_1}{f_1}\PolSturmIsolateZeros{f_1}%
   It has \PolSturmNbOfIsolatedZeros{f_1} distinct real
   roots:
@@ -1461,25 +1468,20 @@
 ``\PolDecToString{decimal number}``
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    This is a utility macro to print decimal numbers. Indeed for legacy
-    reasons, xintfrac_ does not yet have user-level ready-to-use macros
-    handling specifically the printing of decimal numbers from their
-    internal representations such as ``A/1[N]``.
+    This is a utility macro to print decimal numbers. It has been
+    backported to xintfrac_ (release ``1.3`` of ``2018/03/01``) under
+    the name ``\xintDecToString``, and the ``polexpr`` macro is simply
+    now an alias to it.
 
     For example
     ``\PolDecToString{123.456e-8}`` will expand to ``0.00000123456``
-    and ``\PolDecToString{123.450e-8}`` to ``0.00000123450``. This
-    illustrates that trailing zeros are not trimmed (to achieve that one
-    can use ``\PolDecToString{\xintREZ{#1}}``.)
+    and ``\PolDecToString{123.450e-8}`` to ``0.00000123450`` which
+    illustrates that trailing zeros are not trimmed. To trim trailing
+    zeroes, one can use ``\PolDecToString{\xintREZ{#1}}``.
 
-    The macro does not try to identify if the fraction has a denominator
-    consisting only of two's and five's; such a denominator will be left
-    at right-end of output.
+    The exact behaviour of this macro may evolve in future releases of
+    xint_.
 
-    This utility macro will presumably be incorporated (possibly in a
-    more powerful form) to xintfrac_ (or rather to a decimal module) in
-    a future xint_ release.
-
 Booleans (with default setting as indicated)
 --------------------------------------------
 
@@ -1737,6 +1739,10 @@
     for localization of the real roots of polynomials.
 
 
+- v0.4.1 (2018/03/01)
+
+  Synced with xint 1.3.
+
 Acknowledgments
 ---------------
 

Modified: trunk/Master/texmf-dist/tex/latex/polexpr/polexpr.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/polexpr/polexpr.sty	2018-03-02 22:41:58 UTC (rev 46788)
+++ trunk/Master/texmf-dist/tex/latex/polexpr/polexpr.sty	2018-03-02 22:42:11 UTC (rev 46789)
@@ -1,8 +1,8 @@
 % author: Jean-François Burnol
 % License: LPPL 1.3c (author-maintained)
 \ProvidesPackage{polexpr}%
-  [2018/02/16 v0.4 Polynomial expressions with rational coefficients (JFB)]%
-\RequirePackage{xintexpr}[2016/03/19]% xint 1.2g (or 1.2c 2015/11/16 at least)
+  [2018/03/01 v0.4.1 Polynomial expressions with rational coefficients (JFB)]%
+\RequirePackage{xintexpr}[2018/03/01]% xint 1.3
 \edef\POL at restorecatcodes
     {\catcode`\noexpand\_ \the\catcode`\_ \catcode0 \the\catcode0\relax}%
 \catcode`\_ 11 \catcode0 12
@@ -45,17 +45,14 @@
                 \catcode59 12 \POL at defpol}%
 \def\POL at defpol #1(#2)#3=#4;{%
    \POL at restoresemicolon
-   \let\POL at original_redefinemacros\XINT_expr_redefinemacros
-   \let\XINT_expr_redefinemacros\POL at redefinemacros
    \edef\POL at tmp{\ifxintverbose1\else0\fi}%
    \unless\ifxintveryverbose\xintverbosefalse\fi
-   \xintdeffunc __pol(#2):=#4;\if1\POL at tmp\xintverbosetrue\fi
-   \let\XINT_expr_redefinemacros\POL at original_redefinemacros
+   \xintdeffunc __pol(#2):=0+(#4);% force conversion to raw if a constant
+   \if1\POL at tmp\xintverbosetrue\fi
    \edef\POL at polname{\xint_zapspaces #1 \xint_gobble_i}%
    \begingroup
      \setbox0\hbox{%
      \let\xintScalarAdd\xintAdd
-     \let\XINT_fadd_C\POL_fadd_C % patch Add to use l.c.m.
      \let\xintScalarSub\xintSub
      \let\xintScalarMul\xintMul
      \let\xintScalarDiv\xintDiv
@@ -68,10 +65,10 @@
      \let\xintOpp\POL at opp
      \def\xintSub ##1##2{\xintAdd{##1}{\xintOpp{##2}}}%
      % \xintAdd to get \POL at result defined even if numerical only expression
+     % I could also test \ifPOL at pol, but well, this is very small overhead
      \xintAdd{0}%
        {\csname XINT_expr_userfunc___pol\endcsname
-% comma delimited from xintexpr at 1.2p or earlier. Might change.
-        {\global\POL at poltrue\def\POL at result{1.\empty{0/1[0]}{1/1[0]}}},}%
+        {\global\POL at poltrue\def\POL at result{1.\empty{0/1[0]}{1/1[0]}}}}%
      \expandafter}\expandafter
    \endgroup\expandafter
    \def\csname POLuserpol@\POL at polname\expandafter\endcsname
@@ -81,22 +78,19 @@
 %%
 \def\POL at newpol#1{%
    \expandafter\POL at ifZero\csname POLuserpol@#1\endcsname
-      {\@namedef{XINT_expr_userfunc_#1}##1,{0/1[0]}}%
+      {\@namedef{XINT_expr_userfunc_#1}##1{0/1[0]}}%
       {\POL at newpolhorner{#1}}%
-   \unless\ifcsname XINT_expr_userfuncNE:#1\endcsname\POL at addtoextras{#1}\fi
    \expandafter\XINT_expr_defuserfunc
-     \csname XINT_expr_func_#1\expandafter\endcsname
-     \csname XINT_expr_userfunc_#1\endcsname
+     \csname XINT_expr_func_#1\endcsname{#1}{expr}%
    \expandafter\let\csname XINT_flexpr_func_#1\endcsname\@undefined
    \ifxintverbose\POL at info{#1}\fi
 }%
 \def\POL at newfloatpol#1{%
    \expandafter\POL at ifZero\csname POLuserpol@#1\endcsname
-      {\@namedef{XINT_flexpr_userfunc_#1}##1,{0[0]}}%
+      {\@namedef{XINT_flexpr_userfunc_#1}##1{0[0]}}%
       {\POL at newfloatpolhorner{#1}}%
    \expandafter\XINT_expr_defuserfunc
-     \csname XINT_flexpr_func_#1\expandafter\endcsname
-     \csname XINT_flexpr_userfunc_#1\endcsname
+     \csname XINT_flexpr_func_#1\endcsname{#1}{flexpr}%
    \ifxintverbose\POL at floatinfo{#1}\fi
 }%
 \def\POL at info #1{%
@@ -128,7 +122,7 @@
    \expandafter
    \endgroup
    \expandafter\def\csname XINT_expr_userfunc_#1\expandafter\endcsname
-      \expandafter##\expandafter1\expandafter,\expandafter{\POL at tmp{##1}}%
+      \expandafter##\expandafter1\expandafter{\POL at tmp{##1}}%
 }%
 \def\POL at newfloatpolhorner#1{%
    %% redefine function to expand by Horner scheme. Is this useful?
@@ -142,7 +136,7 @@
    \expandafter
    \endgroup
    \expandafter\def\csname XINT_flexpr_userfunc_#1\expandafter\endcsname
-      \expandafter##\expandafter1\expandafter,\expandafter{\POL at tmp{##1}}%
+      \expandafter##\expandafter1\expandafter{\POL at tmp{##1}}%
 }%
 \def\POL at newpol@horner#1{\let\xintAdd\relax\let\xintMul\relax
                   \def\POL at tmp##1{#1}\POL at newpol@horner at loop.}%
@@ -164,42 +158,6 @@
                     {\xintMul{##1}{\POL at tmp{##1}}}}%
   \POL at newpol@floathorner at loop.%
 }%
-%% Customizes xintexpr.sty's \XINT_NewExpr (\POL at addtoextras{name})
-\begingroup
-\catcode`~ 12
-\catcode`$ 12 % $
-\catcode`! 11
-\gdef\POL at NEfork_one #1#2!#3#4{%
-    \if ###1\xint_dothis {\POL__settopol{#4}}\fi
-    \if  ~#1\xint_dothis {\POL__userfunc{#4}}\fi
-    \if  $#1\xint_dothis {~xintApply::csv{~POL_userfunc{#4}}}\fi %$
-    \xint_orthat {#3}#1#2\endcsname
-}%
-\gdef\POL@@redefineone #1#2#3{% #3 = name
-    % Used for immediate f(numerical)
-    \let#2#1%
-    % \XINT_expr_userfunc_name
-    \def#1##1\endcsname % key trick is to fetch up to \endcsname!
-      {\expandafter\POL at NEfork_one\romannumeral`^^@##1!#2{#3}}%
-}%
-    % Used when f(x) is encountered: great gain here!
-\gdef\POL__settopol#1#2,{~POL_settopol{#1}}%
-\gdef\POL_settopol#1{\global\POL at poltrue\expandafter\let\expandafter
-                     \POL at result\csname POLuserpol@#1\endcsname}%
-    % Used when argument is neither numerical nor a macro parameter
-    % Quite some magic here! (braces couldn't be used this way in \xintexpr)
-\gdef\POL__userfunc#1#2,\endcsname{~POL_userfunc{#1}{#2},\endcsname}%
-\gdef\POL_userfunc#1{\csname XINT_expr_userfunc_#1\endcsname}%
-\endgroup
-\def\POL at addtoextras#1{%
-    \oodef\POL at redefineextras{\expandafter\POL at redefineextras
-      \expandafter\POL@@redefineone
-      \csname XINT_expr_userfunc_#1\expandafter\endcsname
-      \csname XINT_expr_userfuncNE:#1\endcsname{#1}}%
-}%
-%\let\POL at original@redefinemacros\XINT_expr_redefinemacros % do locally
-\def\POL at redefinemacros{\POL at original_redefinemacros\POL at redefineextras}%
-\let\POL at redefineextras\@empty
 
 
 \newcommand\PolGenFloatVariant[1]{\POL at newfloatpol{#1}}%
@@ -212,12 +170,10 @@
 \def\POL at let#1#2{%
     \expandafter\let\csname POLuserpol@#1\expandafter\endcsname
                     \csname POLuserpol@#2\endcsname
-    \unless\ifcsname XINT_expr_userfuncNE:#1\endcsname\POL at addtoextras{#1}\fi
     \expandafter\let\csname XINT_expr_userfunc_#1\expandafter\endcsname
                     \csname XINT_expr_userfunc_#2\endcsname
     \expandafter\XINT_expr_defuserfunc
-       \csname XINT_expr_func_#1\expandafter\endcsname
-       \csname XINT_expr_userfunc_#1\endcsname
+       \csname XINT_expr_func_#1\endcsname{#1}{expr}%
     \ifxintverbose\POL at info{#1}\fi
 }%
 \newcommand\PolGlobalLet[2]{\begingroup
@@ -224,8 +180,7 @@
     \globaldefs\@ne
     \if=\noexpand#2\expandafter\xint_firstoftwo
     \else\expandafter\xint_secondoftwo\fi
-% There is a potential problem related to \POL at addtoextras, (the local set-up
-% will become the global one) but I will reconsider that another day
+% do I need to check something here relative to \xintNewExpr?
     \POL@@globallet\POL at globallet {#1}{#2}}%
 \def\POL@@globallet#1#2#3{\POL at globallet{#1}{#3}}%
 \def\POL at globallet#1#2{\POL at let{#1}{#2}\endgroup}%
@@ -400,13 +355,9 @@
     \edef\index{\the\numexpr\index+\@ne}%
     \POL at map@loop.}%
 \def\POL at xintIrr#1{\xintIrr{#1}[0]}%
-\def\POL at special@xintIrr#1{%
-    \expandafter\POL at special@xintIrr at i\romannumeral0\xintraw{#1}}%
-\def\POL at special@xintIrr at i#1/#2[#3]{\xintIrr{#1/#2[0]}[#3]}%
 \newcommand\PolReduceCoeffs{\@ifstar\POL at sreducecoeffs\POL at reducecoeffs}%
 \def\POL at reducecoeffs#1{\PolMapCoeffs{\POL at xintIrr}{#1}}%
-\def\POL at sreducecoeffs#1{\PolMapCoeffs{\POL at special@xintIrr}{#1}}%
-\def\POL at special@xintIrr at skipraw#1{\POL at special@xintIrr at i#1}% used by ToSturm
+\def\POL at sreducecoeffs#1{\PolMapCoeffs{\xintPIrr}{#1}}%
 
 
 %% EUCLIDEAN DIVISION
@@ -430,7 +381,7 @@
 \newcommand\POL at divide[2]{%
     \begingroup
       \let\xintScalarSub\xintSub
-      \let\XINT_fadd_C\POL_fadd_C
+      \let\xintScalarAdd\xintAdd
       \let\xintScalarMul\xintMul
       \let\xintScalarDiv\xintDiv
       \expandafter\let\expandafter\POL at A\csname POLuserpol@#1\endcsname
@@ -462,7 +413,7 @@
 \def\POL at GCD #1#2#3{%
     \begingroup
       \let\xintScalarSub\xintSub
-      \let\XINT_fadd_C\POL_fadd_C
+      \let\xintScalarAdd\xintAdd
       \let\xintScalarMul\xintMul
       \let\xintScalarDiv\xintDiv
       \expandafter\let\expandafter\POL at A\csname POLuserpol@#1\endcsname
@@ -678,7 +629,7 @@
 \newcommand\POL at ToSturm[2]{%
   \edef\POL at sturmname{#2}%
   \POL at let{\POL at sturmname _0}{#1}%
-  \POL at mapcoeffs{\POL at special@xintIrr}{\POL at sturmname _0}%
+  \POL at mapcoeffs{\xintPIrr}{\POL at sturmname _0}%
   \POL at Diff@@one{\POL at sturmname _0}{\POL at sturmname _1}%
   \POL at count\@ne
   \xintloop
@@ -686,6 +637,7 @@
                {\POL at sturmname _\the\POL at count}%
     \expandafter\POL at split\POL at R;\POL at degR\POL at polR
   \unless\ifnum\POL at degR=\m at ne
+    % suis-je sûr format raw certain?
     \edef\POL at polR{\xintApply{\POL at dooppandirr}{\POL at polR}}%
     \advance\POL at count\@ne
     \expandafter\edef\csname POLuserpol@\POL at sturmname _\the\POL at count\endcsname
@@ -699,7 +651,8 @@
        \POL at divide{\POL at sturmname _\the\POL at count}%
                   {\POL at sturmname _\POL at sturm@N}%
        \expandafter\POL at split\POL at Q;\POL at degQ\POL at polQ
-       \edef\POL at polQ{\xintApply{\POL at special@xintIrr at skipraw}{\POL at polQ}}%
+       \edef\POL at polQ % suis-je sûr format raw certain?
+          {\xintApply{\expandafter\XINT_pirr_start\xint_firstofone}{\POL at polQ}}%
        \edef\POL at Q{\POL at degQ.\noexpand\empty\POL at polQ}%
        \expandafter\edef\csname POLuserpol@\POL at sturmname _\the\POL at count\endcsname
           {\POL at degQ.\noexpand\empty\POL at polQ}%
@@ -716,7 +669,7 @@
   \repeat
   \expandafter\let\csname PolSturmChainLength_\POL at sturmname \endcsname\POL at sturm@N
 }%
-\def\POL at dooppandirr#1{\xintiiOpp{\POL at special@xintIrr at i#1}}%
+\def\POL at dooppandirr#1{\xintiiOpp{\XINT_pirr_start#1}}%
 \newcommand\PolSturmChainLength[1]
     {\romannumeral`^^@\csname PolSturmChainLength_#1\endcsname}%
 \newcommand\PolSetToSturmChainSignChangesAt[4][\global]{%
@@ -1434,27 +1387,10 @@
     \romannumeral`^^@\csname POL_ZeroInt#1L0\endcsname
 }%
 
-%% \PolDecToString (should become an xintfrac macro at some point)
-\newcommand\PolDecToString[1]{\romannumeral0\expandafter
-    \POL at dectostring\romannumeral0\xintraw{#1}}%
-\def\POL at dectostring #1/#2[#3]{\xintiiifZero {#1}%
-       \POL at dectostring@z
-       {\if1\XINT_isOne{#2}\expandafter\POL at dectostring@a
-                      \else\expandafter\POL at dectostring@b
-        \fi}%
-  #1/#2[#3]%
-}%
-\def\POL at dectostring@z#1[#2]{ 0}%
-\def\POL at dectostring@a#1/#2[#3]{%
-    \ifnum#3<\z@\xint_dothis{\xinttrunc{-#3}{#1[#3]}}\fi
-    \xint_orthat{\xintiie{#1}{#3}}%
-}%
-\def\POL at dectostring@b#1/#2[#3]{% just to handle this somehow
-    \ifnum#3<\z@\xint_dothis{\xinttrunc{-#3}{#1[#3]}/#2}\fi
-    \xint_orthat{\xintiie{#1}{#3}/#2}%
-}%
 
+\let\PolDecToString\xintDecToString
 
+
 \newcommand\PolMakeMonic[1]{%
     \edef\POL at leadingcoeff{\PolLeadingCoeff{#1}}%
     \edef\POL at leadingcoeff@inverse{\xintDiv{1/1[0]}{\POL at leadingcoeff}}%
@@ -1817,7 +1753,7 @@
      \At\PolEvalAtExpr\krof {#1}{#3}%
 }%
 \newcommand\PolEvalAt[2]
-    {\xintpraw{\csname XINT_expr_userfunc_#1\endcsname{#2},}}%
+    {\xintpraw{\csname XINT_expr_userfunc_#1\endcsname{#2}}}%
 \newcommand\PolEvalAtExpr[2]{\xinttheexpr #1(#2)\relax}%
 %
 \newcommand\PolEvalReduced[3]{\romannumeral`^^@\Pol at Eval@fork
@@ -1826,7 +1762,7 @@
 }%
 \newcommand\PolEvalReducedAt[2]{%
     \xintpraw % in order not to print denominator if the latter equals 1
-    {\xintIrr{\csname XINT_expr_userfunc_#1\endcsname{#2},}[0]}%
+    {\xintIrr{\csname XINT_expr_userfunc_#1\endcsname{#2}}[0]}%
 }%
 \newcommand\PolEvalReducedAtExpr[2]{%
     \xintpraw
@@ -1838,7 +1774,7 @@
      \At\PolFloatEvalAtExpr\krof {#1}{#3}%
 }%
 \newcommand\PolFloatEvalAt[2]
-    {\xintpfloat{\csname XINT_flexpr_userfunc_#1\endcsname{#2},}}%
+    {\xintpfloat{\csname XINT_flexpr_userfunc_#1\endcsname{#2}}}%
 \newcommand\PolFloatEvalAtExpr[2]{\xintthefloatexpr #1(#2)\relax}%
 %
 \newcommand\PolLeadingCoeff[1]{%
@@ -1987,33 +1923,5 @@
 }%
 
 
-%% Patch of xintfrac.sty's \xintAdd: for a/b + c/d, use lcm(b,d)
-\RequirePackage{xintgcd}
-\def\POL_fadd_C #1#2#3%
-{%
-   \expandafter\POL_fadd_D
-      \romannumeral0\xintiigcd{#2}{#3}.%
-   {#2}{#3}{#1}%
-}%
-\def\POL_fadd_D #1.#2#3%
-{%
-    \expandafter\POL_fadd_E
-       \romannumeral0\xintiiquo{#3}{#1}.%
-       {\romannumeral0\xintiiquo{#2}{#1}}{#2}{#3}%
-}%
-\def\POL_fadd_E #1.#2#3#4#5%
-{%
-    \expandafter\POL_fadd_F\romannumeral0\xintiimul{#1}{#3}.{#2}%
-                               {\xintiiMul{#1}{#5}}%
-}%
-\def\POL_fadd_F #1.#2#3#4%
-{%
-    \expandafter\POL_fadd_G
-    \romannumeral0\xintiiadd{#3}{\xintiiMul{#2}{#4}}/#1%
-}%
-\def\POL_fadd_G #1{%
-\def\POL_fadd_G ##1{\if0##1\expandafter\XINT_fadd_iszero\fi#1##1}%
-}\POL_fadd_G{ }%
-
 \POL at restorecatcodes
 \endinput



More information about the tex-live-commits mailing list