From ff3c0e83bcf8933daf4eebaf87613022ca946b6a Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sat, 19 Mar 2016 22:13:18 +0000
Subject: xint (19mar16)

git-svn-id: svn://tug.org/texlive/trunk@40077 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/generic/xint/xintfrac.sty | 296 +++++++++++++-----------
 1 file changed, 162 insertions(+), 134 deletions(-)

(limited to 'Master/texmf-dist/tex/generic/xint/xintfrac.sty')

diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
index 39b9785986f..ab128c57272 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.2f 2016/03/12
+%% The xint bundle 1.2g 2016/03/19
 %% 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/03/12 1.2f Expandable operations on fractions (JFB)]%
+  [2016/03/19 1.2g Expandable operations on fractions (JFB)]%
 \def\XINT_cntSgnFork #1%
 {%
     \ifcase #1\expandafter\xint_secondofthree
@@ -596,7 +596,7 @@
 }%
 \def\XINT_sgnfrac_N
 {%
-    \expandafter\xint_minus_thenstop\romannumeral0\XINT_sgnfrac_P
+    \expandafter-\romannumeral0\XINT_sgnfrac_P
 }%
 \def\xintFwOver {\romannumeral0\xintfwover }%
 \def\xintfwover #1%
@@ -644,7 +644,7 @@
 }%
 \def\XINT_sgnfwover_N
 {%
-    \expandafter\xint_minus_thenstop\romannumeral0\XINT_sgnfwover_P
+    \expandafter-\romannumeral0\XINT_sgnfwover_P
 }%
 \def\xintREZ {\romannumeral0\xintrez }%
 \def\xintrez
@@ -664,7 +664,7 @@
     \krof
 }%
 \def\XINT_rez_zero #1\Z #2#3{ 0/1[0]}%
-\def\XINT_rez_neg {\expandafter\xint_minus_thenstop\romannumeral0\XINT_rez_B }%
+\def\XINT_rez_neg {\expandafter-\romannumeral0\XINT_rez_B }%
 \def\XINT_rez_B #1\Z
 {%
     \expandafter\XINT_rez_C\romannumeral0\XINT_factortens {#1}%
@@ -708,7 +708,7 @@
     #2\Z {#3}%
 }%
 \def\XINT_irr_denomisone #1\Z #2{ #1/1}% changed in 1.08
-\def\XINT_irr_negative   #1\Z #2{\XINT_irr_D #1\Z #2\Z \xint_minus_thenstop}%
+\def\XINT_irr_negative   #1\Z #2{\XINT_irr_D #1\Z #2\Z -}%
 \def\XINT_irr_nonneg     #1\Z #2{\XINT_irr_D #1\Z #2\Z \space}%
 \def\XINT_irr_D #1#2\Z #3#4\Z
 {%
@@ -775,7 +775,7 @@
     #2\Z {#3}%
 }%
 \def\XINT_jrr_denomisone #1\Z #2{ #1/1}% changed in 1.08
-\def\XINT_jrr_negative   #1\Z #2{\XINT_jrr_D #1\Z #2\Z \xint_minus_thenstop }%
+\def\XINT_jrr_negative   #1\Z #2{\XINT_jrr_D #1\Z #2\Z -}%
 \def\XINT_jrr_nonneg     #1\Z #2{\XINT_jrr_D #1\Z #2\Z \space}%
 \def\XINT_jrr_D #1#2\Z #3#4\Z
 {%
@@ -893,7 +893,7 @@
     \krof
 }%
 \def\XINT_trunc_Fneg #1.#2{\expandafter\xint_firstoftwo_thenstop
-           \romannumeral0\XINT_div_prepare {#2}{#1}\Z \xint_minus_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%
@@ -1607,7 +1607,7 @@
     #1#5{#2/#3[#4]}{#6/#7[#8]}%
 }%
 \def\XINT_fmax_minusminus --%
-   {\expandafter\xint_minus_thenstop\romannumeral0\XINT_fmin_nonneg_b }%
+   {\expandafter-\romannumeral0\XINT_fmin_nonneg_b }%
 \def\XINT_fmax_firstneg #1-#2#3{ #1#2}%
 \def\XINT_fmax_secondneg -#1#2#3{ #1#3}%
 \def\XINT_fmax_nonneg_a #1#2#3#4%
@@ -1651,7 +1651,7 @@
     #1#5{#2/#3[#4]}{#6/#7[#8]}%
 }%
 \def\XINT_fmin_minusminus --%
