summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx98
1 files changed, 49 insertions, 49 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
index b3952ea8aa5..9d5ff40b7ca 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx
@@ -36,7 +36,7 @@
%
%<*driver>
\RequirePackage{l3bootstrap}
-\GetIdInfo$Id: l3fp-extended.dtx 4151 2012-08-28 11:51:52Z bruno $
+\GetIdInfo$Id: l3fp-extended.dtx 4339 2012-11-24 19:16:43Z joseph $
{L3 Floating-point extended precision fixed-points}
\documentclass[full]{l3doc}
\begin{document}
@@ -173,8 +173,8 @@
% \begin{macro}[int, EXP]{\@@_fixed_div_int:wwN}
% \begin{macro}[aux, EXP]
% {
-% \@@_fixed_div_int_i:wnN, \@@_fixed_div_int_ii:wnn,
-% \@@_fixed_div_int_iii:wnn, \@@_fixed_div_int_pack:Nw,
+% \@@_fixed_div_int:wnN, \@@_fixed_div_int_auxi:wnn,
+% \@@_fixed_div_int_auxii:wnn, \@@_fixed_div_int_pack:Nw,
% \@@_fixed_div_int_after:Nw
% }
% \begin{syntax}
@@ -208,7 +208,7 @@
% \cs{@@_fixed_div_int_pack:Nw} $9999 + Q_{4}$ \\
% \cs{@@_fixed_div_int_pack:Nw} $9999 + Q_{5}$ \\
% \cs{@@_fixed_div_int_pack:Nw} $9999$ \\
-% \cs{@@_fixed_div_int_iii:wnn} $Q_{6}$ |;| \Arg{n} \Arg{a_{6}}
+% \cs{@@_fixed_div_int_auxii:wnn} $Q_{6}$ |;| \Arg{n} \Arg{a_{6}}
% \end{quote}
% where expansion is happening from the last line up. The
% \texttt{iii} auxiliary adds $Q_{6} + 2 \simeq a_{6}/n + 1$ to the
@@ -226,30 +226,30 @@
\exp_after:wN \@@_fixed_div_int_after:Nw
\exp_after:wN #8
\int_use:N \__int_eval:w \c_minus_one
- \@@_fixed_div_int_i:wnN
- #1; {#7} \@@_fixed_div_int_ii:wnn
- #2; {#7} \@@_fixed_div_int_ii:wnn
- #3; {#7} \@@_fixed_div_int_ii:wnn
- #4; {#7} \@@_fixed_div_int_ii:wnn
- #5; {#7} \@@_fixed_div_int_ii:wnn
- #6; {#7} \@@_fixed_div_int_iii:wnn ;
+ \@@_fixed_div_int:wnN
+ #1; {#7} \@@_fixed_div_int_auxi:wnn
+ #2; {#7} \@@_fixed_div_int_auxi:wnn
+ #3; {#7} \@@_fixed_div_int_auxi:wnn
+ #4; {#7} \@@_fixed_div_int_auxi:wnn
+ #5; {#7} \@@_fixed_div_int_auxi:wnn
+ #6; {#7} \@@_fixed_div_int_auxii:wnn ;
}
-\cs_new:Npn \@@_fixed_div_int_i:wnN #1; #2 #3
+\cs_new:Npn \@@_fixed_div_int:wnN #1; #2 #3
{
\exp_after:wN #3
\int_use:N \__int_eval:w #1 / #2 - \c_one ;
{#2}
{#1}
}
-\cs_new:Npn \@@_fixed_div_int_ii:wnn #1; #2 #3
+\cs_new:Npn \@@_fixed_div_int_auxi:wnn #1; #2 #3
{
+ #1
\exp_after:wN \@@_fixed_div_int_pack:Nw
\int_use:N \__int_eval:w 9999
- \exp_after:wN \@@_fixed_div_int_i:wnN
+ \exp_after:wN \@@_fixed_div_int:wnN
\int_use:N \__int_eval:w #3 - #1*#2 \__int_eval_end:
}
-\cs_new:Npn \@@_fixed_div_int_iii:wnn #1; #2 #3 { + #1 + \c_two ; }
+\cs_new:Npn \@@_fixed_div_int_auxii:wnn #1; #2 #3 { + #1 + \c_two ; }
\cs_new:Npn \@@_fixed_div_int_pack:Nw #1 #2; { + #1; {#2} }
\cs_new:Npn \@@_fixed_div_int_after:Nw #1 #2; { #1 {#2} }
% \end{macrocode}
@@ -261,8 +261,8 @@
% \begin{macro}[int, EXP]{\@@_fixed_add:wwn, \@@_fixed_sub:wwn}
% \begin{macro}[aux, EXP]
% {
-% \@@_fixed_add_i:Nnnnnwnn,
-% \@@_fixed_add_ii:nnNnnnwn,
+% \@@_fixed_add:Nnnnnwnn,
+% \@@_fixed_add:nnNnnnwn,
% \@@_fixed_add_pack:NNNNNwn,
% \@@_fixed_add_after:NNNNNwn
% }
@@ -283,17 +283,17 @@
% \meta{continuation} (|#8|, then |#7|) from the end of the argument
% list to its start.
% \begin{macrocode}
-\cs_new_nopar:Npn \@@_fixed_add:wwn { \@@_fixed_add_i:Nnnnnwnn + }
-\cs_new_nopar:Npn \@@_fixed_sub:wwn { \@@_fixed_add_i:Nnnnnwnn - }
-\cs_new:Npn \@@_fixed_add_i:Nnnnnwnn #1 #2#3#4#5 #6; #7#8
+\cs_new_nopar:Npn \@@_fixed_add:wwn { \@@_fixed_add:Nnnnnwnn + }
+\cs_new_nopar:Npn \@@_fixed_sub:wwn { \@@_fixed_add:Nnnnnwnn - }
+\cs_new:Npn \@@_fixed_add:Nnnnnwnn #1 #2#3#4#5 #6; #7#8
{
\exp_after:wN \@@_fixed_add_after:NNNNNwn
\int_use:N \__int_eval:w 9 9999 9998 + #2#3 #1 #7#8
\exp_after:wN \@@_fixed_add_pack:NNNNNwn
\int_use:N \__int_eval:w 1 9999 9998 + #4#5
- \@@_fixed_add_ii:nnNnnnwn #6 #1
+ \@@_fixed_add:nnNnnnwn #6 #1
}
-\cs_new:Npn \@@_fixed_add_ii:nnNnnnwn #1#2 #3 #4#5 #6#7 ; #8
+\cs_new:Npn \@@_fixed_add:nnNnnnwn #1#2 #3 #4#5 #6#7 ; #8
{
#3 #4#5
\exp_after:wN \@@_fixed_add_pack:NNNNNwn
@@ -310,7 +310,7 @@
% \subsection{Multiplying fixed points}
%
% \begin{macro}[int, EXP]{\@@_fixed_mul:wwn}
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_i:nnnnnnnwn}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul:nnnnnnnwn}
% \begin{syntax}
% \cs{@@_fixed_mul:wwn} \meta{a} |;| \meta{b} |;| \Arg{continuation}
% \end{syntax}
@@ -372,9 +372,9 @@
\int_use:N \__int_eval:w \c_@@_trailing_shift_int
+ #2*#9 + #3*#8 + #4*#7
+ ( #3*#9 + #4*#8
- + \@@_fixed_mul_i:nnnnnnnwn #5 {#6}{#7} {#1}{#2}
+ + \@@_fixed_mul:nnnnnnnwn #5 {#6}{#7} {#1}{#2}
}
-\cs_new:Npn \@@_fixed_mul_i:nnnnnnnwn #1#2 #3#4 #5#6 #7#8 ; #9
+\cs_new:Npn \@@_fixed_mul:nnnnnnnwn #1#2 #3#4 #5#6 #7#8 ; #9
{
#1*#4 + #2*#3 + #5*#8 + #6*#7 ) / \c_ten_thousand
+ #1*#3 + #5*#7 ;
@@ -443,7 +443,7 @@
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + #3 #4
- \@@_fixed_mul_add_i:Nwnnnwnnn +
+ \@@_fixed_mul_add:Nwnnnwnnn +
+ #5 #6 ; #2 ; #1 ; #2 ; +
+ #7 #8 ; {#9} ;
}
@@ -453,7 +453,7 @@
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + #3 #4
- \@@_fixed_mul_add_i:Nwnnnwnnn -
+ \@@_fixed_mul_add:Nwnnnwnnn -
+ #5 #6 ; #2 ; #1 ; #2 ; -
+ #7 #8 ; {#9} ;
}
@@ -463,16 +463,16 @@
\int_use:N \__int_eval:w \c_@@_big_leading_shift_int
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int + 1 0000 0000
- \@@_fixed_mul_add_i:Nwnnnwnnn -
+ \@@_fixed_mul_add:Nwnnnwnnn -
; #2 ; #1 ; #2 ; -
; {#3} ;
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add_i:Nwnnnwnnn}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:Nwnnnwnnn}
% \begin{syntax}
-% \cs{@@_fixed_mul_add_i:Nwnnnwnnn} \meta{op} |+| \meta{c_3} \meta{c_4} |;|
+% \cs{@@_fixed_mul_add:Nwnnnwnnn} \meta{op} |+| \meta{c_3} \meta{c_4} |;|
% ~~\meta{b} |;| \meta{a} |;| \meta{b} |;| \meta{op}
% ~~|+| \meta{c_5} \meta{c_6} |;|
% \end{syntax}
@@ -488,7 +488,7 @@
% we've read, but not \meta{b}, since there is another copy later in
% the input stream.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_mul_add_i:Nwnnnwnnn #1 #2; #3#4#5#6; #7#8#9
+\cs_new:Npn \@@_fixed_mul_add:Nwnnnwnnn #1 #2; #3#4#5#6; #7#8#9
{
#1 #7*#3
\exp_after:wN \@@_pack_big:NNNNNNwn
@@ -499,14 +499,14 @@
#1 #7*#5 #1 #8*#4 #1 #9*#3 #2
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_middle_shift_int
- #1 \@@_fixed_mul_add_ii:nnnnwnnnn {#7}{#8}{#9}
+ #1 \@@_fixed_mul_add:nnnnwnnnn {#7}{#8}{#9}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add_ii:nnnnwnnnn}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:nnnnwnnnn}
% \begin{syntax}
-% \cs{@@_fixed_mul_add_ii:nnnnwnnnn} \meta{a} |;| \meta{b} |;| \meta{op}
+% \cs{@@_fixed_mul_add:nnnnwnnnn} \meta{a} |;| \meta{b} |;| \meta{op}
% ~~|+| \meta{c_5} \meta{c_6} |;|
% \end{syntax}
% Level $10^{-20}$ is $(a_{1} \cdot b_{4} + a_{2} \cdot b_{3} + a_{3}
@@ -526,12 +526,12 @@
% To do all this, we keep $a_{1}$, $a_{5}$, $a_{6}$, and the
% corresponding pieces of \meta{b}.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_mul_add_ii:nnnnwnnnn #1#2#3#4#5; #6#7#8#9
+\cs_new:Npn \@@_fixed_mul_add:nnnnwnnnn #1#2#3#4#5; #6#7#8#9
{
( #1*#9 + #2*#8 + #3*#7 + #4*#6 )
\exp_after:wN \@@_pack_big:NNNNNNwn
\int_use:N \__int_eval:w \c_@@_big_trailing_shift_int
- \@@_fixed_mul_add_iii:nnnnwnnwN
+ \@@_fixed_mul_add:nnnnwnnwN
{ #6 + #4*#7 + #3*#8 + #2*#9 + #1 }
{ #7 + #4*#8 + #3*#9 + #2 }
{#1} #5;
@@ -540,9 +540,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[aux, EXP]{\@@_fixed_mul_add_iii:nnnnwnnwN}
+% \begin{macro}[aux, EXP]{\@@_fixed_mul_add:nnnnwnnwN}
% \begin{syntax}
-% \cs{@@_fixed_mul_add_iii:nnnnwnnwN} \Arg{partial_1} \Arg{partial_2}
+% \cs{@@_fixed_mul_add:nnnnwnnwN} \Arg{partial_1} \Arg{partial_2}
% ~~\Arg{a_1} \Arg{a_5} \Arg{a_6} |;| \Arg{b_1} \Arg{b_5} \Arg{b_6} |;|
% ~~\meta{op} |+| \meta{c_5} \meta{c_6} |;|
% \end{syntax}
@@ -556,7 +556,7 @@
% expected by the packing auxiliaries. See \pkg{l3fp-aux} for the
% definition of the shifts and packing auxiliaries.
% \begin{macrocode}
-\cs_new:Npn \@@_fixed_mul_add_iii:nnnnwnnwN #1#2 #3#4#5; #6#7#8; #9
+\cs_new:Npn \@@_fixed_mul_add:nnnnwnnwN #1#2 #3#4#5; #6#7#8; #9
{
#9 (#4* #1 *#7)
#9 (#5*#6+#4* #2 *#7+#3*#8) / \c_ten_thousand
@@ -701,18 +701,18 @@
#2 \c_two * \c_@@_max_exponent_int
\use_i_ii:nnn
\fi:
- \@@_fixed_dtf_zeros_ii:ww
+ \@@_fixed_dtf_zeros_auxi:ww
#1#3 0000 0000 0000 0000 0000 0000 ;
}
-\cs_new:Npn \@@_fixed_dtf_zeros_ii:ww
+\cs_new:Npn \@@_fixed_dtf_zeros_auxi:ww
{
\@@_pack_twice_four:wNNNNNNNN
\@@_pack_twice_four:wNNNNNNNN
\@@_pack_twice_four:wNNNNNNNN
- \@@_fixed_dtf_zeros_iii:ww
+ \@@_fixed_dtf_zeros_auxii:ww
;
}
-\cs_new:Npn \@@_fixed_dtf_zeros_iii:ww #1; #2; #3 { #3 #1; }
+\cs_new:Npn \@@_fixed_dtf_zeros_auxii:ww #1; #2; #3 { #3 #1; }
% \end{macrocode}
% \newcommand{\eTeXfrac}[2]{\left[\frac{#1}{#2}\right]}
% We get
@@ -799,19 +799,19 @@
% \begin{macrocode}
\cs_new:Npn \@@_fixed_dtf_approx:n #1
{
- \exp_after:wN \@@_fixed_dtf_approx_ii:wnn
+ \exp_after:wN \@@_fixed_dtf_approx:wnn
\int_use:N \__int_eval:w 10 0000 0000 / ( #1 + \c_one ) ;
{#1}
}
-\cs_new:Npn \@@_fixed_dtf_approx_ii:wnn #1; #2#3
+\cs_new:Npn \@@_fixed_dtf_approx:wnn #1; #2#3
{
%<assert> \assert:n { \tl_count:n {#1} = 6 }
- \exp_after:wN \@@_fixed_dtf_approx_iii:NNNNNw
+ \exp_after:wN \@@_fixed_dtf_approx:NNNNNw
\int_use:N \__int_eval:w 10 0000 0000 - 1750
+ #1000 + (10 0000 0000/#2-#1) * (1000-#3/10) ;
{#2}{#3}
}
-\cs_new:Npn \@@_fixed_dtf_approx_iii:NNNNNw 1#1#2#3#4#5#6; #7; #8;
+\cs_new:Npn \@@_fixed_dtf_approx:NNNNNw 1#1#2#3#4#5#6; #7; #8;
{
+ \c_four % because of the line below "dtf_epsilon" here.
\@@_fixed_mul:wwn {000#1}{#2#3#4#5}{#6}{0000}{0000}{0000} ; #7;
@@ -824,14 +824,14 @@
{
%<assert> \assert:n { #1 = 0000 }
%<assert> \assert:n { #2 = 9999 }
- \exp_after:wN \@@_fixed_dtf_epsilon_ii:NNNNNww
+ \exp_after:wN \@@_fixed_dtf_epsilon:NNNNNww
\int_use:N \__int_eval:w 1 9999 9998 - #3#4 +
\exp_after:wN \@@_fixed_dtf_epsilon_pack:NNNNNw
\int_use:N \__int_eval:w 2 0000 0000 - #5#6 ; {0000} ;
}
\cs_new:Npn \@@_fixed_dtf_epsilon_pack:NNNNNw #1#2#3#4#5#6;
{ #1 ; {#2#3#4#5} {#6} }
-\cs_new:Npn \@@_fixed_dtf_epsilon_ii:NNNNNww #1#2#3#4#5#6; #7;
+\cs_new:Npn \@@_fixed_dtf_epsilon:NNNNNww #1#2#3#4#5#6; #7;
{
\@@_fixed_mul:wwn %^^A todo: optimize to use \@@_mul_significand.
{0000} {#2#3#4#5} {#6} #7 ;