diff options
author | Karl Berry <karl@freefriends.org> | 2013-11-28 23:21:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-11-28 23:21:36 +0000 |
commit | 6107abc859b998f72e77750454e95a1c076d22b7 (patch) | |
tree | 67151befe44cbd2232f894ef49ddf5d526fb06b0 /Master/texmf-dist/tex/generic/xint/xintgcd.sty | |
parent | 868273a311e482b0f2d4f227e52b51841c08253f (diff) |
xint (28nov13)
git-svn-id: svn://tug.org/texlive/trunk@32271 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintgcd.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintgcd.sty | 63 |
1 files changed, 29 insertions, 34 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty index a6e141b3084..7e0b39b038a 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.09g of November 22, 2013) +%% The xint bundle (version 1.09h of November 28, 2013) %% xintgcd: Euclidean algorithm with xint package %% Copyright (C) 2013 by Jean-Francois Burnol %%---------------------------------------------------------------- @@ -105,7 +105,7 @@ \XINTsetupcatcodes% \XINT_providespackage \ProvidesPackage{xintgcd}% - [2013/11/22 v1.09g Euclide algorithm with xint package (jfB)]% + [2013/11/28 v1.09h Euclide algorithm with xint package (jfB)]% \def\xintGCD {\romannumeral0\xintgcd }% \def\xintgcd #1% {% @@ -446,48 +446,43 @@ \xintAssignArray\xintEuclideAlgorithm {#1}{#2}\to\U \edef\A{\U2}\edef\B{\U4}\edef\N{\U1}% \setbox 0 \vbox{\halign {$##$\cr \A\cr \B \cr}}% - \noindent - \XINT_count 1 - \loop - \hbox to \wd 0 {\hfil$\U{\numexpr 2*\XINT_count\relax}$}% - ${} = \U{\numexpr 2*\XINT_count + 3\relax} - \times \U{\numexpr 2*\XINT_count + 2\relax} - + \U{\numexpr 2*\XINT_count + 4\relax}$% - \ifnum \XINT_count < \N - \hfill\break - \advance \XINT_count 1 + \count 255 1 + \xintloop + \indent\hbox to \wd 0 {\hfil$\U{\numexpr 2*\count255\relax}$}% + ${} = \U{\numexpr 2*\count255 + 3\relax} + \times \U{\numexpr 2*\count255 + 2\relax} + + \U{\numexpr 2*\count255 + 4\relax}$% + \ifnum \count255 < \N + \par + \advance \count255 1 \repeat - \par \endgroup }% \def\xintTypesetBezoutAlgorithm #1#2% {% \par \begingroup - \parindent0pt \xintAssignArray\xintBezoutAlgorithm {#1}{#2}\to\BEZ \edef\A{\BEZ2}\edef\B{\BEZ6}\edef\N{\BEZ1}% A = |#1|, B = |#2| \setbox 0 \vbox{\halign {$##$\cr \A\cr \B \cr}}% - \XINT_count 1 - \loop - \noindent - \hbox to \wd 0 {\hfil$\BEZ{4*\XINT_count - 2}$}% - ${} = \BEZ{4*\XINT_count + 5} - \times \BEZ{4*\XINT_count + 2} - + \BEZ{4*\XINT_count + 6}$\hfill\break - \hbox to \wd 0 {\hfil$\BEZ{4*\XINT_count +7}$}% - ${} = \BEZ{4*\XINT_count + 5} - \times \BEZ{4*\XINT_count + 3} - + \BEZ{4*\XINT_count - 1}$\hfill\break - \hbox to \wd 0 {\hfil$\BEZ{4*\XINT_count +8}$}% - ${} = \BEZ{4*\XINT_count + 5} - \times \BEZ{4*\XINT_count + 4} - + \BEZ{4*\XINT_count }$ - \endgraf - \ifnum \XINT_count < \N - \advance \XINT_count 1 + \count255 1 + \xintloop + \indent\hbox to \wd 0 {\hfil$\BEZ{4*\count255 - 2}$}% + ${} = \BEZ{4*\count255 + 5} + \times \BEZ{4*\count255 + 2} + + \BEZ{4*\count255 + 6}$\hfill\break + \hbox to \wd 0 {\hfil$\BEZ{4*\count255 +7}$}% + ${} = \BEZ{4*\count255 + 5} + \times \BEZ{4*\count255 + 3} + + \BEZ{4*\count255 - 1}$\hfill\break + \hbox to \wd 0 {\hfil$\BEZ{4*\count255 +8}$}% + ${} = \BEZ{4*\count255 + 5} + \times \BEZ{4*\count255 + 4} + + \BEZ{4*\count255 }$ + \par + \ifnum \count255 < \N + \advance \count255 1 \repeat - \par \edef\U{\BEZ{4*\N + 4}}% \edef\V{\BEZ{4*\N + 3}}% \edef\D{\BEZ5}% @@ -496,7 +491,7 @@ \else $\U\times\A - \V\times\B = \D$% \fi - \par + \par \endgroup }% \XINT_restorecatcodes_endinput% |