summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintexpr.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-11-08 23:51:15 +0000
committerKarl Berry <karl@freefriends.org>2014-11-08 23:51:15 +0000
commit9a870ba0873e5855067323ca60f8211fedfa23cc (patch)
treee5d74dfe6a59a441aefbe010a4818ab72a71a775 /Master/texmf-dist/tex/generic/xint/xintexpr.sty
parent4435db29aea2c716c788f96372d03d17a7cc6486 (diff)
xint (8nov14)
git-svn-id: svn://tug.org/texlive/trunk@35545 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/xint/xintexpr.sty')
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintexpr.sty163
1 files changed, 85 insertions, 78 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index a73c5736307..99d1f6fa2d2 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.1 (2014/10/28)
+%% The xint bundle v1.1a (2014/11/07)
%% Copyright (C) 2013-2014 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
@@ -81,7 +81,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2014/10/28 v1.1 Expandable expression parser (jfB)]%
+ [2014/11/07 v1.1a 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 }%
@@ -134,7 +134,7 @@
\def\XINT_iexpr_withopt [#1]%
{%
\expandafter\XINT_iexpr_wrap\expandafter
- {\the\numexpr \xint_zapspaces #1 \xint_bye\xint_bye\expandafter}%
+ {\the\numexpr \xint_zapspaces #1 \xint_gobble_i\expandafter}%
\romannumeral0\xintbareeval
}%
\def\XINT_iexpr_wrap #1#2%
@@ -155,7 +155,7 @@
\def\XINT_flexpr_withopt_a [#1]%
{%
\expandafter\XINT_flexpr_withopt_b\expandafter
- {\the\numexpr\xint_zapspaces #1 \xint_bye\xint_bye\expandafter}%
+ {\the\numexpr\xint_zapspaces #1 \xint_gobble_i\expandafter}%
\romannumeral0\xintbarefloateval
}%
\def\XINT_flexpr_withopt_b #1#2%
@@ -183,7 +183,7 @@
\def\XINT_::_end #1,#2{\xint_gobble_i #2}%
\def\xintCSV::csv #1{\expandafter\XINT_csv::_a\romannumeral-`0#1,^,}%
\def\XINT_csv::_a {\XINT_csv::_b {}}%
-\def\XINT_csv::_b #1#2,{\XINT_csv::_c #2,{#1}}%
+\def\XINT_csv::_b #1#2,{\expandafter\XINT_csv::_c \romannumeral-`0#2,{#1}}%
\def\XINT_csv::_c #1{\if ^#1\expandafter\XINT_::_end\fi\XINT_csv::_d #1}%
\def\XINT_csv::_d #1,#2{\XINT_csv::_b {#2, #1}}% possibly, item #1 is empty.
\def\xintSPRaw {\romannumeral0\xintspraw }%
@@ -193,7 +193,7 @@
\def\XINT_spraw_p #1[\W]{\xintpraw {#1}}%
\def\xintSPRaw::csv #1{\romannumeral0\expandafter\XINT_spraw::_a\romannumeral-`0#1,^,}%
\def\XINT_spraw::_a {\XINT_spraw::_b {}}%
-\def\XINT_spraw::_b #1#2,{\XINT_spraw::_c #2,{#1}}%
+\def\XINT_spraw::_b #1#2,{\expandafter\XINT_spraw::_c \romannumeral-`0#2,{#1}}%
\def\XINT_spraw::_c #1{\if ,#1\xint_dothis\XINT_spraw::_e\fi
\if ^#1\xint_dothis\XINT_::_end\fi
\xint_orthat\XINT_spraw::_d #1}%
@@ -201,7 +201,7 @@
\def\XINT_spraw::_e #1,#2{\XINT_spraw::_b {#2, #1}}%
\def\xintIsTrue::csv #1{\romannumeral0\expandafter\XINT_istrue::_a\romannumeral-`0#1,^,}%
\def\XINT_istrue::_a {\XINT_istrue::_b {}}%
-\def\XINT_istrue::_b #1#2,{\XINT_istrue::_c #2,{#1}}%
+\def\XINT_istrue::_b #1#2,{\expandafter\XINT_istrue::_c \romannumeral-`0#2,{#1}}%
\def\XINT_istrue::_c #1{\if ,#1\xint_dothis\XINT_istrue::_e\fi
\if ^#1\xint_dothis\XINT_::_end\fi
\xint_orthat\XINT_istrue::_d #1}%
@@ -210,7 +210,7 @@
\def\XINT_:::_end #1,#2#3{\xint_gobble_i #3}%
\def\xintRound::csv #1#2{\romannumeral0\expandafter\XINT_round::_b\expandafter
{\the\numexpr#1\expandafter}\expandafter{\expandafter}\romannumeral-`0#2,^,}%
-\def\XINT_round::_b #1#2#3,{\XINT_round::_c #3,{#1}{#2}}%
+\def\XINT_round::_b #1#2#3,{\expandafter\XINT_round::_c \romannumeral-`0#3,{#1}{#2}}%
\def\XINT_round::_c #1{\if ,#1\xint_dothis\XINT_round::_e\fi
\if ^#1\xint_dothis\XINT_:::_end\fi
\xint_orthat\XINT_round::_d #1}%
@@ -229,7 +229,7 @@
\def\XINT_infloat::_e #1,#2#3{\XINT_infloat::_b {#2}{#3, #1}}%
\def\xintPFloat::csv #1#2{\romannumeral0\expandafter\XINT_pfloat::_b\expandafter
{\the\numexpr #1\expandafter}\expandafter{\expandafter}\romannumeral-`0#2,^,}%
-\def\XINT_pfloat::_b #1#2#3,{\XINT_pfloat::_c #3,{#1}{#2}}%
+\def\XINT_pfloat::_b #1#2#3,{\expandafter\XINT_pfloat::_c \romannumeral-`0#3,{#1}{#2}}%
\def\XINT_pfloat::_c #1{\if ,#1\xint_dothis\XINT_pfloat::_e\fi
\if ^#1\xint_dothis\XINT_:::_end\fi
\xint_orthat\XINT_pfloat::_d #1}%
@@ -522,7 +522,7 @@
\xint_orthat {\XINT_expr_scanop_a #1}%
}%
\def\XINT_expr_binopwrd #1#2'{\expandafter\XINT_expr_foundop_a
- \csname XINT_expr_itself_\xint_zapspaces #2 \xint_bye\xint_bye\endcsname #1}%
+ \csname XINT_expr_itself_\xint_zapspaces #2 \xint_gobble_i\endcsname #1}%
\def\XINT_expr_scanop_a #1#2#3%
{\expandafter\XINT_expr_scanop_b\expandafter #1\expandafter #2\romannumeral-`0#3}%
\def\XINT_expr_scanop_b #1#2#3%
@@ -667,7 +667,7 @@
\csname #2#6\expandafter\endcsname
\csname XINT_expr_precedence_#3\endcsname {#1}%
}%
-\xintFor #1 in {expr, flexpr, iiexpr} \do {%
+\xintFor #1 in {expr, flexpr} \do {%
\def\XINT_tmpa ##1{\XINT_tmpb {#1}{xint}##1}%
\xintApplyInline {\XINT_tmpa }{%
{|{iii}{vi}{OR}}%
@@ -679,8 +679,8 @@
{{<=}{v}{vi}{LtorEq}}%
{{>=}{v}{vi}{GtorEq}}%
{{!=}{v}{vi}{Neq}}%
- {{..}{iii}{vi}{Seq::csv}}% will get redefined to use \xintiiSeq::csv in xintiiexpr
- {{//}{vii}{vii}{DivTrunc}}% will get redefined for xintiiexpr
+ {{..}{iii}{vi}{Seq::csv}}%
+ {{//}{vii}{vii}{DivTrunc}}%
{{/:}{vii}{vii}{Mod}}%
}%
}%
@@ -706,6 +706,15 @@
}%
\def\XINT_tmpa #1{\XINT_tmpb {iiexpr}{xint}#1}%
\xintApplyInline {\XINT_tmpa }{%
+ {|{iii}{vi}{OR}}%
+ {&{iv}{vi}{AND}}%
+ {{xor}{iii}{vi}{XOR}}%
+ {<{v}{vi}{iiLt}}%
+ {>{v}{vi}{iiGt}}%
+ {={v}{vi}{iiEq}}%
+ {{<=}{v}{vi}{iiLtorEq}}%
+ {{>=}{v}{vi}{iiGtorEq}}%
+ {{!=}{v}{vi}{iiNeq}}%
{+{vi}{vi}{iiAdd}}%
{-{vi}{vi}{iiSub}}%
{*{vii}{vii}{iiMul}}%
@@ -1225,13 +1234,13 @@
\let\XINT_expr_precedence_[ \xint_c_vii
\def\XINT_expr_op_[ #1#2]{\expandafter\XINT_expr_getop
\csname .=\xintE{\XINT_expr_unlock #1}%
- {\xint_zapspaces #2 \xint_bye\xint_bye}\endcsname}%
+ {\xint_zapspaces #2 \xint_gobble_i}\endcsname}%
\def\XINT_iiexpr_op_[ #1#2]{\expandafter\XINT_expr_getop
\csname .=\xintiiE{\XINT_expr_unlock #1}%
- {\xint_zapspaces #2 \xint_bye\xint_bye}\endcsname}%
+ {\xint_zapspaces #2 \xint_gobble_i}\endcsname}%
\def\XINT_flexpr_op_[ #1#2]{\expandafter\XINT_expr_getop
\csname .=\XINTinFloatE{\XINT_expr_unlock #1}%
- {\xint_zapspaces #2 \xint_bye\xint_bye}\endcsname}%
+ {\xint_zapspaces #2 \xint_gobble_i}\endcsname}%
\catcode`[ 12
\catcode`* 12
\def\XINT_expr_op__ #1% op__ with two _'s
@@ -1252,14 +1261,14 @@
\let\XINT_iiexpr_op__ \XINT_expr_op__
\catcode`: 12
\def\xintdefvar #1:=#2;{\expandafter\odef
- \csname XINT_expr_var_\xint_zapspaces #1 \xint_bye\xint_bye\endcsname
+ \csname XINT_expr_var_\xint_zapspaces #1 \xint_gobble_i\endcsname
{\expandafter\empty\romannumeral0\xintbareeval #2\relax }}%
\def\xintdefiivar #1:=#2;{\expandafter\odef
- \csname XINT_expr_var_\xint_zapspaces #1 \xint_bye\xint_bye\endcsname
+ \csname XINT_expr_var_\xint_zapspaces #1 \xint_gobble_i\endcsname
{\expandafter\empty\romannumeral0\xintbareiieval #2\relax }%
}%
\def\xintdeffloatvar #1:=#2;{\expandafter\odef
- \csname XINT_expr_var_\xint_zapspaces #1 \xint_bye\xint_bye\endcsname
+ \csname XINT_expr_var_\xint_zapspaces #1 \xint_gobble_i\endcsname
{\expandafter\empty\romannumeral0\xintbarefloateval #2\relax }%
}%
\catcode`: 11
@@ -1442,7 +1451,7 @@
\def\XINT_flexpr_func_opx #1#2{\XINT_allexpr_opx \xintfloatexpr }%
\def\XINT_iiexpr_func_opx #1#2{\XINT_allexpr_opx \xintiiexpr }%
\def\XINT_allexpr_opx #1#2#3#4#5%
-{% au d^^e9part on avait op(#4,#3=#2 (^^e9valu^^e9 ici)) #3=la variable, #4=expression, #5=+ ou*.
+{% au d\'epart on avait op(#4,#3=#2 (\'evalu\'e ici)) #3=la variable, #4=expression, #5=+ ou*.
\expandafter\XINT_expr_getop\romannumeral0\expandafter\XINT_expr_op:_a
\csname XINT_expr_op:_#5\expandafter\endcsname
\romannumeral-`0\XINT_expr_unlock #2!#5#1#3{#4}%
@@ -1727,6 +1736,10 @@
\expandafter\xint_firstofone\romannumeral-`0#1,^,1}%
\def\xintLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintlcm
\expandafter\xint_firstofone\romannumeral-`0#1,^,0}%
+\def\xintiiGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiigcd
+ \expandafter\xint_firstofone\romannumeral-`0#1,^,1}%
+\def\xintiiLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiilcm
+ \expandafter\xint_firstofone\romannumeral-`0#1,^,0}%
\def\XINTinFloatdigits {\XINTinFloat [\XINTdigits]}%
\def\XINTinFloatSqrtdigits {\XINTinFloatSqrt [\XINTdigits]}%
\def\XINTinFloatMaxof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintmax
@@ -1776,7 +1789,7 @@
\def\XINT_expr_func_frac #1#2#3%
{\expandafter #1\expandafter #2\csname.=\xintTFrac {\XINT_expr_unlock #3}\endcsname }%
\def\XINT_flexpr_func_frac #1#2#3{\expandafter #1\expandafter #2\csname
- .=\XINTinFloatFrac {\XINT_expr_unlock #3}\endcsname }%
+ .=\XINTinFloatFracdigits {\XINT_expr_unlock #3}\endcsname }%
\def\XINT_expr_func_floor #1#2#3%
{\expandafter #1\expandafter #2\csname .=\xintFloor {\XINT_expr_unlock #3}\endcsname }%
\let\XINT_flexpr_func_floor\XINT_expr_func_floor
@@ -1809,6 +1822,8 @@
\let\XINT_flexpr_func_sqrt\XINT_expr_func_sqrt
\def\XINT_iiexpr_func_sqrt #1#2#3%
{\expandafter #1\expandafter #2\csname.=\xintiiSqrt {\XINT_expr_unlock #3}\endcsname }%
+\def\XINT_iiexpr_func_sqrtr #1#2#3%
+ {\expandafter #1\expandafter #2\csname.=\xintiiSqrtR {\XINT_expr_unlock #3}\endcsname }%
\def\XINT_expr_func_round #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
@@ -1900,12 +1915,16 @@
{\expandafter #1\expandafter #2\csname
.=\xintGCDof:csv{\XINT_expr_unlock #3}\endcsname }%
\let\XINT_flexpr_func_gcd\XINT_expr_func_gcd
-\let\XINT_iiexpr_func_gcd\XINT_expr_func_gcd
+\def\XINT_iiexpr_func_gcd #1#2#3%
+ {\expandafter #1\expandafter #2\csname
+ .=\xintiiGCDof:csv{\XINT_expr_unlock #3}\endcsname }%
\def\XINT_expr_func_lcm #1#2#3%
{\expandafter #1\expandafter #2\csname
.=\xintLCMof:csv{\XINT_expr_unlock #3}\endcsname }%
\let\XINT_flexpr_func_lcm\XINT_expr_func_lcm
-\let\XINT_iiexpr_func_lcm\XINT_expr_func_lcm
+\def\XINT_iiexpr_func_lcm #1#2#3%
+ {\expandafter #1\expandafter #2\csname
+ .=\xintiiLCMof:csv{\XINT_expr_unlock #3}\endcsname }%
\def\XINT_expr_func_max #1#2#3%
{\expandafter #1\expandafter #2\csname
.=\xintMaxof:csv{\XINT_expr_unlock #3}\endcsname }%
@@ -2133,12 +2152,12 @@
\def\XINT_xptwo_getab_b #1#2!#3%
{\expandafter\XINT_xptwo_getab_c\romannumeral-`0#3!#1{#1#2}}%
\def\XINT_xptwo_getab_c #1#2!#3#4#5#6{#1#3{#5}{#6}{#1#2}{#4}}%
-\def\xint_ddfork #1$$#2#3\krof {#2}%
+\def\xint_ddfork #1$$#2#3\krof {#2}% $$
\def\XINT_NEfork #1#2{\xint_ddfork
#1#2\XINT_expr_RLApply:::csv
#1$\XINT_expr_RApply::csv% $
$#2\XINT_expr_LApply::csv% $
- $${\XINT_NEfork_nn #1#2}%
+ $${\XINT_NEfork_nn #1#2}% $$
\krof }%
\def\XINT_NEfork_nn #1#2#3#4{%
\if #1##\xint_dothis{#3}\fi
@@ -2158,76 +2177,65 @@
Lt,Gt,Eq,LtorEq,GtorEq,Neq,AND,OR,XOR,iQuo,iRem,Add,Sub,Mul,Div,Pow,E,%
iiAdd,iiSub,iiMul,iiPow,iiQuo,iiRem,iiE,SeqA::csv,iiSeqA::csv}\do
{\toks0
- \expandafter{\the\toks0
- \expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\endcsname
- \expandafter\def\csname xint#1\endcsname ####1####2{%
+ \expandafter{\the\toks0% no space! (makes shorter macro in the end)
+ \expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\expandafter
+ \endcsname\expandafter\def\csname xint#1\endcsname ####1####2{%
\expandafter\XINT_NEfork
\romannumeral-`0\expandafter\XINT_xptwo_getab_b
\romannumeral-`0####2!{####1}{~xint#1}{xint#1}}%
}%
}%
\xintFor #1 in {Num,Irr,Abs,iiAbs,Sgn,iiSgn,TFrac,Floor,iFloor,Ceil,iCeil,%
- Sqr,iiSqr,iSqrt,iiIsZero,iiIsNotZero,iiifNotZero,iiifSgn,Odd,Even,iiOdd,iiEven,%
- Opp,iiOpp,iiifZero,Fac,iFac,Bool,Toggle}\do
+ Sqr,iiSqr,iiSqrt,iiSqrtR,iiIsZero,iiIsNotZero,iiifNotZero,iiifSgn,%
+ Odd,Even,iiOdd,iiEven,Opp,iiOpp,iiifZero,Fac,iFac,Bool,Toggle}\do
{\toks0
- \expandafter{\the\toks0
- \expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\endcsname
- \expandafter\def\csname xint#1\endcsname ####1{%
+ \expandafter{\the\toks0%
+ \expandafter\let\csname xint#1NE\expandafter\endcsname\csname xint#1\expandafter
+ \endcsname\expandafter\def\csname xint#1\endcsname ####1{%
\expandafter\XINT_NEfork_one\romannumeral-`0####1!{~xint#1}{xint#1}{}{}}%
}%
}%
\xintFor #1 in {Add,Sub,Mul,Div,Power,E,Mod,SeqA::csv}\do
{\toks0
- \expandafter{\the\toks0
+ \expandafter{\the\toks0%
\expandafter\let\csname XINTinFloat#1NE\expandafter\endcsname
- \csname XINTinFloat#1\endcsname
+ \csname XINTinFloat#1\expandafter\endcsname
\expandafter\def\csname XINTinFloat#1\endcsname ####1####2{%
\expandafter\XINT_NEfork
\romannumeral-`0\expandafter\XINT_xptwo_getab_b
\romannumeral-`0####2!{####1}{~XINTinFloat#1}{XINTinFloat#1}}%
}%
}%
-\toks0
- \expandafter{\the\toks0
- \let\xintSeqB::csvNE\xintSeqB::csv
- \def\xintSeqB::csv ##1##2{%
- \expandafter\XINT_NEfork
- \romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0##2!{##1}{$noexpand$xintSeqB:f:csv}{xintSeqB::csv}}%
- \let\xintiiSeqB::csvNE\xintiiSeqB::csv
- \def\xintiiSeqB::csv ##1##2{%
- \expandafter\XINT_NEfork
- \romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0##2!{##1}{$noexpand$xintiiSeqB:f:csv}{xintiiSeqB::csv}}%
- \let\XINTinFloatSeqB::csvNE\XINTinFloatSeqB::csv
- \def\XINTinFloatSeqB::csv ##1##2{%
- \expandafter\XINT_NEfork
- \romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0##2!{##1}{$noexpand$XINTinFloatSeqB:f:csv}{XINTinFloatSeqB::csv}}%
- \let\xintSeq::csvNE\xintSeq::csv
- \def\xintSeq::csv ##1##2{%
- \expandafter\XINT_NEfork
- \romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0##2!{##1}{$noexpand$xintSeq::csv}{xintSeq::csv}}%
- \let\xintiiSeq::csvNE\xintiiSeq::csv
- \def\xintiiSeq::csv ##1##2{%
+\xintFor #1 in {XINTinFloatdigits,XINTinFloatFracdigits,XINTinFloatSqrtdigits}\do
+{\toks0
+ \expandafter{\the\toks0%
+ \expandafter\let\csname #1NE\expandafter\endcsname\csname #1\expandafter
+ \endcsname\expandafter\def\csname #1\endcsname ####1{\expandafter
+ \XINT_NEfork_one\romannumeral-`0####1!{~#1}{#1}{}{}}%
+ }%
+}%
+\xintFor #1 in {xintSeq::csv,xintiiSeq::csv,XINTinFloatSeq::csv}\do
+ {\toks0
+ \expandafter{\the\toks0% no space
+ \expandafter\let\csname #1NE\expandafter\endcsname\csname #1\expandafter
+ \endcsname\expandafter\def\csname #1\endcsname ####1####2{%
\expandafter\XINT_NEfork
\romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0##2!{##1}{$noexpand$xintiiSeq::csv}{xintiiSeq::csv}}%
- \let\XINTinFloatSeq::csvNE\XINTinFloatSeq::csv
- \def\XINTinFloatSeq::csv ##1##2{%
+ \romannumeral-`0####2!{####1}{$noexpand$#1}{#1}}%
+ }%
+}%
+\xintFor #1 in {xintSeqB,xintiiSeqB,XINTinFloatSeqB}\do
+ {\toks0
+ \expandafter{\the\toks0% no space
+ \expandafter\let\csname #1::csvNE\expandafter\endcsname\csname #1::csv\expandafter
+ \endcsname\expandafter\def\csname #1::csv\endcsname ####1####2{%
\expandafter\XINT_NEfork
\romannumeral-`0\expandafter\XINT_xptwo_getab_b
- \romannumeral-`0##2!{##1}{$noexpand$XINTinFloatSeq::csv}{XINTinFloatSeq::csv}}%
- \let\XINTinFloatFracNE\XINTinFloatFrac
- \def\XINTinFloatFrac ##1{\expandafter\XINT_NEfork_one\romannumeral-`0##1!%
- {~XINTinFloatFrac}{XINTinFloatFrac}{}{}}%
- \let\XINTinFloatdigitsNE\XINTinFloatdigits
- \def\XINTinFloatdigits ##1{\expandafter\XINT_NEfork_one\romannumeral-`0##1!%
- {~XINTinFloatdigits}{XINTinFloatdigits}{}{}}%
- \let\XINTinFloatSqrtdigitsNE\XINTinFloatSqrtdigits
- \def\XINTinFloatSqrtdigits ##1{\expandafter\XINT_NEfork_one\romannumeral-`0##1!%
- {~XINTinFloatSqrtdigits}{XINTinFloatSqrtdigits}{}{}}%
+ \romannumeral-`0####2!{####1}{$noexpand$#1:f:csv}{#1::csv}}%
+ }%
+}%
+\toks0
+ \expandafter{\the\toks0
\let\XINTinFloatNE\XINTinFloat
\def\XINTinFloat [##1]##2{% not ultimately general, but got tired
\expandafter\XINT_NEfork_one
@@ -2240,12 +2248,11 @@
\xintFor #1 in {ANDof,ORof,XORof,iiMaxof,iiMinof,iiSum,iiPrd,
GCDof,LCMof,Sum,Prd,Maxof,Minof}\do
{\toks0
- \expandafter{\the\toks0 \expandafter\def\csname xint#1:csv\endcsname {~xint#1:csv}}%
+ \expandafter{\the\toks0\expandafter\def\csname xint#1:csv\endcsname {~xint#1:csv}}%
}%
-\xintFor #1 in {Maxof,Minof,Sum,Prd}\do
+\xintFor #1 in {XINTinFloatMaxof,XINTinFloatMinof,XINTinFloatSum,XINTinFloatPrd}\do
{\toks0
- \expandafter{\the\toks0
- \expandafter\def\csname XINTinFloat#1:csv\endcsname {~XINTinFloat#1:csv}}%
+ \expandafter{\the\toks0\expandafter\def\csname #1:csv\endcsname {~#1:csv}}%
}%
\expandafter\def\expandafter\XINT_expr_redefinemacros\expandafter
{\the\toks0
@@ -2299,8 +2306,8 @@
{@
\def\XINT_tmpa %%1%%2%%3%%4%%5%%6%%7%%8%%9{%2}@
\XINT_expr_redefinemacros
- \def~{$noexpand$}@ vvv v^^e9rifier si vraiment besoin pour ^ et !
- \catcode`: 11 \catcode`_ 11 @ \catcode`^ 11 \catcode`! 11
+ \def~{$noexpand$}@
+ \catcode`: 11 \catcode`_ 11
\catcode`# 12 \catcode`~ 13 \escapechar 126
\endlinechar -1 \everyeof {\noexpand }@
\edef\XINT_tmpb