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.sty25
1 files changed, 20 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index baf227ba966..80c3dad219e 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.4e 2021/05/05
+%% The xint bundle 1.4f 2021/05/10
%% Copyright (C) 2013-2021 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
@@ -82,7 +82,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2021/05/05 v1.4e Expandable expression parser (JFB)]%
+ [2021/05/10 v1.4f Expandable expression parser (JFB)]%
\catcode`! 11
\let\XINT_Cmp \xintiiCmp
\def\XINTfstop{\noexpand\XINTfstop}%
@@ -103,6 +103,7 @@
\let\XINTdigits\XINT_digits
\xintreloadscilibs
}%
+\def\XINTdigitsormax{\ifnum\XINTdigits>\xint_c_ii^vi\xint_c_ii^vi\else\XINTdigits\fi}%
\def\XINT:expr:toblistwith#1#2%
{%
{\expandafter\XINT:expr:toblist_checkempty
@@ -282,7 +283,7 @@
\expanded
\XINT:NEhook:x:mapwithin\XINT:expr:mapwithin{\XINTiRound_braced{#1}}%
}%
-\def\XINTiRound_braced#1#2{{\xintiRound{#1}{#2}[\the\numexpr-#1]}}%
+\def\XINTiRound_braced#1#2{{\xintiRound{#1}{#2}[\the\numexpr\ifnum#1<\xint_c_i0\else-#1\fi]}}%
\def\xintfloatexpro #1%
{%
\ifx [#1\expandafter\XINT_flexpr_withopt\else\expandafter\XINT_flexpr_noopt
@@ -3028,13 +3029,20 @@
}}%
}%
\let\XINT_flexpr_func_float\XINT_expr_func_float
-\def\XINT_expr_func_float_ #1#2#3%
+\def\XINT_expr_func_float_dgt #1#2#3%
{%
\expandafter #1\expandafter #2\expandafter{%
\romannumeral`&&@\XINT:NEhook:f:one:from:one
{\romannumeral`&&@\XINTinFloatdigits#3}}%
}%
-\let\XINT_flexpr_func_float_\XINT_expr_func_float_
+\let\XINT_flexpr_func_float_dgt\XINT_expr_func_float_dgt
+\def\XINT_expr_func_float_dgtormax #1#2#3%
+{%
+ \expandafter #1\expandafter #2\expandafter{%
+ \romannumeral`&&@\XINT:NEhook:f:one:from:one
+ {\romannumeral`&&@\XINTinFloatdigitsormax#3}}%
+}%
+\let\XINT_flexpr_func_float_dgtormax\XINT_expr_func_float_dgtormax
\def\XINT_expr_func_sfloat #1#2#3%
{%
\expandafter #1\expandafter #2\expandafter{\expandafter{%
@@ -3043,6 +3051,13 @@
}}%
}%
\let\XINT_flexpr_func_sfloat\XINT_expr_func_sfloat
+\def\XINT_expr_func_sfloat_dgtormax #1#2#3%
+{%
+ \expandafter #1\expandafter #2\expandafter{%
+ \romannumeral`&&@\XINT:NEhook:f:one:from:one
+ {\romannumeral`&&@\XINTinFloatSdigitsormax#3}}%
+}%
+\let\XINT_flexpr_func_sfloat_dgtormax\XINT_expr_func_sfloat_dgtormax
\expandafter\def\csname XINT_expr_func_ilog10\endcsname #1#2#3%
{%
\expandafter #1\expandafter #2\expandafter{\expandafter{%