diff options
author | Karl Berry <karl@freefriends.org> | 2017-01-07 23:38:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-01-07 23:38:44 +0000 |
commit | 59d321e899ed5a0ba1607c5c2ffc39192feea615 (patch) | |
tree | a2da6664231860296e14fff8d6609e580a276aba /Master/texmf-dist/tex/generic/xint/xint.sty | |
parent | 989cfdb299c13ca826bf94eb4cf7b31dd1301a57 (diff) |
xint (8jan17)
git-svn-id: svn://tug.org/texlive/trunk@42892 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xint.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xint.sty | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty index f462fd3c81b..5373d135d0c 100644 --- a/Master/texmf-dist/tex/generic/xint/xint.sty +++ b/Master/texmf-dist/tex/generic/xint/xint.sty @@ -21,8 +21,8 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.2j 2016/12/22 -%% Copyright (C) 2013-2016 by Jean-Francois Burnol +%% The xint bundle 1.2k 2017/01/06 +%% Copyright (C) 2013-2017 by Jean-Francois Burnol %% xint: Expandable operations on big integers %% --------------------------------------------------------------- \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty (loaded by xintcore.sty) \XINT_providespackage \ProvidesPackage{xint}% - [2016/12/22 1.2j Expandable operations on big integers (JFB)]% + [2017/01/06 1.2k Expandable operations on big integers (JFB)]% \long\def\xint_firstofthree #1#2#3{#1}% \long\def\xint_secondofthree #1#2#3{#2}% \long\def\xint_thirdofthree #1#2#3{#3}% @@ -99,8 +99,8 @@ \unless\if#11\xint_dothis{ 0}\fi \xint_orthat{ 1}% }% -\def\XINT_isOne #1{\XINT_iSone#1XY}% -\def\XINT_iSone #1#2#3Y% +\def\XINT_isOne #1{\XINT_is_one#1XY}% +\def\XINT_is_one #1#2#3Y% {% \unless\if#2X\xint_dothis0\fi \unless\if#11\xint_dothis0\fi @@ -108,19 +108,18 @@ }% \let\xintRev\xintReverseDigits \def\xintLen {\romannumeral0\xintlen }% -\def\xintlen #1% +\def\xintlen #1{\def\xintlen ##1% {% - \expandafter\XINT_len_fork - \romannumeral0\xintnum{#1}\xint_relax\xint_relax\xint_relax\xint_relax + \expandafter#1\the\numexpr + \expandafter\XINT_len_fork\romannumeral0\xintnum{##1}% + \xint_relax\xint_relax\xint_relax\xint_relax \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax \xint_c_viii\xint_c_vii\xint_c_vi\xint_c_v \xint_c_iv\xint_c_iii\xint_c_ii\xint_c_i\xint_c_\xint_bye\relax -}% -\edef\XINT_len_fork #1% +}}\xintlen{ }% +\def\XINT_len_fork #1% {% - \noexpand\expandafter\space - \unexpanded{\the\numexpr\expandafter - \XINT_length_loop\xint_UDsignfork#1{}-{#1}\krof}% + \expandafter\XINT_length_loop\xint_UDsignfork#1{}-#1\krof }% \def\xintBool #1{\romannumeral`&&@% \csname if#1\endcsname\expandafter1\else\expandafter0\fi }% @@ -1108,8 +1107,10 @@ \def\xintiiSqrtR {\romannumeral0\xintiisqrtr }% \def\xintiiSquareRoot {\romannumeral0\xintiisquareroot }% \def\xintiSqrt {\romannumeral0\xintisqrt }% +\def\xintiSqrtR {\romannumeral0\xintisqrtr }% \def\xintiSquareRoot {\romannumeral0\xintisquareroot }% \def\xintisqrt {\expandafter\XINT_sqrt_post\romannumeral0\xintisquareroot }% +\def\xintisqrtr {\expandafter\XINT_sqrtr_post\romannumeral0\xintisquareroot }% \def\xintiisqrt {\expandafter\XINT_sqrt_post\romannumeral0\xintiisquareroot }% \def\xintiisqrtr {\expandafter\XINT_sqrtr_post\romannumeral0\xintiisquareroot }% \def\XINT_sqrt_post #1#2{\XINT_dec #1\XINT_dec_bye234567890\xint_bye}% @@ -1126,8 +1127,8 @@ 0-{\XINT_sqrt #1}% \krof }% -\def\XINT_sqrt_iszero #1\xint_relax { 11}% -\edef\XINT_sqrt_isneg #1\xint_relax {\noexpand\xintError:RootOfNegative\space 11}% +\def\XINT_sqrt_iszero #1\xint_relax {{1}{1}}% +\def\XINT_sqrt_isneg #1\xint_relax {\xintError:RootOfNegative{1}{1}}% \def\XINT_sqrt #1\xint_relax {% \expandafter\XINT_sqrt_start\romannumeral0\xintlength {#1}.#1.% |