summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/polexpr/README.md4
-rw-r--r--Master/texmf-dist/doc/latex/polexpr/polexpr.html35
-rw-r--r--Master/texmf-dist/doc/latex/polexpr/polexpr.txt40
-rw-r--r--Master/texmf-dist/tex/latex/polexpr/polexpr.sty146
4 files changed, 73 insertions, 152 deletions
diff --git a/Master/texmf-dist/doc/latex/polexpr/README.md b/Master/texmf-dist/doc/latex/polexpr/README.md
index 78690d48d33..ce888d45675 100644
--- a/Master/texmf-dist/doc/latex/polexpr/README.md
+++ b/Master/texmf-dist/doc/latex/polexpr/README.md
@@ -61,8 +61,10 @@ Releases
`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),
diff --git a/Master/texmf-dist/doc/latex/polexpr/polexpr.html b/Master/texmf-dist/doc/latex/polexpr/polexpr.html
index 4ddb208d10f..5a9404127bd 100644
--- a/Master/texmf-dist/doc/latex/polexpr/polexpr.html
+++ b/Master/texmf-dist/doc/latex/polexpr/polexpr.html
@@ -362,7 +362,7 @@ ul.auto-toc {
<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 @@ work from command line then (I recommend <tt class="docutils literal">rlwrap</tt
</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 @@ Here is the second root with ten more decimal digits:
And here is the first root with twenty digits after decimal mark:
\PolEnsureIntervalLength{f}{1}{-20}
\[\PolSturmIsolatedZeroLeft{f}{1}&lt;Z_1&lt;\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 @@ the considered interval end-point is zero, else <tt class="docutils literal">B</
<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 @@ for localization of the real roots of polynomials.</p>
</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">
diff --git a/Master/texmf-dist/doc/latex/polexpr/polexpr.txt b/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
index 3e064bc769e..fe99d075a49 100644
--- a/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
+++ b/Master/texmf-dist/doc/latex/polexpr/polexpr.txt
@@ -4,8 +4,8 @@
Package polexpr documentation
===============================
-0.4 (2018/02/16)
-================
+0.4.1 (2018/03/01)
+==================
.. contents::
@@ -145,6 +145,12 @@ First some remarks about auxiliaries.
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 @@ A typical example
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,24 +1468,19 @@ More precisely, they can be used within the replacement texts of the
``\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}}``.)
-
- 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.
+ 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}}``.
- 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.
+ The exact behaviour of this macro may evolve in future releases of
+ xint_.
Booleans (with default setting as indicated)
--------------------------------------------
@@ -1737,6 +1739,10 @@ CHANGE LOG
for localization of the real roots of polynomials.
+- v0.4.1 (2018/03/01)
+
+ Synced with xint 1.3.
+
Acknowledgments
---------------
diff --git a/Master/texmf-dist/tex/latex/polexpr/polexpr.sty b/Master/texmf-dist/tex/latex/polexpr/polexpr.sty
index d4d45177744..fd295dfe687 100644
--- a/Master/texmf-dist/tex/latex/polexpr/polexpr.sty
+++ b/Master/texmf-dist/tex/latex/polexpr/polexpr.sty
@@ -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@restorecatcodes
{\catcode`\noexpand\_ \the\catcode`\_ \catcode0 \the\catcode0\relax}%
\catcode`\_ 11 \catcode0 12
@@ -45,17 +45,14 @@
\catcode59 12 \POL@defpol}%
\def\POL@defpol #1(#2)#3=#4;{%
\POL@restoresemicolon
- \let\POL@original_redefinemacros\XINT_expr_redefinemacros
- \let\XINT_expr_redefinemacros\POL@redefinemacros
\edef\POL@tmp{\ifxintverbose1\else0\fi}%
\unless\ifxintveryverbose\xintverbosefalse\fi
- \xintdeffunc __pol(#2):=#4;\if1\POL@tmp\xintverbosetrue\fi
- \let\XINT_expr_redefinemacros\POL@original_redefinemacros
+ \xintdeffunc __pol(#2):=0+(#4);% force conversion to raw if a constant
+ \if1\POL@tmp\xintverbosetrue\fi
\edef\POL@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@opp
\def\xintSub ##1##2{\xintAdd{##1}{\xintOpp{##2}}}%
% \xintAdd to get \POL@result defined even if numerical only expression
+ % I could also test \ifPOL@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@poltrue\def\POL@result{1.\empty{0/1[0]}{1/1[0]}}},}%
+ {\global\POL@poltrue\def\POL@result{1.\empty{0/1[0]}{1/1[0]}}}}%
\expandafter}\expandafter
\endgroup\expandafter
\def\csname POLuserpol@\POL@polname\expandafter\endcsname
@@ -81,22 +78,19 @@
%%
\def\POL@newpol#1{%
\expandafter\POL@ifZero\csname POLuserpol@#1\endcsname
- {\@namedef{XINT_expr_userfunc_#1}##1,{0/1[0]}}%
+ {\@namedef{XINT_expr_userfunc_#1}##1{0/1[0]}}%
{\POL@newpolhorner{#1}}%
- \unless\ifcsname XINT_expr_userfuncNE:#1\endcsname\POL@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@info{#1}\fi
}%
\def\POL@newfloatpol#1{%
\expandafter\POL@ifZero\csname POLuserpol@#1\endcsname
- {\@namedef{XINT_flexpr_userfunc_#1}##1,{0[0]}}%
+ {\@namedef{XINT_flexpr_userfunc_#1}##1{0[0]}}%
{\POL@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@floatinfo{#1}\fi
}%
\def\POL@info #1{%
@@ -128,7 +122,7 @@
\expandafter
\endgroup
\expandafter\def\csname XINT_expr_userfunc_#1\expandafter\endcsname
- \expandafter##\expandafter1\expandafter,\expandafter{\POL@tmp{##1}}%
+ \expandafter##\expandafter1\expandafter{\POL@tmp{##1}}%
}%
\def\POL@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@tmp{##1}}%
+ \expandafter##\expandafter1\expandafter{\POL@tmp{##1}}%
}%
\def\POL@newpol@horner#1{\let\xintAdd\relax\let\xintMul\relax
\def\POL@tmp##1{#1}\POL@newpol@horner@loop.}%
@@ -164,42 +158,6 @@
{\xintMul{##1}{\POL@tmp{##1}}}}%
\POL@newpol@floathorner@loop.%
}%
-%% Customizes xintexpr.sty's \XINT_NewExpr (\POL@addtoextras{name})
-\begingroup
-\catcode`~ 12
-\catcode`$ 12 % $
-\catcode`! 11
-\gdef\POL@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@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@poltrue\expandafter\let\expandafter
- \POL@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@addtoextras#1{%
- \oodef\POL@redefineextras{\expandafter\POL@redefineextras
- \expandafter\POL@@redefineone
- \csname XINT_expr_userfunc_#1\expandafter\endcsname
- \csname XINT_expr_userfuncNE:#1\endcsname{#1}}%
-}%
-%\let\POL@original@redefinemacros\XINT_expr_redefinemacros % do locally
-\def\POL@redefinemacros{\POL@original_redefinemacros\POL@redefineextras}%
-\let\POL@redefineextras\@empty
\newcommand\PolGenFloatVariant[1]{\POL@newfloatpol{#1}}%
@@ -212,20 +170,17 @@
\def\POL@let#1#2{%
\expandafter\let\csname POLuserpol@#1\expandafter\endcsname
\csname POLuserpol@#2\endcsname
- \unless\ifcsname XINT_expr_userfuncNE:#1\endcsname\POL@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@info{#1}\fi
}%
\newcommand\PolGlobalLet[2]{\begingroup
\globaldefs\@ne
\if=\noexpand#2\expandafter\xint_firstoftwo
\else\expandafter\xint_secondoftwo\fi
-% There is a potential problem related to \POL@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@globallet {#1}{#2}}%
\def\POL@@globallet#1#2#3{\POL@globallet{#1}{#3}}%
\def\POL@globallet#1#2{\POL@let{#1}{#2}\endgroup}%
@@ -400,13 +355,9 @@
\edef\index{\the\numexpr\index+\@ne}%
\POL@map@loop.}%
\def\POL@xintIrr#1{\xintIrr{#1}[0]}%
-\def\POL@special@xintIrr#1{%
- \expandafter\POL@special@xintIrr@i\romannumeral0\xintraw{#1}}%
-\def\POL@special@xintIrr@i#1/#2[#3]{\xintIrr{#1/#2[0]}[#3]}%
\newcommand\PolReduceCoeffs{\@ifstar\POL@sreducecoeffs\POL@reducecoeffs}%
\def\POL@reducecoeffs#1{\PolMapCoeffs{\POL@xintIrr}{#1}}%
-\def\POL@sreducecoeffs#1{\PolMapCoeffs{\POL@special@xintIrr}{#1}}%
-\def\POL@special@xintIrr@skipraw#1{\POL@special@xintIrr@i#1}% used by ToSturm
+\def\POL@sreducecoeffs#1{\PolMapCoeffs{\xintPIrr}{#1}}%
%% EUCLIDEAN DIVISION
@@ -430,7 +381,7 @@
\newcommand\POL@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@A\csname POLuserpol@#1\endcsname
@@ -462,7 +413,7 @@
\def\POL@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@A\csname POLuserpol@#1\endcsname
@@ -678,7 +629,7 @@
\newcommand\POL@ToSturm[2]{%
\edef\POL@sturmname{#2}%
\POL@let{\POL@sturmname _0}{#1}%
- \POL@mapcoeffs{\POL@special@xintIrr}{\POL@sturmname _0}%
+ \POL@mapcoeffs{\xintPIrr}{\POL@sturmname _0}%
\POL@Diff@@one{\POL@sturmname _0}{\POL@sturmname _1}%
\POL@count\@ne
\xintloop
@@ -686,6 +637,7 @@
{\POL@sturmname _\the\POL@count}%
\expandafter\POL@split\POL@R;\POL@degR\POL@polR
\unless\ifnum\POL@degR=\m@ne
+ % suis-je sûr format raw certain?
\edef\POL@polR{\xintApply{\POL@dooppandirr}{\POL@polR}}%
\advance\POL@count\@ne
\expandafter\edef\csname POLuserpol@\POL@sturmname _\the\POL@count\endcsname
@@ -699,7 +651,8 @@
\POL@divide{\POL@sturmname _\the\POL@count}%
{\POL@sturmname _\POL@sturm@N}%
\expandafter\POL@split\POL@Q;\POL@degQ\POL@polQ
- \edef\POL@polQ{\xintApply{\POL@special@xintIrr@skipraw}{\POL@polQ}}%
+ \edef\POL@polQ % suis-je sûr format raw certain?
+ {\xintApply{\expandafter\XINT_pirr_start\xint_firstofone}{\POL@polQ}}%
\edef\POL@Q{\POL@degQ.\noexpand\empty\POL@polQ}%
\expandafter\edef\csname POLuserpol@\POL@sturmname _\the\POL@count\endcsname
{\POL@degQ.\noexpand\empty\POL@polQ}%
@@ -716,7 +669,7 @@
\repeat
\expandafter\let\csname PolSturmChainLength_\POL@sturmname \endcsname\POL@sturm@N
}%
-\def\POL@dooppandirr#1{\xintiiOpp{\POL@special@xintIrr@i#1}}%
+\def\POL@dooppandirr#1{\xintiiOpp{\XINT_pirr_start#1}}%
\newcommand\PolSturmChainLength[1]
{\romannumeral`^^@\csname PolSturmChainLength_#1\endcsname}%
\newcommand\PolSetToSturmChainSignChangesAt[4][\global]{%
@@ -1434,25 +1387,8 @@
\romannumeral`^^@\csname POL_ZeroInt#1L0\endcsname
}%
-%% \PolDecToString (should become an xintfrac macro at some point)
-\newcommand\PolDecToString[1]{\romannumeral0\expandafter
- \POL@dectostring\romannumeral0\xintraw{#1}}%
-\def\POL@dectostring #1/#2[#3]{\xintiiifZero {#1}%
- \POL@dectostring@z
- {\if1\XINT_isOne{#2}\expandafter\POL@dectostring@a
- \else\expandafter\POL@dectostring@b
- \fi}%
- #1/#2[#3]%
-}%
-\def\POL@dectostring@z#1[#2]{ 0}%
-\def\POL@dectostring@a#1/#2[#3]{%
- \ifnum#3<\z@\xint_dothis{\xinttrunc{-#3}{#1[#3]}}\fi
- \xint_orthat{\xintiie{#1}{#3}}%
-}%
-\def\POL@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]{%
@@ -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@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@restorecatcodes
\endinput