summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3int.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-02-24 03:03:46 +0000
committerNorbert Preining <norbert@preining.info>2023-02-24 03:03:46 +0000
commitc283f3a6970d2bc9de3501415f5701277da68693 (patch)
treed7235c075302b80ad8a504825d27726a13c81b36 /macros/latex/contrib/l3kernel/l3int.dtx
parentc777f2320db5eee966cbb30940cada6e5290ec03 (diff)
CTAN sync 202302240303
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3int.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3int.dtx230
1 files changed, 140 insertions, 90 deletions
diff --git a/macros/latex/contrib/l3kernel/l3int.dtx b/macros/latex/contrib/l3kernel/l3int.dtx
index 7fe87163cb..0d35d20c1d 100644
--- a/macros/latex/contrib/l3kernel/l3int.dtx
+++ b/macros/latex/contrib/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2023-02-07}
+% \date{Released 2023-02-22}
%
% \maketitle
%
@@ -55,7 +55,7 @@
% \texttt{+}, \texttt{-}, \texttt{/} and \texttt{*} and
% parentheses can be used within such expressions to carry
% arithmetic operations. This module carries out these functions
-% on \emph{integer expressions} (\enquote{\texttt{intexpr}}).
+% on \emph{integer expressions} (\enquote{\meta{int expr}}).
%
% \section{Integer expressions}
%
@@ -118,20 +118,70 @@
%
% \begin{function}[EXP]{\int_eval:n}
% \begin{syntax}
-% \cs{int_eval:n} \Arg{integer expression}
+% \cs{int_eval:n} \Arg{int expr}
% \end{syntax}
-% Evaluates the \meta{integer expression} and leaves the result in the
+% Evaluates the \meta{int expr} and leaves the result in the
% input stream as an integer denotation: for positive results an
% explicit sequence of decimal digits not starting with~\texttt{0},
% for negative results \texttt{-}~followed by such a sequence, and
-% \texttt{0}~for zero.
+% \texttt{0}~for zero. The \meta{int expr} should consist,
+% after expansion, of \texttt{+}, \texttt{-}, \texttt{*}, \texttt{/},
+% \texttt{(}, \texttt{)} and of course integer operands. The result
+% is calculated by applying standard mathematical rules with the
+% following peculiarities:
+% \begin{itemize}
+% \item \texttt{/} denotes division rounded to the closest integer with
+% ties rounded away from zero;
+% \item there is an error and the overall expression evaluates to zero
+% whenever the absolute value of any intermediate result exceeds
+% $2^{31}-1$, except in the case of scaling operations
+% $a$\texttt{*}$b$\texttt{/}$c$, for which $a$\texttt{*}$b$ may be
+% arbitrarily large;
+% \item parentheses may not appear after unary \texttt{+} or
+% \texttt{-}, namely placing \texttt{+(} or \texttt{-(} at the start
+% of an expression or after \texttt{+}, \texttt{-}, \texttt{*},
+% \texttt{/} or~\texttt{(} leads to an error.
+% \end{itemize}
+% Each integer operand can be either an integer variable (with no need
+% for \cs{int_use:N}) or an integer denotation. For example both
+% \begin{verbatim}
+% \int_eval:n { 5 + 4 * 3 - ( 3 + 4 * 5 ) }
+% \end{verbatim}
+% and
+% \begin{verbatim}
+% \tl_new:N \l_my_tl
+% \tl_set:Nn \l_my_tl { 5 }
+% \int_new:N \l_my_int
+% \int_set:Nn \l_my_int { 4 }
+% \int_eval:n { \l_my_tl + \l_my_int * 3 - ( 3 + 4 * 5 ) }
+% \end{verbatim}
+% evaluate to $-6$ because \cs[no-index]{l_my_tl} expands to the
+% integer denotation~|5|. As the \meta{int expr} is fully
+% expanded from left to right during evaluation, fully expandable and
+% restricted-expandable functions can both be used, and \cs{exp_not:n}
+% and its variants have no effect while \cs{exp_not:N} may incorrectly
+% interrupt the expression.
+% \begin{texnote}
+% Exactly two expansions are needed to evaluate \cs{int_eval:n}.
+% The result is \emph{not} an \meta{internal integer}, and therefore
+% requires suitable termination if used in a \TeX{}-style integer
+% assignment.
+%
+% As all \TeX{} integers, integer operands can also be dimension or
+% skip variables, converted to integers in~\texttt{sp}, or octal
+% numbers given as \texttt{'} followed by digits other than
+% \texttt{8} and \texttt{9}, or hexadecimal numbers given as
+% |"| followed by digits or upper case letters from
+% \texttt{A} to~\texttt{F}, or the character code of some character
+% or one-character control sequence, given as \texttt{`}\meta{char}.
+% \end{texnote}
% \end{function}
%
% \begin{function}[EXP, added = 2018-03-30]{\int_eval:w}
% \begin{syntax}
-% \cs{int_eval:w} \meta{integer expression}
+% \cs{int_eval:w} \meta{int expr}
% \end{syntax}
-% Evaluates the \meta{integer expression} as described for
+% Evaluates the \meta{int expr} as described for
% \cs{int_eval:n}. The end of the expression is the first token
% encountered that cannot form part of such an expression. If that
% token is \cs{scan_stop:} it is removed, otherwise not. Spaces do
@@ -144,17 +194,17 @@
%
% \begin{function}[EXP, added = 2018-11-03]{\int_sign:n}
% \begin{syntax}
-% \cs{int_sign:n} \Arg{intexpr}
+% \cs{int_sign:n} \Arg{int expr}
% \end{syntax}
-% Evaluates the \meta{integer expression} then leaves $1$ or $0$ or
+% Evaluates the \meta{int expr} then leaves $1$ or $0$ or
% $-1$ in the input stream according to the sign of the result.
% \end{function}
%
% \begin{function}[EXP, updated = 2012-09-26]{\int_abs:n}
% \begin{syntax}
-% \cs{int_abs:n} \Arg{integer expression}
+% \cs{int_abs:n} \Arg{int expr}
% \end{syntax}
-% Evaluates the \meta{integer expression} as described for
+% Evaluates the \meta{int expr} as described for
% \cs{int_eval:n} and leaves the absolute value of the result in
% the input stream as an \meta{integer denotation} after two
% expansions.
@@ -162,21 +212,21 @@
%
% \begin{function}[EXP, updated = 2012-09-26]{\int_div_round:nn}
% \begin{syntax}
-% \cs{int_div_round:nn} \Arg{intexpr_1} \Arg{intexpr_2}
+% \cs{int_div_round:nn} \Arg{int expr_1} \Arg{int expr_2}
% \end{syntax}
-% Evaluates the two \meta{integer expressions} as described earlier,
+% Evaluates the two \meta{int expr}s as described earlier,
% then divides the first value by the second, and rounds the result
% to the closest integer. Ties are rounded away from zero.
% Note that this is identical to using
-% |/| directly in an \meta{integer expression}. The result is left in
+% |/| directly in an \meta{int expr}. The result is left in
% the input stream as an \meta{integer denotation} after two expansions.
% \end{function}
%
% \begin{function}[EXP, updated = 2012-02-09]{\int_div_truncate:nn}
% \begin{syntax}
-% \cs{int_div_truncate:nn} \Arg{intexpr_1} \Arg{intexpr_2}
+% \cs{int_div_truncate:nn} \Arg{int expr_1} \Arg{int expr_2}
% \end{syntax}
-% Evaluates the two \meta{integer expressions} as described earlier,
+% Evaluates the two \meta{int expr}s as described earlier,
% then divides the first value by the second, and rounds the result
% towards zero. Note that division using |/|
% rounds to the closest integer instead.
@@ -186,10 +236,10 @@
%
% \begin{function}[EXP, updated = 2012-09-26]{\int_max:nn, \int_min:nn}
% \begin{syntax}
-% \cs{int_max:nn} \Arg{intexpr_1} \Arg{intexpr_2}
-% \cs{int_min:nn} \Arg{intexpr_1} \Arg{intexpr_2}
+% \cs{int_max:nn} \Arg{int expr_1} \Arg{int expr_2}
+% \cs{int_min:nn} \Arg{int expr_1} \Arg{int expr_2}
% \end{syntax}
-% Evaluates the \meta{integer expressions} as described for
+% Evaluates the \meta{int expr}s as described for
% \cs{int_eval:n} and leaves either the larger or smaller value
% in the input stream as an \meta{integer denotation} after two
% expansions.
@@ -197,15 +247,15 @@
%
% \begin{function}[EXP, updated = 2012-09-26]{\int_mod:nn}
% \begin{syntax}
-% \cs{int_mod:nn} \Arg{intexpr_1} \Arg{intexpr_2}
+% \cs{int_mod:nn} \Arg{int expr_1} \Arg{int expr_2}
% \end{syntax}
-% Evaluates the two \meta{integer expressions} as described earlier,
+% Evaluates the two \meta{int expr}s as described earlier,
% then calculates the integer remainder of dividing the first
% expression by the second. This is obtained by subtracting
-% \cs{int_div_truncate:nn} \Arg{intexpr_1} \Arg{intexpr_2} times
-% \meta{intexpr_2} from \meta{intexpr_1}. Thus, the result has the
-% same sign as \meta{intexpr_1} and its absolute value is strictly
-% less than that of \meta{intexpr_2}. The result is left in the input
+% \cs{int_div_truncate:nn} \Arg{int expr_1} \Arg{int expr_2} times
+% \meta{int expr_2} from \meta{int expr_1}. Thus, the result has the
+% same sign as \meta{int expr_1} and its absolute value is strictly
+% less than that of \meta{int expr_2}. The result is left in the input
% stream as an \meta{integer denotation} after two expansions.
% \end{function}
%
@@ -222,11 +272,11 @@
%
% \begin{function}[updated = 2011-10-22]{\int_const:Nn, \int_const:cn}
% \begin{syntax}
-% \cs{int_const:Nn} \meta{integer} \Arg{integer expression}
+% \cs{int_const:Nn} \meta{integer} \Arg{int expr}
% \end{syntax}
% Creates a new constant \meta{integer} or raises an error if the name
% is already taken. The value of the \meta{integer} is set
-% globally to the \meta{integer expression}.
+% globally to the \meta{int expr}.
% \end{function}
%
% \begin{function}{\int_zero:N, \int_zero:c, \int_gzero:N, \int_gzero:c}
@@ -274,9 +324,9 @@
% \begin{function}[updated = 2011-10-22]
% {\int_add:Nn, \int_add:cn, \int_gadd:Nn, \int_gadd:cn}
% \begin{syntax}
-% \cs{int_add:Nn} \meta{integer} \Arg{integer expression}
+% \cs{int_add:Nn} \meta{integer} \Arg{int expr}
% \end{syntax}
-% Adds the result of the \meta{integer expression} to the current
+% Adds the result of the \meta{int expr} to the current
% content of the \meta{integer}.
% \end{function}
%
@@ -297,9 +347,9 @@
% \begin{function}[updated = 2011-10-22]
% {\int_set:Nn, \int_set:cn, \int_gset:Nn, \int_gset:cn}
% \begin{syntax}
-% \cs{int_set:Nn} \meta{integer} \Arg{integer expression}
+% \cs{int_set:Nn} \meta{integer} \Arg{int expr}
% \end{syntax}
-% Sets \meta{integer} to the value of \meta{integer expression},
+% Sets \meta{integer} to the value of \meta{int expr},
% which must evaluate to an integer (as described for
% \cs{int_eval:n}).
% \end{function}
@@ -307,9 +357,9 @@
% \begin{function}[updated = 2011-10-22]
% {\int_sub:Nn, \int_sub:cn, \int_gsub:Nn, \int_gsub:cn}
% \begin{syntax}
-% \cs{int_sub:Nn} \meta{integer} \Arg{integer expression}
+% \cs{int_sub:Nn} \meta{integer} \Arg{int expr}
% \end{syntax}
-% Subtracts the result of the \meta{integer expression} from the
+% Subtracts the result of the \meta{int expr} from the
% current content of the \meta{integer}.
% \end{function}
%
@@ -334,12 +384,12 @@
%
% \begin{function}[EXP,pTF]{\int_compare:nNn}
% \begin{syntax}
-% \cs{int_compare_p:nNn} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \\
+% \cs{int_compare_p:nNn} \Arg{int expr_1} \meta{relation} \Arg{int expr_2} \\
% \cs{int_compare:nNnTF}
-% ~~\Arg{intexpr_1} \meta{relation} \Arg{intexpr_2}
+% ~~\Arg{int expr_1} \meta{relation} \Arg{int expr_2}
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
-% This function first evaluates each of the \meta{integer expressions}
+% This function first evaluates each of the \meta{int expr}s
% as described for \cs{int_eval:n}. The two results are then
% compared using the \meta{relation}:
% \begin{center}
@@ -357,28 +407,28 @@
% \begin{syntax}
% \cs{int_compare_p:n} \\
% ~~\{ \\
-% ~~~~\meta{intexpr_1} \meta{relation_1} \\
+% ~~~~\meta{int expr_1} \meta{relation_1} \\
% ~~~~\ldots{} \\
-% ~~~~\meta{intexpr_N} \meta{relation_N} \\
-% ~~~~\meta{intexpr_{N+1}} \\
+% ~~~~\meta{int expr_N} \meta{relation_N} \\
+% ~~~~\meta{int expr_{N+1}} \\
% ~~\} \\
% \cs{int_compare:nTF}
% ~~\{ \\
-% ~~~~\meta{intexpr_1} \meta{relation_1} \\
+% ~~~~\meta{int expr_1} \meta{relation_1} \\
% ~~~~\ldots{} \\
-% ~~~~\meta{intexpr_N} \meta{relation_N} \\
-% ~~~~\meta{intexpr_{N+1}} \\
+% ~~~~\meta{int expr_N} \meta{relation_N} \\
+% ~~~~\meta{int expr_{N+1}} \\
% ~~\} \\
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
-% This function evaluates the \meta{integer expressions} as described
+% This function evaluates the \meta{int expr}s as described
% for \cs{int_eval:n} and compares consecutive result using the
-% corresponding \meta{relation}, namely it compares \meta{intexpr_1}
-% and \meta{intexpr_2} using the \meta{relation_1}, then
-% \meta{intexpr_2} and \meta{intexpr_3} using the \meta{relation_2},
-% until finally comparing \meta{intexpr_N} and \meta{intexpr_{N+1}}
+% corresponding \meta{relation}, namely it compares \meta{int expr_1}
+% and \meta{int expr_2} using the \meta{relation_1}, then
+% \meta{int expr_2} and \meta{int expr_3} using the \meta{relation_2},
+% until finally comparing \meta{int expr_N} and \meta{int expr_{N+1}}
% using the \meta{relation_N}. The test yields \texttt{true} if all
-% comparisons are \texttt{true}. Each \meta{integer expression} is
+% comparisons are \texttt{true}. Each \meta{int expr} is
% evaluated only once, and the evaluation is lazy, in the sense that
% if one comparison is \texttt{false}, then no other \meta{integer
% expression} is evaluated and no other comparison is performed.
@@ -399,19 +449,19 @@
%
% \begin{function}[added = 2013-07-24, EXP, noTF]{\int_case:nn}
% \begin{syntax}
-% \cs{int_case:nnTF} \Arg{test integer expression} \\
+% \cs{int_case:nnTF} \Arg{test int expr} \\
% ~~|{| \\
-% ~~~~\Arg{intexpr case_1} \Arg{code case_1} \\
-% ~~~~\Arg{intexpr case_2} \Arg{code case_2} \\
+% ~~~~\Arg{int expr case_1} \Arg{code case_1} \\
+% ~~~~\Arg{int expr case_2} \Arg{code case_2} \\
% ~~~~\ldots \\
-% ~~~~\Arg{intexpr case_n} \Arg{code case_n} \\
+% ~~~~\Arg{int expr case_n} \Arg{code case_n} \\
% ~~|}| \\
% ~~\Arg{true code}
% ~~\Arg{false code}
% \end{syntax}
-% This function evaluates the \meta{test integer expression} and
+% This function evaluates the \meta{test int expr} and
% compares this in turn to each of the
-% \meta{integer expression cases}. If the two are equal then the
+% \meta{int expr cases}. If the two are equal then the
% associated \meta{code} is left in the input stream
% and other cases are discarded. If any of the
% cases are matched, the \meta{true code} is also inserted into the
@@ -434,11 +484,11 @@
%
% \begin{function}[EXP,pTF]{\int_if_even:n, \int_if_odd:n}
% \begin{syntax}
-% \cs{int_if_odd_p:n} \Arg{integer expression}
-% \cs{int_if_odd:nTF} \Arg{integer expression}
+% \cs{int_if_odd_p:n} \Arg{int expr}
+% \cs{int_if_odd:nTF} \Arg{int expr}
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
-% This function first evaluates the \meta{integer expression}
+% This function first evaluates the \meta{int expr}
% as described for \cs{int_eval:n}. It then evaluates if this
% is odd or even, as appropriate.
% \end{function}
@@ -447,11 +497,11 @@
%
% \begin{function}[rEXP]{\int_do_until:nNnn}
% \begin{syntax}
-% \cs{int_do_until:nNnn} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{code}
+% \cs{int_do_until:nNnn} \Arg{int expr_1} \meta{relation} \Arg{int expr_2} \Arg{code}
% \end{syntax}
% Places the \meta{code} in the input stream for \TeX{} to process, and
% then evaluates the relationship between the two
-% \meta{integer expressions} as described for \cs{int_compare:nNnTF}.
+% \meta{int expr}s as described for \cs{int_compare:nNnTF}.
% If the test is \texttt{false} then the \meta{code} is inserted
% into the input stream again and a loop occurs until the
% \meta{relation} is \texttt{true}.
@@ -459,11 +509,11 @@
%
% \begin{function}[rEXP]{\int_do_while:nNnn}
% \begin{syntax}
-% \cs{int_do_while:nNnn} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{code}
+% \cs{int_do_while:nNnn} \Arg{int expr_1} \meta{relation} \Arg{int expr_2} \Arg{code}
% \end{syntax}
% Places the \meta{code} in the input stream for \TeX{} to process, and
% then evaluates the relationship between the two
-% \meta{integer expressions} as described for \cs{int_compare:nNnTF}.
+% \meta{int expr}s as described for \cs{int_compare:nNnTF}.
% If the test is \texttt{true} then the \meta{code} is inserted
% into the input stream again and a loop occurs until the
% \meta{relation} is \texttt{false}.
@@ -471,9 +521,9 @@
%
% \begin{function}[rEXP]{\int_until_do:nNnn}
% \begin{syntax}
-% \cs{int_until_do:nNnn} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{code}
+% \cs{int_until_do:nNnn} \Arg{int expr_1} \meta{relation} \Arg{int expr_2} \Arg{code}
% \end{syntax}
-% Evaluates the relationship between the two \meta{integer expressions}
+% Evaluates the relationship between the two \meta{int expr}s
% as described for \cs{int_compare:nNnTF}, and then places the
% \meta{code} in the input stream if the \meta{relation} is
% \texttt{false}. After the \meta{code} has been processed by \TeX{} the
@@ -483,9 +533,9 @@
%
% \begin{function}[rEXP]{\int_while_do:nNnn}
% \begin{syntax}
-% \cs{int_while_do:nNnn} \Arg{intexpr_1} \meta{relation} \Arg{intexpr_2} \Arg{code}
+% \cs{int_while_do:nNnn} \Arg{int expr_1} \meta{relation} \Arg{int expr_2} \Arg{code}
% \end{syntax}
-% Evaluates the relationship between the two \meta{integer expressions}
+% Evaluates the relationship between the two \meta{int expr}s
% as described for \cs{int_compare:nNnTF}, and then places the
% \meta{code} in the input stream if the \meta{relation} is
% \texttt{true}. After the \meta{code} has been processed by \TeX{} the
@@ -628,17 +678,17 @@
%
% \begin{function}[updated = 2011-10-22, EXP]{\int_to_arabic:n}
% \begin{syntax}
-% \cs{int_to_arabic:n} \Arg{integer expression}
+% \cs{int_to_arabic:n} \Arg{int expr}
% \end{syntax}
-% Places the value of the \meta{integer expression} in the input
+% Places the value of the \meta{int expr} in the input
% stream as digits, with category code $12$ (other).
% \end{function}
%
% \begin{function}[updated = 2011-09-17, EXP]{\int_to_alph:n, \int_to_Alph:n}
% \begin{syntax}
-% \cs{int_to_alph:n} \Arg{integer expression}
+% \cs{int_to_alph:n} \Arg{int expr}
% \end{syntax}
-% Evaluates the \meta{integer expression} and converts the result
+% Evaluates the \meta{int expr} and converts the result
% into a series of letters, which are then left in the input stream.
% The conversion rule uses the $26$ letters of the English
% alphabet, in order, adding letters when necessary to increase the total
@@ -665,11 +715,11 @@
% \begin{function}[updated = 2011-09-17, EXP]{\int_to_symbols:nnn}
% \begin{syntax}
% \cs{int_to_symbols:nnn}
-% ~~\Arg{integer expression} \Arg{total symbols}
+% ~~\Arg{int expr} \Arg{total symbols}
% ~~\Arg{value to symbol mapping}
% \end{syntax}
% This is the low-level function for conversion of an
-% \meta{integer expression} into a symbolic form (often
+% \meta{int expr} into a symbolic form (often
% letters). The \meta{total symbols} available should be given
% as an integer expression. Values are actually converted to symbols
% according to the \meta{value to symbol mapping}. This should be given
@@ -692,17 +742,17 @@
%
% \begin{function}[added = 2014-02-11, EXP]{\int_to_bin:n}
% \begin{syntax}
-% \cs{int_to_bin:n} \Arg{integer expression}
+% \cs{int_to_bin:n} \Arg{int expr}
% \end{syntax}
-% Calculates the value of the \meta{integer expression} and places
+% Calculates the value of the \meta{int expr} and places
% the binary representation of the result in the input stream.
% \end{function}
%
% \begin{function}[added = 2014-02-11, EXP]{\int_to_hex:n, \int_to_Hex:n}
% \begin{syntax}
-% \cs{int_to_hex:n} \Arg{integer expression}
+% \cs{int_to_hex:n} \Arg{int expr}
% \end{syntax}
-% Calculates the value of the \meta{integer expression} and places
+% Calculates the value of the \meta{int expr} and places
% the hexadecimal (base~$16$) representation of the result in the
% input stream. Letters are used for digits beyond~$9$: lower
% case letters for \cs{int_to_hex:n} and upper case ones for
@@ -713,9 +763,9 @@
%
% \begin{function}[added = 2014-02-11, EXP]{\int_to_oct:n}
% \begin{syntax}
-% \cs{int_to_oct:n} \Arg{integer expression}
+% \cs{int_to_oct:n} \Arg{int expr}
% \end{syntax}
-% Calculates the value of the \meta{integer expression} and places
+% Calculates the value of the \meta{int expr} and places
% the octal (base~$8$) representation of the result in the input
% stream.
% The resulting tokens are digits with category code $12$ (other) and
@@ -725,9 +775,9 @@
% \begin{function}[updated = 2014-02-11, EXP]
% {\int_to_base:nn, \int_to_Base:nn}
% \begin{syntax}
-% \cs{int_to_base:nn} \Arg{integer expression} \Arg{base}
+% \cs{int_to_base:nn} \Arg{int expr} \Arg{base}
% \end{syntax}
-% Calculates the value of the \meta{integer expression} and
+% Calculates the value of the \meta{int expr} and
% converts it into the appropriate representation in the \meta{base};
% the later may be given as an integer expression. For bases greater
% than $10$ the higher \enquote{digits} are represented by
@@ -744,9 +794,9 @@
%
% \begin{function}[updated = 2011-10-22, rEXP]{\int_to_roman:n, \int_to_Roman:n}
% \begin{syntax}
-% \cs{int_to_roman:n} \Arg{integer expression}
+% \cs{int_to_roman:n} \Arg{int expr}
% \end{syntax}
-% Places the value of the \meta{integer expression} in the input
+% Places the value of the \meta{int expr} in the input
% stream as Roman numerals, either lower case (\cs{int_to_roman:n}) or
% upper case (\cs{int_to_Roman:n}). If the value is negative or zero,
% the output is empty. The Roman numerals are letters with category
@@ -843,19 +893,19 @@
%
% \begin{function}[EXP, added = 2016-12-06, updated = 2018-04-27]{\int_rand:nn}
% \begin{syntax}
-% \cs{int_rand:nn} \Arg{intexpr_1} \Arg{intexpr_2}
+% \cs{int_rand:nn} \Arg{int expr_1} \Arg{int expr_2}
% \end{syntax}
-% Evaluates the two \meta{integer expressions} and produces a
+% Evaluates the two \meta{int expr}s and produces a
% pseudo-random number between the two (with bounds included).
% This is not available in older versions of \XeTeX{}.
% \end{function}
%
% \begin{function}[EXP, added = 2018-05-05]{\int_rand:n}
% \begin{syntax}
-% \cs{int_rand:n} \Arg{intexpr}
+% \cs{int_rand:n} \Arg{int expr}
% \end{syntax}
-% Evaluates the \meta{integer expression} then produces a
-% pseudo-random number between $1$ and the \meta{intexpr} (included).
+% Evaluates the \meta{int expr} then produces a
+% pseudo-random number between $1$ and the \meta{int expr} (included).
% This is not available in older versions of \XeTeX{}.
% \end{function}
%
@@ -870,9 +920,9 @@
%
% \begin{function}[added = 2011-11-22, updated = 2015-08-07]{\int_show:n}
% \begin{syntax}
-% \cs{int_show:n} \Arg{integer expression}
+% \cs{int_show:n} \Arg{int expr}
% \end{syntax}
-% Displays the result of evaluating the \meta{integer expression}
+% Displays the result of evaluating the \meta{int expr}
% on the terminal.
% \end{function}
%
@@ -885,9 +935,9 @@
%
% \begin{function}[added = 2014-08-22, updated = 2015-08-07]{\int_log:n}
% \begin{syntax}
-% \cs{int_log:n} \Arg{integer expression}
+% \cs{int_log:n} \Arg{int expr}
% \end{syntax}
-% Writes the result of evaluating the \meta{integer expression}
+% Writes the result of evaluating the \meta{int expr}
% in the log file.
% \end{function}
%