diff options
author | Karl Berry <karl@freefriends.org> | 2013-06-27 16:31:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-06-27 16:31:25 +0000 |
commit | 82c37dcf73b52a88faef522a2f1a294351deea1a (patch) | |
tree | 4c0f4b7b3c5fb16b1b5e0b413fc1a800bc9eef35 /Master/texmf-dist/tex/generic/xint/xint.sty | |
parent | eeeb860e63fdf6d8e9c0c18825a887aec80eed7e (diff) |
xint (16jun13)
git-svn-id: svn://tug.org/texlive/trunk@30978 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xint.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xint.sty | 933 |
1 files changed, 680 insertions, 253 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty index b740ecda4a6..21911c686ee 100644 --- a/Master/texmf-dist/tex/generic/xint/xint.sty +++ b/Master/texmf-dist/tex/generic/xint/xint.sty @@ -22,7 +22,7 @@ %% in the same archive or directory.) %% %%---------------------------------------------------------------- -%% The xint bundle (version 1.07a of May 26, 2013) +%% The xint bundle (version 1.08b of June 14, 2013) %% xint: Expandable operations on long numbers %% Copyright (C) 2013 by Jean-Francois Burnol %%---------------------------------------------------------------- @@ -67,6 +67,7 @@ \endgroup \edef\XINT_restorecatcodes_endinput {% + \catcode94=\the\catcode94 % ^ \catcode96=\the\catcode96 % ` \catcode47=\the\catcode47 % / \catcode41=\the\catcode41 % ) @@ -111,6 +112,7 @@ \catcode41=12 % ) \catcode47=12 % / \catcode96=12 % ` + \catcode94=11 % ^ }% \XINT_setcatcodes }% @@ -138,7 +140,7 @@ \fi \expandafter\x\csname ver@xint.sty\endcsname \ProvidesPackage{xint}% - [2013/05/26 v1.07a Expandable operations on long numbers (jfB)]% + [2013/06/14 v1.08b Expandable operations on long numbers (jfB)]% \def\xint_gobble_ {}% \def\xint_gobble_i #1{}% \def\xint_gobble_ii #1#2{}% @@ -157,12 +159,14 @@ \def\xint_secondofthree #1#2#3{#2}% \def\xint_thirdofthree #1#2#3{#3}% \def\xint_minus_andstop { -}% -\def\xint_gob_til_r #1\R {}% -\def\xint_gob_til_w #1\W {}% -\def\xint_gob_til_z #1\Z {}% +\def\xint_gob_til_R #1\R {}% +\def\xint_gob_til_W #1\W {}% +\def\xint_gob_til_Z #1\Z {}% \def\xint_gob_til_zero #10{}% \def\xint_gob_til_one #11{}% -\def\xint_gob_til_zeros_iv #10000{}% +\def\xint_gob_til_G #1G{}% +\def\xint_gob_til_zeros_iii #1000{}% +\def\xint_gob_til_zeros_iv #10000{}% \def\xint_gob_til_relax #1\relax {}% \def\xint_gob_til_xint_undef #1\xint_undef {}% \def\xint_gob_til_xint_relax #1\xint_relax {}% @@ -176,6 +180,16 @@ \def\xint_afterfi #1#2\fi {\fi #1}% \let\xint_relax\relax \def\xint_braced_xint_relax {\xint_relax }% +\chardef\xint_c_ 0 +\chardef\xint_c_i 1 +\chardef\xint_c_ii 2 +\chardef\xint_c_iii 3 +\chardef\xint_c_iv 4 +\chardef\xint_c_v 5 +\chardef\xint_c_viii 8 +\chardef\xint_c_ix 9 +\chardef\xint_c_x 10 +\newcount\xint_c_x^viii \xint_c_x^viii 100000000 \def\xintRev {\romannumeral0\xintrev }% \def\xintrev #1% {% @@ -222,7 +236,7 @@ }% \def\xintrevwithbracesnoexpand #1% {% - \romannumeral0\XINT_revwbr_loop\expandafter{\expandafter}% + \XINT_revwbr_loop {}% #1\xint_relax\xint_relax\xint_relax\xint_relax \xint_relax\xint_relax\xint_relax\xint_relax\Z }% @@ -237,7 +251,7 @@ }% \def\XINT_revwbr_finish_b #1#2#3#4#5#6#7#8\Z {% - \xint_gob_til_r + \xint_gob_til_R #1\XINT_revwbr_finish_c 8% #2\XINT_revwbr_finish_c 7% #3\XINT_revwbr_finish_c 6% @@ -295,7 +309,7 @@ }% \def\XINT_length_finish_b #1#2#3#4#5#6#7#8\Z {% - \xint_gob_til_w + \xint_gob_til_W #1\XINT_length_finish_c 8% #2\XINT_length_finish_c 7% #3\XINT_length_finish_c 6% @@ -318,7 +332,7 @@ }% \def\xintcsvtolistnoexpand #1% {% - \romannumeral0\XINT_csvtol_loop_a + \XINT_csvtol_loop_a {}#1,\xint_undef,\xint_undef,\xint_undef,\xint_undef ,\xint_undef,\xint_undef,\xint_undef,\xint_undef,\Z }% @@ -334,7 +348,7 @@ }% \def\XINT_csvtol_finish_b #1,#2,#3,#4,#5,#6,#7,#8\Z {% - \xint_gob_til_r + \xint_gob_til_R #1\XINT_csvtol_finish_c 8% #2\XINT_csvtol_finish_c 7% #3\XINT_csvtol_finish_c 6% @@ -362,17 +376,16 @@ \long\def\xintlistwithsep #1#2% {\expandafter\XINT_lws\expandafter {\romannumeral-`0#2}{#1}}% \long\def\XINT_lws #1#2{\XINT_lws_start {#2}#1\Z }% -\long\def\xintlistwithsepnoexpand #1#2% - {\romannumeral0\XINT_lws_start {#1}#2\Z }% +\long\def\xintlistwithsepnoexpand #1#2{\XINT_lws_start {#1}#2\Z }% \long\def\XINT_lws_start #1#2% {% - \xint_gob_til_z #2\XINT_lws_dont\Z + \xint_gob_til_Z #2\XINT_lws_dont\Z \XINT_lws_loop_a {#2}{#1}% }% \long\def\XINT_lws_dont\Z\XINT_lws_loop_a #1#2{ }% \long\def\XINT_lws_loop_a #1#2#3% {% - \xint_gob_til_z #3\XINT_lws_end\Z + \xint_gob_til_Z #3\XINT_lws_end\Z \XINT_lws_loop_b {#1}{#2#3}{#2}% }% \long\def\XINT_lws_loop_b #1#2{\XINT_lws_loop_a {#1#2}}% @@ -386,11 +399,11 @@ }% \def\xintntheltnoexpand #1#2% {% - \romannumeral0\XINT_nthelt {#2}{\numexpr #1\relax}% + \XINT_nthelt {#2}{\numexpr #1\relax}% }% \def\XINT_nthelt #1#2% {% - \ifnum #2>0 + \ifnum #2>\xint_c_ \xint_afterfi {\XINT_nthelt_loop_a {#2}}% \else \xint_afterfi {\XINT_length_loop {0}}% @@ -399,7 +412,7 @@ }% \def\XINT_nthelt_loop_a #1% {% - \ifnum #1>8 + \ifnum #1>\xint_c_viii \expandafter\XINT_nthelt_loop_b \else \expandafter\XINT_nthelt_getit @@ -432,10 +445,10 @@ {#1}% }% \def\XINT_apply #1#2{\XINT_apply_loop_a {}{#2}#1\Z }% -\def\xintapplynoexpand #1#2{\romannumeral0\XINT_apply_loop_a {}{#1}#2\Z }% +\def\xintapplynoexpand #1#2{\XINT_apply_loop_a {}{#1}#2\Z }% \def\XINT_apply_loop_a #1#2#3% {% - \xint_gob_til_z #3\XINT_apply_end\Z + \xint_gob_til_Z #3\XINT_apply_end\Z \expandafter \XINT_apply_loop_b \expandafter {\romannumeral-`0#2{#3}}{#1}{#2}% @@ -451,10 +464,10 @@ }% \def\XINT_applyunbr #1#2{\XINT_applyunbr_loop_a {}{#2}#1\Z }% \def\xintapplyunbracednoexpand #1#2% - {\romannumeral0\XINT_applyunbr_loop_a {}{#1}#2\Z }% + {\XINT_applyunbr_loop_a {}{#1}#2\Z }% \def\XINT_applyunbr_loop_a #1#2#3% {% - \xint_gob_til_z #3\XINT_applyunbr_end\Z + \xint_gob_til_Z #3\XINT_applyunbr_end\Z \expandafter\XINT_applyunbr_loop_b \expandafter {\romannumeral-`0#2{#3}}{#1}{#2}% }% @@ -551,7 +564,7 @@ \xint_afterfi {\xintError:ArrayIndexIsNegative\space 0}% \else \xint_afterfi {% - \ifnum ##1> #2 + \ifnum ##1>#2 \xint_afterfi {\xintError:ArrayIndexBeyondLimit\space 0}% \else \xint_afterfi @@ -564,7 +577,7 @@ \let\xintDigitsOf\xintAssignArray \def\XINT_RQ #1#2#3#4#5#6#7#8#9% {% - \xint_gob_til_r #9\XINT_RQ_end_a\R\XINT_RQ {#9#8#7#6#5#4#3#2#1}% + \xint_gob_til_R #9\XINT_RQ_end_a\R\XINT_RQ {#9#8#7#6#5#4#3#2#1}% }% \def\XINT_RQ_end_a\R\XINT_RQ #1#2\Z {% @@ -572,7 +585,7 @@ }% \def\XINT_RQ_end_b #1#2#3#4#5#6#7#8% {% - \xint_gob_til_r + \xint_gob_til_R #8\XINT_RQ_end_viii #7\XINT_RQ_end_vii #6\XINT_RQ_end_vi @@ -591,6 +604,62 @@ \def\XINT_RQ_end_iii #1\Z #2#3#4#5#6#7#8#9\Z { #4#5#6#7#8#9000}% \def\XINT_RQ_end_ii #1\Z #2#3#4#5#6#7#8#9\Z { #3#4#5#6#7#8#900}% \def\XINT_RQ_end_i \Z #1#2#3#4#5#6#7#8\Z { #1#2#3#4#5#6#7#80}% +\def\XINT_SQ #1#2#3#4#5#6#7#8% +{% + \xint_gob_til_R #8\XINT_SQ_end_a\R\XINT_SQ {#8#7#6#5#4#3#2#1}% +}% +\def\XINT_SQ_end_a\R\XINT_SQ #1#2\Z +{% + \XINT_SQ_end_b #1\Z +}% +\def\XINT_SQ_end_b #1#2#3#4#5#6#7% +{% + \xint_gob_til_R + #7\XINT_SQ_end_vii + #6\XINT_SQ_end_vi + #5\XINT_SQ_end_v + #4\XINT_SQ_end_iv + #3\XINT_SQ_end_iii + #2\XINT_SQ_end_ii + \R\XINT_SQ_end_i + \Z #2#3#4#5#6#7% +}% +\def\XINT_SQ_end_vii #1\Z #2#3#4#5#6#7#8\Z { #8}% +\def\XINT_SQ_end_vi #1\Z #2#3#4#5#6#7#8\Z { #7#8000000}% +\def\XINT_SQ_end_v #1\Z #2#3#4#5#6#7#8\Z { #6#7#800000}% +\def\XINT_SQ_end_iv #1\Z #2#3#4#5#6#7#8\Z { #5#6#7#80000}% +\def\XINT_SQ_end_iii #1\Z #2#3#4#5#6#7#8\Z { #4#5#6#7#8000}% +\def\XINT_SQ_end_ii #1\Z #2#3#4#5#6#7#8\Z { #3#4#5#6#7#800}% +\def\XINT_SQ_end_i \Z #1#2#3#4#5#6#7\Z { #1#2#3#4#5#6#70}% +\def\XINT_OQ #1#2#3#4#5#6#7#8#9% +{% + \xint_gob_til_R #9\XINT_OQ_end_a\R\XINT_OQ {#9#8#7#6#5#4#3#2#1}% +}% +\def\XINT_OQ_end_a\R\XINT_OQ #1#2\Z +{% + \XINT_OQ_end_b #1\Z +}% +\def\XINT_OQ_end_b #1#2#3#4#5#6#7#8% +{% + \xint_gob_til_R + #8\XINT_OQ_end_viii + #7\XINT_OQ_end_vii + #6\XINT_OQ_end_vi + #5\XINT_OQ_end_v + #4\XINT_OQ_end_iv + #3\XINT_OQ_end_iii + #2\XINT_OQ_end_ii + \R\XINT_OQ_end_i + \Z #2#3#4#5#6#7#8% +}% +\def\XINT_OQ_end_viii #1\Z #2#3#4#5#6#7#8#9\Z { #9}% +\def\XINT_OQ_end_vii #1\Z #2#3#4#5#6#7#8#9\Z { #8#90000000}% +\def\XINT_OQ_end_vi #1\Z #2#3#4#5#6#7#8#9\Z { #7#8#9000000}% +\def\XINT_OQ_end_v #1\Z #2#3#4#5#6#7#8#9\Z { #6#7#8#900000}% +\def\XINT_OQ_end_iv #1\Z #2#3#4#5#6#7#8#9\Z { #5#6#7#8#90000}% +\def\XINT_OQ_end_iii #1\Z #2#3#4#5#6#7#8#9\Z { #4#5#6#7#8#9000}% +\def\XINT_OQ_end_ii #1\Z #2#3#4#5#6#7#8#9\Z { #3#4#5#6#7#8#900}% +\def\XINT_OQ_end_i \Z #1#2#3#4#5#6#7#8\Z { #1#2#3#4#5#6#7#80}% \def\xint_cleanupzeros_andstop #1#2#3#4% {% \expandafter\space\the\numexpr #1#2#3#4\relax @@ -614,8 +683,8 @@ }% \def\XINT_cuz_loop #1#2#3#4#5#6#7#8% {% - \xint_gob_til_w #8\xint_cuz_end_a\W - \xint_gob_til_z #8\xint_cuz_end_A\Z + \xint_gob_til_W #8\xint_cuz_end_a\W + \xint_gob_til_Z #8\xint_cuz_end_A\Z \XINT_cuz_check_a {#1#2#3#4#5#6#7#8}% }% \def\xint_cuz_end_a #1\XINT_cuz_check_a #2% @@ -641,12 +710,12 @@ \def\XINT_isone #1#2% {% \xint_gob_til_one #1\XINT_isone_b 1% - \expandafter\space\expandafter 0\xint_gob_til_z #2% + \expandafter\space\expandafter 0\xint_gob_til_Z #2% }% -\def\XINT_isone_b #1\xint_gob_til_z #2% +\def\XINT_isone_b #1\xint_gob_til_Z #2% {% - \xint_gob_til_w #2\XINT_isone_yes \W - \expandafter\space\expandafter 0\xint_gob_til_z + \xint_gob_til_W #2\XINT_isone_yes \W + \expandafter\space\expandafter 0\xint_gob_til_Z }% \def\XINT_isone_yes #1\Z { 1}% \def\xintiNum {\romannumeral0\xintinum }% @@ -742,7 +811,7 @@ }% \def\XINT_add_A #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_add_az\W + \xint_gob_til_W #3\xint_add_az\W \XINT_add_AB #1{#3#4#5#6}{#2}% }% \def\xint_add_az\W\XINT_add_AB #1#2% @@ -751,7 +820,7 @@ }% \def\XINT_add_AB #1#2#3#4\W\X\Y\Z #5#6#7#8% {% - \xint_gob_til_w #5\xint_add_bz\W + \xint_gob_til_W #5\xint_add_bz\W \XINT_add_ABE #1#2{#8#7#6#5}{#3}#4\W\X\Y\Z }% \def\XINT_add_ABE #1#2#3#4#5#6% @@ -788,7 +857,7 @@ }% \def\XINT_add_C #1#2#3#4#5% {% - \xint_gob_til_w #2\xint_add_cz\W + \xint_gob_til_W #2\xint_add_cz\W \XINT_add_CD {#5#4#3#2}{#1}% }% \def\XINT_add_CD #1% @@ -798,7 +867,7 @@ \def\xint_add_cz\W\XINT_add_CD #1#2{ 1#2}% \def\XINT_addr_A #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_addr_az\W + \xint_gob_til_W #3\xint_addr_az\W \XINT_addr_B #1{#3#4#5#6}{#2}% }% \def\xint_addr_az\W\XINT_addr_B #1#2% @@ -807,7 +876,7 @@ }% \def\XINT_addr_B #1#2#3#4\W\X\Y\Z #5#6#7#8% {% - \xint_gob_til_w #5\xint_addr_bz\W + \xint_gob_til_W #5\xint_addr_bz\W \XINT_addr_E #1#2{#8#7#6#5}{#3}#4\W\X\Y\Z }% \def\XINT_addr_E #1#2#3#4#5#6% @@ -833,7 +902,7 @@ \def\xint_addr_AC_nocarry 0\XINT_addr_C #1#2\W\X\Y\Z { #1#2}% \def\XINT_addr_C #1#2#3#4#5% {% - \xint_gob_til_w #2\xint_addr_cz\W + \xint_gob_til_W #2\xint_addr_cz\W \XINT_addr_D {#5#4#3#2}{#1}% }% \def\XINT_addr_D #1% @@ -843,7 +912,7 @@ \def\xint_addr_cz\W\XINT_addr_D #1#2{ #21000}% \def\XINT_addm_A #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_addm_az\W + \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% @@ -880,7 +949,7 @@ }% \def\XINT_addm_C #1#2#3#4#5% {% - \xint_gob_til_w + \xint_gob_til_W #5\xint_addm_cw #4\xint_addm_cx #3\xint_addm_cy @@ -933,7 +1002,7 @@ {\expandafter\space\the\numexpr #1#2#3#4#5\relax}% \def\XINT_addp_A #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_addp_az\W + \xint_gob_til_W #3\xint_addp_az\W \XINT_addp_AB #1{#3#4#5#6}{#2}% }% \def\xint_addp_az\W\XINT_addp_AB #1#2% @@ -962,7 +1031,7 @@ }% \def\XINT_addp_C #1#2#3#4#5% {% - \xint_gob_til_w + \xint_gob_til_W #5\xint_addp_cw #4\xint_addp_cx #3\xint_addp_cy @@ -983,7 +1052,7 @@ #3\xint_addp_cz \W\XINT_addp_CD {% - \expandafter\XINT_addp_CDw\the\numexpr 1+10#1#2#3\relax + \expandafter\XINT_addp_CDw\the\numexpr \xint_c_i+10#1#2#3\relax }% \def\XINT_addp_CDw #1#2#3#4#5#6% {% @@ -997,7 +1066,7 @@ #2\xint_addp_cz \W\XINT_addp_CD {% - \expandafter\XINT_addp_CDx\the\numexpr 1+100#1#2\relax + \expandafter\XINT_addp_CDx\the\numexpr \xint_c_i+100#1#2\relax }% \def\XINT_addp_CDx #1#2#3#4#5#6% {% @@ -1006,11 +1075,9 @@ }% \def\XINT_addp_endDx_zeros 0000\XINT_addp_endDx 0000#1\Y\Z{ #1}% \def\XINT_addp_endDx #1#2#3#4#5\Y\Z{ #5#4#3#2#1}% -\def\xint_addp_cy - #1\xint_addp_cz - \W\XINT_addp_CD +\def\xint_addp_cy #1\xint_addp_cz\W\XINT_addp_CD {% - \expandafter\XINT_addp_CDy\the\numexpr 1+1000#1\relax + \expandafter\XINT_addp_CDy\the\numexpr \xint_c_i+1000#1\relax }% \def\XINT_addp_CDy #1#2#3#4#5#6% {% @@ -1022,7 +1089,7 @@ \def\xint_addp_cz\W\XINT_addp_CD #1#2{ #21000}% \def\XINT_addp_F #1#2#3#4#5% {% - \xint_gob_til_w + \xint_gob_til_W #5\xint_addp_Gw #4\xint_addp_Gx #3\xint_addp_Gy @@ -1112,10 +1179,10 @@ }% \def\XINT_add_pre #1% {% - \expandafter\XINT_add__pre\expandafter + \expandafter\XINT_add_pre_b\expandafter {\romannumeral0\XINT_RQ {}#1\R\R\R\R\R\R\R\R\Z }% }% -\def\XINT_add__pre #1#2% +\def\XINT_add_pre_b #1#2% {% \expandafter\XINT_add_A \expandafter0\expandafter{\expandafter}% @@ -1171,10 +1238,10 @@ \def\xint_sub_pm #1\XINT_add_pre #2#3{ -#2}% \def\XINT_sub_pre #1% {% - \expandafter\XINT_sub__pre\expandafter + \expandafter\XINT_sub_pre_b\expandafter {\romannumeral0\XINT_RQ {}#1\R\R\R\R\R\R\R\R\Z }% }% -\def\XINT_sub__pre #1#2% +\def\XINT_sub_pre_b #1#2% {% \expandafter\XINT_sub_A \expandafter1\expandafter{\expandafter}% @@ -1183,19 +1250,19 @@ }% \def\XINT_sub_A #1#2#3\W\X\Y\Z #4#5#6#7% {% - \xint_gob_til_w + \xint_gob_til_W #4\xint_sub_az \W\XINT_sub_B #1{#4#5#6#7}{#2}#3\W\X\Y\Z }% \def\XINT_sub_B #1#2#3#4#5#6#7% {% - \xint_gob_til_w + \xint_gob_til_W #4\xint_sub_bz \W\XINT_sub_onestep #1#2{#7#6#5#4}{#3}% }% \def\XINT_sub_onestep #1#2#3#4#5#6% {% - \expandafter\XINT_sub_backtoA\the\numexpr 11#5#4#3#2-#6+#1-1\relax.% + \expandafter\XINT_sub_backtoA\the\numexpr 11#5#4#3#2-#6+#1-\xint_c_i\relax.% }% \def\XINT_sub_backtoA #1#2#3.#4% {% @@ -1224,13 +1291,13 @@ }% \def\XINT_sub_C #1#2#3#4#5% {% - \xint_gob_til_w + \xint_gob_til_W #2\xint_sub_cz \W\XINT_sub_AC_onestep {#5#4#3#2}{#1}% }% \def\XINT_sub_AC_onestep #1% {% - \expandafter\XINT_sub_backtoC\the\numexpr 11#1-1\relax.% + \expandafter\XINT_sub_backtoC\the\numexpr 11#1-\xint_c_i\relax.% }% \def\XINT_sub_backtoC #1#2#3.#4% {% @@ -1258,7 +1325,7 @@ }% \def\xint_sub_az\W\XINT_sub_B #1#2#3#4#5#6#7% {% - \xint_gob_til_w + \xint_gob_til_W #4\xint_sub_ez \W\XINT_sub_Eenter #1{#3}#4#5#6#7% }% @@ -1276,7 +1343,7 @@ }% \def\XINT_sub_E #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_sub_F\W + \xint_gob_til_W #3\xint_sub_F\W \XINT_sub_Eonestep #1{#6#5#4#3}{#2}% }% \def\XINT_sub_Eonestep #1#2% @@ -1299,12 +1366,12 @@ \def\XINT_sub_DD {\expandafter\xint_minus_andstop\romannumeral0\XINT_sub_D }% \def\XINT_sub_Fdec #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_sub_Fdec_finish\W + \xint_gob_til_W #3\xint_sub_Fdec_finish\W \XINT_sub_Fdec_onestep #1{#6#5#4#3}{#2}% }% \def\XINT_sub_Fdec_onestep #1#2% {% - \expandafter\XINT_sub_backtoFdec\the\numexpr 11#2+#1-1\relax.% + \expandafter\XINT_sub_backtoFdec\the\numexpr 11#2+#1-\xint_c_i\relax.% }% \def\XINT_sub_backtoFdec #1#2#3.#4% {% @@ -1316,7 +1383,7 @@ }% \def\XINT_sub_Finc #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_sub_Finc_finish\W + \xint_gob_til_W #3\xint_sub_Finc_finish\W \XINT_sub_Finc_onestep #1{#6#5#4#3}{#2}% }% \def\XINT_sub_Finc_onestep #1#2% @@ -1356,7 +1423,7 @@ }% \def\XINT_sub_KK #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_sub_KK_finish\W + \xint_gob_til_W #3\xint_sub_KK_finish\W \XINT_sub_KK_onestep #1{#6#5#4#3}{#2}% }% \def\XINT_sub_KK_onestep #1#2% @@ -1413,10 +1480,10 @@ }% \def\XINT_cmp_pre #1% {% - \expandafter\XINT_cmp__pre\expandafter + \expandafter\XINT_cmp_pre_b\expandafter {\romannumeral0\XINT_RQ {}#1\R\R\R\R\R\R\R\R\Z }% }% -\def\XINT_cmp__pre #1#2% +\def\XINT_cmp_pre_b #1#2% {% \expandafter\XINT_cmp_A \expandafter1\expandafter{\expandafter}% @@ -1425,17 +1492,17 @@ }% \def\XINT_cmp_A #1#2#3\W\X\Y\Z #4#5#6#7% {% - \xint_gob_til_w #4\xint_cmp_az\W + \xint_gob_til_W #4\xint_cmp_az\W \XINT_cmp_B #1{#4#5#6#7}{#2}#3\W\X\Y\Z }% \def\XINT_cmp_B #1#2#3#4#5#6#7% {% - \xint_gob_til_w#4\xint_cmp_bz\W + \xint_gob_til_W#4\xint_cmp_bz\W \XINT_cmp_onestep #1#2{#7#6#5#4}{#3}% }% \def\XINT_cmp_onestep #1#2#3#4#5#6% {% - \expandafter\XINT_cmp_backtoA\the\numexpr 11#5#4#3#2-#6+#1-1\relax.% + \expandafter\XINT_cmp_backtoA\the\numexpr 11#5#4#3#2-#6+#1-\xint_c_i\relax.% }% \def\XINT_cmp_backtoA #1#2#3.#4% {% @@ -1444,7 +1511,7 @@ \def\xint_cmp_bz\W\XINT_cmp_onestep #1\Z { 1}% \def\xint_cmp_az\W\XINT_cmp_B #1#2#3#4#5#6#7% {% - \xint_gob_til_w #4\xint_cmp_ez\W + \xint_gob_til_W #4\xint_cmp_ez\W \XINT_cmp_Eenter #1{#3}#4#5#6#7% }% \def\XINT_cmp_Eenter #1\Z { -1}% @@ -1463,7 +1530,7 @@ }% \def\XINT_OneIfPositive_main #1#2#3#4% {% - \xint_gob_til_z #4\xint_OneIfPositive_terminated\Z + \xint_gob_til_Z #4\xint_OneIfPositive_terminated\Z \XINT_OneIfPositive_onestep #1#2#3#4% }% \def\xint_OneIfPositive_terminated\Z\XINT_OneIfPositive_onestep\W\X\Y\Z { 0}% @@ -1512,10 +1579,10 @@ \def\XINT_geq_plusminus #1#2#3#4{\XINT_geq_pre {#2}{#3#1}}% \def\XINT_geq_pre #1% {% - \expandafter\XINT_geq__pre\expandafter + \expandafter\XINT_geq_pre_b\expandafter {\romannumeral0\XINT_RQ {}#1\R\R\R\R\R\R\R\R\Z }% }% -\def\XINT_geq__pre #1#2% +\def\XINT_geq_pre_b #1#2% {% \expandafter\XINT_geq_A \expandafter1\expandafter{\expandafter}% @@ -1524,17 +1591,17 @@ }% \def\XINT_geq_A #1#2#3\W\X\Y\Z #4#5#6#7% {% - \xint_gob_til_w #4\xint_geq_az\W + \xint_gob_til_W #4\xint_geq_az\W \XINT_geq_B #1{#4#5#6#7}{#2}#3\W\X\Y\Z }% \def\XINT_geq_B #1#2#3#4#5#6#7% {% - \xint_gob_til_w #4\xint_geq_bz\W + \xint_gob_til_W #4\xint_geq_bz\W \XINT_geq_onestep #1#2{#7#6#5#4}{#3}% }% \def\XINT_geq_onestep #1#2#3#4#5#6% {% - \expandafter\XINT_geq_backtoA\the\numexpr 11#5#4#3#2-#6+#1-1\relax.% + \expandafter\XINT_geq_backtoA\the\numexpr 11#5#4#3#2-#6+#1-\xint_c_i\relax.% }% \def\XINT_geq_backtoA #1#2#3.#4% {% @@ -1543,7 +1610,7 @@ \def\xint_geq_bz\W\XINT_geq_onestep #1\W\X\Y\Z { 1}% \def\xint_geq_az\W\XINT_geq_B #1#2#3#4#5#6#7% {% - \xint_gob_til_w #4\xint_geq_ez\W + \xint_gob_til_W #4\xint_geq_ez\W \XINT_geq_Eenter #1% }% \def\XINT_geq_Eenter #1\W\X\Y\Z { 0}% @@ -1751,10 +1818,10 @@ }% \def\XINT_mul_choice_b #1#2% {% - \ifnum #1<5 + \ifnum #1<\xint_c_v \expandafter\XINT_mul_choice_littlebyfirst \else - \ifnum #2<5 + \ifnum #2<\xint_c_v \expandafter\expandafter\expandafter\XINT_mul_choice_littlebysecond \else \expandafter\expandafter\expandafter\XINT_mul_choice_compare @@ -1785,7 +1852,7 @@ }% \def\XINT_mul_choice_i #1#2% {% - \ifnum #1<\numexpr\ifcase \numexpr (#2-3)/4\relax + \ifnum #1<\numexpr\ifcase \numexpr (#2-\xint_c_iii)/\xint_c_iv\relax \or 330\or 168\or 109\or 80\or 66\or 52\else 0\fi\relax \expandafter\XINT_mul_choice_same \else @@ -1794,7 +1861,7 @@ }% \def\XINT_mul_choice_ii #1#2% {% - \ifnum #2<\numexpr\ifcase \numexpr (#1-3)/4\relax + \ifnum #2<\numexpr\ifcase \numexpr (#1-\xint_c_iii)/\xint_c_iv\relax \or 330\or 168\or 109\or 80\or 66\or 52\else 0\fi\relax \expandafter\XINT_mul_choice_permute \else @@ -1805,17 +1872,17 @@ {% \expandafter\XINT_mul_enter \romannumeral0\XINT_RQ {}#1\R\R\R\R\R\R\R\R\Z - \W\X\Y\Z #2\W\X\Y\Z + \Z\Z\Z\Z #2\W\W\W\W }% \def\XINT_mul_choice_permute #1#2% {% \expandafter\XINT_mul_enter \romannumeral0\XINT_RQ {}#2\R\R\R\R\R\R\R\R\Z - \W\X\Y\Z #1\W\X\Y\Z + \Z\Z\Z\Z #1\W\W\W\W }% \def\XINT_mul_Ar #1#2#3#4#5#6% {% - \xint_gob_til_z #6\xint_mul_br\Z\XINT_mul_Br #1{#6#5#4#3}{#2}% + \xint_gob_til_Z #6\xint_mul_br\Z\XINT_mul_Br #1{#6#5#4#3}{#2}% }% \def\xint_mul_br\Z\XINT_mul_Br #1#2% {% @@ -1849,11 +1916,11 @@ \def\XINT_mul_Mr_one #1#2#3#4\Z\Z\Z\Z { #4}% \def\XINT_mul_Nr #1#2#3#4#5#6#7% {% - \xint_gob_til_z #4\xint_mul_pr\Z\XINT_mul_Pr {#1}{#3}{#7#6#5#4}{#2}{#3}% + \xint_gob_til_Z #4\xint_mul_pr\Z\XINT_mul_Pr {#1}{#3}{#7#6#5#4}{#2}{#3}% }% \def\XINT_mul_Pr #1#2#3% {% - \expandafter\XINT_mul_Lr\the\numexpr 10000#1+#2*#3\relax + \expandafter\XINT_mul_Lr\the\numexpr \xint_c_x^viii+#1+#2*#3\relax }% \def\XINT_mul_Lr 1#1#2#3#4#5#6#7#8#9% {% @@ -1888,11 +1955,11 @@ }% \def\XINT_mul_N #1#2#3#4#5#6#7% {% - \xint_gob_til_z #4\xint_mul_p\Z\XINT_mul_P {#1}{#3}{#7#6#5#4}{#2}{#3}% + \xint_gob_til_Z #4\xint_mul_p\Z\XINT_mul_P {#1}{#3}{#7#6#5#4}{#2}{#3}% }% \def\XINT_mul_P #1#2#3% {% - \expandafter\XINT_mul_L\the\numexpr 10000#1+#2*#3\relax + \expandafter\XINT_mul_L\the\numexpr \xint_c_x^viii+#1+#2*#3\relax }% \def\XINT_mul_L 1#1#2#3#4#5#6#7#8#9% {% @@ -1906,175 +1973,161 @@ {% \expandafter\space\the\numexpr #1#2#3#4#5#6#7#8\relax }% -\def\XINT_mul_enter #1\W\X\Y\Z #2#3#4#5% +\def\XINT_mul_enter #1\Z\Z\Z\Z #2#3#4#5% +{% + \xint_gob_til_W #5\XINT_mul_exit_a\W + \XINT_mul_start {#2#3#4#5}#1\Z\Z\Z\Z +}% +\def\XINT_mul_exit_a\W\XINT_mul_start #1% +{% + \XINT_mul_exit_b #1% +}% +\def\XINT_mul_exit_b #1#2#3#4% {% - \xint_gob_til_w - #5\xint_mul_enterw - #4\xint_mul_enterx - #3\xint_mul_entery - #2\xint_mul_enterz - \W\XINT_mul_start {#2#3#4#5}#1\W\X\Y\Z + \xint_gob_til_W + #2\XINT_mul_exit_ci + #3\XINT_mul_exit_cii + \W\XINT_mul_exit_ciii #1#2#3#4% }% -\def\xint_mul_enterw - #1\xint_mul_enterx - #2\xint_mul_entery - #3\xint_mul_enterz - \W\XINT_mul_start #4#5\W\X\Y\Z \X\Y\Z +\def\XINT_mul_exit_ciii #1\W #2\Z\Z\Z\Z \W\W\W {% - \XINT_mul_M {#3#2#1}#5\Z\Z\Z\Z + \XINT_mul_M {#1}#2\Z\Z\Z\Z }% -\def\xint_mul_enterx - #1\xint_mul_entery - #2\xint_mul_enterz - \W\XINT_mul_start #3#4\W\X\Y\Z \Y\Z +\def\XINT_mul_exit_cii\W\XINT_mul_exit_ciii #1\W\W #2\Z\Z\Z\Z \W\W {% - \XINT_mul_M {#2#1}#4\Z\Z\Z\Z + \XINT_mul_M {#1}#2\Z\Z\Z\Z }% -\def\xint_mul_entery - #1\xint_mul_enterz - \W\XINT_mul_start #2#3\W\X\Y\Z \Z +\def\XINT_mul_exit_ci\W\XINT_mul_exit_cii + \W\XINT_mul_exit_ciii #1\W\W\W #2\Z\Z\Z\Z \W {% - \XINT_mul_M {#1}#3\Z\Z\Z\Z + \XINT_mul_M {#1}#2\Z\Z\Z\Z }% -\def\XINT_mul_start #1#2\W\X\Y\Z +\def\XINT_mul_start #1#2\Z\Z\Z\Z {% \expandafter\XINT_mul_main\expandafter - {\romannumeral0\XINT_mul_Mr {#1}#2\Z\Z\Z\Z}#2\W\X\Y\Z + {\romannumeral0\XINT_mul_Mr {#1}#2\Z\Z\Z\Z}#2\Z\Z\Z\Z }% -\def\XINT_mul_main #1#2\W\X\Y\Z #3#4#5#6% +\def\XINT_mul_main #1#2\Z\Z\Z\Z #3#4#5#6% {% - \xint_gob_til_w - #6\xint_mul_mainw - #5\xint_mul_mainx - #4\xint_mul_mainy - #3\xint_mul_mainz - \W\XINT_mul_compute {#1}{#3#4#5#6}#2\W\X\Y\Z + \xint_gob_til_W #6\XINT_mul_finish_a\W + \XINT_mul_compute {#3#4#5#6}{#1}#2\Z\Z\Z\Z }% -\def\XINT_mul_compute #1#2#3\W\X\Y\Z +\def\XINT_mul_compute #1#2#3\Z\Z\Z\Z {% \expandafter\XINT_mul_main\expandafter {\romannumeral0\expandafter \XINT_mul_Ar\expandafter0\expandafter{\expandafter}% - \romannumeral0\XINT_mul_Mr {#2}#3\Z\Z\Z\Z - \W\X\Y\Z 0000#1\W\X\Y\Z }#3\W\X\Y\Z + \romannumeral0\XINT_mul_Mr {#1}#3\Z\Z\Z\Z + \W\X\Y\Z 0000#2\W\X\Y\Z }#3\Z\Z\Z\Z }% -\def\xint_mul_mainw - #1\xint_mul_mainx - #2\xint_mul_mainy - #3\xint_mul_mainz - \W\XINT_mul_compute #4#5#6\W\X\Y\Z \X\Y\Z +\def\XINT_mul_finish_a\W\XINT_mul_compute #1% {% - \expandafter\XINT_addm_A \expandafter0\expandafter{\expandafter}% - \romannumeral0% - \XINT_mul_Mr {#3#2#1}#6\Z\Z\Z\Z - \W\X\Y\Z 000#4\W\X\Y\Z + \XINT_mul_finish_b #1% +}% +\def\XINT_mul_finish_b #1#2#3#4% +{% + \xint_gob_til_W + #1\XINT_mul_finish_c + #2\XINT_mul_finish_ci + #3\XINT_mul_finish_cii + \W\XINT_mul_finish_ciii #1#2#3#4% +}% +\def\XINT_mul_finish_ciii #1\W #2#3\Z\Z\Z\Z \W\W\W +{% + \expandafter\XINT_addm_A\expandafter0\expandafter{\expandafter}% + \romannumeral0\XINT_mul_Mr {#1}#3\Z\Z\Z\Z \W\X\Y\Z 000#2\W\X\Y\Z }% -\def\xint_mul_mainx - #1\xint_mul_mainy - #2\xint_mul_mainz - \W\XINT_mul_compute #3#4#5\W\X\Y\Z \Y\Z +\def\XINT_mul_finish_cii + \W\XINT_mul_finish_ciii #1\W\W #2#3\Z\Z\Z\Z \W\W {% - \expandafter\XINT_addm_A\expandafter - 0\expandafter{\expandafter}% - \romannumeral0\XINT_mul_Mr {#2#1}#5\Z\Z\Z\Z - \W\X\Y\Z 00#3\W\X\Y\Z + \expandafter\XINT_addm_A\expandafter0\expandafter{\expandafter}% + \romannumeral0\XINT_mul_Mr {#1}#3\Z\Z\Z\Z \W\X\Y\Z 00#2\W\X\Y\Z }% -\def\xint_mul_mainy - #1\xint_mul_mainz - \W\XINT_mul_compute #2#3#4\W\X\Y\Z \Z +\def\XINT_mul_finish_ci #1\XINT_mul_finish_ciii #2\W\W\W #3#4\Z\Z\Z\Z \W {% - \expandafter\XINT_addm_A\expandafter - 0\expandafter{\expandafter}% - \romannumeral0\XINT_mul_Mr {#1}#4\Z\Z\Z\Z - \W\X\Y\Z 0#2\W\X\Y\Z + \expandafter\XINT_addm_A\expandafter0\expandafter{\expandafter}% + \romannumeral0\XINT_mul_Mr {#2}#4\Z\Z\Z\Z \W\X\Y\Z 0#3\W\X\Y\Z }% -\def\xint_mul_mainz\W\XINT_mul_compute #1#2#3\W\X\Y\Z +\def\XINT_mul_finish_c #1\XINT_mul_finish_ciii \W\W\W\W #2#3\Z\Z\Z\Z {% - \expandafter\xint_cleanupzeros_andstop\romannumeral0\XINT_rev{#1}% + \expandafter\xint_cleanupzeros_andstop\romannumeral0\XINT_rev{#2}% }% -\def\XINT_mulr_enter #1\W\X\Y\Z #2#3#4#5% +\def\XINT_mulr_enter #1\Z\Z\Z\Z #2#3#4#5% {% - \xint_gob_til_w - #5\xint_mulr_enterw - #4\xint_mulr_enterx - #3\xint_mulr_entery - #2\xint_mulr_enterz - \W\XINT_mulr_start {#2#3#4#5}#1\W\X\Y\Z + \xint_gob_til_W #5\XINT_mulr_exit_a\W + \XINT_mulr_start {#2#3#4#5}#1\Z\Z\Z\Z }% -\def\xint_mulr_enterw - #1\xint_mulr_enterx - #2\xint_mulr_entery - #3\xint_mulr_enterz - \W\XINT_mulr_start #4#5\W\X\Y\Z \X\Y\Z +\def\XINT_mulr_exit_a\W\XINT_mulr_start #1% {% - \XINT_mul_Mr {#3#2#1}#5\Z\Z\Z\Z + \XINT_mulr_exit_b #1% }% -\def\xint_mulr_enterx - #1\xint_mulr_entery - #2\xint_mulr_enterz - \W\XINT_mulr_start #3#4\W\X\Y\Z \Y\Z +\def\XINT_mulr_exit_b #1#2#3#4% {% - \XINT_mul_Mr {#2#1}#4\Z\Z\Z\Z + \xint_gob_til_W + #2\XINT_mulr_exit_ci + #3\XINT_mulr_exit_cii + \W\XINT_mulr_exit_ciii #1#2#3#4% }% -\def\xint_mulr_entery - #1\xint_mulr_enterz - \W\XINT_mulr_start #2#3\W\X\Y\Z \Z +\def\XINT_mulr_exit_ciii #1\W #2\Z\Z\Z\Z \W\W\W {% - \XINT_mul_Mr {#1}#3\Z\Z\Z\Z + \XINT_mul_Mr {#1}#2\Z\Z\Z\Z }% -\def\XINT_mulr_start #1#2\W\X\Y\Z +\def\XINT_mulr_exit_cii\W\XINT_mulr_exit_ciii #1\W\W #2\Z\Z\Z\Z \W\W +{% + \XINT_mul_Mr {#1}#2\Z\Z\Z\Z +}% +\def\XINT_mulr_exit_ci\W\XINT_mulr_exit_cii + \W\XINT_mulr_exit_ciii #1\W\W\W #2\Z\Z\Z\Z \W +{% + \XINT_mul_Mr {#1}#2\Z\Z\Z\Z +}% +\def\XINT_mulr_start #1#2\Z\Z\Z\Z {% \expandafter\XINT_mulr_main\expandafter - {\romannumeral0\XINT_mul_Mr {#1}#2\Z\Z\Z\Z }#2\W\X\Y\Z + {\romannumeral0\XINT_mul_Mr {#1}#2\Z\Z\Z\Z}#2\Z\Z\Z\Z }% -\def\XINT_mulr_main #1#2\W\X\Y\Z #3#4#5#6% +\def\XINT_mulr_main #1#2\Z\Z\Z\Z #3#4#5#6% {% - \xint_gob_til_w - #6\xint_mulr_mainw - #5\xint_mulr_mainx - #4\xint_mulr_mainy - #3\xint_mulr_mainz - \W\XINT_mulr_compute {#1}{#3#4#5#6}#2\W\X\Y\Z + \xint_gob_til_W #6\XINT_mulr_finish_a\W + \XINT_mulr_compute {#3#4#5#6}{#1}#2\Z\Z\Z\Z }% -\def\XINT_mulr_compute #1#2#3\W\X\Y\Z +\def\XINT_mulr_compute #1#2#3\Z\Z\Z\Z {% \expandafter\XINT_mulr_main\expandafter {\romannumeral0\expandafter - \XINT_mul_Ar \expandafter0\expandafter{\expandafter}% - \romannumeral0\XINT_mul_Mr {#2}#3\Z\Z\Z\Z \W\X\Y\Z 0000#1\W\X\Y\Z - }#3\W\X\Y\Z -}% -\def\xint_mulr_mainw - #1\xint_mulr_mainx - #2\xint_mulr_mainy - #3\xint_mulr_mainz - \W\XINT_mulr_compute #4#5#6\W\X\Y\Z \X\Y\Z -{% - \expandafter\XINT_addp_A - \expandafter0\expandafter{\expandafter}% - \romannumeral0\XINT_mul_Mr {#3#2#1}#6\Z\Z\Z\Z - \W\X\Y\Z 000#4\W\X\Y\Z -}% -\def\xint_mulr_mainx - #1\xint_mulr_mainy - #2\xint_mulr_mainz - \W\XINT_mulr_compute #3#4#5\W\X\Y\Z \Y\Z -{% - \expandafter\XINT_addp_A - \expandafter0\expandafter{\expandafter}% - \romannumeral0\XINT_mul_Mr {#2#1}#5\Z\Z\Z\Z - \W\X\Y\Z 00#3\W\X\Y\Z -}% -\def\xint_mulr_mainy - #1\xint_mulr_mainz - \W\XINT_mulr_compute #2#3#4\W\X\Y\Z \Z -{% - \expandafter\XINT_addp_A - \expandafter0\expandafter{\expandafter}% - \romannumeral0\XINT_mul_Mr {#1}#4\Z\Z\Z\Z - \W\X\Y\Z 0#2\W\X\Y\Z -}% -\def\xint_mulr_mainz\W\XINT_mulr_compute #1#2#3\W\X\Y\Z { #1}% + \XINT_mul_Ar\expandafter0\expandafter{\expandafter}% + \romannumeral0\XINT_mul_Mr {#1}#3\Z\Z\Z\Z + \W\X\Y\Z 0000#2\W\X\Y\Z }#3\Z\Z\Z\Z +}% +\def\XINT_mulr_finish_a\W\XINT_mulr_compute #1% +{% + \XINT_mulr_finish_b #1% +}% +\def\XINT_mulr_finish_b #1#2#3#4% +{% + \xint_gob_til_W + #1\XINT_mulr_finish_c + #2\XINT_mulr_finish_ci + #3\XINT_mulr_finish_cii + \W\XINT_mulr_finish_ciii #1#2#3#4% +}% +\def\XINT_mulr_finish_ciii #1\W #2#3\Z\Z\Z\Z \W\W\W +{% + \expandafter\XINT_addp_A\expandafter0\expandafter{\expandafter}% + \romannumeral0\XINT_mul_Mr {#1}#3\Z\Z\Z\Z \W\X\Y\Z 000#2\W\X\Y\Z +}% +\def\XINT_mulr_finish_cii + \W\XINT_mulr_finish_ciii #1\W\W #2#3\Z\Z\Z\Z \W\W +{% + \expandafter\XINT_addp_A\expandafter0\expandafter{\expandafter}% + \romannumeral0\XINT_mul_Mr {#1}#3\Z\Z\Z\Z \W\X\Y\Z 00#2\W\X\Y\Z +}% +\def\XINT_mulr_finish_ci #1\XINT_mulr_finish_ciii #2\W\W\W #3#4\Z\Z\Z\Z \W +{% + \expandafter\XINT_addp_A\expandafter0\expandafter{\expandafter}% + \romannumeral0\XINT_mul_Mr {#2}#4\Z\Z\Z\Z \W\X\Y\Z 0#3\W\X\Y\Z +}% +\def\XINT_mulr_finish_c #1\XINT_mulr_finish_ciii \W\W\W\W #2#3\Z\Z\Z\Z { #2}% \def\xintiSqr {\romannumeral0\xintisqr }% \def\xintisqr #1% {% @@ -2086,7 +2139,7 @@ \expandafter\XINT_mul_enter \romannumeral0% \XINT_RQ {}#1\R\R\R\R\R\R\R\R\Z - \W\X\Y\Z #1\W\X\Y\Z + \Z\Z\Z\Z #1\W\W\W\W }% \def\xintiPrd {\romannumeral0\xintiprd }% \def\xintiprd #1{\xintiprdexpr #1\relax }% @@ -2111,11 +2164,12 @@ \expandafter\XINT_prod_loop_a\romannumeral0\XINT_mul_fork }% \def\XINT_prod_finished #1\Z #2\Z \Z { #2}% -\def\xintFac {\romannumeral0\xintfac }% -\def\xintfac #1% +\def\xintiFac {\romannumeral0\xintifac }% +\def\xintifac #1% {% \expandafter\XINT_fac_fork\expandafter{\the\numexpr #1}% }% +\let\xintFac\xintiFac \let\xintfac\xintifac \def\XINT_fac_fork #1% {% \ifcase\XINT_Sgn {#1} @@ -2166,7 +2220,7 @@ \expandafter\XINT_fac_bigcompute_loop\expandafter {\expandafter\XINT_mul_enter \romannumeral0\XINT_RQ {}#2\R\R\R\R\R\R\R\R\Z - \W\X\Y\Z #1\W\X\Y\Z }% + \Z\Z\Z\Z #1\W\W\W\W }% }% \def\XINT_fac_bigcompute_end #1#2#3#4#5% {% @@ -2253,7 +2307,7 @@ \ifcase\XINT_Sgn {#1} \expandafter\XINT_pow_BisZero \or - \expandafter\XINT_pow_checkBlength + \expandafter\XINT_pow_checkBsize \else \expandafter\XINT_pow_BisNegative \fi @@ -2261,7 +2315,7 @@ }% \def\XINT_pow_BisNegative #1#2{\xintError:FractionRoundedToZero\space 0}% \def\XINT_pow_BisZero #1#2{ 1}% -\def\XINT_pow_checkBlength #1#2% +\def\XINT_pow_checkBsize #1#2% {% \ifnum #1>999999999 \expandafter\XINT_pow_BtooBig @@ -2328,7 +2382,7 @@ \def\XINT_pow_pprod_compute #1\Z #2% {% \expandafter\XINT_pow_pprod_getnext\expandafter - {\romannumeral0\XINT_mulr_enter #2\W\X\Y\Z #1\W\X\Y\Z}% + {\romannumeral0\XINT_mulr_enter #2\Z\Z\Z\Z #1\W\W\W\W }% }% \def\XINT_pow_pprod_end\relax\XINT_pow_pprod_compute #1\Z #2% {% @@ -2404,7 +2458,7 @@ \def\XINT_div_AisNegative_posrem #1% {% \expandafter \XINT_div_AisNegative_posrem_b \expandafter - {\romannumeral0\xintiopp{\xintiAdd {#1}{1}}}% + {\romannumeral0\xintiopp{\xintInc {#1}}}% }% \def\XINT_div_AisNegative_posrem_b #1#2#3% {% @@ -2436,7 +2490,8 @@ \def\XINT_div_prepareB_BisOne #1#2#3#4#5{ {#5}{0}}% \def\XINT_div_prepareB_a #1% {% - \expandafter\XINT_div_prepareB_c\expandafter{\the\numexpr 4*((#1+1)/4)}{#1}% + \expandafter\XINT_div_prepareB_c\expandafter + {\the\numexpr \xint_c_iv*((#1+\xint_c_i)/\xint_c_iv)}{#1}% }% \def\XINT_div_prepareB_c #1#2% {% @@ -2545,11 +2600,11 @@ }% \def\XINT_div_final_da #1% {% - \ifnum #1>9 + \ifnum #1>\xint_c_ix \expandafter\XINT_div_final_dP \else \xint_afterfi - {\ifnum #1<0 + {\ifnum #1<\xint_c_ \expandafter\XINT_div_final_dN \else \expandafter\XINT_div_final_db @@ -2558,7 +2613,7 @@ }% \def\XINT_div_final_dN #1% {% - \expandafter\XINT_div_final_dP\the\numexpr #1-1\relax + \expandafter\XINT_div_final_dP\the\numexpr #1-\xint_c_i\relax }% \def\XINT_div_final_dP #1#2#3#4#5% q,A,Q,L,B (puis c) {% @@ -2576,8 +2631,9 @@ }% \def\XINT_div_final_dc #1#2% {% - \ifnum\XINT_Sgn{#1}<0 - \xint_afterfi {\expandafter\XINT_div_final_dP\the\numexpr #2-1\relax}% + \ifnum\XINT_Sgn{#1}<\xint_c_ + \xint_afterfi + {\expandafter\XINT_div_final_dP\the\numexpr #2-\xint_c_i\relax}% \else \xint_afterfi {\XINT_div_final_e {#1}#2}% \fi }% @@ -2615,9 +2671,9 @@ }% \def\XINT_div_body_d #1#2#3#4#5#6% {% - \ifnum #1 > 0 + \ifnum #1 >\xint_c_ \expandafter\XINT_div_body_d - \expandafter{\the\numexpr #1-4\expandafter }% + \expandafter{\the\numexpr #1-\xint_c_iv\expandafter }% \else \expandafter\XINT_div_body_e \fi @@ -2630,7 +2686,7 @@ \def\XINT_div_body_f #1#2#3#4#5#6#7#8% {% \expandafter\XINT_div_body_gg - \the\numexpr (#1+(#5+1)/2)/(#5+1)+99999\relax + \the\numexpr (#1+(#5+\xint_c_i)/\xint_c_ii)/(#5+\xint_c_i)+99999\relax {#8}{#2}{#8}{#4}{#5}{#3}{#6}{#7}{#8}% }% \def\XINT_div_body_gg #1#2#3#4#5#6% @@ -2664,7 +2720,7 @@ }% \def\XINT_div_body_h #1#2#3#4#5#6#7#8#9\Z {% - \ifnum #1#2#3#4>0 + \ifnum #1#2#3#4>\xint_c_ \xint_afterfi{\XINT_div_body_i {#1#2#3#4#5#6#7#8}}% \else \expandafter\XINT_div_body_k @@ -2691,14 +2747,14 @@ \def\XINT_div_body_l #1#2#3#4#5#6#7% {% \expandafter\XINT_div_body_m - \the\numexpr 100000000+#2\relax {#6}{#3}{#7}{#1#5}{#4}% + \the\numexpr \xint_c_x^viii+#2\relax {#6}{#3}{#7}{#1#5}{#4}% }% -\def\XINT_div_body_m #1#2#3#4#5#6#7#8#9% +\def\XINT_div_body_m 1#1#2#3#4#5#6#7#8% {% - \ifnum #2#3#4#5>0 - \xint_afterfi {\XINT_div_body_n {#9#8#7#6#5#4#3#2}}% + \ifnum #1#2#3#4>\xint_c_ + \xint_afterfi {\XINT_div_body_n {#8#7#6#5#4#3#2#1}}% \else - \xint_afterfi {\XINT_div_body_n {#9#8#7#6}}% + \xint_afterfi {\XINT_div_body_n {#8#7#6#5}}% \fi }% \def\XINT_div_body_n #1#2% @@ -2714,7 +2770,7 @@ {% \ifnum #1 > #2 \xint_afterfi - {\ifnum #4#5#6#7 > 0 + {\ifnum #4#5#6#7 > \xint_c_ \expandafter\XINT_div_body_q \else \expandafter\XINT_div_body_repeatp @@ -2742,30 +2798,31 @@ }% \def\XINT_div_sub_xpxp #1% {% - \expandafter \XINT_div_sub_xpxp_ \expandafter{#1}% + \expandafter \XINT_div_sub_xpxp_a \expandafter{#1}% }% -\def\XINT_div_sub_xpxp_ #1#2% +\def\XINT_div_sub_xpxp_a #1#2% {% - \expandafter\expandafter\expandafter\XINT_div_sub_xpxp__ + \expandafter\expandafter\expandafter\XINT_div_sub_xpxp_b #2\W\X\Y\Z #1\W\X\Y\Z }% -\def\XINT_div_sub_xpxp__ +\def\XINT_div_sub_xpxp_b {% \XINT_div_sub_A 1{}% }% \def\XINT_div_sub_A #1#2#3#4#5#6% {% - \xint_gob_til_w #3\xint_div_sub_az\W + \xint_gob_til_W #3\xint_div_sub_az\W \XINT_div_sub_B #1{#3#4#5#6}{#2}% }% \def\XINT_div_sub_B #1#2#3#4\W\X\Y\Z #5#6#7#8% {% - \xint_gob_til_w #5\xint_div_sub_bz\W + \xint_gob_til_W #5\xint_div_sub_bz\W \XINT_div_sub_onestep #1#2{#8#7#6#5}{#3}#4\W\X\Y\Z }% \def\XINT_div_sub_onestep #1#2#3#4#5#6% {% - \expandafter\XINT_div_sub_backtoA\the\numexpr 11#5#4#3#2-#6+#1-1\relax.% + \expandafter\XINT_div_sub_backtoA + \the\numexpr 11#5#4#3#2-#6+#1-\xint_c_i\relax.% }% \def\XINT_div_sub_backtoA #1#2#3.#4% {% @@ -2792,12 +2849,12 @@ }% \def\XINT_div_sub_C #1#2#3#4#5% {% - \xint_gob_til_w #2\xint_div_sub_cz\W + \xint_gob_til_W #2\xint_div_sub_cz\W \XINT_div_sub_AC_onestep {#5#4#3#2}{#1}% }% \def\XINT_div_sub_AC_onestep #1% {% - \expandafter\XINT_div_sub_backtoC\the\numexpr 11#1-1\relax.% + \expandafter\XINT_div_sub_backtoC\the\numexpr 11#1-\xint_c_i\relax.% }% \def\XINT_div_sub_backtoC #1#2#3.#4% {% @@ -2909,7 +2966,7 @@ }% \def\XINT_dsr_b #1#2#3\Z {% - \xint_gob_til_w #2\xint_dsr_onedigit\W + \xint_gob_til_W #2\xint_dsr_onedigit\W \xint_minus #2\xint_dsr_onedigit-% \expandafter\XINT_dsr_removew \romannumeral0\XINT_rev {#2#3}% @@ -3037,7 +3094,7 @@ }% \def\XINT_dsx_AisNeg_checkiffirstempty #1% {% - \xint_gob_til_z #1\XINT_dsx_AisNeg_finish_zero\Z + \xint_gob_til_Z #1\XINT_dsx_AisNeg_finish_zero\Z \XINT_dsx_AisNeg_finish_notzero #1% }% \def\XINT_dsx_AisNeg_finish_zero\Z @@ -3127,7 +3184,7 @@ \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_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 @@ -3159,7 +3216,7 @@ {\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 + \xint_gob_til_W #1\XINT_split_fromleft_wenttoofar\W \space {#2}{#3}% }% \def\XINT_split_fromleft_wenttoofar\W\space #1% @@ -3185,7 +3242,7 @@ \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_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#2#3\Z { {}}% @@ -3216,11 +3273,381 @@ {\XINT_split_fromright_checkiftoofar #8{#8#7#6#5#4#3#2#1}}% \def\XINT_split_fromright_checkiftoofar #1% {% - \xint_gob_til_w #1\XINT_split_fromright_wenttoofar\W + \xint_gob_til_W #1\XINT_split_fromright_wenttoofar\W \XINT_split_fromright_endsplit_ }% \def\XINT_split_fromright_wenttoofar\W\XINT_split_fromright_endsplit_ #1\Z #2% { {}{#2}}% +\def\xintDouble {\romannumeral0\xintdouble }% +\def\xintdouble #1% +{% + \expandafter\XINT_dbl\romannumeral-`0#1% + \R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W +}% +\def\XINT_dbl #1% +{% + \xint_UDzerominusfork + #1-\dummy \XINT_dbl_zero + 0#1\dummy \XINT_dbl_neg + 0-\dummy {\XINT_dbl_pos #1}% + \krof +}% +\def\XINT_dbl_zero #1\Z \W\W\W\W\W\W\W { 0}% +\def\XINT_dbl_neg + {\expandafter\xint_minus_andstop\romannumeral0\XINT_dbl_pos }% +\def\XINT_dbl_pos +{% + \expandafter\XINT_dbl_a \expandafter{\expandafter}\expandafter 0% + \romannumeral0\XINT_SQ {}% +}% +\def\XINT_dbl_a #1#2#3#4#5#6#7#8#9% +{% + \xint_gob_til_W #9\XINT_dbl_end_a\W + \expandafter\XINT_dbl_b + \the\numexpr \xint_c_x^viii+#2+\xint_c_ii*#9#8#7#6#5#4#3\relax {#1}% +}% +\def\XINT_dbl_b 1#1#2#3#4#5#6#7#8#9% +{% + \XINT_dbl_a {#2#3#4#5#6#7#8#9}{#1}% +}% +\def\XINT_dbl_end_a #1+#2+#3\relax #4% +{% + \expandafter\XINT_dbl_end_b #2#4% +}% +\def\XINT_dbl_end_b #1#2#3#4#5#6#7#8% +{% + \expandafter\space\the\numexpr #1#2#3#4#5#6#7#8\relax +}% +\def\xintHalf {\romannumeral0\xinthalf }% +\def\xinthalf #1% +{% + \expandafter\XINT_half\romannumeral-`0#1% + \R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W +}% +\def\XINT_half #1% +{% + \xint_UDzerominusfork + #1-\dummy \XINT_half_zero + 0#1\dummy \XINT_half_neg + 0-\dummy {\XINT_half_pos #1}% + \krof +}% +\def\XINT_half_zero #1\Z \W\W\W\W\W\W\W { 0}% +\def\XINT_half_neg {\expandafter\XINT_opp\romannumeral0\XINT_half_pos }% +\def\XINT_half_pos {\expandafter\XINT_half_a\romannumeral0\XINT_SQ {}}% +\def\XINT_half_a #1#2#3#4#5#6#7#8% +{% + \xint_gob_til_W #8\XINT_half_dont\W + \expandafter\XINT_half_b + \the\numexpr \xint_c_x^viii+\xint_c_v*#7#6#5#4#3#2#1\relax #8% +}% +\def\XINT_half_dont\W\expandafter\XINT_half_b + \the\numexpr \xint_c_x^viii+\xint_c_v*#1#2#3#4#5#6#7\relax \W\W\W\W\W\W\W +{% + \expandafter\space + \the\numexpr (#1#2#3#4#5#6#7+\xint_c_i)/\xint_c_ii-\xint_c_i \relax +}% +\def\XINT_half_b 1#1#2#3#4#5#6#7#8% +{% + \XINT_half_c {#2#3#4#5#6#7}{#1}% +}% +\def\XINT_half_c #1#2#3#4#5#6#7#8#9% +{% + \xint_gob_til_W #3\XINT_half_end_a #2\W + \expandafter\XINT_half_d + \the\numexpr \xint_c_x^viii+\xint_c_v*#9#8#7#6#5#4#3+#2\relax {#1}% +}% +\def\XINT_half_d 1#1#2#3#4#5#6#7#8#9% +{% + \XINT_half_c {#2#3#4#5#6#7#8#9}{#1}% +}% +\def\XINT_half_end_a #1\W #2\relax #3% +{% + \xint_gob_til_zero #1\XINT_half_end_b 0\space #1#3% +}% +\def\XINT_half_end_b 0\space 0#1#2#3#4#5#6#7% +{% + \expandafter\space\the\numexpr #1#2#3#4#5#6#7\relax +}% +\def\xintDec {\romannumeral0\xintdec }% +\def\xintdec #1% +{% + \expandafter\XINT_dec\romannumeral-`0#1% + \R\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W\W +}% +\def\XINT_dec #1% +{% + \xint_UDzerominusfork + #1-\dummy \XINT_dec_zero + 0#1\dummy \XINT_dec_neg + 0-\dummy {\XINT_dec_pos #1}% + \krof +}% +\def\XINT_dec_zero #1\W\W\W\W\W\W\W\W { -1}% +\def\XINT_dec_neg + {\expandafter\xint_minus_andstop\romannumeral0\XINT_inc_pos }% +\def\XINT_dec_pos +{% + \expandafter\XINT_dec_a \expandafter{\expandafter}% + \romannumeral0\XINT_OQ {}% +}% +\def\XINT_dec_a #1#2#3#4#5#6#7#8#9% +{% + \expandafter\XINT_dec_b + \the\numexpr 11#9#8#7#6#5#4#3#2-\xint_c_i\relax {#1}% +}% +\def\XINT_dec_b 1#1% +{% + \xint_gob_til_one #1\XINT_dec_A 1\XINT_dec_c +}% +\def\XINT_dec_c #1#2#3#4#5#6#7#8#9{\XINT_dec_a {#1#2#3#4#5#6#7#8#9}}% +\def\XINT_dec_A 1\XINT_dec_c #1#2#3#4#5#6#7#8#9% + {\XINT_dec_B {#1#2#3#4#5#6#7#8#9}}% +\def\XINT_dec_B #1#2\W\W\W\W\W\W\W\W +{% + \expandafter\XINT_dec_cleanup + \romannumeral0\XINT_rord_main {}#2% + \xint_relax + \xint_undef\xint_undef\xint_undef\xint_undef + \xint_undef\xint_undef\xint_undef\xint_undef + \xint_relax + #1% +}% +\def\XINT_dec_cleanup #1#2#3#4#5#6#7#8% +{\expandafter\space\the\numexpr #1#2#3#4#5#6#7#8\relax }% +\def\xintInc {\romannumeral0\xintinc }% +\def\xintinc #1% +{% + \expandafter\XINT_inc\romannumeral-`0#1% + \R\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W\W +}% +\def\XINT_inc #1% +{% + \xint_UDzerominusfork + #1-\dummy \XINT_inc_zero + 0#1\dummy \XINT_inc_neg + 0-\dummy {\XINT_inc_pos #1}% + \krof +}% +\def\XINT_inc_zero #1\W\W\W\W\W\W\W\W { 1}% +\def\XINT_inc_neg {\expandafter\XINT_opp\romannumeral0\XINT_dec_pos }% +\def\XINT_inc_pos +{% + \expandafter\XINT_inc_a \expandafter{\expandafter}% + \romannumeral0\XINT_OQ {}% +}% +\def\XINT_inc_a #1#2#3#4#5#6#7#8#9% +{% + \xint_gob_til_W #9\XINT_inc_end\W + \expandafter\XINT_inc_b + \the\numexpr 10#9#8#7#6#5#4#3#2+\xint_c_i\relax {#1}% +}% +\def\XINT_inc_b 1#1% +{% + \xint_gob_til_zero #1\XINT_inc_A 0\XINT_inc_c +}% +\def\XINT_inc_c #1#2#3#4#5#6#7#8#9{\XINT_inc_a {#1#2#3#4#5#6#7#8#9}}% +\def\XINT_inc_A 0\XINT_inc_c #1#2#3#4#5#6#7#8#9% + {\XINT_dec_B {#1#2#3#4#5#6#7#8#9}}% +\def\XINT_inc_end\W #1\relax #2{ 1#2}% +\def\XINT_dsx_addzerosnofuss #1{\XINT_dsx_zeroloop {#1}{}\Z }% +\def\xintiSqrt {\romannumeral0\xintisqrt }% +\def\xintisqrt + {\expandafter\XINT_sqrt_post\romannumeral0\xintisquareroot }% +\def\XINT_sqrt_post #1#2{\XINT_dec_pos #1\R\R\R\R\R\R\R\R\Z + \W\W\W\W\W\W\W\W }% +\def\xintiSquareRoot {\romannumeral0\xintisquareroot }% +\def\xintisquareroot #1% + {\expandafter\XINT_sqrt_checkin\romannumeral-`0#1\Z}% +\def\XINT_sqrt_checkin #1% +{% + \xint_UDzerominusfork + #1-\dummy \XINT_sqrt_iszero + 0#1\dummy \XINT_sqrt_isneg + 0-\dummy {\XINT_sqrt #1}% + \krof +}% +\def\XINT_sqrt_iszero #1\Z { 0}% +\def\XINT_sqrt_isneg #1\Z {\xintError:RootOfNegative\space 0}% +\def\XINT_sqrt #1\Z +{% + \expandafter\XINT_sqrt_start\expandafter + {\romannumeral0\XINT_length {#1}}{#1}% +}% +\def\XINT_sqrt_start #1% +{% + \ifnum #1<\xint_c_x + \expandafter\XINT_sqrt_small_a + \else + \expandafter\XINT_sqrt_big_a + \fi + {#1}% +}% +\def\XINT_sqrt_small_a #1{\XINT_sqrt_a {#1}\XINT_sqrt_small_d }% +\def\XINT_sqrt_big_a #1{\XINT_sqrt_a {#1}\XINT_sqrt_big_d }% +\def\XINT_sqrt_a #1% +{% + \ifodd #1 + \expandafter\XINT_sqrt_bB + \else + \expandafter\XINT_sqrt_bA + \fi + {#1}% +}% +\def\XINT_sqrt_bA #1#2#3% +{% + \XINT_sqrt_bA_b #3\Z #2{#1}{#3}% +}% +\def\XINT_sqrt_bA_b #1#2#3\Z +{% + \XINT_sqrt_c {#1#2}% +}% +\def\XINT_sqrt_bB #1#2#3% +{% + \XINT_sqrt_bB_b #3\Z #2{#1}{#3}% +}% +\def\XINT_sqrt_bB_b #1#2\Z +{% + \XINT_sqrt_c #1% +}% +\def\XINT_sqrt_c #1#2% +{% + \expandafter #2% + \ifcase #1 + \or 2\or 2\or 2\or 3\or 3\or 3\or 3\or 3\or %3+5 + 4\or 4\or 4\or 4\or 4\or 4\or 4\or %+7 + 5\or 5\or 5\or 5\or 5\or 5\or 5\or 5\or 5\or %+9 + 6\or 6\or 6\or 6\or 6\or 6\or 6\or 6\or 6\or 6\or 6\or %+11 + 7\or 7\or 7\or 7\or 7\or 7\or 7\or 7\or 7\or 7\or 7\or 7\or 7\or %+13 + 8\or 8\or 8\or 8\or 8\or 8\or 8\or + 8\or 8\or 8\or 8\or 8\or 8\or 8\or 8\or %+15 + 9\or 9\or 9\or 9\or 9\or 9\or 9\or 9\or + 9\or 9\or 9\or 9\or 9\or 9\or 9\or 9\or 9\or %+17 + 10\or 10\or 10\or 10\or 10\or 10\or 10\or 10\or 10\or + 10\or 10\or 10\or 10\or 10\or 10\or 10\or 10\or 10\or 10\or\fi %+19 +}% +\def\XINT_sqrt_small_d #1\or #2\fi #3% +{% + \fi + \expandafter\XINT_sqrt_small_de + \ifcase \numexpr #3/\xint_c_ii-\xint_c_i\relax + {}% + \or + 0% + \or + {00}% + \or + {000}% + \or + {0000}% + \or + \fi {#1}% +}% +\def\XINT_sqrt_small_de #1\or #2\fi #3% +{% + \fi\XINT_sqrt_small_e {#3#1}% +}% +\def\XINT_sqrt_small_e #1#2% +{% + \expandafter\XINT_sqrt_small_f\expandafter {\the\numexpr #1*#1-#2}{#1}% +}% +\def\XINT_sqrt_small_f #1#2% +{% + \expandafter\XINT_sqrt_small_g\expandafter + {\the\numexpr ((#1+#2)/(\xint_c_ii*#2))-\xint_c_i}{#1}{#2}% +}% +\def\XINT_sqrt_small_g #1% +{% + \ifnum #1>\xint_c_ + \expandafter\XINT_sqrt_small_h + \else + \expandafter\XINT_sqrt_small_end + \fi + {#1}% +}% +\def\XINT_sqrt_small_h #1#2#3% +{% + \expandafter\XINT_sqrt_small_f\expandafter + {\the\numexpr #2-\xint_c_ii*#1*#3+#1*#1\expandafter}\expandafter + {\the\numexpr #3-#1}% +}% +\def\XINT_sqrt_small_end #1#2#3{ {#3}{#2}}% +\def\XINT_sqrt_big_d #1\or #2\fi #3% +{% + \fi + \ifodd #3 + \xint_afterfi{\expandafter\XINT_sqrt_big_eB}% + \else + \xint_afterfi{\expandafter\XINT_sqrt_big_eA}% + \fi + \expandafter{\the\numexpr #3/\xint_c_ii }{#1}% +}% +\def\XINT_sqrt_big_eA #1#2#3% +{% + \XINT_sqrt_big_eA_a #3\Z {#2}{#1}{#3}% +}% +\def\XINT_sqrt_big_eA_a #1#2#3#4#5#6#7#8#9\Z +{% + \XINT_sqrt_big_eA_b {#1#2#3#4#5#6#7#8}% +}% +\def\XINT_sqrt_big_eA_b #1#2% +{% + \expandafter\XINT_sqrt_big_f + \romannumeral0\XINT_sqrt_small_e {#2000}{#1}{#1}% +}% +\def\XINT_sqrt_big_eB #1#2#3% +{% + \XINT_sqrt_big_eB_a #3\Z {#2}{#1}{#3}% +}% +\def\XINT_sqrt_big_eB_a #1#2#3#4#5#6#7#8#9% +{% + \XINT_sqrt_big_eB_b {#1#2#3#4#5#6#7#8#9}% +}% +\def\XINT_sqrt_big_eB_b #1#2\Z #3% +{% + \expandafter\XINT_sqrt_big_f + \romannumeral0\XINT_sqrt_small_e {#30000}{#1}{#1}% +}% +\def\XINT_sqrt_big_f #1#2#3#4% +{% + \expandafter\XINT_sqrt_big_f_a\expandafter + {\the\numexpr #2+#3\expandafter}\expandafter + {\romannumeral-`0\XINT_dsx_addzerosnofuss + {\numexpr #4-\xint_c_iv\relax}{#1}}{#4}% +}% +\def\XINT_sqrt_big_f_a #1#2#3#4% +{% + \expandafter\XINT_sqrt_big_g\expandafter + {\romannumeral0\xintisub + {\XINT_dsx_addzerosnofuss + {\numexpr \xint_c_ii*#3-\xint_c_viii\relax}{#1}}{#4}}% + {#2}{#3}% +}% +\def\XINT_sqrt_big_g #1#2% +{% + \expandafter\XINT_sqrt_big_j + \romannumeral0\xintidivision{#1} + {\romannumeral0\XINT_dbl_pos #2\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W }{#2}% +}% +\def\XINT_sqrt_big_j #1% +{% + \ifcase\XINT_Sgn {#1} + \expandafter \XINT_sqrt_big_end + \or \expandafter \XINT_sqrt_big_k + \fi {#1}% +}% +\def\XINT_sqrt_big_k #1#2#3% +{% + \expandafter\XINT_sqrt_big_l\expandafter + {\romannumeral0\xintisub {#3}{#1}}% + {\romannumeral0\xintiadd {#2}{\xintiSqr {#1}}}% +}% +\def\XINT_sqrt_big_l #1#2% +{% + \expandafter\XINT_sqrt_big_g\expandafter + {#2}{#1}% +}% +\def\XINT_sqrt_big_end #1#2#3#4{ {#3}{#2}}% \XINT_restorecatcodes_endinput% \endinput %% |