summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3fp-aux.dtx
diff options
context:
space:
mode:
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}