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.sty79
1 files changed, 38 insertions, 41 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
index 6dc7319aea5..e4db522a478 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 (version 1.09h of November 28, 2013)
+%% The xint bundle (version 1.09i of December 18, 2013)
%% xintgcd: Euclidean algorithm with xint package
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -103,7 +103,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintgcd}%
- [2013/11/28 v1.09h Euclide algorithm with xint package (jfB)]%
+ [2013/12/18 v1.09i Euclide algorithm with xint package (jfB)]%
\def\xintGCD {\romannumeral0\xintgcd }%
\def\xintgcd #1%
{%
@@ -116,9 +116,9 @@
\def\XINT_gcd_fork #1#2\Z #3#4\Z
{%
\xint_UDzerofork
- #1\dummy \XINT_gcd_BisZero
- #3\dummy \XINT_gcd_AisZero
- 0\dummy \XINT_gcd_loop
+ #1\XINT_gcd_BisZero
+ #3\XINT_gcd_AisZero
+ 0\XINT_gcd_loop
\krof
{#1#2}{#3#4}%
}%
@@ -146,10 +146,9 @@
\def\XINT_gcdof_e #1\Z #2\Z { #2}%
\def\xintGCDof:csv #1{\expandafter\XINT_gcdof:_b\romannumeral-`0#1,,}%
\def\XINT_gcdof:_b #1,#2,{\expandafter\XINT_gcdof:_c\romannumeral-`0#2,{#1},}%
-\def\XINT_gcdof:_c #1{\if #1,\expandafter\XINT_gcdof:_e
+\def\XINT_gcdof:_c #1{\if #1,\expandafter\XINT_of:_e
\else\expandafter\XINT_gcdof:_d\fi #1}%
\def\XINT_gcdof:_d #1,{\expandafter\XINT_gcdof:_b\romannumeral0\xintgcd {#1}}%
-\def\XINT_gcdof:_e ,#1,{#1}%
\def\xintLCM {\romannumeral0\xintlcm}%
\def\xintlcm #1%
{%
@@ -162,9 +161,9 @@
\def\XINT_lcm_fork #1#2\Z #3#4\Z
{%
\xint_UDzerofork
- #1\dummy \XINT_lcm_BisZero
- #3\dummy \XINT_lcm_AisZero
- 0\dummy \expandafter
+ #1\XINT_lcm_BisZero
+ #3\XINT_lcm_AisZero
+ 0\expandafter
\krof
\XINT_lcm_notzero\expandafter{\romannumeral0\XINT_gcd_loop {#1#2}{#3#4}}%
{#1#2}{#3#4}%
@@ -181,10 +180,9 @@
\def\XINT_lcmof_e #1\Z #2\Z { #2}%
\def\xintLCMof:csv #1{\expandafter\XINT_lcmof:_a\romannumeral-`0#1,,}%
\def\XINT_lcmof:_a #1,#2,{\expandafter\XINT_lcmof:_c\romannumeral-`0#2,{#1},}%
-\def\XINT_lcmof:_c #1{\if#1,\expandafter\XINT_lcmof:_e
+\def\XINT_lcmof:_c #1{\if#1,\expandafter\XINT_of:_e
\else\expandafter\XINT_lcmof:_d\fi #1}%
\def\XINT_lcmof:_d #1,{\expandafter\XINT_lcmof:_a\romannumeral0\xintlcm {#1}}%
-\def\XINT_lcmof:_e ,#1,{#1}%
\def\xintBezout {\romannumeral0\xintbezout }%
\def\xintbezout #1%
{%
@@ -197,36 +195,35 @@
\def\XINT_bezout_fork #1#2\Z #3#4\Z
{%
\xint_UDzerosfork
- #1#3\dummy \XINT_bezout_botharezero
- #10\dummy \XINT_bezout_secondiszero
- #30\dummy \XINT_bezout_firstiszero
- 00\dummy
- {\xint_UDsignsfork
- #1#3\dummy \XINT_bezout_minusminus % A < 0, B < 0
- #1-\dummy \XINT_bezout_minusplus % A > 0, B < 0
- #3-\dummy \XINT_bezout_plusminus % A < 0, B > 0
- --\dummy \XINT_bezout_plusplus % A > 0, B > 0
+ #1#3\XINT_bezout_botharezero
+ #10\XINT_bezout_secondiszero
+ #30\XINT_bezout_firstiszero
+ 00{\xint_UDsignsfork
+ #1#3\XINT_bezout_minusminus % A < 0, B < 0
+ #1-\XINT_bezout_minusplus % A > 0, B < 0
+ #3-\XINT_bezout_plusminus % A < 0, B > 0
+ --\XINT_bezout_plusplus % A > 0, B > 0
\krof }%
\krof
{#2}{#4}#1#3{#3#4}{#1#2}% #1#2=B, #3#4=A
}%
-\def\XINT_bezout_botharezero #1#2#3#4#5#6%
+\edef\XINT_bezout_botharezero #1#2#3#4#5#6%
{%
- \xintError:NoBezoutForZeros
+ \noexpand\xintError:NoBezoutForZeros
\space {0}{0}{0}{0}{0}%
}%
\def\XINT_bezout_firstiszero #1#2#3#4#5#6%
{%
\xint_UDsignfork
- #3\dummy { {0}{#3#1}{0}{1}{#1}}%
- -\dummy { {0}{#3#1}{0}{-1}{#1}}%
+ #3{ {0}{#3#1}{0}{1}{#1}}%
+ -{ {0}{#3#1}{0}{-1}{#1}}%
\krof
}%
\def\XINT_bezout_secondiszero #1#2#3#4#5#6%
{%
\xint_UDsignfork
- #4\dummy{ {#4#2}{0}{-1}{0}{#2}}%
- -\dummy{ {#4#2}{0}{1}{0}{#2}}%
+ #4{ {#4#2}{0}{-1}{0}{#2}}%
+ -{ {#4#2}{0}{1}{0}{#2}}%
\krof
}%
\def\XINT_bezout_minusminus #1#2#3#4%
@@ -243,7 +240,7 @@
{%
\expandafter\XINT_bezout_mm_postc\expandafter {#2}{#1}%
}%
-\def\XINT_bezout_mm_postc #1#2#3#4#5%
+\edef\XINT_bezout_mm_postc #1#2#3#4#5%
{%
\space {#4}{#5}{#1}{#2}{#3}%
}%
@@ -257,7 +254,7 @@
\expandafter\XINT_bezout_mp_postb\expandafter
{\romannumeral0\xintiiopp {#2}}{#1}%
}%
-\def\XINT_bezout_mp_postb #1#2#3#4#5%
+\edef\XINT_bezout_mp_postb #1#2#3#4#5%
{%
\space {#4}{#5}{#2}{#1}{#3}%
}%
@@ -271,7 +268,7 @@
\expandafter \XINT_bezout_pm_postb \expandafter
{\romannumeral0\xintiiopp{#1}}%
}%
-\def\XINT_bezout_pm_postb #1#2#3#4#5%
+\edef\XINT_bezout_pm_postb #1#2#3#4#5%
{%
\space {#4}{#5}{#1}{#2}{#3}%
}%
@@ -280,7 +277,7 @@
\expandafter\XINT_bezout_pp_post
\romannumeral0\XINT_bezout_loop_a 1{#3#1}{#4#2}1001%
}%
-\def\XINT_bezout_pp_post #1#2#3#4#5%
+\edef\XINT_bezout_pp_post #1#2#3#4#5%
{%
\space {#4}{#5}{#1}{#2}{#3}%
}%
@@ -322,11 +319,11 @@
\else\expandafter\XINT_bezout_exitodd
\fi
}%
-\def\XINT_bezout_exiteven #1#2#3#4#5%
+\edef\XINT_bezout_exiteven #1#2#3#4#5%
{%
\space {#5}{#4}{#1}%
}%
-\def\XINT_bezout_exitodd #1#2#3#4#5%
+\edef\XINT_bezout_exitodd #1#2#3#4#5%
{%
\space {-#5}{-#4}{#1}%
}%
@@ -342,9 +339,9 @@
\def\XINT_euc_fork #1#2\Z #3#4\Z
{%
\xint_UDzerofork
- #1\dummy \XINT_euc_BisZero
- #3\dummy \XINT_euc_AisZero
- 0\dummy \XINT_euc_a
+ #1\XINT_euc_BisZero
+ #3\XINT_euc_AisZero
+ 0\XINT_euc_a
\krof
{0}{#1#2}{#3#4}{{#3#4}{#1#2}}{}\Z
}%
@@ -374,7 +371,7 @@
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_relax
}%
-\def\xint_euc_end_ #1#2#3%
+\edef\xint_euc_end_ #1#2#3%
{%
\space {#1}{#3}{#2}%
}%
@@ -390,9 +387,9 @@
\def\XINT_bezalg_fork #1#2\Z #3#4\Z
{%
\xint_UDzerofork
- #1\dummy \XINT_bezalg_BisZero
- #3\dummy \XINT_bezalg_AisZero
- 0\dummy \XINT_bezalg_a
+ #1\XINT_bezalg_BisZero
+ #3\XINT_bezalg_AisZero
+ 0\XINT_bezalg_a
\krof
0{#1#2}{#3#4}1001{{#3#4}{#1#2}}{}\Z
}%
@@ -433,7 +430,7 @@
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_relax
}%
-\def\xint_bezalg_end_ #1#2#3#4%
+\edef\xint_bezalg_end_ #1#2#3#4%
{%
\space {#1}{#3}{0}{1}{#2}{#4}{1}{0}%
}%