summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx35
1 files changed, 21 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
index f0782a2eed4..47dfff937ad 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-expo.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: l3fp-expo.dtx Copyright (C) 2011-2012 The LaTeX3 Project
+%% File: l3fp-expo.dtx Copyright (C) 2011-2013 The LaTeX3 Project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-expo.dtx 4482 2013-04-24 21:05:12Z joseph $
+\GetIdInfo$Id: l3fp-expo.dtx 4601 2013-11-18 23:13:28Z bruno $
{L3 Floating-point exponential-related functions}
\documentclass[full]{l3doc}
\begin{document}
@@ -153,19 +153,19 @@
% $+\infty$ or a \texttt{nan} is itself. Positive normal numbers call
% \cs{@@_ln_npos_o:w}.
% \begin{macrocode}
-\cs_new:Npn \@@_ln_o:w \s_@@ \@@_chk:w #1 #2
+\cs_new:Npn \@@_ln_o:w #1 \s_@@ \@@_chk:w #2#3#4; @
{
- \if_meaning:w 2 #2
+ \if_meaning:w 2 #3
\@@_case_use:nw { \@@_invalid_operation_o:nw { ln } }
\fi:
- \if_case:w #1 \exp_stop_f:
+ \if_case:w #2 \exp_stop_f:
\@@_case_use:nw
{ \@@_division_by_zero_o:Nnw \c_minus_inf_fp { ln } }
\or:
\else:
\@@_case_return_same_o:w
\fi:
- \@@_ln_npos_o:w \s_@@ \@@_chk:w #1#2
+ \@@_ln_npos_o:w \s_@@ \@@_chk:w #2#3#4;
}
% \end{macrocode}
% \end{macro}
@@ -608,14 +608,14 @@
%
% \begin{macro}[int, EXP]{\@@_exp_o:w}
% \begin{macrocode}
-\cs_new:Npn \@@_exp_o:w \s_@@ \@@_chk:w #1#2
+\cs_new:Npn \@@_exp_o:w #1 \s_@@ \@@_chk:w #2#3#4; @
{
- \if_case:w #1 \exp_stop_f:
+ \if_case:w #2 \exp_stop_f:
\@@_case_return_o:Nw \c_one_fp
\or:
\exp_after:wN \@@_exp_normal:w
\or:
- \if_meaning:w 0 #2
+ \if_meaning:w 0 #3
\exp_after:wN \@@_case_return_o:Nw
\exp_after:wN \c_inf_fp
\else:
@@ -625,7 +625,7 @@
\or:
\@@_case_return_same_o:w
\fi:
- \s_@@ \@@_chk:w #1#2
+ \s_@@ \@@_chk:w #2#3#4;
}
% \end{macrocode}
% \end{macro}
@@ -1146,11 +1146,11 @@
% \end{macro}
%^^A end[todo]
%
-% \begin{macro}[aux, EXP]{\@@_pow_neg:www}
+% \begin{macro}[aux, EXP]{\@@_pow_neg:www, \@@_pow_neg_aux:wNN}
% This function is followed by three floating point numbers: $|a|^b$,
% $a\in[-\infty,-0]$, and $b$. If $b$ is an even integer (case $-1$),
% $a^b=|a|^b$. If $b$ is an odd integer (case $0$), $a^b=-|a|^b$,
-% obtained by a call to \cs{@@_-_o:w}. Otherwise, the sign is
+% obtained by a call to \cs{@@_pow_neg_aux:wNN}. Otherwise, the sign is
% undefined. This is invalid, unless $|a|^b$ turns out to be $+0$ or
% \texttt{nan}, in which case we return that as $a^b$. In particular,
% since the underflow detection occurs before \cs{@@_pow_neg:www} is
@@ -1160,7 +1160,7 @@
\cs_new:Npn \@@_pow_neg:www \s_@@ \@@_chk:w #1#2; #3; #4;
{
\if_case:w \@@_pow_neg_case:w #4 ;
- \cs:w @@_-_o:w \exp_after:wN \cs_end:
+ \exp_after:wN \@@_pow_neg_aux:wNN
\or:
\if_int_compare:w \__int_eval:w #1 / \c_two = \c_one
\@@_invalid_operation_o:Nww ^ #3; #4;
@@ -1172,9 +1172,16 @@
\@@_exp_after_o:w
\s_@@ \@@_chk:w #1#2;
}
+\cs_new:Npn \@@_pow_neg_aux:wNN #1 \s_@@ \@@_chk:w #2#3
+ {
+ \exp_after:wN \@@_exp_after_o:w
+ \exp_after:wN \s_@@
+ \exp_after:wN \@@_chk:w
+ \exp_after:wN #2
+ \int_use:N \__int_eval:w \c_two - #3 \__int_eval_end:
+ }
% \end{macrocode}
% ^^A todo: is this \@@_exp_after_o:w necessary? Appropriate?
-% ^^A todo: improve upon the run-time \cs:w ... \cs_end: construction.
% \end{macro}
%
% \begin{macro}[aux, rEXP]