summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-11-22 22:50:16 +0000
committerKarl Berry <karl@freefriends.org>2016-11-22 22:50:16 +0000
commitf476e2547d6f421f3f59e812adb855596f668eb5 (patch)
tree859e615afe313dc934f3ca679cd4ea760e356f98 /Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
parent4061b69b7a85fc322821dbfc8beb83b498542e45 (diff)
l3 (22nov16)
git-svn-id: svn://tug.org/texlive/trunk@42556 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx39
1 files changed, 38 insertions, 1 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
index ce51a27a8d5..519a63fd6d9 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\documentclass[full]{l3doc}
-\GetIdInfo$Id: l3fp-aux.dtx 6685 2016-08-19 16:26:52Z bruno $
+\GetIdInfo$Id: l3fp-aux.dtx 6750 2016-11-21 01:24:26Z bruno $
{L3 Floating-point support functions}
\documentclass[full]{l3doc}
\begin{document}
@@ -939,6 +939,43 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Integer floating points}
+%
+% \begin{macro}[int, EXP, pTF]{\@@_int:w}
+% \begin{macro}[aux, EXP]{\@@_int_normal:nnnnn, \@@_int_test:Nw}
+% Tests if the floating point argument is an integer. This holds if
+% the rounding digit resulting from \cs{@@_decimate:nNnnnn} is~$0$.
+% \begin{macrocode}
+\prg_new_conditional:Npnn \@@_int:w \s_@@ \@@_chk:w #1 #2 #3; { TF , T , F , p }
+ {
+ \if_case:w #1 \exp_stop_f:
+ \prg_return_true:
+ \or: \@@_int_normal:nnnnn #3
+ \else: \prg_return_false:
+ \fi:
+ }
+\cs_new:Npn \@@_int_normal:nnnnn #1 #2#3#4#5
+ {
+ \if_int_compare:w #1 > \c_zero
+ \@@_decimate:nNnnnn { \c_sixteen - #1 }
+ \@@_int_test:Nw
+ {#2} {#3} {#4} {#5}
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+\cs_new:Npn \@@_int_test:Nw #1#2;
+ {
+ \if_meaning:w 0 #1
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Small integer floating points}
%
% \begin{macro}[int, EXP]{\@@_small_int:wTF}