diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx b/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx index 1b0a6063dac..7d0787fefa6 100644 --- a/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xfp/xfp.dtx @@ -23,8 +23,8 @@ %<*driver|package> % The version of expl3 required is tested as early as possible, as % some really old versions do not define \ProvidesExplPackage. -\RequirePackage{expl3}[2017/07/19] -%<package>\@ifpackagelater{expl3}{2017/07/19} +\RequirePackage{expl3}[2017/09/18] +%<package>\@ifpackagelater{expl3}{2017/09/18} %<package> {} %<package> {% %<package> \PackageError{xfp}{Support package l3kernel too old} @@ -62,14 +62,15 @@ % }^^A % } % -% \date{Released 2017/07/19} +% \date{Released 2017/09/18} % % \maketitle % % \begin{documentation} % % This package provides a \LaTeXe{} document-level interface to the \LaTeX{}3 -% floating point unit (part of \pkg{expl3}). +% floating point unit (part of \pkg{expl3}). It also provides a parallel +% integer expression interface for convenience. % % \begin{function}[EXP]{\fpeval} % The expandable command \cs{fpeval} takes as it's argument a floating @@ -129,7 +130,22 @@ % An example of use could be the following. % \begin{verbatim} % \LaTeX{} can now compute: $ \frac{\sin (3.5)}{2} + 2\cdot 10^{-3} -% = \fpeval{sin 3.5 /2 + 2e-3} $. +% = \fpeval{sin(3.5)/2 + 2e-3} $. +% \end{verbatim} +% +% \begin{function}[EXP]{\inteval} +% The expandable command \cs{inteval} takes as its argument an integer +% expression and produces a result using the normal rules of +% mathematics. The operations recognised are |+|, |-|, |*| and |/| plus +% parentheses. Division occurs with \emph{rounding}, and ties are rounded +% away from zero. As this command is +% expandable it can be used where \TeX{} requires a number and for example +% within a low-level \cs{edef} operation to give a purely numerical result. +% \end{function} +% +% An example of use could be the following. +% \begin{verbatim} +% \LaTeX{} can now compute: The sum of the numbers is $\inteval{1 + 2 + 3}$. % \end{verbatim} % % \end{documentation} @@ -143,7 +159,7 @@ % \end{macrocode} % % \begin{macrocode} -\ProvidesExplPackage{xfp}{2017/07/19}{} +\ProvidesExplPackage{xfp}{2017/09/18}{} {L3 Floating point unit} % \end{macrocode} % @@ -154,6 +170,13 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\inteval} +% A second one, this time around an \eTeX{} primitive. +% \begin{macrocode} +\NewExpandableDocumentCommand \inteval { m } { \int_eval:n {#1} } +% \end{macrocode} +% \end{macro} +% % \begin{macrocode} %</package> % \end{macrocode} |