diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintgcd.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintgcd.sty | 98 |
1 files changed, 16 insertions, 82 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty index 473e4520af2..6c558ccc31c 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.3f 2019/09/10 -%% Copyright (C) 2013-2019 by Jean-Francois Burnol +%% The xint bundle 1.4 2020/01/31 +%% Copyright (C) 2013-2020 by Jean-Francois Burnol %% xintgcd: Euclidean algorithm with xint package %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -36,9 +36,10 @@ \catcode45=12 % - \catcode46=12 % . \catcode58=12 % : - \let\z\endgroup + \def\z{\endgroup}% \expandafter\let\expandafter\x\csname ver@xintgcd.sty\endcsname - \expandafter\let\expandafter\w\csname ver@xintcore.sty\endcsname + \expandafter\let\expandafter\w\csname ver@xint.sty\endcsname + \expandafter\let\expandafter\t\csname ver@xinttools.sty\endcsname \expandafter \ifx\csname PackageInfo\endcsname\relax \def\y#1#2{\immediate\write-1{Package #1 Info: #2.}}% @@ -51,15 +52,21 @@ \aftergroup\endinput \else \ifx\x\relax % plain-TeX, first loading of xintgcd.sty - \ifx\w\relax % but xintcore.sty not yet loaded. - \def\z{\endgroup\input xintcore.sty\relax}% + \ifx\w\relax % but xint.sty not yet loaded. + \expandafter\def\expandafter\z\expandafter{\z\input xint.sty\relax}% + \fi + \ifx\t\relax % but xinttools.sty not yet loaded. + \expandafter\def\expandafter\z\expandafter{\z\input xinttools.sty\relax}% \fi \else \def\empty {}% \ifx\x\empty % LaTeX, first loading, % variable is initialized, but \ProvidesPackage not yet seen - \ifx\w\relax % xintcore.sty not yet loaded. - \def\z{\endgroup\RequirePackage{xintcore}}% + \ifx\w\relax % xint.sty not yet loaded. + \expandafter\def\expandafter\z\expandafter{\z\RequirePackage{xint}}% + \fi + \ifx\t\relax % xinttools.sty not yet loaded. + \expandafter\def\expandafter\z\expandafter{\z\RequirePackage{xinttools}}% \fi \else \aftergroup\endinput % xintgcd already loaded. @@ -70,66 +77,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintgcd}% - [2019/09/10 v1.3f 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{\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\xintLCM {\romannumeral0\xintlcm}% -\def\xintlcm #1#2{\xintiilcm{\xintNum{#1}}{\xintNum{#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}}}% + [2020/01/31 v1.4 Euclide algorithm with xint package (JFB)]% \def\xintBezout {\romannumeral0\xintbezout }% \def\xintbezout #1% {% @@ -373,20 +321,6 @@ \xint: }% \def\XINT_bezalg_end_a #1#2#3#4{{#1}{#3}{0}{1}{#2}{#4}{1}{0}}% -\def\xintGCDof {\romannumeral0\xintgcdof }% -\def\xintgcdof #1{\expandafter\XINT_gcdof_a\romannumeral`&&@#1\xint:}% -\def\XINT_gcdof_a #1{\expandafter\XINT_gcdof_b\romannumeral`&&@#1!}% -\def\XINT_gcdof_b #1!#2{\expandafter\XINT_gcdof_c\romannumeral`&&@#2!{#1}!}% -\def\XINT_gcdof_c #1{\xint_gob_til_xint: #1\XINT_gcdof_e\xint:\XINT_gcdof_d #1}% -\def\XINT_gcdof_d #1!{\expandafter\XINT_gcdof_b\romannumeral0\xintgcd {#1}}% -\def\XINT_gcdof_e #1!#2!{ #2}% -\def\xintLCMof {\romannumeral0\xintlcmof }% -\def\xintlcmof #1{\expandafter\XINT_lcmof_a\romannumeral`&&@#1\xint:}% -\def\XINT_lcmof_a #1{\expandafter\XINT_lcmof_b\romannumeral`&&@#1!}% -\def\XINT_lcmof_b #1!#2{\expandafter\XINT_lcmof_c\romannumeral`&&@#2!{#1}!}% -\def\XINT_lcmof_c #1{\xint_gob_til_xint: #1\XINT_lcmof_e\xint:\XINT_lcmof_d #1}% -\def\XINT_lcmof_d #1!{\expandafter\XINT_lcmof_b\romannumeral0\xintlcm {#1}}% -\def\XINT_lcmof_e #1!#2!{ #2}% \def\xintTypesetEuclideAlgorithm {% \unless\ifdefined\xintAssignArray \errmessage |