diff options
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xint.sty | 395 | ||||
-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 | 286 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintexpr.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintfrac.sty | 980 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintgcd.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintkernel.sty | 299 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintseries.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xinttools.sty | 411 |
10 files changed, 1113 insertions, 1278 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty index 25a779f3a93..289b233b71f 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 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}% - [2016/11/20 1.2h Expandable operations on big integers (JFB)]% + [2016/12/13 1.2i 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}% @@ -89,38 +89,38 @@ \else\expandafter\xint_firstofthree_thenstop \fi }% -\def\xintiiIsOne {\romannumeral0\xintiiisone }% +\def\xintiiIsOne {\romannumeral0\xintiiisone }% \def\xintiiisone #1{\expandafter\XINT_isone\romannumeral`&&@#1XY}% \def\xintIsOne {\romannumeral0\xintisone }% -\def\xintisone #1{\expandafter\XINT_isone\romannumeral0\xintnum{#1}XY}% -\def\XINT_isOne #1{\romannumeral0\XINT_isone #1XY}% +\def\xintisone #1{\expandafter\XINT_isone\romannumeral0\xintnum{#1}XY}% \def\XINT_isone #1#2#3Y% {% \unless\if#2X\xint_dothis{ 0}\fi \unless\if#11\xint_dothis{ 0}\fi \xint_orthat{ 1}% }% +\def\XINT_isOne #1{\XINT_iSone#1XY}% +\def\XINT_iSone #1#2#3Y% +{% + \unless\if#2X\xint_dothis0\fi + \unless\if#11\xint_dothis0\fi + \xint_orthat1% +}% \let\xintRev\xintReverseDigits \def\xintLen {\romannumeral0\xintlen }% \def\xintlen #1% {% \expandafter\XINT_len_fork \romannumeral0\xintnum{#1}\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye -}% -\def\XINT_Len #1% variant which does not expand via \xintnum. -{% - \romannumeral0\XINT_len_fork - #1\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye\relax }% -\def\XINT_len_fork #1% +\edef\XINT_len_fork #1% {% - \expandafter\XINT_length_loop - \xint_UDsignfork - #1{0.}% - -{0.#1}% - \krof + \noexpand\expandafter\space + \unexpanded{\the\numexpr\xint_c_ix\expandafter + \XINT_length_loop\xint_UDsignfork#1{}-{#1}\krof}% }% \def\xintBool #1{\romannumeral`&&@% \csname if#1\endcsname\expandafter1\else\expandafter0\fi }% @@ -199,8 +199,8 @@ }% \let\xintifTrueAelseB\xintifNotZero \let\xintifFalseAelseB\xintifZero -\let\xintifTrue\xintifNotZero -\let\xintifTrueFalse\xintifNotZero +%%\let\xintifTrue\xintifNotZero % now removed +%%\let\xintifTrueFalse\xintifNotZero % now removed \def\xintifCmp {\romannumeral0\xintifcmp }% \def\xintifcmp #1#2% {% @@ -841,7 +841,7 @@ \def\xintiiMON {\romannumeral0\xintiimon }% \def\xintiimon #1% {% - \ifodd\xintiiLDg {#1} + \ifodd\xintiiLDg {#1} %<- intentional space \xint_afterfi{ -1}% \else \xint_afterfi{ 1}% @@ -850,7 +850,7 @@ \def\xintiiMMON {\romannumeral0\xintiimmon }% \def\xintiimmon #1% {% - \ifodd\xintiiLDg {#1} + \ifodd\xintiiLDg {#1} %<- intentional space \xint_afterfi{ 1}% \else \xint_afterfi{ -1}% @@ -859,7 +859,7 @@ \def\xintMON {\romannumeral0\xintmon }% \def\xintmon #1% {% - \ifodd\xintLDg {#1} + \ifodd\xintLDg {#1} %<- intentional space \xint_afterfi{ -1}% \else \xint_afterfi{ 1}% @@ -868,7 +868,7 @@ \def\xintMMON {\romannumeral0\xintmmon }% \def\xintmmon #1% {% - \ifodd\xintLDg {#1} + \ifodd\xintLDg {#1} %<- intentional space \xint_afterfi{ 1}% \else \xint_afterfi{ -1}% @@ -877,7 +877,7 @@ \def\xintiiOdd {\romannumeral0\xintiiodd }% \def\xintiiodd #1% {% - \ifodd\xintiiLDg{#1} + \ifodd\xintiiLDg{#1} %<- intentional space \xint_afterfi{ 1}% \else \xint_afterfi{ 0}% @@ -886,7 +886,7 @@ \def\xintiiEven {\romannumeral0\xintiieven }% \def\xintiieven #1% {% - \ifodd\xintiiLDg{#1} + \ifodd\xintiiLDg{#1} %<- intentional space \xint_afterfi{ 0}% \else \xint_afterfi{ 1}% @@ -895,7 +895,7 @@ \def\xintOdd {\romannumeral0\xintodd }% \def\xintodd #1% {% - \ifodd\xintLDg{#1} + \ifodd\xintLDg{#1} %<- intentional space \xint_afterfi{ 1}% \else \xint_afterfi{ 0}% @@ -904,49 +904,18 @@ \def\xintEven {\romannumeral0\xinteven }% \def\xinteven #1% {% - \ifodd\xintLDg{#1} + \ifodd\xintLDg{#1} %<- intentional space \xint_afterfi{ 0}% \else \xint_afterfi{ 1}% \fi }% -\def\xintDSL {\romannumeral0\xintdsl }% -\def\xintdsl #1% -{% - \expandafter\XINT_dsl \romannumeral`&&@#1\Z -}% -\def\XINT_DSL #1{\romannumeral0\XINT_dsl #1\Z }% -\def\XINT_dsl #1% -{% - \xint_gob_til_zero #1\xint_dsl_zero 0\XINT_dsl_ #1% -}% -\def\xint_dsl_zero 0\XINT_dsl_ 0#1\Z { 0}% -\def\XINT_dsl_ #1\Z { #10}% -\def\xintDSR {\romannumeral0\xintdsr }% -\def\xintdsr #1% -{% - \expandafter\XINT_dsr_a\expandafter {\romannumeral`&&@#1}\W\Z -}% -\def\XINT_DSR #1{\romannumeral0\XINT_dsr_a {#1}\W\Z }% -\def\XINT_dsr_a -{% - \expandafter\XINT_dsr_b\romannumeral0\xintreverseorder -}% -\def\XINT_dsr_b #1#2#3\Z -{% - \xint_gob_til_W #2\xint_dsr_onedigit\W - \xint_gob_til_minus #2\xint_dsr_onedigit-% - \expandafter\XINT_dsr_removew - \romannumeral0\xintreverseorder {#2#3}% -}% -\def\xint_dsr_onedigit #1\xintreverseorder #2{ 0}% -\def\XINT_dsr_removew #1\W { }% \def\xintDSHr {\romannumeral0\xintdshr }% -\def\xintdshr #1% +\def\xintdshr #1#2% {% - \expandafter\XINT_dshr_checkxpositive \the\numexpr #1\relax\Z + \expandafter\XINT_dshr_fork\the\numexpr#1\expandafter.\romannumeral`&&@#2;% }% -\def\XINT_dshr_checkxpositive #1% +\def\XINT_dshr_fork #1% {% \xint_UDzerominusfork 0#1\XINT_dshr_xzeroorneg @@ -954,46 +923,35 @@ 0-\XINT_dshr_xpositive \krof #1% }% -\def\XINT_dshr_xzeroorneg #1\Z #2{ 0}% -\def\XINT_dshr_xpositive #1\Z +\def\XINT_dshr_xzeroorneg #1;{ 0}% +\def\XINT_dshr_xpositive {% - \expandafter\xint_secondoftwo_thenstop\romannumeral0\xintdsx {#1}% + \expandafter\xint_secondoftwo_thenstop\romannumeral0\XINT_dsx_xisPos }% \def\xintDSH {\romannumeral0\xintdsh }% \def\xintdsh #1#2% {% - \expandafter\xint_dsh\expandafter {\romannumeral`&&@#2}{#1}% -}% -\def\xint_dsh #1#2% -{% - \expandafter\XINT_dsh_checksignx \the\numexpr #2\relax\Z {#1}% + \expandafter\XINT_dsh_fork\the\numexpr#1\expandafter.\romannumeral`&&@#2;% }% -\def\XINT_dsh_checksignx #1% +\def\XINT_dsh_fork #1% {% \xint_UDzerominusfork #1-\XINT_dsh_xiszero - 0#1\XINT_dsx_xisNeg_checkA % on passe direct dans DSx + 0#1\XINT_dsx_xisNeg_checkA 0-{\XINT_dsh_xisPos #1}% \krof }% -\def\XINT_dsh_xiszero #1\Z #2{ #2}% -\def\XINT_dsh_xisPos #1\Z #2% +\def\XINT_dsh_xiszero #1.#2;{ #2}% +\def\XINT_dsh_xisPos {% - \expandafter\xint_firstoftwo_thenstop - \romannumeral0\XINT_dsx_checksignA #2\Z {#1}% via DSx + \expandafter\xint_firstoftwo_thenstop\romannumeral0\XINT_dsx_xisPos }% \def\xintDSx {\romannumeral0\xintdsx }% \def\xintdsx #1#2% {% - \expandafter\xint_dsx\expandafter {\romannumeral`&&@#2}{#1}% + \expandafter\XINT_dsx_fork\the\numexpr#1\expandafter.\romannumeral`&&@#2;% }% -\def\xint_dsx #1#2% -{% - \expandafter\XINT_dsx_checksignx \the\numexpr #2\relax\Z {#1}% -}% -\def\XINT_DSx #1#2{\romannumeral0\XINT_dsx_checksignx #1\Z {#2}}% -\def\XINT_dsx #1#2{\XINT_dsx_checksignx #1\Z {#2}}% -\def\XINT_dsx_checksignx #1% +\def\XINT_dsx_fork #1% {% \xint_UDzerominusfork #1-\XINT_dsx_xisZero @@ -1001,48 +959,31 @@ 0-{\XINT_dsx_xisPos #1}% \krof }% -\def\XINT_dsx_xisZero #1\Z #2{{#2}{0}}% attention comme x > 0 -\def\XINT_dsx_xisNeg_checkA #1\Z #2% -{% - \XINT_dsx_xisNeg_checkA_ #2\Z {#1}% -}% -\def\XINT_dsx_xisNeg_checkA_ #1#2\Z #3% +\def\XINT_dsx_xisZero #1.#2;{{#2}{0}}% +\def\XINT_dsx_xisNeg_checkA #1.#2% {% - \xint_gob_til_zero #1\XINT_dsx_xisNeg_Azero 0% - \XINT_dsx_zeroloop #3.{}\Z {#1#2}% + \xint_gob_til_zero #2\XINT_dsx_xisNeg_Azero 0% + \expandafter\XINT_dsx_append\romannumeral\XINT_rep #1\endcsname 0.#2% }% -\def\XINT_dsx_xisNeg_Azero #1\Z #2{ 0}% -\def\XINT_dsx_addzerosnofuss #1{\XINT_dsx_zeroloop #1.{}\Z }% -\def\XINT_dsx_zeroloop #1.#2% -{% - \ifnum #1<\xint_c_ix \expandafter\XINT_dsx_exita\fi - \expandafter\XINT_dsx_zeroloop\the\numexpr #1-\xint_c_viii.{#200000000}% -}% -\def\XINT_dsx_exita - \expandafter\XINT_dsx_zeroloop\the\numexpr #1-\xint_c_viii.#2% -{% - \expandafter\expandafter\expandafter - \XINT_dsx_addzeros\csname xint_gobble_\expandafter - \romannumeral\numexpr \xint_c_viii-(#1)\endcsname #2% -}% -\def\XINT_dsx_addzeros #1\Z #2{ #2#1}% -\def\XINT_dsx_xisPos #1\Z #2% -{% - \XINT_dsx_checksignA #2\Z {#1}% -}% -\def\XINT_dsx_checksignA #1% +\def\XINT_dsx_xisNeg_Azero #1;{ 0}% +\def\XINT_dsx_addzeros #1% + {\expandafter\XINT_dsx_append\romannumeral\XINT_rep#1\endcsname0.}% +\def\XINT_dsx_addzerosnofuss #1% + {\expandafter\XINT_dsx_append\romannumeral\xintreplicate{#1}0.}% +\def\XINT_dsx_append #1.#2;{ #2#1}% +\def\XINT_dsx_xisPos #1.#2% {% \xint_UDzerominusfork - #1-\XINT_dsx_AisZero - 0#1\XINT_dsx_AisNeg - 0-{\XINT_dsx_AisPos #1}% - \krof + #2-\XINT_dsx_AisZero + 0#2\XINT_dsx_AisNeg + 0-\XINT_dsx_AisPos + \krof #1.#2% }% -\def\XINT_dsx_AisZero #1\Z #2{{0}{0}}% -\def\XINT_dsx_AisNeg #1\Z #2% +\def\XINT_dsx_AisZero #1;{{0}{0}}% +\def\XINT_dsx_AisNeg #1.-#2;% {% \expandafter\XINT_dsx_AisNeg_checkiffirstempty - \romannumeral0\XINT_split_xfork #2.#1\W\W\W\W\W\W\W\W\Z + \romannumeral0\XINT_split_xfork #1.#2\xint_bye2345678\xint_bye..% }% \def\XINT_dsx_AisNeg_checkiffirstempty #1% {% @@ -1059,10 +1000,10 @@ \expandafter\XINT_dsx_end \expandafter {\romannumeral0\XINT_num {#2}}{-#1}% }% -\def\XINT_dsx_AisPos #1\Z #2% +\def\XINT_dsx_AisPos #1.#2;% {% \expandafter\XINT_dsx_AisPos_finish - \romannumeral0\XINT_split_xfork #2.#1\W\W\W\W\W\W\W\W\Z + \romannumeral0\XINT_split_xfork #1.#2\xint_bye2345678\xint_bye..% }% \def\XINT_dsx_AisPos_finish #1.#2.% {% @@ -1076,25 +1017,28 @@ {% \expandafter\XINT_split_finish \romannumeral0\expandafter\XINT_split_xfork - \the\numexpr #1\expandafter.\romannumeral0\xintiiabs {#2}\W\W\W\W\W\W\W\W\Z + \the\numexpr #1\expandafter.\romannumeral`&&@#2% + \xint_bye2345678\xint_bye..% }% \def\xintDecSplitL {\romannumeral0\xintdecsplitl }% \def\xintdecsplitl #1#2% {% \expandafter\XINT_splitl_finish \romannumeral0\expandafter\XINT_split_xfork - \the\numexpr #1\expandafter.\romannumeral0\xintiiabs {#2}\W\W\W\W\W\W\W\W\Z + \the\numexpr #1\expandafter.\romannumeral`&&@#2% + \xint_bye2345678\xint_bye..% }% \def\xintDecSplitR {\romannumeral0\xintdecsplitr }% \def\xintdecsplitr #1#2% {% \expandafter\XINT_splitr_finish \romannumeral0\expandafter\XINT_split_xfork - \the\numexpr #1\expandafter.\romannumeral0\xintiiabs {#2}\W\W\W\W\W\W\W\W\Z + \the\numexpr #1\expandafter.\romannumeral`&&@#2% + \xint_bye2345678\xint_bye..% }% \def\XINT_split_finish #1.#2.{{#1}{#2}}% -\def\XINT_splitl_finish #1.#2.{{#1}}% -\def\XINT_splitr_finish #1.#2.{{#2}}% +\def\XINT_splitl_finish #1.#2.{ #1}% +\def\XINT_splitr_finish #1.#2.{ #2}% \def\XINT_split_xfork #1% {% \xint_UDzerominusfork @@ -1103,108 +1047,63 @@ 0-{\XINT_split_fromright #1}% \krof }% -\def\XINT_split_zerosplit #1.#2\W\W\W\W\W\W\W\W\Z{ #2..}% -\def\XINT_split_fromleft #1.%#2\W\W\W\W\W\W\W\W\Z +\def\XINT_split_zerosplit .#1\xint_bye#2\xint_bye..{ #1..}% +\def\XINT_split_fromleft + {\expandafter\XINT_split_fromleft_a\the\numexpr\xint_c_viii-}% +\def\XINT_split_fromleft_a #1% {% - \XINT_split_fromleft_loop #1.{}%#2\W\W\W\W\W\W\W\W\Z -}% -\def\XINT_split_fromleft_loop #1.% -{% - \ifnum #1<\xint_c_viii\expandafter\XINT_split_fromleft_exita\fi - \expandafter\XINT_split_fromleft_loop_perhaps - \the\numexpr #1-\xint_c_viii\expandafter.\XINT_split_fromleft_eight -}% -\def\XINT_split_fromleft_eight #1#2#3#4#5#6#7#8#9{#9{#1#2#3#4#5#6#7#8#9}}% -\def\XINT_split_fromleft_loop_perhaps #1.#2% -{% - \xint_gob_til_W #2\XINT_split_fromleft_toofar\W - \XINT_split_fromleft_loop #1.% -}% -\def\XINT_split_fromleft_toofar\W\XINT_split_fromleft_loop #1.#2#3\Z -{% - \XINT_split_fromleft_toofar_b #2\Z -}% -\def\XINT_split_fromleft_toofar_b #1\W #2\Z { #1..}% -\def\XINT_split_fromleft_exita - \expandafter\XINT_split_fromleft_loop_perhaps - \the\numexpr #1-\xint_c_viii\expandafter.\XINT_split_fromleft_eight -{% - \csname XINT_split_fromleft_endsplit_\romannumeral #1\endcsname -}% -\def\XINT_split_fromleft_endsplit_ #1#2\W #3\Z { #1.#2.}% -\def\XINT_split_fromleft_endsplit_i #1#2% - {\XINT_split_fromleft_checkiftoofar #2{#1#2}}% -\def\XINT_split_fromleft_endsplit_ii #1#2#3% - {\XINT_split_fromleft_checkiftoofar #3{#1#2#3}}% -\def\XINT_split_fromleft_endsplit_iii #1#2#3#4% - {\XINT_split_fromleft_checkiftoofar #4{#1#2#3#4}}% -\def\XINT_split_fromleft_endsplit_iv #1#2#3#4#5% - {\XINT_split_fromleft_checkiftoofar #5{#1#2#3#4#5}}% -\def\XINT_split_fromleft_endsplit_v #1#2#3#4#5#6% - {\XINT_split_fromleft_checkiftoofar #6{#1#2#3#4#5#6}}% -\def\XINT_split_fromleft_endsplit_vi #1#2#3#4#5#6#7% - {\XINT_split_fromleft_checkiftoofar #7{#1#2#3#4#5#6#7}}% -\def\XINT_split_fromleft_endsplit_vii #1#2#3#4#5#6#7#8% - {\XINT_split_fromleft_checkiftoofar #8{#1#2#3#4#5#6#7#8}}% -\def\XINT_split_fromleft_checkiftoofar #1#2#3\W #4\Z -{% - \xint_gob_til_W #1\XINT_split_fromleft_wenttoofar\W \space#2.#3.% -}% -\def\XINT_split_fromleft_wenttoofar\W\space #1.% -{% - \XINT_split_fromleft_wenttoofar_b #1\Z -}% -\def\XINT_split_fromleft_wenttoofar_b #1\W #2\Z { #1.}% -\def\XINT_split_fromright #1.#2\W\W\W\W\W\W\W\W\Z -{% - \expandafter\XINT_split_fromright_loop - \the\numexpr #1\expandafter.\expandafter{\expandafter}% - \romannumeral0\xintreverseorder{#2}\W\W\W\W\W\W\W\W\Z #2.% -}% -\def\XINT_split_fromright_loop #1.% -{% - \ifnum #1<\xint_c_viii\expandafter\XINT_split_fromright_exita\fi - \expandafter\XINT_split_fromright_loop_perhaps - \the\numexpr #1-\xint_c_viii\expandafter.\XINT_split_fromright_eight -}% -\def\XINT_split_fromright_eight #1#2#3#4#5#6#7#8#9{#9{#9#8#7#6#5#4#3#2#1}}% -\def\XINT_split_fromright_loop_perhaps #1.#2% -{% - \xint_gob_til_W #2\XINT_split_fromright_toofar\W - \XINT_split_fromright_loop #1.% -}% -\def\XINT_split_fromright_toofar\W\XINT_split_fromright_loop #1\Z {.}% -\def\XINT_split_fromright_exita - \expandafter\XINT_split_fromright_loop_perhaps - \the\numexpr #1-\xint_c_viii\expandafter.\XINT_split_fromright_eight -{% - \csname XINT_split_fromright_endsplit_\romannumeral #1\endcsname -}% -\def\XINT_split_fromright_endsplit_ #1#2\W #3\Z #4.% -{% - \xintreverseorder {#2}.#1.% + \xint_UDsignfork + #1\XINT_split_fromleft_b + -{\XINT_split_fromleft_end_a #1}% + \krof }% -\def\XINT_split_fromright_endsplit_i #1#2% - {\XINT_split_fromright_checkiftoofar #2{#2#1}}% -\def\XINT_split_fromright_endsplit_ii #1#2#3% - {\XINT_split_fromright_checkiftoofar #3{#3#2#1}}% -\def\XINT_split_fromright_endsplit_iii #1#2#3#4% - {\XINT_split_fromright_checkiftoofar #4{#4#3#2#1}}% -\def\XINT_split_fromright_endsplit_iv #1#2#3#4#5% - {\XINT_split_fromright_checkiftoofar #5{#5#4#3#2#1}}% -\def\XINT_split_fromright_endsplit_v #1#2#3#4#5#6% - {\XINT_split_fromright_checkiftoofar #6{#6#5#4#3#2#1}}% -\def\XINT_split_fromright_endsplit_vi #1#2#3#4#5#6#7% - {\XINT_split_fromright_checkiftoofar #7{#7#6#5#4#3#2#1}}% -\def\XINT_split_fromright_endsplit_vii #1#2#3#4#5#6#7#8% - {\XINT_split_fromright_checkiftoofar #8{#8#7#6#5#4#3#2#1}}% -\def\XINT_split_fromright_checkiftoofar #1% +\def\XINT_split_fromleft_b #1.#2#3#4#5#6#7#8#9% +{% + \expandafter\XINT_split_fromleft_clean + \the\numexpr1#2#3#4#5#6#7#8#9\expandafter + \XINT_split_fromleft_a\the\numexpr\xint_c_viii-#1.% +}% +\def\XINT_split_fromleft_end_a #1.% +{% + \expandafter\XINT_split_fromleft_clean + \the\numexpr1\csname XINT_split_fromleft_end#1\endcsname +}% +\def\XINT_split_fromleft_clean 1{ }% +\expandafter\def\csname XINT_split_fromleft_end7\endcsname #1% + {#1\XINT_split_fromleft_end_b}% +\expandafter\def\csname XINT_split_fromleft_end6\endcsname #1#2% + {#1#2\XINT_split_fromleft_end_b}% +\expandafter\def\csname XINT_split_fromleft_end5\endcsname #1#2#3% + {#1#2#3\XINT_split_fromleft_end_b}% +\expandafter\def\csname XINT_split_fromleft_end4\endcsname #1#2#3#4% + {#1#2#3#4\XINT_split_fromleft_end_b}% +\expandafter\def\csname XINT_split_fromleft_end3\endcsname #1#2#3#4#5% + {#1#2#3#4#5\XINT_split_fromleft_end_b}% +\expandafter\def\csname XINT_split_fromleft_end2\endcsname #1#2#3#4#5#6% + {#1#2#3#4#5#6\XINT_split_fromleft_end_b}% +\expandafter\def\csname XINT_split_fromleft_end1\endcsname #1#2#3#4#5#6#7% + {#1#2#3#4#5#6#7\XINT_split_fromleft_end_b}% +\expandafter\def\csname XINT_split_fromleft_end0\endcsname #1#2#3#4#5#6#7#8% + {#1#2#3#4#5#6#7#8\XINT_split_fromleft_end_b}% +\def\XINT_split_fromleft_end_b #1\xint_bye#2\xint_bye.{.#1}% puis . +\def\XINT_split_fromright #1.#2\xint_bye +{% + \expandafter\XINT_split_fromright_a + \the\numexpr#1-\numexpr\xint_c_ix\XINT_length_loop + #2\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye + .#2\xint_bye +}% +\def\XINT_split_fromright_a #1% {% - \xint_gob_til_W #1\XINT_split_fromright_wenttoofar\W - \XINT_split_fromright_endsplit_ + \xint_UDsignfork + #1\XINT_split_fromleft + -\XINT_split_fromright_Lempty + \krof }% -\def\XINT_split_fromright_wenttoofar\W - \XINT_split_fromright_endsplit_ #1\Z {.}% +\def\XINT_split_fromright_Lempty #1.#2\xint_bye#3..{.#2.}% \def\xintiiSqrt {\romannumeral0\xintiisqrt }% \def\xintiiSqrtR {\romannumeral0\xintiisqrtr }% \def\xintiiSquareRoot {\romannumeral0\xintiisquareroot }% @@ -1213,11 +1112,12 @@ \def\xintisqrt {\expandafter\XINT_sqrt_post\romannumeral0\xintisquareroot }% \def\xintiisqrt {\expandafter\XINT_sqrt_post\romannumeral0\xintiisquareroot }% \def\xintiisqrtr {\expandafter\XINT_sqrtr_post\romannumeral0\xintiisquareroot }% -\def\XINT_sqrt_post #1#2{\XINT_dec_pos #1\Z }% -\def\XINT_sqrtr_post #1#2{\xintiiifLt {#2}{#1}{ #1}{\XINT_dec_pos #1\Z}}% +\def\XINT_sqrt_post #1#2{\XINT_dec #1\XINT_dec_bye234567890\xint_bye}% +\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}\Z }% -\def\xintiisquareroot #1{\expandafter\XINT_sqrt_checkin\romannumeral`&&@#1\Z }% + {\expandafter\XINT_sqrt_checkin\romannumeral0\xintnum{#1}\xint_relax }% +\def\xintiisquareroot #1{\expandafter\XINT_sqrt_checkin\romannumeral`&&@#1\xint_relax }% \def\XINT_sqrt_checkin #1% {% \xint_UDzerominusfork @@ -1226,9 +1126,9 @@ 0-{\XINT_sqrt #1}% \krof }% -\def\XINT_sqrt_iszero #1\Z { 11}% -\edef\XINT_sqrt_isneg #1\Z {\noexpand\xintError:RootOfNegative\space 11}% -\def\XINT_sqrt #1\Z +\def\XINT_sqrt_iszero #1\xint_relax { 11}% +\edef\XINT_sqrt_isneg #1\xint_relax {\noexpand\xintError:RootOfNegative\space 11}% +\def\XINT_sqrt #1\xint_relax {% \expandafter\XINT_sqrt_start\romannumeral0\xintlength {#1}.#1.% }% @@ -1415,13 +1315,13 @@ }% \def\XINT_sqrt_big_gi #1.% {% - \expandafter\XINT_sqrt_big_gj - \romannumeral0\XINT_dsx_addzerosnofuss{#1}{}.#1.% + \expandafter\XINT_sqrt_big_gj\romannumeral\xintreplicate{#1}0.#1.% }% \def\XINT_sqrt_big_gj #1.#2.#3.#4.#5.% {% \expandafter\XINT_sqrt_big_gk - \romannumeral0\xintiidivision {#4#1}{\XINT_dbl_pos #5\Z}.% + \romannumeral0\xintiidivision {#4#1}% + {\XINT_dbl #5\xint_bye2345678\xint_bye*\xint_c_ii\relax}.% #1.#5.#2.#3.% }% \def\XINT_sqrt_big_gk #1#2.#3.#4.% @@ -1437,8 +1337,7 @@ \def\XINT_sqrt_big_gm #1.#2.#3.#4.#5.% {% \expandafter\XINT_sqrt_big_gn - \romannumeral0\expandafter\XINT_split_fromleft_loop - \the\numexpr\xint_c_ii*#3.{}#5\W\W\W\W\W\W\W\W\Z + \romannumeral0\XINT_split_fromleft\xint_c_ii*#3.#5\xint_bye2345678\xint_bye..% #1.#2.#3.#4.% }% \def\XINT_sqrt_big_gn #1.#2.#3.#4.#5.#6.% @@ -1451,9 +1350,9 @@ \def\XINT_sqrt_big_ka #1.#2.#3.#4.% {% \expandafter\XINT_sqrt_big_kb - \romannumeral0\XINT_dsx_addzerosnofuss {#1}{#3}.% + \romannumeral0\XINT_dsx_addzeros {#1}#3;.% \romannumeral0\xintiisub - {\XINT_dsx_addzerosnofuss {\numexpr\xint_c_ii*#1}{#2}}% + {\XINT_dsx_addzerosnofuss {\xint_c_ii*#1}#2;}% {\xintiNum{#4}}.% }% \def\XINT_sqrt_big_kb #1.#2.% @@ -1468,7 +1367,8 @@ \def\XINT_sqrt_big_kz 0.#1.% {% \expandafter\XINT_sqrt_big_kend - \romannumeral0\xintinc{\XINT_dbl_pos #1\Z}.#1.% + \romannumeral0% + \xintinc{\XINT_dbl#1\xint_bye2345678\xint_bye*\xint_c_ii\relax}.#1.% }% \def\XINT_sqrt_big_kend #1.#2.% {% @@ -1477,7 +1377,8 @@ \def\XINT_sqrt_big_kloop #1.#2.% {% \expandafter\XINT_sqrt_big_ke - \romannumeral0\xintiidivision{#1}{\romannumeral0\XINT_dbl_pos #2\Z}{#2}% + \romannumeral0\xintiidivision{#1}% + {\romannumeral0\XINT_dbl #2\xint_bye2345678\xint_bye*\xint_c_ii\relax}{#2}% }% \def\XINT_sqrt_big_ke #1% {% @@ -1887,9 +1788,17 @@ }% \def\xintiiE {\romannumeral0\xintiie }% used in \xintMod. \def\xintiie #1#2% - {\expandafter\XINT_iie\the\numexpr #2\expandafter.\expandafter{\romannumeral`&&@#1}}% -\def\XINT_iie #1.#2{\ifnum#1>\xint_c_ \xint_dothis{\xint_dsh {#2}{-#1}}\fi - \xint_orthat{ #2}}% + {\expandafter\XINT_iie_fork\the\numexpr #2\expandafter.\romannumeral`&&@#1;}% +\def\XINT_iie_fork #1% +{% + \xint_UDsignfork + #1\XINT_iie_neg + -\XINT_iie_a + \krof #1% +}% +\def\XINT_iie_a #1.% + {\expandafter\XINT_dsx_append\romannumeral\XINT_rep #1\endcsname 0.}% +\def\XINT_iie_neg #1.#2;{ #2}% \catcode`! 11 \def\xintMax {\Did_you_mean_iiMax?or_load_xintfrac!}% \def\xintMin {\Did_you_mean_iiMin?or_load_xintfrac!}% diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty index 2dc7e73d50c..f8b3d282ccb 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintbinhex: Expandable binary and hexadecimal conversions %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintbinhex}% - [2016/11/20 1.2h Expandable binary and hexadecimal conversions (JFB)]% + [2016/12/13 1.2i 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 1a28b862822..aa022f79274 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintcfrac: Expandable continued fractions with xint package %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcfrac}% - [2016/11/20 1.2h Expandable continued fractions with xint package (JFB)]% + [2016/12/13 1.2i 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 88d32749bc2..6278dcb1173 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintcore: Expandable arithmetic on big integers %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcore}% - [2016/11/20 1.2h Expandable arithmetic on big integers (JFB)]% + [2016/12/13 1.2i 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 @@ -358,7 +358,6 @@ {% \expandafter\XINT_abs \romannumeral0\xintnum{#1}% }% -\def\XINT_Abs #1{\romannumeral0\XINT_abs #1}% \def\XINT_abs #1% {% \xint_UDsignfork @@ -385,143 +384,129 @@ 0-{ #1}% positive \krof }% -\def\xintLDg {\romannumeral0\xintldg }% -\def\xintldg #1{\xintiildg {\xintNum{#1}}}% +\def\xintLDg {\romannumeral0\xintldg }% +\def\xintldg #1{\expandafter\XINT_ldg_fork\romannumeral0\xintnum{#1}% + \XINT_ldg_c{}{}{}{}{}{}{}{}\xint_bye\relax}% \def\xintiiLDg {\romannumeral0\xintiildg }% -\def\xintiildg #1% +\def\xintiildg #1{\expandafter\XINT_ldg_fork\romannumeral`&&@#1% + \XINT_ldg_c{}{}{}{}{}{}{}{}\xint_bye\relax}% +\def\XINT_ldg_fork #1% {% - \expandafter\XINT_ldg_done\romannumeral0% - \expandafter\XINT_revdigits_a\the\numexpr\expandafter\XINT_microrevsep - \romannumeral0\expandafter\XINT_abs - \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 - \Z -}% -\def\XINT_ldg_done #1#2\Z { #1}% -\def\xintDouble {\romannumeral0\xintdouble }% -\def\xintdouble #1% -{% - \expandafter\XINT_dbl\romannumeral`&&@#1\Z -}% -\def\XINT_dbl #1% -{% - \xint_UDzerominusfork - #1-\XINT_dbl_zero - 0#1\XINT_dbl_neg - 0-{\XINT_dbl_pos #1}% + \xint_UDsignfork + #1\XINT_ldg + -{\XINT_ldg#1}% \krof }% -\def\XINT_dbl_zero #1\Z { 0}% -\def\XINT_dbl_neg - {\expandafter-\romannumeral0\XINT_dbl_pos }% -\def\XINT_dbl_pos #1\Z +\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_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}% +\def\XINT_ldg_cbye #1\XINT_ldg_c{}% +\def\XINT_ldg_d#1#2\xint_bye{#1}% +\def\xintDouble {\romannumeral0\xintdouble}% +\def\xintdouble #1{\expandafter\XINT_dbl\romannumeral`&&@#1% + \xint_bye2345678\xint_bye*\xint_c_ii\relax}% +\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_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}% +\def\xintHalf {\romannumeral0\xinthalf}% +\def\xinthalf #1{\expandafter\XINT_half_fork\romannumeral`&&@#1% + \xint_bye\xint_Bye345678\xint_bye + *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax}% +\def\XINT_half_fork #1% {% - \expandafter\XINT_dbl_pos_aa - \romannumeral0\expandafter\XINT_sepandrev - \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 1\Z!% - 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W -}% -\def\XINT_dbl_pos_aa -{% - \expandafter\XINT_mul_out\the\numexpr\XINT_verysmallmul 0.2!% -}% -\def\xintHalf {\romannumeral0\xinthalf }% -\def\xinthalf #1% -{% - \expandafter\XINT_half\romannumeral`&&@#1\Z -}% -\def\XINT_half #1% -{% - \xint_UDzerominusfork - #1-\XINT_half_zero - 0#1\XINT_half_neg - 0-{\XINT_half_pos #1}% + \xint_UDsignfork + #1\XINT_half_neg + -{\XINT_half #1}% \krof }% -\def\XINT_half_zero #1\Z { 0}% -\def\XINT_half_neg {\expandafter\XINT_opp\romannumeral0\XINT_half_pos }% -\def\XINT_half_pos #1\Z -{% - \expandafter\XINT_half_pos_a - \romannumeral0\expandafter\XINT_sepandrev - \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 - 1\Z!% - 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W -}% -\def\XINT_half_pos_a - {\expandafter\XINT_half_pos_b\the\numexpr\XINT_verysmallmul 0.5!}% -\def\XINT_half_pos_b 1#1#2#3#4#5#6#7#8!1#9% -{% - \xint_gob_til_Z #9\XINT_half_small \Z - \XINT_mul_out 1#1#2#3#4#5#6#7!1#9% -}% -\edef\XINT_half_small \Z\XINT_mul_out 1#1!#2\W -{% - \noexpand\expandafter\space\noexpand\the\numexpr #1\relax -}% -\def\xintDec {\romannumeral0\xintdec }% -\def\xintdec #1% -{% - \expandafter\XINT_dec\romannumeral`&&@#1\Z -}% -\def\XINT_dec #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_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}% +\def\XINT_half_e#1{*\xint_c_v+#1-\xint_c_v)\relax}% +\def\xintInc {\romannumeral0\xintinc}% +\def\xintinc #1{\expandafter\XINT_inc_fork\romannumeral`&&@#1% + \xint_bye23456789\xint_bye+\xint_c_i\relax}% +\def\XINT_inc_fork #1% {% - \xint_UDzerominusfork - #1-\XINT_dec_zero - 0#1\XINT_dec_neg - 0-{\XINT_dec_pos #1}% + \xint_UDsignfork + #1\XINT_inc_neg + -{\XINT_inc #1}% \krof }% -\def\XINT_dec_zero #1\Z {-1}% -\def\XINT_dec_neg - {\expandafter-\romannumeral0\XINT_inc_pos }% -\def\XINT_dec_pos #1\Z -{% - \expandafter\XINT_dec_pos_aa - \romannumeral0\expandafter\XINT_sepandrev - \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!\W -}% -\def\XINT_dec_pos_aa {\XINT_sub_aa 100000001!\Z!\Z!\Z!\Z!\W }% -\def\xintInc {\romannumeral0\xintinc }% -\def\xintinc #1% +\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_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}% +\def\xintDec {\romannumeral0\xintdec}% +\def\xintdec #1{\expandafter\XINT_dec_fork\romannumeral`&&@#1% + \XINT_dec_bye234567890\xint_bye}% +\def\XINT_dec_fork #1% {% - \expandafter\XINT_inc\romannumeral`&&@#1\Z + \xint_UDsignfork + #1\XINT_dec_neg + -{\XINT_dec #1}% + \krof }% -\def\XINT_inc #1% +\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_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 + {\if#20-\xint_c_ii\relax+\else-\fi\xint_c_i\relax}% +\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_zero 0 0{ }% +\def\xintDSR{\romannumeral0\xintdsr}% +\def\xintdsr #1{\expandafter\XINT_dsr_fork\romannumeral`&&@#1% + \xint_bye\xint_Bye3456789\xint_bye+\xint_c_v)/\xint_c_x-\xint_c_i\relax}% +\def\XINT_dsr_fork #1% {% - \xint_UDzerominusfork - #1-\XINT_inc_zero - 0#1\XINT_inc_neg - 0-{\XINT_inc_pos #1}% + \xint_UDsignfork + #1\XINT_dsr_neg + -{\XINT_dsr #1}% \krof }% -\def\XINT_inc_zero #1\Z { 1}% -\def\XINT_inc_neg {\expandafter\XINT_opp\romannumeral0\XINT_dec_pos }% -\def\XINT_inc_pos #1\Z +\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_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}% +\def\XINT_dsr_e #1{)\relax}% +\def\xintDSRr{\romannumeral0\xintdsrr}% +\def\xintdsrr #1{\expandafter\XINT_dsrr_fork\romannumeral`&&@#1% + \xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax}% +\def\XINT_dsrr_fork #1% {% - \expandafter\XINT_inc_pos_aa - \romannumeral0\expandafter\XINT_sepandrev - \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 - 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 + \xint_UDsignfork + #1\XINT_dsrr_neg + -{\XINT_dsrr #1}% + \krof }% -\def\XINT_inc_pos_aa {\XINT_add_aa 100000001!1\Z!1\Z!1\Z!1\Z!\W }% +\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_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\xintiAdd {\romannumeral0\xintiadd }% \def\xintiadd #1{\expandafter\XINT_iadd\romannumeral0\xintnum{#1}\Z }% \def\xintiiAdd {\romannumeral0\xintiiadd }% @@ -1334,8 +1319,8 @@ \def\xintiRem {\romannumeral0\xintirem }% \def\xintiquo {\expandafter\xint_firstoftwo_thenstop\romannumeral0\xintidivision }% \def\xintirem {\expandafter\xint_secondoftwo_thenstop\romannumeral0\xintidivision }% -\let\xintQuo\xintiQuo\let\xintquo\xintiquo % deprecated -\let\xintRem\xintiRem\let\xintrem\xintirem % deprecated +%%\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% @@ -1404,11 +1389,13 @@ \def\XINT_div_BisTwo #1#2% {% \expandafter\expandafter\expandafter\XINT_div_BisTwo_a - \ifodd\xintLDg{#2} \expandafter1\else \expandafter0\fi {#2}% + \ifodd\xintiiLDg{#2} \expandafter1\else \expandafter0\fi {#2}% }% \def\XINT_div_BisTwo_a #1#2% {% - \expandafter{\romannumeral0\xinthalf {#2}}{#1}% + \expandafter{\romannumeral0\XINT_half + #2\xint_bye\xint_Bye345678\xint_bye + *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax}{#1}% }% \def\XINT_div_small_a #1#2% {% @@ -1962,48 +1949,11 @@ }% \def\XINT_iidivround_pos #1#2\Z #3\Z {% - \expandafter\XINT_iidivround_pos_a + \expandafter\expandafter\expandafter\XINT_dsrr + \expandafter\xint_firstoftwo \romannumeral0\XINT_div_prepare {#2}{#1#30}% + \xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax }% -\def\XINT_iidivround_pos_a #1#2% -{% - \expandafter\XINT_iidivround_pos_b - \romannumeral0\expandafter\XINT_sepandrev - \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 - 1\Z!1\Z!1\Z!1\Z!\W\R -}% -\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!1#9% -}% -\def\XINT_iidivround_pos_up -{% - \expandafter\XINT_iidivround_pos_finish - \the\numexpr\XINT_add_a\xint_c_ii 100000010!1\Z!1\Z!1\Z!1\Z!\W -}% -\def\XINT_iidivround_pos_finish #10!#21\Z!#3\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 -}% -\def\XINT_iidivround_small\Z\ifnum #1>#2\fi 1#30!#4\W\R -{% - \ifnum #1>\xint_c_iv - \expandafter\XINT_iidivround_small_up - \else \expandafter\XINT_iidivround_small_trunc - \fi {#3}% -}% -\edef\XINT_iidivround_small_up #1% - {\noexpand\expandafter\space\noexpand\the\numexpr #1+\xint_c_i\relax }% -\edef\XINT_iidivround_small_trunc #1% - {\noexpand\expandafter\space\noexpand\the\numexpr #1\relax }% \def\xintiDivTrunc {\romannumeral0\xintidivtrunc }% \def\xintidivtrunc #1{\expandafter\XINT_iidivtrunc\romannumeral0\xintnum{#1}\Z }% \def\xintiiDivTrunc {\romannumeral0\xintiidivtrunc }% @@ -2072,6 +2022,8 @@ \def\xintMul {\Did_you_mean_iiMul?or_load_xintfrac!}% \def\xintPow {\Did_you_mean_iiPow?or_load_xintfrac!}% \def\xintSqr {\Did_you_mean_iiSqr?or_load_xintfrac!}% +\def\xintQuo {\Removed!use_xintiQuo_or_xintiiQuo!}% +\def\xintRem {\Removed!use_xintiRem_or_xintiiRem!}% \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 2e7812a152f..a2be2aecb18 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintexpr: Expandable expression parser %% --------------------------------------------------------------- @@ -81,7 +81,7 @@ \XINTsetupcatcodes% \XINT_providespackage \ProvidesPackage{xintexpr}% - [2016/11/20 1.2h Expandable expression parser (JFB)]% + [2016/12/13 1.2i 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 diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty index 4ffec9ded36..496dbca7b9c 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintfrac: Expandable operations on fractions %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintfrac}% - [2016/11/20 1.2h Expandable operations on fractions (JFB)]% + [2016/12/13 1.2i Expandable operations on fractions (JFB)]% \def\XINT_cntSgnFork #1% {% \ifcase #1\expandafter\xint_secondofthree @@ -86,33 +86,14 @@ \def\XINT_flen #1#2#3% {% \expandafter\space - \the\numexpr -1+\XINT_Abs {#1}+\XINT_Len {#2}+\XINT_Len {#3}\relax -}% -\def\XINT_lenrord_loop #1.#2#3#4#5#6#7#8#9% -{% - \xint_gob_til_W #9\XINT_lenrord_W\W - \expandafter\XINT_lenrord_loop\the\numexpr #1+\xint_c_vii.{#9#8#7#6#5#4#3#2}% -}% -\def\XINT_lenrord_W\W\expandafter\XINT_lenrord_loop #1.#2#3\Z -{% - \expandafter\XINT_lenrord_X #1.#2\Z -}% -\def\XINT_lenrord_X #1.#2\Z -{% - \XINT_lenrord_Y #2\R\R\R\R\R\R\T {#1}% -}% -\def\XINT_lenrord_Y #1#2#3#4#5#6#7#8\T -{% - \xint_gob_til_W - #7\XINT_lenrord_Z \xint_c_viii - #6\XINT_lenrord_Z \xint_c_vii - #5\XINT_lenrord_Z \xint_c_vi - #4\XINT_lenrord_Z \xint_c_v - #3\XINT_lenrord_Z \xint_c_iv - #2\XINT_lenrord_Z \xint_c_iii - \W\XINT_lenrord_Z \xint_c_ii \Z + \the\numexpr \XINT_abs#1+\xint_c_viii + \XINT_length_loop + #2#3\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye + \relax }% -\def\XINT_lenrord_Z #1#2\Z #3{\the\numexpr #3-#1.}% \def\XINT_outfrac #1#2#3% {% \ifcase\XINT_cntSgn #3\Z @@ -204,10 +185,13 @@ }% \def\XINT_frac_gen_Bd #1.#2e#3e#4\XINT_Z {% - \expandafter\XINT_frac_gen_C\the\numexpr #3-\romannumeral0\expandafter - \XINT_length_loop - 0.#1\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye~#2#1!% + \expandafter\XINT_frac_gen_C\the\numexpr #3-% + \numexpr\xint_c_ix\XINT_length_loop + #1\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye + ~#2#1!% }% \def\XINT_frac_gen_C #1!#2.#3% {% @@ -231,10 +215,12 @@ \def\XINT_frac_gen_Cc #1.#2~#3!#4e#5e#6\XINT_T {% \expandafter\XINT_frac_gen_F\the\numexpr #5-#2-% - \romannumeral0\XINT_length_loop - 0.#1\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye\expandafter - ~\romannumeral0\XINT_num_loop + \numexpr\xint_c_ix\XINT_length_loop + #1\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\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 ~#4#1~% @@ -364,96 +350,6 @@ \xint_bye\xint_bye\xint_bye\xint_bye \xint_relax }{#1}% }% -\def\XINT_addm_A #1#2#3#4#5#6% -{% - \xint_gob_til_W #3\XINT_addm_az\W - \XINT_addm_AB #1{#3#4#5#6}{#2}% -}% -\def\XINT_addm_az\W\XINT_addm_AB #1#2% -{% - \XINT_addm_AC_checkcarry #1% -}% -\def\XINT_addm_AB #1#2#3#4\W\X\Y\Z #5#6#7#8% -{% - \XINT_addm_ABE #1#2{#8#7#6#5}{#3}#4\W\X\Y\Z -}% -\def\XINT_addm_ABE #1#2#3#4#5#6% -{% - \expandafter\XINT_addm_ABEA\the\numexpr #1+10#5#4#3#2+#6.% -}% -\def\XINT_addm_ABEA #1#2#3.#4% -{% - \XINT_addm_A #2{#3#4}% -}% -\def\XINT_addm_AC_checkcarry #1% -{% - \xint_gob_til_zero #1\XINT_addm_AC_nocarry 0\XINT_addm_C -}% -\def\XINT_addm_AC_nocarry 0\XINT_addm_C #1#2\W\X\Y\Z -{% - \expandafter - \xint_cleanupzeros_andstop - \romannumeral0% - \XINT_rord_main {}#2% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax - #1% -}% -\def\XINT_addm_C #1#2#3#4#5% -{% - \xint_gob_til_W - #5\XINT_addm_cw - #4\XINT_addm_cx - #3\XINT_addm_cy - #2\XINT_addm_cz - \W\XINT_addm_CD {#5#4#3#2}{#1}% -}% -\def\XINT_addm_CD #1% -{% - \expandafter\XINT_addm_CC\the\numexpr 1+10#1.% -}% -\def\XINT_addm_CC #1#2#3.#4% -{% - \XINT_addm_AC_checkcarry #2{#3#4}% -}% -\def\XINT_addm_cw - #1\XINT_addm_cx - #2\XINT_addm_cy - #3\XINT_addm_cz - \W\XINT_addm_CD -{% - \expandafter\XINT_addm_CDw\the\numexpr 1+#1#2#3.% -}% -\def\XINT_addm_CDw #1.#2#3\X\Y\Z -{% - \XINT_addm_end #1#3% -}% -\def\XINT_addm_cx - #1\XINT_addm_cy - #2\XINT_addm_cz - \W\XINT_addm_CD -{% - \expandafter\XINT_addm_CDx\the\numexpr 1+#1#2.% -}% -\def\XINT_addm_CDx #1.#2#3\Y\Z -{% - \XINT_addm_end #1#3% -}% -\def\XINT_addm_cy - #1\XINT_addm_cz - \W\XINT_addm_CD -{% - \expandafter\XINT_addm_CDy\the\numexpr 1+#1.% -}% -\def\XINT_addm_CDy #1.#2#3\Z -{% - \XINT_addm_end #1#3% -}% -\def\XINT_addm_cz\W\XINT_addm_CD #1#2#3{\XINT_addm_end #1#3}% -\edef\XINT_addm_end #1#2#3#4#5% - {\noexpand\expandafter\space\noexpand\the\numexpr #1#2#3#4#5\relax}% \def\xintRaw {\romannumeral0\xintraw }% \def\xintraw {% @@ -484,22 +380,20 @@ \def\xintRawWithZeros {\romannumeral0\xintrawwithzeros }% \def\xintrawwithzeros {% - \expandafter\XINT_rawz\romannumeral0\XINT_infrac + \expandafter\XINT_rawz_fork\romannumeral0\XINT_infrac }% -\def\XINT_rawz #1% +\def\XINT_rawz_fork #1% {% - \ifcase\XINT_cntSgn #1\Z + \ifnum#1<\xint_c_ \expandafter\XINT_rawz_Ba - \or - \expandafter\XINT_rawz_A \else - \expandafter\XINT_rawz_Ba + \expandafter\XINT_rawz_A \fi - {#1}% + #1.% }% -\def\XINT_rawz_A #1#2#3{\xint_dsh {#2}{-#1}/#3}% -\def\XINT_rawz_Ba #1#2#3{\expandafter\XINT_rawz_Bb - \expandafter{\romannumeral0\xint_dsh {#3}{#1}}{#2}}% +\def\XINT_rawz_A #1.#2#3{\XINT_dsx_addzeros{#1}#2;/#3}% +\def\XINT_rawz_Ba -#1.#2#3{\expandafter\XINT_rawz_Bb + \expandafter{\romannumeral0\XINT_dsx_addzeros{#1}#3;}{#2}}% \def\XINT_rawz_Bb #1#2{ #2/#1}% \def\xintFloor {\romannumeral0\xintfloor }% \def\xintfloor #1% devrais-je faire \xintREZ? @@ -528,26 +422,24 @@ \fi {#1}% }% -\def\XINT_numer_A #1#2#3{\xint_dsh {#2}{-#1}}% +\def\XINT_numer_A #1#2#3{\XINT_dsx_addzeros{#1}#2;}% \def\XINT_numer_B #1#2#3{ #2}% \def\xintDenominator {\romannumeral0\xintdenominator }% \def\xintdenominator {% - \expandafter\XINT_denom\romannumeral0\XINT_infrac + \expandafter\XINT_denom_fork\romannumeral0\XINT_infrac }% -\def\XINT_denom #1% +\def\XINT_denom_fork #1% {% - \ifcase\XINT_cntSgn #1\Z + \ifnum#1<\xint_c_ \expandafter\XINT_denom_B - \or - \expandafter\XINT_denom_A \else - \expandafter\XINT_denom_B + \expandafter\XINT_denom_A \fi - {#1}% + #1.% }% -\def\XINT_denom_A #1#2#3{ #3}% -\def\XINT_denom_B #1#2#3{\xint_dsh {#3}{#1}}% +\def\XINT_denom_A #1.#2#3{ #3}% +\def\XINT_denom_B -#1.#2#3{\XINT_dsx_addzeros{#1}#3;}% \def\xintFrac {\romannumeral0\xintfrac }% \def\xintfrac #1% {% @@ -832,82 +724,105 @@ \def\XINT_tfrac_P #1/#2\Z {\expandafter\XINT_rez_AB \romannumeral0\xintiirem{#1}{#2}\Z {0}{#2}}% \def\xintTrunc {\romannumeral0\xinttrunc }% -\def\xintiTrunc {\romannumeral0\xintitrunc }% -\def\xinttrunc #1% +\def\xintiTrunc {\romannumeral0\xintitrunc}% +\def\xinttrunc #1{\expandafter\XINT_trunc\the\numexpr#1.\XINT_trunc_G}% +\def\xintitrunc #1{\expandafter\XINT_trunc\the\numexpr#1.\XINT_itrunc_G}% +\def\XINT_trunc #1.#2#3% {% - \expandafter\XINT_trunc\expandafter {\the\numexpr #1}% + \expandafter\XINT_trunc_a\romannumeral0\XINT_infrac{#3}#1.#2% }% -\def\XINT_trunc #1#2% +\def\XINT_trunc_a #1#2#3#4.#5% {% - \expandafter\XINT_trunc_G - \romannumeral0\expandafter\XINT_trunc_A - \romannumeral0\XINT_infrac {#2}{#1}{#1}% + \if0\XINT_Sgn#2\Z\xint_dothis\XINT_trunc_zero\fi + \if1\XINT_iSone#3XY\xint_dothis\XINT_trunc_sp_b\fi + \xint_orthat\XINT_trunc_b #1+#4.{#2}{#3}#5#4.% }% -\def\xintitrunc #1% +\def\XINT_trunc_zero #1.#2.{ 0}% +\def\XINT_trunc_b {\expandafter\XINT_trunc_B\the\numexpr}% +\def\XINT_trunc_sp_b {\expandafter\XINT_trunc_sp_B\the\numexpr}% +\def\XINT_trunc_B #1% {% - \expandafter\XINT_itrunc\expandafter {\the\numexpr #1}% + \xint_UDsignfork + #1\XINT_trunc_C + -\XINT_trunc_D + \krof #1% }% -\def\XINT_itrunc #1#2% +\def\XINT_trunc_sp_B #1% {% - \expandafter\XINT_itrunc_G - \romannumeral0\expandafter\XINT_trunc_A - \romannumeral0\XINT_infrac {#2}{#1}{#1}% + \xint_UDsignfork + #1\XINT_trunc_sp_C + -\XINT_trunc_sp_D + \krof #1% }% -\def\XINT_trunc_A #1#2#3#4% +\def\XINT_trunc_C -#1.#2#3% {% - \expandafter\XINT_trunc_checkifzero - \expandafter{\the\numexpr #1+#4}#2\Z {#3}% + \expandafter\XINT_trunc_CE + \romannumeral0\XINT_dsx_addzeros{#1}#3;.{#2}% }% -\def\XINT_trunc_checkifzero #1#2#3\Z +\def\XINT_trunc_CE #1.#2{\XINT_trunc_E #2.{#1}}% +\def\XINT_trunc_sp_C -#1.#2#3{\XINT_trunc_sp_Ca #2.#1.}% +\def\XINT_trunc_sp_Ca #1% {% - \xint_gob_til_zero #2\XINT_trunc_iszero0\XINT_trunc_B {#1}{#2#3}% + \xint_UDsignfork + #1{\XINT_trunc_sp_Cb -}% + -{\XINT_trunc_sp_Cb \space#1}% + \krof }% -\def\XINT_trunc_iszero0\XINT_trunc_B #1#2#3{ 0\Z 0}% -\def\XINT_trunc_B #1% +\def\XINT_trunc_sp_Cb #1#2.#3.% {% - \ifcase\XINT_cntSgn #1\Z - \expandafter\XINT_trunc_D - \or - \expandafter\XINT_trunc_D - \else - \expandafter\XINT_trunc_C - \fi - {#1}% + \expandafter\XINT_trunc_sp_Cc + \romannumeral0\expandafter\XINT_split_fromright_a + \the\numexpr#3-\numexpr\xint_c_ix\XINT_length_loop + #2\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye + .#2\xint_bye2345678\xint_bye..#1% +}% +\def\XINT_trunc_sp_Cc #1% +{% + \if.#1\xint_dothis{\XINT_trunc_sp_Cd 0.}\fi + \xint_orthat {\XINT_trunc_sp_Cd #1}% }% -\def\XINT_trunc_C #1#2#3% +\def\XINT_trunc_sp_Cd #1.#2.#3% {% - \expandafter\XINT_trunc_CE\expandafter - {\romannumeral0\XINT_dsx_zeroloop -#1.{}\Z {#3}}{#2}% + \XINT_trunc_sp_F #3#1.% }% -\def\XINT_trunc_CE #1#2{\XINT_trunc_E #2.{#1}}% -\def\XINT_trunc_D #1#2% +\def\XINT_trunc_D #1.#2% {% \expandafter\XINT_trunc_E - \romannumeral0\XINT_dsx_zeroloop #1.{}\Z {#2}.% + \romannumeral0\XINT_dsx_addzeros {#1}#2;.% +}% +\def\XINT_trunc_sp_D #1.#2#3% +{% + \expandafter\XINT_trunc_sp_E + \romannumeral0\XINT_dsx_addzeros {#1}#2;.% }% \def\XINT_trunc_E #1% {% \xint_UDsignfork - #1\XINT_trunc_Fneg - -{\XINT_trunc_Fpos #1}% + #1{\XINT_trunc_F -}% + -{\XINT_trunc_F \space#1}% \krof }% -\def\XINT_trunc_Fneg #1.#2{\expandafter\xint_firstoftwo_thenstop - \romannumeral0\XINT_div_prepare {#2}{#1}\Z -}% -\def\XINT_trunc_Fpos #1.#2{\expandafter\xint_firstoftwo_thenstop - \romannumeral0\XINT_div_prepare {#2}{#1}\Z \space }% -\def\XINT_itrunc_G #1#2\Z #3#4% +\def\XINT_trunc_sp_E #1% {% - \xint_gob_til_zero #1\XINT_trunc_zero 0#3#1#2% + \xint_UDsignfork + #1{\XINT_trunc_sp_F -}% + -{\XINT_trunc_sp_F\space#1}% + \krof }% -\def\XINT_trunc_zero 0#1#20{ 0}% -\def\XINT_trunc_G #1\Z #2#3% +\def\XINT_trunc_F #1#2.#3#4% + {\expandafter#4\romannumeral`&&@\expandafter\xint_firstoftwo + \romannumeral0\XINT_div_prepare {#3}{#2}.#1}% +\def\XINT_trunc_sp_F #1#2.#3{#3#2.#1}% +\def\XINT_itrunc_G #1#2.#3#4.{\if#10\xint_dothis{ 0}\fi\xint_orthat{#3#1}#2}% +\def\XINT_trunc_G #1.#2#3.% {% - \xint_gob_til_zero #2\XINT_trunc_zero 0% - \expandafter\XINT_trunc_H\expandafter - {\the\numexpr\romannumeral0\xintlength {#1}-#3}{#3}{#1}#2% + \expandafter\XINT_trunc_H + \the\numexpr\romannumeral0\xintlength {#1}-#3.#3.{#1}#2% }% -\def\XINT_trunc_H #1#2% +\def\XINT_trunc_H #1.#2.% {% \ifnum #1 > \xint_c_ \xint_afterfi {\XINT_trunc_Ha {#2}}% @@ -915,329 +830,311 @@ \xint_afterfi {\XINT_trunc_Hb {-#1}}% -0,--1,--2, .... \fi }% -\def\XINT_trunc_Ha -{% - \expandafter\XINT_trunc_Haa\romannumeral0\xintdecsplit -}% -\def\XINT_trunc_Haa #1#2#3% -{% - #3#1.#2% -}% +\def\XINT_trunc_Ha{\expandafter\XINT_trunc_Haa\romannumeral0\xintdecsplit}% +\def\XINT_trunc_Haa #1#2#3{#3#1.#2}% \def\XINT_trunc_Hb #1#2#3% {% \expandafter #3\expandafter0\expandafter.% - \romannumeral0\XINT_dsx_zeroloop #1.{}\Z {}#2% #1=-0 autoris\'e ! + \romannumeral\xintreplicate{#1}0#2% }% \def\xintTTrunc {\romannumeral0\xintttrunc }% -\def\xintttrunc #1% -{% - \expandafter\XINT_itrunc_G - \romannumeral0\expandafter\XINT_ttrunc_A - \romannumeral0\XINT_infrac {#1}0% this last 0 to let \XINT_itrunc_G be happy -}% -\def\XINT_ttrunc_A #1#2#3{\XINT_trunc_checkifzero {#1}#2\Z {#3}}% +\def\xintttrunc {\xintitrunc\xint_c_}% \let\xintNum \xintTTrunc \let\xintnum \xintttrunc -\def\xintRound {\romannumeral0\xintround }% +\def\xintRound {\romannumeral0\xintround }% \def\xintiRound {\romannumeral0\xintiround }% -\def\xintround #1% +\def\xintround #1{\expandafter\XINT_round\the\numexpr #1.\XINT_round_A}% +\def\xintiround #1{\expandafter\XINT_round\the\numexpr #1.\XINT_iround_A}% +\def\XINT_round #1.{\expandafter\XINT_round_aa\the\numexpr #1+\xint_c_i.#1.}% +\def\XINT_round_aa #1.#2.#3#4% {% - \expandafter\XINT_round\expandafter {\the\numexpr #1}% + \expandafter\XINT_round_a\romannumeral0\XINT_infrac{#4}#1.#3#2.% }% -\def\XINT_round +\def\XINT_round_a #1#2#3#4.% {% - \expandafter\XINT_trunc_G\romannumeral0\XINT_round_A + \if0\XINT_Sgn#2\Z\xint_dothis\XINT_trunc_zero\fi + \if1\XINT_iSone#3XY\xint_dothis\XINT_trunc_sp_b\fi + \xint_orthat\XINT_trunc_b #1+#4.{#2}{#3}% }% -\def\xintiround #1% +\def\XINT_round_A{\expandafter\XINT_trunc_G\romannumeral0\XINT_round_B}% +\def\XINT_iround_A{\expandafter\XINT_itrunc_G\romannumeral0\XINT_round_B}% +\def\XINT_round_B #1.% + {\XINT_dsrr #1\xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax.}% +\def\xintXTrunc #1%#2% {% - \expandafter\XINT_iround\expandafter {\the\numexpr #1}% + \expandafter\XINT_xtrunc_a + \the\numexpr #1\expandafter.\romannumeral0\xintraw }% -\def\XINT_iround +\def\XINT_xtrunc_a #1.% ?? faire autre chose {% - \expandafter\XINT_itrunc_G\romannumeral0\XINT_round_A + \expandafter\XINT_xtrunc_b\the\numexpr\ifnum#1<\xint_c_i \xint_c_i-\fi #1.% }% -\def\XINT_round_A #1#2% +\def\XINT_xtrunc_b #1.#2{\XINT_xtrunc_c #2{#1}}% +\def\XINT_xtrunc_c #1% {% - \expandafter\XINT_round_B - \romannumeral0\expandafter\XINT_trunc_A - \romannumeral0\XINT_infrac {#2}{#1+\xint_c_i}{#1}% -}% -\def\XINT_round_B #1\Z + \xint_UDzerominusfork + #1-\XINT_xtrunc_zero + 0#1{-\XINT_xtrunc_d {}}% + 0-{\XINT_xtrunc_d #1}% + \krof +}%[ +\def\XINT_xtrunc_zero #1#2]{0.\romannumeral\xintreplicate{#1}0}% +\def\XINT_xtrunc_d #1#2#3/#4[#5]% {% - \expandafter\XINT_round_C - \romannumeral0\XINT_rord_main {}#1% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax - \Z + \XINT_xtrunc_prepare_a#4\R\R\R\R\R\R\R\R {10}0000001\W !{#4};{#5}{#2}{#1#3}% }% -\def\XINT_round_C #1% +\def\XINT_xtrunc_prepare_a #1#2#3#4#5#6#7#8#9% {% - \ifnum #1<\xint_c_v - \expandafter\XINT_round_Daa - \else - \expandafter\XINT_round_Dba - \fi + \xint_gob_til_R #9\XINT_xtrunc_prepare_small\R + \XINT_xtrunc_prepare_b #9% }% -\def\XINT_round_Daa #1% +\def\XINT_xtrunc_prepare_small\R #1!#2;% {% - \xint_gob_til_Z #1\XINT_round_Daz\Z \XINT_round_Da #1% + \ifcase #2 + \or\expandafter\XINT_xtrunc_BisOne + \or\expandafter\XINT_xtrunc_BisTwo + \or + \or\expandafter\XINT_xtrunc_BisFour + \or\expandafter\XINT_xtrunc_BisFive + \or + \or + \or\expandafter\XINT_xtrunc_BisEight + \fi\XINT_xtrunc_BisSmall {#2}% }% -\def\XINT_round_Daz\Z \XINT_round_Da \Z { 0\Z }% -\def\XINT_round_Da #1\Z +\def\XINT_xtrunc_BisOne\XINT_xtrunc_BisSmall #1#2#3#4% + {\XINT_xtrunc_sp_e {#2}{#4}{#3}}% +\def\XINT_xtrunc_BisTwo\XINT_xtrunc_BisSmall #1#2#3#4% {% - \XINT_rord_main {}#1% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax \Z + \expandafter\XINT_xtrunc_sp_e\expandafter + {\the\numexpr #2-\xint_c_i\expandafter}\expandafter + {\romannumeral0\xintiimul 5{#4}}{#3}% }% -\def\XINT_round_Dba #1% +\def\XINT_xtrunc_BisFour\XINT_xtrunc_BisSmall #1#2#3#4% {% - \xint_gob_til_Z #1\XINT_round_Dbz\Z \XINT_round_Db #1% + \expandafter\XINT_xtrunc_sp_e\expandafter + {\the\numexpr #2-\xint_c_ii\expandafter}\expandafter + {\romannumeral0\xintiimul {25}{#4}}{#3}% }% -\def\XINT_round_Dbz\Z \XINT_round_Db \Z { 1\Z }% -\def\XINT_round_Db #1\Z +\def\XINT_xtrunc_BisFive\XINT_xtrunc_BisSmall #1#2#3#4% {% - \XINT_addm_A 0{}1000\W\X\Y\Z #1000\W\X\Y\Z \Z + \expandafter\XINT_xtrunc_sp_e\expandafter + {\the\numexpr #2-\xint_c_i\expandafter}\expandafter + {\romannumeral0\xintdouble {#4}}{#3}% }% -\def\xintXTrunc #1#2% +\def\XINT_xtrunc_BisEight\XINT_xtrunc_BisSmall #1#2#3#4% {% - \expandafter\XINT_xtrunc_a\expandafter - {\the\numexpr #1\expandafter}\romannumeral0\xintraw {#2}% + \expandafter\XINT_xtrunc_sp_e\expandafter + {\the\numexpr #2-\xint_c_iii\expandafter}\expandafter + {\romannumeral0\xintiimul {125}{#4}}{#3}% }% -\def\XINT_xtrunc_a #1% +\def\XINT_xtrunc_BisSmall #1% {% - \expandafter\XINT_xtrunc_b\expandafter - {\the\numexpr\ifnum#1<\xint_c_i \xint_c_i-\fi #1}% + \expandafter\XINT_xtrunc_e\expandafter + {\expandafter\XINT_xtrunc_small_a + \the\numexpr #1/\xint_c_ii\expandafter.\the\numexpr \xint_c_x^viii+#1!}% }% -\def\XINT_xtrunc_b #1% +\def\XINT_xtrunc_small_a #1.#2!#3% {% - \expandafter\XINT_xtrunc_c\expandafter - {\the\numexpr (#1+\xint_c_ii^v)/\xint_c_ii^vi-\xint_c_i}{#1}% + \expandafter\XINT_div_small_b\the\numexpr #1\expandafter + .\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 }% -\def\XINT_xtrunc_c #1#2% +\def\XINT_xtrunc_prepare_b + {\expandafter\XINT_xtrunc_prepare_c\romannumeral0\XINT_zeroes_forviii }% +\def\XINT_xtrunc_prepare_c #1!% {% - \expandafter\XINT_xtrunc_d\expandafter - {\the\numexpr #2-\xint_c_ii^vi*#1}{#1}{#2}% + \XINT_xtrunc_prepare_d #1.00000000!{#1}% }% -\def\XINT_xtrunc_d #1#2#3#4/#5[#6]% +\def\XINT_xtrunc_prepare_d #1#2#3#4#5#6#7#8#9% {% - \XINT_xtrunc_e #4.{#6}{#5}{#3}{#2}{#1}% + \expandafter\XINT_xtrunc_prepare_e\xint_gob_til_dot #1#2#3#4#5#6#7#8#9!% }% -\def\XINT_xtrunc_e #1% +\def\XINT_xtrunc_prepare_e #1!#2!#3#4% {% - \xint_UDzerominusfork - #1-\XINT_xtrunc_zero - 0#1\XINT_xtrunc_N - 0-{\XINT_xtrunc_P #1}% - \krof + \XINT_xtrunc_prepare_f #4#3\X {#1}{#3}% }% -\def\XINT_xtrunc_zero .#1#2#3#4#5% +\def\XINT_xtrunc_prepare_f #1#2#3#4#5#6#7#8#9\X {% - 0.\romannumeral0\expandafter\XINT_dsx_zeroloop - \the\numexpr #5.{}\Z {}% - \xintiloop [#4+-1] - \ifnum \xintiloopindex>\xint_c_ - 0000000000000000000000000000000000000000000000000000000000000000% - \repeat + \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 + #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 + \X }% -\def\XINT_xtrunc_N {-\XINT_xtrunc_P }% -\def\XINT_xtrunc_P #1.#2% +\def\XINT_xtrunc_prepare_g #1;{\XINT_xtrunc_e {#1}}% +\def\XINT_xtrunc_e #1#2% {% \ifnum #2<\xint_c_ - \expandafter\XINT_xtrunc_negN_Q + \expandafter\XINT_xtrunc_I \else - \expandafter\XINT_xtrunc_Q - \fi {#2}{#1}.% + \expandafter\XINT_xtrunc_II + \fi #2.{#1}% }% -\def\XINT_xtrunc_negN_Q #1#2.#3#4#5#6% +\def\XINT_xtrunc_I -#1.#2#3#4% {% - \expandafter\XINT_xtrunc_negN_R - \romannumeral0\XINT_div_prepare {#3}{#2}{#3}{#1}{#4}% + \expandafter\XINT_xtrunc_I_a\romannumeral0#2{#4}{#2}{#1}{#3}% }% -\def\XINT_xtrunc_negN_R #1#2#3#4#5% +\def\XINT_xtrunc_I_a #1#2#3#4#5% {% - \expandafter\XINT_xtrunc_negN_S\expandafter - {\the\numexpr -#4}{#5}{#2}{#3}{#1}% + \expandafter\XINT_xtrunc_I_b\the\numexpr #4-#5.#4.{#5}{#2}{#3}{#1}% }% -\def\XINT_xtrunc_negN_S #1#2% +\def\XINT_xtrunc_I_b #1% {% - \expandafter\XINT_xtrunc_negN_T\expandafter - {\the\numexpr #2-#1}{#1}{#2}% + \xint_UDsignfork + #1\XINT_xtrunc_IA_c + -\XINT_xtrunc_IB_c + \krof #1% }% -\def\XINT_xtrunc_negN_T #1% +\def\XINT_xtrunc_IA_c -#1.#2.#3#4#5#6% {% - \ifnum \xint_c_<#1 - \expandafter\XINT_xtrunc_negNA - \else - \expandafter\XINT_xtrunc_negNW - \fi {#1}% + \expandafter\XINT_xtrunc_IA_d + \the\numexpr#2-\xintLength{#6}.{#6}% + \expandafter\XINT_xtrunc_IA_xd + \the\numexpr (#1+\xint_c_ii^v)/\xint_c_ii^vi-\xint_c_i.#1.{#5}{#4}% }% -\def\XINT_xtrunc_unlock #10.{ }% -\def\XINT_xtrunc_negNA #1#2#3#4#5#6% +\def\XINT_xtrunc_IA_d #1% {% - \expandafter\XINT_xtrunc_negNB\expandafter - {\romannumeral0\expandafter\expandafter\expandafter - \XINT_xtrunc_unlock\expandafter\string - \csname\XINT_xtrunc_b {#1}#4/#5[0]\expandafter\endcsname - \expandafter}\expandafter - {\the\numexpr\xintLength{#6}-#2}{#6}% + \xint_UDsignfork + #1\XINT_xtrunc_IAA_e + -\XINT_xtrunc_IAB_e + \krof #1% }% -\def\XINT_xtrunc_negNB #1#2#3{\XINT_xtrunc_negNC {#2}{#3}#1}% -\def\XINT_xtrunc_negNC #1% +\def\XINT_xtrunc_IAA_e -#1.#2% {% - \ifnum \xint_c_ < #1 - \expandafter\XINT_xtrunc_negNDa - \else - \expandafter\XINT_xtrunc_negNE - \fi {#1}% + \romannumeral0\XINT_split_fromleft + #1.#2\xint_gobble_i\xint_bye2345678\xint_bye..% }% -\def\XINT_xtrunc_negNDa #1#2% +\def\XINT_xtrunc_IAB_e #1.#2% {% - \expandafter\XINT_xtrunc_negNDb% - \romannumeral0\XINT_split_fromleft_loop #1.{}#2\W\W\W\W\W\W\W\W\Z + 0.\romannumeral\XINT_rep#1\endcsname0#2% }% -\def\XINT_xtrunc_negNDb #1.#2.{#1.#2}% -\def\XINT_xtrunc_negNE #1#2% +\def\XINT_xtrunc_IA_xd #1.#2.% {% - 0.\romannumeral0\XINT_dsx_zeroloop -#1.{}\Z {}#2% + \expandafter\XINT_xtrunc_IA_xe\the\numexpr #2-\xint_c_ii^vi*#1.#1.% }% -\def\XINT_xtrunc_negNW #1#2#3#4#5#6% +\def\XINT_xtrunc_IA_xe #1.#2.#3#4% {% - \expandafter\XINT_xtrunc_negNX\expandafter - {\romannumeral0\xintnum{\xintDecSplitL {-#1}{#6}}}{#3}% + \XINT_xtrunc_loop {#2}{#4}{#3}{#1}% }% -\def\XINT_xtrunc_negNX #1#2% +\def\XINT_xtrunc_IB_c #1.#2.#3#4#5#6% {% - \expandafter\XINT_xtrunc_negNC\expandafter - {\the\numexpr\xintLength {#1}-#2}{#1}% + \expandafter\XINT_xtrunc_IB_d + \romannumeral0\XINT_split_xfork #1.#6\xint_bye2345678\xint_bye..{#3}% }% -\def\XINT_xtrunc_BisOne #1#2#3#4#5#6#7% +\def\XINT_xtrunc_IB_d #1.#2.#3% {% - #5.\romannumeral0\expandafter\XINT_dsx_zeroloop - \the\numexpr #7.{}\Z {}% - \xintiloop [#6+-1] - \ifnum \xintiloopindex>\xint_c_ - 0000000000000000000000000000000000000000000000000000000000000000% - \repeat + \expandafter\XINT_xtrunc_IA_d\the\numexpr#3-\xintLength {#1}.{#1}% }% -\def\XINT_xtrunc_BisTwo #1#2#3#4#5#6#7% +\def\XINT_xtrunc_II #1.% {% - \xintHalf {#5}.\ifodd\xintiiLDg{#5} 5\else 0\fi - \romannumeral0\expandafter\XINT_dsx_zeroloop - \the\numexpr #7-\xint_c_i.{}\Z {}% - \xintiloop [#6+-1] - \ifnum \xintiloopindex>\xint_c_ - 0000000000000000000000000000000000000000000000000000000000000000% - \repeat + \expandafter\XINT_xtrunc_II_a\romannumeral\xintreplicate{#1}0.% }% -\def\XINT_xtrunc_Q #1% +\def\XINT_xtrunc_II_a #1.#2#3#4% {% - \expandafter\XINT_xtrunc_prepare - \romannumeral0\XINT_dsx_zeroloop #1.{}\Z + \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}% }% -\def\XINT_xtrunc_prepare #1.#2#3% +\def\XINT_xtrunc_II_b #1.#2.% {% - \expandafter\XINT_xtrunc_Pa\expandafter - {\romannumeral0% - \XINT_xtrunc_prepare_a #2\R\R\R\R\R\R\R\R {10}0000001\W !{#2}}{#1}% + \expandafter\XINT_xtrunc_II_c\the\numexpr #2-\xint_c_ii^vi*#1.#1.% }% -\def\XINT_xtrunc_prepare_a #1#2#3#4#5#6#7#8#9% +\def\XINT_xtrunc_II_c #1.#2.#3#4#5% {% - \xint_gob_til_R #9\XINT_xtrunc_prepare_small\R - \XINT_xtrunc_prepare_b #9% + #3.\XINT_xtrunc_loop {#2}{#4}{#5}{#1}% }% -\def\XINT_xtrunc_prepare_small\R #1!#2% +\def\XINT_xtrunc_loop #1% {% - \ifcase #2 - \or\xint_afterfi{ \XINT_div_BisOne}% - \or\xint_afterfi{ \XINT_div_BisTwo}% - \else\expandafter\XINT_xtrunc_small_aa - \fi {#2}% + \ifnum #1=\xint_c_ \expandafter\XINT_xtrunc_transition\fi + \expandafter\XINT_xtrunc_loop_a\the\numexpr #1-\xint_c_i.% }% -\def\XINT_xtrunc_small_aa #1% +\def\XINT_xtrunc_loop_a #1.#2#3% {% - \expandafter\space\expandafter\XINT_xtrunc_small_a - \the\numexpr #1/\xint_c_ii\expandafter - .\the\numexpr \xint_c_x^viii+#1!% + \expandafter\XINT_xtrunc_loop_b\romannumeral0#3% + {#20000000000000000000000000000000000000000000000000000000000000000}% + {#1}{#3}% }% -\def\XINT_xtrunc_small_a #1.#2!#3% +\def\XINT_xtrunc_loop_b #1#2#3% {% - \expandafter\XINT_div_small_b\the\numexpr #1\expandafter - .\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 + \romannumeral\xintreplicate{\xint_c_ii^vi-\xintLength{#1}}0#1% + \XINT_xtrunc_loop {#3}{#2}% }% -\def\XINT_xtrunc_prepare_b - {\expandafter\XINT_xtrunc_prepare_c\romannumeral0\XINT_zeroes_forviii }% -\def\XINT_xtrunc_prepare_c #1!% +\def\XINT_xtrunc_transition + \expandafter\XINT_xtrunc_loop_a\the\numexpr #1.#2#3#4% {% - \XINT_xtrunc_prepare_d #1.00000000!{#1}% + \ifnum #4=\xint_c_ \expandafter\xint_gobble_vi\fi + \expandafter\XINT_xtrunc_finish\expandafter + {\romannumeral0\XINT_dsx_addzeros{#4}#2;}{#3}{#4}% }% -\def\XINT_xtrunc_prepare_d #1#2#3#4#5#6#7#8#9% +\def\XINT_xtrunc_finish #1#2% {% - \expandafter\XINT_xtrunc_prepare_e\xint_gob_til_dot #1#2#3#4#5#6#7#8#9!% + \expandafter\XINT_xtrunc_finish_a\romannumeral0#2{#1}% }% -\def\XINT_xtrunc_prepare_e #1!#2!#3#4% +\def\XINT_xtrunc_finish_a #1#2#3% {% - \XINT_xtrunc_prepare_f #4#3\X {#1}{#3}% + \romannumeral\xintreplicate{#3-\xintLength{#1}}0#1% }% -\def\XINT_xtrunc_prepare_f #1#2#3#4#5#6#7#8#9\X +\def\XINT_xtrunc_sp_e #1% {% - \expandafter\space\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 - #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 - \X + \ifnum #1<\xint_c_ + \expandafter\XINT_xtrunc_sp_I + \else + \expandafter\XINT_xtrunc_sp_II + \fi #1.% }% -\def\XINT_xtrunc_Pa #1#2% +\def\XINT_xtrunc_sp_I -#1.#2#3% {% - \expandafter\XINT_xtrunc_Pb\romannumeral0#1{#2}{#1}% + \expandafter\XINT_xtrunc_sp_I_a\the\numexpr #1-#3.#1.{#3}{#2}% }% -\def\XINT_xtrunc_Pb #1#2#3#4{#1.\XINT_xtrunc_A {#4}{#2}{#3}}% -\def\XINT_xtrunc_A #1% +\def\XINT_xtrunc_sp_I_a #1% {% - \unless\ifnum #1>\xint_c_ \XINT_xtrunc_transition\fi - \expandafter\XINT_xtrunc_B\expandafter{\the\numexpr #1-\xint_c_i}% + \xint_UDsignfork + #1\XINT_xtrunc_sp_IA_b + -\XINT_xtrunc_sp_IB_b + \krof #1% }% -\def\XINT_xtrunc_B #1#2#3% +\def\XINT_xtrunc_sp_IA_b -#1.#2.#3#4% {% - \expandafter\XINT_xtrunc_D\romannumeral0#3% - {#20000000000000000000000000000000000000000000000000000000000000000}% - {#1}{#3}% + \expandafter\XINT_xtrunc_sp_IA_c + \the\numexpr#2-\xintLength{#4}.{#4}\romannumeral\XINT_rep#1\endcsname0% }% -\def\XINT_xtrunc_D #1#2#3% +\def\XINT_xtrunc_sp_IA_c #1% {% - \romannumeral0\expandafter\XINT_dsx_zeroloop - \the\numexpr \xint_c_ii^vi-\xintLength{#1}.{}\Z {}#1% - \XINT_xtrunc_A {#3}{#2}% + \xint_UDsignfork + #1\XINT_xtrunc_sp_IAA + -\XINT_xtrunc_sp_IAB + \krof #1% }% -\def\XINT_xtrunc_transition\fi - \expandafter\XINT_xtrunc_B\expandafter #1#2#3#4% +\def\XINT_xtrunc_sp_IAA -#1.#2% {% - \fi - \ifnum #4=\xint_c_ \XINT_xtrunc_abort\fi - \expandafter\XINT_xtrunc_x\expandafter - {\romannumeral0\XINT_dsx_zeroloop #4.{}\Z {#2}}{#3}{#4}% + \romannumeral0\XINT_split_fromleft + #1.#2\xint_gobble_i\xint_bye2345678\xint_bye..% +}% +\def\XINT_xtrunc_sp_IAB #1.#2% +{% + 0.\romannumeral\XINT_rep#1\endcsname0#2% +}% +\def\XINT_xtrunc_sp_IB_b #1.#2.#3#4% +{% + \expandafter\XINT_xtrunc_sp_IB_c + \romannumeral0\XINT_split_xfork #1.#4\xint_bye2345678\xint_bye..{#3}% }% -\def\XINT_xtrunc_x #1#2% +\def\XINT_xtrunc_sp_IB_c #1.#2.#3% {% - \expandafter\XINT_xtrunc_y\romannumeral0#2{#1}% + \expandafter\XINT_xtrunc_sp_IA_c\the\numexpr#3-\xintLength {#1}.{#1}% }% -\def\XINT_xtrunc_y #1#2#3% +\def\XINT_xtrunc_sp_II #1.#2#3% {% - \romannumeral0\expandafter\XINT_dsx_zeroloop - \the\numexpr #3-\xintLength{#1}.{}\Z {}#1% + #2\romannumeral\XINT_rep#1\endcsname0.\romannumeral\XINT_rep#3\endcsname0% }% -\def\XINT_xtrunc_abort\fi\expandafter\XINT_xtrunc_x\expandafter #1#2#3{\fi}% \mathchardef\XINTdigits 16 \def\xintDigits #1#2% {\afterassignment \xint_gobble_i \mathchardef\XINTdigits=}% @@ -1252,29 +1149,27 @@ \def\XINT_fadd_Bzero #1]#2#3#4{ #3/#4[#2]}% \def\XINT_fadd_c #1/#2[#3]#4% {% - \expandafter\XINT_fadd_Aa\expandafter{\the\numexpr #4-#3}{#3}{#4}{#1}{#2}% + \expandafter\XINT_fadd_Aa\the\numexpr #4-#3.{#3}{#4}{#1}{#2}% }% \def\XINT_fadd_Aa #1% {% - \ifcase\XINT_cntSgn #1\Z - \expandafter\XINT_fadd_B - \or - \expandafter \XINT_fadd_Ba - \else - \expandafter \XINT_fadd_Bb - \fi {#1}% + \xint_UDzerominusfork + #1-\XINT_fadd_B + 0#1\XINT_fadd_Bb + 0-\XINT_fadd_Ba + \krof #1% }% -\def\XINT_fadd_B #1#2#3#4#5#6#7{\XINT_fadd_C {#4}{#5}{#7}{#6}[#3]}% -\def\XINT_fadd_Ba #1#2#3#4#5#6#7% +\def\XINT_fadd_B #1.#2#3#4#5#6#7{\XINT_fadd_C {#4}{#5}{#7}{#6}[#3]}% +\def\XINT_fadd_Ba #1.#2#3#4#5#6#7% {% \expandafter\XINT_fadd_C\expandafter - {\romannumeral0\XINT_dsx_zeroloop #1.{}\Z {#6}}% + {\romannumeral0\XINT_dsx_addzeros {#1}#6;}% {#7}{#5}{#4}[#2]% }% -\def\XINT_fadd_Bb #1#2#3#4#5#6#7% +\def\XINT_fadd_Bb -#1.#2#3#4#5#6#7% {% \expandafter\XINT_fadd_C\expandafter - {\romannumeral0\XINT_dsx_zeroloop -#1.{}\Z {#4}}% + {\romannumeral0\XINT_dsx_addzeros {#1}#4;}% {#5}{#7}{#6}[#3]% }% \def\XINT_fadd_C #1#2#3% @@ -1579,13 +1474,13 @@ \def\XINT_fgeq_Fd #1\Z #2#3% {% \expandafter\XINT_fgeq_Fe\expandafter - {\romannumeral0\XINT_dsx_addzerosnofuss {#1}{#3}}{#2}% + {\romannumeral0\XINT_dsx_addzeros {#1}#3;}{#2}% }% \def\XINT_fgeq_Fe #1#2{\XINT_geq_pre {#2}{#1}}% \def\XINT_fgeq_Fn #1\Z #2#3% {% \expandafter\XINT_geq_pre\expandafter - {\romannumeral0\XINT_dsx_addzerosnofuss {#1}{#2}}{#3}% + {\romannumeral0\XINT_dsx_addzeros {#1}#2;}{#3}% }% \def\xintMax {\romannumeral0\xintmax }% \def\xintmax #1% @@ -1741,13 +1636,13 @@ \def\XINT_fcmp_Fd #1\Z #2#3% {% \expandafter\XINT_fcmp_Fe\expandafter - {\romannumeral0\XINT_dsx_addzerosnofuss {#1}{#3}}{#2}% + {\romannumeral0\XINT_dsx_addzeros {#1}#3;}{#2}% }% \def\XINT_fcmp_Fe #1#2{\xintiicmp {#2}{#1}}% \def\XINT_fcmp_Fn #1\Z #2#3% {% \expandafter\xintiicmp\expandafter - {\romannumeral0\XINT_dsx_addzerosnofuss {#1}{#2}}{#3}% + {\romannumeral0\XINT_dsx_addzeros {#1}#2;}{#3}% }% \def\xintAbs {\romannumeral0\xintabs }% \def\xintabs #1{\expandafter\XINT_abs\romannumeral0\xintraw {#1}}% @@ -1775,7 +1670,7 @@ }% \def\XINT_float_a #1.#2#3#4% {% - \if\romannumeral0\XINT_isone#4XY1\expandafter\XINT_float_sp + \if1\XINT_iSone#4XY\expandafter\XINT_float_sp \else\expandafter\XINT_float_fork\fi #3.{#1}{#2}{#4}% }% \def\XINT_float_sp #1% @@ -1808,50 +1703,26 @@ {% \expandafter\XINT_float_sp_done \the\numexpr #4-#1+#3-\xint_c_i\expandafter.% - \romannumeral0\XINT_dsx_addzerosnofuss {#1}{#2};% + \romannumeral0\XINT_dsx_addzeros {#1}#2;;% }% \def\XINT_float_sp_done #1.#2#3;{ #2.#3e#1}% \def\XINT_float_sp_c #1.#2% {% \if #29\xint_dothis {\XINT_float_sp_d\XINT_float_Wb }\fi - \xint_orthat {\XINT_float_sp_d\XINT_float_sp_Wa }#1.#2% + \xint_orthat {\XINT_float_sp_d\XINT_float_Wa }#1.#2% }% \def\XINT_float_sp_d #1#2.#3.#4.#5.% {% \expandafter\XINT_float_sp_e \the\numexpr #5+#2+#4-\xint_c_i\expandafter.% - \romannumeral0\expandafter\XINT_split_fromleft_loop - \the\numexpr #4+\xint_c_i.{}#3\W\W\W\W\W\W\W\W\Z #1% + \romannumeral0\XINT_split_fromleft + (\xint_c_i+#4).#3\xint_bye2345678\xint_bye..#1% }% -\def\XINT_float_sp_e #1.#2.#3.% +\def\XINT_float_sp_e #1.#2.#3.#4% {% - \expandafter\XINT_float_sp_f - \romannumeral0\XINT_rord_main {}#2% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax ;#1.% + \expandafter#4\romannumeral0\XINT_dsrr#2% + \xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax e#1% }% -\def\XINT_float_sp_f #1% -{% - \ifnum #1<\xint_c_v - \expandafter\XINT_float_sp_ga\else\expandafter\XINT_float_sp_h\fi -}% -\def\XINT_float_sp_ga #1;#2.#3% -{% - \expandafter\XINT_float_sp_Wa - \romannumeral0\XINT_rord_main {}#1% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax e#2% -}% -\def\XINT_float_sp_h #1;#2.#3% -{% - \expandafter#3% - \romannumeral0\XINT_addm_A 0{}1000\W\X\Y\Z #1000\W\X\Y\Z e#2% -}% -\def\XINT_float_sp_Wa #1{ #1.}% \def\XINT_float_fork #1% {% \xint_UDsignfork @@ -1877,8 +1748,7 @@ {% \expandafter\XINT_float_MatoN \the\numexpr #1-#2\expandafter.% - \romannumeral0\XINT_split_fromleft_loop #2.{}#3\W\W\W\W\W\W\W\W\Z - {#2}% + \romannumeral0\XINT_split_fromleft#2.#3\xint_bye2345678\xint_bye..{#2}% }% \def\XINT_float_MatoN #1.#2.#3.#4#5#6#7% {% @@ -1902,7 +1772,7 @@ {% \expandafter\XINT_float_NaP \the\numexpr #2-#1+#3\expandafter.% - \romannumeral0\XINT_split_fromleft_loop #3.{}#4\W\W\W\W\W\W\W\W\Z {#3}% + \romannumeral0\XINT_split_fromleft#3.#4\xint_bye2345678\xint_bye..{#3}% }% \def\XINT_float_NaP #1.#2.#3.#4{\XINT_float_P #4.#1.#4.{#2}}% \def\XINT_float_P #1.#2.#3.#4#5#6#7#8% @@ -1912,7 +1782,7 @@ \def\XINT_float_Q #1.#2#3% {% \expandafter\XINT_float_Sa - \romannumeral0\xintiiquo{\XINT_dsx_addzerosnofuss {#1}{#2}}{#3}\Z {#1}% + \romannumeral0\xintiiquo{\XINT_dsx_addzeros {#1}#2;}{#3}\Z {#1}% }% \def\XINT_float_Sa #1% {% @@ -1922,45 +1792,40 @@ \def\XINT_float_Sb #1#2\Z #3#4% {% \expandafter\XINT_float_T - \the\numexpr #4+\xint_c_i\expandafter.% - \romannumeral`&&@\XINT_lenrord_loop 0.{}#2\Z\W\W\W\W\W\W\W\Z #1{#3}{#4}% + \the\numexpr\xint_c_ix\XINT_length_loop + #2\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye-#4.% + {#2}#1{#3}{#4}% }% -\def\XINT_float_T #1.#2.#3% +\def\XINT_float_T #1.% {% - \ifnum #2>#1 \xint_dothis{\XINT_float_U\XINT_float_Xb}\fi - \xint_orthat{\XINT_float_U\XINT_float_Xa #3}% + \if2#1\expandafter\XINT_float_Ub\else\expandafter\XINT_float_Ua\fi }% -\def\XINT_float_U #1#2% +\def\XINT_float_Ua #1#2% {% - \ifnum #2<\xint_c_v - \expandafter\XINT_float_Va - \else - \expandafter\XINT_float_Vb - \fi #1% -}% -\def\XINT_float_Va #1#2\Z #3% -{% - \expandafter#1% - \romannumeral0\expandafter\XINT_float_Wa - \romannumeral0\XINT_rord_main {}#2% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax \Z + \expandafter\XINT_float_Xa + \romannumeral0\expandafter#2% + \romannumeral0\XINT_dsrr + #1\xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax;% }% -\def\XINT_float_Vb #1#2\Z #3% +\def\XINT_float_Ub #1#2% {% - \expandafter #1% - \romannumeral0\expandafter #3% - \romannumeral0\XINT_addm_A 0{}1000\W\X\Y\Z #2000\W\X\Y\Z \Z + \expandafter\XINT_float_Xb + \romannumeral0\expandafter#2% + \romannumeral0\expandafter\XINT_dsrr + \romannumeral0\XINT_dsr + #1\xint_bye\xint_Bye3456789\xint_bye+\xint_c_v)/\xint_c_x-\xint_c_i\relax + \xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax;% }% \def\XINT_float_Wa #1{ #1.}% \def\XINT_float_Wb #1#2{\if #11\xint_dothis{ 10.}\fi\xint_orthat{ #1.#2}}% -\def\XINT_float_Xa #1\Z #2#3#4% +\def\XINT_float_Xa #1;#2#3#4% {% \expandafter\XINT_float_Y\the\numexpr #3+#4-#2.{#1}% }% -\def\XINT_float_Xb #1\Z #2#3#4% +\def\XINT_float_Xb #1;#2#3#4% {% \expandafter\XINT_float_Y\the\numexpr #3+#4+\xint_c_i-#2.{#1}% }% @@ -1972,11 +1837,11 @@ {\if #1!\xint_dothis\XINT_infloat_clean_a\fi\xint_orthat{ }#1}% \def\XINT_infloat_clean_a !#1.#2[#3]% {% - \expandafter\XINT_infloat_sp_done + \expandafter\XINT_infloat_done \the\numexpr #3-#1\expandafter.% - \romannumeral0\XINT_dsx_addzerosnofuss {#1}{#2};% + \romannumeral0\XINT_dsx_addzeros {#1}#2;;% }% -\def\XINT_infloat_sp_done #1.#2;{ #2[#1]}% +\def\XINT_infloat_done #1.#2;{ #2[#1]}% \def\XINTinFloatS {\romannumeral0\XINTinfloatS}% \def\XINTinfloatS {\expandafter\XINT_infloatS_clean\romannumeral0\XINT_infloat}% @@ -1990,7 +1855,7 @@ }% \def\XINT_infloat_a #1.#2#3#4% {% - \if\romannumeral0\XINT_isone#4XY1\expandafter\XINT_infloat_sp + \if1\XINT_iSone#4XY\expandafter\XINT_infloat_sp \else\expandafter\XINT_float_fork\fi #3.{#1}{#2}{#4}% }% \def\XINT_infloat_sp #1% @@ -2024,103 +1889,62 @@ \def\XINT_infloat_sp_c #1.#2% {% \if #29\xint_dothis {\XINT_infloat_sp_d\XINT_infloat_Wb }\fi - \xint_orthat {\XINT_infloat_sp_d\xint_c_ }#1.#2% + \xint_orthat {\XINT_infloat_sp_d .}#1.#2% }% \def\XINT_infloat_sp_d #1#2.#3.#4.%#5.% {% \expandafter\XINT_infloat_sp_e - \romannumeral0\expandafter\XINT_split_fromleft_loop - \the\numexpr #4+\xint_c_i.{}#3\W\W\W\W\W\W\W\W\Z #1#2.% + \romannumeral0\XINT_split_fromleft + (\xint_c_i+#4).#3\xint_bye2345678\xint_bye..#1#2.% }% -\def\XINT_infloat_sp_e #1.#2.% +\def\XINT_infloat_sp_e #1.#2.#3#4.#5.% {% - \expandafter\XINT_infloat_sp_f - \romannumeral0\XINT_rord_main {}#1% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax ;% -}% -\def\XINT_infloat_sp_f #1% -{% - \ifnum #1<\xint_c_v - \expandafter\XINT_infloat_sp_ga\else\expandafter\XINT_infloat_sp_h\fi -}% -\def\XINT_infloat_sp_ga #1;#2#3.#4.% -{% - \expandafter\XINT_infloat_sp_done\the\numexpr #3+#4\expandafter.% - \romannumeral0\XINT_rord_main {}#1% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax ;% -}% -\def\XINT_infloat_sp_h #1;#2% -{% - \expandafter\XINT_infloat_sp_i - \romannumeral0\expandafter#2% - \romannumeral0\XINT_addm_A 0{}1000\W\X\Y\Z #1000\W\X\Y\Z;% -}% -\def\XINT_infloat_sp_i #1#2;#3.#4.% -{% - \expandafter\XINT_infloat_sp_done\the\numexpr #1+#3+#4.#2;% + \expandafter\XINT_infloat_done + \the\numexpr#4+#5\expandafter#3\romannumeral0\XINT_dsrr + #1\xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax;% }% \def\XINT_infloat_Q #1.#2#3% {% \expandafter\XINT_infloat_Sa - \romannumeral0\xintiiquo{\XINT_dsx_addzerosnofuss {#1}{#2}}{#3}\Z {#1}% + \romannumeral0\xintiiquo{\XINT_dsx_addzeros {#1}#2;}{#3}\Z {#1}% }% \def\XINT_infloat_Sa #1% {% \if #19\xint_dothis {\XINT_infloat_Sb\XINT_infloat_Wb }\fi - \xint_orthat {\XINT_infloat_Sb\xint_c_ }#1% + \xint_orthat {\XINT_infloat_Sb .}#1% }% \def\XINT_infloat_Sb #1#2\Z #3#4% {% \expandafter\XINT_infloat_T - \the\numexpr #4+\xint_c_i\expandafter.% - \romannumeral`&&@\XINT_lenrord_loop 0.{}#2\Z\W\W\W\W\W\W\W\Z #1{#3}% + \the\numexpr\xint_c_ix\XINT_length_loop + #2\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye-#4.% + {#2}#1{#3}% }% -\def\XINT_infloat_T #1.#2.#3% +\def\XINT_infloat_T #1.% {% - \ifnum #2>#1 \xint_dothis{\XINT_infloat_U\XINT_infloat_Xb}\fi - \xint_orthat{\XINT_infloat_U\XINT_infloat_Xa #3}% -}% -\def\XINT_infloat_U #1#2% -{% - \ifnum #2<\xint_c_v - \expandafter\XINT_infloat_Va - \else - \expandafter\XINT_infloat_Vb - \fi #1% + \if2#1\expandafter\XINT_infloat_Ub\else\expandafter\XINT_infloat_Ua\fi }% -\def\XINT_infloat_Va #1#2\Z #3% +\def\XINT_infloat_Ua #1#2#3#4% {% - \expandafter#1% - \romannumeral0\expandafter\xint_c_ - \romannumeral0\XINT_rord_main {}#2% - \xint_relax - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_bye\xint_bye\xint_bye\xint_bye - \xint_relax \Z + \expandafter\XINT_infloat_done + \the\numexpr\xint_c_i+#4-#3\romannumeral0\expandafter#2% + \romannumeral0\XINT_dsrr + #1\xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax;% }% -\def\XINT_infloat_Vb #1#2\Z #3% +\def\XINT_infloat_Ub #1#2#3#4% {% - \expandafter #1% - \romannumeral0\expandafter #3% - \romannumeral0\XINT_addm_A 0{}1000\W\X\Y\Z #2000\W\X\Y\Z \Z + \expandafter\XINT_infloat_done + \the\numexpr\xint_c_ii+#4-#3\romannumeral0\expandafter#2% + \romannumeral0\expandafter\XINT_dsrr + \romannumeral0\XINT_dsr + #1\xint_bye\xint_Bye3456789\xint_bye+\xint_c_v)/\xint_c_x-\xint_c_i\relax + \xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax;% }% \def\XINT_infloat_Wb #1#2% - {\if #11\xint_dothis{\xint_c_i1}\fi\xint_orthat{\xint_c_#1#2}}% -\def\XINT_infloat_Xa #1#2\Z #3#4% -{% - \expandafter\XINT_infloat_Y\the\numexpr #1+\xint_c_i+#4-#3.{#2}% -}% -\def\XINT_infloat_Xb #1#2\Z #3#4% -{% - \expandafter\XINT_infloat_Y\the\numexpr #1+\xint_c_ii+#4-#3.{#2}% -}% -\def\XINT_infloat_Y #1.#2{ #2[#1]}% + {\if #11\xint_dothis{+\xint_c_i.1}\fi\xint_orthat{.#1#2}}% \def\xintPFloat {\romannumeral0\xintpfloat }% \def\xintpfloat #1{\XINT_pfloat_chkopt #1\xint_relax }% \def\XINT_pfloat_chkopt #1% @@ -2370,7 +2194,7 @@ \def\XINT_flpow_aa #1[#2]#3% {% \expandafter\XINT_flpow_ab\the\numexpr #2-#3\expandafter.% - \romannumeral0\XINT_dsx_addzerosnofuss {#3}{}.#1.% + \romannumeral\XINT_rep #3\endcsname0.#1.% }% \def\XINT_flpow_ab #1.#2.#3.{\XINT_flpow_a #3#2[#1]}% \def\XINT_flpow_a #1% @@ -2393,8 +2217,8 @@ \def\XINT_flpow_truncate #1.#2.#3.% {% \expandafter\XINT_flpow_truncate_a - \romannumeral0\XINT_split_fromleft_loop #3.{}#2\W\W\W\W\W\W\W\W\Z - #1.#3.% + \romannumeral0\XINT_split_fromleft + #3.#2\xint_bye2345678\xint_bye..#1.#3.% }% \def\XINT_flpow_truncate_a #1.#2.#3.{#3+\xintLength{#2}.#1.}% \def\XINT_flpow_loopI #1.% @@ -2552,7 +2376,7 @@ \def\XINT_flpower_aa #1[#2]#3% {% \expandafter\XINT_flpower_ab\the\numexpr #2-#3\expandafter.% - \romannumeral0\XINT_dsx_addzerosnofuss {#3}{}.#1.% + \romannumeral\XINT_rep #3\endcsname0.#1.% }% \def\XINT_flpower_ab #1.#2.#3.{\XINT_flpower_a #3#2[#1]}% \def\XINT_flpower_a #1% @@ -2572,7 +2396,9 @@ \if1\XINT_isOne {#1}\xint_dothis\XINT_flpower_ItoIII\fi \if1\xintiiOdd {#1}\xint_dothis{\expandafter\XINT_flpower_loopI_odd}\fi \xint_orthat{\expandafter\XINT_flpower_loopI_even}% - \romannumeral0\xinthalf{#1}.% + \romannumeral0\XINT_half + #1\xint_bye\xint_Bye345678\xint_bye + *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax.% }% \def\XINT_flpower_ItoIII #1.#2.#3.#4.#5% {% @@ -2598,7 +2424,8 @@ \if1\XINT_isOne{#1}\xint_dothis\XINT_flpower_IItoIII\fi \if1\xintiiOdd{#1}\xint_dothis{\expandafter\XINT_flpower_loopII_odd}\fi \xint_orthat{\expandafter\XINT_flpower_loopII_even}% - \romannumeral0\xinthalf{#1}.% + \romannumeral0\XINT_half#1\xint_bye\xint_Bye345678\xint_bye + *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax.% }% \def\XINT_flpower_loopII_even #1.#2.#3.#4.% {% @@ -3125,13 +2952,14 @@ {% \expandafter\XINT_flsqrt_c \romannumeral0\xintiisub - {\XINT_dsx_addzerosnofuss {#1}{#2}}% - {\xintiiDivRound{\XINT_dsx_addzerosnofuss {#1}{#3}}{\XINT_dbl_pos#2\Z}}.% + {\XINT_dsx_addzeros {#1}#2;}% + {\xintiiDivRound{\XINT_dsx_addzeros {#1}#3;}% + {\XINT_dbl#2\xint_bye2345678\xint_bye*\xint_c_ii\relax}}.% }% \def\XINT_flsqrt_c #1.#2.% {% \expandafter\XINT_flsqrt_d - \romannumeral0\XINT_split_fromleft_loop #2.{}#1\W\W\W\W\W\W\W\W\Z + \romannumeral0\XINT_split_fromleft#2.#1\xint_bye2345678\xint_bye..% }% \def\XINT_flsqrt_d #1.#2#3.% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty index 7c1fc1420ed..8dceec9e843 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintgcd: Euclidean algorithm with xint package %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintgcd}% - [2016/11/20 1.2h Euclide algorithm with xint package (JFB)]% + [2016/12/13 1.2i 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 8a688ec26e1..b887988dcb5 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintkernel: Paraphernalia for the xint packages %% --------------------------------------------------------------- @@ -156,7 +156,7 @@ \fi \XINT_providespackage \ProvidesPackage {xintkernel}% - [2016/11/20 1.2h Paraphernalia for the xint packages (JFB)]% + [2016/12/13 1.2i Paraphernalia for the xint packages (JFB)]% \chardef\xint_c_ 0 \chardef\xint_c_i 1 \chardef\xint_c_ii 2 @@ -197,7 +197,7 @@ \let\XINT_tmpa\relax \let\XINT_tmpb\relax \ifdefined\space\else\def\space { }\fi \ifdefined\empty\else\def\empty {}\fi -\long\def\xint_gobble_ {}% +\let\xint_gobble_\empty \long\def\xint_gobble_i #1{}% \long\def\xint_gobble_ii #1#2{}% \long\def\xint_gobble_iii #1#2#3{}% @@ -213,45 +213,47 @@ \long\def\xint_firstofone_thenstop #1{ #1}% \long\def\xint_firstoftwo_thenstop #1#2{ #1}% \long\def\xint_secondoftwo_thenstop #1#2{ #2}% -\def\xint_exchangetwo_keepbraces #1#2{{#2}{#1}}% +\long\def\xint_exchangetwo_keepbraces #1#2{{#2}{#1}}% \long\def\xint_gob_til_R #1\R {}% \long\def\xint_gob_til_W #1\W {}% \long\def\xint_gob_til_Z #1\Z {}% -\def\xint_gob_til_zero #10{}% -\def\xint_gob_til_one #11{}% -\def\xint_gob_til_zeros_iii #1000{}% -\def\xint_gob_til_zeros_iv #10000{}% -\def\xint_gob_til_eightzeroes #100000000{}% -\def\xint_gob_til_exclam #1!{}% catcode 12 exclam -\def\xint_gob_til_dot #1.{}% -\def\xint_gob_til_G #1G{}% -\def\xint_gob_til_minus #1-{}% -\def\xint_gob_til_relax #1\relax {}% -\def\xint_UDzerominusfork #10-#2#3\krof {#2}% -\def\xint_UDzerofork #10#2#3\krof {#2}% -\def\xint_UDsignfork #1-#2#3\krof {#2}% -\def\xint_UDwfork #1\W#2#3\krof {#2}% -\def\xint_UDXINTWfork #1\XINT_W#2#3\krof {#2}% -\def\xint_UDzerosfork #100#2#3\krof {#2}% -\def\xint_UDonezerofork #110#2#3\krof {#2}% -\def\xint_UDsignsfork #1--#2#3\krof {#2}% +\long\def\xint_gob_til_zero #10{}% +\long\def\xint_gob_til_one #11{}% +\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}% +\long\def\xint_UDwfork #1\W#2#3\krof {#2}% +\long\def\xint_UDXINTWfork #1\XINT_W#2#3\krof {#2}% +\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 {}% \long\def\xint_afterfi #1#2\fi {\fi #1}% \long\def\xint_bye #1\xint_bye {}% +\long\def\xint_Bye #1\xint_bye {}% +\long\def\xint_bye_thenstop #1\xint_bye { }% \long\def\xint_dothis #1#2\xint_orthat #3{\fi #1}% 1.1 \let\xint_orthat \xint_firstofone \long\def\xintdothis #1#2\xintorthat #3{\fi #1}% \let\xintorthat \xint_firstofone -\def\xint_zapspaces #1 #2{#1#2\xint_zapspaces }% 1.1 -\def\xint_zapspaces_o #1{\expandafter\xint_zapspaces#1 \xint_gobble_i}% +\long\def\xint_zapspaces #1 #2{#1#2\xint_zapspaces }% 1.1 +\long\def\xint_zapspaces_o #1{\expandafter\xint_zapspaces#1 \xint_gobble_i}% \def\xintodef #1{\expandafter\def\expandafter#1\expandafter }% \def\xintoodef #1{\expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#1% \expandafter\expandafter\expandafter }% -\def\xintfdef #1#2{\expandafter\def\expandafter#1\expandafter - {\romannumeral`&&@#2}}% +\def\xintfdef #1#2% + {\expandafter\def\expandafter#1\expandafter{\romannumeral`&&@#2}}% \ifdefined\odef\else\let\odef\xintodef\fi \ifdefined\oodef\else\let\oodef\xintoodef\fi \ifdefined\fdef\else\let\fdef\xintfdef\fi @@ -274,36 +276,241 @@ \noexpand\expandafter\space\noexpand\xint_gob_til_xint_relax #1% }% \def\xintLength {\romannumeral0\xintlength }% -\long\def\xintlength #1% +\long\edef\xintlength #1% {% - \XINT_length_loop - 0.#1\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye + \noexpand\expandafter\space + \noexpand\the\numexpr\xint_c_ix\noexpand\XINT_length_loop + #1\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\noexpand\xint_bye + \relax }% -\long\def\XINT_length_loop #1.#2#3#4#5#6#7#8#9% +\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 - \expandafter\XINT_length_loop\the\numexpr #1+\xint_c_viii.% + +\xint_c_ix\XINT_length_loop +}% +\def\XINT_length_finish_a\xint_relax+\xint_c_ix\XINT_length_loop + #1#2#3#4#5#6#7#8#9% +{% + -#9\xint_bye +}% +\def\xintLastItem {\romannumeral0\xintlastitem }% +\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 +}% +\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_last_loop {#9}.% +}% +\long\def\XINT_last_loop_enda #1#2\xint_bye{ #1}% +\long\def\XINT_last_loop_endb #1#2#3\xint_bye{ #2}% +\long\def\XINT_last_loop_endc #1#2#3#4\xint_bye{ #3}% +\long\def\XINT_last_loop_endd #1#2#3#4#5\xint_bye{ #4}% +\long\def\XINT_last_loop_ende #1#2#3#4#5#6\xint_bye{ #5}% +\long\def\XINT_last_loop_endf #1#2#3#4#5#6#7\xint_bye{ #6}% +\long\def\XINT_last_loop_endg #1#2#3#4#5#6#7#8\xint_bye{ #7}% +\long\def\XINT_last_loop_endh #1#2#3#4#5#6#7#8#9\xint_bye{ #8}% +\def\xintLengthUpTo {\romannumeral0\xintlengthupto}% +\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\xint_bye +}% +\def\XINT_lengthupto_loop #1% +{% + \xint_UDsignfork #1\XINT_lengthupto_gt-{\XINT_lengthupto_loop_a#1}\krof +}% +\long\def\XINT_lengthupto_gt #1\xint_bye{-0}% +\long\def\XINT_lengthupto_loop_a #1.#2#3#4#5#6#7#8#9% +{% + \xint_gob_til_xint_relax #9\XINT_lengthupto_finish_a\xint_relax + \expandafter\XINT_lengthupto_loop\the\numexpr #1-\xint_c_viii.% }% -\def\XINT_length_finish_a\xint_relax\expandafter\XINT_length_loop - \the\numexpr #1+\xint_c_viii.#2\xint_bye +\def\XINT_lengthupto_finish_a\xint_relax\expandafter\XINT_lengthupto_loop + \the\numexpr #1-\xint_c_viii.#2\xint_bye {% - \XINT_length_finish_b #2\W\W\W\W\W\W\W\Z {#1}% + \XINT_lengthupto_finish_b #2\W\W\W\W\W\W\W\Z {#1}% }% -\def\XINT_length_finish_b #1#2#3#4#5#6#7#8\Z +\def\XINT_lengthupto_finish_b #1#2#3#4#5#6#7#8\Z {% \xint_gob_til_W - #1\XINT_length_finish_c \xint_c_ - #2\XINT_length_finish_c \xint_c_i - #3\XINT_length_finish_c \xint_c_ii - #4\XINT_length_finish_c \xint_c_iii - #5\XINT_length_finish_c \xint_c_iv - #6\XINT_length_finish_c \xint_c_v - #7\XINT_length_finish_c \xint_c_vi - \W\XINT_length_finish_c \xint_c_vii\Z + #1\XINT_lengthupto_finish_c \xint_c_ + #2\XINT_lengthupto_finish_c \xint_c_i + #3\XINT_lengthupto_finish_c \xint_c_ii + #4\XINT_lengthupto_finish_c \xint_c_iii + #5\XINT_lengthupto_finish_c \xint_c_iv + #6\XINT_lengthupto_finish_c \xint_c_v + #7\XINT_lengthupto_finish_c \xint_c_vi + \W\XINT_lengthupto_finish_c \xint_c_vii\Z }% -\edef\XINT_length_finish_c #1#2\Z #3% - {\noexpand\expandafter\space\noexpand\the\numexpr #3+#1\relax}% +\def\XINT_lengthupto_finish_c #1#2\Z #3% + {\ifnum #1>#3 \xint_dothis{-0}\fi + \xint_orthat{\expandafter\space\the\numexpr#3-#1\relax}}% +\def\xintreplicate#1% + {\expandafter\XINT_replicate\the\numexpr#1\endcsname}% +\def\XINT_replicate #1{\xint_UDsignfork + #1\XINT_rep_neg + -\XINT_rep + \krof #1}% +\long\def\XINT_rep_neg #1\endcsname #2{\xint_c_}% +\def\XINT_rep #1{\csname XINT_rep_f#1\XINT_rep_a}% +\def\XINT_rep_a #1{\csname XINT_rep_#1\XINT_rep_a}% +\def\XINT_rep_\XINT_rep_a{\endcsname}% +\long\expandafter\def\csname XINT_rep_0\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}}% +\long\expandafter\def\csname XINT_rep_1\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1}% +\long\expandafter\def\csname XINT_rep_2\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1}% +\long\expandafter\def\csname XINT_rep_3\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1}% +\long\expandafter\def\csname XINT_rep_4\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_5\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_6\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_7\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_8\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_9\endcsname #1% + {\endcsname{#1#1#1#1#1#1#1#1#1#1}#1#1#1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f0\endcsname #1% + {\xint_c_}% +\long\expandafter\def\csname XINT_rep_f1\endcsname #1% + {\xint_c_ #1}% +\long\expandafter\def\csname XINT_rep_f2\endcsname #1% + {\xint_c_ #1#1}% +\long\expandafter\def\csname XINT_rep_f3\endcsname #1% + {\xint_c_ #1#1#1}% +\long\expandafter\def\csname XINT_rep_f4\endcsname #1% + {\xint_c_ #1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f5\endcsname #1% + {\xint_c_ #1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f6\endcsname #1% + {\xint_c_ #1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f7\endcsname #1% + {\xint_c_ #1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f8\endcsname #1% + {\xint_c_ #1#1#1#1#1#1#1#1}% +\long\expandafter\def\csname XINT_rep_f9\endcsname #1% + {\xint_c_ #1#1#1#1#1#1#1#1#1}% +\def\xintgobble #1% + {\csname xint_c_\expandafter\XINT_gobble_a\the\numexpr#1.0}% +\def\XINT_gobble #1.{\csname xint_c_\XINT_gobble_a #1.0}% +\def\XINT_gobble_a #1{\xint_gob_til_zero#1\XINT_gobble_d0\XINT_gobble_b#1}% +\def\XINT_gobble_b #1.#2% + {\expandafter\XINT_gobble_c + \the\numexpr (#1+\xint_c_v)/\xint_c_ix-\xint_c_i\expandafter.% + \the\numexpr #2+\xint_c_i.#1.}% +\def\XINT_gobble_c #1.#2.#3.% + {\csname XINT_g#2\the\numexpr#3-\xint_c_ix*#1\relax\XINT_gobble_a #1.#2}% +\def\XINT_gobble_d0\XINT_gobble_b0.#1{\endcsname}% +\expandafter\let\csname XINT_g10\endcsname\endcsname +\long\expandafter\def\csname XINT_g11\endcsname#1{\endcsname}% +\long\expandafter\def\csname XINT_g12\endcsname#1#2{\endcsname}% +\long\expandafter\def\csname XINT_g13\endcsname#1#2#3{\endcsname}% +\long\expandafter\def\csname XINT_g14\endcsname#1#2#3#4{\endcsname}% +\long\expandafter\def\csname XINT_g15\endcsname#1#2#3#4#5{\endcsname}% +\long\expandafter\def\csname XINT_g16\endcsname#1#2#3#4#5#6{\endcsname}% +\long\expandafter\def\csname XINT_g17\endcsname#1#2#3#4#5#6#7{\endcsname}% +\long\expandafter\def\csname XINT_g18\endcsname#1#2#3#4#5#6#7#8{\endcsname}% +\expandafter\let\csname XINT_g20\endcsname\endcsname +\long\expandafter\def\csname XINT_g21\endcsname #1#2#3#4#5#6#7#8#9% + {\endcsname}% +\long\expandafter\edef\csname XINT_g22\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g21\endcsname}% +\long\expandafter\edef\csname XINT_g23\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g22\endcsname}% +\long\expandafter\edef\csname XINT_g24\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g23\endcsname}% +\long\expandafter\edef\csname XINT_g25\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g24\endcsname}% +\long\expandafter\edef\csname XINT_g26\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g25\endcsname}% +\long\expandafter\edef\csname XINT_g27\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g26\endcsname}% +\long\expandafter\edef\csname XINT_g28\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g27\endcsname}% +\expandafter\let\csname XINT_g30\endcsname\endcsname +\long\expandafter\edef\csname XINT_g31\endcsname #1#2#3#4#5#6#7#8#9% + {\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g32\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g31\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g33\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g32\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g34\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g33\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g35\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g34\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g36\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g35\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g37\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g36\expandafter\noexpand\csname XINT_g28\endcsname}% +\long\expandafter\edef\csname XINT_g38\endcsname #1#2#3#4#5#6#7#8#9% + {\noexpand\csname XINT_g37\expandafter\noexpand\csname XINT_g28\endcsname}% +\expandafter\let\csname XINT_g40\endcsname\endcsname +\expandafter\edef\csname XINT_g41\endcsname + {\noexpand\csname XINT_g38\expandafter\noexpand\csname XINT_g31\endcsname}% +\expandafter\edef\csname XINT_g42\endcsname + {\noexpand\csname XINT_g41\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g43\endcsname + {\noexpand\csname XINT_g42\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g44\endcsname + {\noexpand\csname XINT_g43\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g45\endcsname + {\noexpand\csname XINT_g44\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g46\endcsname + {\noexpand\csname XINT_g45\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g47\endcsname + {\noexpand\csname XINT_g46\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g48\endcsname + {\noexpand\csname XINT_g47\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\let\csname XINT_g50\endcsname\endcsname +\expandafter\edef\csname XINT_g51\endcsname + {\noexpand\csname XINT_g48\expandafter\noexpand\csname XINT_g41\endcsname}% +\expandafter\edef\csname XINT_g52\endcsname + {\noexpand\csname XINT_g51\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g53\endcsname + {\noexpand\csname XINT_g52\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g54\endcsname + {\noexpand\csname XINT_g53\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g55\endcsname + {\noexpand\csname XINT_g54\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g56\endcsname + {\noexpand\csname XINT_g55\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g57\endcsname + {\noexpand\csname XINT_g56\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g58\endcsname + {\noexpand\csname XINT_g57\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\let\csname XINT_g60\endcsname\endcsname +\expandafter\edef\csname XINT_g61\endcsname + {\noexpand\csname XINT_g58\expandafter\noexpand\csname XINT_g51\endcsname}% +\expandafter\edef\csname XINT_g62\endcsname + {\noexpand\csname XINT_g61\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g63\endcsname + {\noexpand\csname XINT_g62\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g64\endcsname + {\noexpand\csname XINT_g63\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g65\endcsname + {\noexpand\csname XINT_g64\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g66\endcsname + {\noexpand\csname XINT_g65\expandafter\noexpand\csname XINT_g61\endcsname}% +\expandafter\edef\csname XINT_g67\endcsname + {\noexpand\csname XINT_g66\expandafter\noexpand\csname XINT_g61\endcsname}% +\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}% diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty index 937e3a4010b..6d34c12d2eb 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xintseries: Expandable partial sums with xint package %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintseries}% - [2016/11/20 1.2h Expandable partial sums with xint package (JFB)]% + [2016/12/13 1.2i 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 4cb247565da..1b33f23c4a5 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.2h 2016/11/20 +%% The xint bundle 1.2i 2016/12/13 %% Copyright (C) 2013-2016 by Jean-Francois Burnol %% xinttools: Expandable and non-expandable utilities %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xinttools}% - [2016/11/20 1.2h Expandable and non-expandable utilities (JFB)]% + [2016/12/13 1.2i Expandable and non-expandable utilities (JFB)]% \newtoks\XINT_toks \xint_firstofone{\let\XINT_sptoken= } %<- space here! \def\xintgodef {\global\xintodef }% @@ -237,57 +237,58 @@ \def\XINT_nthelt_a #1% {% \xint_UDzerominusfork - #1-{\XINT_nthelt_zero }% - 0#1{\XINT_nthelt_neg }% + #1-\XINT_nthelt_zero + 0#1\XINT_nthelt_neg 0-{\XINT_nthelt_pos #1}% \krof }% \def\XINT_nthelt_zero .{\xintlength }% \long\def\XINT_nthelt_neg #1.#2% {% - \expandafter\XINT_nthelt_neg_a\the\numexpr - \XINT_length_loop - 0.#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye +\xint_c_i -#1.% - #2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye + \expandafter\XINT_nthelt_neg_a\the\numexpr\xint_c_x\XINT_length_loop + #2\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye + -#1.#2\xint_bye }% \def\XINT_nthelt_neg_a #1% {% \xint_UDzerominusfork - #1-{\XINT_nthelt_none }% - 0#1{\XINT_nthelt_none }% - 0-{\XINT_nthelt_loop_a #1}% + #1-\xint_byeandstop + 0#1\xint_byeandstop + 0-{}% \krof + \expandafter\XINT_nthelt_neg_b + \romannumeral\expandafter\XINT_gobble\the\numexpr-\xint_c_i+#1% }% -\long\def\XINT_nthelt_none #1\xint_bye{ }% +\long\def\XINT_nthelt_neg_b #1#2\xint_bye{ #1}% \long\def\XINT_nthelt_pos #1.#2% {% - \XINT_nthelt_loop_a #1.% + \expandafter\XINT_nthelt_loop\the\numexpr\xint_c_ix-#1.% #2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax\xint_bye }% -\def\XINT_nthelt_loop_a #1.% +\def\XINT_nthelt_loop #1% {% - \ifnum #1>\xint_c_viii - \expandafter\XINT_nthelt_loop_b - \else - \expandafter\XINT_nthelt_getit - \fi #1.% + \xint_UDsignfork + #1\XINT_nthelt_loop_a + -{\XINT_nthelt_getit #1}% + \krof }% -\long\def\XINT_nthelt_loop_b #1.#2#3#4#5#6#7#8#9% +\long\def\XINT_nthelt_loop_a #1.#2#3#4#5#6#7#8#9% {% - \xint_gob_til_xint_relax #9\XINT_nthelt_none\xint_relax - \expandafter\XINT_nthelt_loop_a\the\numexpr #1-\xint_c_viii.% + \xint_gob_til_xint_relax #9\xint_byeandstop\xint_relax + \expandafter\XINT_nthelt_loop\the\numexpr\xint_c_viii-#1.% }% \def\XINT_nthelt_getit #1.% {% \expandafter\expandafter\expandafter\XINT_nthelt_finish - \csname xint_gobble_\romannumeral\numexpr#1-\xint_c_i\endcsname + \csname xint_gobble_\romannumeral\numexpr\xint_c_viii-#1\endcsname }% \long\edef\XINT_nthelt_finish #1#2\xint_bye {\noexpand\xint_gob_til_xint_relax #1\noexpand\expandafter\space - \noexpand\xint_gobble_ii\xint_relax\space #1}% + \noexpand\xint_gobble_ii\xint_relax\space #1}% \def\xintKeep {\romannumeral0\xintkeep }% \def\xintKeepNoExpand {\romannumeral0\xintkeepnoexpand }% \long\def\xintkeep #1#2{\expandafter\XINT_keep_a\the\numexpr #1\expandafter.% @@ -296,8 +297,8 @@ \def\XINT_keep_a #1% {% \xint_UDzerominusfork - #1-{\XINT_keep_keepnone }% - 0#1{\XINT_keep_neg }% + #1-\XINT_keep_keepnone + 0#1\XINT_keep_neg 0-{\XINT_keep_pos #1}% \krof }% @@ -305,84 +306,55 @@ \long\def\XINT_keep_neg #1.#2% {% \expandafter\XINT_keep_neg_a\the\numexpr - \XINT_length_loop - 0.#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye -#1.% - #2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye + #1-\numexpr\xint_c_ix\XINT_length_loop + #2\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye.#2% }% \def\XINT_keep_neg_a #1% {% - \xint_UDzerominusfork - #1-{\XINT_keep_keepall }% - 0#1{\XINT_keep_keepall }% - 0-{\XINT_trim_loop_a #1}% + \xint_UDsignfork + #1{\expandafter\space\romannumeral\XINT_gobble}% + -\XINT_keep_keepall \krof }% -\def\XINT_keep_keepall #1.{\XINT_keep_keepall_a \space}% -\def\XINT_keep_keepall_a #1\xint_relax #2\xint_bye {#1}% +\def\XINT_keep_keepall #1.{ }% \long\def\XINT_keep_pos #1.#2% {% - \XINT_keep_loop_a #1.% - {}#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_bye -}% -\def\XINT_keep_loop_a #1.% -{% - \ifnum #1>\xint_c_vi - \expandafter\XINT_keep_loop_b - \else - \expandafter\XINT_keep_finish - \fi - #1.% -}% -\long\def\XINT_keep_loop_b #1.#2#3#4#5#6#7#8#9% -{% - \xint_gob_til_xint_relax #9\XINT_keep_enda\xint_relax - \expandafter\XINT_keep_loop_c\the\numexpr #1-\xint_c_vii.% - {{#3}{#4}{#5}{#6}{#7}{#8}{#9}}{#2}% -}% -\long\def\XINT_keep_loop_c #1.#2#3{\XINT_keep_loop_a #1.{#3#2}}% -\long\def\XINT_keep_enda #1.#2#3#4\xint_bye -{% - \XINT_keep_endb #4\W\W\W\W\W\W\Z #2{#3}% -}% -\def\XINT_keep_endb #1#2#3#4#5#6#7\Z -{% - \xint_gob_til_W - #1\XINT_keep_endc_ - #2\XINT_keep_endc_i - #3\XINT_keep_endc_ii - #4\XINT_keep_endc_iii - #5\XINT_keep_endc_iv - #6\XINT_keep_endc_v - \W\XINT_keep_endc_vi\Z -}% -\long\def\XINT_keep_endc_ #1\Z #2#3#4#5#6#7#8#9{ #9}% -\long\def\XINT_keep_endc_i #1\Z #2#3#4#5#6#7#8#9{#9{#2}}% -\long\def\XINT_keep_endc_ii #1\Z #2#3#4#5#6#7#8#9{#9{#2}{#3}}% -\long\def\XINT_keep_endc_iii #1\Z #2#3#4#5#6#7#8#9{#9{#2}{#3}{#4}}% -\long\def\XINT_keep_endc_iv #1\Z #2#3#4#5#6#7#8#9{#9{#2}{#3}{#4}{#5}}% -\long\def\XINT_keep_endc_v #1\Z #2#3#4#5#6#7#8#9{#9{#2}{#3}{#4}{#5}{#6}}% -\long\def\XINT_keep_endc_vi\Z #1#2#3#4#5#6#7#8{#8{#1}{#2}{#3}{#4}{#5}{#6}}% -\long\def\XINT_keep_finish #1.#2#3#4#5#6#7#8#9\xint_bye -{% - \XINT_keep_finish_a #1.% - #3\xint_c_ #4\xint_c_i #5\xint_c_ii #6\xint_c_iii #7\xint_c_iv - #8\xint_c_v\xint_relax\xint_c_vi\xint_bye - {#3}{#4}{#5}{#6}{#7}{#8}\xint_bye {#2}% -}% -\long\def\XINT_keep_finish_a #1.#2\xint_relax #3#4\xint_bye -{% - \csname XINT_keep_finish_b\romannumeral\ifnum#1>#3#3\else#1\fi\endcsname -}% -\long\def\XINT_keep_finish_b #1\xint_bye #2{ #2}% -\long\def\XINT_keep_finish_bi #1#2\xint_bye #3{#3{#1}}% -\long\def\XINT_keep_finish_bii #1#2#3\xint_bye #4{#4{#1}{#2}}% -\long\def\XINT_keep_finish_biii#1#2#3#4\xint_bye #5{#5{#1}{#2}{#3}}% -\long\def\XINT_keep_finish_biv #1#2#3#4#5\xint_bye #6{#6{#1}{#2}{#3}{#4}}% -\long\def\XINT_keep_finish_bv #1#2#3#4#5#6\xint_bye #7{#7{#1}{#2}{#3}{#4}{#5}}% -\long\def\XINT_keep_finish_bvi #1\xint_bye #2{#2#1}% + \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\xint_bye + -\xint_c_viii.{}#2\xint_bye% +}% +\def\XINT_keep_loop #1#2.% +{% + \xint_gob_til_minus#1\XINT_keep_loop_end-% + \expandafter\XINT_keep_loop + \the\numexpr#1#2-\xint_c_viii\expandafter.\XINT_keep_loop_pickeight +}% +\long\def\XINT_keep_loop_pickeight + #1#2#3#4#5#6#7#8#9{{#1{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}}% +\def\XINT_keep_loop_end-\expandafter\XINT_keep_loop + \the\numexpr-#1-\xint_c_viii\expandafter.\XINT_keep_loop_pickeight + {\csname XINT_keep_end#1\endcsname}% +\long\expandafter\def\csname XINT_keep_end1\endcsname + #1#2#3#4#5#6#7#8#9\xint_bye { #1{#2}{#3}{#4}{#5}{#6}{#7}{#8}}% +\long\expandafter\def\csname XINT_keep_end2\endcsname + #1#2#3#4#5#6#7#8\xint_bye { #1{#2}{#3}{#4}{#5}{#6}{#7}}% +\long\expandafter\def\csname XINT_keep_end3\endcsname + #1#2#3#4#5#6#7\xint_bye { #1{#2}{#3}{#4}{#5}{#6}}% +\long\expandafter\def\csname XINT_keep_end4\endcsname + #1#2#3#4#5#6\xint_bye { #1{#2}{#3}{#4}{#5}}% +\long\expandafter\def\csname XINT_keep_end5\endcsname + #1#2#3#4#5\xint_bye { #1{#2}{#3}{#4}}% +\long\expandafter\def\csname XINT_keep_end6\endcsname + #1#2#3#4\xint_bye { #1{#2}{#3}}% +\long\expandafter\def\csname XINT_keep_end7\endcsname + #1#2#3\xint_bye { #1{#2}}% +\long\expandafter\def\csname XINT_keep_end8\endcsname + #1#2\xint_bye { #1}% \def\xintKeepUnbraced {\romannumeral0\xintkeepunbraced }% \def\xintKeepUnbracedNoExpand {\romannumeral0\xintkeepunbracednoexpand }% \long\def\xintkeepunbraced #1#2% @@ -393,74 +365,46 @@ \def\XINT_keepunbr_a #1% {% \xint_UDzerominusfork - #1-{\XINT_keep_keepnone }% - 0#1{\XINT_keep_neg }% + #1-\XINT_keep_keepnone + 0#1\XINT_keep_neg 0-{\XINT_keepunbr_pos #1}% \krof }% \long\def\XINT_keepunbr_pos #1.#2% {% - \XINT_keepunbr_loop_a #1.% - {}#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_bye -}% -\def\XINT_keepunbr_loop_a #1.% -{% - \ifnum #1>\xint_c_vi - \expandafter\XINT_keepunbr_loop_b - \else - \expandafter\XINT_keepunbr_finish - \fi - #1.% -}% -\long\def\XINT_keepunbr_loop_b #1.#2#3#4#5#6#7#8#9% -{% - \xint_gob_til_xint_relax #9\XINT_keepunbr_enda\xint_relax - \expandafter\XINT_keepunbr_loop_c\the\numexpr #1-\xint_c_vii.% - {#3}{#4}{#5}{#6}{#7}{#8}{#9}.{#2}% -}% -\long\def\XINT_keepunbr_loop_c #1.#2#3#4#5#6#7#8.#9% - {\XINT_keepunbr_loop_a #1.{#9#2#3#4#5#6#7#8}}% -\long\def\XINT_keepunbr_enda #1.#2.#3#4\xint_bye -{% - \XINT_keepunbr_endb #4\W\W\W\W\W\W\Z #2{#3}% -}% -\def\XINT_keepunbr_endb #1#2#3#4#5#6#7\Z -{% - \xint_gob_til_W - #1\XINT_keepunbr_endc_ - #2\XINT_keepunbr_endc_i - #3\XINT_keepunbr_endc_ii - #4\XINT_keepunbr_endc_iii - #5\XINT_keepunbr_endc_iv - #6\XINT_keepunbr_endc_v - \W\XINT_keepunbr_endc_vi\Z -}% -\long\def\XINT_keepunbr_endc_ #1\Z #2#3#4#5#6#7#8#9{ #9}% -\long\def\XINT_keepunbr_endc_i #1\Z #2#3#4#5#6#7#8#9{ #9#2}% -\long\def\XINT_keepunbr_endc_ii #1\Z #2#3#4#5#6#7#8#9{ #9#2#3}% -\long\def\XINT_keepunbr_endc_iii #1\Z #2#3#4#5#6#7#8#9{ #9#2#3#4}% -\long\def\XINT_keepunbr_endc_iv #1\Z #2#3#4#5#6#7#8#9{ #9#2#3#4#5}% -\long\def\XINT_keepunbr_endc_v #1\Z #2#3#4#5#6#7#8#9{ #9#2#3#4#5#6}% -\long\def\XINT_keepunbr_endc_vi\Z #1#2#3#4#5#6#7#8{ #8#1#2#3#4#5#6}% -\long\def\XINT_keepunbr_finish #1.#2#3#4#5#6#7#8#9\xint_bye -{% - \XINT_keepunbr_finish_a #1.% - #3\xint_c_ #4\xint_c_i #5\xint_c_ii #6\xint_c_iii #7\xint_c_iv - #8\xint_c_v\xint_relax\xint_c_vi\xint_bye - {#3}{#4}{#5}{#6}{#7}{#8}\xint_bye {#2}% -}% -\long\def\XINT_keepunbr_finish_a #1.#2\xint_relax #3#4\xint_bye -{% - \csname XINT_keepunbr_finish_b\romannumeral\ifnum#1>#3#3\else#1\fi\endcsname -}% -\long\def\XINT_keepunbr_finish_b #1\xint_bye #2{ #2}% -\long\def\XINT_keepunbr_finish_bi #1#2\xint_bye #3{ #3#1}% -\long\def\XINT_keepunbr_finish_bii #1#2#3\xint_bye #4{ #4#1#2}% -\long\def\XINT_keepunbr_finish_biii#1#2#3#4\xint_bye #5{ #5#1#2#3}% -\long\def\XINT_keepunbr_finish_biv #1#2#3#4#5\xint_bye #6{ #6#1#2#3#4}% -\long\def\XINT_keepunbr_finish_bv #1#2#3#4#5#6\xint_bye #7{ #7#1#2#3#4#5}% -\long\def\XINT_keepunbr_finish_bvi #1#2#3#4#5#6\xint_bye #7{ #7#1#2#3#4#5#6}% + \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\xint_bye + -\xint_c_viii.{}#2\xint_bye% +}% +\def\XINT_keepunbr_loop #1#2.% +{% + \xint_gob_til_minus#1\XINT_keepunbr_loop_end-% + \expandafter\XINT_keepunbr_loop + \the\numexpr#1#2-\xint_c_viii\expandafter.\XINT_keepunbr_loop_pickeight +}% +\long\def\XINT_keepunbr_loop_pickeight + #1#2#3#4#5#6#7#8#9{{#1#2#3#4#5#6#7#8#9}}% +\def\XINT_keepunbr_loop_end-\expandafter\XINT_keepunbr_loop + \the\numexpr-#1-\xint_c_viii\expandafter.\XINT_keepunbr_loop_pickeight + {\csname XINT_keepunbr_end#1\endcsname}% +\long\expandafter\def\csname XINT_keepunbr_end1\endcsname + #1#2#3#4#5#6#7#8#9\xint_bye { #1#2#3#4#5#6#7#8}% +\long\expandafter\def\csname XINT_keepunbr_end2\endcsname + #1#2#3#4#5#6#7#8\xint_bye { #1#2#3#4#5#6#7}% +\long\expandafter\def\csname XINT_keepunbr_end3\endcsname + #1#2#3#4#5#6#7\xint_bye { #1#2#3#4#5#6}% +\long\expandafter\def\csname XINT_keepunbr_end4\endcsname + #1#2#3#4#5#6\xint_bye { #1#2#3#4#5}% +\long\expandafter\def\csname XINT_keepunbr_end5\endcsname + #1#2#3#4#5\xint_bye { #1#2#3#4}% +\long\expandafter\def\csname XINT_keepunbr_end6\endcsname + #1#2#3#4\xint_bye { #1#2#3}% +\long\expandafter\def\csname XINT_keepunbr_end7\endcsname + #1#2#3\xint_bye { #1#2}% +\long\expandafter\def\csname XINT_keepunbr_end8\endcsname + #1#2\xint_bye { #1}% \def\xintTrim {\romannumeral0\xinttrim }% \def\xintTrimNoExpand {\romannumeral0\xinttrimnoexpand }% \long\def\xinttrim #1#2{\expandafter\XINT_trim_a\the\numexpr #1\expandafter.% @@ -469,8 +413,8 @@ \def\XINT_trim_a #1% {% \xint_UDzerominusfork - #1-{\XINT_trim_trimnone }% - 0#1{\XINT_trim_neg }% + #1-\XINT_trim_trimnone + 0#1\XINT_trim_neg 0-{\XINT_trim_pos #1}% \krof }% @@ -478,47 +422,44 @@ \long\def\XINT_trim_neg #1.#2% {% \expandafter\XINT_trim_neg_a\the\numexpr - \XINT_length_loop - 0.#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye -#1.% - {}#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_bye + #1-\numexpr\xint_c_ix\XINT_length_loop + #2\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye + .{}#2\xint_bye }% \def\XINT_trim_neg_a #1% {% - \xint_UDzerominusfork - #1-{\XINT_trim_trimall }% - 0#1{\XINT_trim_trimall }% - 0-{\XINT_keep_loop_a #1}% + \xint_UDsignfork + #1{\expandafter\XINT_keep_loop\the\numexpr-\xint_c_viii+}% + -\XINT_trim_trimall \krof }% -\long\def\XINT_trim_trimall #1\xint_bye { }% +\edef\XINT_trim_trimall {\noexpand\expandafter\space\noexpand\xint_bye}% \long\def\XINT_trim_pos #1.#2% {% - \XINT_trim_loop_a #1.% + \expandafter\XINT_trim_loop\the\numexpr#1-\xint_c_viii.% #2\xint_relax\xint_relax\xint_relax\xint_relax \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye }% -\def\XINT_trim_loop_a #1.% +\def\XINT_trim_loop #1% {% - \ifnum #1>\xint_c_vii - \expandafter\XINT_trim_loop_b - \else - \expandafter\XINT_trim_finish - \fi - #1.% + \xint_UDsignfork + #1\XINT_trim_finish + -\XINT_trim_loop_a + \krof #1% }% -\long\def\XINT_trim_loop_b #1.#2#3#4#5#6#7#8#9% +\long\def\XINT_trim_loop_a #1.#2#3#4#5#6#7#8#9% {% - \xint_gob_til_xint_relax #9\XINT_trim_silentend\xint_relax - \expandafter\XINT_trim_loop_a\the\numexpr #1-\xint_c_viii.% + \xint_gob_til_xint_relax #9\xint_bye_thenstop\xint_relax + \expandafter\XINT_trim_loop\the\numexpr#1-\xint_c_viii.% }% -\def\XINT_trim_silentend #1\xint_bye { }% -\def\XINT_trim_finish #1.% +\def\XINT_trim_finish -#1.% {% \expandafter\expandafter\expandafter\XINT_trim_finish_a - \expandafter\expandafter\expandafter\space % avoids brace removal - \csname xint_gobble_\romannumeral#1\endcsname + \expandafter\expandafter\expandafter\space + \csname xint_gobble_\romannumeral\numexpr\xint_c_viii-#1\endcsname }% \long\def\XINT_trim_finish_a #1\xint_relax #2\xint_bye {#1}% \def\xintTrimUnbraced {\romannumeral0\xinttrimunbraced }% @@ -531,26 +472,26 @@ \def\XINT_trimunbr_a #1% {% \xint_UDzerominusfork - #1-{\XINT_trim_trimnone }% - 0#1{\XINT_trimunbr_neg }% + #1-\XINT_trim_trimnone + 0#1\XINT_trimunbr_neg 0-{\XINT_trim_pos #1}% \krof }% \long\def\XINT_trimunbr_neg #1.#2% {% \expandafter\XINT_trimunbr_neg_a\the\numexpr - \XINT_length_loop - 0.#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_relax\xint_bye -#1.% - {}#2\xint_relax\xint_relax\xint_relax\xint_relax - \xint_relax\xint_relax\xint_relax\xint_bye + #1-\numexpr\xint_c_ix\XINT_length_loop + #2\xint_relax\xint_relax\xint_relax\xint_relax + \xint_relax\xint_relax\xint_relax\xint_relax\xint_relax + \xint_c_i\xint_c_ii\xint_c_iii\xint_c_iv + \xint_c_v\xint_c_vi\xint_c_vii\xint_c_viii\xint_c_ix\xint_bye + .{}#2\xint_bye }% \def\XINT_trimunbr_neg_a #1% {% - \xint_UDzerominusfork - #1-{\XINT_trim_trimall }% - 0#1{\XINT_trim_trimall }% - 0-{\XINT_keepunbr_loop_a #1}% + \xint_UDsignfork + #1{\expandafter\XINT_keepunbr_loop\the\numexpr-\xint_c_viii+}% + -\XINT_trim_trimall \krof }% \def\xintApply {\romannumeral0\xintapply }% @@ -813,6 +754,7 @@ \long\def\xintBreakFor #1Z{}% \long\def\xintBreakForAndDo #1#2Z{#1}% \def\xintFor {\let\xintifForFirst\xint_firstoftwo + \let\xintifForLast\xint_secondoftwo \futurelet\XINT_token\XINT_for_ifstar }% \def\XINT_for_ifstar {\ifx\XINT_token*\expandafter\XINT_forx \else\expandafter\XINT_for \fi }% @@ -873,7 +815,8 @@ \XINT_toks {{#3}}% \long\edef\XINT_x {\noexpand\XINT_y \csname XINT_for_left#1\endcsname \the\XINT_toks \csname XINT_for_right#1\endcsname }% - \XINT_toks {\XINT_x\let\xintifForFirst\xint_secondoftwo\XINT_for_d #1{#2}}% + \XINT_toks {\XINT_x\let\xintifForFirst\xint_secondoftwo + \let\xintifForLast\xint_secondoftwo\XINT_for_d #1{#2}}% \futurelet\XINT_token\XINT_for_last? }% \long\def\XINT_forx_d #1#2#3% @@ -882,15 +825,19 @@ \XINT_toks {{#3}}% \long\edef\XINT_x {\noexpand\XINT_y \csname XINT_for_left#1\endcsname \the\XINT_toks \csname XINT_for_right#1\endcsname }% - \XINT_toks {\XINT_x\let\xintifForFirst\xint_secondoftwo\XINT_forx_d #1{#2}}% + \XINT_toks {\XINT_x\let\xintifForFirst\xint_secondoftwo + \let\xintifForLast\xint_secondoftwo\XINT_forx_d #1{#2}}% \XINT_xflet\XINT_for_last? }% \def\XINT_for_last? {% - \let\xintifForLast\xint_secondoftwo - \ifx\XINT_token Z\let\xintifForLast\xint_firstoftwo - \xint_afterfi{\xintBreakForAndDo{\XINT_x\xint_gobble_i Z}}\fi - \the\XINT_toks + \ifx\XINT_token Z\expandafter\XINT_for_last?yes\fi + \the\XINT_toks +}% +\def\XINT_for_last?yes +{% + \let\xintifForLast\xint_firstoftwo + \xintBreakForAndDo{\XINT_x\xint_gobble_i Z}% }% \catcode`U 3 \catcode`D 3 @@ -980,12 +927,14 @@ \the\XINT_toks \csname XINT_for_right#1\endcsname }% \XINT_x \let\xintifForFirst\xint_secondoftwo + \let\xintifForLast\xint_secondoftwo \expandafter\XINT_forever_d\expandafter #1\romannumeral`&&@#4{#2}{#3}#4{#5}% }% \catcode`j 3 \long\def\xintForpair #1#2#3in#4#5#6% {% \let\xintifForFirst\xint_firstoftwo + \let\xintifForLast\xint_secondoftwo \XINT_toks {\XINT_forpair_d #2{#6}}% \expandafter\the\expandafter\XINT_toks #4jZ% }% @@ -995,18 +944,16 @@ \XINT_toks \expandafter{\romannumeral0\xintcsvtolist{ #4}}% \long\edef\XINT_x {\noexpand\XINT_y \csname XINT_for_left#1\endcsname \the\XINT_toks \csname XINT_for_right\the\numexpr#1+\xint_c_i\endcsname}% - \let\xintifForLast\xint_secondoftwo - \ifx #5j\expandafter\xint_firstoftwo - \else\expandafter\xint_secondoftwo - \fi - {\let\xintifForLast\xint_firstoftwo - \xintBreakForAndDo {\XINT_x \xint_gobble_i Z}}% + \ifx #5j\expandafter\XINT_for_last?yes\fi \XINT_x - \let\xintifForFirst\xint_secondoftwo\XINT_forpair_d #1{#2}% + \let\xintifForFirst\xint_secondoftwo + \let\xintifForLast\xint_secondoftwo + \XINT_forpair_d #1{#2}% }% \long\def\xintForthree #1#2#3in#4#5#6% {% \let\xintifForFirst\xint_firstoftwo + \let\xintifForLast\xint_secondoftwo \XINT_toks {\XINT_forthree_d #2{#6}}% \expandafter\the\expandafter\XINT_toks #4jZ% }% @@ -1016,18 +963,16 @@ \XINT_toks \expandafter{\romannumeral0\xintcsvtolist{ #4}}% \long\edef\XINT_x {\noexpand\XINT_y \csname XINT_for_left#1\endcsname \the\XINT_toks \csname XINT_for_right\the\numexpr#1+\xint_c_ii\endcsname}% - \let\xintifForLast\xint_secondoftwo - \ifx #5j\expandafter\xint_firstoftwo - \else\expandafter\xint_secondoftwo - \fi - {\let\xintifForLast\xint_firstoftwo - \xintBreakForAndDo {\XINT_x \xint_gobble_i Z}}% + \ifx #5j\expandafter\XINT_for_last?yes\fi \XINT_x - \let\xintifForFirst\xint_secondoftwo\XINT_forthree_d #1{#2}% + \let\xintifForFirst\xint_secondoftwo + \let\xintifForLast\xint_secondoftwo + \XINT_forthree_d #1{#2}% }% \long\def\xintForfour #1#2#3in#4#5#6% {% \let\xintifForFirst\xint_firstoftwo + \let\xintifForLast\xint_secondoftwo \XINT_toks {\XINT_forfour_d #2{#6}}% \expandafter\the\expandafter\XINT_toks #4jZ% }% @@ -1037,14 +982,11 @@ \XINT_toks \expandafter{\romannumeral0\xintcsvtolist{ #4}}% \long\edef\XINT_x {\noexpand\XINT_y \csname XINT_for_left#1\endcsname \the\XINT_toks \csname XINT_for_right\the\numexpr#1+\xint_c_iii\endcsname}% - \let\xintifForLast\xint_secondoftwo - \ifx #5j\expandafter\xint_firstoftwo - \else\expandafter\xint_secondoftwo - \fi - {\let\xintifForLast\xint_firstoftwo - \xintBreakForAndDo {\XINT_x \xint_gobble_i Z}}% + \ifx #5j\expandafter\XINT_for_last?yes\fi \XINT_x - \let\xintifForFirst\xint_secondoftwo\XINT_forfour_d #1{#2}% + \let\xintifForFirst\xint_secondoftwo + \let\xintifForLast\xint_secondoftwo + \XINT_forfour_d #1{#2}% }% \catcode`Z 11 \catcode`j 11 @@ -1221,10 +1163,9 @@ }% \def\XINT_trim:f:csv_loop_b #1.#2,#3,#4,#5,#6,#7,#8,#9,% {% - \xint_gob_til_xint_relax #9\XINT_trim:f:csv_silentend\xint_relax + \xint_gob_til_xint_relax #9\xint_bye_thenstop\xint_relax \expandafter\XINT_trim:f:csv_loop_a\the\numexpr #1-\xint_c_viii.% }% -\def\XINT_trim:f:csv_silentend #1\xint_bye { }% \def\XINT_trim:f:csv_finish #1.% {% \expandafter\XINT_trim:f:csv_finish_a @@ -1249,12 +1190,11 @@ \def\XINT_keep:f:csv_a #1% {% \xint_UDzerominusfork - #1-{\XINT_keep:f:csv_zero }% - 0#1{\XINT_keep:f:csv_neg }% + #1-\xint_bye_thenstop + 0#1\XINT_keep:f:csv_neg 0-{\XINT_keep:f:csv_pos #1}% \krof }% -\def\XINT_keep:f:csv_zero .#1\xint_bye{ }% \def\XINT_keep:f:csv_neg #1.#2\xint_relax% {% \expandafter\XINT_keep:f:csv_neg_b @@ -1336,12 +1276,11 @@ \def\XINT_nthelt:f:csv_neg_a #1% {% \xint_UDzerominusfork - #1-{\XINT_nthelt:f:csv_none }% - 0#1{\XINT_nthelt:f:csv_none }% + #1-\xint_bye_thenstop + 0#1\xint_bye_thenstop 0-{\XINT_nthelt:f:csv_loop_a #1}% \krof }% -\def\XINT_nthelt:f:csv_none #1\xint_bye { }% \long\def\XINT_nthelt:f:csv_pos #1.#2% {% \expandafter\XINT_nthelt:f:csv_loop_a\the\numexpr #1+\xint_c_i\expandafter.% |