-   {\expandafter\xint_minus_thenstop\romannumeral0\XINT_fmax_nonneg_b }%
+   {\expandafter-\romannumeral0\XINT_fmax_nonneg_b }%
 \def\XINT_fmin_firstneg #1-#2#3{ -#3}%
 \def\XINT_fmin_secondneg -#1#2#3{ -#2}%
 \def\XINT_fmin_nonneg_a #1#2#3#4%
@@ -1773,21 +1773,94 @@
     \expandafter\XINT_float_a\the\numexpr #1\expandafter.%
     \romannumeral0\XINT_infrac {#2}\XINT_float_Q
 }%
-\def\XINT_float_a #1.#2#3% #1=P, #2=n, #3=A, #4=B
+\def\XINT_float_a #1.#2#3#4%
 {%
-    \XINT_float_fork #3\Z {#1}{#2}% #1 = precision, #2=n
+    \if\romannumeral0\XINT_isone#4XY1\expandafter\XINT_float_sp
+    \else\expandafter\XINT_float_fork\fi #3.{#1}{#2}{#4}%
 }%
-\def\XINT_float_fork #1%
+\def\XINT_float_sp #1%
+{%
+    \xint_UDzerominusfork
+     #1-\XINT_float_spzero
+     0#1\XINT_float_spneg
+      0-{\XINT_float_sppos #1}%
+    \krof
+}%
+\def\XINT_float_spzero .#1#2#3#4{ 0.e0}%
+\def\XINT_float_spneg {\expandafter-\romannumeral0\XINT_float_sppos}%
+\def\XINT_float_sppos #1.#2#3#4#5%
+{%
+    \expandafter\XINT_float_sp_b\the\numexpr#2-\xintLength{#1}.#1.#2.#3.%
+}%
+\def\XINT_float_sp_b #1%
 {%
     \xint_UDzerominusfork
-     #1-\XINT_float_zero
-     0#1\XINT_float_J
-      0-{\XINT_float_K #1}%
+     #1-\XINT_float_sp_quick
+     0#1\XINT_float_sp_c
+      0-{\XINT_float_sp_addzeros #1}%
     \krof
 }%
-\def\XINT_float_zero #1\Z #2#3#4#5{ 0.e0}%
-\def\XINT_float_J {\expandafter\xint_minus_thenstop\romannumeral0\XINT_float_K }%
-\def\XINT_float_K #1\Z #2% #1=A, #2=P, #3=n, #4=B
+\def\XINT_float_sp_quick .#1.#2.#3.%
+{%
+    \expandafter\XINT_float_sp_done\the\numexpr #3+#2-\xint_c_i.#1;%
+}%
+\def\XINT_float_sp_addzeros #1.#2.#3.#4.%
+{%
+    \expandafter\XINT_float_sp_done
+    \the\numexpr #4-#1+#3-\xint_c_i\expandafter.%
+    \romannumeral0\XINT_dsx_addzerosnofuss {#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%
+}%
+\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%
+}%
+\def\XINT_float_sp_e #1.#2.#3.%
+{%
+    \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.%
+}%
+\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
+     #1\XINT_float_J
+     -{\XINT_float_K #1}%
+    \krof
+}%
+\def\XINT_float_J {\expandafter-\romannumeral0\XINT_float_K }%
+\def\XINT_float_K #1.#2%
 {%
     \expandafter\XINT_float_L
     \the\numexpr\xintLength{#1}\expandafter.\the\numexpr #2+\xint_c_ii.{#1}{#2}%
@@ -1820,9 +1893,9 @@
 }%
 \def\XINT_float_N #1.#2.#3.%
 {%
-    \ifnum #1>#3 \xint_dothis\XINT_float_N_Blong\fi
-    \ifnum #1=\xint_c_i\xint_dothis\XINT_float_N_Bshort\fi
-                       \xint_orthat{\XINT_float_P 0.}%
+    \ifnum #1>#3
+         \expandafter\XINT_float_N_Blong
+    \else\expandafter\XINT_float_P\fi
     #1.#2.#3.%
 }%
 \def\XINT_float_N_Blong #1.#2.#3.#4%
@@ -1831,27 +1904,12 @@
     \the\numexpr #2-#1+#3\expandafter.%
     \romannumeral0\XINT_split_fromleft_loop #3.{}#4\W\W\W\W\W\W\W\W\Z {#3}%
 }%
-\def\XINT_float_NaP #1.#2.#3.#4{\XINT_float_P 0.#4.#1.#4.{#2}}%
-\def\XINT_float_N_Bshort 1.#1.#2.#3%
-{%
-    \ifnum #3=\xint_c_i \xint_dothis{\XINT_float_P 1.}\fi
-                        \xint_orthat{\XINT_float_P 0.}1.#1.#2.#3%
-}%
-\def\XINT_float_P #1.#2.#3.#4.#5#6#7#8#9%
-{%
-    \expandafter #9\expandafter#1%
-    \the\numexpr #2-#6+#4-\xint_c_i.{#7}{#5}{#8}{#3}%
-}%
-\def\XINT_float_Q #1%
+\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%
 {%
-    \if 1#1\expandafter\XINT_float_Ri\else\expandafter\XINT_float_Rii\fi
+    \expandafter #8\the\numexpr #1-#5+#3-\xint_c_i.{#6}{#4}{#7}{#2}%
 }%
-\def\XINT_float_Ri #1.#2#3%
-{%
-    \expandafter\XINT_float_Sa
-    \romannumeral0\XINT_dsx_addzerosnofuss {#1}{#2}\Z {#1}%
-}%
-\def\XINT_float_Rii #1.#2#3%
+\def\XINT_float_Q #1.#2#3%
 {%
     \expandafter\XINT_float_Sa
     \romannumeral0\xintiiquo{\XINT_dsx_addzerosnofuss {#1}{#2}}{#3}\Z {#1}%
@@ -1908,71 +1966,61 @@
 }%
 \def\XINT_float_Y #1.#2{ #2e#1}%
 \def\XINTinFloat {\romannumeral0\XINTinfloat }%
-\def\XINTinfloat [#1]#2%
+\def\XINTinfloat
+   {\expandafter\XINT_infloat_clean\romannumeral0\XINT_infloat}%
+\def\XINT_infloat_clean #1%
+   {\if #1!\xint_dothis\XINT_infloat_clean_a\fi\xint_orthat{ }#1}%
+\def\XINT_infloat_clean_a !#1.#2[#3]%
 {%
-    \expandafter\XINT_infloat\the\numexpr #1\expandafter.%
-    \romannumeral0\expandafter\XINT_infloat_in
-    \romannumeral`&&@#2/\XINT_W[\XINT_W\XINT_T\XINT_infloat_Q
+    \expandafter\XINT_infloat_sp_done
+    \the\numexpr #3-#1\expandafter.%
+    \romannumeral0\XINT_dsx_addzerosnofuss {#1}{#2};%
 }%
-\def\XINT_infloat #1.#2{#2#1.}%
-\def\XINT_infloat_in #1[#2%
+\def\XINT_infloat_sp_done #1.#2;{ #2[#1]}%
+\def\XINTinFloatS {\romannumeral0\XINTinfloatS}%
+\def\XINTinfloatS
+   {\expandafter\XINT_infloatS_clean\romannumeral0\XINT_infloat}%
+\def\XINT_infloatS_clean #1%
+   {\if #1!\xint_dothis\XINT_infloatS_clean_a\fi\xint_orthat{ }#1}%
+\def\XINT_infloatS_clean_a !#1.{ }%
+\def\XINT_infloat [#1]#2%
 {%
-    \xint_UDXINTWfork
-      #2\XINT_infloat_gen
-      \XINT_W\XINT_infloat_res_a
-    \krof
-    #1[#2%
+    \expandafter\XINT_infloat_a\the\numexpr #1\expandafter.%
+    \romannumeral0\XINT_infrac {#2}\XINT_infloat_Q
 }%
-\edef\XINT_infloat_gen {\noexpand\expandafter\space\noexpand\expandafter
-                        \noexpand\XINT_infloat_a
-                        \noexpand\romannumeral0\noexpand\XINT_frac_gen }%
-\def\XINT_infloat_res_a #1%
+\def\XINT_infloat_a #1.#2#3#4%
 {%
-    \xint_gob_til_zero #1\XINT_infloat_res_zero 0\XINT_infloat_res_b #1%
+    \if\romannumeral0\XINT_isone#4XY1\expandafter\XINT_infloat_sp
+    \else\expandafter\XINT_float_fork\fi #3.{#1}{#2}{#4}%
 }%
-\def\XINT_infloat_res_zero #1\XINT_infloat_Q { \XINT_infloat_sp_zero}%
-\def\XINT_infloat_sp_zero #1.{ 0[0]}%
-\def\XINT_infloat_res_b #1/#2%
+\def\XINT_infloat_sp #1%
 {%
-    \xint_UDXINTWfork
-     #2\XINT_infloat_res_ca
-     \XINT_W\XINT_infloat_res_cb
+    \xint_UDzerominusfork
+     #1-\XINT_infloat_spzero
+     0#1\XINT_infloat_spneg
+      0-{\XINT_infloat_sppos #1}%
     \krof
-    #1/#2%
-}%
-\def\XINT_infloat_res_ca #1[#2]/\XINT_W[\XINT_W\XINT_T\XINT_infloat_Q
-   { \XINT_infloat_sp #1.#2.}%
-\def\XINT_infloat_res_cb #1/#2[%
-   {\expandafter\XINT_infloat_res_cc\romannumeral`&&@#2~#1[}%
-\edef\XINT_infloat_res_cc #1~#2[#3]/\XINT_W[\XINT_W\XINT_T
-   {\noexpand\expandafter\space\noexpand\expandafter
-    \noexpand\XINT_infloat_a\noexpand\expandafter
-    {\noexpand\the\numexpr #3}{#2}{#1}}%
-\def\XINT_infloat_sp #1.#2%
-{%
-    \if-#2\xint_dothis{\expandafter-\romannumeral0\XINT_infloat_sp_a {}}\fi
-    \xint_orthat{\XINT_infloat_sp_a #2}#1.%
 }%
-\def\XINT_infloat_sp_a #1#2.#3.%
+\def\XINT_infloat_spzero .#1#2#3#4{ 0[0]}%
+\def\XINT_infloat_spneg
+    {\expandafter\XINT_infloat_spnegend\romannumeral0\XINT_infloat_sppos}%
+\def\XINT_infloat_spnegend #1%
+    {\if#1!\expandafter\XINT_infloat_spneg_needzeros\fi -#1}%
+\def\XINT_infloat_spneg_needzeros -!#1.{!#1.-}%
+\def\XINT_infloat_sppos #1.#2#3#4#5%
 {%
-    \expandafter\XINT_infloat_sp_b\the\numexpr#2-\xintLength{#1#3}.#1#3.#2.%
+    \expandafter\XINT_infloat_sp_b\the\numexpr#2-\xintLength{#1}.#1.#2.#3.%
 }%
 \def\XINT_infloat_sp_b #1%
 {%
     \xint_UDzerominusfork
      #1-\XINT_infloat_sp_quick
      0#1\XINT_infloat_sp_c
-      0-{\XINT_infloat_sp_addzeroes #1}%
+      0-{\XINT_infloat_sp_needzeros #1}%
     \krof
 }%
 \def\XINT_infloat_sp_quick .#1.#2.#3.{ #1[#3]}%
-\def\XINT_infloat_sp_addzeroes #1.#2.#3.#4.%
-{%
-    \expandafter\XINT_infloat_sp_done
-    \the\numexpr #4-#1\expandafter.%
-    \romannumeral0\XINT_dsx_addzerosnofuss {#1}{#2};%
-}%
-\def\XINT_infloat_sp_done #1.#2;{ #2[#1]}%
+\def\XINT_infloat_sp_needzeros #1.#2.#3.#4.{!#1.#2[#4]}%
 \def\XINT_infloat_sp_c #1.#2%
 {%
     \if #29\xint_dothis {\XINT_infloat_sp_d\XINT_infloat_Wb }\fi
@@ -2017,30 +2065,7 @@
 {%
     \expandafter\XINT_infloat_sp_done\the\numexpr #1+#3+#4.#2;%
 }%
-\def\XINT_infloat_a #1.#2#3% #1=P, #2=n, #3=A, #4=B
-{%
-    \XINT_infloat_fork #3\Z {#1}{#2}% #1 = precision, #2=n
-}%
-\def\XINT_infloat_fork #1%
-{%
-    \xint_UDzerominusfork
-     #1-\XINT_infloat_zero
-     0#1\XINT_infloat_J
-      0-{\XINT_float_K #1}%
-    \krof
-}%
-\def\XINT_infloat_zero #1\Z #2#3#4#5{ 0[0]}%
-\def\XINT_infloat_J {\expandafter-\romannumeral0\XINT_float_K }%
-\def\XINT_infloat_Q #1%
-{%
-    \if 1#1\expandafter\XINT_infloat_Ri\else\expandafter\XINT_infloat_Rii\fi
-}%
-\def\XINT_infloat_Ri #1.#2#3%
-{%
-    \expandafter\XINT_infloat_Sa
-    \romannumeral0\XINT_dsx_addzerosnofuss {#1}{#2}\Z {#1}%
-}%
-\def\XINT_infloat_Rii #1.#2#3%
+\def\XINT_infloat_Q #1.#2#3%
 {%
     \expandafter\XINT_infloat_Sa
     \romannumeral0\xintiiquo{\XINT_dsx_addzerosnofuss {#1}{#2}}{#3}\Z {#1}%
@@ -2126,8 +2151,7 @@
     \krof
 }%
 \def\XINT_pfloat_zero #1;#2.{ 0.}%
-\def\XINT_pfloat_neg
-   {\expandafter\xint_minus_thenstop\romannumeral0\XINT_pfloat_pos }%
+\def\XINT_pfloat_neg {\expandafter-\romannumeral0\XINT_pfloat_pos }%
 \def\XINT_pfloat_pos #1e#2;#3.%
 {%
     \ifnum #2>\xint_c_v  \xint_dothis\XINT_pfloat_no\fi
@@ -2174,7 +2198,7 @@
 \def\xintFloatAdd      {\romannumeral0\xintfloatadd }%
 \def\xintfloatadd    #1{\XINT_fladd_chkopt \xintfloat #1\xint_relax }%
 \def\XINTinFloatAdd    {\romannumeral0\XINTinfloatadd }%
-\def\XINTinfloatadd  #1{\XINT_fladd_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatadd  #1{\XINT_fladd_chkopt \XINTinfloatS #1\xint_relax }%
 \def\XINT_fladd_chkopt #1#2%
 {%
     \ifx [#2\expandafter\XINT_fladd_opt
@@ -2217,7 +2241,7 @@
 \def\xintFloatSub      {\romannumeral0\xintfloatsub }%
 \def\xintfloatsub    #1{\XINT_flsub_chkopt \xintfloat #1\xint_relax }%
 \def\XINTinFloatSub    {\romannumeral0\XINTinfloatsub }%
-\def\XINTinfloatsub  #1{\XINT_flsub_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatsub  #1{\XINT_flsub_chkopt \XINTinfloatS #1\xint_relax }%
 \def\XINT_flsub_chkopt #1#2%
 {%
     \ifx [#2\expandafter\XINT_flsub_opt
@@ -2241,7 +2265,7 @@
 \def\xintFloatMul   {\romannumeral0\xintfloatmul   }%
 \def\xintfloatmul   #1{\XINT_flmul_chkopt \xintfloat #1\xint_relax }%
 \def\XINTinFloatMul {\romannumeral0\XINTinfloatmul }%
-\def\XINTinfloatmul #1{\XINT_flmul_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatmul #1{\XINT_flmul_chkopt \XINTinfloatS #1\xint_relax }%
 \def\XINT_flmul_chkopt #1#2%
 {%
     \ifx [#2\expandafter\XINT_flmul_opt
@@ -2252,7 +2276,7 @@
 {%
     #1[\XINTdigits]%
     {\expandafter\XINT_FL_mul_a
-     \romannumeral0\XINTinfloat[\XINTdigits]{#2}\XINTdigits.{#3}}%
+     \romannumeral0\XINTinfloatS[\XINTdigits]{#2}\XINTdigits.{#3}}%
 }%
 \def\XINT_flmul_opt #1[\xint_relax #2]%#3#4%
 {%
@@ -2260,17 +2284,17 @@
 }%
 \def\XINT_flmul_opt_a #1.#2#3#4%
 {%
-    #2[#1]{\expandafter\XINT_FL_mul_a\romannumeral0\XINTinfloat[#1]{#3}#1.{#4}}%
+    #2[#1]{\expandafter\XINT_FL_mul_a\romannumeral0\XINTinfloatS[#1]{#3}#1.{#4}}%
 }%
 \def\XINT_FL_mul_a #1[#2]#3.#4%
 {%
-    \expandafter\XINT_FL_mul_b\romannumeral0\XINTinfloat [#3]{#4}#1[#2]%
+    \expandafter\XINT_FL_mul_b\romannumeral0\XINTinfloatS[#3]{#4}#1[#2]%
 }%
 \def\XINT_FL_mul_b #1[#2]#3[#4]{\xintE{\xintiiMul {#3}{#1}}{#4+#2}}%
 \def\xintFloatDiv   {\romannumeral0\xintfloatdiv   }%
 \def\xintfloatdiv   #1{\XINT_fldiv_chkopt \xintfloat #1\xint_relax }%
 \def\XINTinFloatDiv {\romannumeral0\XINTinfloatdiv }%
-\def\XINTinfloatdiv #1{\XINT_fldiv_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatdiv #1{\XINT_fldiv_chkopt \XINTinfloatS #1\xint_relax }%
 \def\XINT_fldiv_chkopt #1#2%
 {%
     \ifx [#2\expandafter\XINT_fldiv_opt
@@ -2281,7 +2305,7 @@
 {%
     #1[\XINTdigits]%
     {\expandafter\XINT_FL_div_a
-     \romannumeral0\XINTinfloat[\XINTdigits]{#2}\XINTdigits.{#3}}%
+     \romannumeral0\XINTinfloatS[\XINTdigits]{#2}\XINTdigits.{#3}}%
 }%
 \def\XINT_fldiv_opt #1[\xint_relax #2]%#3#4%
 {%
@@ -2289,17 +2313,17 @@
 }%
 \def\XINT_fldiv_opt_a #1.#2#3#4%
 {%
-    #2[#1]{\expandafter\XINT_FL_div_a\romannumeral0\XINTinfloat[#1]{#3}#1.{#4}}%
+    #2[#1]{\expandafter\XINT_FL_div_a\romannumeral0\XINTinfloatS[#1]{#3}#1.{#4}}%
 }%
 \def\XINT_FL_div_a #1[#2]#3.#4%
 {%
-    \expandafter\XINT_FL_div_b\romannumeral0\XINTinfloat[#3]{#4}#1[#2]%
+    \expandafter\XINT_FL_div_b\romannumeral0\XINTinfloatS[#3]{#4}#1[#2]%
 }%
 \def\XINT_FL_div_b #1[#2]#3[#4]{\xintE{#3/#1}{#4-#2}}%
 \def\xintFloatPow   {\romannumeral0\xintfloatpow}%
 \def\xintfloatpow #1{\XINT_flpow_chkopt \xintfloat #1\xint_relax }%
 \def\XINTinFloatPow {\romannumeral0\XINTinfloatpow }%
-\def\XINTinfloatpow #1{\XINT_flpow_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatpow #1{\XINT_flpow_chkopt \XINTinfloatS #1\xint_relax }%
 \def\XINT_flpow_chkopt #1#2%
 {%
     \ifx [#2\expandafter\XINT_flpow_opt
@@ -2452,11 +2476,11 @@
 \def\xintFloatPower   {\romannumeral0\xintfloatpower}%
 \def\xintfloatpower #1{\XINT_flpower_chkopt \xintfloat #1\xint_relax }%
 \def\XINTinFloatPower {\romannumeral0\XINTinfloatpower }%
-\def\XINTinfloatpower #1{\XINT_flpower_chkopt \XINTinfloat #1\xint_relax }%
+\def\XINTinfloatpower #1{\XINT_flpower_chkopt \XINTinfloatS #1\xint_relax }%
 \def\XINTinFloatPowerH {\romannumeral0\XINTinfloatpowerH }%
 \def\XINTinfloatpowerH #1#2%
    {\expandafter\XINT_flpowerh_a \romannumeral0\xinttrunc 1{#2}.0;%
-    \XINTdigits.{#1}{\XINTinfloat[\XINTdigits]}}%
+    \XINTdigits.{#1}{\XINTinfloatS[\XINTdigits]}}%
 \def\XINT_flpowerh_a #1.#2%
 {%
     \ifnum#2>\xint_c_iv\xint_dothis\XINT_flpowerh_b\fi
@@ -2634,8 +2658,8 @@
       0-{\XINT_FL_fac_fork_b #1}%
     \krof
 }%
-\def\XINT_FL_fac_iszero #1.#2#3#4#5{#5{1/1[0]}}%
-\def\XINT_FL_fac_isneg  #1.#2#3#4#5{\expandafter\xintError:FactorialOfNegative #5{0/1[0]}}%
+\def\XINT_FL_fac_iszero #1.#2#3#4#5{#5{1[0]}}%
+\def\XINT_FL_fac_isneg  #1.#2#3#4#5{\expandafter\xintError:FactorialOfNegative #5{0[0]}}%
 \def\XINT_FL_fac_fork_b #1.%
 {%
     \ifnum #1>\xint_c_x^viii_mone\xint_dothis\XINT_FL_fac_toobig\fi
@@ -2645,7 +2669,7 @@
                    \xint_orthat\XINT_FL_fac_small
     #1.%
 }%
-\def\XINT_FL_fac_toobig #1.#2#3#4#5{\expandafter\xintError:TooBigFactorial #5{1/1[0]}}%
+\def\XINT_FL_fac_toobig #1.#2#3#4#5{\expandafter\xintError:TooBigFactorial #5{1[0]}}%
 \def\XINT_FL_fac_vbig
    {\expandafter\XINT_FL_fac_vbigloop_a
     \the\numexpr \XINT_FL_fac_increaseP \xint_c_i   }%
@@ -2850,8 +2874,8 @@
                      \xint_dothis\XINT_FL_pfac_outofrange\fi
     \xint_orthat \XINT_FL_pfac_increaseP #1#2.#3.%
 }%
-\def\XINT_FL_pfac_outofrange #1.#2.#3#4#5{\xintError:OutOfRangePFac #5{0/1[0]}}%
-\def\XINT_FL_pfac_one #1.#2.#3#4#5{#5{1/1[0]}}%
+\def\XINT_FL_pfac_outofrange #1.#2.#3#4#5{\xintError:OutOfRangePFac #5{0[0]}}%
+\def\XINT_FL_pfac_one #1.#2.#3#4#5{#5{1[0]}}%
 \def\XINT_FL_pfac_increaseP #1.#2.#3#4%
 {%
     \expandafter\XINT_FL_pfac_a
@@ -3021,8 +3045,8 @@
     #1#2.#3#4.#5.%
 }%
 \def\XINT_FL_binom_outofrange #1.#2.#3.#4.#5%
-       {\xintError:OutOfRangeBinomial #5[#4]{0/1[0]}}%
-\def\XINT_FL_binom_one #1.#2.#3.#4.#5{#5[#4]{1/1[0]}}%
+       {\xintError:OutOfRangeBinomial #5[#4]{0[0]}}%
+\def\XINT_FL_binom_one #1.#2.#3.#4.#5{#5[#4]{1[0]}}%
 \def\XINT_FL_binom_aa  #1.#2.#3.#4.#5%
 {%
     #5[#4]{\xintDiv{\XINT_FL_pfac_increaseP
@@ -3107,7 +3131,11 @@
 }%
 \def\XINT_flsqrt_finish #1#2.#3.#4.#5.#6.#7.#8{#8[#6]{#3#1[#7]}}%
 \def\XINT_flsqrt_f 5#1.%
-   {\xintiiifGt{\xintiNum{#1}}{2}{\XINT_flsqrt_finish 5.}{\XINT_flsqrt_again}}%
+   {\expandafter\XINT_flsqrt_g\romannumeral0\xintinum{#1}\relax.}%
+\def\XINT_flsqrt_g #1#2#3.{\if\relax#2\xint_dothis{\XINT_flsqrt_h #1}\fi
+                           \xint_orthat{\XINT_flsqrt_finish 5.}}%
+\def\XINT_flsqrt_h #1{\ifnum #1<\xint_c_iii\xint_dothis{\XINT_flsqrt_again}\fi
+                      \xint_orthat{\XINT_flsqrt_finish 5.}}%
 \def\XINT_flsqrt_again #1.#2.%
 {%
     \expandafter\XINT_flsqrt_again_a\the\numexpr #2+\xint_c_viii.%
-- 
cgit v1.2.3

