summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-27 21:26:25 +0000
committerKarl Berry <karl@freefriends.org>2017-07-27 21:26:25 +0000
commitfe6cc7d43e9608cb5bb2533480000837d7cf4827 (patch)
tree3098f2a8b1933b247a3aa7f6b58bb4e7dcca58f0 /Master/texmf-dist/tex/generic/xint
parent654d2d2ad9ef4fc4de9cfd3b3d6038ef14ad4161 (diff)
xint (27jul17)
git-svn-id: svn://tug.org/texlive/trunk@44900 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xint.sty447
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintbinhex.sty64
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcfrac.sty192
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcore.sty1980
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintexpr.sty57
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintfrac.sty467
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintgcd.sty160
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintkernel.sty70
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintseries.sty16
-rw-r--r--Master/texmf-dist/tex/generic/xint/xinttools.sty212
10 files changed, 1893 insertions, 1772 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty
index 5373d135d0c..de8669e6acb 100644
--- a/Master/texmf-dist/tex/generic/xint/xint.sty
+++ b/Master/texmf-dist/tex/generic/xint/xint.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xint: Expandable operations on big integers
%% ---------------------------------------------------------------
@@ -70,17 +70,13 @@
\XINTsetupcatcodes% defined in xintkernel.sty (loaded by xintcore.sty)
\XINT_providespackage
\ProvidesPackage{xint}%
- [2017/01/06 1.2k Expandable operations on big integers (JFB)]%
+ [2017/07/26 1.2l 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}%
\long\def\xint_firstofthree_thenstop #1#2#3{ #1}% 1.09i
\long\def\xint_secondofthree_thenstop #1#2#3{ #2}%
\long\def\xint_thirdofthree_thenstop #1#2#3{ #3}%
-\edef\xint_cleanupzeros_andstop #1#2#3#4%
-{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4\relax
-}%
\def\xintSgnFork {\romannumeral0\xintsgnfork }%
\def\xintsgnfork #1%
{%
@@ -99,21 +95,56 @@
\unless\if#11\xint_dothis{ 0}\fi
\xint_orthat{ 1}%
}%
-\def\XINT_isOne #1{\XINT_is_one#1XY}%
-\def\XINT_is_one #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
\xint_orthat1%
}%
+\def\xintReverseDigits {\romannumeral0\xintreversedigits }%
+\def\xintreversedigits #1%
+{%
+ \expandafter\XINT_revdigits\romannumeral`&&@#1%
+ {\XINT_microrevsep_end\W}\XINT_microrevsep_end
+ \XINT_microrevsep_end\XINT_microrevsep_end
+ \XINT_microrevsep_end\XINT_microrevsep_end
+ \XINT_microrevsep_end\XINT_microrevsep_end\XINT_microrevsep_end\Z
+ 1\Z!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
+}%
+\def\XINT_revdigits #1%
+{%
+ \xint_UDsignfork
+ #1{\expandafter-\romannumeral0\XINT_revdigits_a}%
+ -{\XINT_revdigits_a #1}%
+ \krof
+}%
+\def\XINT_revdigits_a
+{%
+ \expandafter\XINT_revdigits_b\expandafter{\expandafter}%
+ \the\numexpr\XINT_microrevsep
+}%
+\def\XINT_microrevsep #1#2#3#4#5#6#7#8#9%
+{%
+ 1#9#8#7#6#5#4#3#2#1\expandafter!\the\numexpr\XINT_microrevsep
+}%
+\def\XINT_microrevsep_end #1\W #2\expandafter #3\Z{\relax#2!}%
+\def\XINT_revdigits_b #11#2!1#3!1#4!1#5!1#6!1#7!1#8!1#9!%
+{%
+ \xint_gob_til_R #9\XINT_revdigits_end\R
+ \XINT_revdigits_b {#9#8#7#6#5#4#3#2#1}%
+}%
+\def\XINT_revdigits_end#1{%
+\def\XINT_revdigits_end\R\XINT_revdigits_b ##1##2\W
+ {\expandafter#1\xint_gob_til_Z ##1}%
+}\XINT_revdigits_end{ }%
\let\xintRev\xintReverseDigits
\def\xintLen {\romannumeral0\xintlen }%
\def\xintlen #1{\def\xintlen ##1%
{%
\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:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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
}}\xintlen{ }%
@@ -284,172 +315,6 @@
\expandafter\xint_secondoftwo_thenstop
\fi
}%
-\def\xintCmp {\romannumeral0\xintcmp }%
-\def\xintcmp #1{\expandafter\XINT_icmp\romannumeral0\xintnum{#1}\Z }%
-\def\xintiiCmp {\romannumeral0\xintiicmp }%
-\def\xintiicmp #1{\expandafter\XINT_iicmp\romannumeral`&&@#1\Z }%
-\def\XINT_iicmp #1#2\Z #3%
-{%
- \expandafter\XINT_cmp_nfork\expandafter #1\romannumeral`&&@#3\Z #2\Z
-}%
-\let\XINT_Cmp \xintiiCmp
-\def\XINT_icmp #1#2\Z #3%
-{%
- \expandafter\XINT_cmp_nfork\expandafter #1\romannumeral0\xintnum{#3}\Z #2\Z
-}%
-\def\XINT_cmp_nfork #1#2%
-{%
- \xint_UDzerofork
- #1\XINT_cmp_firstiszero
- #2\XINT_cmp_secondiszero
- 0{}%
- \krof
- \xint_UDsignsfork
- #1#2\XINT_cmp_minusminus
- #1-\XINT_cmp_minusplus
- #2-\XINT_cmp_plusminus
- --\XINT_cmp_plusplus
- \krof #1#2%
-}%
-\def\XINT_cmp_firstiszero #1\krof 0#2#3\Z #4\Z
-{%
- \xint_UDzerominusfork
- #2-{ 0}%
- 0#2{ 1}%
- 0-{ -1}%
- \krof
-}%
-\def\XINT_cmp_secondiszero #1\krof #20#3\Z #4\Z
-{%
- \xint_UDzerominusfork
- #2-{ 0}%
- 0#2{ -1}%
- 0-{ 1}%
- \krof
-}%
-\def\XINT_cmp_plusminus #1\Z #2\Z{ 1}%
-\def\XINT_cmp_minusplus #1\Z #2\Z{ -1}%
-\def\XINT_cmp_minusminus
- --{\expandafter\XINT_opp\romannumeral0\XINT_cmp_plusplus {}{}}%
-\def\XINT_cmp_plusplus #1#2#3\Z
-{%
- \expandafter\XINT_cmp_pp
- \romannumeral0\expandafter\XINT_sepandrev_andcount
- \romannumeral0\XINT_zeroes_forviii #2#3\R\R\R\R\R\R\R\R{10}0000001\W
- #2#3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
- \X #1%
-}%
-\def\XINT_cmp_pp #1.#2\X #3\Z
-{%
- \expandafter\XINT_cmp_checklengths
- \the\numexpr #1\expandafter.%
- \romannumeral0\expandafter\XINT_sepandrev_andcount
- \romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W
- #3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax \xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
- \Z!\Z!\Z!\Z!\Z!\W #2\Z!\Z!\Z!\Z!\Z!\W
-}%
-\def\XINT_cmp_checklengths #1.#2.%
-{%
- \ifnum #1=#2
- \expandafter\xint_firstoftwo
- \else
- \expandafter\xint_secondoftwo
- \fi
- \XINT_cmp_aa {\XINT_cmp_distinctlengths {#1}{#2}}%
-}%
-\def\XINT_cmp_distinctlengths #1#2#3\W #4\W
-{%
- \ifnum #1>#2
- \expandafter\xint_firstoftwo
- \else
- \expandafter\xint_secondoftwo
- \fi
- { -1}{ 1}%
-}%
-\def\XINT_cmp_aa {\expandafter\XINT_cmp_w\the\numexpr\XINT_cmp_a \xint_c_i }%
-\def\XINT_cmp_a #1!#2!#3!#4!#5\W #6!#7!#8!#9!%
-{%
- \XINT_cmp_b #1!#6!#2!#7!#3!#8!#4!#9!#5\W
-}%
-\def\XINT_cmp_b #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_cmp_bi \Z
- \expandafter\XINT_cmp_c\the\numexpr#1+1#4-#3-\xint_c_i.%
-}%
-\def\XINT_cmp_c 1#1#2.%
-{%
- 1#2\expandafter!\the\numexpr\XINT_cmp_d #1%
-}%
-\def\XINT_cmp_d #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_cmp_di \Z
- \expandafter\XINT_cmp_e\the\numexpr#1+1#4-#3-\xint_c_i.%
-}%
-\def\XINT_cmp_e 1#1#2.%
-{%
- 1#2\expandafter!\the\numexpr\XINT_cmp_f #1%
-}%
-\def\XINT_cmp_f #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_cmp_fi \Z
- \expandafter\XINT_cmp_g\the\numexpr#1+1#4-#3-\xint_c_i.%
-}%
-\def\XINT_cmp_g 1#1#2.%
-{%
- 1#2\expandafter!\the\numexpr\XINT_cmp_h #1%
-}%
-\def\XINT_cmp_h #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_cmp_hi \Z
- \expandafter\XINT_cmp_i\the\numexpr#1+1#4-#3-\xint_c_i.%
-}%
-\def\XINT_cmp_i 1#1#2.%
-{%
- 1#2\expandafter!\the\numexpr\XINT_cmp_a #1%
-}%
-\def\XINT_cmp_bi\Z
- \expandafter\XINT_cmp_c\the\numexpr#1+1#2-#3.#4!#5!#6!#7!#8!#9!\Z !\W
-{%
- \XINT_cmp_k #1#2!#5!#7!#9!%
-}%
-\def\XINT_cmp_di\Z
- \expandafter\XINT_cmp_e\the\numexpr#1+1#2-#3.#4!#5!#6!#7!#8\W
-{%
- \XINT_cmp_k #1#2!#5!#7!%
-}%
-\def\XINT_cmp_fi\Z
- \expandafter\XINT_cmp_g\the\numexpr#1+1#2-#3.#4!#5!#6\W
-{%
- \XINT_cmp_k #1#2!#5!%
-}%
-\def\XINT_cmp_hi\Z
- \expandafter\XINT_cmp_i\the\numexpr#1+1#2-#3.#4\W
-{%
- \XINT_cmp_k #1#2!%
-}%
-\def\XINT_cmp_k #1#2\W
-{%
- \xint_UDzerofork
- #1{-1\relax \XINT_cmp_greater}%
- 0{-1\relax \XINT_cmp_lessorequal}%
- \krof
-}%
-\def\XINT_cmp_w #1-1#2{#2#11\Z!\W}%
-\def\XINT_cmp_greater #1\Z!\W{ 1}%
-\def\XINT_cmp_lessorequal 1#1!%
- {\xint_gob_til_Z #1\XINT_cmp_equal\Z
- \xint_gob_til_eightzeroes #1\XINT_cmp_continue 00000000%
- \XINT_cmp_less }%
-\def\XINT_cmp_less #1\W { -1}%
-\def\XINT_cmp_continue 00000000\XINT_cmp_less {\XINT_cmp_lessorequal }%
-\def\XINT_cmp_equal\Z\xint_gob_til_eightzeroes\Z\XINT_cmp_continue
- 00000000\XINT_cmp_less\W { 0}%
\def\xintEq {\romannumeral0\xinteq }\def\xinteq #1#2{\xintifeq{#1}{#2}{1}{0}}%
\def\xintGt {\romannumeral0\xintgt }\def\xintgt #1#2{\xintifgt{#1}{#2}{1}{0}}%
\def\xintLt {\romannumeral0\xintlt }\def\xintlt #1#2{\xintiflt{#1}{#2}{1}{0}}%
@@ -487,48 +352,48 @@
\def\xintxor #1#2{\if\xintIsZero{#1}\xintIsZero{#2}%
\xint_afterfi{ 0}\else\xint_afterfi{ 1}\fi }%
\def\xintANDof {\romannumeral0\xintandof }%
-\def\xintandof #1{\expandafter\XINT_andof_a\romannumeral`&&@#1\relax }%
-\def\XINT_andof_a #1{\expandafter\XINT_andof_b\romannumeral`&&@#1\Z }%
+\def\xintandof #1{\expandafter\XINT_andof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_andof_a #1{\expandafter\XINT_andof_b\romannumeral`&&@#1!}%
\def\XINT_andof_b #1%
- {\xint_gob_til_relax #1\XINT_andof_e\relax\XINT_andof_c #1}%
-\def\XINT_andof_c #1\Z
+ {\xint_gob_til_xint: #1\XINT_andof_e\xint:\XINT_andof_c #1}%
+\def\XINT_andof_c #1!%
{\xintifTrueAelseB {#1}{\XINT_andof_a}{\XINT_andof_no}}%
-\def\XINT_andof_no #1\relax { 0}%
-\def\XINT_andof_e #1\Z { 1}%
+\def\XINT_andof_no #1\xint:{ 0}%
+\def\XINT_andof_e #1!{ 1}%
\def\xintORof {\romannumeral0\xintorof }%
-\def\xintorof #1{\expandafter\XINT_orof_a\romannumeral`&&@#1\relax }%
-\def\XINT_orof_a #1{\expandafter\XINT_orof_b\romannumeral`&&@#1\Z }%
+\def\xintorof #1{\expandafter\XINT_orof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_orof_a #1{\expandafter\XINT_orof_b\romannumeral`&&@#1!}%
\def\XINT_orof_b #1%
- {\xint_gob_til_relax #1\XINT_orof_e\relax\XINT_orof_c #1}%
-\def\XINT_orof_c #1\Z
+ {\xint_gob_til_xint: #1\XINT_orof_e\xint:\XINT_orof_c #1}%
+\def\XINT_orof_c #1!%
{\xintifTrueAelseB {#1}{\XINT_orof_yes}{\XINT_orof_a}}%
-\def\XINT_orof_yes #1\relax { 1}%
-\def\XINT_orof_e #1\Z { 0}%
+\def\XINT_orof_yes #1\xint:{ 1}%
+\def\XINT_orof_e #1!{ 0}%
\def\xintXORof {\romannumeral0\xintxorof }%
\def\xintxorof #1{\expandafter\XINT_xorof_a\expandafter
- 0\romannumeral`&&@#1\relax }%
-\def\XINT_xorof_a #1#2{\expandafter\XINT_xorof_b\romannumeral`&&@#2\Z #1}%
+ 0\romannumeral`&&@#1\xint:}%
+\def\XINT_xorof_a #1#2{\expandafter\XINT_xorof_b\romannumeral`&&@#2!#1}%
\def\XINT_xorof_b #1%
- {\xint_gob_til_relax #1\XINT_xorof_e\relax\XINT_xorof_c #1}%
-\def\XINT_xorof_c #1\Z #2%
+ {\xint_gob_til_xint: #1\XINT_xorof_e\xint:\XINT_xorof_c #1}%
+\def\XINT_xorof_c #1!#2%
{\xintifTrueAelseB {#1}{\if #20\xint_afterfi{\XINT_xorof_a 1}%
\else\xint_afterfi{\XINT_xorof_a 0}\fi}%
{\XINT_xorof_a #2}%
}%
-\def\XINT_xorof_e #1\Z #2{ #2}%
+\def\XINT_xorof_e #1!#2{ #2}%
\def\xintGeq {\romannumeral0\xintgeq }%
-\def\xintgeq #1{\expandafter\XINT_geq\romannumeral0\xintnum{#1}\Z }%
+\def\xintgeq #1{\expandafter\XINT_geq\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiGeq {\romannumeral0\xintiigeq }%
-\def\xintiigeq #1{\expandafter\XINT_iigeq\romannumeral`&&@#1\Z }%
-\def\XINT_iigeq #1#2\Z #3%
+\def\xintiigeq #1{\expandafter\XINT_iigeq\romannumeral`&&@#1\xint:}%
+\def\XINT_iigeq #1#2\xint:#3%
{%
- \expandafter\XINT_geq_fork\expandafter #1\romannumeral`&&@#3\Z #2\Z
+ \expandafter\XINT_geq_fork\expandafter #1\romannumeral`&&@#3\xint:#2\xint:
}%
\let\XINT_geq_pre \xintiigeq % TEMPORAIRE (oui, mais depuis quand ?)
\let\XINT_Geq \xintGeq % TEMPORAIRE ATTENTION FAIT xintNum (et alors?)
-\def\XINT_geq #1#2\Z #3%
+\def\XINT_geq #1#2\xint:#3%
{%
- \expandafter\XINT_geq_fork\expandafter #1\romannumeral0\xintnum{#3}\Z #2\Z
+ \expandafter\XINT_geq_fork\expandafter #1\romannumeral0\xintnum{#3}\xint:#2\xint:
}%
\def\XINT_geq_fork #1#2%
{%
@@ -544,37 +409,37 @@
--\XINT_geq_plusplus
\krof #1#2%
}%
-\def\XINT_geq_firstiszero #1\krof 0#2#3\Z #4\Z
+\def\XINT_geq_firstiszero #1\krof 0#2#3\xint:#4\xint:
{\xint_UDzerofork #2{ 1}0{ 0}\krof }%
-\def\XINT_geq_secondiszero #1\krof #20#3\Z #4\Z { 1}%
+\def\XINT_geq_secondiszero #1\krof #20#3\xint:#4\xint:{ 1}%
\def\XINT_geq_plusminus #1-{\XINT_geq_plusplus #1{}}%
\def\XINT_geq_minusplus -#1{\XINT_geq_plusplus {}#1}%
\def\XINT_geq_minusminus --{\XINT_geq_plusplus {}{}}%
-\def\XINT_geq_plusplus #1#2#3\Z #4\Z {\XINT_geq_pp #1#4\Z #2#3\Z }%
-\def\XINT_geq_pp #1\Z
+\def\XINT_geq_plusplus #1#2#3\xint:#4\xint:{\XINT_geq_pp #1#4\xint:#2#3\xint:}%
+\def\XINT_geq_pp #1\xint:
{%
\expandafter\XINT_geq_pp_a
\romannumeral0\expandafter\XINT_sepandrev_andcount
\romannumeral0\XINT_zeroes_forviii #1\R\R\R\R\R\R\R\R{10}0000001\W
#1\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
\X
}%
-\def\XINT_geq_pp_a #1.#2\X #3\Z
+\def\XINT_geq_pp_a #1\xint:#2\X #3\xint:
{%
\expandafter\XINT_geq_checklengths
- \the\numexpr #1\expandafter.%
+ \the\numexpr #1\expandafter\xint:%
\romannumeral0\expandafter\XINT_sepandrev_andcount
\romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W
#3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax \xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
\Z!\Z!\Z!\Z!\Z!\W #2\Z!\Z!\Z!\Z!\Z!\W
}%
-\def\XINT_geq_checklengths #1.#2.%
+\def\XINT_geq_checklengths #1\xint:#2\xint:
{%
\ifnum #1=#2
\expandafter\xint_firstoftwo
@@ -600,56 +465,56 @@
\def\XINT_geq_b #1#2#3!#4!%
{%
\xint_gob_til_Z #2\XINT_geq_bi \Z
- \expandafter\XINT_geq_c\the\numexpr#1+1#4-#3-\xint_c_i.%
+ \expandafter\XINT_geq_c\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
}%
-\def\XINT_geq_c 1#1#2.%
+\def\XINT_geq_c 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_geq_d #1%
}%
\def\XINT_geq_d #1#2#3!#4!%
{%
\xint_gob_til_Z #2\XINT_geq_di \Z
- \expandafter\XINT_geq_e\the\numexpr#1+1#4-#3-\xint_c_i.%
+ \expandafter\XINT_geq_e\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
}%
-\def\XINT_geq_e 1#1#2.%
+\def\XINT_geq_e 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_geq_f #1%
}%
\def\XINT_geq_f #1#2#3!#4!%
{%
\xint_gob_til_Z #2\XINT_geq_fi \Z
- \expandafter\XINT_geq_g\the\numexpr#1+1#4-#3-\xint_c_i.%
+ \expandafter\XINT_geq_g\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
}%
-\def\XINT_geq_g 1#1#2.%
+\def\XINT_geq_g 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_geq_h #1%
}%
\def\XINT_geq_h #1#2#3!#4!%
{%
\xint_gob_til_Z #2\XINT_geq_hi \Z
- \expandafter\XINT_geq_i\the\numexpr#1+1#4-#3-\xint_c_i.%
+ \expandafter\XINT_geq_i\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
}%
-\def\XINT_geq_i 1#1#2.%
+\def\XINT_geq_i 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_geq_a #1%
}%
\def\XINT_geq_bi\Z
- \expandafter\XINT_geq_c\the\numexpr#1+1#2-#3.#4!#5!#6!#7!#8!#9!\Z !\W
+ \expandafter\XINT_geq_c\the\numexpr#1+1#2-#3\xint:#4!#5!#6!#7!#8!#9!\Z !\W
{%
\XINT_geq_k #1#2!#5!#7!#9!%
}%
\def\XINT_geq_di\Z
- \expandafter\XINT_geq_e\the\numexpr#1+1#2-#3.#4!#5!#6!#7!#8\W
+ \expandafter\XINT_geq_e\the\numexpr#1+1#2-#3\xint:#4!#5!#6!#7!#8\W
{%
\XINT_geq_k #1#2!#5!#7!%
}%
\def\XINT_geq_fi\Z
- \expandafter\XINT_geq_g\the\numexpr#1+1#2-#3.#4!#5!#6\W
+ \expandafter\XINT_geq_g\the\numexpr#1+1#2-#3\xint:#4!#5!#6\W
{%
\XINT_geq_k #1#2!#5!%
}%
\def\XINT_geq_hi\Z
- \expandafter\XINT_geq_i\the\numexpr#1+1#2-#3.#4\W
+ \expandafter\XINT_geq_i\the\numexpr#1+1#2-#3\xint:#4\W
{%
\XINT_geq_k #1#2!%
}%
@@ -718,25 +583,26 @@
\fi
}%
\def\xintiMaxof {\romannumeral0\xintimaxof }%
-\def\xintimaxof #1{\expandafter\XINT_imaxof_a\romannumeral`&&@#1\relax }%
-\def\XINT_imaxof_a #1{\expandafter\XINT_imaxof_b\romannumeral0\xintnum{#1}\Z }%
-\def\XINT_imaxof_b #1\Z #2%
- {\expandafter\XINT_imaxof_c\romannumeral`&&@#2\Z {#1}\Z}%
+\def\xintimaxof #1{\expandafter\XINT_imaxof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_imaxof_a
+#1{\expandafter\XINT_imaxof_b\romannumeral0\xintnum{#1}!}%
+\def\XINT_imaxof_b #1!#2%
+ {\expandafter\XINT_imaxof_c\romannumeral`&&@#2!{#1}!}%
\def\XINT_imaxof_c #1%
- {\xint_gob_til_relax #1\XINT_imaxof_e\relax\XINT_imaxof_d #1}%
-\def\XINT_imaxof_d #1\Z
+ {\xint_gob_til_xint: #1\XINT_imaxof_e\xint:\XINT_imaxof_d #1}%
+\def\XINT_imaxof_d #1!%
{\expandafter\XINT_imaxof_b\romannumeral0\xintimax {#1}}%
-\def\XINT_imaxof_e #1\Z #2\Z { #2}%
+\def\XINT_imaxof_e #1!#2!{ #2}%
\def\xintiiMaxof {\romannumeral0\xintiimaxof }%
-\def\xintiimaxof #1{\expandafter\XINT_iimaxof_a\romannumeral`&&@#1\relax }%
-\def\XINT_iimaxof_a #1{\expandafter\XINT_iimaxof_b\romannumeral`&&@#1\Z }%
-\def\XINT_iimaxof_b #1\Z #2%
- {\expandafter\XINT_iimaxof_c\romannumeral`&&@#2\Z {#1}\Z}%
+\def\xintiimaxof #1{\expandafter\XINT_iimaxof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_iimaxof_a #1{\expandafter\XINT_iimaxof_b\romannumeral`&&@#1!}%
+\def\XINT_iimaxof_b #1!#2%
+ {\expandafter\XINT_iimaxof_c\romannumeral`&&@#2!{#1}!}%
\def\XINT_iimaxof_c #1%
- {\xint_gob_til_relax #1\XINT_iimaxof_e\relax\XINT_iimaxof_d #1}%
-\def\XINT_iimaxof_d #1\Z
+ {\xint_gob_til_xint: #1\XINT_iimaxof_e\xint:\XINT_iimaxof_d #1}%
+\def\XINT_iimaxof_d #1!%
{\expandafter\XINT_iimaxof_b\romannumeral0\xintiimax {#1}}%
-\def\XINT_iimaxof_e #1\Z #2\Z { #2}%
+\def\XINT_iimaxof_e #1!#2!{ #2}%
\def\xintiMin {\romannumeral0\xintimin }%
\def\xintimin #1%
{%
@@ -794,49 +660,45 @@
\fi
}%
\def\xintiMinof {\romannumeral0\xintiminof }%
-\def\xintiminof #1{\expandafter\XINT_iminof_a\romannumeral`&&@#1\relax }%
-\def\XINT_iminof_a #1{\expandafter\XINT_iminof_b\romannumeral0\xintnum{#1}\Z }%
-\def\XINT_iminof_b #1\Z #2%
- {\expandafter\XINT_iminof_c\romannumeral`&&@#2\Z {#1}\Z}%
+\def\xintiminof #1{\expandafter\XINT_iminof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_iminof_a #1{\expandafter\XINT_iminof_b\romannumeral0\xintnum{#1}!}%
+\def\XINT_iminof_b #1!#2%
+ {\expandafter\XINT_iminof_c\romannumeral`&&@#2!{#1}!}%
\def\XINT_iminof_c #1%
- {\xint_gob_til_relax #1\XINT_iminof_e\relax\XINT_iminof_d #1}%
-\def\XINT_iminof_d #1\Z
+ {\xint_gob_til_xint: #1\XINT_iminof_e\xint:\XINT_iminof_d #1}%
+\def\XINT_iminof_d #1!%
{\expandafter\XINT_iminof_b\romannumeral0\xintimin {#1}}%
-\def\XINT_iminof_e #1\Z #2\Z { #2}%
+\def\XINT_iminof_e #1!#2!{ #2}%
\def\xintiiMinof {\romannumeral0\xintiiminof }%
-\def\xintiiminof #1{\expandafter\XINT_iiminof_a\romannumeral`&&@#1\relax }%
-\def\XINT_iiminof_a #1{\expandafter\XINT_iiminof_b\romannumeral`&&@#1\Z }%
-\def\XINT_iiminof_b #1\Z #2%
- {\expandafter\XINT_iiminof_c\romannumeral`&&@#2\Z {#1}\Z}%
+\def\xintiiminof #1{\expandafter\XINT_iiminof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_iiminof_a #1{\expandafter\XINT_iiminof_b\romannumeral`&&@#1!}%
+\def\XINT_iiminof_b #1!#2%
+ {\expandafter\XINT_iiminof_c\romannumeral`&&@#2!{#1}!}%
\def\XINT_iiminof_c #1%
- {\xint_gob_til_relax #1\XINT_iiminof_e\relax\XINT_iiminof_d #1}%
-\def\XINT_iiminof_d #1\Z
+ {\xint_gob_til_xint: #1\XINT_iiminof_e\xint:\XINT_iiminof_d #1}%
+\def\XINT_iiminof_d #1!%
{\expandafter\XINT_iiminof_b\romannumeral0\xintiimin {#1}}%
-\def\XINT_iiminof_e #1\Z #2\Z { #2}%
+\def\XINT_iiminof_e #1!#2!{ #2}%
\def\xintiiSum {\romannumeral0\xintiisum }%
-\def\xintiisum #1{\xintiisumexpr #1\relax }%
-\def\xintiiSumExpr {\romannumeral0\xintiisumexpr }%
-\def\xintiisumexpr {\expandafter\XINT_sumexpr\romannumeral`&&@}%
+\def\xintiisum #1{\expandafter\XINT_sumexpr\romannumeral`&&@#1\xint:}%
\def\XINT_sumexpr {\XINT_sum_loop_a 0\Z }%
\def\XINT_sum_loop_a #1\Z #2%
- {\expandafter\XINT_sum_loop_b \romannumeral`&&@#2\Z #1\Z \Z}%
+ {\expandafter\XINT_sum_loop_b \romannumeral`&&@#2\xint:#1\xint:\Z}%
\def\XINT_sum_loop_b #1%
- {\xint_gob_til_relax #1\XINT_sum_finished\relax\XINT_sum_loop_c #1}%
+ {\xint_gob_til_xint: #1\XINT_sum_finished\xint:\XINT_sum_loop_c #1}%
\def\XINT_sum_loop_c
{\expandafter\XINT_sum_loop_a\romannumeral0\XINT_add_fork }%
-\def\XINT_sum_finished #1\Z #2\Z \Z { #2}%
+\def\XINT_sum_finished\xint:\XINT_sum_loop_c\xint:\xint:#1\xint:\Z{ #1}%
\def\xintiiPrd {\romannumeral0\xintiiprd }%
-\def\xintiiprd #1{\xintiiprdexpr #1\relax }%
-\def\xintiiPrdExpr {\romannumeral0\xintiiprdexpr }%
-\def\xintiiprdexpr {\expandafter\XINT_prdexpr\romannumeral`&&@}%
+\def\xintiiprd #1{\expandafter\XINT_prdexpr\romannumeral`&&@#1\xint:}%
\def\XINT_prdexpr {\XINT_prod_loop_a 1\Z }%
\def\XINT_prod_loop_a #1\Z #2%
- {\expandafter\XINT_prod_loop_b \romannumeral`&&@#2\Z #1\Z \Z}%
+ {\expandafter\XINT_prod_loop_b\romannumeral`&&@#2\xint:#1\xint:\Z}%
\def\XINT_prod_loop_b #1%
- {\xint_gob_til_relax #1\XINT_prod_finished\relax\XINT_prod_loop_c #1}%
+ {\xint_gob_til_xint: #1\XINT_prod_finished\xint:\XINT_prod_loop_c #1}%
\def\XINT_prod_loop_c
{\expandafter\XINT_prod_loop_a\romannumeral0\XINT_mul_fork }%
-\def\XINT_prod_finished\relax\XINT_prod_loop_c #1\Z #2\Z \Z { #2}%
+\def\XINT_prod_finished\xint:\XINT_prod_loop_c\xint:\xint:#1\xint:\Z { #1}%
\def\xintiiMON {\romannumeral0\xintiimon }%
\def\xintiimon #1%
{%
@@ -1089,8 +951,7 @@
{%
\expandafter\XINT_split_fromright_a
\the\numexpr#1-\numexpr\XINT_length_loop
- #2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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
.#2\xint_bye
@@ -1117,19 +978,20 @@
\def\XINT_sqrtr_post #1#2{\xintiiifLt {#2}{#1}%
{ #1}{\XINT_dec #1\XINT_dec_bye234567890\xint_bye}}%
\def\xintisquareroot #1%
- {\expandafter\XINT_sqrt_checkin\romannumeral0\xintnum{#1}\xint_relax }%
-\def\xintiisquareroot #1{\expandafter\XINT_sqrt_checkin\romannumeral`&&@#1\xint_relax }%
+ {\expandafter\XINT_sqrt_checkin\romannumeral0\xintnum{#1}\xint:}%
+\def\xintiisquareroot #1{\expandafter\XINT_sqrt_checkin\romannumeral`&&@#1\xint:}%
\def\XINT_sqrt_checkin #1%
{%
\xint_UDzerominusfork
#1-\XINT_sqrt_iszero
0#1\XINT_sqrt_isneg
- 0-{\XINT_sqrt #1}%
- \krof
+ 0-\XINT_sqrt
+ \krof #1%
}%
-\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
+\def\XINT_sqrt_iszero #1\xint:{{1}{1}}%
+\def\XINT_sqrt_isneg #1\xint:{\XINT_signalcondition{InvalidOperation}{square
+ root of negative: #1}{}{{0}{0}}}%
+\def\XINT_sqrt #1\xint:
{%
\expandafter\XINT_sqrt_start\romannumeral0\xintlength {#1}.#1.%
}%
@@ -1383,7 +1245,7 @@
}%
\def\XINT_sqrt_big_ke #1%
{%
- \if0\XINT_Sgn #1\Z
+ \if0\XINT_Sgn #1\xint:
\expandafter \XINT_sqrt_big_end
\else \expandafter \XINT_sqrt_big_kf
\fi {#1}%
@@ -1412,18 +1274,21 @@
\let\xintibinomial\xintiibinomial
\def\XINT_binom_fork #1#2.#3#4.#5#6.%
{%
- \if-#5\xint_dothis{\xintError:OutOfRangeBinomial\space 0}\fi
+ \if-#5\xint_dothis{\XINT_signalcondition{InvalidOperation}{Binomial with
+ negative first arg: #5#6}{}{0}}\fi
\if-#1\xint_dothis{ 0}\fi
\if-#3\xint_dothis{ 0}\fi
\if0#1\xint_dothis{ 1}\fi
\if0#3\xint_dothis{ 1}\fi
- \ifnum #5#6>\xint_c_x^viii_mone\xint_dothis{\xintError:OutOfRangeBinomial\space 0}\fi
+ \ifnum #5#6>\xint_c_x^viii_mone\xint_dothis
+ {\XINT_signalcondition{InvalidOperation}{Binomial with too
+ large argument: 99999999 < #5#6}{}{0}}\fi
\ifnum #1#2>#3#4 \xint_dothis{\XINT_binom_a #1#2.#3#4.}\fi
\xint_orthat{\XINT_binom_a #3#4.#1#2.}%
}%
\def\XINT_binom_a #1.#2.%
{%
- \expandafter\XINT_binom_b\the\numexpr \xint_c_i+#1.1.#2.100000001!1!\Z!0!%
+ \expandafter\XINT_binom_b\the\numexpr \xint_c_i+#1.1.#2.100000001!1!;!0!%
}%
\def\XINT_binom_b #1.%
{%
@@ -1549,20 +1414,20 @@
\the\numexpr #2*(#2+\xint_c_i)*(#2+\xint_c_ii)*(#2+\xint_c_iii)\expandafter
!\the\numexpr #1*(#1+\xint_c_i)*(#1+\xint_c_ii)*(#1+\xint_c_iii)!%
}%
-\def\XINT_binom_mul #1!#21!\Z!0!%
+\def\XINT_binom_mul #1!#21!;!0!%
{%
\expandafter\XINT_rev_nounsep\expandafter{\expandafter}%
\the\numexpr\expandafter\XINT_smallmul
\the\numexpr\xint_c_x^viii+#1\expandafter
- !\romannumeral0\XINT_rev_nounsep {}1\Z!#2%
+ !\romannumeral0\XINT_rev_nounsep {}1;!#2%
\R!\R!\R!\R!\R!\R!\R!\R!\W
\R!\R!\R!\R!\R!\R!\R!\R!\W
- 1\Z!%
+ 1;!%
}%
-\def\XINT_binom_div #1!1\Z!%
+\def\XINT_binom_div #1!1;!%
{%
\expandafter\XINT_smalldivx_a
- \the\numexpr #1/\xint_c_ii\expandafter.%
+ \the\numexpr #1/\xint_c_ii\expandafter\xint:
\the\numexpr \xint_c_x^viii+#1!%
}%
\def\XINT_binom_vsmallmuldiv #1!#2!1#3!{\xint_c_x^viii+#2*#3/#1!}%
@@ -1596,8 +1461,8 @@
\the\numexpr\expandafter\XINT_binom_div\the\numexpr #2\expandafter
!\romannumeral0\XINT_binom_mul #1!%
}%
-\def\XINT_binom_finish #1\Z!0!%
- {\XINT_unsep_cuzsmall #11\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W }%
+\def\XINT_binom_finish #1;!0!%
+ {\XINT_unsep_cuzsmall #1\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax}%
\def\XINT_binom_vsmallend_iii #1.%
{%
\ifnum #1>26 \expandafter\XINT_binom_end_iii \else
@@ -1644,8 +1509,9 @@
\expandafter\XINT_binom_vsmallfinish
\the\numexpr\XINT_binom_vsmallmuldiv #2!#1!%
}%
-\edef\XINT_binom_vsmallfinish 1#1!1!\Z!0!%
- {\noexpand\expandafter\space\noexpand\the\numexpr #1\relax}%
+\def\XINT_binom_vsmallfinish#1{%
+\def\XINT_binom_vsmallfinish1##1!1!;!0!{\expandafter#1\the\numexpr##1\relax}%
+}\XINT_binom_vsmallfinish{ }%
\def\xintiiPFactorial {\romannumeral0\xintiipfactorial }%
\def\xintiipfactorial #1#2%
{%
@@ -1661,7 +1527,9 @@
\ifnum #3#4>\xint_c_x^viii_mone\xint_dothis\XINT_pfac_outofrange\fi
\xint_orthat \XINT_pfac_a #1#2.#3#4.%
}%
-\def\XINT_pfac_outofrange #1.#2.{\xintError:OutOfRangePFac\space 0}%
+\def\XINT_pfac_outofrange #1.#2.%
+ {\XINT_signalcondition{InvalidOperation}{PFactorial with
+ too big second arg: 99999999 < #2}{}{0}}%
\def\XINT_pfac_one #1.#2.{ 1}%
\def\XINT_pfac_zero #1.#2.{ 0}%
\def\XINT_pfac_neg -#1.-#2.%
@@ -1674,7 +1542,7 @@
}%
\def\XINT_pfac_a #1.#2.%
{%
- \expandafter\XINT_pfac_b\the\numexpr \xint_c_i+#1.#2.100000001!1\Z!%
+ \expandafter\XINT_pfac_b\the\numexpr \xint_c_i+#1.#2.100000001!1;!%
1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
}%
\def\XINT_pfac_b #1.%
@@ -1807,8 +1675,7 @@
\def\xintMinof {\Did_you_mean_iMinof?or_load_xintfrac!}%
\def\xintSum {\Did_you_mean_iiSum?or_load_xintfrac!}%
\def\xintPrd {\Did_you_mean_iiPrd?or_load_xintfrac!}%
-\def\xintPrdExpr {\Did_you_mean_iiPrdExpr?or_load_xintfrac!}%
-\def\xintSumExpr {\Did_you_mean_iiSumExpr?or_load_xintfrac!}%
+\catcode`! 12
\XINT_restorecatcodes_endinput%
\endinput
%%
diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
index f3eeb9a387f..bdbc76c5089 100644
--- a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintbinhex: Expandable binary and hexadecimal conversions
%% ---------------------------------------------------------------
@@ -70,7 +70,12 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintbinhex}%
- [2017/01/06 1.2k Expandable binary and hexadecimal conversions (JFB)]%
+ [2017/07/26 1.2l Expandable binary and hexadecimal conversions (JFB)]%
+\def\xint_cleanupzeros_andstop#1{%
+\def\xint_cleanupzeros_andstop ##1##2##3##4%
+{%
+ \expandafter#1\the\numexpr ##1##2##3##4\relax
+}}\xint_cleanupzeros_andstop{ }%
\newcount\xint_c_ii^xv \xint_c_ii^xv 32768
\newcount\xint_c_ii^xvi \xint_c_ii^xvi 65536
\newcount\xint_c_x^v \xint_c_x^v 100000
@@ -340,10 +345,11 @@
{%
\expandafter\XINT_dtb_end_d\the\numexpr #1#2#3#4#5#6#7#8\relax
}%
-\edef\XINT_dtb_end_d #1#2#3#4#5#6#7#8#9%
+\def\XINT_dtb_end_d#1{%
+\def\XINT_dtb_end_d ##1##2##3##4##5##6##7##8##9%
{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6#7#8#9\relax
-}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
+}}\XINT_dtb_end_d{ }%
\def\xintHexToDec {\romannumeral0\xinthextodec }%
\def\xinthextodec #1%
{\expandafter\XINT_htd_checkin\romannumeral`&&@#1\W\W\W\W \T }%
@@ -375,10 +381,10 @@
{%
\expandafter\xint_cleanupzeros_andstop
\romannumeral0\XINT_rord_main {}#1%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax
+ \xint:
}%
\def\XINT_htd_II_ci #1\XINT_htd_II_ciii
#2\W\W\W {\XINT_htd_II_d {}{"#2}{\xint_c_xvi}}%
@@ -423,10 +429,11 @@
{%
\XINT_htd_II_end_b #1#3%
}%
-\edef\XINT_htd_II_end_b #1#2#3#4#5#6#7#8%
+\def\XINT_htd_II_end_b#1{%
+\def\XINT_htd_II_end_b ##1##2##3##4##5##6##7##8%
{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6#7#8\relax
-}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8\relax
+}}\XINT_htd_II_end_b{ }%
\def\xintBinToDec {\romannumeral0\xintbintodec }%
\def\xintbintodec #1{\expandafter\XINT_btd_checkin
\romannumeral`&&@#1\W\W\W\W\W\W\W\W \T }%
@@ -462,15 +469,16 @@
{%
\expandafter\XINT_btd_II_c_end
\romannumeral0\XINT_rord_main {}#2%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax
+ \xint:
}%
-\edef\XINT_btd_II_c_end #1#2#3#4#5#6%
+\def\XINT_btd_II_c_end#1{%
+\def\XINT_btd_II_c_end ##1##2##3##4##5##6%
{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6\relax
-}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6\relax
+}}\XINT_btd_II_c_end{ }%
\def\XINT_btd_II_ci #1\XINT_btd_II_cvii #2\W\W\W\W\W\W\W
{\XINT_btd_II_d {}{#2}{\xint_c_ii }}%
\def\XINT_btd_II_cii #1\XINT_btd_II_cvii #2\W\W\W\W\W\W
@@ -507,10 +515,11 @@
{%
\XINT_btd_II_end_b #1#3%
}%
-\edef\XINT_btd_II_end_b #1#2#3#4#5#6#7#8#9%
+\def\XINT_btd_II_end_b#1{%
+\def\XINT_btd_II_end_b ##1##2##3##4##5##6##7##8##9%
{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6#7#8#9\relax
-}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
+}}\XINT_btd_II_end_b{ }%
\def\XINT_btd_I_a #1#2#3#4#5#6#7#8%
{%
\xint_gob_til_Z #3\XINT_btd_I_end_a\Z
@@ -535,10 +544,9 @@
\def\xintbintohex #1%
{%
\expandafter\XINT_bth_checkin
- \romannumeral0\expandafter\XINT_num_loop
- \romannumeral`&&@#1\xint_relax\xint_relax
- \xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \romannumeral0\expandafter\XINT_num_cleanup
+ \the\numexpr\expandafter\XINT_num_loop
+ \romannumeral`&&@#1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
\R\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W\W
}%
\def\XINT_bth_checkin #1%
@@ -606,9 +614,9 @@
}%
\def\XINT_htb_II_b #1#2#3\T
{%
- \XINT_num_loop #2#1%
- \xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \expandafter\XINT_num_cleanup
+ \the\numexpr\expandafter\XINT_num_loop #2#1%
+ \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
}%
\def\xintCHexToBin {\romannumeral0\xintchextobin }%
\def\xintchextobin #1%
@@ -646,12 +654,12 @@
\XINT_chtb_I\expandafter\expandafter\expandafter #1%
{%
\XINT_chtb_end_b #1%
- \xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
}%
\def\XINT_chtb_end_b #1\W#2\W#3\W#4\W#5\W#6\W#7\W#8\W\endcsname
{%
- \XINT_num_loop
+ \expandafter\XINT_num_cleanup
+ \the\numexpr\expandafter\XINT_num_loop
}%
\XINT_restorecatcodes_endinput%
\endinput
diff --git a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
index 21ccae4f1f4..244f3fa5cff 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintcfrac: Expandable continued fractions with xint package
%% ---------------------------------------------------------------
@@ -70,22 +70,22 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcfrac}%
- [2017/01/06 1.2k Expandable continued fractions with xint package (JFB)]%
+ [2017/07/26 1.2l Expandable continued fractions with xint package (JFB)]%
\def\xintCFrac {\romannumeral0\xintcfrac }%
\def\xintcfrac #1%
{%
- \XINT_cfrac_opt_a #1\xint_relax
+ \XINT_cfrac_opt_a #1\xint:
}%
\def\XINT_cfrac_opt_a #1%
{%
\ifx[#1\XINT_cfrac_opt_b\fi \XINT_cfrac_noopt #1%
}%
-\def\XINT_cfrac_noopt #1\xint_relax
+\def\XINT_cfrac_noopt #1\xint:
{%
\expandafter\XINT_cfrac_A\romannumeral0\xintrawwithzeros {#1}\Z
\relax\relax
}%
-\def\XINT_cfrac_opt_b\fi\XINT_cfrac_noopt [\xint_relax #1]%
+\def\XINT_cfrac_opt_b\fi\XINT_cfrac_noopt [\xint:#1]%
{%
\fi\csname XINT_cfrac_opt#1\endcsname
}%
@@ -146,30 +146,30 @@
}%
\def\XINT_cfrac_end_b \Z+\cfrac#1#2{ #2}%
\def\xintGCFrac {\romannumeral0\xintgcfrac }%
-\def\xintgcfrac #1{\XINT_gcfrac_opt_a #1\xint_relax }%
+\def\xintgcfrac #1{\XINT_gcfrac_opt_a #1\xint:}%
\def\XINT_gcfrac_opt_a #1%
{%
\ifx[#1\XINT_gcfrac_opt_b\fi \XINT_gcfrac_noopt #1%
}%
-\def\XINT_gcfrac_noopt #1\xint_relax
+\def\XINT_gcfrac_noopt #1\xint:%
{%
- \XINT_gcfrac #1+\xint_relax/\relax\relax
+ \XINT_gcfrac #1+!/\relax\relax
}%
-\def\XINT_gcfrac_opt_b\fi\XINT_gcfrac_noopt [\xint_relax #1]%
+\def\XINT_gcfrac_opt_b\fi\XINT_gcfrac_noopt [\xint:#1]%
{%
\fi\csname XINT_gcfrac_opt#1\endcsname
}%
\def\XINT_gcfrac_optl #1%
{%
- \XINT_gcfrac #1+\xint_relax/\relax\hfill
+ \XINT_gcfrac #1+!/\relax\hfill
}%
\def\XINT_gcfrac_optc #1%
{%
- \XINT_gcfrac #1+\xint_relax/\relax\relax
+ \XINT_gcfrac #1+!/\relax\relax
}%
\def\XINT_gcfrac_optr #1%
{%
- \XINT_gcfrac #1+\xint_relax/\hfill\relax
+ \XINT_gcfrac #1+!/\hfill\relax
}%
\def\XINT_gcfrac
{%
@@ -178,52 +178,52 @@
\def\XINT_gcfrac_enter {\XINT_gcfrac_loop {}}%
\def\XINT_gcfrac_loop #1#2+#3/%
{%
- \xint_gob_til_xint_relax #3\XINT_gcfrac_endloop\xint_relax
+ \xint_gob_til_exclam #3\XINT_gcfrac_endloop!%
\XINT_gcfrac_loop {{#3}{#2}#1}%
}%
-\def\XINT_gcfrac_endloop\xint_relax\XINT_gcfrac_loop #1#2#3%
+\def\XINT_gcfrac_endloop!\XINT_gcfrac_loop #1#2#3%
{%
- \XINT_gcfrac_T #2#3#1\xint_relax\xint_relax
+ \XINT_gcfrac_T #2#3#1!!%
}%
\def\XINT_gcfrac_T #1#2#3#4{\XINT_gcfrac_U #1#2{\xintFrac{#4}}}%
\def\XINT_gcfrac_U #1#2#3#4#5%
{%
- \xint_gob_til_xint_relax #5\XINT_gcfrac_end\xint_relax\XINT_gcfrac_U
+ \xint_gob_til_exclam #5\XINT_gcfrac_end!\XINT_gcfrac_U
#1#2{\xintFrac{#5}%
\ifcase\xintSgn{#4}
+\or+\else-\fi
\cfrac{#1\xintFrac{\xintAbs{#4}}#2}{#3}}%
}%
-\def\XINT_gcfrac_end\xint_relax\XINT_gcfrac_U #1#2#3%
+\def\XINT_gcfrac_end!\XINT_gcfrac_U #1#2#3%
{%
\XINT_gcfrac_end_b #3%
}%
\def\XINT_gcfrac_end_b #1\cfrac#2#3{ #3}%
\def\xintGGCFrac {\romannumeral0\xintggcfrac }%
-\def\xintggcfrac #1{\XINT_ggcfrac_opt_a #1\xint_relax }%
+\def\xintggcfrac #1{\XINT_ggcfrac_opt_a #1\xint:}%
\def\XINT_ggcfrac_opt_a #1%
{%
\ifx[#1\XINT_ggcfrac_opt_b\fi \XINT_ggcfrac_noopt #1%
}%
-\def\XINT_ggcfrac_noopt #1\xint_relax
+\def\XINT_ggcfrac_noopt #1\xint:
{%
- \XINT_ggcfrac #1+\xint_relax/\relax\relax
+ \XINT_ggcfrac #1+!/\relax\relax
}%
-\def\XINT_ggcfrac_opt_b\fi\XINT_ggcfrac_noopt [\xint_relax #1]%
+\def\XINT_ggcfrac_opt_b\fi\XINT_ggcfrac_noopt [\xint:#1]%
{%
\fi\csname XINT_ggcfrac_opt#1\endcsname
}%
\def\XINT_ggcfrac_optl #1%
{%
- \XINT_ggcfrac #1+\xint_relax/\relax\hfill
+ \XINT_ggcfrac #1+!/\relax\hfill
}%
\def\XINT_ggcfrac_optc #1%
{%
- \XINT_ggcfrac #1+\xint_relax/\relax\relax
+ \XINT_ggcfrac #1+!/\relax\relax
}%
\def\XINT_ggcfrac_optr #1%
{%
- \XINT_ggcfrac #1+\xint_relax/\hfill\relax
+ \XINT_ggcfrac #1+!/\hfill\relax
}%
\def\XINT_ggcfrac
{%
@@ -232,20 +232,20 @@
\def\XINT_ggcfrac_enter {\XINT_ggcfrac_loop {}}%
\def\XINT_ggcfrac_loop #1#2+#3/%
{%
- \xint_gob_til_xint_relax #3\XINT_ggcfrac_endloop\xint_relax
+ \xint_gob_til_exclam #3\XINT_ggcfrac_endloop!%
\XINT_ggcfrac_loop {{#3}{#2}#1}%
}%
-\def\XINT_ggcfrac_endloop\xint_relax\XINT_ggcfrac_loop #1#2#3%
+\def\XINT_ggcfrac_endloop!\XINT_ggcfrac_loop #1#2#3%
{%
- \XINT_ggcfrac_T #2#3#1\xint_relax\xint_relax
+ \XINT_ggcfrac_T #2#3#1!!%
}%
\def\XINT_ggcfrac_T #1#2#3#4{\XINT_ggcfrac_U #1#2{#4}}%
\def\XINT_ggcfrac_U #1#2#3#4#5%
{%
- \xint_gob_til_xint_relax #5\XINT_ggcfrac_end\xint_relax\XINT_ggcfrac_U
+ \xint_gob_til_exclam #5\XINT_ggcfrac_end!\XINT_ggcfrac_U
#1#2{#5+\cfrac{#1#4#2}{#3}}%
}%
-\def\XINT_ggcfrac_end\xint_relax\XINT_ggcfrac_U #1#2#3%
+\def\XINT_ggcfrac_end!\XINT_ggcfrac_U #1#2#3%
{%
\XINT_ggcfrac_end_b #3%
}%
@@ -255,17 +255,17 @@
{%
\expandafter\XINT_gctgcx_start\expandafter {\romannumeral`&&@#3}{#1}{#2}%
}%
-\def\XINT_gctgcx_start #1#2#3{\XINT_gctgcx_loop_a {}{#2}{#3}#1+\xint_relax/}%
+\def\XINT_gctgcx_start #1#2#3{\XINT_gctgcx_loop_a {}{#2}{#3}#1+!/}%
\def\XINT_gctgcx_loop_a #1#2#3#4+#5/%
{%
- \xint_gob_til_xint_relax #5\XINT_gctgcx_end\xint_relax
+ \xint_gob_til_exclam #5\XINT_gctgcx_end!%
\XINT_gctgcx_loop_b {#1{#4}}{#2{#5}#3}{#2}{#3}%
}%
\def\XINT_gctgcx_loop_b #1#2%
{%
\XINT_gctgcx_loop_a {#1#2}%
}%
-\def\XINT_gctgcx_end\xint_relax\XINT_gctgcx_loop_b #1#2#3#4{ #1}%
+\def\XINT_gctgcx_end!\XINT_gctgcx_loop_b #1#2#3#4{ #1}%
\def\xintFtoCs {\romannumeral0\xintftocs }%
\def\xintftocs #1%
{%
@@ -461,12 +461,12 @@
\def\xintCstoF {\romannumeral0\xintcstof }%
\def\xintcstof #1%
{%
- \expandafter\XINT_ctf_prep \romannumeral0\xintcsvtolist{#1}\xint_relax
+ \expandafter\XINT_ctf_prep \romannumeral0\xintcsvtolist{#1}!%
}%
\def\xintCtoF {\romannumeral0\xintctof }%
\def\xintctof #1%
{%
- \expandafter\XINT_ctf_prep \romannumeral`&&@#1\xint_relax
+ \expandafter\XINT_ctf_prep \romannumeral`&&@#1!%
}%
\def\XINT_ctf_prep
{%
@@ -474,17 +474,19 @@
}%
\def\XINT_ctf_loop_a #1#2#3#4#5%
{%
- \xint_gob_til_xint_relax #5\XINT_ctf_end\xint_relax
+ \xint_gob_til_exclam #5\XINT_ctf_end!%
\expandafter\XINT_ctf_loop_b
\romannumeral0\xintrawwithzeros {#5}.{#1}{#2}{#3}{#4}%
}%
\def\XINT_ctf_loop_b #1/#2.#3#4#5#6%
{%
\expandafter\XINT_ctf_loop_c\expandafter
- {\romannumeral0\XINT_mul_fork #2\Z #4\Z }%
- {\romannumeral0\XINT_mul_fork #2\Z #3\Z }%
- {\romannumeral0\xintiiadd {\XINT_mul_fork #2\Z #6\Z}{\XINT_mul_fork #1\Z #4\Z}}%
- {\romannumeral0\xintiiadd {\XINT_mul_fork #2\Z #5\Z}{\XINT_mul_fork #1\Z #3\Z}}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#4\xint:}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#3\xint:}%
+ {\romannumeral0\xintiiadd {\XINT_mul_fork #2\xint:#6\xint:}%
+ {\XINT_mul_fork #1\xint:#4\xint:}}%
+ {\romannumeral0\xintiiadd {\XINT_mul_fork #2\xint:#5\xint:}%
+ {\XINT_mul_fork #1\xint:#3\xint:}}%
}%
\def\XINT_ctf_loop_c #1#2%
{%
@@ -502,7 +504,7 @@
\def\xintiCstoF {\romannumeral0\xinticstof }%
\def\xinticstof #1%
{%
- \expandafter\XINT_icstf_prep \romannumeral`&&@#1,\xint_relax,%
+ \expandafter\XINT_icstf_prep \romannumeral`&&@#1,!,%
}%
\def\XINT_icstf_prep
{%
@@ -510,15 +512,15 @@
}%
\def\XINT_icstf_loop_a #1#2#3#4#5,%
{%
- \xint_gob_til_xint_relax #5\XINT_icstf_end\xint_relax
+ \xint_gob_til_exclam #5\XINT_icstf_end!%
\expandafter
\XINT_icstf_loop_b \romannumeral`&&@#5.{#1}{#2}{#3}{#4}%
}%
\def\XINT_icstf_loop_b #1.#2#3#4#5%
{%
\expandafter\XINT_icstf_loop_c\expandafter
- {\romannumeral0\xintiiadd {#5}{\XINT_mul_fork #1\Z #3\Z}}%
- {\romannumeral0\xintiiadd {#4}{\XINT_mul_fork #1\Z #2\Z}}%
+ {\romannumeral0\xintiiadd {#5}{\XINT_mul_fork #1\xint:#3\xint:}}%
+ {\romannumeral0\xintiiadd {#4}{\XINT_mul_fork #1\xint:#2\xint:}}%
{#2}{#3}%
}%
\def\XINT_icstf_loop_c #1#2%
@@ -529,7 +531,7 @@
\def\xintGCtoF {\romannumeral0\xintgctof }%
\def\xintgctof #1%
{%
- \expandafter\XINT_gctf_prep \romannumeral`&&@#1+\xint_relax/%
+ \expandafter\XINT_gctf_prep \romannumeral`&&@#1+!/%
}%
\def\XINT_gctf_prep
{%
@@ -543,10 +545,12 @@
\def\XINT_gctf_loop_b #1/#2.#3#4#5#6%
{%
\expandafter\XINT_gctf_loop_c\expandafter
- {\romannumeral0\XINT_mul_fork #2\Z #4\Z }%
- {\romannumeral0\XINT_mul_fork #2\Z #3\Z }%
- {\romannumeral0\xintiiadd {\XINT_mul_fork #2\Z #6\Z}{\XINT_mul_fork #1\Z #4\Z}}%
- {\romannumeral0\xintiiadd {\XINT_mul_fork #2\Z #5\Z}{\XINT_mul_fork #1\Z #3\Z}}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#4\xint:}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#3\xint:}%
+ {\romannumeral0\xintiiadd {\XINT_mul_fork #2\xint:#6\xint:}%
+ {\XINT_mul_fork #1\xint:#4\xint:}}%
+ {\romannumeral0\xintiiadd {\XINT_mul_fork #2\xint:#5\xint:}%
+ {\XINT_mul_fork #1\xint:#3\xint:}}%
}%
\def\XINT_gctf_loop_c #1#2%
{%
@@ -562,17 +566,17 @@
}%
\def\XINT_gctf_loop_f #1#2/%
{%
- \xint_gob_til_xint_relax #2\XINT_gctf_end\xint_relax
+ \xint_gob_til_exclam #2\XINT_gctf_end!%
\expandafter\XINT_gctf_loop_g
\romannumeral0\xintrawwithzeros {#2}.#1%
}%
\def\XINT_gctf_loop_g #1/#2.#3#4#5#6%
{%
\expandafter\XINT_gctf_loop_h\expandafter
- {\romannumeral0\XINT_mul_fork #1\Z #6\Z }%
- {\romannumeral0\XINT_mul_fork #1\Z #5\Z }%
- {\romannumeral0\XINT_mul_fork #2\Z #4\Z }%
- {\romannumeral0\XINT_mul_fork #2\Z #3\Z }%
+ {\romannumeral0\XINT_mul_fork #1\xint:#6\xint:}%
+ {\romannumeral0\XINT_mul_fork #1\xint:#5\xint:}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#4\xint:}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#3\xint:}%
}%
\def\XINT_gctf_loop_h #1#2%
{%
@@ -590,7 +594,7 @@
\def\xintiGCtoF {\romannumeral0\xintigctof }%
\def\xintigctof #1%
{%
- \expandafter\XINT_igctf_prep \romannumeral`&&@#1+\xint_relax/%
+ \expandafter\XINT_igctf_prep \romannumeral`&&@#1+!/%
}%
\def\XINT_igctf_prep
{%
@@ -604,8 +608,8 @@
\def\XINT_igctf_loop_b #1.#2#3#4#5%
{%
\expandafter\XINT_igctf_loop_c\expandafter
- {\romannumeral0\xintiiadd {#5}{\XINT_mul_fork #1\Z #3\Z}}%
- {\romannumeral0\xintiiadd {#4}{\XINT_mul_fork #1\Z #2\Z}}%
+ {\romannumeral0\xintiiadd {#5}{\XINT_mul_fork #1\xint:#3\xint:}}%
+ {\romannumeral0\xintiiadd {#4}{\XINT_mul_fork #1\xint:#2\xint:}}%
{#2}{#3}%
}%
\def\XINT_igctf_loop_c #1#2%
@@ -614,15 +618,15 @@
}%
\def\XINT_igctf_loop_f #1#2#3#4/%
{%
- \xint_gob_til_xint_relax #4\XINT_igctf_end\xint_relax
+ \xint_gob_til_exclam #4\XINT_igctf_end!%
\expandafter\XINT_igctf_loop_g
\romannumeral`&&@#4.{#2}{#3}#1%
}%
\def\XINT_igctf_loop_g #1.#2#3%
{%
\expandafter\XINT_igctf_loop_h\expandafter
- {\romannumeral0\XINT_mul_fork #1\Z #3\Z }%
- {\romannumeral0\XINT_mul_fork #1\Z #2\Z }%
+ {\romannumeral0\XINT_mul_fork #1\xint:#3\xint:}%
+ {\romannumeral0\XINT_mul_fork #1\xint:#2\xint:}%
}%
\def\XINT_igctf_loop_h #1#2%
{%
@@ -636,12 +640,12 @@
\def\xintCstoCv {\romannumeral0\xintcstocv }%
\def\xintcstocv #1%
{%
- \expandafter\XINT_ctcv_prep\romannumeral0\xintcsvtolist{#1}\xint_relax
+ \expandafter\XINT_ctcv_prep\romannumeral0\xintcsvtolist{#1}!%
}%
\def\xintCtoCv {\romannumeral0\xintctocv }%
\def\xintctocv #1%
{%
- \expandafter\XINT_ctcv_prep\romannumeral`&&@#1\xint_relax
+ \expandafter\XINT_ctcv_prep\romannumeral`&&@#1!%
}%
\def\XINT_ctcv_prep
{%
@@ -649,17 +653,19 @@
}%
\def\XINT_ctcv_loop_a #1#2#3#4#5#6%
{%
- \xint_gob_til_xint_relax #6\XINT_ctcv_end\xint_relax
+ \xint_gob_til_exclam #6\XINT_ctcv_end!%
\expandafter\XINT_ctcv_loop_b
\romannumeral0\xintrawwithzeros {#6}.{#2}{#3}{#4}{#5}{#1}%
}%
\def\XINT_ctcv_loop_b #1/#2.#3#4#5#6%
{%
\expandafter\XINT_ctcv_loop_c\expandafter
- {\romannumeral0\XINT_mul_fork #2\Z #4\Z }%
- {\romannumeral0\XINT_mul_fork #2\Z #3\Z }%
- {\romannumeral0\xintiiadd {\XINT_mul_fork #2\Z #6\Z}{\XINT_mul_fork #1\Z #4\Z}}%
- {\romannumeral0\xintiiadd {\XINT_mul_fork #2\Z #5\Z}{\XINT_mul_fork #1\Z #3\Z}}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#4\xint:}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#3\xint:}%
+ {\romannumeral0\xintiiadd {\XINT_mul_fork #2\xint:#6\xint:}%
+ {\XINT_mul_fork #1\xint:#4\xint:}}%
+ {\romannumeral0\xintiiadd {\XINT_mul_fork #2\xint:#5\xint:}%
+ {\XINT_mul_fork #1\xint:#3\xint:}}%
}%
\def\XINT_ctcv_loop_c #1#2%
{%
@@ -683,7 +689,7 @@
\def\xintiCstoCv {\romannumeral0\xinticstocv }%
\def\xinticstocv #1%
{%
- \expandafter\XINT_icstcv_prep \romannumeral`&&@#1,\xint_relax,%
+ \expandafter\XINT_icstcv_prep \romannumeral`&&@#1,!,%
}%
\def\XINT_icstcv_prep
{%
@@ -691,15 +697,15 @@
}%
\def\XINT_icstcv_loop_a #1#2#3#4#5#6,%
{%
- \xint_gob_til_xint_relax #6\XINT_icstcv_end\xint_relax
+ \xint_gob_til_exclam #6\XINT_icstcv_end!%
\expandafter
\XINT_icstcv_loop_b \romannumeral`&&@#6.{#2}{#3}{#4}{#5}{#1}%
}%
\def\XINT_icstcv_loop_b #1.#2#3#4#5%
{%
\expandafter\XINT_icstcv_loop_c\expandafter
- {\romannumeral0\xintiiadd {#5}{\XINT_mul_fork #1\Z #3\Z}}%
- {\romannumeral0\xintiiadd {#4}{\XINT_mul_fork #1\Z #2\Z}}%
+ {\romannumeral0\xintiiadd {#5}{\XINT_mul_fork #1\xint:#3\xint:}}%
+ {\romannumeral0\xintiiadd {#4}{\XINT_mul_fork #1\xint:#2\xint:}}%
{{#2}{#3}}%
}%
\def\XINT_icstcv_loop_c #1#2%
@@ -716,7 +722,7 @@
\def\xintGCtoCv {\romannumeral0\xintgctocv }%
\def\xintgctocv #1%
{%
- \expandafter\XINT_gctcv_prep \romannumeral`&&@#1+\xint_relax/%
+ \expandafter\XINT_gctcv_prep \romannumeral`&&@#1+!/%
}%
\def\XINT_gctcv_prep
{%
@@ -730,10 +736,12 @@
\def\XINT_gctcv_loop_b #1/#2.#3#4#5#6%
{%
\expandafter\XINT_gctcv_loop_c\expandafter
- {\romannumeral0\XINT_mul_fork #2\Z #4\Z }%
- {\romannumeral0\XINT_mul_fork #2\Z #3\Z }%
- {\romannumeral0\xintiiadd {\XINT_mul_fork #2\Z #6\Z}{\XINT_mul_fork #1\Z #4\Z}}%
- {\romannumeral0\xintiiadd {\XINT_mul_fork #2\Z #5\Z}{\XINT_mul_fork #1\Z #3\Z}}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#4\xint:}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#3\xint:}%
+ {\romannumeral0\xintiiadd {\XINT_mul_fork #2\xint:#6\xint:}%
+ {\XINT_mul_fork #1\xint:#4\xint:}}%
+ {\romannumeral0\xintiiadd {\XINT_mul_fork #2\xint:#5\xint:}%
+ {\XINT_mul_fork #1\xint:#3\xint:}}%
}%
\def\XINT_gctcv_loop_c #1#2%
{%
@@ -758,17 +766,17 @@
}%
\def\XINT_gctcv_loop_h #1#2#3/%
{%
- \xint_gob_til_xint_relax #3\XINT_gctcv_end\xint_relax
+ \xint_gob_til_exclam #3\XINT_gctcv_end!%
\expandafter\XINT_gctcv_loop_i
\romannumeral0\xintrawwithzeros {#3}.#2{#1}%
}%
\def\XINT_gctcv_loop_i #1/#2.#3#4#5#6%
{%
\expandafter\XINT_gctcv_loop_j\expandafter
- {\romannumeral0\XINT_mul_fork #1\Z #6\Z }%
- {\romannumeral0\XINT_mul_fork #1\Z #5\Z }%
- {\romannumeral0\XINT_mul_fork #2\Z #4\Z }%
- {\romannumeral0\XINT_mul_fork #2\Z #3\Z }%
+ {\romannumeral0\XINT_mul_fork #1\xint:#6\xint:}%
+ {\romannumeral0\XINT_mul_fork #1\xint:#5\xint:}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#4\xint:}%
+ {\romannumeral0\XINT_mul_fork #2\xint:#3\xint:}%
}%
\def\XINT_gctcv_loop_j #1#2%
{%
@@ -787,7 +795,7 @@
\def\xintiGCtoCv {\romannumeral0\xintigctocv }%
\def\xintigctocv #1%
{%
- \expandafter\XINT_igctcv_prep \romannumeral`&&@#1+\xint_relax/%
+ \expandafter\XINT_igctcv_prep \romannumeral`&&@#1+!/%
}%
\def\XINT_igctcv_prep
{%
@@ -801,8 +809,8 @@
\def\XINT_igctcv_loop_b #1.#2#3#4#5%
{%
\expandafter\XINT_igctcv_loop_c\expandafter
- {\romannumeral0\xintiiadd {#5}{\XINT_mul_fork #1\Z #3\Z}}%
- {\romannumeral0\xintiiadd {#4}{\XINT_mul_fork #1\Z #2\Z}}%
+ {\romannumeral0\xintiiadd {#5}{\XINT_mul_fork #1\xint:#3\xint:}}%
+ {\romannumeral0\xintiiadd {#4}{\XINT_mul_fork #1\xint:#2\xint:}}%
{{#2}{#3}}%
}%
\def\XINT_igctcv_loop_c #1#2%
@@ -811,15 +819,15 @@
}%
\def\XINT_igctcv_loop_f #1#2#3#4/%
{%
- \xint_gob_til_xint_relax #4\XINT_igctcv_end_a\xint_relax
+ \xint_gob_til_exclam #4\XINT_igctcv_end_a!%
\expandafter\XINT_igctcv_loop_g
\romannumeral`&&@#4.#1#2{#3}%
}%
\def\XINT_igctcv_loop_g #1.#2#3#4#5%
{%
\expandafter\XINT_igctcv_loop_h\expandafter
- {\romannumeral0\XINT_mul_fork #1\Z #5\Z }%
- {\romannumeral0\XINT_mul_fork #1\Z #4\Z }%
+ {\romannumeral0\XINT_mul_fork #1\xint:#5\xint:}%
+ {\romannumeral0\XINT_mul_fork #1\xint:#4\xint:}%
{{#2}{#3}}%
}%
\def\XINT_igctcv_loop_h #1#2%
@@ -1009,25 +1017,25 @@
\def\xintCstoGC {\romannumeral0\xintcstogc }%
\def\xintcstogc #1%
{%
- \expandafter\XINT_cstc_prep \romannumeral`&&@#1,\xint_relax,%
+ \expandafter\XINT_cstc_prep \romannumeral`&&@#1,!,%
}%
\def\XINT_cstc_prep #1,{\XINT_cstc_loop_a {{#1}}}%
\def\XINT_cstc_loop_a #1#2,%
{%
- \xint_gob_til_xint_relax #2\XINT_cstc_end\xint_relax
+ \xint_gob_til_exclam #2\XINT_cstc_end!%
\XINT_cstc_loop_b {#1}{#2}%
}%
\def\XINT_cstc_loop_b #1#2{\XINT_cstc_loop_a {#1+1/{#2}}}%
-\def\XINT_cstc_end\xint_relax\XINT_cstc_loop_b #1#2{ #1}%
+\def\XINT_cstc_end!\XINT_cstc_loop_b #1#2{ #1}%
\def\xintGCtoGC {\romannumeral0\xintgctogc }%
\def\xintgctogc #1%
{%
- \expandafter\XINT_gctgc_start \romannumeral`&&@#1+\xint_relax/%
+ \expandafter\XINT_gctgc_start \romannumeral`&&@#1+!/%
}%
\def\XINT_gctgc_start {\XINT_gctgc_loop_a {}}%
\def\XINT_gctgc_loop_a #1#2+#3/%
{%
- \xint_gob_til_xint_relax #3\XINT_gctgc_end\xint_relax
+ \xint_gob_til_exclam #3\XINT_gctgc_end!%
\expandafter\XINT_gctgc_loop_b\expandafter
{\romannumeral`&&@#2}{#3}{#1}%
}%
@@ -1040,7 +1048,7 @@
{%
\XINT_gctgc_loop_a {#3{#2}+{#1}/}%
}%
-\def\XINT_gctgc_end\xint_relax\expandafter\XINT_gctgc_loop_b
+\def\XINT_gctgc_end!\expandafter\XINT_gctgc_loop_b
{%
\expandafter\XINT_gctgc_end_b
}%
diff --git a/Master/texmf-dist/tex/generic/xint/xintcore.sty b/Master/texmf-dist/tex/generic/xint/xintcore.sty
index 5dea1c7f6bf..96b159fb997 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcore.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcore.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintcore: Expandable arithmetic on big integers
%% ---------------------------------------------------------------
@@ -70,7 +70,74 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcore}%
- [2017/01/06 1.2k Expandable arithmetic on big integers (JFB)]%
+ [2017/07/26 1.2l Expandable arithmetic on big integers (JFB)]%
+\csname XINT_Clamped_istrapped\endcsname
+\csname XINT_ConversionSyntax_istrapped\endcsname
+\csname XINT_DivisionByZero_istrapped\endcsname
+\csname XINT_DivisionImpossible_istrapped\endcsname
+\csname XINT_DivisionUndefined_istrapped\endcsname
+\csname XINT_InvalidOperation_istrapped\endcsname
+\csname XINT_Overflow_istrapped\endcsname
+\csname XINT_Underflow_istrapped\endcsname
+\catcode`- 11
+\def\XINT_ConversionSyntax-signal {{InvalidOperation}}%
+\let\XINT_DivisionImpossible-signal\XINT_ConversionSyntax-signal
+\let\XINT_DivisionUndefined-signal \XINT_ConversionSyntax-signal
+\let\XINT_InvalidContext-signal \XINT_ConversionSyntax-signal
+\catcode`- 12
+\def\XINT_signalcondition #1{\expandafter\XINT_signalcondition_a
+ \romannumeral0\ifcsname XINT_#1-signal\endcsname
+ \xint_dothis{\csname XINT_#1-signal\endcsname}%
+ \fi\xint_orthat{{#1}}{#1}}%
+\def\XINT_signalcondition_a #1#2#3#4#5{% copied over from Python Decimal module
+ \ifcsname XINT_#1_isignoredflag\endcsname
+ \xint_dothis{\csname XINT_#1.handler\endcsname {#4}}%
+ \fi
+ \expandafter\xint_gobble_i\csname XINT_#1Flag_ON\endcsname
+ \unless\ifcsname XINT_#1_istrapped\endcsname
+ \xint_dothis{\csname XINT_#2.handler\endcsname {#4}}%
+ \fi
+ \xint_orthat{%
+ % the flag raised is named after the signal #1, but we show condition #2
+ \XINT_expandableerror{#2 (hit <RET> thrice)}%
+ \XINT_expandableerror{#3}%
+ \XINT_expandableerror{next: #5}%
+ % not for X3.274
+ %\XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}%
+ \xint_firstofone_thenstop{#5}%
+ }%
+}%
+%% \let\xintUse\xint_firstofthree_thenstop % defined in xint.sty
+\def\XINT_ifFlagRaised #1{%
+ \ifcsname XINT_#1Flag_ON\endcsname
+ \expandafter\xint_firstoftwo
+ \else
+ \expandafter\xint_secondoftwo
+ \fi}%
+\def\XINT_resetFlag #1%
+ {\expandafter\let\csname XINT_#1Flag_ON\endcsname\XINT_undefined}%
+\def\XINT_resetFlags {% WIP
+ \XINT_resetFlag{InvalidOperation}% also from DivisionUndefined
+ \XINT_resetFlag{DivisionByZero}%
+ \XINT_resetFlag{Underflow}% (\xintiiPow with negative exponent)
+ \XINT_resetFlag{Overflow}% not encountered so far in xint code 1.2l
+ % .. others ..
+}%
+%% NOT IMPLEMENTED! WORK IN PROGRESS! (ALL SIGNALS TRAPPED, NO HANDLERS USED)
+\catcode`. 11
+\let\XINT_Clamped.handler\xint_firstofone % WIP
+\def\XINT_InvalidOperation.handler#1{_NaN}% WIP
+\def\XINT_ConversionSyntax.handler#1{_NaN}% WIP
+\def\XINT_DivisionByZero.handler#1{_SignedInfinity(#1)}% WIP
+\def\XINT_DivisionImpossible.handler#1{_NaN}% WIP
+\def\XINT_DivisionUndefined.handler#1{_NaN}% WIP
+\let\XINT_Inexact.handler\xint_firstofone % WIP
+\def\XINT_InvalidContext.handler#1{_NaN}% WIP
+\let\XINT_Rounded.handler\xint_firstofone % WIP
+\let\XINT_Subnormal.handler\xint_firstofone% WIP
+\def\XINT_Overflow.handler#1{_NaN}% WIP
+\def\XINT_Underflow.handler#1{_NaN}% WIP
+\catcode`. 12
\ifdefined\m@ne\let\xint_c_mone\m@ne
\else\csname newcount\endcsname\xint_c_mone \xint_c_mone -1 \fi
\newcount\xint_c_x^viii \xint_c_x^viii 100000000
@@ -78,234 +145,46 @@
\newcount\xint_c_x^viii_mone \xint_c_x^viii_mone 99999999
\newcount\xint_c_xii_e_viii \xint_c_xii_e_viii 1200000000
\newcount\xint_c_xi_e_viii_mone \xint_c_xi_e_viii_mone 1099999999
-\newcount\xint_c_xii_e_viii_mone\xint_c_xii_e_viii_mone 1199999999
\def\xintiNum {\romannumeral0\xintinum }%
\def\xintinum #1%
{%
- \expandafter\XINT_num_loop
- \romannumeral`&&@#1\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \expandafter\XINT_num_cleanup\the\numexpr\expandafter\XINT_num_loop
+ \romannumeral`&&@#1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
}%
\let\xintNum\xintiNum \let\xintnum\xintinum
\def\XINT_num #1%
{%
- \XINT_num_loop #1\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop
+ #1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
}%
-\def\XINT_num_loop #1#2#3#4#5#6#7#8%
+\def\XINT_num_loop #1#2#3#4#5#6#7#8#9%
{%
- \xint_gob_til_xint_relax #8\XINT_num_end\xint_relax
- \XINT_num_NumEight #1#2#3#4#5#6#7#8%
-}%
-\edef\XINT_num_end\xint_relax\XINT_num_NumEight #1\xint_relax #2\Z
-{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1+\xint_c_\relax
-}%
-\def\XINT_num_NumEight #1#2#3#4#5#6#7#8%
-{%
- \ifnum \numexpr #1#2#3#4#5#6#7#8+\xint_c_= \xint_c_
- \xint_afterfi {\expandafter\XINT_num_keepsign_a
- \the\numexpr #1#2#3#4#5#6#7#81\relax}%
+ \xint_gob_til_xint: #9\XINT_num_end\xint:
+ #1#2#3#4#5#6#7#8#9%
+ \ifnum \numexpr #1#2#3#4#5#6#7#8#9+\xint_c_ = \xint_c_
+ \expandafter\XINT_num_loop
\else
- \xint_afterfi {\expandafter\XINT_num_finish
- \the\numexpr #1#2#3#4#5#6#7#8\relax}%
+ \expandafter\relax
\fi
}%
-\def\XINT_num_keepsign_a #1%
-{%
- \xint_gob_til_one#1\XINT_num_gobacktoloop 1\XINT_num_keepsign_b
-}%
-\def\XINT_num_gobacktoloop 1\XINT_num_keepsign_b {\XINT_num_loop }%
-\def\XINT_num_keepsign_b #1{\XINT_num_loop -}%
-\def\XINT_num_finish #1\xint_relax #2\Z { #1}%
-\edef\XINT_cuz_small #1#2#3#4#5#6#7#8%
-{%
- \noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6#7#8\relax
-}%
-\def\XINT_cuz #1#2#3#4#5#6#7#8#9%
-{%
- \xint_gob_til_R #9\XINT_cuz_e \R
- \xint_gob_til_eightzeroes #1#2#3#4#5#6#7#8\XINT_cuz_z 00000000%
- \XINT_cuz_done #1#2#3#4#5#6#7#8#9%
-}%
-\def\XINT_cuz_z 00000000\XINT_cuz_done 00000000{\XINT_cuz }%
-\edef\XINT_cuz_done #1#2#3#4#5#6#7#8#9\R
- {\noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5#6#7#8\relax #9}%
-\edef\XINT_cuz_e\R #1\XINT_cuz_done #2\R
- {\noexpand\expandafter\space\noexpand\the\numexpr #2\relax }%
-\def\XINT_cuz_byviii #1#2#3#4#5#6#7#8#9%
-{%
- \xint_gob_til_R #9\XINT_cuz_byviii_e \R
- \xint_gob_til_eightzeroes #1#2#3#4#5#6#7#8\XINT_cuz_byviii_z 00000000%
- \XINT_cuz_byviii_done #1#2#3#4#5#6#7#8#9%
-}%
-\def\XINT_cuz_byviii_z 00000000\XINT_cuz_byviii_done 00000000{\XINT_cuz_byviii}%
-\def\XINT_cuz_byviii_done #1\R { #1}%
-\def\XINT_cuz_byviii_e\R #1\XINT_cuz_byviii_done #2\R{ #2}%
-\def\XINT_zeroes_forviii #1#2#3#4#5#6#7#8%
-{%
- \xint_gob_til_R #8\XINT_zeroes_forviii_end\R\XINT_zeroes_forviii
-}%
-\edef\XINT_zeroes_forviii_end\R\XINT_zeroes_forviii #1#2#3#4#5#6#7#8#9\W
-{%
- \noexpand\expandafter\space\noexpand\xint_gob_til_one #2#3#4#5#6#7#8%
-}%
-\def\XINT_rsepbyviii #1#2#3#4#5#6#7#8%
-{%
- \XINT_rsepbyviii_b {#1#2#3#4#5#6#7#8}%
-}%
-\def\XINT_rsepbyviii_b #1#2#3#4#5#6#7#8#9%
-{%
- #2#3#4#5#6#7#8#9\expandafter!\the\numexpr
- 1#1\expandafter.\the\numexpr 1\XINT_rsepbyviii
-}%
-\def\XINT_rsepbyviii_end_B #1\relax #2#3{#2.}%
-\def\XINT_rsepbyviii_end_A #11#2\expandafter #3\relax #4#5{#2.1#5.}%
-\def\XINT_sepandrev
-{%
- \expandafter\XINT_sepandrev_a\the\numexpr 1\XINT_rsepbyviii
-}%
-\def\XINT_sepandrev_a {\XINT_sepandrev_b {}}%
-\def\XINT_sepandrev_b #1#2.#3.#4.#5.#6.#7.#8.#9.%
-{%
- \xint_gob_til_R #9\XINT_sepandrev_end\R
- \XINT_sepandrev_b {#9!#8!#7!#6!#5!#4!#3!#2!#1}%
-}%
-\def\XINT_sepandrev_end\R\XINT_sepandrev_b #1#2\W {\XINT_sepandrev_done #1}%
-\def\XINT_sepandrev_done #11#2!{ }%
-\def\XINT_sepandrev_andcount
-{%
- \expandafter\XINT_sepandrev_andcount_a\the\numexpr 1\XINT_rsepbyviii
-}%
-\def\XINT_sepandrev_andcount_a {\XINT_sepandrev_andcount_b 0.{}}%
-\def\XINT_sepandrev_andcount_b #1.#2#3.#4.#5.#6.#7.#8.#9.%
-{%
- \xint_gob_til_R #9\XINT_sepandrev_andcount_end\R
- \expandafter\XINT_sepandrev_andcount_b \the\numexpr #1+\xint_c_xiv.%
- {#9!#8!#7!#6!#5!#4!#3!#2}%
-}%
-\def\XINT_sepandrev_andcount_end\R
- \expandafter\XINT_sepandrev_andcount_b\the\numexpr #1+\xint_c_xiv.#2#3#4\W
-{\expandafter\XINT_sepandrev_andcount_done\the\numexpr \xint_c_ii*#3+#1.#2}%
-\edef\XINT_sepandrev_andcount_done #1.#21#3!%
- {\noexpand\expandafter\space\noexpand\the\numexpr #1-#3.}%
-\def\XINT_unrevbyviii #11#2!1#3!1#4!1#5!1#6!1#7!1#8!1#9!%
-{%
- \xint_gob_til_R #9\XINT_unrevbyviii_a\R
- \XINT_unrevbyviii {#9#8#7#6#5#4#3#2#1}%
-}%
-\edef\XINT_unrevbyviii_a\R\XINT_unrevbyviii #1#2\W
- {\noexpand\expandafter\space
- \noexpand\romannumeral`&&@\noexpand\xint_gob_til_Z #1}%
-\def\XINT_smallunrevbyviii 1#1!1#2!1#3!1#4!1#5!1#6!1#7!1#8!#9\W%
-{%
- \expandafter\XINT_cuz_small\xint_gob_til_Z #8#7#6#5#4#3#2#1%
-}%
-\def\XINT_sepbyviii_andcount
-{%
- \expandafter\XINT_sepbyviii_andcount_a\the\numexpr\XINT_sepbyviii
-}%
-\def\XINT_sepbyviii #1#2#3#4#5#6#7#8%
-{%
- 1#1#2#3#4#5#6#7#8\expandafter!\the\numexpr\XINT_sepbyviii
-}%
-\def\XINT_sepbyviii_end #1\relax {\relax\XINT_sepbyviii_andcount_end!}%
-\def\XINT_sepbyviii_andcount_a {\XINT_sepbyviii_andcount_b \xint_c_.}%
-\def\XINT_sepbyviii_andcount_b #1.#2!#3!#4!#5!#6!#7!#8!#9!%
-{%
- #2\expandafter!\the\numexpr#3\expandafter!\the\numexpr#4\expandafter
- !\the\numexpr#5\expandafter!\the\numexpr#6\expandafter!\the\numexpr
- #7\expandafter!\the\numexpr#8\expandafter!\the\numexpr#9\expandafter!\the\numexpr
- \expandafter\XINT_sepbyviii_andcount_b\the\numexpr #1+\xint_c_viii.%
-}%
-\def\XINT_sepbyviii_andcount_end #1\XINT_sepbyviii_andcount_b\the\numexpr
- #2+\xint_c_viii.#3#4\W {\expandafter.\the\numexpr #2+#3.}%
-\def\XINT_rev_nounsep #1#2!#3!#4!#5!#6!#7!#8!#9!%
-{%
- \xint_gob_til_R #9\XINT_rev_nounsep_end\R
- \XINT_rev_nounsep {#9!#8!#7!#6!#5!#4!#3!#2!#1}%
-}%
-\def\XINT_rev_nounsep_end\R\XINT_rev_nounsep #1#2\W {\XINT_rev_nounsep_done #1}%
-\def\XINT_rev_nounsep_done #11{ 1}%
-\def\XINT_sepbyviii_Z #1#2#3#4#5#6#7#8%
-{%
- 1#1#2#3#4#5#6#7#8\expandafter!\the\numexpr\XINT_sepbyviii_Z
-}%
-\def\XINT_sepbyviii_Z_end #1\relax {\relax\Z!}%
-\def\XINT_unsep_cuzsmall #11#2!1#3!1#4!1#5!1#6!1#7!1#8!1#9!%
-{%
- \xint_gob_til_R #9\XINT_unsep_cuzsmall_end\R
- \XINT_unsep_cuzsmall {#1#2#3#4#5#6#7#8#9}%
-}%
-\def\XINT_unsep_cuzsmall_end\R
- \XINT_unsep_cuzsmall #1{\XINT_unsep_cuzsmall_done #1}%
-\def\XINT_unsep_cuzsmall_done #1\R #2\W{\XINT_cuz_small #1}%
-\def\XINT_unsep_delim {1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W}%
-\def\XINT_div_unsepQ #11#2!1#3!1#4!1#5!1#6!1#7!1#8!1#9!%
-{%
- \xint_gob_til_R #9\XINT_div_unsepQ_end\R
- \XINT_div_unsepQ {#1#2#3#4#5#6#7#8#9}%
-}%
-\def\XINT_div_unsepQ_end\R\XINT_div_unsepQ #1{\XINT_div_unsepQ_x #1}%
-\def\XINT_div_unsepQ_x #1#2#3#4#5#6#7#8#9%
-{%
- \xint_gob_til_R #9\XINT_div_unsepQ_e \R
- \xint_gob_til_eightzeroes #1#2#3#4#5#6#7#8\XINT_div_unsepQ_y 00000000%
- \expandafter\XINT_div_unsepQ_done \the\numexpr #1#2#3#4#5#6#7#8.#9%
-}%
-\def\XINT_div_unsepQ_e\R\xint_gob_til_eightzeroes #1\XINT_div_unsepQ_y #2\W
- {\the\numexpr #1\relax \Z}%
-\def\XINT_div_unsepQ_y #1.#2\R #3\W{\XINT_cuz_small #2\Z}%
-\def\XINT_div_unsepQ_done #1.#2\R #3\W { #1#2\Z}%
-\def\XINT_div_unsepR #11#2!1#3!1#4!1#5!1#6!1#7!1#8!1#9!%
-{%
- \xint_gob_til_R #9\XINT_div_unsepR_end\R
- \XINT_div_unsepR {#1#2#3#4#5#6#7#8#9}%
-}%
-\def\XINT_div_unsepR_end\R\XINT_div_unsepR #1{\XINT_div_unsepR_done #1}%
-\def\XINT_div_unsepR_done #1\R #2\W {\XINT_cuz #1\R}%
-\def\XINT_microrevsep #1#2#3#4#5#6#7#8%
-{%
- 1#8#7#6#5#4#3#2#1\expandafter!\the\numexpr\XINT_microrevsep
-}%
-\def\XINT_microrevsep_end #1\W #2\expandafter #3\Z{#2!}%
-\def\xintReverseDigits {\romannumeral0\xintreversedigits }%
-\def\xintreversedigits #1{\expandafter\XINT_reversedigits\romannumeral`&&@#1\Z}%
-\def\XINT_reversedigits #1%
-{%
- \xint_UDsignfork
- #1{\expandafter-\romannumeral0\XINT_reversedigits_a}%
- -{\XINT_reversedigits_a #1}%
- \krof
-}%
-\def\XINT_reversedigits_a #1\Z
-{%
- \expandafter\XINT_revdigits_a\the\numexpr\expandafter\XINT_microrevsep
- \romannumeral`&&@#1{\XINT_microrevsep_end\W}\XINT_microrevsep_end
- \XINT_microrevsep_end\XINT_microrevsep_end
- \XINT_microrevsep_end\XINT_microrevsep_end
- \XINT_microrevsep_end\XINT_microrevsep_end\Z
- 1\Z!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
-}%
-\def\XINT_revdigits_a {\XINT_revdigits_b {}}%
-\def\XINT_revdigits_b #11#2!1#3!1#4!1#5!1#6!1#7!1#8!1#9!%
+\def\XINT_num_end\xint:#1\xint:{#1+\xint_c_\xint:}% empty input ok
+\def\XINT_num_cleanup #1\xint:#2\Z { #1}%
+\def\XINT_cuz_small#1{%
+\def\XINT_cuz_small ##1##2##3##4##5##6##7##8%
{%
- \xint_gob_til_R #9\XINT_revdigits_end\R
- \XINT_revdigits_b {#9#8#7#6#5#4#3#2#1}%
-}%
-\edef\XINT_revdigits_end\R\XINT_revdigits_b #1#2\W
- {\noexpand\expandafter\space\noexpand\xint_gob_til_Z #1}%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8\relax
+}}\XINT_cuz_small{ }%
\def\xintiiSgn {\romannumeral0\xintiisgn }%
\def\xintiisgn #1%
{%
- \expandafter\XINT_sgn \romannumeral`&&@#1\Z%
+ \expandafter\XINT_sgn \romannumeral`&&@#1\xint:
}%
\def\xintSgn {\romannumeral0\xintsgn }%
\def\xintsgn #1%
{%
- \expandafter\XINT_sgn \romannumeral0\xintnum{#1}\Z%
+ \expandafter\XINT_sgn \romannumeral0\xintnum{#1}\xint:
}%
-\def\XINT_sgn #1#2\Z
+\def\XINT_sgn #1#2\xint:
{%
\xint_UDzerominusfork
#1-{ 0}%
@@ -313,7 +192,7 @@
0-{ 1}%
\krof
}%
-\def\XINT_Sgn #1#2\Z
+\def\XINT_Sgn #1#2\xint:
{%
\xint_UDzerominusfork
#1-{0}%
@@ -321,7 +200,7 @@
0-{1}%
\krof
}%
-\def\XINT_cntSgn #1#2\Z
+\def\XINT_cntSgn #1#2\xint:
{%
\xint_UDzerominusfork
#1-\xint_c_
@@ -368,14 +247,14 @@
\def\xintiiFDg {\romannumeral0\xintiifdg }%
\def\xintiifdg #1%
{%
- \expandafter\XINT_fdg \romannumeral`&&@#1\W\Z
+ \expandafter\XINT_fdg \romannumeral`&&@#1\xint:\Z
}%
\def\xintFDg {\romannumeral0\xintfdg }%
\def\xintfdg #1%
{%
- \expandafter\XINT_fdg \romannumeral0\xintnum{#1}\W\Z
+ \expandafter\XINT_fdg \romannumeral0\xintnum{#1}\xint:\Z
}%
-\def\XINT_FDg #1{\romannumeral0\XINT_fdg #1\W\Z }%
+\def\XINT_FDg #1{\romannumeral0\XINT_fdg #1\xint:\Z }%
\def\XINT_fdg #1#2#3\Z
{%
\xint_UDzerominusfork
@@ -397,9 +276,11 @@
-{\XINT_ldg#1}%
\krof
}%
-\edef\XINT_ldg #1#2#3#4#5#6#7#8#9%
- {\noexpand\expandafter\space
- \noexpand\the\numexpr#9#8#7#6#5#4#3#2#1*\xint_c_+\noexpand\XINT_ldg_a#9}%
+\def\XINT_ldg #1{%
+\def\XINT_ldg ##1##2##3##4##5##6##7##8##9%
+ {\expandafter#1%
+ \the\numexpr##9##8##7##6##5##4##3##2##1*\xint_c_+\XINT_ldg_a##9}%
+}\XINT_ldg{ }%
\def\XINT_ldg_a#1#2{\XINT_ldg_cbye#2\XINT_ldg_d#1\XINT_ldg_c\XINT_ldg_b#2}%
\def\XINT_ldg_b#1#2#3#4#5#6#7#8#9{#9#8#7#6#5#4#3#2#1*\xint_c_+\XINT_ldg_a#9}%
\def\XINT_ldg_c #1#2\xint_bye{#1}%
@@ -416,8 +297,10 @@
\krof #1%
}%
\def\XINT_dbl_neg-{\expandafter-\romannumeral0\XINT_dbl}%
-\def\XINT_dbl #1#2#3#4#5#6#7#8%
- {\expandafter\space\the\numexpr#1#2#3#4#5#6#7#8\XINT_dbl_a}%
+\def\XINT_dbl #1{%
+\def\XINT_dbl ##1##2##3##4##5##6##7##8%
+ {\expandafter#1\the\numexpr##1##2##3##4##5##6##7##8\XINT_dbl_a}%
+}\XINT_dbl{ }%
\def\XINT_dbl_a #1#2#3#4#5#6#7#8%
{\expandafter\XINT_dbl_e\the\numexpr 1#1#2#3#4#5#6#7#8\XINT_dbl_a}%
\def\XINT_dbl_e#1{*\xint_c_ii\if#13+\xint_c_i\fi\relax}%
@@ -433,8 +316,10 @@
\krof #1%
}%
\def\XINT_half_neg-{\xintiiopp\XINT_half}%
-\def\XINT_half #1#2#3#4#5#6#7#8%
- {\expandafter\space\the\numexpr(#1#2#3#4#5#6#7#8\XINT_half_a}%
+\def\XINT_half #1{%
+\def\XINT_half ##1##2##3##4##5##6##7##8%
+ {\expandafter#1\the\numexpr(##1##2##3##4##5##6##7##8\XINT_half_a}%
+}\XINT_half{ }%
\def\XINT_half_a#1{\xint_Bye#1\xint_bye\XINT_half_b#1}%
\def\XINT_half_b #1#2#3#4#5#6#7#8%
{\expandafter\XINT_half_e\the\numexpr(1#1#2#3#4#5#6#7#8\XINT_half_a}%
@@ -451,8 +336,10 @@
}%
\def\XINT_inc_neg-#1\xint_bye#2\relax
{\xintiiopp\XINT_dec #1\XINT_dec_bye234567890\xint_bye}%
-\def\XINT_inc #1#2#3#4#5#6#7#8#9%
- {\expandafter\space\the\numexpr#1#2#3#4#5#6#7#8#9\XINT_inc_a}%
+\def\XINT_inc #1{%
+\def\XINT_inc ##1##2##3##4##5##6##7##8##9%
+ {\expandafter#1\the\numexpr##1##2##3##4##5##6##7##8##9\XINT_inc_a}%
+}\XINT_inc{ }%
\def\XINT_inc_a #1#2#3#4#5#6#7#8#9%
{\expandafter\XINT_inc_e\the\numexpr 1#1#2#3#4#5#6#7#8#9\XINT_inc_a}%
\def\XINT_inc_e#1{\if#12+\xint_c_i\fi\relax}%
@@ -469,8 +356,10 @@
\def\XINT_dec_neg-#1\XINT_dec_bye#2\xint_bye
{\expandafter-%
\romannumeral0\XINT_inc #1\xint_bye23456789\xint_bye+\xint_c_i\relax}%
-\def\XINT_dec #1#2#3#4#5#6#7#8#9%
- {\expandafter\space\the\numexpr#1#2#3#4#5#6#7#8#9\XINT_dec_a}%
+\def\XINT_dec #1{%
+\def\XINT_dec ##1##2##3##4##5##6##7##8##9%
+ {\expandafter#1\the\numexpr##1##2##3##4##5##6##7##8##9\XINT_dec_a}%
+}\XINT_dec{ }%
\def\XINT_dec_a #1#2#3#4#5#6#7#8#9%
{\expandafter\XINT_dec_e\the\numexpr 1#1#2#3#4#5#6#7#8#9\XINT_dec_a}%
\def\XINT_dec_bye #1\XINT_dec_a#2#3\xint_bye
@@ -478,8 +367,9 @@
\def\XINT_dec_e#1{\unless\if#11\xint_dothis{-\xint_c_i#1}\fi\xint_orthat\relax}%
\def\xintDSL {\romannumeral0\xintdsl }%
\def\xintdsl #1{\expandafter\XINT_dsl\romannumeral`&&@#10}%
-\edef\XINT_dsl #1%
- {\noexpand\xint_gob_til_zero #1\noexpand\xint_dsl_zero 0\space #1}%
+\def\XINT_dsl#1{%
+\def\XINT_dsl ##1{\xint_gob_til_zero ##1\xint_dsl_zero 0#1##1}%
+}\XINT_dsl{ }%
\def\xint_dsl_zero 0 0{ }%
\def\xintDSR{\romannumeral0\xintdsr}%
\def\xintdsr #1{\expandafter\XINT_dsr_fork\romannumeral`&&@#1%
@@ -492,8 +382,10 @@
\krof #1%
}%
\def\XINT_dsr_neg-{\xintiiopp\XINT_dsr}%
-\def\XINT_dsr #1#2#3#4#5#6#7#8#9%
- {\expandafter\space\the\numexpr(#1#2#3#4#5#6#7#8#9\XINT_dsr_a}%
+\def\XINT_dsr #1{%
+\def\XINT_dsr ##1##2##3##4##5##6##7##8##9%
+ {\expandafter#1\the\numexpr(##1##2##3##4##5##6##7##8##9\XINT_dsr_a}%
+}\XINT_dsr{ }%
\def\XINT_dsr_a#1{\xint_Bye#1\xint_bye\XINT_dsr_b#1}%
\def\XINT_dsr_b #1#2#3#4#5#6#7#8#9%
{\expandafter\XINT_dsr_e\the\numexpr(1#1#2#3#4#5#6#7#8#9\XINT_dsr_a}%
@@ -509,25 +401,192 @@
\krof #1%
}%
\def\XINT_dsrr_neg-{\xintiiopp\XINT_dsrr}%
-\def\XINT_dsrr #1#2#3#4#5#6#7#8#9%
- {\expandafter\space\the\numexpr#1#2#3#4#5#6#7#8#9\XINT_dsrr_a}%
+\def\XINT_dsrr #1{%
+\def\XINT_dsrr ##1##2##3##4##5##6##7##8##9%
+ {\expandafter#1\the\numexpr##1##2##3##4##5##6##7##8##9\XINT_dsrr_a}%
+}\XINT_dsrr{ }%
\def\XINT_dsrr_a#1{\xint_Bye#1\xint_bye\XINT_dsrr_b#1}%
\def\XINT_dsrr_b #1#2#3#4#5#6#7#8#9%
{\expandafter\XINT_dsrr_e\the\numexpr1#1#2#3#4#5#6#7#8#9\XINT_dsrr_a}%
\let\XINT_dsrr_e\XINT_inc_e
+\def\XINT_cuz #1{%
+\def\XINT_cuz {\expandafter#1\the\numexpr\XINT_cuz_loop}%
+}\XINT_cuz{ }%
+\def\XINT_cuz_loop #1#2#3#4#5#6#7#8#9%
+{%
+ #1#2#3#4#5#6#7#8%
+ \xint_gob_til_R #9\XINT_cuz_hitend\R
+ \ifnum #1#2#3#4#5#6#7#8>\xint_c_
+ \expandafter\XINT_cuz_cleantoend
+ \else\expandafter\XINT_cuz_loop
+ \fi #9%
+}%
+\def\XINT_cuz_hitend\R #1\R{\relax}%
+\def\XINT_cuz_cleantoend #1\R{\relax #1}%
+\def\XINT_cuz_byviii #1#2#3#4#5#6#7#8#9%
+{%
+ \xint_gob_til_R #9\XINT_cuz_byviii_e \R
+ \xint_gob_til_eightzeroes #1#2#3#4#5#6#7#8\XINT_cuz_byviii_z 00000000%
+ \XINT_cuz_byviii_done #1#2#3#4#5#6#7#8#9%
+}%
+\def\XINT_cuz_byviii_z 00000000\XINT_cuz_byviii_done 00000000{\XINT_cuz_byviii}%
+\def\XINT_cuz_byviii_done #1\R { #1}%
+\def\XINT_cuz_byviii_e\R #1\XINT_cuz_byviii_done #2\R{ #2}%
+\def\XINT_unsep_loop #1!#2!#3!#4!#5!#6!#7!#8!#9!%
+{%
+ \expandafter\XINT_unsep_clean
+ \the\numexpr #1\expandafter\XINT_unsep_clean
+ \the\numexpr #2\expandafter\XINT_unsep_clean
+ \the\numexpr #3\expandafter\XINT_unsep_clean
+ \the\numexpr #4\expandafter\XINT_unsep_clean
+ \the\numexpr #5\expandafter\XINT_unsep_clean
+ \the\numexpr #6\expandafter\XINT_unsep_clean
+ \the\numexpr #7\expandafter\XINT_unsep_clean
+ \the\numexpr #8\expandafter\XINT_unsep_clean
+ \the\numexpr #9\XINT_unsep_loop
+}%
+\def\XINT_unsep_clean 1{\relax}%
+\def\XINT_unsep_cuzsmall
+{%
+ \expandafter\XINT_unsep_cuzsmall_x\the\numexpr0\XINT_unsep_loop
+}%
+\def\XINT_unsep_cuzsmall_x #1{%
+\def\XINT_unsep_cuzsmall_x 0##1##2##3##4##5##6##7##8%
+{%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8\relax
+}}\XINT_unsep_cuzsmall_x{ }%
+\def\XINT_div_unsepQ_delim {\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax\Z}%
+\def\XINT_div_unsepQ
+{%
+ \expandafter\XINT_div_unsepQ_x\the\numexpr0\XINT_unsep_loop
+}%
+\def\XINT_div_unsepQ_x #1{%
+\def\XINT_div_unsepQ_x 0##1##2##3##4##5##6##7##8##9%
+{%
+ \xint_gob_til_Z ##9\XINT_div_unsepQ_one\Z
+ \xint_gob_til_eightzeroes ##1##2##3##4##5##6##7##8\XINT_div_unsepQ_y 00000000%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8\relax ##9%
+}}\XINT_div_unsepQ_x{ }%
+\def\XINT_div_unsepQ_y #1{%
+\def\XINT_div_unsepQ_y ##1\relax ##2##3##4##5##6##7##8##9%
+{%
+ \expandafter#1\the\numexpr ##2##3##4##5##6##7##8##9\relax
+}}\XINT_div_unsepQ_y{ }%
+\def\XINT_div_unsepQ_one#1\expandafter{\expandafter}%
+\def\XINT_div_unsepR
+{%
+ \expandafter\XINT_div_unsepR_x\the\numexpr0\XINT_unsep_loop
+}%
+\def\XINT_div_unsepR_x#1{%
+\def\XINT_div_unsepR_x 0{\expandafter#1\the\numexpr\XINT_cuz_loop}%
+}\XINT_div_unsepR_x{ }%
+\def\XINT_zeroes_forviii #1#2#3#4#5#6#7#8%
+{%
+ \xint_gob_til_R #8\XINT_zeroes_forviii_end\R\XINT_zeroes_forviii
+}%
+\def\XINT_zeroes_forviii_end#1{%
+\def\XINT_zeroes_forviii_end\R\XINT_zeroes_forviii ##1##2##3##4##5##6##7##8##9\W
+{%
+ \expandafter#1\xint_gob_til_one ##2##3##4##5##6##7##8%
+}}\XINT_zeroes_forviii_end{ }%
+\def\XINT_sepbyviii_Z #1#2#3#4#5#6#7#8%
+{%
+ 1#1#2#3#4#5#6#7#8\expandafter!\the\numexpr\XINT_sepbyviii_Z
+}%
+\def\XINT_sepbyviii_Z_end #1\relax {;!}%
+\def\XINT_sepbyviii_andcount
+{%
+ \expandafter\XINT_sepbyviii_andcount_a\the\numexpr\XINT_sepbyviii
+}%
+\def\XINT_sepbyviii #1#2#3#4#5#6#7#8%
+{%
+ 1#1#2#3#4#5#6#7#8\expandafter!\the\numexpr\XINT_sepbyviii
+}%
+\def\XINT_sepbyviii_end #1\relax {\relax\XINT_sepbyviii_andcount_end!}%
+\def\XINT_sepbyviii_andcount_a {\XINT_sepbyviii_andcount_b \xint_c_\xint:}%
+\def\XINT_sepbyviii_andcount_b #1\xint:#2!#3!#4!#5!#6!#7!#8!#9!%
+{%
+ #2\expandafter!\the\numexpr#3\expandafter!\the\numexpr#4\expandafter
+ !\the\numexpr#5\expandafter!\the\numexpr#6\expandafter!\the\numexpr
+ #7\expandafter!\the\numexpr#8\expandafter!\the\numexpr#9\expandafter!\the\numexpr
+ \expandafter\XINT_sepbyviii_andcount_b\the\numexpr #1+\xint_c_viii\xint:%
+}%
+\def\XINT_sepbyviii_andcount_end #1\XINT_sepbyviii_andcount_b\the\numexpr
+ #2+\xint_c_viii\xint:#3#4\W {\expandafter\xint:\the\numexpr #2+#3\xint:}%
+\def\XINT_rsepbyviii #1#2#3#4#5#6#7#8%
+{%
+ \XINT_rsepbyviii_b {#1#2#3#4#5#6#7#8}%
+}%
+\def\XINT_rsepbyviii_b #1#2#3#4#5#6#7#8#9%
+{%
+ #2#3#4#5#6#7#8#9\expandafter!\the\numexpr
+ 1#1\expandafter\xint:\the\numexpr 1\XINT_rsepbyviii
+}%
+\def\XINT_rsepbyviii_end_B #1\relax #2#3{#2\xint:}%
+\def\XINT_rsepbyviii_end_A #11#2\expandafter #3\relax #4#5{#5!1#2\xint:}%
+\def\XINT_sepandrev
+{%
+ \expandafter\XINT_sepandrev_a\the\numexpr 1\XINT_rsepbyviii
+}%
+\def\XINT_sepandrev_a {\XINT_sepandrev_b {}}%
+\def\XINT_sepandrev_b #1#2\xint:#3\xint:#4\xint:#5\xint:#6\xint:#7\xint:#8\xint:#9\xint:%
+{%
+ \xint_gob_til_R #9\XINT_sepandrev_end\R
+ \XINT_sepandrev_b {#9!#8!#7!#6!#5!#4!#3!#2!#1}%
+}%
+\def\XINT_sepandrev_end\R\XINT_sepandrev_b #1#2\W {\XINT_sepandrev_done #1}%
+\def\XINT_sepandrev_done #11#2!{ }%
+\def\XINT_sepandrev_andcount
+{%
+ \expandafter\XINT_sepandrev_andcount_a\the\numexpr 1\XINT_rsepbyviii
+}%
+\def\XINT_sepandrev_andcount_a {\XINT_sepandrev_andcount_b 0!{}}%
+\def\XINT_sepandrev_andcount_b #1!#2#3\xint:#4\xint:#5\xint:#6\xint:#7\xint:#8\xint:#9\xint:%
+{%
+ \xint_gob_til_R #9\XINT_sepandrev_andcount_end\R
+ \expandafter\XINT_sepandrev_andcount_b \the\numexpr #1+\xint_c_i!%
+ {#9!#8!#7!#6!#5!#4!#3!#2}%
+}%
+\def\XINT_sepandrev_andcount_end\R
+ \expandafter\XINT_sepandrev_andcount_b\the\numexpr #1+\xint_c_i!#2#3#4\W
+{\expandafter\XINT_sepandrev_andcount_done\the\numexpr #3+\xint_c_xiv*#1!#2}%
+\def\XINT_sepandrev_andcount_done#1{%
+\def\XINT_sepandrev_andcount_done##1!##21##3!{\expandafter#1\the\numexpr##1-##3\xint:}%
+}\XINT_sepandrev_andcount_done{ }%
+\def\XINT_rev_nounsep #1#2!#3!#4!#5!#6!#7!#8!#9!%
+{%
+ \xint_gob_til_R #9\XINT_rev_nounsep_end\R
+ \XINT_rev_nounsep {#9!#8!#7!#6!#5!#4!#3!#2!#1}%
+}%
+\def\XINT_rev_nounsep_end\R\XINT_rev_nounsep #1#2\W {\XINT_rev_nounsep_done #1}%
+\def\XINT_rev_nounsep_done #11{ 1}%
+\def\XINT_unrevbyviii #11#2!1#3!1#4!1#5!1#6!1#7!1#8!1#9!%
+{%
+ \xint_gob_til_R #9\XINT_unrevbyviii_a\R
+ \XINT_unrevbyviii {#9#8#7#6#5#4#3#2#1}%
+}%
+\def\XINT_unrevbyviii_a#1{%
+\def\XINT_unrevbyviii_a\R\XINT_unrevbyviii ##1##2\W
+ {\expandafter#1\romannumeral`&&@\xint_gob_til_sc ##1}%
+}\XINT_unrevbyviii_a{ }%
+\def\XINT_smallunrevbyviii 1#1!1#2!1#3!1#4!1#5!1#6!1#7!1#8!#9\W%
+{%
+ \expandafter\XINT_cuz_small\xint_gob_til_sc #8#7#6#5#4#3#2#1%
+}%
\def\xintiAdd {\romannumeral0\xintiadd }%
-\def\xintiadd #1{\expandafter\XINT_iadd\romannumeral0\xintnum{#1}\Z }%
+\def\xintiadd #1{\expandafter\XINT_iadd\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiAdd {\romannumeral0\xintiiadd }%
-\def\xintiiadd #1{\expandafter\XINT_iiadd\romannumeral`&&@#1\Z }%
-\def\XINT_iiadd #1#2\Z #3%
+\def\xintiiadd #1{\expandafter\XINT_iiadd\romannumeral`&&@#1\xint:}%
+\def\XINT_iiadd #1#2\xint:#3%
{%
- \expandafter\XINT_add_nfork\expandafter #1\romannumeral`&&@#3\Z #2\Z
+ \expandafter\XINT_add_nfork\expandafter#1\romannumeral`&&@#3\xint:#2\xint:
}%
-\def\XINT_iadd #1#2\Z #3%
+\def\XINT_iadd #1#2\xint:#3%
{%
- \expandafter\XINT_add_nfork\expandafter #1\romannumeral0\xintnum{#3}\Z #2\Z
+ \expandafter\XINT_add_nfork\expandafter
+ #1\romannumeral0\xintnum{#3}\xint:#2\xint:
}%
-\def\XINT_add_fork #1#2\Z #3\Z {\XINT_add_nfork #1#3\Z #2\Z}%
+\def\XINT_add_fork #1#2\xint:#3\xint:{\XINT_add_nfork #1#3\xint:#2\xint:}%
\def\XINT_add_nfork #1#2%
{%
\xint_UDzerofork
@@ -542,52 +601,52 @@
--\XINT_add_plusplus
\krof #1#2%
}%
-\def\XINT_add_firstiszero #1\krof 0#2#3\Z #4\Z { #2#3}%
-\def\XINT_add_secondiszero #1\krof #20#3\Z #4\Z { #2#4}%
+\def\XINT_add_firstiszero #1\krof 0#2#3\xint:#4\xint:{ #2#3}%
+\def\XINT_add_secondiszero #1\krof #20#3\xint:#4\xint:{ #2#4}%
\def\XINT_add_minusminus #1#2%
{\expandafter-\romannumeral0\XINT_add_pp_a {}{}}%
\def\XINT_add_minusplus #1#2{\XINT_sub_mm_a {}#2}%
\def\XINT_add_plusminus #1#2%
{\expandafter\XINT_opp\romannumeral0\XINT_sub_mm_a #1{}}%
-\def\XINT_add_pp_a #1#2#3\Z
+\def\XINT_add_pp_a #1#2#3\xint:
{%
\expandafter\XINT_add_pp_b
\romannumeral0\expandafter\XINT_sepandrev_andcount
\romannumeral0\XINT_zeroes_forviii #2#3\R\R\R\R\R\R\R\R{10}0000001\W
#2#3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
\X #1%
}%
\let\XINT_add_plusplus \XINT_add_pp_a
-\def\XINT_add_pp_b #1.#2\X #3\Z
+\def\XINT_add_pp_b #1\xint:#2\X #3\xint:
{%
\expandafter\XINT_add_checklengths
- \the\numexpr #1\expandafter.%
+ \the\numexpr #1\expandafter\xint:%
\romannumeral0\expandafter\XINT_sepandrev_andcount
\romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W
#3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
- 1\Z!1\Z!1\Z!1\Z!\W #21\Z!1\Z!1\Z!1\Z!\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
+ 1;!1;!1;!1;!\W #21;!1;!1;!1;!\W
1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
}%
-\def\XINT_add_checklengths #1.#2.%
+\def\XINT_add_checklengths #1\xint:#2\xint:%
{%
\ifnum #2>#1
\expandafter\XINT_add_exchange
\else
\expandafter\XINT_add_A
\fi
- #1.#2.%
+ #1\xint:#2\xint:%
}%
-\def\XINT_add_exchange #1.#2.#3\W #4\W
+\def\XINT_add_exchange #1\xint:#2\xint:#3\W #4\W
{%
- \XINT_add_A #2.#1.#4\W #3\W
+ \XINT_add_A #2\xint:#1\xint:#4\W #3\W
}%
-\def\XINT_add_A #1.#2.%
+\def\XINT_add_A #1\xint:#2\xint:%
{%
\ifnum #1>\xint_c_vi
\expandafter\XINT_add_aa
@@ -598,85 +657,194 @@
\def\XINT_add_out{\expandafter\XINT_cuz_small\romannumeral0\XINT_unrevbyviii {}}%
\def\XINT_add_aa_small
{\expandafter\XINT_smallunrevbyviii\the\numexpr\XINT_add_a \xint_c_ii}%
-\def\XINT_add_a #1!#2!#3!#4!#5\W #6!#7!#8!#9!%
+\def\XINT_add_a #1!#2!#3!#4!#5\W
+ #6!#7!#8!#9!%
{%
- \XINT_add_b #1!#6!#2!#7!#3!#8!#4!#9!#5\W
+ \XINT_add_b
+ #1!#6!#2!#7!#3!#8!#4!#9!%
+ #5\W
}%
\def\XINT_add_b #11#2#3!#4!%
{%
- \xint_gob_til_Z #2\XINT_add_bi \Z
- \expandafter\XINT_add_c\the\numexpr#1+1#2#3+#4-\xint_c_ii.%
+ \xint_gob_til_sc #2\XINT_add_bi ;%
+ \expandafter\XINT_add_c\the\numexpr#1+1#2#3+#4-\xint_c_ii\xint:%
}%
-\def\XINT_add_bi\Z\expandafter\XINT_add_c
- \the\numexpr#1+#2+#3-\xint_c_ii.#4!#5!#6!#7!#8!#9!\W
+\def\XINT_add_bi;\expandafter\XINT_add_c
+ \the\numexpr#1+#2+#3-\xint_c_ii\xint:#4!#5!#6!#7!#8!#9!\W
{%
\XINT_add_k #1#3!#5!#7!#9!%
}%
-\def\XINT_add_c #1#2.%
+\def\XINT_add_c #1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_add_d #1%
}%
\def\XINT_add_d #11#2#3!#4!%
{%
- \xint_gob_til_Z #2\XINT_add_di \Z
- \expandafter\XINT_add_e\the\numexpr#1+1#2#3+#4-\xint_c_ii.%
+ \xint_gob_til_sc #2\XINT_add_di ;%
+ \expandafter\XINT_add_e\the\numexpr#1+1#2#3+#4-\xint_c_ii\xint:%
}%
-\def\XINT_add_di\Z\expandafter\XINT_add_e
- \the\numexpr#1+#2+#3-\xint_c_ii.#4!#5!#6!#7!#8\W
+\def\XINT_add_di;\expandafter\XINT_add_e
+ \the\numexpr#1+#2+#3-\xint_c_ii\xint:#4!#5!#6!#7!#8\W
{%
\XINT_add_k #1#3!#5!#7!%
}%
-\def\XINT_add_e #1#2.%
+\def\XINT_add_e #1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_add_f #1%
}%
\def\XINT_add_f #11#2#3!#4!%
{%
- \xint_gob_til_Z #2\XINT_add_fi \Z
- \expandafter\XINT_add_g\the\numexpr#1+1#2#3+#4-\xint_c_ii.%
+ \xint_gob_til_sc #2\XINT_add_fi ;%
+ \expandafter\XINT_add_g\the\numexpr#1+1#2#3+#4-\xint_c_ii\xint:%
}%
-\def\XINT_add_fi\Z\expandafter\XINT_add_g
- \the\numexpr#1+#2+#3-\xint_c_ii.#4!#5!#6\W
+\def\XINT_add_fi;\expandafter\XINT_add_g
+ \the\numexpr#1+#2+#3-\xint_c_ii\xint:#4!#5!#6\W
{%
\XINT_add_k #1#3!#5!%
}%
-\def\XINT_add_g #1#2.%
+\def\XINT_add_g #1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_add_h #1%
}%
\def\XINT_add_h #11#2#3!#4!%
{%
- \xint_gob_til_Z #2\XINT_add_hi \Z
- \expandafter\XINT_add_i\the\numexpr#1+1#2#3+#4-\xint_c_ii.%
+ \xint_gob_til_sc #2\XINT_add_hi ;%
+ \expandafter\XINT_add_i\the\numexpr#1+1#2#3+#4-\xint_c_ii\xint:%
}%
-\def\XINT_add_hi\Z
- \expandafter\XINT_add_i\the\numexpr#1+#2+#3-\xint_c_ii.#4\W
+\def\XINT_add_hi;%
+ \expandafter\XINT_add_i\the\numexpr#1+#2+#3-\xint_c_ii\xint:#4\W
{%
\XINT_add_k #1#3!%
}%
-\def\XINT_add_i #1#2.%
+\def\XINT_add_i #1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_add_a #1%
}%
\def\XINT_add_k #1{\if #12\expandafter\XINT_add_ke\else\expandafter\XINT_add_l \fi}%
-\def\XINT_add_ke #11\Z #2\W {\XINT_add_kf #11\Z!}%
+\def\XINT_add_ke #11;#2\W {\XINT_add_kf #11;!}%
\def\XINT_add_kf 1{1\relax }%
-\def\XINT_add_l 1#1#2{\xint_gob_til_Z #1\XINT_add_lf \Z \XINT_add_m 1#1#2}%
-\def\XINT_add_lf #1\W {1\relax 00000001!1\Z!}%
-\def\XINT_add_m #1!{\expandafter\XINT_add_n\the\numexpr\xint_c_i+#1.}%
-\def\XINT_add_n #1#2.{1#2\expandafter!\the\numexpr\XINT_add_o #1}%
+\def\XINT_add_l 1#1#2{\xint_gob_til_sc #1\XINT_add_lf ;\XINT_add_m 1#1#2}%
+\def\XINT_add_lf #1\W {1\relax 00000001!1;!}%
+\def\XINT_add_m #1!{\expandafter\XINT_add_n\the\numexpr\xint_c_i+#1\xint:}%
+\def\XINT_add_n #1#2\xint:{1#2\expandafter!\the\numexpr\XINT_add_o #1}%
\def\XINT_add_o #1{\if #12\expandafter\XINT_add_l\else\expandafter\XINT_add_ke \fi}%
+\def\xintCmp {\romannumeral0\xintcmp }%
+\def\xintcmp #1{\expandafter\XINT_icmp\romannumeral0\xintnum{#1}\xint:}%
+\def\xintiiCmp {\romannumeral0\xintiicmp }%
+\def\xintiicmp #1{\expandafter\XINT_iicmp\romannumeral`&&@#1\xint:}%
+\def\XINT_iicmp #1#2\xint:#3%
+{%
+ \expandafter\XINT_cmp_nfork\expandafter #1\romannumeral`&&@#3\xint:#2\xint:
+}%
+\def\XINT_icmp #1#2\xint:#3%
+{%
+ \expandafter\XINT_cmp_nfork\expandafter #1\romannumeral0\xintnum{#3}\xint:#2\xint:
+}%
+\def\XINT_cmp_nfork #1#2%
+{%
+ \xint_UDzerofork
+ #1\XINT_cmp_firstiszero
+ #2\XINT_cmp_secondiszero
+ 0{}%
+ \krof
+ \xint_UDsignsfork
+ #1#2\XINT_cmp_minusminus
+ #1-\XINT_cmp_minusplus
+ #2-\XINT_cmp_plusminus
+ --\XINT_cmp_plusplus
+ \krof #1#2%
+}%
+\def\XINT_cmp_firstiszero #1\krof 0#2#3\xint:#4\xint:
+{%
+ \xint_UDzerominusfork
+ #2-{ 0}%
+ 0#2{ 1}%
+ 0-{ -1}%
+ \krof
+}%
+\def\XINT_cmp_secondiszero #1\krof #20#3\xint:#4\xint:
+{%
+ \xint_UDzerominusfork
+ #2-{ 0}%
+ 0#2{ -1}%
+ 0-{ 1}%
+ \krof
+}%
+\def\XINT_cmp_plusminus #1\xint:#2\xint:{ 1}%
+\def\XINT_cmp_minusplus #1\xint:#2\xint:{ -1}%
+\def\XINT_cmp_minusminus
+ --{\expandafter\XINT_opp\romannumeral0\XINT_cmp_plusplus {}{}}%
+\def\XINT_cmp_plusplus #1#2#3\xint:
+{%
+ \expandafter\XINT_cmp_pp
+ \the\numexpr\expandafter\XINT_sepbyviii_andcount
+ \romannumeral0\XINT_zeroes_forviii #2#3\R\R\R\R\R\R\R\R{10}0000001\W
+ #2#3\XINT_sepbyviii_end 2345678\relax
+ \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!%
+ \xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W
+ #1%
+}%
+\def\XINT_cmp_pp #1\xint:#2\xint:#3\xint:
+{%
+ \expandafter\XINT_cmp_checklengths
+ \the\numexpr #2\expandafter\xint:%
+ \the\numexpr\expandafter\XINT_sepbyviii_andcount
+ \romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W
+ #3\XINT_sepbyviii_end 2345678\relax
+ \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!%
+ \xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W
+ #1;!1;!1;!1;!\W
+}%
+\def\XINT_cmp_checklengths #1\xint:#2\xint:#3\xint:
+{%
+ \ifnum #1=#3
+ \expandafter\xint_firstoftwo
+ \else
+ \expandafter\xint_secondoftwo
+ \fi
+ \XINT_cmp_a {\XINT_cmp_distinctlengths {#1}{#3}}#2;!1;!1;!1;!\W
+}%
+\def\XINT_cmp_distinctlengths #1#2#3\W #4\W
+{%
+ \ifnum #1>#2
+ \expandafter\xint_firstoftwo
+ \else
+ \expandafter\xint_secondoftwo
+ \fi
+ { -1}{ 1}%
+}%
+\def\XINT_cmp_a 1#1!1#2!1#3!1#4!#5\W 1#6!1#7!1#8!1#9!%
+{%
+ \xint_gob_til_sc #1\XINT_cmp_equal ;%
+ \ifnum #1>#6 \XINT_cmp_gt\fi
+ \ifnum #1<#6 \XINT_cmp_lt\fi
+ \xint_gob_til_sc #2\XINT_cmp_equal ;%
+ \ifnum #2>#7 \XINT_cmp_gt\fi
+ \ifnum #2<#7 \XINT_cmp_lt\fi
+ \xint_gob_til_sc #3\XINT_cmp_equal ;%
+ \ifnum #3>#8 \XINT_cmp_gt\fi
+ \ifnum #3<#8 \XINT_cmp_lt\fi
+ \xint_gob_til_sc #4\XINT_cmp_equal ;%
+ \ifnum #4>#9 \XINT_cmp_gt\fi
+ \ifnum #4<#9 \XINT_cmp_lt\fi
+ \XINT_cmp_a #5\W
+}%
+\def\XINT_cmp_lt#1{\def\XINT_cmp_lt\fi ##1\W ##2\W {\fi#1-1}}\XINT_cmp_lt{ }%
+\def\XINT_cmp_gt#1{\def\XINT_cmp_gt\fi ##1\W ##2\W {\fi#11}}\XINT_cmp_gt{ }%
+\def\XINT_cmp_equal #1\W #2\W { 0}%
\def\xintiiSub {\romannumeral0\xintiisub }%
-\def\xintiisub #1{\expandafter\XINT_iisub\romannumeral`&&@#1\Z }%
-\def\XINT_iisub #1#2\Z #3%
+\def\xintiisub #1{\expandafter\XINT_iisub\romannumeral`&&@#1\xint:}%
+\def\XINT_iisub #1#2\xint:#3%
{%
- \expandafter\XINT_sub_nfork\expandafter #1\romannumeral`&&@#3\Z #2\Z
+ \expandafter\XINT_sub_nfork\expandafter
+ #1\romannumeral`&&@#3\xint:#2\xint:
}%
-\def\xintiSub {\romannumeral0\xintisub }%
-\def\xintisub #1{\expandafter\XINT_isub\romannumeral0\xintnum{#1}\Z }%
-\def\XINT_isub #1#2\Z #3%
+\def\xintiSub {\romannumeral0\xintisub }%
+\def\xintisub #1{\expandafter\XINT_isub\romannumeral0\xintnum{#1}\xint:}%
+\def\XINT_isub #1#2\xint:#3%
{%
- \expandafter\XINT_sub_nfork\expandafter #1\romannumeral0\xintnum{#3}\Z #2\Z
+ \expandafter\XINT_sub_nfork\expandafter
+ #1\romannumeral0\xintnum{#3}\xint:#2\xint:
}%
\def\XINT_sub_nfork #1#2%
{%
@@ -692,38 +860,41 @@
--\XINT_sub_plusplus
\krof #1#2%
}%
-\def\XINT_sub_firstiszero #1\krof 0#2#3\Z #4\Z {\XINT_opp #2#3}%
-\def\XINT_sub_secondiszero #1\krof #20#3\Z #4\Z { #2#4}%
+\def\XINT_sub_firstiszero #1\krof 0#2#3\xint:#4\xint:{\XINT_opp #2#3}%
+\def\XINT_sub_secondiszero #1\krof #20#3\xint:#4\xint:{ #2#4}%
\def\XINT_sub_plusminus #1#2{\XINT_add_pp_a #1{}}%
\def\XINT_sub_plusplus #1#2%
{\expandafter\XINT_opp\romannumeral0\XINT_sub_mm_a #1#2}%
\def\XINT_sub_minusplus #1#2%
{\expandafter-\romannumeral0\XINT_add_pp_a {}#2}%
\def\XINT_sub_minusminus #1#2{\XINT_sub_mm_a {}{}}%
-\def\XINT_sub_mm_a #1#2#3\Z
+\def\XINT_sub_mm_a #1#2#3\xint:
{%
\expandafter\XINT_sub_mm_b
\romannumeral0\expandafter\XINT_sepandrev_andcount
\romannumeral0\XINT_zeroes_forviii #2#3\R\R\R\R\R\R\R\R{10}0000001\W
#2#3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
\X #1%
}%
-\def\XINT_sub_mm_b #1.#2\X #3\Z
+\def\XINT_sub_mm_b #1\xint:#2\X #3\xint:
{%
\expandafter\XINT_sub_checklengths
- \the\numexpr #1\expandafter.%
+ \the\numexpr #1\expandafter\xint:%
\romannumeral0\expandafter\XINT_sepandrev_andcount
\romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W
#3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax \xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
- \Z!\Z!\Z!\Z!\W #2\Z!\Z!\Z!\Z!\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
+ 1;!1;!1;!1;!\W
+ #21;!1;!1;!1;!\W
+ 1;!1\R!1\R!1\R!1\R!%
+ 1\R!1\R!1\R!1\R!\W
}%
-\def\XINT_sub_checklengths #1.#2.%
+\def\XINT_sub_checklengths #1\xint:#2\xint:%
{%
\ifnum #2>#1
\expandafter\XINT_sub_exchange
@@ -735,146 +906,156 @@
{%
\expandafter\XINT_opp\romannumeral0\XINT_sub_aa #2\W #1\W
}%
-\def\XINT_sub_aa {\expandafter\XINT_sub_out\the\numexpr\XINT_sub_a \xint_c_i }%
-\def\XINT_sub_out #1\Z #2#3\W
+\def\XINT_sub_aa
{%
- \if-#2\expandafter\XINT_sub_startrescue\fi
- \expandafter\XINT_cuz_small
- \romannumeral0\XINT_unrevbyviii {}#11\Z!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
+ \expandafter\XINT_sub_out\the\numexpr\XINT_sub_a\xint_c_i
}%
+\def\XINT_sub_out {\XINT_unrevbyviii{}}%
\def\XINT_sub_a #1!#2!#3!#4!#5\W #6!#7!#8!#9!%
{%
- \XINT_sub_b #1!#6!#2!#7!#3!#8!#4!#9!#5\W
+ \XINT_sub_b
+ #1!#6!#2!#7!#3!#8!#4!#9!%
+ #5\W
}%
-\def\XINT_sub_b #1#2#3!#4!%
+\def\XINT_sub_b #1#2#3#4!#5!%
{%
- \xint_gob_til_Z #2\XINT_sub_bi \Z
- \expandafter\XINT_sub_c\the\numexpr#1+1#4-#3-\xint_c_i.%
+ \xint_gob_til_sc #3\XINT_sub_bi ;%
+ \expandafter\XINT_sub_c\the\numexpr#1+1#5-#3#4-\xint_c_i\xint:%
}%
-\def\XINT_sub_c 1#1#2.%
+\def\XINT_sub_c 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_sub_d #1%
}%
-\def\XINT_sub_d #1#2#3!#4!%
+\def\XINT_sub_d #1#2#3#4!#5!%
{%
- \xint_gob_til_Z #2\XINT_sub_di \Z
- \expandafter\XINT_sub_e\the\numexpr#1+1#4-#3-\xint_c_i.%
+ \xint_gob_til_sc #3\XINT_sub_di ;%
+ \expandafter\XINT_sub_e\the\numexpr#1+1#5-#3#4-\xint_c_i\xint:
}%
-\def\XINT_sub_e 1#1#2.%
+\def\XINT_sub_e 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_sub_f #1%
}%
-\def\XINT_sub_f #1#2#3!#4!%
+\def\XINT_sub_f #1#2#3#4!#5!%
{%
- \xint_gob_til_Z #2\XINT_sub_fi \Z
- \expandafter\XINT_sub_g\the\numexpr#1+1#4-#3-\xint_c_i.%
+ \xint_gob_til_sc #3\XINT_sub_fi ;%
+ \expandafter\XINT_sub_g\the\numexpr#1+1#5-#3#4-\xint_c_i\xint:
}%
-\def\XINT_sub_g 1#1#2.%
+\def\XINT_sub_g 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_sub_h #1%
}%
-\def\XINT_sub_h #1#2#3!#4!%
+\def\XINT_sub_h #1#2#3#4!#5!%
{%
- \xint_gob_til_Z #2\XINT_sub_hi \Z
- \expandafter\XINT_sub_i\the\numexpr#1+1#4-#3-\xint_c_i.%
+ \xint_gob_til_sc #3\XINT_sub_hi ;%
+ \expandafter\XINT_sub_i\the\numexpr#1+1#5-#3#4-\xint_c_i\xint:
}%
-\def\XINT_sub_i 1#1#2.%
+\def\XINT_sub_i 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_sub_a #1%
}%
-\def\XINT_sub_bi\Z
- \expandafter\XINT_sub_c\the\numexpr#1+1#2-#3.#4!#5!#6!#7!#8!#9!\W
+\def\XINT_sub_bi;%
+ \expandafter\XINT_sub_c\the\numexpr#1+1#2-#3\xint:
+ #4!#5!#6!#7!#8!#9!\W
{%
\XINT_sub_k #1#2!#5!#7!#9!%
}%
-\def\XINT_sub_di\Z
- \expandafter\XINT_sub_e\the\numexpr#1+1#2-#3.#4!#5!#6!#7!#8\W
+\def\XINT_sub_di;%
+ \expandafter\XINT_sub_e\the\numexpr#1+1#2-#3\xint:
+ #4!#5!#6!#7!#8\W
{%
\XINT_sub_k #1#2!#5!#7!%
}%
-\def\XINT_sub_fi\Z
- \expandafter\XINT_sub_g\the\numexpr#1+1#2-#3.#4!#5!#6\W
+\def\XINT_sub_fi;%
+ \expandafter\XINT_sub_g\the\numexpr#1+1#2-#3\xint:
+ #4!#5!#6\W
{%
\XINT_sub_k #1#2!#5!%
}%
-\def\XINT_sub_hi\Z
- \expandafter\XINT_sub_i\the\numexpr#1+1#2-#3.#4\W
+\def\XINT_sub_hi;%
+ \expandafter\XINT_sub_i\the\numexpr#1+1#2-#3\xint:
+ #4\W
{%
\XINT_sub_k #1#2!%
}%
-\def\XINT_sub_k #1#2%
+\def\XINT_sub_k #1#2#3%
{%
- \xint_gob_til_Z #2\XINT_sub_p\Z \XINT_sub_l #1#2%
+ \xint_gob_til_sc #3\XINT_sub_p;\XINT_sub_l #1#2#3%
}%
-\def\XINT_sub_l #1{\xint_UDzerofork #1\XINT_sub_l_carry 0\XINT_sub_l_nocarry\krof}%
-\def\XINT_sub_l_nocarry 1{1\relax }%
+\def\XINT_sub_l #1%
+ {\xint_UDzerofork #1\XINT_sub_l_carry 0\XINT_sub_l_Ia\krof}%
+\def\XINT_sub_l_Ia 1#1;!#2\W{1\relax#1;!1\XINT_sub_fix_none!}%
\def\XINT_sub_l_carry 1#1!{\ifcase #1
- \expandafter \XINT_sub_l_zeroa\or\expandafter\XINT_sub_l_one\else
- \expandafter \XINT_sub_l_done\fi 1#1!}%
-\def\XINT_sub_l_done {-\xint_c_i+}%
-\def\XINT_sub_l_one 1#1!#2%
+ \expandafter \XINT_sub_l_Id
+ \or \expandafter \XINT_sub_l_Ic
+ \else\expandafter \XINT_sub_l_Ib\fi 1#1!}%
+\def\XINT_sub_l_Ib #1;#2\W {-\xint_c_i+#1;!1\XINT_sub_fix_none!}%
+\def\XINT_sub_l_Ic 1#1!1#2#3!#4;#5\W
{%
- \xint_gob_til_Z #2\XINT_sub_l_oneone\Z 1\relax 00000000!#2%
+ \xint_gob_til_sc #2\XINT_sub_l_Ica;%
+ 1\relax 00000000!1#2#3!#4;!1\XINT_sub_fix_none!%
}%
-\def\XINT_sub_l_oneone #1\W {1\relax \XINT_cuz_byviii!\Z 0\W\R }%
-\def\XINT_sub_l_zeroa 1#1!{199999999\expandafter!\the\numexpr \XINT_sub_l_zerob }%
-\def\XINT_sub_l_zerob 1#1!{\ifcase #1
- \expandafter \XINT_sub_l_zeroa\or\expandafter\XINT_sub_l_zone\else
- \expandafter \XINT_sub_l_done\fi 1#1!}%
-\def\XINT_sub_l_zone 1#1!#2%
+\def\XINT_sub_l_Ica#1\W
{%
- \xint_gob_til_Z #2\XINT_sub_l_zoneone\Z 1\relax 00000000!#2%
+ 1;!1\XINT_sub_fix_cuz!%
+ 1;!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
+ \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
}%
-\def\XINT_sub_l_zoneone\Z 1\relax 00000000{1}%
-\def\XINT_sub_p\Z\XINT_sub_l #1#2\W
+\def\XINT_sub_l_Id 1#1!%
+ {199999999\expandafter!\the\numexpr \XINT_sub_l_Id_a}%
+\def\XINT_sub_l_Id_a 1#1!{\ifcase #1
+ \expandafter \XINT_sub_l_Id
+ \or \expandafter \XINT_sub_l_Id_b
+ \else\expandafter \XINT_sub_l_Ib\fi 1#1!}%
+\def\XINT_sub_l_Id_b 1#1!1#2#3!#4;#5\W
{%
- \xint_UDzerofork
- #1{-1\relax\Z -\W}%
- 0{1\relax \XINT_cuz_byviii!\Z 0\W\R }%
- \krof
+ \xint_gob_til_sc #2\XINT_sub_l_Ida;%
+ 1\relax 00000000!1#2#3!#4;!1\XINT_sub_fix_none!%
}%
-\def\XINT_sub_startrescue\expandafter\XINT_cuz_small
- \romannumeral0\XINT_unrevbyviii #1#2\Z!#3\W
+\def\XINT_sub_l_Ida#1\XINT_sub_fix_none{1;!1\XINT_sub_fix_none!}%
+\def\XINT_sub_p;\XINT_sub_l #1#2\W #3\W
{%
- \expandafter\XINT_sub_rescue_finish
- \the\numexpr\XINT_sub_rescue_a #2!%
- 1\Z!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W \R
-}%
-\def\XINT_sub_rescue_finish
- {\expandafter-\romannumeral0\expandafter\XINT_cuz\romannumeral0\XINT_unrevbyviii {}}%
-\def\XINT_sub_rescue_a #1!%
-{%
- \expandafter\XINT_sub_rescue_c\the\numexpr \xint_c_xii_e_viii-#1.%
+ \xint_UDzerofork
+ #1{1;!1\XINT_sub_fix_neg!%
+ 1;!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
+ \xint_bye2345678\xint_bye1099999988\relax}% A - B, B > A
+ 0{1;!1\XINT_sub_fix_cuz!%
+ 1;!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W}%
+ \krof
+ \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
}%
-\def\XINT_sub_rescue_c 1#1#2.%
+\def\XINT_sub_fix_none;{\XINT_cuz_small}%
+\def\XINT_sub_fix_cuz ;{\expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop}%
+\def\XINT_sub_fix_neg;%
{%
- 1#2\expandafter!\the\numexpr\XINT_sub_rescue_d #1%
+ \expandafter-\romannumeral0\expandafter
+ \XINT_sub_comp_finish\the\numexpr\XINT_sub_comp_loop
}%
-\def\XINT_sub_rescue_d #1#2#3!%
+\def\XINT_sub_comp_finish 0{\XINT_sub_fix_cuz;}%
+\def\XINT_sub_comp_loop #1#2#3#4#5#6#7#8%
{%
- \xint_gob_til_minus #2\XINT_sub_rescue_z -%
- \expandafter\XINT_sub_rescue_c\the\numexpr \xint_c_xii_e_viii_mone-#2#3+#1.%
+ \expandafter\XINT_sub_comp_clean
+ \the\numexpr \xint_c_xi_e_viii_mone-#1#2#3#4#5#6#7#8\XINT_sub_comp_loop
}%
-\def\XINT_sub_rescue_z #1.{1!}%
+\def\XINT_sub_comp_clean 1#1{+#1\relax}%
\def\xintiMul {\romannumeral0\xintimul }%
\def\xintimul #1%
{%
- \expandafter\XINT_imul\romannumeral0\xintnum{#1}\Z
+ \expandafter\XINT_imul\romannumeral0\xintnum{#1}\xint:
}%
-\def\XINT_imul #1#2\Z #3%
+\def\XINT_imul #1#2\xint:#3%
{%
- \expandafter\XINT_mul_nfork\expandafter #1\romannumeral0\xintnum{#3}\Z #2\Z
+ \expandafter\XINT_mul_nfork\expandafter #1\romannumeral0\xintnum{#3}\xint:#2\xint:
}%
\def\xintiiMul {\romannumeral0\xintiimul }%
\def\xintiimul #1%
{%
- \expandafter\XINT_iimul\romannumeral`&&@#1\Z
+ \expandafter\XINT_iimul\romannumeral`&&@#1\xint:
}%
-\def\XINT_iimul #1#2\Z #3%
+\def\XINT_iimul #1#2\xint:#3%
{%
- \expandafter\XINT_mul_nfork\expandafter #1\romannumeral`&&@#3\Z #2\Z
+ \expandafter\XINT_mul_nfork\expandafter #1\romannumeral`&&@#3\xint:#2\xint:
}%
-\def\XINT_mul_fork #1#2\Z #3\Z{\XINT_mul_nfork #1#3\Z #2\Z}%
+\def\XINT_mul_fork #1#2\xint:#3\xint:{\XINT_mul_nfork #1#3\xint:#2\xint:}%
\def\XINT_mul_nfork #1#2%
{%
\xint_UDzerofork
@@ -889,37 +1070,37 @@
--\XINT_mul_plusplus
\krof #1#2%
}%
-\def\XINT_mul_zero #1\krof #2#3\Z #4\Z { 0}%
+\def\XINT_mul_zero #1\krof #2#3\xint:#4\xint:{ 0}%
\def\XINT_mul_minusminus #1#2{\XINT_mul_plusplus {}{}}%
\def\XINT_mul_minusplus #1#2%
{\expandafter-\romannumeral0\XINT_mul_plusplus {}#2}%
\def\XINT_mul_plusminus #1#2%
{\expandafter-\romannumeral0\XINT_mul_plusplus #1{}}%
-\def\XINT_mul_plusplus #1#2#3\Z
+\def\XINT_mul_plusplus #1#2#3\xint:
{%
\expandafter\XINT_mul_pre_b
\romannumeral0\expandafter\XINT_sepandrev_andcount
\romannumeral0\XINT_zeroes_forviii #2#3\R\R\R\R\R\R\R\R{10}0000001\W
#2#3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
\W #1%
}%
-\def\XINT_mul_pre_b #1.#2\W #3\Z
+\def\XINT_mul_pre_b #1\xint:#2\W #3\xint:
{%
\expandafter\XINT_mul_checklengths
- \the\numexpr #1\expandafter.%
+ \the\numexpr #1\expandafter\xint:%
\romannumeral0\expandafter\XINT_sepandrev_andcount
\romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W
#3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
- 1\Z!\W #21\Z!%
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
+ 1;!\W #21;!%
1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
}%
-\def\XINT_mul_checklengths #1.#2.%
+\def\XINT_mul_checklengths #1\xint:#2\xint:%
{%
\ifnum #2=\xint_c_i\expandafter\XINT_mul_smallbyfirst\fi
\ifnum #1=\xint_c_i\expandafter\XINT_mul_smallbysecond\fi
@@ -934,13 +1115,13 @@
\fi
\XINT_mul_start
}%
-\def\XINT_mul_smallbyfirst #1\XINT_mul_start 1#2!1\Z!\W
+\def\XINT_mul_smallbyfirst #1\XINT_mul_start 1#2!1;!\W
{%
\ifnum#2=\xint_c_i\expandafter\XINT_mul_oneisone\fi
\ifnum#2<\xint_c_xxii\expandafter\XINT_mul_verysmall\fi
\expandafter\XINT_mul_out\the\numexpr\XINT_smallmul 1#2!%
}%
-\def\XINT_mul_smallbysecond #1\XINT_mul_start #2\W 1#3!1\Z!%
+\def\XINT_mul_smallbysecond #1\XINT_mul_start #2\W 1#3!1;!%
{%
\ifnum#3=\xint_c_i\expandafter\XINT_mul_oneisone\fi
\ifnum#3<\xint_c_xxii\expandafter\XINT_mul_verysmall\fi
@@ -949,376 +1130,89 @@
\def\XINT_mul_oneisone #1!{\XINT_mul_out }%
\def\XINT_mul_verysmall\expandafter\XINT_mul_out
\the\numexpr\XINT_smallmul 1#1!%
- {\expandafter\XINT_mul_out\the\numexpr\XINT_verysmallmul 0.#1!}%
-\def\XINT_mul_exchange #1\XINT_mul_start #2\W #31\Z!%
- {\fi\fi\XINT_mul_start #31\Z!\W #2}%
+ {\expandafter\XINT_mul_out\the\numexpr\XINT_verysmallmul 0\xint:#1!}%
+\def\XINT_mul_exchange #1\XINT_mul_start #2\W #31;!%
+ {\fi\fi\XINT_mul_start #31;!\W #2}%
\def\XINT_mul_start
- {\expandafter\XINT_mul_out\the\numexpr\XINT_mul_loop 100000000!1\Z!\W}%
+ {\expandafter\XINT_mul_out\the\numexpr\XINT_mul_loop 100000000!1;!\W}%
\def\XINT_mul_out
{\expandafter\XINT_cuz_small\romannumeral0\XINT_unrevbyviii {}}%
\def\XINT_mul_loop #1\W #2\W 1#3!%
{%
- \xint_gob_til_Z #3\XINT_mul_e \Z
+ \xint_gob_til_sc #3\XINT_mul_e ;%
\expandafter\XINT_mul_a\the\numexpr \XINT_smallmul 1#3!#2\W
#1\W #2\W
}%
\def\XINT_mul_a #1\W #2\W
{%
\expandafter\XINT_mul_b\the\numexpr
- \XINT_add_a \xint_c_ii #21\Z!1\Z!1\Z!\W #11\Z!1\Z!1\Z!\W\W
+ \XINT_add_a \xint_c_ii #21;!1;!1;!\W #11;!1;!1;!\W\W
}%
\def\XINT_mul_b 1#1!{1#1\expandafter!\the\numexpr\XINT_mul_loop }%
-\def\XINT_mul_e\Z #1\W 1#2\W #3\W {1\relax #2}%
-\def\XINT_minimulwc_a 1#1.#2.#3!#4#5#6#7#8.%
+\def\XINT_mul_e;#1\W 1#2\W #3\W {1\relax #2}%
+\def\XINT_minimulwc_a 1#1\xint:#2\xint:#3!#4#5#6#7#8\xint:%
{%
\expandafter\XINT_minimulwc_b
- \the\numexpr \xint_c_x^ix+#1+#3*#8.#3*#4#5#6#7+#2*#8.#2*#4#5#6#7.%
+ \the\numexpr \xint_c_x^ix+#1+#3*#8\xint:
+ #3*#4#5#6#7+#2*#8\xint:
+ #2*#4#5#6#7\xint:%
}%
-\def\XINT_minimulwc_b 1#1#2#3#4#5#6.#7.%
+\def\XINT_minimulwc_b 1#1#2#3#4#5#6\xint:#7\xint:%
{%
\expandafter\XINT_minimulwc_c
- \the\numexpr \xint_c_x^ix+#1#2#3#4#5+#7.#6.%
+ \the\numexpr \xint_c_x^ix+#1#2#3#4#5+#7\xint:#6\xint:%
}%
-\def\XINT_minimulwc_c 1#1#2#3#4#5#6.#7.#8.%
+\def\XINT_minimulwc_c 1#1#2#3#4#5#6\xint:#7\xint:#8\xint:%
{%
1#6#7\expandafter!%
\the\numexpr\expandafter\XINT_smallmul_a
- \the\numexpr \xint_c_x^viii+#1#2#3#4#5+#8.%
+ \the\numexpr \xint_c_x^viii+#1#2#3#4#5+#8\xint:%
}%
-\def\XINT_smallmul 1#1#2#3#4#5!{\XINT_smallmul_a 100000000.#1#2#3#4.#5!}%
-\def\XINT_smallmul_a #1.#2.#3!1#4!%
+\def\XINT_smallmul 1#1#2#3#4#5!{\XINT_smallmul_a 100000000\xint:#1#2#3#4\xint:#5!}%
+\def\XINT_smallmul_a #1\xint:#2\xint:#3!1#4!%
{%
- \xint_gob_til_Z #4\XINT_smallmul_e\Z
- \XINT_minimulwc_a #1.#2.#3!#4.#2.#3!%
+ \xint_gob_til_sc #4\XINT_smallmul_e;%
+ \XINT_minimulwc_a #1\xint:#2\xint:#3!#4\xint:#2\xint:#3!%
}%
-\def\XINT_smallmul_e\Z\XINT_minimulwc_a 1#1.#2\Z #3!%
- {\xint_gob_til_eightzeroes #1\XINT_smallmul_f 000000001\relax #1!1\Z!}%
+\def\XINT_smallmul_e;\XINT_minimulwc_a 1#1\xint:#2;#3!%
+ {\xint_gob_til_eightzeroes #1\XINT_smallmul_f 000000001\relax #1!1;!}%
\def\XINT_smallmul_f 000000001\relax 00000000!1{1\relax}%
-\def\XINT_verysmallmul #1.#2!1#3!%
+\def\XINT_verysmallmul #1\xint:#2!1#3!%
{%
- \xint_gob_til_Z #3\XINT_verysmallmul_e\Z
+ \xint_gob_til_sc #3\XINT_verysmallmul_e;%
\expandafter\XINT_verysmallmul_a
- \the\numexpr #2*#3+#1.#2!%
+ \the\numexpr #2*#3+#1\xint:#2!%
}%
-\def\XINT_verysmallmul_e\Z\expandafter\XINT_verysmallmul_a\the\numexpr
- #1+#2#3.#4!%
-{\xint_gob_til_zero #2\XINT_verysmallmul_f 0\xint_c_x^viii+#2#3!1\Z!}%
+\def\XINT_verysmallmul_e;\expandafter\XINT_verysmallmul_a\the\numexpr
+ #1+#2#3\xint:#4!%
+{\xint_gob_til_zero #2\XINT_verysmallmul_f 0\xint_c_x^viii+#2#3!1;!}%
\def\XINT_verysmallmul_f #1!1{1\relax}%
-\def\XINT_verysmallmul_a #1#2.%
+\def\XINT_verysmallmul_a #1#2\xint:%
{%
\unless\ifnum #1#2<\xint_c_x^ix
\expandafter\XINT_verysmallmul_bi\else
\expandafter\XINT_verysmallmul_bj\fi
- \the\numexpr \xint_c_x^ix+#1#2.%
+ \the\numexpr \xint_c_x^ix+#1#2\xint:%
}%
\def\XINT_verysmallmul_bj{\expandafter\XINT_verysmallmul_cj }%
-\def\XINT_verysmallmul_cj 1#1#2.%
- {1#2\expandafter!\the\numexpr\XINT_verysmallmul #1.}%
-\def\XINT_verysmallmul_bi\the\numexpr\xint_c_x^ix+#1#2#3.%
- {1#3\expandafter!\the\numexpr\XINT_verysmallmul #1#2.}%
-\def\XINT_minimul_a #1.#2!#3#4#5#6#7!%
+\def\XINT_verysmallmul_cj 1#1#2\xint:%
+ {1#2\expandafter!\the\numexpr\XINT_verysmallmul #1\xint:}%
+\def\XINT_verysmallmul_bi\the\numexpr\xint_c_x^ix+#1#2#3\xint:%
+ {1#3\expandafter!\the\numexpr\XINT_verysmallmul #1#2\xint:}%
+\def\XINT_minimul_a #1\xint:#2!#3#4#5#6#7!%
{%
\expandafter\XINT_minimul_b
- \the\numexpr \xint_c_x^viii+#2*#7.#2*#3#4#5#6+#1*#7.#1*#3#4#5#6.%
+ \the\numexpr \xint_c_x^viii+#2*#7\xint:#2*#3#4#5#6+#1*#7\xint:#1*#3#4#5#6\xint:%
}%
-\def\XINT_minimul_b 1#1#2#3#4#5.#6.%
+\def\XINT_minimul_b 1#1#2#3#4#5\xint:#6\xint:%
{%
\expandafter\XINT_minimul_c
- \the\numexpr \xint_c_x^ix+#1#2#3#4+#6.#5.%
+ \the\numexpr \xint_c_x^ix+#1#2#3#4+#6\xint:#5\xint:%
}%
-\def\XINT_minimul_c 1#1#2#3#4#5#6.#7.#8.%
+\def\XINT_minimul_c 1#1#2#3#4#5#6\xint:#7\xint:#8\xint:%
{%
1#6#7\expandafter!\the\numexpr \xint_c_x^viii+#1#2#3#4#5+#8!%
}%
-\def\xintiiSqr {\romannumeral0\xintiisqr }%
-\def\xintiisqr #1%
-{%
- \expandafter\XINT_sqr\romannumeral0\xintiiabs{#1}\Z
-}%
-\def\xintiSqr {\romannumeral0\xintisqr }%
-\def\xintisqr #1%
-{%
- \expandafter\XINT_sqr\romannumeral0\xintiabs{#1}\Z
-}%
-\def\XINT_sqr #1\Z
-{%
- \expandafter\XINT_sqr_a
- \romannumeral0\expandafter\XINT_sepandrev_andcount
- \romannumeral0\XINT_zeroes_forviii #1\R\R\R\R\R\R\R\R{10}0000001\W
- #1\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
- \Z
-}%
-\def\XINT_sqr_a #1.%
-{%
- \ifnum #1=\xint_c_i \expandafter\XINT_sqr_small
- \else\expandafter\XINT_sqr_start\fi
-}%
-\def\XINT_sqr_small 1#1#2#3#4#5!\Z
-{%
- \ifnum #1#2#3#4#5<46341 \expandafter\XINT_sqr_verysmall\fi
- \expandafter\XINT_sqr_small_out
- \the\numexpr\XINT_minimul_a #1#2#3#4.#5!#1#2#3#4#5!%
-}%
-\edef\XINT_sqr_verysmall
- \expandafter\XINT_sqr_small_out\the\numexpr\XINT_minimul_a #1!#2!%
- {\noexpand\expandafter\space\noexpand\the\numexpr #2*#2\relax}%
-\def\XINT_sqr_small_out 1#1!1#2!%
-{%
- \XINT_cuz #2#1\R
-}%
-\def\XINT_sqr_start #1\Z
-{%
- \expandafter\XINT_mul_out
- \the\numexpr\XINT_mul_loop 100000000!1\Z!\W #11\Z!\W #11\Z!%
- 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
-}%
-\def\xintiiPow {\romannumeral0\xintiipow }%
-\def\xintiipow #1#2%
-{%
- \expandafter\xint_pow\the\numexpr #2\expandafter.\romannumeral`&&@#1\Z%
-}%
-\def\xintiPow {\romannumeral0\xintipow }%
-\def\xintipow #1#2%
-{%
- \expandafter\xint_pow\the\numexpr #2\expandafter.\romannumeral0\xintnum{#1}\Z%
-}%
-\def\xint_pow #1.#2%#3\Z
-{%
- \xint_UDzerominusfork
- #2-\XINT_pow_AisZero
- 0#2\XINT_pow_Aneg
- 0-{\XINT_pow_Apos #2}%
- \krof {#1}%
-}%
-\def\XINT_pow_AisZero #1#2\Z
-{%
- \ifcase\XINT_cntSgn #1\Z
- \xint_afterfi { 1}%
- \or
- \xint_afterfi { 0}%
- \else
- \xint_afterfi {\xintError:DivisionByZero\space 0}%
- \fi
-}%
-\def\XINT_pow_Aneg #1%
-{%
- \ifodd #1
- \expandafter\XINT_opp\romannumeral0%
- \fi
- \XINT_pow_Apos {}{#1}%
-}%
-\def\XINT_pow_Apos #1#2{\XINT_pow_Apos_a {#2}#1}%
-\def\XINT_pow_Apos_a #1#2#3%
-{%
- \xint_gob_til_Z #3\XINT_pow_Apos_short\Z
- \XINT_pow_AatleastTwo {#1}#2#3%
-}%
-\def\XINT_pow_Apos_short\Z\XINT_pow_AatleastTwo #1#2\Z
-{%
- \ifcase #2
- \xintError:thiscannothappen!
- \or \expandafter\XINT_pow_AisOne
- \else\expandafter\XINT_pow_AatleastTwo
- \fi {#1}#2\Z
-}%
-\def\XINT_pow_AisOne #1\Z{ 1}%
-\def\XINT_pow_AatleastTwo #1%
-{%
- \ifcase\XINT_cntSgn #1\Z
- \expandafter\XINT_pow_BisZero
- \or
- \expandafter\XINT_pow_I_in
- \else
- \expandafter\XINT_pow_BisNegative
- \fi
- {#1}%
-}%
-\edef\XINT_pow_BisNegative #1\Z
- {\noexpand\xintError:FractionRoundedToZero\space 0}%
-\def\XINT_pow_BisZero #1\Z{ 1}%
-\def\XINT_pow_I_in #1#2\Z
-{%
- \expandafter\XINT_pow_I_loop
- \the\numexpr #1\expandafter.%
- \romannumeral0\expandafter\XINT_sepandrev
- \romannumeral0\XINT_zeroes_forviii #2\R\R\R\R\R\R\R\R{10}0000001\W
- #2\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax XX%
- \R.\R.\R.\R.\R.\R.\R.\R.\W 1\Z!\W
- 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
-}%
-\def\XINT_pow_I_loop #1.%
-{%
- \ifnum #1 = \xint_c_i\expandafter\XINT_pow_I_exit\fi
- \ifodd #1
- \expandafter\XINT_pow_II_in
- \else
- \expandafter\XINT_pow_I_squareit
- \fi #1.%
-}%
-\def\XINT_pow_I_exit \ifodd #1\fi #2.#3\W {\XINT_mul_out #3}%
-\def\XINT_pow_I_squareit #1.#2\W%
-{%
- \expandafter\XINT_pow_I_loop
- \the\numexpr #1/\xint_c_ii\expandafter.%
- \the\numexpr\XINT_pow_mulbutcheckifsmall #2\W #2\W
-}%
-\def\XINT_pow_mulbutcheckifsmall #1!1#2%
-{%
- \xint_gob_til_Z #2\XINT_pow_mul_small\Z
- \XINT_mul_loop 100000000!1\Z!\W #1!1#2%
-}%
-\def\XINT_pow_mul_small\Z \XINT_mul_loop 100000000!1\Z!\W 1#1!1\Z!\W
-{%
- \XINT_smallmul 1#1!%
-}%
-\def\XINT_pow_II_in #1.#2\W
-{%
- \expandafter\XINT_pow_II_loop
- \the\numexpr #1/\xint_c_ii-\xint_c_i\expandafter.%
- \the\numexpr\XINT_pow_mulbutcheckifsmall #2\W #2\W #2\W
-}%
-\def\XINT_pow_II_loop #1.%
-{%
- \ifnum #1 = \xint_c_i\expandafter\XINT_pow_II_exit\fi
- \ifodd #1
- \expandafter\XINT_pow_II_odda
- \else
- \expandafter\XINT_pow_II_even
- \fi #1.%
-}%
-\def\XINT_pow_II_exit\ifodd #1\fi #2.#3\W #4\W
-{%
- \expandafter\XINT_mul_out
- \the\numexpr\XINT_pow_mulbutcheckifsmall #4\W #3%
-}%
-\def\XINT_pow_II_even #1.#2\W
-{%
- \expandafter\XINT_pow_II_loop
- \the\numexpr #1/\xint_c_ii\expandafter.%
- \the\numexpr\XINT_pow_mulbutcheckifsmall #2\W #2\W
-}%
-\def\XINT_pow_II_odda #1.#2\W #3\W
-{%
- \expandafter\XINT_pow_II_oddb
- \the\numexpr #1/\xint_c_ii-\xint_c_i\expandafter.%
- \the\numexpr\XINT_pow_mulbutcheckifsmall #3\W #2\W #2\W
-}%
-\def\XINT_pow_II_oddb #1.#2\W #3\W
-{%
- \expandafter\XINT_pow_II_loop
- \the\numexpr #1\expandafter.%
- \the\numexpr\XINT_pow_mulbutcheckifsmall #3\W #3\W #2\W
-}%
-\def\xintiiFac {\romannumeral0\xintiifac }%
-\def\xintiifac #1{\expandafter\XINT_fac_fork\the\numexpr#1.}%
-\def\xintiFac {\romannumeral0\xintifac }%
-\let\xintifac\xintiifac
-\def\XINT_fac_fork #1#2.%
-{%
- \xint_UDzerominusfork
- #1-\XINT_fac_zero
- 0#1\XINT_fac_neg
- 0-\XINT_fac_checksize
- \krof #1#2.%
-}%
-\def\XINT_fac_zero #1.{ 1}%
-\edef\XINT_fac_neg #1.{\noexpand\xintError:FactorialOfNegative\space 1}%
-\def\XINT_fac_checksize #1.%
-{%
- \ifnum #1>\xint_c_x^iv
- \xint_dothis{\expandafter\xintError:TooBigFactorial
- \expandafter\space\expandafter 1\xint_gob_til_W }\fi
- \ifnum #1>465 \xint_dothis{\XINT_fac_bigloop_a #1.}\fi
- \ifnum #1>101 \xint_dothis{\XINT_fac_medloop_a #1.\XINT_mul_out}\fi
- \xint_orthat{\XINT_fac_smallloop_a #1.\XINT_mul_out}%
- 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
-}%
-\def\XINT_fac_bigloop_a #1.%
-{%
- \expandafter\XINT_fac_bigloop_b \the\numexpr
- #1+\xint_c_i-\xint_c_ii*((#1-464)/\xint_c_ii).#1.%
-}%
-\def\XINT_fac_bigloop_b #1.#2.%
-{%
- \expandafter\XINT_fac_medloop_a
- \the\numexpr #1-\xint_c_i.{\XINT_fac_bigloop_loop #1.#2.}%
-}%
-\def\XINT_fac_bigloop_loop #1.#2.%
-{%
- \ifnum #1>#2 \expandafter\XINT_fac_bigloop_exit\fi
- \expandafter\XINT_fac_bigloop_loop
- \the\numexpr #1+\xint_c_ii\expandafter.%
- \the\numexpr #2\expandafter.\the\numexpr\XINT_fac_bigloop_mul #1!%
-}%
-\def\XINT_fac_bigloop_exit #1!{\XINT_mul_out}%
-\def\XINT_fac_bigloop_mul #1!%
-{%
- \expandafter\XINT_smallmul
- \the\numexpr \xint_c_x^viii+#1*(#1+\xint_c_i)!%
-}%
-\def\XINT_fac_medloop_a #1.%
-{%
- \expandafter\XINT_fac_medloop_b
- \the\numexpr #1+\xint_c_i-\xint_c_iii*((#1-100)/\xint_c_iii).#1.%
-}%
-\def\XINT_fac_medloop_b #1.#2.%
-{%
- \expandafter\XINT_fac_smallloop_a
- \the\numexpr #1-\xint_c_i.{\XINT_fac_medloop_loop #1.#2.}%
-}%
-\def\XINT_fac_medloop_loop #1.#2.%
-{%
- \ifnum #1>#2 \expandafter\XINT_fac_loop_exit\fi
- \expandafter\XINT_fac_medloop_loop
- \the\numexpr #1+\xint_c_iii\expandafter.%
- \the\numexpr #2\expandafter.\the\numexpr\XINT_fac_medloop_mul #1!%
-}%
-\def\XINT_fac_medloop_mul #1!%
-{%
- \expandafter\XINT_smallmul
- \the\numexpr
- \xint_c_x^viii+#1*(#1+\xint_c_i)*(#1+\xint_c_ii)!%
-}%
-\def\XINT_fac_smallloop_a #1.%
-{%
- \csname
- XINT_fac_smallloop_\the\numexpr #1-\xint_c_iv*(#1/\xint_c_iv)\relax
- \endcsname #1.%
-}%
-\expandafter\def\csname XINT_fac_smallloop_1\endcsname #1.%
-{%
- \XINT_fac_smallloop_loop 2.#1.100000001!1\Z!%
-}%
-\expandafter\def\csname XINT_fac_smallloop_-2\endcsname #1.%
-{%
- \XINT_fac_smallloop_loop 3.#1.100000002!1\Z!%
-}%
-\expandafter\def\csname XINT_fac_smallloop_-1\endcsname #1.%
-{%
- \XINT_fac_smallloop_loop 4.#1.100000006!1\Z!%
-}%
-\expandafter\def\csname XINT_fac_smallloop_0\endcsname #1.%
-{%
- \XINT_fac_smallloop_loop 5.#1.1000000024!1\Z!%
-}%
-\def\XINT_fac_smallloop_loop #1.#2.%
-{%
- \ifnum #1>#2 \expandafter\XINT_fac_loop_exit\fi
- \expandafter\XINT_fac_smallloop_loop
- \the\numexpr #1+\xint_c_iv\expandafter.%
- \the\numexpr #2\expandafter.\the\numexpr\XINT_fac_smallloop_mul #1!%
-}%
-\def\XINT_fac_smallloop_mul #1!%
-{%
- \expandafter\XINT_smallmul
- \the\numexpr
- \xint_c_x^viii+#1*(#1+\xint_c_i)*(#1+\xint_c_ii)*(#1+\xint_c_iii)!%
-}%
-\def\XINT_fac_loop_exit #1!#2\Z!#3{#3#2\Z!}%
\def\xintiiQuo {\romannumeral0\xintiiquo }%
\def\xintiiRem {\romannumeral0\xintiirem }%
\def\xintiiquo {\expandafter\xint_firstoftwo_thenstop\romannumeral0\xintiidivision }%
@@ -1330,23 +1224,26 @@
%%\let\xintQuo\xintiQuo\let\xintquo\xintiquo % now removed
%%\let\xintRem\xintiRem\let\xintrem\xintirem % now removed
\def\xintiDivision {\romannumeral0\xintidivision }%
-\def\xintidivision #1{\expandafter\XINT_idivision\romannumeral0\xintnum{#1}\Z }%
-\def\XINT_idivision #1#2\Z #3{\expandafter\XINT_iidivision_a\expandafter #1%
- \romannumeral0\xintnum{#3}\Z #2\Z }%
+\def\xintidivision #1{\expandafter\XINT_idivision\romannumeral0\xintnum{#1}\xint:}%
+\def\XINT_idivision #1#2\xint:#3{\expandafter\XINT_iidivision_a\expandafter #1%
+ \romannumeral0\xintnum{#3}\xint:#2\xint:}%
\def\xintiiDivision {\romannumeral0\xintiidivision }%
-\def\xintiidivision #1{\expandafter\XINT_iidivision \romannumeral`&&@#1\Z }%
-\def\XINT_iidivision #1#2\Z #3{\expandafter\XINT_iidivision_a\expandafter #1%
- \romannumeral`&&@#3\Z #2\Z }%
+\def\xintiidivision #1{\expandafter\XINT_iidivision \romannumeral`&&@#1\xint:}%
+\def\XINT_iidivision #1#2\xint:#3{\expandafter\XINT_iidivision_a\expandafter #1%
+ \romannumeral`&&@#3\xint:#2\xint:}%
\def\XINT_iidivision_a #1#2% #1 de A, #2 de B.
{%
- \if0#2\xint_dothis\XINT_iidivision_divbyzero\fi
+ \if0#2\xint_dothis{\XINT_iidivision_divbyzero #1#2}\fi
\if0#1\xint_dothis\XINT_iidivision_aiszero\fi
\if-#2\xint_dothis{\expandafter\XINT_iidivision_bneg
\romannumeral0\XINT_iidivision_bpos #1}\fi
\xint_orthat{\XINT_iidivision_bpos #1#2}%
}%
-\def\XINT_iidivision_divbyzero #1\Z #2\Z {\xintError:DivisionByZero{0}{0}}%
-\def\XINT_iidivision_aiszero #1\Z #2\Z {{0}{0}}%
+\def\XINT_iidivision_divbyzero#1#2#3\xint:#4\xint:
+ {\if0#1\xint_dothis{\XINT_signalcondition{DivisionUndefined}}\fi
+ \xint_orthat{\XINT_signalcondition{DivisionByZero}}%
+ {Division of #1#4 by #2#3}{}{{0}{0}}}%
+\def\XINT_iidivision_aiszero #1\xint:#2\xint:{{0}{0}}%
\def\XINT_iidivision_bneg #1% q->-q, r unchanged
{\expandafter{\romannumeral0\XINT_opp #1}}%
\def\XINT_iidivision_bpos #1%
@@ -1356,11 +1253,11 @@
-{\XINT_iidivision_apos #1}%
\krof
}%
-\def\XINT_iidivision_apos #1#2\Z #3\Z{\XINT_div_prepare {#2}{#1#3}}%
-\def\XINT_iidivision_aneg #1\Z #2\Z
+\def\XINT_iidivision_apos #1#2\xint:#3\xint:{\XINT_div_prepare {#2}{#1#3}}%
+\def\XINT_iidivision_aneg #1\xint:#2\xint:
{\expandafter
\XINT_iidivision_aneg_b\romannumeral0\XINT_div_prepare {#1}{#2}{#1}}%
-\def\XINT_iidivision_aneg_b #1#2{\if0\XINT_Sgn #2\Z
+\def\XINT_iidivision_aneg_b #1#2{\if0\XINT_Sgn #2\xint:
\expandafter\XINT_iidivision_aneg_rzero
\else
\expandafter\XINT_iidivision_aneg_rpos
@@ -1374,7 +1271,7 @@
\def\XINT_iidivision_aneg_end #1#2#3%
{%
\expandafter\xint_exchangetwo_keepbraces
- \expandafter{\romannumeral0\XINT_sub_mm_a {}{}#3\Z #2\Z}{#1}% r-> b-r
+ \expandafter{\romannumeral0\XINT_sub_mm_a {}{}#3\xint:#2\xint:}{#1}% r-> b-r
}%
\def\XINT_div_prepare #1%
{%
@@ -1409,7 +1306,7 @@
{%
\expandafter\XINT_div_small_b
\the\numexpr #1/\xint_c_ii\expandafter
- .\the\numexpr \xint_c_x^viii+#1\expandafter!%
+ \xint:\the\numexpr \xint_c_x^viii+#1\expandafter!%
\romannumeral0%
\XINT_div_small_ba #2\R\R\R\R\R\R\R\R{10}0000001\W
#2\XINT_sepbyviii_Z_end 2345678\relax
@@ -1428,12 +1325,12 @@
\the\numexpr\expandafter\XINT_sepbyviii_Z
\romannumeral0\XINT_zeroes_forviii #1\R #2\relax
{{\XINT_div_dosmallsmall}{#1}}%
-\def\XINT_div_dosmallsmall #1.1#2!#3%
+\def\XINT_div_dosmallsmall #1\xint:1#2!#3%
{%
\expandafter\XINT_div_smallsmallend
- \the\numexpr (#3+#1)/#2-\xint_c_i.#2.#3.%
+ \the\numexpr (#3+#1)/#2-\xint_c_i\xint:#2\xint:#3\xint:%
}%
-\def\XINT_div_smallsmallend #1.#2.#3.{\expandafter
+\def\XINT_div_smallsmallend #1\xint:#2\xint:#3\xint:{\expandafter
{\the\numexpr #1\expandafter}\expandafter{\the\numexpr #3-#1*#2}}%
\def\XINT_div_dosmalldiv
{{\expandafter\XINT_sdiv_out\the\numexpr\XINT_smalldivx_a}}%
@@ -1455,17 +1352,16 @@
{%
\expandafter\XINT_div_prepare_g
\the\numexpr #1#2#3#4#5#6#7#8+\xint_c_i\expandafter
- .\the\numexpr (#1#2#3#4#5#6#7#8+\xint_c_i)/\xint_c_ii\expandafter
- .\the\numexpr #1#2#3#4#5#6#7#8\expandafter
- .\romannumeral0\XINT_sepandrev_andcount
+ \xint:\the\numexpr (#1#2#3#4#5#6#7#8+\xint_c_i)/\xint_c_ii\expandafter
+ \xint:\the\numexpr #1#2#3#4#5#6#7#8\expandafter
+ \xint:\romannumeral0\XINT_sepandrev_andcount
#1#2#3#4#5#6#7#8#9\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678%
- \relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
\X
}%
-\def\XINT_div_prepare_g #1.#2.#3.#4.#5\X #6#7#8%
+\def\XINT_div_prepare_g #1\xint:#2\xint:#3\xint:#4\xint:#5\X #6#7#8%
{%
\expandafter\XINT_div_prepare_h
\the\numexpr\expandafter\XINT_sepbyviii_andcount
@@ -1475,7 +1371,7 @@
\xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W
{#1}{#2}{#3}{#4}{#5}{#6}%
}%
-\def\XINT_div_prepare_h #11.#2.#3#4#5#6%#7#8%
+\def\XINT_div_prepare_h #11\xint:#2\xint:#3#4#5#6%#7#8%
{%
\XINT_div_start_a {#2}{#6}{#1}{#3}{#4}{#5}%{#7}{#8}%
}%
@@ -1492,20 +1388,20 @@
{%
\expandafter\XINT_div_zeroQ_end
\romannumeral0\XINT_unsep_cuzsmall
- #31\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W .%
+ #3\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax\xint:
}%
-\def\XINT_div_zeroQ_end #1.#2%
- {\expandafter{\expandafter0\expandafter}\XINT_div_cleanR #1#2.}%
+\def\XINT_div_zeroQ_end #1\xint:#2%
+ {\expandafter{\expandafter0\expandafter}\XINT_div_cleanR #1#2\xint:}%
\def\XINT_div_start_b #1#2#3#4#5#6%
{%
\expandafter\XINT_div_finish\the\numexpr
- \XINT_div_start_c {#2}.#3.{#6}{{#1}{#2}{{#4}{#5}}{#6}}%
+ \XINT_div_start_c {#2}\xint:#3\xint:{#6}{{#1}{#2}{{#4}{#5}}{#6}}%
}%
\def\XINT_div_finish
{%
\expandafter\XINT_div_finish_a \romannumeral`&&@\XINT_div_unsepQ
}%
-\def\XINT_div_finish_a #1\Z #2.{\XINT_div_finish_b #2.{#1}}%
+\def\XINT_div_finish_a #1\Z #2\xint:{\XINT_div_finish_b #2\xint:{#1}}%
\def\XINT_div_finish_b #1%
{%
\if0#1%
@@ -1515,12 +1411,12 @@
\fi
#1%
}%
-\def\XINT_div_finish_bRzero 0.#1#2{{#1}{0}}%
-\def\XINT_div_finish_bRpos #1.#2#3%
+\def\XINT_div_finish_bRzero 0\xint:#1#2{{#1}{0}}%
+\def\XINT_div_finish_bRpos #1\xint:#2#3%
{%
- \expandafter\xint_exchangetwo_keepbraces\XINT_div_cleanR #1#3.{#2}%
+ \expandafter\xint_exchangetwo_keepbraces\XINT_div_cleanR #1#3\xint:{#2}%
}%
-\def\XINT_div_cleanR #100000000.{{#1}}%
+\def\XINT_div_cleanR #100000000\xint:{{#1}}%
\def\XINT_div_start_c #1%
{%
\ifnum #1>\xint_c_vi
@@ -1529,43 +1425,43 @@
\expandafter\XINT_div_start_cb
\fi {#1}%
}%
-\def\XINT_div_start_ca #1#2.#3!#4!#5!#6!#7!#8!#9!%
+\def\XINT_div_start_ca #1#2\xint:#3!#4!#5!#6!#7!#8!#9!%
{%
\expandafter\XINT_div_start_c\expandafter
- {\the\numexpr #1-\xint_c_vii}#2#3!#4!#5!#6!#7!#8!#9!.%
+ {\the\numexpr #1-\xint_c_vii}#2#3!#4!#5!#6!#7!#8!#9!\xint:%
}%
\def\XINT_div_start_cb #1%
{\csname XINT_div_start_c_\romannumeral\numexpr#1\endcsname}%
-\def\XINT_div_start_c_i #1.#2!%
- {\XINT_div_start_c_ #1#2!.}%
-\def\XINT_div_start_c_ii #1.#2!#3!%
- {\XINT_div_start_c_ #1#2!#3!.}%
-\def\XINT_div_start_c_iii #1.#2!#3!#4!%
- {\XINT_div_start_c_ #1#2!#3!#4!.}%
-\def\XINT_div_start_c_iv #1.#2!#3!#4!#5!%
- {\XINT_div_start_c_ #1#2!#3!#4!#5!.}%
-\def\XINT_div_start_c_v #1.#2!#3!#4!#5!#6!%
- {\XINT_div_start_c_ #1#2!#3!#4!#5!#6!.}%
-\def\XINT_div_start_c_vi #1.#2!#3!#4!#5!#6!#7!%
- {\XINT_div_start_c_ #1#2!#3!#4!#5!#6!#7!.}%
-\def\XINT_div_start_c_ 1#1!#2.#3.#4#5#6%
+\def\XINT_div_start_c_i #1\xint:#2!%
+ {\XINT_div_start_c_ #1#2!\xint:}%
+\def\XINT_div_start_c_ii #1\xint:#2!#3!%
+ {\XINT_div_start_c_ #1#2!#3!\xint:}%
+\def\XINT_div_start_c_iii #1\xint:#2!#3!#4!%
+ {\XINT_div_start_c_ #1#2!#3!#4!\xint:}%
+\def\XINT_div_start_c_iv #1\xint:#2!#3!#4!#5!%
+ {\XINT_div_start_c_ #1#2!#3!#4!#5!\xint:}%
+\def\XINT_div_start_c_v #1\xint:#2!#3!#4!#5!#6!%
+ {\XINT_div_start_c_ #1#2!#3!#4!#5!#6!\xint:}%
+\def\XINT_div_start_c_vi #1\xint:#2!#3!#4!#5!#6!#7!%
+ {\XINT_div_start_c_ #1#2!#3!#4!#5!#6!#7!\xint:}%
+\def\XINT_div_start_c_ 1#1!#2\xint:#3\xint:#4#5#6%
{%
\XINT_div_I_a {#1}{#4}{1#1!#2}{#6}{00000000}#5{#3}{#6}%
}%
\def\XINT_div_I_a #1#2%
{%
- \expandafter\XINT_div_I_b\the\numexpr #1/#2.{#1}{#2}%
+ \expandafter\XINT_div_I_b\the\numexpr #1/#2\xint:{#1}{#2}%
}%
\def\XINT_div_I_b #1%
{%
\xint_gob_til_zero #1\XINT_div_I_czero 0\XINT_div_I_c #1%
}%
-\def\XINT_div_I_czero 0\XINT_div_I_c 0.#1#2#3#4#5{1#5\XINT_div_I_g {#3}}%
-\def\XINT_div_I_c #1.#2#3%
+\def\XINT_div_I_czero 0\XINT_div_I_c 0\xint:#1#2#3#4#5{1#5\XINT_div_I_g {#3}}%
+\def\XINT_div_I_c #1\xint:#2#3%
{%
- \expandafter\XINT_div_I_da\the\numexpr #2-#1*#3.#1.{#2}{#3}%
+ \expandafter\XINT_div_I_da\the\numexpr #2-#1*#3\xint:#1\xint:{#2}{#3}%
}%
-\def\XINT_div_I_da #1.%
+\def\XINT_div_I_da #1\xint:%
{%
\ifnum #1>\xint_c_ix
\expandafter\XINT_div_I_dP
@@ -1577,16 +1473,16 @@
\fi
\fi
}%
-\def\XINT_div_I_dN #1.%
+\def\XINT_div_I_dN #1\xint:%
{%
- \expandafter\XINT_div_I_b\the\numexpr #1-\xint_c_i.%
+ \expandafter\XINT_div_I_b\the\numexpr #1-\xint_c_i\xint:%
}%
-\def\XINT_div_I_db #1.#2#3#4#5%
+\def\XINT_div_I_db #1\xint:#2#3#4#5%
{%
\expandafter\XINT_div_I_dc\expandafter #1%
\romannumeral0\expandafter\XINT_div_sub\expandafter
{\romannumeral0\XINT_rev_nounsep {}#4\R!\R!\R!\R!\R!\R!\R!\R!\W}%
- {\the\numexpr\XINT_div_verysmallmul #1!#51\Z!}%
+ {\the\numexpr\XINT_div_verysmallmul #1!#51;!}%
\Z {#4}{#5}%
}%
\def\XINT_div_I_dc #1#2%
@@ -1597,19 +1493,19 @@
\def\XINT_div_I_dd #1-\Z
{%
\if #11\expandafter\XINT_div_I_dz\fi
- \expandafter\XINT_div_I_dP\the\numexpr #1-\xint_c_i.XX%
+ \expandafter\XINT_div_I_dP\the\numexpr #1-\xint_c_i\xint: XX%
}%
\def\XINT_div_I_dz #1XX#2#3#4%
{%
1#4\XINT_div_I_g {#2}%
}%
\def\XINT_div_I_de #1#2\Z #3#4#5{1#5+#1\XINT_div_I_g {#2}}%
-\def\XINT_div_I_dP #1.#2#3#4#5#6%
+\def\XINT_div_I_dP #1\xint:#2#3#4#5#6%
{%
1#6+#1\expandafter\XINT_div_I_g\expandafter
{\romannumeral0\expandafter\XINT_div_sub\expandafter
{\romannumeral0\XINT_rev_nounsep {}#4\R!\R!\R!\R!\R!\R!\R!\R!\W}%
- {\the\numexpr\XINT_div_verysmallmul #1!#51\Z!}%
+ {\the\numexpr\XINT_div_verysmallmul #1!#51;!}%
}%
}%
\def\XINT_div_I_g #1#2#3#4#5#6#7%
@@ -1620,30 +1516,31 @@
\else
\expandafter\XINT_div_I_h
\fi
- {#4}#1.#6.{{#4}{#5}{#3}{#2}}{#7}%
+ {#4}#1\xint:#6\xint:{{#4}{#5}{#3}{#2}}{#7}%
}%
-\def\XINT_div_exittofinish #1#2.#3.#4#5%
+\def\XINT_div_exittofinish #1#2\xint:#3\xint:#4#5%
{%
- 1\expandafter\expandafter\expandafter!\expandafter\XINT_unsep_delim
- \romannumeral0\XINT_div_unsepR #2#31\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W.%
+ 1\expandafter\expandafter\expandafter!\expandafter\XINT_div_unsepQ_delim
+ \romannumeral0\XINT_div_unsepR #2#3%
+ \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax\R\xint:
}%
-\def\XINT_div_I_h #1.#2!#3.#4#5%
+\def\XINT_div_I_h #1\xint:#2!#3\xint:#4#5%
{%
- \XINT_div_II_b #1#2!.{#5}{#4}{#3}{#5}%
+ \XINT_div_II_b #1#2!\xint:{#5}{#4}{#3}{#5}%
}%
\def\XINT_div_II_b #11#2!#3!%
{%
\xint_gob_til_eightzeroes #2\XINT_div_II_skipc 00000000%
\XINT_div_II_c #1{1#2}{#3}%
}%
-\def\XINT_div_II_skipc 00000000\XINT_div_II_c #1#2#3#4#5.#6#7%
+\def\XINT_div_II_skipc 00000000\XINT_div_II_c #1#2#3#4#5\xint:#6#7%
{%
\XINT_div_II_k #7{#4!#5}{#6}{00000000}%
}%
\def\XINT_div_II_c #1#2#3#4%
{%
\expandafter\XINT_div_II_d\the\numexpr\XINT_div_xmini
- #1.#2!#3!#4!{#1}{#2}#3!#4!%
+ #1\xint:#2!#3!#4!{#1}{#2}#3!#4!%
}%
\def\XINT_div_xmini #1%
{%
@@ -1657,99 +1554,99 @@
{%
\xint_gob_til_zero #7\XINT_div_xmini_c 0\XINT_div_mini 10#1#2#3#4#5#6#7%
}%
-\def\XINT_div_xmini_c 0\XINT_div_mini 100000000.50000000!#1!#2!{#1!}%
-\def\XINT_div_II_d 1#1#2#3#4#5!#6#7#8.#9%
+\def\XINT_div_xmini_c 0\XINT_div_mini 100000000\xint:50000000!#1!#2!{#1!}%
+\def\XINT_div_II_d 1#1#2#3#4#5!#6#7#8\xint:#9%
{%
\expandafter\XINT_div_II_e
\romannumeral0\expandafter\XINT_div_sub\expandafter
{\romannumeral0\XINT_rev_nounsep {}#8\R!\R!\R!\R!\R!\R!\R!\R!\W}%
- {\the\numexpr\XINT_div_smallmul_a 100000000.#1#2#3#4.#5!#91\Z!}%
- .{#6}{#7}{#9}{#1#2#3#4#5}%
+ {\the\numexpr\XINT_div_smallmul_a 100000000\xint:#1#2#3#4\xint:#5!#91;!}%
+ \xint:{#6}{#7}{#9}{#1#2#3#4#5}%
}%
\def\XINT_div_II_e 1#1!%
{%
\xint_gob_til_eightzeroes #1\XINT_div_II_skipf 00000000%
\XINT_div_II_f 1#1!%
}%
-\def\XINT_div_II_skipf 00000000\XINT_div_II_f 100000000!#1.#2#3#4#5#6%
+\def\XINT_div_II_skipf 00000000\XINT_div_II_f 100000000!#1\xint:#2#3#4#5#6%
{%
\XINT_div_II_k #6{#1}{#4}{#5}%
}%
-\def\XINT_div_II_f #1!#2!#3.%
+\def\XINT_div_II_f #1!#2!#3\xint:%
{%
\XINT_div_II_fa {#1!#2!}{#1!#2!#3}%
}%
\def\XINT_div_II_fa #1#2#3#4%
{%
- \expandafter\XINT_div_II_g \the\numexpr\XINT_div_xmini #3.#4!#1{#2}%
+ \expandafter\XINT_div_II_g \the\numexpr\XINT_div_xmini #3\xint:#4!#1{#2}%
}%
\def\XINT_div_II_g 1#1#2#3#4#5!#6#7#8%
{%
\expandafter \XINT_div_II_h
\the\numexpr 1#1#2#3#4#5+#8\expandafter\expandafter\expandafter
- .\expandafter\expandafter\expandafter
+ \xint:\expandafter\expandafter\expandafter
{\expandafter\xint_gob_til_exclam
\romannumeral0\expandafter\XINT_div_sub\expandafter
{\romannumeral0\XINT_rev_nounsep {}#6\R!\R!\R!\R!\R!\R!\R!\R!\W}%
- {\the\numexpr\XINT_div_smallmul_a 100000000.#1#2#3#4.#5!#71\Z!}}%
+ {\the\numexpr\XINT_div_smallmul_a 100000000\xint:#1#2#3#4\xint:#5!#71;!}}%
{#7}%
}%
-\def\XINT_div_II_h 1#1.#2#3#4%
+\def\XINT_div_II_h 1#1\xint:#2#3#4%
{%
\XINT_div_II_k #4{#2}{#3}{#1}%
}%
\def\XINT_div_II_k #1#2#3#4#5%
{%
- \expandafter\XINT_div_II_l \the\numexpr #4-\xint_c_i.{#3}#1{#2}#5.%
+ \expandafter\XINT_div_II_l \the\numexpr #4-\xint_c_i\xint:{#3}#1{#2}#5\xint:%
}%
-\def\XINT_div_II_l #1.#2#3#4#51#6!%
+\def\XINT_div_II_l #1\xint:#2#3#4#51#6!%
{%
\XINT_div_II_m {{#1}{#2}{{#3}{#4}}{#5}}{#5}{#6}1#6!%
}%
-\def\XINT_div_II_m #1#2#3#4.#5#6%
+\def\XINT_div_II_m #1#2#3#4\xint:#5#6%
{%
\XINT_div_I_a {#3}{#2}{#4}{#5}{#6}#1%
}%
-\def\XINT_div_minimulwc_a 1#1.#2.#3!#4#5#6#7#8.%
+\def\XINT_div_minimulwc_a 1#1\xint:#2\xint:#3!#4#5#6#7#8\xint:%
{%
\expandafter\XINT_div_minimulwc_b
- \the\numexpr \xint_c_x^ix+#1+#3*#8.#3*#4#5#6#7+#2*#8.#2*#4#5#6#7.%
+ \the\numexpr \xint_c_x^ix+#1+#3*#8\xint:#3*#4#5#6#7+#2*#8\xint:#2*#4#5#6#7\xint:%
}%
-\def\XINT_div_minimulwc_b 1#1#2#3#4#5#6.#7.%
+\def\XINT_div_minimulwc_b 1#1#2#3#4#5#6\xint:#7\xint:%
{%
\expandafter\XINT_div_minimulwc_c
- \the\numexpr \xint_c_x^ix+#1#2#3#4#5+#7.#6.%
+ \the\numexpr \xint_c_x^ix+#1#2#3#4#5+#7\xint:#6\xint:%
}%
-\def\XINT_div_minimulwc_c 1#1#2#3#4#5#6.#7.#8.%
+\def\XINT_div_minimulwc_c 1#1#2#3#4#5#6\xint:#7\xint:#8\xint:%
{%
1#6#7\expandafter!%
\the\numexpr\expandafter\XINT_div_smallmul_a
- \the\numexpr \xint_c_x^viii+#1#2#3#4#5+#8.%
+ \the\numexpr \xint_c_x^viii+#1#2#3#4#5+#8\xint:%
}%
-\def\XINT_div_smallmul_a #1.#2.#3!1#4!%
+\def\XINT_div_smallmul_a #1\xint:#2\xint:#3!1#4!%
{%
- \xint_gob_til_Z #4\XINT_div_smallmul_e\Z
- \XINT_div_minimulwc_a #1.#2.#3!#4.#2.#3!%
+ \xint_gob_til_sc #4\XINT_div_smallmul_e;%
+ \XINT_div_minimulwc_a #1\xint:#2\xint:#3!#4\xint:#2\xint:#3!%
}%
-\def\XINT_div_smallmul_e\Z\XINT_div_minimulwc_a 1#1.#2\Z #3!{1\relax #1!}%
+\def\XINT_div_smallmul_e;\XINT_div_minimulwc_a 1#1\xint:#2;#3!{1\relax #1!}%
\def\XINT_div_verysmallmul #1%
- {\xint_gob_til_one #1\XINT_div_verysmallisone 1\XINT_div_verysmallmul_a 0.#1}%
-\def\XINT_div_verysmallisone 1\XINT_div_verysmallmul_a 0.1!1#11\Z!%
+ {\xint_gob_til_one #1\XINT_div_verysmallisone 1\XINT_div_verysmallmul_a 0\xint:#1}%
+\def\XINT_div_verysmallisone 1\XINT_div_verysmallmul_a 0\xint:1!1#11;!%
{1\relax #1100000000!}%
-\def\XINT_div_verysmallmul_a #1.#2!1#3!%
+\def\XINT_div_verysmallmul_a #1\xint:#2!1#3!%
{%
- \xint_gob_til_Z #3\XINT_div_verysmallmul_e\Z
+ \xint_gob_til_sc #3\XINT_div_verysmallmul_e;%
\expandafter\XINT_div_verysmallmul_b
- \the\numexpr \xint_c_x^ix+#2*#3+#1.#2!%
+ \the\numexpr \xint_c_x^ix+#2*#3+#1\xint:#2!%
}%
-\def\XINT_div_verysmallmul_b 1#1#2.%
- {1#2\expandafter!\the\numexpr\XINT_div_verysmallmul_a #1.}%
-\def\XINT_div_verysmallmul_e\Z #1\Z +#2#3!{1\relax 0000000#2!}%
+\def\XINT_div_verysmallmul_b 1#1#2\xint:%
+ {1#2\expandafter!\the\numexpr\XINT_div_verysmallmul_a #1\xint:}%
+\def\XINT_div_verysmallmul_e;#1;+#2#3!{1\relax 0000000#2!}%
\def\XINT_div_sub #1#2%
{%
\expandafter\XINT_div_sub_clean
\the\numexpr\expandafter\XINT_div_sub_a\expandafter
- 1#2\Z!\Z!\Z!\Z!\Z!\W #1\Z!\Z!\Z!\Z!\Z!\W
+ 1#2;!;!;!;!;!\W #1;!;!;!;!;!\W
}%
\def\XINT_div_sub_clean #1-#2#3\W
{%
@@ -1763,57 +1660,57 @@
}%
\def\XINT_div_sub_b #1#2#3!#4!%
{%
- \xint_gob_til_Z #4\XINT_div_sub_bi \Z
- \expandafter\XINT_div_sub_c\the\numexpr#1-#3+1#4-\xint_c_i.%
+ \xint_gob_til_sc #4\XINT_div_sub_bi ;%
+ \expandafter\XINT_div_sub_c\the\numexpr#1-#3+1#4-\xint_c_i\xint:%
}%
-\def\XINT_div_sub_c 1#1#2.%
+\def\XINT_div_sub_c 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_div_sub_d #1%
}%
\def\XINT_div_sub_d #1#2#3!#4!%
{%
- \xint_gob_til_Z #4\XINT_div_sub_di \Z
- \expandafter\XINT_div_sub_e\the\numexpr#1-#3+1#4-\xint_c_i.%
+ \xint_gob_til_sc #4\XINT_div_sub_di ;%
+ \expandafter\XINT_div_sub_e\the\numexpr#1-#3+1#4-\xint_c_i\xint:%
}%
-\def\XINT_div_sub_e 1#1#2.%
+\def\XINT_div_sub_e 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_div_sub_f #1%
}%
\def\XINT_div_sub_f #1#2#3!#4!%
{%
- \xint_gob_til_Z #4\XINT_div_sub_fi \Z
- \expandafter\XINT_div_sub_g\the\numexpr#1-#3+1#4-\xint_c_i.%
+ \xint_gob_til_sc #4\XINT_div_sub_fi ;%
+ \expandafter\XINT_div_sub_g\the\numexpr#1-#3+1#4-\xint_c_i\xint:%
}%
-\def\XINT_div_sub_g 1#1#2.%
+\def\XINT_div_sub_g 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_div_sub_h #1%
}%
\def\XINT_div_sub_h #1#2#3!#4!%
{%
- \xint_gob_til_Z #4\XINT_div_sub_hi \Z
- \expandafter\XINT_div_sub_i\the\numexpr#1-#3+1#4-\xint_c_i.%
+ \xint_gob_til_sc #4\XINT_div_sub_hi ;%
+ \expandafter\XINT_div_sub_i\the\numexpr#1-#3+1#4-\xint_c_i\xint:%
}%
-\def\XINT_div_sub_i 1#1#2.%
+\def\XINT_div_sub_i 1#1#2\xint:%
{%
1#2\expandafter!\the\numexpr\XINT_div_sub_a #1%
}%
-\def\XINT_div_sub_bi\Z
- \expandafter\XINT_div_sub_c\the\numexpr#1-#2+#3.#4!#5!#6!#7!#8!#9!\Z !\W
+\def\XINT_div_sub_bi;%
+ \expandafter\XINT_div_sub_c\the\numexpr#1-#2+#3\xint:#4!#5!#6!#7!#8!#9!;!\W
{%
\XINT_div_sub_l #1#2!#5!#7!#9!%
}%
-\def\XINT_div_sub_di\Z
- \expandafter\XINT_div_sub_e\the\numexpr#1-#2+#3.#4!#5!#6!#7!#8\W
+\def\XINT_div_sub_di;%
+ \expandafter\XINT_div_sub_e\the\numexpr#1-#2+#3\xint:#4!#5!#6!#7!#8\W
{%
\XINT_div_sub_l #1#2!#5!#7!%
}%
-\def\XINT_div_sub_fi\Z
- \expandafter\XINT_div_sub_g\the\numexpr#1-#2+#3.#4!#5!#6\W
+\def\XINT_div_sub_fi;%
+ \expandafter\XINT_div_sub_g\the\numexpr#1-#2+#3\xint:#4!#5!#6\W
{%
\XINT_div_sub_l #1#2!#5!%
}%
-\def\XINT_div_sub_hi\Z
- \expandafter\XINT_div_sub_i\the\numexpr#1-#2+#3.#4\W
+\def\XINT_div_sub_hi;%
+ \expandafter\XINT_div_sub_i\the\numexpr#1-#2+#3\xint:#4\W
{%
\XINT_div_sub_l #1#2!%
}%
@@ -1828,14 +1725,15 @@
{%
-\ifnum 0#1=\xint_c_ 1\else2\fi\relax
}%
-\def\XINT_sdiv_out #1\Z!#2!%
+\def\XINT_sdiv_out #1;!#2!%
{\expandafter
- {\romannumeral0\XINT_unsep_cuzsmall#11\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W}%
+ {\romannumeral0\XINT_unsep_cuzsmall
+ #1\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax}%
{#2}}%
-\def\XINT_smalldivx_a #1.1#2!1#3!%
+\def\XINT_smalldivx_a #1\xint:1#2!1#3!%
{%
\expandafter\XINT_smalldivx_b
- \the\numexpr (#3+#1)/#2-\xint_c_i!#1.#2!#3!%
+ \the\numexpr (#3+#1)/#2-\xint_c_i!#1\xint:#2!#3!%
}%
\def\XINT_smalldivx_b #1#2!%
{%
@@ -1843,104 +1741,105 @@
\xint_c_x^viii+#1#2\xint_afterfi{\expandafter!\the\numexpr}\fi
\XINT_smalldiv_c #1#2!%
}%
-\def\XINT_smalldiv_c #1!#2.#3!#4!%
+\def\XINT_smalldiv_c #1!#2\xint:#3!#4!%
{%
- \expandafter\XINT_smalldiv_d\the\numexpr #4-#1*#3!#2.#3!%
+ \expandafter\XINT_smalldiv_d\the\numexpr #4-#1*#3!#2\xint:#3!%
}%
\def\XINT_smalldiv_d #1!#2!1#3#4!%
{%
- \xint_gob_til_Z #3\XINT_smalldiv_end \Z
+ \xint_gob_til_sc #3\XINT_smalldiv_end ;%
\XINT_smalldiv_e #1!#2!1#3#4!%
}%
-\def\XINT_smalldiv_end\Z\XINT_smalldiv_e #1!#2!1\Z!{1!\Z!#1!}%
-\def\XINT_smalldiv_e #1!#2.#3!%
+\def\XINT_smalldiv_end;\XINT_smalldiv_e #1!#2!1;!{1!;!#1!}%
+\def\XINT_smalldiv_e #1!#2\xint:#3!%
{%
\expandafter\XINT_smalldiv_f\the\numexpr
- \xint_c_xi_e_viii_mone+#1*\xint_c_x^viii/#3!#2.#3!#1!%
+ \xint_c_xi_e_viii_mone+#1*\xint_c_x^viii/#3!#2\xint:#3!#1!%
}%
-\def\XINT_smalldiv_f 1#1#2#3#4#5#6!#7.#8!%
+\def\XINT_smalldiv_f 1#1#2#3#4#5#6!#7\xint:#8!%
{%
\xint_gob_til_zero #1\XINT_smalldiv_fz 0%
\expandafter\XINT_smalldiv_g
- \the\numexpr\XINT_minimul_a #2#3#4#5.#6!#8!#2#3#4#5#6!#7.#8!%
+ \the\numexpr\XINT_minimul_a #2#3#4#5\xint:#6!#8!#2#3#4#5#6!#7\xint:#8!%
}%
\def\XINT_smalldiv_fz 0%
\expandafter\XINT_smalldiv_g\the\numexpr\XINT_minimul_a
- 9999.9999!#1!99999999!#2!0!1#3!%
+ 9999\xint:9999!#1!99999999!#2!0!1#3!%
{%
- \XINT_smalldiv_i .#3!\xint_c_!#2!%
+ \XINT_smalldiv_i \xint:#3!\xint_c_!#2!%
}%
\def\XINT_smalldiv_g 1#1!1#2!#3!#4!#5!#6!%
{%
- \expandafter\XINT_smalldiv_h\the\numexpr 1#6-#1.#2!#5!#3!#4!%
+ \expandafter\XINT_smalldiv_h\the\numexpr 1#6-#1\xint:#2!#5!#3!#4!%
}%
-\def\XINT_smalldiv_h 1#1#2.#3!#4!%
+\def\XINT_smalldiv_h 1#1#2\xint:#3!#4!%
{%
- \expandafter\XINT_smalldiv_i\the\numexpr #4-#3+#1-\xint_c_i.#2!%
+ \expandafter\XINT_smalldiv_i\the\numexpr #4-#3+#1-\xint_c_i\xint:#2!%
}%
-\def\XINT_smalldiv_i #1.#2!#3!#4.#5!%
+\def\XINT_smalldiv_i #1\xint:#2!#3!#4\xint:#5!%
{%
- \expandafter\XINT_smalldiv_j\the\numexpr (#1#2+#4)/#5-\xint_c_i!#3!#1#2!#4.#5!%
+ \expandafter\XINT_smalldiv_j\the\numexpr (#1#2+#4)/#5-\xint_c_i!#3!#1#2!#4\xint:#5!%
}%
\def\XINT_smalldiv_j #1!#2!%
{%
\xint_c_x^viii+#1+#2\expandafter!\the\numexpr\XINT_smalldiv_k
#1!%
}%
-\def\XINT_smalldiv_k #1!#2!#3.#4!%
+\def\XINT_smalldiv_k #1!#2!#3\xint:#4!%
{%
- \expandafter\XINT_smalldiv_d\the\numexpr #2-#1*#4!#3.#4!%
+ \expandafter\XINT_smalldiv_d\the\numexpr #2-#1*#4!#3\xint:#4!%
}%
-\def\XINT_div_mini #1.#2!1#3!%
+\def\XINT_div_mini #1\xint:#2!1#3!%
{%
\expandafter\XINT_div_mini_a\the\numexpr
- \xint_c_xi_e_viii_mone+#3*\xint_c_x^viii/#1!#1.#2!#3!%
+ \xint_c_xi_e_viii_mone+#3*\xint_c_x^viii/#1!#1\xint:#2!#3!%
}%
-\def\XINT_div_mini_a 1#1#2#3#4#5#6!#7.#8!%
+\def\XINT_div_mini_a 1#1#2#3#4#5#6!#7\xint:#8!%
{%
\xint_gob_til_zero #1\XINT_div_mini_w 0%
\expandafter\XINT_div_mini_b
- \the\numexpr\XINT_minimul_a #2#3#4#5.#6!#7!#2#3#4#5#6!#7.#8!%
+ \the\numexpr\XINT_minimul_a #2#3#4#5\xint:#6!#7!#2#3#4#5#6!#7\xint:#8!%
}%
\def\XINT_div_mini_w 0%
\expandafter\XINT_div_mini_b\the\numexpr\XINT_minimul_a
- 9999.9999!#1!99999999!#2.#3!00000000!#4!%
+ 9999\xint:9999!#1!99999999!#2\xint:#3!00000000!#4!%
{%
\xint_c_x^viii_mone+(#4+#3)/#2!%
}%
\def\XINT_div_mini_b 1#1!1#2!#3!#4!#5!#6!%
{%
\expandafter\XINT_div_mini_c
- \the\numexpr 1#6-#1.#2!#5!#3!#4!%
+ \the\numexpr 1#6-#1\xint:#2!#5!#3!#4!%
}%
-\def\XINT_div_mini_c 1#1#2.#3!#4!%
+\def\XINT_div_mini_c 1#1#2\xint:#3!#4!%
{%
\expandafter\XINT_div_mini_d
- \the\numexpr #4-#3+#1-\xint_c_i.#2!%
+ \the\numexpr #4-#3+#1-\xint_c_i\xint:#2!%
}%
-\def\XINT_div_mini_d #1.#2!#3!#4.#5!%
+\def\XINT_div_mini_d #1\xint:#2!#3!#4\xint:#5!%
{%
\xint_c_x^viii_mone+#3+(#1#2+#5)/#4!%
}%
\def\xintiDivRound {\romannumeral0\xintidivround }%
\def\xintidivround #1%
- {\expandafter\XINT_idivround\romannumeral0\xintnum{#1}\Z }%
+ {\expandafter\XINT_idivround\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiDivRound {\romannumeral0\xintiidivround }%
-\def\xintiidivround #1{\expandafter\XINT_iidivround \romannumeral`&&@#1\Z }%
-\def\XINT_idivround #1#2\Z #3%
+\def\xintiidivround #1{\expandafter\XINT_iidivround\romannumeral`&&@#1\xint:}%
+\def\XINT_idivround #1#2\xint:#3%
{\expandafter\XINT_iidivround_a\expandafter #1%
- \romannumeral0\xintnum{#3}\Z #2\Z }%
-\def\XINT_iidivround #1#2\Z #3%
- {\expandafter\XINT_iidivround_a\expandafter #1\romannumeral`&&@#3\Z #2\Z }%
+ \romannumeral0\xintnum{#3}\xint:#2\xint:}%
+\def\XINT_iidivround #1#2\xint:#3%
+ {\expandafter\XINT_iidivround_a\expandafter #1\romannumeral`&&@#3\xint:#2\xint:}%
\def\XINT_iidivround_a #1#2% #1 de A, #2 de B.
{%
- \if0#2\xint_dothis\XINT_iidivround_divbyzero\fi
+ \if0#2\xint_dothis{\XINT_iidivround_divbyzero#1#2}\fi
\if0#1\xint_dothis\XINT_iidivround_aiszero\fi
\if-#2\xint_dothis{\XINT_iidivround_bneg #1}\fi
\xint_orthat{\XINT_iidivround_bpos #1#2}%
}%
-\def\XINT_iidivround_divbyzero #1\Z #2\Z {\xintError:DivisionByZero\space 0}%
-\def\XINT_iidivround_aiszero #1\Z #2\Z { 0}%
+\def\XINT_iidivround_divbyzero #1#2#3\xint:#4\xint:
+ {\XINT_signalcondition{DivisionByZero}{Division of #1#4 by #2#3}{}{0}}%
+\def\XINT_iidivround_aiszero #1\xint:#2\xint:{ 0}%
\def\XINT_iidivround_bpos #1%
{%
\xint_UDsignfork
@@ -1955,7 +1854,7 @@
-{\xintiiopp\XINT_iidivround_pos #1}%
\krof
}%
-\def\XINT_iidivround_pos #1#2\Z #3\Z
+\def\XINT_iidivround_pos #1#2\xint:#3\xint:
{%
\expandafter\expandafter\expandafter\XINT_dsrr
\expandafter\xint_firstoftwo
@@ -1963,14 +1862,14 @@
\xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax
}%
\def\xintiDivTrunc {\romannumeral0\xintidivtrunc }%
-\def\xintidivtrunc #1{\expandafter\XINT_iidivtrunc\romannumeral0\xintnum{#1}\Z }%
+\def\xintidivtrunc #1{\expandafter\XINT_iidivtrunc\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiDivTrunc {\romannumeral0\xintiidivtrunc }%
-\def\xintiidivtrunc #1{\expandafter\XINT_iidivtrunc \romannumeral`&&@#1\Z }%
-\def\XINT_iidivtrunc #1#2\Z #3{\expandafter\XINT_iidivtrunc_a\expandafter #1%
- \romannumeral`&&@#3\Z #2\Z }%
+\def\xintiidivtrunc #1{\expandafter\XINT_iidivtrunc\romannumeral`&&@#1\xint:}%
+\def\XINT_iidivtrunc #1#2\xint:#3{\expandafter\XINT_iidivtrunc_a\expandafter #1%
+ \romannumeral`&&@#3\xint:#2\xint:}%
\def\XINT_iidivtrunc_a #1#2% #1 de A, #2 de B.
{%
- \if0#2\xint_dothis\XINT_iidivround_divbyzero\fi
+ \if0#2\xint_dothis{\XINT_iidivround_divbyzero#1#2}\fi
\if0#1\xint_dothis\XINT_iidivround_aiszero\fi
\if-#2\xint_dothis{\XINT_iidivtrunc_bneg #1}\fi
\xint_orthat{\XINT_iidivtrunc_bpos #1#2}%
@@ -1989,18 +1888,18 @@
-{\xintiiopp\XINT_iidivtrunc_pos #1}%
\krof
}%
-\def\XINT_iidivtrunc_pos #1#2\Z #3\Z%
+\def\XINT_iidivtrunc_pos #1#2\xint:#3\xint:
{\expandafter\xint_firstoftwo_thenstop
\romannumeral0\XINT_div_prepare {#2}{#1#3}}%
\def\xintiMod {\romannumeral0\xintimod }%
-\def\xintimod #1{\expandafter\XINT_iimod\romannumeral0\xintnum{#1}\Z }%
+\def\xintimod #1{\expandafter\XINT_iimod\romannumeral0\xintnum{#1}\xint:}%
\def\xintiiMod {\romannumeral0\xintiimod }%
-\def\xintiimod #1{\expandafter\XINT_iimod \romannumeral`&&@#1\Z }%
-\def\XINT_iimod #1#2\Z #3{\expandafter\XINT_iimod_a\expandafter #1%
- \romannumeral`&&@#3\Z #2\Z }%
+\def\xintiimod #1{\expandafter\XINT_iimod\romannumeral`&&@#1\xint:}%
+\def\XINT_iimod #1#2\xint:#3{\expandafter\XINT_iimod_a\expandafter #1%
+ \romannumeral`&&@#3\xint:#2\xint:}%
\def\XINT_iimod_a #1#2% #1 de A, #2 de B.
{%
- \if0#2\xint_dothis\XINT_iidivround_divbyzero\fi
+ \if0#2\xint_dothis{\XINT_iidivround_divbyzero#1#2}\fi
\if0#1\xint_dothis\XINT_iidivround_aiszero\fi
\if-#2\xint_dothis{\XINT_iimod_bneg #1}\fi
\xint_orthat{\XINT_iimod_bpos #1#2}%
@@ -2019,9 +1918,307 @@
-{\XINT_iimod_pos #1}%
\krof
}%
-\def\XINT_iimod_pos #1#2\Z #3\Z%
+\def\XINT_iimod_pos #1#2\xint:#3\xint:
{\expandafter\xint_secondoftwo_thenstop\romannumeral0\XINT_div_prepare
{#2}{#1#3}}%
+\def\xintiiSqr {\romannumeral0\xintiisqr }%
+\def\xintiisqr #1%
+{%
+ \expandafter\XINT_sqr\romannumeral0\xintiiabs{#1}\xint:
+}%
+\def\xintiSqr {\romannumeral0\xintisqr }%
+\def\xintisqr #1%
+{%
+ \expandafter\XINT_sqr\romannumeral0\xintiabs{#1}\xint:
+}%
+\def\XINT_sqr #1\xint:
+{%
+ \expandafter\XINT_sqr_a
+ \romannumeral0\expandafter\XINT_sepandrev_andcount
+ \romannumeral0\XINT_zeroes_forviii #1\R\R\R\R\R\R\R\R{10}0000001\W
+ #1\XINT_rsepbyviii_end_A 2345678%
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
+ \xint:
+}%
+\def\XINT_sqr_a #1\xint:
+{%
+ \ifnum #1=\xint_c_i \expandafter\XINT_sqr_small
+ \else\expandafter\XINT_sqr_start\fi
+}%
+\def\XINT_sqr_small 1#1#2#3#4#5!\xint:
+{%
+ \ifnum #1#2#3#4#5<46341 \expandafter\XINT_sqr_verysmall\fi
+ \expandafter\XINT_sqr_small_out
+ \the\numexpr\XINT_minimul_a #1#2#3#4\xint:#5!#1#2#3#4#5!%
+}%
+\def\XINT_sqr_verysmall#1{%
+\def\XINT_sqr_verysmall
+ \expandafter\XINT_sqr_small_out\the\numexpr\XINT_minimul_a ##1!##2!%
+ {\expandafter#1\the\numexpr ##2*##2\relax}%
+}\XINT_sqr_verysmall{ }%
+\def\XINT_sqr_small_out 1#1!1#2!%
+{%
+ \XINT_cuz #2#1\R
+}%
+\def\XINT_sqr_start #1\xint:
+{%
+ \expandafter\XINT_mul_out
+ \the\numexpr\XINT_mul_loop
+ 100000000!1;!\W #11;!\W #11;!%
+ 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
+}%
+\def\xintiiPow {\romannumeral0\xintiipow }%
+\def\xintiipow #1#2%
+{%
+ \expandafter\xint_pow\the\numexpr #2\expandafter
+ .\romannumeral`&&@#1\xint:
+}%
+\def\xintiPow {\romannumeral0\xintipow }%
+\def\xintipow #1#2%
+{%
+ \expandafter\xint_pow\the\numexpr #2\expandafter
+ .\romannumeral0\xintnum{#1}\xint:
+}%
+\def\xint_pow #1.#2%#3\xint:
+{%
+ \xint_UDzerominusfork
+ #2-\XINT_pow_AisZero
+ 0#2\XINT_pow_Aneg
+ 0-{\XINT_pow_Apos #2}%
+ \krof {#1}%
+}%
+\def\XINT_pow_AisZero #1#2\xint:
+{%
+ \ifcase\XINT_cntSgn #1\xint:
+ \xint_afterfi { 1}%
+ \or
+ \xint_afterfi { 0}%
+ \else
+ \xint_afterfi
+ {\XINT_signalcondition{DivisionByZero}{Zero to power #1}{}{0}}%
+ \fi
+}%
+\def\XINT_pow_Aneg #1%
+{%
+ \ifodd #1
+ \expandafter\XINT_opp\romannumeral0%
+ \fi
+ \XINT_pow_Apos {}{#1}%
+}%
+\def\XINT_pow_Apos #1#2{\XINT_pow_Apos_a {#2}#1}%
+\def\XINT_pow_Apos_a #1#2#3%
+{%
+ \xint_gob_til_xint: #3\XINT_pow_Apos_short\xint:
+ \XINT_pow_AatleastTwo {#1}#2#3%
+}%
+\def\XINT_pow_Apos_short\xint:\XINT_pow_AatleastTwo #1#2\xint:
+{%
+ \ifcase #2
+ \xintError:thiscannothappen
+ \or \expandafter\XINT_pow_AisOne
+ \else\expandafter\XINT_pow_AatleastTwo
+ \fi {#1}#2\xint:
+}%
+\def\XINT_pow_AisOne #1\xint:{ 1}%
+\def\XINT_pow_AatleastTwo #1%
+{%
+ \ifcase\XINT_cntSgn #1\xint:
+ \expandafter\XINT_pow_BisZero
+ \or
+ \expandafter\XINT_pow_I_in
+ \else
+ \expandafter\XINT_pow_BisNegative
+ \fi
+ {#1}%
+}%
+\def\XINT_pow_BisNegative #1\xint:{\XINT_signalcondition{Underflow}{Inverse power
+ can not be represented by an integer}{}{0}}%
+\def\XINT_pow_BisZero #1\xint:{ 1}%
+\def\XINT_pow_I_in #1#2\xint:
+{%
+ \expandafter\XINT_pow_I_loop
+ \the\numexpr #1\expandafter\xint:%
+ \romannumeral0\expandafter\XINT_sepandrev
+ \romannumeral0\XINT_zeroes_forviii #2\R\R\R\R\R\R\R\R{10}0000001\W
+ #2\XINT_rsepbyviii_end_A 2345678%
+ \XINT_rsepbyviii_end_B 2345678\relax XX%
+ \R\xint:\R\xint:\R\xint:\R\xint:\R\xint:\R\xint:\R\xint:\R\xint:\W
+ 1;!\W
+ 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
+}%
+\def\XINT_pow_I_loop #1\xint:%
+{%
+ \ifnum #1 = \xint_c_i\expandafter\XINT_pow_I_exit\fi
+ \ifodd #1
+ \expandafter\XINT_pow_II_in
+ \else
+ \expandafter\XINT_pow_I_squareit
+ \fi #1\xint:%
+}%
+\def\XINT_pow_I_exit \ifodd #1\fi #2\xint:#3\W {\XINT_mul_out #3}%
+\def\XINT_pow_I_squareit #1\xint:#2\W%
+{%
+ \expandafter\XINT_pow_I_loop
+ \the\numexpr #1/\xint_c_ii\expandafter\xint:%
+ \the\numexpr\XINT_pow_mulbutcheckifsmall #2\W #2\W
+}%
+\def\XINT_pow_mulbutcheckifsmall #1!1#2%
+{%
+ \xint_gob_til_sc #2\XINT_pow_mul_small;%
+ \XINT_mul_loop 100000000!1;!\W #1!1#2%
+}%
+\def\XINT_pow_mul_small;\XINT_mul_loop
+ 100000000!1;!\W 1#1!1;!\W
+{%
+ \XINT_smallmul 1#1!%
+}%
+\def\XINT_pow_II_in #1\xint:#2\W
+{%
+ \expandafter\XINT_pow_II_loop
+ \the\numexpr #1/\xint_c_ii-\xint_c_i\expandafter\xint:%
+ \the\numexpr\XINT_pow_mulbutcheckifsmall #2\W #2\W #2\W
+}%
+\def\XINT_pow_II_loop #1\xint:%
+{%
+ \ifnum #1 = \xint_c_i\expandafter\XINT_pow_II_exit\fi
+ \ifodd #1
+ \expandafter\XINT_pow_II_odda
+ \else
+ \expandafter\XINT_pow_II_even
+ \fi #1\xint:%
+}%
+\def\XINT_pow_II_exit\ifodd #1\fi #2\xint:#3\W #4\W
+{%
+ \expandafter\XINT_mul_out
+ \the\numexpr\XINT_pow_mulbutcheckifsmall #4\W #3%
+}%
+\def\XINT_pow_II_even #1\xint:#2\W
+{%
+ \expandafter\XINT_pow_II_loop
+ \the\numexpr #1/\xint_c_ii\expandafter\xint:%
+ \the\numexpr\XINT_pow_mulbutcheckifsmall #2\W #2\W
+}%
+\def\XINT_pow_II_odda #1\xint:#2\W #3\W
+{%
+ \expandafter\XINT_pow_II_oddb
+ \the\numexpr #1/\xint_c_ii-\xint_c_i\expandafter\xint:%
+ \the\numexpr\XINT_pow_mulbutcheckifsmall #3\W #2\W #2\W
+}%
+\def\XINT_pow_II_oddb #1\xint:#2\W #3\W
+{%
+ \expandafter\XINT_pow_II_loop
+ \the\numexpr #1\expandafter\xint:%
+ \the\numexpr\XINT_pow_mulbutcheckifsmall #3\W #3\W #2\W
+}%
+\def\xintiiFac {\romannumeral0\xintiifac }%
+\def\xintiifac #1{\expandafter\XINT_fac_fork\the\numexpr#1.}%
+\def\xintiFac {\romannumeral0\xintifac }%
+\let\xintifac\xintiifac
+\def\XINT_fac_fork #1#2.%
+{%
+ \xint_UDzerominusfork
+ #1-\XINT_fac_zero
+ 0#1\XINT_fac_neg
+ 0-\XINT_fac_checksize
+ \krof #1#2.%
+}%
+\def\XINT_fac_zero #1.{ 1}%
+\def\XINT_fac_neg #1.{\XINT_signalcondition{InvalidOperation}{Factorial of
+ negative: (#1)!}{}{0}}%
+\def\XINT_fac_checksize #1.%
+{%
+ \ifnum #1>\xint_c_x^iv \xint_dothis{\XINT_fac_toobig #1.}\fi
+ \ifnum #1>465 \xint_dothis{\XINT_fac_bigloop_a #1.}\fi
+ \ifnum #1>101 \xint_dothis{\XINT_fac_medloop_a #1.\XINT_mul_out}\fi
+ \xint_orthat{\XINT_fac_smallloop_a #1.\XINT_mul_out}%
+ 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W
+}%
+\def\XINT_fac_toobig #1.#2\W{\XINT_signalcondition{InvalidOperation}{Factorial
+ of too big argument: #1 > 10000}{}{0}}%
+\def\XINT_fac_bigloop_a #1.%
+{%
+ \expandafter\XINT_fac_bigloop_b \the\numexpr
+ #1+\xint_c_i-\xint_c_ii*((#1-464)/\xint_c_ii).#1.%
+}%
+\def\XINT_fac_bigloop_b #1.#2.%
+{%
+ \expandafter\XINT_fac_medloop_a
+ \the\numexpr #1-\xint_c_i.{\XINT_fac_bigloop_loop #1.#2.}%
+}%
+\def\XINT_fac_bigloop_loop #1.#2.%
+{%
+ \ifnum #1>#2 \expandafter\XINT_fac_bigloop_exit\fi
+ \expandafter\XINT_fac_bigloop_loop
+ \the\numexpr #1+\xint_c_ii\expandafter.%
+ \the\numexpr #2\expandafter.\the\numexpr\XINT_fac_bigloop_mul #1!%
+}%
+\def\XINT_fac_bigloop_exit #1!{\XINT_mul_out}%
+\def\XINT_fac_bigloop_mul #1!%
+{%
+ \expandafter\XINT_smallmul
+ \the\numexpr \xint_c_x^viii+#1*(#1+\xint_c_i)!%
+}%
+\def\XINT_fac_medloop_a #1.%
+{%
+ \expandafter\XINT_fac_medloop_b
+ \the\numexpr #1+\xint_c_i-\xint_c_iii*((#1-100)/\xint_c_iii).#1.%
+}%
+\def\XINT_fac_medloop_b #1.#2.%
+{%
+ \expandafter\XINT_fac_smallloop_a
+ \the\numexpr #1-\xint_c_i.{\XINT_fac_medloop_loop #1.#2.}%
+}%
+\def\XINT_fac_medloop_loop #1.#2.%
+{%
+ \ifnum #1>#2 \expandafter\XINT_fac_loop_exit\fi
+ \expandafter\XINT_fac_medloop_loop
+ \the\numexpr #1+\xint_c_iii\expandafter.%
+ \the\numexpr #2\expandafter.\the\numexpr\XINT_fac_medloop_mul #1!%
+}%
+\def\XINT_fac_medloop_mul #1!%
+{%
+ \expandafter\XINT_smallmul
+ \the\numexpr
+ \xint_c_x^viii+#1*(#1+\xint_c_i)*(#1+\xint_c_ii)!%
+}%
+\def\XINT_fac_smallloop_a #1.%
+{%
+ \csname
+ XINT_fac_smallloop_\the\numexpr #1-\xint_c_iv*(#1/\xint_c_iv)\relax
+ \endcsname #1.%
+}%
+\expandafter\def\csname XINT_fac_smallloop_1\endcsname #1.%
+{%
+ \XINT_fac_smallloop_loop 2.#1.100000001!1;!%
+}%
+\expandafter\def\csname XINT_fac_smallloop_-2\endcsname #1.%
+{%
+ \XINT_fac_smallloop_loop 3.#1.100000002!1;!%
+}%
+\expandafter\def\csname XINT_fac_smallloop_-1\endcsname #1.%
+{%
+ \XINT_fac_smallloop_loop 4.#1.100000006!1;!%
+}%
+\expandafter\def\csname XINT_fac_smallloop_0\endcsname #1.%
+{%
+ \XINT_fac_smallloop_loop 5.#1.1000000024!1;!%
+}%
+\def\XINT_fac_smallloop_loop #1.#2.%
+{%
+ \ifnum #1>#2 \expandafter\XINT_fac_loop_exit\fi
+ \expandafter\XINT_fac_smallloop_loop
+ \the\numexpr #1+\xint_c_iv\expandafter.%
+ \the\numexpr #2\expandafter.\the\numexpr\XINT_fac_smallloop_mul #1!%
+}%
+\def\XINT_fac_smallloop_mul #1!%
+{%
+ \expandafter\XINT_smallmul
+ \the\numexpr
+ \xint_c_x^viii+#1*(#1+\xint_c_i)*(#1+\xint_c_ii)*(#1+\xint_c_iii)!%
+}%
+\def\XINT_fac_loop_exit #1!#2;!#3{#3#2;!}%
\catcode`! 11
\def\xintAbs {\Did_you_mean_iiAbs?or_load_xintfrac!}%
\def\xintOpp {\Did_you_mean_iiOpp?or_load_xintfrac!}%
@@ -2032,6 +2229,7 @@
\def\xintSqr {\Did_you_mean_iiSqr?or_load_xintfrac!}%
\def\xintQuo {\Removed!use_xintiQuo_or_xintiiQuo!}%
\def\xintRem {\Removed!use_xintiRem_or_xintiiRem!}%
+\catcode`! 12
\XINT_restorecatcodes_endinput%
\endinput
%%
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index 91354f0a86e..8b8abe637c1 100644
--- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
@@ -81,13 +81,16 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2017/01/06 1.2k Expandable expression parser (JFB)]%
+ [2017/07/26 1.2l Expandable expression parser (JFB)]%
\catcode`! 11
-\def\xint_gob_til_! #1!{}% catcode 11 ! default in xintexpr.sty code.
-\edef\XINT_expr_lockscan#1!% not used for decimal numbers in xintexpr 1.2
- {\noexpand\expandafter\space\noexpand\csname .=#1\endcsname }%
-\edef\XINT_expr_lockit
- #1{\noexpand\expandafter\space\noexpand\csname .=#1\endcsname }%
+\let\XINT_Cmp \xintiiCmp
+\def\xint_gob_til_! #1!{}% ! with catcode 11
+\def\XINT_expr_lockscan#1{% not used for decimal numbers in xintexpr 1.2
+\def\XINT_expr_lockscan##1!{\expandafter#1\csname .=##1\endcsname}%
+}\XINT_expr_lockscan{ }%
+\def\XINT_expr_lockit#1{%
+\def\XINT_expr_lockit##1{\expandafter#1\csname .=##1\endcsname}%
+}\XINT_expr_lockit{ }%
\def\XINT_expr_unlock_hex_in #1% expanded inside \csname..\endcsname
{\expandafter\XINT_expr_inhex\romannumeral`&&@\XINT_expr_unlock#1;}%
\def\XINT_expr_inhex #1.#2#3;% expanded inside \csname..\endcsname
@@ -252,7 +255,7 @@
\if ^#1\xint_dothis\XINT_:::_end\fi
\xint_orthat\XINT_pfloat::_d #1}%
\def\XINT_pfloat::_d #1,#2%
- {\expandafter\XINT_pfloat::_e\romannumeral0\XINT_pfloat_opt [\xint_relax #2]{#1},{#2}}%
+ {\expandafter\XINT_pfloat::_e\romannumeral0\XINT_pfloat_opt [\xint:#2]{#1},{#2}}%
\def\XINT_pfloat::_e #1,#2#3{\XINT_pfloat::_b {#2}{#3, #1}}%
\def\XINT_expr_getnext #1%
{%
@@ -332,6 +335,7 @@
\def\XINT_expr_scanint_endbycs#1#2\XINT_expr_scanint_d{\endcsname #1}%
\def\XINT_expr_scanint_c\string #1\XINT_expr_scanint_d
{%
+ \if _#1\xint_dothis\XINT_expr_scanint_d\fi
\if e#1\xint_dothis{[\the\numexpr0\XINT_expr_scanexp_a +}\fi
\if E#1\xint_dothis{[\the\numexpr0\XINT_expr_scanexp_a +}\fi
\if .#1\xint_dothis{\XINT_expr_startdec_a .}\fi
@@ -355,6 +359,7 @@
\def\XINT_expr_gobz_scanint_endbycs#1#2\XINT_expr_scanint_d{0\endcsname #1}%
\def\XINT_expr_gobz_scanint_c\string #1\XINT_expr_scanint_d
{%
+ \if _#1\xint_dothis\XINT_expr_gobz_scanint_d\fi
\if e#1\xint_dothis{0[\the\numexpr0\XINT_expr_scanexp_a +}\fi
\if E#1\xint_dothis{0[\the\numexpr0\XINT_expr_scanexp_a +}\fi
\if .#1\xint_dothis{\XINT_expr_gobz_startdec_a .}\fi
@@ -389,6 +394,7 @@
}%
\def\XINT_expr_scandec_c\string #1#2\the\numexpr#3-\xint_c_i.%
{%
+ \if _#1\xint_dothis{\XINT_expr_scandec_d#3.}\fi
\if e#1\xint_dothis{[\the\numexpr#3\XINT_expr_scanexp_a +}\fi
\if E#1\xint_dothis{[\the\numexpr#3\XINT_expr_scanexp_a +}\fi
\xint_orthat {[#3]\endcsname #1}%
@@ -402,8 +408,9 @@
{\string#2\expandafter\XINT_expr_scandec_d}\the\numexpr#1-\xint_c_i.%
}%
\def\XINT_expr_gobz_scandec_endbycs #1#2\xint_c_i.{0[0]\endcsname #1}%
-\def\XINT_expr_gobz_scandec_c\if0#1#2\fi #3\xint_c_i.%
+\def\XINT_expr_gobz_scandec_c\if0#1#2\fi #3\numexpr#4-\xint_c_i.%
{%
+ \if _#1\xint_dothis{\XINT_expr_gobz_scandec_b #4.}\fi
\if e#1\xint_dothis{0[\the\numexpr0\XINT_expr_scanexp_a +}\fi
\if E#1\xint_dothis{0[\the\numexpr0\XINT_expr_scanexp_a +}\fi
\xint_orthat {0[0]\endcsname #1}%
@@ -425,6 +432,7 @@
}%
\def\XINT_expr_scanexp_c\string #1\XINT_expr_scanexp_d
{%
+ \if _#1\xint_dothis \XINT_expr_scanexp_d \fi
\if +#1\xint_dothis {\XINT_expr_scanexp_a +}\fi
\if -#1\xint_dothis {\XINT_expr_scanexp_a -}\fi
\xint_orthat {]\endcsname #1}%
@@ -440,7 +448,11 @@
{%
\expandafter\XINT_expr_scanexp_bb\romannumeral`&&@#1%
}%
-\def\XINT_expr_scanexp_cb\string #1\XINT_expr_scanexp_db {]\endcsname #1}%
+\def\XINT_expr_scanexp_cb\string #1\XINT_expr_scanexp_db
+{%
+ \if _#1\xint_dothis\XINT_expr_scanexp_d\fi
+ \xint_orthat{]\endcsname #1}%
+}%
\def\XINT_expr_scanhex_I #1% #1="
{%
\expandafter\XINT_expr_getop\csname.=\expandafter
@@ -461,12 +473,9 @@
0\else1\fi\else0\fi\else1\fi\else0\fi 1%
\expandafter\XINT_expr_scanhexI_b
\else
- \if .#1%
- \expandafter\xint_firstoftwo
- \else % gather what we got so far, leave catcode 12 #1 in stream
- \expandafter\xint_secondoftwo
- \fi
- {\expandafter\XINT_expr_scanhex_transition}%
+ \if _#1\xint_dothis{\expandafter\XINT_expr_scanhexI_bgob}\fi
+ \if .#1\xint_dothis{\expandafter\XINT_expr_scanhex_transition}\fi
+ \xint_orthat % gather what we got so far, leave catcode 12 #1 in stream
{\xint_afterfi {.>\endcsname\endcsname}}%
\fi
#1%
@@ -475,6 +484,10 @@
{%
#1\expandafter\XINT_expr_scanhexI_a\romannumeral`&&@#2%
}%
+\def\XINT_expr_scanhexI_bgob #1#2%
+{%
+ \expandafter\XINT_expr_scanhexI_a\romannumeral`&&@#2%
+}%
\def\XINT_expr_scanhex_transition .#1%
{%
\expandafter.\expandafter.\expandafter
@@ -495,7 +508,8 @@
0\else1\fi\else0\fi\else1\fi\else0\fi 1%
\expandafter\XINT_expr_scanhexII_b
\else
- \xint_afterfi {\endcsname\endcsname}%
+ \if _#1\xint_dothis{\expandafter\XINT_expr_scanhexII_bgob}\fi
+ \xint_orthat{\xint_afterfi {\endcsname\endcsname}}%
\fi
#1%
}%
@@ -503,6 +517,10 @@
{%
#1\expandafter\XINT_expr_scanhexII_a\romannumeral`&&@#2%
}%
+\def\XINT_expr_scanhexII_bgob #1#2%
+{%
+ \expandafter\XINT_expr_scanhexII_a\romannumeral`&&@#2%
+}%
\def\XINT_expr_scanfunc
{%
\expandafter\XINT_expr_func\romannumeral`&&@\XINT_expr_scanfunc_a
@@ -975,8 +993,7 @@
\let\XINT_flexpr_op_:] \XINT_expr_op_:]
\let\XINT_iiexpr_op_:] \XINT_expr_op_:]
\let\XINT_expr_precedence_][: \xint_c_iii
-\edef\XINT_expr_op_][: #1{\xint_c_ii \expandafter\noexpand
- \csname XINT_expr_itself_][\endcsname #10\string :}%
+\edef\XINT_expr_op_][: #1{\xint_c_ii\noexpand\XINT_expr_itself_][#10\string :}%
\let\XINT_flexpr_op_][: \XINT_expr_op_][:
\let\XINT_iiexpr_op_][: \XINT_expr_op_][:
\catcode`[ 12 \catcode`] 12
@@ -2652,7 +2669,7 @@
\toks0 \expandafter{\the\toks0
\def\xintListSel:x:csv {~xintListSel:f:csv }%
}%
-\odef\XINT_expr_redefinemacros {\the\toks0}% Not \edef ! (subtle)
+\odef\XINT_expr_redefinemacros {\the\toks0}%
\def\XINT_expr_redefineprints
{%
\def\XINT_flexpr_noopt
diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
index eed97cde276..d5fbc30c454 100644
--- a/Master/texmf-dist/tex/generic/xint/xintfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintfrac: Expandable operations on fractions
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintfrac}%
- [2017/01/06 1.2k Expandable operations on fractions (JFB)]%
+ [2017/07/26 1.2l Expandable operations on fractions (JFB)]%
\def\XINT_cntSgnFork #1%
{%
\ifcase #1\expandafter\xint_secondofthree
@@ -87,15 +87,14 @@
{%
\expandafter#1%
\the\numexpr \XINT_abs##1+%
- \XINT_len_fork ##2##3\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ \XINT_len_fork ##2##3\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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-\xint_c_i
\relax
}}\XINT_flen{ }%
\def\XINT_outfrac #1#2#3%
{%
- \ifcase\XINT_cntSgn #3\Z
+ \ifcase\XINT_cntSgn #3\xint:
\expandafter \XINT_outfrac_divisionbyzero
\or
\expandafter \XINT_outfrac_P
@@ -104,14 +103,14 @@
\fi
{#2}{#3}[#1]%
}%
-\def\XINT_outfrac_divisionbyzero #1#2{\xintError:DivisionByZero\space #1/0}%
-\edef\XINT_outfrac_P #1#2%
+\def\XINT_outfrac_divisionbyzero #1#2%
{%
- \noexpand\if0\noexpand\XINT_Sgn #1\noexpand\Z
- \noexpand\expandafter\noexpand\XINT_outfrac_Zero
- \noexpand\fi
- \space #1/#2%
+ \XINT_signalcondition{DivisionByZero}{Division of #1 by #2}{}{0/1[0]}%
}%
+\def\XINT_outfrac_P#1{%
+\def\XINT_outfrac_P ##1##2%
+ {\if0\XINT_Sgn ##1\xint:\expandafter\XINT_outfrac_Zero\fi#1##1/##2}%
+}\XINT_outfrac_P{ }%
\def\XINT_outfrac_Zero #1[#2]{ 0/1[0]}%
\def\XINT_outfrac_N #1#2%
{%
@@ -125,13 +124,13 @@
\def\XINT_inFrac {\romannumeral0\XINT_infrac }%
\def\XINT_infrac #1%
{%
- \expandafter\XINT_infrac_fork\romannumeral`&&@#1/\XINT_W[\XINT_W\XINT_T
+ \expandafter\XINT_infrac_fork\romannumeral`&&@#1\xint:/\XINT_W[\XINT_W\XINT_T
}%
\def\XINT_infrac_fork #1[#2%
{%
\xint_UDXINTWfork
- #2\XINT_frac_gen
- \XINT_W\XINT_infrac_res_a % strict A[N] or A/B[N] input
+ #2\XINT_frac_gen % input has no brackets [N]
+ \XINT_W\XINT_infrac_res_a % there is some [N], must be strict A[N] or A/B[N] input
\krof
#1[#2%
}%
@@ -143,27 +142,27 @@
\def\XINT_infrac_res_b #1/#2%
{%
\xint_UDXINTWfork
- #2\XINT_infrac_res_ca
- \XINT_W\XINT_infrac_res_cb
+ #2\XINT_infrac_res_ca % it was A[N] input
+ \XINT_W\XINT_infrac_res_cb % it was A/B[N] input
\krof
#1/#2%
}%
-\def\XINT_infrac_res_ca #1[#2]/\XINT_W[\XINT_W\XINT_T
+\def\XINT_infrac_res_ca #1[#2]\xint:/\XINT_W[\XINT_W\XINT_T
{\expandafter{\the\numexpr #2}{#1}{1}}%
\def\XINT_infrac_res_cb #1/#2[%
{\expandafter\XINT_infrac_res_cc\romannumeral`&&@#2~#1[}%
-\def\XINT_infrac_res_cc #1~#2[#3]/\XINT_W[\XINT_W\XINT_T
+\def\XINT_infrac_res_cc #1~#2[#3]\xint:/\XINT_W[\XINT_W\XINT_T
{\expandafter{\the\numexpr #3}{#2}{#1}}%
\def\XINT_frac_gen #1/#2%
{%
\xint_UDXINTWfork
- #2\XINT_frac_gen_A
- \XINT_W\XINT_frac_gen_B
+ #2\XINT_frac_gen_A % there was no /
+ \XINT_W\XINT_frac_gen_B % there was a /
\krof
#1/#2%
}%
-\def\XINT_frac_gen_A #1/\XINT_W [\XINT_W {\XINT_frac_gen_C 0~1!#1ee.\XINT_W }%
-\def\XINT_frac_gen_B #1/#2/\XINT_W[%\XINT_W
+\def\XINT_frac_gen_A #1\xint:/\XINT_W [\XINT_W {\XINT_frac_gen_C 0~1!#1ee.\XINT_W }%
+\def\XINT_frac_gen_B #1/#2\xint:/\XINT_W[%\XINT_W
{%
\expandafter\XINT_frac_gen_Ba
\romannumeral`&&@#2ee.\XINT_W\XINT_Z #1ee.%\XINT_W
@@ -186,8 +185,7 @@
{%
\expandafter\XINT_frac_gen_C\the\numexpr #3-%
\numexpr\XINT_length_loop
- #1\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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
~#2#1!%
@@ -203,9 +201,8 @@
\def\XINT_frac_gen_Ca #1~#2!#3e#4e#5\XINT_T
{%
\expandafter\XINT_frac_gen_F\the\numexpr #4-#1\expandafter
- ~\romannumeral0\XINT_num_loop
- #2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z~#3~%
+ ~\romannumeral0\expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop
+ #2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z~#3~%
}%
\def\XINT_frac_gen_Cb #1.#2e%
{%
@@ -215,13 +212,12 @@
{%
\expandafter\XINT_frac_gen_F\the\numexpr #5-#2-%
\numexpr\XINT_length_loop
- #1\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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\expandafter~\romannumeral0\XINT_num_loop
- #3\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z
+ \relax\expandafter~%
+ \romannumeral0\expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop
+ #3\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
~#4#1~%
}%
\def\XINT_frac_gen_F #1~#2%
@@ -235,20 +231,18 @@
\def\XINT_frac_gen_Gdivbyzero #1~~#2~%
{%
\expandafter\XINT_frac_gen_Gdivbyzero_a
- \romannumeral0\XINT_num_loop
- #2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z~#1~%
+ \romannumeral0\expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop
+ #2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z~#1~%
}%
\def\XINT_frac_gen_Gdivbyzero_a #1~#2~%
{%
- \xintError:DivisionByZero {#2}{#1}{0}%
+ \XINT_signalcondition{DivisionByZero}{Division of #1 by zero}{}{{#2}{#1}{0}}%
}%
\def\XINT_frac_gen_G #1#2#3~#4~#5~%
{%
\expandafter\XINT_frac_gen_Ga
- \romannumeral0\XINT_num_loop
- #1#5\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\Z~#3~{#2#4}%
+ \romannumeral0\expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop
+ #1#5\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z~#3~{#2#4}%
}%
\def\XINT_frac_gen_Ga #1#2~#3~%
{%
@@ -260,10 +254,10 @@
{%
\expandafter\XINT_cuz_cnt_loop\expandafter
{\expandafter}\romannumeral0\XINT_rord_main {}#1%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax
+ \xint:
\R\R\R\R\R\R\R\R\Z
}%
\def\XINT_cuz_cnt #1%
@@ -344,10 +338,10 @@
{%
\expandafter\space\expandafter
{\romannumeral0\XINT_rord_main {}#2%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax }{#1}%
+ \xint:}{#1}%
}%
\def\xintRaw {\romannumeral0\xintraw }%
\def\xintraw
@@ -412,7 +406,7 @@
}%
\def\XINT_numer #1%
{%
- \ifcase\XINT_cntSgn #1\Z
+ \ifcase\XINT_cntSgn #1\xint:
\expandafter\XINT_numer_B
\or
\expandafter\XINT_numer_A
@@ -611,8 +605,14 @@
\krof
{#3#4}{#1#2}{#3#4}{#1#2}%
}%
-\def\XINT_irr_indeterminate #1#2#3#4#5{\xintError:NaN\space 0/0}%
-\def\XINT_irr_divisionbyzero #1#2#3#4#5{\xintError:DivisionByZero #5#2/0}%
+\def\XINT_irr_indeterminate #1#2#3#4#5%
+{%
+ \XINT_signalcondition{DivisionUndefined}{indeterminate: 0/0}{}{0/1}%
+}%
+\def\XINT_irr_divisionbyzero #1#2#3#4#5%
+{%
+ \XINT_signalcondition{DivisionByZero}{vanishing denominator: #5#2/0}{}{0/1}%
+}%
\def\XINT_irr_zero #1#2#3#4#5{ 0/1}% changed in 1.08
\def\XINT_irr_loop_a #1#2%
{%
@@ -678,8 +678,14 @@
\krof
{#3#4}{#1#2}1001%
}%
-\def\XINT_jrr_indeterminate #1#2#3#4#5#6#7{\xintError:NaN\space 0/0}%
-\def\XINT_jrr_divisionbyzero #1#2#3#4#5#6#7{\xintError:DivisionByZero #7#2/0}%
+\def\XINT_jrr_indeterminate #1#2#3#4#5#6#7%
+{%
+ \XINT_signalcondition{DivisionUndefined}{indeterminate: 0/0}{}{0/1}%
+}%
+\def\XINT_jrr_divisionbyzero #1#2#3#4#5#6#7%
+{%
+ \XINT_signalcondition{DivisionByZero}{Vanishing denominator: #7#2/0}{}{0/1}%
+}%
\def\XINT_jrr_zero #1#2#3#4#5#6#7{ 0/1}% changed in 1.08
\def\XINT_jrr_loop_a #1#2%
{%
@@ -689,8 +695,8 @@
\def\XINT_jrr_loop_b #1#2#3#4#5#6#7%
{%
\expandafter \XINT_jrr_loop_c \expandafter
- {\romannumeral0\xintiiadd{\XINT_mul_fork #4\Z #1\Z}{#6}}%
- {\romannumeral0\xintiiadd{\XINT_mul_fork #5\Z #1\Z}{#7}}%
+ {\romannumeral0\xintiiadd{\XINT_mul_fork #4\xint:#1\xint:}{#6}}%
+ {\romannumeral0\xintiiadd{\XINT_mul_fork #5\xint:#1\xint:}{#7}}%
{#2}{#3}{#4}{#5}%
}%
\def\XINT_jrr_loop_c #1#2%
@@ -732,8 +738,8 @@
}%
\def\XINT_trunc_a #1#2#3#4.#5%
{%
- \if0\XINT_Sgn#2\Z\xint_dothis\XINT_trunc_zero\fi
- \if1\XINT_is_one#3XY\xint_dothis\XINT_trunc_sp_b\fi
+ \if0\XINT_Sgn#2\xint:\xint_dothis\XINT_trunc_zero\fi
+ \if1\XINT_is_One#3XY\xint_dothis\XINT_trunc_sp_b\fi
\xint_orthat\XINT_trunc_b #1+#4.{#2}{#3}#5#4.%
}%
\def\XINT_trunc_zero #1.#2.{ 0}%
@@ -772,8 +778,7 @@
\expandafter\XINT_trunc_sp_Cc
\romannumeral0\expandafter\XINT_split_fromright_a
\the\numexpr#3-\numexpr\XINT_length_loop
- #2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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
.#2\xint_bye2345678\xint_bye..#1%
@@ -851,8 +856,8 @@
}%
\def\XINT_round_a #1#2#3#4.%
{%
- \if0\XINT_Sgn#2\Z\xint_dothis\XINT_trunc_zero\fi
- \if1\XINT_is_one#3XY\xint_dothis\XINT_trunc_sp_b\fi
+ \if0\XINT_Sgn#2\xint:\xint_dothis\XINT_trunc_zero\fi
+ \if1\XINT_is_One#3XY\xint_dothis\XINT_trunc_sp_b\fi
\xint_orthat\XINT_trunc_b #1+#4.{#2}{#3}%
}%
\def\XINT_round_A{\expandafter\XINT_trunc_G\romannumeral0\XINT_round_B}%
@@ -880,7 +885,8 @@
\def\XINT_xtrunc_zero #1#2]{0.\romannumeral\xintreplicate{#1}0}%
\def\XINT_xtrunc_d #1#2#3/#4[#5]%
{%
- \XINT_xtrunc_prepare_a#4\R\R\R\R\R\R\R\R {10}0000001\W !{#4};{#5}{#2}{#1#3}%
+ \XINT_xtrunc_prepare_a#4\R\R\R\R\R\R\R\R {10}0000001\W
+ !{#4};{#5}{#2}{#1#3}%
}%
\def\XINT_xtrunc_prepare_a #1#2#3#4#5#6#7#8#9%
{%
@@ -930,12 +936,13 @@
{%
\expandafter\XINT_xtrunc_e\expandafter
{\expandafter\XINT_xtrunc_small_a
- \the\numexpr #1/\xint_c_ii\expandafter.\the\numexpr \xint_c_x^viii+#1!}%
+ \the\numexpr #1/\xint_c_ii\expandafter
+ .\the\numexpr \xint_c_x^viii+#1!}%
}%
\def\XINT_xtrunc_small_a #1.#2!#3%
{%
\expandafter\XINT_div_small_b\the\numexpr #1\expandafter
- .\the\numexpr #2\expandafter!%
+ \xint:\the\numexpr #2\expandafter!%
\romannumeral0\XINT_div_small_ba #3\R\R\R\R\R\R\R\R{10}0000001\W
#3\XINT_sepbyviii_Z_end 2345678\relax
}%
@@ -947,7 +954,8 @@
}%
\def\XINT_xtrunc_prepare_d #1#2#3#4#5#6#7#8#9%
{%
- \expandafter\XINT_xtrunc_prepare_e\xint_gob_til_dot #1#2#3#4#5#6#7#8#9!%
+ \expandafter\XINT_xtrunc_prepare_e
+ \xint_gob_til_dot #1#2#3#4#5#6#7#8#9!%
}%
\def\XINT_xtrunc_prepare_e #1!#2!#3#4%
{%
@@ -958,14 +966,13 @@
\expandafter\XINT_xtrunc_prepare_g\expandafter
\XINT_div_prepare_g
\the\numexpr #1#2#3#4#5#6#7#8+\xint_c_i\expandafter
- .\the\numexpr (#1#2#3#4#5#6#7#8+\xint_c_i)/\xint_c_ii\expandafter
- .\the\numexpr #1#2#3#4#5#6#7#8\expandafter
- .\romannumeral0\XINT_sepandrev_andcount
+ \xint:\the\numexpr (#1#2#3#4#5#6#7#8+\xint_c_i)/\xint_c_ii\expandafter
+ \xint:\the\numexpr #1#2#3#4#5#6#7#8\expandafter
+ \xint:\romannumeral0\XINT_sepandrev_andcount
#1#2#3#4#5#6#7#8#9\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678%
- \relax\xint_c_ii\xint_c_iii
- \R.\xint_c_vi\R.\xint_c_v\R.\xint_c_iv\R.\xint_c_iii
- \R.\xint_c_ii\R.\xint_c_i\R.\xint_c_\W
+ \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
+ \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
+ \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
\X
}%
\def\XINT_xtrunc_prepare_g #1;{\XINT_xtrunc_e {#1}}%
@@ -975,15 +982,15 @@
\expandafter\XINT_xtrunc_I
\else
\expandafter\XINT_xtrunc_II
- \fi #2.{#1}%
+ \fi #2\xint:{#1}%
}%
-\def\XINT_xtrunc_I -#1.#2#3#4%
+\def\XINT_xtrunc_I -#1\xint:#2#3#4%
{%
\expandafter\XINT_xtrunc_I_a\romannumeral0#2{#4}{#2}{#1}{#3}%
}%
\def\XINT_xtrunc_I_a #1#2#3#4#5%
{%
- \expandafter\XINT_xtrunc_I_b\the\numexpr #4-#5.#4.{#5}{#2}{#3}{#1}%
+ \expandafter\XINT_xtrunc_I_b\the\numexpr #4-#5\xint:#4\xint:{#5}{#2}{#3}{#1}%
}%
\def\XINT_xtrunc_I_b #1%
{%
@@ -992,12 +999,12 @@
-\XINT_xtrunc_IB_c
\krof #1%
}%
-\def\XINT_xtrunc_IA_c -#1.#2.#3#4#5#6%
+\def\XINT_xtrunc_IA_c -#1\xint:#2\xint:#3#4#5#6%
{%
\expandafter\XINT_xtrunc_IA_d
- \the\numexpr#2-\xintLength{#6}.{#6}%
+ \the\numexpr#2-\xintLength{#6}\xint:{#6}%
\expandafter\XINT_xtrunc_IA_xd
- \the\numexpr (#1+\xint_c_ii^v)/\xint_c_ii^vi-\xint_c_i.#1.{#5}{#4}%
+ \the\numexpr (#1+\xint_c_ii^v)/\xint_c_ii^vi-\xint_c_i\xint:#1\xint:{#5}{#4}%
}%
\def\XINT_xtrunc_IA_d #1%
{%
@@ -1006,56 +1013,56 @@
-\XINT_xtrunc_IAB_e
\krof #1%
}%
-\def\XINT_xtrunc_IAA_e -#1.#2%
+\def\XINT_xtrunc_IAA_e -#1\xint:#2%
{%
\romannumeral0\XINT_split_fromleft
#1.#2\xint_gobble_i\xint_bye2345678\xint_bye..%
}%
-\def\XINT_xtrunc_IAB_e #1.#2%
+\def\XINT_xtrunc_IAB_e #1\xint:#2%
{%
0.\romannumeral\XINT_rep#1\endcsname0#2%
}%
-\def\XINT_xtrunc_IA_xd #1.#2.%
+\def\XINT_xtrunc_IA_xd #1\xint:#2\xint:%
{%
- \expandafter\XINT_xtrunc_IA_xe\the\numexpr #2-\xint_c_ii^vi*#1.#1.%
+ \expandafter\XINT_xtrunc_IA_xe\the\numexpr #2-\xint_c_ii^vi*#1\xint:#1\xint:%
}%
-\def\XINT_xtrunc_IA_xe #1.#2.#3#4%
+\def\XINT_xtrunc_IA_xe #1\xint:#2\xint:#3#4%
{%
\XINT_xtrunc_loop {#2}{#4}{#3}{#1}%
}%
-\def\XINT_xtrunc_IB_c #1.#2.#3#4#5#6%
+\def\XINT_xtrunc_IB_c #1\xint:#2\xint:#3#4#5#6%
{%
\expandafter\XINT_xtrunc_IB_d
\romannumeral0\XINT_split_xfork #1.#6\xint_bye2345678\xint_bye..{#3}%
}%
\def\XINT_xtrunc_IB_d #1.#2.#3%
{%
- \expandafter\XINT_xtrunc_IA_d\the\numexpr#3-\xintLength {#1}.{#1}%
+ \expandafter\XINT_xtrunc_IA_d\the\numexpr#3-\xintLength {#1}\xint:{#1}%
}%
-\def\XINT_xtrunc_II #1.%
+\def\XINT_xtrunc_II #1\xint:%
{%
- \expandafter\XINT_xtrunc_II_a\romannumeral\xintreplicate{#1}0.%
+ \expandafter\XINT_xtrunc_II_a\romannumeral\xintreplicate{#1}0\xint:%
}%
-\def\XINT_xtrunc_II_a #1.#2#3#4%
+\def\XINT_xtrunc_II_a #1\xint:#2#3#4%
{%
\expandafter\XINT_xtrunc_II_b
- \the\numexpr (#3+\xint_c_ii^v)/\xint_c_ii^vi-\xint_c_i\expandafter.%
- \the\numexpr #3\expandafter.\romannumeral0#2{#4#1}{#2}%
+ \the\numexpr (#3+\xint_c_ii^v)/\xint_c_ii^vi-\xint_c_i\expandafter\xint:%
+ \the\numexpr #3\expandafter\xint:\romannumeral0#2{#4#1}{#2}%
}%
-\def\XINT_xtrunc_II_b #1.#2.%
+\def\XINT_xtrunc_II_b #1\xint:#2\xint:%
{%
- \expandafter\XINT_xtrunc_II_c\the\numexpr #2-\xint_c_ii^vi*#1.#1.%
+ \expandafter\XINT_xtrunc_II_c\the\numexpr #2-\xint_c_ii^vi*#1\xint:#1\xint:%
}%
-\def\XINT_xtrunc_II_c #1.#2.#3#4#5%
+\def\XINT_xtrunc_II_c #1\xint:#2\xint:#3#4#5%
{%
#3.\XINT_xtrunc_loop {#2}{#4}{#5}{#1}%
}%
\def\XINT_xtrunc_loop #1%
{%
\ifnum #1=\xint_c_ \expandafter\XINT_xtrunc_transition\fi
- \expandafter\XINT_xtrunc_loop_a\the\numexpr #1-\xint_c_i.%
+ \expandafter\XINT_xtrunc_loop_a\the\numexpr #1-\xint_c_i\xint:%
}%
-\def\XINT_xtrunc_loop_a #1.#2#3%
+\def\XINT_xtrunc_loop_a #1\xint:#2#3%
{%
\expandafter\XINT_xtrunc_loop_b\romannumeral0#3%
{#20000000000000000000000000000000000000000000000000000000000000000}%
@@ -1067,7 +1074,7 @@
\XINT_xtrunc_loop {#3}{#2}%
}%
\def\XINT_xtrunc_transition
- \expandafter\XINT_xtrunc_loop_a\the\numexpr #1.#2#3#4%
+ \expandafter\XINT_xtrunc_loop_a\the\numexpr #1\xint:#2#3#4%
{%
\ifnum #4=\xint_c_ \expandafter\xint_gobble_vi\fi
\expandafter\XINT_xtrunc_finish\expandafter
@@ -1087,11 +1094,11 @@
\expandafter\XINT_xtrunc_sp_I
\else
\expandafter\XINT_xtrunc_sp_II
- \fi #1.%
+ \fi #1\xint:%
}%
-\def\XINT_xtrunc_sp_I -#1.#2#3%
+\def\XINT_xtrunc_sp_I -#1\xint:#2#3%
{%
- \expandafter\XINT_xtrunc_sp_I_a\the\numexpr #1-#3.#1.{#3}{#2}%
+ \expandafter\XINT_xtrunc_sp_I_a\the\numexpr #1-#3\xint:#1\xint:{#3}{#2}%
}%
\def\XINT_xtrunc_sp_I_a #1%
{%
@@ -1100,10 +1107,10 @@
-\XINT_xtrunc_sp_IB_b
\krof #1%
}%
-\def\XINT_xtrunc_sp_IA_b -#1.#2.#3#4%
+\def\XINT_xtrunc_sp_IA_b -#1\xint:#2\xint:#3#4%
{%
\expandafter\XINT_xtrunc_sp_IA_c
- \the\numexpr#2-\xintLength{#4}.{#4}\romannumeral\XINT_rep#1\endcsname0%
+ \the\numexpr#2-\xintLength{#4}\xint:{#4}\romannumeral\XINT_rep#1\endcsname0%
}%
\def\XINT_xtrunc_sp_IA_c #1%
{%
@@ -1112,25 +1119,25 @@
-\XINT_xtrunc_sp_IAB
\krof #1%
}%
-\def\XINT_xtrunc_sp_IAA -#1.#2%
+\def\XINT_xtrunc_sp_IAA -#1\xint:#2%
{%
\romannumeral0\XINT_split_fromleft
#1.#2\xint_gobble_i\xint_bye2345678\xint_bye..%
}%
-\def\XINT_xtrunc_sp_IAB #1.#2%
+\def\XINT_xtrunc_sp_IAB #1\xint:#2%
{%
0.\romannumeral\XINT_rep#1\endcsname0#2%
}%
-\def\XINT_xtrunc_sp_IB_b #1.#2.#3#4%
+\def\XINT_xtrunc_sp_IB_b #1\xint:#2\xint:#3#4%
{%
\expandafter\XINT_xtrunc_sp_IB_c
\romannumeral0\XINT_split_xfork #1.#4\xint_bye2345678\xint_bye..{#3}%
}%
\def\XINT_xtrunc_sp_IB_c #1.#2.#3%
{%
- \expandafter\XINT_xtrunc_sp_IA_c\the\numexpr#3-\xintLength {#1}.{#1}%
+ \expandafter\XINT_xtrunc_sp_IA_c\the\numexpr#3-\xintLength {#1}\xint:{#1}%
}%
-\def\XINT_xtrunc_sp_II #1.#2#3%
+\def\XINT_xtrunc_sp_II #1\xint:#2#3%
{%
#2\romannumeral\XINT_rep#1\endcsname0.\romannumeral\XINT_rep#3\endcsname0%
}%
@@ -1190,7 +1197,7 @@
}%
\def\XINT_fadd_E #1#2%
{%
- \if0\XINT_Sgn #2\Z
+ \if0\XINT_Sgn #2\xint:
\expandafter\XINT_fadd_F
\else\expandafter\XINT_fadd_K
\fi {#1}%
@@ -1206,7 +1213,7 @@
}%
\def\XINT_fadd_Ea #1#2%
{%
- \if0\XINT_Sgn #2\Z
+ \if0\XINT_Sgn #2\xint:
\expandafter\XINT_fadd_Fa
\else\expandafter\XINT_fadd_K
\fi {#1}%
@@ -1216,18 +1223,20 @@
\expandafter\XINT_fadd_G
\romannumeral0\xintiiadd {\xintiiMul {#4}{#1}}{#5}/#3%[#6]%
}%
-\def\XINT_fadd_G #1{\if0#1\XINT_fadd_iszero\fi\space #1}%
+\def\XINT_fadd_G #1{%
+\def\XINT_fadd_G ##1{\if0##1\expandafter\XINT_fadd_iszero\fi#1##1}%
+}\XINT_fadd_G{ }%
\def\XINT_fadd_K #1#2#3#4#5%
{%
\expandafter\XINT_fadd_L
\romannumeral0\xintiiadd {\xintiiMul {#2}{#5}}{\xintiiMul {#3}{#4}}.%
{{#2}{#3}}%
}%
-\def\XINT_fadd_L #1{\if0#1\XINT_fadd_iszero\fi \XINT_fadd_M #1}%
+\def\XINT_fadd_L #1{\if0#1\expandafter\XINT_fadd_iszero\fi\XINT_fadd_M #1}%
\def\XINT_fadd_M #1.#2{\expandafter\XINT_fadd_N \expandafter
{\romannumeral0\xintiimul #2}{#1}}%
\def\XINT_fadd_N #1#2{ #2/#1}%
-\edef\XINT_fadd_iszero\fi #1[#2]{\noexpand\fi\space 0/1[0]}% ou [#2] originel?
+\def\XINT_fadd_iszero #1[#2]{ 0/1[0]}% ou [#2] originel?
\def\xintSub {\romannumeral0\xintsub }%
\def\xintsub #1{\expandafter\XINT_fsub\romannumeral0\xintraw {#1}}%
\def\XINT_fsub #1{\xint_gob_til_zero #1\XINT_fsub_Azero 0\XINT_fsub_a #1}%
@@ -1240,24 +1249,21 @@
0-{\XINT_fadd_c -#1}%
\krof }%
\def\xintSum {\romannumeral0\xintsum }%
-\def\xintsum #1{\xintsumexpr #1\relax }%
-\def\xintSumExpr {\romannumeral0\xintsumexpr }%
-\def\xintsumexpr {\expandafter\XINT_fsumexpr\romannumeral`&&@}%
+\def\xintsum #1{\expandafter\XINT_fsumexpr\romannumeral`&&@#1\xint:}%
\def\XINT_fsumexpr {\XINT_fsum_loop_a {0/1[0]}}%
\def\XINT_fsum_loop_a #1#2%
{%
- \expandafter\XINT_fsum_loop_b \romannumeral`&&@#2\Z {#1}%
+ \expandafter\XINT_fsum_loop_b \romannumeral`&&@#2\xint:{#1}%
}%
\def\XINT_fsum_loop_b #1%
{%
- \xint_gob_til_relax #1\XINT_fsum_finished\relax
- \XINT_fsum_loop_c #1%
+ \xint_gob_til_xint: #1\XINT_fsum_finished\xint:\XINT_fsum_loop_c #1%
}%
-\def\XINT_fsum_loop_c #1\Z #2%
+\def\XINT_fsum_loop_c #1\xint:#2%
{%
\expandafter\XINT_fsum_loop_a\expandafter{\romannumeral0\xintadd {#2}{#1}}%
}%
-\def\XINT_fsum_finished #1\Z #2{ #2}%
+\def\XINT_fsum_finished #1\xint:\xint:#2{ #2}%
\def\xintMul {\romannumeral0\xintmul }%
\def\xintmul #1{\expandafter\XINT_fmul\romannumeral0\xintraw {#1}.}%
\def\XINT_fmul #1{\xint_gob_til_zero #1\XINT_fmul_zero 0\XINT_fmul_a #1}%
@@ -1291,7 +1297,8 @@
\def\XINT_fsqr_zero #1]{ 0/1[0]}%
\def\xintipow #1#2%
{%
- \expandafter\xint_pow\the\numexpr \xintNum{#2}\expandafter.\romannumeral0\xintnum{#1}\Z%
+ \expandafter\xint_pow\the\numexpr \xintNum{#2}\expandafter
+ .\romannumeral0\xintnum{#1}\xint:
}%
\def\xintPow {\romannumeral0\xintpow }%
\def\xintpow #1%
@@ -1343,24 +1350,21 @@
\the\numexpr\xintNum{#1}\expandafter.\the\numexpr\xintNum{#2}.%
}%
\def\xintPrd {\romannumeral0\xintprd }%
-\def\xintprd #1{\xintprdexpr #1\relax }%
-\def\xintPrdExpr {\romannumeral0\xintprdexpr }%
-\def\xintprdexpr {\expandafter\XINT_fprdexpr \romannumeral`&&@}%
+\def\xintprd #1{\expandafter\XINT_fprdexpr \romannumeral`&&@#1\xint:}%
\def\XINT_fprdexpr {\XINT_fprod_loop_a {1/1[0]}}%
\def\XINT_fprod_loop_a #1#2%
{%
- \expandafter\XINT_fprod_loop_b \romannumeral`&&@#2\Z {#1}%
+ \expandafter\XINT_fprod_loop_b \romannumeral`&&@#2\xint:{#1}%
}%
\def\XINT_fprod_loop_b #1%
{%
- \xint_gob_til_relax #1\XINT_fprod_finished\relax
- \XINT_fprod_loop_c #1%
+ \xint_gob_til_xint: #1\XINT_fprod_finished\xint:\XINT_fprod_loop_c #1%
}%
-\def\XINT_fprod_loop_c #1\Z #2%
+\def\XINT_fprod_loop_c #1\xint:#2%
{%
\expandafter\XINT_fprod_loop_a\expandafter{\romannumeral0\xintmul {#1}{#2}}%
}%
-\def\XINT_fprod_finished #1\Z #2{ #2}%
+\def\XINT_fprod_finished#1\xint:\xint:#2{ #2}%
\def\xintDiv {\romannumeral0\xintdiv }%
\def\xintdiv #1%
{%
@@ -1393,7 +1397,7 @@
{\expandafter\XINT_mod_b\expandafter #1\romannumeral0\xintraw{#3}#2.}%
\def\XINT_mod_b #1#2% #1 de A, #2 de B.
{%
- \if0#2\xint_dothis\XINT_mod_divbyzero\fi
+ \if0#2\xint_dothis{\XINT_mod_divbyzero #1#2}\fi
\if0#1\xint_dothis\XINT_mod_aiszero\fi
\if-#2\xint_dothis{\XINT_mod_bneg #1}\fi
\xint_orthat{\XINT_mod_bpos #1#2}%
@@ -1412,7 +1416,10 @@
-{\XINT_mod_pos #1}%
\krof
}%
-\def\XINT_mod_divbyzero #1.{\xintError:DivisionByZero\space 0/1[0]}%
+\def\XINT_mod_divbyzero #1#2[#3]#4.%
+{%
+ \XINT_signalcondition{DivisionByZero}{Division by #2[#3] of #1#4}{}{0/1[0]}%
+}%
\def\XINT_mod_aiszero #1.{ 0/1[0]}%
\def\XINT_mod_pos #1#2/#3[#4]#5/#6[#7].%
{%
@@ -1427,7 +1434,7 @@
\def\xintisone #1{\expandafter\XINT_fracisone
\romannumeral0\xintrawwithzeros{#1}\Z }%
\def\XINT_fracisone #1/#2\Z
- {\if0\XINT_Cmp {#1}{#2}\xint_afterfi{ 1}\else\xint_afterfi{ 0}\fi}%
+ {\if0\xintiiCmp {#1}{#2}\xint_afterfi{ 1}\else\xint_afterfi{ 0}\fi}%
\def\xintGeq {\romannumeral0\xintgeq }%
\def\xintgeq #1%
{%
@@ -1460,7 +1467,7 @@
\def\XINT_fgeq_D #1#2#3%
{%
\expandafter\XINT_cntSgnFork\romannumeral`&&@\expandafter\XINT_cntSgn
- \the\numexpr #2+\xintLength{#3}-\xintLength{#1}\relax\Z
+ \the\numexpr #2+\xintLength{#3}-\xintLength{#1}\relax\xint:
{ 0}{\XINT_fgeq_E #2\Z {#3}{#1}}{ 1}%
}%
\def\XINT_fgeq_E #1%
@@ -1516,15 +1523,15 @@
\fi
}%
\def\xintMaxof {\romannumeral0\xintmaxof }%
-\def\xintmaxof #1{\expandafter\XINT_maxof_a\romannumeral`&&@#1\relax }%
-\def\XINT_maxof_a #1{\expandafter\XINT_maxof_b\romannumeral0\xintraw{#1}\Z }%
-\def\XINT_maxof_b #1\Z #2%
- {\expandafter\XINT_maxof_c\romannumeral`&&@#2\Z {#1}\Z}%
+\def\xintmaxof #1{\expandafter\XINT_maxof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_maxof_a #1{\expandafter\XINT_maxof_b\romannumeral0\xintraw{#1}!}%
+\def\XINT_maxof_b #1!#2%
+ {\expandafter\XINT_maxof_c\romannumeral`&&@#2!{#1}!}%
\def\XINT_maxof_c #1%
- {\xint_gob_til_relax #1\XINT_maxof_e\relax\XINT_maxof_d #1}%
-\def\XINT_maxof_d #1\Z
+ {\xint_gob_til_xint: #1\XINT_maxof_e\xint:\XINT_maxof_d #1}%
+\def\XINT_maxof_d #1!%
{\expandafter\XINT_maxof_b\romannumeral0\xintmax {#1}}%
-\def\XINT_maxof_e #1\Z #2\Z { #2}%
+\def\XINT_maxof_e #1!#2!{ #2}%
\def\xintMin {\romannumeral0\xintmin }%
\def\xintmin #1%
{%
@@ -1560,15 +1567,16 @@
\fi
}%
\def\xintMinof {\romannumeral0\xintminof }%
-\def\xintminof #1{\expandafter\XINT_minof_a\romannumeral`&&@#1\relax }%
-\def\XINT_minof_a #1{\expandafter\XINT_minof_b\romannumeral0\xintraw{#1}\Z }%
-\def\XINT_minof_b #1\Z #2%
- {\expandafter\XINT_minof_c\romannumeral`&&@#2\Z {#1}\Z}%
+\def\xintminof #1{\expandafter\XINT_minof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_minof_a #1{\expandafter\XINT_minof_b\romannumeral0\xintraw{#1}!}%
+\def\XINT_minof_b #1!#2%
+ {\expandafter\XINT_minof_c\romannumeral`&&@#2!{#1}!}%
\def\XINT_minof_c #1%
- {\xint_gob_til_relax #1\XINT_minof_e\relax\XINT_minof_d #1}%
-\def\XINT_minof_d #1\Z
+ {\xint_gob_til_xint: #1\XINT_minof_e\xint:\XINT_minof_d #1}%
+\def\XINT_minof_d #1!%
{\expandafter\XINT_minof_b\romannumeral0\xintmin {#1}}%
-\def\XINT_minof_e #1\Z #2\Z { #2}%
+\def\XINT_minof_e #1!#2!{ #2}%
+\def\xintCmp {\romannumeral0\xintcmp }%
\def\xintcmp #1%
{%
\expandafter\XINT_fcmp\expandafter {\romannumeral0\xintraw {#1}}%
@@ -1622,7 +1630,7 @@
\def\XINT_fcmp_D #1#2#3%
{%
\expandafter\XINT_cntSgnFork\romannumeral`&&@\expandafter\XINT_cntSgn
- \the\numexpr #2+\xintLength{#3}-\xintLength{#1}\relax\Z
+ \the\numexpr #2+\xintLength{#3}-\xintLength{#1}\relax\xint:
{ -1}{\XINT_fcmp_E #2\Z {#3}{#1}}{ 1}%
}%
\def\XINT_fcmp_E #1%
@@ -1648,21 +1656,21 @@
\def\xintOpp {\romannumeral0\xintopp }%
\def\xintopp #1{\expandafter\XINT_opp\romannumeral0\xintraw {#1}}%
\def\xintSgn {\romannumeral0\xintsgn }%
-\def\xintsgn #1{\expandafter\XINT_sgn\romannumeral0\xintraw {#1}\Z }%
+\def\xintsgn #1{\expandafter\XINT_sgn\romannumeral0\xintraw {#1}\xint:}%
\def\xintFloat {\romannumeral0\xintfloat }%
-\def\xintfloat #1{\XINT_float_chkopt #1\xint_relax }%
+\def\xintfloat #1{\XINT_float_chkopt #1\xint:}%
\def\XINT_float_chkopt #1%
{%
\ifx [#1\expandafter\XINT_float_opt
\else\expandafter\XINT_float_noopt
\fi #1%
}%
-\def\XINT_float_noopt #1\xint_relax
+\def\XINT_float_noopt #1\xint:%
{%
\expandafter\XINT_float_post
\romannumeral0\XINTinfloat[\XINTdigits]{#1}\XINTdigits.%
}%
-\def\XINT_float_opt [\xint_relax #1]%
+\def\XINT_float_opt [\xint:#1]%
{%
\expandafter\XINT_float_opt_a\the\numexpr #1.%
}%
@@ -1711,7 +1719,7 @@
}%
\def\XINT_infloat_a #1.#2#3#4%
{%
- \if1\XINT_is_one#4XY%
+ \if1\XINT_is_One#4XY%
\expandafter\XINT_infloat_sp
\else\expandafter\XINT_infloat_fork
\fi #3.{#1}{#2}{#4}%
@@ -1888,19 +1896,19 @@
}%
\def\XINT_infloat_ZZ #1.#2.{ 1#2[#1]}%
\def\xintPFloat {\romannumeral0\xintpfloat }%
-\def\xintpfloat #1{\XINT_pfloat_chkopt #1\xint_relax }%
+\def\xintpfloat #1{\XINT_pfloat_chkopt #1\xint:}%
\def\XINT_pfloat_chkopt #1%
{%
\ifx [#1\expandafter\XINT_pfloat_opt
\else\expandafter\XINT_pfloat_noopt
\fi #1%
}%
-\def\XINT_pfloat_noopt #1\xint_relax
+\def\XINT_pfloat_noopt #1\xint:%
{%
\expandafter\XINT_pfloat_a
\romannumeral0\xintfloat [\XINTdigits]{#1};\XINTdigits.%
}%
-\def\XINT_pfloat_opt [\xint_relax #1]%
+\def\XINT_pfloat_opt [\xint:#1]%
{%
\expandafter\XINT_pfloat_opt_a \the\numexpr #1.%
}%
@@ -1962,22 +1970,22 @@
}%
\def\XINT_infloatfracdg_a {\XINTinfloat [\XINTdigits]}%
\def\xintFloatAdd {\romannumeral0\xintfloatadd }%
-\def\xintfloatadd #1{\XINT_fladd_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatadd #1{\XINT_fladd_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatAdd {\romannumeral0\XINTinfloatadd }%
-\def\XINTinfloatadd #1{\XINT_fladd_chkopt \XINTinfloatS #1\xint_relax }%
+\def\XINTinfloatadd #1{\XINT_fladd_chkopt \XINTinfloatS #1\xint:}%
\def\XINT_fladd_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_fladd_opt
\else\expandafter\XINT_fladd_noopt
\fi #1#2%
}%
-\def\XINT_fladd_noopt #1#2\xint_relax #3%
+\def\XINT_fladd_noopt #1#2\xint:#3%
{%
#1[\XINTdigits]%
{\expandafter\XINT_FL_add_a
\romannumeral0\XINTinfloat[\XINTdigits]{#2}\XINTdigits.{#3}}%
}%
-\def\XINT_fladd_opt #1[\xint_relax #2]%#3#4%
+\def\XINT_fladd_opt #1[\xint:#2]%#3#4%
{%
\expandafter\XINT_fladd_opt_a\the\numexpr #2.#1%
}%
@@ -2005,22 +2013,22 @@
\xint_orthat\xintAdd {#1[#2]}{#4[#5]}%
}%
\def\xintFloatSub {\romannumeral0\xintfloatsub }%
-\def\xintfloatsub #1{\XINT_flsub_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatsub #1{\XINT_flsub_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatSub {\romannumeral0\XINTinfloatsub }%
-\def\XINTinfloatsub #1{\XINT_flsub_chkopt \XINTinfloatS #1\xint_relax }%
+\def\XINTinfloatsub #1{\XINT_flsub_chkopt \XINTinfloatS #1\xint:}%
\def\XINT_flsub_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_flsub_opt
\else\expandafter\XINT_flsub_noopt
\fi #1#2%
}%
-\def\XINT_flsub_noopt #1#2\xint_relax #3%
+\def\XINT_flsub_noopt #1#2\xint:#3%
{%
#1[\XINTdigits]%
{\expandafter\XINT_FL_add_a
\romannumeral0\XINTinfloat[\XINTdigits]{#2}\XINTdigits.{\xintOpp{#3}}}%
}%
-\def\XINT_flsub_opt #1[\xint_relax #2]%#3#4%
+\def\XINT_flsub_opt #1[\xint:#2]%#3#4%
{%
\expandafter\XINT_flsub_opt_a\the\numexpr #2.#1%
}%
@@ -2029,22 +2037,22 @@
#2[#1]{\expandafter\XINT_FL_add_a\romannumeral0\XINTinfloat[#1]{#3}#1.{\xintOpp{#4}}}%
}%
\def\xintFloatMul {\romannumeral0\xintfloatmul }%
-\def\xintfloatmul #1{\XINT_flmul_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatmul #1{\XINT_flmul_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatMul {\romannumeral0\XINTinfloatmul }%
-\def\XINTinfloatmul #1{\XINT_flmul_chkopt \XINTinfloatS #1\xint_relax }%
+\def\XINTinfloatmul #1{\XINT_flmul_chkopt \XINTinfloatS #1\xint:}%
\def\XINT_flmul_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_flmul_opt
\else\expandafter\XINT_flmul_noopt
\fi #1#2%
}%
-\def\XINT_flmul_noopt #1#2\xint_relax #3%
+\def\XINT_flmul_noopt #1#2\xint:#3%
{%
#1[\XINTdigits]%
{\expandafter\XINT_FL_mul_a
\romannumeral0\XINTinfloatS[\XINTdigits]{#2}\XINTdigits.{#3}}%
}%
-\def\XINT_flmul_opt #1[\xint_relax #2]%#3#4%
+\def\XINT_flmul_opt #1[\xint:#2]%#3#4%
{%
\expandafter\XINT_flmul_opt_a\the\numexpr #2.#1%
}%
@@ -2058,22 +2066,22 @@
}%
\def\XINT_FL_mul_b #1[#2]#3[#4]{\xintiiMul{#3}{#1}/1[#4+#2]}%
\def\xintFloatDiv {\romannumeral0\xintfloatdiv }%
-\def\xintfloatdiv #1{\XINT_fldiv_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatdiv #1{\XINT_fldiv_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatDiv {\romannumeral0\XINTinfloatdiv }%
-\def\XINTinfloatdiv #1{\XINT_fldiv_chkopt \XINTinfloatS #1\xint_relax }%
+\def\XINTinfloatdiv #1{\XINT_fldiv_chkopt \XINTinfloatS #1\xint:}%
\def\XINT_fldiv_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_fldiv_opt
\else\expandafter\XINT_fldiv_noopt
\fi #1#2%
}%
-\def\XINT_fldiv_noopt #1#2\xint_relax #3%
+\def\XINT_fldiv_noopt #1#2\xint:#3%
{%
#1[\XINTdigits]%
{\expandafter\XINT_FL_div_a
\romannumeral0\XINTinfloatS[\XINTdigits]{#3}\XINTdigits.{#2}}%
}%
-\def\XINT_fldiv_opt #1[\xint_relax #2]%#3#4%
+\def\XINT_fldiv_opt #1[\xint:#2]%#3#4%
{%
\expandafter\XINT_fldiv_opt_a\the\numexpr #2.#1%
}%
@@ -2087,9 +2095,9 @@
}%
\def\XINT_FL_div_b #1[#2]{#1e#2}%
\def\xintFloatPow {\romannumeral0\xintfloatpow}%
-\def\xintfloatpow #1{\XINT_flpow_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatpow #1{\XINT_flpow_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatPow {\romannumeral0\XINTinfloatpow }%
-\def\XINTinfloatpow #1{\XINT_flpow_chkopt \XINTinfloatS #1\xint_relax }%
+\def\XINTinfloatpow #1{\XINT_flpow_chkopt \XINTinfloatS #1\xint:}%
\def\XINT_flpow_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_flpow_opt
@@ -2097,12 +2105,12 @@
\fi
#1#2%
}%
-\def\XINT_flpow_noopt #1#2\xint_relax #3%
+\def\XINT_flpow_noopt #1#2\xint:#3%
{%
\expandafter\XINT_flpow_checkB_a
\the\numexpr #3.\XINTdigits.{#2}{#1[\XINTdigits]}%
}%
-\def\XINT_flpow_opt #1[\xint_relax #2]%
+\def\XINT_flpow_opt #1[\xint:#2]%
{%
\expandafter\XINT_flpow_opt_a\the\numexpr #2.#1%
}%
@@ -2149,8 +2157,10 @@
}%
\def\XINT_flpow_zero #1[#2]#3#4#5#6%
{%
- \if 1#51\xint_afterfi {#6{0[0]}}\else
- \xint_afterfi {\xintError:DivisionByZero #6{1[2147483648]}}\fi
+ #6{\if 1#51\xint_dothis {0[0]}\fi
+ \xint_orthat
+ {\XINT_signalcondition{DivisionByZero}{0 to the power #4}{}{0[0]}}%
+ }%
}%
\def\XINT_flpow_b #1#2[#3]#4#5%
{%
@@ -2240,9 +2250,9 @@
\def\XINT_flpow_IIIend #1#2#3%
{#3{\if#21\xint_afterfi{\expandafter-\romannumeral`&&@}\fi#1}}%
\def\xintFloatPower {\romannumeral0\xintfloatpower}%
-\def\xintfloatpower #1{\XINT_flpower_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatpower #1{\XINT_flpower_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatPower {\romannumeral0\XINTinfloatpower }%
-\def\XINTinfloatpower #1{\XINT_flpower_chkopt \XINTinfloatS #1\xint_relax }%
+\def\XINTinfloatpower #1{\XINT_flpower_chkopt \XINTinfloatS #1\xint:}%
\def\XINTinFloatPowerH {\romannumeral0\XINTinfloatpowerh }%
\def\XINTinfloatpowerh #1#2%
{%
@@ -2287,12 +2297,12 @@
\fi
#1#2%
}%
-\def\XINT_flpower_noopt #1#2\xint_relax #3%
+\def\XINT_flpower_noopt #1#2\xint:#3%
{%
\expandafter\XINT_flpower_checkB_a
\romannumeral0\xintnum{#3}.\XINTdigits.{#2}{#1[\XINTdigits]}%
}%
-\def\XINT_flpower_opt #1[\xint_relax #2]%
+\def\XINT_flpower_opt #1[\xint:#2]%
{%
\expandafter\XINT_flpower_opt_a\the\numexpr #2.#1%
}%
@@ -2407,9 +2417,9 @@
\the\numexpr#2+#5\expandafter.\romannumeral0\xintiimul{#3}{#6}.#4.%
}%
\def\xintFloatFac {\romannumeral0\xintfloatfac}%
-\def\xintfloatfac #1{\XINT_flfac_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatfac #1{\XINT_flfac_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatFac {\romannumeral0\XINTinfloatfac }%
-\def\XINTinfloatfac #1{\XINT_flfac_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatfac #1{\XINT_flfac_chkopt \XINTinfloat #1\xint:}%
\def\XINT_flfac_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_flfac_opt
@@ -2417,12 +2427,12 @@
\fi
#1#2%
}%
-\def\XINT_flfac_noopt #1#2\xint_relax
+\def\XINT_flfac_noopt #1#2\xint:
{%
\expandafter\XINT_FL_fac_fork_a
\the\numexpr \xintNum{#2}.\xint_c_i \XINTdigits\XINT_FL_fac_out{#1[\XINTdigits]}%
}%
-\def\XINT_flfac_opt #1[\xint_relax #2]%
+\def\XINT_flfac_opt #1[\xint:#2]%
{%
\expandafter\XINT_flfac_opt_a\the\numexpr #2.#1%
}%
@@ -2439,7 +2449,11 @@
\krof
}%
\def\XINT_FL_fac_iszero #1.#2#3#4#5{#5{1[0]}}%
-\def\XINT_FL_fac_isneg #1.#2#3#4#5{\expandafter\xintError:FactorialOfNegative #5{0[0]}}%
+\def\XINT_FL_fac_isneg #1.#2#3#4#5%
+{%
+ #5{\XINT_signalcondition{InvalidOperation}
+ {Factorial of negative: (-#1)!}{}{0[0]}}%
+}%
\def\XINT_FL_fac_fork_b #1.%
{%
\ifnum #1>\xint_c_x^viii_mone\xint_dothis\XINT_FL_fac_toobig\fi
@@ -2449,7 +2463,11 @@
\xint_orthat\XINT_FL_fac_small
#1.%
}%
-\def\XINT_FL_fac_toobig #1.#2#3#4#5{\expandafter\xintError:TooBigFactorial #5{1[0]}}%
+\def\XINT_FL_fac_toobig #1.#2#3#4#5%
+{%
+ #5{\XINT_signalcondition{InvalidOperation}
+ {Factorial of too big: (#1)!}{}{0[0]}}%
+}%
\def\XINT_FL_fac_vbig
{\expandafter\XINT_FL_fac_vbigloop_a
\the\numexpr \XINT_FL_fac_increaseP \xint_c_i }%
@@ -2470,8 +2488,10 @@
}%
\def\XINT_FL_fac_countdigits #1#2#3#4#5#6#7#8{\XINT_FL_fac_countdone }%
\def\XINT_FL_fac_countdone #1#2\Z {#1}%
-\def\XINT_FL_fac_out #1\Z![#2]#3{#3{\romannumeral0\XINT_mul_out
- #1\Z!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W [#2]}}%
+\def\XINT_FL_fac_out #1;![#2]#3%
+ {#3{\romannumeral0\XINT_mul_out
+ #1;!1\R!1\R!1\R!1\R!%
+ 1\R!1\R!1\R!1\R!\W [#2]}}%
\def\XINT_FL_fac_vbigloop_a #1.#2.%
{%
\XINT_FL_fac_bigloop_a \xint_c_x^iv.#2.%
@@ -2555,9 +2575,10 @@
\def\XINT_FL_fac_addzeros #1.%
{%
\ifnum #1=\xint_c_viii \expandafter\XINT_FL_fac_addzeros_exit\fi
- \expandafter\XINT_FL_fac_addzeros\the\numexpr #1-\xint_c_viii.100000000!%
+ \expandafter\XINT_FL_fac_addzeros
+ \the\numexpr #1-\xint_c_viii.100000000!%
}%
-\def\XINT_FL_fac_addzeros_exit #1.#2.#3#4{\XINT_FL_fac_smallloop_loop #3#21\Z![-#4]}%
+\def\XINT_FL_fac_addzeros_exit #1.#2.#3#4{\XINT_FL_fac_smallloop_loop #3#21;![-#4]}%
\def\XINT_FL_fac_smallloop_loop #1.#2.%
{%
\ifnum #1>#2 \expandafter\XINT_FL_fac_loop_exit\fi
@@ -2577,7 +2598,7 @@
\def\XINT_FL_fac_mul_a #1-#2%
{%
\if#21\xint_afterfi{\expandafter\space\xint_gob_til_exclam}\else
- \expandafter\space\fi #11\Z!%
+ \expandafter\space\fi #11;!%
}%
\def\XINT_FL_fac_minimulwc_a #1#2#3#4#5!#6#7#8#9%
{%
@@ -2586,18 +2607,18 @@
\def\XINT_FL_fac_minimulwc_b #1#2#3#4!#5%
{%
\expandafter\XINT_FL_fac_minimulwc_c
- \the\numexpr \xint_c_x^ix+#5+#2*#4.{{#1}{#2}{#3}{#4}}%
+ \the\numexpr \xint_c_x^ix+#5+#2*#4!{{#1}{#2}{#3}{#4}}%
}%
-\def\XINT_FL_fac_minimulwc_c 1#1#2#3#4#5#6.#7%
+\def\XINT_FL_fac_minimulwc_c 1#1#2#3#4#5#6!#7%
{%
\expandafter\XINT_FL_fac_minimulwc_d {#1#2#3#4#5}#7{#6}%
}%
\def\XINT_FL_fac_minimulwc_d #1#2#3#4#5%
{%
\expandafter\XINT_FL_fac_minimulwc_e
- \the\numexpr \xint_c_x^ix+#1+#2*#5+#3*#4.{#2}{#4}%
+ \the\numexpr \xint_c_x^ix+#1+#2*#5+#3*#4!{#2}{#4}%
}%
-\def\XINT_FL_fac_minimulwc_e 1#1#2#3#4#5#6.#7#8#9%
+\def\XINT_FL_fac_minimulwc_e 1#1#2#3#4#5#6!#7#8#9%
{%
1#6#9\expandafter!%
\the\numexpr\expandafter\XINT_FL_fac_smallmul
@@ -2605,10 +2626,10 @@
}%
\def\XINT_FL_fac_smallmul 1#1!#21#3!%
{%
- \xint_gob_til_Z #3\XINT_FL_fac_smallmul_end\Z
+ \xint_gob_til_sc #3\XINT_FL_fac_smallmul_end;%
\XINT_FL_fac_minimulwc_a #2!#3!{#1}{#2}%
}%
-\def\XINT_FL_fac_smallmul_end\Z\XINT_FL_fac_minimulwc_a #1!\Z!#2#3[#4]%
+\def\XINT_FL_fac_smallmul_end;\XINT_FL_fac_minimulwc_a #1!;!#2#3[#4]%
{%
\ifnum #2=\xint_c_
\expandafter\xint_firstoftwo\else
@@ -2619,9 +2640,9 @@
[\the\numexpr #4+\xint_c_viii]}%
}%
\def\xintFloatPFactorial {\romannumeral0\xintfloatpfactorial}%
-\def\xintfloatpfactorial #1{\XINT_flpfac_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatpfactorial #1{\XINT_flpfac_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatPFactorial {\romannumeral0\XINTinfloatpfactorial }%
-\def\XINTinfloatpfactorial #1{\XINT_flpfac_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatpfactorial #1{\XINT_flpfac_chkopt \XINTinfloat #1\xint:}%
\def\XINT_flpfac_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_flpfac_opt
@@ -2629,13 +2650,13 @@
\fi
#1#2%
}%
-\def\XINT_flpfac_noopt #1#2\xint_relax #3%
+\def\XINT_flpfac_noopt #1#2\xint:#3%
{%
\expandafter\XINT_FL_pfac_fork
\the\numexpr \xintNum{#2}\expandafter.%
\the\numexpr \xintNum{#3}.\xint_c_i{\XINTdigits}{#1[\XINTdigits]}%
}%
-\def\XINT_flpfac_opt #1[\xint_relax #2]%
+\def\XINT_flpfac_opt #1[\xint:#2]%
{%
\expandafter\XINT_flpfac_opt_b\the\numexpr #2.#1%
}%
@@ -2653,7 +2674,11 @@
\ifnum #3#4>\xint_c_x^viii_mone\xint_dothis\XINT_FL_pfac_outofrange\fi
\xint_orthat \XINT_FL_pfac_increaseP #1#2.#3#4.%
}%
-\def\XINT_FL_pfac_outofrange #1.#2.#3#4#5{\xintError:OutOfRangePFac #5{0[0]}}%
+\def\XINT_FL_pfac_outofrange #1.#2.#3#4#5%
+{%
+ #5{\XINT_signalcondition{InvalidOperation}
+ {pfactorial second arg too big: 99999999 < #2}{}{0[0]}}%
+}%
\def\XINT_FL_pfac_one #1.#2.#3#4#5{#5{1[0]}}%
\def\XINT_FL_pfac_zero #1.#2.#3#4#5{#5{0[0]}}%
\def\XINT_FL_pfac_neg -#1.-#2.%
@@ -2676,7 +2701,7 @@
{%
\expandafter\XINT_FL_pfac_b\the\numexpr \xint_c_i+#2\expandafter.%
\the\numexpr#3\expandafter.%
- \romannumeral0\XINT_FL_pfac_addzeroes #1.100000001!1\Z![-#1]%
+ \romannumeral0\XINT_FL_pfac_addzeroes #1.100000001!1;![-#1]%
}%
\def\XINT_FL_pfac_addzeroes #1.%
{%
@@ -2797,21 +2822,21 @@
\the\numexpr \xint_c_x^viii+#1!%
}%
\def\xintFloatBinomial {\romannumeral0\xintfloatbinomial}%
-\def\xintfloatbinomial #1{\XINT_flbinom_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatbinomial #1{\XINT_flbinom_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatBinomial {\romannumeral0\XINTinfloatbinomial }%
-\def\XINTinfloatbinomial #1{\XINT_flbinom_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatbinomial #1{\XINT_flbinom_chkopt \XINTinfloat #1\xint:}%
\def\XINT_flbinom_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_flbinom_opt
\else\expandafter\XINT_flbinom_noopt
\fi #1#2%
}%
-\def\XINT_flbinom_noopt #1#2\xint_relax #3%
+\def\XINT_flbinom_noopt #1#2\xint:#3%
{%
\expandafter\XINT_FL_binom_a
\the\numexpr\xintNum{#2}\expandafter.\the\numexpr\xintNum{#3}.\XINTdigits.#1%
}%
-\def\XINT_flbinom_opt #1[\xint_relax #2]#3#4%
+\def\XINT_flbinom_opt #1[\xint:#2]#3#4%
{%
\expandafter\XINT_FL_binom_a
\the\numexpr\xintNum{#3}\expandafter.\the\numexpr\xintNum{#4}\expandafter.%
@@ -2823,18 +2848,26 @@
}%
\def\XINT_FL_binom_fork #1#2.#3#4.#5#6.%
{%
- \if-#5\xint_dothis \XINT_FL_binom_outofrange\fi
+ \if-#5\xint_dothis \XINT_FL_binom_neg\fi
\if-#1\xint_dothis \XINT_FL_binom_zero\fi
\if-#3\xint_dothis \XINT_FL_binom_zero\fi
\if0#1\xint_dothis \XINT_FL_binom_one\fi
\if0#3\xint_dothis \XINT_FL_binom_one\fi
- \ifnum #5#6>\xint_c_x^viii_mone \xint_dothis\XINT_FL_binom_outofrange\fi
+ \ifnum #5#6>\xint_c_x^viii_mone \xint_dothis\XINT_FL_binom_toobig\fi
\ifnum #1#2>#3#4 \xint_dothis\XINT_FL_binom_ab \fi
\xint_orthat\XINT_FL_binom_aa
#1#2.#3#4.#5#6.%
}%
-\def\XINT_FL_binom_outofrange #1.#2.#3.#4.#5%
- {\xintError:OutOfRangeBinomial #5[#4]{0[0]}}%
+\def\XINT_FL_binom_neg #1.#2.#3.#4.#5%
+{%
+ #5[#4]{\XINT_signalcondition{InvalidOperation}
+ {binomial with first arg negative: #3}{}{0[0]}}%
+}%
+\def\XINT_FL_binom_toobig #1.#2.#3.#4.#5%
+{%
+ #5[#4]{\XINT_signalcondition{InvalidOperation}
+ {binomial with first arg too big: 99999999 < #3}{}{0[0]}}%
+}%
\def\XINT_FL_binom_one #1.#2.#3.#4.#5{#5[#4]{1[0]}}%
\def\XINT_FL_binom_zero #1.#2.#3.#4.#5{#5[#4]{0[0]}}%
\def\XINT_FL_binom_aa #1.#2.#3.#4.#5%
@@ -2852,21 +2885,21 @@
#2.\xint_c_iv{#4+\xint_c_i}\XINT_FL_fac_out{\XINTinfloat[#4+\xint_c_iii]}}}%
}%
\def\xintFloatSqrt {\romannumeral0\xintfloatsqrt }%
-\def\xintfloatsqrt #1{\XINT_flsqrt_chkopt \xintfloat #1\xint_relax }%
+\def\xintfloatsqrt #1{\XINT_flsqrt_chkopt \xintfloat #1\xint:}%
\def\XINTinFloatSqrt {\romannumeral0\XINTinfloatsqrt }%
-\def\XINTinfloatsqrt #1{\XINT_flsqrt_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatsqrt #1{\XINT_flsqrt_chkopt \XINTinfloat #1\xint:}%
\def\XINT_flsqrt_chkopt #1#2%
{%
\ifx [#2\expandafter\XINT_flsqrt_opt
\else\expandafter\XINT_flsqrt_noopt
\fi #1#2%
}%
-\def\XINT_flsqrt_noopt #1#2\xint_relax
+\def\XINT_flsqrt_noopt #1#2\xint:%
{%
\expandafter\XINT_FL_sqrt_a
\romannumeral0\XINTinfloat[\XINTdigits]{#2}\XINTdigits.#1%
}%
-\def\XINT_flsqrt_opt #1[\xint_relax #2]%#3%
+\def\XINT_flsqrt_opt #1[\xint:#2]%#3%
{%
\expandafter\XINT_flsqrt_opt_a\the\numexpr #2.#1%
}%
@@ -2883,7 +2916,11 @@
\krof
}%[
\def\XINT_FL_sqrt_iszero #1]#2.#3{#3[#2]{0[0]}}%
-\def\XINT_FL_sqrt_isneg #1]#2.#3{\xintError:RootOfNegative #3[#2]{0[0]}}%
+\def\XINT_FL_sqrt_isneg #1]#2.#3%
+{%
+ #3[#2]{\XINT_signalcondition{InvalidOperation}
+ {Square root of negative: -#1]}{}{0[0]}}%
+}%
\def\XINT_FL_sqrt_pos #1[#2]#3.%
{%
\expandafter\XINT_flsqrt
@@ -2939,19 +2976,19 @@
#1.#200000000.#3.%
}%
\def\xintFloatE {\romannumeral0\xintfloate }%
-\def\xintfloate #1{\XINT_floate_chkopt #1\xint_relax }%
+\def\xintfloate #1{\XINT_floate_chkopt #1\xint:}%
\def\XINT_floate_chkopt #1%
{%
\ifx [#1\expandafter\XINT_floate_opt
\else\expandafter\XINT_floate_noopt
\fi #1%
}%
-\def\XINT_floate_noopt #1\xint_relax
+\def\XINT_floate_noopt #1\xint:%
{%
\expandafter\XINT_floate_post
\romannumeral0\XINTinfloat[\XINTdigits]{#1}\XINTdigits.%
}%
-\def\XINT_floate_opt [\xint_relax #1]%
+\def\XINT_floate_opt [\xint:#1]%
{%
\expandafter\XINT_floate_opt_a\the\numexpr #1.%
}%
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
index 2d6c491df14..d38d188a8c8 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 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintgcd: Euclidean algorithm with xint package
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintgcd}%
- [2017/01/06 1.2k Euclide algorithm with xint package (JFB)]%
+ [2017/07/26 1.2l Euclide algorithm with xint package (JFB)]%
\def\xintGCD {\romannumeral0\xintgcd }%
\def\xintgcd #1%
{%
@@ -102,9 +102,9 @@
\def\XINT_gcd_BisZero #1#2{ #2}%
\def\XINT_gcd_CheckRem #1#2\Z
{%
- \xint_gob_til_zero #1\xint_gcd_end0\XINT_gcd_loop {#1#2}%
+ \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop {#1#2}%
}%
-\def\xint_gcd_end0\XINT_gcd_loop #1#2{ #2}%
+\def\XINT_gcd_end0\XINT_gcd_loop #1#2{ #2}%
\def\XINT_gcd_loop #1#2%
{%
\expandafter\expandafter\expandafter
@@ -147,9 +147,9 @@
\def\xintBezout {\romannumeral0\xintbezout }%
\def\xintbezout #1%
{%
- \expandafter\xint_bezout\expandafter {\romannumeral0\xintnum{#1}}%
+ \expandafter\XINT_bezout\expandafter {\romannumeral0\xintnum{#1}}%
}%
-\def\xint_bezout #1#2%
+\def\XINT_bezout #1#2%
{%
\expandafter\XINT_bezout_fork \romannumeral0\xintnum{#2}\Z #1\Z
}%
@@ -159,31 +159,30 @@
#1#3\XINT_bezout_botharezero
#10\XINT_bezout_secondiszero
#30\XINT_bezout_firstiszero
- 00{\xint_UDsignsfork
+ 00\xint_UDsignsfork
+ \krof
#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
}%
-\edef\XINT_bezout_botharezero #1#2#3#4#5#6%
-{%
- \noexpand\xintError:NoBezoutForZeros\space {0}{0}{0}{0}{0}%
-}%
-\def\XINT_bezout_firstiszero #1#2#3#4#5#6%
+\def\XINT_bezout_botharezero #1\krof#2#3#4#5#6#7%
+ {\XINT_signalcondition{InvalidOperation}
+ {No Bezout identity for 0 and 0}{}{{0}{0}{0}{0}{0}}}%
+\def\XINT_bezout_firstiszero #1\krof#2#3#4#5#6#7%
{%
\xint_UDsignfork
- #3{ {0}{#3#1}{0}{1}{#1}}%
- -{ {0}{#3#1}{0}{-1}{#1}}%
+ #4{{0}{#7}{0}{1}{#2}}%
+ -{{0}{#7}{0}{-1}{#7}}%
\krof
}%
-\def\XINT_bezout_secondiszero #1#2#3#4#5#6%
+\def\XINT_bezout_secondiszero #1\krof#2#3#4#5#6#7%
{%
\xint_UDsignfork
- #4{ {#4#2}{0}{-1}{0}{#2}}%
- -{ {#4#2}{0}{1}{0}{#2}}%
+ #5{{#6}{0}{-1}{0}{#3}}%
+ -{{#6}{0}{1}{0}{#6}}%
\krof
}%
\def\XINT_bezout_minusminus #1#2#3#4%
@@ -200,10 +199,7 @@
{%
\expandafter\XINT_bezout_mm_postc\expandafter {#2}{#1}%
}%
-\edef\XINT_bezout_mm_postc #1#2#3#4#5%
-{%
- \space {#4}{#5}{#1}{#2}{#3}%
-}%
+\def\XINT_bezout_mm_postc #1#2#3#4#5{{#4}{#5}{#1}{#2}{#3}}%
\def\XINT_bezout_minusplus #1#2#3#4%
{%
\expandafter\XINT_bezout_mp_post
@@ -214,10 +210,7 @@
\expandafter\XINT_bezout_mp_postb\expandafter
{\romannumeral0\xintiiopp {#2}}{#1}%
}%
-\edef\XINT_bezout_mp_postb #1#2#3#4#5%
-{%
- \space {#4}{#5}{#2}{#1}{#3}%
-}%
+\def\XINT_bezout_mp_postb #1#2#3#4#5{{#4}{#5}{#2}{#1}{#3}}%
\def\XINT_bezout_plusminus #1#2#3#4%
{%
\expandafter\XINT_bezout_pm_post
@@ -228,36 +221,28 @@
\expandafter \XINT_bezout_pm_postb \expandafter
{\romannumeral0\xintiiopp{#1}}%
}%
-\edef\XINT_bezout_pm_postb #1#2#3#4#5%
-{%
- \space {#4}{#5}{#1}{#2}{#3}%
-}%
+\def\XINT_bezout_pm_postb #1#2#3#4#5{{#4}{#5}{#1}{#2}{#3}}%
\def\XINT_bezout_plusplus #1#2#3#4%
{%
\expandafter\XINT_bezout_pp_post
\romannumeral0\XINT_bezout_loop_a 1{#3#1}{#4#2}1001%
}%
-\edef\XINT_bezout_pp_post #1#2#3#4#5%
-{%
- \space {#4}{#5}{#1}{#2}{#3}%
-}%
+\def\XINT_bezout_pp_post #1#2#3#4#5{{#4}{#5}{#1}{#2}{#3}}%
\def\XINT_bezout_loop_a #1#2#3%
{%
- \expandafter\XINT_bezout_loop_b
- \expandafter{\the\numexpr -#1\expandafter }%
+ \expandafter\XINT_bezout_loop_b\the\numexpr -#1\expandafter.%
\romannumeral0\XINT_div_prepare {#2}{#3}{#2}%
}%
-\def\XINT_bezout_loop_b #1#2#3#4#5#6#7#8%
+\def\XINT_bezout_loop_b #1.#2#3#4#5#6#7#8%
{%
- \expandafter \XINT_bezout_loop_c \expandafter
- {\romannumeral0\xintiiadd{\XINT_mul_fork #5\Z #2\Z}{#7}}%
- {\romannumeral0\xintiiadd{\XINT_mul_fork #6\Z #2\Z}{#8}}%
+ \expandafter\XINT_bezout_loop_c\expandafter
+ {\romannumeral0\xintiiadd{\XINT_mul_fork #5\xint:#2\xint:}{#7}}%
+ {\romannumeral0\xintiiadd{\XINT_mul_fork #6\xint:#2\xint:}{#8}}%
{#1}{#3}{#4}{#5}{#6}%
}%
\def\XINT_bezout_loop_c #1#2%
{%
- \expandafter \XINT_bezout_loop_d \expandafter
- {#2}{#1}%
+ \expandafter\XINT_bezout_loop_d\expandafter{#2}{#1}%
}%
\def\XINT_bezout_loop_d #1#2#3#4#5%
{%
@@ -265,36 +250,29 @@
}%
\def\XINT_bezout_loop_e #1#2\Z
{%
- \xint_gob_til_zero #1\xint_bezout_loop_exit0\XINT_bezout_loop_f
- {#1#2}%
+ \xint_gob_til_zero #1\XINT_bezout_loop_exit0\XINT_bezout_loop_f {#1#2}%
}%
\def\XINT_bezout_loop_f #1#2%
{%
\XINT_bezout_loop_a {#2}{#1}%
}%
-\def\xint_bezout_loop_exit0\XINT_bezout_loop_f #1#2%
+\def\XINT_bezout_loop_exit0\XINT_bezout_loop_f #1#2%
{%
\ifcase #2
\or \expandafter\XINT_bezout_exiteven
\else\expandafter\XINT_bezout_exitodd
\fi
}%
-\edef\XINT_bezout_exiteven #1#2#3#4#5%
-{%
- \space {#5}{#4}{#1}%
-}%
-\edef\XINT_bezout_exitodd #1#2#3#4#5%
-{%
- \space {-#5}{-#4}{#1}%
-}%
+\def\XINT_bezout_exiteven #1#2#3#4#5{{#5}{#4}{#1}}%
+\def\XINT_bezout_exitodd #1#2#3#4#5{{-#5}{-#4}{#1}}%
\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 \romannumeral0\xintiabs {#2}\Z #1\Z
+ \expandafter\XINT_euc_fork\romannumeral0\xintiabs {#2}\Z #1\Z
}%
\def\XINT_euc_fork #1#2\Z #3#4\Z
{%
@@ -305,36 +283,32 @@
\krof
{0}{#1#2}{#3#4}{{#3#4}{#1#2}}{}\Z
}%
-\def\XINT_euc_AisZero #1#2#3#4#5#6{ {1}{0}{#2}{#2}{0}{0}}%
-\def\XINT_euc_BisZero #1#2#3#4#5#6{ {1}{0}{#3}{#3}{0}{0}}%
+\def\XINT_euc_AisZero #1#2#3#4#5#6{{1}{0}{#2}{#2}{0}{0}}%
+\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 {\the\numexpr #1+1\expandafter }%
+ \expandafter\XINT_euc_b\the\numexpr #1+\xint_c_i\expandafter.%
\romannumeral0\XINT_div_prepare {#2}{#3}{#2}%
}%
-\def\XINT_euc_b #1#2#3#4%
+\def\XINT_euc_b #1.#2#3#4%
{%
\XINT_euc_c #3\Z {#1}{#3}{#4}{{#2}{#3}}%
}%
\def\XINT_euc_c #1#2\Z
{%
- \xint_gob_til_zero #1\xint_euc_end0\XINT_euc_a
+ \xint_gob_til_zero #1\XINT_euc_end0\XINT_euc_a
}%
-\def\xint_euc_end0\XINT_euc_a #1#2#3#4\Z%
+\def\XINT_euc_end0\XINT_euc_a #1#2#3#4\Z%
{%
- \expandafter\xint_euc_end_
+ \expandafter\XINT_euc_end_a
\romannumeral0%
\XINT_rord_main {}#4{{#1}{#3}}%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax
-}%
-\edef\xint_euc_end_ #1#2#3%
-{%
- \space {#1}{#3}{#2}%
+ \xint:
}%
+\def\XINT_euc_end_a #1#2#3{{#1}{#3}{#2}}%
\def\xintBezoutAlgorithm {\romannumeral0\xintbezoutalgorithm }%
\def\xintbezoutalgorithm #1%
{%
@@ -353,15 +327,14 @@
\krof
0{#1#2}{#3#4}1001{{#3#4}{#1#2}}{}\Z
}%
-\def\XINT_bezalg_AisZero #1#2#3\Z{ {1}{0}{0}{1}{#2}{#2}{1}{0}{0}{0}{0}{1}}%
-\def\XINT_bezalg_BisZero #1#2#3#4\Z{ {1}{0}{0}{1}{#3}{#3}{1}{0}{0}{0}{0}{1}}%
+\def\XINT_bezalg_AisZero #1#2#3\Z{{1}{0}{0}{1}{#2}{#2}{1}{0}{0}{0}{0}{1}}%
+\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 {\the\numexpr #1+1\expandafter }%
+ \expandafter\XINT_bezalg_b\the\numexpr #1+\xint_c_i\expandafter.%
\romannumeral0\XINT_div_prepare {#2}{#3}{#2}%
}%
-\def\XINT_bezalg_b #1#2#3#4#5#6#7#8%
+\def\XINT_bezalg_b #1.#2#3#4#5#6#7#8%
{%
\expandafter\XINT_bezalg_c\expandafter
{\romannumeral0\xintiiadd {\xintiiMul {#6}{#2}}{#8}}%
@@ -378,36 +351,33 @@
}%
\def\XINT_bezalg_e #1#2\Z
{%
- \xint_gob_til_zero #1\xint_bezalg_end0\XINT_bezalg_a
+ \xint_gob_til_zero #1\XINT_bezalg_end0\XINT_bezalg_a
}%
-\def\xint_bezalg_end0\XINT_bezalg_a #1#2#3#4#5#6#7#8\Z
+\def\XINT_bezalg_end0\XINT_bezalg_a #1#2#3#4#5#6#7#8\Z
{%
- \expandafter\xint_bezalg_end_
+ \expandafter\XINT_bezalg_end_a
\romannumeral0%
\XINT_rord_main {}#8{{#1}{#3}}%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax
-}%
-\edef\xint_bezalg_end_ #1#2#3#4%
-{%
- \space {#1}{#3}{0}{1}{#2}{#4}{1}{0}%
+ \xint:
}%
+\def\XINT_bezalg_end_a #1#2#3#4{{#1}{#3}{0}{1}{#2}{#4}{1}{0}}%
\def\xintGCDof {\romannumeral0\xintgcdof }%
-\def\xintgcdof #1{\expandafter\XINT_gcdof_a\romannumeral`&&@#1\relax }%
-\def\XINT_gcdof_a #1{\expandafter\XINT_gcdof_b\romannumeral`&&@#1\Z }%
-\def\XINT_gcdof_b #1\Z #2{\expandafter\XINT_gcdof_c\romannumeral`&&@#2\Z {#1}\Z}%
-\def\XINT_gcdof_c #1{\xint_gob_til_relax #1\XINT_gcdof_e\relax\XINT_gcdof_d #1}%
-\def\XINT_gcdof_d #1\Z {\expandafter\XINT_gcdof_b\romannumeral0\xintgcd {#1}}%
-\def\XINT_gcdof_e #1\Z #2\Z { #2}%
+\def\xintgcdof #1{\expandafter\XINT_gcdof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_gcdof_a #1{\expandafter\XINT_gcdof_b\romannumeral`&&@#1!}%
+\def\XINT_gcdof_b #1!#2{\expandafter\XINT_gcdof_c\romannumeral`&&@#2!{#1}!}%
+\def\XINT_gcdof_c #1{\xint_gob_til_xint: #1\XINT_gcdof_e\xint:\XINT_gcdof_d #1}%
+\def\XINT_gcdof_d #1!{\expandafter\XINT_gcdof_b\romannumeral0\xintgcd {#1}}%
+\def\XINT_gcdof_e #1!#2!{ #2}%
\def\xintLCMof {\romannumeral0\xintlcmof }%
-\def\xintlcmof #1{\expandafter\XINT_lcmof_a\romannumeral`&&@#1\relax }%
-\def\XINT_lcmof_a #1{\expandafter\XINT_lcmof_b\romannumeral`&&@#1\Z }%
-\def\XINT_lcmof_b #1\Z #2{\expandafter\XINT_lcmof_c\romannumeral`&&@#2\Z {#1}\Z}%
-\def\XINT_lcmof_c #1{\xint_gob_til_relax #1\XINT_lcmof_e\relax\XINT_lcmof_d #1}%
-\def\XINT_lcmof_d #1\Z {\expandafter\XINT_lcmof_b\romannumeral0\xintlcm {#1}}%
-\def\XINT_lcmof_e #1\Z #2\Z { #2}%
+\def\xintlcmof #1{\expandafter\XINT_lcmof_a\romannumeral`&&@#1\xint:}%
+\def\XINT_lcmof_a #1{\expandafter\XINT_lcmof_b\romannumeral`&&@#1!}%
+\def\XINT_lcmof_b #1!#2{\expandafter\XINT_lcmof_c\romannumeral`&&@#2!{#1}!}%
+\def\XINT_lcmof_c #1{\xint_gob_til_xint: #1\XINT_lcmof_e\xint:\XINT_lcmof_d #1}%
+\def\XINT_lcmof_d #1!{\expandafter\XINT_lcmof_b\romannumeral0\xintlcm {#1}}%
+\def\XINT_lcmof_e #1!#2!{ #2}%
\def\xintTypesetEuclideAlgorithm {%
\unless\ifdefined\xintAssignArray
\errmessage
diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
index b710be4d9c1..92af7369012 100644
--- a/Master/texmf-dist/tex/generic/xint/xintkernel.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintkernel: Paraphernalia for the xint packages
%% ---------------------------------------------------------------
@@ -126,7 +126,7 @@
\catcode36=3 % $
\catcode91=12 % [
\catcode93=12 % ]
- \catcode33=12 % !
+ \catcode33=12 % ! (xintexpr.sty will use catcode 11)
\catcode64=11 % @ LETTER
\catcode38=7 % & for \romannumeral`&&@ trick.
\catcode124=12 % |
@@ -156,7 +156,7 @@
\fi
\XINT_providespackage
\ProvidesPackage {xintkernel}%
- [2017/01/06 1.2k Paraphernalia for the xint packages (JFB)]%
+ [2017/07/26 1.2l Paraphernalia for the xint packages (JFB)]%
\chardef\xint_c_ 0
\chardef\xint_c_i 1
\chardef\xint_c_ii 2
@@ -168,6 +168,7 @@
\chardef\xint_c_viii 8
\chardef\xint_c_ix 9
\chardef\xint_c_x 10
+\chardef\xint_c_xii 12
\chardef\xint_c_xiv 14
\chardef\xint_c_xvi 16
\chardef\xint_c_xviii 18
@@ -222,11 +223,9 @@
\long\def\xint_gob_til_zeros_iii #1000{}%
\long\def\xint_gob_til_zeros_iv #10000{}%
\long\def\xint_gob_til_eightzeroes #100000000{}%
-\long\def\xint_gob_til_exclam #1!{}% catcode 12 exclam
\long\def\xint_gob_til_dot #1.{}%
\long\def\xint_gob_til_G #1G{}%
\long\def\xint_gob_til_minus #1-{}%
-\long\def\xint_gob_til_relax #1\relax {}%
\long\def\xint_UDzerominusfork #10-#2#3\krof {#2}%
\long\def\xint_UDzerofork #10#2#3\krof {#2}%
\long\def\xint_UDsignfork #1-#2#3\krof {#2}%
@@ -235,9 +234,11 @@
\long\def\xint_UDzerosfork #100#2#3\krof {#2}%
\long\def\xint_UDonezerofork #110#2#3\krof {#2}%
\long\def\xint_UDsignsfork #1--#2#3\krof {#2}%
-\let\xint_relax\relax
-\def\xint_brelax {\xint_relax }%
-\long\def\xint_gob_til_xint_relax #1\xint_relax {}%
+\let\xint:\char
+\long\def\xint_gob_til_xint:#1\xint:{}%
+\def\xint_bracedstopper{\xint:}%
+\long\def\xint_gob_til_exclam #1!{}%
+\long\def\xint_gob_til_sc #1;{}%
\long\def\xint_afterfi #1#2\fi {\fi #1}%
\long\def\xint_bye #1\xint_bye {}%
\long\def\xint_Bye #1\xint_bye {}%
@@ -261,36 +262,36 @@
\long\def\xintreverseorder #1%
{%
\XINT_rord_main {}#1%
- \xint_relax
+ \xint:
\xint_bye\xint_bye\xint_bye\xint_bye
\xint_bye\xint_bye\xint_bye\xint_bye
- \xint_relax
+ \xint:
}%
\long\def\XINT_rord_main #1#2#3#4#5#6#7#8#9%
{%
\xint_bye #9\XINT_rord_cleanup\xint_bye
\XINT_rord_main {#9#8#7#6#5#4#3#2#1}%
}%
-\long\edef\XINT_rord_cleanup\xint_bye\XINT_rord_main #1#2\xint_relax
+\def\XINT_rord_cleanup #1{%
+\long\def\XINT_rord_cleanup\xint_bye\XINT_rord_main ##1##2\xint:
{%
- \noexpand\expandafter\space\noexpand\xint_gob_til_xint_relax #1%
-}%
+ \expandafter#1\xint_gob_til_xint: ##1%
+}}\XINT_rord_cleanup { }%
\def\xintLength {\romannumeral0\xintlength }%
\def\xintlength #1{\long\def\xintlength ##1%
{%
\expandafter#1\the\numexpr\XINT_length_loop
- ##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
+ ##1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
+ \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
}}\xintlength{ }%
\long\def\XINT_length_loop #1#2#3#4#5#6#7#8#9%
{%
- \xint_gob_til_xint_relax #9\XINT_length_finish_a\xint_relax
+ \xint_gob_til_xint: #9\XINT_length_finish_a\xint:
\xint_c_ix+\XINT_length_loop
}%
-\def\XINT_length_finish_a\xint_relax\xint_c_ix+\XINT_length_loop
+\def\XINT_length_finish_a\xint:\xint_c_ix+\XINT_length_loop
#1#2#3#4#5#6#7#8#9%
{%
#9\xint_bye
@@ -299,15 +300,15 @@
\long\def\xintlastitem #1%
{%
\XINT_last_loop {}.#1%
- {\xint_relax\XINT_last_loop_enda}{\xint_relax\XINT_last_loop_endb}%
- {\xint_relax\XINT_last_loop_endc}{\xint_relax\XINT_last_loop_endd}%
- {\xint_relax\XINT_last_loop_ende}{\xint_relax\XINT_last_loop_endf}%
- {\xint_relax\XINT_last_loop_endg}{\xint_relax\XINT_last_loop_endh}\xint_bye
+ {\xint:\XINT_last_loop_enda}{\xint:\XINT_last_loop_endb}%
+ {\xint:\XINT_last_loop_endc}{\xint:\XINT_last_loop_endd}%
+ {\xint:\XINT_last_loop_ende}{\xint:\XINT_last_loop_endf}%
+ {\xint:\XINT_last_loop_endg}{\xint:\XINT_last_loop_endh}\xint_bye
}%
\long\def\XINT_last_loop #1.#2#3#4#5#6#7#8#9%
{%
- \xint_gob_til_xint_relax #9%
- {#8}{#7}{#6}{#5}{#4}{#3}{#2}{#1}\xint_relax
+ \xint_gob_til_xint: #9%
+ {#8}{#7}{#6}{#5}{#4}{#3}{#2}{#1}\xint:
\XINT_last_loop {#9}.%
}%
\long\def\XINT_last_loop_enda #1#2\xint_bye{ #1}%
@@ -322,8 +323,7 @@
\long\def\xintlengthupto #1#2%
{%
\expandafter\XINT_lengthupto_loop
- \the\numexpr#1.#2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax
+ \the\numexpr#1.#2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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.%
}%
@@ -337,10 +337,10 @@
\long\def\XINT_lengthupto_gt #1\xint_bye.{-0}%
\long\def\XINT_lengthupto_loop #1.#2#3#4#5#6#7#8#9%
{%
- \xint_gob_til_xint_relax #9\XINT_lengthupto_finish_a\xint_relax
+ \xint_gob_til_xint: #9\XINT_lengthupto_finish_a\xint:%
\expandafter\XINT_lengthupto_loop_a\the\numexpr #1-\xint_c_viii.%
}%
-\def\XINT_lengthupto_finish_a\xint_relax\expandafter\XINT_lengthupto_loop_a
+\def\XINT_lengthupto_finish_a\xint:\expandafter\XINT_lengthupto_loop_a
\the\numexpr #1-\xint_c_viii.#2#3#4#5#6#7#8#9%
{%
\expandafter\XINT_lengthupto_finish_b\the\numexpr #1-#9\xint_bye
@@ -508,10 +508,18 @@
\expandafter\edef\csname XINT_g68\endcsname
{\noexpand\csname XINT_g67\expandafter\noexpand\csname XINT_g61\endcsname}%
\def\xintMessage #1#2#3{%
- \immediate\write128{Package #1 #2: (on line \the\inputlineno)}%
- \immediate\write128{\space\space\space\space#3}%
+ \immediate\write128{Package #1 #2: (on line \the\inputlineno)}%
+ \immediate\write128{\space\space\space\space#3}%
}%
\newif\ifxintverbose
+\def\XINT_expandableerror #1#2{%
+ \def\XINT_expandableerror ##1{%
+ \expandafter\expandafter\expandafter
+ \XINT_expandableerror_continue\xint_firstofone{#2#1##1#1}}%
+ \def\XINT_expandableerror_continue ##1#1##2#1{##1}%
+}%
+\begingroup\lccode`$ 32 \catcode`/ 11 \catcode`! 11 \catcode32 11 %
+\lowercase{\endgroup\XINT_expandableerror$\ ! /}%
\XINT_restorecatcodes_endinput%
\endinput
%%
diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty
index cadb5bae7de..16bfec971a4 100644
--- a/Master/texmf-dist/tex/generic/xint/xintseries.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintseries.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintseries: Expandable partial sums with xint package
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintseries}%
- [2017/01/06 1.2k Expandable partial sums with xint package (JFB)]%
+ [2017/07/26 1.2l Expandable partial sums with xint package (JFB)]%
\def\xintSeries {\romannumeral0\xintseries }%
\def\xintseries #1#2%
{%
@@ -308,7 +308,7 @@
{#2}{#1}{#3}{#4}{#5}%
}%
\def\xintFloatPowerSeries {\romannumeral0\xintfloatpowerseries }%
-\def\xintfloatpowerseries #1{\XINT_flpowseries_chkopt #1\xint_relax }%
+\def\xintfloatpowerseries #1{\XINT_flpowseries_chkopt #1\xint:}%
\def\XINT_flpowseries_chkopt #1%
{%
\ifx [#1\expandafter\XINT_flpowseries_opt
@@ -316,13 +316,13 @@
\fi
#1%
}%
-\def\XINT_flpowseries_noopt #1\xint_relax #2%
+\def\XINT_flpowseries_noopt #1\xint:#2%
{%
\expandafter\XINT_flpowseries\expandafter
{\the\numexpr #1\expandafter}\expandafter
{\the\numexpr #2}\XINTdigits
}%
-\def\XINT_flpowseries_opt [\xint_relax #1]#2#3%
+\def\XINT_flpowseries_opt [\xint:#1]#2#3%
{%
\expandafter\XINT_flpowseries\expandafter
{\the\numexpr #2\expandafter}\expandafter
@@ -373,7 +373,7 @@
\xintfloatadd [#7]{#4}{\XINTinfloatmul [#7]{#6{#2}}{#1}}%
}%
\def\xintFloatPowerSeriesX {\romannumeral0\xintfloatpowerseriesx }%
-\def\xintfloatpowerseriesx #1{\XINT_flpowseriesx_chkopt #1\xint_relax }%
+\def\xintfloatpowerseriesx #1{\XINT_flpowseriesx_chkopt #1\xint:}%
\def\XINT_flpowseriesx_chkopt #1%
{%
\ifx [#1\expandafter\XINT_flpowseriesx_opt
@@ -381,13 +381,13 @@
\fi
#1%
}%
-\def\XINT_flpowseriesx_noopt #1\xint_relax #2%
+\def\XINT_flpowseriesx_noopt #1\xint:#2%
{%
\expandafter\XINT_flpowseriesx\expandafter
{\the\numexpr #1\expandafter}\expandafter
{\the\numexpr #2}\XINTdigits
}%
-\def\XINT_flpowseriesx_opt [\xint_relax #1]#2#3%
+\def\XINT_flpowseriesx_opt [\xint:#1]#2#3%
{%
\expandafter\XINT_flpowseriesx\expandafter
{\the\numexpr #2\expandafter}\expandafter
diff --git a/Master/texmf-dist/tex/generic/xint/xinttools.sty b/Master/texmf-dist/tex/generic/xint/xinttools.sty
index 732a24d643f..b23ed5ac1e7 100644
--- a/Master/texmf-dist/tex/generic/xint/xinttools.sty
+++ b/Master/texmf-dist/tex/generic/xint/xinttools.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2k 2017/01/06
+%% The xint bundle 1.2l 2017/07/26
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xinttools: Expandable and non-expandable utilities
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xinttools}%
- [2017/01/06 1.2k Expandable and non-expandable utilities (JFB)]%
+ [2017/07/26 1.2l Expandable and non-expandable utilities (JFB)]%
\newtoks\XINT_toks
\xint_firstofone{\let\XINT_sptoken= } %<- space here!
\def\xintgodef {\global\xintodef }%
@@ -81,21 +81,21 @@
\long\def\xintrevwithbraces #1%
{%
\expandafter\XINT_revwbr_loop\expandafter{\expandafter}%
- \romannumeral`&&@#1\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye
+ \romannumeral`&&@#1\xint:\xint:\xint:\xint:%
+ \xint:\xint:\xint:\xint:\xint_bye
}%
\long\def\xintrevwithbracesnoexpand #1%
{%
\XINT_revwbr_loop {}%
- #1\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye
+ #1\xint:\xint:\xint:\xint:%
+ \xint:\xint:\xint:\xint:\xint_bye
}%
\long\def\XINT_revwbr_loop #1#2#3#4#5#6#7#8#9%
{%
- \xint_gob_til_xint_relax #9\XINT_revwbr_finish_a\xint_relax
+ \xint_gob_til_xint: #9\XINT_revwbr_finish_a\xint:%
\XINT_revwbr_loop {{#9}{#8}{#7}{#6}{#5}{#4}{#3}{#2}#1}%
}%
-\long\def\XINT_revwbr_finish_a\xint_relax\XINT_revwbr_loop #1#2\xint_bye
+\long\def\XINT_revwbr_finish_a\xint:\XINT_revwbr_loop #1#2\xint_bye
{%
\XINT_revwbr_finish_b #2\R\R\R\R\R\R\R\Z #1%
}%
@@ -111,49 +111,60 @@
#7\XINT_revwbr_finish_c \xint_gobble_ii
\R\XINT_revwbr_finish_c \xint_gobble_i\Z
}%
-\edef\XINT_revwbr_finish_c #1#2\Z {\noexpand\expandafter\space #1}%
+\def\XINT_revwbr_finish_c#1{%
+\def\XINT_revwbr_finish_c##1##2\Z{\expandafter#1##1}%
+}\XINT_revwbr_finish_c{ }%
\def\xintZapFirstSpaces {\romannumeral0\xintzapfirstspaces }%
-\long\edef\xintzapfirstspaces #1%
- {\noexpand\XINT_zapbsp_a \space #1\xint_relax \space\space\xint_relax }%
-\xint_firstofone {\long\edef\XINT_zapbsp_a #1 } %<- space token here
-{%
- \noexpand\XINT_zapbsp_again? #1\noexpand\xint_bye\noexpand\XINT_zapbsp_b #1\space\space
-}%
+\def\xintzapfirstspaces#1{\long
+\def\xintzapfirstspaces ##1{\XINT_zapbsp_a #1##1\xint:#1#1\xint:}%
+}\xintzapfirstspaces{ }%
+\def\XINT_zapbsp_a#1{\long\def\XINT_zapbsp_a ##1#1#1{%
+ \XINT_zapbsp_again?##1\xint_bye\XINT_zapbsp_b ##1#1#1}%
+}\XINT_zapbsp_a{ }%
\long\def\XINT_zapbsp_again? #1{\xint_bye #1\XINT_zapbsp_again }%
\xint_firstofone{\def\XINT_zapbsp_again\XINT_zapbsp_b} {\XINT_zapbsp_a }%
-\long\def\XINT_zapbsp_b #1\xint_relax #2\xint_relax {#1}%
+\long\def\XINT_zapbsp_b #1\xint:#2\xint:{#1}%
\def\xintZapLastSpaces {\romannumeral0\xintzaplastspaces }%
-\long\edef\xintzaplastspaces #1{\noexpand\XINT_zapesp_a {}\noexpand\empty#1%
- \space\space\noexpand\xint_bye\xint_relax}%
+\def\xintzaplastspaces#1{\long
+\def\xintzaplastspaces ##1{\XINT_zapesp_a {}\empty##1#1#1\xint_bye\xint:}%
+}\xintzaplastspaces{ }%
\xint_firstofone {\long\def\XINT_zapesp_a #1#2 } %<- second space here
{\expandafter\XINT_zapesp_b\expandafter{#2}{#1}}%
-\long\def\XINT_zapesp_b #1#2#3\xint_relax
- {\XINT_zapesp_end? #3\XINT_zapesp_e {#2#1}\empty #3\xint_relax }%
+\long\def\XINT_zapesp_b #1#2#3\xint:%
+ {\XINT_zapesp_end? #3\XINT_zapesp_e {#2#1}\empty #3\xint:}%
\long\def\XINT_zapesp_end? #1{\xint_bye #1\XINT_zapesp_end }%
-\long\def\XINT_zapesp_end\XINT_zapesp_e #1#2\xint_relax { #1}%
-\long\edef\XINT_zapesp_e #1{\noexpand \XINT_zapesp_a {#1\space\space}}%
+\long\def\XINT_zapesp_end\XINT_zapesp_e #1#2\xint:{ #1}%
+\def\XINT_zapesp_e#1{%
+\long\def\XINT_zapesp_e ##1{\XINT_zapesp_a {##1#1#1}}%
+}\XINT_zapesp_e{ }%
\def\xintZapSpaces {\romannumeral0\xintzapspaces }%
-\long\edef\xintzapspaces #1% like \xintZapFirstSpaces.
- {\noexpand\XINT_zapsp_a \space #1\xint_relax \space\space\xint_relax }%
-\xint_firstofone {\long\edef\XINT_zapsp_a #1 } %
- {\noexpand\XINT_zapsp_again? #1\noexpand\xint_bye\noexpand\XINT_zapsp_b #1\space\space}%
+\def\xintzapspaces#1{%
+\long\def\xintzapspaces ##1% like \xintZapFirstSpaces.
+ {\XINT_zapsp_a #1##1\xint:#1#1\xint:}%
+}\xintzapspaces{ }%
+\def\XINT_zapsp_a#1{%
+\long\def\XINT_zapsp_a ##1#1#1%
+ {\XINT_zapsp_again?##1\xint_bye\XINT_zapsp_b##1#1#1}%
+}\XINT_zapsp_a{ }%
\long\def\XINT_zapsp_again? #1{\xint_bye #1\XINT_zapsp_again }%
\xint_firstofone{\def\XINT_zapsp_again\XINT_zapsp_b} {\XINT_zapsp_a }%
\xint_firstofone{\def\XINT_zapsp_b} {\XINT_zapsp_c }%
-\long\edef\XINT_zapsp_c #1\xint_relax #2\xint_relax {\noexpand\XINT_zapesp_a
- {}\noexpand \empty #1\space\space\noexpand\xint_bye\xint_relax }%
+\def\XINT_zapsp_c#1{%
+\long\def\XINT_zapsp_c ##1\xint:##2\xint:%
+ {\XINT_zapesp_a{}\empty ##1#1#1\xint_bye\xint:}%
+}\XINT_zapsp_c{ }%
\def\xintZapSpacesB {\romannumeral0\xintzapspacesb }%
-\long\def\xintzapspacesb #1{\XINT_zapspb_one? #1\xint_relax\xint_relax
+\long\def\xintzapspacesb #1{\XINT_zapspb_one? #1\xint:\xint:%
\xint_bye\xintzapspaces {#1}}%
\long\def\XINT_zapspb_one? #1#2%
- {\xint_gob_til_xint_relax #1\XINT_zapspb_onlyspaces\xint_relax
- \xint_gob_til_xint_relax #2\XINT_zapspb_bracedorone\xint_relax
+ {\xint_gob_til_xint: #1\XINT_zapspb_onlyspaces\xint:%
+ \xint_gob_til_xint: #2\XINT_zapspb_bracedorone\xint:%
\xint_bye {#1}}%
-\def\XINT_zapspb_onlyspaces\xint_relax
- \xint_gob_til_xint_relax\xint_relax\XINT_zapspb_bracedorone\xint_relax
+\def\XINT_zapspb_onlyspaces\xint:%
+ \xint_gob_til_xint:\xint:\XINT_zapspb_bracedorone\xint:%
\xint_bye #1\xint_bye\xintzapspaces #2{ }%
-\long\def\XINT_zapspb_bracedorone\xint_relax
- \xint_bye #1\xint_relax\xint_bye\xintzapspaces #2{ #1}%
+\long\def\XINT_zapspb_bracedorone\xint:%
+ \xint_bye #1\xint:\xint_bye\xintzapspaces #2{ #1}%
\def\xintCSVtoList {\romannumeral0\xintcsvtolist }%
\long\def\xintcsvtolist #1{\expandafter\xintApply
\expandafter\xintzapspacesb
@@ -246,8 +257,7 @@
\long\def\XINT_nthelt_neg #1.#2%
{%
\expandafter\XINT_nthelt_neg_a\the\numexpr\xint_c_i+\XINT_length_loop
- #2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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
-#1.#2\xint_bye
@@ -267,13 +277,13 @@
{%
\expandafter\XINT_nthelt_pos_done
\romannumeral0\expandafter\XINT_trim_loop\the\numexpr#1-\xint_c_x.%
- #2\xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #2\xint:\xint:\xint:\xint:\xint:%
+ \xint:\xint:\xint:\xint:\xint:%
\xint_bye
}%
\def\XINT_nthelt_pos_done #1{%
\long\def\XINT_nthelt_pos_done ##1##2\xint_bye{%
- \xint_gob_til_xint_relax##1\expandafter#1\xint_gobble_ii\xint_relax#1##1}%
+ \xint_gob_til_xint:##1\expandafter#1\xint_gobble_ii\xint:#1##1}%
}\XINT_nthelt_pos_done{ }%
\def\xintKeep {\romannumeral0\xintkeep }%
\def\xintKeepNoExpand {\romannumeral0\xintkeepnoexpand }%
@@ -293,8 +303,7 @@
{%
\expandafter\XINT_keep_neg_a\the\numexpr
#1-\numexpr\XINT_length_loop
- #2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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.#2%
}%
@@ -310,8 +319,7 @@
{%
\expandafter\XINT_keep_loop
\the\numexpr#1-\XINT_lengthupto_loop
- #1.#2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax
+ #1.#2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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.%
-\xint_c_viii.{}#2\xint_bye%
@@ -362,8 +370,7 @@
{%
\expandafter\XINT_keepunbr_loop
\the\numexpr#1-\XINT_lengthupto_loop
- #1.#2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax
+ #1.#2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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.%
-\xint_c_viii.{}#2\xint_bye%
@@ -413,8 +420,7 @@
{%
\expandafter\XINT_trim_neg_a\the\numexpr
#1-\numexpr\XINT_length_loop
- #2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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
.{}#2\xint_bye
@@ -426,13 +432,15 @@
-\XINT_trim_trimall
\krof
}%
-\edef\XINT_trim_trimall {\noexpand\expandafter\space\noexpand\xint_bye}%
+\def\XINT_trim_trimall#1{%
+\def\XINT_trim_trimall {\expandafter#1\xint_bye}%
+}\XINT_trim_trimall{ }%
\long\def\XINT_trim_pos #1.#2%
{%
\expandafter\XINT_trim_pos_done\expandafter\space
\romannumeral0\expandafter\XINT_trim_loop\the\numexpr#1-\xint_c_ix.%
- #2\xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #2\xint:\xint:\xint:\xint:\xint:%
+ \xint:\xint:\xint:\xint:\xint:%
\xint_bye
}%
\def\XINT_trim_loop #1#2.%
@@ -442,9 +450,9 @@
}%
\long\def\XINT_trim_loop_trimnine #1#2#3#4#5#6#7#8#9%
{%
- \xint_gob_til_xint_relax #9\XINT_trim_toofew\xint_relax-\xint_c_ix.%
+ \xint_gob_til_xint: #9\XINT_trim_toofew\xint:-\xint_c_ix.%
}%
-\def\XINT_trim_toofew\xint_relax{*\xint_c_}%
+\def\XINT_trim_toofew\xint:{*\xint_c_}%
\def\XINT_trim_finish#1{%
\def\XINT_trim_finish-%
\expandafter\XINT_trim_loop\the\numexpr-##1\XINT_trim_loop_trimnine
@@ -452,7 +460,7 @@
\expandafter\expandafter\expandafter#1%
\csname xint_gobble_\romannumeral\numexpr\xint_c_ix-##1\endcsname
}}\XINT_trim_finish{ }%
-\long\def\XINT_trim_pos_done #1\xint_relax #2\xint_bye {#1}%
+\long\def\XINT_trim_pos_done #1\xint:#2\xint_bye {#1}%
\def\xintTrimUnbraced {\romannumeral0\xinttrimunbraced }%
\def\xintTrimUnbracedNoExpand {\romannumeral0\xinttrimunbracednoexpand }%
\long\def\xinttrimunbraced #1#2%
@@ -472,8 +480,7 @@
{%
\expandafter\XINT_trimunbr_neg_a\the\numexpr
#1-\numexpr\XINT_length_loop
- #2\xint_relax\xint_relax\xint_relax\xint_relax
- \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax
+ #2\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:
\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
.{}#2\xint_bye
@@ -1001,7 +1008,7 @@
\long\def\XINT_assign_a #1\to
{%
\def\XINT_flet_macro{\XINT_assign_b}%
- \expandafter\XINT_flet_zapsp\romannumeral`&&@#1\xint_relax\to
+ \expandafter\XINT_flet_zapsp\romannumeral`&&@#1\xint:\to
}%
\long\def\XINT_assign_b
{%
@@ -1010,14 +1017,14 @@
\else\expandafter\XINT_assign_f
\fi
}%
-\long\def\XINT_assign_f #1\xint_relax\to #2%
+\long\def\XINT_assign_f #1\xint:\to #2%
{%
\XINT_assign_def #2{#1}%
}%
\long\def\XINT_assign_c #1%
{%
\def\xint_temp {#1}%
- \ifx\xint_temp\xint_brelax
+ \ifx\xint_temp\xint_bracedstopper
\expandafter\XINT_assign_e
\else
\expandafter\XINT_assign_d
@@ -1069,7 +1076,7 @@
\expandafter\def\expandafter\xint_arrayname\expandafter {\string #2}%
\XINT_restoreescapechar
\def\xint_itemcount {0}%
- \expandafter\XINT_assignarray_loop \romannumeral`&&@#1\xint_relax
+ \expandafter\XINT_assignarray_loop \romannumeral`&&@#1\xint:
\csname\xint_arrayname 00\expandafter\endcsname
\csname\xint_arrayname 0\expandafter\endcsname
\expandafter {\xint_arrayname}#2%
@@ -1077,7 +1084,7 @@
\long\def\XINT_assignarray_loop #1%
{%
\def\xint_temp {#1}%
- \ifx\xint_brelax\xint_temp
+ \ifx\xint_temp\xint_bracedstopper
\expandafter\def\csname\xint_arrayname 0\expandafter\endcsname
\expandafter{\the\numexpr\xint_itemcount}%
\expandafter\expandafter\expandafter\XINT_assignarray_end
@@ -1099,11 +1106,12 @@
\def #1##1%
{%
\ifnum ##1<\xint_c_
- \xint_afterfi {\xintError:ArrayIndexIsNegative\space }%
+ \xint_afterfi{\XINT_expandableerror{Array index negative: 0 > ##1} }%
\else
\xint_afterfi {%
\ifnum ##1>#2
- \xint_afterfi {\xintError:ArrayIndexBeyondLimit\space }%
+ \xint_afterfi
+ {\XINT_expandableerror{Array index beyond range: ##1 > #2} }%
\else\xint_afterfi
{\expandafter\expandafter\expandafter\space\csname #3##1\endcsname}%
\fi}%
@@ -1115,40 +1123,40 @@
\def\xintlength:f:csv #1%
{\long\def\xintlength:f:csv ##1{%
\expandafter#1\the\numexpr\expandafter\XINT_length:f:csv_a
- \romannumeral`&&@##1\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
- \xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
+ \romannumeral`&&@##1\xint:,\xint:,\xint:,\xint:,%
+ \xint:,\xint:,\xint:,\xint:,\xint:,%
\xint_c_ix,\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_bye
\relax
}}\xintlength:f:csv { }%
\long\def\XINT_length:f:csv_a #1%
{%
- \xint_gob_til_xint_relax #1\xint_c_\xint_bye\xint_relax
+ \xint_gob_til_xint: #1\xint_c_\xint_bye\xint:%
\XINT_length:f:csv_loop #1%
}%
\long\def\XINT_length:f:csv_loop #1,#2,#3,#4,#5,#6,#7,#8,#9,%
{%
- \xint_gob_til_xint_relax #9\XINT_length:f:csv_finish\xint_relax
+ \xint_gob_til_xint: #9\XINT_length:f:csv_finish\xint:%
\xint_c_ix+\XINT_length:f:csv_loop
}%
-\def\XINT_length:f:csv_finish\xint_relax\xint_c_ix+\XINT_length:f:csv_loop
+\def\XINT_length:f:csv_finish\xint:\xint_c_ix+\XINT_length:f:csv_loop
#1,#2,#3,#4,#5,#6,#7,#8,#9,{#9\xint_bye}%
\def\xintLengthUpTo:f:csv {\romannumeral0\xintlengthupto:f:csv}%
\long\def\xintlengthupto:f:csv #1#2%
{%
\expandafter\XINT_lengthupto:f:csv_a
\the\numexpr#1\expandafter.%
- \romannumeral`&&@#2\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
- \xint_relax,\xint_relax,\xint_relax,\xint_relax,%
+ \romannumeral`&&@#2\xint:,\xint:,\xint:,\xint:,%
+ \xint:,\xint:,\xint:,\xint:,%
\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_bye.%
}%
\long\def\XINT_lengthupto:f:csv_a #1.#2%
{%
- \xint_gob_til_xint_relax #2\XINT_lengthupto:f:csv_empty\xint_relax
+ \xint_gob_til_xint: #2\XINT_lengthupto:f:csv_empty\xint:%
\XINT_lengthupto:f:csv_loop_b #1.#2%
}%
-\def\XINT_lengthupto:f:csv_empty\xint_relax
+\def\XINT_lengthupto:f:csv_empty\xint:%
\XINT_lengthupto:f:csv_loop_b #1.#2\xint_bye.{ #1}%
\def\XINT_lengthupto:f:csv_loop_a #1%
{%
@@ -1160,10 +1168,10 @@
\long\def\XINT_lengthupto:f:csv_gt #1\xint_bye.{-0}%
\long\def\XINT_lengthupto:f:csv_loop_b #1.#2,#3,#4,#5,#6,#7,#8,#9,%
{%
- \xint_gob_til_xint_relax #9\XINT_lengthupto:f:csv_finish_a\xint_relax
+ \xint_gob_til_xint: #9\XINT_lengthupto:f:csv_finish_a\xint:%
\expandafter\XINT_lengthupto:f:csv_loop_a\the\numexpr #1-\xint_c_viii.%
}%
-\def\XINT_lengthupto:f:csv_finish_a\xint_relax
+\def\XINT_lengthupto:f:csv_finish_a\xint:
\expandafter\XINT_lengthupto:f:csv_loop_a
\the\numexpr #1-\xint_c_viii.#2,#3,#4,#5,#6,#7,#8,#9,%
{%
@@ -1198,8 +1206,8 @@
\romannumeral0%
\expandafter\XINT_keep:f:csv_neg_a\the\numexpr
#1-\numexpr\XINT_length:f:csv_a
- #2\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
- \xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
+ #2\xint:,\xint:,\xint:,\xint:,%
+ \xint:,\xint:,\xint:,\xint:,\xint:,%
\xint_c_ix,\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_bye
.#2\xint_bye
@@ -1228,8 +1236,8 @@
{%
\expandafter\XINT_keep:f:csv_pos_fork
\romannumeral0\XINT_lengthupto:f:csv_a
- #1.#2\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
- \xint_relax,\xint_relax,\xint_relax,\xint_relax,%
+ #1.#2\xint:,\xint:,\xint:,\xint:,%
+ \xint:,\xint:,\xint:,\xint:,%
\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_bye.%
.#1.{}#2\xint_bye%
@@ -1289,8 +1297,8 @@
{%
\expandafter\XINT_trim:f:csv_neg_a\the\numexpr
#1-\numexpr\XINT_length:f:csv_a
- #2\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
- \xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
+ #2\xint:,\xint:,\xint:,\xint:,%
+ \xint:,\xint:,\xint:,\xint:,\xint:,%
\xint_c_ix,\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_bye
.{}#2\xint_bye
@@ -1308,8 +1316,8 @@
\expandafter\XINT_trim:f:csv_pos_done\expandafter,%
\romannumeral0%
\expandafter\XINT_trim:f:csv_loop\the\numexpr#1-\xint_c_ix.%
- #2\xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
- \xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_relax\xint_bye
+ #2\xint:,\xint:,\xint:,\xint:,\xint:,%
+ \xint:,\xint:,\xint:,\xint:,\xint:\xint_bye
}%
\def\XINT_trim:f:csv_loop #1#2.%
{%
@@ -1318,9 +1326,9 @@
}%
\long\def\XINT_trim:f:csv_loop_trimnine #1,#2,#3,#4,#5,#6,#7,#8,#9,%
{%
- \xint_gob_til_xint_relax #9\XINT_trim:f:csv_toofew\xint_relax-\xint_c_ix.%
+ \xint_gob_til_xint: #9\XINT_trim:f:csv_toofew\xint:-\xint_c_ix.%
}%
-\def\XINT_trim:f:csv_toofew\xint_relax{*\xint_c_}%
+\def\XINT_trim:f:csv_toofew\xint:{*\xint_c_}%
\def\XINT_trim:f:csv_finish-%
\expandafter\XINT_trim:f:csv_loop\the\numexpr-#1\XINT_trim:f:csv_loop_trimnine
{%
@@ -1343,7 +1351,7 @@
\long\expandafter\def\csname XINT_trim:f:csv_finish8\endcsname
#1,{ }%
\expandafter\let\csname XINT_trim:f:csv_finish9\endcsname\space
-\long\def\XINT_trim:f:csv_pos_done #1\xint_relax #2\xint_bye{#1}%
+\long\def\XINT_trim:f:csv_pos_done #1\xint:#2\xint_bye{#1}%
\def\xintNthEltPy:f:csv {\romannumeral0\xintntheltpy:f:csv }%
\long\def\xintntheltpy:f:csv #1#2%
{%
@@ -1361,8 +1369,8 @@
{%
\expandafter\XINT_nthelt:f:csv_neg_fork
\the\numexpr\XINT_length:f:csv_a
- #2\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
- \xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
+ #2\xint:,\xint:,\xint:,\xint:,%
+ \xint:,\xint:,\xint:,\xint:,\xint:,%
\xint_c_ix,\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_bye
-#1.#2,\xint_bye
@@ -1380,35 +1388,35 @@
\expandafter\XINT_nthelt:f:csv_pos_done
\romannumeral0%
\expandafter\XINT_trim:f:csv_loop\the\numexpr#1-\xint_c_ix.%
- #2\xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_relax,%
- \xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_relax,\xint_bye
+ #2\xint:,\xint:,\xint:,\xint:,\xint:,%
+ \xint:,\xint:,\xint:,\xint:,\xint:,\xint_bye
}%
\def\XINT_nthelt:f:csv_pos_done #1{%
\long\def\XINT_nthelt:f:csv_pos_done ##1,##2\xint_bye{%
- \xint_gob_til_xint_relax##1\XINT_nthelt:f:csv_pos_cleanup\xint_relax#1##1}%
+ \xint_gob_til_xint:##1\XINT_nthelt:f:csv_pos_cleanup\xint:#1##1}%
}\XINT_nthelt:f:csv_pos_done{ }%
-\xint_firstofone{\long\def\XINT_nthelt:f:csv_pos_cleanup\xint_relax} %
- #1\xint_relax{ #1}%
+\xint_firstofone{\long\def\XINT_nthelt:f:csv_pos_cleanup\xint:} %
+ #1\xint:{ #1}%
\def\xintReverse:f:csv {\romannumeral0\xintreverse:f:csv }%
\long\def\xintreverse:f:csv #1%
{%
\expandafter\XINT_reverse:f:csv_loop
\expandafter{\expandafter}\romannumeral`&&@#1,%
- \xint_relax,%
+ \xint:,%
\xint_bye,\xint_bye,\xint_bye,\xint_bye,%
\xint_bye,\xint_bye,\xint_bye,\xint_bye,%
- \xint_relax
+ \xint:
}%
\long\def\XINT_reverse:f:csv_loop #1#2,#3,#4,#5,#6,#7,#8,#9,%
{%
\xint_bye #9\XINT_reverse:f:csv_cleanup\xint_bye
\XINT_reverse:f:csv_loop {,#9,#8,#7,#6,#5,#4,#3,#2#1}%
}%
-\long\def\XINT_reverse:f:csv_cleanup\xint_bye\XINT_reverse:f:csv_loop #1#2\xint_relax
+\long\def\XINT_reverse:f:csv_cleanup\xint_bye\XINT_reverse:f:csv_loop #1#2\xint:
{%
\XINT_reverse:f:csv_finish #1%
}%
-\long\def\XINT_reverse:f:csv_finish #1\xint_relax,{ }%
+\long\def\XINT_reverse:f:csv_finish #1\xint:,{ }%
\def\xintFirstItem:f:csv {\romannumeral0\xintfirstitem:f:csv}%
\long\def\xintfirstitem:f:csv #1%
{%
@@ -1420,15 +1428,15 @@
{%
\expandafter\XINT_last:f:csv_loop\expandafter{\expandafter}\expandafter.%
\romannumeral`&&@#1,%
- \xint_relax\XINT_last_loop_enda,\xint_relax\XINT_last_loop_endb,%
- \xint_relax\XINT_last_loop_endc,\xint_relax\XINT_last_loop_endd,%
- \xint_relax\XINT_last_loop_ende,\xint_relax\XINT_last_loop_endf,%
- \xint_relax\XINT_last_loop_endg,\xint_relax\XINT_last_loop_endh,\xint_bye
+ \xint:\XINT_last_loop_enda,\xint:\XINT_last_loop_endb,%
+ \xint:\XINT_last_loop_endc,\xint:\XINT_last_loop_endd,%
+ \xint:\XINT_last_loop_ende,\xint:\XINT_last_loop_endf,%
+ \xint:\XINT_last_loop_endg,\xint:\XINT_last_loop_endh,\xint_bye
}%
\long\def\XINT_last:f:csv_loop #1.#2,#3,#4,#5,#6,#7,#8,#9,%
{%
- \xint_gob_til_xint_relax #9%
- {#8}{#7}{#6}{#5}{#4}{#3}{#2}{#1}\xint_relax
+ \xint_gob_til_xint: #9%
+ {#8}{#7}{#6}{#5}{#4}{#3}{#2}{#1}\xint:
\XINT_last:f:csv_loop {#9}.%
}%
\let\xintCSVLength \xintLength:f:csv