[latex3-commits] [l3svn] r6943 - Stop using \c_two etc integer constants in l3kernel
noreply at latex-project.org
noreply at latex-project.org
Fri Feb 17 17:47:59 CET 2017
Author: bruno
Date: 2017-02-17 17:47:59 +0100 (Fri, 17 Feb 2017)
New Revision: 6943
Modified:
trunk/l3kernel/expl3.dtx
trunk/l3kernel/l3box.dtx
trunk/l3kernel/l3candidates.dtx
trunk/l3kernel/l3clist.dtx
trunk/l3kernel/l3doc.dtx
trunk/l3kernel/l3flag.dtx
trunk/l3kernel/l3fp-aux.dtx
trunk/l3kernel/l3fp-basics.dtx
trunk/l3kernel/l3fp-convert.dtx
trunk/l3kernel/l3fp-expo.dtx
trunk/l3kernel/l3fp-extended.dtx
trunk/l3kernel/l3fp-logic.dtx
trunk/l3kernel/l3fp-parse.dtx
trunk/l3kernel/l3fp-random.dtx
trunk/l3kernel/l3fp-round.dtx
trunk/l3kernel/l3fp-trig.dtx
trunk/l3kernel/l3int.dtx
trunk/l3kernel/l3msg.dtx
trunk/l3kernel/l3sort.dtx
trunk/l3kernel/l3str.dtx
trunk/l3kernel/l3tl.dtx
trunk/l3kernel/l3token.dtx
trunk/l3kernel/testfiles/m3expl001.luatex.tlg
trunk/l3kernel/testfiles/m3expl001.ptex.tlg
trunk/l3kernel/testfiles/m3expl001.tlg
trunk/l3kernel/testfiles/m3expl001.uptex.tlg
trunk/l3kernel/testfiles/m3expl001.xetex.tlg
trunk/l3kernel/testfiles/m3expl003.luatex.tlg
trunk/l3kernel/testfiles/m3expl003.ptex.tlg
trunk/l3kernel/testfiles/m3expl003.tlg
trunk/l3kernel/testfiles/m3expl003.uptex.tlg
trunk/l3kernel/testfiles/m3expl003.xetex.tlg
Log:
Stop using \c_two etc integer constants in l3kernel
I haven't been systematic about removing \c_one and \c_zero,
as they are used a lot, and it is not easy to determine when
that is important for performance.
Modified: trunk/l3kernel/expl3.dtx
===================================================================
--- trunk/l3kernel/expl3.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/expl3.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -1716,7 +1716,7 @@
{
\bool_lazy_and:nnTF
{ \cs_if_exist_p:N \pdftex_pdfoutput:D }
- { \int_compare_p:nNn \pdftex_pdfoutput:D > \c_zero }
+ { \int_compare_p:nNn \pdftex_pdfoutput:D > 0 }
{ pdfmode }
{ dvips }
}
Modified: trunk/l3kernel/l3box.dtx
===================================================================
--- trunk/l3kernel/l3box.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3box.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -922,7 +922,7 @@
{ \box_show:Nnn #1 \c_max_int \c_max_int }
\cs_generate_variant:Nn \box_show:N { c }
\cs_new_protected:Npn \box_show:Nnn #1#2#3
- { \@@_show:NNff \c_one #1 { \int_eval:n {#2} } { \int_eval:n {#3} } }
+ { \@@_show:NNff 1 #1 { \int_eval:n {#2} } { \int_eval:n {#3} } }
\cs_generate_variant:Nn \box_show:Nnn { c }
% \end{macrocode}
% \end{macro}
@@ -941,9 +941,9 @@
{ \exp_args:No \@@_log:nNnn { \tex_the:D \etex_interactionmode:D } }
\cs_new_protected:Npn \@@_log:nNnn #1#2#3#4
{
- \etex_interactionmode:D \c_zero
- \@@_show:NNff \c_zero #2 { \int_eval:n {#3} } { \int_eval:n {#4} }
- \etex_interactionmode:D #1 \scan_stop:
+ \int_set:Nn \etex_interactionmode:D { 0 }
+ \@@_show:NNff 0 #2 { \int_eval:n {#3} } { \int_eval:n {#4} }
+ \int_set:Nn \etex_interactionmode:D {#1}
}
\cs_generate_variant:Nn \box_log:Nnn { c }
% \end{macrocode}
@@ -964,8 +964,8 @@
\group_begin:
\int_set:Nn \tex_showboxbreadth:D {#3}
\int_set:Nn \tex_showboxdepth:D {#4}
- \int_set_eq:NN \tex_tracingonline:D #1
- \int_set:Nn \tex_errorcontextlines:D { - \c_one }
+ \int_set:Nn \tex_tracingonline:D {#1}
+ \int_set:Nn \tex_errorcontextlines:D { -1 }
\tex_showbox:D \use:n {#2}
\group_end:
}
Modified: trunk/l3kernel/l3candidates.dtx
===================================================================
--- trunk/l3kernel/l3candidates.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3candidates.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -1659,7 +1659,7 @@
{ \exp_args:Nf \@@_rand_item:nn { \clist_count:n {#1} } {#1} }
\cs_new:Npn \@@_rand_item:nn #1#2
{
- \int_compare:nNnF {#1} = \c_zero
+ \int_compare:nNnF {#1} = 0
{ \clist_item:nn {#2} { \int_rand:nn { 1 } {#1} } }
}
\cs_new:Npn \clist_rand_item:N #1
@@ -2293,12 +2293,12 @@
\@@_rand:ww #2; #1;
}
{
- \int_compare:nNnTF {#1} > \c_zero
+ \int_compare:nNnTF {#1} > 0
{ \int_compare:nNnTF { #2 - #1 } < \c__fp_rand_size_int }
{ \int_compare:nNnTF {#2} < { #1 + \c__fp_rand_size_int } }
{
\exp_args:Nf \@@_rand_narrow:nn
- { \int_eval:n { #2 - #1 + \c_one } } {#1}
+ { \int_eval:n { #2 - #1 + 1 } } {#1}
}
{ \fp_to_int:n { randint(#1,#2) } }
}
@@ -2477,11 +2477,11 @@
{
\int_eval:n
{
- \c_zero
+ 0
\prop_map_function:NN #1 \@@_count:nn
}
}
-\cs_new:Npn \@@_count:nn #1#2 { + \c_one }
+\cs_new:Npn \@@_count:nn #1#2 { + 1 }
\cs_generate_variant:Nn \prop_count:N { c }
% \end{macrocode}
% \end{macro}
@@ -2539,10 +2539,10 @@
}
\cs_new:Npn \@@_rand_item:Nw #1#2 \s_@@ \@@_pair:wn #3 \s_@@ #4
{
- \int_compare:nNnF {#2} > \c_one
+ \int_compare:nNnF {#2} > 1
{ \use_i_delimit_by_q_stop:nw { #1 {#3} \exp_not:n {#4} } }
\exp_after:wN \@@_rand_item:Nw \exp_after:wN #1
- \__int_value:w \int_eval:n { #2 - \c_one } \s_@@
+ \__int_value:w \int_eval:n { #2 - 1 } \s_@@
}
\cs_generate_variant:Nn \prop_rand_key_value:N { c }
% \end{macrocode}
@@ -4351,9 +4351,9 @@
\cs_new_protected:Npn \@@_execute_branches_N_type:
{
\if_int_odd:w
- \if_catcode:w \exp_not:N \l_peek_token { \c_two \fi:
- \if_catcode:w \exp_not:N \l_peek_token } \c_two \fi:
- \if_meaning:w \l_peek_token \c_space_token \c_two \fi:
+ \if_catcode:w \exp_not:N \l_peek_token { \c_zero \fi:
+ \if_catcode:w \exp_not:N \l_peek_token } \c_zero \fi:
+ \if_meaning:w \l_peek_token \c_space_token \c_zero \fi:
\c_one
\exp_after:wN \@@_N_type:w
\token_to_meaning:N \l_peek_token
Modified: trunk/l3kernel/l3clist.dtx
===================================================================
--- trunk/l3kernel/l3clist.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3clist.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -1643,7 +1643,7 @@
{
\int_eval:n
{
- 0
+ \c_zero
\clist_map_function:NN #1 \@@_count:n
}
}
@@ -1652,7 +1652,7 @@
{
\exp_not:N \int_eval:n
{
- 0
+ \c_zero
\exp_not:N \@@_count:w \c_space_tl
#1 \exp_not:n { , \q_recursion_tail , \q_recursion_stop }
}
@@ -1759,11 +1759,11 @@
}
\cs_new:Npn \@@_item:nnnN #1#2#3#4
{
- \int_compare:nNnTF {#2} < \c_zero
+ \int_compare:nNnTF {#2} < 0
{
\int_compare:nNnTF {#2} < { - #1 }
{ \use_none_delimit_by_q_stop:w }
- { \exp_args:Nf #4 { \int_eval:n { #2 + \c_one + #1 } } }
+ { \exp_args:Nf #4 { \int_eval:n { #2 + 1 + #1 } } }
}
{
\int_compare:nNnTF {#2} > {#1}
@@ -1775,7 +1775,7 @@
\cs_generate_variant:Nn \@@_item:nnnN { ffo, ff }
\cs_new:Npn \@@_item_N_loop:nw #1 #2,
{
- \int_compare:nNnTF {#1} = \c_zero
+ \int_compare:nNnTF {#1} = 0
{ \use_i_delimit_by_q_stop:nw { \exp_not:n {#2} } }
{ \exp_args:Nf \@@_item_N_loop:nw { \int_eval:n { #1 - 1 } } }
}
@@ -1811,7 +1811,7 @@
\exp_args:No \tl_if_blank:nTF {#2}
{ \@@_item_n_loop:nw {#1} \prg_do_nothing: }
{
- \int_compare:nNnTF {#1} = \c_zero
+ \int_compare:nNnTF {#1} = 0
{ \exp_args:No \@@_item_n_end:n {#2} }
{
\exp_args:Nf \@@_item_n_loop:nw
Modified: trunk/l3kernel/l3doc.dtx
===================================================================
--- trunk/l3kernel/l3doc.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3doc.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -2656,7 +2656,7 @@
\hbox:n
{
\strut
- \int_compare:nNnT \l_@@_macro_int = \c_zero
+ \int_compare:nNnT \l_@@_macro_int = 0
{ \HD at target }
}
\vskip \int_eval:n { \l_@@_macro_int - 1 } \baselineskip
Modified: trunk/l3kernel/l3flag.dtx
===================================================================
--- trunk/l3kernel/l3flag.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3flag.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -208,7 +208,7 @@
\if_cs_exist:w flag~#2~#1 \cs_end:
\cs_set_eq:cN { flag~#2~#1 } \tex_undefined:D
\exp_after:wN \@@_clear:wn
- \__int_value:w \__int_eval:w \c_one + #1
+ \__int_value:w \__int_eval:w 1 + #1
\else:
\use_i:nnn
\fi:
@@ -278,7 +278,7 @@
\cs_new:Npn \@@_height_loop:wn #1 ; #2
{
\if_cs_exist:w flag~#2~#1 \cs_end:
- \exp_after:wN \@@_height_loop:wn \__int_value:w \__int_eval:w \c_one +
+ \exp_after:wN \@@_height_loop:wn \__int_value:w \__int_eval:w 1 +
\else:
\exp_after:wN \@@_height_end:wn
\fi:
Modified: trunk/l3kernel/l3fp-aux.dtx
===================================================================
--- trunk/l3kernel/l3fp-aux.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-aux.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -301,6 +301,22 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\c_@@_prec_int, \c_@@_half_prec_int, \c_@@_block_int}
+% The number of digits of floating points.
+% \begin{macrocode}
+\int_const:Nn \c_@@_prec_int { 16 }
+\int_const:Nn \c_@@_half_prec_int { 8 }
+\int_const:Nn \c_@@_block_int { 4 }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\c_@@_myriad_int}
+% Blocks have $4$~digits so this integer is useful.
+% \begin{macrocode}
+\int_const:Nn \c_@@_myriad_int { 10000 }
+% \end{macrocode}
+% \end{variable}
+%
% \begin{variable}[int]{\c_@@_max_exponent_int}
% Normal floating point numbers have an exponent at most
% \texttt{max_exponent} in absolute value. Larger numbers are rounded
@@ -319,6 +335,14 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{variable}{\c_@@_max_exp_exponent_int}
+% If a number's exponent is larger than that, its exponential
+% overflows/underflows.
+% \begin{macrocode}
+\int_const:Nn \c_@@_max_exp_exponent_int { 5 }
+% \end{macrocode}
+% \end{variable}
+%
% \begin{macro}[int, EXP]{\@@_zero_fp:N, \@@_inf_fp:N}
% In case of overflow or underflow, we have to output
% a zero or infinity with a given sign.
@@ -372,7 +396,7 @@
% turned to $2$ (negative), $1$ (\texttt{nan}) to $1$, and $2$ to $0$.
% \begin{macrocode}
\cs_new:Npn \@@_neg_sign:N #1
- { \__int_eval:w \c_two - #1 \__int_eval_end: }
+ { \__int_eval:w 2 - #1 \__int_eval_end: }
% \end{macrocode}
% \end{macro}
%
@@ -391,9 +415,9 @@
\cs_new:Npn \@@_sanitize:Nw #1 #2;
{
\if_case:w
- \if_int_compare:w #2 > \c_@@_max_exponent_int \c_one \else:
- \if_int_compare:w #2 < - \c_@@_max_exponent_int \c_two \else:
- \if_meaning:w 1 #1 \c_three \else: \c_zero \fi: \fi: \fi:
+ \if_int_compare:w #2 > \c_@@_max_exponent_int 1 ~ \else:
+ \if_int_compare:w #2 < - \c_@@_max_exponent_int 2 ~ \else:
+ \if_meaning:w 1 #1 3 ~ \else: 0 ~ \fi: \fi: \fi:
\or: \exp_after:wN \@@_overflow:w
\or: \exp_after:wN \@@_underflow:w
\or: \exp_after:wN \@@_sanitize_zero:w
@@ -717,7 +741,7 @@
{
\cs:w
@@_decimate_
- \if_int_compare:w \__int_eval:w #1 > \c_sixteen
+ \if_int_compare:w \__int_eval:w #1 > \c_@@_prec_int
tiny
\else:
\__int_to_roman:w \__int_eval:w #1
@@ -943,7 +967,7 @@
\cs_new:Npn \@@_int_normal:nnnnn #1 #2#3#4#5
{
\if_int_compare:w #1 > \c_zero
- \@@_decimate:nNnnnn { \c_sixteen - #1 }
+ \@@_decimate:nNnnnn { \c_@@_prec_int - #1 }
\@@_int_test:Nw
{#2} {#3} {#4} {#5}
\else:
@@ -1008,7 +1032,7 @@
\cs_new:Npn \@@_small_int_normal:NnwTF #1#2#3;
{
\if_int_compare:w #2 > \c_zero
- \@@_decimate:nNnnnn { \c_sixteen - #2 }
+ \@@_decimate:nNnnnn { \c_@@_prec_int - #2 }
\@@_small_int_test:NnnwNnw
#3 #1 {#2}
\else:
@@ -1021,7 +1045,7 @@
\if_meaning:w 0 #1
\exp_after:wN \@@_small_int_true:wTF
\__int_value:w \if_meaning:w 2 #5 - \fi:
- \if_int_compare:w #6 > \c_eight
+ \if_int_compare:w #6 > \c_@@_half_prec_int
1 0000 0000
\else:
#3
Modified: trunk/l3kernel/l3fp-basics.dtx
===================================================================
--- trunk/l3kernel/l3fp-basics.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-basics.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -92,7 +92,7 @@
% |{0000}|.
% \begin{macrocode}
\cs_new:Npn \@@_basics_pack_low:NNNNNw #1 #2#3#4#5 #6;
- { + #1 - \c_one ; {#2#3#4#5} {#6} ; }
+ { + #1 - 1 ; {#2#3#4#5} {#6} ; }
\cs_new:Npn \@@_basics_pack_high:NNNNNw #1 #2#3#4#5 #6;
{
\if_meaning:w 2 #1
@@ -101,7 +101,7 @@
; {#2#3#4#5} {#6}
}
\cs_new:Npn \@@_basics_pack_high_carry:w \fi: ; #1
- { \fi: + \c_one ; {1000} }
+ { \fi: + 1 ; {1000} }
% \end{macrocode}
% \end{macro}
%
@@ -116,7 +116,7 @@
\cs_new:Npn \@@_basics_pack_weird_low:NNNNw #1 #2#3#4 #5;
{
\if_meaning:w 2 #1
- + \c_one
+ + 1
\fi:
\__int_eval_end:
#2#3#4; {#5} ;
@@ -196,14 +196,15 @@
{
\if_case:w
\if_meaning:w #2 #4
- #2 \exp_stop_f:
+ #2
\else:
\if_int_compare:w #2 > #4 \exp_stop_f:
- \c_three
+ 3
\else:
- \c_four
+ 4
\fi:
\fi:
+ \exp_stop_f:
\exp_after:wN \@@_add_zeros_o:Nww \__int_value:w
\or: \exp_after:wN \@@_add_normal_o:Nww \__int_value:w
\or: \exp_after:wN \@@_add_inf_o:Nww \__int_value:w
@@ -393,7 +394,7 @@
\cs_new:Npn \@@_add_significand_pack:NNNNNNN #1 #2#3#4#5#6#7
{
\if_meaning:w 2 #1
- + \c_one
+ + 1
\fi:
; #2 #3 #4 #5 #6 #7 ;
}
@@ -444,7 +445,7 @@
\cs_new:Npn \@@_add_significand_carry_o:wwwNN
#1; #2; #3#4; #5#6
{
- + \c_one
+ + 1
\exp_after:wN \@@_basics_pack_weird_high:NNNNNNNNw
\__int_value:w \__int_eval:w 1 1 #1
\exp_after:wN \@@_basics_pack_weird_low:NNNNw
@@ -489,7 +490,7 @@
\cs_new:Npn \@@_sub_npos_ii_o:Nnwnw #1 #2; #3;
{
\exp_after:wN \@@_sub_npos_i_o:Nnwnw
- \__int_value:w \__int_eval:w \c_two - #1 \__int_eval_end:
+ \__int_value:w \@@_neg_sign:N #1
#3; #2;
}
% \end{macrocode}
@@ -517,7 +518,7 @@
\exp_after:wN \@@_sub_back_near_o:nnnnnnnnN
\else:
\exp_after:wN \@@_decimate:nNnnnn \exp_after:wN
- { \__int_value:w \__int_eval:w #2 - #4 - \c_one \exp_after:wN }
+ { \__int_value:w \__int_eval:w #2 - #4 - 1 \exp_after:wN }
\exp_after:wN \@@_sub_back_far_o:NnnwnnnnN
\fi:
#5
@@ -546,7 +547,7 @@
\cs_new:Npn \@@_sub_back_near_o:nnnnnnnnN #1#2#3#4 #5#6#7#8 #9
{
\exp_after:wN \@@_sub_back_near_after:wNNNNw
- \__int_value:w \__int_eval:w 10#5#6 - #1#2 - \c_eleven
+ \__int_value:w \__int_eval:w 10#5#6 - #1#2 - 11
\exp_after:wN \@@_sub_back_near_pack:NNNNNNw
\__int_value:w \__int_eval:w 11#7#8 - #3#4 \exp_after:wN ;
}
@@ -594,7 +595,7 @@
\cs_new:Npn \@@_sub_back_shift_ii:ww #1 0 ; #2#3 ;
{
\if_meaning:w @ #1 @
- - \c_seven
+ - 7
- \exp_after:wN \use_i:nnn
\exp_after:wN \@@_sub_back_shift_iii:NNNNNNNNw
\__int_value:w #2#3 0 ~ 123456789;
@@ -637,13 +638,14 @@
\if_case:w
\if_int_compare:w 1 #2 = #5#6 \use_i:nnnn #7 \exp_stop_f:
\if_int_compare:w #3 = \use_none:n #7#8 0 \exp_stop_f:
- \c_zero
+ 0
\else:
- \if_int_compare:w #3 > \use_none:n #7#8 0 - \fi: \c_one
+ \if_int_compare:w #3 > \use_none:n #7#8 0 - \fi: 1
\fi:
\else:
- \if_int_compare:w 1 #2 > #5#6 \use_i:nnnn #7 - \fi: \c_one
+ \if_int_compare:w 1 #2 > #5#6 \use_i:nnnn #7 - \fi: 1
\fi:
+ \exp_stop_f:
\exp_after:wN \@@_sub_back_quite_far_o:wwNN
\or: \exp_after:wN \@@_sub_back_very_far_o:wwwwNN
\else: \exp_after:wN \@@_sub_back_not_far_o:wwwwNN
@@ -678,7 +680,7 @@
\exp_after:wN \use_ii:nn
\fi:
{ ; {1000} {0000} {0000} {0000} ; }
- { - \c_one ; {9999} {9999} {9999} {9999} ; }
+ { - 1 ; {9999} {9999} {9999} {9999} ; }
}
% \end{macrocode}
% \end{macro}
@@ -687,7 +689,7 @@
% \begin{macro}[aux, rEXP]{\@@_sub_back_not_far_o:wwwwNN}
% In the present case, $x$ and $y$ have different exponents, but
% $y$~is large enough that $x-y$ has a smaller exponent than~$x$.
-% Decrement the exponent (with |- \c_one|). Then proceed in a way
+% Decrement the exponent (with |-1|). Then proceed in a way
% similar to the \texttt{near} auxiliaries seen earlier, but
% multiplying $x$ by~$10$ (|#30| and |#40| below), and with the added
% quirk that the \meta{rounding} digit has to be taken into account.
@@ -701,9 +703,9 @@
% \begin{macrocode}
\cs_new:Npn \@@_sub_back_not_far_o:wwwwNN #1 ~ #2; #3 ~ #4; #5#6
{
- - \c_one
+ - 1
\exp_after:wN \@@_sub_back_near_after:wNNNNw
- \__int_value:w \__int_eval:w 1#30 - #1 - \c_eleven
+ \__int_value:w \__int_eval:w 1#30 - #1 - 11
\exp_after:wN \@@_sub_back_near_pack:NNNNNNw
\__int_value:w \__int_eval:w 11 0000 0000 + #40 - #2
- \exp_after:wN \@@_round_neg:NNN
@@ -736,7 +738,7 @@
\cs_new:Npn \@@_sub_back_very_far_ii_o:nnNwwNN #1#2 ; #3 ; #4 ~ #5; #6#7
{
\exp_after:wN \@@_basics_pack_high:NNNNNw
- \__int_value:w \__int_eval:w 1#4 - #1 - \c_one
+ \__int_value:w \__int_eval:w 1#4 - #1 - 1
\exp_after:wN \@@_basics_pack_low:NNNNNw
\__int_value:w \__int_eval:w 2#5 - #2
- \exp_after:wN \@@_round_neg:NNN
@@ -767,7 +769,7 @@
{
\@@_mul_cases_o:NnNnww
*
- { - \c_two + }
+ { - 2 + }
\@@_mul_npos_o:Nww
{ }
}
@@ -798,24 +800,24 @@
#1#2#3#4 \s_@@ \@@_chk:w #5#6#7; \s_@@ \@@_chk:w #8#9
{
\if_case:w \__int_eval:w
- \if_int_compare:w #5 #8 = \c_eleven
- \c_one
+ \if_int_compare:w #5 #8 = 11 ~
+ 1
\else:
\if_meaning:w 3 #8
- \c_three
+ 3
\else:
\if_meaning:w 3 #5
- \c_two
+ 2
\else:
- \if_int_compare:w #5 #8 = \c_ten
- \c_nine #2 - \c_two
+ \if_int_compare:w #5 #8 = 10 ~
+ 9 #2 - 2
\else:
- (#5 #2 #8) / \c_two * \c_two + \c_seven
+ (#5 #2 #8) / 2 * 2 + 7
\fi:
\fi:
\fi:
\fi:
- \if_meaning:w #6 #9 - \c_one \fi:
+ \if_meaning:w #6 #9 - 1 \fi:
\__int_eval_end:
\@@_case_use:nw { #3 0 }
\or: \@@_case_use:nw { #3 2 }
@@ -974,7 +976,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_mul_significand_small_f:NNwwwN #1 #2#3; #4#5; #6; + #7
{
- - \c_one
+ - 1
\exp_after:wN \@@_basics_pack_high:NNNNNw
\__int_value:w \__int_eval:w 1#3#4
\exp_after:wN \@@_basics_pack_low:NNNNNw
@@ -998,7 +1000,7 @@
% Filtering special floating point is very similar to what we did for
% multiplications, with a few variations. Invalid operation
% exceptions display |/| rather than |*|. In the formula for
-% dispatch, we replace |- \c_two +| by |-|. The case of normal
+% dispatch, we replace |- 2 +| by |-|. The case of normal
% numbers is treated using \cs{@@_div_npos_o:Nww} rather than
% \cs{@@_mul_npos_o:Nww}. There are two additional cases: if the
% first operand is normal and the second is a zero, then the division
@@ -1049,7 +1051,7 @@
\__int_value:w \__int_eval:w
#3 - #6
\exp_after:wN \@@_div_significand_i_o:wnnw
- \__int_value:w \__int_eval:w #7 \use_i:nnnn #8 + \c_one ;
+ \__int_value:w \__int_eval:w #7 \use_i:nnnn #8 + 1 ;
#4
{#7}{#8}#9 ;
#1
@@ -1404,7 +1406,7 @@
{
0
\exp_after:wN \@@_div_significand_iv:wwnnnnnnn
- \__int_value:w \__int_eval:w (\c_two * #2 #3) / #6 #7 ; % <- P
+ \__int_value:w \__int_eval:w ( 2 * #2 #3) / #6 #7 ; % <- P
#2 ; {#3} {#4} {#5}
{#6} {#7}
}
@@ -1461,7 +1463,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_div_significand_iv:wwnnnnnnn #1; #2;#3#4#5 #6#7#8#9
{
- + \c_five * #1
+ + 5 * #1
\exp_after:wN \@@_div_significand_vi:Nw
\__int_value:w \__int_eval:w -20 + 2*#2#3 - #1*#6#7 +
\exp_after:wN \@@_div_significand_v:NN
@@ -1473,9 +1475,9 @@
\cs_new:Npn \@@_div_significand_vi:Nw #1#2;
{
\if_meaning:w 0 #1
- \if_int_compare:w \__int_eval:w #2 > \c_zero + \c_one \fi:
+ \if_int_compare:w \__int_eval:w #2 > 0 + 1 \fi:
\else:
- \if_meaning:w - #1 - \else: + \fi: \c_one
+ \if_meaning:w - #1 - \else: + \fi: 1
\fi:
;
}
@@ -1565,7 +1567,7 @@
\cs_new:Npn \@@_div_significand_large_o:wwwNNNNwN
#1; #2; #3; #4#5#6#7#8; #9
{
- + \c_one
+ + 1
\exp_after:wN \@@_basics_pack_weird_high:NNNNNNNNw
\__int_value:w \__int_eval:w 1 #1 #2
\exp_after:wN \@@_basics_pack_weird_low:NNNNw
@@ -1621,12 +1623,12 @@
\if_int_odd:w #1 \exp_stop_f:
\exp_after:wN \@@_sqrt_npos_auxi_o:wwnnN
\fi:
- #1 / \c_two
+ #1 / 2
\@@_sqrt_Newton_o:wwn 56234133; 0; {#2#3} {#4#5} 0
}
-\cs_new:Npn \@@_sqrt_npos_auxi_o:wwnnN #1 / \c_two #2; 0; #3#4#5
+\cs_new:Npn \@@_sqrt_npos_auxi_o:wwnnN #1 / 2 #2; 0; #3#4#5
{
- ( #1 + \c_one ) / \c_two
+ ( #1 + 1 ) / 2
\@@_pack_eight:wNNNNNNNN
\@@_sqrt_npos_auxii_o:wNNNNNNNN
;
@@ -1710,7 +1712,7 @@
\exp_after:wN \@@_use_none_until_s:w
\fi:
\exp_after:wN \@@_sqrt_Newton_o:wwn
- \__int_value:w \__int_eval:w (#1 + #3 * 1 0000 0000 / #1) / \c_two ;
+ \__int_value:w \__int_eval:w (#1 + #3 * 1 0000 0000 / #1) / 2 ;
#1; {#3}
}
% \end{macrocode}
@@ -1880,15 +1882,15 @@
\cs_new:Npn \@@_sqrt_auxiii_o:wnnnnnnnn
#1; #2#3#4#5#6#7#8#9
{
- \if_int_compare:w #1 > \c_one
+ \if_int_compare:w #1 > 1 \exp_stop_f:
\exp_after:wN \@@_sqrt_auxiv_o:NNNNNw
\__int_value:w \__int_eval:w (#1#2 %)
\else:
- \if_int_compare:w #1#2 > \c_one
+ \if_int_compare:w #1#2 > 1 \exp_stop_f:
\exp_after:wN \@@_sqrt_auxv_o:NNNNNw
\__int_value:w \__int_eval:w (#1#2#3 %)
\else:
- \if_int_compare:w #1#2#3 > \c_one
+ \if_int_compare:w #1#2#3 > 1 \exp_stop_f:
\exp_after:wN \@@_sqrt_auxvi_o:NNNNNw
\__int_value:w \__int_eval:w (#1#2#3#4 %)
\else:
@@ -1906,7 +1908,7 @@
{ \@@_sqrt_auxviii_o:nnnnnnn {0000000#1} {#2#3#4#5#6} }
\cs_new:Npn \@@_sqrt_auxvii_o:NNNNNw 1#1#2#3#4#5#6;
{
- \if_int_compare:w #1#2 = \c_zero
+ \if_int_compare:w #1#2 = 0 \exp_stop_f:
\exp_after:wN \@@_sqrt_auxx_o:Nnnnnnnn
\fi:
\@@_sqrt_auxviii_o:nnnnnnn {00000000} {000#1#2#3#4#5}
@@ -1982,7 +1984,7 @@
\@@_sqrt_auxii_o:NnnnnnnnN
\@@_sqrt_auxxii_o:nnnnnnnnw
#2 {#1}
- {#3} { #4 + \c_one } #5
+ {#3} { #4 + 1 } #5
}
% \end{macrocode}
% \end{macro}
@@ -2001,11 +2003,11 @@
% \begin{macrocode}
\cs_new:Npn \@@_sqrt_auxxii_o:nnnnnnnnw 0; #1#2#3#4#5#6#7#8 #9;
{
- \if_int_compare:w #1#2 > \c_zero
- \if_int_compare:w #1#2 = \c_one
- \if_int_compare:w #3#4 = \c_zero
- \if_int_compare:w #5#6 = \c_zero
- \if_int_compare:w #7#8 = \c_zero
+ \if_int_compare:w #1#2 > 0 \exp_stop_f:
+ \if_int_compare:w #1#2 = 1 \exp_stop_f:
+ \if_int_compare:w #3#4 = 0 \exp_stop_f:
+ \if_int_compare:w #5#6 = 0 \exp_stop_f:
+ \if_int_compare:w #7#8 = 0 \exp_stop_f:
\@@_sqrt_auxxiii_o:w
\fi:
\fi:
@@ -2055,7 +2057,7 @@
\exp_after:wN \@@_basics_pack_low:NNNNNw
\__int_value:w \__int_eval:w 1 0000 0000
+ #4#5
- \if_int_compare:w #6 > #1 \exp_stop_f: + \c_one \fi:
+ \if_int_compare:w #6 > #1 \exp_stop_f: + 1 \fi:
+ \exp_after:wN \@@_round:NNN
\exp_after:wN 0
\exp_after:wN 0
Modified: trunk/l3kernel/l3fp-convert.dtx
===================================================================
--- trunk/l3kernel/l3fp-convert.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-convert.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -157,7 +157,7 @@
{
\exp_after:wN \@@_to_scientific_normal:wNw
\exp_after:wN e
- \__int_value:w \__int_eval:w #2 - \c_one
+ \__int_value:w \__int_eval:w #2 - 1
; #3 #4 #5 #6 ;
}
\cs_new:Npn \@@_to_scientific_normal:wNw #1 ; #2#3;
@@ -234,17 +234,17 @@
\cs_new:Npn \@@_to_decimal_normal:wnnnnn
\s_@@ \@@_chk:w 1 #1 #2 #3#4#5#6 ;
{
- \int_compare:nNnTF {#2} > \c_zero
+ \int_compare:nNnTF {#2} > 0
{
- \int_compare:nNnTF {#2} < \c_sixteen
+ \int_compare:nNnTF {#2} < \c_@@_prec_int
{
- \@@_decimate:nNnnnn { \c_sixteen - #2 }
+ \@@_decimate:nNnnnn { \c_@@_prec_int - #2 }
\@@_to_decimal_large:Nnnw
}
{
\exp_after:wN \exp_after:wN
\exp_after:wN \@@_to_decimal_huge:wnnnn
- \prg_replicate:nn { #2 - \c_sixteen } { 0 } ;
+ \prg_replicate:nn { #2 - \c_@@_prec_int } { 0 } ;
}
{#3} {#4} {#5} {#6}
}
@@ -259,7 +259,7 @@
\cs_new:Npn \@@_to_decimal_large:Nnnw #1#2#3#4;
{
\exp_after:wN \@@_trim_zeros:w \__int_value:w
- \if_int_compare:w #2 > \c_zero
+ \if_int_compare:w #2 > 0 \exp_stop_f:
#2
\fi:
\exp_stop_f:
@@ -308,17 +308,10 @@
}
\cs_new:Npn \@@_to_tl_normal:nnnnn #1
{
- \if_int_compare:w #1 > \c_sixteen
- \exp_after:wN \@@_to_tl_scientific:wnnnnn
- \else:
- \if_int_compare:w #1 < - \c_two
- \exp_after:wN \exp_after:wN
- \exp_after:wN \@@_to_tl_scientific:wnnnnn
- \else:
- \exp_after:wN \exp_after:wN
- \exp_after:wN \@@_to_decimal_normal:wnnnnn
- \fi:
- \fi:
+ \int_compare:nTF
+ { -2 <= #1 <= \c_@@_prec_int }
+ { \@@_to_decimal_normal:wnnnnn }
+ { \@@_to_tl_scientific:wnnnnn }
\s_@@ \@@_chk:w 1 0 {#1}
}
\cs_new:Npn \@@_to_tl_scientific:wnnnnn
@@ -326,7 +319,7 @@
{
\exp_after:wN \@@_to_tl_scientific:wNw
\exp_after:wN e
- \__int_value:w \__int_eval:w #2 - \c_one
+ \__int_value:w \__int_eval:w #2 - 1
; #3 #4 #5 #6 ;
}
\cs_new:Npn \@@_to_tl_scientific:wNw #1 ; #2#3;
@@ -420,7 +413,7 @@
\@@_case_return:nw { \exp_after:wN \c_zero_fp }
\else:
\exp_after:wN \@@_from_dim:wNw
- \__int_value:w \__int_eval:w #1 - \c_four
+ \__int_value:w \__int_eval:w #1 - 4
\if_meaning:w - #2
\exp_after:wN , \exp_after:wN 2 \__int_value:w
\else:
Modified: trunk/l3kernel/l3fp-expo.dtx
===================================================================
--- trunk/l3kernel/l3fp-expo.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-expo.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -167,7 +167,7 @@
{ %^^A todo: ln(1) should be "exact zero", not "underflow"
\exp_after:wN \@@_sanitize:Nw
\__int_value:w % for the overall sign
- \if_int_compare:w #1 < \c_one
+ \if_int_compare:w #1 < 1 \exp_stop_f:
2
\else:
0
@@ -198,8 +198,8 @@
\__int_value:w
\if_case:w #1 \exp_stop_f:
\or:
- \if_int_compare:w #2 < \c_four
- \__int_eval:w \c_ten - #2
+ \if_int_compare:w #2 < 4 \exp_stop_f:
+ \__int_eval:w 10 - #2
\else:
6
\fi:
@@ -236,7 +236,7 @@
{ #1#2; {#3#4#5#6} {#7} }
\cs_new:Npn \@@_ln_x_iii_var:NNNNNw #1 #2#3#4#5 #6;
{
- #1#2#3#4#5 + \c_one ;
+ #1#2#3#4#5 + 1 ;
{#1#2#3#4#5} {#6}
}
% \end{macrocode}
@@ -476,7 +476,7 @@
{ \@@_ln_Taylor_loop:www 21 ; {0000}{0000}{0000}{0000}{0000}{0000} ; }
\cs_new:Npn \@@_ln_Taylor_loop:www #1; #2; #3;
{
- \if_int_compare:w #1 = \c_one
+ \if_int_compare:w #1 = 1 \exp_stop_f:
\@@_ln_Taylor_break:w
\fi:
\exp_after:wN \@@_fixed_div_int:wwN \c_@@_one_fixed_tl ; #1;
@@ -484,7 +484,7 @@
\@@_fixed_mul:wwn #3;
{
\exp_after:wN \@@_ln_Taylor_loop:www
- \__int_value:w \__int_eval:w #1 - \c_two ;
+ \__int_value:w \__int_eval:w #1 - 2 ;
}
#3;
}
@@ -546,11 +546,11 @@
\cs_new:Npn \@@_ln_exponent:wn #1; #2
{
\if_case:w #2 \exp_stop_f:
- \c_zero \@@_case_return:nw { \@@_fixed_to_float:Nw 2 }
+ 0 \@@_case_return:nw { \@@_fixed_to_float:Nw 2 }
\or:
\exp_after:wN \@@_ln_exponent_one:ww \__int_value:w
\else:
- \if_int_compare:w #2 > \c_zero
+ \if_int_compare:w #2 > 0 \exp_stop_f:
\exp_after:wN \@@_ln_exponent_small:NNww
\exp_after:wN 0
\exp_after:wN \@@_fixed_sub:wwn \__int_value:w
@@ -568,7 +568,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_ln_exponent_one:ww 1; #1;
{
- \c_zero
+ 0
\exp_after:wN \@@_fixed_sub:wwn \c_@@_ln_x_fixed_tl ; #1;
\@@_fixed_to_float:wN 0
}
@@ -580,7 +580,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_ln_exponent_small:NNww #1#2#3; #4#5#6#7#8#9;
{
- \c_four
+ 4
\exp_after:wN \@@_fixed_mul:wwn
\c_@@_ln_x_fixed_tl ;
{#3}{0000}{0000}{0000}{0000}{0000} ;
@@ -635,29 +635,29 @@
\exp_after:wN \@@_sanitize:Nw
\exp_after:wN 0
\__int_value:w #1 \__int_eval:w
- \if_int_compare:w #4 < - \c_eight
- \c_one
+ \if_int_compare:w #4 < - \c_@@_half_prec_int
+ 1
\exp_after:wN \@@_add_big_i_o:wNww
- \__int_value:w \__int_eval:w \c_one - #4 ;
+ \__int_value:w \__int_eval:w 1 - #4 ;
0 {1000}{0000}{0000}{0000} ; #5;
\exp:w
\else:
- \if_int_compare:w #4 > \c_five % cf \c_@@_max_exponent_int
+ \if_int_compare:w #4 > \c_@@_max_exp_exponent_int
\exp_after:wN \@@_exp_overflow:
\exp:w
\else:
- \if_int_compare:w #4 < \c_zero
+ \if_int_compare:w #4 < 0 \exp_stop_f:
\exp_after:wN \use_i:nn
\else:
\exp_after:wN \use_ii:nn
\fi:
{
- \c_zero
+ 0
\@@_decimate:nNnnnn { - #4 }
\@@_exp_Taylor:Nnnwn
}
{
- \@@_decimate:nNnnnn { \c_sixteen - #4 }
+ \@@_decimate:nNnnnn { \c_@@_prec_int - #4 }
\@@_exp_pos_large:NnnNwn
}
#5
@@ -666,10 +666,10 @@
\exp:w
\fi:
\fi:
- \exp_after:wN \c_zero
+ \exp_after:wN \exp_end:
}
\cs_new:Npn \@@_exp_overflow:
- { + \c_two * \c_@@_max_exponent_int ; {1000} {0000} {0000} {0000} ; }
+ { + 2 * \c_@@_max_exponent_int ; {1000} {0000} {0000} {0000} ; }
% \end{macrocode}
% \end{macro}
%
@@ -695,7 +695,7 @@
{ \@@_exp_Taylor_loop:www 10 ; #1 ; #1 ; \s__stop }
\cs_new:Npn \@@_exp_Taylor_loop:www #1; #2; #3;
{
- \if_int_compare:w #1 = \c_one
+ \if_int_compare:w #1 = 1 \exp_stop_f:
\exp_after:wN \@@_exp_Taylor_break:Nww
\fi:
\@@_fixed_div_int:wwN #3 ; #1 ;
@@ -987,7 +987,7 @@
\s_@@ \@@_chk:w 1 #1#2#3; \s_@@ \@@_chk:w #4#5
{
\if_int_compare:w \__str_if_eq_x:nn { #2 #3 }
- { 1 {1000} {0000} {0000} {0000} } = \c_zero
+ { 1 {1000} {0000} {0000} {0000} } = 0 \exp_stop_f:
\if_int_compare:w #4 #1 = 32 \exp_stop_f:
\exp_after:wN \@@_case_return_ii_o:ww
\fi:
@@ -999,7 +999,7 @@
\exp_after:wN #5
\or:
\if_meaning:w 2 #5 \exp_after:wN \reverse_if:N \fi:
- \if_int_compare:w #2 > \c_zero
+ \if_int_compare:w #2 > 0 \exp_stop_f:
\exp_after:wN \@@_case_return_o:Nww
\exp_after:wN \c_inf_fp
\else:
@@ -1034,7 +1034,7 @@
\exp_after:wN \@@_sanitize:Nw
\exp_after:wN 0
\__int_value:w
- \if:w #1 \if_int_compare:w #3 > \c_zero 0 \else: 2 \fi:
+ \if:w #1 \if_int_compare:w #3 > 0 \exp_stop_f: 0 \else: 2 \fi:
\exp_after:wN \@@_pow_npos_aux:NNnww
\exp_after:wN +
\exp_after:wN \@@_fixed_to_float:wN
@@ -1066,7 +1066,7 @@
}
\cs_new:Npn \@@_pow_exponent:wnN #1; #2
{
- \if_int_compare:w #2 > \c_zero
+ \if_int_compare:w #2 > 0 \exp_stop_f:
\exp_after:wN \@@_pow_exponent:Nwnnnnnw % n\ln(10) - (-\ln(x))
\exp_after:wN +
\else:
@@ -1098,7 +1098,7 @@
}
\cs_new:Npn \@@_pow_B:wwN #1#2#3#4#5#6; #7;
{
- \if_int_compare:w #7 < \c_zero
+ \if_int_compare:w #7 < 0 \exp_stop_f:
\exp_after:wN \@@_pow_C_neg:w \__int_value:w -
\else:
\if_int_compare:w #7 < 22 \exp_stop_f:
@@ -1113,7 +1113,7 @@
}
\cs_new:Npn \@@_pow_C_overflow:w #1; #2; #3
{
- + \c_two * \c_@@_max_exponent_int
+ + 2 * \c_@@_max_exponent_int
\exp_after:wN \@@_fixed_continue:wn \c_@@_one_fixed_tl ;
}
\cs_new:Npn \@@_pow_C_neg:w #1 ; 1
@@ -1134,7 +1134,7 @@
\else:
\exp_after:wN \@@_pow_C_overflow:w \__int_value:w
\fi:
- \__int_eval:w #1 - \c_one \exp_after:wN ;
+ \__int_eval:w #1 - 1 \exp_after:wN ;
\fi:
}
\cs_new:Npn \@@_pow_C_pack:w
@@ -1159,7 +1159,7 @@
\if_case:w \@@_pow_neg_case:w #4 ;
\exp_after:wN \@@_pow_neg_aux:wNN
\or:
- \if_int_compare:w \__int_eval:w #1 / \c_two = \c_one
+ \if_int_compare:w \__int_eval:w #1 / 2 = 1 \exp_stop_f:
\@@_invalid_operation_o:Nww ^ #3; #4;
\exp:w \exp_end_continue_f:w
\exp_after:wN \exp_after:wN
@@ -1175,7 +1175,7 @@
\exp_after:wN \s_@@
\exp_after:wN \@@_chk:w
\exp_after:wN #2
- \__int_value:w \__int_eval:w \c_two - #3 \__int_eval_end:
+ \__int_value:w \__int_eval:w 2 - #3 \__int_eval_end:
}
% \end{macrocode}
% ^^A todo: is this \@@_exp_after_o:w necessary? Appropriate?
@@ -1204,24 +1204,25 @@
\cs_new:Npn \@@_pow_neg_case:w \s_@@ \@@_chk:w #1#2#3;
{
\if_case:w #1 \exp_stop_f:
- -\c_one
+ -1
\or: \@@_pow_neg_case_aux:nnnnn #3
- \or: -\c_one
- \else: \c_one
+ \or: -1
+ \else: 1
\fi:
+ \exp_stop_f:
}
\cs_new:Npn \@@_pow_neg_case_aux:nnnnn #1#2#3#4#5
{ \@@_pow_neg_case_aux:w #1 ; #2 #3 ; #4 #5 ; }
\cs_new:Npn \@@_pow_neg_case_aux:w #1 ; #2 ; #3 ;
{
- \if_int_compare:w #1 > \c_sixteen
- -\c_one
+ \if_int_compare:w #1 > \c_@@_prec_int
+ -1
\else:
\if_int_odd:w #3 \exp_stop_f:
- \if_int_compare:w #1 = \c_sixteen
- \c_zero
+ \if_int_compare:w #1 = \c_@@_prec_int
+ 0
\else:
- \c_one
+ 1
\fi:
\else:
\exp_after:wN \@@_pow_neg_case_aux:w
Modified: trunk/l3kernel/l3fp-extended.dtx
===================================================================
--- trunk/l3kernel/l3fp-extended.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-extended.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -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}
Modified: trunk/l3kernel/l3fp-logic.dtx
===================================================================
--- trunk/l3kernel/l3fp-logic.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-logic.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -170,7 +170,7 @@
\if_int_compare:w #4 < #1 - \fi: 1
\fi:
\else:
- \if_int_compare:w #1#4 = \c_zero
+ \if_int_compare:w #1#4 = 0 \exp_stop_f:
0
\else:
1
@@ -178,7 +178,7 @@
\fi:
\exp_stop_f:
}
-\cs_new:Npn \@@_compare_nan:w #1 \exp_stop_f: { \c_two }
+\cs_new:Npn \@@_compare_nan:w #1 \fi: \exp_stop_f: { 2 \exp_stop_f: }
% \end{macrocode}
% \end{macro}
%
@@ -445,7 +445,7 @@
\@@_compare_back:ww
\s_@@ \@@_chk:w #4#5;
\s_@@ \@@_chk:w #2#3;
- = #1 \c_one
+ = #1 1 \exp_stop_f:
\@@_minmax_auxii:ww
\else:
\@@_minmax_auxi:ww
@@ -575,7 +575,7 @@
}
\cs_new:Npn \@@_ternary_loop:Nw \s_@@ \@@_chk:w #1#2;
{
- \if_int_compare:w #1 > \c_zero
+ \if_int_compare:w #1 > 0 \exp_stop_f:
\exp_after:wN \@@_ternary_map_break:
\fi:
\@@_ternary_loop:Nw
Modified: trunk/l3kernel/l3fp-parse.dtx
===================================================================
--- trunk/l3kernel/l3fp-parse.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-parse.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -195,17 +195,17 @@
% already found, |12345|. This integer is unfinished, causing the
% second \cs{exp_after:wN} to expand, and to trigger the construction
% \cs{exp:w}, which expands |\operand:w|, defined to read
-% what follows and make a number out of it, then leave \cs{c_zero}, the
+% what follows and make a number out of it, then leave \cs{exp_end:}, the
% number, and a semicolon in the input stream. Once |\operand:w| is
% done expanding, we obtain essentially
% \begin{quote}\ttfamily
% \cs{exp_after:wN} |\add:ww| \cs{__int_value:w} 12345 ; \newline
-% \cs{exp:w} \cs{c_zero} 333444 ;
+% \cs{exp:w} \cs{exp_end:} 333444 ;
% \end{quote}
% where in fact \cs{exp_after:wN} has already been expanded,
% \cs{__int_value:w} has already seen |12345|, and
% \cs{exp:w} is still looking for a number. It finds
-% \cs{c_zero}, hence expands to nothing. Now, \cs{__int_value:w} sees
+% \cs{exp_end:}, hence expands to nothing. Now, \cs{__int_value:w} sees
% the \texttt{;}, which cannot be part of a number. The expansion
% stops, and we are left with
% \begin{quote}\ttfamily
@@ -499,33 +499,33 @@
% \item If the next token is a control sequence, it could be the
% special marker \cs{s_@@_mark}, and
% otherwise it is a case of juxtaposing numbers, such as
-% |2\c_three|, with an implied multiplication.
+% |2\c_zero|, with an implied multiplication.
% \item If the next token is a letter, it is also a case of
% juxtaposition, as letters cannot be proper infix operators.
% \item Otherwise (including in the case of digits), if the token is a
% known infix operator, the appropriate
% |\__fp_infix_|\meta{operator}|:N| function is built, and if it
% does not exist, we complain. In particular, the juxtaposition
-% |\c_three 2| is disallowed.
+% |\c_zero 2| is disallowed.
% \end{itemize}
%
% In the above, we need to test whether a character token~|#1| is a
% digit:
% \begin{verbatim}
-% \if_int_compare:w \c_nine < 1 \token_to_str:N #1 \exp_stop_f:
+% \if_int_compare:w 9 < 1 \token_to_str:N #1 \exp_stop_f:
% is a digit
% \else:
% not a digit
% \fi:
% \end{verbatim}
-% To exclude |0|, replace \cs{c_nine} by \cs{c_ten}. The use of
+% To exclude |0|, replace |9| by |10|. The use of
% \cs{token_to_str:N} ensures that a digit with any catcode is detected.
% To test if a character token is a letter, we need to work with its
% character code, testing if |`#1| lies in $[65,90]$ (uppercase letters)
% or $[97,112]$ (lowercase letters)
% \begin{verbatim}
% \if_int_compare:w \__int_eval:w
-% ( `#1 \if_int_compare:w `#1 > `Z - 32 \fi: ) / 26 = \c_three
+% ( `#1 \if_int_compare:w `#1 > `Z - 32 \fi: ) / 26 = 3 \exp_stop_f:
% is a letter
% \else:
% not a letter
@@ -698,7 +698,7 @@
{
\cs_new:cpn { @@_parse_digits_ #1 :N } ##1
{
- \if_int_compare:w \c_nine < 1 \token_to_str:N ##1 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N ##1 \exp_stop_f:
\token_to_str:N ##1 \exp_after:wN #2 \exp:w
\else:
\@@_parse_return_semicolon:w #3 ##1
@@ -745,7 +745,7 @@
\exp_after:wN \@@_parse_one_register:NN
\fi:
\else:
- \if_int_compare:w \c_nine < 1 \token_to_str:N #2 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #2 \exp_stop_f:
\exp_after:wN \exp_after:wN
\exp_after:wN \@@_parse_one_digit:NN
\else:
@@ -940,7 +940,7 @@
\exp_after:wN #1
\exp:w \exp_end_continue_f:w
\exp_after:wN \@@_sanitize:wN
- \__int_value:w \__int_eval:w \c_zero \@@_parse_trim_zeros:N
+ \__int_value:w \__int_eval:w 0 \@@_parse_trim_zeros:N
}
% \end{macrocode}
% \end{macro}
@@ -956,8 +956,8 @@
{
\if_int_compare:w
\__int_eval:w
- ( `#2 \if_int_compare:w `#2 > `Z - \c_thirty_two \fi: ) / 26
- = \c_three
+ ( `#2 \if_int_compare:w `#2 > `Z - 32 \fi: ) / 26
+ = 3 \exp_stop_f:
\exp_after:wN \@@_parse_word:Nw
\exp_after:wN #1
\exp_after:wN #2
@@ -1005,13 +1005,12 @@
\exp_end_continue_f:w
\if_int_compare:w
\if_catcode:w \scan_stop: \exp_not:N #1
- \c_zero
+ 0
\else:
\__int_eval:w
- ( `#1 \if_int_compare:w `#1 > `Z - \c_thirty_two \fi: )
- / 26
+ ( `#1 \if_int_compare:w `#1 > `Z - 32 \fi: ) / 26
\fi:
- = \c_three
+ = 3 \exp_stop_f:
\exp_after:wN #1
\exp:w \exp_after:wN \@@_parse_letters:N
\exp:w
@@ -1100,7 +1099,7 @@
{
\fi:
\fi:
- \if_int_compare:w \c_nine < 1 \token_to_str:N #1 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #1 \exp_stop_f:
\exp_after:wN \@@_parse_large:N
\else:
\exp_after:wN \@@_parse_zero:
@@ -1123,7 +1122,7 @@
\cs_new:Npn \@@_parse_strim_zeros:N #1
{
\if:w 0 \exp_not:N #1
- - \c_one
+ - 1
\exp_after:wN \@@_parse_strim_zeros:N \exp:w
\else:
\@@_parse_strim_end:w #1
@@ -1133,7 +1132,7 @@
\cs_new:Npn \@@_parse_strim_end:w #1 \fi: \@@_parse_expand:w
{
\fi:
- \if_int_compare:w \c_nine < 1 \token_to_str:N #1 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #1 \exp_stop_f:
\exp_after:wN \@@_parse_small:N
\else:
\exp_after:wN \@@_parse_zero:
@@ -1191,7 +1190,7 @@
% We leave \meta{digits} \meta{zeros} in the input stream: the
% functions used to grab digits are such that this constitutes digits
% $1$ through~$8$ of the significand. Then prepare to pack $8$~more
-% digits, with an exponent shift of \cs{c_zero} (this shift is used in
+% digits, with an exponent shift of zero (this shift is used in
% the case of a large significand). If |#4|~is a digit, leave it
% behind for the packing function, and read $6$~more digits to reach a
% total of $15$~digits: further digits are involved in the rounding.
@@ -1202,9 +1201,9 @@
{
#1 #2
\exp_after:wN \@@_parse_pack_trailing:NNNNNNww
- \exp_after:wN \c_zero
+ \exp_after:wN 0
\__int_value:w \__int_eval:w 1
- \if_int_compare:w \c_nine < 1 \token_to_str:N #4 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f:
\token_to_str:N #4
\exp_after:wN \@@_parse_small_trailing:wwNN
\__int_value:w 1
@@ -1226,14 +1225,14 @@
% stream. If the \meta{next~token} is a digit, it is the $16$th
% digit, we keep it, then the \texttt{small_round} auxiliary considers
% this digit and all further digits to perform the rounding: the
-% function expands to nothing, to |+\c_zero| or to |+\c_one|.
+% function expands to nothing, to |+0| or to |+1|.
% Otherwise, there is no $16$-th digit, so we put a~$0$, and look for
% an exponent.
% \begin{macrocode}
\cs_new:Npn \@@_parse_small_trailing:wwNN 1 #1 ; #2; #3 #4
{
#1 #2
- \if_int_compare:w \c_nine < 1 \token_to_str:N #4 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f:
\token_to_str:N #4
\exp_after:wN \@@_parse_small_round:NN
\exp_after:wN #4
@@ -1260,7 +1259,7 @@
% argument is~$2$. The \texttt{trailing} function has an exponent
% shift as its first argument, which we add to the exponent found in
% the |e...| syntax. If the trailing digits cause a carry, the
-% integer expression for the leading digits is incremented (|+ \c_one|
+% integer expression for the leading digits is incremented (|+1|
% in the code below). If the leading digits propagate this carry all
% the way up, the function \cs{@@_parse_pack_carry:w} increments the
% exponent, and changes the significand from |0000...| to |1000...|:
@@ -1269,7 +1268,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_parse_pack_trailing:NNNNNNww #1 #2 #3#4#5#6 #7; #8 ;
{
- \if_meaning:w 2 #2 + \c_one \fi:
+ \if_meaning:w 2 #2 + 1 \fi:
; #8 + #1 ; {#3#4#5#6} {#7};
}
\cs_new:Npn \@@_parse_pack_leading:NNNNNww #1 #2#3#4#5 #6; #7;
@@ -1279,7 +1278,7 @@
; 0 {#2#3#4#5} {#6}
}
\cs_new:Npn \@@_parse_pack_carry:w \fi: ; 0 #1
- { \fi: + \c_one ; 0 {1000} }
+ { \fi: + 1 ; 0 {1000} }
% \end{macrocode}
% \end{macro}
%
@@ -1325,10 +1324,10 @@
% \begin{macrocode}
\cs_new:Npn \@@_parse_large_leading:wwNN 1 #1 ; #2; #3 #4
{
- + \c_eight - #3
+ + \c_@@_half_prec_int - #3
\exp_after:wN \@@_parse_pack_leading:NNNNNww
\__int_value:w \__int_eval:w 1 #1
- \if_int_compare:w \c_nine < 1 \token_to_str:N #4 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f:
\exp_after:wN \@@_parse_large_trailing:wwNN
\__int_value:w 1 \token_to_str:N #4
\exp_after:wN \@@_parse_digits_vi:N
@@ -1346,7 +1345,7 @@
\else:
#2
\exp_after:wN \@@_parse_pack_trailing:NNNNNNww
- \exp_after:wN \c_zero
+ \exp_after:wN 0
\__int_value:w 1 0000 0000
\@@_parse_exponent:Nw #4
\fi:
@@ -1376,16 +1375,16 @@
% \begin{macrocode}
\cs_new:Npn \@@_parse_large_trailing:wwNN 1 #1 ; #2; #3 #4
{
- \if_int_compare:w \c_nine < 1 \token_to_str:N #4 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f:
\exp_after:wN \@@_parse_pack_trailing:NNNNNNww
- \exp_after:wN \c_eight
+ \exp_after:wN \c_@@_half_prec_int
\__int_value:w \__int_eval:w 1 #1 \token_to_str:N #4
\exp_after:wN \@@_parse_large_round:NN
\exp_after:wN #4
\exp:w
\else:
\exp_after:wN \@@_parse_pack_trailing:NNNNNNww
- \__int_value:w \__int_eval:w \c_seven - #3 \exp_stop_f:
+ \__int_value:w \__int_eval:w 7 - #3 \exp_stop_f:
\__int_value:w \__int_eval:w 1 #1
\if:w . \exp_not:N #4
\exp_after:wN \@@_parse_small_trailing:wwNN
@@ -1412,15 +1411,15 @@
% small or large). It should appear in an integer expression. This
% function reads digits one by one, until reaching a non-digit, and
% adds~$1$ to the integer expression for each digit. If all digits
-% found are~$0$, the function ends the expression by |;\c_zero|,
-% otherwise by |;\c_one|. This is done by switching the loop to
+% found are~$0$, the function ends the expression by |;0|,
+% otherwise by |;1|. This is done by switching the loop to
% |round_up| at the first non-zero digit, thus we avoid to test
% whether digits are~$0$ or not once we see a first non-zero digit.
% \begin{macrocode}
\cs_new:Npn \@@_parse_round_loop:N #1
{
- \if_int_compare:w \c_nine < 1 \token_to_str:N #1 \exp_stop_f:
- + \c_one
+ \if_int_compare:w 9 < 1 \token_to_str:N #1 \exp_stop_f:
+ + 1
\if:w 0 \token_to_str:N #1
\exp_after:wN \@@_parse_round_loop:N
\exp:w
@@ -1429,18 +1428,18 @@
\exp:w
\fi:
\else:
- \@@_parse_return_semicolon:w \c_zero #1
+ \@@_parse_return_semicolon:w 0 #1
\fi:
\@@_parse_expand:w
}
\cs_new:Npn \@@_parse_round_up:N #1
{
- \if_int_compare:w \c_nine < 1 \token_to_str:N #1 \exp_stop_f:
- + \c_one
+ \if_int_compare:w 9 < 1 \token_to_str:N #1 \exp_stop_f:
+ + 1
\exp_after:wN \@@_parse_round_up:N
\exp:w
\else:
- \@@_parse_return_semicolon:w \c_one #1
+ \@@_parse_return_semicolon:w 1 #1
\fi:
\@@_parse_expand:w
}
@@ -1451,7 +1450,7 @@
% After the loop \cs{@@_parse_round_loop:N}, this function fetches an
% exponent with \cs{@@_parse_exponent:N}, and combines it with the
% number of digits counted by \cs{@@_parse_round_loop:N}. At the same
-% time, the result \cs{c_zero} or \cs{c_one} is added to the
+% time, the result |0| or |1| is added to the
% surrounding integer expression.
% \begin{macrocode}
\cs_new:Npn \@@_parse_round_after:wN #1; #2
@@ -1467,11 +1466,11 @@
% Here, |#1|~is the digit that we are currently rounding (we only care
% whether it is even or odd). If |#2|~is not a digit, then fetch an
% exponent and expand to |;|\meta{exponent} only. Otherwise, we will
-% expand to |+\c_zero| or |+\c_one|, then |;|\meta{exponent}. To
+% expand to |+0| or |+1|, then |;|\meta{exponent}. To
% decide which, call \cs{@@_round_s:NNNw} to know whether to round up,
% giving it as arguments a sign~$0$ (all explicit numbers are
% positive), the digit |#1|~to round, the first following digit~|#2|,
-% and either |+\c_zero| or |+\c_one| depending on whether the
+% and either |+0| or |+1| depending on whether the
% following digits are all zero or not. This last argument is
% obtained by \cs{@@_parse_round_loop:N}, whose number of digits we
% discard by multiplying it by~$0$. The exponent which follows the
@@ -1479,7 +1478,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_parse_small_round:NN #1#2
{
- \if_int_compare:w \c_nine < 1 \token_to_str:N #2 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #2 \exp_stop_f:
+
\exp_after:wN \@@_round_s:NNNw
\exp_after:wN 0
@@ -1487,7 +1486,7 @@
\exp_after:wN #2
\__int_value:w \__int_eval:w
\exp_after:wN \@@_parse_round_after:wN
- \__int_value:w \__int_eval:w \c_zero * \__int_eval:w \c_zero
+ \__int_value:w \__int_eval:w 0 * \__int_eval:w 0
\exp_after:wN \@@_parse_round_loop:N
\exp:w
\else:
@@ -1520,7 +1519,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_parse_large_round:NN #1#2
{
- \if_int_compare:w \c_nine < 1 \token_to_str:N #2 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #2 \exp_stop_f:
+
\exp_after:wN \@@_round_s:NNNw
\exp_after:wN 0
@@ -1528,7 +1527,7 @@
\exp_after:wN #2
\__int_value:w \__int_eval:w
\exp_after:wN \@@_parse_large_round_aux:wNN
- \__int_value:w \__int_eval:w \c_one
+ \__int_value:w \__int_eval:w 1
\exp_after:wN \@@_parse_round_loop:N
\else: %^^A could be dot, or e, or other
\exp_after:wN \@@_parse_large_round_test:NN
@@ -1553,12 +1552,12 @@
\exp_after:wN \@@_parse_round_after:wN
\__int_value:w \__int_eval:w #1
\if:w . \exp_not:N #3
- + \c_zero * \__int_eval:w \c_zero
+ + 0 * \__int_eval:w 0
\exp_after:wN \@@_parse_round_loop:N
\exp:w \exp_after:wN \@@_parse_expand:w
\else:
\exp_after:wN ;
- \exp_after:wN \c_zero
+ \exp_after:wN 0
\exp_after:wN #3
\fi:
}
@@ -1633,7 +1632,7 @@
\cs_new:Npn \@@_parse_exponent_aux:N #1
{
\if_int_compare:w \if_catcode:w \scan_stop: \exp_not:N #1
- \c_zero \else: `#1 \fi: > `9 \exp_stop_f:
+ 0 \else: `#1 \fi: > `9 \exp_stop_f:
0 \exp_after:wN ; \exp_after:wN e
\else:
\exp_after:wN \@@_parse_exponent_sign:N
@@ -1665,7 +1664,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_parse_exponent_body:N #1
{
- \if_int_compare:w \c_nine < 1 \token_to_str:N #1 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #1 \exp_stop_f:
\token_to_str:N #1
\exp_after:wN \@@_parse_exponent_digits:N
\exp:w
@@ -1692,7 +1691,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_parse_exponent_digits:N #1
{
- \if_int_compare:w \c_nine < 1 \token_to_str:N #1 \exp_stop_f:
+ \if_int_compare:w 9 < 1 \token_to_str:N #1 \exp_stop_f:
\token_to_str:N #1
\exp_after:wN \@@_parse_exponent_digits:N
\exp:w
@@ -1723,7 +1722,8 @@
\if_catcode:w \scan_stop: \exp_not:N #1
\if_meaning:w \scan_stop: #1
\if_int_compare:w
- \__str_if_eq_x:nn { \s_@@ } { \exp_not:N #1 } = \c_zero
+ \__str_if_eq_x:nn { \s_@@ } { \exp_not:N #1 }
+ = 0 \exp_stop_f:
0
\__msg_kernel_expandable_error:nnn
{ kernel } { fp-after-e } { floating~point~ }
@@ -1737,7 +1737,7 @@
\else:
\if_int_compare:w
\__str_if_eq_x:nn { \__int_value:w #1 } { \tex_the:D #1 }
- = \c_zero
+ = 0 \exp_stop_f:
\__int_value:w #1
\else:
0
@@ -1826,7 +1826,7 @@
\exp_after:wN #1
\exp:w \exp_end_continue_f:w
\exp_after:wN \@@_sanitize:wN
- \__int_value:w \__int_eval:w \c_zero \@@_parse_strim_zeros:N
+ \__int_value:w \__int_eval:w 0 \@@_parse_strim_zeros:N
}
% \end{macrocode}
% \end{macro}
@@ -2234,7 +2234,7 @@
\if_catcode:w \scan_stop: \exp_not:N #2
\if_int_compare:w
\__str_if_eq_x:nn { \s_@@_mark } { \exp_not:N #2 }
- = \c_zero
+ = 0 \exp_stop_f:
\exp_after:wN \exp_after:wN
\exp_after:wN \@@_parse_infix_mark:NNN
\else:
@@ -2244,9 +2244,8 @@
\else:
\if_int_compare:w
\__int_eval:w
- ( `#2 \if_int_compare:w `#2 > `Z - \c_thirty_two \fi: )
- / 26
- = \c_three
+ ( `#2 \if_int_compare:w `#2 > `Z - 32 \fi: ) / 26
+ = 3 \exp_stop_f:
\exp_after:wN \exp_after:wN
\exp_after:wN \@@_parse_infix_juxtapose:N
\else:
@@ -2595,29 +2594,20 @@
% }
% \begin{macrocode}
\cs_new:cpn { @@_parse_infix_<:N } #1
- {
- \@@_parse_compare:NNNNNNN #1 \c_one
- \c_zero \c_zero \c_zero \c_zero <
- }
+ { \@@_parse_compare:NNNNNNN #1 1 0 0 0 0 < }
\cs_new:cpn { @@_parse_infix_=:N } #1
- {
- \@@_parse_compare:NNNNNNN #1 \c_one
- \c_zero \c_zero \c_zero \c_zero =
- }
+ { \@@_parse_compare:NNNNNNN #1 1 0 0 0 0 = }
\cs_new:cpn { @@_parse_infix_>:N } #1
- {
- \@@_parse_compare:NNNNNNN #1 \c_one
- \c_zero \c_zero \c_zero \c_zero >
- }
+ { \@@_parse_compare:NNNNNNN #1 1 0 0 0 0 > }
\cs_new:cpn { @@_parse_infix_!:N } #1
{
\exp_after:wN \@@_parse_compare:NNNNNNN
\exp_after:wN #1
- \exp_after:wN \c_zero
- \exp_after:wN \c_one
- \exp_after:wN \c_one
- \exp_after:wN \c_one
- \exp_after:wN \c_one
+ \exp_after:wN 0
+ \exp_after:wN 1
+ \exp_after:wN 1
+ \exp_after:wN 1
+ \exp_after:wN 1
}
\cs_new:Npn \@@_parse_excl_error:
{
@@ -2639,7 +2629,7 @@
{
\if_case:w
\if_catcode:w \scan_stop: \exp_not:N #7
- \c_four
+ 4 \exp_stop_f:
\else:
\__int_eval:w `#7 - `< \__int_eval_end:
\fi:
@@ -2679,12 +2669,13 @@
{
\if_int_odd:w
\if_meaning:w \c_zero_fp #3
- \c_zero
+ 0
\else:
\if_case:w \@@_compare_back:ww #8 #2 \exp_stop_f:
#5 \or: #6 \or: #7 \else: #4
\fi:
\fi:
+ \exp_stop_f:
\exp_after:wN \@@_parse_apply_compare_aux:NNwN
\exp_after:wN \c_one_fp
\else:
@@ -2751,7 +2742,7 @@
{
\@@_new_function:Ncfnn #1
{ @@_user_ \cs_to_str:N #1 }
- { \int_eval:n { \tl_count:n {#2} / \c_two } }
+ { \int_eval:n { \tl_count:n {#2} / 2 } }
{#2}
}
\cs_new_protected:Npn \@@_new_function:NNnnn #1#2#3#4#5
Modified: trunk/l3kernel/l3fp-random.dtx
===================================================================
--- trunk/l3kernel/l3fp-random.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-random.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -239,7 +239,7 @@
\cs_new:Npn \@@_randint_o:Nw ? #1 @
{
\if_case:w
- \__int_eval:w \@@_array_count:n {#1} - \c_one \__int_eval_end:
+ \__int_eval:w \@@_array_count:n {#1} - 1 \__int_eval_end:
\exp_after:wN \@@_randint_e:w \c_one_fp #1
\or: \@@_randint_e:w #1
\else:
@@ -255,19 +255,19 @@
{
\if_meaning:w 1 #1
\if_int_compare:w
- \use_i_delimit_by_q_stop:nw #3 \q_stop > \c_sixteen
- \exp_after:wN \c_one
+ \use_i_delimit_by_q_stop:nw #3 \q_stop > \c_@@_prec_int
+ 1 \exp_stop_f:
\fi:
\fi:
}
- { \c_one }
+ { 1 \exp_stop_f: }
}
\cs_new:Npn \@@_randint_e:w #1; #2;
{
\if_case:w
\@@_randint_badarg:w #1;
\@@_randint_badarg:w #2;
- \fp_compare:nNnTF { #1; } > { #2; } { \c_one } { \c_zero }
+ \fp_compare:nNnTF { #1; } > { #2; } { 1 } { 0 } \exp_stop_f:
\exp_after:wN \exp_after:wN \exp_after:wN \@@_randint_e:wnn
\@@_parse:n { #2; - #1; } { #1; } { #2; }
\or:
Modified: trunk/l3kernel/l3fp-round.dtx
===================================================================
--- trunk/l3kernel/l3fp-round.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-round.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -73,6 +73,14 @@
%
% \subsection{Rounding tools}
%
+% \begin{variable}{\c_@@_five_int}
+% This is used as the half-point for which numbers are rounded
+% up/down.
+% \begin{macrocode}
+\int_const:Nn \c_@@_five_int { 5 }
+% \end{macrocode}
+% \end{variable}
+%
% Floating point operations often yield a result that cannot be exactly
% represented in a significand with $16$ digits. In that case, we need to
% round the exact result to a representable number. The \textsc{ieee}
@@ -177,7 +185,7 @@
}
\cs_new:Npn \@@_round_to_nearest:NNN #1 #2 #3
{
- \if_int_compare:w #3 > \c_five
+ \if_int_compare:w #3 > \c_@@_five_int
\@@_round_return_one:
\else:
\if_meaning:w 5 #3
@@ -190,7 +198,7 @@
}
\cs_new:Npn \@@_round_to_nearest_ninf:NNN #1 #2 #3
{
- \if_int_compare:w #3 > \c_five
+ \if_int_compare:w #3 > \c_@@_five_int
\@@_round_return_one:
\else:
\if_meaning:w 5 #3
@@ -203,14 +211,14 @@
}
\cs_new:Npn \@@_round_to_nearest_zero:NNN #1 #2 #3
{
- \if_int_compare:w #3 > \c_five
+ \if_int_compare:w #3 > \c_@@_five_int
\@@_round_return_one:
\fi:
\c_zero
}
\cs_new:Npn \@@_round_to_nearest_pinf:NNN #1 #2 #3
{
- \if_int_compare:w #3 > \c_five
+ \if_int_compare:w #3 > \c_@@_five_int
\@@_round_return_one:
\else:
\if_meaning:w 5 #3
@@ -321,7 +329,7 @@
\cs_new_eq:NN \@@_round_to_nearest_ninf_neg:NNN \@@_round_to_nearest_pinf:NNN
\cs_new:Npn \@@_round_to_nearest_zero_neg:NNN #1 #2 #3
{
- \if_int_compare:w #3 > \c_four
+ \if_int_compare:w #3 < \c_@@_five_int \else:
\@@_round_return_one:
\fi:
\c_zero
@@ -459,19 +467,19 @@
}
\cs_new:Npn \@@_round_normal:NwNNnw #1#2 \s_@@ \@@_chk:w 1#3#4#5;
{
- \@@_decimate:nNnnnn { \c_sixteen - #4 - #2 }
+ \@@_decimate:nNnnnn { \c_@@_prec_int - #4 - #2 }
\@@_round_normal:NnnwNNnn #5 #1 #3 {#4} {#2}
}
\cs_new:Npn \@@_round_normal:NnnwNNnn #1#2#3#4; #5#6
{
\exp_after:wN \@@_round_normal:NNwNnn
\__int_value:w \__int_eval:w
- \if_int_compare:w #2 > \c_zero
+ \if_int_compare:w #2 > 0 \exp_stop_f:
1 \__int_value:w #2
\exp_after:wN \@@_round_pack:Nw
\__int_value:w \__int_eval:w 1#3 +
\else:
- \if_int_compare:w #3 > \c_zero
+ \if_int_compare:w #3 > 0 \exp_stop_f:
1 \__int_value:w #3 +
\fi:
\fi:
@@ -483,7 +491,7 @@
0000 0000 0000 0000 ; #6
}
\cs_new:Npn \@@_round_pack:Nw #1
- { \if_meaning:w 2 #1 + \c_one \fi: \__int_eval_end: }
+ { \if_meaning:w 2 #1 + 1 \fi: \__int_eval_end: }
\cs_new:Npn \@@_round_normal:NNwNnn #1 #2
{
\if_meaning:w 0 #2
@@ -508,7 +516,7 @@
\else:
\exp_after:wN \@@_round_special_aux:Nw
\exp_after:wN #4
- \__int_value:w \__int_eval:w \c_one
+ \__int_value:w \__int_eval:w 1
\if_meaning:w 1 #1 -#6 \else: +#5 \fi:
\fi:
;
Modified: trunk/l3kernel/l3fp-trig.dtx
===================================================================
--- trunk/l3kernel/l3fp-trig.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3fp-trig.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -112,7 +112,7 @@
\or: \@@_case_use:nw
{
\@@_trig:NNNNNwn #1 \@@_sin_series_o:NNwwww
- \@@_ep_to_float:wwN #3 \c_zero
+ \@@_ep_to_float:wwN #3 0
}
\or: \@@_case_use:nw
{ \@@_invalid_operation_o:fw { #1 { sin } { sind } } }
@@ -139,7 +139,7 @@
\or: \@@_case_use:nw
{
\@@_trig:NNNNNwn #1 \@@_sin_series_o:NNwwww
- \@@_ep_to_float:wwN 0 \c_two
+ \@@_ep_to_float:wwN 0 2
}
\or: \@@_case_use:nw
{ \@@_invalid_operation_o:fw { #1 { cos } { cosd } } }
@@ -169,7 +169,7 @@
\or: \@@_case_use:nw
{
\@@_trig:NNNNNwn #1 \@@_sin_series_o:NNwwww
- \@@_ep_inv_to_float:wwN #3 \c_zero
+ \@@_ep_inv_to_float:wwN #3 0
}
\or: \@@_case_use:nw
{ \@@_invalid_operation_o:fw { #1 { csc } { cscd } } }
@@ -195,7 +195,7 @@
\or: \@@_case_use:nw
{
\@@_trig:NNNNNwn #1 \@@_sin_series_o:NNwwww
- \@@_ep_inv_to_float:wwN 0 \c_two
+ \@@_ep_inv_to_float:wwN 0 2
}
\or: \@@_case_use:nw
{ \@@_invalid_operation_o:fw { #1 { sec } { secd } } }
@@ -222,7 +222,7 @@
\or: \@@_case_use:nw
{
\@@_trig:NNNNNwn #1
- \@@_tan_series_o:NNwwww 0 #3 \c_one
+ \@@_tan_series_o:NNwwww 0 #3 1
}
\or: \@@_case_use:nw
{ \@@_invalid_operation_o:fw { #1 { tan } { tand } } }
@@ -252,7 +252,7 @@
\or: \@@_case_use:nw
{
\@@_trig:NNNNNwn #1
- \@@_tan_series_o:NNwwww 2 #3 \c_three
+ \@@_tan_series_o:NNwwww 2 #3 3
}
\or: \@@_case_use:nw
{ \@@_invalid_operation_o:fw { #1 { cot } { cotd } } }
@@ -306,7 +306,7 @@
\exp_after:wN #4
\__int_value:w \__int_eval:w #5
\exp_after:wN \exp_after:wN \exp_after:wN \exp_after:wN
- \if_int_compare:w #7 > #1 \c_zero \c_one
+ \if_int_compare:w #7 > #1 0 1 \exp_stop_f:
#1 \@@_trig_large:ww \@@_trigd_large:ww
\else:
#1 \@@_trig_small:ww \@@_trigd_small:ww
@@ -397,16 +397,16 @@
{
\exp_after:wN \@@_trigd_large_auxii:wNw
\__int_value:w \__int_eval:w #1 + #2
- - (#1 + #2 - \c_four) / \c_nine * \c_nine \__int_eval_end:
+ - (#1 + #2 - 4) / 9 * 9 \__int_eval_end:
#3;
#4; #5{#6#7#8#9};
}
\cs_new:Npn \@@_trigd_large_auxii:wNw #1; #2#3;
{
- + (#1#2 - \c_four) / \c_nine * \c_two
+ + (#1#2 - 4) / 9 * 2
\exp_after:wN \@@_trigd_large_auxiii:www
\__int_value:w \__int_eval:w #1#2
- - (#1#2 - \c_four) / \c_nine * \c_nine \__int_eval_end: #3 ;
+ - (#1#2 - 4) / 9 * 9 \__int_eval_end: #3 ;
}
\cs_new:Npn \@@_trigd_large_auxiii:www #1; #2; #3!
{
@@ -414,7 +414,7 @@
\exp_after:wN \@@_use_i_until_s:nw
\exp_after:wN \@@_fixed_continue:wn
\else:
- + \c_one
+ + 1
\fi:
\@@_fixed_sub:wwn {9000}{0000}{0000}{0000}{0000}{0000};
{#1}#2{0000}{0000};
@@ -659,11 +659,11 @@
\cs_new:Npn \@@_trig_large_auxi:wwwwww #1, #2, #3, #4!
{
\prg_replicate:nn {#1} { \@@_trig_large_auxii:ww }
- \prg_replicate:nn { #2 - #1 * \c_eight }
+ \prg_replicate:nn { #2 - #1 * 8 }
{ \@@_trig_large_auxiii:wNNNNNNNN }
- \prg_replicate:nn { #3 - #2 * \c_eight }
+ \prg_replicate:nn { #3 - #2 * 8 }
{ \@@_trig_large_auxiv:wN }
- \prg_replicate:nn { \c_eight } { \@@_pack_twice_four:wNNNNNNNN }
+ \prg_replicate:nn { 8 } { \@@_pack_twice_four:wNNNNNNNN }
\@@_trig_large_auxv:www
;
}
@@ -703,7 +703,7 @@
\exp_after:wN \@@_use_i_until_s:nw
\exp_after:wN \@@_trig_large_auxvii:w
\__int_value:w \__int_eval:w \c_@@_leading_shift_int
- \prg_replicate:nn { \c_thirteen }
+ \prg_replicate:nn { 13 }
{ \@@_trig_large_auxvi:wnnnnnnnn }
+ \c_@@_trailing_shift_int - \c_@@_middle_shift_int
\@@_use_i_until_s:nw
@@ -769,7 +769,7 @@
\exp_after:wN \@@_use_i_until_s:nw
\exp_after:wN \@@_trig_large_auxxi:w
\__int_value:w \__int_eval:w \c_@@_leading_shift_int
- \prg_replicate:nn { \c_thirteen }
+ \prg_replicate:nn { 13 }
{ \@@_trig_large_auxx:wNNNNN }
+ \c_@@_trailing_shift_int - \c_@@_middle_shift_int
;
@@ -778,13 +778,13 @@
{
\exp_after:wN \@@_trig_large_pack:NNNNNw
\__int_value:w \__int_eval:w \c_@@_middle_shift_int
- #2 \c_eight * #3#4#5#6
+ #2 8 * #3#4#5#6
#1; #2
}
\cs_new:Npn \@@_trig_large_auxxi:w #1;
{
\exp_after:wN \@@_ep_mul_raw:wwwwN
- \__int_value:w \__int_eval:w \c_zero \@@_ep_to_ep_loop:N #1 ; ; !
+ \__int_value:w \__int_eval:w 0 \@@_ep_to_ep_loop:N #1 ; ; !
0,{7853}{9816}{3397}{4483}{0961}{5661};
\@@_trig_small:ww
}
@@ -832,7 +832,7 @@
\exp_after:wN \@@_sin_series_aux_o:NNnwww
\exp_after:wN #1
\__int_value:w
- \if_int_odd:w \__int_eval:w (#3 + \c_two) / \c_four \__int_eval_end:
+ \if_int_odd:w \__int_eval:w (#3 + 2) / 4 \__int_eval_end:
#2
\else:
\if_meaning:w #2 0 2 \else: 0 \fi:
@@ -842,7 +842,7 @@
}
\cs_new:Npn \@@_sin_series_aux_o:NNnwww #1#2#3 #4; #5,#6;
{
- \if_int_odd:w \__int_eval:w #3 / \c_two \__int_eval_end:
+ \if_int_odd:w \__int_eval:w #3 / 2 \__int_eval_end:
\exp_after:wN \use_i:nn
\else:
\exp_after:wN \use_ii:nn
@@ -920,7 +920,7 @@
{
\exp_after:wN \@@_tan_series_aux_o:Nnwww
\__int_value:w
- \if_int_odd:w \__int_eval:w #3 / \c_two \__int_eval_end:
+ \if_int_odd:w \__int_eval:w #3 / 2 \__int_eval_end:
\exp_after:wN \reverse_if:N
\fi:
\if_meaning:w #1#2 2 \else: 0 \fi:
@@ -945,7 +945,7 @@
\@@_fixed_mul_sub_back:wwwn#3;{10000}{0000}{0000}{0000}{0000}{0000};
{
\reverse_if:N \if_int_odd:w
- \__int_eval:w (#2 - \c_one) / \c_two \__int_eval_end:
+ \__int_eval:w (#2 - 1) / 2 \__int_eval_end:
\exp_after:wN \@@_reverse_args:Nww
\fi:
\@@_ep_div:wwwwn 0,
@@ -1052,7 +1052,7 @@
\cs_new:Npn \@@_atan_dispatch_o:NNnNw #1#2#3#4#5@
{
\if_case:w
- \__int_eval:w \@@_array_count:n {#5} - \c_one \__int_eval_end:
+ \__int_eval:w \@@_array_count:n {#5} - 1 \__int_eval_end:
\exp_after:wN #1 \exp_after:wN #4 \c_one_fp #5
\exp:w
\or: #2 #4 #5 \exp:w
@@ -1086,13 +1086,14 @@
\if_meaning:w 3 #5 \@@_case_return_ii_o:ww \fi:
\if_case:w
\if_meaning:w #2 #5
- \if_meaning:w 1 #2 \c_ten \else: \c_zero \fi:
+ \if_meaning:w 1 #2 10 \else: 0 \fi:
\else:
- \if_int_compare:w #2 > #5 \c_one \else: \c_two \fi:
+ \if_int_compare:w #2 > #5 \exp_stop_f: 1 \else: 2 \fi:
\fi:
- \@@_case_return:nw { \@@_atan_inf_o:NNNw #1 #3 \c_two }
- \or: \@@_case_return:nw { \@@_atan_inf_o:NNNw #1 #3 \c_four }
- \or: \@@_case_return:nw { \@@_atan_inf_o:NNNw #1 #3 \c_zero }
+ \exp_stop_f:
+ \@@_case_return:nw { \@@_atan_inf_o:NNNw #1 #3 2 }
+ \or: \@@_case_return:nw { \@@_atan_inf_o:NNNw #1 #3 4 }
+ \or: \@@_case_return:nw { \@@_atan_inf_o:NNNw #1 #3 0 }
\fi:
\@@_atan_normal_o:NNnwNnw #1
\s_@@ \@@_chk:w #2#3#4;
@@ -1121,7 +1122,7 @@
\exp_after:wN \@@_atan_combine_o:NwwwwwN
\exp_after:wN #2
\__int_value:w \__int_eval:w
- \if_meaning:w 2 #5 \c_seven - \fi: #3 \exp_after:wN ;
+ \if_meaning:w 2 #5 7 - \fi: #3 \exp_after:wN ;
\c_@@_one_fixed_tl ;
{0000}{0000}{0000}{0000}{0000}{0000};
0,{0000}{0000}{0000}{0000}{0000}{0000}; #1
@@ -1169,11 +1170,11 @@
\exp_after:wN #1
\__int_value:w \__int_eval:w
\if_meaning:w 2 #4
- \c_seven - \__int_eval:w
+ 7 - \__int_eval:w
\fi:
\if_int_compare:w
- \@@_ep_compare:wwww #2,#3; #5,#6; > \c_zero
- \c_three -
+ \@@_ep_compare:wwww #2,#3; #5,#6; > 0 \exp_stop_f:
+ 3 -
\exp_after:wN \@@_reverse_args:Nww
\fi:
\@@_atan_div:wnwwnw #2,#3; #5,#6;
@@ -1204,14 +1205,14 @@
\exp_stop_f:
\exp_after:wN \@@_atan_near:wwwn
\fi:
- \c_zero
+ 0
\@@_ep_div:wwwwn #1,{#2}#3; #4,{#5}#6;
\@@_atan_auxi:ww
}
\cs_new:Npn \@@_atan_near:wwwn
- \c_zero \@@_ep_div:wwwwn #1,#2; #3,
+ 0 \@@_ep_div:wwwwn #1,#2; #3,
{
- \c_one
+ 1
\@@_ep_to_fixed:wwn #1 - #3, #2;
\@@_atan_near_aux:wwn
}
@@ -1258,14 +1259,14 @@
% \begin{macrocode}
\cs_new:Npn \@@_atan_Taylor_loop:www #1; #2; #3;
{
- \if_int_compare:w #1 = - \c_one
+ \if_int_compare:w #1 = -1 \exp_stop_f:
\@@_atan_Taylor_break:w
\fi:
\exp_after:wN \@@_fixed_div_int:wwN \c_@@_one_fixed_tl ; #1;
\@@_rrot:www \@@_fixed_mul_sub_back:wwwn #2; #3;
{
\exp_after:wN \@@_atan_Taylor_loop:www
- \__int_value:w \__int_eval:w #1 - \c_two ;
+ \__int_value:w \__int_eval:w #1 - 2 ;
}
#3;
}
@@ -1315,7 +1316,7 @@
\@@_fixed_mul:wwn #3; #4;
{
\exp_after:wN \@@_atan_combine_aux:ww
- \__int_value:w \__int_eval:w #2 / \c_two ; #2;
+ \__int_value:w \__int_eval:w #2 / 2 ; #2;
}
}
{ #7 \@@_fixed_to_float:wN \@@_fixed_to_float_rad:wN }
@@ -1378,7 +1379,7 @@
\cs_new:Npn \@@_acos_o:w #1 \s_@@ \@@_chk:w #2#3; @
{
\if_case:w #2 \exp_stop_f:
- \@@_case_use:nw { \@@_atan_inf_o:NNNw #1 0 \c_four }
+ \@@_case_use:nw { \@@_atan_inf_o:NNNw #1 0 4 }
\or:
\@@_case_use:nw
{
@@ -1410,7 +1411,7 @@
\cs_new:Npn \@@_asin_normal_o:NfwNnnnnw
#1#2#3 \s_@@ \@@_chk:w 1#4#5#6#7#8#9;
{
- \if_int_compare:w #5 < \c_one
+ \if_int_compare:w #5 < 1 \exp_stop_f:
\exp_after:wN \@@_use_none_until_s:w
\fi:
\if_int_compare:w \__int_eval:w #5 + #6#7 + #8#9 = 1000 0001 ~
@@ -1513,7 +1514,7 @@
\@@_acsc_normal_o:NfwNnw #1 { #1 { asec } { asecd } }
\@@_reverse_args:Nww
}
- \or: \@@_case_use:nw { \@@_atan_inf_o:NNNw #1 0 \c_four }
+ \or: \@@_case_use:nw { \@@_atan_inf_o:NNNw #1 0 4 }
\else: \@@_case_return_same_o:w
\fi:
\s_@@ \@@_chk:w #2 #3;
@@ -1532,7 +1533,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_acsc_normal_o:NfwNnw #1#2#3 \s_@@ \@@_chk:w 1#4#5#6;
{
- \int_compare:nNnTF {#5} < \c_one
+ \int_compare:nNnTF {#5} < 1
{
\@@_invalid_operation_o:fw {#2}
\s_@@ \@@_chk:w 1#4{#5}#6;
Modified: trunk/l3kernel/l3int.dtx
===================================================================
--- trunk/l3kernel/l3int.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3int.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -1112,12 +1112,12 @@
\cs_new:Npn \@@_div_truncate:NwNw #1#2; #3#4;
{
\if_meaning:w 0 #1
- \c_zero
+ 0
\else:
(
#1#2
\if_meaning:w - #1 + \else: - \fi:
- ( \if_meaning:w - #3 - \fi: #3#4 - \c_one ) / \c_two
+ ( \if_meaning:w - #3 - \fi: #3#4 - 1 ) / 2
)
\fi:
/ #3#4
@@ -1936,13 +1936,13 @@
{ \exp_args:Nf \@@_to_Base:nn { \int_eval:n {#1} } }
\cs_new:Npn \@@_to_base:nn #1#2
{
- \int_compare:nNnTF {#1} < \c_zero
+ \int_compare:nNnTF {#1} < 0
{ \exp_args:No \@@_to_base:nnN { \use_none:n #1 } {#2} - }
{ \@@_to_base:nnN {#1} {#2} \c_empty_tl }
}
\cs_new:Npn \@@_to_Base:nn #1#2
{
- \int_compare:nNnTF {#1} < \c_zero
+ \int_compare:nNnTF {#1} < 0
{ \exp_args:No \@@_to_Base:nnN { \use_none:n #1 } {#2} - }
{ \@@_to_Base:nnN {#1} {#2} \c_empty_tl }
}
@@ -2010,7 +2010,7 @@
\cs_new:Npn \@@_to_letter:n #1
{
\exp_after:wN \exp_after:wN
- \if_case:w \@@_eval:w #1 - \c_ten \@@_eval_end:
+ \if_case:w \@@_eval:w #1 - 10 \@@_eval_end:
a
\or: b
\or: c
@@ -2043,7 +2043,7 @@
\cs_new:Npn \@@_to_Letter:n #1
{
\exp_after:wN \exp_after:wN
- \if_case:w \@@_eval:w #1 - \c_ten \@@_eval_end:
+ \if_case:w \@@_eval:w #1 - 10 \@@_eval_end:
A
\or: B
\or: C
@@ -2248,11 +2248,11 @@
% Wrappers around the generic function.
% \begin{macrocode}
\cs_new:Npn \int_from_bin:n #1
- { \int_from_base:nn {#1} \c_two }
+ { \int_from_base:nn {#1} { 2 } }
\cs_new:Npn \int_from_hex:n #1
- { \int_from_base:nn {#1} \c_sixteen }
+ { \int_from_base:nn {#1} { 16 } }
\cs_new:Npn \int_from_oct:n #1
- { \int_from_base:nn {#1} \c_eight }
+ { \int_from_base:nn {#1} { 8 } }
% \end{macrocode}
% \end{macro}
%
@@ -2302,7 +2302,7 @@
\int_eval:n
{
(
- \c_zero
+ 0
\exp_after:wN \@@_from_roman:NN \tl_to_str:n {#1}
\q_recursion_tail \q_recursion_tail \q_recursion_stop
)
@@ -2332,7 +2332,7 @@
}
}
\cs_new:Npn \@@_from_roman_error:w #1 \q_recursion_stop #2
- { #2 * \c_zero - \c_one }
+ { #2 * 0 - 1 }
% \end{macrocode}
% \end{macro}
% \end{macro}
Modified: trunk/l3kernel/l3msg.dtx
===================================================================
--- trunk/l3kernel/l3msg.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3msg.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -1069,7 +1069,7 @@
}
\__iow_with:Nnn \tex_newlinechar:D { `\^^J }
{
- \__iow_with:Nnn \tex_errorcontextlines:D { - \c_one }
+ \__iow_with:Nnn \tex_errorcontextlines:D { -1 }
{
\group_begin:
\cs_set_protected:Npn &
@@ -1119,7 +1119,7 @@
% deliberate change by a user this is only set in format mode.
% \begin{macrocode}
%<*initex>
-\int_gset:Nn \tex_errorcontextlines:D { - \c_one }
+\int_gset:Nn \tex_errorcontextlines:D { -1 }
%</initex>
% \end{macrocode}
%
@@ -1639,13 +1639,13 @@
\prop_put:cnn { l_@@_redirect_ #2 _prop } {#3} {#2}
\@@_kernel_warning:nnxxxx
{ kernel } { message-redirect-loop }
- { \seq_item:Nn \l_@@_class_loop_seq { \c_one } }
- { \seq_item:Nn \l_@@_class_loop_seq { \c_two } }
+ { \seq_item:Nn \l_@@_class_loop_seq { 1 } }
+ { \seq_item:Nn \l_@@_class_loop_seq { 2 } }
{#3}
{
\seq_map_function:NN \l_@@_class_loop_seq
\@@_redirect_loop_list:n
- { \seq_item:Nn \l_@@_class_loop_seq { \c_one } }
+ { \seq_item:Nn \l_@@_class_loop_seq { 1 } }
}
}
{ \@@_redirect_loop_chk:onn \l_@@_class_tl {#2} {#3} }
@@ -2281,7 +2281,7 @@
{
\__iow_with:Nnn \tex_newlinechar:D { 10 }
{
- \__iow_with:Nnn \tex_errorcontextlines:D { - \c_one }
+ \__iow_with:Nnn \tex_errorcontextlines:D { -1 }
{
\etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN
{ \exp_after:wN \l_@@_internal_tl }
Modified: trunk/l3kernel/l3sort.dtx
===================================================================
--- trunk/l3kernel/l3sort.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3sort.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -199,26 +199,26 @@
\cs_new_protected:Npn \@@_shrink_range:
{
\int_set:Nn \l_@@_A_int
- { \l_@@_true_max_int - \l_@@_min_int + \c_one }
- \int_set:Nn \l_@@_block_int { \c_max_register_int / \c_two }
+ { \l_@@_true_max_int - \l_@@_min_int + 1 }
+ \int_set:Nn \l_@@_block_int { \c_max_register_int / 2 }
\@@_shrink_range_loop:
\int_set:Nn \l_@@_max_int
{
\int_compare:nNnTF
- { \l_@@_block_int * \c_three / \c_two } > \l_@@_A_int
+ { \l_@@_block_int * 3 / 2 } > \l_@@_A_int
{
\l_@@_min_int
- + ( \l_@@_A_int - \c_one ) / \c_two
- + \l_@@_block_int / \c_four
- - \c_one
+ + ( \l_@@_A_int - 1 ) / 2
+ + \l_@@_block_int / 4
+ - 1
}
- { \l_@@_true_max_int - \l_@@_block_int / \c_two }
+ { \l_@@_true_max_int - \l_@@_block_int / 2 }
}
}
\cs_new_protected:Npn \@@_shrink_range_loop:
{
\if_int_compare:w \l_@@_A_int < \l_@@_block_int
- \tex_divide:D \l_@@_block_int \c_two
+ \tex_divide:D \l_@@_block_int 2 \exp_stop_f:
\exp_after:wN \@@_shrink_range_loop:
\fi:
}
@@ -251,8 +251,8 @@
%<*package>
\cs_new_protected:Npn \@@_compute_range:
{
- \int_set:Nn \l_@@_min_int { \tex_count:D 15 + \c_one }
- \int_set:Nn \l_@@_true_max_int { \c_max_register_int + \c_one }
+ \int_set:Nn \l_@@_min_int { \tex_count:D 15 + 1 }
+ \int_set:Nn \l_@@_true_max_int { \c_max_register_int + 1 }
\@@_shrink_range:
\if_meaning:w \loctoks \tex_undefined:D \else:
\if_meaning:w \loctoks \scan_stop: \else:
@@ -288,8 +288,8 @@
{
\cs_gset_protected:Npn \@@_compute_range:
{
- \int_set:Nn \l_@@_min_int { #1 + \c_one }
- \int_set:Nn \l_@@_true_max_int { \c_max_register_int + \c_one }
+ \int_set:Nn \l_@@_min_int { #1 + 1 }
+ \int_set:Nn \l_@@_true_max_int { \c_max_register_int + 1 }
\@@_shrink_range:
}
}
@@ -300,9 +300,9 @@
{ ( \c_max_register_int + 1 ) * 3 / 4 }
\cs_new_protected:Npn \@@_compute_range:
{
- \int_set_eq:NN \l_@@_min_int \c_zero
- \int_set:Nn \l_@@_true_max_int { \c_max_register_int + \c_one }
- \int_set_eq:NN \l_@@_max_int \c_@@_max_length_int
+ \int_set:Nn \l_@@_min_int { 0 }
+ \int_set:Nn \l_@@_true_max_int { \c_max_register_int + 1 }
+ \int_set:Nn \l_@@_max_int { \c_@@_max_length_int }
}
%</initex>
% \end{macrocode}
Modified: trunk/l3kernel/l3str.dtx
===================================================================
--- trunk/l3kernel/l3str.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3str.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -1100,7 +1100,7 @@
% \begin{macrocode}
\cs_new:Npn \@@_skip_exp_end:w #1;
{
- \if_int_compare:w #1 > \c_eight
+ \if_int_compare:w #1 > 8 \exp_stop_f:
\exp_after:wN \@@_skip_loop:wNNNNNNNN
\else:
\exp_after:wN \@@_skip_end:w
@@ -1109,7 +1109,7 @@
#1 ;
}
\cs_new:Npn \@@_skip_loop:wNNNNNNNN #1; #2#3#4#5#6#7#8#9
- { \exp_after:wN \@@_skip_exp_end:w \__int_value:w \__int_eval:w #1 - \c_eight ; }
+ { \exp_after:wN \@@_skip_exp_end:w \__int_value:w \__int_eval:w #1 - 8 ; }
\cs_new:Npn \@@_skip_end:w #1 ;
{
\exp_after:wN \@@_skip_end:NNNNNNNN
@@ -1218,7 +1218,7 @@
{ \@@_collect_loop:wn #1 ; { } }
\cs_new:Npn \@@_collect_loop:wn #1 ;
{
- \if_int_compare:w #1 > \c_seven
+ \if_int_compare:w #1 > 7 \exp_stop_f:
\exp_after:wN \@@_collect_loop:wnNNNNNNN
\else:
\exp_after:wN \@@_collect_end:wn
@@ -1228,7 +1228,7 @@
\cs_new:Npn \@@_collect_loop:wnNNNNNNN #1; #2 #3#4#5#6#7#8#9
{
\exp_after:wN \@@_collect_loop:wn
- \__int_value:w \__int_eval:w #1 - \c_seven ;
+ \__int_value:w \__int_eval:w #1 - 7 ;
{ #2 #3#4#5#6#7#8#9 }
}
\cs_new:Npn \@@_collect_end:wn #1 ;
@@ -1272,7 +1272,7 @@
\if_meaning:w X #9
\use_i_delimit_by_q_stop:nw
\fi:
- \c_nine + \@@_count_spaces_loop:w
+ 9 + \@@_count_spaces_loop:w
}
% \end{macrocode}
% \end{macro}
@@ -1321,9 +1321,9 @@
\int_eval:n
{
#1
- { X \c_eight } { X \c_seven } { X \c_six }
- { X \c_five } { X \c_four } { X \c_three }
- { X \c_two } { X \c_one } { X \c_zero }
+ { X 8 } { X 7 } { X 6 }
+ { X 5 } { X 4 } { X 3 }
+ { X 2 } { X 1 } { X 0 }
\q_stop
}
}
@@ -1332,7 +1332,7 @@
\if_meaning:w X #9
\exp_after:wN \use_none_delimit_by_q_stop:w
\fi:
- \c_nine + \@@_count_loop:NNNNNNNNN
+ 9 + \@@_count_loop:NNNNNNNNN
}
% \end{macrocode}
% \end{macro}
Modified: trunk/l3kernel/l3tl.dtx
===================================================================
--- trunk/l3kernel/l3tl.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3tl.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -1601,7 +1601,7 @@
\cs_new_protected:Npn \@@_set_rescan_single:nn #1
{
\int_compare:nNnTF
- { \char_value_catcode:n { `#1 } / \c_three } = \c_four
+ { \char_value_catcode:n { `#1 } / 3 } = 4
{ \@@_set_rescan_single_aux:nn {#1} }
{
\int_compare:nNnTF { `#1 } < { `\~ }
@@ -1634,7 +1634,7 @@
\char_value_catcode:n
{ \exp_last_unbraced:Nf ` \str_head:n {#2} ~ }
}
- = \c_ten { ~ }
+ = { 10 } { ~ }
\exp_after:wN \@@_rescan:w
\exp_after:wN \prg_do_nothing:
\etex_scantokens:D { #2 #1 }
Modified: trunk/l3kernel/l3token.dtx
===================================================================
--- trunk/l3kernel/l3token.dtx 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/l3token.dtx 2017-02-17 16:47:59 UTC (rev 6943)
@@ -1174,37 +1174,37 @@
% }
% \begin{macrocode}
\cs_new_protected:Npn \char_set_catcode_escape:N #1
- { \char_set_catcode:nn { `#1 } \c_zero }
+ { \char_set_catcode:nn { `#1 } { 0 } }
\cs_new_protected:Npn \char_set_catcode_group_begin:N #1
- { \char_set_catcode:nn { `#1 } \c_one }
+ { \char_set_catcode:nn { `#1 } { 1 } }
\cs_new_protected:Npn \char_set_catcode_group_end:N #1
- { \char_set_catcode:nn { `#1 } \c_two }
+ { \char_set_catcode:nn { `#1 } { 2 } }
\cs_new_protected:Npn \char_set_catcode_math_toggle:N #1
- { \char_set_catcode:nn { `#1 } \c_three }
+ { \char_set_catcode:nn { `#1 } { 3 } }
\cs_new_protected:Npn \char_set_catcode_alignment:N #1
- { \char_set_catcode:nn { `#1 } \c_four }
+ { \char_set_catcode:nn { `#1 } { 4 } }
\cs_new_protected:Npn \char_set_catcode_end_line:N #1
- { \char_set_catcode:nn { `#1 } \c_five }
+ { \char_set_catcode:nn { `#1 } { 5 } }
\cs_new_protected:Npn \char_set_catcode_parameter:N #1
- { \char_set_catcode:nn { `#1 } \c_six }
+ { \char_set_catcode:nn { `#1 } { 6 } }
\cs_new_protected:Npn \char_set_catcode_math_superscript:N #1
- { \char_set_catcode:nn { `#1 } \c_seven }
+ { \char_set_catcode:nn { `#1 } { 7 } }
\cs_new_protected:Npn \char_set_catcode_math_subscript:N #1
- { \char_set_catcode:nn { `#1 } \c_eight }
+ { \char_set_catcode:nn { `#1 } { 8 } }
\cs_new_protected:Npn \char_set_catcode_ignore:N #1
- { \char_set_catcode:nn { `#1 } \c_nine }
+ { \char_set_catcode:nn { `#1 } { 9 } }
\cs_new_protected:Npn \char_set_catcode_space:N #1
- { \char_set_catcode:nn { `#1 } \c_ten }
+ { \char_set_catcode:nn { `#1 } { 10 } }
\cs_new_protected:Npn \char_set_catcode_letter:N #1
- { \char_set_catcode:nn { `#1 } \c_eleven }
+ { \char_set_catcode:nn { `#1 } { 11 } }
\cs_new_protected:Npn \char_set_catcode_other:N #1
- { \char_set_catcode:nn { `#1 } \c_twelve }
+ { \char_set_catcode:nn { `#1 } { 12 } }
\cs_new_protected:Npn \char_set_catcode_active:N #1
- { \char_set_catcode:nn { `#1 } \c_thirteen }
+ { \char_set_catcode:nn { `#1 } { 13 } }
\cs_new_protected:Npn \char_set_catcode_comment:N #1
- { \char_set_catcode:nn { `#1 } \c_fourteen }
+ { \char_set_catcode:nn { `#1 } { 14 } }
\cs_new_protected:Npn \char_set_catcode_invalid:N #1
- { \char_set_catcode:nn { `#1 } \c_fifteen }
+ { \char_set_catcode:nn { `#1 } { 15 } }
% \end{macrocode}
% \end{macro}
%
@@ -1229,37 +1229,37 @@
% }
% \begin{macrocode}
\cs_new_protected:Npn \char_set_catcode_escape:n #1
- { \char_set_catcode:nn {#1} \c_zero }
+ { \char_set_catcode:nn {#1} { 0 } }
\cs_new_protected:Npn \char_set_catcode_group_begin:n #1
- { \char_set_catcode:nn {#1} \c_one }
+ { \char_set_catcode:nn {#1} { 1 } }
\cs_new_protected:Npn \char_set_catcode_group_end:n #1
- { \char_set_catcode:nn {#1} \c_two }
+ { \char_set_catcode:nn {#1} { 2 } }
\cs_new_protected:Npn \char_set_catcode_math_toggle:n #1
- { \char_set_catcode:nn {#1} \c_three }
+ { \char_set_catcode:nn {#1} { 3 } }
\cs_new_protected:Npn \char_set_catcode_alignment:n #1
- { \char_set_catcode:nn {#1} \c_four }
+ { \char_set_catcode:nn {#1} { 4 } }
\cs_new_protected:Npn \char_set_catcode_end_line:n #1
- { \char_set_catcode:nn {#1} \c_five }
+ { \char_set_catcode:nn {#1} { 5 } }
\cs_new_protected:Npn \char_set_catcode_parameter:n #1
- { \char_set_catcode:nn {#1} \c_six }
+ { \char_set_catcode:nn {#1} { 6 } }
\cs_new_protected:Npn \char_set_catcode_math_superscript:n #1
- { \char_set_catcode:nn {#1} \c_seven }
+ { \char_set_catcode:nn {#1} { 7 } }
\cs_new_protected:Npn \char_set_catcode_math_subscript:n #1
- { \char_set_catcode:nn {#1} \c_eight }
+ { \char_set_catcode:nn {#1} { 8 } }
\cs_new_protected:Npn \char_set_catcode_ignore:n #1
- { \char_set_catcode:nn {#1} \c_nine }
+ { \char_set_catcode:nn {#1} { 9 } }
\cs_new_protected:Npn \char_set_catcode_space:n #1
- { \char_set_catcode:nn {#1} \c_ten }
+ { \char_set_catcode:nn {#1} { 10 } }
\cs_new_protected:Npn \char_set_catcode_letter:n #1
- { \char_set_catcode:nn {#1} \c_eleven }
+ { \char_set_catcode:nn {#1} { 11 } }
\cs_new_protected:Npn \char_set_catcode_other:n #1
- { \char_set_catcode:nn {#1} \c_twelve }
+ { \char_set_catcode:nn {#1} { 12 } }
\cs_new_protected:Npn \char_set_catcode_active:n #1
- { \char_set_catcode:nn {#1} \c_thirteen }
+ { \char_set_catcode:nn {#1} { 13 } }
\cs_new_protected:Npn \char_set_catcode_comment:n #1
- { \char_set_catcode:nn {#1} \c_fourteen }
+ { \char_set_catcode:nn {#1} { 14 } }
\cs_new_protected:Npn \char_set_catcode_invalid:n #1
- { \char_set_catcode:nn {#1} \c_fifteen }
+ { \char_set_catcode:nn {#1} { 15 } }
% \end{macrocode}
% \end{macro}
%
@@ -1418,21 +1418,21 @@
% \begin{macrocode}
\cs_new:Npn \@@_generate_aux:w #1 ; #2 ;
{
- \if_int_compare:w #2 = \c_thirteen
+ \if_int_compare:w #2 = 13 \exp_stop_f:
\__msg_kernel_expandable_error:nn { kernel } { char-active }
\else:
- \if_int_compare:w #2 = \c_ten
- \if_int_compare:w #1 = \c_zero
+ \if_int_compare:w #2 = 10 \exp_stop_f:
+ \if_int_compare:w #1 = 0 \exp_stop_f:
\__msg_kernel_expandable_error:nn { kernel } { char-null-space }
\else:
\__msg_kernel_expandable_error:nn { kernel } { char-space }
\fi:
\else:
\if_int_odd:w 0
- \if_int_compare:w #2 < \c_one 1 \fi:
- \if_int_compare:w #2 = \c_five 1 \fi:
- \if_int_compare:w #2 = \c_nine 1 \fi:
- \if_int_compare:w #2 > \c_thirteen 1 \fi: \exp_stop_f:
+ \if_int_compare:w #2 < 1 \exp_stop_f: 1 \fi:
+ \if_int_compare:w #2 = 5 \exp_stop_f: 1 \fi:
+ \if_int_compare:w #2 = 9 \exp_stop_f: 1 \fi:
+ \if_int_compare:w #2 > 13 \exp_stop_f: 1 \fi: \exp_stop_f:
\__msg_kernel_expandable_error:nn { kernel }
{ char-invalid-catcode }
\else:
Modified: trunk/l3kernel/testfiles/m3expl001.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl001.luatex.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3442,7 +3442,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3571,6 +3576,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl001.ptex.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3430,7 +3430,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3559,6 +3564,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl001.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3430,7 +3430,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3559,6 +3564,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl001.uptex.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3430,7 +3430,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3559,6 +3564,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl001.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl001.xetex.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3440,7 +3440,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3569,6 +3574,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.luatex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl003.luatex.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3443,7 +3443,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3572,6 +3577,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.ptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl003.ptex.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3431,7 +3431,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3560,6 +3565,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl003.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3431,7 +3431,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3560,6 +3565,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.uptex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl003.uptex.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3431,7 +3431,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3560,6 +3565,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
Modified: trunk/l3kernel/testfiles/m3expl003.xetex.tlg
===================================================================
--- trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-02-17 16:46:37 UTC (rev 6942)
+++ trunk/l3kernel/testfiles/m3expl003.xetex.tlg 2017-02-17 16:47:59 UTC (rev 6943)
@@ -3441,7 +3441,12 @@
Defining \c_inf_fp on line ...
Defining \c_minus_inf_fp on line ...
Defining \c_nan_fp on line ...
+Defining \c__fp_prec_int on line ...
+Defining \c__fp_half_prec_int on line ...
+Defining \c__fp_block_int on line ...
+Defining \c__fp_myriad_int on line ...
Defining \c__fp_max_exponent_int on line ...
+Defining \c__fp_max_exp_exponent_int on line ...
Defining \__fp_zero_fp:N on line ...
Defining \__fp_inf_fp:N on line ...
Defining \__fp_min_fp:N on line ...
@@ -3570,6 +3575,7 @@
Defining message LaTeX/kernel/fp-zero-div-ii on line ...
Defining message LaTeX/kernel/fp-invalid on line ...
Defining message LaTeX/kernel/fp-invalid-ii on line ...
+Defining \c__fp_five_int on line ...
Defining \__fp_round_return_one: on line ...
Defining \__fp_round_to_ninf:NNN on line ...
Defining \__fp_round_to_zero:NNN on line ...
More information about the latex3-commits
mailing list