summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-03-01 23:29:17 +0000
committerKarl Berry <karl@freefriends.org>2018-03-01 23:29:17 +0000
commit493a842303af8f78cfdf49c540923b69782df718 (patch)
tree088a42c3823e194afb55622efa69f3517f74ef08 /Master/texmf-dist/tex/generic/xint
parenta5fb18d1900916f93730e03f6a4d5274b57b53f5 (diff)
xint (1mar18)
git-svn-id: svn://tug.org/texlive/trunk@46774 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xint.sty189
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintbinhex.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcfrac.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcore.sty70
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintexpr.sty1033
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintfrac.sty269
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintgcd.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintkernel.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintseries.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xinttools.sty4
10 files changed, 827 insertions, 758 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty
index 9e898833096..4cebabc2f3f 100644
--- a/Master/texmf-dist/tex/generic/xint/xint.sty
+++ b/Master/texmf-dist/tex/generic/xint/xint.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xint: Expandable operations on big integers
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty (loaded by xintcore.sty)
\XINT_providespackage
\ProvidesPackage{xint}%
- [2018/02/06 1.2q Expandable operations on big integers (JFB)]%
+ [2018/03/01 1.3 Expandable operations on big integers (JFB)]%
\long\def\xint_firstofthree #1#2#3{#1}%
\long\def\xint_secondofthree #1#2#3{#2}%
\long\def\xint_thirdofthree #1#2#3{#3}%
@@ -335,13 +335,8 @@
{\romannumeral0\XINT_num {#1}}%
}%
\def\XINT_dsx_end #1#2{\expandafter{#2}{#1}}%
-\def\xintEq {\romannumeral0\XINT_signaldeprecated{xint}{xintEq}\xinteq }%
-\def\xinteq #1#2{\xintifeq{#1}{#2}{1}{0}}%
\def\xintiiEq #1#2{\romannumeral0\xintiiifeq{#1}{#2}{1}{0}}%
-\def\xintNeq #1#2{\romannumeral0\XINT_signaldeprecated{xint}{xintNeq}\xintifeq {#1}{#2}{0}{1}}%
\def\xintiiNotEq #1#2{\romannumeral0\xintiiifeq {#1}{#2}{0}{1}}%
-\def\xintGeq {\romannumeral0\XINT_signaldeprecated{xint}{xintGeq}\xintgeq }%
-\def\xintgeq #1{\expandafter\XINT_geq\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiGeq {\romannumeral0\xintiigeq }%
\def\xintiigeq #1{\expandafter\XINT_iigeq\romannumeral`&&@#1\xint:}%
\def\XINT_iigeq #1#2\xint:#3%
@@ -378,30 +373,17 @@
\else\expandafter\XINT_geq_yes\fi}%
\def\XINT_geq_no 1{ 0}%
\def\XINT_geq_yes { 1}%
-\def\xintGt {\romannumeral0\XINT_signaldeprecated{xint}{xintGt}\xintgt }%
-\def\xintgt #1#2{\xintifgt{#1}{#2}{1}{0}}%
\def\xintiiGt #1#2{\romannumeral0\xintiiifgt{#1}{#2}{1}{0}}%
-\def\xintLt {\romannumeral0\XINT_signaldeprecated{xint}{xintLt}\xintlt }%
-\def\xintlt #1#2{\xintiflt{#1}{#2}{1}{0}}%
\def\xintiiLt #1#2{\romannumeral0\xintiiiflt{#1}{#2}{1}{0}}%
-\def\xintGtorEq #1#2{\romannumeral0\XINT_signaldeprecated{xint}{xintGtorEq}\xintiflt {#1}{#2}{0}{1}}%
\def\xintiiGtorEq #1#2{\romannumeral0\xintiiiflt {#1}{#2}{0}{1}}%
-\def\xintLtorEq #1#2{\romannumeral0\XINT_signaldeprecated{xint}{xintLtorEq}\xintifgt {#1}{#2}{0}{1}}%
\def\xintiiLtorEq #1#2{\romannumeral0\xintiiifgt {#1}{#2}{0}{1}}%
-\def\xintIsZero {\romannumeral0\XINT_signaldeprecated{xint}{xintIsZero}\xintiszero }%
-\def\xintiszero #1{\if0\xintSgn{#1}\xint_afterfi{ 1}\else\xint_afterfi{ 0}\fi}%
\def\xintiiIsZero {\romannumeral0\xintiiiszero }%
\def\xintiiiszero #1{\if0\xintiiSgn{#1}\xint_afterfi{ 1}\else\xint_afterfi{ 0}\fi}%
-\def\xintIsNotZero {\romannumeral0\XINT_signaldeprecated{xint}{xintIsNotZero}\xintisnotzero }%
-\def\xintisnotzero
- #1{\if0\xintSgn{#1}\xint_afterfi{ 0}\else\xint_afterfi{ 1}\fi}%
\def\xintiiIsNotZero {\romannumeral0\xintiiisnotzero }%
\def\xintiiisnotzero
#1{\if0\xintiiSgn{#1}\xint_afterfi{ 0}\else\xint_afterfi{ 1}\fi}%
\def\xintiiIsOne {\romannumeral0\xintiiisone }%
\def\xintiiisone #1{\expandafter\XINT_isone\romannumeral`&&@#1XY}%
-\def\xintIsOne {\romannumeral0\XINT_signaldeprecated{xint}{xintIsOne}\xintisone }%
-\def\xintisone #1{\expandafter\XINT_isone\romannumeral0\xintnum{#1}XY}%
\def\XINT_isone #1#2#3Y%
{%
\unless\if#2X\xint_dothis{ 0}\fi
@@ -424,15 +406,6 @@
\xint_afterfi{ 0}%
\fi
}%
-\def\xintOdd {\romannumeral0\XINT_signaldeprecated{xint}{xintOdd}\xintodd }%
-\def\xintodd #1%
-{%
- \ifodd\xintLDg{\xintNum{#1}} %<- intentional space
- \xint_afterfi{ 1}%
- \else
- \xint_afterfi{ 0}%
- \fi
-}%
\def\xintiiEven {\romannumeral0\xintiieven }%
\def\xintiieven #1%
{%
@@ -442,15 +415,6 @@
\xint_afterfi{ 1}%
\fi
}%
-\def\xintEven {\romannumeral0\XINT_signaldeprecated{xint}{xintEven}\xinteven }%
-\def\xinteven #1%
-{%
- \ifodd\xintLDg{\xintNum{#1}} %<- intentional space
- \xint_afterfi{ 0}%
- \else
- \xint_afterfi{ 1}%
- \fi
-}%
\def\xintiiMON {\romannumeral0\xintiimon }%
\def\xintiimon #1%
{%
@@ -460,15 +424,6 @@
\xint_afterfi{ 1}%
\fi
}%
-\def\xintMON {\romannumeral0\XINT_signaldeprecated{xint}{xintMON}\xintmon }%
-\def\xintmon #1%
-{%
- \ifodd\xintLDg{\xintNum{#1}} %<- intentional space
- \xint_afterfi{ -1}%
- \else
- \xint_afterfi{ 1}%
- \fi
-}%
\def\xintiiMMON {\romannumeral0\xintiimmon }%
\def\xintiimmon #1%
{%
@@ -478,15 +433,6 @@
\xint_afterfi{ -1}%
\fi
}%
-\def\xintMMON {\romannumeral0\XINT_signaldeprecated{xint}{xintMMON}\xintmmon }%
-\def\xintmmon #1%
-{%
- \ifodd\xintLDg{\xintNum{#1}} %<- intentional space
- \xint_afterfi{ 1}%
- \else
- \xint_afterfi{ -1}%
- \fi
-}%
\def\xintSgnFork {\romannumeral0\xintsgnfork }%
\def\xintsgnfork #1%
{%
@@ -495,15 +441,6 @@
\else\expandafter\xint_firstofthree_thenstop
\fi
}%
-\def\xintifSgn {\romannumeral0\XINT_signaldeprecated{xint}{xintifSgn}\xintifsgn }%
-\def\xintifsgn #1%
-{%
- \ifcase \xintSgn{#1}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
- \fi
-}%
\def\xintiiifSgn {\romannumeral0\xintiiifsgn }%
\def\xintiiifsgn #1%
{%
@@ -513,15 +450,6 @@
\else\expandafter\xint_firstofthree_thenstop
\fi
}%
-\def\xintifCmp {\romannumeral0\XINT_signaldeprecated{xint}{xintifCmp}\xintifcmp }%
-\def\xintifcmp #1#2%
-{%
- \ifcase\xintCmp {#1}{#2}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
- \fi
-}%
\def\xintiiifCmp {\romannumeral0\xintiiifcmp }%
\def\xintiiifcmp #1#2%
{%
@@ -531,14 +459,6 @@
\else\expandafter\xint_firstofthree_thenstop
\fi
}%
-\def\xintifEq {\romannumeral0\XINT_signaldeprecated{xint}{xintifEq}\xintifeq }%
-\def\xintifeq #1#2%
-{%
- \if0\xintCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
- \fi
-}%
\def\xintiiifEq {\romannumeral0\xintiiifeq }%
\def\xintiiifeq #1#2%
{%
@@ -547,14 +467,6 @@
\else\expandafter\xint_secondoftwo_thenstop
\fi
}%
-\def\xintifGt {\romannumeral0\XINT_signaldeprecated{xint}{xintifGt}\xintifgt }%
-\def\xintifgt #1#2%
-{%
- \if1\xintCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
- \fi
-}%
\def\xintiiifGt {\romannumeral0\xintiiifgt }%
\def\xintiiifgt #1#2%
{%
@@ -563,14 +475,6 @@
\else\expandafter\xint_secondoftwo_thenstop
\fi
}%
-\def\xintifLt {\romannumeral0\XINT_signaldeprecated{xint}{xintifLt}\xintiflt }%
-\def\xintiflt #1#2%
-{%
- \ifnum\xintCmp{#1}{#2}<\xint_c_
- \expandafter\xint_firstoftwo_thenstop
- \else \expandafter\xint_secondoftwo_thenstop
- \fi
-}%
\def\xintiiifLt {\romannumeral0\xintiiiflt }%
\def\xintiiiflt #1#2%
{%
@@ -579,15 +483,6 @@
\else \expandafter\xint_secondoftwo_thenstop
\fi
}%
-\def\xintifZero {\romannumeral0\XINT_signaldeprecated{xint}{xintifZero}\xintifzero }%
-\def\xintifzero #1%
-{%
- \if0\xintSgn{#1}%
- \expandafter\xint_firstoftwo_thenstop
- \else
- \expandafter\xint_secondoftwo_thenstop
- \fi
-}%
\def\xintiiifZero {\romannumeral0\xintiiifzero }%
\def\xintiiifzero #1%
{%
@@ -597,15 +492,6 @@
\expandafter\xint_secondoftwo_thenstop
\fi
}%
-\def\xintifNotZero {\romannumeral0\XINT_signaldeprecated{xint}{xintifNotZero}\xintifnotzero }%
-\def\xintifnotzero #1%
-{%
- \if0\xintSgn{#1}%
- \expandafter\xint_secondoftwo_thenstop
- \else
- \expandafter\xint_firstoftwo_thenstop
- \fi
-}%
\def\xintiiifNotZero {\romannumeral0\xintiiifnotzero }%
\def\xintiiifnotzero #1%
{%
@@ -624,15 +510,6 @@
\expandafter\xint_secondoftwo_thenstop
\fi
}%
-\def\xintifOne {\romannumeral0\XINT_signaldeprecated{xint}{xintifOne}\xintifone }%
-\def\xintifone #1%
-{%
- \if1\xintIsOne{#1}%
- \expandafter\xint_firstoftwo_thenstop
- \else
- \expandafter\xint_secondoftwo_thenstop
- \fi
-}%
\def\xintiiifOdd {\romannumeral0\xintiiifodd }%
\def\xintiiifodd #1%
{%
@@ -642,18 +519,8 @@
\expandafter\xint_secondoftwo_thenstop
\fi
}%
-\def\xintifOdd {\romannumeral0\XINT_signaldeprecated{xint}{xintifOdd}\xintifodd }%
-\def\xintifodd #1%
-{%
- \if\xintOdd{#1}1%
- \expandafter\xint_firstoftwo_thenstop
- \else
- \expandafter\xint_secondoftwo_thenstop
- \fi
-}%
\def\xintifTrueAelseB {\romannumeral0\xintiiifnotzero}%
\def\xintifFalseAelseB{\romannumeral0\xintiiifzero}%
-\def\xintNot{\romannumeral0\XINT_signaldeprecated{xint}{xintNot}\xintiiiszero}%
\def\xintNOT{\romannumeral0\xintiiiszero}%
\def\xintAND {\romannumeral0\xintand }%
\def\xintand #1#2{\if0\xintiiSgn{#1}\expandafter\xint_firstoftwo
@@ -696,15 +563,6 @@
{\XINT_xorof_a #2}%
}%
\def\XINT_xorof_e #1!#2{ #2}%
-\def\xintiMax {\romannumeral0\XINT_signaldeprecated{xint}{xintiMax}\xintimax }%
-\def\xintimax #1%
-{%
- \expandafter\xint_max\romannumeral0\xintnum{#1}\xint:
-}%
-\def\xint_max #1\xint:#2%
-{%
- \expandafter\XINT_max_fork\romannumeral0\xintnum{#2}\xint:#1\xint:
-}%
\def\xintiiMax {\romannumeral0\xintiimax }%
\def\xintiimax #1%
{%
@@ -747,15 +605,6 @@
{%
\unless\if1\romannumeral0\XINT_geq_plusplus{}{}%
}%
-\def\xintiMin {\romannumeral0\XINT_signaldeprecated{xint}{xintiMin}\xintimin }%
-\def\xintimin #1%
-{%
- \expandafter\xint_min\romannumeral0\xintnum{#1}\xint:
-}%
-\def\xint_min #1\xint:#2%
-{%
- \expandafter\XINT_min_fork\romannumeral0\xintnum{#2}\xint:#1\xint:
-}%
\def\xintiiMin {\romannumeral0\xintiimin }%
\def\xintiimin #1%
{%
@@ -798,17 +647,6 @@
{%
\unless\if1\romannumeral0\XINT_geq_plusplus{}{}%
}%
-\def\xintiMaxof {\romannumeral0\XINT_signaldeprecated{xint}{xintiMaxof}\xintimaxof }%
-\def\xintimaxof #1{\expandafter\XINT_imaxof_a\romannumeral`&&@#1\xint:}%
-\def\XINT_imaxof_a
-#1{\expandafter\XINT_imaxof_b\romannumeral0\xintnum{#1}!}%
-\def\XINT_imaxof_b #1!#2%
- {\expandafter\XINT_imaxof_c\romannumeral`&&@#2!{#1}!}%
-\def\XINT_imaxof_c #1%
- {\xint_gob_til_xint: #1\XINT_imaxof_e\xint:\XINT_imaxof_d #1}%
-\def\XINT_imaxof_d #1!%
- {\expandafter\XINT_imaxof_b\romannumeral0\xintimax {#1}}%
-\def\XINT_imaxof_e #1!#2!{ #2}%
\def\xintiiMaxof {\romannumeral0\xintiimaxof }%
\def\xintiimaxof #1{\expandafter\XINT_iimaxof_a\romannumeral`&&@#1\xint:}%
\def\XINT_iimaxof_a #1{\expandafter\XINT_iimaxof_b\romannumeral`&&@#1!}%
@@ -819,16 +657,6 @@
\def\XINT_iimaxof_d #1!%
{\expandafter\XINT_iimaxof_b\romannumeral0\xintiimax {#1}}%
\def\XINT_iimaxof_e #1!#2!{ #2}%
-\def\xintiMinof {\romannumeral0\XINT_signaldeprecated{xint}{xintiMinof}\xintiminof }%
-\def\xintiminof #1{\expandafter\XINT_iminof_a\romannumeral`&&@#1\xint:}%
-\def\XINT_iminof_a #1{\expandafter\XINT_iminof_b\romannumeral0\xintnum{#1}!}%
-\def\XINT_iminof_b #1!#2%
- {\expandafter\XINT_iminof_c\romannumeral`&&@#2!{#1}!}%
-\def\XINT_iminof_c #1%
- {\xint_gob_til_xint: #1\XINT_iminof_e\xint:\XINT_iminof_d #1}%
-\def\XINT_iminof_d #1!%
- {\expandafter\XINT_iminof_b\romannumeral0\xintimin {#1}}%
-\def\XINT_iminof_e #1!#2!{ #2}%
\def\xintiiMinof {\romannumeral0\xintiiminof }%
\def\xintiiminof #1{\expandafter\XINT_iiminof_a\romannumeral`&&@#1\xint:}%
\def\XINT_iiminof_a #1{\expandafter\XINT_iiminof_b\romannumeral`&&@#1!}%
@@ -860,9 +688,6 @@
{\expandafter\XINT_prod_loop_a\romannumeral0\XINT_mul_fork }%
\def\XINT_prod_finished\xint:\XINT_prod_loop_c\xint:\xint:#1\xint:\Z { #1}%
\def\xintiiSquareRoot {\romannumeral0\xintiisquareroot }%
-\def\xintiSquareRoot{\romannumeral0\XINT_signaldeprecated{xint}{xintiSquareRoot}\xintisquareroot}%
-\def\xintisquareroot #1%
- {\expandafter\XINT_sqrt_checkin\romannumeral0\xintnum{#1}\xint:}%
\def\xintiisquareroot #1{\expandafter\XINT_sqrt_checkin\romannumeral`&&@#1\xint:}%
\def\XINT_sqrt_checkin #1%
{%
@@ -1152,10 +977,6 @@
\def\xintiisqrtr {\expandafter\XINT_sqrtr_post\romannumeral0\xintiisquareroot }%
\def\XINT_sqrtr_post #1#2%
{\xintiiifLt {#2}{#1}{ #1}{\XINT_dec #1\XINT_dec_bye234567890\xint_bye}}%
-\def\xintiSqrt {\romannumeral0\XINT_signaldeprecated{xint}{xintiSqrt}\xintisqrt}%
-\def\xintisqrt {\expandafter\XINT_sqrt_post\romannumeral0\xintisquareroot }%
-\def\xintiSqrtR{\romannumeral0\XINT_signaldeprecated{xint}{xintiSqrtr}\xintisqrtr}%
-\def\xintisqrtr {\expandafter\XINT_sqrtr_post\romannumeral0\xintisquareroot }%
\def\xintiiBinomial {\romannumeral0\xintiibinomial }%
\def\xintiibinomial #1#2%
{%
@@ -1165,8 +986,6 @@
{%
\expandafter\XINT_binom_fork \the\numexpr#1-#2.#2.#1.%
}%
-\def\xintiBinomial{\romannumeral0\XINT_signaldeprecated{xint}{xintiBinomial}\xintibinomial}%
-\let\xintibinomial\xintiibinomial
\def\XINT_binom_fork #1#2.#3#4.#5#6.%
{%
\if-#5\xint_dothis{\XINT_signalcondition{InvalidOperation}{Binomial with
@@ -1412,8 +1231,6 @@
{%
\expandafter\XINT_pfac_fork\the\numexpr#1\expandafter.\the\numexpr #2.%
}%
-\def\xintiPFactorial{\romannumeral0\XINT_signaldeprecated{xint}{xintiPFactorial}\xintipfactorial}%
-\let\xintipfactorial\xintiipfactorial
\def\xintPFactorial{\romannumeral0\xintpfactorial}%
\let\xintpfactorial\xintiipfactorial
\def\XINT_pfac_fork #1#2.#3#4.%
@@ -1596,7 +1413,7 @@
\XINT_ifFlagRaised{xintiSqrtR}{\string\xintiSqrtR\MessageBreak}{}%
\XINT_ifFlagRaised{xintiBinomial}{\string\xintiBinomial\MessageBreak}{}%
\XINT_ifFlagRaised{xintiPFactorial}{\string\xintiPFactorial\MessageBreak}{}%
-They will get removed at some future release.}}%
+This is not possible because they all got removed at 1.3!}}%
{% no deprecated macro used (at top level...)
}%
}\fi\fi
diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
index 9e495dc600e..1391e129f79 100644
--- a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xintbinhex: Expandable binary and hexadecimal conversions
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintbinhex}%
- [2018/02/06 1.2q Expandable binary and hexadecimal conversions (JFB)]%
+ [2018/03/01 1.3 Expandable binary and hexadecimal conversions (JFB)]%
\newcount\xint_c_ii^xv \xint_c_ii^xv 32768
\newcount\xint_c_ii^xvi \xint_c_ii^xvi 65536
\def\XINT_tmpa #1{\ifx\relax#1\else
diff --git a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
index 0c536b714b1..6eea46114c3 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xintcfrac: Expandable continued fractions with xint package
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcfrac}%
- [2018/02/06 1.2q Expandable continued fractions with xint package (JFB)]%
+ [2018/03/01 1.3 Expandable continued fractions with xint package (JFB)]%
\def\xintCFrac {\romannumeral0\xintcfrac }%
\def\xintcfrac #1%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xintcore.sty b/Master/texmf-dist/tex/generic/xint/xintcore.sty
index 9e1219f0ab2..d947fbc48fe 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcore.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcore.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xintcore: Expandable arithmetic on big integers
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcore}%
- [2018/02/06 1.2q Expandable arithmetic on big integers (JFB)]%
+ [2018/03/01 1.3 Expandable arithmetic on big integers (JFB)]%
\csname XINT_Clamped_istrapped\endcsname
\csname XINT_ConversionSyntax_istrapped\endcsname
\csname XINT_DivisionByZero_istrapped\endcsname
@@ -183,11 +183,6 @@
{%
\expandafter\XINT_sgn \romannumeral`&&@#1\xint:
}%
-\def\xintSgn {\romannumeral0\XINT_signaldeprecated{xintcore}{xintSgn}\xintsgn }%
-\def\xintsgn #1%
-{%
- \expandafter\XINT_sgn \romannumeral0\xintnum{#1}\xint:
-}%
\def\XINT_sgn #1#2\xint:
{%
\xint_UDzerominusfork
@@ -217,11 +212,6 @@
{%
\expandafter\XINT_opp \romannumeral`&&@#1%
}%
-\def\xintiOpp {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiOpp}\xintiopp }%
-\def\xintiopp #1%
-{%
- \expandafter\XINT_opp \romannumeral0\xintnum{#1}%
-}%
\def\XINT_Opp #1{\romannumeral0\XINT_opp #1}%
\def\XINT_opp #1%
{%
@@ -236,11 +226,6 @@
{%
\expandafter\XINT_abs \romannumeral`&&@#1%
}%
-\def\xintiAbs {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiAbs}\xintiabs }%
-\def\xintiabs #1%
-{%
- \expandafter\XINT_abs \romannumeral0\xintnum{#1}%
-}%
\def\XINT_abs #1%
{%
\xint_UDsignfork
@@ -250,8 +235,6 @@
}%
\def\xintFDg {\romannumeral0\xintfdg }%
\def\xintfdg #1{\expandafter\XINT_fdg \romannumeral`&&@#1\xint:\Z}%
-\def\xintiiFDg {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiiFDg}\xintiifdg }%
-\let\xintiifdg\xintfdg
\def\XINT_FDg #1%
{\romannumeral0\expandafter\XINT_fdg\romannumeral`&&@\xintnum{#1}\xint:\Z }%
\def\XINT_fdg #1#2#3\Z
@@ -265,8 +248,6 @@
\def\xintLDg {\romannumeral0\xintldg }%
\def\xintldg #1{\expandafter\XINT_ldg_fork\romannumeral`&&@#1%
\XINT_ldg_c{}{}{}{}{}{}{}{}\xint_bye\relax}%
-\def\xintiiLDg {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiiLDg}\xintiildg }%
-\let\xintiildg\xintldg
\def\XINT_ldg_fork #1%
{%
\xint_UDsignfork
@@ -571,8 +552,6 @@
{%
\expandafter\XINT_cuz_small\xint_gob_til_sc #8#7#6#5#4#3#2#1%
}%
-\def\xintiAdd {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiAdd}\xintiadd }%
-\def\xintiadd #1{\expandafter\XINT_iadd\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiAdd {\romannumeral0\xintiiadd }%
\def\xintiiadd #1{\expandafter\XINT_iiadd\romannumeral`&&@#1\xint:}%
\def\XINT_iiadd #1#2\xint:#3%
@@ -726,8 +705,6 @@
\def\XINT_add_m #1!{\expandafter\XINT_add_n\the\numexpr\xint_c_i+#1\xint:}%
\def\XINT_add_n #1#2\xint:{1#2\expandafter!\the\numexpr\XINT_add_o #1}%
\def\XINT_add_o #1{\if #12\expandafter\XINT_add_l\else\expandafter\XINT_add_ke \fi}%
-\def\xintCmp {\romannumeral0\XINT_signaldeprecated{xintcore}{xintCmp}\xintcmp }%
-\def\xintcmp #1{\expandafter\XINT_icmp\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiCmp {\romannumeral0\xintiicmp }%
\def\xintiicmp #1{\expandafter\XINT_iicmp\romannumeral`&&@#1\xint:}%
\def\XINT_iicmp #1#2\xint:#3%
@@ -837,8 +814,6 @@
\expandafter\XINT_sub_nfork\expandafter
#1\romannumeral`&&@#3\xint:#2\xint:
}%
-\def\xintiSub {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiSub}\xintisub }%
-\def\xintisub #1{\expandafter\XINT_isub\romannumeral0\xintnum{#1}\xint:}%
\def\XINT_isub #1#2\xint:#3%
{%
\expandafter\XINT_sub_nfork\expandafter
@@ -1035,15 +1010,6 @@
\the\numexpr \xint_c_xi_e_viii_mone-#1#2#3#4#5#6#7#8\XINT_sub_comp_loop
}%
\def\XINT_sub_comp_clean 1#1{+#1\relax}%
-\def\xintiMul {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiMul}\xintimul }%
-\def\xintimul #1%
-{%
- \expandafter\XINT_imul\romannumeral0\xintnum{#1}\xint:
-}%
-\def\XINT_imul #1#2\xint:#3%
-{%
- \expandafter\XINT_mul_nfork\expandafter #1\romannumeral0\xintnum{#3}\xint:#2\xint:
-}%
\def\xintiiMul {\romannumeral0\xintiimul }%
\def\xintiimul #1%
{%
@@ -1211,10 +1177,6 @@
{%
1#6#7\expandafter!\the\numexpr \xint_c_x^viii+#1#2#3#4#5+#8!%
}%
-\def\xintiDivision {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiDivision}\xintidivision }%
-\def\xintidivision #1{\expandafter\XINT_idivision\romannumeral0\xintnum{#1}\xint:}%
-\def\XINT_idivision #1#2\xint:#3{\expandafter\XINT_iidivision_a\expandafter #1%
- \romannumeral0\xintnum{#3}\xint:#2\xint:}%
\def\xintiiDivision {\romannumeral0\xintiidivision }%
\def\xintiidivision #1{\expandafter\XINT_iidivision \romannumeral`&&@#1\xint:}%
\def\XINT_iidivision #1#2\xint:#3{\expandafter\XINT_iidivision_a\expandafter #1%
@@ -1814,15 +1776,6 @@
{\expandafter\xint_firstoftwo_thenstop\romannumeral0\xintiidivision }%
\def\xintiirem
{\expandafter\xint_secondoftwo_thenstop\romannumeral0\xintiidivision }%
-\def\xintiQuo {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiQuo}\xintiquo }%
-\def\xintiRem {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiRem}\xintirem }%
-\def\xintiquo
- {\expandafter\xint_firstoftwo_thenstop\romannumeral0\xintidivision }%
-\def\xintirem
- {\expandafter\xint_secondoftwo_thenstop\romannumeral0\xintidivision }%
-\def\xintiDivRound {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiDivRound}\xintidivround }%
-\def\xintidivround #1%
- {\expandafter\XINT_idivround\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiDivRound {\romannumeral0\xintiidivround }%
\def\xintiidivround #1{\expandafter\XINT_iidivround\romannumeral`&&@#1\xint:}%
\def\XINT_idivround #1#2\xint:#3%
@@ -1861,8 +1814,6 @@
\romannumeral0\XINT_div_prepare {#2}{#1#30}%
\xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax
}%
-\def\xintiDivTrunc {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiDivTrunc}\xintidivtrunc }%
-\def\xintidivtrunc #1{\expandafter\XINT_iidivtrunc\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiDivTrunc {\romannumeral0\xintiidivtrunc }%
\def\xintiidivtrunc #1{\expandafter\XINT_iidivtrunc\romannumeral`&&@#1\xint:}%
\def\XINT_iidivtrunc #1#2\xint:#3{\expandafter\XINT_iidivtrunc_a\expandafter #1%
@@ -1893,8 +1844,6 @@
\def\XINT_iidivtrunc_pos #1#2\xint:#3\xint:
{\expandafter\xint_firstoftwo_thenstop
\romannumeral0\XINT_div_prepare {#2}{#1#3}}%
-\def\xintiMod {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiMod}\xintimod }%
-\def\xintimod #1{\expandafter\XINT_iimodtrunc\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiModTrunc {\romannumeral0\xintiimodtrunc }%
\def\xintiimodtrunc #1{\expandafter\XINT_iimodtrunc\romannumeral`&&@#1\xint:}%
\def\XINT_iimodtrunc #1#2\xint:#3{\expandafter\XINT_iimodtrunc_a\expandafter #1%
@@ -1967,11 +1916,6 @@
{%
\expandafter\XINT_sqr\romannumeral0\xintiiabs{#1}\xint:
}%
-\def\xintiSqr {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiSqr}\xintisqr }%
-\def\xintisqr #1%
-{%
- \expandafter\XINT_sqr\romannumeral0\xintiabs{#1}\xint:
-}%
\def\XINT_sqr #1\xint:
{%
\expandafter\XINT_sqr_a
@@ -2016,12 +1960,6 @@
\expandafter\xint_pow\the\numexpr #2\expandafter
.\romannumeral`&&@#1\xint:
}%
-\def\xintiPow {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiPow}\xintipow }%
-\def\xintipow #1#2%
-{%
- \expandafter\xint_pow\the\numexpr #2\expandafter
- .\romannumeral0\xintnum{#1}\xint:
-}%
\def\xint_pow #1.#2%#3\xint:
{%
\xint_UDzerominusfork
@@ -2155,8 +2093,6 @@
}%
\def\xintiiFac {\romannumeral0\xintiifac }%
\def\xintiifac #1{\expandafter\XINT_fac_fork\the\numexpr#1.}%
-\def\xintiFac {\romannumeral0\XINT_signaldeprecated{xintcore}{xintiFac}\xintifac }%
-\let\xintifac \xintiifac % redefined by xintfrac
\def\XINT_fac_fork #1#2.%
{%
\xint_UDzerominusfork
@@ -2292,7 +2228,7 @@
\XINT_ifFlagRaised{xintiSqr}{\string\xintiSqr\MessageBreak}{}%
\XINT_ifFlagRaised{xintiPow}{\string\xintiPow\MessageBreak}{}%
\XINT_ifFlagRaised{xintiFac}{\string\xintiFac\MessageBreak}{}%
-They will get removed at some future release.}}%
+This is not possible because they all got removed from xintcore at 1.3!}}%
{% no deprecated macro used (at top level...)
}%
}\fi\fi
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index 7916b026cc8..979511d5410 100644
--- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
@@ -81,7 +81,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2018/02/06 1.2q Expandable expression parser (JFB)]%
+ [2018/03/01 1.3 Expandable expression parser (JFB)]%
\catcode`! 11
\let\XINT_Cmp \xintiiCmp
\def\xint_gob_til_! #1!{}% ! with catcode 11
@@ -202,6 +202,9 @@
\def\xintifboolexpr #1{\romannumeral0\xintifnotzero {\xinttheexpr #1\relax}}%
\def\xintifboolfloatexpr #1{\romannumeral0\xintifnotzero {\xintthefloatexpr #1\relax}}%
\def\xintifbooliiexpr #1{\romannumeral0\xintifnotzero {\xinttheiiexpr #1\relax}}%
+\let\XINT:NEhook:two\empty
+\let\XINT:NEhook:one\empty
+\let\XINT:NEhook:csv\empty
\def\XINT_::_end #1,#2{\xint_gobble_i #2}%
\def\xintCSV::csv #1{\expandafter\XINT_csv::_a\romannumeral`&&@#1,^,}%
\def\XINT_csv::_a {\XINT_csv::_b {}}%
@@ -674,7 +677,7 @@
\expandafter\let\csname XINT_#1_op_a\endcsname \XINT_expr_getop
\expandafter\def\csname XINT_#1_op_++)\endcsname ##1##2\relax
{\expandafter\XINT_expr_foundend \expandafter
- {\expandafter\.=+\csname .=\xintiCeil{\XINT_expr_unlock ##1}\endcsname }}%
+ {\expandafter\.=+\csname .=\XINT:NEhook:one\xintiCeil{\XINT_expr_unlock ##1}\endcsname }}%
}%
\catcode`. 12 \catcode`= 12 \catcode`+ 12
\catcode`& 12
@@ -684,7 +687,7 @@
\do {\expandafter\def\csname XINT_expr_itself_#1\endcsname {#1}}%
\catcode`& 7
\expandafter\let\csname XINT_expr_precedence_***\endcsname \xint_c_viii
-\def\XINT_expr_defbin_c #1#2#3#4#5#6#7#8%
+\def\XINT_expr_defbin_c #1#2#3#4#5#6#7#8#9%
{%
\def #1##1% \XINT_expr_op_<op> ou flexpr ou iiexpr
{% keep value, get next number and operator, then do until
@@ -700,7 +703,7 @@
\xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#8_op_##3\endcsname {##4}}%
\else \xint_afterfi {\expandafter ##2\expandafter ##3%
- \csname .=#6{\XINT_expr_unlock ##1}{\XINT_expr_unlock ##4}\endcsname }%
+ \csname .=#9#6{\XINT_expr_unlock ##1}{\XINT_expr_unlock ##4}\endcsname }%
\fi }%
\let #7#5%
}%
@@ -713,7 +716,7 @@
\csname XINT_#1_op_-#4\expandafter\endcsname
\csname xint_c_#3\expandafter\endcsname
\csname #5\expandafter\endcsname
- \csname XINT_expr_precedence_#2\endcsname {#1}%
+ \csname XINT_expr_precedence_#2\endcsname {#1}\XINT:NEhook:two
}%
\XINT_expr_defbin_b {expr} | {iii}{vi} {xintOR}%
\XINT_expr_defbin_b {flexpr} | {iii}{vi} {xintOR}%
@@ -742,9 +745,6 @@
\XINT_expr_defbin_b {expr} {!=} {v}{vi} {xintNotEq}%
\XINT_expr_defbin_b {flexpr}{!=} {v}{vi} {xintNotEq}%
\XINT_expr_defbin_b {iiexpr}{!=} {v}{vi} {xintiiNotEq}%
-\XINT_expr_defbin_b {expr} {..} {iii}{vi} {xintSeq::csv}%
-\XINT_expr_defbin_b {flexpr}{..} {iii}{vi} {xintSeq::csv}%
-\XINT_expr_defbin_b {iiexpr}{..} {iii}{vi} {xintiiSeq::csv}%
\XINT_expr_defbin_b {expr} {//} {vii}{vii}{xintDivFloor}% CHANGED IN 1.2p!
\XINT_expr_defbin_b {flexpr}{//} {vii}{vii}{XINTinFloatDivFloor}% "
\XINT_expr_defbin_b {iiexpr}{//} {vii}{vii}{xintiiDivFloor}% "
@@ -769,9 +769,25 @@
\XINT_expr_defbin_b {expr} {..[}{iii}{vi} {xintSeqA::csv}%
\XINT_expr_defbin_b {flexpr}{..[}{iii}{vi} {XINTinFloatSeqA::csv}%
\XINT_expr_defbin_b {iiexpr}{..[}{iii}{vi} {xintiiSeqA::csv}%
+\def\XINT_expr_defbin_b #1#2#3#4#5%
+{%
+ \expandafter\XINT_expr_defbin_c
+ \csname XINT_#1_op_#2\expandafter\endcsname
+ \csname XINT_#1_until_#2_a\expandafter\endcsname
+ \csname XINT_#1_until_#2_b\expandafter\endcsname
+ \csname XINT_#1_op_-#4\expandafter\endcsname
+ \csname xint_c_#3\expandafter\endcsname
+ \csname #5\expandafter\endcsname
+ \csname XINT_expr_precedence_#2\endcsname {#1}{}%
+}%
+\XINT_expr_defbin_b {expr} {..} {iii}{vi} {xintSeq::csv}%
+\XINT_expr_defbin_b {flexpr}{..} {iii}{vi} {xintSeq::csv}%
+\XINT_expr_defbin_b {iiexpr}{..} {iii}{vi} {xintiiSeq::csv}%
\XINT_expr_defbin_b {expr} {]..}{iii}{vi} {xintSeqB::csv}%
\XINT_expr_defbin_b {flexpr}{]..}{iii}{vi} {XINTinFloatSeqB::csv}%
\XINT_expr_defbin_b {iiexpr}{]..}{iii}{vi} {xintiiSeqB::csv}%
+\def\XINT_expr_binop_inline#1%
+ {\XINT_expr_binop_inline_a{\expandafter\XINT:NEhook:two\expandafter#1}}%
\def\XINT_expr_binop_inline_a
{\expandafter\xint_gobble_i\romannumeral`&&@\XINT_expr_binop_inline_b }%
\def\XINT_expr_binop_inline_b #1#2,{\XINT_expr_binop_inline_c #2,{#1}}%
@@ -798,9 +814,8 @@
\xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#8_op_##3\endcsname {##4}}%
\else \xint_afterfi {\expandafter ##2\expandafter ##3%
- \csname .=\expandafter\XINT_expr_binop_inline_a\expandafter
- {\expandafter\expandafter\expandafter#6\expandafter
- \xint_exchangetwo_keepbraces\expandafter
+ \csname .=\expandafter\XINT_expr_binop_inline\expandafter
+ {\expandafter#6\expandafter\xint_exchangetwo_keepbraces\expandafter
{\expandafter\XINT_expr_unlock\expandafter ##4\expandafter}\expandafter}%
\romannumeral`&&@\XINT_expr_unlock ##1,^,\endcsname }%
\fi }%
@@ -842,7 +857,7 @@
\xint_afterfi {\expandafter #2\expandafter ##1\romannumeral`&&@%
\csname XINT_#7_op_##3\endcsname {##4}}%
\else \xint_afterfi {\expandafter ##2\expandafter ##3%
- \csname .=\expandafter\XINT_expr_binop_inline_a\expandafter
+ \csname .=\expandafter\XINT_expr_binop_inline\expandafter
{\expandafter#5\expandafter
{\expandafter\XINT_expr_unlock\expandafter ##1\expandafter}\expandafter}%
\romannumeral`&&@\XINT_expr_unlock ##4,^,\endcsname }%
@@ -970,7 +985,8 @@
\else
\xint_afterfi
{\expandafter ##2\expandafter ##3\csname
- .=:\xintNum{\XINT_expr_unlock ##1};\xintNum{\XINT_expr_unlock ##4}%
+ .=:\XINT:NEhook:one\xintNum{\XINT_expr_unlock ##1};%
+ \XINT:NEhook:one\xintNum{\XINT_expr_unlock ##4}%
\endcsname
}%
\fi
@@ -990,7 +1006,7 @@
\def\XINT_expr_op_:] #1%
{%
\expandafter\xint_c_i\expandafter )%
- \csname .=]\xintNum{\XINT_expr_unlock #1}\endcsname
+ \csname .=]\XINT:NEhook:one\xintNum{\XINT_expr_unlock #1}\endcsname
}%
\let\XINT_flexpr_op_:] \XINT_expr_op_:]
\let\XINT_iiexpr_op_:] \XINT_expr_op_:]
@@ -1335,7 +1351,8 @@
\csname XINT_#5_op_##2\endcsname {##3}}%
\else
\xint_afterfi {\expandafter ##1\expandafter ##2%
- \csname .=#6{\XINT_expr_unlock ##3}\endcsname }%
+ \csname .=%
+ \XINT:NEhook:one#6{\XINT_expr_unlock ##3}\endcsname }%
\fi
}%
}%
@@ -1362,11 +1379,11 @@
}%
\let\XINT_expr_precedence_! \xint_c_x
\def\XINT_expr_op_! #1{\expandafter\XINT_expr_getop
- \csname .=\xintFac{\XINT_expr_unlock #1}\endcsname }%
+ \csname .=\XINT:NEhook:one\xintFac{\XINT_expr_unlock #1}\endcsname }%
\def\XINT_flexpr_op_! #1{\expandafter\XINT_expr_getop
- \csname .=\XINTinFloatFac{\XINT_expr_unlock #1}\endcsname }%
+ \csname .=\XINT:NEhook:one\XINTinFloatFac{\XINT_expr_unlock #1}\endcsname }%
\def\XINT_iiexpr_op_! #1{\expandafter\XINT_expr_getop
- \csname .=\xintiiFac{\XINT_expr_unlock #1}\endcsname }%
+ \csname .=\XINT:NEhook:one\xintiiFac{\XINT_expr_unlock #1}\endcsname }%
\catcode`[ 11
\catcode`* 11
\let\XINT_expr_precedence_[ \xint_c_vii
@@ -1691,10 +1708,11 @@
\if ^#4\xint_dothis\XINT_expr_op:_end\fi
\xint_orthat{\expandafter\XINT_expr_op:_c}\csname.=#4#5\endcsname {#3}#1{#2}%
}%
-\def\XINT_expr_op:_c #1#2#3#4{\expandafter\XINT_expr_op:_d\romannumeral0#2#1#3{#4}{#2}}%
+\def\XINT_expr_op:_c #1#2#3#4%
+ {\expandafter\XINT_expr_op:_d\romannumeral0#2#1#3{#4}{#2}}%
\def\XINT_expr_op:_d #1!#2#3#4#5%
{\expandafter\XINT_expr_op:_b\expandafter #4\expandafter
- {\romannumeral`&&@#4{\XINT_expr_unlock#1}{#5}}}%
+ {\romannumeral`&&@\XINT:NEhook:two#4{\XINT_expr_unlock#1}{#5}}}%
\def\XINT_expr_op:_noop\csname.=,#1\endcsname #2#3#4{\XINT_expr_op:_b #3{#4}{#2}#1,}%
\def\XINT_expr_op:_end \csname.=^\endcsname #1#2#3{#3}%
\def\XINT_expr_onliteral_subs
@@ -2030,376 +2048,519 @@
\expandafter\XINTinFloatdigits\romannumeral`&&@#1,^,{0[0]}}%
\def\XINTinFloatPrd:csv #1{\expandafter\XINT_oncsv:_a\expandafter\XINTinfloatmul
\expandafter\XINTinFloatdigits\romannumeral`&&@#1,^,{1[0]}}%
-\def\XINT_expr_twoargs #1,#2,{{#1}{#2}}%
-\def\XINT_expr_totwoargs #1#2{#1,#2}%
-\def\XINT_expr_argandopt #1,#2,#3.#4#5%
+\def\XINT:expr:one:and:opt #1,#2,#3!#4#5%
{%
\if\relax#3\relax\expandafter\xint_firstoftwo\else
\expandafter\xint_secondoftwo\fi
- {#4}{#5[\xintNum {#2}]}{#1}%
+ {#4}{#5[\xintNum{#2}]}{#1}%
}%
-\def\XINT_expr_oneortwo #1#2#3,#4,#5.%
+\def\XINT:expr:one:or:two #1,#2,#3!#4#5%
{%
- \if\relax#5\relax\expandafter\xint_firstoftwo\else
+ \if\relax#3\relax\expandafter\xint_firstoftwo\else
\expandafter\xint_secondoftwo\fi
- {#1{0}}{#2{\xintNum {#4}}}{#3}%
+ {#4{0}}{#5{\xintNum{#2}}}{#1}%
}%
-\def\XINT_iiexpr_oneortwo #1#2,#3,#4.%
+\def\XINT:iiexpr:one:or:two #1,#2,#3!#4%
{%
- \if\relax#4\relax\expandafter\xint_firstoftwo\else
+ \if\relax#3\relax\expandafter\xint_firstoftwo\else
\expandafter\xint_secondoftwo\fi
- {#1{0}}{#1{#3}}{#2}%
+ {#4{0}}{#4{#2}}{#1}%
+}%
+\def\XINT:expr:totwo #1#2{#1,#2}%
+\def\XINT:expr:two:to:two #1,#2,!#3%
+{%
+ \expandafter\XINT:expr:totwo\romannumeral`&&@%
+ #3{#1}{#2}%
+}%
+\def\XINT:expr:two:to:one #1,#2,!#3%
+{%
+ #3{#1}{#2}%
}%
+\def\XINT:flexpr:two:to:one #1,#2,!#3%
+{%
+ #3{#1}{#2}%
+}%
+\let\XINT:flexpr:two:to:two\XINT:flexpr:two:to:one
\def\XINT_expr_func_num #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintNum {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintNum{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_num\XINT_expr_func_num
\let\XINT_iiexpr_func_num\XINT_expr_func_num
\def\XINT_expr_func_reduce #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintIrr {\XINT_expr_unlock #3}[0]\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintIrr{\XINT_expr_unlock #3}[0]\endcsname
+}%
\let\XINT_flexpr_func_reduce\XINT_expr_func_reduce
+\def\XINT_expr_func_preduce #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintPIrr{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_flexpr_func_preduce\XINT_expr_func_preduce
\def\XINT_expr_func_abs #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintAbs {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintAbs{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_abs\XINT_expr_func_abs
\def\XINT_iiexpr_func_abs #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiAbs {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiAbs{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_sgn #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintSgn {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintSgn{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_sgn\XINT_expr_func_sgn
\def\XINT_iiexpr_func_sgn #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiSgn {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiSgn{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_frac #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintTFrac {\XINT_expr_unlock #3}\endcsname }%
-\def\XINT_flexpr_func_frac #1#2#3{\expandafter #1\expandafter #2\csname
- .=\XINTinFloatFracdigits {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintTFrac{\XINT_expr_unlock #3}\endcsname
+}%
+\def\XINT_flexpr_func_frac #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\XINTinFloatFracdigits{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_floor #1#2#3%
- {\expandafter #1\expandafter #2\csname .=\xintFloor {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintFloor{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_floor\XINT_expr_func_floor
\def\XINT_iiexpr_func_floor #1#2#3%
{%
- \expandafter #1\expandafter #2\csname.=\xintiFloor {\XINT_expr_unlock #3}\endcsname }%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiFloor{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_ceil #1#2#3%
- {\expandafter #1\expandafter #2\csname .=\xintCeil {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintCeil{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_ceil\XINT_expr_func_ceil
\def\XINT_iiexpr_func_ceil #1#2#3%
{%
- \expandafter #1\expandafter #2\csname.=\xintiCeil {\XINT_expr_unlock #3}\endcsname }%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiCeil{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_sqr #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintSqr {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintSqr{\XINT_expr_unlock #3}\endcsname
+}%
+\def\XINTinFloatSqr#1{\XINTinFloatMul{#1}{#1}}% revoir après
\def\XINT_flexpr_func_sqr #1#2#3%
{%
- \expandafter #1\expandafter #2\csname
- .=\XINTinFloatMul{\XINT_expr_unlock #3}{\XINT_expr_unlock #3}\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\XINTinFloatSqr{\XINT_expr_unlock #3}\endcsname
+}%
+\def\XINT_iiexpr_func_sqr #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiSqr{\XINT_expr_unlock #3}\endcsname
+}%
+\def\XINT_expr_func_? #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiIsNotZero{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_flexpr_func_? \XINT_expr_func_?
+\let\XINT_iiexpr_func_? \XINT_expr_func_?
+\def\XINT_expr_func_! #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiIsZero{\XINT_expr_unlock #3}\endcsname
}%
+\let\XINT_flexpr_func_! \XINT_expr_func_!
+\let\XINT_iiexpr_func_! \XINT_expr_func_!
+\def\XINT_expr_func_not #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiIsZero{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_flexpr_func_not \XINT_expr_func_not
+\let\XINT_iiexpr_func_not \XINT_expr_func_not
+\def\XINT_expr_func_odd #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintOdd{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_flexpr_func_odd\XINT_expr_func_odd
+\def\XINT_iiexpr_func_odd #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiOdd{\XINT_expr_unlock #3}\endcsname
+}%
+\def\XINT_expr_func_even #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintEven{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_flexpr_func_even\XINT_expr_func_even
+\def\XINT_iiexpr_func_even #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiEven{\XINT_expr_unlock #3}\endcsname
+}%
+\def\XINT_expr_func_nuple #1#2#3%
+ {\expandafter #1\expandafter #2\csname.=\XINT_expr_unlock #3\endcsname }%
+\let\XINT_flexpr_func_nuple\XINT_expr_func_nuple
+\let\XINT_iiexpr_func_nuple\XINT_expr_func_nuple
\def\XINT_expr_func_factorial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_expr_argandopt
- \romannumeral`&&@\XINT_expr_unlock#3,,.\xintFac\XINTinFloatFac
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:one:and:opt
+ \romannumeral`&&@\XINT_expr_unlock#3,,!\xintFac\XINTinFloatFac
\endcsname
}%
\def\XINT_flexpr_func_factorial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_expr_argandopt
- \romannumeral`&&@\XINT_expr_unlock#3,,.\XINTinFloatFacdigits\XINTinFloatFac
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:one:and:opt
+ \romannumeral`&&@\XINT_expr_unlock#3,,!\XINTinFloatFacdigits\XINTinFloatFac
\endcsname
}%
\def\XINT_iiexpr_func_factorial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname.=\xintiiFac{\XINT_expr_unlock #3}\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiFac{\XINT_expr_unlock #3}\endcsname
}%
-\def\XINT_iiexpr_func_sqr #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiSqr {\XINT_expr_unlock #3}\endcsname }%
\def\XINT_expr_func_sqrt #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_expr_argandopt
- \romannumeral`&&@\XINT_expr_unlock#3,,.\XINTinFloatSqrtdigits\XINTinFloatSqrt
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:one:and:opt
+ \romannumeral`&&@\XINT_expr_unlock#3,,!\XINTinFloatSqrtdigits\XINTinFloatSqrt
\endcsname
}%
\let\XINT_flexpr_func_sqrt\XINT_expr_func_sqrt
\def\XINT_iiexpr_func_sqrt #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiSqrt {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiSqrt{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_iiexpr_func_sqrtr #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiSqrtR {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiSqrtR{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_round #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_expr_oneortwo
- \expandafter\xintiRound\expandafter\xintRound
- \romannumeral`&&@\XINT_expr_unlock #3,,.\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:one:or:two
+ \romannumeral`&&@\XINT_expr_unlock #3,,!\xintiRound\xintRound
+ \endcsname
}%
\let\XINT_flexpr_func_round\XINT_expr_func_round
\def\XINT_iiexpr_func_round #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_iiexpr_oneortwo\expandafter\xintiRound
- \romannumeral`&&@\XINT_expr_unlock #3,,.\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:iiexpr:one:or:two
+ \romannumeral`&&@\XINT_expr_unlock #3,,!\xintiRound
+ \endcsname
}%
\def\XINT_expr_func_trunc #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_expr_oneortwo
- \expandafter\xintiTrunc\expandafter\xintTrunc
- \romannumeral`&&@\XINT_expr_unlock #3,,.\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:one:or:two
+ \romannumeral`&&@\XINT_expr_unlock #3,,!\xintiTrunc\xintTrunc
+ \endcsname
}%
\let\XINT_flexpr_func_trunc\XINT_expr_func_trunc
\def\XINT_iiexpr_func_trunc #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_iiexpr_oneortwo\expandafter\xintiTrunc
- \romannumeral`&&@\XINT_expr_unlock #3,,.\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:iiexpr:one:or:two
+ \romannumeral`&&@\XINT_expr_unlock #3,,!\xintiTrunc
+ \endcsname
}%
\def\XINT_expr_func_float #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_expr_argandopt
- \romannumeral`&&@\XINT_expr_unlock #3,,.\XINTinFloatdigits\XINTinFloat
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:one:and:opt
+ \romannumeral`&&@\XINT_expr_unlock #3,,!\XINTinFloatdigits\XINTinFloat
\endcsname
}%
\let\XINT_flexpr_func_float\XINT_expr_func_float
\def\XINT_expr_func_divmod #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_expr_totwoargs
- \romannumeral0\expandafter\xintdivmod
- \romannumeral`&&@\expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:two
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintDivMod
+ \endcsname
}%
\def\XINT_flexpr_func_divmod #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINTinFloatDivMod
- \romannumeral`&&@\expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:flexpr:two:to:two
+ \romannumeral`&&@\XINT_expr_unlock #3,!\XINTinFloatDivMod
+ \endcsname
}%
\def\XINT_iiexpr_func_divmod #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINT_expr_totwoargs
- \romannumeral0\expandafter\xintiidivmod
- \romannumeral`&&@\expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:two
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintiiDivMod
+ \endcsname
}%
\def\XINT_expr_func_mod #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintMod
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintMod
+ \endcsname
}%
\def\XINT_flexpr_func_mod #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\XINTinFloatMod
- \romannumeral`&&@\expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:flexpr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\XINTinFloatMod
+ \endcsname
}%
\def\XINT_iiexpr_func_mod #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintiiMod
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintiiMod
+ \endcsname
}%
\def\XINT_expr_func_binomial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintBinomial
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintBinomial
+ \endcsname
}%
\def\XINT_flexpr_func_binomial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\XINTinFloatBinomial
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:flexpr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\XINTinFloatBinomial
+ \endcsname
}%
\def\XINT_iiexpr_func_binomial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintiiBinomial
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintiiBinomial
+ \endcsname
}%
\def\XINT_expr_func_pfactorial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintPFactorial
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintPFactorial
+ \endcsname
}%
\def\XINT_flexpr_func_pfactorial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\XINTinFloatPFactorial
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:flexpr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\XINTinFloatPFactorial
+ \endcsname
}%
\def\XINT_iiexpr_func_pfactorial #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintiiPFactorial
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintiiPFactorial
+ \endcsname
}%
\def\XINT_expr_func_quo #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintiQuo
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintiQuo
+ \endcsname
}%
\let\XINT_flexpr_func_quo\XINT_expr_func_quo
\def\XINT_iiexpr_func_quo #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintiiQuo
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintiiQuo
+ \endcsname
}%
\def\XINT_expr_func_rem #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintiRem
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintiRem
+ \endcsname
}%
\let\XINT_flexpr_func_rem\XINT_expr_func_rem
\def\XINT_iiexpr_func_rem #1#2#3%
{%
- \expandafter #1\expandafter #2\csname .=%
- \expandafter\expandafter\expandafter\xintiiRem
- \expandafter\XINT_expr_twoargs
- \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\XINT:expr:two:to:one
+ \romannumeral`&&@\XINT_expr_unlock #3,!\xintiiRem
+ \endcsname
}%
\def\XINT_expr_func_gcd #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintGCDof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintGCDof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_gcd\XINT_expr_func_gcd
\def\XINT_iiexpr_func_gcd #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintiiGCDof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintiiGCDof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_lcm #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintLCMof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintLCMof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_lcm\XINT_expr_func_lcm
\def\XINT_iiexpr_func_lcm #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintiiLCMof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintiiLCMof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_max #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintMaxof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintMaxof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_iiexpr_func_max #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintiiMaxof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintiiMaxof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_flexpr_func_max #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\XINTinFloatMaxof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\XINTinFloatMaxof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_min #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintMinof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintMinof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_iiexpr_func_min #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintiiMinof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintiiMinof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_flexpr_func_min #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\XINTinFloatMinof:csv{\XINT_expr_unlock #3}\endcsname }%
-\expandafter\def\csname XINT_expr_func_+\endcsname #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintSum:csv{\XINT_expr_unlock #3}\endcsname }%
-\expandafter\def\csname XINT_flexpr_func_+\endcsname #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\XINTinFloatSum:csv{\XINT_expr_unlock #3}\endcsname }%
-\expandafter\def\csname XINT_iiexpr_func_+\endcsname #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintiiSum:csv{\XINT_expr_unlock #3}\endcsname }%
-\expandafter\def\csname XINT_expr_func_*\endcsname #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintPrd:csv{\XINT_expr_unlock #3}\endcsname }%
-\expandafter\def\csname XINT_flexpr_func_*\endcsname #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\XINTinFloatPrd:csv{\XINT_expr_unlock #3}\endcsname }%
-\expandafter\def\csname XINT_iiexpr_func_*\endcsname #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintiiPrd:csv{\XINT_expr_unlock #3}\endcsname }%
-\def\XINT_expr_func_? #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintiiIsNotZero {\XINT_expr_unlock #3}\endcsname }%
-\let\XINT_flexpr_func_? \XINT_expr_func_?
-\let\XINT_iiexpr_func_? \XINT_expr_func_?
-\def\XINT_expr_func_! #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiIsZero {\XINT_expr_unlock #3}\endcsname }%
-\let\XINT_flexpr_func_! \XINT_expr_func_!
-\let\XINT_iiexpr_func_! \XINT_expr_func_!
-\def\XINT_expr_func_not #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiIsZero {\XINT_expr_unlock #3}\endcsname }%
-\let\XINT_flexpr_func_not \XINT_expr_func_not
-\let\XINT_iiexpr_func_not \XINT_expr_func_not
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\XINTinFloatMinof:csv{\XINT_expr_unlock #3}\endcsname
+}%
+\expandafter
+\def\csname XINT_expr_func_+\endcsname #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintSum:csv{\XINT_expr_unlock #3}\endcsname
+}%
+\expandafter
+\def\csname XINT_flexpr_func_+\endcsname #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\XINTinFloatSum:csv{\XINT_expr_unlock #3}\endcsname
+}%
+\expandafter
+\def\csname XINT_iiexpr_func_+\endcsname #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintiiSum:csv{\XINT_expr_unlock #3}\endcsname
+}%
+\expandafter
+\def\csname XINT_expr_func_*\endcsname #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintPrd:csv{\XINT_expr_unlock #3}\endcsname
+}%
+\expandafter
+\def\csname XINT_flexpr_func_*\endcsname #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\XINTinFloatPrd:csv{\XINT_expr_unlock #3}\endcsname
+}%
+\expandafter
+\def\csname XINT_iiexpr_func_*\endcsname #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintiiPrd:csv{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_all #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintANDof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintANDof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_all\XINT_expr_func_all
\let\XINT_iiexpr_func_all\XINT_expr_func_all
\def\XINT_expr_func_any #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintORof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintORof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_any\XINT_expr_func_any
\let\XINT_iiexpr_func_any\XINT_expr_func_any
\def\XINT_expr_func_xor #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\xintXORof:csv{\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintXORof:csv{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_xor\XINT_expr_func_xor
\let\XINT_iiexpr_func_xor\XINT_expr_func_xor
-\def\xintifNotZero: #1,#2,#3,{\xintiiifNotZero{#1}{#2}{#3}}%
-\def\XINT_expr_func_if #1#2#3%
- {\expandafter #1\expandafter #2\csname
- .=\expandafter\xintifNotZero:\romannumeral`&&@\XINT_expr_unlock #3,\endcsname }%
-\let\XINT_flexpr_func_if\XINT_expr_func_if
-\let\XINT_iiexpr_func_if\XINT_expr_func_if
-\def\xintifSgn: #1,#2,#3,#4,{\xintiiifSgn{#1}{#2}{#3}{#4}}%
-\def\XINT_expr_func_ifsgn #1#2#3%
+\def\XINT_expr_func_len #1#2#3%
{%
- \expandafter #1\expandafter #2\csname
- .=\expandafter\xintifSgn:\romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+ \expandafter#1\expandafter#2\csname.=%
+ \XINT:NEhook:csv\xintLength:f:csv{\XINT_expr_unlock#3}\endcsname
}%
-\let\XINT_flexpr_func_ifsgn\XINT_expr_func_ifsgn
-\let\XINT_iiexpr_func_ifsgn\XINT_expr_func_ifsgn
-\def\XINT_expr_func_len #1#2#3%
- {\expandafter#1\expandafter#2%
- \csname.=\xintLength:f:csv {\XINT_expr_unlock#3}\endcsname }%
\let\XINT_flexpr_func_len \XINT_expr_func_len
\let\XINT_iiexpr_func_len \XINT_expr_func_len
\def\XINT_expr_func_first #1#2#3%
- {\expandafter #1\expandafter #2\csname.=%
- \xintFirstItem:f:csv{\XINT_expr_unlock #3}\endcsname}%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintFirstItem:f:csv{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_first\XINT_expr_func_first
\let\XINT_iiexpr_func_first\XINT_expr_func_first
\def\XINT_expr_func_last #1#2#3%
- {\expandafter #1\expandafter #2\csname.=%
- \xintLastItem:f:csv{\XINT_expr_unlock #3}\endcsname}%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintLastItem:f:csv{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_last\XINT_expr_func_last
\let\XINT_iiexpr_func_last\XINT_expr_func_last
-\def\XINT_expr_func_odd #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintOdd{\XINT_expr_unlock #3}\endcsname}%
-\let\XINT_flexpr_func_odd\XINT_expr_func_odd
-\def\XINT_iiexpr_func_odd #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiOdd{\XINT_expr_unlock #3}\endcsname}%
-\def\XINT_expr_func_even #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintEven{\XINT_expr_unlock #3}\endcsname}%
-\let\XINT_flexpr_func_even\XINT_expr_func_even
-\def\XINT_iiexpr_func_even #1#2#3%
- {\expandafter #1\expandafter #2\csname.=\xintiiEven{\XINT_expr_unlock #3}\endcsname}%
-\def\XINT_expr_func_nuple #1#2#3%
- {\expandafter #1\expandafter #2\csname .=\XINT_expr_unlock #3\endcsname }%
-\let\XINT_flexpr_func_nuple\XINT_expr_func_nuple
-\let\XINT_iiexpr_func_nuple\XINT_expr_func_nuple
\def\XINT_expr_func_reversed #1#2#3%
- {\expandafter #1\expandafter #2\csname .=%
- \xintReverse:f:csv {\XINT_expr_unlock #3}\endcsname }%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:csv\xintReverse:f:csv{\XINT_expr_unlock #3}\endcsname
+}%
\let\XINT_flexpr_func_reversed\XINT_expr_func_reversed
\let\XINT_iiexpr_func_reversed\XINT_expr_func_reversed
+\def\xintifNotZero: #1,#2,#3,{\xintiiifNotZero{#1}{#2}{#3}}%
+\def\XINT_expr_func_if #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\xintifNotZero:%
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+}%
+\let\XINT_flexpr_func_if\XINT_expr_func_if
+\let\XINT_iiexpr_func_if\XINT_expr_func_if
+\def\xintifSgn: #1,#2,#3,#4,{\xintiiifSgn{#1}{#2}{#3}{#4}}%
+\def\XINT_expr_func_ifsgn #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \expandafter\xintifSgn:%
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+}%
+\let\XINT_flexpr_func_ifsgn\XINT_expr_func_ifsgn
+\let\XINT_iiexpr_func_ifsgn\XINT_expr_func_ifsgn
\def\xintSeqB:f:csv #1#2%
{\expandafter\XINT_seqb:f:csv \expandafter{\romannumeral0\xintraw{#2}}{#1}}%
\def\XINT_seqb:f:csv #1#2{\expandafter\XINT_seqb:f:csv_a\romannumeral`&&@#2#1!}%
@@ -2486,6 +2647,7 @@
\XINT_seqb:f:csv_nc\XINT_seqb:f:csv_nb\XINT_flseqb:f:csv_na {#1}{#2}%
}%
\catcode`: 12
+\catcode`~ 12
\def\XINT_tmpa #1#2#3#4%
{%
\def #1##1(##2)##3=##4;{%
@@ -2498,11 +2660,11 @@
\edef\XINT_expr_tmpc {subs(\unexpanded\expandafter{\XINT_expr_tmpc},%
####1=################\XINT_expr_tmpb)}%
}%
- \expandafter#3\csname XINT_#2_userfunc_\XINT_expr_tmpa\endcsname
- [\XINT_expr_tmpb]{\XINT_expr_tmpc}%
\expandafter\XINT_expr_defuserfunc
\csname XINT_#2_func_\XINT_expr_tmpa\expandafter\endcsname
- \csname XINT_#2_userfunc_\XINT_expr_tmpa\endcsname
+ \expandafter{\XINT_expr_tmpa}{#2}%
+ \expandafter#3\csname XINT_#2_userfunc_\XINT_expr_tmpa\endcsname
+ [\XINT_expr_tmpb]{\XINT_expr_tmpc}%
\ifxintverbose\xintMessage {xintexpr}{Info}
{Function \XINT_expr_tmpa\space for \string\xint #4 parser
associated to \string\XINT_#2_userfunc_\XINT_expr_tmpa\space
@@ -2515,11 +2677,17 @@
\XINT_tmpa\xintdeffunc {expr} \XINT_NewFunc {expr}%
\XINT_tmpa\xintdefiifunc {iiexpr}\XINT_NewIIFunc {iiexpr}%
\XINT_tmpa\xintdeffloatfunc{flexpr}\XINT_NewFloatFunc{floatexpr}%
-\def\XINT_expr_defuserfunc #1#2{%
+\def\XINT_expr_defuserfunc #1#2#3%
+{%
\def #1##1##2##3{\expandafter ##1\expandafter ##2%
- \csname .=\expandafter #2\romannumeral`&&@\XINT_expr_unlock ##3,\endcsname
+ \csname .=\XINT:expr:userfunc{#3}{#2}{\XINT_expr_unlock ##3}\endcsname
}%
}%
+\def\XINT:expr:userfunc #1#2#3%
+ {\csname XINT_#1_userfunc_#2\expandafter\endcsname
+ \romannumeral0\xintcsvtolistnonstripped{#3}}%
+\def\XINT:newexpr:userfunc #1#2#3%
+ {~csname XINT_#1_userfunc_#2~endcsname\xintCSVtoListNonStripped{#3}}%
\def\XINT_expr_wrapit #1{\expandafter\XINT_expr_wrap\csname.=#1\endcsname}%
\def\xintNewFunction #1#2[#3]#4%
{%
@@ -2528,16 +2696,16 @@
\def\XINT_expr_tmpb ##1##2##3##4##5##6##7##8##9{#4}%
\begingroup
\ifcase #3\relax
- \toks0{,}%
- \or \toks0{##1,}%
- \or \toks0{##1,##2,}%
- \or \toks0{##1,##2,##3,}%
- \or \toks0{##1,##2,##3,##4,}%
- \or \toks0{##1,##2,##3,##4,##5,}%
- \or \toks0{##1,##2,##3,##4,##5,##6,}%
- \or \toks0{##1,##2,##3,##4,##5,##6,##7,}%
- \or \toks0{##1,##2,##3,##4,##5,##6,##7,##8,}%
- \else \toks0{##1,##2,##3,##4,##5,##6,##7,##8,##9,}%
+ \toks0{}%
+ \or \toks0{##1}%
+ \or \toks0{##1##2}%
+ \or \toks0{##1##2##3}%
+ \or \toks0{##1##2##3##4}%
+ \or \toks0{##1##2##3##4##5}%
+ \or \toks0{##1##2##3##4##5##6}%
+ \or \toks0{##1##2##3##4##5##6##7}%
+ \or \toks0{##1##2##3##4##5##6##7##8}%
+ \else \toks0{##1##2##3##4##5##6##7##8##9}%
\fi
\expandafter
\endgroup
@@ -2549,13 +2717,13 @@
{\XINT_expr_wrapit{##7}}{\XINT_expr_wrapit{##8}}{\XINT_expr_wrapit{##9}}}%
\expandafter\XINT_expr_newfunction
\csname XINT_expr_func_\XINT_expr_tmpa\expandafter\endcsname
- \csname XINT_expr_macrofunc_\XINT_expr_tmpa\endcsname\xintbareeval
+ \expandafter{\XINT_expr_tmpa}{eval}\xintbareeval
\expandafter\XINT_expr_newfunction
\csname XINT_iiexpr_func_\XINT_expr_tmpa\expandafter\endcsname
- \csname XINT_expr_macrofunc_\XINT_expr_tmpa\endcsname\xintbareiieval
+ \expandafter{\XINT_expr_tmpa}{iieval}\xintbareiieval
\expandafter\XINT_expr_newfunction
\csname XINT_flexpr_func_\XINT_expr_tmpa\expandafter\endcsname
- \csname XINT_expr_macrofunc_\XINT_expr_tmpa\endcsname\xintbarefloateval
+ \expandafter{\XINT_expr_tmpa}{floateval}\xintbarefloateval
\ifxintverbose
\xintMessage {xintexpr}{Info}
{Function \XINT_expr_tmpa\space for the expression parsers is
@@ -2564,10 +2732,27 @@
\csname XINT_expr_macrofunc_\XINT_expr_tmpa\endcsname}%
\fi
}%
-\def\XINT_expr_newfunction #1#2#3%
+\def\XINT_expr_newfunction #1#2#3#4%
+{%
+ \def#1##1##2##3{\expandafter ##1\expandafter ##2\romannumeral0%
+ \XINT:expr:macrofunc{#4}{#3}{#2}{\XINT_expr_unlock##3}}%
+}%
+\def\XINT:expr:macrofunc #1#2#3#4%
+{%
+ #1\csname XINT_expr_macrofunc_#3\expandafter\endcsname
+ \romannumeral0\xintcsvtolistnonstripped{#4}\relax
+}%
+\def\XINT:newexpr:macrofunc #1{%
+\def\XINT:newexpr:macrofunc ##1##2##3##4%
{%
- \def#1##1##2##3{\expandafter ##1\expandafter ##2\romannumeral`&&@%
- #3\expandafter#2\romannumeral`&&@\XINT_expr_unlock##3,\relax}%
+ \expandafter#1\csname.=~XINT:newexpr:macrofunc:a{##2}{##3}%
+ {\xintCSVtoListNonStripped{##4}}\endcsname
+}%
+}\XINT:newexpr:macrofunc { }%
+\def\XINT:newexpr:macrofunc:a #1#2#3%
+{%
+ \expandafter\XINT_expr_unlock\romannumeral0\csname xintbare#1\endcsname
+ \csname XINT_expr_macrofunc_#2\endcsname#3\relax
}%
\def\xintApply::csv #1#2%
{\expandafter\XINT_applyon::_a\expandafter {\romannumeral`&&@#2}{#1}}%
@@ -2591,141 +2776,144 @@
\def\XINT_applyon:::_e #1,#2#3#4{\XINT_applyon:::_b {#2}{#3}{#4, #1}}%
\def\XINT_applyon:::_end #1,#2#3#4{\xint_secondoftwo #4}%
\catcode`~ 12
-\def\XINT_expr_RApply::csv #1#2#3#4%
- {~xintApply::csv{~expandafter#1~xint_exchangetwo_keepbraces{#4}}{#3}}%
-\def\XINT_expr_LApply::csv #1#2#3#4{~xintApply::csv{#1{#3}}{#4}}%
-\def\XINT_expr_RLApply:::csv #1#2{~xintApply:::csv{#1}}%
\catcode`$ 12 % $
-\def\XINT_xptwo_getab_b #1#2!#3%
- {\expandafter\XINT_xptwo_getab_c\romannumeral`&&@#3!#1{#1#2}}%
-\def\XINT_xptwo_getab_c #1#2!#3#4#5#6{#1#3{#5}{#6}{#1#2}{#4}}%
\def\xint_ddfork #1$$#2#3\krof {#2}% $$
-\def\XINT_NEfork #1#2{\xint_ddfork
- #1#2\XINT_expr_RLApply:::csv
- #1$\XINT_expr_RApply::csv% $
- $#2\XINT_expr_LApply::csv% $
- $${\XINT_NEfork_nn #1#2}% $$
- \krof }%
-\def\XINT_NEfork_nn #1#2#3#4{%
- \if #1##\xint_dothis{#3}\fi
- \if #1~\xint_dothis{#3}\fi
- \if #2##\xint_dothis{#3}\fi
- \if #2~\xint_dothis{#3}\fi
- \xint_orthat {\csname #4NE\endcsname }%
- }%
-\def\XINT_NEfork_one #1#2!#3#4#5#6{%
- \if ###1\xint_dothis {#3}\fi
- \if ~#1\xint_dothis {#3}\fi
- \if $#1\xint_dothis {~xintApply::csv{#3#5}}\fi %$
- \xint_orthat {\csname #4NE\endcsname #6}{#1#2}%
-}%
-\toks0 {}%
-\xintFor #1 in
- {DivFloor,Mod,Round,Trunc,iRound,iTrunc,iQuo,iRem,
- iiDivFloor,iiDivRound,iiMod,iiQuo,iiRem,%
- Lt,Gt,Eq,LtorEq,GtorEq,NotEq,%
- iiLt,iiGt,iiEq,iiLtorEq,iiGtorEq,iiNotEq,%
- Add,Sub,Mul,Div,Pow,E,%
- iiAdd,iiSub,iiMul,iiPow,iiE,%
- AND,OR,XOR,%
- SeqA::csv,iiSeqA::csv}\do
- {\toks0
- \expandafter{\the\toks0% no space!
- \expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\expandafter
- \endcsname\expandafter\def\csname xint#1\endcsname ####1####2{%
- \expandafter\XINT_NEfork
- \romannumeral`&&@\expandafter\XINT_xptwo_getab_b
- \romannumeral`&&@####2!{####1}{~xint#1}{xint#1}}%
- }%
-}%
-\xintFor #1 in {Num,Irr,Abs,iiAbs,Sgn,iiSgn,TFrac,Floor,iFloor,Ceil,iCeil,%
- Sqr,iiSqr,iiSqrt,iiSqrtR,iiIsZero,iiIsNotZero,iiifNotZero,iiifSgn,%
- Odd,Even,iiOdd,iiEven,Opp,iiOpp,iiifZero,Fac,Binomial,%
- PFactorial,iiFac,iiBinomial,iiPFactorial,Bool,Toggle}\do
-{\toks0 \expandafter{\the\toks0%
- \expandafter\let\csname xint#1NE\expandafter\endcsname\csname
- xint#1\expandafter
- \endcsname\expandafter\def\csname xint#1\endcsname ####1{%
- \expandafter\XINT_NEfork_one\romannumeral`&&@####1!{~xint#1}{xint#1}{}{}}%
- }%
-}%
-\toks0
- \expandafter{\the\toks0
- \let\XINTinFloatFacNE\XINTinFloatFac
- \def\XINTinFloatFac ##1{%
- \expandafter\XINT_NEfork_one
- \romannumeral`&&@##1!{~XINTinFloatFac}{XINTinFloatFac}{}{}}%
- }%
-\xintFor #1 in {Add,Sub,Mul,Div,Binomial,PFactorial,PowerH,E,%
- Mod,DivFloor,DivMod,SeqA::csv}\do
-{\toks0
- \expandafter{\the\toks0%
- \expandafter\let\csname XINTinFloat#1NE\expandafter\endcsname
- \csname XINTinFloat#1\expandafter\endcsname
- \expandafter\def\csname XINTinFloat#1\endcsname ####1####2{%
- \expandafter\XINT_NEfork
- \romannumeral`&&@\expandafter\XINT_xptwo_getab_b
- \romannumeral`&&@####2!{####1}{~XINTinFloat#1}{XINTinFloat#1}}%
- }%
-}%
-\xintFor #1 in {XINTinFloatdigits,XINTinFloatFracdigits,XINTinFloatSqrtdigits,XINTinFloatFacdigits}\do
-{\toks0
- \expandafter{\the\toks0%
- \expandafter\let\csname #1NE\expandafter\endcsname\csname #1\expandafter
- \endcsname\expandafter\def\csname #1\endcsname ####1{\expandafter
- \XINT_NEfork_one\romannumeral`&&@####1!{~#1}{#1}{}{}}%
- }%
+\def\XINT:NE:RApply::csv #1#2#3#4%
+ {~xintApply::csv{~expandafter #2~xint_exchangetwo_keepbraces{#4}}{#3}}%
+\def\XINT:NE:LApply::csv #1#2#3{~xintApply::csv{#2{#3}}}%
+\def\XINT:NE:RLApply:::csv #1{~xintApply:::csv}%
+\def\XINT:NE:two#1{\XINT:NE:two_{#1}{\detokenize{#1}}}%
+\def\XINT:NE:two_#1#2#3#4%
+ {\expandafter\XINT:NE:two_a\romannumeral`&&@#4!{#3}{#1}{#2}}%
+\def\XINT:NE:two_a#1#2!#3#4#5%
+ {\expandafter\XINT:NE:two_b\romannumeral`&&@#3!#1{#4}{#5}{#1#2}}%
+\def\XINT:NE:two_b#1#2!#3#4#5{\XINT:NE:two_fork_dd#1#3{#4}{#5}{#1#2}}%
+\def\XINT:NE:two_fork_dd #1#2{%
+ \xint_ddfork
+ #1#2\XINT:NE:RLApply:::csv
+ #1$\XINT:NE:RApply::csv% $
+ $#2\XINT:NE:LApply::csv% $
+ $${\XINT:NE:two_fork_nn #1#2}% $$
+ \krof
+}%
+\def\XINT:NE:two_fork_nn #1#2#3#4{%
+ \if #1##\xint_dothis{#4}\fi
+ \if #1~\xint_dothis{#4}\fi
+ \if #2##\xint_dothis{#4}\fi
+ \if #2~\xint_dothis{#4}\fi
+ \xint_orthat{#3}%
+}%
+\def\XINT:NE:one#1#2{\expandafter\XINT:NE:one_a\romannumeral`&&@#2!#1}%
+\def\XINT:NE:one_a#1#2!#3{%
+ \if ###1\xint_dothis {\detokenize{#3}}\fi
+ \if ~#1\xint_dothis {\detokenize{#3}}\fi
+ \if $#1\xint_dothis {~xintApply::csv{\detokenize{#3}}}\fi %$
+ \xint_orthat #3{#1#2}%
+}%
+\def\XINT:NE:oneopt#1[#2]#3%
+ {\expandafter\XINT:NE:oneopt_a\romannumeral`&&@#3!{#2}#1}%
+\def\XINT:NE:oneopt_a#1#2!#3#4%
+ {\expandafter\XINT:NE:oneopt_b\romannumeral`&&@#3!#1#4{#1#2}}%
+\def\XINT:NE:oneopt_b#1#2!#3#4%
+ {\expandafter\XINT:NE:oneopt_fork#1#3#4{#1#2}}%
+\def\XINT:NE:oneopt_fork#1#2#3#4{%
+ \if1\if###11\else\if~#11\else\if###21\else\if~#21\else0\fi\fi\fi\fi
+ \xint_dothis {\detokenize{#3}[#4]}\fi
+ \if $#2\xint_dothis {~xintApply::csv{\detokenize{#3}[#4]}}\fi %$
+ \xint_orthat{#3[#4]}%
+}% pas complétement général, mais bon
+\def\XINT:NE:csv #1{\detokenize{#1}}% radicalement fainéant
+\def\XINT:newexpr:one:and:opt #1,#2,#3!#4#5%
+{%
+ \if\relax#3\relax\expandafter\xint_firstoftwo\else
+ \expandafter\xint_secondoftwo\fi
+ {\XINT:NE:one#4}{\XINT:NE:oneopt#5[\XINT:NE:one\xintNum{#2}]}{#1}%
}%
-\xintFor #1 in {xintSeq::csv,xintiiSeq::csv,XINTinFloatSeq::csv}\do
- {\toks0
- \expandafter{\the\toks0% no space
- \expandafter\let\csname #1NE\expandafter\endcsname\csname #1\expandafter
- \endcsname\expandafter\def\csname #1\endcsname ####1####2{%
- \expandafter\XINT_NEfork
- \romannumeral`&&@\expandafter\XINT_xptwo_getab_b
- \romannumeral`&&@####2!{####1}{$noexpand$#1}{#1}}%
- }%
+\def\XINT:newexpr:one:or:two #1,#2,#3!#4#5%
+{%
+ \if\relax#3\relax\expandafter\xint_firstoftwo\else
+ \expandafter\xint_secondoftwo\fi
+ {\XINT:NE:two#4{0}}{\XINT:NE:two#5{\XINT:NE:one\xintNum{#2}}}{#1}%
}%
-\xintFor #1 in {xintSeqB,xintiiSeqB,XINTinFloatSeqB}\do
- {\toks0
- \expandafter{\the\toks0% no space
- \expandafter\let\csname #1::csvNE\expandafter\endcsname\csname #1::csv\expandafter
- \endcsname\expandafter\def\csname #1::csv\endcsname ####1####2{%
- \expandafter\XINT_NEfork
- \romannumeral`&&@\expandafter\XINT_xptwo_getab_b
- \romannumeral`&&@####2!{####1}{$noexpand$#1:f:csv}{#1::csv}}%
- }%
+\def\XINT:newiiexpr:one:or:two #1,#2,#3!#4%
+{%
+ \if\relax#3\relax\expandafter\xint_firstoftwo\else
+ \expandafter\xint_secondoftwo\fi
+ {\XINT:NE:two#4{0}}{\XINT:NE:two#4{#2}}{#1}%
+}%
+\def\XINT:newexpr:insertdollar~{$noexpand$}%
+\def\XINT:newexpr:two:to:two #1,#2,!#3%
+{%
+ \XINT:NE:two_
+ {\expandafter\XINT:expr:totwo\romannumeral`&&@#3}%
+ {$noexpand$expandafter~XINT:expr:totwo~romannumeral-`0\detokenize{#3}}%
+ {#1}{#2}%
+}%
+\def\XINT:newflexpr:two:to:two #1,#2,!#3%
+{%
+ \XINT:NE:two_
+ {#3}%
+ {\expandafter\XINT:newexpr:insertdollar\detokenize{#3}}%
+ {#1}{#2}%
+}%
+\def\XINT:newexpr:two:to:one #1,#2,!#3%
+{%
+ \XINT:NE:two#3{#1}{#2}%
+}%
+\let\XINT:newflexpr:two:to:one\XINT:newexpr:two:to:one
+\def\xintifNotZeroNE:#1#2,#3,#4,%
+{%
+ \if1\if###11\else\if~#11\else\if$#11\else0%$
+ \fi\fi\fi
+ \xint_dothis{~xintifNotZero}\fi
+ \xint_orthat\xintifNotZero
+ {#1#2}{#3}{#4}%
+}%
+\def\xintifSgnNE:#1#2,#3,#4,#5,%
+{%
+ \if1\if###11\else\if~#11\else\if$#11\else0%$
+ \fi\fi\fi
+ \xint_dothis{~xintifSgn}\fi
+ \xint_orthat\xintifSgn
+ {#1#2}{#3}{#4}{#5}%
+}%
+\def\XINT_expr_redefinemacros {%
+ \let\XINT:NEhook:one\XINT:NE:one
+ \let\XINT:NEhook:two\XINT:NE:two
+ \let\XINT:NEhook:csv\XINT:NE:csv
+ \let\XINT:expr:one:and:opt \XINT:newexpr:one:and:opt
+ \let\XINT:expr:one:or:two \XINT:newexpr:one:or:two
+ \let\XINT:iiexpr:one:or:two \XINT:newiiexpr:one:or:two
+ \let\XINT:expr:two:to:two \XINT:newexpr:two:to:two
+ \let\XINT:expr:two:to:one \XINT:newexpr:two:to:one
+ \let\XINT:flexpr:two:to:one \XINT:newflexpr:two:to:one
+ \let\XINT:expr:two:to:one \XINT:newexpr:two:to:one
+ \let\XINT:flexpr:two:to:two \XINT:newflexpr:two:to:two
+ \let\XINT:flexpr:two:to:one \XINT:newflexpr:two:to:one
+ \let\xintifNotZero: \xintifNotZeroNE:
+ \let\xintifSgn: \xintifSgnNE:
+ \let\xintSeqNumeric::csv \xintSeq::csv
+ \let\xintiiSeqNumeric::csv \xintiiSeq::csv
+ \let\XINTinFloatSeqNumeric::csv \XINTinFloatSeq::csv
+ \let\xintSeqBNumeric::csv \xintSeqB::csv
+ \let\xintiiSeqBNumeric::csv \xintiiSeqB::csv
+ \let\XINTinFloatSeqBNumeric::csv\XINTinFloatSeqB::csv
+ \def\xintSeq::csv
+ {\XINT:NE:two_\xintSeqNumeric::csv{$noexpand$xintSeq::csv}}%
+ \def\xintiiSeq::csv
+ {\XINT:NE:two_\xintiiSeqNumeric::csv{$noexpand$xintiiSeq::csv}}%
+ \def\XINTinFloatSeq::csv
+ {\XINT:NE:two_\XINTinFloatSeqNumeric::csv{$noexpand$XINTinFloatSeq::csv}}%
+ \def\xintSeqB::csv
+ {\XINT:NE:two_\xintSeqBNumeric::csv{$noexpand$xintSeqB:f:csv}}%
+ \def\xintiiSeqB::csv
+ {\XINT:NE:two_\xintiiSeqBNumeric::csv{$noexpand$xintiiSeqB:f:csv}}%
+ \def\XINTinFloatSeqB::csv
+ {\XINT:NE:two_\XINTinFloatSeqBNumeric::csv{$noexpand$XINTinFloatSeqB:f:csv}}%
+ \def\xintListSel:x:csv {~xintListSel:f:csv }%
+ \let\XINT:expr:userfunc \XINT:newexpr:userfunc
+ \let\XINT:expr:macrofunc\XINT:newexpr:macrofunc
}%
-\toks0
- \expandafter{\the\toks0
- \let\XINTinFloatNE\XINTinFloat
- \def\XINTinFloat [##1]##2{% not ultimately general, but got tired
- \expandafter\XINT_NEfork_one
- \romannumeral`&&@##2!{~XINTinFloat[##1]}{XINTinFloat}{}{[##1]}}%
- \let\XINTinFloatSqrtNE\XINTinFloatSqrt
- \def\XINTinFloatSqrt [##1]##2{%
- \expandafter\XINT_NEfork_one
- \romannumeral`&&@##2!{~XINTinFloatSqrt[##1]}{XINTinFloatSqrt}{}{[##1]}}%
- \let\XINTinFloatFacNE\XINTinFloatFac
- \def\XINTinFloatFac [##1]##2{%
- \expandafter\XINT_NEfork_one
- \romannumeral`&&@##2!{~XINTinFloatFac[##1]}{XINTinFloatFac}{}{[##1]}}%
-}%
-\xintFor #1 in {ANDof,ORof,XORof,iiMaxof,iiMinof,iiSum,iiPrd,
- GCDof,LCMof,Sum,Prd,Maxof,Minof,
- Reverse:f,FirstItem:f,LastItem:f}\do
-{\toks0
- \expandafter{\the\toks0\expandafter\def\csname xint#1:csv\endcsname {~xint#1:csv}}%
-}%
-\xintFor #1 in
- {XINTinFloatMaxof,XINTinFloatMinof,XINTinFloatSum,XINTinFloatPrd}\do
-{\toks0
- \expandafter{\the\toks0\expandafter\def\csname #1:csv\endcsname {~#1:csv}}%
-}%
-\toks0 \expandafter{\the\toks0
- \def\xintListSel:x:csv {~xintListSel:f:csv }%
-}%
-\odef\XINT_expr_redefinemacros {\the\toks0}%
\def\XINT_expr_redefineprints
{%
\def\XINT_flexpr_noopt
@@ -2735,56 +2923,58 @@
\def\XINT_expr_unlock_sp ##1.;##2##3.=##4!%
{\if -##2\expandafter\xint_firstoftwo\else\expandafter\xint_secondoftwo\fi
\XINTdigits{{##2##3}}{##4}}%
- \def\XINT_expr_print ##1{\expandafter\xintSPRaw::csv\expandafter
- {\romannumeral`&&@\XINT_expr_unlock ##1}}%
- \def\XINT_iiexpr_print ##1{\expandafter\xintCSV::csv\expandafter
- {\romannumeral`&&@\XINT_expr_unlock ##1}}%
- \def\XINT_boolexpr_print ##1{\expandafter\xintIsTrue::csv\expandafter
- {\romannumeral`&&@\XINT_expr_unlock ##1}}%
+ \def\XINT_expr_print ##1%
+ {\expandafter\xintSPRaw::csv\expandafter
+ {\romannumeral`&&@\XINT_expr_unlock ##1}}%
+ \def\XINT_iiexpr_print ##1%
+ {\expandafter\xintCSV::csv\expandafter
+ {\romannumeral`&&@\XINT_expr_unlock ##1}}%
+ \def\XINT_boolexpr_print ##1%
+ {\expandafter\xintIsTrue::csv\expandafter
+ {\romannumeral`&&@\XINT_expr_unlock ##1}}%
\def\xintCSV::csv {~xintCSV::csv }%
\def\xintSPRaw::csv {~xintSPRaw::csv }%
\def\xintPFloat::csv {~xintPFloat::csv }%
\def\xintIsTrue::csv {~xintIsTrue::csv }%
\def\xintRound::csv {~xintRound::csv }%
}%
-\toks0 {}%
-\def\xintNewExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xint_firstofone
+\def\xintNewExpr {\XINT_NewExpr\XINT_expr_redefineprints\xint_firstofone
\xinttheexpr\XINT_newexpr_clean}%
-\def\xintNewFloatExpr{\XINT_NewExpr{}\XINT_expr_redefineprints\xint_firstofone
+\def\xintNewFloatExpr{\XINT_NewExpr\XINT_expr_redefineprints\xint_firstofone
\xintthefloatexpr\XINT_newexpr_clean}%
-\def\xintNewIExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xint_firstofone
+\def\xintNewIExpr {\XINT_NewExpr\XINT_expr_redefineprints\xint_firstofone
\xinttheiexpr\XINT_newexpr_clean}%
-\def\xintNewIIExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xint_firstofone
+\def\xintNewIIExpr {\XINT_NewExpr\XINT_expr_redefineprints\xint_firstofone
\xinttheiiexpr\XINT_newexpr_clean}%
-\def\xintNewBoolExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xint_firstofone
+\def\xintNewBoolExpr {\XINT_NewExpr\XINT_expr_redefineprints\xint_firstofone
\xinttheboolexpr\XINT_newexpr_clean}%
\def\XINT_newexpr_clean #1>{\noexpand\romannumeral`&&@}%
\def\XINT_NewFunc
- {\XINT_NewExpr,{}\xint_gobble_i\xintthebareeval \XINT_newfunc_clean }%
+ {\XINT_NewExpr{}\xint_gobble_i\xintthebareeval\XINT_newfunc_clean}%
\def\XINT_NewFloatFunc
- {\XINT_NewExpr,{}\xint_gobble_i\xintthebarefloateval\XINT_newfunc_clean }%
+ {\XINT_NewExpr{}\xint_gobble_i\xintthebarefloateval\XINT_newfunc_clean}%
\def\XINT_NewIIFunc
- {\XINT_NewExpr,{}\xint_gobble_i\xintthebareiieval \XINT_newfunc_clean }%
+ {\XINT_NewExpr{}\xint_gobble_i\xintthebareiieval\XINT_newfunc_clean}%
\def\XINT_newfunc_clean #1>{}%
-\def\XINT_NewExpr #1#2#3#4#5#6#7[#8]%
+\def\XINT_NewExpr #1#2#3#4#5#6[#7]%
{%
\begingroup
- \ifcase #8\relax
- \toks0 {\endgroup\def#6}%
- \or \toks0 {\endgroup\def#6##1#1}%
- \or \toks0 {\endgroup\def#6##1#1##2#1}%
- \or \toks0 {\endgroup\def#6##1#1##2#1##3#1}%
- \or \toks0 {\endgroup\def#6##1#1##2#1##3#1##4#1}%
- \or \toks0 {\endgroup\def#6##1#1##2#1##3#1##4#1##5#1}%
- \or \toks0 {\endgroup\def#6##1#1##2#1##3#1##4#1##5#1##6#1}%
- \or \toks0 {\endgroup\def#6##1#1##2#1##3#1##4#1##5#1##6#1##7#1}%
- \or \toks0 {\endgroup\def#6##1#1##2#1##3#1##4#1##5#1##6#1##7#1##8#1}%
- \or \toks0 {\endgroup\def#6##1#1##2#1##3#1##4#1##5#1##6#1##7#1##8#1##9#1}%
+ \ifcase #7\relax
+ \toks0 {\endgroup\def#5}%
+ \or \toks0 {\endgroup\def#5##1}%
+ \or \toks0 {\endgroup\def#5##1##2}%
+ \or \toks0 {\endgroup\def#5##1##2##3}%
+ \or \toks0 {\endgroup\def#5##1##2##3##4}%
+ \or \toks0 {\endgroup\def#5##1##2##3##4##5}%
+ \or \toks0 {\endgroup\def#5##1##2##3##4##5##6}%
+ \or \toks0 {\endgroup\def#5##1##2##3##4##5##6##7}%
+ \or \toks0 {\endgroup\def#5##1##2##3##4##5##6##7##8}%
+ \or \toks0 {\endgroup\def#5##1##2##3##4##5##6##7##8##9}%
\fi
\xintexprSafeCatcodes
\XINT_expr_redefinemacros
- #2%
- \XINT_NewExpr_a #3#4#5#6%
+ #1%
+ \XINT_NewExpr_a #2#3#4#5%
}%
\catcode`~ 13 \catcode`@ 14 \catcode`\% 6 \catcode`# 12 \catcode`$ 11 @ $
\def\XINT_NewExpr_a %1%2%3%4%5@
@@ -2795,13 +2985,14 @@
\catcode`# 12 \catcode`~ 13 \escapechar 126
\endlinechar -1 \everyeof {\noexpand }@
\edef\XINT_tmpb
- {\scantokens\expandafter
- {\romannumeral`&&@\expandafter%2\XINT_tmpa {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}\relax}@
+ {\scantokens\expandafter{\romannumeral`&&@\expandafter
+ %2\XINT_tmpa{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}\relax}@
}@
\escapechar 92 \catcode`# 6 \catcode`$ 0 @ $
\edef\XINT_tmpa %%1%%2%%3%%4%%5%%6%%7%%8%%9@
- {\scantokens\expandafter{\expandafter%3\meaning\XINT_tmpb}}@
- \the\toks0\expandafter{\XINT_tmpa{%%1}{%%2}{%%3}{%%4}{%%5}{%%6}{%%7}{%%8}{%%9}}@
+ {\scantokens\expandafter{\expandafter%3\meaning\XINT_tmpb}}@
+ \the\toks0\expandafter
+ {\XINT_tmpa{%%1}{%%2}{%%3}{%%4}{%%5}{%%6}{%%7}{%%8}{%%9}}@
%1{\ifxintverbose
\xintMessage{xintexpr}{Info}@
{\string%4\space now with meaning \meaning%4}@
@@ -2834,6 +3025,7 @@
\catcode45=\the\catcode45 % -
\catcode44=\the\catcode44 % ,
\catcode61=\the\catcode61 % =
+ \catcode96=\the\catcode96 % `
\catcode32=\the\catcode32\relax % space
}%
\catcode59=12 % ;
@@ -2858,6 +3050,7 @@
\catcode45=12 % -
\catcode44=12 % ,
\catcode61=12 % =
+ \catcode96=12 % `
\catcode32=10 % space
}%
\let\XINT_tmpa\relax \let\XINT_tmpb\relax \let\XINT_tmpc\relax
diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
index e7181fc048a..8a5fec10550 100644
--- a/Master/texmf-dist/tex/generic/xint/xintfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xintfrac: Expandable operations on fractions
%% ---------------------------------------------------------------
@@ -39,6 +39,7 @@
\let\z\endgroup
\expandafter\let\expandafter\x\csname ver@xintfrac.sty\endcsname
\expandafter\let\expandafter\w\csname ver@xint.sty\endcsname
+ \expandafter\let\expandafter\ww\csname ver@xintgcd.sty\endcsname
\expandafter
\ifx\csname PackageInfo\endcsname\relax
\def\y#1#2{\immediate\write-1{Package #1 Info: #2.}}%
@@ -52,14 +53,18 @@
\else
\ifx\x\relax % plain-TeX, first loading of xintfrac.sty
\ifx\w\relax % but xint.sty not yet loaded.
- \def\z{\endgroup\input xint.sty\relax}%
+ \def\z{\endgroup\input xint.sty\relax\input xintgcd.sty\relax}%
\fi
\else
\def\empty {}%
\ifx\x\empty % LaTeX, first loading,
% variable is initialized, but \ProvidesPackage not yet seen
\ifx\w\relax % xint.sty not yet loaded.
- \def\z{\endgroup\RequirePackage{xint}}%
+ \def\z{\endgroup\RequirePackage{xint}\RequirePackage{xintgcd}}%
+ \else
+ \ifx\ww\relax
+ \def\z{\endgroup\RequirePackage{xintgcd}}%
+ \fi
\fi
\else
\aftergroup\endinput % xintfrac already loaded.
@@ -70,31 +75,119 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintfrac}%
- [2018/02/06 1.2q Expandable operations on fractions (JFB)]%
-\def\xintSgn {\romannumeral0\xintsgn }% deprecated from xintcore
-\def\xintCmp {\romannumeral0\xintcmp }% deprecated from xintcore
-\def\xintEq {\romannumeral0\xinteq }% deprecated from xint
-\def\xintNeq #1#2% renamed into \xintNotEq
- {\romannumeral0\XINT_signaldeprecated{xintfrac}{xintNeq}\xintifeq {#1}{#2}{0}{1}}%
-\def\xintNotEq #1#2{\romannumeral0\xintifeq {#1}{#2}{0}{1}}%
-\def\xintGt {\romannumeral0\xintgt }%
+ [2018/03/01 1.3 Expandable operations on fractions (JFB)]%
+\def\xintEq {\romannumeral0\xinteq }%
+\def\xinteq #1#2{\xintifeq{#1}{#2}{1}{0}}%
+\def\xintNotEq#1#2{\romannumeral0\xintifeq {#1}{#2}{0}{1}}%
+\def\xintGt {\romannumeral0\xintgt }%
+\def\xintgt #1#2{\xintifgt{#1}{#2}{1}{0}}%
\def\xintLt {\romannumeral0\xintlt }%
+\def\xintlt #1#2{\xintiflt{#1}{#2}{1}{0}}%
\def\xintGtorEq #1#2{\romannumeral0\xintiflt {#1}{#2}{0}{1}}%
\def\xintLtorEq #1#2{\romannumeral0\xintifgt {#1}{#2}{0}{1}}%
\def\xintIsZero {\romannumeral0\xintiszero }%
+\def\xintiszero #1{\if0\xintSgn{#1}\xint_afterfi{ 1}\else\xint_afterfi{ 0}\fi}%
\def\xintIsNotZero{\romannumeral0\xintisnotzero }%
+\def\xintisnotzero
+ #1{\if0\xintSgn{#1}\xint_afterfi{ 0}\else\xint_afterfi{ 1}\fi}%
\def\xintIsOne {\romannumeral0\xintisone }%
+\def\xintisone #1{\expandafter\XINT_isone\romannumeral0\xintnum{#1}XY}%
\def\xintOdd {\romannumeral0\xintodd }%
+\def\xintodd #1%
+{%
+ \ifodd\xintLDg{\xintNum{#1}} %<- intentional space
+ \xint_afterfi{ 1}%
+ \else
+ \xint_afterfi{ 0}%
+ \fi
+}%
\def\xintEven {\romannumeral0\xinteven }%
+\def\xinteven #1%
+{%
+ \ifodd\xintLDg{\xintNum{#1}} %<- intentional space
+ \xint_afterfi{ 0}%
+ \else
+ \xint_afterfi{ 1}%
+ \fi
+}%
\def\xintifSgn{\romannumeral0\xintifsgn }%
+\def\xintifsgn #1%
+{%
+ \ifcase \xintSgn{#1}
+ \expandafter\xint_secondofthree_thenstop
+ \or\expandafter\xint_thirdofthree_thenstop
+ \else\expandafter\xint_firstofthree_thenstop
+ \fi
+}%
\def\xintifCmp{\romannumeral0\xintifcmp }%
+\def\xintifcmp #1#2%
+{%
+ \ifcase\xintCmp {#1}{#2}
+ \expandafter\xint_secondofthree_thenstop
+ \or\expandafter\xint_thirdofthree_thenstop
+ \else\expandafter\xint_firstofthree_thenstop
+ \fi
+}%
\def\xintifEq {\romannumeral0\xintifeq }%
+\def\xintifeq #1#2%
+{%
+ \if0\xintCmp{#1}{#2}%
+ \expandafter\xint_firstoftwo_thenstop
+ \else\expandafter\xint_secondoftwo_thenstop
+ \fi
+}%
\def\xintifGt {\romannumeral0\xintifgt }%
+\def\xintifgt #1#2%
+{%
+ \if1\xintCmp{#1}{#2}%
+ \expandafter\xint_firstoftwo_thenstop
+ \else\expandafter\xint_secondoftwo_thenstop
+ \fi
+}%
\def\xintifLt {\romannumeral0\xintiflt }%
+\def\xintiflt #1#2%
+{%
+ \ifnum\xintCmp{#1}{#2}<\xint_c_
+ \expandafter\xint_firstoftwo_thenstop
+ \else \expandafter\xint_secondoftwo_thenstop
+ \fi
+}%
\def\xintifZero {\romannumeral0\xintifzero }%
+\def\xintifzero #1%
+{%
+ \if0\xintSgn{#1}%
+ \expandafter\xint_firstoftwo_thenstop
+ \else
+ \expandafter\xint_secondoftwo_thenstop
+ \fi
+}%
\def\xintifNotZero{\romannumeral0\xintifnotzero }%
+\def\xintifnotzero #1%
+{%
+ \if0\xintSgn{#1}%
+ \expandafter\xint_secondoftwo_thenstop
+ \else
+ \expandafter\xint_firstoftwo_thenstop
+ \fi
+}%
\def\xintifOne {\romannumeral0\xintifone }%
+\def\xintifone #1%
+{%
+ \if1\xintIsOne{#1}%
+ \expandafter\xint_firstoftwo_thenstop
+ \else
+ \expandafter\xint_secondoftwo_thenstop
+ \fi
+}%
\def\xintifOdd {\romannumeral0\xintifodd }%
+\def\xintifodd #1%
+{%
+ \if\xintOdd{#1}1%
+ \expandafter\xint_firstoftwo_thenstop
+ \else
+ \expandafter\xint_secondoftwo_thenstop
+ \fi
+}%
\def\XINT_cntSgnFork #1%
{%
\ifcase #1\expandafter\xint_secondofthree
@@ -412,6 +505,24 @@
\def\XINT_rawz_Ba -#1.#2#3{\expandafter\XINT_rawz_Bb
\expandafter{\romannumeral0\XINT_dsx_addzeros{#1}#3;}{#2}}%
\def\XINT_rawz_Bb #1#2{ #2/#1}%
+\def\xintDecToString{\romannumeral0\xintdectostring}%
+\def\xintdectostring#1{\expandafter\XINT_dectostr\romannumeral0\xintraw{#1}}%
+\def\XINT_dectostr #1/#2[#3]{\xintiiifZero {#1}%
+ \XINT_dectostr_z
+ {\if1\XINT_isOne{#2}\expandafter\XINT_dectostr_a
+ \else\expandafter\XINT_dectostr_b
+ \fi}%
+ #1/#2[#3]%
+}%
+\def\XINT_dectostr_z#1[#2]{ 0}%
+\def\XINT_dectostr_a#1/#2[#3]{%
+ \ifnum#3<\xint_c_\xint_dothis{\xinttrunc{-#3}{#1[#3]}}\fi
+ \xint_orthat{\xintiie{#1}{#3}}%
+}%
+\def\XINT_dectostr_b#1/#2[#3]{% just to handle this somehow
+ \ifnum#3<\xint_c_\xint_dothis{\xinttrunc{-#3}{#1[#3]}/#2}\fi
+ \xint_orthat{\xintiie{#1}{#3}/#2}%
+}%
\def\xintFloor {\romannumeral0\xintfloor }%
\def\xintfloor #1% devrais-je faire \xintREZ?
{\expandafter\XINT_ifloor \romannumeral0\xintrawwithzeros {#1}./1[0]}%
@@ -599,10 +710,15 @@
}%
\def\XINT_e_end #1.#2#3{ #2/#3[#1]}%
\def\xintIrr {\romannumeral0\xintirr }%
+\def\xintPIrr{\romannumeral0\xintpirr }%
\def\xintirr #1%
{%
\expandafter\XINT_irr_start\romannumeral0\xintrawwithzeros {#1}\Z
}%
+\def\xintpirr #1%
+{%
+ \expandafter\XINT_pirr_start\romannumeral0\xintraw{#1}%
+}%
\def\XINT_irr_start #1#2/#3\Z
{%
\if0\XINT_isOne {#3}%
@@ -616,6 +732,19 @@
\fi
#2\Z {#3}%
}%
+\def\XINT_pirr_start #1#2/#3[%
+{%
+ \if0\XINT_isOne {#3}%
+ \xint_afterfi
+ {\xint_UDsignfork
+ #1\XINT_irr_negative
+ -{\XINT_irr_nonneg #1}%
+ \krof}%
+ \else
+ \xint_afterfi{\XINT_irr_denomisone #1}%
+ \fi
+ #2\Z {#3}[%
+}%
\def\XINT_irr_denomisone #1\Z #2{ #1/1}% changed in 1.08
\def\XINT_irr_negative #1\Z #2{\XINT_irr_D #1\Z #2\Z -}%
\def\XINT_irr_nonneg #1\Z #2{\XINT_irr_D #1\Z #2\Z \space}%
@@ -1201,65 +1330,40 @@
{\romannumeral0\XINT_dsx_addzeros {#1}#4;}%
{#5}{#7}{#6}[#3]%
}%
+\def\XINT_fadd_iszero #1[#2]{ 0/1[0]}% ou [#2] originel?
\def\XINT_fadd_C #1#2#3%
{%
- \ifcase\romannumeral0\xintiicmp {#2}{#3} %<- intentional space here.
- \expandafter\XINT_fadd_eq
- \or\expandafter\XINT_fadd_D
- \else\expandafter\XINT_fadd_Da
- \fi {#2}{#3}{#1}%
-}%
-\def\XINT_fadd_eq #1#2#3#4%#5%
-{%
- \expandafter\XINT_fadd_G
- \romannumeral0\xintiiadd {#3}{#4}/#1%[#5]%
-}%
-\def\XINT_fadd_D #1#2%
-{%
- \expandafter\XINT_fadd_E\romannumeral0\XINT_div_prepare {#2}{#1}{#1}{#2}%
+ \expandafter\XINT_fadd_D_b
+ \romannumeral0\XINT_div_prepare{#2}{#3}{#2}{#2}{#3}{#1}%
}%
-\def\XINT_fadd_E #1#2%
+\def\XINT_fadd_D_a #1#2%
{%
- \if0\XINT_Sgn #2\xint:
- \expandafter\XINT_fadd_F
- \else\expandafter\XINT_fadd_K
- \fi {#1}%
+ \expandafter\XINT_fadd_D_b
+ \romannumeral0\XINT_div_prepare {#1}{#2}{#1}%
}%
-\def\XINT_fadd_F #1#2#3#4#5%#6%
+\def\XINT_fadd_D_b #1#2{\XINT_fadd_D_c #2\Z}%
+\def\XINT_fadd_D_c #1#2\Z
{%
- \expandafter\XINT_fadd_G
- \romannumeral0\xintiiadd {\xintiiMul {#5}{#1}}{#4}/#2%[#6]%
+ \xint_gob_til_zero #1\XINT_fadd_D_exit0\XINT_fadd_D_a {#1#2}%
}%
-\def\XINT_fadd_Da #1#2%
+\def\XINT_fadd_D_exit0\XINT_fadd_D_a #1#2#3%
{%
- \expandafter\XINT_fadd_Ea\romannumeral0\XINT_div_prepare {#1}{#2}{#1}{#2}%
+ \expandafter\XINT_fadd_E
+ \romannumeral0\xintiiquo {#3}{#2}.{#2}%
}%
-\def\XINT_fadd_Ea #1#2%
+\def\XINT_fadd_E #1.#2#3%
{%
- \if0\XINT_Sgn #2\xint:
- \expandafter\XINT_fadd_Fa
- \else\expandafter\XINT_fadd_K
- \fi {#1}%
+ \expandafter\XINT_fadd_F
+ \romannumeral0\xintiimul{#1}{#3}.{\xintiiQuo{#3}{#2}}{#1}%
}%
-\def\XINT_fadd_Fa #1#2#3#4#5%#6%
+\def\XINT_fadd_F #1.#2#3#4#5%
{%
- \expandafter\XINT_fadd_G
- \romannumeral0\xintiiadd {\xintiiMul {#4}{#1}}{#5}/#3%[#6]%
+ \expandafter\XINT_fadd_G
+ \romannumeral0\xintiiadd{\xintiiMul{#2}{#4}}{\xintiiMul{#3}{#5}}/#1%
}%
\def\XINT_fadd_G #1{%
\def\XINT_fadd_G ##1{\if0##1\expandafter\XINT_fadd_iszero\fi#1##1}%
}\XINT_fadd_G{ }%
-\def\XINT_fadd_K #1#2#3#4#5%
-{%
- \expandafter\XINT_fadd_L
- \romannumeral0\xintiiadd {\xintiiMul {#2}{#5}}{\xintiiMul {#3}{#4}}.%
- {{#2}{#3}}%
-}%
-\def\XINT_fadd_L #1{\if0#1\expandafter\XINT_fadd_iszero\fi\XINT_fadd_M #1}%
-\def\XINT_fadd_M #1.#2{\expandafter\XINT_fadd_N \expandafter
- {\romannumeral0\xintiimul #2}{#1}}%
-\def\XINT_fadd_N #1#2{ #2/#1}%
-\def\XINT_fadd_iszero #1[#2]{ 0/1[0]}% ou [#2] originel?
\def\xintSub {\romannumeral0\xintsub }%
\def\xintsub #1{\expandafter\XINT_fsub\romannumeral0\xintraw {#1}}%
\def\XINT_fsub #1{\xint_gob_til_zero #1\XINT_fsub_Azero 0\XINT_fsub_a #1}%
@@ -1361,14 +1465,8 @@
\expandafter\XINT_fpow_pos_B\expandafter {#3}{#1}{#2}%
}%
\def\XINT_fpow_pos_B #1#2{\XINT_outfrac {#2}{#1}}%
-\def\xintifac #1{\expandafter\XINT_fac_fork\the\numexpr\xintNum{#1}.}%
\def\xintFac {\romannumeral0\xintfac}%
\def\xintfac #1{\expandafter\XINT_fac_fork\the\numexpr\xintNum{#1}.[0]}%
-\def\xintibinomial #1#2%
-{%
- \expandafter\XINT_binom_pre
- \the\numexpr\xintNum{#1}\expandafter.\the\numexpr\xintNum{#2}.%
-}%
\def\xintBinomial {\romannumeral0\xintbinomial}%
\def\xintbinomial #1#2%
{%
@@ -1461,10 +1559,10 @@
\def\XINT_modtrunc_pos #1#2/#3[#4]#5/#6[#7].%
{%
\expandafter\XINT_modtrunc_pos_a
- \the\numexpr\ifnum#7>#4 #4\else #7\fi\expandafter.\expandafter
- {\romannumeral0\xintiimul {#6}{#3}}%
- {\xintiiE{\xintiiMul {#1#5}{#3}}{#7-#4}}%
- {\xintiiE{\xintiiMul {#2}{#6}}{#4-#7}}%
+ \the\numexpr\ifnum#7>#4 #4\else #7\fi\expandafter.%
+ \romannumeral0\expandafter\XINT_mod_D_b
+ \romannumeral0\XINT_div_prepare{#3}{#6}{#3}{#3}{#6}%
+ {#1#5}{#7-#4}{#2}{#4-#7}%
}%
\def\XINT_modtrunc_pos_a #1.#2#3#4{\xintiirem {#3}{#4}/#2[#1]}%
\def\xintDivMod {\romannumeral0\xintdivmod }%
@@ -1500,10 +1598,10 @@
\def\XINT_divmod_bpos #1#2/#3[#4]#5/#6[#7].%
{%
\expandafter\XINT_divmod_bpos_a
- \the\numexpr\ifnum#7>#4 #4\else #7\fi\expandafter.\expandafter
- {\romannumeral0\xintiimul {#6}{#3}}%
- {\xintiiE{\xintiiMul {#1#5}{#3}}{#7-#4}}%
- {\xintiiE{\xintiiMul {#2}{#6}}{#4-#7}}%
+ \the\numexpr\ifnum#7>#4 #4\else #7\fi\expandafter.%
+ \romannumeral0\expandafter\XINT_mod_D_b
+ \romannumeral0\XINT_div_prepare{#3}{#6}{#3}{#3}{#6}%
+ {#1#5}{#7-#4}{#2}{#4-#7}%
}%
\def\XINT_divmod_bpos_a #1.#2#3#4%
{%
@@ -1534,10 +1632,35 @@
\def\XINT_mod_bpos #1#2/#3[#4]#5/#6[#7].%
{%
\expandafter\XINT_mod_bpos_a
- \the\numexpr\ifnum#7>#4 #4\else #7\fi\expandafter.\expandafter
- {\romannumeral0\xintiimul {#6}{#3}}%
- {\xintiiE{\xintiiMul {#1#5}{#3}}{#7-#4}}%
- {\xintiiE{\xintiiMul {#2}{#6}}{#4-#7}}%
+ \the\numexpr\ifnum#7>#4 #4\else #7\fi\expandafter.%
+ \romannumeral0\expandafter\XINT_mod_D_b
+ \romannumeral0\XINT_div_prepare{#3}{#6}{#3}{#3}{#6}%
+ {#1#5}{#7-#4}{#2}{#4-#7}%
+}%
+\def\XINT_mod_D_a #1#2%
+{%
+ \expandafter\XINT_mod_D_b
+ \romannumeral0\XINT_div_prepare {#1}{#2}{#1}%
+}%
+\def\XINT_mod_D_b #1#2{\XINT_mod_D_c #2\Z}%
+\def\XINT_mod_D_c #1#2\Z
+{%
+ \xint_gob_til_zero #1\XINT_mod_D_exit0\XINT_mod_D_a {#1#2}%
+}%
+\def\XINT_mod_D_exit0\XINT_mod_D_a #1#2#3%
+{%
+ \expandafter\XINT_mod_E
+ \romannumeral0\xintiiquo {#3}{#2}.{#2}%
+}%
+\def\XINT_mod_E #1.#2#3%
+{%
+ \expandafter\XINT_mod_F
+ \romannumeral0\xintiimul{#1}{#3}.{\xintiiQuo{#3}{#2}}{#1}%
+}%
+\def\XINT_mod_F #1.#2#3#4#5#6#7%
+{%
+ {#1}{\xintiiE{\xintiiMul{#4}{#3}}{#5}}%
+ {\xintiiE{\xintiiMul{#6}{#2}}{#7}}%
}%
\def\XINT_mod_bpos_a #1.#2#3#4{\xintiirem {#3}{#4}/#2[#1]}%
\def\xintIsOne {\romannumeral0\xintisone }%
@@ -3160,7 +3283,7 @@
{Usage of deprecated macros!}
{This deprecated macro from xintfrac.sty has been detected:\MessageBreak
\string\xintNeq\space(use \string\xintNotEq\space or xint's \string\xintiiNotEq!)\MessageBreak
-It will get removed at some future release.}}%
+This is impossible as it has been removed at 1.3!}}%
{% no deprecated macro used (at top level...)
}%
}\fi\fi
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
index fcfa6fba87e..d9afbfbdaff 100644
--- a/Master/texmf-dist/tex/generic/xint/xintgcd.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xintgcd: Euclidean algorithm with xint package
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintgcd}%
- [2018/02/06 1.2q Euclide algorithm with xint package (JFB)]%
+ [2018/03/01 1.3 Euclide algorithm with xint package (JFB)]%
\def\xintGCD {\romannumeral0\xintgcd }%
\def\xintgcd #1#2{\xintiigcd {\xintNum{#1}}{\xintNum{#2}}}%
\def\xintiiGCD {\romannumeral0\xintiigcd }%
diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
index 3be64a42b94..480de731557 100644
--- a/Master/texmf-dist/tex/generic/xint/xintkernel.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xintkernel: Paraphernalia for the xint packages
%% ---------------------------------------------------------------
@@ -156,7 +156,7 @@
\fi
\XINT_providespackage
\ProvidesPackage {xintkernel}%
- [2018/02/06 1.2q Paraphernalia for the xint packages (JFB)]%
+ [2018/03/01 1.3 Paraphernalia for the xint packages (JFB)]%
\chardef\xint_c_ 0
\chardef\xint_c_i 1
\chardef\xint_c_ii 2
diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty
index b03cffb5867..f6b41030087 100644
--- a/Master/texmf-dist/tex/generic/xint/xintseries.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintseries.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xintseries: Expandable partial sums with xint package
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintseries}%
- [2018/02/06 1.2q Expandable partial sums with xint package (JFB)]%
+ [2018/03/01 1.3 Expandable partial sums with xint package (JFB)]%
\def\xintSeries {\romannumeral0\xintseries }%
\def\xintseries #1#2%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xinttools.sty b/Master/texmf-dist/tex/generic/xint/xinttools.sty
index e5b071b107c..3909f0a056a 100644
--- a/Master/texmf-dist/tex/generic/xint/xinttools.sty
+++ b/Master/texmf-dist/tex/generic/xint/xinttools.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2q 2018/02/06
+%% The xint bundle 1.3 2018/03/01
%% Copyright (C) 2013-2018 by Jean-Francois Burnol
%% xinttools: Expandable and non-expandable utilities
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xinttools}%
- [2018/02/06 1.2q Expandable and non-expandable utilities (JFB)]%
+ [2018/03/01 1.3 Expandable and non-expandable utilities (JFB)]%
\newtoks\XINT_toks
\xint_firstofone{\let\XINT_sptoken= } %<- space here!
\def\xintgodef {\global\xintodef }%