summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintexpr.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintexpr.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintexpr.sty293
1 files changed, 174 insertions, 119 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index a7bc350cadd..72e5194b49e 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 v1.1c 2015/09/12
+%% The xint bundle v1.2 2015/10/10
%% Copyright (C) 2013-2015 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
@@ -81,13 +81,24 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2015/09/12 v1.1c Expandable expression parser (jfB)]%
-\def\xint_gob_til_! #1!{}% this ! has catcode 11
-\edef\XINT_expr_lockscan#1!{\noexpand\expandafter\space\noexpand\csname .=#1\endcsname }%
-\edef\XINT_expr_lockit #1{\noexpand\expandafter\space\noexpand\csname .=#1\endcsname }%
-\def\XINT_expr_inintpart #1!{\XINT_num{#1}}%
-\def\XINT_expr_infracpart #1e#2!{#1![\the\numexpr#2-\xintLength{#1}]!}%
-\def\XINT_expr_inexppart e#1!{![\the\numexpr #1]!}%
+ [2015/10/10 v1.2 Expandable expression parser (jfB)]%
+\catcode`! 11
+\def\xint_gob_til_! #1!{}% catcode 11 ! default in xintexpr.sty code.
+\edef\XINT_expr_lockscan#1!% not used for decimal numbers in xintexpr 1.2
+ {\noexpand\expandafter\space\noexpand\csname .=#1\endcsname }%
+\edef\XINT_expr_lockit
+ #1{\noexpand\expandafter\space\noexpand\csname .=#1\endcsname }%
+\def\XINT_expr_unlock_hex_in #1% expanded inside \csname..\endcsname
+ {\expandafter\XINT_expr_inhex\romannumeral-`0\XINT_expr_unlock#1;}%
+\def\XINT_expr_inhex #1.#2#3;% expanded inside \csname..\endcsname
+{%
+ \if#2>\xintHexToDec{#1}%
+ \else
+ \xintiiMul{\xintiiPow{625}{\xintLength{#3}}}{\xintHexToDec{#1#3}}%
+ [\the\numexpr-4*\xintLength{#3}]%
+ \fi
+}%
+%%%%%%%%%%%%
\def\XINT_expr_unlock {\expandafter\XINT_expr_unlock_a\string }%
\def\XINT_expr_unlock_a #1.={}%
\def\XINT_expr_unexpectedtoken {\xintError:ignored }%
@@ -253,14 +264,18 @@
\def\XINT_expr_subexpr !#1\fi !{\expandafter\XINT_expr_getop\xint_gobble_iii }%
\def\XINT_expr_countetc #1%
{%
- \ifx\count#1\else\ifx#1\dimen\else\ifx#1\numexpr\else\ifx#1\dimexpr\else
- \ifx\skip#1\else\ifx\glueexpr#1\else\ifx\fontdimen#1\else
+ \ifx\count#1\else\ifx\dimen#1\else\ifx\numexpr#1\else\ifx\dimexpr#1\else
+ \ifx\skip#1\else\ifx\glueexpr#1\else\ifx\fontdimen#1\else\ifx\ht#1\else
+ \ifx\dp#1\else\ifx\wd#1\else\ifx\fontcharht#1\else\ifx\fontcharwd#1\else
+ \ifx\fontchardp#1\else\ifx\fontcharic#1\else
\XINT_expr_unpackvar
- \fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\expandafter\XINT_expr_getnext\number #1%
}%
-\def\XINT_expr_unpackvar\fi\fi\fi\fi\fi\fi\fi\expandafter\XINT_expr_getnext\number #1%
- {\fi\fi\fi\fi\fi\fi\fi\expandafter\XINT_expr_getop\csname .=\number#1\endcsname }%
+\def\XINT_expr_unpackvar\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \expandafter\XINT_expr_getnext\number #1%
+ {\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \expandafter\XINT_expr_getop\csname .=\number#1\endcsname }%
\begingroup
\lccode`*=`#
\lowercase{\endgroup
@@ -268,7 +283,7 @@
\if#1*\xint_dothis {\XINT_expr_scan_macropar *}\fi
\if#1[\xint_dothis {\xint_c_xviii ({}}\fi
\if#1+\xint_dothis \XINT_expr_getnext \fi
- \if#1.\xint_dothis {\XINT_expr_scandec_II\XINT_expr_infracpart}\fi
+ \if#1.\xint_dothis {\XINT_expr_startdec}\fi
\if#1-\xint_dothis -\fi
\if#1(\xint_dothis {\xint_c_xviii ({}}\fi
\xint_orthat {\XINT_expr_scan_nbr_or_func #1}%
@@ -279,135 +294,161 @@
{%
\if "#1\xint_dothis \XINT_expr_scanhex_I\fi
\if `#1\xint_dothis {\XINT_expr_onlitteral_`}\fi
- \ifnum \xint_c_ix<1#1 \xint_dothis \XINT_expr_scandec_I\fi
+ \ifnum \xint_c_ix<1#1 \xint_dothis \XINT_expr_startint\fi
\xint_orthat \XINT_expr_scanfunc #1%
}%
\catcode96 12 % `
-\def\XINT_expr_scandec_I
+\def\XINT_expr_startint #1%
{%
- \expandafter\XINT_expr_getop\romannumeral-`0\expandafter
- \XINT_expr_lockscan\romannumeral0\expandafter\XINT_expr_inintpart
- \romannumeral-`0\XINT_expr_scanintpart_b
+ \if #10\expandafter\XINT_expr_gobz_a\else\XINT_expr_scanint_a\fi #1%
}%
-\def\XINT_expr_scandec_II
+\def\XINT_expr_scanint_a #1#2%
+ {\expandafter\XINT_expr_getop\csname.=#1%
+ \expandafter\XINT_expr_scanint_b\romannumeral-`0#2}%
+\def\XINT_expr_gobz_a #1%
+ {\expandafter\XINT_expr_getop\csname.=%
+ \expandafter\XINT_expr_gobz_scanint_b\romannumeral-`0#1}%
+\def\XINT_expr_startdec #1%
+ {\expandafter\XINT_expr_getop\csname.=%
+ \expandafter\XINT_expr_scandec_a\romannumeral-`0#1}%
+\def\XINT_expr_scanint_b #1%
{%
- \expandafter\XINT_expr_getop\romannumeral-`0\expandafter
- \XINT_expr_lockscan\romannumeral0\expandafter\XINT_expr_inintpart
- \romannumeral-`0\XINT_expr_scanfracpart_b
+ \ifcat \relax #1\expandafter\XINT_expr_scanint_endbycs\expandafter #1\fi
+ \ifnum\xint_c_ix<1\string#1 \else\expandafter\XINT_expr_scanint_c\fi
+ \string#1\XINT_expr_scanint_d
}%
-\def\XINT_expr_scanintpart_a #1%
-{% careful that ! has catcode letter here
- \ifcat \relax #1\xint_dothis{!!#1}\fi % stops the scan
- \if e#1\xint_dothis{\expandafter\XINT_expr_inexppart
- \romannumeral-`0\XINT_expr_scanexppart_a e}\fi
- \if E#1\xint_dothis{\expandafter\XINT_expr_inexppart
- \romannumeral-`0\XINT_expr_scanexppart_a e}\fi
- \ifcat a#1\xint_dothis{!!*#1}\fi % includes subexpressions (#1=! letter)
- \xint_orthat {\expandafter\XINT_expr_scanintpart_aa\string #1}%
+\def\XINT_expr_scanint_d #1%
+{%
+ \expandafter\XINT_expr_scanint_b\romannumeral-`0#1%
}%
-\def\XINT_expr_scanintpart_aa #1%
+\def\XINT_expr_scanint_endbycs#1#2\XINT_expr_scanint_d{\endcsname #1}%
+\def\XINT_expr_scanint_c\string #1\XINT_expr_scanint_d
{%
- \if .#1\xint_dothis\XINT_expr_scandec_transition\fi
- \ifnum \xint_c_ix<1#1 \xint_dothis\XINT_expr_scanintpart_b\fi
- \xint_orthat {!!}#1%
+ \if e#1\xint_dothis{[\the\numexpr0\XINT_expr_scanexp_a +}\fi
+ \if E#1\xint_dothis{[\the\numexpr0\XINT_expr_scanexp_a +}\fi
+ \ifcat a#1\xint_dothis{\endcsname*#1}\fi
+ \if .#1\xint_dothis{\XINT_expr_startdec_a .}\fi
+ \xint_orthat {\expandafter\endcsname \string#1}%
}%
-\def\XINT_expr_scanintpart_b #1#2%
+\def\XINT_expr_startdec_a .#1%
{%
- \expandafter #1\romannumeral-`0\expandafter
- \XINT_expr_scanintpart_a\romannumeral-`0#2%
+ \expandafter\XINT_expr_scandec_a\romannumeral-`0#1%
}%
-\def\XINT_expr_scandec_transition .#1%
+\def\XINT_expr_scandec_a #1%
{%
- \expandafter\XINT_expr_scandec_trans_a\romannumeral-`0#1%
+ \if .#1\xint_dothis{\endcsname..}\fi
+ \xint_orthat {\XINT_expr_scandec_b 0.#1}%
}%
-\def\XINT_expr_scandec_trans_a #1%
+\def\XINT_expr_gobz_scanint_b #1%
{%
- \if .#1\xint_dothis{!!..}\fi
- \xint_orthat {\expandafter\XINT_expr_infracpart
- \romannumeral-`0\XINT_expr_scanfracpart_a #1}%
+ \ifcat \relax #1\expandafter\XINT_expr_gobz_scanint_endbycs\expandafter #1\fi
+ \ifnum\xint_c_x<1\string#1 \else\expandafter\XINT_expr_gobz_scanint_c\fi
+ \string#1\XINT_expr_scanint_d
}%
-\def\XINT_expr_scanfracpart_a #1%
+\def\XINT_expr_gobz_scanint_endbycs#1#2\XINT_expr_scanint_d{0\endcsname #1}%
+\def\XINT_expr_gobz_scanint_c\string #1\XINT_expr_scanint_d
{%
- \ifcat \relax #1\xint_dothis{e!#1}\fi % stops the scan
- \if e#1\xint_dothis{\XINT_expr_scanexppart_a e}\fi
- \if E#1\xint_dothis{\XINT_expr_scanexppart_a e}\fi
- \ifcat a#1\xint_dothis{e!*#1}\fi % and also the case of subexpressions (!)
- \xint_orthat {\expandafter\XINT_expr_scanfracpart_aa\string #1}%
+ \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
+ \ifcat a#1\xint_dothis{0\endcsname*#1}\fi
+ \if .#1\xint_dothis{\XINT_expr_gobz_startdec_a .}\fi
+ \if 0#1\xint_dothis\XINT_expr_gobz_scanint_d\fi
+ \xint_orthat {0\expandafter\endcsname \string#1}%
}%
-\def\XINT_expr_scanfracpart_aa #1%
+\def\XINT_expr_gobz_scanint_d #1%
{%
- \ifnum \xint_c_ix<1#1
- \expandafter\XINT_expr_scanfracpart_b
- \else
- \xint_afterfi {e!}%
- \fi
- #1%
+ \expandafter\XINT_expr_gobz_scanint_b\romannumeral-`0#1%
}%
-\def\XINT_expr_scanfracpart_b #1#2%
+\def\XINT_expr_gobz_startdec_a .#1%
{%
- \expandafter #1\romannumeral-`0\expandafter
- \XINT_expr_scanfracpart_a\romannumeral-`0#2%
+ \expandafter\XINT_expr_gobz_scandec_a\romannumeral-`0#1%
}%
-\def\XINT_expr_scanexppart_a #1#2%
+\def\XINT_expr_gobz_scandec_a #1%
{%
- \expandafter #1\romannumeral-`0\expandafter
- \XINT_expr_scanexppart_b\romannumeral-`0#2%
+ \if .#1\xint_dothis{0\endcsname..}\fi
+ \xint_orthat {\XINT_expr_gobz_scandec_b 0.#1}%
}%
-\def\XINT_expr_scanexppart_b #1%
+\def\XINT_expr_scandec_b #1.#2%
{%
- \ifcat \relax #1\xint_dothis{0!#1}\fi % stops the scan (incorrect syntax)
- \ifcat a#1\xint_dothis{0!*#1}\fi % idem
- \if +#1\xint_dothis {\XINT_expr_scanexppart_a +}\fi
- \if -#1\xint_dothis {\XINT_expr_scanexppart_a -}\fi
- \xint_orthat {\expandafter\XINT_expr_scanexppart_c\string #1}%
+ \ifcat \relax #2\expandafter\XINT_expr_scandec_endbycs\expandafter#2\fi
+ \ifnum\xint_c_ix<1\string#2 \else\expandafter\XINT_expr_scandec_c\fi
+ \string#2\expandafter\XINT_expr_scandec_d\the\numexpr #1-\xint_c_i.%
}%
-\def\XINT_expr_scanexppart_c #1%
+\def\XINT_expr_scandec_endbycs #1#2\XINT_expr_scandec_d
+ \the\numexpr#3-\xint_c_i.{[#3]\endcsname #1}%
+\def\XINT_expr_scandec_d #1.#2%
{%
- \ifnum \xint_c_ix<1#1
- \expandafter\XINT_expr_scanexppart_d
- \else
- \expandafter !%
- \fi
- #1%
+ \expandafter\XINT_expr_scandec_b
+ \the\numexpr #1\expandafter.\romannumeral-`0#2%
}%
-\def\XINT_expr_scanexppart_d #1#2%
+\def\XINT_expr_scandec_c\string #1#2\the\numexpr#3-\xint_c_i.%
{%
- \expandafter #1\romannumeral-`0\expandafter
- \XINT_expr_scanexppart_e\romannumeral-`0#2%
+ \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
+ \ifcat a#1\xint_dothis{[#3]\endcsname *#1}\fi
+ \xint_orthat {[#3]\expandafter\endcsname \string#1}%
}%
-\def\XINT_expr_scanexppart_e #1%
+\def\XINT_expr_gobz_scandec_b 0.#1%
{%
- \ifcat \relax #1\xint_dothis{!#1}\fi % stops the scan
- \ifcat a#1\xint_dothis{!*#1}\fi % idem
- \xint_orthat {\expandafter\XINT_expr_scanexppart_f\string #1}%
+ \ifcat \relax #1\expandafter\XINT_expr_gobz_scandec_endbycs\expandafter#1\fi
+ \ifnum\xint_c_ix<1\string#1 \else\expandafter\XINT_expr_gobz_scandec_c\fi
+ \string#1\expandafter\XINT_expr_scandec_d\the\numexpr\xint_c_mone.%
}%
-\def\XINT_expr_scanexppart_f #1%
+\def\XINT_expr_gobz_scandec_endbycs #1#2\xint_c_mone.{0[0]\endcsname #1}%
+\def\XINT_expr_gobz_scandec_c\string #1#2\xint_c_mone.%
{%
- \ifnum \xint_c_ix<1#1
- \expandafter\XINT_expr_scanexppart_d
- \else
- \expandafter !%
- \fi
- #1%
+ \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
+ \ifcat a#1\xint_dothis{0[0]\endcsname *#1}\fi
+ \xint_orthat {0[0]\expandafter\endcsname \string#1}%
}%
-\def\XINT_expr_scanhex_I #1%
+\def\XINT_expr_scanexp_a #1#2%
{%
- \expandafter\XINT_expr_getop\romannumeral-`0\expandafter
- \XINT_expr_lockscan\expandafter\XINT_expr_inhex
- \romannumeral-`0\XINT_expr_scanhexI_a
+ #1\expandafter\XINT_expr_scanexp_b\romannumeral-`0#2%
}%
-\def\XINT_expr_inhex #1.#2#3;% expanded inside \csname..\endcsname
+\def\XINT_expr_scanexp_b #1%
{%
- \if#2I\xintHexToDec{#1}%
- \else
- \xintiiMul{\xintiiPow{625}{\xintLength{#3}}}{\xintHexToDec{#1#3}}%
- [\the\numexpr-4*\xintLength{#3}]%
- \fi
+ \ifcat \relax #1\expandafter\XINT_expr_scanexp_endbycs\expandafter #1\fi
+ \ifnum\xint_c_ix<1\string#1 \else\expandafter\XINT_expr_scanexp_c\fi
+ \string#1\XINT_expr_scanexp_d
+}%
+\def\XINT_expr_scanexpr_endbycs#1#2\XINT_expr_scanexp_d {]\endcsname #1}%
+\def\XINT_expr_scanexp_d #1%
+{%
+ \expandafter\XINT_expr_scanexp_bb\romannumeral-`0#1%
+}%
+\def\XINT_expr_scanexp_c\string #1\XINT_expr_scanexp_d
+{%
+ \ifcat a#1\xint_dothis {]\endcsname *#1}\fi
+ \if +#1\xint_dothis {\XINT_expr_scanexp_a +}\fi
+ \if -#1\xint_dothis {\XINT_expr_scanexp_a -}\fi
+ \xint_orthat {]\expandafter\endcsname\string #1}%
+}%
+\def\XINT_expr_scanexp_bb #1%
+{%
+ \ifcat \relax #1\expandafter\XINT_expr_scanexp_endbycs_b\expandafter #1\fi
+ \ifnum\xint_c_ix<1\string#1 \else\expandafter\XINT_expr_scanexp_cb\fi
+ \string#1\XINT_expr_scanexp_db
+}%
+\def\XINT_expr_scanexp_endbycs_b#1#2\XINT_expr_scanexp_db {]\endcsname #1}%
+\def\XINT_expr_scanexp_db #1%
+{%
+ \expandafter\XINT_expr_scanexp_bb\romannumeral-`0#1%
+}%
+\def\XINT_expr_scanexp_cb\string #1\XINT_expr_scanexp_db
+{%
+ \ifcat a#1\xint_dothis {]\endcsname *#1}\fi
+ \xint_orthat {]\expandafter\endcsname\string #1}%
+}%
+\def\XINT_expr_scanhex_I #1% #1="
+{%
+ \expandafter\XINT_expr_getop\csname.=\expandafter
+ \XINT_expr_unlock_hex_in\csname.=\XINT_expr_scanhexI_a
}%
\def\XINT_expr_scanhexI_a #1%
{%
- \ifcat #1\relax\xint_dothis{.I;!#1}\fi
- \ifx !#1\xint_dothis{.I;!*!}\fi % tacit multiplication
+ \ifcat #1\relax\xint_dothis{.>\endcsname\endcsname #1}\fi
+ \ifx !#1\xint_dothis{.>\endcsname\endcsname*!}\fi % tacit multiplication
\xint_orthat {\expandafter\XINT_expr_scanhexI_aa\string #1}%
}%
\def\XINT_expr_scanhexI_aa #1%
@@ -425,24 +466,23 @@
\expandafter\xint_secondoftwo
\fi
{\expandafter\XINT_expr_scanhex_transition}%
- {\xint_afterfi {.I;!}}%
+ {\xint_afterfi {.>\endcsname\endcsname}}%
\fi
#1%
}%
\def\XINT_expr_scanhexI_b #1#2%
{%
- \expandafter #1\romannumeral-`0\expandafter
- \XINT_expr_scanhexI_a\romannumeral-`0#2%
+ #1\expandafter\XINT_expr_scanhexI_a\romannumeral-`0#2%
}%
\def\XINT_expr_scanhex_transition .#1%
{%
- \expandafter.\expandafter.\romannumeral-`0\expandafter
+ \expandafter.\expandafter.\expandafter
\XINT_expr_scanhexII_a\romannumeral-`0#1%
}%
\def\XINT_expr_scanhexII_a #1%
{%
- \ifcat #1\relax\xint_dothis{;!#1}\fi
- \ifx !#1\xint_dothis{;!*!}\fi % tacit multiplication
+ \ifcat #1\relax\xint_dothis{\endcsname\endcsname#1}\fi
+ \ifx !#1\xint_dothis{\endcsname\endcsname*!}\fi % tacit multiplication
\xint_orthat {\expandafter\XINT_expr_scanhexII_aa\string #1}%
}%
\def\XINT_expr_scanhexII_aa #1%
@@ -454,14 +494,13 @@
0\else1\fi\else0\fi\else1\fi\else0\fi 1%
\expandafter\XINT_expr_scanhexII_b
\else
- \xint_afterfi {;!}%
+ \xint_afterfi {\endcsname\endcsname}%
\fi
#1%
}%
\def\XINT_expr_scanhexII_b #1#2%
{%
- \expandafter #1\romannumeral-`0\expandafter
- \XINT_expr_scanhexII_a\romannumeral-`0#2%
+ #1\expandafter\XINT_expr_scanhexII_a\romannumeral-`0#2%
}%
\def\XINT_expr_scanfunc
{%
@@ -1221,9 +1260,10 @@
\let\XINT_expr_precedence_! \xint_c_x
\def\XINT_expr_op_! #1{\expandafter\XINT_expr_getop
\csname .=\xintFac{\XINT_expr_unlock #1}\endcsname }%
-\let\XINT_flexpr_op_!\XINT_expr_op_!
+\def\XINT_flexpr_op_! #1{\expandafter\XINT_expr_getop
+ \csname .=\XINTinFloatFac{\XINT_expr_unlock #1}\endcsname }%
\def\XINT_iiexpr_op_! #1{\expandafter\XINT_expr_getop
- \csname .=\xintiFac{\XINT_expr_unlock #1}\endcsname }%
+ \csname .=\xintiiFac{\XINT_expr_unlock #1}\endcsname }%
\catcode`[ 11
\catcode`* 11
\let\XINT_expr_precedence_[ \xint_c_vii
@@ -1346,11 +1386,18 @@
{\expandafter\XINT_expr_getop\csname .=\xintToggle{#1}\endcsname }%
\def\XINT_expr_onlitteral_protect #1)%
{\expandafter\XINT_expr_getop\csname .=\detokenize{#1}\endcsname }%
-\def\XINT_expr_func_unknown #1#2#3{\expandafter #1\expandafter #2\csname .=0\endcsname }%
+\def\XINT_expr_func_unknown #1#2#3%
+ {\expandafter #1\expandafter #2\csname .=0\endcsname }%
\def\XINT_expr_func_break #1#2#3%
-{\expandafter #1\expandafter #2\csname.=?\romannumeral-`0\XINT_expr_unlock #3\endcsname }%
+ {\expandafter #1\expandafter #2\csname.=?\romannumeral-`0\XINT_expr_unlock #3\endcsname }%
\let\XINT_flexpr_func_break \XINT_expr_func_break
\let\XINT_iiexpr_func_break \XINT_expr_func_break
+\def\XINT_expr_onlitteral_qint #1)%
+ {\expandafter\XINT_expr_getop\csname .=\xintiNum{#1}\endcsname }%
+\def\XINT_expr_onlitteral_qfrac #1)%
+ {\expandafter\XINT_expr_getop\csname .=\xintRaw{#1}\endcsname }%
+\def\XINT_expr_onlitteral_qfloat #1)%
+ {\expandafter\XINT_expr_getop\csname .=\XINTinFloatdigits{#1}\endcsname }%
\def\XINT_expr_onlitteral_seq
{\expandafter\XINT_expr_onlitteral_seq_f\romannumeral-`0\XINT_expr_onlitteral_seq_a {}}%
\def\XINT_expr_onlitteral_seq_f #1#2{\xint_c_xviii `{seqx}#2)\relax #1}%
@@ -1379,7 +1426,7 @@
\def\XINT_isbalanced_a #1({\XINT_isbalanced_b #1)\xint_bye }%
\def\XINT_isbalanced_b #1)#2%
{\xint_bye #2\XINT_isbalanced_c\xint_bye\XINT_isbalanced_error }%
-\def\XINT_isbalanced_error #1)\xint_bye {\m@ne}%
+\def\XINT_isbalanced_error #1)\xint_bye {\xint_c_mone}%
\def\XINT_isbalanced_c\xint_bye\XINT_isbalanced_error #1%
{\xint_bye #1\XINT_isbalanced_yes\xint_bye\XINT_isbalanced_d #1}%
\def\XINT_isbalanced_yes\xint_bye\XINT_isbalanced_d\xint_bye )\xint_bye {\xint_c_ }%
@@ -2167,10 +2214,11 @@
\romannumeral-`0\expandafter\XINT_xptwo_getab_b
\romannumeral-`0####2!{####1}{~xint#1}{xint#1}}%
}%
-}%
+}% cela aurait-il un sens d'ajouter Raw et iNum (à cause de qint, qfrac,
+ % qfloat?). Pas le temps d'y réfléchir. Je ne fais rien.
\xintFor #1 in {Num,Irr,Abs,iiAbs,Sgn,iiSgn,TFrac,Floor,iFloor,Ceil,iCeil,%
Sqr,iiSqr,iiSqrt,iiSqrtR,iiIsZero,iiIsNotZero,iiifNotZero,iiifSgn,%
- Odd,Even,iiOdd,iiEven,Opp,iiOpp,iiifZero,Fac,iFac,Bool,Toggle}\do
+ Odd,Even,iiOdd,iiEven,Opp,iiOpp,iiifZero,Fac,iiFac,Bool,Toggle}\do
{\toks0
\expandafter{\the\toks0%
\expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\expandafter
@@ -2178,6 +2226,13 @@
\expandafter\XINT_NEfork_one\romannumeral-`0####1!{~xint#1}{xint#1}{}{}}%
}%
}%
+\toks0
+ \expandafter{\the\toks0
+ \let\XINTinFloatFacNE\XINTinFloatFac
+ \def\XINTinFloatFac ##1{%
+ \expandafter\XINT_NEfork_one
+ \romannumeral-`0##1!{~XINTinFloatFac}{XINTinFloatFac}{}{}}%
+ }%
\xintFor #1 in {Add,Sub,Mul,Div,Power,E,Mod,SeqA::csv}\do
{\toks0
\expandafter{\the\toks0%