summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3fp.dtx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-30 03:00:43 +0000
committerNorbert Preining <norbert@preining.info>2019-09-30 03:00:43 +0000
commitbbbe8128e7ae9d816a221377dbf5ff3969bb203b (patch)
tree0283a521760b879b30e61872f14f235645745675 /macros/latex/contrib/l3kernel/l3fp.dtx
parent14ce8b68fe7df49e8a8891bb94c63b9a846da232 (diff)
CTAN sync 201909300300
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3fp.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3fp.dtx29
1 files changed, 27 insertions, 2 deletions
diff --git a/macros/latex/contrib/l3kernel/l3fp.dtx b/macros/latex/contrib/l3kernel/l3fp.dtx
index fe50141119..4c0451d726 100644
--- a/macros/latex/contrib/l3kernel/l3fp.dtx
+++ b/macros/latex/contrib/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2019-09-19}
+% \date{Released 2019-09-28}
%
% \maketitle
%
@@ -72,7 +72,7 @@
% negation $\mathop{!}x$, conjunction
% $x\mathop{\&\&}y$, disjunction $x\mathop{\vert\vert}y$, ternary
% operator $x\mathop{?}y\mathop{:}z$.
-% \item Exponentials: $\exp x$, $\ln x$, $x^y$.
+% \item Exponentials: $\exp x$, $\ln x$, $x^y$, $\operatorname{logb} x$.
% \item Integer factorial: $\operatorname{fact} x$.
% \item Trigonometry: $\sin x$, $\cos x$, $\tan x$, $\cot x$, $\sec
% x$, $\csc x$ expecting their arguments in radians, and
@@ -260,6 +260,18 @@
% This function is identical to \cs{fp_to_decimal:n}.
% \end{function}
%
+% \begin{function}[EXP, added = 2018-11-03]{\fp_sign:n}
+% \begin{syntax}
+% \cs{fp_sign:n} \Arg{fpexpr}
+% \end{syntax}
+% Evaluates the \meta{fpexpr} and leaves its sign in the input stream
+% using \cs{fp_eval:n} |{sign(|\meta{result}|)}|: $+1$ for positive
+% numbers and for $+\infty$, $-1$ for negative numbers and for
+% $-\infty$, $\pm 0$ for $\pm 0$. If the operand is a tuple or is
+% \nan{}, then \enquote{invalid operation} occurs and the result
+% is~$0$.
+% \end{function}
+%
% \begin{function}[EXP, added = 2012-05-08, updated = 2012-07-08]
% {\fp_to_decimal:N, \fp_to_decimal:c, \fp_to_decimal:n}
% \begin{syntax}
@@ -1065,6 +1077,19 @@
% operation} occurs.
% \end{function}
%
+% \begin{function}[EXP, added = 2018-11-03]{logb}
+% \begin{syntax}
+% \cs{fp_eval:n} \{ |logb(| \meta{fpexpr} |)| \}
+% \end{syntax}
+% Determines the exponent of the \meta{fpexpr}, namely the floor of
+% the base-$10$ logarithm of its absolute value. \enquote{Division by
+% zero} occurs when evaluating $\operatorname{logb}(\pm 0) = -\infty$.
+% Other special values are $\operatorname{logb}(\pm\infty)=+\infty$
+% and $\operatorname{logb}(\nan{})=\nan{}$. If the operand is a tuple
+% or is \nan{}, then \enquote{invalid operation} occurs and the result
+% is \nan{}.
+% \end{function}
+%
% \begin{function}[tested = m3fp-logic002]{max, min}
% \begin{syntax}
% \cs{fp_eval:n} \{ |max(| \meta{fpexpr_1} |,| \meta{fpexpr_2} |,| \ldots{} |)| \}