diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx index 1e8fe4b7cb5..59f734632b4 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3fp-extended.dtx @@ -22,7 +22,7 @@ % %<*driver> \documentclass[full]{l3doc} -\GetIdInfo$Id: l3fp-extended.dtx 6805 2016-12-28 22:15:52Z joseph $ +\GetIdInfo$Id: l3fp-extended.dtx 6943 2017-02-17 16:47:59Z bruno $ {L3 Floating-points with extended precision} \begin{document} \DocInput{\jobname.dtx} @@ -140,7 +140,7 @@ \cs_new:Npn \@@_fixed_add_one:wN #1#2; #3 { \exp_after:wN #3 \exp_after:wN - { \__int_value:w \__int_eval:w \c_ten_thousand + #1 } #2 ; + { \__int_value:w \__int_eval:w \c_@@_myriad_int + #1 } #2 ; } % \end{macrocode} % \end{macro} @@ -213,8 +213,8 @@ \exp_after:wN \@@_pack:NNNNNw \__int_value:w \__int_eval:w \c_@@_trailing_shift_int + #4*#9 + #5*#8 + #6*#7 - + ( #5*#9 + #6*#8 + #6*#9 / \c_ten_thousand ) - / \c_ten_thousand ; ; + + ( #5*#9 + #6*#8 + #6*#9 / \c_@@_myriad_int ) + / \c_@@_myriad_int ; ; } % \end{macrocode} % \end{macro} @@ -276,7 +276,7 @@ { \exp_after:wN \@@_fixed_div_int_after:Nw \exp_after:wN #8 - \__int_value:w \__int_eval:w - \c_one + \__int_value:w \__int_eval:w - 1 \@@_fixed_div_int:wnN #1; {#7} \@@_fixed_div_int_auxi:wnn #2; {#7} \@@_fixed_div_int_auxi:wnn @@ -288,7 +288,7 @@ \cs_new:Npn \@@_fixed_div_int:wnN #1; #2 #3 { \exp_after:wN #3 - \__int_value:w \__int_eval:w #1 / #2 - \c_one ; + \__int_value:w \__int_eval:w #1 / #2 - 1 ; {#2} {#1} } @@ -300,7 +300,7 @@ \exp_after:wN \@@_fixed_div_int:wnN \__int_value:w \__int_eval:w #3 - #1*#2 \__int_eval_end: } -\cs_new:Npn \@@_fixed_div_int_auxii:wnn #1; #2 #3 { + #1 + \c_two ; } +\cs_new:Npn \@@_fixed_div_int_auxii:wnn #1; #2 #3 { + #1 + 2 ; } \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} @@ -430,7 +430,7 @@ } \cs_new:Npn \@@_fixed_mul:nnnnnnnw #1#2 #3#4 #5#6 #7#8 ; { - #1*#4 + #2*#3 + #5*#8 + #6*#7 ) / \c_ten_thousand + #1*#4 + #2*#3 + #5*#8 + #6*#7 ) / \c_@@_myriad_int + #1*#3 + #5*#7 ; ; } % \end{macrocode} @@ -612,7 +612,7 @@ \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 + #9 (#5*#6+#4* #2 *#7+#3*#8) / \c_@@_myriad_int } % \end{macrocode} % \end{macro} @@ -639,7 +639,7 @@ \exp_after:wN \@@_ep_to_fixed_auxi:www \__int_value:w \__int_eval:w 1 0000 0000 + #2 \exp_after:wN ; \exp:w \exp_end_continue_f:w - \prg_replicate:nn { \c_four - \int_max:nn {#1} { -32 } } { 0 } ; + \prg_replicate:nn { 4 - \int_max:nn {#1} { -32 } } { 0 } ; } \cs_new:Npn \@@_ep_to_fixed_auxi:www 1#1; #2; #3#4#5#6#7; { @@ -678,7 +678,7 @@ \cs_new:Npn \@@_ep_to_ep:wwN #1,#2#3#4#5#6#7; #8 { \exp_after:wN #8 - \__int_value:w \__int_eval:w #1 + \c_four + \__int_value:w \__int_eval:w #1 + 4 \exp_after:wN \use_i:nn \exp_after:wN \@@_ep_to_ep_loop:N \__int_value:w \__int_eval:w 1 0000 0000 + #2 \__int_eval_end: @@ -687,7 +687,7 @@ \cs_new:Npn \@@_ep_to_ep_loop:N #1 { \if_meaning:w 0 #1 - - \c_one + - 1 \else: \@@_ep_to_ep_end:www #1 \fi: @@ -698,7 +698,7 @@ { \fi: \if_meaning:w ; #1 - - \c_two * \c_@@_max_exponent_int + - 2 * \c_@@_max_exponent_int \@@_ep_to_ep_zero:ww \fi: \@@_pack_twice_four:wNNNNNNNN @@ -938,9 +938,9 @@ \cs_new:Npn \@@_ep_div_esti:wwwwn #1,#2#3; #4, { \exp_after:wN \@@_ep_div_estii:wwnnwwn - \__int_value:w \__int_eval:w 10 0000 0000 / ( #2 + \c_one ) + \__int_value:w \__int_eval:w 10 0000 0000 / ( #2 + 1 ) \exp_after:wN ; - \__int_value:w \__int_eval:w #4 - #1 + \c_one , + \__int_value:w \__int_eval:w #4 - #1 + 1 , {#2} #3; } \cs_new:Npn \@@_ep_div_estii:wwnnwwn #1; #2,#3#4#5; #6; #7 @@ -1057,8 +1057,8 @@ \exp_after:wN \@@_ep_isqrt_auxii:wwnnnwn \__int_value:w \__int_eval:w \int_if_odd:nTF {#1} - { (\c_one - #1) / \c_two , 535 , { 0 } { } } - { \c_one - #1 / \c_two , 168 , { } { 0 } } + { (1 - #1) / 2 , 535 , { 0 } { } } + { 1 - #1 / 2 , 168 , { } { 0 } } } \cs_new:Npn \@@_ep_isqrt_auxii:wwnnnwn #1, #2, #3#4 #5#6; #7 { @@ -1099,13 +1099,13 @@ \fi: \exp_after:wN \@@_ep_isqrt_esti:wwwnnwn \__int_value:w \__int_eval:w - (#1 + 1 0050 0000 #4 / (#1 * #3)) / \c_two , + (#1 + 1 0050 0000 #4 / (#1 * #3)) / 2 , #1, #3, {#4} } \cs_new:Npn \@@_ep_isqrt_estii:wwwnnwn #1, #2, #3, #4#5 { \exp_after:wN \@@_ep_isqrt_estiii:NNNNNwwwn - \__int_value:w \__int_eval:w 1000 0000 + #2 * #2 #5 * \c_five + \__int_value:w \__int_eval:w 1000 0000 + #2 * #2 #5 * 5 \exp_after:wN , \__int_value:w \__int_eval:w 10000 + #2 ; } \cs_new:Npn \@@_ep_isqrt_estiii:NNNNNwwwn 1#1#2#3#4#5#6, 1#7#8; #9; @@ -1207,7 +1207,7 @@ \cs_new:Npn \@@_fixed_to_float:Nw #1#2; { \@@_fixed_to_float:wN #2; #1 } \cs_new:Npn \@@_fixed_to_float:wN #1#2#3#4#5#6; #7 { - + \__int_eval:w \c_four % for the 8-digit-at-the-start thing. + + \__int_eval:w \c_@@_block_int % for the 8-digit-at-the-start thing. \exp_after:wN \exp_after:wN \exp_after:wN \@@_fixed_to_loop:N \exp_after:wN \use_none:n @@ -1222,7 +1222,7 @@ \cs_new:Npn \@@_fixed_to_loop:N #1 { \if_meaning:w 0 #1 - - \c_one + - 1 \exp_after:wN \@@_fixed_to_loop:N \else: \exp_after:wN \@@_fixed_to_loop_end:w @@ -1243,12 +1243,12 @@ } \cs_new:Npn \@@_fixed_to_float_zero:w ; 0000 0000 0000 0000 ; { - - \c_two * \c_@@_max_exponent_int ; + - 2 * \c_@@_max_exponent_int ; {0000} {0000} {0000} {0000} ; } \cs_new:Npn \@@_fixed_to_float_pack:ww #1 ; #2#3 ; ; { - \if_int_compare:w #2 > \c_four + \if_int_compare:w #2 > 4 \exp_stop_f: \exp_after:wN \@@_fixed_to_float_round_up:wnnnnw \fi: ; #1 ; @@ -1258,7 +1258,7 @@ \exp_after:wN \@@_basics_pack_high:NNNNNw \__int_value:w \__int_eval:w 1 #1#2 \exp_after:wN \@@_basics_pack_low:NNNNNw - \__int_value:w \__int_eval:w 1 #3#4 + \c_one ; + \__int_value:w \__int_eval:w 1 #3#4 + 1 ; } % \end{macrocode} % \end{macro} |