texlive[68127] Master/texmf-dist: siunitx (31aug23)

commits+karl at tug.org commits+karl at tug.org
Thu Aug 31 23:41:49 CEST 2023


Revision: 68127
          http://tug.org/svn/texlive?view=revision&revision=68127
Author:   karl
Date:     2023-08-31 23:41:49 +0200 (Thu, 31 Aug 2023)
Log Message:
-----------
siunitx (31aug23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
    trunk/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-angle.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-complex.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-compound.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-quantity.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
    trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
    trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/doc/latex/siunitx/CHANGELOG.md	2023-08-31 21:41:49 UTC (rev 68127)
@@ -7,6 +7,22 @@
 
 ## [Unreleased]
 
+## [v3.3.5] - 2023-08-30
+
+### Fixed
+- Correct spacing for uncertainties for integers in
+  tables (see issue
+  [\#690](https://github.com/josephwright/siunitx/issues/690))
+- Prevent expansion of `\text` in literal units (see issue
+  [\#691](https://github.com/josephwright/siunitx/issues/691))
+- Parse empty and zero exponents independently (see issue
+  [\#692](https://github.com/josephwright/siunitx/issues/692))
+- Printing of 'boundary' phrases (see issue
+  [\#693](https://github.com/josephwright/siunitx/issues/693))
+- Handling of font commands inside `\ensuremath` in text
+  mode (see issue
+  [\#694](https://github.com/josephwright/siunitx/issues/694))
+
 ## [v3.3.4] - 2023-08-24
 
 ### Fixed
@@ -1996,7 +2012,8 @@
 ### Added
 - First public testing release (as `si`)
 
-[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.4...HEAD
+[Unreleased]: https://github.com/josephwright/siunitx/compare/v3.3.5...HEAD
+[v3.3.5]: https://github.com/josephwright/siunitx/compare/v3.3.4...v3.3.5
 [v3.3.4]: https://github.com/josephwright/siunitx/compare/v3.3.3...v3.3.4
 [v3.3.3]: https://github.com/josephwright/siunitx/compare/v3.3.2...v3.3.3
 [v3.3.2]: https://github.com/josephwright/siunitx/compare/v3.3.1...v3.3.2

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/siunitx/siunitx.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-angle.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-angle.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-angle.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -62,7 +62,11 @@
 %
 % \section{Formatting angles}
 %
-% \begin{function}{\siunitx_angle:n, \siunitx_angle:nnn}
+% \begin{function}
+%   {
+%     \siunitx_angle:n, \siunitx_angle:x,
+%     \siunitx_angle:nnn, \siunitx_angle:xxx
+%   }
 %   \begin{syntax}
 %     \cs{siunitx_angle:n} \Arg{angle}
 %     \cs{siunitx_angle:nnn} \Arg{degrees} \Arg{minutes} \Arg{seconds}
@@ -236,9 +240,9 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}{\siunitx_angle:n, \@@_angle:n}
-% \begin{macro}{\siunitx_angle:nnn}
-% \begin{macro}{\@@_arc_convert:n}
+% \begin{macro}{\siunitx_angle:n, \siunitx_angle:x, \@@_angle:n}
+% \begin{macro}{\siunitx_angle:nnn, \siunitx_angle:xxx}
+% \begin{macro}{\@@_arc_convert:n, \@@_arc_convert:x}
 %   The first step here is to force format conversion if required. Going to
 %   a decimal is easy, going to arc format is a bit more painful: avoid
 %   repeating calculations mainly for code readability.
@@ -258,10 +262,11 @@
           }
       }
   }
+\cs_generate_variant:Nn \siunitx_angle:n { x }
 \cs_new_protected:Npn \@@_angle:n #1
   {
     \bool_if:NTF \l_@@_force_arc_bool
-      { \exp_args:Ne \@@_arc_convert:n { \fp_eval:n {#1} } }
+      { \@@_arc_convert:x { \fp_eval:n {#1} } }
       {
         \siunitx_number_parse:nN {#1} \l_@@_degrees_tl
         \siunitx_number_process:NN \l_@@_degrees_tl \l_@@_degrees_tl
@@ -279,7 +284,7 @@
       {
         \bool_if:NTF \l_@@_force_decimal_bool
           {
-            \exp_args:Ne \siunitx_angle:n
+            \siunitx_angle:x
               { \fp_eval:n { #1 + (#2) / 60 + (#3) / 3600 } }
           }
           { \@@_arc_sign:nnn {#1} {#2} {#3} }
@@ -297,25 +302,24 @@
           \l_@@_seconds_tl
       }
   }
+\cs_generate_variant:Nn \siunitx_angle:nnn { xxx }
 \cs_new_protected:Npn \@@_arc_convert:n #1
   {
-    \use:x
+    \siunitx_angle:xxx
+      { \fp_eval:n { trunc(#1,0) } }
+      { \fp_eval:n { trunc((#1 - trunc(#1,0)) * 60,0) } }
       {
-        \siunitx_angle:nnn
-          { \fp_eval:n { trunc(#1,0) } }
-          { \fp_eval:n { trunc((#1 - trunc(#1,0)) * 60,0) } }
+        \fp_eval:n
           {
-            \fp_eval:n
-              {
-                (
-                          (#1 - trunc(#1,0)) * 60
-                  - trunc((#1 - trunc(#1,0)) * 60,0)
-                )
-                * 60
-              }
+            (
+                      (#1 - trunc(#1,0)) * 60
+              - trunc((#1 - trunc(#1,0)) * 60,0)
+            )
+            * 60
           }
       }
   }
+\cs_generate_variant:Nn \@@_arc_convert:n { x }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -399,11 +403,11 @@
         {
           \tl_if_empty:cF { l_@@_ ##1 _tl }
             {
-              \exp_args:Ncc \siunitx_number_process:NN
+              \siunitx_number_process:cc
                 { l_@@_ ##1 _tl } { l_@@_ ##1 _tl }
               \tl_set:cx { l_@@_ ##1 _tl }
                 {
-                  \exp_args:Nc \siunitx_number_output:NN
+                  \siunitx_number_output:cN
                     { l_@@_ ##1 _tl } \q_nil
                 }
             }

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-complex.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-complex.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-complex.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -66,7 +66,7 @@
 % assumptions concerning \LaTeXe{} commands in the submodule beyond those in the
 % core number and unit submodules.
 %
-% \begin{function}{\siunitx_complex_number:n}
+% \begin{function}{\siunitx_complex_number:n, \siunitx_complex_number:x}
 %   \begin{syntax}
 %     \cs{siunitx_complex_number:n} \Arg{number}
 %   \end{syntax}
@@ -93,7 +93,12 @@
 %   \cs{siunitx_complex_number:n}.
 % \end{function}
 %
-% \begin{function}{\siunitx_complex_quantity:nn, \siunitx_complex_quantity:nnn}
+% \begin{function}
+%   {
+%     \siunitx_complex_quantity:nn  ,
+%     \siunitx_complex_quantity:xn  ,
+%     \siunitx_complex_quantity:nnn
+%   }
 %   \begin{syntax}
 %     \cs{siunitx_complex_quantity:nn} \Arg{number} \Arg{units}
 %     \cs{siunitx_complex_quantity:nnn} \Arg{magnitude} \Arg{angle} \Arg{units}
@@ -686,9 +691,9 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}{\siunitx_complex_number:n}
+% \begin{macro}{\siunitx_complex_number:n, \siunitx_complex_number:x}
 % \begin{macro}{\siunitx_complex_number:nn, \@@_number:nn}
-% \begin{macro}{\siunitx_complex_quantity:nn}
+% \begin{macro}{\siunitx_complex_quantity:nn, \siunitx_complex_quantity:xn}
 % \begin{macro}{\siunitx_complex_quantity:nnn, \@@_quantity:nnn}
 %   The work here is pretty trivial: only conversion between forms makes
 %   things a bit more intricate.
@@ -717,6 +722,7 @@
           }
       }
   }
+\cs_generate_variant:Nn \siunitx_complex_number:n { x }
 \cs_new_protected:Npn \siunitx_complex_number:nn #1#2
   {
     \bool_lazy_or:nnTF
@@ -734,7 +740,7 @@
       { \l_@@_force_cartesian_bool }
       { \l_siunitx_number_parse_bool }
       {
-        \exp_args:Ne \siunitx_complex_number:n
+        \siunitx_complex_number:x
           { \@@_convert_cartesian:nn {#1} {#2} }
       }
       {
@@ -764,6 +770,7 @@
           { \siunitx_quantity:nn {#1} {#2} }
       }
   }
+\cs_generate_variant:Nn \siunitx_complex_quantity:nn { x }
 \cs_new_protected:Npn \siunitx_complex_quantity:nnn #1#2#3
   {
     \bool_lazy_or:nnTF
@@ -781,7 +788,7 @@
       { \l_@@_force_cartesian_bool }
       { \l_siunitx_number_parse_bool }
       {
-        \exp_args:Ne \siunitx_complex_quantity:nn
+        \siunitx_complex_quantity:xn
           { \@@_convert_cartesian:nn {#1} {#2} }
           {#3}
       }
@@ -1053,7 +1060,7 @@
     \siunitx_print_number:V \l_@@_tmp_tl
     \bool_if:NT \l_@@_polar_degree_bool
       {
-        \exp_args:NV \siunitx_unit_format:nN \l_@@_symbol_degree_tl \l_@@_tmp_tl
+        \siunitx_unit_format:VN \l_@@_symbol_degree_tl \l_@@_tmp_tl
         \nobreak
         \siunitx_print_unit:V \l_@@_tmp_tl
       }
@@ -1087,7 +1094,11 @@
 % \subsection{Conversion}
 %
 % \begin{macro}[EXP]
-%   {\@@_convert_cartesian:nn, \@@_convert_cartesian_aux:nn}
+%   {
+%     \@@_convert_cartesian:nn     ,
+%     \@@_convert_cartesian_aux:nn ,
+%     \@@_convert_cartesian_aux:ee
+%   }
 % \begin{macro}[EXP]{\@@_convert_cartesian_aux:w}
 %   Conversion to Cartesian form is easy as we have two inputs and need to
 %   do no parsing here at all.
@@ -1094,7 +1105,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_convert_cartesian:nn #1#2
   {
-    \exp_args:Nee \@@_convert_cartesian_aux:nn
+    \@@_convert_cartesian_aux:ee
       {
         \fp_to_tl:n
           { (#1) * cos \bool_if:NT \l_@@_polar_degree_bool { d } (#2) }
@@ -1108,6 +1119,7 @@
   {
     \@@_convert_cartesian_aux:w #1 e e \q_mark #2 e e \q_stop
   }
+\cs_generate_variant:Nn \@@_convert_cartesian_aux:nn { ee }
 \cs_new:Npn \@@_convert_cartesian_aux:w
   #1 e #2 e #3 \q_mark #4 e #5 e #6 \q_stop
   {
@@ -1132,8 +1144,10 @@
 % \begin{macro}[EXP]{\@@_convert_polar_auxiv:nnw}
 % \begin{macro}[EXP]{\@@_convert_polar_auxv:nnw}
 % \begin{macro}[EXP]{\@@_convert_polar_auxvi:nnn}
-% \begin{macro}[EXP]{\@@_convert_polar_auxvii:nnn}
-% \begin{macro}[EXP]{\@@_convert_polar_auxviii:nn}
+% \begin{macro}[EXP]
+%   {\@@_convert_polar_auxvii:nnn, \@@_convert_polar_auxvii:eee}
+% \begin{macro}[EXP]
+%   {\@@_convert_polar_auxviii:nn, \@@_convert_polar_auxviii:ee}
 %    A simplified parser for complex numbers which works by expansion,
 %    then converts to polar form.
 %    \begin{macrocode}
@@ -1181,7 +1195,7 @@
   }
 \cs_new:Npn \@@_convert_polar_auxvi:nnn #1#2#3
   {
-    \exp_args:Neee \@@_convert_polar_auxvii:nnn
+    \@@_convert_polar_auxvii:eee
       { \tl_if_blank:nTF {#1} { 0 } {#1} }
       { \tl_if_blank:nTF {#2} { 0 } {#2} }
       { \tl_if_blank:nF {#3} { e#3 } }
@@ -1188,7 +1202,7 @@
   }
 \cs_new:Npn \@@_convert_polar_auxvii:nnn #1#2#3
   {
-    \exp_args:Nee \@@_format_polar_auxviii:nn
+    \@@_format_polar_auxviii:ee
       { \fp_eval:n { sqrt ( (#1#3)^2 + (#2#3)^2 ) } }
       {
         \fp_eval:n
@@ -1195,7 +1209,9 @@
           { atan \bool_if:NT \l_@@_polar_degree_bool { d } (#2 , #1) }
       }
   }
+\cs_generate_variant:Nn \@@_convert_polar_auxvii:nnn { eee }
 \cs_new:Npn \@@_format_polar_auxviii:nn #1#2 { {#1} {#2} }
+\cs_generate_variant:Nn \@@_format_polar_auxviii:nn { ee }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-compound.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-compound.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-compound.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -535,7 +535,7 @@
 % \begin{macro}{\siunitx_compound_number:n}
 % \begin{macro}{\@@_format:n}
 % \begin{macro}{\@@_format:nn}
-% \begin{macro}{\@@_format:nnn}
+% \begin{macro}{\@@_format:nnn, \@@_format:xxn}
 %   Printing a generic set starts with the question of whether we want to
 %   extract exponents. If we do, then there is the work to do with extraction.
 %   Either way, the printing is handed off to a common function. We do a quick
@@ -554,7 +554,7 @@
     \seq_clear:N \l_@@_tmp_seq
     \bool_if:NTF \l_siunitx_number_parse_bool
       {
-        \exp_args:Nxx \@@_format:nnn
+        \@@_format:xxn
           { \tl_head:n {#1} }
           { \tl_tail:n {#1} }
           {#2}
@@ -575,6 +575,7 @@
       }
       { \@@_format_aux:nnn {#1} {#2} {#3} }
   }
+\cs_generate_variant:Nn \@@_format:nnn { xx }
 \cs_new_protected:Npn \@@_format_aux:nnn #1#2#3
   {
     \siunitx_number_parse:nN {#1} \l_@@_tmp_tl
@@ -699,7 +700,7 @@
 %     \@@_format_combine-exponent_aux:n ,
 %     \@@_format_extract-exponent_aux:n
 %   }
-% \begin{macro}{\@@_extract_exp:nN}
+% \begin{macro}{\@@_extract_exp:nN, \@@_extract_exp:VN}
 % \begin{macro}{\@@_extract_exp:nnnnnnnN}
 %   Actually formatting the units is much the same as is done in
 %   the quantities module, except that we have to cover the multiplication
@@ -738,7 +739,7 @@
   {
     \bool_set_true:N \l_@@_exp_combine_bool
     \siunitx_number_process:NN \l_@@_tmp_tl \l_@@_first_tl
-    \exp_args:NV \@@_extract_exp:nN
+    \@@_extract_exp:VN
       \l_@@_first_tl \l_@@_tmp_fp
     #1 \l_@@_tmp_fp \l_@@_unit_tl
   }
@@ -775,6 +776,7 @@
   }
 \cs_new_protected:Npn \@@_extract_exp:nN #1#2
   { \@@_extract_exp:nnnnnnnN #1 #2 }
+\cs_generate_variant:Nn \@@_extract_exp:nN  { V }
 \cs_new_protected:Npn \@@_extract_exp:nnnnnnnN #1#2#3#4#5#6#7#8
   { \fp_set:Nn #8 {#6#7} }
 %    \end{macrocode}
@@ -820,7 +822,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_quantity_auxi:nn #1#2
   {
-    \@@_print_boundary:V \l_@@_boundary_close_tl
+    \@@_print_boundary:V \l_@@_boundary_open_tl
     \seq_clear:N \l_@@_tmp_seq
     \tl_map_inline:nn {#1}
       {
@@ -872,8 +874,8 @@
 % \end{macro}
 %
 % \begin{macro}{\@@_print:N}
-% \begin{macro}{\@@_print:nnN, \@@_print:xxN}
-% \begin{macro}{\@@_print:nnnN}
+% \begin{macro}{\@@_print:nnN, \@@_print:nVN, \@@_print:xnN, \@@_print:xxN}
+% \begin{macro}{\@@_print:nnnN, \@@_print:xnnN}
 % \begin{macro}{\@@_print_aux:n}
 % \begin{macro}{\@@_print_aux:nn}
 % \begin{macro}{\@@_print_quantity:n, \@@_print_quantity:x}
@@ -900,14 +902,14 @@
           }
           #1
       }
-      { \@@_print:xxN { } { \exp_not:V \l_@@_exp_tl } #1 }
+      { \@@_print:nVN { } \l_@@_exp_tl #1 }
   }
 \cs_new_protected:Npn \@@_print:nnN #1#2#3
   {
-    \exp_args:Nx \@@_print:nnnN
+    \@@_print:xnnN
       { \seq_count:N \l_@@_tmp_seq } {#1} {#2} #3
   }
-\cs_generate_variant:Nn \@@_print:nnN { xx }
+\cs_generate_variant:Nn \@@_print:nnN { nV , x , xx }
 %    \end{macrocode}
 %   A rather long auxiliary as we want a way to have the brackets/exponent
 %   available. The actual flow is simple enough: see how many entries there are
@@ -938,7 +940,7 @@
                 \seq_item:Nn \l_@@_tmp_seq { 2 }
                 \exp_not:n {#3}
               }
-            \@@_print_boundary:V \l_@@_boundary_open_tl
+            \@@_print_boundary:V \l_@@_boundary_close_tl
           }
       }
       {
@@ -953,6 +955,7 @@
         \@@_print_boundary:V \l_@@_boundary_close_tl
       }
   }
+\cs_generate_variant:Nn \@@_print:nnnN { x }
 \cs_new_protected:Npn \@@_print_aux:n #1 { }
 \cs_new_protected:Npn \@@_print_aux:nn #1#2
   {

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-number.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -94,8 +94,8 @@
 %   \end{quote}
 %   where the two sign parts must be single tokens if present,
 %   and all other components
-%   must be given in braces. The number will have at least one digit for both the
-%   \meta{integer} and \meta{exponent} parts: these are required. The
+%   must be given in braces. The number will have at least one digit for either the
+%   \meta{integer} and \meta{exponent} parts.. The
 %   \meta{uncertainty} part should either be blank or contain an
 %   \meta{identifier} (as a brace group), followed by one or more data entries.
 %   Valid uncertainty \meta{identifiers} currently are
@@ -115,7 +115,7 @@
 %   \cs{empty}.
 % \end{function}
 %
-% \begin{function}{\siunitx_number_process:NN}
+% \begin{function}{\siunitx_number_process:NN, \siunitx_number_process:cc}
 %   \begin{syntax}
 %     \cs{siunitx_number_process:N} \meta{tl~var1} \meta{tl~var2}
 %   \end{syntax}
@@ -131,10 +131,12 @@
 %   with the result stored in \meta{tl~var2}.
 % \end{function}
 %
-% \begin{function}[rEXP]
+% \begin{function}[EXP]
 %   {
-%     \siunitx_number_output:N,  \siunitx_number_output:n,
-%     \siunitx_number_output:NN, \siunitx_number_output:nN
+%     \siunitx_number_output:N, \siunitx_number_output:c
+%     \siunitx_number_output:n,
+%     \siunitx_number_output:NN, \siunitx_number_output:cN
+%     \siunitx_number_output:nN
 %   }
 %   \begin{syntax}
 %     \cs{siunitx_number_output:N} \meta{number}
@@ -179,7 +181,8 @@
 % \begin{function}[EXP]
 %   {
 %     \siunitx_number_adjust_exponent:Nn ,
-%     \siunitx_number_adjust_exponent:nn
+%     \siunitx_number_adjust_exponent:nn ,
+%     \siunitx_number_adjust_exponent:Vn
 %   }
 %   \begin{syntax}
 %     \cs{siunitx_number_adjust_exponent:Nn} \meta{number} \Arg{fp~expr}
@@ -711,7 +714,7 @@
 %   Variants not provided by \pkg{expl3}.
 %    \begin{macrocode}
 \cs_generate_variant:Nn \keys_set:nn { nx }
-\cs_generate_variant:Nn \tl_if_blank:nTF { f }
+\cs_generate_variant:Nn \tl_if_blank:nTF { e }
 \cs_generate_variant:Nn \tl_if_in:NnTF { NV }
 \cs_generate_variant:Nn \tl_if_in:nnTF { nV }
 \cs_generate_variant:Nn \tl_remove_all:Nn { NV }
@@ -799,8 +802,6 @@
 % \end{quote}
 % where all components must be given in braces. \emph{All} of the components
 % must be present in a stored number (\foreign{i.e.}~at the end of parsing).
-% The number must have at least one digit for both the \meta{integer} and
-% \meta{exponent} parts.
 %
 % A non-empty \meta{uncertainty} must contain one leading brace group
 % containing an identifier, then zero or more brace groups which contain
@@ -1078,7 +1079,7 @@
     \tl_put_right:NV \l_@@_uncert_tl \l_@@_flex_tl
     \tl_if_empty:NF \l_@@_uncert_tl
       {
-        \tl_if_blank:fTF { \exp_after:wN \use_iv:nnnn \l_@@_parsed_tl }
+        \tl_if_blank:eTF { \exp_after:wN \use_iv:nnnn \l_@@_parsed_tl }
           { \@@_parse_combine_uncert: }
           { \tl_clear:N \l_@@_parsed_tl }
       }
@@ -1098,11 +1099,21 @@
 % \begin{macro}{\@@_parse_combine_uncert:}
 % \begin{macro}[EXP]{\@@_parse_combine_uncert:nnnn}
 % \begin{macro}[EXP]{\@@_parse_combine_uncert:nn}
-% \begin{macro}[EXP]{\@@_parse_combine_uncert_loop:nnnnnnn}
-% \begin{macro}[EXP]{\@@_parse_combine_uncert:nnnnnn}
-% \begin{macro}[EXP]{\@@_parse_combine_uncert:nnnnnnn}
+% \begin{macro}[EXP]
+%   {
+%     \@@_parse_combine_uncert_loop:nnnnnnn ,
+%     \@@_parse_combine_uncert_loop:nnnnnnn
+%   }
+% \begin{macro}[EXP]
+%   {\@@_parse_combine_uncert:nnnnnn, \@@_parse_combine_uncert:ennnnn}
+% \begin{macro}[EXP]
+%   {\@@_parse_combine_uncert:nnnnnnn, \@@_parse_combine_uncert:ennnnnn}
 % \begin{macro}[EXP]{\@@_parse_combine_uncert:nnnnn}
-% \begin{macro}[EXP]{\@@_parse_combine_uncert_aux:nnnn}
+% \begin{macro}[EXP]
+%   {
+%     \@@_parse_combine_uncert_aux:nnnn ,
+%     \@@_parse_combine_uncert_aux:eenn
+%   }
 % \begin{macro}[EXP]{\@@_parse_combine_uncert:N}
 % \begin{macro}[EXP]{\@@_parse_combine_uncert:w}
 % \begin{macro}[EXP]{\@@_parse_combine_uncert_end:nnn}
@@ -1148,10 +1159,11 @@
   {
     \quark_if_recursion_tail_stop_do:nn {#4}
       { \@@_parse_combine_uncert_end:nnn {#1} {#2} {#3} }
-    \exp_args:Nf \@@_parse_combine_uncert:nnnnnn
+    \@@_parse_combine_uncert:ennnnn
       { \int_eval:n { \tl_count:n {#1} - \tl_count:n {#6} } }
       {#1} {#2} {#3} {#5} {#6}
   }
+\cs_generate_variant:Nn \@@_parse_combine_uncert_loop:nnnnnnn { nee }
 %    \end{macrocode}
 %   The difference in places between the two decimal parts is now found: this
 %   is done just once to avoid having to parse token lists twice. The value
@@ -1160,10 +1172,11 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_parse_combine_uncert:nnnnnn #1
   {
-    \exp_args:Nf \@@_parse_combine_uncert:nnnnnnn
+    \@@_parse_combine_uncert:ennnnnn
       { \prg_replicate:nn { \int_abs:n {#1} } { 0 } }
       {#1}
   }
+\cs_generate_variant:Nn \@@_parse_combine_uncert:nnnnnn { e }
 \cs_new:Npn \@@_parse_combine_uncert:nnnnnnn #1#2#3#4#5#6#7
   {
     \int_compare:nNnTF {#2} > 0
@@ -1176,6 +1189,7 @@
           { #3 #1 } {#4} {#5} {#6} {#7}
       }
   }
+\cs_generate_variant:Nn \@@_parse_combine_uncert:nnnnnnn { e }
 %    \end{macrocode}
 %   We now ensure that the decimal part is never entirely blank \emph{if} there
 %   are decimal-part uncertainty digits. There is also a need to handle the
@@ -1184,7 +1198,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_parse_combine_uncert:nnnnn #1#2#3#4#5
   {
-    \exp_args:Nee \@@_parse_combine_uncert_aux:nnnn
+    \@@_parse_combine_uncert_aux:eenn
       {
         \bool_lazy_and:nnTF
           { \tl_if_blank_p:n {#1} }
@@ -1201,8 +1215,8 @@
   }
 \cs_new:Npn \@@_parse_combine_uncert_aux:nnnn #1#2#3#4
   {
-    \exp_args:Neee \@@_parse_combine_uncert_loop:nnnnnnn
-      { \exp_not:n {#1} }
+    \@@_parse_combine_uncert_loop:neennnn
+      {#1}
       {
         \exp_not:n {#3}
         \tl_if_blank:nF {#2} { S } 
@@ -1212,6 +1226,7 @@
         \tl_if_blank:nF {#2} { { \exp_not:n {#2} } }
       }
   }
+\cs_generate_variant:Nn \@@_parse_combine_uncert_aux:nnnn { ee }
 %    \end{macrocode}
 %   A short routine to remove any leading zeros in the uncertainty part,
 %   which are not needed for the compact representation used by the module.
@@ -1309,7 +1324,7 @@
   {
     \tl_if_empty:NTF \l_siunitx_number_input_exponent_tl
       {
-        \tl_set:Nn \l_@@_exponent_tl { { } 0 }
+        \tl_set:Nn \l_@@_exponent_tl { { } { } }
         \tl_if_empty:NF \l_@@_parsed_tl
           { \@@_parse_loop: }
       }
@@ -1343,7 +1358,7 @@
 \cs_new_protected:Npn \@@_parse_exponent_auxii:nn #1#2
   {
     \quark_if_nil:nTF {#2}
-      { \tl_set:Nn \l_@@_exponent_tl { { } 0 } }
+      { \tl_set:Nn \l_@@_exponent_tl { { } { } } }
       {
         \tl_set:Nn \l_@@_arg_tl {#1}
         \tl_if_blank:nTF {#2}
@@ -1669,7 +1684,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_parse_loop_after_decimal:NN #1#2
   {
-    \tl_if_blank:fTF { \exp_after:wN \use_none:n #1 }
+    \tl_if_blank:eTF { \exp_after:wN \use_none:n #1 }
       {
         \quark_if_recursion_tail_stop_do:Nn #2
           { \@@_parse_loop_break:w \q_recursion_stop }
@@ -1759,7 +1774,11 @@
 % \begin{macro}{\@@_parse_uncert_marker:w}
 % \begin{macro}{\@@_parse_uncert_marker:nnnnN}
 % \begin{macro}{\@@_parse_uncert_marker:nnnnnN}
-% \begin{macro}{\@@_parse_uncert_marker:nnnnnnN}
+% \begin{macro}
+%   {
+%     \@@_parse_uncert_marker:nnnnnnN ,
+%     \@@_parse_uncert_marker:xnnnnnN
+%   }
 % \begin{macro}{\@@_parse_uncert_after:N}
 %   Parsing a combined uncertainty has a very restricted range of allowed
 %   tokens. A closing uncertainty token in the first place is an error,
@@ -1935,7 +1954,7 @@
   }
 \cs_new_protected:Npn \@@_parse_uncert_marker:nnnnnN #1#2#3#4#5#6
   {
-    \exp_args:Ne \@@_parse_uncert_marker:nnnnnnN
+    \@@_parse_uncert_marker:xnnnnnN
       { \int_eval:n { \tl_count:n {#4} } }
       {#1} {#2} {#3} {#4} {#5} #6
   }
@@ -1971,6 +1990,7 @@
       }
         #5#6#7
   }
+\cs_generate_variant:Nn \@@_parse_uncert_marker:nnnnnnN { x }
 %    \end{macrocode}
 %   At the end of collection, we can either start another one or be done:
 %   either way we move the data around.
@@ -2177,7 +2197,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\siunitx_number_process:NN}
+% \begin{macro}{\siunitx_number_process:NN, \siunitx_number_process:cc}
 % \begin{macro}{\@@_process:nnnnnnnNN}
 %   A top-level interface for the processing tools. Rounding happens in all
 %   cases, but exponents are only processed if the value is not $0$.
@@ -2194,6 +2214,7 @@
         \@@_digits:NN #2 #2
       }
   }
+\cs_generate_variant:Nn \siunitx_number_process:NN { cc }
 \cs_new_protected:Npn \@@_process:nnnnnnnNN #1#2#3#4#5#6#7#8#9
   {
     \bool_lazy_and:nnTF
@@ -2215,18 +2236,21 @@
 % \begin{macro}{\@@_exponent:NN}
 % \begin{macro}[EXP]
 %   {
+%     \@@_exponent:nnnnnnn             ,
+%     \@@_exponent_aux:nnnnnnn         ,
 %     \@@_exponent_engineering:nnnnnnn ,
 %     \@@_exponent_fixed:nnnnnnn       ,
-%     \@@_exponent_input:nnnnnnn       ,
 %     \@@_exponent_scientific:nnnnnnn
 %   }
 % \begin{macro}[EXP]
 %   {
-%     \@@_exponent_fixed:nnnnnnnn       ,
-%     \@@_exponent_scientific:nnnnnnnn
+%     \@@_exponent_fixed:nnnnnnnn      ,
+%     \@@_exponent_fixed:ennnnnnn      ,
+%     \@@_exponent_scientific:nnnnnnnn ,
+%     \@@_exponent_scientific:ennnnnnn
 %   }
 % \begin{macro}[EXP]{\@@_exponent_scientific:nnnw}
-% \begin{macro}[EXP]{\@@_exponent_shift:nnn,\@@_exponent_shift:nnf}
+% \begin{macro}[EXP]{\@@_exponent_shift:nnn, \@@_exponent_shift:nne}
 % \begin{macro}[EXP]{\@@_exponent_shift_down:nnnw}
 % \begin{macro}[EXP]{\@@_exponent_shift_down:nnn}
 % \begin{macro}[EXP]{\@@_exponent_shift_down:nw}
@@ -2233,17 +2257,13 @@
 % \begin{macro}[EXP]{\@@_exponent_shift_up:nnn}
 % \begin{macro}[EXP]{\@@_exponent_shift_up:nnw}
 % \begin{macro}[EXP]
-%   {
-%     \@@_exponent_shift_up_aux:nnn ,
-%     \@@_exponent_shift_up_aux:fnn ,
-%     \@@_exponent_shift_up_aux:ffn
-%   }
+%   {\@@_exponent_shift_up_aux:nnn, \@@_exponent_shift_up_aux:een}
 % \begin{macro}[EXP]{\@@_exponent_shift_uncert:nw}
 % \begin{macro}[EXP]
-%   {\@@_exponent_shift_uncert_S:nnnn, \@@_exponent_shift_uncert_S:fnnn}
+%   {\@@_exponent_shift_uncert_S:nnnn, \@@_exponent_shift_uncert_S:ennn}
 % \begin{macro}[EXP]{\@@_exponent_uncert:n}
 % \begin{macro}[EXP]{\@@_exponent_finalise:n}
-% \begin{macro}[EXP]{\@@_exponent_engineering_aux:nnnnnnn}
+% \begin{macro}[EXP]{\@@_exponentcd te_engineering_aux:nnnnnnn}
 % \begin{macro}[EXP]
 %   {
 %     \@@_exponent_engineering_0:nnnn ,
@@ -2254,7 +2274,7 @@
 %  \begin{macro}[EXP]{\@@_exponent_engineering_uncert:nn}
 %  \begin{macro}[EXP]{\@@_exponent_engineering_uncert_S:nnn}
 %  \begin{macro}[EXP]{\@@_exponent_threshold:nnnnnnn}
-%  \begin{macro}[EXP]{\@@_exponent_threshold:nn}
+%  \begin{macro}[EXP]{\@@_exponent_threshold:nn, \@@_exponent_threshold:en}
 %  \begin{macro}[EXP]{\@@_exponent_threshold:nnnnnnnn}
 %   Manipulating an exponent is done using a single expansion function
 %   \emph{unless} dealing with engineering-style output. The latter is easier
@@ -2265,12 +2285,7 @@
 \cs_new_protected:Npn \@@_exponent:NN #1#2
   {
     \tl_set:Nx #2
-      {
-        \cs:w
-          @@_exponent_ \l_@@_exponent_mode_tl :nnnnnnn
-          \exp_after:wN
-        \cs_end: #1
-      }
+      { \exp_after:wN \@@_exponent:nnnnnnn #1 }
     \str_if_eq:VnT \l_@@_exponent_mode_tl { engineering }
       {
         \tl_set:Nx #2
@@ -2277,9 +2292,24 @@
           { \exp_after:wN \@@_exponent_engineering_aux:nnnnnnn #2 }
       }
   }
+\cs_new:Npn \@@_exponent:nnnnnnn #1#2#3#4#5#6#7
+  {
+    \str_if_eq:VnTF \l_@@_exponent_mode_tl { input }
+      { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
+      {
+        \tl_if_blank:nTF {#7}
+          { \@@_exponent_aux:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} { 0 } }
+          { \@@_exponent_aux:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} {#7} }
+      }
+  }
+\cs_new:Npn \@@_exponent_aux:nnnnnnn #1#2#3#4#5#6#7
+  {
+    \use:c {  @@_exponent_ \l_@@_exponent_mode_tl :nnnnnnn }
+      {#1} {#2} {#3} {#4} {#5} {#6} {#7}
+  }
 \cs_new:Npn \@@_exponent_fixed:nnnnnnn #1#2#3#4#5#6#7
   {
-    \exp_args:Nf \@@_exponent_fixed:nnnnnnnn
+    \@@_exponent_fixed:ennnnnnn
       { \int_eval:n { \l_@@_exponent_fixed_int - (#6#7) } }
       {#1} {#2} {#3} {#4} {#5} {#6} {#7}
   }
@@ -2291,8 +2321,7 @@
     { \int_compare:nNnT \l_@@_exponent_fixed_int < 0 { - }  }
     { \int_abs:n \l_@@_exponent_fixed_int }
   }
-\cs_new:Npn \@@_exponent_input:nnnnnnn #1#2#3#4#5#6#7
-  { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
+\cs_generate_variant:Nn \@@_exponent_fixed:nnnnnnnn { e }
 %    \end{macrocode}
 %   To convert to scientific notation, the key question is to find the number
 %   of significant places. That is easy enough if the number has a non-zero
@@ -2301,7 +2330,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_exponent_scientific:nnnnnnn #1#2#3#4#5#6#7
   {
-    \exp_args:Nf \@@_exponent_scientific:nnnnnnnn
+    \@@_exponent_scientific:ennnnnnn
       { \int_eval:n { \tl_count:n {#3} } }
       {#1} {#2} {#3} {#4} {#5} {#6} {#7}
   }
@@ -2323,6 +2352,7 @@
         \@@_exponent_finalise:n { #1 + #7#8 - 1 }
       }
   }
+\cs_generate_variant:Nn \@@_exponent_scientific:nnnnnnnn { e } 
 \cs_new_eq:NN \@@_exponent_engineering:nnnnnnn
   \@@_exponent_scientific:nnnnnnn
 \cs_new:Npn \@@_exponent_scientific:nnnw #1#2#3#4#5 \q_stop
@@ -2351,7 +2381,7 @@
           { {#2} {#3} }
       }
   }
-\cs_generate_variant:Nn \@@_exponent_shift:nnn { nnf }
+\cs_generate_variant:Nn \@@_exponent_shift:nnn { nne }
 %    \end{macrocode}
 %   For shifting the exponent down, there is first a loop to reserve the
 %   integer part before doing the work: that of course has to be undone
@@ -2385,7 +2415,7 @@
   {
     \tl_if_blank:nTF {#3}
       {
-        \@@_exponent_shift_up_aux:ffn
+        \@@_exponent_shift_up_aux:een
           { \int_eval:n { #1 + 1 } }
           { \str_if_eq:nnF {#2} { 0 } {#2} 0 }
           { }
@@ -2395,7 +2425,7 @@
   }
 \cs_new:Npn \@@_exponent_shift_up:nnw #1#2#3#4 \q_stop
   {
-    \@@_exponent_shift_up_aux:ffn
+    \@@_exponent_shift_up_aux:een
       { \int_eval:n { #1 + 1 } }
       { \str_if_eq:nnF {#2} { 0 } {#2} #3 }
       {#4}
@@ -2417,7 +2447,7 @@
          { \@@_exponent_shift_up:nnn {#1} {#2} {#3} }
       }
   }
-\cs_generate_variant:Nn \@@_exponent_shift_up_aux:nnn { f , ff }
+\cs_generate_variant:Nn \@@_exponent_shift_up_aux:nnn { ee }
 %    \end{macrocode}
 %   If the shift has put digits into the integer part, we have to adjust the
 %   uncertainty accordingly. First, we grab the data, then adjust by the
@@ -2438,7 +2468,7 @@
             \@@_exponent_uncert:n { { S } { 0 } }
           }
           {
-            \use:c { @@_exponent_shift_uncert_ \use_i:nn #3 :fnnn }
+            \@@_exponent_shift_uncert_S:ennn
               { \prg_replicate:nn {#1} { 0 } }
               {#2}
               #3
@@ -2450,7 +2480,7 @@
     #2
     \@@_exponent_uncert:n { { S } { #4#1 } }
   }
-\cs_generate_variant:Nn \@@_exponent_shift_uncert_S:nnnn { f }
+\cs_generate_variant:Nn \@@_exponent_shift_uncert_S:nnnn { e }
 \cs_new:Npn \@@_exponent_uncert:n #1 { { \exp_not:n {#1} } }
 %    \end{macrocode}
 %   Tidy up the exponent to put the sign in the right place.
@@ -2503,7 +2533,7 @@
       }
       {
         { \exp_not:n {#1} \exp_not:o { \tl_head:w #2 \q_stop } }
-        { \exp_not:f { \tl_tail:n {#2} } }
+        { \tl_tail:n {#2} }
         { \exp_not:n {#3} }
       }
     \@@_exponent_finalise:n { #4 - 1 }
@@ -2527,7 +2557,7 @@
       }
       {
         { \exp_not:n {#1#3} \exp_not:o { \tl_head:w #4 \q_stop } }
-        { \exp_not:f { \tl_tail:n {#4} } }
+        { \tl_tail:n {#4} }
         { \exp_not:n {#2} }
       }
   }
@@ -2552,7 +2582,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_exponent_threshold:nnnnnnn #1#2#3#4#5#6#7
   {
-    \exp_args:Ne \@@_exponent_threshold:nn
+    \@@_exponent_threshold:en
       {
         \@@_exponent_scientific:nnnnnnn
           {#1} {#2} {#3} {#4} {#5} {#6} {#7}
@@ -2559,9 +2589,10 @@
       }
       { {#1} {#2} {#3} {#4} {#5} {#6} {#7} }
   }
-\cs_new:Npn  \@@_exponent_threshold:nn #1#2
+\cs_new:Npn \@@_exponent_threshold:nn #1#2
   { \@@_exponent_threshold:nnnnnnnn #1 {#2} }
-\cs_new:Npn  \@@_exponent_threshold:nnnnnnnn #1#2#3#4#5#6#7#8
+\cs_generate_variant:Nn \@@_exponent_threshold:nn { e }
+\cs_new:Npn \@@_exponent_threshold:nnnnnnnn #1#2#3#4#5#6#7#8
   {
     \bool_lazy_and:nnTF
       { \int_compare_p:nNn {#6#7} > \l_@@_lower_threshold_int }
@@ -2569,7 +2600,6 @@
       { \exp_not:n {#8} }
       { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
   }
-
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -2751,7 +2781,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}[EXP]{\@@_round:nnn, \@@_round:fnn}
+% \begin{macro}[EXP]{\@@_round:nnn, \@@_round:enn}
 % \begin{macro}[EXP]{\@@_round:nnnn, \@@_round:Vnnn}
 % \begin{macro}[EXP]
 %   {
@@ -2758,18 +2788,32 @@
 %     \@@_round_auxi:nnnnN   ,
 %     \@@_round_auxii:nnnnN  ,
 %     \@@_round_auxiii:nnnnN ,
-%     \@@_round_auxiv:nnnnN
+%     \@@_round_auxiii:ennnN ,
+%     \@@_round_auxiv:nnnnN  ,
+%     \@@_round_auxiv:ennnN
 %   }
 %  \begin{macro}[EXP]{\@@_round_auxv:nnnN, \@@_round_auxvi:nnnN}
 %  \begin{macro}[EXP]{\@@_round_auxvii:nnnTF}
 %  \begin{macro}[EXP]{\@@_round_auxviii:nnN, \@@_round_auxix:nnN}
 %  \begin{macro}[EXP]{\@@_round_final_integer:nnw, \@@_round_final_decimal:nnw}
-%  \begin{macro}[EXP]{\@@_round_final_signicant:n}
-%  \begin{macro}[EXP]{\@@_round_final_signicant:N}
-%  \begin{macro}[EXP]{\@@_round_final_signicant:w}
-%  \begin{macro}[EXP]{\@@_round_final_output:nn, \@@_round_final_output:ff}
-%  \begin{macro}[EXP]{\@@_round_final:nn, \@@_round_final:fn}
-%  \begin{macro}[EXP]{\@@_round_final_shift:nn, \@@_round_final_shift:ff}
+%  \begin{macro}[EXP]
+%    {\@@_round_final_significant:n, \@@_round_final_significant:e}
+%  \begin{macro}[EXP]{\@@_round_final_significant:N}
+%  \begin{macro}[EXP]{\@@_round_final_significant:w}
+%  \begin{macro}[EXP]
+%    {
+%      \@@_round_final_output:nn ,
+%      \@@_round_final_output:ne ,
+%      \@@_round_final_output:en ,
+%      \@@_round_final_output:ee
+%    }
+%  \begin{macro}[EXP]{\@@_round_final:nn, \@@_round_final:en}
+%  \begin{macro}[EXP]
+%    {
+%      \@@_round_final_shift:nn ,
+%      \@@_round_final_shift:en ,
+%      \@@_round_final_shift:ee
+%    }
 %  \begin{macro}[EXP]{\@@_round_final_shift:Nw}
 %  \begin{macro}[EXP]
 %    {
@@ -2779,7 +2823,7 @@
 %      \@@_round_scientific:nn
 %    }
 %  \begin{macro}[EXP]{\@@_round_engineering:NNNNn}
-%  \begin{macro}[EXP]{\@@_round_engineering:nnN}
+%  \begin{macro}[EXP]{\@@_round_engineering:nnN, \@@_round_engineering:VnN}
 %  \begin{macro}[EXP]{\@@_round_truncate:n, \@@_round_truncate_direct:n}
 %  \begin{macro}[EXP]{\@@_round_truncate:nnN}
 %   Actually doing the rounding needs us to work from the least significant
@@ -2793,7 +2837,7 @@
     \@@_round:Vnnn \l_@@_round_dir_tl
       {#1} {#2} {#3}
   }
-\cs_generate_variant:Nn \@@_round:nnn { f }
+\cs_generate_variant:Nn \@@_round:nnn { e }
 \cs_new:Npn \@@_round:nnnn #1#2#3#4
   {
     \@@_round_auxi:nnnnN {#1} {#2} {#3} { }
@@ -2845,11 +2889,12 @@
       }
     \int_compare:nNnTF {#1} > 0
       {
-        \exp_args:Nf \@@_round_auxiii:nnnnN
+        \@@_round_auxiii:ennnN
           { \int_eval:n { #1 - 1 } } {#2} {#3} { #5#4 }
       }
       { \@@_round_auxv:nnnN {#2} {#4} {#3} #5 }
   }
+\cs_generate_variant:Nn \@@_round_auxiii:nnnnN { e }
 \cs_new:Npn \@@_round_auxiv:nnnnN #1#2#3#4#5
   {
     \quark_if_recursion_tail_stop_do:Nn #5
@@ -2863,11 +2908,12 @@
       }
     \int_compare:nNnTF {#1} > 0
       {
-        \exp_args:Nf \@@_round_auxiv:nnnnN
+        \@@_round_auxiv:ennnN
           { \int_eval:n { #1 - 1 } } {#2} { #3 0 } { #5#4 }
       }
       { \@@_round_auxvi:nnnN {#2} {#4} {#3} #5 }
   }
+\cs_generate_variant:Nn \@@_round_auxiv:nnnnN { e }
 %    \end{macrocode}
 %   We now have the discarded digits, the matching filler and the
 %   next digit. So we can make the decision on rounding: that
@@ -2934,7 +2980,7 @@
       {
         \str_if_eq:nnTF {#1} { 0 }
           {
-            \@@_round_final_output:ff
+            \@@_round_final_output:ne
               { 1 }
               { \@@_round_truncate:n {#2} }
           }
@@ -2961,7 +3007,7 @@
               }
           }
           {
-            \@@_round_final:fn
+            \@@_round_final:en
               { \int_eval:n { #3 + 1 } }
               { \@@_round_final_decimal:nnw {#1} {#2} }
           }
@@ -2973,15 +3019,12 @@
       {
         \tl_if_blank:nTF {#1}
           {
-            \@@_round_final_shift:ff
-              {
-                \exp_last_unbraced:Nf 1
-                  { \@@_round_truncate_direct:n {#2} } 0
-              }
+            \@@_round_final_shift:en
+              { 1 \@@_round_truncate_direct:n {#2} 0 }
               { }
           }
           {
-            \@@_round_final_shift:ff
+            \@@_round_final_shift:ee
               { 1 #2 }
               { \@@_round_truncate:n {#1} }
           }
@@ -2989,7 +3032,7 @@
     \int_compare:nNnTF {#3} = 9
       { \@@_round_auxix:nnN {#1} { 0 #2 } }
       {
-        \@@_round_final:fn
+        \@@_round_final:en
           { \int_eval:n { #3 + 1 } }
           { \@@_round_final_integer:nnw {#1} {#2} }
       }
@@ -3000,7 +3043,7 @@
 \cs_new:Npn \@@_round_final_decimal:nnw
   #1#2#3 \q_recursion_tail \q_recursion_stop
   {
-    \@@_round_final_output:ff
+    \@@_round_final_output:ee
       { \tl_reverse:n {#1} }
       { \tl_reverse:n {#3} #2 }
   }
@@ -3007,8 +3050,8 @@
 \cs_new:Npn \@@_round_final_integer:nnw
   #1#2#3 \q_recursion_tail \q_recursion_stop
   {
-    \@@_round_final_output:ff
-      { \exp_args:Ne \@@_round_final_significant:n { \tl_reverse:n {#3} #2 } }
+    \@@_round_final_output:en
+      { \@@_round_final_significant:e { \tl_reverse:n {#3} #2 } }
       {#1}
   }
 \cs_new:Npn \@@_round_final_significant:n #1
@@ -3016,6 +3059,7 @@
      \@@_round_final_significant:N #1
        \q_recursion_tail \q_recursion_stop
   }
+\cs_generate_variant:Nn \@@_round_final_significant:n { e }
 \cs_new:Npn \@@_round_final_significant:N #1
   {
     \quark_if_recursion_tail_stop_do:Nn #1 { 0 }
@@ -3030,10 +3074,10 @@
   #1 \q_recursion_tail \q_recursion_stop
   {#1}
 \cs_new:Npn \@@_round_final_output:nn #1#2 { {#1} {#2} }
-\cs_generate_variant:Nn \@@_round_final_output:nn { ff }
+\cs_generate_variant:Nn \@@_round_final_output:nn { ne , e , ee }
 \cs_new:Npn \@@_round_final:nn #1#2
   { #2 #1 }
-\cs_generate_variant:Nn \@@_round_final:nn { f }
+\cs_generate_variant:Nn \@@_round_final:nn { e }
 %    \end{macrocode}
 %   Here we deal with the case where rounding applies along with an
 %   exponent set based on number of places. We can only get here if an
@@ -3055,7 +3099,7 @@
       }
       { {#1} {#2} }
   }
-\cs_generate_variant:Nn \@@_round_final_shift:nn { ff }
+\cs_generate_variant:Nn \@@_round_final_shift:nn { en , ee }
 \cs_new:Npn \@@_round_engineering:nn #1#2
   {
     \int_compare:nNnTF { \tl_count:n {#1} } = 4
@@ -3072,7 +3116,7 @@
 \cs_new:Npn \@@_round_engineering:NNNNn #1#2#3#4#5
   {
     {#1}
-    \exp_args:NV \@@_round_engineering:nnN
+    \@@_round_engineering:VnN
       \l_@@_round_precision_int { }
       #2#3#4#5 \q_recursion_tail \q_recursion_stop
   }
@@ -3083,6 +3127,7 @@
       { \use_i_delimit_by_q_recursion_stop:nw { {#2} } }
       { \@@_round_engineering:nnN { #1 - 1 } { #2#3 } }
   }
+\cs_generate_variant:Nn \@@_round_engineering:nnN { V }
 \cs_new:Npn \@@_round_fixed:nn #1#2 { {#1} {#2} }
 \cs_new:Npn \@@_round_input:nn #1#2 { {#1} {#2} }
 \cs_new:Npn \@@_round_scientific:nn #1#2
@@ -3092,7 +3137,7 @@
       { \str_if_eq_p:Vn \l_@@_round_mode_tl { figures } }
       { { 1 } { } }
       {
-        \@@_exponent_shift:nnf
+        \@@_exponent_shift:nne
           { 1 } {#1} { \@@_round_truncate_direct:n {#2} }
       }
     \@@_round_final_shift:Nw 1
@@ -3195,7 +3240,8 @@
 %
 % \begin{macro}[EXP]{\@@_round_figures:nnnnnnn, \@@_round_figures_aux:nnnnnnn}
 % \begin{macro}[EXP]{\@@_round_figures_count:nnN}
-% \begin{macro}[EXP]{\@@_round_figures_count:nnnN}
+% \begin{macro}[EXP]
+%   {\@@_round_figures_count:nnnN, \@@_round_figures_count:ennN}
 %   Rounding to figures only makes sense if the number is not $0$, so we start
 %   by filtering out that case. We then check that
 %   there is no uncertainty, and that the number of figures requested is
@@ -3245,7 +3291,7 @@
       {
         \int_compare:nNnTF {#1} > \l_@@_round_precision_int
           {
-            \@@_round:fnn
+            \@@_round:enn
               { \int_eval:n { #1 - \l_@@_round_precision_int } }
               {#2} {#3}
           }
@@ -3254,9 +3300,10 @@
               { \l_@@_round_precision_int - (#1) } {#2} {#3}
           }
       }
-    \exp_args:Nf \@@_round_figures_count:nnnN
+    \@@_round_figures_count:ennN
       { \int_eval:n { #1 + 1 } } {#2} {#3}
   }
+\cs_generate_variant:Nn \@@_round_figures_count:nnnN { e }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -3264,7 +3311,7 @@
 %
 % \begin{macro}[EXP]{\@@_round_places:nnnnnnn}
 % \begin{macro}[EXP]{\@@_round_places_decimal:nn, \@@_round_places_integer:nn}
-% \begin{macro}[EXP]{\@@_round_places_finalise:n}
+% \begin{macro}[EXP]{\@@_round_places_finalise:n, \@@_round_places_finalise:e}
 % \begin{macro}[EXP]{\@@_round_places_finalise:nnnnnnn}
 % \begin{macro}[EXP]{\@@_round_places_finalise:nnnnn}
 %   The first step when rounding to a fixed number of places is to establish
@@ -3277,7 +3324,7 @@
   {
     \tl_if_blank:nTF {#5}
       {
-        \exp_args:Ne \@@_round_places_finalise:n
+        \@@_round_places_finalise:e
           {
             \exp_not:n { {#1} {#2} }
             \int_compare:nNnTF \l_@@_round_precision_int > 0
@@ -3299,7 +3346,7 @@
           {#1} {#2}
       }
       {
-        \@@_round:fnn
+        \@@_round:enn
            {
              \int_eval:n
                { 0 \tl_count:n {#2} - \l_@@_round_precision_int }
@@ -3309,7 +3356,7 @@
   }
 \cs_new:Npn \@@_round_places_integer:nn #1#2
   {
-    \@@_round:fnn
+    \@@_round:enn
        {
          \int_eval:n
            { 0 \tl_count:n {#2} - \l_@@_round_precision_int }
@@ -3347,6 +3394,7 @@
       }
       { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
   }
+\cs_generate_variant:Nn \@@_round_places_finalise:n { e }
 \cs_new:Npn \@@_round_places_finalise:nnnnn #1#2#3#4#5
   {
     {
@@ -3364,8 +3412,9 @@
 % \end{macro}
 %
 % \begin{macro}[EXP]{\@@_round_uncertainty:nnnnnnn}
-% \begin{macro}[EXP]{\@@_round_uncertainty:nnn}
-% \begin{macro}[EXP]{\@@_round_uncertainty:nnnn}
+% \begin{macro}[EXP]{\@@_round_uncertainty:nnn, \@@_round_uncertainty:nno}
+% \begin{macro}[EXP]
+%   {\@@_round_uncertainty:nnnn, \@@_round_uncertainty:ennn}
 % \begin{macro}[EXP]{\@@_round_uncertainty:nnnnnn}
 % \begin{macro}[EXP]
 %   {
@@ -3372,9 +3421,19 @@
 %     \@@_round_uncertainty_auxi:nnnnn  ,
 %     \@@_round_uncertainty_auxii:nnnnn
 %   }
-% \begin{macro}[EXP]{\@@_round_uncertainty_auxiii:nnnnnnn}
+% \begin{macro}[EXP]
+%   {
+%     \@@_round_uncertainty_auxiii:nnnnnnn ,
+%     \@@_round_uncertainty_auxiii:eennnnn
+%   }
 % \begin{macro}[EXP]{\@@_round_uncertainty_zeros:nnnn}
-% \begin{macro}[EXP]{\@@_round_uncertainty_auxiv:nnnnnnN}
+% \begin{macro}[EXP]
+%   {
+%     \@@_round_uncertainty_auxiv:nnnnnnN ,
+%     \@@_round_uncertainty_auxiv:nennnnN ,
+%     \@@_round_uncertainty_auxiv:ennnnnN ,
+%     \@@_round_uncertainty_auxiv:eennnnN
+%   }
 % \begin{macro}[EXP]{\@@_round_uncertainty_auxv:nnnN}
 % \begin{macro}[EXP]{\@@_round_uncertainty_auxvi:nn}
 % \begin{macro}[EXP]{\@@_round_uncertainty_auxvii:nnNnnn}
@@ -3406,7 +3465,7 @@
         \str_if_eq:eeTF { \tl_head:n {#5} } { S }
           {
             \exp_not:n { {#1} {#2} }
-            \exp_args:Nnno \@@_round_uncertainty:nnn
+            \@@_round_uncertainty:nno
               {#3} {#4} { \use_ii:nn #5 }
             {#6} {#7}
           }
@@ -3420,7 +3479,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_round_uncertainty:nnn #1#2#3
   {
-    \exp_args:Nf \@@_round_uncertainty:nnnn
+    \@@_round_uncertainty:ennn
       {
         \int_eval:n
           { \tl_count:n {#3} - \l_@@_round_precision_int }
@@ -3427,6 +3486,7 @@
       }
       {#1} {#2} {#3}
   }
+\cs_generate_variant:Nn \@@_round_uncertainty:nnn { nno }
 \cs_new:Npn \@@_round_uncertainty:nnnn #1#2#3#4
   {
     \use:e
@@ -3437,6 +3497,7 @@
             {#2} {#3} {#1} {#4}
       }
   }
+\cs_generate_variant:Nn \@@_round_uncertainty:nnnn { e }
 %    \end{macrocode}
 %   The number of digits to remove from the main part and the detail of
 %   zero filling depends on whether we rounded up the uncertainty. So there
@@ -3455,7 +3516,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_round_uncertainty_auxi:nnnnn #1#2#3#4#5
   {
-    \exp_args:Nf \@@_round_uncertainty_auxiv:nnnnnnN
+    \@@_round_uncertainty_auxiv:ennnnnN
       { \@@_round_uncertainty_zeros:nnnn {#1} {#3} {#4} {#5} }
       {#4}
       {#2} {#3} {#1} { }
@@ -3467,7 +3528,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_round_uncertainty_auxii:nnnnn #1#2#3#4#5
   {
-    \exp_args:Nff \@@_round_uncertainty_auxiii:nnnnnnn
+    \@@_round_uncertainty_auxiii:eennnnn
       { \tl_count:n {#5} }
       { \tl_count:n {#3} }
       {#1} {#2} {#3} {#4} {#5}
@@ -3479,20 +3540,14 @@
         \bool_lazy_and:nnTF
           { \int_compare_p:nNn \l_@@_round_precision_int = 2 }
           { \int_compare_p:nNn {#1} = {#2} }
-          {
-            \exp_args:Nnf \@@_round_uncertainty_auxiv:nnnnnnN
-              { 0 }
-          }
-          {
-            \exp_args:Nnf \@@_round_uncertainty_auxiv:nnnnnnN
-              { }
-          }
+          { \@@_round_uncertainty_auxiv:nennnnN { 0 } }
+          { \@@_round_uncertainty_auxiv:nennnnN { } }
             { \int_eval:n { #6 + 1 } }
             {#4} {#5} { 1 } { }
             \@@_round_uncertainty_auxvii:nnNnnn
       }
       {
-        \exp_args:Nff \@@_round_uncertainty_auxiv:nnnnnnN
+        \@@_round_uncertainty_auxiv:eennnnN
           { \@@_round_uncertainty_zeros:nnnn {#3} {#5} {#6} {#7} }
           { \int_eval:n { #6 + 1 } }
           {#4} {#5} { 1 } {#3}
@@ -3499,6 +3554,7 @@
           \@@_round_uncertainty_auxvii:nnNnnn
       }
   }
+\cs_generate_variant:Nn \@@_round_uncertainty_auxiii:nnnnnnn { ee }
 \cs_new:Npn \@@_round_uncertainty_zeros:nnnn #1#2#3#4
   {
     \prg_replicate:nn
@@ -3530,6 +3586,7 @@
         {#3} #7
     \@@_round_end:nnn { { S } { #5#6 #1 } }
   }
+\cs_generate_variant:Nn \@@_round_uncertainty_auxiv:nnnnnnN { ne , e , ee }
 \cs_new:Npn \@@_round_uncertainty_auxv:nnnN #1#2#3#4
   {
     \int_compare:nNnT { \tl_count:n {#1} } > { \tl_count:n {#3} }
@@ -3668,27 +3725,30 @@
 %
 % \subsection{Number modification}
 %
-% \begin{macro}[rEXP]{\siunitx_number_adjust_exponent:nn}
-% \begin{macro}[rEXP]{\siunitx_number_adjust_exponent:Nn}
-% \begin{macro}[rEXP]{\@@_adjust_exp:nnnnnnnn}
-% \begin{macro}[rEXP]{\@@_adjust_exp:nn}
-% \begin{macro}[rEXP]{\@@_adjust_exp:nNw}
+% \begin{macro}[EXP]
+%   {\siunitx_number_adjust_exponent:nn, \siunitx_number_adjust_exponent:Vn}
+% \begin{macro}[EXP]{\siunitx_number_adjust_exponent:Nn}
+% \begin{macro}[EXP]{\@@_adjust_exp:nnnnnnnn}
+% \begin{macro}[EXP]{\@@_adjust_exp:nn, \@@_adjust_exp:en}
+% \begin{macro}[EXP]{\@@_adjust_exp:nNw}
 %   A simply case of breaking down and rebuilding the number.
 %    \begin{macrocode}
 \cs_new:Npn \siunitx_number_adjust_exponent:nn #1#2
   { \@@_adjust_exp:nnnnnnnn #1 {#2} }
+\cs_generate_variant:Nn \siunitx_number_adjust_exponent:nn { V }
 \cs_new:Npn \siunitx_number_adjust_exponent:Nn #1#2
   {
     \tl_if_empty:NF #1
-      { \exp_args:NV \siunitx_number_adjust_exponent:nn #1 {#2} }
+      { \siunitx_number_adjust_exponent:Vn #1 {#2} }
   }
 \cs_new:Npn \@@_adjust_exp:nnnnnnnn #1#2#3#4#5#6#7#8
   {
     \exp_not:n { {#1} {#2} {#3} {#4} {#5} }
-    \exp_args:Ne \@@_adjust_exp:nn { \fp_eval:n { #6#7 + #8 } } {#6}
+    \@@_adjust_exp:en { \fp_eval:n { #6#7 + #8 } } {#6}
   }
 \cs_new:Npn \@@_adjust_exp:nn #1#2
   { \@@_adjust_exp:nNw {#2} #1 \q_stop }
+\cs_generate_variant:Nn \@@_adjust_exp:nn { e }
 \cs_new:Npn \@@_adjust_exp:nNw #1#2#3 \q_stop
   {
     \token_if_eq_meaning:NNTF #2 -
@@ -3851,50 +3911,50 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}[rEXP]{\siunitx_number_output:N}
-% \begin{macro}[rEXP]{\siunitx_number_output:n}
-% \begin{macro}[rEXP]{\siunitx_number_output:NN}
-% \begin{macro}[rEXP]{\siunitx_number_output:nN}
-% \begin{macro}[rEXP]{\@@_output:Nn}
-% \begin{macro}[rEXP]{\@@_output:nn}
-% \begin{macro}[rEXP]{\@@_output:nnnnnnn}
-% \begin{macro}[rEXP]{\@@_output_bracket:nn}
-% \begin{macro}[rEXP]{\@@_output_bracket:w}
-% \begin{macro}[rEXP]{\@@_output_comparator:nn}
-% \begin{macro}[rEXP]{\@@_output_sign:nnn}
-% \begin{macro}[rEXP]{\@@_output_sign:nN}
-% \begin{macro}[rEXP]
+% \begin{macro}[EXP]{\siunitx_number_output:N, \siunitx_number_output:c}
+% \begin{macro}[EXP]{\siunitx_number_output:n}
+% \begin{macro}[EXP]{\siunitx_number_output:NN, \siunitx_number_output:cN}
+% \begin{macro}[EXP]{\siunitx_number_output:nN}
+% \begin{macro}[EXP]{\@@_output:Nn}
+% \begin{macro}[EXP]{\@@_output:nn}
+% \begin{macro}[EXP]{\@@_output:nnnnnnn}
+% \begin{macro}[EXP]{\@@_output_bracket:nn}
+% \begin{macro}[EXP]{\@@_output_bracket:w}
+% \begin{macro}[EXP]{\@@_output_comparator:nn}
+% \begin{macro}[EXP]{\@@_output_sign:nnn}
+% \begin{macro}[EXP]{\@@_output_sign:nN}
+% \begin{macro}[EXP]
 %   {\@@_output_sign_color:w, \@@_output_sign_brackets:w}
-% \begin{macro}[rEXP]{\@@_output_integer:nnn}
-% \begin{macro}[rEXP]{\@@_output_decimal:nn, \@@_output_decimal:fn}
-% \begin{macro}[rEXP]{\@@_output_digits:nn}
-% \begin{macro}[rEXP]{\@@_output_digit_separator:N}
-% \begin{macro}[rEXP]{\@@_output_integer_3_3:n}
-% \begin{macro}[rEXP]
+% \begin{macro}[EXP]{\@@_output_integer:nnn}
+% \begin{macro}[EXP]{\@@_output_decimal:nn, \@@_output_decimal:en}
+% \begin{macro}[EXP]{\@@_output_digits:nn}
+% \begin{macro}[EXP]{\@@_output_digit_separator:N}
+% \begin{macro}[EXP]{\@@_output_integer_3_3:n}
+% \begin{macro}[EXP]
 %   {
 %     \@@_output_integer_aux_0:n,
 %     \@@_output_integer_aux_1:n,
 %     \@@_output_integer_aux_2:n
 %   }
-% \begin{macro}[rEXP]{\@@_output_integer_first:nnNN}
-% \begin{macro}[rEXP]{\@@_output_integer_loop:NNNN}
-% \begin{macro}[rEXP]{\@@_output_integer_first:n}
-% \begin{macro}[rEXP]{\@@_output_integer_aux:n}
-% \begin{macro}[rEXP]{\@@_output_integer_loop:NnnN}
-% \begin{macro}[rEXP]{\@@_output_decimal_3_3:n}
-% \begin{macro}[rEXP]{\@@_output_decimal_loop:NNNN}
-% \begin{macro}[rEXP]{\@@_output_decimal_3_2:n}
-% \begin{macro}[rEXP]{\@@_output_decimal:NNNw}
-% \begin{macro}[rEXP]{\@@_output_decimal_loop:NN}
-% \begin{macro}[rEXP]{\@@_output_decimal_first:n}
-% \begin{macro}[rEXP]{\@@_output_decimal_loop:NnnN}
-% \begin{macro}[rEXP]{\@@_output_uncertainty:nnn}
-% \begin{macro}[rEXP]{\@@_output_uncertainty_unaligned:n}
-% \begin{macro}[rEXP]{\@@_output_uncert:nnnn}
-% \begin{macro}[rEXP]{\@@_output_uncert:nnnnn}
-% \begin{macro}[rEXP]{\@@_output_uncert_loop:nnN}
-% \begin{macro}[rEXP]{\@@_output_uncert_loop:nnNw}
-% \begin{macro}[rEXP]
+% \begin{macro}[EXP]{\@@_output_integer_first:nnNN}
+% \begin{macro}[EXP]{\@@_output_integer_loop:NNNN}
+% \begin{macro}[EXP]{\@@_output_integer_first:n}
+% \begin{macro}[EXP]{\@@_output_integer_aux:n, \@@_output_integer_aux:e}
+% \begin{macro}[EXP]{\@@_output_integer_loop:NnnN}
+% \begin{macro}[EXP]{\@@_output_decimal_3_3:n}
+% \begin{macro}[EXP]{\@@_output_decimal_loop:NNNN}
+% \begin{macro}[EXP]{\@@_output_decimal_3_2:n}
+% \begin{macro}[EXP]{\@@_output_decimal:NNNw}
+% \begin{macro}[EXP]{\@@_output_decimal_loop:NN}
+% \begin{macro}[EXP]{\@@_output_decimal_first:n}
+% \begin{macro}[EXP]{\@@_output_decimal_loop:NnnN}
+% \begin{macro}[EXP]{\@@_output_uncertainty:nnn}
+% \begin{macro}[EXP]{\@@_output_uncertainty_unaligned:n}
+% \begin{macro}[EXP]{\@@_output_uncert:nnnn}
+% \begin{macro}[EXP]{\@@_output_uncert:nnnnn, \@@_output_uncert:Vnnnn}
+% \begin{macro}[EXP]{\@@_output_uncert_loop:nnN}
+% \begin{macro}[EXP]{\@@_output_uncert_loop:nnNw}
+% \begin{macro}[EXP]
 %   {
 %     \@@_output_uncert_desc_bracket:n           ,
 %     \@@_output_uncert_desc_bracket-separator:n ,
@@ -3901,37 +3961,38 @@
 %     \@@_output_uncert_desc_separator:n         ,
 %     \@@_output_uncert_desc_subscript:n
 %   }
-% \begin{macro}[rEXP]{\@@_output_uncert_A_loop:nnn, \@@_output_uncert_S_loop:nnn}
-% \begin{macro}[rEXP]{\@@_output_uncert_S_loop:w}
-% \begin{macro}[rEXP]{\@@_output_uncert_A:nnnn, \@@_output_uncert_A_multi:nnnn}
-% \begin{macro}[rEXP]{\@@_output_uncert_A:nnnnn}
-% \begin{macro}[rEXP]
+% \begin{macro}[EXP]{\@@_output_uncert_A_loop:nnn, \@@_output_uncert_S_loop:nnn}
+% \begin{macro}[EXP]{\@@_output_uncert_S_loop:w}
+% \begin{macro}[EXP]{\@@_output_uncert_A:nnnn, \@@_output_uncert_A_multi:nnnn}
+% \begin{macro}[EXP]{\@@_output_uncert_A:nnnnn}
+% \begin{macro}[EXP]
 %   {
 %     \@@_output_uncert_S:nnnn       ,
 %     \@@_output_uncert_S_sep:nnnn   ,
 %     \@@_output_uncert_S_multi:nnnn
 %   }
-% \begin{macro}[rEXP]
+% \begin{macro}[EXP]
 %   {
 %     \@@_output_uncert_S_compact:nn        ,
 %     \@@_output_uncert_S_compact-marker:nn ,
 %     \@@_output_uncert_S_full:nn
 %   }
-% \begin{macro}[rEXP]
+% \begin{macro}[EXP]
 %   {\@@_output_uncert_augment:nnnn}
-% \begin{macro}[rEXP]
-%   {\@@_output_uncert_augment:nnn}
-% \begin{macro}[rEXP]
-%   {\@@_output_uncert_augment:nnnw, \@@_output_uncert_augment:fnnw}
-% \begin{macro}[rEXP]{\@@_output_uncert_augment:nnw}
-% \begin{macro}[rEXP]
+% \begin{macro}[EXP]
+%   {\@@_output_uncert_augment:nnn, \@@_output_uncert_augment:enn}
+% \begin{macro}[EXP]
+%   {\@@_output_uncert_augment:nnnw, \@@_output_uncert_augment:ennw}
+% \begin{macro}[EXP]{\@@_output_uncert_augment:nnw}
+% \begin{macro}[EXP]
 %   {
 %     \@@_output_exponent:nnnnn       ,
 %     \@@_output_exponent_auxi:nnnnn  ,
-%     \@@_output_exponent_auxii:nnnnn
+%     \@@_output_exponent_auxii:nnnnn ,
+%     \@@_output_exponent_auxiii:nnnnn
 %   }
-% \begin{macro}[rEXP]{\@@_output_exponent_auxiii:nn}
-% \begin{macro}[rEXP]{\@@_output_end:}
+% \begin{macro}[EXP]{\@@_output_exponent_auxiv:nn}
+% \begin{macro}[EXP]{\@@_output_end:}
 %   The approach to formatting a single number is to split into
 %   the constituent parts. All of the parts are assembled including
 %   inserting tabular alignment markers (which may be empty) for each
@@ -3939,10 +4000,12 @@
 %    \begin{macrocode}
 \cs_new:Npn \siunitx_number_output:N #1
   { \@@_output:Nn #1 { } }
+\cs_generate_variant:Nn \siunitx_number_output:N { c }
 \cs_new:Npn \siunitx_number_output:n #1
   { \@@_output:nn #1 { } }
 \cs_new:Npn \siunitx_number_output:NN #1#2
   { \@@_output:Nn #1 {#2} }
+\cs_generate_variant:Nn \siunitx_number_output:NN { c }
 \cs_new:Npn \siunitx_number_output:nN #1#2
   { \@@_output:nn #1 {#2} }
 \cs_new:Npn \@@_output:Nn #1#2
@@ -3982,7 +4045,11 @@
         {
           \bool_lazy_or_p:nn
             { \l_@@_zero_exponent_bool }
-            { ! \str_if_eq_p:nn {#2} { 0 } }
+            {
+              ! \bool_lazy_or_p:nn
+                { \tl_if_blank_p:n {#2} }
+                { \str_if_eq_p:nn {#2} { 0 } }
+            }
         }
       }
     \@@_output_bracket:w
@@ -4118,7 +4185,7 @@
           { \@@_output_digits:nn { decimal } {#1} }
       }
   }
-\cs_generate_variant:Nn \@@_output_decimal:nn { f }
+\cs_generate_variant:Nn \@@_output_decimal:nn { e }
 \cs_new:Npn \@@_output_digits:nn #1#2
   {
     \bool_if:cTF { l_@@_group_ #1 _ bool }
@@ -4192,7 +4259,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_output_integer_first:n #1
   {
-    \exp_args:Ne \@@_output_integer_aux:n { \tl_reverse:n {#1} }
+    \@@_output_integer_aux:e { \tl_reverse:n {#1} }
   }
 \cs_new:Npn \@@_output_integer_aux:n #1
   {
@@ -4199,6 +4266,7 @@
     \@@_output_integer_loop:NnnN \l_@@_group_first_int { 0 } { }
       #1 \q_recursion_tail \q_recursion_stop
   }
+\cs_generate_variant:Nn \@@_output_integer_aux:n { e }
 \cs_new:Npn \@@_output_integer_loop:NnnN #1#2#3#4
   {
     \quark_if_recursion_tail_stop_do:Nn #4 {#3}
@@ -4325,7 +4393,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_output_uncert:nnnn #1#2#3#4
   {
-    \exp_args:NV \@@_output_uncert:nnnnn \l_@@_uncert_desc_clist
+    \@@_output_uncert:Vnnnn \l_@@_uncert_desc_clist
       {#1} {#2} {#3} {#4}
   }
 \cs_new:Npn \@@_output_uncert:nnnnn #1#2#3#4#5
@@ -4333,6 +4401,7 @@
     \@@_output_uncert_loop:nnN {#2} {#3}
       #4 \q_recursion_tail #1 , \q_recursion_stop {#5}
   }
+\cs_generate_variant:Nn \@@_output_uncert:nnnnn { V }
 \cs_new:Npn \@@_output_uncert_loop:nnN #1#2#3
   {
     \quark_if_recursion_tail_stop:N #3
@@ -4473,7 +4542,7 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_output_uncert_augment:nnnn #1#2#3#4
   {
-    \exp_args:Nf \@@_output_uncert_augment:nnn
+    \@@_output_uncert_augment:enn
       { \int_eval:n { \tl_count:n {#1} - \tl_count:n {#2} } }
       {#3} {#4}
   }
@@ -4481,7 +4550,7 @@
   {
     \int_compare:nNnTF {#1} > 0
       {
-        \@@_output_uncert_augment:fnnw
+        \@@_output_uncert_augment:ennw
           { \int_eval:n { #1 - 1 } }
           {#3}
           { }
@@ -4489,7 +4558,7 @@
       }
       {
         0
-        \@@_output_decimal:fn
+        \@@_output_decimal:en
           {
             \prg_replicate:nn { \int_abs:n {#1} } { 0 }
             #2
@@ -4497,6 +4566,7 @@
           {#3}
       }
   }
+\cs_generate_variant:Nn \@@_output_uncert_augment:nnn { e }
 \cs_new:Npn \@@_output_uncert_augment:nnnw #1#2#3#4
   {
     \quark_if_nil:NF #4
@@ -4504,7 +4574,7 @@
         \int_compare:nNnTF {#1} = 0
           { \@@_output_uncert_augment:nnw {#3#4} {#2} }
           {
-            \@@_output_uncert_augment:fnnw
+            \@@_output_uncert_augment:ennw
               { \int_eval:n { #1 - 1 } }
               {#2}
               {#3#4}
@@ -4511,7 +4581,7 @@
           }
       }
   }
-\cs_generate_variant:Nn \@@_output_uncert_augment:nnnw { f }
+\cs_generate_variant:Nn \@@_output_uncert_augment:nnnw { e }
 \cs_new:Npn \@@_output_uncert_augment:nnw #1#2#3 \q_nil
   {
     \@@_output_digits:nn { integer } {#1}
@@ -4529,18 +4599,28 @@
 \cs_new:Npn \@@_output_exponent:nnnnn #1#2#3#4#5
   {
     \exp_not:n {#5}
+    \str_if_empty:nTF {#2}
+      {
+        \bool_if:NTF \l_@@_zero_exponent_bool
+          { \@@_output_exponent_auxi:nnnnn {#1} { 0 } {#3} {#4} {#5} }
+          { \exp_not:n {#5} }
+      }
+      { \@@_output_exponent_auxi:nnnnn {#1} {#2} {#3} {#4} {#5} }
+  }
+\cs_new:Npn \@@_output_exponent_auxi:nnnnn #1#2#3#4#5
+  {
     \bool_lazy_or:nnTF
       { \l_@@_zero_exponent_bool }
       { ! \str_if_eq_p:nn {#2} { 0 } }
       {
         \tl_if_empty:NTF \l_@@_output_exp_marker_tl
-          { \@@_output_exponent_auxi:nnnnn }
           { \@@_output_exponent_auxii:nnnnn }
+          { \@@_output_exponent_auxiii:nnnnn }
             {#1} {#2} {#3} {#4} {#5}
       }
       { \exp_not:n {#5} }
   }
-\cs_new:Npn \@@_output_exponent_auxi:nnnnn #1#2#3#4#5
+\cs_new:Npn \@@_output_exponent_auxii:nnnnn #1#2#3#4#5
   {
     \bool_lazy_or:nnT
       {
@@ -4562,15 +4642,15 @@
     \exp_not:n {#5}
     \exp_not:V \l_@@_exponent_base_tl
     ^
-      { \@@_output_exponent_auxiii:nnn { } {#1} {#2} }
+      { \@@_output_exponent_auxiv:nnn { } {#1} {#2} }
   }
-\cs_new:Npn \@@_output_exponent_auxii:nnnnn #1#2#3#4#5
+\cs_new:Npn \@@_output_exponent_auxiii:nnnnn #1#2#3#4#5
   {
     \exp_not:n {#5}
     \exp_not:V \l_@@_output_exp_marker_tl
-    \@@_output_exponent_auxiii:nnn { \mathord } {#1} {#2}
+    \@@_output_exponent_auxiv:nnn { \mathord } {#1} {#2}
   }
-\cs_new:Npn \@@_output_exponent_auxiii:nnn #1#2#3
+\cs_new:Npn \@@_output_exponent_auxiv:nnn #1#2#3
   {
     \tl_if_blank:nTF {#2}
       {

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-print.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -106,7 +106,7 @@
 %   {
 %     \siunitx_print_number:n, \siunitx_print_number:V,
 %       \siunitx_print_number:x,
-%     \siunitx_print_unit:n, \siunitx_print_unit:V,
+%     \siunitx_print_unit:n, \siunitx_print_unit:V, \siunitx_print_unit:o,
 %       \siunitx_print_unit:x
 %   }
 %   \begin{syntax}
@@ -347,12 +347,10 @@
 \AtBeginDocument { \RequirePackage { color } }
 %    \end{macrocode}
 %
-% \begin{macro}{\tl_replace_all:NVn}
 %   Required variants.
 %    \begin{macrocode}
 \cs_generate_variant:Nn \tl_replace_all:Nnn { NV }
 %    \end{macrocode}
-% \end{macro}
 %
 % \begin{variable}{\l_@@_tmp_tl}
 %   Scratch space.
@@ -461,7 +459,7 @@
 %   {
 %     \siunitx_print_number:n, \siunitx_print_number:V,
 %       \siunitx_print_number:x,
-%     \siunitx_print_unit:n, \siunitx_print_unit:V,
+%     \siunitx_print_unit:n, \siunitx_print_unit:V, \siunitx_print_unit:o,
 %       \siunitx_print_unit:x
 %   }
 % \begin{macro}{\@@_aux:nn}
@@ -476,7 +474,7 @@
 \cs_generate_variant:Nn \siunitx_print_number:n { V , x }
 \cs_new_protected:Npn \siunitx_print_unit:n #1
   { \@@_aux:nn { unit } {#1} }
-\cs_generate_variant:Nn \siunitx_print_unit:n { V , x }
+\cs_generate_variant:Nn \siunitx_print_unit:n { V , o , x }
 \cs_new_protected:Npn \@@_aux:nn #1#2
   {
     \tl_if_empty:oF {#2}
@@ -483,7 +481,7 @@
       {
         \tl_if_empty:cTF { l_@@_ #1 _color_tl }
           { \use:n }
-          { \exp_args:Nv \textcolor { l_@@_ #1 _color_tl } }
+          { \ExpandArgs { v } \textcolor { l_@@_ #1 _color_tl } }
             {
               \use:c
                 {
@@ -576,11 +574,12 @@
 % \begin{macro}{\@@_math_replace:Nn}
 % \begin{macro}
 %   {
-%     \@@_math_auxiii:n,
-%     \@@_math_auxiv:n,
+%     \@@_math_auxiii:n ,
+%     \@@_math_auxiii:V ,
+%     \@@_math_auxiv:n  ,
 %     \@@_math_auxv:n
 %   }
-% \begin{macro}{\@@_math_auxvi:Nn}
+% \begin{macro}{\@@_math_auxvi:Nn, \@@_math_auxvi:NV}
 % \begin{macro}{\@@_math_auxvii:N}
 % \begin{macro}{\@@_math_auxviii:w}
 % \begin{macro}{\@@_math_auxix:Nn}
@@ -677,7 +676,7 @@
       \exp_after:wN \@@_math_replace:Nn
         \l_@@_math_html_tl
         \q_recursion_tail { } \q_recursion_stop
-      \exp_args:NV \@@_math_auxiii:n \l_@@_tmp_tl
+      \@@_math_auxiii:V \l_@@_tmp_tl
      \group_end:
   }
 %    \end{macrocode}
@@ -718,6 +717,7 @@
       { \@@_math_auxiv:n }
         {#1}
   }
+\cs_generate_variant:Nn \@@_math_auxiii:n { V }
 %    \end{macrocode}
 %   Now we deal with the font selection in math mode. There are two possible
 %   cases. First, we are retaining the current math font, and the active one is
@@ -747,6 +747,7 @@
   }
 \cs_new_protected:Npn \@@_math_auxvi:Nn #1#2
   { \@@_math_ensure:n { #1 {#2} } }
+\cs_generate_variant:Nn \@@_math_auxvi:Nn { NV }
 \cs_new_protected:Npn \@@_math_auxvii:N #1
   {
     \quark_if_recursion_tail_stop_do:Nn #1 { \@@_math_auxv:n }
@@ -775,8 +776,7 @@
       \tl_replace_all:Nnn \exp_not:N \l_@@_tmp_tl
         { ^ }
         { \exp_not:N \@@_math_super:n }
-      \exp_not:N \exp_args:NNV \@@_math_auxvi:Nn
-        #1 \exp_not:N \l_@@_tmp_tl
+      \@@_math_auxvi:NV #1 \exp_not:N \l_@@_tmp_tl
     \group_end:
   }
 \cs_new_protected:Npx \@@_math_sub:n #1
@@ -831,6 +831,7 @@
 %
 % \begin{macro}{\siunitx_print_text:n}
 % \begin{macro}{\@@_text_replace:n, \@@_text_replace_aux:n}
+% \begin{macro}{\@@_text_replace_font:N}
 % \begin{macro}[EXP]{\@@_text_replace_first:N}
 % \begin{macro}{\@@_text_replace:N}
 % \begin{macro}{\@@_text_replace:NNn}
@@ -865,7 +866,8 @@
           }
           { \selectfont }
         \tl_use:N \l_@@_text_font_tl
-        \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+        \exp_last_unbraced:Nno \tl_if_head_eq_meaning:nNTF
+          {#1} \l_siunitx_unit_fraction_tl
           { \@@_text_fraction:Nnn #1 }
           { \@@_text_replace:n {#1} }
       }
@@ -874,6 +876,11 @@
 %   To get math mode material to print in text mode, various search-and-replace
 %   steps are needed. We use \tn{protected at edef} to deal with commands, partly
 %   for speed and partly as it deals with anything nested inside \cs{mathord}.
+%   On the other hand, the unit font command has to be handled at exactly one
+%   level, so that it does not affect anything inside for example
+%   \cs{ensuremath}. That means preventing any change inside the
+%   \tn{protected at edef}, hence the \cs{cs_set_eq:NN} to \cs{scan_stop:}
+%   (for \LaTeXe{} robust commands).
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_text_replace:n #1
   {
@@ -884,8 +891,12 @@
           \tl_set:Nn \l_@@_tmp_tl {#1}
           \tl_if_empty:NF \l_@@_tmp_tl
             {
+              \@@_text_replace_font:N \l_@@_tmp_tl
               \tl_if_empty:NF \l_siunitx_unit_font_tl
-                { \exp_after:wN \cs_set_eq:NN \l_siunitx_unit_font_tl \use:n }
+                {
+                  \exp_after:wN
+                    \cs_set_eq:NN \l_siunitx_unit_font_tl \scan_stop:
+                }
               \cs_set:Npn \mathord ##1
                 { \@@_text_replace_first:N ##1 }
               \group_begin: 
@@ -911,6 +922,14 @@
     \group_end:
   }
 \cs_new_protected:Npn \@@_text_replace_aux:n #1 {#1}
+\cs_new_protected:Npn \@@_text_replace_font:N #1
+  {
+    \tl_if_empty:NF \l_siunitx_unit_font_tl
+      {
+        \tl_replace_all:NVn #1
+          \l_siunitx_unit_font_tl { \use:n }
+      }
+  }
 \cs_new:Npn \@@_text_replace_first:N #1
   {
     \str_case:nnF {#1}
@@ -939,6 +958,7 @@
       \exp_not:N \q_recursion_tail
         { ? }
       \exp_not:N \q_recursion_stop
+    \@@_text_replace_font:N #1
   }
 \cs_new_protected:Npn \@@_text_replace:NNn #1#2#3
   {
@@ -963,7 +983,8 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_print_replace_frac:n #1
   {
-    \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+    \exp_last_unbraced:Nno \tl_if_head_eq_meaning:nNTF
+      {#1} \l_siunitx_unit_fraction_tl
       { \@@_text_fraction:Nnn #1 }
       { \mbox { \@@_text_replace:n {#1} } }
   }
@@ -1085,6 +1106,7 @@
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
 % \subsection{Standard settings for module options}
 %

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-quantity.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-quantity.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-quantity.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -222,7 +222,7 @@
 % \begin{macro}{\@@_parsed_aux:w}
 % \begin{macro}{\@@_parsed_aux:nnnw}
 % \begin{macro}{\@@_parsed_aux:nnnnw}
-% \begin{macro}{\@@_parsed_aux:nnnn}
+% \begin{macro}{\@@_parsed_aux:nnnn, \@@_parsed_aux:onnn}
 % \begin{macro}{\@@_parsed_aux:nnn}
 %   For quantities, there is bit to do to combine things. The first question is
 %   whether we are parsing at all: if not, things are quite short. Notice that
@@ -268,7 +268,7 @@
 \cs_new_protected:cpn { @@_parsed_combine-exponent:n } #1
   {
     \siunitx_number_process:NN \l_@@_number_tl \l_@@_number_tl
-    \exp_args:NV \@@_extract_exp:nNN
+    \@@_extract_exp:VNN
       \l_@@_number_tl \l_@@_tmp_fp \l_@@_number_tl
     \siunitx_unit_format_combine_exponent:nnN {#1}
       \l_@@_tmp_fp \l_@@_unit_tl
@@ -303,7 +303,7 @@
   { \@@_parsed_aux:nnnnw {#1} {#2} {#3} {#4} ? }
 \cs_new_protected:Npn \@@_parsed_aux:nnnnw
   #1#2#3#4 #5 \q_nil #6 \q_stop
-  { \exp_args:No \@@_parsed_aux:nnnn { \use_none:n #5#6 } {#1} {#2} {#3#4} }
+  { \@@_parsed_aux:onnn { \use_none:n #5#6 } {#1} {#2} {#3#4} }
 \cs_new_protected:Npn \@@_parsed_aux:nnnn #1#2#3#4
   {
     \tl_if_blank:nTF {#4}
@@ -332,6 +332,7 @@
           }
       }
   }
+\cs_generate_variant:Nn \@@_parsed_aux:nnnn { o }
 %    \end{macrocode}
 %   For the case of a separated uncertainty with repeated units, we print the
 %   two parts independently. The third argument here is the exponent if there
@@ -353,7 +354,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\@@_extract_exp:nNN}
+% \begin{macro}{\@@_extract_exp:nNN, \@@_extract_exp:VNN}
 % \begin{macro}{\@@_extract_exp:nnnnnnnNN}
 %   To extract the exponent part for a combined prefix, we decompose the value
 %   and remove it.
@@ -360,6 +361,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_extract_exp:nNN #1#2#3
   { \@@_extract_exp:nnnnnnnNN #1 #2 #3 }
+\cs_generate_variant:Nn \@@_extract_exp:nNN { V }
 \cs_new_protected:Npn \@@_extract_exp:nnnnnnnNN #1#2#3#4#5#6#7#8#9
   {
     \fp_set:Nn #8 {#6#7}
@@ -397,9 +399,7 @@
               { \nobreak }
             \siunitx_print_unit:n {#2}
           }
-          {
-            \exp_args:No \siunitx_print_unit:n { \use_none:n #2 }
-          }
+          { \siunitx_print_unit:o { \use_none:n #2 } }
       }
   }
 \cs_generate_variant:Nn \siunitx_quantity_print:nn { nV , VV , xV }

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-symbol.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -286,7 +286,7 @@
   {
     \@ifpackageloaded { hyperref }
       {
-        \exp_args:Nx \pdfstringdefDisableCommands
+        \ExpandArgs { x } \pdfstringdefDisableCommands
           {
             \cs_set_eq:NN \siunitx_print_text:n \exp_not:N \use:n
             \siunitx_declare_unit:Nn \exp_not:N \ohm

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-table.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -235,6 +235,11 @@
 %<@@=siunitx_table>
 %    \end{macrocode}
 %
+% Required core variants.
+%    \begin{macrocode}
+\cs_generate_variant:Nn \keys_set:nn { nx }
+%    \end{macrocode}
+%
 % \begin{variable}{\l_@@_tmp_box, \l_@@_tmp_dim, \l_@@_tmp_tl}
 %   Scratch space.
 %    \begin{macrocode}
@@ -445,7 +450,7 @@
   {
     \exp_args:NNV \group_end:
     \@@_collect_end:n \l_@@_collect_tl
-    \exp_args:NV \@@_split:nNNN
+    \@@_split:VNNN
       \l_@@_collect_tl
       \l_@@_before_tl
       \l_@@_number_tl
@@ -487,7 +492,7 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\@@_split:nNNN}
+% \begin{macro}{\@@_split:nNNN, \@@_split:VNNN}
 % \begin{macro}{\@@_split_loop:NNN}
 % \begin{macro}{\@@_split_group:NNNn}
 % \begin{macro}{\@@_split_token:NNNN}
@@ -504,6 +509,7 @@
     \@@_split_tidy:N #2
     \@@_split_tidy:N #4
   }
+\cs_generate_variant:Nn \@@_split:nNNN { V }
 \cs_new_protected:Npn \@@_split_loop:NNN #1#2#3
   {
     \peek_remove_spaces:n
@@ -853,7 +859,7 @@
           \l_@@_before_model_tl
           \l_@@_model_tl
           \l_@@_after_model_tl
-        \exp_args:NV \@@_generate_model:n \l_@@_model_tl
+        \@@_generate_model:V \l_@@_model_tl
         \tl_set:Nn \l_@@_align_mode_tl { format }
       } ,
     table-model-setup .tl_set:N =
@@ -877,10 +883,10 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}{\@@_generate_model:n}
+% \begin{macro}{\@@_generate_model:n, \@@_generate_model:V}
 % \begin{macro}{\@@_generate_model:nnnnnnn}
 % \begin{macro}[EXP]{\@@_generate_model_S:nnw}
-% \begin{macro}[EXP]{\@@_generate_model_S:nnn}
+% \begin{macro}[EXP]{\@@_generate_model_S:nnn, \@@_generate_model_S:een}
 %   Creating a model for a table at this stage means parsing the format and
 %   converting that to an appropriate model. Things are quite straight-forward
 %   other than the uncertainty part. At this stage there is no point in
@@ -902,6 +908,7 @@
           \l_@@_format_tl
       }
   }
+\cs_generate_variant:Nn \@@_generate_model:n { V }
 \cs_new_protected:Npn \@@_generate_model:nnnnnnn #1#2#3#4#5#6#7
   {
     \tl_set:Nx \l_@@_model_tl
@@ -922,9 +929,9 @@
         }
         \exp_not:n { {#6} }
         {
-          \int_compare:nNnTF {#7} = 0
+          \int_compare:nNnTF { 0#7 } = 0
             { 0 }
-            { \prg_replicate:nn {#7} { 8 } }
+            { \prg_replicate:nn { 0#7 } { 8 } }
         }
       }
   }
@@ -932,7 +939,7 @@
   {
     { S }
     {
-      \exp_args:Nff \@@_generate_model_S:nnn
+      \@@_generate_model_S:een
         { \tl_count:n {#1} } { \tl_count:n {#3} }
         {#3}
     }
@@ -951,6 +958,7 @@
       }
       { 8 }
   }
+\cs_generate_variant:Nn \@@_generate_model_S:nnn { ee }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -1271,7 +1279,12 @@
   #1 \q_nil #2 \q_nil #3 \q_nil #4 \q_nil #5
      \q_nil #6 \q_nil #7 \q_nil #8 \q_stop
   {
-    \exp_not:n {#1#2#3#4#5#6}
+    \bool_lazy_and:nnTF
+      { \tl_if_blank_p:n {#1#2} }
+      { ! \tl_if_blank_p:n {#3} }
+      { { } }
+      { \exp_not:n {#1#2} }
+    \exp_not:n {#3#4#5#6}
     \tl_if_blank:nT {#1#2#3#4#5#6} { { } }
     \exp_not:n {#7#8}
   }
@@ -1298,7 +1311,7 @@
     \group_begin:
       \bool_if:NT \l_@@_auto_round_bool
         {
-          \exp_args:Nx \keys_set:nn { siunitx }
+          \keys_set:nx { siunitx }
             {
               round-mode      = places ,
               round-pad       = true   ,

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx-unit.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -93,7 +93,7 @@
 %
 % \section{Formatting units}
 %
-% \begin{function}{\siunitx_unit_format:nN}
+% \begin{function}{\siunitx_unit_format:nN, \siunitx_unit_format:VN}
 %   \begin{syntax}
 %     \cs{siunitx_unit_format:nN} \Arg{units} \meta{tl~var}
 %   \end{syntax}
@@ -1062,7 +1062,7 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}{\siunitx_unit_format:nN}
+% \begin{macro}{\siunitx_unit_format:nN, \siunitx_unit_format:VN}
 % \begin{macro}{\siunitx_unit_format_extract_prefixes:nNN}
 % \begin{macro}{\siunitx_unit_format_combine_exponent:nnN}
 % \begin{macro}{\siunitx_unit_format_multiply:nnN}
@@ -1098,6 +1098,7 @@
     \fp_set:Nn \l_@@_multiple_fp { \c_one_fp }
     \@@_format:nNN {#1} #2 \l_@@_tmp_fp
   }
+\cs_generate_variant:Nn \siunitx_unit_format:nN { V }
 \cs_new_protected:Npn \siunitx_unit_format_extract_prefixes:nNN #1#2#3
   {
     \bool_set_true:N \l_@@_prefix_exp_bool
@@ -1249,6 +1250,7 @@
           { \token_to_str:N ^ } { ^ }
         \tl_replace_all:Nnn \exp_not:N \l_@@_tmp_tl
           { \token_to_str:N _ } { \c_@@_math_subscript_tl }
+        \cs_set_eq:NN \exp_not:N \text \scan_stop:
         \char_set_active_eq:NN ^
           \exp_not:N \@@_format_literal_superscript:
         \char_set_active_eq:NN _

Modified: trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/source/latex/siunitx/siunitx.dtx	2023-08-31 21:41:49 UTC (rev 68127)
@@ -121,7 +121,7 @@
 %
 % Identify the package and give the over all version information.
 %    \begin{macrocode}
-\ProvidesExplPackage {siunitx} {2023-08-24} {3.3.4}
+\ProvidesExplPackage {siunitx} {2023-08-30} {3.3.5}
   {A comprehensive (SI) units package}
 %    \end{macrocode}
 %
@@ -572,7 +572,7 @@
     \cs_set_protected:Npn \@@_tmp:w \NC at do ##1##2 \NC at do #1
       { \NC at list { \NC at do ##1 \NC at do #1 ##2 } }
     \exp_after:wN \@@_tmp:w \the \NC at list
-    \exp_args:NNc \renewcommand * { NC at rewrite@ #1 } [ 1 ] [ ]
+    \ExpandArgs { Nc } \renewcommand * { NC at rewrite@ #1 } [ 1 ] [ ]
       {
         \@temptokena \expandafter
           {
@@ -629,7 +629,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_bookmark_cmd:Nnn #1#2#3
   {
-    \exp_args:Nc \DeclareExpandableDocumentCommand
+    \ExpandArgs { c } \DeclareExpandableDocumentCommand
       { \cs_to_str:N #1 \c_space_tl ( pdfstring ~ context ) }
       {#2} {#3}
   }
@@ -788,12 +788,13 @@
       {
         0
         \exp_not:N \@@_list_count:w \c_space_tl
-        #1 \exp_not:n { ; \q_recursion_tail ; \q_recursion_stop }
+        #1
+        \exp_not:n { ; \s_stop \use_none_delimit_by_q_stop:w ; \q_stop }
       }
   }
 \cs_new:Npx \@@_list_count:w #1 ;
   {
-    \exp_not:n { \exp_args:Nf \quark_if_recursion_tail_stop:n } {#1}
+    \exp_not:N \use_none_delimit_by_s_stop:w #1 \exp_not:N \s_stop
     \exp_not:N \tl_if_blank:nF {#1} { + 1 }
     \exp_not:N \@@_list_count:w \c_space_tl
   }

Modified: trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2023-08-31 21:41:39 UTC (rev 68126)
+++ trunk/Master/texmf-dist/tex/latex/siunitx/siunitx.sty	2023-08-31 21:41:49 UTC (rev 68127)
@@ -41,7 +41,7 @@
       }%
     \endinput
   }%
-\ProvidesExplPackage {siunitx} {2023-08-24} {3.3.4}
+\ProvidesExplPackage {siunitx} {2023-08-30} {3.3.5}
   {A comprehensive (SI) units package}
 \msg_new:nnnn { siunitx } { incompatible-package }
   { Package~'#1'~incompatible. }
@@ -63,7 +63,7 @@
 \providecommand \IfFormatAtLeastTF { \@ifl at t@r \fmtversion }
 \tl_new:N \l__siunitx_tmp_tl
 \cs_generate_variant:Nn \keys_set:nn { nx }
-\cs_generate_variant:Nn \tl_if_blank:nTF { f }
+\cs_generate_variant:Nn \tl_if_blank:nTF { e }
 \cs_generate_variant:Nn \tl_if_in:NnTF { NV }
 \cs_generate_variant:Nn \tl_if_in:nnTF { nV }
 \cs_generate_variant:Nn \tl_remove_all:Nn { NV }
@@ -218,7 +218,7 @@
     \tl_put_right:NV \l__siunitx_number_uncert_tl \l__siunitx_number_flex_tl
     \tl_if_empty:NF \l__siunitx_number_uncert_tl
       {
-        \tl_if_blank:fTF { \exp_after:wN \use_iv:nnnn \l__siunitx_number_parsed_tl }
+        \tl_if_blank:eTF { \exp_after:wN \use_iv:nnnn \l__siunitx_number_parsed_tl }
           { \__siunitx_number_parse_combine_uncert: }
           { \tl_clear:N \l__siunitx_number_parsed_tl }
       }
@@ -255,16 +255,18 @@
   {
     \quark_if_recursion_tail_stop_do:nn {#4}
       { \__siunitx_number_parse_combine_uncert_end:nnn {#1} {#2} {#3} }
-    \exp_args:Nf \__siunitx_number_parse_combine_uncert:nnnnnn
+    \__siunitx_number_parse_combine_uncert:ennnnn
       { \int_eval:n { \tl_count:n {#1} - \tl_count:n {#6} } }
       {#1} {#2} {#3} {#5} {#6}
   }
+\cs_generate_variant:Nn \__siunitx_number_parse_combine_uncert_loop:nnnnnnn { nee }
 \cs_new:Npn \__siunitx_number_parse_combine_uncert:nnnnnn #1
   {
-    \exp_args:Nf \__siunitx_number_parse_combine_uncert:nnnnnnn
+    \__siunitx_number_parse_combine_uncert:ennnnnn
       { \prg_replicate:nn { \int_abs:n {#1} } { 0 } }
       {#1}
   }
+\cs_generate_variant:Nn \__siunitx_number_parse_combine_uncert:nnnnnn { e }
 \cs_new:Npn \__siunitx_number_parse_combine_uncert:nnnnnnn #1#2#3#4#5#6#7
   {
     \int_compare:nNnTF {#2} > 0
@@ -277,9 +279,10 @@
           { #3 #1 } {#4} {#5} {#6} {#7}
       }
   }
+\cs_generate_variant:Nn \__siunitx_number_parse_combine_uncert:nnnnnnn { e }
 \cs_new:Npn \__siunitx_number_parse_combine_uncert:nnnnn #1#2#3#4#5
   {
-    \exp_args:Nee \__siunitx_number_parse_combine_uncert_aux:nnnn
+    \__siunitx_number_parse_combine_uncert_aux:eenn
       {
         \bool_lazy_and:nnTF
           { \tl_if_blank_p:n {#1} }
@@ -296,8 +299,8 @@
   }
 \cs_new:Npn \__siunitx_number_parse_combine_uncert_aux:nnnn #1#2#3#4
   {
-    \exp_args:Neee \__siunitx_number_parse_combine_uncert_loop:nnnnnnn
-      { \exp_not:n {#1} }
+    \__siunitx_number_parse_combine_uncert_loop:neennnn
+      {#1}
       {
         \exp_not:n {#3}
         \tl_if_blank:nF {#2} { S }
@@ -307,6 +310,7 @@
         \tl_if_blank:nF {#2} { { \exp_not:n {#2} } }
       }
   }
+\cs_generate_variant:Nn \__siunitx_number_parse_combine_uncert_aux:nnnn { ee }
 \cs_new:Npn \__siunitx_number_parse_combine_uncert:N #1
   {
     \quark_if_recursion_tail_stop_do:Nn #1
@@ -350,7 +354,7 @@
   {
     \tl_if_empty:NTF \l_siunitx_number_input_exponent_tl
       {
-        \tl_set:Nn \l__siunitx_number_exponent_tl { { } 0 }
+        \tl_set:Nn \l__siunitx_number_exponent_tl { { } { } }
         \tl_if_empty:NF \l__siunitx_number_parsed_tl
           { \__siunitx_number_parse_loop: }
       }
@@ -384,7 +388,7 @@
 \cs_new_protected:Npn \__siunitx_number_parse_exponent_auxii:nn #1#2
   {
     \quark_if_nil:nTF {#2}
-      { \tl_set:Nn \l__siunitx_number_exponent_tl { { } 0 } }
+      { \tl_set:Nn \l__siunitx_number_exponent_tl { { } { } } }
       {
         \tl_set:Nn \l__siunitx_number_arg_tl {#1}
         \tl_if_blank:nTF {#2}
@@ -590,7 +594,7 @@
   }
 \cs_new_protected:Npn \__siunitx_number_parse_loop_after_decimal:NN #1#2
   {
-    \tl_if_blank:fTF { \exp_after:wN \use_none:n #1 }
+    \tl_if_blank:eTF { \exp_after:wN \use_none:n #1 }
       {
         \quark_if_recursion_tail_stop_do:Nn #2
           { \__siunitx_number_parse_loop_break:w \q_recursion_stop }
@@ -768,7 +772,7 @@
   }
 \cs_new_protected:Npn \__siunitx_number_parse_uncert_marker:nnnnnN #1#2#3#4#5#6
   {
-    \exp_args:Ne \__siunitx_number_parse_uncert_marker:nnnnnnN
+    \__siunitx_number_parse_uncert_marker:xnnnnnN
       { \int_eval:n { \tl_count:n {#4} } }
       {#1} {#2} {#3} {#4} {#5} #6
   }
@@ -804,6 +808,7 @@
       }
         #5#6#7
   }
+\cs_generate_variant:Nn \__siunitx_number_parse_uncert_marker:nnnnnnN { x }
 \cs_new_protected:Npn \__siunitx_number_parse_uncert_after:N #1
   {
     \tl_set:Nx \l__siunitx_number_uncert_tl
@@ -948,6 +953,7 @@
         \__siunitx_number_digits:NN #2 #2
       }
   }
+\cs_generate_variant:Nn \siunitx_number_process:NN { cc }
 \cs_new_protected:Npn \__siunitx_number_process:nnnnnnnNN #1#2#3#4#5#6#7#8#9
   {
     \bool_lazy_and:nnTF
@@ -965,12 +971,7 @@
 \cs_new_protected:Npn \__siunitx_number_exponent:NN #1#2
   {
     \tl_set:Nx #2
-      {
-        \cs:w
-          __siunitx_number_exponent_ \l__siunitx_number_exponent_mode_tl :nnnnnnn
-          \exp_after:wN
-        \cs_end: #1
-      }
+      { \exp_after:wN \__siunitx_number_exponent:nnnnnnn #1 }
     \str_if_eq:VnT \l__siunitx_number_exponent_mode_tl { engineering }
       {
         \tl_set:Nx #2
@@ -977,9 +978,24 @@
           { \exp_after:wN \__siunitx_number_exponent_engineering_aux:nnnnnnn #2 }
       }
   }
+\cs_new:Npn \__siunitx_number_exponent:nnnnnnn #1#2#3#4#5#6#7
+  {
+    \str_if_eq:VnTF \l__siunitx_number_exponent_mode_tl { input }
+      { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
+      {
+        \tl_if_blank:nTF {#7}
+          { \__siunitx_number_exponent_aux:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} { 0 } }
+          { \__siunitx_number_exponent_aux:nnnnnnn {#1} {#2} {#3} {#4} {#5} {#6} {#7} }
+      }
+  }
+\cs_new:Npn \__siunitx_number_exponent_aux:nnnnnnn #1#2#3#4#5#6#7
+  {
+    \use:c {  __siunitx_number_exponent_ \l__siunitx_number_exponent_mode_tl :nnnnnnn }
+      {#1} {#2} {#3} {#4} {#5} {#6} {#7}
+  }
 \cs_new:Npn \__siunitx_number_exponent_fixed:nnnnnnn #1#2#3#4#5#6#7
   {
-    \exp_args:Nf \__siunitx_number_exponent_fixed:nnnnnnnn
+    \__siunitx_number_exponent_fixed:ennnnnnn
       { \int_eval:n { \l__siunitx_number_exponent_fixed_int - (#6#7) } }
       {#1} {#2} {#3} {#4} {#5} {#6} {#7}
   }
@@ -991,11 +1007,10 @@
     { \int_compare:nNnT \l__siunitx_number_exponent_fixed_int < 0 { - }  }
     { \int_abs:n \l__siunitx_number_exponent_fixed_int }
   }
-\cs_new:Npn \__siunitx_number_exponent_input:nnnnnnn #1#2#3#4#5#6#7
-  { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
+\cs_generate_variant:Nn \__siunitx_number_exponent_fixed:nnnnnnnn { e }
 \cs_new:Npn \__siunitx_number_exponent_scientific:nnnnnnn #1#2#3#4#5#6#7
   {
-    \exp_args:Nf \__siunitx_number_exponent_scientific:nnnnnnnn
+    \__siunitx_number_exponent_scientific:ennnnnnn
       { \int_eval:n { \tl_count:n {#3} } }
       {#1} {#2} {#3} {#4} {#5} {#6} {#7}
   }
@@ -1017,6 +1032,7 @@
         \__siunitx_number_exponent_finalise:n { #1 + #7#8 - 1 }
       }
   }
+\cs_generate_variant:Nn \__siunitx_number_exponent_scientific:nnnnnnnn { e }
 \cs_new_eq:NN \__siunitx_number_exponent_engineering:nnnnnnn
   \__siunitx_number_exponent_scientific:nnnnnnn
 \cs_new:Npn \__siunitx_number_exponent_scientific:nnnw #1#2#3#4#5 \q_stop
@@ -1041,7 +1057,7 @@
           { {#2} {#3} }
       }
   }
-\cs_generate_variant:Nn \__siunitx_number_exponent_shift:nnn { nnf }
+\cs_generate_variant:Nn \__siunitx_number_exponent_shift:nnn { nne }
 \cs_new:Npn \__siunitx_number_exponent_shift_down:nnnw #1#2#3#4#5 \q_stop
   {
     \tl_if_blank:nTF {#5}
@@ -1064,7 +1080,7 @@
   {
     \tl_if_blank:nTF {#3}
       {
-        \__siunitx_number_exponent_shift_up_aux:ffn
+        \__siunitx_number_exponent_shift_up_aux:een
           { \int_eval:n { #1 + 1 } }
           { \str_if_eq:nnF {#2} { 0 } {#2} 0 }
           { }
@@ -1074,7 +1090,7 @@
   }
 \cs_new:Npn \__siunitx_number_exponent_shift_up:nnw #1#2#3#4 \q_stop
   {
-    \__siunitx_number_exponent_shift_up_aux:ffn
+    \__siunitx_number_exponent_shift_up_aux:een
       { \int_eval:n { #1 + 1 } }
       { \str_if_eq:nnF {#2} { 0 } {#2} #3 }
       {#4}
@@ -1096,7 +1112,7 @@
          { \__siunitx_number_exponent_shift_up:nnn {#1} {#2} {#3} }
       }
   }
-\cs_generate_variant:Nn \__siunitx_number_exponent_shift_up_aux:nnn { f , ff }
+\cs_generate_variant:Nn \__siunitx_number_exponent_shift_up_aux:nnn { ee }
 \cs_new:Npn \__siunitx_number_exponent_shift_uncert:nw
   #1#2 \__siunitx_number_exponent_uncert:n #3
   {
@@ -1112,7 +1128,7 @@
             \__siunitx_number_exponent_uncert:n { { S } { 0 } }
           }
           {
-            \use:c { __siunitx_number_exponent_shift_uncert_ \use_i:nn #3 :fnnn }
+            \__siunitx_number_exponent_shift_uncert_S:ennn
               { \prg_replicate:nn {#1} { 0 } }
               {#2}
               #3
@@ -1124,7 +1140,7 @@
     #2
     \__siunitx_number_exponent_uncert:n { { S } { #4#1 } }
   }
-\cs_generate_variant:Nn \__siunitx_number_exponent_shift_uncert_S:nnnn { f }
+\cs_generate_variant:Nn \__siunitx_number_exponent_shift_uncert_S:nnnn { e }
 \cs_new:Npn \__siunitx_number_exponent_uncert:n #1 { { \exp_not:n {#1} } }
 \cs_new:Npn \__siunitx_number_exponent_finalise:n #1
   {
@@ -1167,7 +1183,7 @@
       }
       {
         { \exp_not:n {#1} \exp_not:o { \tl_head:w #2 \q_stop } }
-        { \exp_not:f { \tl_tail:n {#2} } }
+        { \tl_tail:n {#2} }
         { \exp_not:n {#3} }
       }
     \__siunitx_number_exponent_finalise:n { #4 - 1 }
@@ -1191,7 +1207,7 @@
       }
       {
         { \exp_not:n {#1#3} \exp_not:o { \tl_head:w #4 \q_stop } }
-        { \exp_not:f { \tl_tail:n {#4} } }
+        { \tl_tail:n {#4} }
         { \exp_not:n {#2} }
       }
   }
@@ -1213,7 +1229,7 @@
   }
 \cs_new:Npn \__siunitx_number_exponent_threshold:nnnnnnn #1#2#3#4#5#6#7
   {
-    \exp_args:Ne \__siunitx_number_exponent_threshold:nn
+    \__siunitx_number_exponent_threshold:en
       {
         \__siunitx_number_exponent_scientific:nnnnnnn
           {#1} {#2} {#3} {#4} {#5} {#6} {#7}
@@ -1220,9 +1236,10 @@
       }
       { {#1} {#2} {#3} {#4} {#5} {#6} {#7} }
   }
-\cs_new:Npn  \__siunitx_number_exponent_threshold:nn #1#2
+\cs_new:Npn \__siunitx_number_exponent_threshold:nn #1#2
   { \__siunitx_number_exponent_threshold:nnnnnnnn #1 {#2} }
-\cs_new:Npn  \__siunitx_number_exponent_threshold:nnnnnnnn #1#2#3#4#5#6#7#8
+\cs_generate_variant:Nn \__siunitx_number_exponent_threshold:nn { e }
+\cs_new:Npn \__siunitx_number_exponent_threshold:nnnnnnnn #1#2#3#4#5#6#7#8
   {
     \bool_lazy_and:nnTF
       { \int_compare_p:nNn {#6#7} > \l__siunitx_number_lower_threshold_int }
@@ -1230,7 +1247,6 @@
       { \exp_not:n {#8} }
       { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
   }
-
 \cs_new_protected:Npn \__siunitx_number_digits:NN #1#2
   {
     \tl_set:Nx #2
@@ -1344,7 +1360,7 @@
     \__siunitx_number_round:Vnnn \l__siunitx_number_round_dir_tl
       {#1} {#2} {#3}
   }
-\cs_generate_variant:Nn \__siunitx_number_round:nnn { f }
+\cs_generate_variant:Nn \__siunitx_number_round:nnn { e }
 \cs_new:Npn \__siunitx_number_round:nnnn #1#2#3#4
   {
     \__siunitx_number_round_auxi:nnnnN {#1} {#2} {#3} { }
@@ -1385,11 +1401,12 @@
       }
     \int_compare:nNnTF {#1} > 0
       {
-        \exp_args:Nf \__siunitx_number_round_auxiii:nnnnN
+        \__siunitx_number_round_auxiii:ennnN
           { \int_eval:n { #1 - 1 } } {#2} {#3} { #5#4 }
       }
       { \__siunitx_number_round_auxv:nnnN {#2} {#4} {#3} #5 }
   }
+\cs_generate_variant:Nn \__siunitx_number_round_auxiii:nnnnN { e }
 \cs_new:Npn \__siunitx_number_round_auxiv:nnnnN #1#2#3#4#5
   {
     \quark_if_recursion_tail_stop_do:Nn #5
@@ -1403,11 +1420,12 @@
       }
     \int_compare:nNnTF {#1} > 0
       {
-        \exp_args:Nf \__siunitx_number_round_auxiv:nnnnN
+        \__siunitx_number_round_auxiv:ennnN
           { \int_eval:n { #1 - 1 } } {#2} { #3 0 } { #5#4 }
       }
       { \__siunitx_number_round_auxvi:nnnN {#2} {#4} {#3} #5 }
   }
+\cs_generate_variant:Nn \__siunitx_number_round_auxiv:nnnnN { e }
 \cs_new:Npn \__siunitx_number_round_auxv:nnnN #1#2#3#4
   {
     \quark_if_recursion_tail_stop_do:Nn #4
@@ -1455,7 +1473,7 @@
       {
         \str_if_eq:nnTF {#1} { 0 }
           {
-            \__siunitx_number_round_final_output:ff
+            \__siunitx_number_round_final_output:ne
               { 1 }
               { \__siunitx_number_round_truncate:n {#2} }
           }
@@ -1482,7 +1500,7 @@
               }
           }
           {
-            \__siunitx_number_round_final:fn
+            \__siunitx_number_round_final:en
               { \int_eval:n { #3 + 1 } }
               { \__siunitx_number_round_final_decimal:nnw {#1} {#2} }
           }
@@ -1494,15 +1512,12 @@
       {
         \tl_if_blank:nTF {#1}
           {
-            \__siunitx_number_round_final_shift:ff
-              {
-                \exp_last_unbraced:Nf 1
-                  { \__siunitx_number_round_truncate_direct:n {#2} } 0
-              }
+            \__siunitx_number_round_final_shift:en
+              { 1 \__siunitx_number_round_truncate_direct:n {#2} 0 }
               { }
           }
           {
-            \__siunitx_number_round_final_shift:ff
+            \__siunitx_number_round_final_shift:ee
               { 1 #2 }
               { \__siunitx_number_round_truncate:n {#1} }
           }
@@ -1510,7 +1525,7 @@
     \int_compare:nNnTF {#3} = 9
       { \__siunitx_number_round_auxix:nnN {#1} { 0 #2 } }
       {
-        \__siunitx_number_round_final:fn
+        \__siunitx_number_round_final:en
           { \int_eval:n { #3 + 1 } }
           { \__siunitx_number_round_final_integer:nnw {#1} {#2} }
       }
@@ -1518,7 +1533,7 @@
 \cs_new:Npn \__siunitx_number_round_final_decimal:nnw
   #1#2#3 \q_recursion_tail \q_recursion_stop
   {
-    \__siunitx_number_round_final_output:ff
+    \__siunitx_number_round_final_output:ee
       { \tl_reverse:n {#1} }
       { \tl_reverse:n {#3} #2 }
   }
@@ -1525,8 +1540,8 @@
 \cs_new:Npn \__siunitx_number_round_final_integer:nnw
   #1#2#3 \q_recursion_tail \q_recursion_stop
   {
-    \__siunitx_number_round_final_output:ff
-      { \exp_args:Ne \__siunitx_number_round_final_significant:n { \tl_reverse:n {#3} #2 } }
+    \__siunitx_number_round_final_output:en
+      { \__siunitx_number_round_final_significant:e { \tl_reverse:n {#3} #2 } }
       {#1}
   }
 \cs_new:Npn \__siunitx_number_round_final_significant:n #1
@@ -1534,6 +1549,7 @@
      \__siunitx_number_round_final_significant:N #1
        \q_recursion_tail \q_recursion_stop
   }
+\cs_generate_variant:Nn \__siunitx_number_round_final_significant:n { e }
 \cs_new:Npn \__siunitx_number_round_final_significant:N #1
   {
     \quark_if_recursion_tail_stop_do:Nn #1 { 0 }
@@ -1548,10 +1564,10 @@
   #1 \q_recursion_tail \q_recursion_stop
   {#1}
 \cs_new:Npn \__siunitx_number_round_final_output:nn #1#2 { {#1} {#2} }
-\cs_generate_variant:Nn \__siunitx_number_round_final_output:nn { ff }
+\cs_generate_variant:Nn \__siunitx_number_round_final_output:nn { ne , e , ee }
 \cs_new:Npn \__siunitx_number_round_final:nn #1#2
   { #2 #1 }
-\cs_generate_variant:Nn \__siunitx_number_round_final:nn { f }
+\cs_generate_variant:Nn \__siunitx_number_round_final:nn { e }
 \cs_new:Npn \__siunitx_number_round_final_shift:nn #1#2
   {
     \bool_lazy_or:nnTF
@@ -1564,7 +1580,7 @@
       }
       { {#1} {#2} }
   }
-\cs_generate_variant:Nn \__siunitx_number_round_final_shift:nn { ff }
+\cs_generate_variant:Nn \__siunitx_number_round_final_shift:nn { en , ee }
 \cs_new:Npn \__siunitx_number_round_engineering:nn #1#2
   {
     \int_compare:nNnTF { \tl_count:n {#1} } = 4
@@ -1581,7 +1597,7 @@
 \cs_new:Npn \__siunitx_number_round_engineering:NNNNn #1#2#3#4#5
   {
     {#1}
-    \exp_args:NV \__siunitx_number_round_engineering:nnN
+    \__siunitx_number_round_engineering:VnN
       \l__siunitx_number_round_precision_int { }
       #2#3#4#5 \q_recursion_tail \q_recursion_stop
   }
@@ -1592,6 +1608,7 @@
       { \use_i_delimit_by_q_recursion_stop:nw { {#2} } }
       { \__siunitx_number_round_engineering:nnN { #1 - 1 } { #2#3 } }
   }
+\cs_generate_variant:Nn \__siunitx_number_round_engineering:nnN { V }
 \cs_new:Npn \__siunitx_number_round_fixed:nn #1#2 { {#1} {#2} }
 \cs_new:Npn \__siunitx_number_round_input:nn #1#2 { {#1} {#2} }
 \cs_new:Npn \__siunitx_number_round_scientific:nn #1#2
@@ -1601,7 +1618,7 @@
       { \str_if_eq_p:Vn \l__siunitx_number_round_mode_tl { figures } }
       { { 1 } { } }
       {
-        \__siunitx_number_exponent_shift:nnf
+        \__siunitx_number_exponent_shift:nne
           { 1 } {#1} { \__siunitx_number_round_truncate_direct:n {#2} }
       }
     \__siunitx_number_round_final_shift:Nw 1
@@ -1694,7 +1711,7 @@
       {
         \int_compare:nNnTF {#1} > \l__siunitx_number_round_precision_int
           {
-            \__siunitx_number_round:fnn
+            \__siunitx_number_round:enn
               { \int_eval:n { #1 - \l__siunitx_number_round_precision_int } }
               {#2} {#3}
           }
@@ -1703,14 +1720,15 @@
               { \l__siunitx_number_round_precision_int - (#1) } {#2} {#3}
           }
       }
-    \exp_args:Nf \__siunitx_number_round_figures_count:nnnN
+    \__siunitx_number_round_figures_count:ennN
       { \int_eval:n { #1 + 1 } } {#2} {#3}
   }
+\cs_generate_variant:Nn \__siunitx_number_round_figures_count:nnnN { e }
 \cs_new:Npn \__siunitx_number_round_places:nnnnnnn #1#2#3#4#5#6#7
   {
     \tl_if_blank:nTF {#5}
       {
-        \exp_args:Ne \__siunitx_number_round_places_finalise:n
+        \__siunitx_number_round_places_finalise:e
           {
             \exp_not:n { {#1} {#2} }
             \int_compare:nNnTF \l__siunitx_number_round_precision_int > 0
@@ -1732,7 +1750,7 @@
           {#1} {#2}
       }
       {
-        \__siunitx_number_round:fnn
+        \__siunitx_number_round:enn
            {
              \int_eval:n
                { 0 \tl_count:n {#2} - \l__siunitx_number_round_precision_int }
@@ -1742,7 +1760,7 @@
   }
 \cs_new:Npn \__siunitx_number_round_places_integer:nn #1#2
   {
-    \__siunitx_number_round:fnn
+    \__siunitx_number_round:enn
        {
          \int_eval:n
            { 0 \tl_count:n {#2} - \l__siunitx_number_round_precision_int }
@@ -1775,6 +1793,7 @@
       }
       { \exp_not:n { {#1} {#2} {#3} {#4} {#5} {#6} {#7} } }
   }
+\cs_generate_variant:Nn \__siunitx_number_round_places_finalise:n { e }
 \cs_new:Npn \__siunitx_number_round_places_finalise:nnnnn #1#2#3#4#5
   {
     {
@@ -1794,7 +1813,7 @@
         \str_if_eq:eeTF { \tl_head:n {#5} } { S }
           {
             \exp_not:n { {#1} {#2} }
-            \exp_args:Nnno \__siunitx_number_round_uncertainty:nnn
+            \__siunitx_number_round_uncertainty:nno
               {#3} {#4} { \use_ii:nn #5 }
             {#6} {#7}
           }
@@ -1803,7 +1822,7 @@
   }
 \cs_new:Npn \__siunitx_number_round_uncertainty:nnn #1#2#3
   {
-    \exp_args:Nf \__siunitx_number_round_uncertainty:nnnn
+    \__siunitx_number_round_uncertainty:ennn
       {
         \int_eval:n
           { \tl_count:n {#3} - \l__siunitx_number_round_precision_int }
@@ -1810,6 +1829,7 @@
       }
       {#1} {#2} {#3}
   }
+\cs_generate_variant:Nn \__siunitx_number_round_uncertainty:nnn { nno }
 \cs_new:Npn \__siunitx_number_round_uncertainty:nnnn #1#2#3#4
   {
     \use:e
@@ -1820,6 +1840,7 @@
             {#2} {#3} {#1} {#4}
       }
   }
+\cs_generate_variant:Nn \__siunitx_number_round_uncertainty:nnnn { e }
 \cs_new:Npn \__siunitx_number_round_uncertainty:nnnnnn #1#2#3#4#5#6
   {
     \tl_if_blank:nTF {#1}
@@ -1829,7 +1850,7 @@
   }
 \cs_new:Npn \__siunitx_number_round_uncertainty_auxi:nnnnn #1#2#3#4#5
   {
-    \exp_args:Nf \__siunitx_number_round_uncertainty_auxiv:nnnnnnN
+    \__siunitx_number_round_uncertainty_auxiv:ennnnnN
       { \__siunitx_number_round_uncertainty_zeros:nnnn {#1} {#3} {#4} {#5} }
       {#4}
       {#2} {#3} {#1} { }
@@ -1837,7 +1858,7 @@
   }
 \cs_new:Npn \__siunitx_number_round_uncertainty_auxii:nnnnn #1#2#3#4#5
   {
-    \exp_args:Nff \__siunitx_number_round_uncertainty_auxiii:nnnnnnn
+    \__siunitx_number_round_uncertainty_auxiii:eennnnn
       { \tl_count:n {#5} }
       { \tl_count:n {#3} }
       {#1} {#2} {#3} {#4} {#5}
@@ -1849,20 +1870,14 @@
         \bool_lazy_and:nnTF
           { \int_compare_p:nNn \l__siunitx_number_round_precision_int = 2 }
           { \int_compare_p:nNn {#1} = {#2} }
-          {
-            \exp_args:Nnf \__siunitx_number_round_uncertainty_auxiv:nnnnnnN
-              { 0 }
-          }
-          {
-            \exp_args:Nnf \__siunitx_number_round_uncertainty_auxiv:nnnnnnN
-              { }
-          }
+          { \__siunitx_number_round_uncertainty_auxiv:nennnnN { 0 } }
+          { \__siunitx_number_round_uncertainty_auxiv:nennnnN { } }
             { \int_eval:n { #6 + 1 } }
             {#4} {#5} { 1 } { }
             \__siunitx_number_round_uncertainty_auxvii:nnNnnn
       }
       {
-        \exp_args:Nff \__siunitx_number_round_uncertainty_auxiv:nnnnnnN
+        \__siunitx_number_round_uncertainty_auxiv:eennnnN
           { \__siunitx_number_round_uncertainty_zeros:nnnn {#3} {#5} {#6} {#7} }
           { \int_eval:n { #6 + 1 } }
           {#4} {#5} { 1 } {#3}
@@ -1869,6 +1884,7 @@
           \__siunitx_number_round_uncertainty_auxvii:nnNnnn
       }
   }
+\cs_generate_variant:Nn \__siunitx_number_round_uncertainty_auxiii:nnnnnnn { ee }
 \cs_new:Npn \__siunitx_number_round_uncertainty_zeros:nnnn #1#2#3#4
   {
     \prg_replicate:nn
@@ -1896,6 +1912,7 @@
         {#3} #7
     \__siunitx_number_round_end:nnn { { S } { #5#6 #1 } }
   }
+\cs_generate_variant:Nn \__siunitx_number_round_uncertainty_auxiv:nnnnnnN { ne , e , ee }
 \cs_new:Npn \__siunitx_number_round_uncertainty_auxv:nnnN #1#2#3#4
   {
     \int_compare:nNnT { \tl_count:n {#1} } > { \tl_count:n {#3} }
@@ -2005,18 +2022,20 @@
   }
 \cs_new:Npn \siunitx_number_adjust_exponent:nn #1#2
   { \__siunitx_number_adjust_exp:nnnnnnnn #1 {#2} }
+\cs_generate_variant:Nn \siunitx_number_adjust_exponent:nn { V }
 \cs_new:Npn \siunitx_number_adjust_exponent:Nn #1#2
   {
     \tl_if_empty:NF #1
-      { \exp_args:NV \siunitx_number_adjust_exponent:nn #1 {#2} }
+      { \siunitx_number_adjust_exponent:Vn #1 {#2} }
   }
 \cs_new:Npn \__siunitx_number_adjust_exp:nnnnnnnn #1#2#3#4#5#6#7#8
   {
     \exp_not:n { {#1} {#2} {#3} {#4} {#5} }
-    \exp_args:Ne \__siunitx_number_adjust_exp:nn { \fp_eval:n { #6#7 + #8 } } {#6}
+    \__siunitx_number_adjust_exp:en { \fp_eval:n { #6#7 + #8 } } {#6}
   }
 \cs_new:Npn \__siunitx_number_adjust_exp:nn #1#2
   { \__siunitx_number_adjust_exp:nNw {#2} #1 \q_stop }
+\cs_generate_variant:Nn \__siunitx_number_adjust_exp:nn { e }
 \cs_new:Npn \__siunitx_number_adjust_exp:nNw #1#2#3 \q_stop
   {
     \token_if_eq_meaning:NNTF #2 -
@@ -2124,10 +2143,12 @@
 \tl_new:N \l__siunitx_number_uncert_mode_tl
 \cs_new:Npn \siunitx_number_output:N #1
   { \__siunitx_number_output:Nn #1 { } }
+\cs_generate_variant:Nn \siunitx_number_output:N { c }
 \cs_new:Npn \siunitx_number_output:n #1
   { \__siunitx_number_output:nn #1 { } }
 \cs_new:Npn \siunitx_number_output:NN #1#2
   { \__siunitx_number_output:Nn #1 {#2} }
+\cs_generate_variant:Nn \siunitx_number_output:NN { c }
 \cs_new:Npn \siunitx_number_output:nN #1#2
   { \__siunitx_number_output:nn #1 {#2} }
 \cs_new:Npn \__siunitx_number_output:Nn #1#2
@@ -2162,7 +2183,11 @@
         {
           \bool_lazy_or_p:nn
             { \l__siunitx_number_zero_exponent_bool }
-            { ! \str_if_eq_p:nn {#2} { 0 } }
+            {
+              ! \bool_lazy_or_p:nn
+                { \tl_if_blank_p:n {#2} }
+                { \str_if_eq_p:nn {#2} { 0 } }
+            }
         }
       }
     \__siunitx_number_output_bracket:w
@@ -2277,7 +2302,7 @@
           { \__siunitx_number_output_digits:nn { decimal } {#1} }
       }
   }
-\cs_generate_variant:Nn \__siunitx_number_output_decimal:nn { f }
+\cs_generate_variant:Nn \__siunitx_number_output_decimal:nn { e }
 \cs_new:Npn \__siunitx_number_output_digits:nn #1#2
   {
     \bool_if:cTF { l__siunitx_number_group_ #1 _ bool }
@@ -2337,7 +2362,7 @@
   }
 \cs_new:Npn \__siunitx_number_output_integer_first:n #1
   {
-    \exp_args:Ne \__siunitx_number_output_integer_aux:n { \tl_reverse:n {#1} }
+    \__siunitx_number_output_integer_aux:e { \tl_reverse:n {#1} }
   }
 \cs_new:Npn \__siunitx_number_output_integer_aux:n #1
   {
@@ -2344,6 +2369,7 @@
     \__siunitx_number_output_integer_loop:NnnN \l__siunitx_number_group_first_int { 0 } { }
       #1 \q_recursion_tail \q_recursion_stop
   }
+\cs_generate_variant:Nn \__siunitx_number_output_integer_aux:n { e }
 \cs_new:Npn \__siunitx_number_output_integer_loop:NnnN #1#2#3#4
   {
     \quark_if_recursion_tail_stop_do:Nn #4 {#3}
@@ -2448,7 +2474,7 @@
   { \exp_not:n { #1 #1 #1 #1 } }
 \cs_new:Npn \__siunitx_number_output_uncert:nnnn #1#2#3#4
   {
-    \exp_args:NV \__siunitx_number_output_uncert:nnnnn \l__siunitx_number_uncert_desc_clist
+    \__siunitx_number_output_uncert:Vnnnn \l__siunitx_number_uncert_desc_clist
       {#1} {#2} {#3} {#4}
   }
 \cs_new:Npn \__siunitx_number_output_uncert:nnnnn #1#2#3#4#5
@@ -2456,6 +2482,7 @@
     \__siunitx_number_output_uncert_loop:nnN {#2} {#3}
       #4 \q_recursion_tail #1 , \q_recursion_stop {#5}
   }
+\cs_generate_variant:Nn \__siunitx_number_output_uncert:nnnnn { V }
 \cs_new:Npn \__siunitx_number_output_uncert_loop:nnN #1#2#3
   {
     \quark_if_recursion_tail_stop:N #3
@@ -2573,7 +2600,7 @@
   }
 \cs_new:Npn \__siunitx_number_output_uncert_augment:nnnn #1#2#3#4
   {
-    \exp_args:Nf \__siunitx_number_output_uncert_augment:nnn
+    \__siunitx_number_output_uncert_augment:enn
       { \int_eval:n { \tl_count:n {#1} - \tl_count:n {#2} } }
       {#3} {#4}
   }
@@ -2581,7 +2608,7 @@
   {
     \int_compare:nNnTF {#1} > 0
       {
-        \__siunitx_number_output_uncert_augment:fnnw
+        \__siunitx_number_output_uncert_augment:ennw
           { \int_eval:n { #1 - 1 } }
           {#3}
           { }
@@ -2589,7 +2616,7 @@
       }
       {
         0
-        \__siunitx_number_output_decimal:fn
+        \__siunitx_number_output_decimal:en
           {
             \prg_replicate:nn { \int_abs:n {#1} } { 0 }
             #2
@@ -2597,6 +2624,7 @@
           {#3}
       }
   }
+\cs_generate_variant:Nn \__siunitx_number_output_uncert_augment:nnn { e }
 \cs_new:Npn \__siunitx_number_output_uncert_augment:nnnw #1#2#3#4
   {
     \quark_if_nil:NF #4
@@ -2604,7 +2632,7 @@
         \int_compare:nNnTF {#1} = 0
           { \__siunitx_number_output_uncert_augment:nnw {#3#4} {#2} }
           {
-            \__siunitx_number_output_uncert_augment:fnnw
+            \__siunitx_number_output_uncert_augment:ennw
               { \int_eval:n { #1 - 1 } }
               {#2}
               {#3#4}
@@ -2611,7 +2639,7 @@
           }
       }
   }
-\cs_generate_variant:Nn \__siunitx_number_output_uncert_augment:nnnw { f }
+\cs_generate_variant:Nn \__siunitx_number_output_uncert_augment:nnnw { e }
 \cs_new:Npn \__siunitx_number_output_uncert_augment:nnw #1#2#3 \q_nil
   {
     \__siunitx_number_output_digits:nn { integer } {#1}
@@ -2620,18 +2648,28 @@
 \cs_new:Npn \__siunitx_number_output_exponent:nnnnn #1#2#3#4#5
   {
     \exp_not:n {#5}
+    \str_if_empty:nTF {#2}
+      {
+        \bool_if:NTF \l__siunitx_number_zero_exponent_bool
+          { \__siunitx_number_output_exponent_auxi:nnnnn {#1} { 0 } {#3} {#4} {#5} }
+          { \exp_not:n {#5} }
+      }
+      { \__siunitx_number_output_exponent_auxi:nnnnn {#1} {#2} {#3} {#4} {#5} }
+  }
+\cs_new:Npn \__siunitx_number_output_exponent_auxi:nnnnn #1#2#3#4#5
+  {
     \bool_lazy_or:nnTF
       { \l__siunitx_number_zero_exponent_bool }
       { ! \str_if_eq_p:nn {#2} { 0 } }
       {
         \tl_if_empty:NTF \l__siunitx_number_output_exp_marker_tl
-          { \__siunitx_number_output_exponent_auxi:nnnnn }
           { \__siunitx_number_output_exponent_auxii:nnnnn }
+          { \__siunitx_number_output_exponent_auxiii:nnnnn }
             {#1} {#2} {#3} {#4} {#5}
       }
       { \exp_not:n {#5} }
   }
-\cs_new:Npn \__siunitx_number_output_exponent_auxi:nnnnn #1#2#3#4#5
+\cs_new:Npn \__siunitx_number_output_exponent_auxii:nnnnn #1#2#3#4#5
   {
     \bool_lazy_or:nnT
       {
@@ -2653,15 +2691,15 @@
     \exp_not:n {#5}
     \exp_not:V \l__siunitx_number_exponent_base_tl
     ^
-      { \__siunitx_number_output_exponent_auxiii:nnn { } {#1} {#2} }
+      { \__siunitx_number_output_exponent_auxiv:nnn { } {#1} {#2} }
   }
-\cs_new:Npn \__siunitx_number_output_exponent_auxii:nnnnn #1#2#3#4#5
+\cs_new:Npn \__siunitx_number_output_exponent_auxiii:nnnnn #1#2#3#4#5
   {
     \exp_not:n {#5}
     \exp_not:V \l__siunitx_number_output_exp_marker_tl
-    \__siunitx_number_output_exponent_auxiii:nnn { \mathord } {#1} {#2}
+    \__siunitx_number_output_exponent_auxiv:nnn { \mathord } {#1} {#2}
   }
-\cs_new:Npn \__siunitx_number_output_exponent_auxiii:nnn #1#2#3
+\cs_new:Npn \__siunitx_number_output_exponent_auxiv:nnn #1#2#3
   {
     \tl_if_blank:nTF {#2}
       {
@@ -2869,10 +2907,11 @@
           }
       }
   }
+\cs_generate_variant:Nn \siunitx_angle:n { x }
 \cs_new_protected:Npn \__siunitx_angle_angle:n #1
   {
     \bool_if:NTF \l__siunitx_angle_force_arc_bool
-      { \exp_args:Ne \__siunitx_angle_arc_convert:n { \fp_eval:n {#1} } }
+      { \__siunitx_angle_arc_convert:x { \fp_eval:n {#1} } }
       {
         \siunitx_number_parse:nN {#1} \l__siunitx_angle_degrees_tl
         \siunitx_number_process:NN \l__siunitx_angle_degrees_tl \l__siunitx_angle_degrees_tl
@@ -2890,7 +2929,7 @@
       {
         \bool_if:NTF \l__siunitx_angle_force_decimal_bool
           {
-            \exp_args:Ne \siunitx_angle:n
+            \siunitx_angle:x
               { \fp_eval:n { #1 + (#2) / 60 + (#3) / 3600 } }
           }
           { \__siunitx_angle_arc_sign:nnn {#1} {#2} {#3} }
@@ -2908,25 +2947,24 @@
           \l__siunitx_angle_seconds_tl
       }
   }
+\cs_generate_variant:Nn \siunitx_angle:nnn { xxx }
 \cs_new_protected:Npn \__siunitx_angle_arc_convert:n #1
   {
-    \use:x
+    \siunitx_angle:xxx
+      { \fp_eval:n { trunc(#1,0) } }
+      { \fp_eval:n { trunc((#1 - trunc(#1,0)) * 60,0) } }
       {
-        \siunitx_angle:nnn
-          { \fp_eval:n { trunc(#1,0) } }
-          { \fp_eval:n { trunc((#1 - trunc(#1,0)) * 60,0) } }
+        \fp_eval:n
           {
-            \fp_eval:n
-              {
-                (
-                          (#1 - trunc(#1,0)) * 60
-                  - trunc((#1 - trunc(#1,0)) * 60,0)
-                )
-                * 60
-              }
+            (
+                      (#1 - trunc(#1,0)) * 60
+              - trunc((#1 - trunc(#1,0)) * 60,0)
+            )
+            * 60
           }
       }
   }
+\cs_generate_variant:Nn \__siunitx_angle_arc_convert:n { x }
 \tl_new:N \l__siunitx_angle_degrees_tl
 \tl_new:N \l__siunitx_angle_minutes_tl
 \tl_new:N \l__siunitx_angle_seconds_tl
@@ -2978,11 +3016,11 @@
         {
           \tl_if_empty:cF { l__siunitx_angle_ ##1 _tl }
             {
-              \exp_args:Ncc \siunitx_number_process:NN
+              \siunitx_number_process:cc
                 { l__siunitx_angle_ ##1 _tl } { l__siunitx_angle_ ##1 _tl }
               \tl_set:cx { l__siunitx_angle_ ##1 _tl }
                 {
-                  \exp_args:Nc \siunitx_number_output:NN
+                  \siunitx_number_output:cN
                     { l__siunitx_angle_ ##1 _tl } \q_nil
                 }
             }
@@ -3478,6 +3516,7 @@
           }
       }
   }
+\cs_generate_variant:Nn \siunitx_complex_number:n { x }
 \cs_new_protected:Npn \siunitx_complex_number:nn #1#2
   {
     \bool_lazy_or:nnTF
@@ -3495,7 +3534,7 @@
       { \l__siunitx_complex_force_cartesian_bool }
       { \l_siunitx_number_parse_bool }
       {
-        \exp_args:Ne \siunitx_complex_number:n
+        \siunitx_complex_number:x
           { \__siunitx_complex_convert_cartesian:nn {#1} {#2} }
       }
       {
@@ -3525,6 +3564,7 @@
           { \siunitx_quantity:nn {#1} {#2} }
       }
   }
+\cs_generate_variant:Nn \siunitx_complex_quantity:nn { x }
 \cs_new_protected:Npn \siunitx_complex_quantity:nnn #1#2#3
   {
     \bool_lazy_or:nnTF
@@ -3542,7 +3582,7 @@
       { \l__siunitx_complex_force_cartesian_bool }
       { \l_siunitx_number_parse_bool }
       {
-        \exp_args:Ne \siunitx_complex_quantity:nn
+        \siunitx_complex_quantity:xn
           { \__siunitx_complex_convert_cartesian:nn {#1} {#2} }
           {#3}
       }
@@ -3733,7 +3773,7 @@
     \siunitx_print_number:V \l__siunitx_complex_tmp_tl
     \bool_if:NT \l__siunitx_complex_polar_degree_bool
       {
-        \exp_args:NV \siunitx_unit_format:nN \l__siunitx_complex_symbol_degree_tl \l__siunitx_complex_tmp_tl
+        \siunitx_unit_format:VN \l__siunitx_complex_symbol_degree_tl \l__siunitx_complex_tmp_tl
         \nobreak
         \siunitx_print_unit:V \l__siunitx_complex_tmp_tl
       }
@@ -3763,7 +3803,7 @@
   }
 \cs_new:Npn \__siunitx_complex_convert_cartesian:nn #1#2
   {
-    \exp_args:Nee \__siunitx_complex_convert_cartesian_aux:nn
+    \__siunitx_complex_convert_cartesian_aux:ee
       {
         \fp_to_tl:n
           { (#1) * cos \bool_if:NT \l__siunitx_complex_polar_degree_bool { d } (#2) }
@@ -3777,6 +3817,7 @@
   {
     \__siunitx_complex_convert_cartesian_aux:w #1 e e \q_mark #2 e e \q_stop
   }
+\cs_generate_variant:Nn \__siunitx_complex_convert_cartesian_aux:nn { ee }
 \cs_new:Npn \__siunitx_complex_convert_cartesian_aux:w
   #1 e #2 e #3 \q_mark #4 e #5 e #6 \q_stop
   {
@@ -3834,7 +3875,7 @@
   }
 \cs_new:Npn \__siunitx_complex_convert_polar_auxvi:nnn #1#2#3
   {
-    \exp_args:Neee \__siunitx_complex_convert_polar_auxvii:nnn
+    \__siunitx_complex_convert_polar_auxvii:eee
       { \tl_if_blank:nTF {#1} { 0 } {#1} }
       { \tl_if_blank:nTF {#2} { 0 } {#2} }
       { \tl_if_blank:nF {#3} { e#3 } }
@@ -3841,7 +3882,7 @@
   }
 \cs_new:Npn \__siunitx_complex_convert_polar_auxvii:nnn #1#2#3
   {
-    \exp_args:Nee \__siunitx_complex_format_polar_auxviii:nn
+    \__siunitx_complex_format_polar_auxviii:ee
       { \fp_eval:n { sqrt ( (#1#3)^2 + (#2#3)^2 ) } }
       {
         \fp_eval:n
@@ -3848,7 +3889,9 @@
           { atan \bool_if:NT \l__siunitx_complex_polar_degree_bool { d } (#2 , #1) }
       }
   }
+\cs_generate_variant:Nn \__siunitx_complex_convert_polar_auxvii:nnn { eee }
 \cs_new:Npn \__siunitx_complex_format_polar_auxviii:nn #1#2 { {#1} {#2} }
+\cs_generate_variant:Nn \__siunitx_complex_format_polar_auxviii:nn { ee }
 \msg_new:nnnn { siunitx } { invalid-polar-form }
   { Invalid~polar~form~"#1:#2". }
   {
@@ -3973,7 +4016,7 @@
     \seq_clear:N \l__siunitx_compound_tmp_seq
     \bool_if:NTF \l_siunitx_number_parse_bool
       {
-        \exp_args:Nxx \__siunitx_compound_format:nnn
+        \__siunitx_compound_format:xxn
           { \tl_head:n {#1} }
           { \tl_tail:n {#1} }
           {#2}
@@ -3989,6 +4032,7 @@
       }
       { \__siunitx_compound_format_aux:nnn {#1} {#2} {#3} }
   }
+\cs_generate_variant:Nn \__siunitx_compound_format:nnn { xx }
 \cs_new_protected:Npn \__siunitx_compound_format_aux:nnn #1#2#3
   {
     \siunitx_number_parse:nN {#1} \l__siunitx_compound_tmp_tl
@@ -4101,7 +4145,7 @@
   {
     \bool_set_true:N \l__siunitx_compound_exp_combine_bool
     \siunitx_number_process:NN \l__siunitx_compound_tmp_tl \l__siunitx_compound_first_tl
-    \exp_args:NV \__siunitx_compound_extract_exp:nN
+    \__siunitx_compound_extract_exp:VN
       \l__siunitx_compound_first_tl \l__siunitx_compound_tmp_fp
     #1 \l__siunitx_compound_tmp_fp \l__siunitx_compound_unit_tl
   }
@@ -4138,6 +4182,7 @@
   }
 \cs_new_protected:Npn \__siunitx_compound_extract_exp:nN #1#2
   { \__siunitx_compound_extract_exp:nnnnnnnN #1 #2 }
+\cs_generate_variant:Nn \__siunitx_compound_extract_exp:nN  { V }
 \cs_new_protected:Npn \__siunitx_compound_extract_exp:nnnnnnnN #1#2#3#4#5#6#7#8
   { \fp_set:Nn #8 {#6#7} }
 \cs_new_protected:Npn \siunitx_compound_quantity:nn #1#2
@@ -4160,7 +4205,7 @@
   }
 \cs_new_protected:Npn \__siunitx_compound_quantity_auxi:nn #1#2
   {
-    \__siunitx_compound_print_boundary:V \l__siunitx_compound_boundary_close_tl
+    \__siunitx_compound_print_boundary:V \l__siunitx_compound_boundary_open_tl
     \seq_clear:N \l__siunitx_compound_tmp_seq
     \tl_map_inline:nn {#1}
       {
@@ -4218,14 +4263,14 @@
           }
           #1
       }
-      { \__siunitx_compound_print:xxN { } { \exp_not:V \l__siunitx_compound_exp_tl } #1 }
+      { \__siunitx_compound_print:nVN { } \l__siunitx_compound_exp_tl #1 }
   }
 \cs_new_protected:Npn \__siunitx_compound_print:nnN #1#2#3
   {
-    \exp_args:Nx \__siunitx_compound_print:nnnN
+    \__siunitx_compound_print:xnnN
       { \seq_count:N \l__siunitx_compound_tmp_seq } {#1} {#2} #3
   }
-\cs_generate_variant:Nn \__siunitx_compound_print:nnN { xx }
+\cs_generate_variant:Nn \__siunitx_compound_print:nnN { nV , x , xx }
 \cs_new_protected:Npn \__siunitx_compound_print:nnnN #1#2#3#4
   {
     \int_case:nnF {#1}
@@ -4250,7 +4295,7 @@
                 \seq_item:Nn \l__siunitx_compound_tmp_seq { 2 }
                 \exp_not:n {#3}
               }
-            \__siunitx_compound_print_boundary:V \l__siunitx_compound_boundary_open_tl
+            \__siunitx_compound_print_boundary:V \l__siunitx_compound_boundary_close_tl
           }
       }
       {
@@ -4265,6 +4310,7 @@
         \__siunitx_compound_print_boundary:V \l__siunitx_compound_boundary_close_tl
       }
   }
+\cs_generate_variant:Nn \__siunitx_compound_print:nnnN { x }
 \cs_new_protected:Npn \__siunitx_compound_print_aux:n #1 { }
 \cs_new_protected:Npn \__siunitx_compound_print_aux:nn #1#2
   {
@@ -4742,7 +4788,7 @@
 \cs_generate_variant:Nn \siunitx_print_number:n { V , x }
 \cs_new_protected:Npn \siunitx_print_unit:n #1
   { \__siunitx_print_aux:nn { unit } {#1} }
-\cs_generate_variant:Nn \siunitx_print_unit:n { V , x }
+\cs_generate_variant:Nn \siunitx_print_unit:n { V , o , x }
 \cs_new_protected:Npn \__siunitx_print_aux:nn #1#2
   {
     \tl_if_empty:oF {#2}
@@ -4749,7 +4795,7 @@
       {
         \tl_if_empty:cTF { l__siunitx_print_ #1 _color_tl }
           { \use:n }
-          { \exp_args:Nv \textcolor { l__siunitx_print_ #1 _color_tl } }
+          { \ExpandArgs { v } \textcolor { l__siunitx_print_ #1 _color_tl } }
             {
               \use:c
                 {
@@ -4845,7 +4891,7 @@
       \exp_after:wN \__siunitx_print_math_replace:Nn
         \l__siunitx_print_math_html_tl
         \q_recursion_tail { } \q_recursion_stop
-      \exp_args:NV \__siunitx_print_math_auxiii:n \l__siunitx_print_tmp_tl
+      \__siunitx_print_math_auxiii:V \l__siunitx_print_tmp_tl
      \group_end:
   }
 \cs_new_protected:Npn \__siunitx_print_math_text_setup:
@@ -4877,6 +4923,7 @@
       { \__siunitx_print_math_auxiv:n }
         {#1}
   }
+\cs_generate_variant:Nn \__siunitx_print_math_auxiii:n { V }
 \cs_new_protected:Npn \__siunitx_print_math_auxiv:n #1
   {
     \bool_if:NTF \l__siunitx_print_math_font_bool
@@ -4899,6 +4946,7 @@
   }
 \cs_new_protected:Npn \__siunitx_print_math_auxvi:Nn #1#2
   { \__siunitx_print_math_ensure:n { #1 {#2} } }
+\cs_generate_variant:Nn \__siunitx_print_math_auxvi:Nn { NV }
 \cs_new_protected:Npn \__siunitx_print_math_auxvii:N #1
   {
     \quark_if_recursion_tail_stop_do:Nn #1 { \__siunitx_print_math_auxv:n }
@@ -4923,8 +4971,7 @@
       \tl_replace_all:Nnn \exp_not:N \l__siunitx_print_tmp_tl
         { ^ }
         { \exp_not:N \__siunitx_print_math_super:n }
-      \exp_not:N \exp_args:NNV \__siunitx_print_math_auxvi:Nn
-        #1 \exp_not:N \l__siunitx_print_tmp_tl
+      \__siunitx_print_math_auxvi:NV #1 \exp_not:N \l__siunitx_print_tmp_tl
     \group_end:
   }
 \cs_new_protected:Npx \__siunitx_print_math_sub:n #1
@@ -4975,7 +5022,8 @@
           }
           { \selectfont }
         \tl_use:N \l__siunitx_print_text_font_tl
-        \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+        \exp_last_unbraced:Nno \tl_if_head_eq_meaning:nNTF
+          {#1} \l_siunitx_unit_fraction_tl
           { \__siunitx_print_text_fraction:Nnn #1 }
           { \__siunitx_print_text_replace:n {#1} }
       }
@@ -4989,8 +5037,12 @@
           \tl_set:Nn \l__siunitx_print_tmp_tl {#1}
           \tl_if_empty:NF \l__siunitx_print_tmp_tl
             {
+              \__siunitx_print_text_replace_font:N \l__siunitx_print_tmp_tl
               \tl_if_empty:NF \l_siunitx_unit_font_tl
-                { \exp_after:wN \cs_set_eq:NN \l_siunitx_unit_font_tl \use:n }
+                {
+                  \exp_after:wN
+                    \cs_set_eq:NN \l_siunitx_unit_font_tl \scan_stop:
+                }
               \cs_set:Npn \mathord ##1
                 { \__siunitx_print_text_replace_first:N ##1 }
               \group_begin:
@@ -5016,6 +5068,14 @@
     \group_end:
   }
 \cs_new_protected:Npn \__siunitx_print_text_replace_aux:n #1 {#1}
+\cs_new_protected:Npn \__siunitx_print_text_replace_font:N #1
+  {
+    \tl_if_empty:NF \l_siunitx_unit_font_tl
+      {
+        \tl_replace_all:NVn #1
+          \l_siunitx_unit_font_tl { \use:n }
+      }
+  }
 \cs_new:Npn \__siunitx_print_text_replace_first:N #1
   {
     \str_case:nnF {#1}
@@ -5044,6 +5104,7 @@
       \exp_not:N \q_recursion_tail
         { ? }
       \exp_not:N \q_recursion_stop
+    \__siunitx_print_text_replace_font:N #1
   }
 \cs_new_protected:Npn \__siunitx_print_text_replace:NNn #1#2#3
   {
@@ -5064,7 +5125,8 @@
   }
 \cs_new_protected:Npn \__siunitx_print_print_replace_frac:n #1
   {
-    \exp_args:NnV \tl_if_head_eq_meaning:nNTF {#1} \l_siunitx_unit_fraction_tl
+    \exp_last_unbraced:Nno \tl_if_head_eq_meaning:nNTF
+      {#1} \l_siunitx_unit_fraction_tl
       { \__siunitx_print_text_fraction:Nnn #1 }
       { \mbox { \__siunitx_print_text_replace:n {#1} } }
   }
@@ -5178,6 +5240,7 @@
     eb = bold   ,
     ub = bold
   }
+\cs_generate_variant:Nn \keys_set:nn { nx }
 \box_new:N \l__siunitx_table_tmp_box
 \dim_new:N \l__siunitx_table_tmp_dim
 \tl_new:N \l__siunitx_table_tmp_tl
@@ -5292,7 +5355,7 @@
   {
     \exp_args:NNV \group_end:
     \__siunitx_table_collect_end:n \l__siunitx_table_collect_tl
-    \exp_args:NV \__siunitx_table_split:nNNN
+    \__siunitx_table_split:VNNN
       \l__siunitx_table_collect_tl
       \l__siunitx_table_before_tl
       \l__siunitx_table_number_tl
@@ -5331,6 +5394,7 @@
     \__siunitx_table_split_tidy:N #2
     \__siunitx_table_split_tidy:N #4
   }
+\cs_generate_variant:Nn \__siunitx_table_split:nNNN { V }
 \cs_new_protected:Npn \__siunitx_table_split_loop:NNN #1#2#3
   {
     \peek_remove_spaces:n
@@ -5540,7 +5604,7 @@
           \l__siunitx_table_before_model_tl
           \l__siunitx_table_model_tl
           \l__siunitx_table_after_model_tl
-        \exp_args:NV \__siunitx_table_generate_model:n \l__siunitx_table_model_tl
+        \__siunitx_table_generate_model:V \l__siunitx_table_model_tl
         \tl_set:Nn \l__siunitx_table_align_mode_tl { format }
       } ,
     table-model-setup .tl_set:N =
@@ -5569,6 +5633,7 @@
           \l__siunitx_table_format_tl
       }
   }
+\cs_generate_variant:Nn \__siunitx_table_generate_model:n { V }
 \cs_new_protected:Npn \__siunitx_table_generate_model:nnnnnnn #1#2#3#4#5#6#7
   {
     \tl_set:Nx \l__siunitx_table_model_tl
@@ -5589,9 +5654,9 @@
         }
         \exp_not:n { {#6} }
         {
-          \int_compare:nNnTF {#7} = 0
+          \int_compare:nNnTF { 0#7 } = 0
             { 0 }
-            { \prg_replicate:nn {#7} { 8 } }
+            { \prg_replicate:nn { 0#7 } { 8 } }
         }
       }
   }
@@ -5599,7 +5664,7 @@
   {
     { S }
     {
-      \exp_args:Nff \__siunitx_table_generate_model_S:nnn
+      \__siunitx_table_generate_model_S:een
         { \tl_count:n {#1} } { \tl_count:n {#3} }
         {#3}
     }
@@ -5618,6 +5683,7 @@
       }
       { 8 }
   }
+\cs_generate_variant:Nn \__siunitx_table_generate_model_S:nnn { ee }
 \cs_new_protected:Npn \__siunitx_table_direct_begin:
   { \__siunitx_table_direct_begin:w }
 \cs_new_protected:Npn \__siunitx_table_direct_begin:w #1 \ignorespaces
@@ -5798,7 +5864,12 @@
   #1 \q_nil #2 \q_nil #3 \q_nil #4 \q_nil #5
      \q_nil #6 \q_nil #7 \q_nil #8 \q_stop
   {
-    \exp_not:n {#1#2#3#4#5#6}
+    \bool_lazy_and:nnTF
+      { \tl_if_blank_p:n {#1#2} }
+      { ! \tl_if_blank_p:n {#3} }
+      { { } }
+      { \exp_not:n {#1#2} }
+    \exp_not:n {#3#4#5#6}
     \tl_if_blank:nT {#1#2#3#4#5#6} { { } }
     \exp_not:n {#7#8}
   }
@@ -5816,7 +5887,7 @@
     \group_begin:
       \bool_if:NT \l__siunitx_table_auto_round_bool
         {
-          \exp_args:Nx \keys_set:nn { siunitx }
+          \keys_set:nx { siunitx }
             {
               round-mode      = places ,
               round-pad       = true   ,
@@ -6276,6 +6347,7 @@
     \fp_set:Nn \l__siunitx_unit_multiple_fp { \c_one_fp }
     \__siunitx_unit_format:nNN {#1} #2 \l__siunitx_unit_tmp_fp
   }
+\cs_generate_variant:Nn \siunitx_unit_format:nN { V }
 \cs_new_protected:Npn \siunitx_unit_format_extract_prefixes:nNN #1#2#3
   {
     \bool_set_true:N \l__siunitx_unit_prefix_exp_bool
@@ -6359,6 +6431,7 @@
           { \token_to_str:N ^ } { ^ }
         \tl_replace_all:Nnn \exp_not:N \l__siunitx_unit_tmp_tl
           { \token_to_str:N _ } { \c__siunitx_unit_math_subscript_tl }
+        \cs_set_eq:NN \exp_not:N \text \scan_stop:
         \char_set_active_eq:NN ^
           \exp_not:N \__siunitx_unit_format_literal_superscript:
         \char_set_active_eq:NN _
@@ -7454,7 +7527,7 @@
 \cs_new_protected:cpn { __siunitx_quantity_parsed_combine-exponent:n } #1
   {
     \siunitx_number_process:NN \l__siunitx_quantity_number_tl \l__siunitx_quantity_number_tl
-    \exp_args:NV \__siunitx_quantity_extract_exp:nNN
+    \__siunitx_quantity_extract_exp:VNN
       \l__siunitx_quantity_number_tl \l__siunitx_quantity_tmp_fp \l__siunitx_quantity_number_tl
     \siunitx_unit_format_combine_exponent:nnN {#1}
       \l__siunitx_quantity_tmp_fp \l__siunitx_quantity_unit_tl
@@ -7483,7 +7556,7 @@
   { \__siunitx_quantity_parsed_aux:nnnnw {#1} {#2} {#3} {#4} ? }
 \cs_new_protected:Npn \__siunitx_quantity_parsed_aux:nnnnw
   #1#2#3#4 #5 \q_nil #6 \q_stop
-  { \exp_args:No \__siunitx_quantity_parsed_aux:nnnn { \use_none:n #5#6 } {#1} {#2} {#3#4} }
+  { \__siunitx_quantity_parsed_aux:onnn { \use_none:n #5#6 } {#1} {#2} {#3#4} }
 \cs_new_protected:Npn \__siunitx_quantity_parsed_aux:nnnn #1#2#3#4
   {
     \tl_if_blank:nTF {#4}
@@ -7512,6 +7585,7 @@
           }
       }
   }
+\cs_generate_variant:Nn \__siunitx_quantity_parsed_aux:nnnn { o }
 \cs_new_protected:Npn \__siunitx_quantity_parsed_aux:nnn #1#2#3
   {
     \siunitx_quantity_print:nV {#1#3} \l__siunitx_quantity_unit_tl
@@ -7520,6 +7594,7 @@
   }
 \cs_new_protected:Npn \__siunitx_quantity_extract_exp:nNN #1#2#3
   { \__siunitx_quantity_extract_exp:nnnnnnnNN #1 #2 #3 }
+\cs_generate_variant:Nn \__siunitx_quantity_extract_exp:nNN { V }
 \cs_new_protected:Npn \__siunitx_quantity_extract_exp:nnnnnnnNN #1#2#3#4#5#6#7#8#9
   {
     \fp_set:Nn #8 {#6#7}
@@ -7541,9 +7616,7 @@
               { \nobreak }
             \siunitx_print_unit:n {#2}
           }
-          {
-            \exp_args:No \siunitx_print_unit:n { \use_none:n #2 }
-          }
+          { \siunitx_print_unit:o { \use_none:n #2 } }
       }
   }
 \cs_generate_variant:Nn \siunitx_quantity_print:nn { nV , VV , xV }
@@ -7714,7 +7787,7 @@
   {
     \@ifpackageloaded { hyperref }
       {
-        \exp_args:Nx \pdfstringdefDisableCommands
+        \ExpandArgs { x } \pdfstringdefDisableCommands
           {
             \cs_set_eq:NN \siunitx_print_text:n \exp_not:N \use:n
             \siunitx_declare_unit:Nn \exp_not:N \ohm
@@ -8843,7 +8916,7 @@
     \cs_set_protected:Npn \__siunitx_tmp:w \NC at do ##1##2 \NC at do #1
       { \NC at list { \NC at do ##1 \NC at do #1 ##2 } }
     \exp_after:wN \__siunitx_tmp:w \the \NC at list
-    \exp_args:NNc \renewcommand * { NC at rewrite@ #1 } [ 1 ] [ ]
+    \ExpandArgs { Nc } \renewcommand * { NC at rewrite@ #1 } [ 1 ] [ ]
       {
         \@temptokena \expandafter
           {
@@ -8883,7 +8956,7 @@
   }
 \cs_new_protected:Npn \__siunitx_bookmark_cmd:Nnn #1#2#3
   {
-    \exp_args:Nc \DeclareExpandableDocumentCommand
+    \ExpandArgs { c } \DeclareExpandableDocumentCommand
       { \cs_to_str:N #1 \c_space_tl ( pdfstring ~ context ) }
       {#2} {#3}
   }
@@ -9008,12 +9081,13 @@
       {
         0
         \exp_not:N \__siunitx_list_count:w \c_space_tl
-        #1 \exp_not:n { ; \q_recursion_tail ; \q_recursion_stop }
+        #1
+        \exp_not:n { ; \s_stop \use_none_delimit_by_q_stop:w ; \q_stop }
       }
   }
 \cs_new:Npx \__siunitx_list_count:w #1 ;
   {
-    \exp_not:n { \exp_args:Nf \quark_if_recursion_tail_stop:n } {#1}
+    \exp_not:N \use_none_delimit_by_s_stop:w #1 \exp_not:N \s_stop
     \exp_not:N \tl_if_blank:nF {#1} { + 1 }
     \exp_not:N \__siunitx_list_count:w \c_space_tl
   }



More information about the tex-live-commits mailing list.