diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xint.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintbinhex.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintcfrac.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintcore.sty | 244 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintexpr.sty | 596 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintfrac.sty | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintgcd.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintkernel.sty | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintseries.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xinttools.sty | 4 |
10 files changed, 456 insertions, 425 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty index 14671472592..c7b57397a2a 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xint: Expandable operations on big integers %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty (loaded by xintcore.sty) \XINT_providespackage \ProvidesPackage{xint}% - [2015/10/29 v1.2b Expandable operations on big integers (jfB)]% + [2015/11/16 v1.2c 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}% diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty index 8ca075ad991..18ade28b6f0 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xintbinhex: Expandable binary and hexadecimal conversions %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintbinhex}% - [2015/10/29 v1.2b Expandable binary and hexadecimal conversions (jfB)]% + [2015/11/16 v1.2c Expandable binary and hexadecimal conversions (jfB)]% \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 diff --git a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty index ae235d35433..8200fd55c32 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xintcfrac: Expandable continued fractions with xint package %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcfrac}% - [2015/10/29 v1.2b Expandable continued fractions with xint package (jfB)]% + [2015/11/16 v1.2c Expandable continued fractions with xint package (jfB)]% \def\xintCFrac {\romannumeral0\xintcfrac }% \def\xintcfrac #1% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintcore.sty b/Master/texmf-dist/tex/generic/xint/xintcore.sty index c6a06b1a974..243794986a4 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xintcore: Expandable arithmetic on big integers %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcore}% - [2015/10/29 v1.2b Expandable arithmetic on big integers (jfB)]% + [2015/11/16 v1.2c Expandable arithmetic on big integers (jfB)]% \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 @@ -194,6 +194,18 @@ {\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 @@ -263,19 +275,6 @@ }% \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_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_microrevsep #1#2#3#4#5#6#7#8% {% 1#8#7#6#5#4#3#2#1\expandafter!\the\numexpr\XINT_microrevsep @@ -504,9 +503,9 @@ #1\XINT_rsepbyviii_end_A 2345678% \XINT_rsepbyviii_end_B 2345678\relax XX% \R.\R.\R.\R.\R.\R.\R.\R.\W - \Z!\Z!\Z!\Z!\Z!\W + \Z!\Z!\Z!\Z!\W }% -\def\XINT_dec_pos_aa {\XINT_sub_aa 100000001!\Z!\Z!\Z!\Z!\Z!\W }% +\def\XINT_dec_pos_aa {\XINT_sub_aa 100000001!\Z!\Z!\Z!\Z!\W }% \def\xintInc {\romannumeral0\xintinc }% \def\xintinc #1% {% @@ -530,9 +529,10 @@ #1\XINT_rsepbyviii_end_A 2345678% \XINT_rsepbyviii_end_B 2345678\relax XX% \R.\R.\R.\R.\R.\R.\R.\R.\W - \Z!\Z!\Z!\Z!\Z!\W + 1\Z!1\Z!1\Z!1\Z!1\Z!\W + 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W }% -\def\XINT_inc_pos_aa {\XINT_add_aa 100000001!\Z!\Z!\Z!\Z!\Z!\W }% +\def\XINT_inc_pos_aa {\XINT_add_aa 100000001!1\Z!1\Z!1\Z!1\Z!\W }% \def\xintiAdd {\romannumeral0\xintiadd }% \def\xintiadd #1{\expandafter\XINT_iadd\romannumeral0\xintnum{#1}\Z }% \def\xintiiAdd {\romannumeral0\xintiiadd }% @@ -589,7 +589,8 @@ \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 + 1\Z!1\Z!1\Z!1\Z!\W #21\Z!1\Z!1\Z!1\Z!\W + 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W }% \def\XINT_add_checklengths #1.#2.% {% @@ -600,43 +601,32 @@ \fi #1.#2.% }% -\def\XINT_add_exchange #1.#2.#3\Z!\Z!\Z!\Z!\Z!\W #4\Z +\def\XINT_add_exchange #1.#2.#3\W #4\W {% - \XINT_add_A #2.#1.#4\Z!\Z!\Z!\Z!\Z!\W #3\Z + \XINT_add_A #2.#1.#4\W #3\W }% \def\XINT_add_A #1.#2.% {% - \ifnum #1>\xint_c_vi % + \ifnum #1>\xint_c_vi \expandafter\XINT_add_aa \else \expandafter\XINT_add_aa_small \fi }% -%%%%%%%%%%%% -\def\XINT_add_out #1\Z #2\W% -{% - \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 -}% -\def\XINT_add_out_small #1\Z #2\W% -{% - \XINT_smallunrevbyviii #11\Z!1\R!1\R!1\R!1\R!1\R!1\R!\W -}% -%%%%%%%%%%%% \def\XINT_add_aa {\expandafter\XINT_add_out\the\numexpr\XINT_add_a \xint_c_ii}% +\def\XINT_add_out{\expandafter\XINT_cuz_small\romannumeral0\XINT_unrevbyviii {}}% \def\XINT_add_aa_small - {\expandafter\XINT_add_out_small\the\numexpr\XINT_add_a \xint_c_ii}% + {\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!% {% \XINT_add_b #1!#6!#2!#7!#3!#8!#4!#9!#5\W }% -\def\XINT_add_b #1#2!#3!% +\def\XINT_add_b #11#2#3!#4!% {% \xint_gob_til_Z #2\XINT_add_bi \Z - \expandafter\XINT_add_c\the\numexpr#1+#2+#3-\xint_c_ii.% + \expandafter\XINT_add_c\the\numexpr#1+1#2#3+#4-\xint_c_ii.% }% -\def\XINT_add_bi\Z - \expandafter\XINT_add_c - \the\numexpr#1+#2+#3-\xint_c_ii.#4!#5!#6!#7!#8!#9!\Z !\W +\def\XINT_add_bi\Z\expandafter\XINT_add_c + \the\numexpr#1+#2+#3-\xint_c_ii.#4!#5!#6!#7!#8!#9!\W {% \XINT_add_k #1#3!#5!#7!#9!% }% @@ -644,10 +634,10 @@ {% 1#2\expandafter!\the\numexpr\XINT_add_d #1% }% -\def\XINT_add_d #1#2!#3!% +\def\XINT_add_d #11#2#3!#4!% {% \xint_gob_til_Z #2\XINT_add_di \Z - \expandafter\XINT_add_e\the\numexpr#1+#2+#3-\xint_c_ii.% + \expandafter\XINT_add_e\the\numexpr#1+1#2#3+#4-\xint_c_ii.% }% \def\XINT_add_di\Z\expandafter\XINT_add_e \the\numexpr#1+#2+#3-\xint_c_ii.#4!#5!#6!#7!#8\W @@ -658,10 +648,10 @@ {% 1#2\expandafter!\the\numexpr\XINT_add_f #1% }% -\def\XINT_add_f #1#2!#3!% +\def\XINT_add_f #11#2#3!#4!% {% \xint_gob_til_Z #2\XINT_add_fi \Z - \expandafter\XINT_add_g\the\numexpr#1+#2+#3-\xint_c_ii.% + \expandafter\XINT_add_g\the\numexpr#1+1#2#3+#4-\xint_c_ii.% }% \def\XINT_add_fi\Z\expandafter\XINT_add_g \the\numexpr#1+#2+#3-\xint_c_ii.#4!#5!#6\W @@ -672,10 +662,10 @@ {% 1#2\expandafter!\the\numexpr\XINT_add_h #1% }% -\def\XINT_add_h #1#2!#3!% +\def\XINT_add_h #11#2#3!#4!% {% \xint_gob_til_Z #2\XINT_add_hi \Z - \expandafter\XINT_add_i\the\numexpr#1+#2+#3-\xint_c_ii.% + \expandafter\XINT_add_i\the\numexpr#1+1#2#3+#4-\xint_c_ii.% }% \def\XINT_add_hi\Z \expandafter\XINT_add_i\the\numexpr#1+#2+#3-\xint_c_ii.#4\W @@ -686,29 +676,14 @@ {% 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 #1% -{% - \xint_gob_til_Z #1\XINT_add_kf\Z 1% -}% -\def\XINT_add_kf\Z 1{1}% -\def\XINT_add_l #1% -{% - \xint_gob_til_Z #1\XINT_add_lf\Z \XINT_add_m 1% -}% -\def\XINT_add_lf\Z\XINT_add_m 1{100000001}% -\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_o #1% - {\if #12\expandafter\XINT_add_l\else\expandafter\XINT_add_ke \fi}% +\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_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_o #1{\if #12\expandafter\XINT_add_l\else\expandafter\XINT_add_ke \fi}% \def\xintiiSub {\romannumeral0\xintiisub }% \def\xintiisub #1{\expandafter\XINT_iisub\romannumeral`&&@#1\Z }% \def\XINT_iisub #1#2\Z #3% @@ -764,7 +739,7 @@ \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 + \Z!\Z!\Z!\Z!\W #2\Z!\Z!\Z!\Z!\W }% \def\XINT_sub_checklengths #1.#2.% {% @@ -774,15 +749,10 @@ \expandafter\XINT_sub_aa \fi }% -\def\XINT_sub_exchange #1\Z!\Z!\Z!\Z!\Z!\W #2\Z +\def\XINT_sub_exchange #1\W #2\W {% - \expandafter\XINT_opp\romannumeral0\XINT_sub_aa - #2\Z!\Z!\Z!\Z!\Z!\W #1\Z + \expandafter\XINT_opp\romannumeral0\XINT_sub_aa #2\W #1\W }% -%%%%%%%%%%%% -\def\XINT_sub_prepare_rescue #1\W {\relax\Z-\W}% -\def\XINT_sub_prepare_cuz #1\W {\relax\XINT_cuz_byviii!\Z 0\W\R}% -%%%%%%%%%%%% \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 {% @@ -790,31 +760,6 @@ \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 }% -\def\XINT_sub_startrescue\expandafter\XINT_cuz_small - \romannumeral0\XINT_unrevbyviii #1#2\Z!#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.% -}% -\def\XINT_sub_rescue_c 1#1#2.% -{% - 1#2\expandafter!\the\numexpr\XINT_sub_rescue_d #1% -}% -\def\XINT_sub_rescue_d #1#2#3!% -{% - \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.% -}% -\def\XINT_sub_rescue_z #1.{1!}% -%%%%%%%%%%%% \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 @@ -856,7 +801,7 @@ 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!\Z !\W + \expandafter\XINT_sub_c\the\numexpr#1+1#2-#3.#4!#5!#6!#7!#8!#9!\W {% \XINT_sub_k #1#2!#5!#7!#9!% }% @@ -875,43 +820,51 @@ {% \XINT_sub_k #1#2!% }% -%%%%%%%%%%%% \def\XINT_sub_k #1#2% {% \xint_gob_til_Z #2\XINT_sub_p\Z \XINT_sub_l #1#2% }% -\def\XINT_sub_l #1% -{% - \xint_UDzerofork - #1\XINT_sub_m - 0{}% - \krof -}% -\def\XINT_sub_m #1!% +\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_carry #1!{\expandafter\XINT_sub_m\the\numexpr 1#1-\xint_c_i!}% +\def\XINT_sub_m 1#1{\xint_UDzerofork #1\XINT_sub_n_carry 0\XINT_sub_n_nocarry\krof}% +\def\XINT_sub_n_carry #1!{1#1\expandafter!\the\numexpr\XINT_sub_l_carry }% +\def\XINT_sub_n_nocarry #1!#2#3!% {% - \expandafter\XINT_sub_n\the\numexpr 1#1-\xint_c_i!% + \xint_gob_til_Z #2\xint_gob_til_eightzeroes #1\XINT_sub_n_zero + 00000000\xint_gob_til_Z\Z 1\relax #1!#2#3!% }% -\def\XINT_sub_n 1#1% +\def\XINT_sub_n_zero 00000000\xint_gob_til_Z\Z 1\relax 00000000!{1!}% +\def\XINT_sub_p\Z\XINT_sub_l #1#2\W {% \xint_UDzerofork - #1{\XINT_sub_o}% - 0{\XINT_sub_n_checkzero}% + #1{-1\relax\Z -\W}% + 0{1\relax \XINT_cuz_byviii!\Z 0\W\R }% \krof }% -\def\XINT_sub_o #1!{1#1\expandafter!\the\numexpr\XINT_sub_m }% -\def\XINT_sub_n_checkzero #1!% +\def\XINT_sub_startrescue\expandafter\XINT_cuz_small + \romannumeral0\XINT_unrevbyviii #1#2\Z!#3\W {% - \xint_gob_til_eightzeroes #1\XINT_sub_n_prepare_cuz 00000000% - 1#1!% + \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_n_prepare_cuz 00000000100000000{1\XINT_sub_prepare_cuz}% -\def\XINT_sub_p\Z\XINT_sub_l #1\Z!% +\def\XINT_sub_rescue_finish + {\expandafter-\romannumeral0\expandafter\XINT_cuz\romannumeral0\XINT_unrevbyviii {}}% +\def\XINT_sub_rescue_a #1!% {% - \xint_UDzerofork - #1{-1\XINT_sub_prepare_rescue}% - 0{1\XINT_sub_prepare_cuz }% - \krof + \expandafter\XINT_sub_rescue_c\the\numexpr \xint_c_xii_e_viii-#1.% +}% +\def\XINT_sub_rescue_c 1#1#2.% +{% + 1#2\expandafter!\the\numexpr\XINT_sub_rescue_d #1% +}% +\def\XINT_sub_rescue_d #1#2#3!% +{% + \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.% }% +\def\XINT_sub_rescue_z #1.{1!}% \def\xintiMul {\romannumeral0\xintimul }% \def\xintimul #1% {% @@ -1009,22 +962,22 @@ \def\XINT_mul_exchange #1\XINT_mul_start #2\W #31\Z!% {\fi\fi\XINT_mul_start #31\Z!\W #2}% \def\XINT_mul_start - {\expandafter\XINT_mul_out\the\numexpr\XINT_mul_loop 100000000!\Z\W}% + {\expandafter\XINT_mul_out\the\numexpr\XINT_mul_loop 100000000!1\Z!\W}% \def\XINT_mul_out {\expandafter\XINT_cuz_small\romannumeral0\XINT_unrevbyviii {}}% -\def\XINT_mul_loop #1\Z #2\W #3\W 1#4!% +\def\XINT_mul_loop #1\W #2\W 1#3!% {% - \xint_gob_til_Z #4\XINT_mul_e \Z - \expandafter\XINT_mul_a\the\numexpr \XINT_smallmul 1#4!#3\W - #11!\W #3\W + \xint_gob_til_Z #3\XINT_mul_e \Z + \expandafter\XINT_mul_a\the\numexpr \XINT_smallmul 1#3!#2\W + #1\W #2\W }% -\def\XINT_mul_a #11\Z!\W #2!1!#3\W +\def\XINT_mul_a #1\W #2\W {% \expandafter\XINT_mul_b\the\numexpr - \XINT_add_a \xint_c_ii #2!\Z!\Z!\Z!\Z!\Z!\W #1\Z!\Z!\Z!\Z!\Z!\W + \XINT_add_a \xint_c_ii #21\Z!1\Z!1\Z!\W #11\Z!1\Z!1\Z!\W\W }% \def\XINT_mul_b 1#1!{1#1\expandafter!\the\numexpr\XINT_mul_loop }% -\def\XINT_mul_e\Z #1\W #2!1!#3\W #4\W {#2!1\Z!}% +\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.% {% \expandafter\XINT_minimulwc_b @@ -1128,7 +1081,7 @@ \def\XINT_sqr_start #1\Z {% \expandafter\XINT_mul_out - \the\numexpr\XINT_mul_loop 100000000!\Z\W #11\Z!\W #11\Z!% + \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 }% @@ -1202,7 +1155,6 @@ \edef\XINT_pow_BisNegative #1#2% {\noexpand\xintError:FractionRoundedToZero\space 0}% \def\XINT_pow_BisZero #1#2{ 1}% -%%%%%%%%%%%% \def\XINT_pow_I_in #1#2% {% \expandafter\XINT_pow_I_loop @@ -1230,17 +1182,15 @@ \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!\Z\W #1!1#2% + \XINT_mul_loop 100000000!1\Z!\W #1!1#2% }% -\def\XINT_pow_mul_small\Z\XINT_mul_loop 100000000!\Z\W 1#1!1\Z!\W +\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 @@ -2047,28 +1997,28 @@ \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 XX% \R.\R.\R.\R.\R.\R.\R.\R.\W - \Z!\Z!\Z!\Z!\Z!\W + 1\Z!1\Z!1\Z!1\Z!\W\R }% -\def\XINT_iidivround_pos_b 1#1#2#3#4#5#6#7#8!#9% +\def\XINT_iidivround_pos_b 1#1#2#3#4#5#6#7#8!1#9% {% \xint_gob_til_Z #9\XINT_iidivround_small\Z \ifnum #8>\xint_c_iv \expandafter\XINT_iidivround_pos_up \else \expandafter\XINT_iidivround_pos_finish \fi - 1#1#2#3#4#5#6#70!#9% + 1#1#2#3#4#5#6#70!1#9% }% \def\XINT_iidivround_pos_up {% \expandafter\XINT_iidivround_pos_finish - \the\numexpr\XINT_add_a\xint_c_ii 100000010!\Z!\Z!\Z!\Z!\Z!\W + \the\numexpr\XINT_add_a\xint_c_ii 100000010!1\Z!1\Z!1\Z!1\Z!\W }% -\def\XINT_iidivround_pos_finish #10!#2\Z #3\W +\def\XINT_iidivround_pos_finish #10!#2\R {% \expandafter\XINT_cuz_small\romannumeral0\XINT_unrevbyviii {}% - #1!#21\Z!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W + #1!#21\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W }% -\def\XINT_iidivround_small\Z\ifnum #1>#2\fi 1#30!#4\W +\def\XINT_iidivround_small\Z\ifnum #1>#2\fi 1#30!#4\W\R {% \ifnum #1>\xint_c_iv \expandafter\XINT_iidivround_small_up diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty index f9c5cef5e39..e8ce94fce56 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xintexpr: Expandable expression parser %% --------------------------------------------------------------- @@ -81,7 +81,7 @@ \XINTsetupcatcodes% \XINT_providespackage \ProvidesPackage{xintexpr}% - [2015/10/29 v1.2b Expandable expression parser (jfB)]% + [2015/11/16 v1.2c 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 @@ -136,6 +136,9 @@ {\expandafter\XINT_flexpr_until_end_a\romannumeral`&&@\XINT_expr_getnext }% \def\xintbareiieval {\expandafter\XINT_iiexpr_until_end_a\romannumeral`&&@\XINT_expr_getnext }% +\def\xintthebareeval {\expandafter\XINT_expr_unlock\romannumeral0\xintbareeval}% +\def\xintthebarefloateval {\expandafter\XINT_expr_unlock\romannumeral0\xintbarefloateval}% +\def\xintthebareiieval {\expandafter\XINT_expr_unlock\romannumeral0\xintbareiieval}% \def\xinteval {\expandafter\XINT_expr_wrap\romannumeral0\xintbareeval }% \def\xintiieval {\expandafter\XINT_iiexpr_wrap\romannumeral0\xintbareiieval }% \def\xintieval #1% @@ -297,6 +300,7 @@ \ifnum \xint_c_ix<1#1 \xint_dothis \XINT_expr_startint\fi \xint_orthat \XINT_expr_scanfunc #1% }% +\def\XINT_expr_onlitteral_` #1#2#3({\xint_c_xviii `{#2}}% \catcode96 12 % ` \def\XINT_expr_startint #1% {% @@ -524,13 +528,7 @@ \xint_orthat {(_}% #1% }% -\def\XINT_expr_func #1(#2% -{% #2=` pour une fonction, #2=_ pour une variable - \if #2`\ifcsname XINT_expr_var_#1\endcsname - \expandafter\expandafter\expandafter\xint_thirdofthree - \fi\fi - \xint_firstoftwo {\xint_c_xviii #2{#1}}{\xint_c_xviii _{#1}*(}% -}% +\def\XINT_expr_func #1(#2{\xint_c_xviii #2{#1}}% \def\XINT_expr_getop #1#2% this #1 is the current locked computed value {% \expandafter\XINT_expr_getop_a\expandafter #1\romannumeral`&&@#2% @@ -604,10 +602,7 @@ }% \def#2##1##2% {% - \ifcase ##1\xint_afterfi - {\ifx\XINT_expr_itself_^C ##2\xint_dothis - {\expandafter#1\romannumeral`&&@\expandafter\XINT_expr_getnext\xint_gobble_i}\fi - \xint_orthat \XINT_expr_done }% + \ifcase ##1\expandafter\XINT_expr_done \or\xint_afterfi{\XINT_expr_extra_) \expandafter #1\romannumeral`&&@\XINT_expr_getop }% \else @@ -631,9 +626,7 @@ ##1{\expandafter #3\romannumeral`&&@#5}% -{#4##1}% \krof }% - \def #4##1##2{\ifcase ##1% - \xint_afterfi{\ifx\XINT_expr_itself_^C ##2\xint_dothis{\xint_c_ ##2}\fi - \xint_orthat\XINT_expr_missing_) }% + \def #4##1##2{\ifcase ##1\expandafter\XINT_expr_missing_) \or \csname XINT_#6_op_##2\expandafter\endcsname \else \xint_afterfi{\expandafter #3\romannumeral`&&@\csname XINT_#6_op_##2\endcsname }% @@ -655,7 +648,7 @@ \expandafter\let\csname XINT_expr_precedence_]\endcsname\xint_c_i \expandafter\let\csname XINT_expr_precedence_;\endcsname\xint_c_i \let\XINT_expr_precedence_a \xint_c_xviii -\expandafter\let\csname XINT_expr_precedence_^C\endcsname \xint_c_ +\let\XINT_expr_precedence_!? \xint_c_ii \expandafter\let\csname XINT_expr_precedence_++)\endcsname \xint_c_i \catcode`. 11 \catcode`= 11 \catcode`+ 11 \xintFor #1 in {expr,flexpr,iiexpr} \do {% @@ -665,13 +658,13 @@ \expandafter\let\csname XINT_#1_op_a\endcsname \XINT_expr_getop \expandafter\def\csname XINT_#1_op_++)\endcsname ##1##2\relax {\expandafter\XINT_expr_foundend \expandafter - {\expandafter\.=+\xintiCeil{\XINT_expr_unlock ##1}}}% + {\expandafter\.=+\csname .=\xintiCeil{\XINT_expr_unlock ##1}\endcsname }}% }% \catcode`. 12 \catcode`= 12 \catcode`+ 12 \catcode`& 12 \xintFor* #1 in {{==}{<=}{>=}{!=}{&&}{||}{**}{//}{/:}{..}{..[}{].}{]..}% {+[}{-[}{*[}{/[}{**[}{^[}{a+}{a-}{a*}{a/}{a**}{a^}% - {][}{][:}{:]}{^C}{++}{++)}} + {][}{][:}{:]}{!?}{++}{++)}} \do {\expandafter\def\csname XINT_expr_itself_#1\endcsname {#1}}% \catcode`& 7 \def\XINT_tmpc #1#2#3#4#5#6#7#8% @@ -935,8 +928,8 @@ \else \xint_afterfi {\expandafter ##2\expandafter ##3\csname - .=\expandafter\xintListSel:csv \romannumeral`&&@\XINT_expr_unlock ##4;% - \XINT_expr_unlock ##1;\endcsname % unlock for \xintNewExpr + .=\expandafter\xintListSel::csv \romannumeral`&&@\XINT_expr_unlock ##4;% + \XINT_expr_unlock ##1;\endcsname % unlock added for \xintNewExpr }% \fi }% @@ -997,7 +990,7 @@ \let\XINT_flexpr_op_][: \XINT_expr_op_][: \let\XINT_iiexpr_op_][: \XINT_expr_op_][: \catcode`[ 12 \catcode`] 12 -\def\xintListSel:csv #1{% +\def\xintListSel::csv #1{% \if ]\noexpand#1\xint_dothis{\expandafter\XINT_listsel:_s\romannumeral`&&@}\fi \if :\noexpand#1\xint_dothis{\XINT_listsel:_:}\fi \xint_orthat {\XINT_listsel:_nth #1}% @@ -1013,19 +1006,11 @@ {\xintNthElt {\xintNum{#1}}{\xintCSVtoListNonStripped{#2}}}% \def\XINT_listsel:_PP #1;#2;#3;% {\xintListWithSep,% - {\xintTrim {\xintNum{#1}}% - {\xintKeep {\xintNum{#2}}% - {\xintCSVtoListNonStripped{#3}}% - }% - }% + {\xintTrim {\xintNum{#1}}{\xintKeep {\xintNum{#2}}{\xintCSVtoListNonStripped{#3}}}}% }% \def\XINT_listsel:_NN #1;#2;#3;% {\xintListWithSep,% - {\xintTrim {\xintNum{#2}}% - {\xintKeep {\xintNum{#1}}% - {\xintCSVtoListNonStripped{#3}}% - }% - }% + {\xintTrim {\xintNum{#2}}{\xintKeep {\xintNum{#1}}{\xintCSVtoListNonStripped{#3}}}}% }% \def\XINT_listsel:_NP #1;#2;#3;% {\expandafter\XINT_listsel:_NP_a \the\numexpr #1+% @@ -1117,10 +1102,8 @@ \def\xintSeqA::csv #1% {\expandafter\XINT_seqa::csv\expandafter{\romannumeral0\xintraw {#1}}}% \def\XINT_seqa::csv #1#2{\expandafter\XINT_seqa::csv_a \romannumeral0\xintraw {#2};#1;}% -\def\xintiiSeqA::csv #1#2{\XINT_iiseqa::csv #1#2}% -\def\XINT_iiseqa::csv #1#2#3#4{\expandafter\XINT_seqa::csv_a - \romannumeral`&&@\expandafter \XINT_expr_unlock\expandafter#4% - \expandafter;\romannumeral`&&@\XINT_expr_unlock #2;}% +\def\xintiiSeqA::csv #1{\expandafter\XINT_iiseqa::csv\expandafter{\romannumeral`&&@#1}}% +\def\XINT_iiseqa::csv #1#2{\expandafter\XINT_seqa::csv_a\romannumeral`&&@#2;#1;}% \def\XINTinFloatSeqA::csv #1{\expandafter\XINT_flseqa::csv\expandafter {\romannumeral0\XINTinfloat [\XINTdigits]{#1}}}% \def\XINT_flseqa::csv #1#2% @@ -1293,8 +1276,7 @@ \else \expandafter\xint_secondoftwo \fi - {\expandafter\expandafter\expandafter\expandafter - \expandafter\expandafter\expandafter + {\expandafter\expandafter\expandafter \XINT_expr_getop\csname XINT_expr_var_#1\endcsname}% {\XINT_expr_unknown_variable {#1}% \expandafter\XINT_expr_getop\csname .=0\endcsname}% @@ -1303,37 +1285,81 @@ \let\XINT_flexpr_op__ \XINT_expr_op__ \let\XINT_iiexpr_op__ \XINT_expr_op__ \catcode`: 12 -\def\xintdefvar #1:=#2;{\expandafter\odef - \csname XINT_expr_var_\xint_zapspaces #1 \xint_gobble_i\endcsname - {\expandafter\empty\romannumeral0\xintbareeval #2\relax }}% -\def\xintdefiivar #1:=#2;{\expandafter\odef - \csname XINT_expr_var_\xint_zapspaces #1 \xint_gobble_i\endcsname - {\expandafter\empty\romannumeral0\xintbareiieval #2\relax }% -}% -\def\xintdeffloatvar #1:=#2;{\expandafter\odef - \csname XINT_expr_var_\xint_zapspaces #1 \xint_gobble_i\endcsname - {\expandafter\empty\romannumeral0\xintbarefloateval #2\relax }% +\def\xintdefvar #1:=#2;{% + \edef\XINT_expr_tmpa{#1}% + \edef\XINT_expr_tmpa + {\expandafter\xint_zapspaces\detokenize\expandafter{\XINT_expr_tmpa} \xint_gobble_i}% + \edef\XINT_expr_tmpb {\romannumeral0\xintbareeval #2\relax }% + \ifxintverbose\xintMessage {info}{xintexpr} + {Variable \XINT_expr_tmpa\space defined with value + \expandafter\XINT_expr_unlock\XINT_expr_tmpb.}% + \fi + \expandafter\edef\csname XINT_expr_var_\XINT_expr_tmpa\endcsname + {\expandafter\noexpand\XINT_expr_tmpb}% + \expandafter\edef\csname XINT_expr_onlitteral_\XINT_expr_tmpa\endcsname + {\noexpand\XINT_expr_getop\expandafter\noexpand\XINT_expr_tmpb *(}% +}% +\def\xintdefiivar #1:=#2;{% + \edef\XINT_expr_tmpa{#1}% + \edef\XINT_expr_tmpa + {\expandafter\xint_zapspaces\detokenize\expandafter{\XINT_expr_tmpa} \xint_gobble_i}% + \edef\XINT_expr_tmpb {\romannumeral0\xintbareiieval #2\relax }% + \ifxintverbose\xintMessage {info}{xintexpr} + {Variable \XINT_expr_tmpa\space defined with value + \expandafter\XINT_expr_unlock\XINT_expr_tmpb.}% + \fi + \expandafter\edef\csname XINT_expr_var_\XINT_expr_tmpa\endcsname + {\expandafter\noexpand\XINT_expr_tmpb}% + \expandafter\edef\csname XINT_expr_onlitteral_\XINT_expr_tmpa\endcsname + {\noexpand\XINT_expr_getop\expandafter\noexpand\XINT_expr_tmpb *(}% +}% +\def\xintdeffloatvar #1:=#2;{% + \edef\XINT_expr_tmpa{#1}% + \edef\XINT_expr_tmpa + {\expandafter\xint_zapspaces\detokenize\expandafter{\XINT_expr_tmpa} + \xint_gobble_i}% + \edef\XINT_expr_tmpb {\romannumeral0\xintbarefloateval #2\relax }% + \ifxintverbose\xintMessage {info}{xintexpr} + {Variable \XINT_expr_tmpa\space defined with value + \expandafter\XINT_expr_unlock\XINT_expr_tmpb.}% + \fi + \expandafter\edef\csname XINT_expr_var_\XINT_expr_tmpa\endcsname + {\expandafter\noexpand\XINT_expr_tmpb}% + \expandafter\edef\csname XINT_expr_onlitteral_\XINT_expr_tmpa\endcsname + {\noexpand\XINT_expr_getop\expandafter\noexpand\XINT_expr_tmpb *(}% }% \catcode`: 11 \def\XINT_tmpa #1% {% \expandafter\def\csname XINT_expr_var_#1\endcsname ##1\relax !#1##2% - {\romannumeral0\XINT_expr_lockscan ##2!##1\relax !#1{##2}}% + {##2##1\relax !#1##2}% + \expandafter\def\csname XINT_expr_onlitteral_#1\endcsname ##1\relax !#1##2% + {\XINT_expr_getop ##2*(##1\relax !#1##2}% }% \xintApplyUnbraced \XINT_tmpa {abcdefghijklmnopqrstuvwxyz}% \xintApplyUnbraced \XINT_tmpa {ABCDEFGHIJKLMNOPQRSTUVWXYZ}% -\expandafter\def\expandafter\XINT_expr_var_nil\expandafter - {\expandafter\empty\csname .= \endcsname}% -\catcode`. 11 \catcode`= 11 -\def\XINT_expr_var_omit #1\relax !{1^C!{}{}{}\.=!\relax !}% 24 juin -\def\XINT_expr_var_abort #1\relax !{1^C!{}{}{}\.=^\relax !}% 25 juin -\catcode`. 12 \catcode`= 12 +\edef\XINT_expr_var_nil {\expandafter\noexpand\csname .= \endcsname}% +\edef\XINT_expr_onlitteral_nil + {\noexpand\XINT_expr_getop\expandafter\noexpand\csname .= \endcsname *(}% +\edef\XINT_expr_var_omit #1\relax !{1\string !?!\relax !}% +\edef\XINT_expr_var_abort #1\relax !{1\string !?^\relax !}% +\def\XINT_expr_op_!? #1#2\relax {\expandafter\XINT_expr_foundend\csname .=#2\endcsname}% +\let\XINT_iiexpr_op_!? \XINT_expr_op_!? +\let\XINT_flexpr_op_!? \XINT_expr_op_!? \catcode`? 3 -\def\XINT_expr_var_@ #1~#2{ #2#1~#2}% +\def\XINT_expr_var_@ #1~#2{#2#1~#2}% \expandafter\let\csname XINT_expr_var_@1\endcsname \XINT_expr_var_@ -\expandafter\def\csname XINT_expr_var_@2\endcsname #1~#2#3{ #3#1~#2#3}% -\expandafter\def\csname XINT_expr_var_@3\endcsname #1~#2#3#4{ #4#1~#2#3#4}% -\expandafter\def\csname XINT_expr_var_@4\endcsname #1~#2#3#4#5{ #5#1~#2#3#4#5}% +\expandafter\def\csname XINT_expr_var_@2\endcsname #1~#2#3{#3#1~#2#3}% +\expandafter\def\csname XINT_expr_var_@3\endcsname #1~#2#3#4{#4#1~#2#3#4}% +\expandafter\def\csname XINT_expr_var_@4\endcsname #1~#2#3#4#5{#5#1~#2#3#4#5}% +\def\XINT_expr_onlitteral_@ #1~#2{\XINT_expr_getop #2*(#1~#2}% +\expandafter\let\csname XINT_expr_onlitteral_@1\endcsname \XINT_expr_onlitteral_@ +\expandafter\def\csname XINT_expr_onlitteral_@2\endcsname #1~#2#3% + {\XINT_expr_getop #3*(#1~#2#3}% +\expandafter\def\csname XINT_expr_onlitteral_@3\endcsname #1~#2#3#4% + {\XINT_expr_getop #4*(#1~#2#3#4}% +\expandafter\def\csname XINT_expr_onlitteral_@4\endcsname #1~#2#3#4#5% + {\XINT_expr_getop #5*(#1~#2#3#4#5}% \def\XINT_expr_func_@@ #1#2#3#4~#5?% {% \expandafter#1\expandafter#2\romannumeral0\xintntheltnoexpand @@ -1369,13 +1395,13 @@ }% \catcode`? 11 \def\XINT_tmpa #1#2#3{% - \def #1##1% \XINT_expr_op_`, #2=\XINT_expr_oparen + \def #1##1% {% - \ifcsname XINT_expr_onlitteral_##1\endcsname - \xint_dothis{\csname XINT_expr_onlitteral_##1\endcsname}\fi \ifcsname XINT_#3_func_##1\endcsname \xint_dothis{\expandafter\expandafter \csname XINT_#3_func_##1\endcsname\romannumeral`&&@#2}\fi + \ifcsname XINT_expr_onlitteral_##1\endcsname + \xint_dothis{\csname XINT_expr_onlitteral_##1\endcsname}\fi \xint_orthat{\XINT_expr_unknown_function {##1}% \expandafter\XINT_expr_func_unknown\romannumeral`&&@#2}% }% @@ -1387,15 +1413,14 @@ \csname XINT_#1_oparen\endcsname {#1}% }% -\expandafter\def\csname XINT_expr_onlitteral_`\endcsname #1#2#3({\xint_c_xviii `{#2}}% +\def\XINT_expr_func_unknown #1#2#3% + {\expandafter #1\expandafter #2\csname .=0\endcsname }% \def\XINT_expr_onlitteral_bool #1)% {\expandafter\XINT_expr_getop\csname .=\xintBool{#1}\endcsname }% \def\XINT_expr_onlitteral_togl #1)% {\expandafter\XINT_expr_getop\csname .=\xintToggle{#1}\endcsname }% \def\XINT_expr_onlitteral_protect #1)% {\expandafter\XINT_expr_getop\csname .=\detokenize{#1}\endcsname }% -\def\XINT_expr_func_unknown #1#2#3% - {\expandafter #1\expandafter #2\csname .=0\endcsname }% \def\XINT_expr_func_break #1#2#3% {\expandafter #1\expandafter #2\csname.=?\romannumeral`&&@\XINT_expr_unlock #3\endcsname }% \let\XINT_flexpr_func_break \XINT_expr_func_break @@ -1441,82 +1466,83 @@ \def\XINT_isbalanced_d #1)#2% {\xint_bye #2\XINT_isbalanced_no\xint_bye\XINT_isbalanced_a #1#2}% \def\XINT_isbalanced_no\xint_bye #1\xint_bye\xint_bye {\xint_c_i }% -\def\XINT_expr_func_seqx #1#2{\XINT_allexpr_seqx \xintbareeval }% -\def\XINT_flexpr_func_seqx #1#2{\XINT_allexpr_seqx \xintbarefloateval}% -\def\XINT_iiexpr_func_seqx #1#2{\XINT_allexpr_seqx \xintbareiieval }% -\def\XINT_allexpr_seqx #1#2#3#4% #2 is the index list, fully evaluated and encapsulated -{% #3 is the Latin letter serving as dummy variable, #4 is the expression to evaluate +\def\XINT_expr_func_seqx #1#2{\XINT_allexpr_seqx \xintthebareeval }% +\def\XINT_flexpr_func_seqx #1#2{\XINT_allexpr_seqx \xintthebarefloateval}% +\def\XINT_iiexpr_func_seqx #1#2{\XINT_allexpr_seqx \xintthebareiieval }% +\def\XINT_allexpr_seqx #1#2#3#4% +{% \expandafter \XINT_expr_getop \csname .=\expandafter\XINT_expr_seq:_aa - \romannumeral`&&@\XINT_expr_unlock #2!{#1#4\relax !#3},^,\endcsname + \romannumeral`&&@\XINT_expr_unlock #2!{#1#4\relax !#3}\endcsname }% \def\XINT_expr_seq:_aa #1{\if +#1\expandafter\XINT_expr_seq:_A\else \expandafter\XINT_expr_seq:_a\fi #1}% \def\XINT_expr_seq:_a #1!#2{\expandafter\XINT_expr_seq_empty? - \romannumeral0\XINT_expr_seq:_b {#2}#1}% -\def\XINT_expr_seq:_b #1#2,{\XINT_expr_seq:_c #2,{#1}}% -\def\XINT_expr_seq:_c #1{\if ,#1\xint_dothis\XINT_expr_seq:_noop\fi - \if ^#1\xint_dothis\XINT_expr_seq:_end\fi - \xint_orthat\XINT_expr_seq:_d #1}% -\def\XINT_expr_seq:_d #1,#2{\expandafter\XINT_expr_seq:_e - \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#2{#1}{#2}}% -\def\XINT_expr_seq:_e #1{\if #1^\xint_dothis\XINT_expr_seq:_abort\fi + \romannumeral0\XINT_expr_seq:_b {#2}#1,^,}% +\def\XINT_expr_seq:_b #1#2#3,{% + \if ,#2\xint_dothis\XINT_expr_seq:_noop\fi + \if ^#2\xint_dothis\XINT_expr_seq:_end\fi + \xint_orthat{\expandafter\XINT_expr_seq:_c}\csname.=#2#3\endcsname {#1}% +}% +\def\XINT_expr_seq:_noop\csname.=,#1\endcsname #2{\XINT_expr_seq:_b {#2}#1,}% +\def\XINT_expr_seq:_end \csname.=^\endcsname #1{}% +\def\XINT_expr_seq:_c #1#2{\expandafter\XINT_expr_seq:_d\romannumeral`&&@#2#1{#2}}% +\def\XINT_expr_seq:_d #1{\if #1^\xint_dothis\XINT_expr_seq:_abort\fi \if #1?\xint_dothis\XINT_expr_seq:_break\fi \if #1!\xint_dothis\XINT_expr_seq:_omit\fi \xint_orthat{\XINT_expr_seq:_goon #1}}% -\def\XINT_expr_seq:_goon #1!#2#3#4{,#1\XINT_expr_seq:_b {#4}}% -\def\XINT_expr_seq:_omit #1!#2#3#4{\XINT_expr_seq:_b {#4}}% \def\XINT_expr_seq:_abort #1!#2#3#4#5^,{}% \def\XINT_expr_seq:_break #1!#2#3#4#5^,{,#1}% -\def\XINT_expr_seq:_noop ,#1{\XINT_expr_seq:_b {#1}}% -\def\XINT_expr_seq:_end ^,#1{}% if all is omit, _empty? constructs "nil" +\def\XINT_expr_seq:_omit #1!#2#3#4{\XINT_expr_seq:_b {#4}}% +\def\XINT_expr_seq:_goon #1!#2#3#4{,#1\XINT_expr_seq:_b {#4}}% \def\XINT_expr_seq_empty? #1{% \def\XINT_expr_seq_empty? ##1{\if ,##1\expandafter\xint_gobble_i\fi #1\endcsname }}% \XINT_expr_seq_empty? { }% -\def\XINT_expr_seq:_A +#1!#2,^,% - {\expandafter\XINT_expr_seq_empty?\romannumeral0\XINT_expr_seq:_D {#1}{#2}}% -\def\XINT_expr_seq:_D #1#2{\expandafter\XINT_expr_seq:_E - \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#2{#1}{#2}}% +\def\XINT_expr_seq:_A +#1!% + {\expandafter\XINT_expr_seq_empty?\romannumeral0\XINT_expr_seq:_D #1}% +\def\XINT_expr_seq:_D #1#2{\expandafter\XINT_expr_seq:_E\romannumeral`&&@#2#1{#2}}% \def\XINT_expr_seq:_E #1{\if #1^\xint_dothis\XINT_expr_seq:_Abort\fi \if #1?\xint_dothis\XINT_expr_seq:_Break\fi \if #1!\xint_dothis\XINT_expr_seq:_Omit\fi \xint_orthat{\XINT_expr_seq:_Goon #1}}% -\def\XINT_expr_seq:_Goon #1!#2#3#4% - {,#1\expandafter\XINT_expr_seq:_D\expandafter{\the\numexpr #3+\xint_c_i}{#4}}% -\def\XINT_expr_seq:_Omit #1!#2#3#4% - {\expandafter\XINT_expr_seq:_D\expandafter{\the\numexpr #3+\xint_c_i}{#4}}% \def\XINT_expr_seq:_Abort #1!#2#3#4{}% \def\XINT_expr_seq:_Break #1!#2#3#4{,#1}% +\def\XINT_expr_seq:_Omit #1!#2#3% + {\expandafter\XINT_expr_seq:_D + \csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\endcsname}% +\def\XINT_expr_seq:_Goon #1!#2#3% + {,#1\expandafter\XINT_expr_seq:_D + \csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\endcsname}% \def\XINT_expr_onlitteral_add {\expandafter\XINT_expr_onlitteral_add_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}% -\def\XINT_expr_onlitteral_add_f #1#2{\xint_c_xviii `{opx}#2)\relax #1+}% +\def\XINT_expr_onlitteral_add_f #1#2{\xint_c_xviii `{opxadd}#2)\relax #1}% \def\XINT_expr_onlitteral_mul {\expandafter\XINT_expr_onlitteral_mul_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}% -\def\XINT_expr_onlitteral_mul_f #1#2{\xint_c_xviii `{opx}#2)\relax #1*}% -\expandafter\edef\csname XINT_expr_op:_+\endcsname - {\noexpand\xint_gobble_v {}{}{}\expandafter\noexpand\csname .=0\endcsname}% -\expandafter\edef\csname XINT_expr_op:_*\endcsname - {\noexpand\xint_gobble_v {}{}{}\expandafter\noexpand\csname .=1\endcsname}% -\def\XINT_expr_func_opx #1#2{\XINT_allexpr_opx \xintexpr }% -\def\XINT_flexpr_func_opx #1#2{\XINT_allexpr_opx \xintfloatexpr }% -\def\XINT_iiexpr_func_opx #1#2{\XINT_allexpr_opx \xintiiexpr }% +\def\XINT_expr_onlitteral_mul_f #1#2{\xint_c_xviii `{opxmul}#2)\relax #1}% +\def\XINT_expr_func_opxadd #1#2{\XINT_allexpr_opx \xintbareeval {\xintAdd 0}}% +\def\XINT_flexpr_func_opxadd #1#2{\XINT_allexpr_opx \xintbarefloateval {\XINTinFloatAdd 0}}% +\def\XINT_iiexpr_func_opxadd #1#2{\XINT_allexpr_opx \xintbareiieval {\xintiiAdd 0}}% +\def\XINT_expr_func_opxmul #1#2{\XINT_allexpr_opx \xintbareeval {\xintMul 1}}% +\def\XINT_flexpr_func_opxmul #1#2{\XINT_allexpr_opx \xintbarefloateval {\XINTinFloatMul 1}}% +\def\XINT_iiexpr_func_opxmul #1#2{\XINT_allexpr_opx \xintbareiieval {\xintiiMul 1}}% \def\XINT_allexpr_opx #1#2#3#4#5% {% - \expandafter\XINT_expr_getop\romannumeral0\expandafter\XINT_expr_op:_a - \csname XINT_expr_op:_#5\expandafter\endcsname - \romannumeral`&&@\XINT_expr_unlock #2!#5#1#3{#4}% -}% -\def\XINT_expr_op:_a #1#2!#3#4#5#6{\XINT_expr_op:_b {#1#4#3{#6\relax\relax !#5}}#2,^,}% -\def\XINT_expr_op:_b #1#2,{\XINT_expr_op:_c #2,#1}% -\def\XINT_expr_op:_c #1{\if ,#1\xint_dothis\XINT_expr_op:_noop\fi - \if ^#1\xint_dothis\XINT_expr_op:_end\fi - \xint_orthat\XINT_expr_op:_d #1}% -\def\XINT_expr_op:_noop #1,#2#3#4#5{\XINT_expr_op:_b {{#2}#3#4{#5}}}% -\def\XINT_expr_op:_d #1,#2#3#4#5% - {\expandafter\expandafter\expandafter\XINT_expr_op:_e #3#2#4#3#5{#1}{#3#4{#5}}}% -\def\XINT_expr_op:_e !#1!#2#3#4{\XINT_expr_op:_b {{!#1}#4}}% -\def\XINT_expr_op:_end ^,#1#2#3#4{\expandafter\expandafter\expandafter\space - \expandafter\xint_gobble_iv #1}% + \expandafter\XINT_expr_getop + \csname.=\romannumeral`&&@\expandafter\XINT_expr_op:_a + \romannumeral`&&@\XINT_expr_unlock #3!{#1#5\relax !#4}{#2}\endcsname +}% +\def\XINT_expr_op:_a #1!#2#3{\XINT_expr_op:_b #3{#2}#1,^,}% +\def\XINT_expr_op:_b #1#2#3#4#5,{% + \if ,#4\xint_dothis\XINT_expr_op:_noop\fi + \if ^#4\xint_dothis\XINT_expr_op:_end\fi + \xint_orthat{\expandafter\XINT_expr_op:_c}\csname.=#4#5\endcsname {#3}#1{#2}% +}% +\def\XINT_expr_op:_c #1#2#3#4{\expandafter\XINT_expr_op:_d\romannumeral0#2#1#3{#4}{#2}}% +\def\XINT_expr_op:_d #1!#2#3#4#5% + {\expandafter\XINT_expr_op:_b\expandafter #4\expandafter + {\romannumeral`&&@#4{\XINT_expr_unlock#1}{#5}}}% +\def\XINT_expr_op:_noop\csname.=,#1\endcsname #2#3#4{\XINT_expr_seq:_b #3{#4}{#2}#1,}% +\def\XINT_expr_op:_end \csname.=^\endcsname #1#2#3{#3}% \def\XINT_expr_onlitteral_subs {\expandafter\XINT_expr_onlitteral_subs_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}% \def\XINT_expr_onlitteral_subs_f #1#2{\xint_c_xviii `{subx}#2)\relax #1}% @@ -1525,43 +1551,43 @@ \def\XINT_iiexpr_func_subx #1#2{\XINT_allexpr_subx \xintbareiieval }% \def\XINT_allexpr_subx #1#2#3#4% #2 is the value to assign to the dummy variable {% #3 is the dummy variable, #4 is the expression to evaluate - \expandafter \XINT_expr_getop - \csname .=\expandafter\XINT_expr_subx:_a - \romannumeral`&&@\XINT_expr_unlock #2!{#1#4\relax !#3}\endcsname + \expandafter\expandafter\expandafter\XINT_expr_getop + \expandafter\XINT_expr_subx:_end\romannumeral0#1#4\relax !#3#2% }% -\def\XINT_expr_subx:_a #1!#2% - {\expandafter\XINT_expr_subx:_end \romannumeral0#2{#1}}% -\def\XINT_expr_subx:_end #1!#2#3{\XINT_expr_unlock #1}% -\def\XINT_expr_func_rseq {\XINT_allexpr_rseq \xintbareeval }% -\def\XINT_flexpr_func_rseq {\XINT_allexpr_rseq \xintbarefloateval }% -\def\XINT_iiexpr_func_rseq {\XINT_allexpr_rseq \xintbareiieval }% -\def\XINT_allexpr_rseq #1#2% +\def\XINT_expr_subx:_end #1!#2#3{#1}% +\def\XINT_expr_func_rseq {\XINT_allexpr_rseq \xintbareeval \xintthebareeval }% +\def\XINT_flexpr_func_rseq {\XINT_allexpr_rseq \xintbarefloateval \xintthebarefloateval }% +\def\XINT_iiexpr_func_rseq {\XINT_allexpr_rseq \xintbareiieval \xintthebareiieval }% +\def\XINT_allexpr_rseq #1#2#3% {% - \expandafter\XINT_expr_rseqx\expandafter #1\expandafter - #2\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}% + \expandafter\XINT_expr_rseqx\expandafter #1\expandafter#2\expandafter + #3\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}% }% -\def\XINT_expr_rseqx #1#2#3#4% +\def\XINT_expr_rseqx #1#2#3#4#5% {% - \expandafter\XINT_expr_rseqy\romannumeral0#1(#4)\relax - #2#3#1% + \expandafter\XINT_expr_rseqy\romannumeral0#1(#5)\relax #3#4#2% }% \def\XINT_expr_rseqy #1#2#3#4#5% {% \expandafter \XINT_expr_getop \csname .=\XINT_expr_unlock #2% \expandafter\XINT_expr_rseq:_aa - \romannumeral`&&@\XINT_expr_unlock #1!{#5#4\relax !#3}#2,^,\endcsname + \romannumeral`&&@\XINT_expr_unlock #1!{#5#4\relax !#3}#2\endcsname }% \def\XINT_expr_rseq:_aa #1{\if +#1\expandafter\XINT_expr_rseq:_A\else \expandafter\XINT_expr_rseq:_a\fi #1}% -\def\XINT_expr_rseq:_a #1!#2#3{\XINT_expr_rseq:_b #3{#2}#1}% -\def\XINT_expr_rseq:_b #1#2#3,{\XINT_expr_rseq:_c #3,~#1{#2}}% -\def\XINT_expr_rseq:_c #1{\if ,#1\xint_dothis\XINT_expr_rseq:_noop\fi - \if ^#1\xint_dothis\XINT_expr_rseq:_end\fi - \xint_orthat\XINT_expr_rseq:_d #1}% -\def\XINT_expr_rseq:_d #1,~#2#3{\expandafter\XINT_expr_rseq:_e - \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2{#3}}% -\def\XINT_expr_rseq:_e #1{% +\def\XINT_expr_rseq:_a #1!#2#3{\XINT_expr_rseq:_b {#3}{#2}#1,^,}% +\def\XINT_expr_rseq:_b #1#2#3#4,{% + \if ,#3\xint_dothis\XINT_expr_rseq:_noop\fi + \if ^#3\xint_dothis\XINT_expr_rseq:_end\fi + \xint_orthat{\expandafter\XINT_expr_rseq:_c}\csname.=#3#4\endcsname + {#1}{#2}% +}% +\def\XINT_expr_rseq:_noop\csname.=,#1\endcsname #2#3{\XINT_expr_rseq:_b {#2}{#3}#1,}% +\def\XINT_expr_rseq:_end \csname.=^\endcsname #1#2{}% +\def\XINT_expr_rseq:_c #1#2#3% + {\expandafter\XINT_expr_rseq:_d\romannumeral`&&@#3#1~#2{#3}}% +\def\XINT_expr_rseq:_d #1{% \if ^#1\xint_dothis\XINT_expr_rseq:_abort\fi \if ?#1\xint_dothis\XINT_expr_rseq:_break\fi \if !#1\xint_dothis\XINT_expr_rseq:_omit\fi @@ -1571,116 +1597,128 @@ \def\XINT_expr_rseq:_omit #1!#2#3~{\XINT_expr_rseq:_b }% \def\XINT_expr_rseq:_abort #1!#2#3~#4#5#6^,{}% \def\XINT_expr_rseq:_break #1!#2#3~#4#5#6^,{,#1}% -\def\XINT_expr_rseq:_noop ,~#1#2{\XINT_expr_rseq:_b #1{#2}}% -\def\XINT_expr_rseq:_end ^,~#1#2{}% no nil for rseq -\def\XINT_expr_rseq:_A +#1!#2#3,^,{\XINT_expr_rseq:_D {#1}#3{#2}}% -\def\XINT_expr_rseq:_D #1#2#3{\expandafter\XINT_expr_rseq:_E - \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2{#3}}% +\def\XINT_expr_rseq:_A +#1!#2#3{\XINT_expr_rseq:_D #1#3{#2}}% +\def\XINT_expr_rseq:_D #1#2#3% + {\expandafter\XINT_expr_rseq:_E\romannumeral`&&@#3#1~#2{#3}}% \def\XINT_expr_rseq:_E #1{\if #1^\xint_dothis\XINT_expr_rseq:_Abort\fi \if #1?\xint_dothis\XINT_expr_rseq:_Break\fi \if #1!\xint_dothis\XINT_expr_rseq:_Omit\fi \xint_orthat{\XINT_expr_rseq:_Goon #1}}% \def\XINT_expr_rseq:_Goon #1!#2#3~#4#5% - {,#1\expandafter\XINT_expr_rseq:_D\expandafter{\the\numexpr #3+\xint_c_i\expandafter}% - \romannumeral0\XINT_expr_lockit{#1}{#5}}% + {,#1\expandafter\XINT_expr_rseq:_D + \csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\expandafter\endcsname + \romannumeral0\XINT_expr_lockit{#1}{#5}}% \def\XINT_expr_rseq:_Omit #1!#2#3~%#4#5% - {\expandafter\XINT_expr_rseq:_D\expandafter{\the\numexpr #3+\xint_c_i}}% + {\expandafter\XINT_expr_rseq:_D + \csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\endcsname }% \def\XINT_expr_rseq:_Abort #1!#2#3~#4#5{}% \def\XINT_expr_rseq:_Break #1!#2#3~#4#5{,#1}% -\def\XINT_expr_func_rrseq {\XINT_allexpr_rrseq \xintbareeval }% -\def\XINT_flexpr_func_rrseq {\XINT_allexpr_rrseq \xintbarefloateval }% -\def\XINT_iiexpr_func_rrseq {\XINT_allexpr_rrseq \xintbareiieval }% -\def\XINT_allexpr_rrseq #1#2% +\def\XINT_expr_func_rrseq {\XINT_allexpr_rrseq \xintbareeval \xintthebareeval }% +\def\XINT_flexpr_func_rrseq {\XINT_allexpr_rrseq \xintbarefloateval \xintthebarefloateval }% +\def\XINT_iiexpr_func_rrseq {\XINT_allexpr_rrseq \xintbareiieval \xintthebareiieval }% +\def\XINT_allexpr_rrseq #1#2#3% {% - \expandafter\XINT_expr_rrseqx\expandafter #1\expandafter - #2\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}% + \expandafter\XINT_expr_rrseqx\expandafter #1\expandafter#2\expandafter + #3\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}% }% -\def\XINT_expr_rrseqx #1#2#3#4% +\def\XINT_expr_rrseqx #1#2#3#4#5% {% - \expandafter\XINT_expr_rrseqy\romannumeral0#1(#4)\expandafter\relax + \expandafter\XINT_expr_rrseqy\romannumeral0#1(#5)\expandafter\relax \expandafter{\romannumeral0\xintapply \XINT_expr_lockit - {\xintRevWithBraces{\xintCSVtoListNonStripped{\XINT_expr_unlock #2}}}}% - #2#3#1% + {\xintRevWithBraces{\xintCSVtoListNonStripped{\XINT_expr_unlock #3}}}}% + #3#4#2% }% \def\XINT_expr_rrseqy #1#2#3#4#5#6% {% \expandafter \XINT_expr_getop \csname .=\XINT_expr_unlock #3% \expandafter\XINT_expr_rrseq:_aa - \romannumeral`&&@\XINT_expr_unlock #1!{#6#5\relax !#4}{#2},^,\endcsname + \romannumeral`&&@\XINT_expr_unlock #1!{#6#5\relax !#4}{#2}\endcsname }% \def\XINT_expr_rrseq:_aa #1{\if +#1\expandafter\XINT_expr_rrseq:_A\else \expandafter\XINT_expr_rrseq:_a\fi #1}% \catcode`? 3 -\def\XINT_expr_rrseq:_a #1!#2#3{\XINT_expr_rrseq:_b {#3}{#2}#1}% -\def\XINT_expr_rrseq:_b #1#2#3,{\XINT_expr_rrseq:_c #3,~#1?{#2}}% -\def\XINT_expr_rrseq:_c #1{\if ,#1\xint_dothis\XINT_expr_rrseq:_noop\fi - \if ^#1\xint_dothis\XINT_expr_rrseq:_end\fi - \xint_orthat\XINT_expr_rrseq:_d #1}% -\def\XINT_expr_rrseq:_d #1,~#2?#3{\expandafter\XINT_expr_rrseq:_e - \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}% -\def\XINT_expr_rrseq:_goon #1!#2#3~#4?#5{,#1\expandafter\XINT_expr_rrseq:_b\expandafter - {\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}% -\def\XINT_expr_rrseq:_omit #1!#2#3~{\XINT_expr_rrseq:_b }% -\def\XINT_expr_rrseq:_abort #1!#2#3~#4?#5#6^,{}% -\def\XINT_expr_rrseq:_break #1!#2#3~#4?#5#6^,{,#1}% -\def\XINT_expr_rrseq:_noop ,~#1?#2{\XINT_expr_rrseq:_b {#1}{#2}}% -\def\XINT_expr_rrseq:_end ^,~#1?#2{}% No nil for rrseq. -\catcode`? 11 -\def\XINT_expr_rrseq:_e #1{% +\def\XINT_expr_rrseq:_a #1!#2#3{\XINT_expr_rrseq:_b {#3}{#2}#1,^,}% +\def\XINT_expr_rrseq:_b #1#2#3#4,{% + \if ,#3\xint_dothis\XINT_expr_rrseq:_noop\fi + \if ^#3\xint_dothis\XINT_expr_rrseq:_end\fi + \xint_orthat{\expandafter\XINT_expr_rrseq:_c}\csname.=#3#4\endcsname + {#1}{#2}% +}% +\def\XINT_expr_rrseq:_noop\csname.=,#1\endcsname #2#3{\XINT_expr_rrseq:_b {#2}{#3}#1,}% +\def\XINT_expr_rrseq:_end \csname.=^\endcsname #1#2{}% +\def\XINT_expr_rrseq:_c #1#2#3% + {\expandafter\XINT_expr_rrseq:_d\romannumeral`&&@#3#1~#2?{#3}}% +\def\XINT_expr_rrseq:_d #1{% \if ^#1\xint_dothis\XINT_expr_rrseq:_abort\fi \if ?#1\xint_dothis\XINT_expr_rrseq:_break\fi \if !#1\xint_dothis\XINT_expr_rrseq:_omit\fi \xint_orthat{\XINT_expr_rrseq:_goon #1}% }% -\catcode`? 3 -\def\XINT_expr_rrseq:_A +#1!#2#3,^,{\XINT_expr_rrseq:_D {#1}{#3}{#2}}% -\def\XINT_expr_rrseq:_D #1#2#3{\expandafter\XINT_expr_rrseq:_E - \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}% +\def\XINT_expr_rrseq:_goon #1!#2#3~#4?#5{,#1\expandafter\XINT_expr_rrseq:_b\expandafter + {\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}% +\def\XINT_expr_rrseq:_omit #1!#2#3~{\XINT_expr_rrseq:_b }% +\def\XINT_expr_rrseq:_abort #1!#2#3~#4?#5#6^,{}% +\def\XINT_expr_rrseq:_break #1!#2#3~#4?#5#6^,{,#1}% +\def\XINT_expr_rrseq:_A +#1!#2#3{\XINT_expr_rrseq:_D #1{#3}{#2}}% +\def\XINT_expr_rrseq:_D #1#2#3% + {\expandafter\XINT_expr_rrseq:_E\romannumeral`&&@#3#1~#2?{#3}}% \def\XINT_expr_rrseq:_Goon #1!#2#3~#4?#5% - {,#1\expandafter\XINT_expr_rrseq:_D\expandafter{\the\numexpr #3+\xint_c_i\expandafter}% + {,#1\expandafter\XINT_expr_rrseq:_D + \csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\expandafter\endcsname \expandafter{\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}% \def\XINT_expr_rrseq:_Omit #1!#2#3~%#4?#5% - {\expandafter\XINT_expr_rrseq:_D\expandafter{\the\numexpr #3+\xint_c_i}}% + {\expandafter\XINT_expr_rrseq:_D + \csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\endcsname}% \def\XINT_expr_rrseq:_Abort #1!#2#3~#4?#5{}% \def\XINT_expr_rrseq:_Break #1!#2#3~#4?#5{,#1}% -\catcode`? 11 \def\XINT_expr_rrseq:_E #1{\if #1^\xint_dothis\XINT_expr_rrseq:_Abort\fi \if #1?\xint_dothis\XINT_expr_rrseq:_Break\fi \if #1!\xint_dothis\XINT_expr_rrseq:_Omit\fi \xint_orthat{\XINT_expr_rrseq:_Goon #1}}% -\def\XINT_expr_func_iter {\XINT_allexpr_iter \xintbareeval }% -\def\XINT_flexpr_func_iter {\XINT_allexpr_iter \xintbarefloateval }% -\def\XINT_iiexpr_func_iter {\XINT_allexpr_iter \xintbareiieval }% -\def\XINT_allexpr_iter #1#2% +\def\XINT_expr_func_iter {\XINT_allexpr_iter \xintbareeval \xintthebareeval }% +\def\XINT_flexpr_func_iter {\XINT_allexpr_iter \xintbarefloateval \xintthebarefloateval }% +\def\XINT_iiexpr_func_iter {\XINT_allexpr_iter \xintbareiieval \xintthebareiieval }% +\def\XINT_allexpr_iter #1#2#3% {% - \expandafter\XINT_expr_iterx\expandafter #1\expandafter - #2\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}% + \expandafter\XINT_expr_iterx\expandafter #1\expandafter #2\expandafter + #3\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}% }% -\def\XINT_expr_iterx #1#2#3#4% +\def\XINT_expr_iterx #1#2#3#4#5% {% - \expandafter\XINT_expr_itery\romannumeral0#1(#4)\expandafter\relax + \expandafter\XINT_expr_itery\romannumeral0#1(#5)\expandafter\relax \expandafter{\romannumeral0\xintapply \XINT_expr_lockit - {\xintRevWithBraces{\xintCSVtoListNonStripped{\XINT_expr_unlock #2}}}}% - #2#3#1% + {\xintRevWithBraces{\xintCSVtoListNonStripped{\XINT_expr_unlock #3}}}}% + #3#4#2% }% \def\XINT_expr_itery #1#2#3#4#5#6% {% \expandafter \XINT_expr_getop \csname .=% \expandafter\XINT_expr_iter:_aa - \romannumeral`&&@\XINT_expr_unlock #1!{#6#5\relax !#4}{#2},^,\endcsname + \romannumeral`&&@\XINT_expr_unlock #1!{#6#5\relax !#4}{#2}\endcsname }% \def\XINT_expr_iter:_aa #1{\if +#1\expandafter\XINT_expr_iter:_A\else \expandafter\XINT_expr_iter:_a\fi #1}% -\catcode`? 3 -\def\XINT_expr_iter:_a #1!#2#3{\XINT_expr_iter:_b {#3}{#2}#1}% -\def\XINT_expr_iter:_b #1#2#3,{\XINT_expr_iter:_c #3,~#1?{#2}}% -\def\XINT_expr_iter:_c #1{\if ,#1\xint_dothis\XINT_expr_iter:_noop\fi - \if ^#1\xint_dothis\XINT_expr_iter:_end\fi - \xint_orthat\XINT_expr_iter:_d #1}% -\def\XINT_expr_iter:_d #1,~#2?#3{\expandafter\XINT_expr_iter:_e - \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}% +\def\XINT_expr_iter:_a #1!#2#3{\XINT_expr_iter:_b {#3}{#2}#1,^,}% +\def\XINT_expr_iter:_b #1#2#3#4,{% + \if ,#3\xint_dothis\XINT_expr_iter:_noop\fi + \if ^#3\xint_dothis\XINT_expr_iter:_end\fi + \xint_orthat{\expandafter\XINT_expr_iter:_c}\csname.=#3#4\endcsname + {#1}{#2}% +}% +\def\XINT_expr_iter:_noop\csname.=,#1\endcsname #2#3{\XINT_expr_iter:_b {#2}{#3}#1,}% +\def\XINT_expr_iter:_end \csname.=^\endcsname #1#2% + {\expandafter\xint_gobble_i\romannumeral0\xintapplyunbraced + {,\XINT_expr:_unlock}{\xintReverseOrder{#1\space}}}% +\def\XINT_expr_iter:_c #1#2#3% + {\expandafter\XINT_expr_iter:_d\romannumeral`&&@#3#1~#2?{#3}}% +\def\XINT_expr_iter:_d #1{% + \if ^#1\xint_dothis\XINT_expr_iter:_abort\fi + \if ?#1\xint_dothis\XINT_expr_iter:_break\fi + \if !#1\xint_dothis\XINT_expr_iter:_omit\fi + \xint_orthat{\XINT_expr_iter:_goon #1}% +}% \def\XINT_expr_iter:_goon #1!#2#3~#4?#5{\expandafter\XINT_expr_iter:_b\expandafter {\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}% \def\XINT_expr_iter:_omit #1!#2#3~{\XINT_expr_iter:_b }% @@ -1690,38 +1728,28 @@ \def\XINT_expr_iter:_break #1!#2#3~#4?#5#6^,% {\expandafter\xint_gobble_iv\romannumeral0\xintapplyunbraced {,\XINT_expr:_unlock}{\xintReverseOrder{#4\space}},#1}% -\def\XINT_expr_iter:_noop ,~#1?#2{\XINT_expr_iter:_b {#1}{#2}}% -\def\XINT_expr_iter:_end ^,~#1?#2% - {\expandafter\xint_gobble_i\romannumeral0\xintapplyunbraced - {,\XINT_expr:_unlock}{\xintReverseOrder{#1\space}}}% -\catcode`? 11 -\def\XINT_expr_iter:_e #1{% - \if ^#1\xint_dothis\XINT_expr_iter:_abort\fi - \if ?#1\xint_dothis\XINT_expr_iter:_break\fi - \if !#1\xint_dothis\XINT_expr_iter:_omit\fi - \xint_orthat{\XINT_expr_iter:_goon #1}% -}% \def\XINT_expr:_unlock #1{\XINT_expr_unlock #1}% -\catcode`? 3 -\def\XINT_expr_iter:_A +#1!#2#3,^,{\XINT_expr_iter:_D {#1}{#3}{#2}}% -\def\XINT_expr_iter:_D #1#2#3{\expandafter\XINT_expr_iter:_E - \romannumeral`&&@\expandafter\XINT_expr_unlock\romannumeral0#3{#1}~#2?{#3}}% +\def\XINT_expr_iter:_A +#1!#2#3{\XINT_expr_iter:_D #1{#3}{#2}}% +\def\XINT_expr_iter:_D #1#2#3% + {\expandafter\XINT_expr_iter:_E\romannumeral`&&@#3#1~#2?{#3}}% \def\XINT_expr_iter:_Goon #1!#2#3~#4?#5% - {\expandafter\XINT_expr_iter:_D\expandafter{\the\numexpr #3+\xint_c_i\expandafter}% + {\expandafter\XINT_expr_iter:_D + \csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\expandafter\endcsname \expandafter{\romannumeral0\xinttrim{-1}{\XINT_expr_lockit{#1}#4}}{#5}}% \def\XINT_expr_iter:_Omit #1!#2#3~%#4?#5% - {\expandafter\XINT_expr_iter:_D\expandafter{\the\numexpr #3+\xint_c_i}}% + {\expandafter\XINT_expr_iter:_D + \csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\endcsname}% \def\XINT_expr_iter:_Abort #1!#2#3~#4?#5% {\expandafter\xint_gobble_i\romannumeral0\xintapplyunbraced {,\XINT_expr:_unlock}{\xintReverseOrder{#4\space}}}% \def\XINT_expr_iter:_Break #1!#2#3~#4?#5% {\expandafter\xint_gobble_iv\romannumeral0\xintapplyunbraced {,\XINT_expr:_unlock}{\xintReverseOrder{#4\space}},#1}% -\catcode`? 11 \def\XINT_expr_iter:_E #1{\if #1^\xint_dothis\XINT_expr_iter:_Abort\fi \if #1?\xint_dothis\XINT_expr_iter:_Break\fi \if #1!\xint_dothis\XINT_expr_iter:_Omit\fi \xint_orthat{\XINT_expr_iter:_Goon #1}}% +\catcode`? 11 \def\xintANDof:csv #1{\expandafter\XINT_andof:_a\romannumeral`&&@#1,,^}% \def\XINT_andof:_a #1{\if ,#1\expandafter\XINT_andof:_e \else\expandafter\XINT_andof:_c\fi #1}% @@ -1833,13 +1861,13 @@ {\expandafter #1\expandafter #2\csname .=\xintFloor {\XINT_expr_unlock #3}\endcsname }% \let\XINT_flexpr_func_floor\XINT_expr_func_floor \def\XINT_iiexpr_func_floor #1#2#3% -{% mais absurde si on ne peut pas avoir quotient comme input +{% \expandafter #1\expandafter #2\csname.=\xintiFloor {\XINT_expr_unlock #3}\endcsname }% \def\XINT_expr_func_ceil #1#2#3% {\expandafter #1\expandafter #2\csname .=\xintCeil {\XINT_expr_unlock #3}\endcsname }% \let\XINT_flexpr_func_ceil\XINT_expr_func_ceil \def\XINT_iiexpr_func_ceil #1#2#3% -{% mais absurde si on ne peut pas avoir quotient comme input +{% \expandafter #1\expandafter #2\csname.=\xintiCeil {\XINT_expr_unlock #3}\endcsname }% \def\XINT_expr_func_sqr #1#2#3% {\expandafter #1\expandafter #2\csname.=\xintSqr {\XINT_expr_unlock #3}\endcsname }% @@ -2069,11 +2097,11 @@ \let\XINT_flexpr_func_nuple\XINT_expr_func_nuple \let\XINT_iiexpr_func_nuple\XINT_expr_func_nuple \def\XINT_expr_func_reversed #1#2#3% - {\expandafter #1\expandafter #2\csname .=\xintReversed::csv - {\XINT_expr_unlock #3}\endcsname }% + {\expandafter #1\expandafter #2\csname .=% + \xintReverse::csv {\XINT_expr_unlock #3}\endcsname }% \let\XINT_flexpr_func_reversed\XINT_expr_func_reversed \let\XINT_iiexpr_func_reversed\XINT_expr_func_reversed -\def\xintReversed::csv #1% should be done directly, of course +\def\xintReverse::csv #1% should be done directly, of course {\xintListWithSep,{\xintRevWithBraces {\xintCSVtoListNonStripped{#1}}}}% \def\xintSeqB:f:csv #1#2% {\expandafter\XINT_seqb:f:csv \expandafter{\romannumeral0\xintraw{#2}}{#1}}% @@ -2105,7 +2133,7 @@ }% \def\XINT_seqb:f:csv_nb #1#2#3#4{#3,#1}% \def\XINT_seqb:f:csv_nc #1#2#3#4{#3}% -\def\xintiiSeqb:f:csv #1#2% +\def\xintiiSeqB:f:csv #1#2% {\expandafter\XINT_iiseqb:f:csv \expandafter{\romannumeral`&&@#2}{#1}}% \def\XINT_iiseqb:f:csv #1#2{\expandafter\XINT_iiseqb:f:csv_a\romannumeral`&&@#2#1!}% \def\XINT_iiseqb:f:csv_a #1#2;#3;#4!{% @@ -2160,6 +2188,42 @@ \xintifCmp {#1}{#2}% \XINT_seqb:f:csv_nc\XINT_seqb:f:csv_nb\XINT_flseqb:f:csv_na {#1}{#2}% }% +\catcode`: 12 +\def\XINT_tmpa #1#2#3#4% +{% + \def #1##1(##2):=##3;{% + \edef\XINT_expr_tmpa{##1}% + \edef\XINT_expr_tmpa + {\expandafter\xint_zapspaces\detokenize\expandafter{\XINT_expr_tmpa} \xint_gobble_i}% + \def\XINT_expr_tmpb {0}% + \def\XINT_expr_tmpc {##3}% + \xintFor ####1 in {##2} \do + {\edef\XINT_expr_tmpb {\the\numexpr\XINT_expr_tmpb+\xint_c_i}% + \edef\XINT_expr_tmpc {subs(\unexpanded\expandafter{\XINT_expr_tmpc},% + ####1=################\XINT_expr_tmpb)}% + }% + \expandafter#3\csname XINT_#2_userfunc_\XINT_expr_tmpa\endcsname + [\XINT_expr_tmpb]{\XINT_expr_tmpc}% + \expandafter\XINT_expr_defuserfunc + \csname XINT_#2_func_\XINT_expr_tmpa\expandafter\endcsname + \csname XINT_#2_userfunc_\XINT_expr_tmpa\endcsname + \ifxintverbose\xintMessage {info}{xintexpr} + {Function \XINT_expr_tmpa\space for \string\xint #4 parser + associated to \string\XINT_#2_userfunc_\XINT_expr_tmpa\space + with meaning \expandafter\meaning + \csname XINT_#2_userfunc_\XINT_expr_tmpa\endcsname}% + \fi + }% +}% +\catcode`: 11 +\XINT_tmpa\xintdeffunc {expr} \XINT_NewFunc {expr}% +\XINT_tmpa\xintdefiifunc {iiexpr}\XINT_NewIIFunc {iiexpr}% +\XINT_tmpa\xintdeffloatfunc{flexpr}\XINT_NewFloatFunc{floatexpr}% +\def\XINT_expr_defuserfunc #1#2{% + \def #1##1##2##3{\expandafter ##1\expandafter ##2% + \csname .=\expandafter #2\romannumeral-`0\XINT_expr_unlock ##3,\endcsname + }% +}% \def\xintApply::csv #1#2% {\expandafter\XINT_applyon::_a\expandafter {\romannumeral`&&@#2}{#1}}% \def\XINT_applyon::_a #1#2{\XINT_applyon::_b {#2}{}#1,,}% @@ -2181,11 +2245,11 @@ {\romannumeral`&&@\xintApply::csv {#2{#1}}{#3}},{#2}{#3}}% \def\XINT_applyon:::_e #1,#2#3#4{\XINT_applyon:::_b {#2}{#3}{#4, #1}}% \def\XINT_applyon:::_end #1,#2#3#4{\xint_secondoftwo #4}% +\catcode`~ 12 \def\XINT_expr_RApply::csv #1#2#3#4% {~xintApply::csv{~expandafter#1~xint_exchangetwo_keepbraces{#4}}{#3}}% \def\XINT_expr_LApply::csv #1#2#3#4{~xintApply::csv{#1{#3}}{#4}}% \def\XINT_expr_RLApply:::csv #1#2{~xintApply:::csv{#1}}% -\catcode`~ 12 % by the way, catcode is set to 3 in \XINTsetupcatcodes \catcode`$ 12 % $ \def\XINT_xptwo_getab_b #1#2!#3% {\expandafter\XINT_xptwo_getab_c\romannumeral`&&@#3!#1{#1#2}}% @@ -2215,7 +2279,7 @@ Lt,Gt,Eq,LtorEq,GtorEq,Neq,AND,OR,XOR,iQuo,iRem,Add,Sub,Mul,Div,Pow,E,% iiAdd,iiSub,iiMul,iiPow,iiQuo,iiRem,iiE,SeqA::csv,iiSeqA::csv}\do {\toks0 - \expandafter{\the\toks0% no space! (makes shorter macro in the end) + \expandafter{\the\toks0% no space! \expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\expandafter \endcsname\expandafter\def\csname xint#1\endcsname ####1####2{% \expandafter\XINT_NEfork @@ -2296,73 +2360,85 @@ {\toks0 \expandafter{\the\toks0\expandafter\def\csname xint#1:csv\endcsname {~xint#1:csv}}% }% -\xintFor #1 in {XINTinFloatMaxof,XINTinFloatMinof,XINTinFloatSum,XINTinFloatPrd}\do +\xintFor #1 in + {XINTinFloatMaxof,XINTinFloatMinof,XINTinFloatSum,XINTinFloatPrd}\do {\toks0 \expandafter{\the\toks0\expandafter\def\csname #1:csv\endcsname {~#1:csv}}% }% -\expandafter\def\expandafter\XINT_expr_redefinemacros\expandafter - {\the\toks0 - \def\XINT_flexpr_noopt {\expandafter\XINT_flexpr_withopt_b\expandafter-% - \romannumeral0\xintbarefloateval }% +\toks0 \expandafter{\the\toks0 + \def\xintReverse::csv {~xintReverse::csv }% + \def\xintListSel::csv {~xintListSel::csv }% +}% +\odef\XINT_expr_redefinemacros {\the\toks0}% Not \edef ! (subtle) +\def\XINT_expr_redefineprints +{% + \def\XINT_flexpr_noopt + {\expandafter\XINT_flexpr_withopt_b\expandafter-\romannumeral0\xintbarefloateval }% \def\XINT_flexpr_withopt_b ##1##2% {\expandafter\XINT_flexpr_wrap\csname .;##1.=\XINT_expr_unlock ##2\endcsname }% - \def\XINT_expr_unlock_sp ##1.;##2##3.=##4!{\if -##2\expandafter\xint_firstoftwo - \else\expandafter\xint_secondoftwo\fi \XINTdigits{{##2##3}}{##4}}% + \def\XINT_expr_unlock_sp ##1.;##2##3.=##4!% + {\if -##2\expandafter\xint_firstoftwo\else\expandafter\xint_secondoftwo\fi + \XINTdigits{{##2##3}}{##4}}% \def\XINT_expr_print ##1{\expandafter\xintSPRaw::csv\expandafter {\romannumeral`&&@\XINT_expr_unlock ##1}}% \def\XINT_iiexpr_print ##1{\expandafter\xintCSV::csv\expandafter {\romannumeral`&&@\XINT_expr_unlock ##1}}% \def\XINT_boolexpr_print ##1{\expandafter\xintIsTrue::csv\expandafter {\romannumeral`&&@\XINT_expr_unlock ##1}}% - \def\xintCSV::csv {~xintCSV::csv }% spaces to separate from possible catcode 11 - \def\xintSPRaw::csv {~xintSPRaw::csv }% stuff after + \def\xintCSV::csv {~xintCSV::csv }% + \def\xintSPRaw::csv {~xintSPRaw::csv }% \def\xintPFloat::csv {~xintPFloat::csv }% \def\xintIsTrue::csv {~xintIsTrue::csv }% - \def\xintRound::csv {~xintRound::csv }% - \def\xintReversed::csv {~xintReversed::csv }% - \def\xintListSel:csv {~xintListSel:csv }% + \def\xintRound::csv {~xintRound::csv }% }% \toks0 {}% -\def\xintNewExpr {\xint_NewExpr\xinttheexpr }% -\def\xintNewFloatExpr {\xint_NewExpr\xintthefloatexpr }% -\def\xintNewIExpr {\xint_NewExpr\xinttheiexpr }% -\def\xintNewIIExpr {\xint_NewExpr\xinttheiiexpr }% -\def\xintNewBoolExpr {\xint_NewExpr\xinttheboolexpr }% +\def\xintNewExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xinttheexpr }% +\def\xintNewFloatExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xintthefloatexpr }% +\def\xintNewIExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xinttheiexpr }% +\def\xintNewIIExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xinttheiiexpr }% +\def\xintNewBoolExpr {\XINT_NewExpr{}\XINT_expr_redefineprints\xinttheboolexpr }% +\def\XINT_NewFunc {\XINT_NewExpr,\xintverbosefalse\xintthebareeval }% +\def\XINT_NewFloatFunc {\XINT_NewExpr,\xintverbosefalse\xintthebarefloateval }% +\def\XINT_NewIIFunc {\XINT_NewExpr,\xintverbosefalse\xintthebareiieval }% \def\XINT_newexpr_finish #1>{\noexpand\romannumeral`&&@}% -\def\xint_NewExpr #1#2[#3]% +\def\XINT_NewExpr #1#2#3#4[#5]% {% \begingroup - \ifcase #3\relax - \toks0 {\xdef #2}% - \or \toks0 {\xdef #2##1}% - \or \toks0 {\xdef #2##1##2}% - \or \toks0 {\xdef #2##1##2##3}% - \or \toks0 {\xdef #2##1##2##3##4}% - \or \toks0 {\xdef #2##1##2##3##4##5}% - \or \toks0 {\xdef #2##1##2##3##4##5##6}% - \or \toks0 {\xdef #2##1##2##3##4##5##6##7}% - \or \toks0 {\xdef #2##1##2##3##4##5##6##7##8}% - \or \toks0 {\xdef #2##1##2##3##4##5##6##7##8##9}% + \ifcase #5\relax + \toks0 {\xdef #4}% + \or \toks0 {\xdef #4##1#1}% + \or \toks0 {\xdef #4##1#1##2#1}% + \or \toks0 {\xdef #4##1#1##2#1##3#1}% + \or \toks0 {\xdef #4##1#1##2#1##3#1##4#1}% + \or \toks0 {\xdef #4##1#1##2#1##3#1##4#1##5#1}% + \or \toks0 {\xdef #4##1#1##2#1##3#1##4#1##5#1##6#1}% + \or \toks0 {\xdef #4##1#1##2#1##3#1##4#1##5#1##6#1##7#1}% + \or \toks0 {\xdef #4##1#1##2#1##3#1##4#1##5#1##6#1##7#1##8#1}% + \or \toks0 {\xdef #4##1#1##2#1##3#1##4#1##5#1##6#1##7#1##8#1##9#1}% \fi \xintexprSafeCatcodes - \XINT_NewExpr #1% + \XINT_expr_redefinemacros + #2% + \XINT_NewExpr_a #4#3% }% \catcode`~ 13 \catcode`@ 14 \catcode`\% 6 \catcode`# 12 \catcode`$ 11 @ $ -\def\XINT_NewExpr %1%2@ +\def\XINT_NewExpr_a %1%2%3@ {@ - \def\XINT_tmpa %%1%%2%%3%%4%%5%%6%%7%%8%%9{%2}@ - \XINT_expr_redefinemacros + \def\XINT_tmpa %%1%%2%%3%%4%%5%%6%%7%%8%%9{%3}@ \def~{$noexpand$}@ \catcode`: 11 \catcode`_ 11 \catcode`# 12 \catcode`~ 13 \escapechar 126 \endlinechar -1 \everyeof {\noexpand }@ \edef\XINT_tmpb {\scantokens\expandafter - {\romannumeral`&&@\expandafter%1\XINT_tmpa {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}\relax}@ + {\romannumeral`&&@\expandafter%2\XINT_tmpa {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}\relax}@ }@ \escapechar 92 \catcode`# 6 \catcode`$ 0 @ $ \the\toks0 {\scantokens\expandafter{\expandafter\XINT_newexpr_finish\meaning\XINT_tmpb}}@ + \ifxintverbose\xintMessage{info}{xintexpr} + {\string%1\space now with meaning \meaning%1}@ + \fi \endgroup }@ \catcode`% 14 diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty index d8280d3df97..018ce1554a5 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xintfrac: Expandable operations on fractions %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintfrac}% - [2015/10/29 v1.2b Expandable operations on fractions (jfB)]% + [2015/11/16 v1.2c Expandable operations on fractions (jfB)]% \def\XINT_cntSgnFork #1% {% \ifcase #1\expandafter\xint_secondofthree @@ -999,7 +999,7 @@ {% \expandafter\XINT_round_B \romannumeral0\expandafter\XINT_trunc_A - \romannumeral0\XINT_infrac {#2}{\the\numexpr #1+1\relax}{#1}% + \romannumeral0\XINT_infrac {#2}{#1+\xint_c_i}{#1}% }% \def\XINT_round_B #1\Z {% @@ -1013,7 +1013,7 @@ }% \def\XINT_round_C #1% {% - \ifnum #1<5 + \ifnum #1<\xint_c_v \expandafter\XINT_round_Daa \else \expandafter\XINT_round_Dba diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty index 8dac1d2e9a2..859588cd617 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xintgcd: Euclidean algorithm with xint package %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintgcd}% - [2015/10/29 v1.2b Euclide algorithm with xint package (jfB)]% + [2015/11/16 v1.2c Euclide algorithm with xint package (jfB)]% \def\xintGCD {\romannumeral0\xintgcd }% \def\xintgcd #1% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty index c8cbf59f311..818d661ebc7 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xintkernel: Paraphernalia for the xint packages %% --------------------------------------------------------------- @@ -156,7 +156,7 @@ \fi \XINT_providespackage \ProvidesPackage {xintkernel}% - [2015/10/29 v1.2b Paraphernalia for the xint packages (jfB)]% + [2015/11/16 v1.2c Paraphernalia for the xint packages (jfB)]% \chardef\xint_c_ 0 \chardef\xint_c_i 1 \chardef\xint_c_ii 2 @@ -303,6 +303,11 @@ }% \edef\XINT_length_finish_c #1#2\Z #3% {\noexpand\expandafter\space\noexpand\the\numexpr #3+#1\relax}% +\def\xintMessage #1#2#3{% + \immediate\write16{Package #1 (#2) on line \the\inputlineno :}% + \immediate\write16{\space\space\space\space#3}% +}% +\newif\ifxintverbose \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 1894a0ceecd..4c475f6b970 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xintseries: Expandable partial sums with xint package %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintseries}% - [2015/10/29 v1.2b Expandable partial sums with xint package (jfB)]% + [2015/11/16 v1.2c Expandable partial sums with xint package (jfB)]% \def\xintSeries {\romannumeral0\xintseries }% \def\xintseries #1#2% {% diff --git a/Master/texmf-dist/tex/generic/xint/xinttools.sty b/Master/texmf-dist/tex/generic/xint/xinttools.sty index 8526c4ea5c1..3d865b3c645 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 v1.2b 2015/10/29 +%% The xint bundle v1.2c 2015/11/16 %% Copyright (C) 2013-2015 by Jean-Francois Burnol %% xinttools: Expandable and non-expandable utilities %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xinttools}% - [2015/10/29 v1.2b Expandable and non-expandable utilities (jfB)]% + [2015/11/16 v1.2c Expandable and non-expandable utilities (jfB)]% \newtoks\XINT_toks \xint_firstofone{\let\XINT_sptoken= } %<- space here! \def\xintgodef {\global\xintodef }% |