diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintfrac.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintfrac.sty | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty index 09b2c87192d..11d4185c722 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.3d 2019/01/06 +%% The xint bundle 1.3e 2019/04/05 %% Copyright (C) 2013-2019 by Jean-Francois Burnol %% xintfrac: Expandable operations on fractions %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintfrac}% - [2019/01/06 1.3d Expandable operations on fractions (JFB)]% + [2019/04/05 1.3e Expandable operations on fractions (JFB)]% \def\XINT_cntSgnFork #1% {% \ifcase #1\expandafter\xint_secondofthree @@ -397,6 +397,41 @@ \expandafter\XINT_raw\romannumeral0\XINT_infrac }% \def\XINT_raw #1#2#3{ #2/#3[#1]}% +\def\xintiLogTen {\the\numexpr\xintilogten}% +\def\xintilogten +{% + \expandafter\XINT_ilogten\romannumeral0\xintraw +}% +\def\XINT_ilogten #1% +{% + \xint_UDzerominusfork + 0#1\XINT_ilogten_p + #1-\XINT_ilogten_z + 0-{\XINT_ilogten_p#1}% + \krof +}% +\def\XINT_ilogten_z #1[#2]{-"7FFF8000\relax}% +\def\XINT_ilogten_p #1/#2[#3]% +{% + #3+\expandafter\XINT_ilogten_a + \the\numexpr\xintLength{#1}\expandafter.\the\numexpr\xintLength{#2}.#1.#2.% +}% +\def\XINT_ilogten_a #1.#2.% +{% + #1-#2\ifnum#1>#2 + \expandafter\XINT_ilogten_aa + \else + \expandafter\XINT_ilogten_ab + \fi #1.#2.% +}% +\def\XINT_ilogten_aa #1.#2.#3.#4.% +{% + \xintiiifLt{#3}{\XINT_dsx_addzerosnofuss{#1-#2}#4;}{-1}{}\relax +}% +\def\XINT_ilogten_ab #1.#2.#3.#4.% +{% + \xintiiifLt{\XINT_dsx_addzerosnofuss{#2-#1}#3;}{#4}{-1}{}\relax +}% \def\xintPRaw {\romannumeral0\xintpraw }% \def\xintpraw {% @@ -1902,6 +1937,17 @@ \def\XINT_infloatS_clean #1% {\if #1!\xint_dothis\XINT_infloatS_clean_a\fi\xint_orthat{ }#1}% \def\XINT_infloatS_clean_a !#1.{ }% +\def\XINTFloatiLogTen {\the\numexpr\XINTfloatilogten}% +\def\XINTfloatilogten [#1]#2% + {\expandafter\XINT_floatilogten\romannumeral0\XINT_infloat[#1]{#2}#1.}% +\def\XINT_floatilogten #1{% + \if #10\xint_dothis\XINT_floatilogten_z\fi + \if #1!\xint_dothis\XINT_floatilogten_a\fi + \xint_orthat\XINT_floatilogten_b #1% +}% +\def\XINT_floatilogten_z 0[0]#1.{-"7FFF8000\relax}% +\def\XINT_floatilogten_a !#1.#2[#3]#4.{#3-#1+#4-1\relax}% +\def\XINT_floatilogten_b #1[#2]#3.{#2+#3-1\relax}% \def\XINT_infloat [#1]#2% {% \expandafter\XINT_infloat_a\the\numexpr #1\expandafter.% @@ -2255,6 +2301,7 @@ \expandafter\XINT_FL_mul_b\romannumeral0\XINTinfloatS[#3]{#4}#1[#2]% }% \def\XINT_FL_mul_b #1[#2]#3[#4]{\xintiiMul{#3}{#1}/1[#4+#2]}% +\def\XINTinFloatInv#1{\XINTinFloatS[\XINTdigits]{\xintInv{#1}}}% \def\xintFloatDiv {\romannumeral0\xintfloatdiv }% \def\xintfloatdiv #1{\XINT_fldiv_chkopt \xintfloat #1\xint:}% \def\XINTinFloatDiv {\romannumeral0\XINTinfloatdiv }% @@ -2609,7 +2656,7 @@ \def\xintFloatFac {\romannumeral0\xintfloatfac}% \def\xintfloatfac #1{\XINT_flfac_chkopt \xintfloat #1\xint:}% \def\XINTinFloatFac {\romannumeral0\XINTinfloatfac }% -\def\XINTinfloatfac #1{\XINT_flfac_chkopt \XINTinfloat #1\xint:}% +\def\XINTinfloatfac #1{\XINT_flfac_chkopt \XINTinfloatS #1\xint:}% \def\XINT_flfac_chkopt #1#2% {% \ifx [#2\expandafter\XINT_flfac_opt |