summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintcfrac.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcfrac.sty306
1 files changed, 207 insertions, 99 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
index cd03181aa3b..abe94579dff 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 (version 1.09kb of February 13, 2014)
+%% The xint bundle (version 1.09m of February 26, 2014)
%% xintcfrac: Expandable continued fractions with xint package
%% Copyright (C) 2013-2014 by Jean-Francois Burnol
%%----------------------------------------------------------------
@@ -101,22 +101,22 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintcfrac}%
- [2014/02/13 v1.09kb Expandable continued fractions with xint package (jfB)]%
+ [2014/02/26 v1.09m Expandable continued fractions with xint package (jfB)]%
\def\xintCFrac {\romannumeral0\xintcfrac }%
\def\xintcfrac #1%
{%
- \XINT_cfrac_opt_a #1\Z
+ \XINT_cfrac_opt_a #1\xint_relax
}%
\def\XINT_cfrac_opt_a #1%
{%
\ifx[#1\XINT_cfrac_opt_b\fi \XINT_cfrac_noopt #1%
}%
-\def\XINT_cfrac_noopt #1\Z
+\def\XINT_cfrac_noopt #1\xint_relax
{%
\expandafter\XINT_cfrac_A\romannumeral0\xintrawwithzeros {#1}\Z
\relax\relax
}%
-\def\XINT_cfrac_opt_b\fi\XINT_cfrac_noopt [\Z #1]%
+\def\XINT_cfrac_opt_b\fi\XINT_cfrac_noopt [\xint_relax #1]%
{%
\fi\csname XINT_cfrac_opt#1\endcsname
}%
@@ -177,30 +177,30 @@
}%
\def\XINT_cfrac_end_b \Z+\cfrac#1#2{ #2}%
\def\xintGCFrac {\romannumeral0\xintgcfrac }%
-\def\xintgcfrac #1{\XINT_gcfrac_opt_a #1\Z }%
+\def\xintgcfrac #1{\XINT_gcfrac_opt_a #1\xint_relax }%
\def\XINT_gcfrac_opt_a #1%
{%
\ifx[#1\XINT_gcfrac_opt_b\fi \XINT_gcfrac_noopt #1%
}%
-\def\XINT_gcfrac_noopt #1\Z
+\def\XINT_gcfrac_noopt #1\xint_relax
{%
- \XINT_gcfrac #1+\W/\relax\relax
+ \XINT_gcfrac #1+\xint_relax/\relax\relax
}%
-\def\XINT_gcfrac_opt_b\fi\XINT_gcfrac_noopt [\Z #1]%
+\def\XINT_gcfrac_opt_b\fi\XINT_gcfrac_noopt [\xint_relax #1]%
{%
\fi\csname XINT_gcfrac_opt#1\endcsname
}%
\def\XINT_gcfrac_optl #1%
{%
- \XINT_gcfrac #1+\W/\relax\hfill
+ \XINT_gcfrac #1+\xint_relax/\relax\hfill
}%
\def\XINT_gcfrac_optc #1%
{%
- \XINT_gcfrac #1+\W/\relax\relax
+ \XINT_gcfrac #1+\xint_relax/\relax\relax
}%
\def\XINT_gcfrac_optr #1%
{%
- \XINT_gcfrac #1+\W/\hfill\relax
+ \XINT_gcfrac #1+\xint_relax/\hfill\relax
}%
\def\XINT_gcfrac
{%
@@ -209,43 +209,94 @@
\def\XINT_gcfrac_enter {\XINT_gcfrac_loop {}}%
\def\XINT_gcfrac_loop #1#2+#3/%
{%
- \xint_gob_til_W #3\XINT_gcfrac_endloop\W
+ \xint_gob_til_xint_relax #3\XINT_gcfrac_endloop\xint_relax
\XINT_gcfrac_loop {{#3}{#2}#1}%
}%
-\def\XINT_gcfrac_endloop\W\XINT_gcfrac_loop #1#2#3%
+\def\XINT_gcfrac_endloop\xint_relax\XINT_gcfrac_loop #1#2#3%
{%
- \XINT_gcfrac_T #2#3#1\Z\Z
+ \XINT_gcfrac_T #2#3#1\xint_relax\xint_relax
}%
\def\XINT_gcfrac_T #1#2#3#4{\XINT_gcfrac_U #1#2{\xintFrac{#4}}}%
\def\XINT_gcfrac_U #1#2#3#4#5%
{%
- \xint_gob_til_Z #5\XINT_gcfrac_end\Z\XINT_gcfrac_U
+ \xint_gob_til_xint_relax #5\XINT_gcfrac_end\xint_relax\XINT_gcfrac_U
#1#2{\xintFrac{#5}%
\ifcase\xintSgn{#4}
+\or+\else-\fi
\cfrac{#1\xintFrac{\xintAbs{#4}}#2}{#3}}%
}%
-\def\XINT_gcfrac_end\Z\XINT_gcfrac_U #1#2#3%
+\def\XINT_gcfrac_end\xint_relax\XINT_gcfrac_U #1#2#3%
{%
\XINT_gcfrac_end_b #3%
}%
\def\XINT_gcfrac_end_b #1\cfrac#2#3{ #3}%
+\def\xintGGCFrac {\romannumeral0\xintggcfrac }%
+\def\xintggcfrac #1{\XINT_ggcfrac_opt_a #1\xint_relax }%
+\def\XINT_ggcfrac_opt_a #1%
+{%
+ \ifx[#1\XINT_ggcfrac_opt_b\fi \XINT_ggcfrac_noopt #1%
+}%
+\def\XINT_ggcfrac_noopt #1\xint_relax
+{%
+ \XINT_ggcfrac #1+\xint_relax/\relax\relax
+}%
+\def\XINT_ggcfrac_opt_b\fi\XINT_ggcfrac_noopt [\xint_relax #1]%
+{%
+ \fi\csname XINT_ggcfrac_opt#1\endcsname
+}%
+\def\XINT_ggcfrac_optl #1%
+{%
+ \XINT_ggcfrac #1+\xint_relax/\relax\hfill
+}%
+\def\XINT_ggcfrac_optc #1%
+{%
+ \XINT_ggcfrac #1+\xint_relax/\relax\relax
+}%
+\def\XINT_ggcfrac_optr #1%
+{%
+ \XINT_ggcfrac #1+\xint_relax/\hfill\relax
+}%
+\def\XINT_ggcfrac
+{%
+ \expandafter\XINT_ggcfrac_enter\romannumeral-`0%
+}%
+\def\XINT_ggcfrac_enter {\XINT_ggcfrac_loop {}}%
+\def\XINT_ggcfrac_loop #1#2+#3/%
+{%
+ \xint_gob_til_xint_relax #3\XINT_ggcfrac_endloop\xint_relax
+ \XINT_ggcfrac_loop {{#3}{#2}#1}%
+}%
+\def\XINT_ggcfrac_endloop\xint_relax\XINT_ggcfrac_loop #1#2#3%
+{%
+ \XINT_ggcfrac_T #2#3#1\xint_relax\xint_relax
+}%
+\def\XINT_ggcfrac_T #1#2#3#4{\XINT_ggcfrac_U #1#2{#4}}%
+\def\XINT_ggcfrac_U #1#2#3#4#5%
+{%
+ \xint_gob_til_xint_relax #5\XINT_ggcfrac_end\xint_relax\XINT_ggcfrac_U
+ #1#2{#5+\cfrac{#1#4#2}{#3}}%
+}%
+\def\XINT_ggcfrac_end\xint_relax\XINT_ggcfrac_U #1#2#3%
+{%
+ \XINT_ggcfrac_end_b #3%
+}%
+\def\XINT_ggcfrac_end_b #1\cfrac#2#3{ #3}%
\def\xintGCtoGCx {\romannumeral0\xintgctogcx }%
\def\xintgctogcx #1#2#3%
{%
\expandafter\XINT_gctgcx_start\expandafter {\romannumeral-`0#3}{#1}{#2}%
}%
-\def\XINT_gctgcx_start #1#2#3{\XINT_gctgcx_loop_a {}{#2}{#3}#1+\W/}%
+\def\XINT_gctgcx_start #1#2#3{\XINT_gctgcx_loop_a {}{#2}{#3}#1+\xint_relax/}%
\def\XINT_gctgcx_loop_a #1#2#3#4+#5/%
{%
- \xint_gob_til_W #5\XINT_gctgcx_end\W
+ \xint_gob_til_xint_relax #5\XINT_gctgcx_end\xint_relax
\XINT_gctgcx_loop_b {#1{#4}}{#2{#5}#3}{#2}{#3}%
}%
\def\XINT_gctgcx_loop_b #1#2%
{%
\XINT_gctgcx_loop_a {#1#2}%
}%
-\def\XINT_gctgcx_end\W\XINT_gctgcx_loop_b #1#2#3#4{ #1}%
+\def\XINT_gctgcx_end\xint_relax\XINT_gctgcx_loop_b #1#2#3#4{ #1}%
\def\xintFtoCs {\romannumeral0\xintftocs }%
\def\xintftocs #1%
{%
@@ -264,7 +315,7 @@
\xint_gob_til_zero #1\XINT_ftc_integer 0\XINT_ftc_D #1%
}%
\def\XINT_ftc_integer 0\XINT_ftc_D 0#1.#2#3{ #2}%
-\def\XINT_ftc_D #1.#2#3{\XINT_ftc_loop_a {#1}{#3}{#1}{#2,}}%
+\def\XINT_ftc_D #1.#2#3{\XINT_ftc_loop_a {#1}{#3}{#1}{#2, }}% 1.09m adds a space
\def\XINT_ftc_loop_a
{%
\expandafter\XINT_ftc_loop_d\romannumeral0\XINT_div_prepare
@@ -279,7 +330,7 @@
}%
\def\XINT_ftc_loop_f #1.#2#3#4%
{%
- \XINT_ftc_loop_a {#1}{#3}{#1}{#4#2,}%
+ \XINT_ftc_loop_a {#1}{#3}{#1}{#4#2, }% 1.09m has an added space here
}%
\def\xint_ftc_loop_exit0\XINT_ftc_loop_f #1.#2#3#4{ #4#2}%
\def\xintFtoCx {\romannumeral0\xintftocx }%
@@ -300,7 +351,7 @@
\xint_gob_til_zero #1\XINT_ftcx_integer 0\XINT_ftcx_D #1%
}%
\def\XINT_ftcx_integer 0\XINT_ftcx_D 0#1.#2#3#4{ #2}%
-\def\XINT_ftcx_D #1.#2#3#4{\XINT_ftcx_loop_a {#1}{#3}{#1}{#2#4}{#4}}%
+\def\XINT_ftcx_D #1.#2#3#4{\XINT_ftcx_loop_a {#1}{#3}{#1}{{#2}#4}{#4}}%
\def\XINT_ftcx_loop_a
{%
\expandafter\XINT_ftcx_loop_d\romannumeral0\XINT_div_prepare
@@ -318,8 +369,55 @@
\XINT_ftcx_loop_a {#1}{#3}{#1}{#4{#2}#5}{#5}%
}%
\def\xint_ftcx_loop_exit0\XINT_ftcx_loop_f #1.#2#3#4#5{ #4{#2}}%
+\def\xintFtoC {\romannumeral0\xintftoc }%
+\def\xintftoc {\xintftocx {}}%
\def\xintFtoGC {\romannumeral0\xintftogc }%
\def\xintftogc {\xintftocx {+1/}}%
+\def\xintFGtoC {\romannumeral0\xintfgtoc}%
+\def\xintfgtoc#1%
+{%
+ \expandafter\XINT_fgtc_a\romannumeral0\xintrawwithzeros {#1}\Z
+}%
+\def\XINT_fgtc_a #1/#2\Z #3%
+{%
+ \expandafter\XINT_fgtc_b\romannumeral0\xintrawwithzeros {#3}\Z #1/#2\Z { }%
+}%
+\def\XINT_fgtc_b #1/#2\Z
+{%
+ \expandafter\XINT_fgtc_c\romannumeral0\xintiidivision {#1}{#2}{#2}%
+}%
+\def\XINT_fgtc_c #1#2#3#4/#5\Z
+{%
+ \expandafter\XINT_fgtc_d\romannumeral0\xintiidivision
+ {#4}{#5}{#5}{#1}{#2}{#3}%
+}%
+\def\XINT_fgtc_d #1#2#3#4%#5#6#7%
+{%
+ \xintifEq {#1}{#4}{\XINT_fgtc_da {#1}{#2}{#3}{#4}}%
+ {\xint_thirdofthree}%
+}%
+\def\XINT_fgtc_da #1#2#3#4#5#6#7%
+{%
+ \XINT_fgtc_e {#2}{#5}{#3}{#6}{#7{#1}}%
+}%
+\def\XINT_fgtc_e #1%
+{%
+ \xintifZero {#1}{\expandafter\xint_firstofone\xint_gobble_iii}%
+ {\XINT_fgtc_f {#1}}%
+}%
+\def\XINT_fgtc_f #1#2%
+{%
+ \xintifZero {#2}{\xint_thirdofthree}{\XINT_fgtc_g {#1}{#2}}%
+}%
+\def\XINT_fgtc_g #1#2#3%
+{%
+ \expandafter\XINT_fgtc_h\romannumeral0\XINT_div_prepare {#1}{#3}{#1}{#2}%
+}%
+\def\XINT_fgtc_h #1#2#3#4#5%
+{%
+ \expandafter\XINT_fgtc_d\romannumeral0\XINT_div_prepare
+ {#4}{#5}{#4}{#1}{#2}{#3}%
+}%
\def\xintFtoCC {\romannumeral0\xintftocc }%
\def\xintftocc #1%
{%
@@ -391,56 +489,51 @@
\expandafter\XINT_ftcc_loop_a\expandafter
{\romannumeral0\xintdiv {1[0]}{#1}}{#3#2+-1/}%
}%
-\def\xintFtoCv {\romannumeral0\xintftocv }%
-\def\xintftocv #1%
-{%
- \xinticstocv {\xintFtoCs {#1}}%
-}%
-\def\xintFtoCCv {\romannumeral0\xintftoccv }%
-\def\xintftoccv #1%
-{%
- \xintigctocv {\xintFtoCC {#1}}%
-}%
\def\xintCstoF {\romannumeral0\xintcstof }%
\def\xintcstof #1%
{%
- \expandafter\XINT_cstf_prep \romannumeral-`0#1,\W,%
+ \expandafter\XINT_ctf_prep \romannumeral0\xintcsvtolist{#1}\xint_relax
+}%
+\def\xintCtoF {\romannumeral0\xintctof }%
+\def\xintctof #1%
+{%
+ \expandafter\XINT_ctf_prep \romannumeral-`0#1\xint_relax
}%
-\def\XINT_cstf_prep
+\def\XINT_ctf_prep
{%
- \XINT_cstf_loop_a 1001%
+ \XINT_ctf_loop_a 1001%
}%
-\def\XINT_cstf_loop_a #1#2#3#4#5,%
+\def\XINT_ctf_loop_a #1#2#3#4#5%
{%
- \xint_gob_til_W #5\XINT_cstf_end\W
- \expandafter\XINT_cstf_loop_b
+ \xint_gob_til_xint_relax #5\XINT_ctf_end\xint_relax
+ \expandafter\XINT_ctf_loop_b
\romannumeral0\xintrawwithzeros {#5}.{#1}{#2}{#3}{#4}%
}%
-\def\XINT_cstf_loop_b #1/#2.#3#4#5#6%
+\def\XINT_ctf_loop_b #1/#2.#3#4#5#6%
{%
- \expandafter\XINT_cstf_loop_c\expandafter
+ \expandafter\XINT_ctf_loop_c\expandafter
{\romannumeral0\XINT_mul_fork #2\Z #4\Z }%
{\romannumeral0\XINT_mul_fork #2\Z #3\Z }%
{\romannumeral0\xintiiadd {\XINT_Mul {#2}{#6}}{\XINT_Mul {#1}{#4}}}%
{\romannumeral0\xintiiadd {\XINT_Mul {#2}{#5}}{\XINT_Mul {#1}{#3}}}%
}%
-\def\XINT_cstf_loop_c #1#2%
+\def\XINT_ctf_loop_c #1#2%
{%
- \expandafter\XINT_cstf_loop_d\expandafter {\expandafter{#2}{#1}}%
+ \expandafter\XINT_ctf_loop_d\expandafter {\expandafter{#2}{#1}}%
}%
-\def\XINT_cstf_loop_d #1#2%
+\def\XINT_ctf_loop_d #1#2%
{%
- \expandafter\XINT_cstf_loop_e\expandafter {\expandafter{#2}#1}%
+ \expandafter\XINT_ctf_loop_e\expandafter {\expandafter{#2}#1}%
}%
-\def\XINT_cstf_loop_e #1#2%
+\def\XINT_ctf_loop_e #1#2%
{%
- \expandafter\XINT_cstf_loop_a\expandafter{#2}#1%
+ \expandafter\XINT_ctf_loop_a\expandafter{#2}#1%
}%
-\def\XINT_cstf_end #1.#2#3#4#5{\xintrawwithzeros {#2/#3}}% 1.09b removes [0]
+\def\XINT_ctf_end #1.#2#3#4#5{\xintrawwithzeros {#2/#3}}% 1.09b removes [0]
\def\xintiCstoF {\romannumeral0\xinticstof }%
\def\xinticstof #1%
{%
- \expandafter\XINT_icstf_prep \romannumeral-`0#1,\W,%
+ \expandafter\XINT_icstf_prep \romannumeral-`0#1,\xint_relax,%
}%
\def\XINT_icstf_prep
{%
@@ -448,7 +541,7 @@
}%
\def\XINT_icstf_loop_a #1#2#3#4#5,%
{%
- \xint_gob_til_W #5\XINT_icstf_end\W
+ \xint_gob_til_xint_relax #5\XINT_icstf_end\xint_relax
\expandafter
\XINT_icstf_loop_b \romannumeral-`0#5.{#1}{#2}{#3}{#4}%
}%
@@ -467,7 +560,7 @@
\def\xintGCtoF {\romannumeral0\xintgctof }%
\def\xintgctof #1%
{%
- \expandafter\XINT_gctf_prep \romannumeral-`0#1+\W/%
+ \expandafter\XINT_gctf_prep \romannumeral-`0#1+\xint_relax/%
}%
\def\XINT_gctf_prep
{%
@@ -500,7 +593,7 @@
}%
\def\XINT_gctf_loop_f #1#2/%
{%
- \xint_gob_til_W #2\XINT_gctf_end\W
+ \xint_gob_til_xint_relax #2\XINT_gctf_end\xint_relax
\expandafter\XINT_gctf_loop_g
\romannumeral0\xintrawwithzeros {#2}.#1%
}%
@@ -528,7 +621,7 @@
\def\xintiGCtoF {\romannumeral0\xintigctof }%
\def\xintigctof #1%
{%
- \expandafter\XINT_igctf_prep \romannumeral-`0#1+\W/%
+ \expandafter\XINT_igctf_prep \romannumeral-`0#1+\xint_relax/%
}%
\def\XINT_igctf_prep
{%
@@ -552,7 +645,7 @@
}%
\def\XINT_igctf_loop_f #1#2#3#4/%
{%
- \xint_gob_til_W #4\XINT_igctf_end\W
+ \xint_gob_til_xint_relax #4\XINT_igctf_end\xint_relax
\expandafter\XINT_igctf_loop_g
\romannumeral-`0#4.{#2}{#3}#1%
}%
@@ -574,49 +667,54 @@
\def\xintCstoCv {\romannumeral0\xintcstocv }%
\def\xintcstocv #1%
{%
- \expandafter\XINT_cstcv_prep \romannumeral-`0#1,\W,%
+ \expandafter\XINT_ctcv_prep\romannumeral0\xintcsvtolist{#1}\xint_relax
}%
-\def\XINT_cstcv_prep
+\def\xintCtoCv {\romannumeral0\xintctocv }%
+\def\xintctocv #1%
{%
- \XINT_cstcv_loop_a {}1001%
+ \expandafter\XINT_ctcv_prep\romannumeral-`0#1\xint_relax
}%
-\def\XINT_cstcv_loop_a #1#2#3#4#5#6,%
+\def\XINT_ctcv_prep
{%
- \xint_gob_til_W #6\XINT_cstcv_end\W
- \expandafter\XINT_cstcv_loop_b
+ \XINT_ctcv_loop_a {}1001%
+}%
+\def\XINT_ctcv_loop_a #1#2#3#4#5#6%
+{%
+ \xint_gob_til_xint_relax #6\XINT_ctcv_end\xint_relax
+ \expandafter\XINT_ctcv_loop_b
\romannumeral0\xintrawwithzeros {#6}.{#2}{#3}{#4}{#5}{#1}%
}%
-\def\XINT_cstcv_loop_b #1/#2.#3#4#5#6%
+\def\XINT_ctcv_loop_b #1/#2.#3#4#5#6%
{%
- \expandafter\XINT_cstcv_loop_c\expandafter
+ \expandafter\XINT_ctcv_loop_c\expandafter
{\romannumeral0\XINT_mul_fork #2\Z #4\Z }%
{\romannumeral0\XINT_mul_fork #2\Z #3\Z }%
{\romannumeral0\xintiiadd {\XINT_Mul {#2}{#6}}{\XINT_Mul {#1}{#4}}}%
{\romannumeral0\xintiiadd {\XINT_Mul {#2}{#5}}{\XINT_Mul {#1}{#3}}}%
}%
-\def\XINT_cstcv_loop_c #1#2%
+\def\XINT_ctcv_loop_c #1#2%
{%
- \expandafter\XINT_cstcv_loop_d\expandafter {\expandafter{#2}{#1}}%
+ \expandafter\XINT_ctcv_loop_d\expandafter {\expandafter{#2}{#1}}%
}%
-\def\XINT_cstcv_loop_d #1#2%
+\def\XINT_ctcv_loop_d #1#2%
{%
- \expandafter\XINT_cstcv_loop_e\expandafter {\expandafter{#2}#1}%
+ \expandafter\XINT_ctcv_loop_e\expandafter {\expandafter{#2}#1}%
}%
-\def\XINT_cstcv_loop_e #1#2%
+\def\XINT_ctcv_loop_e #1#2%
{%
- \expandafter\XINT_cstcv_loop_f\expandafter{#2}#1%
+ \expandafter\XINT_ctcv_loop_f\expandafter{#2}#1%
}%
-\def\XINT_cstcv_loop_f #1#2#3#4#5%
+\def\XINT_ctcv_loop_f #1#2#3#4#5%
{%
- \expandafter\XINT_cstcv_loop_g\expandafter
+ \expandafter\XINT_ctcv_loop_g\expandafter
{\romannumeral0\xintrawwithzeros {#1/#2}}{#5}{#1}{#2}{#3}{#4}%
}%
-\def\XINT_cstcv_loop_g #1#2{\XINT_cstcv_loop_a {#2{#1}}}% 1.09b removes [0]
-\def\XINT_cstcv_end #1.#2#3#4#5#6{ #6}%
+\def\XINT_ctcv_loop_g #1#2{\XINT_ctcv_loop_a {#2{#1}}}% 1.09b removes [0]
+\def\XINT_ctcv_end #1.#2#3#4#5#6{ #6}%
\def\xintiCstoCv {\romannumeral0\xinticstocv }%
\def\xinticstocv #1%
{%
- \expandafter\XINT_icstcv_prep \romannumeral-`0#1,\W,%
+ \expandafter\XINT_icstcv_prep \romannumeral-`0#1,\xint_relax,%
}%
\def\XINT_icstcv_prep
{%
@@ -624,7 +722,7 @@
}%
\def\XINT_icstcv_loop_a #1#2#3#4#5#6,%
{%
- \xint_gob_til_W #6\XINT_icstcv_end\W
+ \xint_gob_til_xint_relax #6\XINT_icstcv_end\xint_relax
\expandafter
\XINT_icstcv_loop_b \romannumeral-`0#6.{#2}{#3}{#4}{#5}{#1}%
}%
@@ -649,7 +747,7 @@
\def\xintGCtoCv {\romannumeral0\xintgctocv }%
\def\xintgctocv #1%
{%
- \expandafter\XINT_gctcv_prep \romannumeral-`0#1+\W/%
+ \expandafter\XINT_gctcv_prep \romannumeral-`0#1+\xint_relax/%
}%
\def\XINT_gctcv_prep
{%
@@ -691,7 +789,7 @@
}%
\def\XINT_gctcv_loop_h #1#2#3/%
{%
- \xint_gob_til_W #3\XINT_gctcv_end\W
+ \xint_gob_til_xint_relax #3\XINT_gctcv_end\xint_relax
\expandafter\XINT_gctcv_loop_i
\romannumeral0\xintrawwithzeros {#3}.#2{#1}%
}%
@@ -720,7 +818,7 @@
\def\xintiGCtoCv {\romannumeral0\xintigctocv }%
\def\xintigctocv #1%
{%
- \expandafter\XINT_igctcv_prep \romannumeral-`0#1+\W/%
+ \expandafter\XINT_igctcv_prep \romannumeral-`0#1+\xint_relax/%
}%
\def\XINT_igctcv_prep
{%
@@ -744,7 +842,7 @@
}%
\def\XINT_igctcv_loop_f #1#2#3#4/%
{%
- \xint_gob_til_W #4\XINT_igctcv_end_a\W
+ \xint_gob_til_xint_relax #4\XINT_igctcv_end_a\xint_relax
\expandafter\XINT_igctcv_loop_g
\romannumeral-`0#4.#1#2{#3}%
}%
@@ -772,6 +870,16 @@
{\romannumeral0\xintrawwithzeros {#2/#3}}%
}%
\def\XINT_igctcv_end_b #1#2{ #2{#1}}% 1.09b removes [0]
+\def\xintFtoCv {\romannumeral0\xintftocv }%
+\def\xintftocv #1%
+{%
+ \xinticstocv {\xintFtoCs {#1}}%
+}%
+\def\xintFtoCCv {\romannumeral0\xintftoccv }%
+\def\xintftoccv #1%
+{%
+ \xintigctocv {\xintFtoCC {#1}}%
+}%
\def\xintCntoF {\romannumeral0\xintcntof }%
\def\xintcntof #1%
{%
@@ -787,7 +895,7 @@
\xint_afterfi
{\ifnum #1=\xint_c_
\xint_afterfi {\expandafter\space \romannumeral-`0#2{0}}%
- \else \xint_afterfi { 0/1[0]}%
+ \else \xint_afterfi { }% 1.09m now returns nothing.
\fi}%
\fi
}%
@@ -820,7 +928,7 @@
\xint_afterfi
{\ifnum #1=\xint_c_
\xint_afterfi {\expandafter\space\romannumeral-`0#2{0}}%
- \else \xint_afterfi { 0/1[0]}%
+ \else \xint_afterfi { }% 1.09m now returns nothing rather than 0/1[0]
\fi}%
\fi
}%
@@ -846,19 +954,19 @@
\def\XINT_cntcs #1#2%
{%
\ifnum #1<0
- \xint_afterfi { }% 1.09i: a 0/1[0] was strangely here, removed
+ \xint_afterfi { }% 1.09i: a 0/1[0] was here, now the macro returns nothing
\else
\xint_afterfi {\expandafter\XINT_cntcs_loop\expandafter
- {\the\numexpr #1-1\expandafter}\expandafter
- {\expandafter{\romannumeral-`0#2{#1}}}{#2}}%
+ {\the\numexpr #1-\xint_c_i\expandafter}\expandafter
+ {\romannumeral-`0#2{#1}}{#2}}% produced coeff not braced
\fi
}%
\def\XINT_cntcs_loop #1#2#3%
{%
- \ifnum #1>-1 \else \XINT_cntcs_exit \fi
+ \ifnum #1>-\xint_c_i \else \XINT_cntcs_exit \fi
\expandafter\XINT_cntcs_loop\expandafter
- {\the\numexpr #1-1\expandafter }\expandafter
- {\expandafter{\romannumeral-`0#3{#1}},#2}{#3}%
+ {\the\numexpr #1-\xint_c_i\expandafter}\expandafter
+ {\romannumeral-`0#3{#1}, #2}{#3}% space added, 1.09m
}%
\def\XINT_cntcs_exit \fi
\expandafter\XINT_cntcs_loop\expandafter
@@ -866,7 +974,7 @@
{%
\fi\XINT_cntcs_exit_b #2%
}%
-\def\XINT_cntcs_exit_b #1,{ }%
+\def\XINT_cntcs_exit_b #1,{}% romannumeral stopping space already there
\def\xintCntoGC {\romannumeral0\xintcntogc }%
\def\xintcntogc #1%
{%
@@ -878,15 +986,15 @@
\xint_afterfi { }% 1.09i there was as strange 0/1[0] here, removed
\else
\xint_afterfi {\expandafter\XINT_cntgc_loop\expandafter
- {\the\numexpr #1-1\expandafter}\expandafter
+ {\the\numexpr #1-\xint_c_i\expandafter}\expandafter
{\expandafter{\romannumeral-`0#2{#1}}}{#2}}%
\fi
}%
\def\XINT_cntgc_loop #1#2#3%
{%
- \ifnum #1>-1 \else \XINT_cntgc_exit \fi
+ \ifnum #1>-\xint_c_i \else \XINT_cntgc_exit \fi
\expandafter\XINT_cntgc_loop\expandafter
- {\the\numexpr #1-1\expandafter }\expandafter
+ {\the\numexpr #1-\xint_c_i\expandafter }\expandafter
{\expandafter{\romannumeral-`0#3{#1}}+1/#2}{#3}%
}%
\def\XINT_cntgc_exit \fi
@@ -907,20 +1015,20 @@
\xint_afterfi { }% 1.09i now returns nothing
\else
\xint_afterfi {\expandafter\XINT_gcntgc_loop\expandafter
- {\the\numexpr #1-1\expandafter}\expandafter
+ {\the\numexpr #1-\xint_c_i\expandafter}\expandafter
{\expandafter{\romannumeral-`0#2{#1}}}{#2}{#3}}%
\fi
}%
\def\XINT_gcntgc_loop #1#2#3#4%
{%
- \ifnum #1>-1 \else \XINT_gcntgc_exit \fi
+ \ifnum #1>-\xint_c_i \else \XINT_gcntgc_exit \fi
\expandafter\XINT_gcntgc_loop_b\expandafter
{\expandafter{\romannumeral-`0#4{#1}}/#2}{#3{#1}}{#1}{#3}{#4}%
}%
\def\XINT_gcntgc_loop_b #1#2#3%
{%
\expandafter\XINT_gcntgc_loop\expandafter
- {\the\numexpr #3-1\expandafter}\expandafter
+ {\the\numexpr #3-\xint_c_i \expandafter}\expandafter
{\expandafter{\romannumeral-`0#2}+#1}%
}%
\def\XINT_gcntgc_exit \fi
@@ -932,25 +1040,25 @@
\def\xintCstoGC {\romannumeral0\xintcstogc }%
\def\xintcstogc #1%
{%
- \expandafter\XINT_cstc_prep \romannumeral-`0#1,\W,%
+ \expandafter\XINT_cstc_prep \romannumeral-`0#1,\xint_relax,%
}%
\def\XINT_cstc_prep #1,{\XINT_cstc_loop_a {{#1}}}%
\def\XINT_cstc_loop_a #1#2,%
{%
- \xint_gob_til_W #2\XINT_cstc_end\W
+ \xint_gob_til_xint_relax #2\XINT_cstc_end\xint_relax
\XINT_cstc_loop_b {#1}{#2}%
}%
\def\XINT_cstc_loop_b #1#2{\XINT_cstc_loop_a {#1+1/{#2}}}%
-\def\XINT_cstc_end\W\XINT_cstc_loop_b #1#2{ #1}%
+\def\XINT_cstc_end\xint_relax\XINT_cstc_loop_b #1#2{ #1}%
\def\xintGCtoGC {\romannumeral0\xintgctogc }%
\def\xintgctogc #1%
{%
- \expandafter\XINT_gctgc_start \romannumeral-`0#1+\W/%
+ \expandafter\XINT_gctgc_start \romannumeral-`0#1+\xint_relax/%
}%
\def\XINT_gctgc_start {\XINT_gctgc_loop_a {}}%
\def\XINT_gctgc_loop_a #1#2+#3/%
{%
- \xint_gob_til_W #3\XINT_gctgc_end\W
+ \xint_gob_til_xint_relax #3\XINT_gctgc_end\xint_relax
\expandafter\XINT_gctgc_loop_b\expandafter
{\romannumeral-`0#2}{#3}{#1}%
}%
@@ -963,7 +1071,7 @@
{%
\XINT_gctgc_loop_a {#3{#2}+{#1}/}%
}%
-\def\XINT_gctgc_end\W\expandafter\XINT_gctgc_loop_b
+\def\XINT_gctgc_end\xint_relax\expandafter\XINT_gctgc_loop_b
{%
\expandafter\XINT_gctgc_end_b
}%