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, 33 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
index 14d36771ab4..1493d23a544 100644
--- a/Master/texmf-dist/tex/generic/xint/xintgcd.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
@@ -22,7 +22,7 @@
%% in the same archive or directory.)
%%
%%----------------------------------------------------------------
-%% The xint bundle (version 1.04 of April 25, 2013)
+%% The xint bundle (version 1.05 of May 1st, 2013)
%% xintgcd: Euclidean algorithm with xint package
%% Copyright (C) 2013 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -133,7 +133,7 @@
\endlinechar=\the\endlinechar
\catcode13=\the\catcode13 % ^^M
\catcode32=\the\catcode32 %
- \catcode61=\the\catcode61 % =
+ \catcode61=\the\catcode61\relax % =
\noexpand\endinput
}%
\XINT@setcatcodes
@@ -162,18 +162,15 @@
\fi
\expandafter\x\csname ver@xintgcd.sty\endcsname
\ProvidesPackage{xintgcd}%
- [2013/04/25 v1.04 Euclide algorithm with xint package (jfB)]%
+ [2013/05/01 v1.05 Euclide algorithm with xint package (jfB)]%
\def\xintGCD {\romannumeral0\xintgcd }%
\def\xintgcd #1%
{%
- \expandafter \XINT@gcd \expandafter
- {\romannumeral0\xintiabs {#1}}%
+ \expandafter\XINT@gcd\expandafter{\romannumeral0\xintiabs {#1}}%
}%
\def\XINT@gcd #1#2%
{%
- \expandafter
- \XINT@gcd@fork
- \romannumeral0\xintiabs {#2}\Z #1\Z
+ \expandafter\XINT@gcd@fork\romannumeral0\xintiabs {#2}\Z #1\Z
}%
\def\XINT@gcd@fork #1#2\Z #3#4\Z
{%
@@ -208,8 +205,8 @@
{#1}%
}%
\def\xint@bezout #1#2%
-{\expandafter\expandafter\expandafter
- \XINT@bezout@fork #2\Z #1\Z
+{%
+ \expandafter\expandafter\expandafter\XINT@bezout@fork #2\Z #1\Z
}%
\def\XINT@bezout@fork #1#2\Z #3#4\Z
{%
@@ -253,14 +250,12 @@
}%
\def\XINT@bezout@mm@post #1#2%
{%
- \expandafter \XINT@bezout@mm@postb \expandafter
- {\romannumeral0\xintiopp{#2}}{\romannumeral0\xintiopp{#1}}%
+ \expandafter\XINT@bezout@mm@postb\expandafter
+ {\romannumeral0\xintiopp{#2}}{\romannumeral0\xintiopp{#1}}%
}%
\def\XINT@bezout@mm@postb #1#2%
{%
- \expandafter
- \XINT@bezout@mm@postc
- \expandafter {#2}{#1}%
+ \expandafter\XINT@bezout@mm@postc\expandafter {#2}{#1}%
}%
\def\XINT@bezout@mm@postc #1#2#3#4#5%
{%
@@ -273,7 +268,7 @@
}%
\def\XINT@bezout@mp@post #1#2%
{%
- \expandafter \XINT@bezout@mp@postb \expandafter
+ \expandafter\XINT@bezout@mp@postb\expandafter
{\romannumeral0\xintiopp {#2}}{#1}%
}%
\def\XINT@bezout@mp@postb #1#2#3#4#5%
@@ -352,13 +347,11 @@
\def\xintEuclideAlgorithm {\romannumeral0\xinteuclidealgorithm }%
\def\xinteuclidealgorithm #1%
{%
- \expandafter \XINT@euc \expandafter
- {\romannumeral0\xintiabs {#1}}%
+ \expandafter \XINT@euc \expandafter{\romannumeral0\xintiabs {#1}}%
}%
\def\XINT@euc #1#2%
{%
- \expandafter
- \XINT@euc@fork
+ \expandafter\XINT@euc@fork
\romannumeral0\xintiabs {#2}\Z #1\Z
}%
\def\XINT@euc@fork #1#2\Z #3#4\Z
@@ -374,8 +367,7 @@
\def\XINT@euc@BisZero #1#2#3#4#5#6{ {1}{0}{#3}{#3}{0}{0}}%
\def\XINT@euc@a #1#2#3%
{%
- \expandafter
- \XINT@euc@b
+ \expandafter\XINT@euc@b
\expandafter {\the\numexpr #1+1\expandafter }%
\romannumeral0\XINT@div@prepare {#2}{#3}{#2}%
}%
@@ -389,13 +381,13 @@
}%
\def\xint@euc@end0\XINT@euc@a #1#2#3#4\Z%
{%
- \expandafter\xint@euc@end@
- \romannumeral0%
- \XINT@rord@main {}#4{{#1}{#3}}%
- \xint@UNDEF
- \xint@undef\xint@undef\xint@undef\xint@undef
- \xint@undef\xint@undef\xint@undef\xint@undef
- \xint@UNDEF
+ \expandafter\xint@euc@end@
+ \romannumeral0%
+ \XINT@rord@main {}#4{{#1}{#3}}%
+ \xint@UNDEF
+ \xint@undef\xint@undef\xint@undef\xint@undef
+ \xint@undef\xint@undef\xint@undef\xint@undef
+ \xint@UNDEF
}%
\def\xint@euc@end@ #1#2#3%
{%
@@ -404,13 +396,11 @@
\def\xintBezoutAlgorithm {\romannumeral0\xintbezoutalgorithm }%
\def\xintbezoutalgorithm #1%
{%
- \expandafter \XINT@bezalg \expandafter
- {\romannumeral0\xintiabs {#1}}%
+ \expandafter \XINT@bezalg \expandafter{\romannumeral0\xintiabs {#1}}%
}%
\def\XINT@bezalg #1#2%
{%
- \expandafter
- \XINT@bezalg@fork
+ \expandafter\XINT@bezalg@fork
\romannumeral0\xintiabs {#2}\Z #1\Z
}%
\def\XINT@bezalg@fork #1#2\Z #3#4\Z
@@ -426,8 +416,7 @@
\def\XINT@bezalg@BisZero #1#2#3#4\Z{ {1}{0}{0}{1}{#3}{#3}{1}{0}{0}{0}{0}{1}}%
\def\XINT@bezalg@a #1#2#3%
{%
- \expandafter
- \XINT@bezalg@b
+ \expandafter\XINT@bezalg@b
\expandafter {\the\numexpr #1+1\expandafter }%
\romannumeral0\XINT@div@prepare {#2}{#3}{#2}%
}%
@@ -440,8 +429,7 @@
}%
\def\XINT@bezalg@c #1#2#3#4#5#6%
{%
- \expandafter\XINT@bezalg@d\expandafter
- {#2}{#3}{#4}{#5}{#6}{#1}%
+ \expandafter\XINT@bezalg@d\expandafter {#2}{#3}{#4}{#5}{#6}{#1}%
}%
\def\XINT@bezalg@d #1#2#3#4#5#6#7#8%
{%
@@ -453,13 +441,13 @@
}%
\def\xint@bezalg@end0\XINT@bezalg@a #1#2#3#4#5#6#7#8\Z
{%
- \expandafter\xint@bezalg@end@
- \romannumeral0%
- \XINT@rord@main {}#8{{#1}{#3}}%
- \xint@UNDEF
- \xint@undef\xint@undef\xint@undef\xint@undef
- \xint@undef\xint@undef\xint@undef\xint@undef
- \xint@UNDEF
+ \expandafter\xint@bezalg@end@
+ \romannumeral0%
+ \XINT@rord@main {}#8{{#1}{#3}}%
+ \xint@UNDEF
+ \xint@undef\xint@undef\xint@undef\xint@undef
+ \xint@undef\xint@undef\xint@undef\xint@undef
+ \xint@UNDEF
}%
\def\xint@bezalg@end@ #1#2#3#4%
{%
@@ -517,7 +505,7 @@
\edef\U{\BEZ{\the\numexpr 4*\N + 4\relax}}%
\edef\V{\BEZ{\the\numexpr 4*\N + 3\relax}}%
\edef\D{\BEZ5}%
- \ifodd\N\relax
+ \ifodd\N
$\U\times\A - \V\times \B = -\D$%
\else
$\U\times\A - \V\times\B = \D$%