diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-06 22:02:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-06 22:02:47 +0000 |
commit | 3354abdc519630ad9975bfce46bada2882fcd6af (patch) | |
tree | f803a9bf96bd1c8eb2b618218f06fb20306bf387 /Master/texmf-dist/tex | |
parent | bee0d2fefd913952b342b909a4a278ce72712e51 (diff) |
xint (6jan19)
git-svn-id: svn://tug.org/texlive/trunk@49617 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xint.sty | 145 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintbinhex.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintcfrac.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintcore.sty | 24 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintexpr.sty | 156 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintfrac.sty | 86 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintgcd.sty | 78 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintkernel.sty | 16 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintseries.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xinttools.sty | 18 |
10 files changed, 357 insertions, 184 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty index 8e8e9405307..f8413488235 100644 --- a/Master/texmf-dist/tex/generic/xint/xint.sty +++ b/Master/texmf-dist/tex/generic/xint/xint.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xint: Expandable operations on big integers %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,13 +70,13 @@ \XINTsetupcatcodes% defined in xintkernel.sty (loaded by xintcore.sty) \XINT_providespackage \ProvidesPackage{xint}% - [2018/06/17 1.3c Expandable operations on big integers (JFB)]% + [2019/01/06 1.3d 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}% -\long\def\xint_firstofthree_thenstop #1#2#3{ #1}% 1.09i -\long\def\xint_secondofthree_thenstop #1#2#3{ #2}% -\long\def\xint_thirdofthree_thenstop #1#2#3{ #3}% +\long\def\xint_stop_atfirstofthree #1#2#3{ #1}% +\long\def\xint_stop_atsecondofthree #1#2#3{ #2}% +\long\def\xint_stop_atthirdofthree #1#2#3{ #3}% \ifdefined\xint_texuniformdeviate \unless\ifdefined\xint_c_nine_x^viii \csname newcount\endcsname\xint_c_nine_x^viii @@ -255,7 +255,7 @@ \def\XINT_dshr_xzeroorneg #1;{ 0}% \def\XINT_dshr_xpositive {% - \expandafter\xint_secondoftwo_thenstop\romannumeral0\XINT_dsx_xisPos + \expandafter\xint_stop_atsecondoftwo\romannumeral0\XINT_dsx_xisPos }% \def\xintDSH {\romannumeral0\xintdsh }% \def\xintdsh #1#2% @@ -273,7 +273,7 @@ \def\XINT_dsh_xiszero #1.#2;{ #2}% \def\XINT_dsh_xisPos {% - \expandafter\xint_firstoftwo_thenstop\romannumeral0\XINT_dsx_xisPos + \expandafter\xint_stop_atfirstoftwo\romannumeral0\XINT_dsx_xisPos }% \def\xintDSx {\romannumeral0\xintdsx }% \def\xintdsx #1#2% @@ -442,87 +442,87 @@ \def\xintSgnFork {\romannumeral0\xintsgnfork }% \def\xintsgnfork #1% {% - \ifcase #1 \expandafter\xint_secondofthree_thenstop - \or\expandafter\xint_thirdofthree_thenstop - \else\expandafter\xint_firstofthree_thenstop + \ifcase #1 \expandafter\xint_stop_atsecondofthree + \or\expandafter\xint_stop_atthirdofthree + \else\expandafter\xint_stop_atfirstofthree \fi }% \def\xintiiifSgn {\romannumeral0\xintiiifsgn }% \def\xintiiifsgn #1% {% \ifcase \xintiiSgn{#1} - \expandafter\xint_secondofthree_thenstop - \or\expandafter\xint_thirdofthree_thenstop - \else\expandafter\xint_firstofthree_thenstop + \expandafter\xint_stop_atsecondofthree + \or\expandafter\xint_stop_atthirdofthree + \else\expandafter\xint_stop_atfirstofthree \fi }% \def\xintiiifCmp {\romannumeral0\xintiiifcmp }% \def\xintiiifcmp #1#2% {% \ifcase\xintiiCmp {#1}{#2} - \expandafter\xint_secondofthree_thenstop - \or\expandafter\xint_thirdofthree_thenstop - \else\expandafter\xint_firstofthree_thenstop + \expandafter\xint_stop_atsecondofthree + \or\expandafter\xint_stop_atthirdofthree + \else\expandafter\xint_stop_atfirstofthree \fi }% \def\xintiiifEq {\romannumeral0\xintiiifeq }% \def\xintiiifeq #1#2% {% \if0\xintiiCmp{#1}{#2}% - \expandafter\xint_firstoftwo_thenstop - \else\expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo + \else\expandafter\xint_stop_atsecondoftwo \fi }% \def\xintiiifGt {\romannumeral0\xintiiifgt }% \def\xintiiifgt #1#2% {% \if1\xintiiCmp{#1}{#2}% - \expandafter\xint_firstoftwo_thenstop - \else\expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo + \else\expandafter\xint_stop_atsecondoftwo \fi }% \def\xintiiifLt {\romannumeral0\xintiiiflt }% \def\xintiiiflt #1#2% {% \ifnum\xintiiCmp{#1}{#2}<\xint_c_ - \expandafter\xint_firstoftwo_thenstop - \else \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo + \else \expandafter\xint_stop_atsecondoftwo \fi }% \def\xintiiifZero {\romannumeral0\xintiiifzero }% \def\xintiiifzero #1% {% \if0\xintiiSgn{#1}% - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \else - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \fi }% \def\xintiiifNotZero {\romannumeral0\xintiiifnotzero }% \def\xintiiifnotzero #1% {% \if0\xintiiSgn{#1}% - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \else - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \fi }% \def\xintiiifOne {\romannumeral0\xintiiifone }% \def\xintiiifone #1% {% \if1\xintiiIsOne{#1}% - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \else - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \fi }% \def\xintiiifOdd {\romannumeral0\xintiiifodd }% \def\xintiiifodd #1% {% \if\xintiiOdd{#1}1% - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \else - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \fi }% \def\xintifTrueAelseB {\romannumeral0\xintiiifnotzero}% @@ -592,17 +592,17 @@ \krof }% \krof #3#1#2\xint:#4\xint: - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \else - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \fi {#3#4}{#1#2}% }% -\def\XINT_max_zerozero #1\fi{\xint_firstoftwo_thenstop }% -\def\XINT_max_zeroplus #1\fi{\xint_secondoftwo_thenstop }% -\def\XINT_max_pluszero #1\fi{\xint_firstoftwo_thenstop }% -\def\XINT_max_minusplus #1\fi{\xint_secondoftwo_thenstop }% -\def\XINT_max_plusminus #1\fi{\xint_firstoftwo_thenstop }% +\def\XINT_max_zerozero #1\fi{\xint_stop_atfirstoftwo }% +\def\XINT_max_zeroplus #1\fi{\xint_stop_atsecondoftwo }% +\def\XINT_max_pluszero #1\fi{\xint_stop_atfirstoftwo }% +\def\XINT_max_minusplus #1\fi{\xint_stop_atsecondoftwo }% +\def\XINT_max_plusminus #1\fi{\xint_stop_atfirstoftwo }% \def\XINT_max_plusplus {% \if1\romannumeral0\XINT_geq_plusplus @@ -634,17 +634,17 @@ \krof }% \krof #3#1#2\xint:#4\xint: - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \else - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \fi {#3#4}{#1#2}% }% -\def\XINT_min_zerozero #1\fi{\xint_firstoftwo_thenstop }% -\def\XINT_min_zeroplus #1\fi{\xint_firstoftwo_thenstop }% -\def\XINT_min_pluszero #1\fi{\xint_secondoftwo_thenstop }% -\def\XINT_min_minusplus #1\fi{\xint_firstoftwo_thenstop }% -\def\XINT_min_plusminus #1\fi{\xint_secondoftwo_thenstop }% +\def\XINT_min_zerozero #1\fi{\xint_stop_atfirstoftwo }% +\def\XINT_min_zeroplus #1\fi{\xint_stop_atfirstoftwo }% +\def\XINT_min_pluszero #1\fi{\xint_stop_atsecondoftwo }% +\def\XINT_min_minusplus #1\fi{\xint_stop_atfirstoftwo }% +\def\XINT_min_plusminus #1\fi{\xint_stop_atsecondoftwo }% \def\XINT_min_plusplus {% \if1\romannumeral0\XINT_geq_plusplus @@ -1378,6 +1378,61 @@ \def\xintBool #1{\romannumeral`&&@% \csname if#1\endcsname\expandafter1\else\expandafter0\fi }% \def\xintToggle #1{\romannumeral`&&@\iftoggle{#1}{1}{0}}% +\def\xintiiGCD {\romannumeral0\xintiigcd }% +\def\xintiigcd #1{\expandafter\XINT_iigcd\romannumeral0\xintiiabs#1\xint:}% +\def\XINT_iigcd #1#2\xint:#3% +{% + \expandafter\XINT_gcd_fork\expandafter#1% + \romannumeral0\xintiiabs#3\xint:#1#2\xint: +}% +\def\XINT_gcd_fork #1#2% +{% + \xint_UDzerofork + #1\XINT_gcd_Aiszero + #2\XINT_gcd_Biszero + 0\XINT_gcd_loop + \krof + #2% +}% +\def\XINT_gcd_AisZero #1\xint:#2\xint:{ #1}% +\def\XINT_gcd_BisZero #1\xint:#2\xint:{ #2}% +\def\XINT_gcd_loop #1\xint:#2\xint: +{% + \expandafter\expandafter\expandafter\XINT_gcd_CheckRem + \expandafter\xint_secondoftwo + \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint: +}% +\def\XINT_gcd_CheckRem #1% +{% + \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop #1% +}% +\def\XINT_gcd_end0\XINT_gcd_loop #1\xint:#2\xint:{ #2}% +\def\xintiiLCM {\romannumeral0\xintiilcm}% +\def\xintiilcm #1{\expandafter\XINT_iilcm\romannumeral0\xintiiabs#1\xint:}% +\def\XINT_iilcm #1#2\xint:#3% +{% + \expandafter\XINT_lcm_fork\expandafter#1% + \romannumeral0\xintiiabs#3\xint:#1#2\xint: +}% +\def\XINT_lcm_fork #1#2% +{% + \xint_UDzerofork + #1\XINT_lcm_iszero + #2\XINT_lcm_iszero + 0\XINT_lcm_notzero + \krof + #2% +}% +\def\XINT_lcm_iszero #1\xint:#2\xint:{ 0}% +\def\XINT_lcm_notzero #1\xint:#2\xint: +{% + \expandafter\XINT_lcm_end\romannumeral0% + \expandafter\expandafter\expandafter\XINT_gcd_CheckRem + \expandafter\xint_secondoftwo + \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint: + \xint:#1\xint:#2\xint: +}% +\def\XINT_lcm_end #1\xint:#2\xint:#3\xint:{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}% \def\xintRandomDigits{\romannumeral0\xintrandomdigits}% \def\xintrandomdigits#1% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty index df427eeaa98..a1799fbc3da 100644 --- a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty +++ b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintbinhex: Expandable binary and hexadecimal conversions %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintbinhex}% - [2018/06/17 1.3c Expandable binary and hexadecimal conversions (JFB)]% + [2019/01/06 1.3d 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 195b8cae810..530d6e3db7e 100644 --- a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty +++ b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintcfrac: Expandable continued fractions with xint package %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcfrac}% - [2018/06/17 1.3c Expandable continued fractions with xint package (JFB)]% + [2019/01/06 1.3d 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 de9475ec3f9..b93057a82bd 100644 --- a/Master/texmf-dist/tex/generic/xint/xintcore.sty +++ b/Master/texmf-dist/tex/generic/xint/xintcore.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintcore: Expandable arithmetic on big integers %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcore}% - [2018/06/17 1.3c Expandable arithmetic on big integers (JFB)]% + [2019/01/06 1.3d Expandable arithmetic on big integers (JFB)]% \csname XINT_Clamped_istrapped\endcsname \csname XINT_ConversionSyntax_istrapped\endcsname \csname XINT_DivisionByZero_istrapped\endcsname @@ -104,10 +104,10 @@ \XINT_expandableerror{next: #5}% % not for X3.274 %\XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}% - \xint_firstofone_thenstop{#5}% + \xint_stop_atfirstofone{#5}% }% }% -%% \let\xintUse\xint_firstofthree_thenstop % defined in xint.sty +%% \let\xintUse\xint_stop_atfirstofthree % defined in xint.sty \def\XINT_ifFlagRaised #1{% \ifcsname XINT_#1Flag_ON\endcsname \expandafter\xint_firstoftwo @@ -1774,9 +1774,9 @@ \def\xintiiQuo {\romannumeral0\xintiiquo }% \def\xintiiRem {\romannumeral0\xintiirem }% \def\xintiiquo - {\expandafter\xint_firstoftwo_thenstop\romannumeral0\xintiidivision }% + {\expandafter\xint_stop_atfirstoftwo\romannumeral0\xintiidivision }% \def\xintiirem - {\expandafter\xint_secondoftwo_thenstop\romannumeral0\xintiidivision }% + {\expandafter\xint_stop_atsecondoftwo\romannumeral0\xintiidivision }% \def\xintiiDivRound {\romannumeral0\xintiidivround }% \def\xintiidivround #1{\expandafter\XINT_iidivround\romannumeral`&&@#1\xint:}% \def\XINT_idivround #1#2\xint:#3% @@ -1843,7 +1843,7 @@ \krof }% \def\XINT_iidivtrunc_pos #1#2\xint:#3\xint: - {\expandafter\xint_firstoftwo_thenstop + {\expandafter\xint_stop_atfirstoftwo \romannumeral0\XINT_div_prepare {#2}{#1#3}}% \def\xintiiModTrunc {\romannumeral0\xintiimodtrunc }% \def\xintiimodtrunc #1{\expandafter\XINT_iimodtrunc\romannumeral`&&@#1\xint:}% @@ -1873,7 +1873,7 @@ \krof }% \def\XINT_iimodtrunc_pos #1#2\xint:#3\xint: - {\expandafter\xint_secondoftwo_thenstop\romannumeral0\XINT_div_prepare + {\expandafter\xint_stop_atsecondoftwo\romannumeral0\XINT_div_prepare {#2}{#1#3}}% \def\xintiiDivMod {\romannumeral0\xintiidivmod }% \def\xintiidivmod #1{\expandafter\XINT_iidivmod\romannumeral`&&@#1\xint:}% @@ -1891,7 +1891,7 @@ \XINT_signalcondition{DivisionByZero}{Division by #2 of #1#3}{}% {{0}{0}}% ^^c3^^a0 revoir... }% -\def\XINT_iidivmod_aiszero #1#2\xint:#3\xint:{{0}{0}}% +\def\XINT_iidivmod_aiszero #1\xint:#2\xint:{{0}{0}}% \def\XINT_iidivmod_bneg #1% {% \expandafter\XINT_iidivmod_bneg_finish @@ -1907,10 +1907,10 @@ }% \def\XINT_iidivmod_bpos #1#2\xint:#3\xint:{\xintiidivision{#1#3}{#2}}% \def\xintiiDivFloor {\romannumeral0\xintiidivfloor}% -\def\xintiidivfloor {\expandafter\xint_firstoftwo_thenstop +\def\xintiidivfloor {\expandafter\xint_stop_atfirstoftwo \romannumeral0\xintiidivmod}% \def\xintiiMod {\romannumeral0\xintiimod}% -\def\xintiimod {\expandafter\xint_secondoftwo_thenstop +\def\xintiimod {\expandafter\xint_stop_atsecondoftwo \romannumeral0\xintiidivmod}% \def\xintiiSqr {\romannumeral0\xintiisqr }% \def\xintiisqr #1% diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty index 72a614e2692..13bbb335437 100644 --- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty +++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintexpr: Expandable expression parser %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -81,7 +81,7 @@ \XINTsetupcatcodes% \XINT_providespackage \ProvidesPackage{xintexpr}% - [2018/06/17 1.3c Expandable expression parser (JFB)]% + [2019/01/06 1.3d Expandable expression parser (JFB)]% \catcode`! 11 \let\XINT_Cmp \xintiiCmp \def\xint_gob_til_! #1!{}% ! with catcode 11 @@ -113,17 +113,28 @@ \def\XINT_expr_print #1{\xintSPRaw::csv {\XINT_expr_unlock #1}}% \def\XINT_iiexpr_print #1{\xintCSV::csv {\XINT_expr_unlock #1}}% \def\XINT_boolexpr_print #1{\xintIsTrue::csv {\XINT_expr_unlock #1}}% -\def\xintexpr {\romannumeral0\xinteval }% -\def\xintiexpr {\romannumeral0\xintieval }% -\def\xintfloatexpr {\romannumeral0\xintfloateval }% -\def\xintiiexpr {\romannumeral0\xintiieval }% +\def\xintexpr {\romannumeral0\xintexpro }% +\def\xintiexpr {\romannumeral0\xintiexpro }% +\def\xintfloatexpr {\romannumeral0\xintfloatexpro }% +\def\xintiiexpr {\romannumeral0\xintiiexpro }% \def\xinttheexpr - {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval }% -\def\xinttheiexpr {\romannumeral`&&@\xintthe\xintiexpr }% -\def\xintthefloatexpr {\romannumeral`&&@\xintthe\xintfloatexpr }% + {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval}% +\def\xinttheiexpr + {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintiexpr}% +\def\xintthefloatexpr + {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintfloatexpr}% \def\xinttheiiexpr - {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval }% + {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval}% +\def\xinteval #1% + {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval#1\relax}% +\def\xintieval #1% + {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintiexpr#1\relax}% +\def\xintfloateval #1% + {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintfloatexpr#1\relax}% +\def\xintiieval #1% + {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval#1\relax}% \def\xintthe #1{\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@#1}% +\def\xintthe_o #1{\expandafter\xint_gobble_iii\romannumeral`&&@#1}% \let\thexintexpr \xinttheexpr \let\thexintiexpr \xinttheiexpr \let\thexintfloatexpr\xintthefloatexpr @@ -146,9 +157,9 @@ \def\xintthebareeval {\expandafter\XINT_expr_unlock\romannumeral0\xintbareeval}% \def\xintthebarefloateval {\expandafter\XINT_expr_unlock\romannumeral0\xintbarefloateval}% \def\xintthebareiieval {\expandafter\XINT_expr_unlock\romannumeral0\xintbareiieval}% -\def\xinteval {\expandafter\XINT_expr_wrap\romannumeral0\xintbareeval }% -\def\xintiieval {\expandafter\XINT_iiexpr_wrap\romannumeral0\xintbareiieval }% -\def\xintieval #1% +\def\xintexpro {\expandafter\XINT_expr_wrap\romannumeral0\xintbareeval }% +\def\xintiiexpro {\expandafter\XINT_iiexpr_wrap\romannumeral0\xintbareiieval }% +\def\xintiexpro #1% {\ifx [#1\expandafter\XINT_iexpr_withopt\else\expandafter\XINT_iexpr_noopt \fi #1}% \def\XINT_iexpr_noopt {\expandafter\XINT_iexpr_wrap \expandafter 0\romannumeral0\xintbareeval }% @@ -163,7 +174,7 @@ \expandafter\XINT_expr_wrap \csname .=\xintRound::csv {#1}{\XINT_expr_unlock #2}\endcsname }% -\def\xintfloateval #1% +\def\xintfloatexpro #1% {% \ifx [#1\expandafter\XINT_flexpr_withopt_a\else\expandafter\XINT_flexpr_noopt \fi #1% @@ -192,14 +203,17 @@ }% \def\XINT_expr_unlock_sp #1.;#2.=#3!{{#2}{#3}}% \def\xintboolexpr {\romannumeral0\expandafter\expandafter\expandafter - \XINT_boolexpr_done \expandafter\xint_gobble_iv\romannumeral0\xinteval }% + \XINT_boolexpr_done \expandafter\xint_gobble_iv\romannumeral0\xintexpro }% \def\xinttheboolexpr {\romannumeral`&&@\expandafter\expandafter\expandafter - \XINT_boolexpr_print\expandafter\xint_gobble_iv\romannumeral0\xinteval }% + \XINT_boolexpr_print\expandafter\xint_gobble_iv\romannumeral0\xintexpro }% \let\thexintboolexpr\xinttheboolexpr \def\XINT_boolexpr_done { !\XINT_expr_usethe\XINT_protectii\XINT_boolexpr_print }% -\def\xintifboolexpr #1{\romannumeral0\xintifnotzero {\xinttheexpr #1\relax}}% -\def\xintifboolfloatexpr #1{\romannumeral0\xintifnotzero {\xintthefloatexpr #1\relax}}% -\def\xintifbooliiexpr #1{\romannumeral0\xintifnotzero {\xinttheiiexpr #1\relax}}% +\def\xintifboolexpr #1{\romannumeral0\xintiiifnotzero {\xinttheexpr #1\relax}}% +\def\xintifboolfloatexpr #1{\romannumeral0\xintiiifnotzero {\xintthefloatexpr #1\relax}}% +\def\xintifbooliiexpr #1{\romannumeral0\xintiiifnotzero {\xinttheiiexpr #1\relax}}% +\def\xintifsgnexpr #1{\romannumeral0\xintiiifsgn {\xinttheexpr #1\relax}}% +\def\xintifsgnfloatexpr #1{\romannumeral0\xintiiifsgn {\xintthefloatexpr #1\relax}}% +\def\xintifsgniiexpr #1{\romannumeral0\xintiiifsgn {\xinttheiiexpr #1\relax}}% \let\XINT:NEhook:two\empty \let\XINT:NEhook:one\empty \let\XINT:NEhook:csv\empty @@ -1469,7 +1483,7 @@ \fi }% \catcode`* 12 -\catcode`~\active +\catcode`~ 13 \catcode`: 12 \def\XINT_expr_defvar_getname #1:#2~{\endgroup \def\XINT_expr_tmpa{#1}\edef\XINT_expr_tmpc{\xintCSVLength{#1}}}% @@ -1483,7 +1497,7 @@ \detokenize\expandafter{\XINT_expr_tmpa}:~% \ifcase\XINT_expr_tmpc \xintMessage {xintexpr}{Warning} - {Aborting: impossible to declare variable with empty name.}% + {Aborting: not allowed to declare variable with empty name.}% \or \edef\XINT_expr_tmpb{\romannumeral0#1#3\relax}% \XINT_expr_defvar_one\XINT_expr_tmpa\XINT_expr_tmpb @@ -1528,12 +1542,10 @@ \ifnum\expandafter\xintLength\expandafter{\XINT_expr_tmpa}=\@ne \expandafter\xintnewdummy\XINT_expr_tmpa \else - \XINT_global - \expandafter\edef\csname XINT_expr_var_\XINT_expr_tmpa\endcsname - {\csname .=0\endcsname\noexpand\XINT_expr_undefined {\XINT_expr_tmpa}}% - \XINT_global - \expandafter\edef\csname XINT_expr_onliteral_\XINT_expr_tmpa\endcsname - {\csname .=0\endcsname\noexpand\XINT_expr_undefined {\XINT_expr_tmpa}*}% + \XINT_global\expandafter + \let\csname XINT_expr_var_\XINT_expr_tmpa\endcsname\xint_undefined + \XINT_global\expandafter + \let\csname XINT_expr_onliteral_\XINT_expr_tmpa\endcsname\xint_undefined \ifxintverbose\xintMessage {xintexpr}{Info} {Variable \XINT_expr_tmpa\space has been \ifxintglobaldefs globally \fi ``unassigned''.}% @@ -1544,7 +1556,6 @@ {Error: there was no such variable \XINT_expr_tmpa\space to unassign.}% \fi }% -\def\XINT_expr_undefined #1{\xintError:replaced_by_zero\xint_gobble_i {#1}}% \catcode`* 11 \def\XINT_expr_makedummy #1% {% @@ -2049,10 +2060,55 @@ \expandafter\xint_firstofone\romannumeral`&&@#1,^,{1/1[0]}}% \def\xintiiPrd:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiimul \expandafter\xint_firstofone\romannumeral`&&@#1,^,1}% -\def\xintGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintgcd - \expandafter\xint_firstofone\romannumeral`&&@#1,^,1}% -\def\xintLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintlcm - \expandafter\xint_firstofone\romannumeral`&&@#1,^,0}% +\def\xintGCDof:csv #1{\expandafter\XINT_gcdof:_a\romannumeral`&&@#1,^,{1/1[0]}}% +\def\XINT_gcdof:_a #1% + {\if ,#1\expandafter\XINT_oncsv:_empty\else\expandafter\XINT_gcdof:_b\fi #1}% +\def\XINT_gcdof:_b #1,% + {\expandafter\XINT_gcdof:_c\romannumeral0\xintiiabs#1\xint:}% +\def\XINT_gcdof:_c #1\xint:#2,% + {\expandafter\XINT_gcdof:_d\romannumeral0\xintiiabs#2\xint:#1\xint:}% +\def\XINT_gcdof:_d #1% + {\if ^#1\expandafter\XINT_gcdof:_end\else\expandafter\XINT_gcdof:_e\fi #1}% +\def\XINT_gcdof:_e#1#2\xint:#3\xint: +{% + \if0#1\expandafter\XINT_gcdof:_f\fi + \expandafter\XINT_gcdof:_e\romannumeral0\xintmod{#3}{#1#2}\xint:#1#2\xint: +}% +\def\XINT_gcdof:_f + \expandafter\XINT_gcdof:_e\romannumeral0\xintmod#1#2\xint:#3\xint:#4,% +{% + \expandafter\XINT_gcdof:_d\romannumeral0\xintiiabs#4\xint:#1\xint: +}% +\def\XINT_gcdof:_end ^\xint:#1\xint:#2{#1}% +\def\xintLCMof:csv #1{\expandafter\XINT_lcmof:_a\romannumeral`&&@#1,^,{0/1[0]}}% +\def\XINT_lcmof:_a #1% + {\if ,#1\expandafter\XINT_oncsv:_empty\else\expandafter\XINT_lcmof:_b\fi #1}% +\def\XINT_lcmof:_b #1,% + {\expandafter\XINT_lcmof:_c\romannumeral0\xintiiabs\xintRaw{#1}\xint:}% +\def\XINT_lcmof:_c #1{\if0#1\expandafter\XINT_lcmof:_zero\fi + \expandafter\XINT_lcmof:_d\romannumeral0\XINT_inv #1}% +\def\XINT_lcmof:_d #1\xint:#2,% + {\expandafter\XINT_lcmof:_e\romannumeral0\xintiiabs#2\xint:#1\xint:}% +\def\XINT_lcmof:_e #1% + {\if ^#1\expandafter\XINT_lcmof:_end\else\expandafter\XINT_lcmof:_f\fi #1}% +\def\XINT_lcmof:_f#1#2\xint: +{% + \if0#1\expandafter\XINT_lcmof:_zero\fi + \expandafter\XINT_lcmof:_g\romannumeral0\expandafter\XINT_inv + \romannumeral0\xintraw{#1#2}\xint: +}% +\def\XINT_lcmof:_g #1#2\xint:#3\xint: +{% + \if0#1\expandafter\XINT_lcmof:_h\fi + \expandafter\XINT_lcmof:_g\romannumeral0\xintmod{#3}{#1#2}\xint:#1#2\xint: +}% +\def\XINT_lcmof:_h + \expandafter\XINT_lcmof:_g\romannumeral0\xintmod#1#2\xint:#3\xint:#4,% +{% + \expandafter\XINT_lcmof:_e\romannumeral0\xintiiabs#4\xint:#1\xint: +}% +\def\XINT_lcmof:_zero #1^,#2{0/1[0]}% +\def\XINT_lcmof:_end ^\xint:#1\xint:#2{\romannumeral0\XINT_inv #1}% \def\xintiiGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiigcd \expandafter\xint_firstofone\romannumeral`&&@#1,^,1}% \def\xintiiLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiilcm @@ -2233,6 +2289,28 @@ \expandafter #1\expandafter #2\csname.=% \XINT:NEhook:one\xintiiEven{\XINT_expr_unlock #3}\endcsname }% +\def\XINT_expr_func_isint #1#2#3% +{% + \expandafter #1\expandafter #2\csname.=% + \XINT:NEhook:one\xintIsInt{\XINT_expr_unlock #3}\endcsname +}% +\def\XINT_flexpr_func_isint #1#2#3% +{% + \expandafter #1\expandafter #2\csname.=% + \XINT:NEhook:one\xintFloatIsInt{\XINT_expr_unlock #3}\endcsname +}% +\let\XINT_iiexpr_func_isint\XINT_expr_func_isint % ? perhaps rather always 1 +\def\XINT_expr_func_isone #1#2#3% +{% + \expandafter #1\expandafter #2\csname.=% + \XINT:NEhook:one\xintIsOne{\XINT_expr_unlock #3}\endcsname +}% +\let\XINT_flexpr_func_isone\XINT_expr_func_isone +\def\XINT_iiexpr_func_isone #1#2#3% +{% + \expandafter #1\expandafter #2\csname.=% + \XINT:NEhook:one\xintiiIsOne{\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 @@ -2771,6 +2849,18 @@ \def\XINT:newexpr:userfunc #1#2#3% {~xintExpandArgs{XINT_#1_userfunc_#2}{\xintCSVtoListNonStripped{#3}}}% \catcode`~ 3 +\def\XINT_tmpa #1{\expandafter\def\csname xintunassign#1func\endcsname ##1{% + \edef\XINT_expr_tmpa{##1}% + \edef\XINT_expr_tmpa {\xint_zapspaces_o\XINT_expr_tmpa}% + \XINT_global\expandafter + \let\csname XINT_#1_func_\XINT_expr_tmpa\endcsname\xint_undefined + \XINT_global\expandafter + \let\csname XINT_#1_userfunc_\XINT_expr_tmpa\endcsname\xint_undefined + \ifxintverbose\xintMessage {xintexpr}{Info} + {Function \XINT_expr_tmpa\space for \string\xint #1 parser now + \ifxintglobaldefs globally \fi undefined.}% + \fi}}% +\XINT_tmpa{expr}\XINT_tmpa{iiexpr}\XINT_tmpa{floatexpr}% \def\XINT_expr_wrapit #1{\expandafter\XINT_expr_wrap\csname.=#1\endcsname}% \def\xintNewFunction #1#2[#3]#4% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty index 2b3ac64e27f..09b2c87192d 100644 --- a/Master/texmf-dist/tex/generic/xint/xintfrac.sty +++ b/Master/texmf-dist/tex/generic/xint/xintfrac.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintfrac: Expandable operations on fractions %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintfrac}% - [2018/06/17 1.3c Expandable operations on fractions (JFB)]% + [2019/01/06 1.3d Expandable operations on fractions (JFB)]% \def\XINT_cntSgnFork #1% {% \ifcase #1\expandafter\xint_secondofthree @@ -317,78 +317,78 @@ \def\xintifsgn #1% {% \ifcase \xintSgn{#1} - \expandafter\xint_secondofthree_thenstop - \or\expandafter\xint_thirdofthree_thenstop - \else\expandafter\xint_firstofthree_thenstop + \expandafter\xint_stop_atsecondofthree + \or\expandafter\xint_stop_atthirdofthree + \else\expandafter\xint_stop_atfirstofthree \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 + \expandafter\xint_stop_atsecondofthree + \or\expandafter\xint_stop_atthirdofthree + \else\expandafter\xint_stop_atfirstofthree \fi }% \def\xintifEq {\romannumeral0\xintifeq }% \def\xintifeq #1#2% {% \if0\xintCmp{#1}{#2}% - \expandafter\xint_firstoftwo_thenstop - \else\expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo + \else\expandafter\xint_stop_atsecondoftwo \fi }% \def\xintifGt {\romannumeral0\xintifgt }% \def\xintifgt #1#2% {% \if1\xintCmp{#1}{#2}% - \expandafter\xint_firstoftwo_thenstop - \else\expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo + \else\expandafter\xint_stop_atsecondoftwo \fi }% \def\xintifLt {\romannumeral0\xintiflt }% \def\xintiflt #1#2% {% \ifnum\xintCmp{#1}{#2}<\xint_c_ - \expandafter\xint_firstoftwo_thenstop - \else \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo + \else \expandafter\xint_stop_atsecondoftwo \fi }% \def\xintifZero {\romannumeral0\xintifzero }% \def\xintifzero #1% {% \if0\xintSgn{#1}% - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \else - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \fi }% \def\xintifNotZero{\romannumeral0\xintifnotzero }% \def\xintifnotzero #1% {% \if0\xintSgn{#1}% - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \else - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \fi }% \def\xintifOne {\romannumeral0\xintifone }% \def\xintifone #1% {% \if1\xintIsOne{#1}% - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \else - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \fi }% \def\xintifOdd {\romannumeral0\xintifodd }% \def\xintifodd #1% {% \if\xintOdd{#1}1% - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \else - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \fi }% \def\xintRaw {\romannumeral0\xintraw }% @@ -513,7 +513,7 @@ \def\XINT_fracfrac_C 0\XINT_fracfrac_D #1#2#3% {% \if1\XINT_isOne {#3}% - \xint_afterfi {\expandafter\xint_firstoftwo_thenstop\xint_gobble_ii }% + \xint_afterfi {\expandafter\xint_stop_atfirstoftwo\xint_gobble_ii }% \fi \space \frac {#2}{#3}% @@ -726,11 +726,14 @@ \def\XINT_ifint #1/#2.% {% \if 0\xintiiRem {#1}{#2}% - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \else - \expandafter\xint_secondoftwo_thenstop + \expandafter\xint_stop_atsecondoftwo \fi }% +\def\xintIsInt {\romannumeral0\xintisint }% +\def\xintisint #1% + {\expandafter\XINT_ifint\romannumeral0\xintrawwithzeros {#1}.10}% \def\xintJrr {\romannumeral0\xintjrr }% \def\xintjrr #1% {% @@ -1820,6 +1823,28 @@ \def\xintabs #1{\expandafter\XINT_abs\romannumeral0\xintraw {#1}}% \def\xintOpp {\romannumeral0\xintopp }% \def\xintopp #1{\expandafter\XINT_opp\romannumeral0\xintraw {#1}}% +\def\xintInv {\romannumeral0\xintinv }% +\def\xintinv #1{\expandafter\XINT_inv\romannumeral0\xintraw {#1}}% +\def\XINT_inv #1% +{% + \xint_UDzerominusfork + #1-\XINT_inv_iszero + 0#1\XINT_inv_a + 0-{\XINT_inv_a {}}% + \krof #1% +}% +\def\XINT_inv_iszero #1]% + {\XINT_signalcondition{DivisionByZero}{Division of 1 by zero (#1])}{}{0/1[0]}}% +\def\XINT_inv_a #1#2/#3[#4#5]% +{% + \xint_UDzerominusfork + #4-\XINT_inv_expiszero + 0#4\XINT_inv_b + 0-{\XINT_inv_b -#4}% + \krof #5.{#1#3/#2}% +}% +\def\XINT_inv_expiszero #1.#2{ #2[0]}% +\def\XINT_inv_b #1.#2{ #2[#1]}% \def\xintSgn {\romannumeral0\xintsgn }% \def\xintsgn #1{\expandafter\XINT_sgn\romannumeral0\xintraw {#1}\xint:}% \def\xintFloat {\romannumeral0\xintfloat }% @@ -3211,10 +3236,13 @@ \romannumeral0\xintrez{\XINTinFloat[\XINTdigits]{#1}}}% \def\XINT_iffloatint #1#2/1[#3]% {% - \if 0#1\xint_dothis\xint_firstoftwo_thenstop\fi - \ifnum#3<\xint_c_\xint_dothis\xint_secondoftwo_thenstop\fi - \xint_orthat\xint_firstoftwo_thenstop + \if 0#1\xint_dothis\xint_stop_atfirstoftwo\fi + \ifnum#3<\xint_c_\xint_dothis\xint_stop_atsecondoftwo\fi + \xint_orthat\xint_stop_atfirstoftwo }% +\def\xintFloatIsInt {\romannumeral0\xintfloatisint}% +\def\xintfloatisint #1{\expandafter\XINT_iffloatint + \romannumeral0\xintrez{\XINTinFloat[\XINTdigits]{#1}}10}% \def\XINTinRandomFloatS{\romannumeral0\XINTinrandomfloatS}% \def\XINTinRandomFloatSdigits{\XINTinRandomFloatS[\XINTdigits]}% \def\XINTinrandomfloatS[#1]% diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty index ffdc8e5be04..60a38048466 100644 --- a/Master/texmf-dist/tex/generic/xint/xintgcd.sty +++ b/Master/texmf-dist/tex/generic/xint/xintgcd.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintgcd: Euclidean algorithm with xint package %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,66 +70,66 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintgcd}% - [2018/06/17 1.3c Euclide algorithm with xint package (JFB)]% + [2019/01/06 1.3d Euclide algorithm with xint package (JFB)]% \def\xintGCD {\romannumeral0\xintgcd }% \def\xintgcd #1#2{\xintiigcd {\xintNum{#1}}{\xintNum{#2}}}% \def\xintiiGCD {\romannumeral0\xintiigcd }% -\def\xintiigcd #1% +\def\xintiigcd #1{\expandafter\XINT_iigcd\romannumeral0\xintiiabs#1\xint:}% +\def\XINT_iigcd #1#2\xint:#3% {% - \expandafter\XINT_iigcd\expandafter{\romannumeral0\xintiiabs{#1}}% + \expandafter\XINT_gcd_fork\expandafter#1% + \romannumeral0\xintiiabs#3\xint:#1#2\xint: }% -\def\XINT_iigcd #1#2% -{% - \expandafter\XINT_gcd_fork\romannumeral0\xintiiabs{#2}\Z #1\Z -}% -\def\XINT_gcd_fork #1#2\Z #3#4\Z +\def\XINT_gcd_fork #1#2% {% \xint_UDzerofork - #1\XINT_gcd_BisZero - #3\XINT_gcd_AisZero + #1\XINT_gcd_Aiszero + #2\XINT_gcd_Biszero 0\XINT_gcd_loop \krof - {#1#2}{#3#4}% + #2% }% -\def\XINT_gcd_AisZero #1#2{ #1}% -\def\XINT_gcd_BisZero #1#2{ #2}% -\def\XINT_gcd_CheckRem #1#2\Z +\def\XINT_gcd_AisZero #1\xint:#2\xint:{ #1}% +\def\XINT_gcd_BisZero #1\xint:#2\xint:{ #2}% +\def\XINT_gcd_loop #1\xint:#2\xint: {% - \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop {#1#2}% + \expandafter\expandafter\expandafter\XINT_gcd_CheckRem + \expandafter\xint_secondoftwo + \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint: }% -\def\XINT_gcd_end0\XINT_gcd_loop #1#2{ #2}% -\def\XINT_gcd_loop #1#2% +\def\XINT_gcd_CheckRem #1% {% - \expandafter\expandafter\expandafter - \XINT_gcd_CheckRem - \expandafter\xint_secondoftwo - \romannumeral0\XINT_div_prepare {#1}{#2}\Z - {#1}% + \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop #1% }% +\def\XINT_gcd_end0\XINT_gcd_loop #1\xint:#2\xint:{ #2}% \def\xintLCM {\romannumeral0\xintlcm}% \def\xintlcm #1#2{\xintiilcm{\xintNum{#1}}{\xintNum{#2}}}% \def\xintiiLCM {\romannumeral0\xintiilcm}% -\def\xintiilcm #1% +\def\xintiilcm #1{\expandafter\XINT_iilcm\romannumeral0\xintiiabs#1\xint:}% +\def\XINT_iilcm #1#2\xint:#3% {% - \expandafter\XINT_iilcm\expandafter{\romannumeral0\xintiiabs{#1}}% + \expandafter\XINT_lcm_fork\expandafter#1% + \romannumeral0\xintiiabs#3\xint:#1#2\xint: }% -\def\XINT_iilcm #1#2% -{% - \expandafter\XINT_lcm_fork\romannumeral0\xintiiabs{#2}\Z #1\Z -}% -\def\XINT_lcm_fork #1#2\Z #3#4\Z +\def\XINT_lcm_fork #1#2% {% \xint_UDzerofork - #1\XINT_lcm_BisZero - #3\XINT_lcm_AisZero - 0\expandafter + #1\XINT_lcm_iszero + #2\XINT_lcm_iszero + 0\XINT_lcm_notzero \krof - \XINT_lcm_notzero\expandafter{\romannumeral0\XINT_gcd_loop {#1#2}{#3#4}}% - {#1#2}{#3#4}% + #2% +}% +\def\XINT_lcm_iszero #1\xint:#2\xint:{ 0}% +\def\XINT_lcm_notzero #1\xint:#2\xint: +{% + \expandafter\XINT_lcm_end\romannumeral0% + \expandafter\expandafter\expandafter\XINT_gcd_CheckRem + \expandafter\xint_secondoftwo + \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint: + \xint:#1\xint:#2\xint: }% -\def\XINT_lcm_AisZero #1#2#3#4#5{ 0}% -\def\XINT_lcm_BisZero #1#2#3#4#5{ 0}% -\def\XINT_lcm_notzero #1#2#3{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}% +\def\XINT_lcm_end #1\xint:#2\xint:#3\xint:{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}% \def\xintBezout {\romannumeral0\xintbezout }% \def\xintbezout #1% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty index 2267a1f77b6..63719d70a97 100644 --- a/Master/texmf-dist/tex/generic/xint/xintkernel.sty +++ b/Master/texmf-dist/tex/generic/xint/xintkernel.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintkernel: Paraphernalia for the xint packages %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -156,7 +156,7 @@ \fi \XINT_providespackage \ProvidesPackage {xintkernel}% - [2018/06/17 1.3c Paraphernalia for the xint packages (JFB)]% + [2019/01/06 1.3d Paraphernalia for the xint packages (JFB)]% \chardef\xint_c_ 0 \chardef\xint_c_i 1 \chardef\xint_c_ii 2 @@ -228,10 +228,10 @@ \long\def\xint_firstofone #1{#1}% \long\def\xint_firstoftwo #1#2{#1}% \long\def\xint_secondoftwo #1#2{#2}% -\let\xint_gobble_thenstop\xint_gob_andstop_i -\long\def\xint_firstofone_thenstop #1{ #1}% -\long\def\xint_firstoftwo_thenstop #1#2{ #1}% -\long\def\xint_secondoftwo_thenstop #1#2{ #2}% +\let\xint_stop_aftergobble\xint_gob_andstop_i +\long\def\xint_stop_atfirstofone #1{ #1}% +\long\def\xint_stop_atfirstoftwo #1#2{ #1}% +\long\def\xint_stop_atsecondoftwo #1#2{ #2}% \long\def\xint_exchangetwo_keepbraces #1#2{{#2}{#1}}% \long\def\xint_gob_til_R #1\R {}% \long\def\xint_gob_til_W #1\W {}% @@ -260,7 +260,7 @@ \long\def\xint_afterfi #1#2\fi {\fi #1}% \long\def\xint_bye #1\xint_bye {}% \long\def\xint_Bye #1\xint_bye {}% -\long\def\xint_bye_thenstop #1\xint_bye { }% +\long\def\xint_stop_afterbye #1\xint_bye { }% \long\def\xint_dothis #1#2\xint_orthat #3{\fi #1}% 1.1 \let\xint_orthat \xint_firstofone \long\def\xintdothis #1#2\xintorthat #3{\fi #1}% diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty index 94b26505845..7958c90d75d 100644 --- a/Master/texmf-dist/tex/generic/xint/xintseries.sty +++ b/Master/texmf-dist/tex/generic/xint/xintseries.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintseries: Expandable partial sums with xint package %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintseries}% - [2018/06/17 1.3c Expandable partial sums with xint package (JFB)]% + [2019/01/06 1.3d 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 9682ea524e0..f6d378e7c24 100644 --- a/Master/texmf-dist/tex/generic/xint/xinttools.sty +++ b/Master/texmf-dist/tex/generic/xint/xinttools.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.3c 2018/06/17 -%% Copyright (C) 2013-2018 by Jean-Francois Burnol +%% The xint bundle 1.3d 2019/01/06 +%% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xinttools: Expandable and non-expandable utilities %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xinttools}% - [2018/06/17 1.3c Expandable and non-expandable utilities (JFB)]% + [2019/01/06 1.3d Expandable and non-expandable utilities (JFB)]% \newtoks\XINT_toks \xint_firstofone{\let\XINT_sptoken= } %<- space here! \def\xintgodef {\global\xintodef }% @@ -289,8 +289,8 @@ \def\XINT_nthelt_neg_a #1% {% \xint_UDzerominusfork - #1-\xint_bye_thenstop - 0#1\xint_bye_thenstop + #1-\xint_stop_afterbye + 0#1\xint_stop_afterbye 0-{}% \krof \expandafter\XINT_nthelt_neg_b @@ -570,7 +570,7 @@ \def\XINT_seq #1#2% {% \ifcase\ifnum #1=#2 0\else\ifnum #2>#1 1\else -1\fi\fi\space - \expandafter\xint_firstoftwo_thenstop + \expandafter\xint_stop_atfirstoftwo \or \expandafter\XINT_seq_p \else @@ -1218,7 +1218,7 @@ \def\xintKeep:f:csv {\romannumeral0\xintkeep:f:csv }% \long\def\xintkeep:f:csv #1#2% {% - \expandafter\xint_gobble_thenstop + \expandafter\xint_stop_aftergobble \romannumeral0\expandafter\XINT_keep:f:csv_a \the\numexpr #1\expandafter.\expandafter{\romannumeral`&&@#2}% }% @@ -1311,7 +1311,7 @@ \def\xintTrim:f:csv {\romannumeral0\xinttrim:f:csv }% \long\def\xinttrim:f:csv #1#2% {% - \expandafter\xint_gobble_thenstop + \expandafter\xint_stop_aftergobble \romannumeral0\expandafter\XINT_trim:f:csv_a \the\numexpr #1\expandafter.\expandafter{\romannumeral`&&@#2}% }% @@ -1408,7 +1408,7 @@ }% \def\XINT_nthelt:f:csv_neg_fork #1% {% - \if#1-\expandafter\xint_bye_thenstop\fi + \if#1-\expandafter\xint_stop_afterbye\fi \expandafter\XINT_nthelt:f:csv_neg_done \romannumeral0% \expandafter\XINT_keep:f:csv_trimloop\the\numexpr-\xint_c_ix+#1% |