summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintgcd.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintgcd.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintgcd.sty78
1 files changed, 39 insertions, 39 deletions
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%
{%