diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-25 20:47:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-25 20:47:20 +0000 |
commit | d1507916f400b950db2725667d3c96fa05fffbd5 (patch) | |
tree | 303c870cb6761a334f70dc5d0812a50ca2b67f81 /Master/texmf-dist/tex | |
parent | c42cae68d2e7deb3b18968354a3e1dec03e2da77 (diff) |
xint (25may21)
git-svn-id: svn://tug.org/texlive/trunk@59343 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xint.sty | 25 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintbinhex.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintcfrac.sty | 10 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintcore.sty | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintexpr.sty | 384 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintfrac.sty | 95 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintgcd.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintkernel.sty | 53 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintlog.sty | 11 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xintseries.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xinttools.sty | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/xint/xinttrig.sty | 6 |
12 files changed, 375 insertions, 261 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty index 524b2891bfb..d2f25f65365 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 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}% - [2021/05/10 v1.4f Expandable operations on big integers (JFB)]% + [2021/05/25 v1.4g 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}% @@ -757,8 +757,9 @@ \krof #1% }% \def\XINT_sqrt_iszero #1\xint:{{1}{1}}% -\def\XINT_sqrt_isneg #1\xint:{\XINT_signalcondition{InvalidOperation}{square - root of negative: #1}{}{{0}{0}}}% +\def\XINT_sqrt_isneg #1\xint: + {\XINT_signalcondition{InvalidOperation}% + {Square root of negative: #1.}{}{{0}{0}}}% \def\XINT_sqrt #1\xint: {% \expandafter\XINT_sqrt_start\romannumeral0\xintlength {#1}.#1.% @@ -1047,15 +1048,15 @@ }% \def\XINT_binom_fork #1#2.#3#4.#5#6.% {% - \if-#5\xint_dothis{\XINT_signalcondition{InvalidOperation}{Binomial with - negative first arg: #5#6}{}{0}}\fi + \if-#5\xint_dothis{\XINT_signalcondition{InvalidOperation}% + {Binomial with negative first argument: #5#6.}{}{ 0}}\fi \if-#1\xint_dothis{ 0}\fi \if-#3\xint_dothis{ 0}\fi \if0#1\xint_dothis{ 1}\fi \if0#3\xint_dothis{ 1}\fi \ifnum #5#6>\xint_c_x^viii_mone\xint_dothis - {\XINT_signalcondition{InvalidOperation}{Binomial with too - large argument: 99999999 < #5#6}{}{0}}\fi + {\XINT_signalcondition{InvalidOperation}% + {Binomial with too large argument: #5#6 >= 10^8.}{}{ 0}}\fi \ifnum #1#2>#3#4 \xint_dothis{\XINT_binom_a #1#2.#3#4.}\fi \xint_orthat{\XINT_binom_a #3#4.#1#2.}% }% @@ -1301,8 +1302,8 @@ \xint_orthat \XINT_pfac_a #1#2.#3#4.% }% \def\XINT_pfac_outofrange #1.#2.% - {\XINT_signalcondition{InvalidOperation}{PFactorial with - too big second arg: 99999999 < #2}{}{0}}% + {\XINT_signalcondition{InvalidOperation}% + {pFactorial with too large argument: #2 >= 10^8.}{}{ 0}}% \def\XINT_pfac_one #1.#2.{ 1}% \def\XINT_pfac_zero #1.#2.{ 0}% \def\XINT_pfac_neg -#1.-#2.% @@ -1637,13 +1638,13 @@ \def\xintrandomdigits#1% {% \XINT_expandableerror - {No uniformdeviate at engine level, returning 0.} 0% + {No uniformdeviate at engine level.} 0% }% \let\xintXRandomDigits\xintRandomDigits \def\XINT_randrange#1\xint: {% \XINT_expandableerror - {No uniformdeviate at engine level, returning 0.} 0% + {No uniformdeviate at engine level.} 0% }% \fi \XINTrestorecatcodesendinput% diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty index 392eabd0adf..f7ba49f2cb8 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintbinhex: Expandable binary and hexadecimal conversions %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintbinhex}% - [2021/05/10 v1.4f Expandable binary and hexadecimal conversions (JFB)]% + [2021/05/25 v1.4g 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 \def\XINT_tmpa #1{\ifx\relax#1\else diff --git a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty index a41f9d4092c..116a65eba1c 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintcfrac: Expandable continued fractions with xint package %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcfrac}% - [2021/05/10 v1.4f Expandable continued fractions with xint package (JFB)]% + [2021/05/25 v1.4g Expandable continued fractions with xint package (JFB)]% \def\xintCFrac {\romannumeral0\xintcfrac }% \def\xintcfrac #1% {% @@ -185,14 +185,14 @@ {% \XINT_gcfrac_T #2#3#1!!% }% -\def\XINT_gcfrac_T #1#2#3#4{\XINT_gcfrac_U #1#2{\xintFrac{#4}}}% +\def\XINT_gcfrac_T #1#2#3#4{\XINT_gcfrac_U #1#2{\xintTeXFrac{#4}}}% \def\XINT_gcfrac_U #1#2#3#4#5% {% \xint_gob_til_exclam #5\XINT_gcfrac_end!\XINT_gcfrac_U - #1#2{\xintFrac{#5}% + #1#2{\xintTeXFrac{#5}% \ifcase\xintSgn{#4} +\or+\else-\fi - \cfrac{#1\xintFrac{\xintAbs{#4}}#2}{#3}}% + \cfrac{#1\xintTeXFrac{\xintAbs{#4}}#2}{#3}}% }% \def\XINT_gcfrac_end!\XINT_gcfrac_U #1#2#3% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintcore.sty b/Master/texmf-dist/tex/generic/xint/xintcore.sty index 0eedc381203..2923229de10 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintcore: Expandable arithmetic on big integers %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintcore}% - [2021/05/10 v1.4f Expandable arithmetic on big integers (JFB)]% + [2021/05/25 v1.4g Expandable arithmetic on big integers (JFB)]% \csname XINT_Clamped_istrapped\endcsname \csname XINT_ConversionSyntax_istrapped\endcsname \csname XINT_DivisionByZero_istrapped\endcsname @@ -98,16 +98,15 @@ \xint_dothis{\csname XINT_#2.handler\endcsname {#4}}% \fi \xint_orthat{% - % the flag raised is named after the signal #1, but we show condition #2 - \XINT_expandableerror{#2 (hit <RET> thrice)}% + % the flag raised is named after the signal #1, but we show condition + % #2 \XINT_expandableerror{#3}% - \XINT_expandableerror{next: #5}% % not for X3.274 %\XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}% - \xint_stop_atfirstofone{#5}% + \xint_firstofone{#5}% }% }% -%% \let\xintUse\xint_stop_atfirstofthree % defined in xint.sty +%% \def\xintUse{\xint_firstofthree} % defined in xint.sty \def\XINT_ifFlagRaised #1{% \ifcsname XINT_#1Flag_ON\endcsname \expandafter\xint_firstoftwo @@ -1186,7 +1185,7 @@ \def\XINT_iidivision_divbyzero#1#2#3\xint:#4\xint: {\if0#1\xint_dothis{\XINT_signalcondition{DivisionUndefined}}\fi \xint_orthat{\XINT_signalcondition{DivisionByZero}}% - {Division of #1#4 by #2#3}{}{{0}{0}}}% + {Division by zero: #1#4/#2#3.}{}{{0}{0}}}% \def\XINT_iidivision_aiszero #1\xint:#2\xint:{{0}{0}}% \def\XINT_iidivision_bneg #1% q->-q, r unchanged {\expandafter{\romannumeral0\XINT_opp #1}}% @@ -1782,7 +1781,7 @@ \xint_orthat{\XINT_iidivround_bpos #1#2}% }% \def\XINT_iidivround_divbyzero #1#2#3\xint:#4\xint: - {\XINT_signalcondition{DivisionByZero}{Division of #1#4 by #2#3}{}{0}}% + {\XINT_signalcondition{DivisionByZero}{Division by zero: #1#4/#2#3.}{}{ 0}}% \def\XINT_iidivround_aiszero #1\xint:#2\xint:{ 0}% \def\XINT_iidivround_bpos #1% {% @@ -1878,7 +1877,7 @@ }% \def\XINT_iidivmod_divbyzero #1#2\xint:#3\xint: {% - \XINT_signalcondition{DivisionByZero}{Division by #2 of #1#3}{}% + \XINT_signalcondition{DivisionByZero}{Division by zero: #1#3/#2.}{}% {{0}{0}}% à revoir... }% \def\XINT_iidivmod_aiszero #1\xint:#2\xint:{{0}{0}}% @@ -1967,7 +1966,7 @@ \xint_afterfi { 0}% \else \xint_afterfi - {\XINT_signalcondition{DivisionByZero}{Zero to power #1}{}{0}}% + {\XINT_signalcondition{DivisionByZero}{0 raised to power #1.}{}{ 0}}% \fi }% \def\XINT_pow_Aneg #1% @@ -2003,8 +2002,8 @@ \fi {#1}% }% -\def\XINT_pow_BisNegative #1\xint:{\XINT_signalcondition{Underflow}{Inverse power - can not be represented by an integer}{}{0}}% +\def\XINT_pow_BisNegative #1\xint:{\XINT_signalcondition{Underflow}% + {Inverse power is not an integer.}{}{ 0}}% \def\XINT_pow_BisZero #1\xint:{ 1}% \def\XINT_pow_I_in #1#2\xint: {% @@ -2094,7 +2093,7 @@ }% \def\XINT_fac_zero #1.{ 1}% \def\XINT_fac_neg #1.{\XINT_signalcondition{InvalidOperation}{Factorial of - negative: (#1)!}{}{0}}% + negative argument: #1.}{}{ 0}}% \def\XINT_fac_checksize #1.% {% \ifnum #1>\xint_c_x^iv \xint_dothis{\XINT_fac_toobig #1.}\fi @@ -2103,8 +2102,9 @@ \xint_orthat{\XINT_fac_smallloop_a #1.\XINT_mul_out}% 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W }% -\def\XINT_fac_toobig #1.#2\W{\XINT_signalcondition{InvalidOperation}{Factorial - of too big argument: #1 > 10000}{}{0}}% +\def\XINT_fac_toobig +#1.#2\W{\XINT_signalcondition{InvalidOperation}{Factorial + argument is too large: #1 > 10^4.}{}{ 0}}% \def\XINT_fac_bigloop_a #1.% {% \expandafter\XINT_fac_bigloop_b \the\numexpr diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty index 80c3dad219e..b53ef400869 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintexpr: Expandable expression parser %% --------------------------------------------------------------- @@ -82,7 +82,7 @@ \XINTsetupcatcodes% \XINT_providespackage \ProvidesPackage{xintexpr}% - [2021/05/10 v1.4f Expandable expression parser (JFB)]% + [2021/05/25 v1.4g Expandable expression parser (JFB)]% \catcode`! 11 \let\XINT_Cmp \xintiiCmp \def\XINTfstop{\noexpand\XINTfstop}% @@ -395,7 +395,7 @@ \def\xint_gob_til_! #1!{}% ! with catcode 11 \def\xintError:noopening {% - \XINT_expandableerror{Extra ) found during balancing, e(X)it before the worst.}% + \XINT_expandableerror{Extra ). This is serious and prospects are bleak.}% }% \def\xintthecoords#1% {\romannumeral`&&@\expandafter\XINT_thecoords_a\romannumeral0#1}% @@ -457,8 +457,9 @@ \def\XINT_expr_countetc\XINT_expr_getnextfork#1% {% \if0\ifx\count#11\fi - \ifx\dimen#11\fi \ifx\numexpr#11\fi + \ifx\catcode#11\fi + \ifx\dimen#11\fi \ifx\dimexpr#11\fi \ifx\skip#11\fi \ifx\glueexpr#11\fi @@ -469,7 +470,8 @@ \ifx\fontcharht#11\fi \ifx\fontcharwd#11\fi \ifx\fontchardp#11\fi - \ifx\fontcharic#11\fi 0\expandafter\XINT_expr_fetch_as_number\fi + \ifx\fontcharic#11\fi + 0\expandafter\XINT_expr_fetch_as_number\fi \expandafter\XINT_expr_getnext_a\number #1% }% \def\XINT_expr_fetch_as_number @@ -477,34 +479,59 @@ {% \expanded{{{\number#1}}\expandafter}\romannumeral`&&@\XINT_expr_getop }% -\begingroup -\lccode`;=`# -\lowercase{\endgroup -\def\XINT_expr_getnextfork #1{% - \if#1;\xint_dothis {\XINT_expr_scan_macropar ;}\fi - \if#1+\xint_dothis \XINT_expr_getnext_a \fi +\def\XINT_expr_getnextfork #1% +{% + \ifcat a#1\xint_dothis\XINT_expr_startfunc\fi + \ifnum \xint_c_ix<1\string#1 \xint_dothis\XINT_expr_startint\fi + \xint_orthat\XINT_expr_getnextfork_a #1% +}% +\def\XINT_expr_getnextfork_a #1% +{% \if#1*\xint_dothis {{}\xint_c_ii^v 0}\fi \if#1[\xint_dothis {{}\xint_c_ii^v \XINT_expr_itself_obracket}\fi - \if#1.\xint_dothis {\XINT_expr_startdec}\fi \if#1-\xint_dothis {{}{}-}\fi + \if#1@\xint_dothis{\XINT_expr_startfunc @}\fi \if#1(\xint_dothis {{}\xint_c_ii^v (}\fi - \xint_orthat {\XINT_expr_scan_nbr_or_func #1}% -}}% -\def\XINT_expr_scan_macropar #1#2% + \xint_orthat{\XINT_expr_getnextfork_b#1}% +}% +\catcode96 11 % ` +\def\XINT_expr_getnextfork_b #1% +{% + \if#1+\xint_dothis \XINT_expr_getnext_a\fi + \if#1.\xint_dothis \XINT_expr_startdec\fi + \if#1`\xint_dothis {\XINT_expr_onliteral_`}\fi + \if#1!\xint_dothis {\XINT_expr_startfunc !}\fi + \if#1?\xint_dothis {\XINT_expr_startfunc ?}\fi + \if#1"\xint_dothis \XINT_expr_starthex\fi + \xint_orthat{\XINT_expr_getnextfork_c#1}% +}% +\def\XINT_tmpa #1{% +\def\XINT_expr_getnextfork_c ##1% +{% + \if##1#1\xint_dothis \XINT_expr_getmacropar\fi + \if##1_\xint_dothis \XINT_expr_getnext_a\fi + \if0\if##1/1\fi\if##1^1\fi0\xint_dothis{\XINT_expr_insertnil##1}\fi + \xint_orthat{\XINT_expr_missing_arg##1}% +}% +}\expandafter\XINT_tmpa\string#% +\def\XINT_expr_onliteral_` #1#2({{#1}\xint_c_ii^v `}% +\catcode96 12 % ` +\def\XINT_tmpa #1{% +\def\XINT_expr_getmacropar ##1% {% \expandafter{\expandafter{\expandafter#1\expandafter - #2\expandafter}\expandafter}\romannumeral`&&@\XINT_expr_getop + ##1\expandafter}\expandafter}\romannumeral`&&@\XINT_expr_getop }% -\catcode96 11 % ` -\def\XINT_expr_scan_nbr_or_func #1% +}\expandafter\XINT_tmpa\string#% +\def\XINT_expr_insertnil #1% {% - \if "#1\xint_dothis \XINT_expr_scanhex_I\fi - \if `#1\xint_dothis {\XINT_expr_onliteral_`}\fi - \ifnum \xint_c_ix<1\string#1 \xint_dothis \XINT_expr_startint\fi - \xint_orthat \XINT_expr_scanfunc #1% + \expandafter{\expandafter}\romannumeral`&&@\XINT_expr_getop_a#1% +}% +\def\XINT_expr_missing_arg#1% +{% + \expanded{\XINT_expandableerror{Expected a value, got nothing before `#1'. Inserting 0.}{{0}}\expandafter}% + \romannumeral`&&@\XINT_expr_getop_a#1% }% -\def\XINT_expr_onliteral_` #1#2#3({{#2}\xint_c_ii^v `}% -\catcode96 12 % ` \def\XINT_expr_startint #1% {% \if #10\expandafter\XINT_expr_gobz_a\else\expandafter\XINT_expr_scanint_a\fi #1% @@ -530,7 +557,7 @@ }% \def\XINT_expr_scanint_hit_cs \ifnum#1\fi#2\XINT_expr_scanint_again {% - \iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#2% + \iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#2% }% \def\XINT_expr_scanint_next #1\XINT_expr_scanint_again {% @@ -540,7 +567,7 @@ \if E#1\xint_dothis{[\the\numexpr0\XINT_expr_scanexp_a +}\fi \if .#1\xint_dothis{\XINT_expr_startdec_a .}\fi \xint_orthat - {\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#1}% + {\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#1}% }% \def\XINT_expr_rawxintfrac {% @@ -558,7 +585,7 @@ }% \def\XINT_expr_gobz_scanint_hit_cs\ifnum#1\fi#2\XINT_expr_scanint_again {% - 0\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#2% + 0\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#2% }% \def\XINT_expr_gobz_scanint_next #1\XINT_expr_scanint_again {% @@ -569,7 +596,7 @@ \if .#1\xint_dothis{\XINT_expr_gobz_startdec_a .}\fi \if 0#1\xint_dothis\XINT_expr_gobz_scanint_again\fi \xint_orthat - {0\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#1}% + {0\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#1}% }% \def\XINT_expr_startdec_a .#1% {% @@ -578,7 +605,7 @@ \def\XINT_expr_scandec_a #1% {% \if .#1\xint_dothis{\iffalse{{{\fi}}\expandafter}% - \romannumeral`&&@\XINT_expr_getop..}\fi + \romannumeral`&&@\XINT_expr_getop_a..}\fi \xint_orthat {\XINT_expr_scandec_main 0.#1}% }% \def\XINT_expr_gobz_startdec_a .#1% @@ -588,7 +615,7 @@ \def\XINT_expr_gobz_scandec_a #1% {% \if .#1\xint_dothis - {0\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop..}\fi + {0\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a..}\fi \xint_orthat {\XINT_expr_gobz_scandec_main 0.#1}% }% \def\XINT_expr_scandec_main #1.#2% @@ -605,7 +632,7 @@ \def\XINT_expr_scandec_hit_cs\ifnum#1\fi #2\expandafter\XINT_expr_scandec_again\the\numexpr#3-\xint_c_i.% {% - [#3]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#2% + [#3]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#2% }% \def\XINT_expr_scandec_next #1#2\the\numexpr#3-\xint_c_i.% {% @@ -613,7 +640,7 @@ \if e#1\xint_dothis{[\the\numexpr#3\XINT_expr_scanexp_a +}\fi \if E#1\xint_dothis{[\the\numexpr#3\XINT_expr_scanexp_a +}\fi \xint_orthat - {[#3]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#1}% + {[#3]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#1}% }% \def\XINT_expr_gobz_scandec_main #1.#2% {% @@ -625,7 +652,7 @@ }% \def\XINT_expr_gobz_scandec_hit_cs \ifnum#1\fi\if0#2#3\xint_c_i.% {% - 0[0]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#2% + 0[0]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#2% }% \def\XINT_expr_gobz_scandec_next\if0#1#2\fi #3\numexpr#4-\xint_c_i.% {% @@ -633,7 +660,7 @@ \if e#1\xint_dothis{0[\the\numexpr0\XINT_expr_scanexp_a +}\fi \if E#1\xint_dothis{0[\the\numexpr0\XINT_expr_scanexp_a +}\fi \xint_orthat - {0[0]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#1}% + {0[0]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#1}% }% \def\XINT_expr_scanexp_a #1#2% {% @@ -651,7 +678,7 @@ }% \def\XINT_expr_scanexp_hit_cs\ifnum#1\fi#2\XINT_expr_scanexp_again {% - ]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#2% + ]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#2% }% \def\XINT_expr_scanexp_next #1\XINT_expr_scanexp_again {% @@ -659,7 +686,7 @@ \if +#1\xint_dothis {\XINT_expr_scanexp_a +}\fi \if -#1\xint_dothis {\XINT_expr_scanexp_a -}\fi \xint_orthat - {]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#1}% + {]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#1}% }% \def\XINT_expr_scanexp_main_b #1% {% @@ -669,7 +696,7 @@ }% \def\XINT_expr_scanexp_hit_cs_b\ifnum#1\fi#2\XINT_expr_scanexp_again_b {% - ]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#2% + ]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#2% }% \def\XINT_expr_scanexp_again_b #1% {% @@ -679,7 +706,7 @@ {% \if _#1\xint_dothis\XINT_expr_scanexp_again\fi \xint_orthat - {]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop#1}% + {]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#1}% }% \def\XINT_expr_hex_in #1.#2#3;% {% @@ -690,14 +717,48 @@ [\the\numexpr-4*\xintLength{#3}]% \fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop }% -\def\XINT_expr_scanhex_I #1% #1=" +\def\XINT_expr_starthex #1% +{% + \expandafter\XINT_expr_hex_in\expanded\bgroup + \expandafter\XINT_expr_scanhexIgobz_a\romannumeral`&&@#1% +}% +\def\XINT_expr_scanhexIgobz_a #1% {% - \expandafter\XINT_expr_hex_in\expanded\bgroup\XINT_expr_scanhexI_a + \ifcat #1\relax + 0.>;\iffalse{\fi\expandafter}\expandafter\xint_gobble_i\fi + \XINT_expr_scanhexIgobz_aa #1% +}% +\def\XINT_expr_scanhexIgobz_aa #1% +{% + \if\ifnum`#1>`0 + \ifnum`#1>`9 + \ifnum`#1>`@ + \ifnum`#1>`F + 0\else1\fi\else0\fi\else1\fi\else0\fi 1% + \xint_dothis\XINT_expr_scanhexI_b + \fi + \if 0#1\xint_dothis\XINT_expr_scanhexIgobz_bgob\fi + \if _#1\xint_dothis\XINT_expr_scanhexIgobz_bgob\fi + \if .#1\xint_dothis\XINT_expr_scanhexIgobz_toII\fi + \xint_orthat + {\XINT_expandableerror + {Expected an hexadecimal digit but got `#1'. Using `0'.}% + 0.>;\iffalse{\fi}}% + #1% +}% +\def\XINT_expr_scanhexIgobz_bgob #1#2% +{% + \expandafter\XINT_expr_scanhexIgobz_a\romannumeral`&&@#2% +}% +\def\XINT_expr_scanhexIgobz_toII .#1% +{% + 0..\expandafter\XINT_expr_scanhexII_a\romannumeral`&&@#1% }% \def\XINT_expr_scanhexI_a #1% {% - \ifcat #1\relax\xint_dothis{.>;\iffalse{\fi}#1}\fi - \xint_orthat {\XINT_expr_scanhexI_aa #1}% + \ifcat #1\relax + .>;\iffalse{\fi\expandafter}\expandafter\xint_gobble_i\fi + \XINT_expr_scanhexI_aa #1% }% \def\XINT_expr_scanhexI_aa #1% {% @@ -709,8 +770,8 @@ \expandafter\XINT_expr_scanhexI_b \else \if _#1\xint_dothis{\expandafter\XINT_expr_scanhexI_bgob}\fi - \if .#1\xint_dothis{\expandafter\XINT_expr_scanhex_transition}\fi - \xint_orthat {\xint_afterfi {.>;\iffalse{\fi}}}% + \if .#1\xint_dothis{\expandafter\XINT_expr_scanhexI_toII}\fi + \xint_orthat {.>;\iffalse{\fi\expandafter}}% \fi #1% }% @@ -722,10 +783,9 @@ {% \expandafter\XINT_expr_scanhexI_a\romannumeral`&&@#2% }% -\def\XINT_expr_scanhex_transition .#1% +\def\XINT_expr_scanhexI_toII .#1% {% - \expandafter.\expandafter.\expandafter - \XINT_expr_scanhexII_a\romannumeral`&&@#1% + ..\expandafter\XINT_expr_scanhexII_a\romannumeral`&&@#1% }% \def\XINT_expr_scanhexII_a #1% {% @@ -742,7 +802,7 @@ \expandafter\XINT_expr_scanhexII_b \else \if _#1\xint_dothis{\expandafter\XINT_expr_scanhexII_bgob}\fi - \xint_orthat{\xint_afterfi {;\iffalse{\fi}}}% + \xint_orthat{;\iffalse{\fi\expandafter}}% \fi #1% }% @@ -754,15 +814,7 @@ {% \expandafter\XINT_expr_scanhexII_a\romannumeral`&&@#2% }% -\def\XINT_expr_scanfunc #1% -{% - \if 1\ifcat a#10\fi\if @#10\fi\if !#10\fi\if ?#10\fi 1% - \expandafter\xint_firstoftwo - \else\expandafter\xint_secondoftwo - \fi - {\expandafter{\expandafter}\romannumeral`&&@\XINT_expr_getop#1}% - {\expandafter\XINT_expr_func\expanded\bgroup#1\XINT_expr_scanfunc_a}% -}% +\def\XINT_expr_startfunc #1{\expandafter\XINT_expr_func\expanded\bgroup#1\XINT_expr_scanfunc_a}% \def\XINT_expr_scanfunc_a #1% {% \expandafter\XINT_expr_scanfunc_b\romannumeral`&&@#1% @@ -800,8 +852,10 @@ }% }% \def\XINT_expr_unknown_function #1% - {\XINT_expandableerror{"#1" is unknown as function. (I)nsert correct name:}}% + {\XINT_expandableerror{`#1' is unknown, say `Isome_func' or I use 0.}}% \def\XINT_expr_func_ #1#2#3{#1#2{{0}}}% +\let\XINT_flexpr_func_\XINT_expr_func_ +\let\XINT_iiexpr_func_\XINT_expr_func_ \xintFor #1 in {expr,flexpr,iiexpr} \do {% \expandafter\XINT_tmpa \csname XINT_#1_op_`\expandafter\endcsname @@ -810,18 +864,19 @@ }% \def\XINT_expr_op__ #1% op__ with two _'s {% - \ifcsname XINT_expr_var_#1\endcsname - \expandafter\expandafter\expandafter\XINT_expr_getop_legacy - \csname XINT_expr_var_#1\expandafter\endcsname - \else - \expandafter\expandafter\expandafter\XINT_expr_getop_legacy - \csname XINT_expr_var_\XINT_expr_unknown_variable {#1}% - \expandafter\endcsname - \fi + \ifcsname XINT_expr_onliteral_#1\endcsname + \csname XINT_expr_var_#1\expandafter\endcsname + \romannumeral`&&@\expandafter\XINT_expr_getop + \else + \expandafter\expandafter\expandafter\XINT_expr_getop_legacy + \csname XINT_expr_var_% + \ifcsname XINT_expr_var_#1\endcsname#1\else\XINT_expr_unknown_variable{#1}\fi + \expandafter\endcsname + \fi }% \def\XINT_expr_unknown_variable #1% - {\XINT_expandableerror {"#1" is unknown as a variable. (I)nsert correct one:}}% -\def\XINT_expr_var_{{0}}% + {\XINT_expandableerror {`#1' unknown, say `Isome_var' or I use 0.}}% +\def\XINT_expr_var_{{{0}}}% \let\XINT_flexpr_op__ \XINT_expr_op__ \let\XINT_iiexpr_op__ \XINT_expr_op__ \def\XINT_expr_getop_legacy #1% @@ -839,24 +894,24 @@ \ifcat \relax #1\xint_dothis\xint_secondofthree\fi \ifnum\xint_c_ix<1\string#1 \xint_dothis\xint_secondofthree\fi \if :#1\xint_dothis \xint_thirdofthree\fi - \if _#1\xint_dothis \xint_secondofthree\fi \if @#1\xint_dothis \xint_secondofthree\fi \if (#1\xint_dothis \xint_secondofthree\fi %) \ifcat a#1\xint_dothis \xint_secondofthree\fi \xint_orthat \xint_thirdofthree - {\XINT_expr_foundend}% - {\XINT_expr_precedence_*** *#1}% - {\expandafter\XINT_expr_getop_b \string#1}% + \xint_c_ + {\XINT_expr_prec_tacit *}% + \XINT_expr_getop_b + #1% }% \catcode`* 12 \def\XINT_expr_foundend {\xint_c_ \relax}% -\def\XINT_expr_getop_b #1% +\def\XINT_expr_getop_b#1{\def\XINT_expr_getop_b ##1% {% - \if &&@#1\xint_dothis{\csname XINT_expr_precedence_&&@\endcsname&&@}\fi - \if '#1\xint_dothis{\XINT_expr_binopwrd }\fi - \if ?#1\xint_dothis{\XINT_expr_precedence_? ?}\fi - \xint_orthat {\XINT_expr_scanop_a #1}% -}% + \if &&@##1\xint_dothis{#1&&@}\fi + \if '##1\xint_dothis{\XINT_expr_binopwrd }\fi + \if ?##1\xint_dothis{\XINT_expr_precedence_? ?}\fi + \xint_orthat {\XINT_expr_scanop_a ##1}% +}}\expandafter\XINT_expr_getop_b\csname XINT_expr_precedence_&&@\endcsname \def\XINT_expr_binopwrd #1'% {% \expandafter\XINT_expr_foundop_a @@ -868,23 +923,25 @@ }% \def\XINT_expr_scanop_b #1#2% {% - \ifcat#2\relax\xint_dothis{\XINT_expr_foundop_a #1#2}\fi - \ifcsname XINT_expr_itself_#1#2\endcsname - \xint_dothis - {\expandafter\XINT_expr_scanop_c\csname XINT_expr_itself_#1#2\endcsname}\fi - \xint_orthat {\XINT_expr_foundop_a #1#2}% + \unless\ifcat#2\relax + \ifcsname XINT_expr_itself_#1#2\endcsname + \XINT_expr_scanop_c + \fi\fi + \XINT_expr_foundop_a #1#2% }% -\def\XINT_expr_scanop_c #1#2% +\def\XINT_expr_scanop_c #1#2#3#4#5% #1#2=\fi\fi {% - \expandafter\XINT_expr_scanop_d\expandafter#1\romannumeral`&&@#2% + #1#2% + \expandafter\XINT_expr_scanop_d\csname XINT_expr_itself_#4#5\expandafter\endcsname + \romannumeral`&&@% }% \def\XINT_expr_scanop_d #1#2% {% - \ifcat#2\relax \xint_dothis{\XINT_expr_foundop #1#2}\fi - \ifcsname XINT_expr_itself_#1#2\endcsname - \xint_dothis - {\expandafter\XINT_expr_scanop_c\csname XINT_expr_itself_#1#2\endcsname }\fi - \xint_orthat {\csname XINT_expr_precedence_#1\endcsname #1#2}% + \unless\ifcat#2\relax + \ifcsname XINT_expr_itself_#1#2\endcsname + \XINT_expr_scanop_c + \fi\fi + \XINT_expr_foundop #1#2% }% \def\XINT_expr_foundop_a #1% {% @@ -892,10 +949,10 @@ \csname XINT_expr_precedence_#1\expandafter\endcsname \expandafter #1% \else - \xint_afterfi{\XINT_expr_getop\romannumeral0% - \XINT_expandableerror - {"#1" is unknown as operator. (I)nsert one:} }%<<deliberate space - \fi + \expandafter\XINT_expr_getop_a\romannumeral`&&@% + \xint_afterfi{\XINT_expandableerror + {Expected an operator but got `#1'. Ignoring.}}% + \fi }% \def\XINT_expr_foundop #1{\csname XINT_expr_precedence_#1\endcsname #1}% \catcode`) 11 @@ -924,7 +981,7 @@ \def#5% {% \XINT_expandableerror - {An extra ) has been removed. Hit Return, fingers crossed.}% + {Extra ) removed. Hit <return>, fingers crossed.}% \expandafter#2\romannumeral`&&@\expandafter\XINT_expr_put_op_first \romannumeral`&&@\XINT_expr_getop_legacy }% @@ -970,7 +1027,7 @@ }% }% \def\XINT_expr_missing_) - {\XINT_expandableerror{Sorry to report a missing ) at the end of this journey.}% + {\XINT_expandableerror{End of expression found, but some ) was missing there.}% \xint_c_ \XINT_expr_done }% \xintFor #1 in {expr,flexpr,iiexpr} \do {% \expandafter\XINT_tmpa @@ -1059,9 +1116,9 @@ \csname XINT_#1_checkp_-#3\expandafter\endcsname \csname xint_c_#3\endcsname {#1}#2% }% -\xintApplyInline{\XINT_tmpa {expr}\xintOpp}{{xii}{xiv}{xvi}{xviii}}% -\xintApplyInline{\XINT_tmpa {flexpr}\xintOpp}{{xii}{xiv}{xvi}{xviii}}% -\xintApplyInline{\XINT_tmpa {iiexpr}\xintiiOpp}{{xii}{xiv}{xvi}{xviii}}% +\xintApplyInline{\XINT_tmpa {expr}\xintOpp}{{xii}{xiv}{xvii}}% +\xintApplyInline{\XINT_tmpa {flexpr}\xintOpp}{{xii}{xiv}{xvii}}% +\xintApplyInline{\XINT_tmpa {iiexpr}\xintiiOpp}{{xii}{xiv}{xvii}}% \def\XINT_tmpa#1#2#3% {% \def#1##1{\expandafter#2\romannumeral`&&@\XINT_expr_getnext}% @@ -1079,12 +1136,10 @@ \xintFor* #1 in {{expr}{flexpr}{iiexpr}}: {\expandafter\XINT_tmpa\csname XINT_#1_op_0\expandafter\endcsname \csname XINT_#1_until_unpack\endcsname {#1}}% -\catcode`& 12 -\xintFor* #1 in {{==}{<=}{>=}{&&}{||}{**}{//}{/:}{..}{..[}{].}{]..}}% +\catcode`& 12 \catcode`! 12 +\xintFor* #1 in {{==}{!=}{<=}{>=}{&&}{||}{//}{/:}{..}{..[}{].}{]..}}% \do {\expandafter\def\csname XINT_expr_itself_#1\endcsname {#1}}% -\catcode`& 7 -\expandafter\edef\csname XINT_expr_itself_!=\endcsname{\string !=}% -\expandafter\let\csname XINT_expr_precedence_***\endcsname \xint_c_xvi +\catcode`& 7 \catcode`! 11 \def\XINT_expr_defbin_c #1#2#3#4#5#6#7#8% {% \def #1##1% \XINT_expr_op_<op> @@ -1095,7 +1150,7 @@ \def #2##1##2##3##4% \XINT_expr_exec_<op> {% \expandafter##2\expandafter##3\expandafter - {\romannumeral`&&@\XINT:NEhook:f:one:from:two{\romannumeral`&&@#6##1##4}}% + {\romannumeral`&&@\XINT:NEhook:f:one:from:two{\romannumeral`&&@#7##1##4}}% }% \def #3##1% \XINT_expr_check-_<op> {% @@ -1106,7 +1161,7 @@ }% \def #4##1##2% \XINT_expr_checkp_<op> {% - \ifnum ##1>#7% + \ifnum ##1>#6% \expandafter#4% \romannumeral`&&@\csname XINT_#8_op_##2\expandafter\endcsname \else @@ -1121,46 +1176,48 @@ \csname XINT_#1_exec_#2\expandafter\endcsname \csname XINT_#1_check-_#2\expandafter\endcsname \csname XINT_#1_checkp_#2\expandafter\endcsname - \csname XINT_#1_op_-#4\expandafter\endcsname - \csname #5\expandafter\endcsname - \csname XINT_expr_precedence_#2\endcsname + \csname XINT_#1_op_-\romannumeral\ifnum#4>12 #4\else12\fi\expandafter\endcsname + \csname xint_c_\romannumeral#4\endcsname + #5% {#1}% \expandafter % done 3 times but well \let\csname XINT_expr_precedence_#2\expandafter\endcsname - \csname xint_c_#3\endcsname + \csname xint_c_\romannumeral#3\endcsname }% -\XINT_expr_defbin_b {expr} {||} {vi}{xii} {xintOR}% -\XINT_expr_defbin_b {flexpr}{||} {vi}{xii} {xintOR}% -\XINT_expr_defbin_b {iiexpr}{||} {vi}{xii} {xintOR}% +\XINT_expr_defbin_b {expr} {||} {6} {6} \xintOR +\XINT_expr_defbin_b {flexpr}{||} {6} {6} \xintOR +\XINT_expr_defbin_b {iiexpr}{||} {6} {6} \xintOR \catcode`& 12 -\XINT_expr_defbin_b {expr} {&&} {viii}{xii} {xintAND}% -\XINT_expr_defbin_b {flexpr}{&&} {viii}{xii} {xintAND}% -\XINT_expr_defbin_b {iiexpr}{&&} {viii}{xii} {xintAND}% +\XINT_expr_defbin_b {expr} {&&} {8} {8} \xintAND +\XINT_expr_defbin_b {flexpr}{&&} {8} {8} \xintAND +\XINT_expr_defbin_b {iiexpr}{&&} {8} {8} \xintAND \catcode`& 7 -\XINT_expr_defbin_b {expr} {xor}{vi}{xii} {xintXOR}% -\XINT_expr_defbin_b {flexpr}{xor}{vi}{xii} {xintXOR}% -\XINT_expr_defbin_b {iiexpr}{xor}{vi}{xii} {xintXOR}% -\XINT_expr_defbin_b {expr} {//} {xiv}{xiv}{xintDivFloor}% -\XINT_expr_defbin_b {flexpr}{//} {xiv}{xiv}{XINTinFloatDivFloor}% -\XINT_expr_defbin_b {iiexpr}{//} {xiv}{xiv}{xintiiDivFloor}% -\XINT_expr_defbin_b {expr} {/:} {xiv}{xiv}{xintMod}% -\XINT_expr_defbin_b {flexpr}{/:} {xiv}{xiv}{XINTinFloatMod}% -\XINT_expr_defbin_b {iiexpr}{/:} {xiv}{xiv}{xintiiMod}% -\XINT_expr_defbin_b {expr} + {xii}{xii}{xintAdd}% -\XINT_expr_defbin_b {flexpr} + {xii}{xii}{XINTinFloatAdd}% -\XINT_expr_defbin_b {iiexpr} + {xii}{xii}{xintiiAdd}% -\XINT_expr_defbin_b {expr} - {xii}{xii}{xintSub}% -\XINT_expr_defbin_b {flexpr} - {xii}{xii}{XINTinFloatSub}% -\XINT_expr_defbin_b {iiexpr} - {xii}{xii}{xintiiSub}% -\XINT_expr_defbin_b {expr} * {xiv}{xiv}{xintMul}% -\XINT_expr_defbin_b {flexpr} * {xiv}{xiv}{XINTinFloatMul}% -\XINT_expr_defbin_b {iiexpr} * {xiv}{xiv}{xintiiMul}% -\XINT_expr_defbin_b {expr} / {xiv}{xiv}{xintDiv}% -\XINT_expr_defbin_b {flexpr} / {xiv}{xiv}{XINTinFloatDiv}% -\XINT_expr_defbin_b {iiexpr} / {xiv}{xiv}{xintiiDivRound}% -\XINT_expr_defbin_b {expr} ^ {xviii}{xviii}{xintPow}% -\XINT_expr_defbin_b {flexpr} ^ {xviii}{xviii}{XINTinFloatSciPow}% -\XINT_expr_defbin_b {iiexpr} ^ {xviii}{xviii}{xintiiPow}% +\XINT_expr_defbin_b {expr} {xor}{6} {6} \xintXOR +\XINT_expr_defbin_b {flexpr}{xor}{6} {6} \xintXOR +\XINT_expr_defbin_b {iiexpr}{xor}{6} {6} \xintXOR +\XINT_expr_defbin_b {expr} {//} {14}{14}\xintDivFloor +\XINT_expr_defbin_b {flexpr}{//} {14}{14}\XINTinFloatDivFloor +\XINT_expr_defbin_b {iiexpr}{//} {14}{14}\xintiiDivFloor +\XINT_expr_defbin_b {expr} {/:} {14}{14}\xintMod +\XINT_expr_defbin_b {flexpr}{/:} {14}{14}\XINTinFloatMod +\XINT_expr_defbin_b {iiexpr}{/:} {14}{14}\xintiiMod +\XINT_expr_defbin_b {expr} + {12}{12}\xintAdd +\XINT_expr_defbin_b {flexpr} + {12}{12}\XINTinFloatAdd +\XINT_expr_defbin_b {iiexpr} + {12}{12}\xintiiAdd +\XINT_expr_defbin_b {expr} - {12}{12}\xintSub +\XINT_expr_defbin_b {flexpr} - {12}{12}\XINTinFloatSub +\XINT_expr_defbin_b {iiexpr} - {12}{12}\xintiiSub +\XINT_expr_defbin_b {expr} * {14}{14}\xintMul +\XINT_expr_defbin_b {flexpr} * {14}{14}\XINTinFloatMul +\XINT_expr_defbin_b {iiexpr} * {14}{14}\xintiiMul +\let\XINT_expr_prec_tacit \xint_c_xvi +\XINT_expr_defbin_b {expr} / {14}{14}\xintDiv +\XINT_expr_defbin_b {flexpr} / {14}{14}\XINTinFloatDiv +\XINT_expr_defbin_b {iiexpr} / {14}{14}\xintiiDivRound +\XINT_expr_defbin_b {expr} ^ {18}{17}\xintPow +\XINT_expr_defbin_b {flexpr} ^ {18}{17}\XINTinFloatSciPow +\XINT_expr_defbin_b {iiexpr} ^ {18}{17}\xintiiPow +\expandafter\def\csname XINT_expr_itself_**\endcsname{^}% \catcode`& 12 \xintFor #1 in {and,or,xor,mod} \do {% @@ -1181,21 +1238,6 @@ \expandafter\let\csname XINT_#1_op_mod\expandafter\endcsname \csname XINT_#1_op_/:\endcsname }% -\expandafter\let\csname XINT_expr_precedence_&\expandafter\endcsname - \csname XINT_expr_precedence_&&\endcsname -\expandafter\let\csname XINT_expr_precedence_|\expandafter\endcsname - \csname XINT_expr_precedence_||\endcsname -\expandafter\let\csname XINT_expr_precedence_**\expandafter\endcsname - \csname XINT_expr_precedence_^\endcsname -\xintFor #1 in {expr, flexpr, iiexpr} \do -{% - \expandafter\let\csname XINT_#1_op_&\expandafter\endcsname - \csname XINT_#1_op_&&\endcsname - \expandafter\let\csname XINT_#1_op_|\expandafter\endcsname - \csname XINT_#1_op_||\endcsname - \expandafter\let\csname XINT_#1_op_**\expandafter\endcsname - \csname XINT_#1_op_^\endcsname -}% \catcode`& 7 \def\XINT_expr_defbin_c #1#2#3#4#5#6#7% {% @@ -1365,12 +1407,6 @@ \XINT_expr_defbin_b {expr} {!=}\xintNotEq \XINT_expr_defbin_b {flexpr}{!=}\xintNotEq \XINT_expr_defbin_b {iiexpr}{!=}\xintiiNotEq -\expandafter\let\csname XINT_expr_precedence_=\endcsname\xint_c_x -\xintFor #1 in {expr, flexpr, iiexpr} \do -{% - \expandafter\let\csname XINT_#1_op_=\expandafter\endcsname - \csname XINT_#1_op_==\endcsname -}% \def\xintSeq:tl:x #1#2% {% \expandafter\XINT_Seq:tl:x @@ -1522,7 +1558,7 @@ \XINT_expr_defbin_b {flexpr}% \XINT_expr_defbin_b {iiexpr}% \def\XINT_expr_missing_] - {\XINT_expandableerror{Ooops, looks like we are missing a ] here. Goodbye!}% + {\XINT_expandableerror{Ooops, looks like we are missing a ]. Aborting!}% \xint_c_ \XINT_expr_done}% \let\XINT_expr_precedence_]\xint_c_ii \def\XINT_expr_defbin_c #1#2#3#4#5#6% @@ -1850,6 +1886,10 @@ \expanded{{\romannumeral`&&@\XINT:NEhook:f:one:from:one {\romannumeral`&&@\xintiiFac#1}}\expandafter}\romannumeral`&&@\XINT_expr_getop }% +\expandafter +\def\csname XINT_expr_precedence_!==\expandafter\endcsname + \csname XINT_expr_itself_!==\endcsname {\XINT_expr_precedence_! !==}% +\expandafter\def\csname XINT_expr_itself_!==\endcsname{!==}% \catcode`* 11 \def\XINT_expr_defvar_one #1#2% {% @@ -1864,11 +1904,7 @@ {{\expandafter\noexpand\csname XINT_expr_varvalue_#1\endcsname}}% \XINT_global \expandafter\edef\csname XINT_expr_onliteral_#1\endcsname - {\unexpanded{\expandafter\expandafter\expandafter}% - \XINT_expr_precedence_*** - \unexpanded{\expandafter\expandafter\expandafter}% - *\unexpanded{\expandafter\expandafter}% - \expandafter\noexpand\csname XINT_expr_var_#1\endcsname(}% + {\XINT_expr_prec_tacit *\csname XINT_expr_var_#1\endcsname(}% \ifxintverbose\xintMessage{xintexpr}{Info} {Variable #1 \ifxintglobaldefs globally \fi defined with value \csname XINT_expr_varvalue_#1\endcsname.}% @@ -1991,7 +2027,7 @@ \expanded {\edef\expandafter\noexpand \csname XINT_expr_onliteral_\XINT_tmpa\endcsname ##1\relax !\XINT_tmpa##2}% - {\XINT_expr_precedence_*** *{##2}(##1\relax !\XINT_tmpa{##2}}%) + {\XINT_expr_prec_tacit *{##2}(##1\relax !\XINT_tmpa{##2}}%) }% \xintApplyUnbraced \XINT_expr_makedummy {abcdefghijklmnopqrstuvwxyz}% \xintApplyUnbraced \XINT_expr_makedummy {ABCDEFGHIJKLMNOPQRSTUVWXYZ}% @@ -2111,7 +2147,7 @@ \expandafter\let\csname XINT_expr_precedence_;)\endcsname\xint_c_i \catcode`* 11 \def\XINT_expr_var_@ #1~#2{{#2}#1~{#2}}% -\def\XINT_expr_onliteral_@ #1~#2{\XINT_expr_precedence_*** *{#2}(#1~{#2}}% +\def\XINT_expr_onliteral_@ #1~#2{\XINT_expr_prec_tacit *{#2}(#1~{#2}}% \expandafter \def\csname XINT_expr_var_@1\endcsname #1~#2{{{#2}}#1~{#2}}% \expandafter @@ -2121,13 +2157,13 @@ \expandafter \def\csname XINT_expr_var_@4\endcsname #1~#2#3#4#5{{{#5}}#1~{#2}{#3}{#4}{#5}}% \expandafter\def\csname XINT_expr_onliteral_@1\endcsname #1~#2% - {\XINT_expr_precedence_*** *{{#2}}(#1~{#2}}% + {\XINT_expr_prec_tacit *{{#2}}(#1~{#2}}% \expandafter\def\csname XINT_expr_onliteral_@2\endcsname #1~#2#3% - {\XINT_expr_precedence_*** *{{#3}}(#1~{#2}{#3}}% + {\XINT_expr_prec_tacit *{{#3}}(#1~{#2}{#3}}% \expandafter\def\csname XINT_expr_onliteral_@3\endcsname #1~#2#3#4% - {\XINT_expr_precedence_*** *{{#4}}(#1~{#2}{#3}{#4}}% + {\XINT_expr_prec_tacit *{{#4}}(#1~{#2}{#3}{#4}}% \expandafter\def\csname XINT_expr_onliteral_@4\endcsname #1~#2#3#4#5% - {\XINT_expr_precedence_*** *{{#5}}(#1~{#2}{#3}{#4}{#5}}% + {\XINT_expr_prec_tacit *{{#5}}(#1~{#2}{#3}{#4}{#5}}% \catcode`* 12 \catcode`? 3 \def\XINT_expr_func_@@ #1#2#3#4~#5?% @@ -3852,7 +3888,7 @@ ##1{##2}% }}\expandafter\XINT:NE:f:noeval:from:braced:u\string#% \def\XINT:NE:f:noeval:from:braced:u:p #1#2% - {\detokenize{\romannumeral`$XINT_expr_null\expandafter#1}~expanded{{#2}}}% + {\detokenize{\romannumeral`$XINT_expr_null\expandafter#1}~expanded{{#2}}}%$ \catcode`- 11 \def\XINT:NE:exec_? #1#2% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty index 5b72d9741ef..f5c600e434a 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintfrac: Expandable operations on fractions %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintfrac}% - [2021/05/10 v1.4f Expandable operations on fractions (JFB)]% + [2021/05/25 v1.4g Expandable operations on fractions (JFB)]% \def\XINT_cntSgnFork #1% {% \ifcase #1\expandafter\xint_secondofthree @@ -103,9 +103,9 @@ \fi {#2}{#3}[#1]% }% -\def\XINT_outfrac_divisionbyzero #1#2% +\def\XINT_outfrac_divisionbyzero #1#2[#3]% {% - \XINT_signalcondition{DivisionByZero}{Division of #1 by #2}{}{0/1[0]}% + \XINT_signalcondition{DivisionByZero}{Division by zero: #1/#2.}{}{ 0/1[0]}% }% \def\XINT_outfrac_P#1{% \def\XINT_outfrac_P ##1##2% @@ -236,7 +236,7 @@ }% \def\XINT_frac_gen_Gdivbyzero_a #1~#2~% {% - \XINT_signalcondition{DivisionByZero}{Division of #1 by zero}{}{{#2}{#1}{0}}% + \XINT_signalcondition{DivisionByZero}{Division by zero: #1/0.}{}{{#2}{#1}{0}}% }% \def\XINT_frac_gen_G #1#2#3~#4~#5~% {% @@ -572,7 +572,21 @@ }% \def\XINT_denom_A #1.#2#3{ #3}% \def\XINT_denom_B -#1.#2#3{\XINT_dsx_addzeros{#1}#3;}% -\def\xintFrac {\romannumeral0\xintfrac }% +\ifdefined\documentclass +\def\xintfracTeXDeprecation#1#2{% +\PackageWarning{xintfrac}{\string#1 is deprecated. Use \string#2\MessageBreak + to suppress this warning}#2% +}% +\else +\edef\xintfracTeXDeprecation#1#2{{\newlinechar10 +\immediate\noexpand\write128{&&JPackage xintfrac Warning: \noexpand\string#1 is + deprecated. Use \noexpand\string#2&&J% +(xintfrac)\xintReplicate{16}{ }to suppress this warning +on input line \noexpand\the\inputlineno.&&J}}#2% +}% +\fi +\def\xintFrac {\xintfracTeXDeprecation\xintFrac\xintTeXFrac}% +\def\xintTeXFrac{\romannumeral0\xintfrac }% \def\xintfrac #1% {% \expandafter\XINT_fracfrac_A\romannumeral0\XINT_infrac {#1}% @@ -598,7 +612,8 @@ \frac {#2}{#3}#1% }% \def\XINT_fracfrac_E \fi\space\frac #1#2{\fi \space #1\cdot }% -\def\xintSignedFrac {\romannumeral0\xintsignedfrac }% +\def\xintSignedFrac {\xintfracTeXDeprecation\xintSignedFrac\xintTeXsignedFrac}% +\def\xintTeXsignedFrac{\romannumeral0\xintsignedfrac }% \def\xintsignedfrac #1% {% \expandafter\XINT_sgnfrac_a\romannumeral0\XINT_infrac {#1}% @@ -622,7 +637,28 @@ {% \expandafter-\romannumeral0\XINT_sgnfrac_P }% -\def\xintFwOver {\romannumeral0\xintfwover }% +\def\xintTeXfromSci#1% +{% + \expanded{\expandafter\XINT_texfromsci\expanded{#1}/\relax/\xint:}% +}% +\def\XINT_texfromsci #1/#2#3/#4\xint: +{% + \XINT_texfromsci_a #1e\relax e\xint: + {\ifx\relax#2\xint_dothis\xint_firstofone\fi + \xint_orthat{\XINT_texfromsci_frac{#2#3}}}% + {\unless\ifx\relax#2\cdot{#2#3}^{-1}\fi}% +}% +\def\XINT_texfromsci_a #1e#2#3e#4\xint:#5#6% +{% + \ifx\relax#2#5{#1}\else#1\cdot10^{#2#3}#6\fi +}% +\ifdefined\frac + \def\XINT_texfromsci_frac#1#2{\noexpand\frac{#2}{#1}}% +\else + \def\XINT_texfromsci_frac#1#2{{#2\over#1}}% +\fi +\def\xintFwOver {\xintfracTeXDeprecation\xintFwOver\xintTeXOver}% +\def\xintTeXOver{\romannumeral0\xintfwover }% \def\xintfwover #1% {% \expandafter\XINT_fwover_A\romannumeral0\XINT_infrac {#1}% @@ -646,7 +682,8 @@ \fi #1% }% -\def\xintSignedFwOver {\romannumeral0\xintsignedfwover }% +\def\xintSignedFwOver {\xintfracTeXDeprecation\xintSignedFwOver\xintTeXsignedOver}% +\def\xintTeXsignedOver{\romannumeral0\xintsignedfwover }% \def\xintsignedfwover #1% {% \expandafter\XINT_sgnfwover_a\romannumeral0\XINT_infrac {#1}% @@ -763,11 +800,11 @@ }% \def\XINT_irr_indeterminate #1#2#3#4#5% {% - \XINT_signalcondition{DivisionUndefined}{indeterminate: 0/0}{}{0/1}% + \XINT_signalcondition{DivisionUndefined}{0/0 indeterminate fraction.}{}{ 0/1}% }% \def\XINT_irr_divisionbyzero #1#2#3#4#5% {% - \XINT_signalcondition{DivisionByZero}{vanishing denominator: #5#2/0}{}{0/1}% + \XINT_signalcondition{DivisionByZero}{Division by zero: #5#2/0.}{}{ 0/1}% }% \def\XINT_irr_zero #1#2#3#4#5{ 0/1}% changed in 1.08 \def\XINT_irr_loop_a #1#2% @@ -839,11 +876,11 @@ }% \def\XINT_jrr_indeterminate #1#2#3#4#5#6#7% {% - \XINT_signalcondition{DivisionUndefined}{indeterminate: 0/0}{}{0/1}% + \XINT_signalcondition{DivisionUndefined}{0/0 indeterminate fraction.}{}{ 0/1}% }% \def\XINT_jrr_divisionbyzero #1#2#3#4#5#6#7% {% - \XINT_signalcondition{DivisionByZero}{Vanishing denominator: #7#2/0}{}{0/1}% + \XINT_signalcondition{DivisionByZero}{Division by zero: #7#2/0.}{}{ 0/1}% }% \def\XINT_jrr_zero #1#2#3#4#5#6#7{ 0/1}% changed in 1.08 \def\XINT_jrr_loop_a #1#2% @@ -1548,7 +1585,7 @@ }% \def\XINT_modtrunc_divbyzero #1#2[#3]#4.% {% - \XINT_signalcondition{DivisionByZero}{Division by #2[#3] of #1#4}{}{0/1[0]}% + \XINT_signalcondition{DivisionByZero}{Division by zero: #1#4/(#2[#3]).}{}{ 0/1[0]}% }% \def\XINT_modtrunc_aiszero #1.{ 0/1[0]}% \def\XINT_modtrunc_bneg #1% @@ -1587,7 +1624,7 @@ }% \def\XINT_divmod_divbyzero #1#2[#3]#4.% {% - \XINT_signalcondition{DivisionByZero}{Division by #2[#3] of #1#4}{}% + \XINT_signalcondition{DivisionByZero}{Division by zero: #1#4/(#2[#3]).}{}% {{0}{0/1[0]}}% à revoir... }% \def\XINT_divmod_aiszero #1.{{0}{0/1[0]}}% @@ -1921,7 +1958,7 @@ \krof #1% }% \def\XINT_inv_iszero #1]% - {\XINT_signalcondition{DivisionByZero}{Division of 1 by zero (#1])}{}{0/1[0]}}% + {\XINT_signalcondition{DivisionByZero}{Inverse of zero: inv(#1]).}{}{ 0/1[0]}}% \def\XINT_inv_a #1#2/#3[#4#5]% {% \xint_UDzerominusfork @@ -2578,16 +2615,24 @@ \def\XINT_fldiv_noopt #1#2\xint:#3% {% #1[\XINTdigits]% - {\expandafter\XINT_FL_div_a + {\expandafter\XINT_FL_div_aa \romannumeral0\XINTinfloatS[\XINTdigits]{#3}\XINTdigits.{#2}}% }% +\def\XINT_FL_div_aa #1% +{% + \xint_gob_til_zero#1\XINT_FL_div_Bzero0\XINT_FL_div_a #1% +}% +\def\XINT_FL_div_Bzero0\XINT_FL_div_a#1[#2]#3.#4% +{% + \XINT_signalcondition{DivisionByZero}{Division by zero (#1[#2]) of #4}{}{ 0[0]}% +}% \def\XINT_fldiv_opt #1[\xint:#2]%#3#4% {% \expandafter\XINT_fldiv_opt_a\the\numexpr #2.#1% }% \def\XINT_fldiv_opt_a #1.#2#3#4% {% - #2[#1]{\expandafter\XINT_FL_div_a\romannumeral0\XINTinfloatS[#1]{#4}#1.{#3}}% + #2[#1]{\expandafter\XINT_FL_div_aa\romannumeral0\XINTinfloatS[#1]{#4}#1.{#3}}% }% \def\XINT_FL_div_a #1[#2]#3.#4% {% @@ -2660,7 +2705,7 @@ {% #6{\if 1#51\xint_dothis {0[0]}\fi \xint_orthat - {\XINT_signalcondition{DivisionByZero}{0 to the power #4}{}{0[0]}}% + {\XINT_signalcondition{DivisionByZero}{0 raised to power -#4.}{}{ 0[0]}}% }% }% \def\XINT_flpow_b #1#2[#3]#4#5% @@ -2917,7 +2962,7 @@ \def\XINT_FL_fac_isneg #1.#2#3#4#5% {% #5{\XINT_signalcondition{InvalidOperation} - {Factorial of negative: (-#1)!}{}{0[0]}}% + {Factorial argument is negative: -#1.}{}{ 0[0]}}% }% \def\XINT_FL_fac_fork_b #1.% {% @@ -2931,7 +2976,7 @@ \def\XINT_FL_fac_toobig #1.#2#3#4#5% {% #5{\XINT_signalcondition{InvalidOperation} - {Factorial of too big: (#1)!}{}{0[0]}}% + {Factorial argument is too large: #1>=10^8.}{}{ 0[0]}}% }% \def\XINT_FL_fac_vbig {\expandafter\XINT_FL_fac_vbigloop_a @@ -3142,7 +3187,7 @@ \def\XINT_FL_pfac_outofrange #1.#2.#3#4#5% {% #5{\XINT_signalcondition{InvalidOperation} - {pfactorial second arg too big: 99999999 < #2}{}{0[0]}}% + {pFactorial with too large argument: #2 >= 10^8.}{}{ 0[0]}}% }% \def\XINT_FL_pfac_one #1.#2.#3#4#5{#5{1[0]}}% \def\XINT_FL_pfac_zero #1.#2.#3#4#5{#5{0[0]}}% @@ -3326,12 +3371,12 @@ \def\XINT_FL_binom_neg #1.#2.#3.#4.#5% {% #5[#4]{\XINT_signalcondition{InvalidOperation} - {binomial with first arg negative: #3}{}{0[0]}}% + {Binomial with negative argument: #3.}{}{ 0[0]}}% }% \def\XINT_FL_binom_toobig #1.#2.#3.#4.#5% {% #5[#4]{\XINT_signalcondition{InvalidOperation} - {binomial with first arg too big: 99999999 < #3}{}{0[0]}}% + {Binomial with too large argument: #3 >= 10^8.}{}{ 0[0]}}% }% \def\XINT_FL_binom_one #1.#2.#3.#4.#5{#5[#4]{1[0]}}% \def\XINT_FL_binom_zero #1.#2.#3.#4.#5{#5[#4]{0[0]}}% @@ -3385,7 +3430,7 @@ \def\XINT_FL_sqrt_isneg #1]#2.#3% {% #3[#2]{\XINT_signalcondition{InvalidOperation} - {Square root of negative: -#1]}{}{0[0]}}% + {Square root of negative: -#1].}{}{ 0[0]}}% }% \def\XINT_FL_sqrt_pos #1[#2]#3.% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty index a7dbe96cc44..a7f9a22aba2 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintgcd: Euclidean algorithm with xint package %% --------------------------------------------------------------- @@ -77,7 +77,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintgcd}% - [2021/05/10 v1.4f Euclide algorithm with xint package (JFB)]% + [2021/05/25 v1.4g Euclide algorithm with xint package (JFB)]% \def\xintBezout {\romannumeral0\xintbezout }% \def\xintbezout #1% {% diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty index def82ede68f..0df3fba36da 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintkernel: Paraphernalia for the xint packages %% --------------------------------------------------------------- @@ -159,7 +159,7 @@ \fi \XINT_providespackage \ProvidesPackage {xintkernel}% - [2021/05/10 v1.4f Paraphernalia for the xint packages (JFB)]% + [2021/05/25 v1.4g Paraphernalia for the xint packages (JFB)]% \chardef\xint_c_ 0 \chardef\xint_c_i 1 \chardef\xint_c_ii 2 @@ -174,6 +174,7 @@ \chardef\xint_c_xii 12 \chardef\xint_c_xiv 14 \chardef\xint_c_xvi 16 +\chardef\xint_c_xvii 17 \chardef\xint_c_xviii 18 \chardef\xint_c_xx 20 \chardef\xint_c_xxii 22 @@ -602,7 +603,7 @@ \def\xintUniformDeviate#1% {% \the\numexpr - \XINT_expandableerror{No uniformdeviate at engine level, returning 0.}% + \XINT_expandableerror{(xintkernel) No uniformdeviate primitive!}% 0\relax }% }% @@ -616,14 +617,44 @@ \newif\ifxintverbose \newif\ifxintglobaldefs \def\XINT_global{\ifxintglobaldefs\global\fi}% -\def\XINT_expandableerror #1#2{% - \def\XINT_expandableerror ##1{% - \expandafter\expandafter\expandafter - \XINT_expandableerror_continue\xint_firstofone{#2#1##1#1}}% - \def\XINT_expandableerror_continue ##1#1##2#1{##1}% -}% -\begingroup\lccode`$ 32 \catcode`/ 11 % $ -\lowercase{\endgroup\XINT_expandableerror$\xint/\let\xint/\xint_undefined}% $ +\ifnum\newlinechar=10 +\expandafter\def\csname +romannumeral (or \string\expanded,&&J \space +\string\numexpr, ...) expansion could produce its final output.&&J \space +See above the exception specifics.&&J \space +xint will try to recover (if in interactive mode, hit <return>&&J \space +at the ? prompt) and will go ahead hoping repair\endcsname +#1\xint:{}% +\def\XINT_expandableerror#1{% +\def\XINT_expandableerror##1{% + \expandafter + \XINT_expandableerrorcontinue + #1! xint error: ##1\par +}}\expandafter\XINT_expandableerror\csname +romannumeral (or \string\expanded,&&J \space +\string\numexpr, ...) expansion could produce its final output.&&J \space +See above the exception specifics.&&J \space +xint will try to recover (if in interactive mode, hit <return>&&J \space +at the ? prompt) and will go ahead hoping repair\endcsname +\else +\expandafter\def\csname +numexpr or \string\expanded\space or \string\romannumeral\space expansion +could terminate because an exception was raised (see the above short explanation for +specifics). xint will now try to recover (hit <return> if in interactive +mode) and will go ahead hoping repair\endcsname +#1\xint:{}% +\def\XINT_expandableerror#1{% +\def\XINT_expandableerror##1{% + \expandafter + \XINT_expandableerrorcontinue + #1! xint error: ##1\par +}}\expandafter\XINT_expandableerror\csname +numexpr or \string\expanded\space or \string\romannumeral\space expansion +could terminate because an exception was raised (see the above short explanation for +specifics). xint will now try to recover (hit <return> if in interactive +mode) and will go ahead hoping repair\endcsname +\fi +\def\XINT_expandableerrorcontinue#1\par{#1}% \XINTrestorecatcodesendinput% \endinput %% diff --git a/Master/texmf-dist/tex/generic/xint/xintlog.sty b/Master/texmf-dist/tex/generic/xint/xintlog.sty index 8bfcaa86ef6..a509d7faf33 100644 --- a/Master/texmf-dist/tex/generic/xint/xintlog.sty +++ b/Master/texmf-dist/tex/generic/xint/xintlog.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintlog: Logarithms and exponentials for xintexpr %% --------------------------------------------------------------- @@ -68,10 +68,10 @@ \expandafter\xint_secondoftwo \fi {\immediate\write-1{Reloading xintlog library using Digits=\xinttheDigits.}}% -{\expandafter\gdef\csname xintlibver@log\endcsname{2021/05/10 v1.4f}% +{\expandafter\gdef\csname xintlibver@log\endcsname{2021/05/25 v1.4g}% \XINT_providespackage \ProvidesPackage{xintlog}% -[2021/05/10 v1.4f Logarithms and exponentials for xintexpr (JFB)]% +[2021/05/25 v1.4g Logarithms and exponentials for xintexpr (JFB)]% }% \def\xintreloadxintlog{\input xintlog.sty }% \xintexprSafeCatcodes\catcode`_ 11 @@ -191,7 +191,7 @@ \def\XINT_scipow_Aiszero #1\xint:#2#3\xint: {% \if-#2\xint_dothis - {\XINT_signalcondition{InvalidOperation}{Zero to negative power #2#3}{}{1["7FFF8000]}}\fi + {\XINT_signalcondition{InvalidOperation}{0 raised to power #2#3.}{}{ 0[0]}}\fi \xint_orthat{ 0[0]}% }% \def\XINT_scipow_Aispos #1\xint:#2\xint: @@ -200,7 +200,8 @@ }% \def\XINT_scipow_Aisneg #1#2\xint:#3\xint: {% - \XINT_signalcondition{InvalidOperation}{Fractional power of negative argument}{}{0[0]}% + \XINT_signalcondition{InvalidOperation}% + {Fractional power #3 of negative #1#2.}{}{ 0[0]}% }% \ifnum\XINTdigits<9 \def\XINT_tmpa#1.#2.#3.{% diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty index 7570ffe4143..7d2df8edd89 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xintseries: Expandable partial sums with xint package %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xintseries}% - [2021/05/10 v1.4f Expandable partial sums with xint package (JFB)]% + [2021/05/25 v1.4g 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 c3716556353..5cc05ed86e6 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.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xinttools: Expandable and non-expandable utilities %% --------------------------------------------------------------- @@ -70,7 +70,7 @@ \XINTsetupcatcodes% defined in xintkernel.sty \XINT_providespackage \ProvidesPackage{xinttools}% - [2021/05/10 v1.4f Expandable and non-expandable utilities (JFB)]% + [2021/05/25 v1.4g Expandable and non-expandable utilities (JFB)]% \newtoks\XINT_toks \xint_firstofone{\let\XINT_sptoken= } %<- space here! \def\xintgodef {\global\xintodef }% @@ -1270,12 +1270,12 @@ \def #1##1% {% \ifnum ##1<\xint_c_ - \xint_afterfi{\XINT_expandableerror{Array index negative: 0 > ##1} }% + \xint_afterfi{\XINT_expandableerror{Array index is negative: ##1.} }% \else \xint_afterfi {% \ifnum ##1>#2 \xint_afterfi - {\XINT_expandableerror{Array index beyond range: ##1 > #2} }% + {\XINT_expandableerror{Array index is beyond range: ##1 > #2.} }% \else\xint_afterfi {\expandafter\expandafter\expandafter\space\csname #3##1\endcsname}% \fi}% diff --git a/Master/texmf-dist/tex/generic/xint/xinttrig.sty b/Master/texmf-dist/tex/generic/xint/xinttrig.sty index 0b23eaed1d7..3d36265ca84 100644 --- a/Master/texmf-dist/tex/generic/xint/xinttrig.sty +++ b/Master/texmf-dist/tex/generic/xint/xinttrig.sty @@ -21,7 +21,7 @@ %% same distribution. (The sources need not necessarily be %% in the same archive or directory.) %% --------------------------------------------------------------- -%% The xint bundle 1.4f 2021/05/10 +%% The xint bundle 1.4g 2021/05/25 %% Copyright (C) 2013-2021 by Jean-Francois Burnol %% xinttrig: Trigonometry for the xintexpr package %% --------------------------------------------------------------- @@ -69,10 +69,10 @@ \expandafter\xint_secondoftwo \fi {\immediate\write-1{Reloading xinttrig library using Digits=\xinttheDigits.}}% -{\expandafter\gdef\csname xintlibver@trig\endcsname{2021/05/10 v1.4f}% +{\expandafter\gdef\csname xintlibver@trig\endcsname{2021/05/25 v1.4g}% \XINT_providespackage \ProvidesPackage{xinttrig}% -[2021/05/10 v1.4f Trigonometrical functions for xintexpr (JFB)]% +[2021/05/25 v1.4g Trigonometrical functions for xintexpr (JFB)]% }% \xintFor* #1 in {iDTVtuwxyzX}\do{\xintensuredummy{#1}}% \def\xintreloadxinttrig{\input xinttrig.sty }% |