diff options
author | Norbert Preining <preining@logic.at> | 2021-04-04 02:31:47 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2021-04-04 02:31:47 +0000 |
commit | d1301f3e47b2340fd9ffbb7d1a0a4b361540e22e (patch) | |
tree | 4a851156d9d547008865e20d69b78626178c5828 /Master/texmf-dist/tex/generic | |
parent | 6aa284727262f1c7ac0ec6c67becc28d5a678a8c (diff) |
xint (4apr21)
git-svn-id: svn://tug.org/texlive/trunk@58738 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xint.sty | 26 | ||||
-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 | 13 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintexpr.sty | 80 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintfrac.sty | 156 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintgcd.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintkernel.sty | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintlog.sty | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintseries.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xinttools.sty | 6 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xinttrig.sty | 8 |
12 files changed, 192 insertions, 138 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty index a1e07297eb9..731eec9eba8 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xint: Expandable operations on big integers %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty (loaded by xintcore.sty) \XINT_providespackage \ProvidesPackage{xint}% - [2021/02/20 v1.4c Expandable operations on big integers (JFB)]% + [2021/03/29 v1.4d 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}% @@ -1447,8 +1447,8 @@ \krof #2% }% -\def\XINT_gcd_AisZero #1\xint:#2\xint:{ #1}% -\def\XINT_gcd_BisZero #1\xint:#2\xint:{ #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 @@ -1460,6 +1460,14 @@ \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\xintiiGCDof {\romannumeral0\xintiigcdof }% +\def\xintiigcdof #1{\expandafter\XINT_iigcdof_a\romannumeral`&&@#1^}% +\def\XINT_iiGCDof {\romannumeral0\XINT_iigcdof_a}% +\def\XINT_iigcdof_a #1{\expandafter\XINT_iigcdof_b\romannumeral`&&@#1!}% +\def\XINT_iigcdof_b #1!#2{\expandafter\XINT_iigcdof_c\romannumeral`&&@#2!{#1}!}% +\def\XINT_iigcdof_c #1{\xint_gob_til_^ #1\XINT_iigcdof_e ^\XINT_iigcdof_d #1}% +\def\XINT_iigcdof_d #1!{\expandafter\XINT_iigcdof_b\romannumeral0\xintiigcd {#1}}% +\def\XINT_iigcdof_e #1!#2!{ #2}% \def\xintiiLCM {\romannumeral0\xintiilcm}% \def\xintiilcm #1{\expandafter\XINT_iilcm\romannumeral0\xintiiabs#1\xint:}% \def\XINT_iilcm #1#2\xint:#3% @@ -1486,14 +1494,6 @@ \xint:#1\xint:#2\xint: }% \def\XINT_lcm_end #1\xint:#2\xint:#3\xint:{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}% -\def\xintiiGCDof {\romannumeral0\xintiigcdof }% -\def\xintiigcdof #1{\expandafter\XINT_iigcdof_a\romannumeral`&&@#1^}% -\def\XINT_iiGCDof {\romannumeral0\XINT_iigcdof_a}% -\def\XINT_iigcdof_a #1{\expandafter\XINT_iigcdof_b\romannumeral`&&@#1!}% -\def\XINT_iigcdof_b #1!#2{\expandafter\XINT_iigcdof_c\romannumeral`&&@#2!{#1}!}% -\def\XINT_iigcdof_c #1{\xint_gob_til_^ #1\XINT_iigcdof_e ^\XINT_iigcdof_d #1}% -\def\XINT_iigcdof_d #1!{\expandafter\XINT_iigcdof_b\romannumeral0\xintiigcd {#1}}% -\def\XINT_iigcdof_e #1!#2!{ #2}% \def\xintiiLCMof {\romannumeral0\xintiilcmof }% \def\xintiilcmof #1{\expandafter\XINT_iilcmof_a\romannumeral`&&@#1^}% \def\XINT_iiLCMof {\romannumeral0\XINT_iilcmof_a}% diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty index b8b1f06cca3..ef4b736636f 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 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}% - [2021/02/20 v1.4c Expandable binary and hexadecimal conversions (JFB)]% + [2021/03/29 v1.4d 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 17e67f6563b..19f31a35d06 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 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}% - [2021/02/20 v1.4c Expandable continued fractions with xint package (JFB)]% + [2021/03/29 v1.4d 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 133d760a1b8..c6690c5fd00 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 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}% - [2021/02/20 v1.4c Expandable arithmetic on big integers (JFB)]% + [2021/03/29 v1.4d Expandable arithmetic on big integers (JFB)]% \csname XINT_Clamped_istrapped\endcsname \csname XINT_ConversionSyntax_istrapped\endcsname \csname XINT_DivisionByZero_istrapped\endcsname @@ -234,6 +234,13 @@ -{ #1}% \krof }% +\def\XINT_Abs #1% +{% + \xint_UDsignfork + #1{}% + -{#1}% + \krof +}% \def\xintFDg {\romannumeral0\xintfdg }% \def\xintfdg #1{\expandafter\XINT_fdg \romannumeral`&&@#1\xint:\Z}% \def\XINT_FDg #1% diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty index 8df9da27a74..c6889155f66 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintexpr: Expandable expression parser %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -82,7 +82,7 @@ \XINTsetupcatcodes% \XINT_providespackage \ProvidesPackage{xintexpr}% - [2021/02/20 v1.4c Expandable expression parser (JFB)]% + [2021/03/29 v1.4d Expandable expression parser (JFB)]% \catcode`! 11 \let\XINT_Cmp \xintiiCmp \def\XINTfstop{\noexpand\XINTfstop}% @@ -107,8 +107,13 @@ \def\XINT:expr:toblist_a #1{#2% <% \if{#2\xint_dothis<[\XINT:expr:toblist_a>\fi + \if P#2\xint_dothis<\XINT:expr:toblist_pol>\fi \xint_orthat\XINT:expr:toblist_b #1#2% >% +\def\XINT:expr:toblist_pol #1!#2.{#3}}% +<% + pol([\XINT:expr:toblist_b #1!#3}^])\XINT:expr:toblist_c #1!}% +>% \def\XINT:expr:toblist_b #1!#2}% <% \if\relax#2\relax\xintexprEmptyItem\else#1<#2>\fi\XINT:expr:toblist_c #1!}% @@ -388,7 +393,6 @@ \let\XINT:NEhook:f:one:from:two\expandafter \let\XINT:NEhook:f:one:from:two:direct\empty \let\XINT:NEhook:x:one:from:two\empty -\let\XINT:NEhook:x:one:from:twoandone\empty \let\XINT:NEhook:f:one:and:opt:direct \empty \let\XINT:NEhook:f:tacitzeroifone:direct \empty \let\XINT:NEhook:f:iitacitzeroifone:direct \empty @@ -1112,11 +1116,11 @@ \XINT_expr_defbin_b {flexpr}{xor}{vi}{xii} {xintXOR}% \XINT_expr_defbin_b {iiexpr}{xor}{vi}{xii} {xintXOR}% \XINT_expr_defbin_b {expr} {//} {xiv}{xiv}{xintDivFloor}% -\XINT_expr_defbin_b {flexpr}{//} {xiv}{xiv}{XINTinFloatDivFloor}% " -\XINT_expr_defbin_b {iiexpr}{//} {xiv}{xiv}{xintiiDivFloor}% " -\XINT_expr_defbin_b {expr} {/:} {xiv}{xiv}{xintMod}% " -\XINT_expr_defbin_b {flexpr}{/:} {xiv}{xiv}{XINTinFloatMod}% " -\XINT_expr_defbin_b {iiexpr}{/:} {xiv}{xiv}{xintiiMod}% " +\XINT_expr_defbin_b {flexpr}{//} {xiv}{xiv}{XINTinFloatDivFloor}% +\XINT_expr_defbin_b {iiexpr}{//} {xiv}{xiv}{xintiiDivFloor}% +\XINT_expr_defbin_b {expr} {/:} {xiv}{xiv}{xintMod}% +\XINT_expr_defbin_b {flexpr}{/:} {xiv}{xiv}{XINTinFloatMod}% +\XINT_expr_defbin_b {iiexpr}{/:} {xiv}{xiv}{xintiiMod}% \XINT_expr_defbin_b {expr} + {xii}{xii}{xintAdd}% \XINT_expr_defbin_b {flexpr} + {xii}{xii}{XINTinFloatAdd}% \XINT_expr_defbin_b {iiexpr} + {xii}{xii}{xintiiAdd}% @@ -1841,7 +1845,7 @@ *\unexpanded{\expandafter\expandafter}% \expandafter\noexpand\csname XINT_expr_var_#1\endcsname(}% \ifxintverbose\xintMessage{xintexpr}{Info} - {Variable "#1" \ifxintglobaldefs globally \fi + {Variable #1 \ifxintglobaldefs globally \fi defined with value \csname XINT_expr_varvalue_#1\endcsname.}% \fi }% @@ -3143,27 +3147,13 @@ {\xintiiRandRange{#1}}% {\xintiiRandRangeAtoB{#1}{#2}}% }% -\def\XINT_expr_func_quo #1#2#3% -{% - \expandafter #1\expandafter #2\expandafter{\romannumeral`&&@% - \XINT:NEhook:f:one:from:two - {\romannumeral`&&@\xintiQuo #3}}% -}% -\let\XINT_flexpr_func_quo\XINT_expr_func_quo -\def\XINT_iiexpr_func_quo #1#2#3% +\def\XINT_iiexpr_func_iquo #1#2#3% {% \expandafter #1\expandafter #2\expandafter{\romannumeral`&&@% \XINT:NEhook:f:one:from:two {\romannumeral`&&@\xintiiQuo #3}}% }% -\def\XINT_expr_func_rem #1#2#3% -{% - \expandafter #1\expandafter #2\expandafter{\romannumeral`&&@% - \XINT:NEhook:f:one:from:two - {\romannumeral`&&@\xintiRem #3}}% -}% -\let\XINT_flexpr_func_rem\XINT_expr_func_rem -\def\XINT_iiexpr_func_rem #1#2#3% +\def\XINT_iiexpr_func_irem #1#2#3% {% \expandafter #1\expandafter #2\expandafter{\romannumeral`&&@% \XINT:NEhook:f:one:from:two @@ -3746,7 +3736,7 @@ }}\expandafter\XINT:NE:f:iitacitzeroifone:direct\string#% \def\XINT:NE:f:iitacitzeroifone_a #1#2&&A#3% {% - \detokenize{\romannumeral`-0\expandafter#1\expanded{#2}$XINT_expr_exclam#3}%$ + \detokenize{\romannumeral`$XINT_expr_null\expandafter#1\expanded{#2}$XINT_expr_exclam#3}% }% \def\XINT:NE:f:iitacitzeroifone_b\XINT:expr:f:iitacitzeroifone #1#2#3&&A#4% {% @@ -3767,16 +3757,6 @@ }}\expandafter\XINT:NE:x:one:from:two_fork\string#% \def\XINT:NE:x:one:from:two:p #1#2#3% {~expanded{\detokenize{\expandafter#1}~expanded{{#2}{#3}}}}% -\def\XINT:NE:x:one:from:twoandone #1#2#3{\XINT:NE:x:one:from:twoandone_a #2#3&&A#1{#2}{#3}}% -\def\XINT:NE:x:one:from:twoandone_a #1#2{\XINT:NE:x:one:from:twoandone_fork #1&&A#2&&A}% -\def\XINT:NE:x:one:from:twoandone_fork #1{% -\def\XINT:NE:x:one:from:twoandone_fork ##1##2&&A##3##4&&A##5##6&&A% -{% - \if0\XINT:NE:hastilde ##1##3##5~!\relax\XINT:NE:hashash ##1##3##5#1!\relax 0% - \else - \expandafter\XINT:NE:x:one:from:two:p - \fi -}}\expandafter\XINT:NE:x:one:from:twoandone_fork\string#% \def\XINT:NE:x:listsel #1{% \def\XINT:NE:x:listsel ##1##2&% {% @@ -3787,13 +3767,12 @@ \fi ##1##2&% }}\expandafter\XINT:NE:x:listsel\string#% -\def\XINT:NE:x:listsel:p #1#2&(#3% +\def\XINT:NE:x:listsel:p #1#2_#3&(#4% {% - \detokenize - {% - \expanded{\expandafter#1\expanded{#2$XINT_expr_tab({#3}}\expandafter\empty\empty}%$ - }% + \detokenize{\expanded\XINT:expr:ListSel{{#3}{#4}}}% }% +\def\XINT:expr:ListSel{\expandafter\XINT:expr:ListSel_i\expanded}% +\def\XINT:expr:ListSel_i #1#2{{\XINT_ListSel_top #2_#1&({#2}}}% \def\XINT:NE:f:reverse #1{% \def\XINT:NE:f:reverse ##1^% {% @@ -3806,13 +3785,14 @@ }}\expandafter\XINT:NE:f:reverse\string#% \def\XINT:NE:f:reverse:p #1^#2\xint_bye {% - \detokenize - {% - \romannumeral0\expandafter\XINT:expr:f:reverse - \expandafter{\expanded\expandafter{\xint_gobble_i#1}}% - }% + \expandafter\XINT:NE:f:reverse:p_i\expandafter{\xint_gobble_i#1}% +}% +\def\XINT:NE:f:reverse:p_i #1% +{% + \detokenize{\romannumeral0\XINT:expr:f:reverse{{#1}}}% }% -\def\XINT:expr:f:reverse #1% +\def\XINT:expr:f:reverse{\expandafter\XINT:expr:f:reverse_i\expanded}% +\def\XINT:expr:f:reverse_i #1% {% \XINT_expr_reverse #1^^#1\xint:\xint:\xint:\xint: \xint:\xint:\xint:\xint:\xint_bye @@ -3840,7 +3820,7 @@ ##1{##2}% }}\expandafter\XINT:NE:f:noeval:from:braced:u\string#% \def\XINT:NE:f:noeval:from:braced:u:p #1#2% - {\detokenize{\expandafter#1}~expanded{{#2}}}% + {\detokenize{\romannumeral`$XINT_expr_null\expandafter#1}~expanded{{#2}}}% \catcode`- 11 \def\XINT:NE:exec_? #1#2% {% @@ -4210,7 +4190,6 @@ \let\XINT:NEhook:f:one:from:two \XINT:NE:f:one:from:two \let\XINT:NEhook:f:one:from:two:direct \XINT:NE:f:one:from:two:direct \let\XINT:NEhook:x:one:from:two \XINT:NE:x:one:from:two - \let\XINT:NEhook:x:one:from:twoandone \XINT:NE:x:one:from:twoandone \let\XINT:NEhook:f:one:and:opt:direct \XINT:NE:f:one:and:opt:direct \let\XINT:NEhook:f:tacitzeroifone:direct \XINT:NE:f:tacitzeroifone:direct \let\XINT:NEhook:f:iitacitzeroifone:direct \XINT:NE:f:iitacitzeroifone:direct @@ -4280,6 +4259,7 @@ \def\XINT_expr_tilde{~}\def\XINT_expr_qmark{?}% catcode 3 \def\XINT_expr_caret{^}\def\XINT_expr_exclam{!}% catcode 11 \def\XINT_expr_tab{&}% catcode 7 +\def\XINT_expr_null{&&@}% \catcode`~ 13 \catcode`@ 14 \catcode`\% 6 \catcode`# 12 \catcode`$ 11 @ $ \def\XINT_NewExpr_a %1%2%3%4%5@ {@ diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty index 62c5d924cd9..a10aa57392a 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 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}% - [2021/02/20 v1.4c Expandable operations on fractions (JFB)]% + [2021/03/29 v1.4d Expandable operations on fractions (JFB)]% \def\XINT_cntSgnFork #1% {% \ifcase #1\expandafter\xint_secondofthree @@ -1955,81 +1955,147 @@ \def\xintSgn {\romannumeral0\xintsgn }% \def\xintsgn #1{\expandafter\XINT_sgn\romannumeral0\xintraw {#1}\xint:}% \def\xintGCD {\romannumeral0\xintgcd}% -\def\xintgcd #1#2{\XINT_fgcdof{#1}{#2}^}% -\def\xintLCM {\romannumeral0\xintlcm}% -\def\xintlcm #1#2{\XINT_flcmof{#1}{#2}^}% +\def\xintgcd #1% +{% + \expandafter\XINT_fgcd_in + \romannumeral0\xintrez{\xintPIrr{\xintAbs{#1}}}\xint: +}% +\def\XINT_fgcd_in #1#2\xint:#3% +{% + \expandafter\XINT_fgcd_out + \romannumeral0\expandafter\XINT_fgcd_chkzeros\expandafter#1% + \romannumeral0\xintrez{\xintPIrr{\xintAbs{#3}}}\xint:#1#2\xint: +}% +\def\XINT_fgcd_out#1[#2]{\xintirr{#1[#2]}[0]}% +\def\XINT_fgcd_chkzeros #1#2% +{% + \xint_UDzerofork + #1\XINT_fgcd_aiszero + #2\XINT_fgcd_biszero + 0\XINT_fgcd_main + \krof #2% +}% +\def\XINT_fgcd_aiszero #1\xint:#2\xint:{ #1}% +\def\XINT_fgcd_biszero #1\xint:#2\xint:{ #2}% +\def\XINT_fgcd_main #1/#2[#3]\xint:#4/#5[#6]\xint: +{% + \expandafter\XINT_fgcd_a + \romannumeral0\XINT_gcd_loop #2\xint:#5\xint:\xint: + #2\xint:#5\xint:#1\xint:#4\xint:#3.#6.% +}% +\def\XINT_fgcd_a #1\xint:#2\xint: +{% + \expandafter\XINT_fgcd_b + \romannumeral0\xintiiquo{#2}{#1}\xint:#1\xint:#2\xint: +}% +\def\XINT_fgcd_b #1\xint:#2\xint:#3\xint:#4\xint:#5\xint:#6\xint:#7.#8.% +{% + \expanded{% + \xintiigcd{\xintiiE{\xintiiMul{#5}{\xintiiQuo{#4}{#2}}}{#7-#8}}% + {\xintiiE{\xintiiMul{#6}{#1}}{#8-#7}}% + /\xintiiMul{#1}{#4}% + [\ifnum#7>#8 #8\else #7\fi]% + }% +}% \def\xintGCDof {\romannumeral0\xintgcdof}% \def\xintgcdof #1{\expandafter\XINT_fgcdof\romannumeral`&&@#1^}% \def\XINT_GCDof{\romannumeral0\XINT_fgcdof}% \def\XINT_fgcdof #1% {% - \xint_gob_til_^ #1\XINT_fgcdof_empty ^% - \expandafter\XINT_fgcdof_loop\romannumeral0\xintiiabs#1\xint: + \expandafter\XINT_fgcdof_chkempty\romannumeral`&&@#1\xint: +}% +\def\XINT_fgcdof_chkempty #1% +{% + \xint_gob_til_^#1\XINT_fgcdof_empty ^\XINT_fgcdof_in #1% +}% +\def\XINT_fgcdof_empty #1\xint:{ 1/1[0]}% hesitation, should it be infinity? O? +\def\XINT_fgcdof_in #1\xint: +{% + \expandafter\XINT_fgcd_out + \romannumeral0\expandafter\XINT_fgcdof_loop + \romannumeral0\xintrez{\xintPIrr{\xintAbs{#1}}}\xint: }% -\def\XINT_fgcdof_empty ^#1\xint:{ 1/1[0]}% \def\XINT_fgcdof_loop #1\xint:#2% {% - \expandafter\XINT_fgcdof_loop_a\romannumeral0\xintiiabs#2\xint:#1\xint: + \expandafter\XINT_fgcdof_chkend\romannumeral`&&@#2\xint:#1\xint:\xint: +}% +\def\XINT_fgcdof_chkend #1% +{% + \xint_gob_til_^#1\XINT_fgcdof_end ^\XINT_fgcdof_loop_pair #1% +}% +\def\XINT_fgcdof_end #1\xint:#2\xint:\xint:{ #2}% +\def\XINT_fgcdof_loop_pair #1\xint:#2% +{% + \expandafter\XINT_fgcdof_loop + \romannumeral0\expandafter\XINT_fgcd_chkzeros\expandafter#2% + \romannumeral0\xintrez{\xintPIrr{\xintAbs{#1}}}\xint:#2% }% -\def\XINT_fgcdof_loop_a#1#2\xint:#3\xint: +\def\xintLCM {\romannumeral0\xintlcm}% +\def\xintlcm #1% {% - \xint_gob_til_^ #1\XINT_fgcdof_end ^% - \xint_gob_til_zero #1\XINT_fgcdof_skip 0% - \expandafter\XINT_fgcdof_loop_b\romannumeral0\xintmod{#1#2}{#3}\xint:#3\xint: + \expandafter\XINT_flcm_in + \romannumeral0\xintrez{\xintPIrr{\xintAbs{#1}}}\xint: }% -\def\XINT_fgcdof_end ^#1\xint:#2\xint:{ #2}% -\def\XINT_fgcdof_skip 0% - \expandafter\XINT_fgcdof_loop_b\romannumeral0\xintmod#1\xint: +\def\XINT_flcm_in #1#2\xint:#3% {% - \XINT_fgcdof_loop + \expandafter\XINT_fgcd_out + \romannumeral0\expandafter\XINT_flcm_chkzeros\expandafter#1% + \romannumeral0\xintrez{\xintPIrr{\xintAbs{#3}}}\xint:#1#2\xint: }% -\def\XINT_fgcdof_loop_b#1#2\xint:#3\xint: +\def\XINT_flcm_chkzeros #1#2% {% - \xint_gob_til_zero #1\XINT_fgcdof_next 0% - \expandafter\XINT_fgcdof_loop_b\romannumeral0\xintmod{#3}{#1#2}\xint:#1#2\xint: + \xint_UDzerofork + #1\XINT_flcm_zero + #2\XINT_flcm_zero + 0\XINT_flcm_main + \krof #2% }% -\def\XINT_fgcdof_next 0% - \expandafter\XINT_fgcdof_loop_b\romannumeral0\xintmod#1#2\xint:#3\xint:#4% +\def\XINT_flcm_zero #1\xint:#2\xint:{ 0/1[0]}% +\def\XINT_flcm_main #1/#2[#3]\xint:#4/#5[#6]\xint: {% - \expandafter\XINT_fgcdof_loop_a\romannumeral0\xintiiabs#4\xint:#1\xint: + \xintinv + {% + \romannumeral0\XINT_fgcd_main #2/#1[-#3]\xint:#5/#4[-#6]\xint: + }% }% \def\xintLCMof {\romannumeral0\xintlcmof}% \def\xintlcmof #1{\expandafter\XINT_flcmof\romannumeral`&&@#1^}% \def\XINT_LCMof{\romannumeral0\XINT_flcmof}% \def\XINT_flcmof #1% {% - \xint_gob_til_^ #1\XINT_flcmof_empty ^% - \expandafter\XINT_flcmof_loop\romannumeral0\xintiiabs\xintRaw{#1}\xint: + \expandafter\XINT_flcmof_chkempty\romannumeral`&&@#1\xint: +}% +\def\XINT_flcmof_chkempty #1% +{% + \xint_gob_til_^#1\XINT_flcmof_empty ^\XINT_flcmof_in #1% }% -\def\XINT_flcmof_empty ^#1\xint:{ 0/1[0]}% -\def\XINT_flcmof_loop #1% +\def\XINT_flcmof_empty #1\xint:{ 0/1[0]}% hesitation +\def\XINT_flcmof_in #1\xint: {% - \xint_gob_til_zero #1\XINT_flcmof_zero 0% - \expandafter\XINT_flcmof_d\romannumeral0\XINT_inv #1% + \expandafter\XINT_fgcd_out + \romannumeral0\expandafter\XINT_flcmof_loop + \romannumeral0\xintrez{\xintPIrr{\xintAbs{#1}}}\xint: }% -\def\XINT_flcmof_zero #1^{ 0/1[0]}% -\def\XINT_flcmof_d #1\xint:#2% +\def\XINT_flcmof_loop #1\xint:#2% {% - \expandafter\XINT_flcmof_loop_a\romannumeral0\xintiiabs#2\xint:#1\xint: + \expandafter\XINT_flcmof_chkend\romannumeral`&&@#2\xint:#1\xint:\xint: }% -\def\XINT_flcmof_loop_a #1#2\xint:% +\def\XINT_flcmof_chkend #1% {% - \xint_gob_til_^ #1\XINT_flcmof_end ^% - \xint_gob_til_zero #1\XINT_flcmof_zero 0% - \expandafter\XINT_flcmof_loop_b\romannumeral0\expandafter\XINT_inv - \romannumeral0\xintraw{#1#2}\xint: + \xint_gob_til_^#1\XINT_flcmof_end ^\XINT_flcmof_loop_pair #1% }% -\def\XINT_flcmof_end ^#1\xint:#2\xint:{\XINT_inv #2}% -\def\XINT_flcmof_loop_b #1#2\xint:#3\xint: +\def\XINT_flcmof_end #1\xint:#2\xint:\xint:{ #2}% +\def\XINT_flcmof_loop_pair #1\xint:#2% {% - \xint_gob_til_zero #1\XINT_flcmof_next 0% - \expandafter\XINT_flcmof_loop_b\romannumeral0\xintmod{#3}{#1#2}\xint:#1#2\xint: + \expandafter\XINT_flcmof_chkzero + \romannumeral0\expandafter\XINT_flcm_chkzeros\expandafter#2% + \romannumeral0\xintrez{\xintPIrr{\xintAbs{#1}}}\xint:#2% }% -\def\XINT_flcmof_next 0% - \expandafter\XINT_flcmof_loop_b\romannumeral0\xintmod#1#2\xint:#3\xint:#4% +\def\XINT_flcmof_chkzero #1% {% - \expandafter\XINT_flcmof_loop_a\romannumeral0\xintiiabs#4\xint:#1\xint: + \xint_gob_til_zero#1\XINT_flcmof_zero0\XINT_flcmof_loop#1% }% +\def\XINT_flcmof_zero#1^{ 0/1[0]}% \mathchardef\XINTdigits 16 \def\xintDigits #1=% {\afterassignment \xint_gobble_i \mathchardef\XINTdigits=}% diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty index db70bd2c3bf..4ecd9df5c00 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintgcd: Euclidean algorithm with xint package %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -77,7 +77,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintgcd}% - [2021/02/20 v1.4c Euclide algorithm with xint package (JFB)]% + [2021/03/29 v1.4d Euclide algorithm with xint package (JFB)]% \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 26d63e55dc5..b94e724b17a 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintkernel: Paraphernalia for the xint packages %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -157,7 +157,7 @@ \fi \XINT_providespackage \ProvidesPackage {xintkernel}% - [2021/02/20 v1.4c Paraphernalia for the xint packages (JFB)]% + [2021/03/29 v1.4d Paraphernalia for the xint packages (JFB)]% \chardef\xint_c_ 0 \chardef\xint_c_i 1 \chardef\xint_c_ii 2 @@ -233,6 +233,7 @@ \long\def\xint_firstofone #1{#1}% \long\def\xint_firstoftwo #1#2{#1}% \long\def\xint_secondoftwo #1#2{#2}% +\long\def\xint_thirdofthree#1#2#3{#3}% 1.4d \let\xint_stop_aftergobble\xint_gob_andstop_i \long\def\xint_stop_atfirstofone #1{ #1}% \long\def\xint_stop_atfirstoftwo #1#2{ #1}% @@ -261,7 +262,7 @@ \long\def\xint_gob_til_xint:#1\xint:{}% \long\def\xint_gob_til_^#1^{}% \def\xint_bracedstopper{\xint:}% -\long\def\xint_gob_til_exclam #1!{}% +\long\def\xint_gob_til_exclam #1!{}% documenter le catcode de ! ici \long\def\xint_gob_til_sc #1;{}% \long\def\xint_afterfi #1#2\fi {\fi #1}% \long\def\xint_bye #1\xint_bye {}% diff --git a/Master/texmf-dist/tex/generic/xint/xintlog.sty b/Master/texmf-dist/tex/generic/xint/xintlog.sty index cf8d886adc5..5b4877cd764 100644 --- a/Master/texmf-dist/tex/generic/xint/xintlog.sty +++ b/Master/texmf-dist/tex/generic/xint/xintlog.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintlog: Logarithms and exponentials for xintexpr %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -74,13 +74,13 @@ \xintexprSafeCatcodes\catcode`_ 11 \XINT_providespackage \ProvidesPackage{xintlog}% -[2021/02/20 v1.4c Logarithms and exponentials for xintexpr (JFB)]% +[2021/03/29 v1.4d Logarithms and exponentials for xintexpr (JFB)]% \ifdefined\RequirePackage \RequirePackage{poormanlog}% \else \input poormanlog.tex \fi -\xintexprRestoreCatcodes\csname XINT_setcatcodes\endcsname\catcode`\! 11 +\xintexprRestoreCatcodes\csname XINT_setcatcodes\endcsname \expandafter\def\csname XINT_expr_func_log10\endcsname#1#2#3% {% \expandafter #1\expandafter #2\expandafter{% diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty index 66499a5f4b8..0e5bddb2246 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 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}% - [2021/02/20 v1.4c Expandable partial sums with xint package (JFB)]% + [2021/03/29 v1.4d 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 d4330e4ad99..e35ba21b9c1 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.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 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}% - [2021/02/20 v1.4c Expandable and non-expandable utilities (JFB)]% + [2021/03/29 v1.4d Expandable and non-expandable utilities (JFB)]% \newtoks\XINT_toks \xint_firstofone{\let\XINT_sptoken= } %<- space here! \def\xintgodef {\global\xintodef }% diff --git a/Master/texmf-dist/tex/generic/xint/xinttrig.sty b/Master/texmf-dist/tex/generic/xint/xinttrig.sty index 61d705f1d9f..563d14760da 100644 --- a/Master/texmf-dist/tex/generic/xint/xinttrig.sty +++ b/Master/texmf-dist/tex/generic/xint/xinttrig.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.4c 2021/02/20 -%% Copyright (C) 2013-2020 by Jean-Francois Burnol +%% The xint bundle 1.4d 2021/03/29 +%% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xinttrig: Trigonometry for the xintexpr package %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -68,10 +68,10 @@ \expandafter\xint_secondoftwo \fi {\immediate\write-1{Reloading xinttrig library using Digits=\xinttheDigits.}}% -{\expandafter\gdef\csname xintlibver@trig\endcsname{2021/02/20 v1.4c}% +{\expandafter\gdef\csname xintlibver@trig\endcsname{2021/03/29 v1.4d}% \XINT_providespackage \ProvidesPackage{xinttrig}% -[2021/02/20 v1.4c Trigonometrical functions for xintexpr (JFB)]% +[2021/03/29 v1.4d Trigonometrical functions for xintexpr (JFB)]% }% \xintFor* #1 in {iDTVtuwxyzX}\do{\xintensuredummy{#1}}% \def\xintreloadxinttrig |