summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/xint/xintexpr.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-12-06 23:55:02 +0000
committerKarl Berry <karl@freefriends.org>2017-12-06 23:55:02 +0000
commit80243f823ee9dede0a64eb58a955e119acfa97f4 (patch)
tree78142d2ecc223980b99572a546d4ad362dbbc14d /Master/texmf-dist/tex/generic/xint/xintexpr.sty
parentca00616c46add04269a656e97f1d252a8013077f (diff)
xint (7dec17)
git-svn-id: svn://tug.org/texlive/trunk@46001 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.sty199
1 files changed, 127 insertions, 72 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index 15789f2d24e..610ba1449c2 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.2o 2017/08/29
+%% The xint bundle 1.2p 2017/12/05
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
@@ -81,7 +81,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2017/08/29 1.2o Expandable expression parser (JFB)]%
+ [2017/12/05 1.2p Expandable expression parser (JFB)]%
\catcode`! 11
\let\XINT_Cmp \xintiiCmp
\def\xint_gob_til_! #1!{}% ! with catcode 11
@@ -95,7 +95,8 @@
{\expandafter\XINT_expr_inhex\romannumeral`&&@\XINT_expr_unlock#1;}%
\def\XINT_expr_inhex #1.#2#3;% expanded inside \csname..\endcsname
{%
- \if#2>\xintHexToDec{#1}%
+ \if#2>%
+ \xintHexToDec{#1}%
\else
\xintiiMul{\xintiiPow{625}{\xintLength{#3}}}{\xintHexToDec{#1#3}}%
[\the\numexpr-4*\xintLength{#3}]%
@@ -303,11 +304,11 @@
\def\XINT_expr_scan_nbr_or_func #1% this #1 has necessarily here catcode 12
{%
\if "#1\xint_dothis \XINT_expr_scanhex_I\fi
- \if `#1\xint_dothis {\XINT_expr_onlitteral_`}\fi
+ \if `#1\xint_dothis {\XINT_expr_onliteral_`}\fi
\ifnum \xint_c_ix<1#1 \xint_dothis \XINT_expr_startint\fi
\xint_orthat \XINT_expr_scanfunc #1%
}%
-\def\XINT_expr_onlitteral_` #1#2#3({\xint_c_xviii `{#2}}%
+\def\XINT_expr_onliteral_` #1#2#3({\xint_c_xviii `{#2}}%
\catcode96 12 % `
\def\XINT_expr_startint #1%
{%
@@ -743,12 +744,12 @@
\XINT_expr_defbin_b {expr} {..} {iii}{vi} {xintSeq::csv}%
\XINT_expr_defbin_b {flexpr}{..} {iii}{vi} {xintSeq::csv}%
\XINT_expr_defbin_b {iiexpr}{..} {iii}{vi} {xintiiSeq::csv}%
-\XINT_expr_defbin_b {expr} {//} {vii}{vii}{xintDivTrunc}%
-\XINT_expr_defbin_b {flexpr}{//} {vii}{vii}{xintDivTrunc}%
-\XINT_expr_defbin_b {iiexpr}{//} {vii}{vii}{xintiiDivTrunc}%
-\XINT_expr_defbin_b {expr} {/:} {vii}{vii}{xintMod}%
-\XINT_expr_defbin_b {flexpr}{/:} {vii}{vii}{xintMod}%
-\XINT_expr_defbin_b {iiexpr}{/:} {vii}{vii}{xintiiMod}%
+\XINT_expr_defbin_b {expr} {//} {vii}{vii}{xintDivFloor}% CHANGED IN 1.2p!
+\XINT_expr_defbin_b {flexpr}{//} {vii}{vii}{XINTinFloatDivFloor}% "
+\XINT_expr_defbin_b {iiexpr}{//} {vii}{vii}{xintiiDivFloor}% "
+\XINT_expr_defbin_b {expr} {/:} {vii}{vii}{xintMod}% "
+\XINT_expr_defbin_b {flexpr}{/:} {vii}{vii}{XINTinFloatMod}% "
+\XINT_expr_defbin_b {iiexpr}{/:} {vii}{vii}{xintiiMod}% "
\XINT_expr_defbin_b {expr} + {vi}{vi} {xintAdd}%
\XINT_expr_defbin_b {flexpr} + {vi}{vi} {XINTinFloatAdd}%
\XINT_expr_defbin_b {iiexpr} + {vi}{vi} {xintiiAdd}%
@@ -1385,8 +1386,8 @@
\ifcsname XINT_#3_func_##1\endcsname
\xint_dothis{\expandafter\expandafter
\csname XINT_#3_func_##1\endcsname\romannumeral`&&@#2}\fi
- \ifcsname XINT_expr_onlitteral_##1\endcsname
- \xint_dothis{\csname XINT_expr_onlitteral_##1\endcsname}\fi
+ \ifcsname XINT_expr_onliteral_##1\endcsname
+ \xint_dothis{\csname XINT_expr_onliteral_##1\endcsname}\fi
\xint_orthat{\XINT_expr_unknown_function {##1}%
\expandafter\XINT_expr_func_unknown\romannumeral`&&@#2}%
}%
@@ -1400,21 +1401,21 @@
}%
\def\XINT_expr_func_unknown #1#2#3%
{\expandafter #1\expandafter #2\csname .=0\endcsname }%
-\def\XINT_expr_onlitteral_bool #1)%
+\def\XINT_expr_onliteral_bool #1)%
{\expandafter\XINT_expr_getop\csname .=\xintBool{#1}\endcsname }%
-\def\XINT_expr_onlitteral_togl #1)%
+\def\XINT_expr_onliteral_togl #1)%
{\expandafter\XINT_expr_getop\csname .=\xintToggle{#1}\endcsname }%
-\def\XINT_expr_onlitteral_protect #1)%
+\def\XINT_expr_onliteral_protect #1)%
{\expandafter\XINT_expr_getop\csname .=\detokenize{#1}\endcsname }%
\def\XINT_expr_func_break #1#2#3%
{\expandafter #1\expandafter #2\csname.=?\romannumeral`&&@\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)%
+\def\XINT_expr_onliteral_qint #1)%
{\expandafter\XINT_expr_getop\csname .=\xintiNum{#1}\endcsname }%
-\def\XINT_expr_onlitteral_qfrac #1)%
+\def\XINT_expr_onliteral_qfrac #1)%
{\expandafter\XINT_expr_getop\csname .=\xintRaw{#1}\endcsname }%
-\def\XINT_expr_onlitteral_qfloat #1)%
+\def\XINT_expr_onliteral_qfloat #1)%
{\expandafter\XINT_expr_getop\csname .=\XINTinFloatdigits{#1}\endcsname }%
\def\XINT_expr_op__ #1% op__ with two _'s
{%
@@ -1432,25 +1433,54 @@
\let\XINT_flexpr_op__ \XINT_expr_op__
\let\XINT_iiexpr_op__ \XINT_expr_op__
\catcode`* 11
-\def\XINT_expr_defvar #1#2#3;{%
- \edef\XINT_expr_tmpa{#2}%
- \edef\XINT_expr_tmpa {\xint_zapspaces_o\XINT_expr_tmpa}%
- \ifnum\expandafter\xintLength\expandafter{\XINT_expr_tmpa}=\z@
- \xintMessage {xintexpr}{Warning}
- {Error: impossible to declare variable with empty name.}%
- \else
- \edef\XINT_expr_tmpb {\romannumeral0#1#3\relax }%
- \expandafter\edef\csname XINT_expr_var_\XINT_expr_tmpa\endcsname
- {\expandafter\noexpand\XINT_expr_tmpb}%
- \expandafter\edef\csname XINT_expr_onlitteral_\XINT_expr_tmpa\endcsname
- {\XINT_expr_precedence_*** *\expandafter\noexpand\XINT_expr_tmpb (}%
- \ifxintverbose\xintMessage {xintexpr}{Info}
- {Variable "\XINT_expr_tmpa" defined with value
- \expandafter\XINT_expr_unlock\XINT_expr_tmpb.}%
- \fi
- \fi
+\def\XINT_expr_defvar_one #1#2%
+{%
+ \expandafter\edef\csname XINT_expr_var_#1\endcsname
+ {\expandafter\noexpand#2}%
+ \expandafter\edef\csname XINT_expr_onliteral_#1\endcsname
+ {\XINT_expr_precedence_*** *\expandafter\noexpand#2(}%
+ \ifxintverbose\xintMessage{xintexpr}{Info}
+ {Variable "#1" defined with value \expandafter\XINT_expr_unlock#2.}%
+ \fi
}%
\catcode`* 12
+\def\XINT_expr_defvar #1#2#3;%
+{%
+ \edef\XINT_expr_tmpa{#2}%
+ \edef\XINT_expr_tmpa{\xint_zapspaces_o\XINT_expr_tmpa}%
+ \edef\XINT_expr_tmpc{\xintCSVLength{\XINT_expr_tmpa}}%
+ \ifcase\XINT_expr_tmpc
+ \xintMessage {xintexpr}{Warning}
+ {Aborting: impossible to declare variable with empty name.}%
+ \or
+ \edef\XINT_expr_tmpb{\romannumeral0#1#3\relax}%
+ \XINT_expr_defvar_one\XINT_expr_tmpa\XINT_expr_tmpb
+ \else
+ \edef\XINT_expr_tmpb
+ {\expandafter\XINT_expr_unlock\romannumeral0#1#3\relax}%
+ \edef\XINT_expr_tmpd{\xintCSVLength{\XINT_expr_tmpb}}%
+ \ifnum\XINT_expr_tmpc=\XINT_expr_tmpd\space
+ \xintAssignArray\xintCSVtoList\XINT_expr_tmpa\to\XINT_expr_tmpvar
+ \xintAssignArray
+ \xintApply\XINT_expr_lockit{\xintCSVtoList\XINT_expr_tmpb}%
+ \to\XINT_expr_tmpval
+ \def\XINT_expr_tmpd{1}%
+ \xintloop
+ \expandafter\XINT_expr_defvar_one
+ \csname XINT_expr_tmpvar\XINT_expr_tmpd\expandafter\endcsname
+ \csname XINT_expr_tmpval\XINT_expr_tmpd\endcsname
+ \ifnum\XINT_expr_tmpd<\XINT_expr_tmpc\space
+ \edef\XINT_expr_tmpd{\the\numexpr\XINT_expr_tmpd+1}%
+ \repeat
+ \xintRelaxArray\XINT_expr_tmpvar
+ \xintRelaxArray\XINT_expr_tmpval
+ \else
+ \xintMessage {xintexpr}{Warning}
+ {Aborting: mismatch between number of variables (\XINT_expr_tmpc)
+ and number of values (\XINT_expr_tmpd).}%
+ \fi
+ \fi
+}%
\catcode`: 12
\def\xintdefvar #1:={\XINT_expr_defvar\xintbareeval {#1}}%
\def\xintdefiivar #1:={\XINT_expr_defvar\xintbareiieval {#1}}%
@@ -1468,7 +1498,7 @@
\else
\expandafter\edef\csname XINT_expr_var_\XINT_expr_tmpa\endcsname
{\csname .=0\endcsname\noexpand\XINT_expr_undefined {\XINT_expr_tmpa}}%
- \expandafter\edef\csname XINT_expr_onlitteral_\XINT_expr_tmpa\endcsname
+ \expandafter\edef\csname XINT_expr_onliteral_\XINT_expr_tmpa\endcsname
{\csname .=0\endcsname\noexpand\XINT_expr_undefined {\XINT_expr_tmpa}*}%
\ifxintverbose\xintMessage {xintexpr}{Info}
{Variable \XINT_expr_tmpa\space has been ``unassigned''.}%
@@ -1485,7 +1515,7 @@
{%
\expandafter\def\csname XINT_expr_var_#1\endcsname ##1\relax !#1##2%
{##2##1\relax !#1##2}%
- \expandafter\def\csname XINT_expr_onlitteral_#1\endcsname ##1\relax !#1##2%
+ \expandafter\def\csname XINT_expr_onliteral_#1\endcsname ##1\relax !#1##2%
{\XINT_expr_precedence_*** *##2(##1\relax !#1##2}%
}%
\xintApplyUnbraced \XINT_expr_makedummy {abcdefghijklmnopqrstuvwxyz}%
@@ -1497,7 +1527,7 @@
\fi
}%
\edef\XINT_expr_var_nil {\expandafter\noexpand\csname .= \endcsname}%
-\edef\XINT_expr_onlitteral_nil
+\edef\XINT_expr_onliteral_nil
{\XINT_expr_precedence_*** *\expandafter\noexpand\csname .= \endcsname (}%
\catcode`* 12
\edef\XINT_expr_var_omit #1\relax !{1\string !?!\relax !}%
@@ -1511,13 +1541,13 @@
\expandafter\def\csname XINT_expr_var_@2\endcsname #1~#2#3{#3#1~#2#3}%
\expandafter\def\csname XINT_expr_var_@3\endcsname #1~#2#3#4{#4#1~#2#3#4}%
\expandafter\def\csname XINT_expr_var_@4\endcsname #1~#2#3#4#5{#5#1~#2#3#4#5}%
-\def\XINT_expr_onlitteral_@ #1~#2{\XINT_expr_precedence_*** *#2(#1~#2}%
-\expandafter\let\csname XINT_expr_onlitteral_@1\endcsname \XINT_expr_onlitteral_@
-\expandafter\def\csname XINT_expr_onlitteral_@2\endcsname #1~#2#3%
+\def\XINT_expr_onliteral_@ #1~#2{\XINT_expr_precedence_*** *#2(#1~#2}%
+\expandafter\let\csname XINT_expr_onliteral_@1\endcsname \XINT_expr_onliteral_@
+\expandafter\def\csname XINT_expr_onliteral_@2\endcsname #1~#2#3%
{\XINT_expr_precedence_*** *#3(#1~#2#3}%
-\expandafter\def\csname XINT_expr_onlitteral_@3\endcsname #1~#2#3#4%
+\expandafter\def\csname XINT_expr_onliteral_@3\endcsname #1~#2#3#4%
{\XINT_expr_precedence_*** *#4(#1~#2#3#4}%
-\expandafter\def\csname XINT_expr_onlitteral_@4\endcsname #1~#2#3#4#5%
+\expandafter\def\csname XINT_expr_onliteral_@4\endcsname #1~#2#3#4#5%
{\XINT_expr_precedence_*** *#5(#1~#2#3#4#5}%
\catcode`* 12
\def\XINT_expr_func_@@ #1#2#3#4~#5?%
@@ -1554,31 +1584,31 @@
{\XINT_expr_unlock#3}{#7}#4~#5~#6~#7?%
}%
\catcode`? 11
-\def\XINT_expr_onlitteral_seq
- {\expandafter\XINT_expr_onlitteral_seq_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}%
-\def\XINT_expr_onlitteral_seq_f #1#2{\xint_c_xviii `{seqx}#2)\relax #1}%
-\def\XINT_expr_onlitteral_seq_a #1#2,%
+\def\XINT_expr_onliteral_seq
+ {\expandafter\XINT_expr_onliteral_seq_f\romannumeral`&&@\XINT_expr_onliteral_seq_a {}}%
+\def\XINT_expr_onliteral_seq_f #1#2{\xint_c_xviii `{seqx}#2)\relax #1}%
+\def\XINT_expr_onliteral_seq_a #1#2,%
{%
\ifcase\XINT_isbalanced_a \relax #1#2(\xint_bye)\xint_bye
- \expandafter\XINT_expr_onlitteral_seq_c
- \or\expandafter\XINT_expr_onlitteral_seq_b
+ \expandafter\XINT_expr_onliteral_seq_c
+ \or\expandafter\XINT_expr_onliteral_seq_b
\else\expandafter\xintError:we_are_doomed
\fi {#1#2},%
}%
-\def\XINT_expr_onlitteral_seq_b #1,{\XINT_expr_onlitteral_seq_a {#1,}}%
-\def\XINT_expr_onlitteral_seq_c #1,#2#3% #3 pour absorber le =
+\def\XINT_expr_onliteral_seq_b #1,{\XINT_expr_onliteral_seq_a {#1,}}%
+\def\XINT_expr_onliteral_seq_c #1,#2#3% #3 pour absorber le =
{%
- \XINT_expr_onlitteral_seq_d {#2{#1}}{}%
+ \XINT_expr_onliteral_seq_d {#2{#1}}{}%
}%
-\def\XINT_expr_onlitteral_seq_d #1#2#3)%
+\def\XINT_expr_onliteral_seq_d #1#2#3)%
{%
\ifcase\XINT_isbalanced_a \relax #2#3(\xint_bye)\xint_bye
- \or\expandafter\XINT_expr_onlitteral_seq_e
+ \or\expandafter\XINT_expr_onliteral_seq_e
\else\expandafter\xintError:we_are_doomed
\fi
{#1}{#2#3}%
}%
-\def\XINT_expr_onlitteral_seq_e #1#2{\XINT_expr_onlitteral_seq_d {#1}{#2)}}%
+\def\XINT_expr_onliteral_seq_e #1#2{\XINT_expr_onliteral_seq_d {#1}{#2)}}%
\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 }%
@@ -1636,12 +1666,12 @@
\def\XINT_expr_seq:_Goon #1!#2#3%
{,#1\expandafter\XINT_expr_seq:_D
\csname.=\the\numexpr \XINT_expr_unlock#3+\xint_c_i\endcsname}%
-\def\XINT_expr_onlitteral_add
- {\expandafter\XINT_expr_onlitteral_add_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}%
-\def\XINT_expr_onlitteral_add_f #1#2{\xint_c_xviii `{opxadd}#2)\relax #1}%
-\def\XINT_expr_onlitteral_mul
- {\expandafter\XINT_expr_onlitteral_mul_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}%
-\def\XINT_expr_onlitteral_mul_f #1#2{\xint_c_xviii `{opxmul}#2)\relax #1}%
+\def\XINT_expr_onliteral_add
+ {\expandafter\XINT_expr_onliteral_add_f\romannumeral`&&@\XINT_expr_onliteral_seq_a {}}%
+\def\XINT_expr_onliteral_add_f #1#2{\xint_c_xviii `{opxadd}#2)\relax #1}%
+\def\XINT_expr_onliteral_mul
+ {\expandafter\XINT_expr_onliteral_mul_f\romannumeral`&&@\XINT_expr_onliteral_seq_a {}}%
+\def\XINT_expr_onliteral_mul_f #1#2{\xint_c_xviii `{opxmul}#2)\relax #1}%
\def\XINT_expr_func_opxadd #1#2{\XINT_allexpr_opx \xintbareeval {\xintAdd 0}}%
\def\XINT_flexpr_func_opxadd #1#2{\XINT_allexpr_opx \xintbarefloateval {\XINTinFloatAdd 0}}%
\def\XINT_iiexpr_func_opxadd #1#2{\XINT_allexpr_opx \xintbareiieval {\xintiiAdd 0}}%
@@ -1666,9 +1696,9 @@
{\romannumeral`&&@#4{\XINT_expr_unlock#1}{#5}}}%
\def\XINT_expr_op:_noop\csname.=,#1\endcsname #2#3#4{\XINT_expr_op:_b #3{#4}{#2}#1,}%
\def\XINT_expr_op:_end \csname.=^\endcsname #1#2#3{#3}%
-\def\XINT_expr_onlitteral_subs
- {\expandafter\XINT_expr_onlitteral_subs_f\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}}%
-\def\XINT_expr_onlitteral_subs_f #1#2{\xint_c_xviii `{subx}#2)\relax #1}%
+\def\XINT_expr_onliteral_subs
+ {\expandafter\XINT_expr_onliteral_subs_f\romannumeral`&&@\XINT_expr_onliteral_seq_a {}}%
+\def\XINT_expr_onliteral_subs_f #1#2{\xint_c_xviii `{subx}#2)\relax #1}%
\def\XINT_expr_func_subx #1#2{\XINT_allexpr_subx \xintbareeval }%
\def\XINT_flexpr_func_subx #1#2{\XINT_allexpr_subx \xintbarefloateval}%
\def\XINT_iiexpr_func_subx #1#2{\XINT_allexpr_subx \xintbareiieval }%
@@ -1684,7 +1714,7 @@
\def\XINT_allexpr_rseq #1#2#3%
{%
\expandafter\XINT_expr_rseqx\expandafter #1\expandafter#2\expandafter
- #3\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}%
+ #3\romannumeral`&&@\XINT_expr_onliteral_seq_a {}%
}%
\def\XINT_expr_rseqx #1#2#3#4#5%
{%
@@ -1742,7 +1772,7 @@
\def\XINT_allexpr_iter #1#2#3%
{%
\expandafter\XINT_expr_iterx\expandafter #1\expandafter#2\expandafter
- #3\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}%
+ #3\romannumeral`&&@\XINT_expr_onliteral_seq_a {}%
}%
\def\XINT_expr_iterx #1#2#3#4#5%
{%
@@ -1800,7 +1830,7 @@
\def\XINT_allexpr_rrseq #1#2#3%
{%
\expandafter\XINT_expr_rrseqx\expandafter #1\expandafter#2\expandafter
- #3\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}%
+ #3\romannumeral`&&@\XINT_expr_onliteral_seq_a {}%
}%
\def\XINT_expr_rrseqx #1#2#3#4#5%
{%
@@ -1863,7 +1893,7 @@
\def\XINT_allexpr_iterr #1#2#3%
{%
\expandafter\XINT_expr_iterrx\expandafter #1\expandafter #2\expandafter
- #3\romannumeral`&&@\XINT_expr_onlitteral_seq_a {}%
+ #3\romannumeral`&&@\XINT_expr_onliteral_seq_a {}%
}%
\def\XINT_expr_iterrx #1#2#3#4#5%
{%
@@ -2000,6 +2030,7 @@
\def\XINTinFloatPrd:csv #1{\expandafter\XINT_oncsv:_a\expandafter\XINTinfloatmul
\expandafter\XINTinFloatdigits\romannumeral`&&@#1,^,{1[0]}}%
\def\XINT_expr_twoargs #1,#2,{{#1}{#2}}%
+\def\XINT_expr_totwoargs #1#2{#1,#2}%
\def\XINT_expr_argandopt #1,#2,#3.#4#5%
{%
\if\relax#3\relax\expandafter\xint_firstoftwo\else
@@ -2126,6 +2157,29 @@
\endcsname
}%
\let\XINT_flexpr_func_float\XINT_expr_func_float
+\def\XINT_expr_func_divmod #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname .=%
+ \expandafter\XINT_expr_totwoargs
+ \romannumeral0\expandafter\xintDivMod
+ \romannumeral`&&@\expandafter\XINT_expr_twoargs
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+}%
+\def\XINT_flexpr_func_divmod #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname .=%
+ \expandafter\XINTinFloatDivMod
+ \romannumeral`&&@\expandafter\XINT_expr_twoargs
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+}%
+\def\XINT_iiexpr_func_divmod #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname .=%
+ \expandafter\XINT_expr_totwoargs
+ \romannumeral0\expandafter\xintiiDivMod
+ \romannumeral`&&@\expandafter\XINT_expr_twoargs
+ \romannumeral`&&@\XINT_expr_unlock #3,\endcsname
+}%
\def\XINT_expr_func_mod #1#2#3%
{%
\expandafter #1\expandafter #2\csname .=%
@@ -2566,8 +2620,8 @@
}%
\toks0 {}%
\xintFor #1 in
- {DivTrunc,Mod,Round,Trunc,iRound,iTrunc,iQuo,iRem,
- iiDivTrunc,iiDivRound,iiMod,iiQuo,iiRem,%
+ {DivFloor,Mod,Round,Trunc,iRound,iTrunc,iQuo,iRem,
+ iiDivFloor,iiDivRound,iiMod,iiQuo,iiRem,%
Lt,Gt,Eq,LtorEq,GtorEq,NotEq,%
iiLt,iiGt,iiEq,iiLtorEq,iiGtorEq,iiNotEq,%
Add,Sub,Mul,Div,Pow,E,%
@@ -2601,7 +2655,8 @@
\expandafter\XINT_NEfork_one
\romannumeral`&&@##1!{~XINTinFloatFac}{XINTinFloatFac}{}{}}%
}%
-\xintFor #1 in {Add,Sub,Mul,Div,Binomial,PFactorial,PowerH,E,Mod,SeqA::csv}\do
+\xintFor #1 in {Add,Sub,Mul,Div,Binomial,PFactorial,PowerH,E,%
+ Mod,DivFloor,DivMod,SeqA::csv}\do
{\toks0
\expandafter{\the\toks0%
\expandafter\let\csname XINTinFloat#1NE\expandafter\endcsname