summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bnumexpr/bnumexpr.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-14 20:11:19 +0000
committerKarl Berry <karl@freefriends.org>2021-05-14 20:11:19 +0000
commit94e30de3e8e2b8a03f814dfa490e6db7d81aba44 (patch)
tree8207b2cb96e3cfc658ea3882b70bf50e9095dc2b /Master/texmf-dist/tex/latex/bnumexpr/bnumexpr.sty
parent0e681a8aa154482499e8184c6596d330c40071fc (diff)
bnumexpr (14may21)
git-svn-id: svn://tug.org/texlive/trunk@59193 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bnumexpr/bnumexpr.sty')
-rw-r--r--Master/texmf-dist/tex/latex/bnumexpr/bnumexpr.sty14
1 files changed, 9 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/bnumexpr/bnumexpr.sty b/Master/texmf-dist/tex/latex/bnumexpr/bnumexpr.sty
index 708694b02e5..3b20e0cdc29 100644
--- a/Master/texmf-dist/tex/latex/bnumexpr/bnumexpr.sty
+++ b/Master/texmf-dist/tex/latex/bnumexpr/bnumexpr.sty
@@ -25,7 +25,7 @@
%% Copyright (C) 2014-2021 by Jean-Francois Burnol
%%
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{bnumexpr}[2021/05/12 v1.4 Expressions with big integers (JFB)]%
+\ProvidesPackage{bnumexpr}[2021/05/13 v1.4a Expressions with big integers (JFB)]%
\RequirePackage{xintbinhex}[2021/05/10]%
{\catcode`! 3 \catcode`_ 11 %
\gdef\bnumexprsetup #1{\BNE_parsekeys #1,=!,}%
@@ -48,7 +48,8 @@
\RequirePackage{xintcore}[2021/05/10]%
\bnumexprsetup{add=\xintiiAdd, sub=\xintiiSub, mul=\xintiiMul,
divround=\xintiiDivRound, div=\xintiiDivFloor,
- mod=\xintiiMod, pow=\xintiiPow, fac=\xintiiFac}%
+ mod=\xintiiMod, pow=\xintiiPow, fac=\xintiiFac,
+ opp=\xintiiOpp}%
}%
\long\def\xint_firstofthree #1#2#3{#1}%
\long\def\xint_secondofthree #1#2#3{#2}%
@@ -302,12 +303,17 @@
}%
}%
\let\BNE_done\space
+\def\BNE_getop_legacy #1%
+{%
+ \expanded{\unexpanded{{#1}}\expandafter}\romannumeral`&&@\BNE_getop
+}%
\expandafter\BNE_tmpa
\csname BNE_start\expandafter\endcsname
\csname BNE_check\expandafter\endcsname
\csname BNE_checkp\expandafter\endcsname
\csname BNE_op_-xii\expandafter\endcsname
\csname BNE_extra_)\endcsname
+\catcode`) 11
\def\BNE_tmpa #1#2#3#4#5#6%
{%
\def #1##1% op_(
@@ -345,7 +351,6 @@
\csname BNE_check-_)\expandafter\endcsname
\csname BNE_checkp_)\expandafter\endcsname
\csname BNE_op_-xii\endcsname
-\catcode`) 11
\let\BNE_precedence_)\xint_c_i
\def\BNE_missing_)
{\XINT_expandableerror{Sorry to report a missing ) at the end of this journey.}%
@@ -393,7 +398,7 @@
\def #2##1##2##3% \BNE_exec_-<level>
{%
\expandafter ##1\expandafter ##2\expandafter
- {\expandafter{\romannumeral`&&@\expandafter\BNE_Op_opp\xint_firstofone##3}}%
+ {\expandafter{\romannumeral`&&@\BNE_Op_opp##3}}%
}%
\def #3##1% \BNE_check-_-<level>
{%
@@ -425,7 +430,6 @@
\BNE_tmpa {xiv}%
\BNE_tmpa {xvi}%
\BNE_tmpa {xviii}%
-\def\BNE_Op_opp #1{\if-#1\else\if0#10\else-#1\fi\fi }%
\def\BNE_defbin_c #1#2#3#4#5#6#7%
{%
\def #1##1% \BNE_op_<op>