diff options
author | Karl Berry <karl@freefriends.org> | 2025-01-18 21:05:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2025-01-18 21:05:38 +0000 |
commit | 2b2138b183c4044727339ce35778fddde495cf67 (patch) | |
tree | 9bf4ff81fef6bb3961d94f4619659f42c0e75d68 | |
parent | 98bbb508e5d027391e34e273e80ddaeba503d269 (diff) |
l3kernel-dev (18jan25)
git-svn-id: svn://tug.org/texlive/trunk@73508 c570f23f-e606-0410-a88d-b1316a301751
97 files changed, 2563 insertions, 2254 deletions
diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/CHANGELOG.md b/Master/texmf-dist/doc/latex-dev/l3kernel/CHANGELOG.md index dd1cf028181..37786781627 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/CHANGELOG.md @@ -7,7 +7,19 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2025-01-18] + +### Changed +- Use a dedicated internal marker for `fp` and `int` expressions, allowing use + with LuaMetaTeX (see \#1518) + +### Fixed +- Missing trailing period in `\tl_analysis_log:(N|n)` output (see \#1663) +- Some state variables weren't correctly reset by `\keys_define:nn` and + `\keys_set:nn` breaking some nested usages in edge cases + ## [2025-01-14] + ### Added - `\int_step_tokens:nn`, `\int_step_tokens:nnn`, and `\int_step_tokens:nnnn` @@ -16,6 +28,9 @@ this project uses date-based 'snapshot' version identifiers. ## [2024-12-25] +### Added +- `\file_forget:n` + ### Changed - Expand 'value(s)' arg. to `\color_select:nn`, `\color_set:nnn`, etc. (see \#1640) @@ -23,9 +38,6 @@ this project uses date-based 'snapshot' version identifiers. ### Fixed - Initialize color `.` properly (see \#1642) -### Added -- `\file_forget:n` - ## [2024-12-09] ### Added @@ -67,12 +79,12 @@ this project uses date-based 'snapshot' version identifiers. ## [2024-09-10] -### Fixed -- `\seq_map_pairwise_function:NNN` not work with `\seq_map_break:(n)` (issue \#1587) - ### Changed - Increase outdent of long function names in `l3doc` (issue \#1585) +### Fixed +- `\seq_map_pairwise_function:NNN` not work with `\seq_map_break:(n)` (issue \#1587) + ## [2024-08-30] ### Changed @@ -416,6 +428,7 @@ this project uses date-based 'snapshot' version identifiers. - `\file_input_raw:n` - `\int_if_zero:n(TF)` - `\str_mdfive_hash:n` + ### Changed - Remove `\noexpand` inside math mode in `\text_expand:n` - Re-implement `\dim_to_decimal_in_bp:n` and @@ -568,14 +581,14 @@ this project uses date-based 'snapshot' version identifiers. ### Added - Complete list of pdfTeX primitives +### Changed +- Leave catcode of `&` unchanged in code environment + ### Fixed - Allow for multi-part BCP47 strings in case changing - Loading with plain TeX due to `\outer` status of `^^L` issue ([\#1161](https://github.com/latex3/latex3/issues/1161)) -### Changed -- Leave catcode of `&` unchanged in code environment - ## [2023-01-16] ### Added @@ -665,9 +678,8 @@ this project uses date-based 'snapshot' version identifiers. ### Changed - Replace `LaTeX3` in message text by `LaTeX` - -### Changed - Approach to setting current color data from LaTeX2e + ## [2022-08-05] ### Added @@ -1834,7 +1846,8 @@ this project uses date-based 'snapshot' version identifiers. - Step functions have been added for dim variables, e.g. `\dim_step_inline:nnnn` -[Unreleased]: https://github.com/latex3/latex3/compare/2025-01-14...HEAD +[Unreleased]: https://github.com/latex3/latex3/compare/2025-01-18...HEAD +[2025-01-18]: https://github.com/latex3/latex3/compare/2025-01-14...2025-01-18 [2025-01-14]: https://github.com/latex3/latex3/compare/2024-12-25...2025-01-14 [2024-12-25]: https://github.com/latex3/latex3/compare/2024-12-09...2024-12-25 [2024-12-09]: https://github.com/latex3/latex3/compare/2024-11-02...2024-12-09 diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/README.md b/Master/texmf-dist/doc/latex-dev/l3kernel/README.md index 2f04fa0c630..db98f705157 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/README.md +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/README.md @@ -1,7 +1,7 @@ LaTeX3 Programming Conventions ============================== -Release 2025-01-14 +Release 2025-01-18 Overview -------- diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/expl3.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/expl3.pdf Binary files differindex be224655917..3d6a6263c1b 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/expl3.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/expl3.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/interface3.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/interface3.pdf Binary files differindex af5e3e73d39..95e823a6bf9 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/interface3.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/interface3.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/interface3.tex b/Master/texmf-dist/doc/latex-dev/l3kernel/interface3.tex index f3737162d15..f13ec99d5f0 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/interface3.tex +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/interface3.tex @@ -58,7 +58,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2025-01-14} +\date{Released 2025-01-18} \pagenumbering{roman} \maketitle diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3doc.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3doc.pdf Binary files differindex 7fffcfb28ce..061aa7a638e 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3doc.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3doc.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3docstrip.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3docstrip.pdf Binary files differindex cfd1a0f893b..b0d80d627b6 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3docstrip.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3docstrip.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news.pdf Binary files differindex fd464e5e7cb..b9e9d76f270 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news01.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news01.pdf Binary files differindex f5f1d6a2e99..2aa53611ae5 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news01.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news01.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news02.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news02.pdf Binary files differindex da2b33a2501..54b7b0f80ee 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news02.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news02.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news03.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news03.pdf Binary files differindex 5e27619c183..51f28a78c78 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news03.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news03.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news04.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news04.pdf Binary files differindex d175abaed9a..432b719c769 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news04.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news04.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news05.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news05.pdf Binary files differindex c6e74cfa992..20ff1c692c0 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news05.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news05.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news06.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news06.pdf Binary files differindex 2634873487d..2065bd50913 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news06.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news06.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news07.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news07.pdf Binary files differindex 7d5e86125bf..b1273d677af 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news07.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news07.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news08.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news08.pdf Binary files differindex f659d5bee3c..addebdad416 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news08.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news08.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news09.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news09.pdf Binary files differindex 1e5b1328c42..9a5d6cc1726 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news09.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news09.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news10.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news10.pdf Binary files differindex 7c17706820d..ba8892ee262 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news10.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news10.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news11.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news11.pdf Binary files differindex 9c78480eaa0..d5dc86b58b0 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news11.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news11.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news12.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news12.pdf Binary files differindex c6d371be789..5a2efedcc6e 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3news12.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3news12.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3prefixes.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3prefixes.pdf Binary files differindex a9b0fb31010..cd19a384872 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3prefixes.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3prefixes.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3styleguide.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3styleguide.pdf Binary files differindex 7caf945b71e..82147d44d27 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3styleguide.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3styleguide.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3styleguide.tex b/Master/texmf-dist/doc/latex-dev/l3kernel/l3styleguide.tex index e54337f5026..51b269459fd 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3styleguide.tex +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3styleguide.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2025-01-14} +\date{Released 2025-01-18} \begin{document} diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3syntax-changes.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3syntax-changes.pdf Binary files differindex 7c5914f61ce..26fae788ca8 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3syntax-changes.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3syntax-changes.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3syntax-changes.tex b/Master/texmf-dist/doc/latex-dev/l3kernel/l3syntax-changes.tex index 9de187a81fd..0abcad3c8e7 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3syntax-changes.tex +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3syntax-changes.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2025-01-14} +\date{Released 2025-01-18} \newcommand{\TF}{\textit{(TF)}} diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3term-glossary.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/l3term-glossary.pdf Binary files differindex 79d6d858122..14ae12a051d 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3term-glossary.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3term-glossary.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/l3term-glossary.tex b/Master/texmf-dist/doc/latex-dev/l3kernel/l3term-glossary.tex index 4851682921f..c907fce0977 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/l3term-glossary.tex +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/l3term-glossary.tex @@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN. {latex-team@latex-project.org}% }% } -\date{Released 2025-01-14} +\date{Released 2025-01-18} \newcommand{\TF}{\textit{(TF)}} diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/source3.pdf b/Master/texmf-dist/doc/latex-dev/l3kernel/source3.pdf Binary files differindex e15d0536835..f64d5c7efe2 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/source3.pdf +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/source3.pdf diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/source3.tex b/Master/texmf-dist/doc/latex-dev/l3kernel/source3.tex index 8eeeabfe312..9f664d1b77c 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/source3.tex +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/source3.tex @@ -57,7 +57,7 @@ for those people who are interested. {latex-team@latex-project.org}% }% } -\date{Released 2025-01-14} +\date{Released 2025-01-18} \pagenumbering{roman} \maketitle diff --git a/Master/texmf-dist/doc/latex-dev/l3kernel/source3body.tex b/Master/texmf-dist/doc/latex-dev/l3kernel/source3body.tex index 37bee0393a5..4b97218447a 100644 --- a/Master/texmf-dist/doc/latex-dev/l3kernel/source3body.tex +++ b/Master/texmf-dist/doc/latex-dev/l3kernel/source3body.tex @@ -335,6 +335,21 @@ following variable types: lists (with access at both ends) and stacks. \end{description} +\subsection{Behavior of \texttt{c}-type arguments when the \texttt{N}-type token + resulting from expansion is undefined} + +When \texttt{c}-type expansion is applied, it will produce an \texttt{N}-type +token to be consumed by the underlying function. If the result of this process +is a token which is undefined, \TeX{}'s behavior is to make it equal to +|\scan_stop:| (|\relax|). + +This will likely lead to low-level errors if it occurs in contexts where +\pkg{expl3} expects a \enquote{variable}, e.g.~a \texttt{prop}, \texttt{seq}, +etc. Therefore, the programmer should ensure that \texttt{c}-type expansion is +only applied when the resulting \texttt{N}-type token will definitely exist, +i.e.~when it is either defined prior to the application of the \texttt{c}-type +expansion or will be by the underlying \texttt{N}-type function. + \subsection{Scratch variables} Modules focussed on variable usage typically provide four scratch variables, diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/expl3.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/expl3.dtx index cdbb27239a5..f84b346c050 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/expl3.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/expl3.dtx @@ -24,7 +24,7 @@ % %<*driver|generic|package|2ekernel> %</driver|generic|package|2ekernel> -\def\ExplFileDate{2025-01-14}% +\def\ExplFileDate{2025-01-18}% %<*driver> \documentclass[full]{l3doc} \usepackage{graphicx} @@ -51,7 +51,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3basics.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3basics.dtx index c602a1aacc2..552ead9f5a7 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3basics.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3bitset.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3bitset.dtx index 5923faaae50..16a0fd7aac3 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3bitset.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3bitset.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3bootstrap.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3bootstrap.dtx index 3295b723dd4..a1b36c60744 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3bootstrap.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3bootstrap.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3box.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3box.dtx index 3e03a33fb2f..136af6afc06 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3box.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3box.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3cctab.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3cctab.dtx index 4484068ecc4..012c0489e69 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3cctab.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3cctab.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3clist.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3clist.dtx index a94c28b8b72..0e1666076d5 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3clist.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3clist.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3coffins.dtx index 83925758c21..2d1d86a75ca 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3coffins.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3coffins.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3color.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3color.dtx index f72f8923267..bbfec94de4a 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3color.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3color.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3debug.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3debug.dtx index 81c68814f0e..3c8f60341e7 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3debug.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3debug.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -69,7 +69,7 @@ % % Standard file identification. % \begin{macrocode} -\ProvidesExplFile{l3debug.def}{2025-01-14}{}{L3 Debugging support} +\ProvidesExplFile{l3debug.def}{2025-01-18}{}{L3 Debugging support} % \end{macrocode} % % \begin{variable}{\s_@@_stop} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3deprecation.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3deprecation.dtx index 104905e090f..3f41595f56d 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3deprecation.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3deprecation.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3doc.dtx index eb0be34c3f7..84245e202c4 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3doc.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3doc.dtx @@ -71,7 +71,7 @@ and all files in that bundle must be distributed together. % This isn't included in the typeset documentation because it's a bit % ugly: %<*class> -\ProvidesExplClass{l3doc}{2025-01-14}{} +\ProvidesExplClass{l3doc}{2025-01-18}{} {L3 Experimental documentation class} %</class> % \fi @@ -84,7 +84,7 @@ and all files in that bundle must be distributed together. % require you to do updates, if the class changes.}} % % \author{\Team} -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % \maketitle % \tableofcontents % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3docstrip.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3docstrip.dtx index 7aaa0aad561..4c6592789b7 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3docstrip.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3docstrip.dtx @@ -63,7 +63,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3expan.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3expan.dtx index 0a5ec8fe826..ee5ad958960 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3expan.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3expan.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3file.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3file.dtx index 73197262fe4..460d8794d87 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3file.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3file.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3flag.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3flag.dtx index 6d7a46e0578..2763ccfe253 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3flag.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3flag.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-assign.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-assign.dtx index ee5291a1e2c..f7fc361daba 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-assign.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-assign.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % \maketitle % % \begin{documentation} @@ -204,9 +204,9 @@ { \@@_show_validate:nn { #1 } { - \s_@@ \@@_chk:w ??? ;~ or \iow_newline: - \s_@@_tuple \_@@_tuple_chk:w ? ;~ or \iow_newline: - \s_@@_symbolic \@@_symbolic_chk:w ? , ? ; + \s_@@ \@@_chk:w ??? \@@_sep: or \iow_newline: + \s_@@_tuple \_@@_tuple_chk:w ? \@@_sep: or \iow_newline: + \s_@@_symbolic \@@_symbolic_chk:w ? , ? \@@_sep: } } \cs_new:Npn \@@_show_validate_aux:n #1 @@ -222,46 +222,49 @@ { \s_@@ } { \@@_show_validate:w #1 \s_@@ - \@@_chk:w ??? ; \s_@@_stop + \@@_chk:w ??? \@@_sep: \s_@@_stop } { \s_@@_tuple } { \@@_tuple_show_validate:w #1 - \s_@@_tuple \_@@_tuple_chk:w ?? ; \s_@@_stop + \s_@@_tuple \_@@_tuple_chk:w ?? \@@_sep: \s_@@_stop } { \s_@@_symbolic } { \@@_symbolic_show_validate:w #1 - \s_@@_symbolic \@@_symbolic_chk:w ? , ?? ; \s_@@_stop + \s_@@_symbolic \@@_symbolic_chk:w ? , ?? \@@_sep: \s_@@_stop } } { #2 } } } \cs_new:Npn \@@_show_validate:w - #1 \s_@@ \@@_chk:w #2#3#4#5 ; #6 \s_@@_stop + #1 \s_@@ \@@_chk:w #2#3#4#5 \@@_sep: #6 \s_@@_stop { \str_if_eq:nnF { #2 } {?} { \token_if_eq_meaning:NNTF #2 1 - { \s_@@ \@@_chk:w #2 #3 { #4 } #5 ; } - { \s_@@ \@@_chk:w #2 #3 #4 #5 ; } + { \s_@@ \@@_chk:w #2 #3 { #4 } #5 \@@_sep: } + { \s_@@ \@@_chk:w #2 #3 #4 #5 \@@_sep: } \@@_show_validate_aux:n { #6 } } } \cs_new:Npn \@@_tuple_show_validate:w - #1 \s_@@_tuple \_@@_tuple_chk:w #2#3 ; #4 \s_@@_stop + #1 \s_@@_tuple \_@@_tuple_chk:w #2#3 \@@_sep: #4 \s_@@_stop { \str_if_eq:nnF { #2 } {?} - { \s_@@_tuple \@@_tuple_chk:w { \@@_show_validate_aux:n { #2 } } ; } + { + \s_@@_tuple \@@_tuple_chk:w { \@@_show_validate_aux:n { #2 } } + \@@_sep: + } } \cs_new:Npn \@@_symbolic_show_validate:w - #1 \s_@@_symbolic \@@_symbolic_chk:w #2 , #3#4 ; #5 \s_@@_stop + #1 \s_@@_symbolic \@@_symbolic_chk:w #2 , #3#4 \@@_sep: #5 \s_@@_stop { \str_if_eq:nnF { #2 } {?} { \s_@@_symbolic \@@_symbolic_chk:w \exp_not:n { #2 } , - { \@@_show_validate_aux:n { #3 } }; + { \@@_show_validate_aux:n { #3 } }\@@_sep: \@@_show_validate_aux:n { #5 } } } diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-aux.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-aux.dtx index a4e5290887a..05f514f82ea 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-aux.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-aux.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -79,12 +79,27 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_sep:} +% We need a way to stop the expansion in \cs{@@_int_eval:w} and similar with a +% token that isn't absorbed so that it works as a marker for right-delimited +% arguments. Additionally the used token should be impossible to form a valid +% expression for these expression primitives (the otherwise often used +% |;| is turned into a binary operator in some engines for instance). And +% since this is about right-delimiting I think it's funny to use +% \cs{tex_right:D}. An unexpandable primitive is used because it is guaranteed +% to never be a valid token in such an expression and survives all kinds of +% expansion (just like |;| would). +% \begin{macrocode} +\cs_new_eq:NN \@@_sep: \tex_right:D +% \end{macrocode} +% \end{macro} +% % \subsection{Internal representation} % % Internally, a floating point number \meta{X} is a % token list containing % \begin{quote} -% \cs{s_@@} \cs{@@_chk:w} \meta{case} \meta{sign} \meta{body} |;| +% \cs{s_@@} \cs{@@_chk:w} \meta{case} \meta{sign} \meta{body} \cs{@@_sep:} % \end{quote} % Let us explain each piece separately. % @@ -117,15 +132,15 @@ % % Special floating point numbers have the form % \begin{quote} -% \cs{s_@@} \cs{@@_chk:w} \meta{case} \meta{sign} \cs[no-index]{s_@@_\ldots} |;| +% \cs{s_@@} \cs{@@_chk:w} \meta{case} \meta{sign} \cs[no-index]{s_@@_\ldots} \cs{@@_sep:} % \end{quote} -% where \cs[no-index]{s_@@_\ldots} is a scan mark carrying information about how the -% number was formed (useful for debugging). +% where \cs[no-index]{s_@@_\ldots} is a scan mark carrying information about how +% the number was formed (useful for debugging). % % Normal floating point numbers ($\meta{case} = 1$) have the form % \begin{quote} % \cs{s_@@} \cs{@@_chk:w} 1 \meta{sign} \Arg{exponent} -% \Arg{X_1} \Arg{X_2} \Arg{X_3} \Arg{X_4} |;| +% \Arg{X_1} \Arg{X_2} \Arg{X_3} \Arg{X_4} \cs{@@_sep:} % \end{quote} % Here, the \meta{exponent} is an integer, between % $-\ExplSyntaxOn\int_use:N\c__fp_minus_min_exponent_int$ and @@ -135,8 +150,9 @@ % \[ % (-1)^{\meta{sign}/2} \meta{X_1}\meta{X_2}\meta{X_3}\meta{X_4}\cdot 10^{\meta{exponent}-16} % \] -% where we have concatenated the $16$ digits. Currently, floating point numbers are normalized such that -% the \meta{exponent} is minimal, in other words, $1000 \leq \meta{X_1} \leq 9999$. +% where we have concatenated the $16$ digits. Currently, floating point numbers +% are normalized such that the \meta{exponent} is minimal, in other words, +% $1000 \leq \meta{X_1} \leq 9999$. % % \begin{table}\centering % \caption{Internal representation of floating point numbers.} @@ -176,8 +192,8 @@ % Those functions place a semicolon after one or two arguments % (typically digits). % \begin{macrocode} -\cs_new:Npn \@@_use_s:n #1 { #1; } -\cs_new:Npn \@@_use_s:nn #1#2 { #1#2; } +\cs_new:Npn \@@_use_s:n #1 { #1\@@_sep: } +\cs_new:Npn \@@_use_s:nn #1#2 { #1#2\@@_sep: } % \end{macrocode} % \end{macro} % @@ -186,9 +202,9 @@ % Those functions select specific arguments among a set of arguments % delimited by a semicolon. % \begin{macrocode} -\cs_new:Npn \@@_use_none_until_s:w #1; { } -\cs_new:Npn \@@_use_i_until_s:nw #1#2; {#1} -\cs_new:Npn \@@_use_ii_until_s:nnw #1#2#3; {#2} +\cs_new:Npn \@@_use_none_until_s:w #1\@@_sep: { } +\cs_new:Npn \@@_use_i_until_s:nw #1#2\@@_sep: {#1} +\cs_new:Npn \@@_use_ii_until_s:nnw #1#2#3\@@_sep: {#2} % \end{macrocode} % \end{macro} % @@ -196,7 +212,8 @@ % Many internal functions take arguments delimited by semicolons, and % it is occasionally useful to swap two such arguments. % \begin{macrocode} -\cs_new:Npn \@@_reverse_args:Nww #1 #2; #3; { #1 #3; #2; } +\cs_new:Npn \@@_reverse_args:Nww #1 #2\@@_sep: #3\@@_sep: + { #1 #3\@@_sep: #2\@@_sep: } % \end{macrocode} % \end{macro} % @@ -204,7 +221,8 @@ % Rotate three arguments delimited by semicolons. This is the inverse % (or the square) of the Forth primitive |ROT|, hence the name. % \begin{macrocode} -\cs_new:Npn \@@_rrot:www #1; #2; #3; { #2; #3; #1; } +\cs_new:Npn \@@_rrot:www #1\@@_sep: #2\@@_sep: #3\@@_sep: + { #2\@@_sep: #3\@@_sep: #1\@@_sep: } % \end{macrocode} % \end{macro} % @@ -212,8 +230,8 @@ % Many internal functions take arguments delimited by semicolons, and % it is occasionally useful to remove one or two such arguments. % \begin{macrocode} -\cs_new:Npn \@@_use_i:ww #1; #2; { #1; } -\cs_new:Npn \@@_use_i:www #1; #2; #3; { #1; } +\cs_new:Npn \@@_use_i:ww #1\@@_sep: #2\@@_sep: { #1\@@_sep: } +\cs_new:Npn \@@_use_i:www #1\@@_sep: #2\@@_sep: #3\@@_sep: { #1\@@_sep: } % \end{macrocode} % \end{macro} % @@ -241,8 +259,8 @@ % expanded. We define \cs{@@_chk:w} to produce an error. % \begin{macrocode} \scan_new:N \s_@@ -\cs_new_protected:Npn \@@_chk:w #1 ; - { \@@_misused:n { \s_@@ \@@_chk:w #1 ; } } +\cs_new_protected:Npn \@@_chk:w #1 \@@_sep: + { \@@_misused:n { \s_@@ \@@_chk:w #1 \@@_sep: } } % \end{macrocode} % \end{macro} % @@ -287,13 +305,14 @@ % % \begin{variable} % {\c_zero_fp, \c_minus_zero_fp, \c_inf_fp, \c_minus_inf_fp, \c_nan_fp} -% The special floating points. We define the floating points here as \enquote{exact}. +% The special floating points. We define the floating points here as +% \enquote{exact}. % \begin{macrocode} -\tl_const:Nn \c_zero_fp { \s_@@ \@@_chk:w 0 0 \s_@@_exact ; } -\tl_const:Nn \c_minus_zero_fp { \s_@@ \@@_chk:w 0 2 \s_@@_exact ; } -\tl_const:Nn \c_inf_fp { \s_@@ \@@_chk:w 2 0 \s_@@_exact ; } -\tl_const:Nn \c_minus_inf_fp { \s_@@ \@@_chk:w 2 2 \s_@@_exact ; } -\tl_const:Nn \c_nan_fp { \s_@@ \@@_chk:w 3 1 \s_@@_exact ; } +\tl_const:Nn \c_zero_fp { \s_@@ \@@_chk:w 0 0 \s_@@_exact \@@_sep: } +\tl_const:Nn \c_minus_zero_fp { \s_@@ \@@_chk:w 0 2 \s_@@_exact \@@_sep: } +\tl_const:Nn \c_inf_fp { \s_@@ \@@_chk:w 2 0 \s_@@_exact \@@_sep: } +\tl_const:Nn \c_minus_inf_fp { \s_@@ \@@_chk:w 2 2 \s_@@_exact \@@_sep: } +\tl_const:Nn \c_nan_fp { \s_@@ \@@_chk:w 3 1 \s_@@_exact \@@_sep: } % \end{macrocode} % \end{variable} % @@ -343,7 +362,7 @@ { \s_@@ \@@_chk:w 1 0 { \int_eval:n { \c_@@_max_exponent_int + 1 } } - {1000} {0000} {0000} {0000} ; + {1000} {0000} {0000} {0000} \@@_sep: } % \end{macrocode} % \end{variable} @@ -353,9 +372,9 @@ % a zero or infinity with a given sign. % \begin{macrocode} \cs_new:Npn \@@_zero_fp:N #1 - { \s_@@ \@@_chk:w 0 #1 \s_@@_underflow ; } + { \s_@@ \@@_chk:w 0 #1 \s_@@_underflow \@@_sep: } \cs_new:Npn \@@_inf_fp:N #1 - { \s_@@ \@@_chk:w 2 #1 \s_@@_overflow ; } + { \s_@@ \@@_chk:w 2 #1 \s_@@_overflow \@@_sep: } % \end{macrocode} % \end{macro} % @@ -411,7 +430,7 @@ % to $\pm\infty$. The functions \cs{@@_underflow:w} and % \cs{@@_overflow:w} are defined in \pkg{l3fp-traps}. % \begin{macrocode} -\cs_new:Npn \@@_sanitize:Nw #1 #2; +\cs_new:Npn \@@_sanitize:Nw #1 #2\@@_sep: { \if_case:w \if_int_compare:w #2 > \c_@@_max_exponent_int 1 ~ \else: @@ -423,8 +442,8 @@ \fi: \s_@@ \@@_chk:w 1 #1 {#2} } -\cs_new:Npn \@@_sanitize:wN #1; #2 { \@@_sanitize:Nw #2 #1; } -\cs_new:Npn \@@_sanitize_zero:w \s_@@ \@@_chk:w #1 #2 #3; +\cs_new:Npn \@@_sanitize:wN #1\@@_sep: #2 { \@@_sanitize:Nw #2 #1\@@_sep: } +\cs_new:Npn \@@_sanitize_zero:w \s_@@ \@@_chk:w #1 #2 #3\@@_sep: { \c_zero_fp } % \end{macrocode} % \end{macro} @@ -472,19 +491,19 @@ % % \begin{macro}[EXP]{\@@_exp_after_special:nNNw} % \begin{syntax} -% \cs{@@_exp_after_special:nNNw} \Arg{after} \meta{case} \meta{sign} \meta{scan mark} |;| +% \cs{@@_exp_after_special:nNNw} \Arg{after} \meta{case} \meta{sign} \meta{scan mark} \cs{@@_sep:} % \end{syntax} % Special floating point numbers are easy to jump over since they % contain few tokens. % \begin{macrocode} -\cs_new:Npn \@@_exp_after_special:nNNw #1#2#3#4; +\cs_new:Npn \@@_exp_after_special:nNNw #1#2#3#4\@@_sep: { \exp_after:wN \s_@@ \exp_after:wN \@@_chk:w \exp_after:wN #2 \exp_after:wN #3 \exp_after:wN #4 - \exp_after:wN ; + \exp_after:wN \@@_sep: #1 } % \end{macrocode} @@ -496,19 +515,19 @@ % the digits were not braced but instead were delimited arguments (for % instance delimited by |,|). That may be changed some day. % \begin{macrocode} -\cs_new:Npn \@@_exp_after_normal:nNNw #1 1 #2 #3 #4#5#6#7; +\cs_new:Npn \@@_exp_after_normal:nNNw #1 1 #2 #3 #4#5#6#7\@@_sep: { \exp_after:wN \@@_exp_after_normal:Nwwwww \exp_after:wN #2 - \int_value:w #3 \exp_after:wN ; - \int_value:w 1 #4 \exp_after:wN ; - \int_value:w 1 #5 \exp_after:wN ; - \int_value:w 1 #6 \exp_after:wN ; - \int_value:w 1 #7 \exp_after:wN ; #1 + \int_value:w #3 \exp_after:wN \@@_sep: + \int_value:w 1 #4 \exp_after:wN \@@_sep: + \int_value:w 1 #5 \exp_after:wN \@@_sep: + \int_value:w 1 #6 \exp_after:wN \@@_sep: + \int_value:w 1 #7 \exp_after:wN \@@_sep: #1 } \cs_new:Npn \@@_exp_after_normal:Nwwwww - #1 #2; 1 #3 ; 1 #4 ; 1 #5 ; 1 #6 ; - { \s_@@ \@@_chk:w 1 #1 {#2} {#3} {#4} {#5} {#6} ; } + #1 #2\@@_sep: 1 #3 \@@_sep: 1 #4 \@@_sep: 1 #5 \@@_sep: 1 #6 \@@_sep: + { \s_@@ \@@_chk:w 1 #1 {#2} {#3} {#4} {#5} {#6} \@@_sep: } % \end{macrocode} % \end{macro} % @@ -517,17 +536,17 @@ % \begin{macro}{\s_@@_tuple, \@@_tuple_chk:w} % \begin{variable}{\c_@@_empty_tuple_fp} % Floating point tuples take the form \cs{s_@@_tuple} -% \cs{@@_tuple_chk:w} |{| \meta{fp 1} \meta{fp 2} \dots |}| |;| where -% each \meta{fp} is a floating point number or tuple, hence ends with -% |;| itself. When a tuple is typeset, \cs{@@_tuple_chk:w} produces +% \cs{@@_tuple_chk:w} |{| \meta{fp 1} \meta{fp 2} \dots |}| \cs{@@_sep:} +% where each \meta{fp} is a floating point number or tuple, hence ends with +% \cs{@@_sep:} itself. When a tuple is typeset, \cs{@@_tuple_chk:w} produces % an error, just like usual floating point numbers. % Tuples may have zero or one element. % \begin{macrocode} \scan_new:N \s_@@_tuple -\cs_new_protected:Npn \@@_tuple_chk:w #1 ; - { \@@_misused:n { \s_@@_tuple \@@_tuple_chk:w #1 ; } } +\cs_new_protected:Npn \@@_tuple_chk:w #1 \@@_sep: + { \@@_misused:n { \s_@@_tuple \@@_tuple_chk:w #1 \@@_sep: } } \tl_const:Nn \c_@@_empty_tuple_fp - { \s_@@_tuple \@@_tuple_chk:w { } ; } + { \s_@@_tuple \@@_tuple_chk:w { } \@@_sep: } % \end{macrocode} % \end{variable} % \end{macro} @@ -540,15 +559,15 @@ % with the |\use_none:n #1| construction. % \begin{macrocode} \cs_new:Npn \@@_array_count:n #1 - { \@@_tuple_count:w \s_@@_tuple \@@_tuple_chk:w {#1} ; } -\cs_new:Npn \@@_tuple_count:w \s_@@_tuple \@@_tuple_chk:w #1 ; + { \@@_tuple_count:w \s_@@_tuple \@@_tuple_chk:w {#1} \@@_sep: } +\cs_new:Npn \@@_tuple_count:w \s_@@_tuple \@@_tuple_chk:w #1 \@@_sep: { \int_value:w \@@_int_eval:w 0 - \@@_tuple_count_loop:Nw #1 { ? \prg_break: } ; + \@@_tuple_count_loop:Nw #1 { ? \prg_break: } \@@_sep: \prg_break_point: \@@_int_eval_end: } -\cs_new:Npn \@@_tuple_count_loop:Nw #1#2; +\cs_new:Npn \@@_tuple_count_loop:Nw #1#2\@@_sep: { \use_none:n #1 + 1 \@@_tuple_count_loop:Nw } % \end{macrocode} % \end{macro} @@ -570,10 +589,10 @@ % \begin{macrocode} \cs_new:Npn \@@_array_if_all_fp:nTF #1 { - \@@_array_if_all_fp_loop:w #1 { \s_@@ \prg_break: } ; + \@@_array_if_all_fp_loop:w #1 { \s_@@ \prg_break: } \@@_sep: \prg_break_point: \use_i:nn } -\cs_new:Npn \@@_array_if_all_fp_loop:w #1#2 ; +\cs_new:Npn \@@_array_if_all_fp_loop:w #1#2 \@@_sep: { \@@_if_type_fp:NTwFw #1 \@@_array_if_all_fp_loop:w @@ -680,16 +699,16 @@ % item in the tuple and expand it. % \begin{quote} % \cs{@@_exp_after_array_f:w}\\ -% \meta{fp_1} |;|\\ +% \meta{fp_1} \cs{@@_sep:}\\ % \ldots{}\\ -% \meta{fp_n} |;|\\ +% \meta{fp_n} \cs{@@_sep:}\\ % \cs{s_@@_expr_stop} % \end{quote} % \begin{macrocode} \cs_new:Npn \@@_exp_after_tuple_o:w { \@@_exp_after_tuple_f:nw { \exp_after:wN \exp_stop_f: } } \cs_new:Npn \@@_exp_after_tuple_f:nw - #1 \s_@@_tuple \@@_tuple_chk:w #2 ; + #1 \s_@@_tuple \@@_tuple_chk:w #2 \@@_sep: { \exp_after:wN \s_@@_tuple \exp_after:wN \@@_tuple_chk:w @@ -697,7 +716,7 @@ \exp:w \exp_end_continue_f:w \@@_exp_after_array_f:w #2 \s_@@_expr_stop \exp_after:wN } - \exp_after:wN ; + \exp_after:wN \@@_sep: \exp:w \exp_end_continue_f:w #1 } \cs_new:Npn \@@_exp_after_array_f:w @@ -780,7 +799,8 @@ \int_const:Nn \c_@@_leading_shift_int { - 5 0000 } \int_const:Nn \c_@@_middle_shift_int { 5 0000 * 9999 } \int_const:Nn \c_@@_trailing_shift_int { 5 0000 * 10000 } -\cs_new:Npn \@@_pack:NNNNNw #1 #2#3#4#5 #6; { + #1#2#3#4#5 ; {#6} } +\cs_new:Npn \@@_pack:NNNNNw #1 #2#3#4#5 #6\@@_sep: + { + #1#2#3#4#5 \@@_sep: {#6} } % \end{macrocode} % \end{variable} % \end{macro} @@ -802,8 +822,8 @@ \int_const:Nn \c_@@_big_leading_shift_int { - 15 2374 } \int_const:Nn \c_@@_big_middle_shift_int { 15 2374 * 9999 } \int_const:Nn \c_@@_big_trailing_shift_int { 15 2374 * 10000 } -\cs_new:Npn \@@_pack_big:NNNNNNw #1#2 #3#4#5#6 #7; - { + #1#2#3#4#5#6 ; {#7} } +\cs_new:Npn \@@_pack_big:NNNNNNw #1#2 #3#4#5#6 #7\@@_sep: + { + #1#2#3#4#5#6 \@@_sep: {#7} } % \end{macrocode} % \end{variable} % \end{macro} @@ -824,37 +844,37 @@ \int_const:Nn \c_@@_Bigg_leading_shift_int { - 20 0000 } \int_const:Nn \c_@@_Bigg_middle_shift_int { 20 0000 * 9999 } \int_const:Nn \c_@@_Bigg_trailing_shift_int { 20 0000 * 10000 } -\cs_new:Npn \@@_pack_Bigg:NNNNNNw #1#2 #3#4#5#6 #7; - { + #1#2#3#4#5#6 ; {#7} } +\cs_new:Npn \@@_pack_Bigg:NNNNNNw #1#2 #3#4#5#6 #7\@@_sep: + { + #1#2#3#4#5#6 \@@_sep: {#7} } % \end{macrocode} % \end{variable} % \end{macro} % % \begin{macro}[EXP]{\@@_pack_twice_four:wNNNNNNNN} % \begin{syntax} -% \cs{@@_pack_twice_four:wNNNNNNNN} \meta{tokens} |;| \meta{$\geq 8$ digits} +% \cs{@@_pack_twice_four:wNNNNNNNN} \meta{tokens} \cs{@@_sep:} \meta{$\geq 8$ digits} % \end{syntax} % Grabs two sets of $4$ digits and places them before the semi-colon % delimiter. Putting several copies of this function before a % semicolon packs more digits since each takes the digits % packed by the others in its first argument. % \begin{macrocode} -\cs_new:Npn \@@_pack_twice_four:wNNNNNNNN #1; #2#3#4#5 #6#7#8#9 - { #1 {#2#3#4#5} {#6#7#8#9} ; } +\cs_new:Npn \@@_pack_twice_four:wNNNNNNNN #1\@@_sep: #2#3#4#5 #6#7#8#9 + { #1 {#2#3#4#5} {#6#7#8#9} \@@_sep: } % \end{macrocode} % \end{macro} % % \begin{macro}[EXP]{\@@_pack_eight:wNNNNNNNN} % \begin{syntax} -% \cs{@@_pack_eight:wNNNNNNNN} \meta{tokens} |;| \meta{$\geq 8$ digits} +% \cs{@@_pack_eight:wNNNNNNNN} \meta{tokens} \cs{@@_sep:} \meta{$\geq 8$ digits} % \end{syntax} % Grabs one set of $8$ digits and places them before the semi-colon % delimiter as a single group. Putting several copies of this % function before a semicolon packs more digits since each % takes the digits packed by the others in its first argument. % \begin{macrocode} -\cs_new:Npn \@@_pack_eight:wNNNNNNNN #1; #2#3#4#5 #6#7#8#9 - { #1 {#2#3#4#5#6#7#8#9} ; } +\cs_new:Npn \@@_pack_eight:wNNNNNNNN #1\@@_sep: #2#3#4#5 #6#7#8#9 + { #1 {#2#3#4#5#6#7#8#9} \@@_sep: } % \end{macrocode} % \end{macro} % @@ -875,17 +895,17 @@ % % This is used in \pkg{l3fp-basics} and \pkg{l3fp-extended}. % \begin{macrocode} -\cs_new:Npn \@@_basics_pack_low:NNNNNw #1 #2#3#4#5 #6; - { + #1 - 1 ; {#2#3#4#5} {#6} ; } -\cs_new:Npn \@@_basics_pack_high:NNNNNw #1 #2#3#4#5 #6; +\cs_new:Npn \@@_basics_pack_low:NNNNNw #1 #2#3#4#5 #6\@@_sep: + { + #1 - 1 \@@_sep: {#2#3#4#5} {#6} \@@_sep: } +\cs_new:Npn \@@_basics_pack_high:NNNNNw #1 #2#3#4#5 #6\@@_sep: { \if_meaning:w 2 #1 \@@_basics_pack_high_carry:w \fi: - ; {#2#3#4#5} {#6} + \@@_sep: {#2#3#4#5} {#6} } -\cs_new:Npn \@@_basics_pack_high_carry:w \fi: ; #1 - { \fi: + 1 ; {1000} } +\cs_new:Npn \@@_basics_pack_high_carry:w \fi: \@@_sep: #1 + { \fi: + 1 \@@_sep: {1000} } % \end{macrocode} % \end{macro} % @@ -897,16 +917,16 @@ % This is used in \pkg{l3fp-basics} for additions and % divisions. Their syntax is confusing, hence the name. % \begin{macrocode} -\cs_new:Npn \@@_basics_pack_weird_low:NNNNw #1 #2#3#4 #5; +\cs_new:Npn \@@_basics_pack_weird_low:NNNNw #1 #2#3#4 #5\@@_sep: { \if_meaning:w 2 #1 + 1 \fi: \@@_int_eval_end: - #2#3#4; {#5} ; + #2#3#4\@@_sep: {#5} \@@_sep: } \cs_new:Npn \@@_basics_pack_weird_high:NNNNNNNNw - 1 #1#2#3#4 #5#6#7#8 #9; { ; {#1#2#3#4} {#5#6#7#8} {#9} } + 1 #1#2#3#4 #5#6#7#8 #9\@@_sep: { \@@_sep: {#1#2#3#4} {#5#6#7#8} {#9} } % \end{macrocode} % \end{macro} % @@ -922,7 +942,7 @@ % and $1000\leq\meta{X_1}<9999$. The first argument determines % by how much we shift the digits. \meta{f_1} is called as follows: % \begin{syntax} -% \meta{f_1} \meta{rounding} \Arg{X'_1} \Arg{X'_2} \meta{extra-digits} |;| +% \meta{f_1} \meta{rounding} \Arg{X'_1} \Arg{X'_2} \meta{extra-digits} \cs{@@_sep:} % \end{syntax} % where $0\leq\meta{X'_i}<10^{8}-1$ are $8$ digit integers, % forming the truncation of our number. In other words, @@ -972,9 +992,9 @@ % If the \meta{shift} is zero, or too big, life is very easy. % \begin{macrocode} \cs_new:Npn \@@_decimate_:Nnnnn #1 #2#3#4#5 - { #1 0 {#2#3} {#4#5} ; } + { #1 0 {#2#3} {#4#5} \@@_sep: } \cs_new:Npn \@@_decimate_tiny:Nnnnn #1 #2#3#4#5 - { #1 1 { 0000 0000 } { 0000 0000 } 0 #2#3#4#5 ; } + { #1 1 { 0000 0000 } { 0000 0000 } 0 #2#3#4#5 \@@_sep: } % \end{macrocode} % \end{macro} % @@ -1015,8 +1035,8 @@ { \exp_after:wN ##1 \int_value:w - \exp_after:wN \@@_round_digit:Nw #2 ; - \@@_decimate_pack:nnnnnnnnnnw #3 ; + \exp_after:wN \@@_round_digit:Nw #2 \@@_sep: + \@@_decimate_pack:nnnnnnnnnnw #3 \@@_sep: } } \@@_tmp:w {i} {\use_none:nnn #50}{ 0{#2}#3{#4}#5 } @@ -1106,7 +1126,7 @@ % follow, simply anything ending in a semicolon. This, in turn, means % that the \meta{junk} may not contain semicolons. % \begin{macrocode} -\cs_new:Npn \@@_case_return:nw #1#2 \fi: #3 ; { \fi: #1 } +\cs_new:Npn \@@_case_return:nw #1#2 \fi: #3 \@@_sep: { \fi: #1 } % \end{macrocode} % \end{macro} % @@ -1115,7 +1135,7 @@ % point, and returns its first argument (an \meta{fp~var}) then expands % once after it. % \begin{macrocode} -\cs_new:Npn \@@_case_return_o:Nw #1#2 \fi: #3 \s_@@ #4 ; +\cs_new:Npn \@@_case_return_o:Nw #1#2 \fi: #3 \s_@@ #4 \@@_sep: { \fi: \exp_after:wN #1 } % \end{macrocode} % \end{macro} @@ -1133,7 +1153,7 @@ % Same as \cs{@@_case_return_o:Nw} but with two trailing floating % points. % \begin{macrocode} -\cs_new:Npn \@@_case_return_o:Nww #1#2 \fi: #3 \s_@@ #4 ; #5 ; +\cs_new:Npn \@@_case_return_o:Nww #1#2 \fi: #3 \s_@@ #4 \@@_sep: #5 \@@_sep: { \fi: \exp_after:wN #1 } % \end{macrocode} % \end{macro} @@ -1143,9 +1163,10 @@ % or second of two trailing floating point numbers, expanding once % after the result. % \begin{macrocode} -\cs_new:Npn \@@_case_return_i_o:ww #1 \fi: #2 \s_@@ #3 ; \s_@@ #4 ; - { \fi: \@@_exp_after_o:w \s_@@ #3 ; } -\cs_new:Npn \@@_case_return_ii_o:ww #1 \fi: #2 \s_@@ #3 ; +\cs_new:Npn \@@_case_return_i_o:ww + #1 \fi: #2 \s_@@ #3 \@@_sep: \s_@@ #4 \@@_sep: + { \fi: \@@_exp_after_o:w \s_@@ #3 \@@_sep: } +\cs_new:Npn \@@_case_return_ii_o:ww #1 \fi: #2 \s_@@ #3 \@@_sep: { \fi: \@@_exp_after_o:w } % \end{macrocode} % \end{macro} @@ -1157,7 +1178,7 @@ % floating point numbers, this holds if the rounding digit resulting % from \cs{@@_decimate:nNnnnn} is~$0$. % \begin{macrocode} -\prg_new_conditional:Npnn \@@_int:w \s_@@ \@@_chk:w #1 #2 #3 #4; +\prg_new_conditional:Npnn \@@_int:w \s_@@ \@@_chk:w #1 #2 #3 #4\@@_sep: { TF , T , F , p } { \if_case:w #1 \exp_stop_f: @@ -1199,26 +1220,26 @@ \cs_new:Npn \@@_small_int:wTF \s_@@ \@@_chk:w #1#2 { \if_case:w #1 \exp_stop_f: - \@@_case_return:nw { \@@_small_int_true:wTF 0 ; } + \@@_case_return:nw { \@@_small_int_true:wTF 0 \@@_sep: } \or: \exp_after:wN \@@_small_int_normal:NnwTF \or: \@@_case_return:nw { \exp_after:wN \@@_small_int_true:wTF \int_value:w - \if_meaning:w 2 #2 - \fi: 1 0000 0000 ; + \if_meaning:w 2 #2 - \fi: 1 0000 0000 \@@_sep: } \else: \@@_case_return:nw \use_ii:nn \fi: #2 } -\cs_new:Npn \@@_small_int_true:wTF #1; #2#3 { #2 {#1} } -\cs_new:Npn \@@_small_int_normal:NnwTF #1#2#3; +\cs_new:Npn \@@_small_int_true:wTF #1\@@_sep: #2#3 { #2 {#1} } +\cs_new:Npn \@@_small_int_normal:NnwTF #1#2#3\@@_sep: { \@@_decimate:nNnnnn { \c_@@_prec_int - #2 } \@@_small_int_test:NnnwNw #3 #1 } -\cs_new:Npn \@@_small_int_test:NnnwNw #1#2#3#4; #5 +\cs_new:Npn \@@_small_int_test:NnnwNw #1#2#3#4\@@_sep: #5 { \if_meaning:w 0 #1 \exp_after:wN \@@_small_int_true:wTF @@ -1228,7 +1249,7 @@ \else: #3 \fi: - \exp_after:wN ; + \exp_after:wN \@@_sep: \else: \exp_after:wN \use_ii:nn \fi: diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-basics.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-basics.dtx index c38075da41f..25df2952ad8 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-basics.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-basics.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -156,7 +156,7 @@ % discarded. % \begin{macrocode} \cs_new:cpn { @@_+_o:ww } - \s_@@ #1 \@@_chk:w #2 #3 ; \s_@@ \@@_chk:w #4 #5 + \s_@@ #1 \@@_chk:w #2 #3 \@@_sep: \s_@@ \@@_chk:w #4 #5 { \if_case:w \if_meaning:w #2 #4 @@ -176,7 +176,7 @@ \else: \exp_after:wN \@@_add_return_ii_o:Nww \int_value:w \fi: #1 #5 - \s_@@ \@@_chk:w #2 #3 ; + \s_@@ \@@_chk:w #2 #3 \@@_sep: \s_@@ \@@_chk:w #4 #5 } % \end{macrocode} @@ -186,7 +186,7 @@ % Ignore the first operand, and return the second, but using the sign % |#1| rather than |#4|. As usual, expand after the floating point. % \begin{macrocode} -\cs_new:Npn \@@_add_return_ii_o:Nww #1 #2 ; \s_@@ \@@_chk:w #3 #4 +\cs_new:Npn \@@_add_return_ii_o:Nww #1 #2 \@@_sep: \s_@@ \@@_chk:w #3 #4 { \@@_exp_after_o:w \s_@@ \@@_chk:w #3 #1 } % \end{macrocode} % \end{macro} @@ -216,7 +216,7 @@ % identical. % \begin{macrocode} \cs_new:Npn \@@_add_inf_o:Nww - #1 \s_@@ \@@_chk:w 2 #2 #3; \s_@@ \@@_chk:w 2 #4 + #1 \s_@@ \@@_chk:w 2 #2 #3\@@_sep: \s_@@ \@@_chk:w 2 #4 { \if_meaning:w #1 #2 \@@_case_return_i_o:ww @@ -227,7 +227,7 @@ { \token_if_eq_meaning:NNTF #1 #4 + - } } \fi: - \s_@@ \@@_chk:w 2 #2 #3; + \s_@@ \@@_chk:w 2 #2 #3\@@_sep: \s_@@ \@@_chk:w 2 #4 } % \end{macrocode} @@ -237,9 +237,9 @@ % \begin{quote} % \cs{@@_add_normal_o:Nww} \meta{sign_2} % \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_1} -% \meta{exp_1} \meta{body_1} |;| +% \meta{exp_1} \meta{body_1} \cs{@@_sep:} % \cs{s_@@} \cs{@@_chk:w} |1| \meta{initial sign_2} -% \meta{exp_2} \meta{body_2} |;| +% \meta{exp_2} \meta{body_2} \cs{@@_sep:} % \end{quote} % We now have two normal numbers to add, and we have to check signs % and exponents more carefully before performing the addition. @@ -264,8 +264,8 @@ % \begin{macro}[EXP]{\@@_add_npos_o:NnwNnw} % \begin{quote} % \cs{@@_add_npos_o:NnwNnw} \meta{sign_1} \meta{exp_1} \meta{body_1} -% |;| \cs{s_@@} \cs{@@_chk:w} |1| \meta{initial sign_2} \meta{exp_2} -% \meta{body_2} |;| +% \cs{@@_sep:} \cs{s_@@} \cs{@@_chk:w} |1| \meta{initial sign_2} +% \meta{exp_2} \meta{body_2} \cs{@@_sep:} % \end{quote} % Since we are doing an addition, the final sign is \meta{sign_1}. % Start an \cs{@@_int_eval:w}, responsible for computing the exponent: @@ -278,7 +278,7 @@ % the final sign with us in the midst of the calculation to round % properly at the end. % \begin{macrocode} -\cs_new:Npn \@@_add_npos_o:NnwNnw #1#2#3 ; \s_@@ \@@_chk:w 1 #4 #5 +\cs_new:Npn \@@_add_npos_o:NnwNnw #1#2#3 \@@_sep: \s_@@ \@@_chk:w 1 #4 #5 { \exp_after:wN \@@_sanitize:Nw \exp_after:wN #1 @@ -290,7 +290,7 @@ #5 \exp_after:wN \@@_add_big_ii_o:wNww \int_value:w \fi: - \@@_int_eval:w #5 - #2 ; #1 #3; + \@@_int_eval:w #5 - #2 \@@_sep: #1 #3\@@_sep: } % \end{macrocode} % \end{macro} @@ -298,14 +298,14 @@ % \begin{macro}[rEXP]{\@@_add_big_i_o:wNww} % \begin{macro}[rEXP]{\@@_add_big_ii_o:wNww} % \begin{quote} -% \cs{@@_add_big_i_o:wNww} \meta{shift} |;| \meta{final sign} -% \meta{body_1} |;| \meta{body_2} |;| +% \cs{@@_add_big_i_o:wNww} \meta{shift} \cs{@@_sep:} \meta{final sign} +% \meta{body_1} \cs{@@_sep:} \meta{body_2} \cs{@@_sep:} % \end{quote} % Used in \pkg{l3fp-expo}. % Shift the significand of the small number, then add with % \cs{@@_add_significand_o:NnnwnnnnN}. % \begin{macrocode} -\cs_new:Npn \@@_add_big_i_o:wNww #1; #2 #3; #4; +\cs_new:Npn \@@_add_big_i_o:wNww #1\@@_sep: #2 #3\@@_sep: #4\@@_sep: { \@@_decimate:nNnnnn {#1} \@@_add_significand_o:NnnwnnnnN @@ -313,7 +313,7 @@ #3 #2 } -\cs_new:Npn \@@_add_big_ii_o:wNww #1; #2 #3; #4; +\cs_new:Npn \@@_add_big_ii_o:wNww #1\@@_sep: #2 #3\@@_sep: #4\@@_sep: { \@@_decimate:nNnnnn {#1} \@@_add_significand_o:NnnwnnnnN @@ -331,7 +331,7 @@ % \begin{quote}\raggedright % \cs{@@_add_significand_o:NnnwnnnnN} % \meta{rounding digit} -% \Arg{Y'_1} \Arg{Y'_2} \meta{extra-digits} |;| +% \Arg{Y'_1} \Arg{Y'_2} \meta{extra-digits} \cs{@@_sep:} % \Arg{X_1} \Arg{X_2} \Arg{X_3} \Arg{X_4} % \meta{final sign} % \end{quote} @@ -344,19 +344,19 @@ % give an exact power of $10$, for which it is easy to correct % the result at the end. % \begin{macrocode} -\cs_new:Npn \@@_add_significand_o:NnnwnnnnN #1 #2#3 #4; #5#6#7#8 +\cs_new:Npn \@@_add_significand_o:NnnwnnnnN #1 #2#3 #4\@@_sep: #5#6#7#8 { \exp_after:wN \@@_add_significand_test_o:N \int_value:w \@@_int_eval:w 1#5#6 + #2 \exp_after:wN \@@_add_significand_pack:NNNNNNN - \int_value:w \@@_int_eval:w 1#7#8 + #3 ; #1 + \int_value:w \@@_int_eval:w 1#7#8 + #3 \@@_sep: #1 } \cs_new:Npn \@@_add_significand_pack:NNNNNNN #1 #2#3#4#5#6#7 { \if_meaning:w 2 #1 + 1 \fi: - ; #2 #3 #4 #5 #6 #7 ; + \@@_sep: #2 #3 #4 #5 #6 #7 \@@_sep: } \cs_new:Npn \@@_add_significand_test_o:N #1 { @@ -373,7 +373,7 @@ % \begin{macro}[rEXP]{\@@_add_significand_no_carry_o:wwwNN} % \begin{quote} % \cs{@@_add_significand_no_carry_o:wwwNN} -% \meta{8d} |;| \meta{6d} |;| \meta{2d} |;| +% \meta{8d} \cs{@@_sep:} \meta{6d} \cs{@@_sep:} \meta{2d} \cs{@@_sep:} % \meta{rounding digit} \meta{sign} % \end{quote} % If there's no carry, grab all the digits again and round. The @@ -381,14 +381,14 @@ % case where rounding brings a carry. % \begin{macrocode} \cs_new:Npn \@@_add_significand_no_carry_o:wwwNN - #1; #2; #3#4 ; #5#6 + #1\@@_sep: #2\@@_sep: #3#4 \@@_sep: #5#6 { \exp_after:wN \@@_basics_pack_high:NNNNNw \int_value:w \@@_int_eval:w 1 #1 \exp_after:wN \@@_basics_pack_low:NNNNNw \int_value:w \@@_int_eval:w 1 #2 #3#4 + \@@_round:NNN #6 #4 #5 - \exp_after:wN ; + \exp_after:wN \@@_sep: } % \end{macrocode} % \end{macro} @@ -396,14 +396,14 @@ % \begin{macro}[rEXP]{\@@_add_significand_carry_o:wwwNN} % \begin{quote} % \cs{@@_add_significand_carry_o:wwwNN} -% \meta{8d} |;| \meta{6d} |;| \meta{2d} |;| +% \meta{8d} \cs{@@_sep:} \meta{6d} \cs{@@_sep:} \meta{2d} \cs{@@_sep:} % \meta{rounding digit} \meta{sign} % \end{quote} % The case where there is a carry is very similar. Rounding can even % raise the first digit from $1$ to $2$, but we don't care. % \begin{macrocode} \cs_new:Npn \@@_add_significand_carry_o:wwwNN - #1; #2; #3#4; #5#6 + #1\@@_sep: #2\@@_sep: #3#4\@@_sep: #5#6 { + 1 \exp_after:wN \@@_basics_pack_weird_high:NNNNNNNNw @@ -413,8 +413,8 @@ \exp_after:wN \@@_round:NNN \exp_after:wN #6 \exp_after:wN #3 - \int_value:w \@@_round_digit:Nw #4 #5 ; - \exp_after:wN ; + \int_value:w \@@_round_digit:Nw #4 #5 \@@_sep: + \exp_after:wN \@@_sep: } % \end{macrocode} % \end{macro} @@ -425,9 +425,9 @@ % \begin{macro}[EXP]{\@@_sub_eq_o:Nnwnw, \@@_sub_npos_ii_o:Nnwnw} % \begin{quote} % \cs{@@_sub_npos_o:NnwNnw} -% \meta{sign_1} \meta{exp_1} \meta{body_1} |;| +% \meta{sign_1} \meta{exp_1} \meta{body_1} \cs{@@_sep:} % \cs{s_@@} \cs{@@_chk:w} |1| -% \meta{initial sign_2} \meta{exp_2} \meta{body_2} |;| +% \meta{initial sign_2} \meta{exp_2} \meta{body_2} \cs{@@_sep:} % \end{quote} % Rounding properly in some modes requires to know what the sign of % the result will be. Thus, we start by comparing the exponents and @@ -435,23 +435,26 @@ % number is larger, swap the numbers and call % \cs{@@_sub_npos_i_o:Nnwnw} with the opposite of \meta{sign_1}. % \begin{macrocode} -\cs_new:Npn \@@_sub_npos_o:NnwNnw #1#2#3; \s_@@ \@@_chk:w 1 #4#5#6; +\cs_new:Npn \@@_sub_npos_o:NnwNnw + #1#2#3\@@_sep: \s_@@ \@@_chk:w 1 #4#5#6\@@_sep: { - \if_case:w \@@_compare_npos:nwnw {#2} #3; {#5} #6; \exp_stop_f: + \if_case:w + \@@_compare_npos:nwnw {#2} #3\@@_sep: {#5} #6\@@_sep: \exp_stop_f: \exp_after:wN \@@_sub_eq_o:Nnwnw \or: \exp_after:wN \@@_sub_npos_i_o:Nnwnw \else: \exp_after:wN \@@_sub_npos_ii_o:Nnwnw \fi: - #1 {#2} #3; {#5} #6; + #1 {#2} #3\@@_sep: {#5} #6\@@_sep: } -\cs_new:Npn \@@_sub_eq_o:Nnwnw #1#2; #3; { \exp_after:wN \c_zero_fp } -\cs_new:Npn \@@_sub_npos_ii_o:Nnwnw #1 #2; #3; +\cs_new:Npn \@@_sub_eq_o:Nnwnw #1#2\@@_sep: #3\@@_sep: + { \exp_after:wN \c_zero_fp } +\cs_new:Npn \@@_sub_npos_ii_o:Nnwnw #1 #2\@@_sep: #3\@@_sep: { \exp_after:wN \@@_sub_npos_i_o:Nnwnw \int_value:w \@@_neg_sign:N #1 - #3; #2; + #3\@@_sep: #2\@@_sep: } % \end{macrocode} % \end{macro} @@ -460,15 +463,15 @@ % \begin{macro}[EXP]{\@@_sub_npos_i_o:Nnwnw} % After the computation is done, \cs{@@_sanitize:Nw} checks for % overflow/underflow. It expects the \meta{final sign} and the -% \meta{exponent} (delimited by |;|). Start an integer expression for -% the exponent, which starts with the exponent of the largest number, +% \meta{exponent} (delimited by \cs{@@_sep:}). Start an integer expression +% for the exponent, which starts with the exponent of the largest number, % and may be decreased if the two numbers are very close. If the two % numbers have the same exponent, call the \texttt{near} auxiliary. % Otherwise, decimate $y$, then call the \texttt{far} auxiliary to % evaluate the difference between the two significands. Note that we % decimate by $1$ less than one could expect. % \begin{macrocode} -\cs_new:Npn \@@_sub_npos_i_o:Nnwnw #1 #2#3; #4#5; +\cs_new:Npn \@@_sub_npos_i_o:Nnwnw #1 #2#3\@@_sep: #4#5\@@_sep: { \exp_after:wN \@@_sanitize:Nw \exp_after:wN #1 @@ -509,16 +512,16 @@ \exp_after:wN \@@_sub_back_near_after:wNNNNw \int_value:w \@@_int_eval:w 10#5#6 - #1#2 - 11 \exp_after:wN \@@_sub_back_near_pack:NNNNNNw - \int_value:w \@@_int_eval:w 11#7#8 - #3#4 \exp_after:wN ; + \int_value:w \@@_int_eval:w 11#7#8 - #3#4 \exp_after:wN \@@_sep: } -\cs_new:Npn \@@_sub_back_near_pack:NNNNNNw #1#2#3#4#5#6#7 ; - { + #1#2 ; {#3#4#5#6} {#7} ; } -\cs_new:Npn \@@_sub_back_near_after:wNNNNw 10 #1#2#3#4 #5 ; +\cs_new:Npn \@@_sub_back_near_pack:NNNNNNw #1#2#3#4#5#6#7 \@@_sep: + { + #1#2 \@@_sep: {#3#4#5#6} {#7} \@@_sep: } +\cs_new:Npn \@@_sub_back_near_after:wNNNNw 10 #1#2#3#4 #5 \@@_sep: { \if_meaning:w 0 #1 \exp_after:wN \@@_sub_back_shift:wnnnn \fi: - ; {#1#2#3#4} {#5} + \@@_sep: {#1#2#3#4} {#5} } % \end{macrocode} % \end{macro} @@ -532,8 +535,8 @@ % \@@_sub_back_shift_iv:nnnnw % } % \begin{quote} -% \cs{@@_sub_back_shift:wnnnn} |;| -% \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} |;| +% \cs{@@_sub_back_shift:wnnnn} \cs{@@_sep:} +% \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} \cs{@@_sep:} % \end{quote} % This function is called with $\meta{Z_1}\leq 999$. Act with % \tn{number} to trim leading zeros from \meta{Z_1} \meta{Z_2} (we @@ -547,30 +550,31 @@ % |#2#3| is ignored), get four blocks of $4$~digits and finally clean % up. Trailing zeros are added so that digits can be grabbed safely. % \begin{macrocode} -\cs_new:Npn \@@_sub_back_shift:wnnnn ; #1#2 +\cs_new:Npn \@@_sub_back_shift:wnnnn \@@_sep: #1#2 { \exp_after:wN \@@_sub_back_shift_ii:ww - \int_value:w #1 #2 0 ; + \int_value:w #1 #2 0 \@@_sep: } -\cs_new:Npn \@@_sub_back_shift_ii:ww #1 0 ; #2#3 ; +\cs_new:Npn \@@_sub_back_shift_ii:ww #1 0 \@@_sep: #2#3 \@@_sep: { \if_meaning:w @ #1 @ - 7 - \exp_after:wN \use_i:nnn \exp_after:wN \@@_sub_back_shift_iii:NNNNNNNNw - \int_value:w #2#3 0 ~ 123456789; + \int_value:w #2#3 0 ~ 123456789\@@_sep: \else: - - \@@_sub_back_shift_iii:NNNNNNNNw #1 123456789; + - \@@_sub_back_shift_iii:NNNNNNNNw #1 123456789\@@_sep: \fi: \exp_after:wN \@@_pack_twice_four:wNNNNNNNN \exp_after:wN \@@_pack_twice_four:wNNNNNNNN \exp_after:wN \@@_sub_back_shift_iv:nnnnw - \exp_after:wN ; + \exp_after:wN \@@_sep: \int_value:w - #1 ~ #2#3 0 ~ 0000 0000 0000 000 ; + #1 ~ #2#3 0 ~ 0000 0000 0000 000 \@@_sep: } -\cs_new:Npn \@@_sub_back_shift_iii:NNNNNNNNw #1#2#3#4#5#6#7#8#9; {#8} -\cs_new:Npn \@@_sub_back_shift_iv:nnnnw #1 ; #2 ; { ; #1 ; } +\cs_new:Npn \@@_sub_back_shift_iii:NNNNNNNNw #1#2#3#4#5#6#7#8#9\@@_sep: {#8} +\cs_new:Npn \@@_sub_back_shift_iv:nnnnw #1 \@@_sep: #2 \@@_sep: + { \@@_sep: #1 \@@_sep: } % \end{macrocode} % \end{macro} % \end{macro} @@ -578,7 +582,7 @@ % \begin{macro}[rEXP]{\@@_sub_back_far_o:NnnwnnnnN} % \begin{quote}\raggedright % \cs{@@_sub_back_far_o:NnnwnnnnN} -% \meta{rounding} \Arg{Y'_1} \Arg{Y'_2} \meta{extra-digits} |;| +% \meta{rounding} \Arg{Y'_1} \Arg{Y'_2} \meta{extra-digits} \cs{@@_sep:} % \Arg{X_1} \Arg{X_2} \Arg{X_3} \Arg{X_4} % \meta{final sign} % \end{quote} @@ -591,9 +595,9 @@ % and semi-colon delimiters to allow the \texttt{not_far} auxiliary to % grab each piece individually, the \texttt{very_far} auxiliary to use % \cs{@@_pack_eight:wNNNNNNNN}, and the \texttt{quite_far} to ignore -% the significands easily (using the |;| delimiter). +% the significands easily (using the \cs{@@_sep:} delimiter). % \begin{macrocode} -\cs_new:Npn \@@_sub_back_far_o:NnnwnnnnN #1 #2#3 #4; #5#6#7#8 +\cs_new:Npn \@@_sub_back_far_o:NnnwnnnnN #1 #2#3 #4\@@_sep: #5#6#7#8 { \if_case:w \if_int_compare:w 1 #2 = #5#6 \use_i:nnnn #7 \exp_stop_f: @@ -610,7 +614,7 @@ \or: \exp_after:wN \@@_sub_back_very_far_o:wwwwNN \else: \exp_after:wN \@@_sub_back_not_far_o:wwwwNN \fi: - #2 ~ #3 ; #5 #6 ~ #7 #8 ; #1 + #2 ~ #3 \@@_sep: #5 #6 ~ #7 #8 \@@_sep: #1 } % \end{macrocode} % \end{macro} @@ -626,7 +630,7 @@ % (remember that the \meta{rounding} digit is only equal to $5$ if % there was no further non-zero digit). % \begin{macrocode} -\cs_new:Npn \@@_sub_back_quite_far_o:wwNN #1; #2; #3#4 +\cs_new:Npn \@@_sub_back_quite_far_o:wwNN #1\@@_sep: #2\@@_sep: #3#4 { \exp_after:wN \@@_sub_back_quite_far_ii:NN \exp_after:wN #3 @@ -639,8 +643,8 @@ \else: \exp_after:wN \use_ii:nn \fi: - { ; {1000} {0000} {0000} {0000} ; } - { - 1 ; {9999} {9999} {9999} {9999} ; } + { \@@_sep: {1000} {0000} {0000} {0000} \@@_sep: } + { - 1 \@@_sep: {9999} {9999} {9999} {9999} \@@_sep: } } % \end{macrocode} % \end{macro} @@ -661,7 +665,7 @@ % about its parity, which is identical to that of the last digit % of~|#2|. % \begin{macrocode} -\cs_new:Npn \@@_sub_back_not_far_o:wwwwNN #1 ~ #2; #3 ~ #4; #5#6 +\cs_new:Npn \@@_sub_back_not_far_o:wwwwNN #1 ~ #2\@@_sep: #3 ~ #4\@@_sep: #5#6 { - 1 \exp_after:wN \@@_sub_back_near_after:wNNNNw @@ -671,7 +675,7 @@ - \exp_after:wN \@@_round_neg:NNN \exp_after:wN #6 \use_none:nnnnnnn #2 #5 - \exp_after:wN ; + \exp_after:wN \@@_sep: } % \end{macrocode} % \end{macro} @@ -693,9 +697,10 @@ \@@_pack_eight:wNNNNNNNN \@@_sub_back_very_far_ii_o:nnNwwNN { 0 #1#2#3 #4#5#6#7 } - ; + \@@_sep: } -\cs_new:Npn \@@_sub_back_very_far_ii_o:nnNwwNN #1#2 ; #3 ; #4 ~ #5; #6#7 +\cs_new:Npn \@@_sub_back_very_far_ii_o:nnNwwNN + #1#2 \@@_sep: #3 \@@_sep: #4 ~ #5\@@_sep: #6#7 { \exp_after:wN \@@_basics_pack_high:NNNNNw \int_value:w \@@_int_eval:w 1#4 - #1 - 1 @@ -706,8 +711,8 @@ \int_value:w \if_int_odd:w \@@_int_eval:w #5 - #2 \@@_int_eval_end: 1 \else: 2 \fi: - \int_value:w \@@_round_digit:Nw #3 #6 ; - \exp_after:wN ; + \int_value:w \@@_round_digit:Nw #3 #6 \@@_sep: + \exp_after:wN \@@_sep: } % \end{macrocode} % \end{macro} @@ -757,7 +762,7 @@ % argument |#4|, because it differs in the case of divisions. % \begin{macrocode} \cs_new:Npn \@@_mul_cases_o:NnNnww - #1#2#3#4 \s_@@ \@@_chk:w #5#6#7; \s_@@ \@@_chk:w #8#9 + #1#2#3#4 \s_@@ \@@_chk:w #5#6#7\@@_sep: \s_@@ \@@_chk:w #8#9 { \if_case:w \@@_int_eval:w \if_int_compare:w #5 #8 = 11 ~ @@ -791,7 +796,7 @@ \or: \@@_case_return_o:Nww \c_minus_inf_fp #4 \fi: - \s_@@ \@@_chk:w #5 #6 #7; + \s_@@ \@@_chk:w #5 #6 #7\@@_sep: \s_@@ \@@_chk:w #8 #9 } % \end{macrocode} @@ -805,8 +810,8 @@ % \begin{macro}[EXP]{\@@_mul_npos_o:Nww} % \begin{quote} % \cs{@@_mul_npos_o:Nww} \meta{final sign} -% \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_1} \Arg{exp_1} \meta{body_1} |;| -% \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_2} \Arg{exp_2} \meta{body_2} |;| +% \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_1} \Arg{exp_1} \meta{body_1} \cs{@@_sep:} +% \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_2} \Arg{exp_2} \meta{body_2} \cs{@@_sep:} % \end{quote} % After the computation, \cs{@@_sanitize:Nw} checks for overflow or % underflow. As we did for addition, \cs{@@_int_eval:w} computes the @@ -818,7 +823,8 @@ % This is also used in \pkg{l3fp-convert}. % \begin{macrocode} \cs_new:Npn \@@_mul_npos_o:Nww - #1 \s_@@ \@@_chk:w #2 #3 #4 #5 ; \s_@@ \@@_chk:w #6 #7 #8 #9 ; + #1 \s_@@ \@@_chk:w #2 #3 #4 #5 \@@_sep: + \s_@@ \@@_chk:w #6 #7 #8 #9 \@@_sep: { \exp_after:wN \@@_sanitize:Nw \exp_after:wN #1 @@ -871,13 +877,13 @@ \exp_after:wN \@@_mul_significand_drop:NNNNNw \int_value:w \@@_int_eval:w 99990000 + #3*#9 + #4*#8 + \exp_after:wN \@@_mul_significand_drop:NNNNNw - \int_value:w \@@_int_eval:w 100000000 + #4*#9 ; - ; \exp_after:wN ; + \int_value:w \@@_int_eval:w 100000000 + #4*#9 \@@_sep: + \@@_sep: \exp_after:wN \@@_sep: } -\cs_new:Npn \@@_mul_significand_drop:NNNNNw #1#2#3#4#5 #6; - { #1#2#3#4#5 ; + #6 } -\cs_new:Npn \@@_mul_significand_keep:NNNNNw #1#2#3#4#5 #6; - { #1#2#3#4#5 ; #6 ; } +\cs_new:Npn \@@_mul_significand_drop:NNNNNw #1#2#3#4#5 #6\@@_sep: + { #1#2#3#4#5 \@@_sep: + #6 } +\cs_new:Npn \@@_mul_significand_keep:NNNNNw #1#2#3#4#5 #6\@@_sep: + { #1#2#3#4#5 \@@_sep: #6 \@@_sep: } % \end{macrocode} % \end{macro} % \end{macro} @@ -885,10 +891,10 @@ % \begin{macro}[rEXP]{\@@_mul_significand_test_f:NNN} % \begin{quote} % \cs{@@_mul_significand_test_f:NNN} \meta{sign} |1| -% \meta{digits 1--8} |;| \meta{digits 9--12} |;| \meta{digits 13--16} |;| +% \meta{digits 1--8} \cs{@@_sep:} \meta{digits 9--12} \cs{@@_sep:} \meta{digits 13--16} \cs{@@_sep:} % |+| \meta{digits 17--20} |+| \meta{digits 21--24} -% |+| \meta{digits 25--28} |+| \meta{digits 29--32} |;| -% \cs{exp_after:wN} |;| +% |+| \meta{digits 25--28} |+| \meta{digits 29--32} \cs{@@_sep:} +% \cs{exp_after:wN} \cs{@@_sep:} % \end{quote} % If the \meta{digit 1} is non-zero, then for rounding we only care % about the digits $16$ and $17$, and whether further digits are zero @@ -916,7 +922,8 @@ % integer expression), and replaces it by a \meta{rounding digit}, % suitable for \cs{@@_round:NNN}. % \begin{macrocode} -\cs_new:Npn \@@_mul_significand_large_f:NwwNNNN #1 #2; #3; #4#5#6#7; + +\cs_new:Npn \@@_mul_significand_large_f:NwwNNNN + #1 #2\@@_sep: #3\@@_sep: #4#5#6#7\@@_sep: + { \exp_after:wN \@@_basics_pack_high:NNNNNw \int_value:w \@@_int_eval:w 1#2 @@ -938,7 +945,8 @@ % \texttt{small_pack} auxiliary, by the next digit, to form a $9$ % digit number. % \begin{macrocode} -\cs_new:Npn \@@_mul_significand_small_f:NNwwwN #1 #2#3; #4#5; #6; + #7 +\cs_new:Npn \@@_mul_significand_small_f:NNwwwN + #1 #2#3\@@_sep: #4#5\@@_sep: #6\@@_sep: + #7 { - 1 \exp_after:wN \@@_basics_pack_high:NNNNNw @@ -994,9 +1002,9 @@ % \begin{quote} % \cs{@@_div_npos_o:Nww} \meta{final sign} % \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_A} \Arg{exp A} -% \Arg{A_1} \Arg{A_2} \Arg{A_3} \Arg{A_4} |;| +% \Arg{A_1} \Arg{A_2} \Arg{A_3} \Arg{A_4} \cs{@@_sep:} % \cs{s_@@} \cs{@@_chk:w} |1| \meta{sign_Z} \Arg{exp Z} -% \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} |;| +% \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} \cs{@@_sep:} % \end{quote} % We want to compute $A/Z$. As for multiplication, % \cs{@@_sanitize:Nw} checks for overflow or underflow; we provide it @@ -1008,16 +1016,17 @@ % semi-colon, and the \meta{final sign}, used for rounding at the end. % \begin{macrocode} \cs_new:Npn \@@_div_npos_o:Nww - #1 \s_@@ \@@_chk:w 1 #2 #3 #4 ; \s_@@ \@@_chk:w 1 #5 #6 #7#8#9; + #1 \s_@@ \@@_chk:w 1 #2 #3 #4 \@@_sep: + \s_@@ \@@_chk:w 1 #5 #6 #7#8#9\@@_sep: { \exp_after:wN \@@_sanitize:Nw \exp_after:wN #1 \int_value:w \@@_int_eval:w #3 - #6 \exp_after:wN \@@_div_significand_i_o:wnnw - \int_value:w \@@_int_eval:w #7 \use_i:nnnn #8 + 1 ; + \int_value:w \@@_int_eval:w #7 \use_i:nnnn #8 + 1 \@@_sep: #4 - {#7}{#8}#9 ; + {#7}{#8}#9 \@@_sep: #1 } % \end{macrocode} @@ -1196,9 +1205,9 @@ % % \begin{macro}[rEXP]{\@@_div_significand_i_o:wnnw} % \begin{quote} -% \cs{@@_div_significand_i_o:wnnw} \meta{y} |;| +% \cs{@@_div_significand_i_o:wnnw} \meta{y} \cs{@@_sep:} % \Arg{A_1} \Arg{A_2} \Arg{A_3} \Arg{A_4} -% \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} |;| \meta{sign} +% \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} \cs{@@_sep:} \meta{sign} % \end{quote} % Compute $10^{6} + Q_{A}$ (a $7$~digit number thanks to the shift), % unbrace \meta{A_1} and \meta{A_2}, and prepare the @@ -1208,13 +1217,13 @@ % hence the \cs{int_value:w}. Here, |#4| is six brace groups, which % give the six first |n|-type arguments of the \texttt{calc} function. % \begin{macrocode} -\cs_new:Npn \@@_div_significand_i_o:wnnw #1 ; #2#3 #4 ; +\cs_new:Npn \@@_div_significand_i_o:wnnw #1 \@@_sep: #2#3 #4 \@@_sep: { \exp_after:wN \@@_div_significand_test_o:w \int_value:w \@@_int_eval:w \exp_after:wN \@@_div_significand_calc:wwnnnnnnn - \int_value:w \@@_int_eval:w 999999 + #2 #3 0 / #1 ; - #2 #3 ; + \int_value:w \@@_int_eval:w 999999 + #2 #3 0 / #1 \@@_sep: + #2 #3 \@@_sep: #4 { \exp_after:wN \@@_div_significand_ii:wwn \int_value:w #1 } { \exp_after:wN \@@_div_significand_ii:wwn \int_value:w #1 } @@ -1231,15 +1240,15 @@ % \@@_div_significand_calc_ii:wwnnnnnnn, % } % \begin{quote} -% \cs{@@_div_significand_calc:wwnnnnnnn} \meta{$10^{6}+{}$Q_{A}} |;| -% \meta{A_1} \meta{A_2} |;| \Arg{A_3} \Arg{A_4} +% \cs{@@_div_significand_calc:wwnnnnnnn} \meta{$10^{6}+{}$Q_{A}} \cs{@@_sep:} +% \meta{A_1} \meta{A_2} \cs{@@_sep:} \Arg{A_3} \Arg{A_4} % \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} % \Arg{continuation} % \end{quote} % expands to % \begin{quote} -% \meta{$10^{6}+{}$Q_{A}} \meta{continuation} |;| -% \meta{B_1} \meta{B_2} |;| \Arg{B_3} \Arg{B_4} +% \meta{$10^{6}+{}$Q_{A}} \meta{continuation} \cs{@@_sep:} +% \meta{B_1} \meta{B_2} \cs{@@_sep:} \Arg{B_3} \Arg{B_4} % \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} % \end{quote} % where $B = 10^{4} A - Q_{A} \cdot Z$. This function is also used to @@ -1292,10 +1301,10 @@ \fi: } \cs_new:Npn \@@_div_significand_calc_i:wwnnnnnnn - #1; #2;#3#4 #5#6#7#8 #9 + #1\@@_sep: #2\@@_sep:#3#4 #5#6#7#8 #9 { 1 1 #1 - #9 \exp_after:wN ; + #9 \exp_after:wN \@@_sep: \int_value:w \@@_int_eval:w \c_@@_Bigg_leading_shift_int + #2 - #1 * #5 - #5#60 \exp_after:wN \@@_pack_Bigg:NNNNNNw @@ -1306,14 +1315,14 @@ + #4 - #1 * #7 - #80 \exp_after:wN \@@_pack_Bigg:NNNNNNw \int_value:w \@@_int_eval:w \c_@@_Bigg_trailing_shift_int - - #1 * #8 ; + - #1 * #8 \@@_sep: {#5}{#6}{#7}{#8} } \cs_new:Npn \@@_div_significand_calc_ii:wwnnnnnnn - #1; #2;#3#4 #5#6#7#8 #9 + #1\@@_sep: #2\@@_sep:#3#4 #5#6#7#8 #9 { 1 0 #1 - #9 \exp_after:wN ; + #9 \exp_after:wN \@@_sep: \int_value:w \@@_int_eval:w \c_@@_Bigg_leading_shift_int + #2 - #1 * #5 \exp_after:wN \@@_pack_Bigg:NNNNNNw @@ -1324,7 +1333,7 @@ + #4 - #1 * #7 \exp_after:wN \@@_pack_Bigg:NNNNNNw \int_value:w \@@_int_eval:w \c_@@_Bigg_trailing_shift_int - - #1 * #8 ; + - #1 * #8 \@@_sep: {#5}{#6}{#7}{#8} } % \end{macrocode} @@ -1333,8 +1342,8 @@ % % \begin{macro}[EXP]{\@@_div_significand_ii:wwn} % \begin{quote} -% \cs{@@_div_significand_ii:wwn} \meta{y} |;| -% \meta{B_1} |;| \Arg{B_2} \Arg{B_3} \Arg{B_4} +% \cs{@@_div_significand_ii:wwn} \meta{y} \cs{@@_sep:} +% \meta{B_1} \cs{@@_sep:} \Arg{B_2} \Arg{B_3} \Arg{B_4} % \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} % \meta{continuations} \meta{sign} % \end{quote} @@ -1347,20 +1356,21 @@ % auxiliary is also used to compute $Q_{C}$ and $Q_{D}$ with the % inputs $C$ and $D$ instead of $B$. % \begin{macrocode} -\cs_new:Npn \@@_div_significand_ii:wwn #1; #2;#3 +\cs_new:Npn \@@_div_significand_ii:wwn #1\@@_sep: #2\@@_sep:#3 { \exp_after:wN \@@_div_significand_pack:NNN \int_value:w \@@_int_eval:w \exp_after:wN \@@_div_significand_calc:wwnnnnnnn - \int_value:w \@@_int_eval:w 999999 + #2 #3 0 / #1 ; #2 #3 ; + \int_value:w \@@_int_eval:w + 999999 + #2 #3 0 / #1 \@@_sep: #2 #3 \@@_sep: } % \end{macrocode} % \end{macro} % % \begin{macro}[rEXP]{\@@_div_significand_iii:wwnnnnn} % \begin{quote} -% \cs{@@_div_significand_iii:wwnnnnn} \meta{y} |;| -% \meta{E_1} |;| \Arg{E_2} \Arg{E_3} \Arg{E_4} +% \cs{@@_div_significand_iii:wwnnnnn} \meta{y} \cs{@@_sep:} +% \meta{E_1} \cs{@@_sep:} \Arg{E_2} \Arg{E_3} \Arg{E_4} % \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} \meta{sign} % \end{quote} % We compute $P \simeq 2E/Z$ by rounding $2 E_{1} E_{2}/Z_{1}Z_{2}$. @@ -1368,12 +1378,12 @@ % add (roughly) $5\cdot P$, which amounts to adding $P/2 \simeq E/Z$ % to $Q_{D}$, the appropriate correction from a hypothetical $Q_{E}$. % \begin{macrocode} -\cs_new:Npn \@@_div_significand_iii:wwnnnnn #1; #2;#3#4#5 #6#7 +\cs_new:Npn \@@_div_significand_iii:wwnnnnn #1\@@_sep: #2\@@_sep:#3#4#5 #6#7 { 0 \exp_after:wN \@@_div_significand_iv:wwnnnnnnn - \int_value:w \@@_int_eval:w ( 2 * #2 #3) / #6 #7 ; % <- P - #2 ; {#3} {#4} {#5} + \int_value:w \@@_int_eval:w ( 2 * #2 #3) / #6 #7 \@@_sep: % <- P + #2 \@@_sep: {#3} {#4} {#5} {#6} {#7} } % \end{macrocode} @@ -1386,8 +1396,8 @@ % \@@_div_significand_vi:Nw % } % \begin{quote} -% \cs{@@_div_significand_iv:wwnnnnnnn} \meta{P} |;| -% \meta{E_1} |;| \Arg{E_2} \Arg{E_3} \Arg{E_4} +% \cs{@@_div_significand_iv:wwnnnnnnn} \meta{P} \cs{@@_sep:} +% \meta{E_1} \cs{@@_sep:} \Arg{E_2} \Arg{E_3} \Arg{E_4} % \Arg{Z_1} \Arg{Z_2} \Arg{Z_3} \Arg{Z_4} \meta{sign} % \end{quote} % This adds to the current expression ($10^{7} + 10\cdot Q_{D}$) a @@ -1427,7 +1437,8 @@ % argument of \cs{@@_div_significand_vi:Nw}, a sum of several terms, is % also zero. Otherwise, there was an exact agreement: $T = 0$. % \begin{macrocode} -\cs_new:Npn \@@_div_significand_iv:wwnnnnnnn #1; #2;#3#4#5 #6#7#8#9 +\cs_new:Npn \@@_div_significand_iv:wwnnnnnnn + #1\@@_sep: #2\@@_sep:#3#4#5 #6#7#8#9 { + 5 * #1 \exp_after:wN \@@_div_significand_vi:Nw @@ -1435,17 +1446,17 @@ \exp_after:wN \@@_div_significand_v:NN \int_value:w \@@_int_eval:w 499950 + 2*#4 - #1*#8 + \exp_after:wN \@@_div_significand_v:NN - \int_value:w \@@_int_eval:w 500000 + 2*#5 - #1*#9 ; + \int_value:w \@@_int_eval:w 500000 + 2*#5 - #1*#9 \@@_sep: } \cs_new:Npn \@@_div_significand_v:NN #1#2 { #1#2 \@@_int_eval_end: + } -\cs_new:Npn \@@_div_significand_vi:Nw #1#2; +\cs_new:Npn \@@_div_significand_vi:Nw #1#2\@@_sep: { \if_meaning:w 0 #1 \if_int_compare:w \@@_int_eval:w #2 > 0 + 1 \fi: \else: \if_meaning:w - #1 - \else: + \fi: 1 \fi: - ; + \@@_sep: } % \end{macrocode} % \end{macro} @@ -1459,7 +1470,7 @@ % \cs{@@_div_significand_pack:NNN} $10^{6} + Q_{B}$ % \cs{@@_div_significand_pack:NNN} $10^{6} + Q_{C}$ % \cs{@@_div_significand_pack:NNN} -% $10^{7} + 10\cdot Q_{D} + 5 \cdot P + \varepsilon$ |;| \meta{sign} +% $10^{7} + 10\cdot Q_{D} + 5 \cdot P + \varepsilon$ \cs{@@_sep:} \meta{sign} % \end{quote} % Here, $\varepsilon = \operatorname{sign}(T)$ is $0$ in case $2E=PZ$, % $1$ in case $2E>PZ$, which means that $P$ was the correct value, but @@ -1468,14 +1479,14 @@ % nothing special: it removes the $10^{6}$ and carries two digits (for % the $10^{5}$'s and the $10^{4}$'s). % \begin{macrocode} -\cs_new:Npn \@@_div_significand_pack:NNN 1 #1 #2 { + #1 #2 ; } +\cs_new:Npn \@@_div_significand_pack:NNN 1 #1 #2 { + #1 #2 \@@_sep: } % \end{macrocode} % \end{macro} % % \begin{macro}[rEXP]{\@@_div_significand_test_o:w} % \begin{quote} -% \cs{@@_div_significand_test_o:w} |1| |0| \meta{5d} |;| -% ~~\meta{4d} |;| \meta{4d} |;| \meta{5d} |;| \meta{sign} +% \cs{@@_div_significand_test_o:w} |1| |0| \meta{5d} \cs{@@_sep:} +% ~~\meta{4d} \cs{@@_sep:} \meta{4d} \cs{@@_sep:} \meta{5d} \cs{@@_sep:} \meta{sign} % \end{quote} % The reason we know that the first two digits are |1| and |0| is that % the final result is known to be between $0.1$ (inclusive) and $10$, @@ -1500,30 +1511,30 @@ % % \begin{macro}[EXP]{\@@_div_significand_small_o:wwwNNNNwN} % \begin{quote} -% \cs{@@_div_significand_small_o:wwwNNNNwN} |0| \meta{4d} |;| -% ~~\meta{4d} |;| \meta{4d} |;| \meta{5d} |;| \meta{final sign} +% \cs{@@_div_significand_small_o:wwwNNNNwN} |0| \meta{4d} \cs{@@_sep:} +% ~~\meta{4d} \cs{@@_sep:} \meta{4d} \cs{@@_sep:} \meta{5d} \cs{@@_sep:} \meta{final sign} % \end{quote} % Standard use of the functions \cs{@@_basics_pack_low:NNNNNw} and % \cs{@@_basics_pack_high:NNNNNw}. We finally get to use the % \meta{final sign} which has been sitting there for a while. % \begin{macrocode} \cs_new:Npn \@@_div_significand_small_o:wwwNNNNwN - 0 #1; #2; #3; #4#5#6#7#8; #9 + 0 #1\@@_sep: #2\@@_sep: #3\@@_sep: #4#5#6#7#8\@@_sep: #9 { \exp_after:wN \@@_basics_pack_high:NNNNNw \int_value:w \@@_int_eval:w 1 #1#2 \exp_after:wN \@@_basics_pack_low:NNNNNw \int_value:w \@@_int_eval:w 1 #3#4#5#6#7 + \@@_round:NNN #9 #7 #8 - \exp_after:wN ; + \exp_after:wN \@@_sep: } % \end{macrocode} % \end{macro} % % \begin{macro}[rEXP]{\@@_div_significand_large_o:wwwNNNNwN} % \begin{quote} -% \cs{@@_div_significand_large_o:wwwNNNNwN} \meta{5d} |;| -% ~~\meta{4d} |;| \meta{4d} |;| \meta{5d} |;| \meta{sign} +% \cs{@@_div_significand_large_o:wwwNNNNwN} \meta{5d} \cs{@@_sep:} +% ~~\meta{4d} \cs{@@_sep:} \meta{4d} \cs{@@_sep:} \meta{5d} \cs{@@_sep:} \meta{sign} % \end{quote} % We know that the final result cannot reach $10$, hence |1#1#2|, % together with contributions from the level below, cannot reach @@ -1531,7 +1542,7 @@ % from the last two of our $18$ digits. % \begin{macrocode} \cs_new:Npn \@@_div_significand_large_o:wwwNNNNwN - #1; #2; #3; #4#5#6#7#8; #9 + #1\@@_sep: #2\@@_sep: #3\@@_sep: #4#5#6#7#8\@@_sep: #9 { + 1 \exp_after:wN \@@_basics_pack_weird_high:NNNNNNNNw @@ -1541,8 +1552,8 @@ \exp_after:wN \@@_round:NNN \exp_after:wN #9 \exp_after:wN #6 - \int_value:w \@@_round_digit:Nw #7 #8 ; - \exp_after:wN ; + \int_value:w \@@_round_digit:Nw #7 #8 \@@_sep: + \exp_after:wN \@@_sep: } % \end{macrocode} % \end{macro} @@ -1555,7 +1566,7 @@ % Positive infinity, and \texttt{nan}, are unchanged. Finally, for % normal positive numbers, there is some work to do. % \begin{macrocode} -\cs_new:Npn \@@_sqrt_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_sqrt_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_meaning:w 0 #2 \@@_case_return_same_o:w \fi: \if_meaning:w 2 #3 @@ -1563,7 +1574,7 @@ \fi: \if_meaning:w 1 #2 \else: \@@_case_return_same_o:w \fi: \@@_sqrt_npos_o:w - \s_@@ \@@_chk:w #2 #3 #4; + \s_@@ \@@_chk:w #2 #3 #4\@@_sep: } % \end{macrocode} % \end{macro} @@ -1581,7 +1592,7 @@ % $a_1'\in[10^{6}, 10^{7})$ instead of $[10^{7}, 10^{8})$, then use % Newton's method starting at $17782794 \simeq 10^{7.25}$. % \begin{macrocode} -\cs_new:Npn \@@_sqrt_npos_o:w \s_@@ \@@_chk:w 1 0 #1#2#3#4#5; +\cs_new:Npn \@@_sqrt_npos_o:w \s_@@ \@@_chk:w 1 0 #1#2#3#4#5\@@_sep: { \exp_after:wN \@@_sanitize:Nw \exp_after:wN 0 @@ -1590,18 +1601,18 @@ \exp_after:wN \@@_sqrt_npos_auxi_o:wwnnN \fi: #1 / 2 - \@@_sqrt_Newton_o:wwn 56234133; 0; {#2#3} {#4#5} 0 + \@@_sqrt_Newton_o:wwn 56234133\@@_sep: 0\@@_sep: {#2#3} {#4#5} 0 } -\cs_new:Npn \@@_sqrt_npos_auxi_o:wwnnN #1 / 2 #2; 0; #3#4#5 +\cs_new:Npn \@@_sqrt_npos_auxi_o:wwnnN #1 / 2 #2\@@_sep: 0\@@_sep: #3#4#5 { ( #1 + 1 ) / 2 \@@_pack_eight:wNNNNNNNN \@@_sqrt_npos_auxii_o:wNNNNNNNN - ; + \@@_sep: 0 #3 #4 } -\cs_new:Npn \@@_sqrt_npos_auxii_o:wNNNNNNNN #1; #2#3#4#5#6#7#8#9 - { \@@_sqrt_Newton_o:wwn 17782794; 0; {#1} {#2#3#4#5#6#7#8#9} } +\cs_new:Npn \@@_sqrt_npos_auxii_o:wNNNNNNNN #1\@@_sep: #2#3#4#5#6#7#8#9 + { \@@_sqrt_Newton_o:wwn 17782794\@@_sep: 0\@@_sep: {#1} {#2#3#4#5#6#7#8#9} } % \end{macrocode} % \end{macro} % \end{macro} @@ -1670,7 +1681,7 @@ % |#3 * 100000000 / #1|. In any case, the result is within $[10^{7}, % 10^{8}]$. % \begin{macrocode} -\cs_new:Npn \@@_sqrt_Newton_o:wwn #1; #2; #3 +\cs_new:Npn \@@_sqrt_Newton_o:wwn #1\@@_sep: #2\@@_sep: #3 { \if_int_compare:w #1 = #2 \exp_stop_f: \exp_after:wN \@@_sqrt_auxi_o:NNNNwnnN @@ -1678,16 +1689,16 @@ \exp_after:wN \@@_use_none_until_s:w \fi: \exp_after:wN \@@_sqrt_Newton_o:wwn - \int_value:w \@@_int_eval:w (#1 + #3 * 1 0000 0000 / #1) / 2 ; - #1; {#3} + \int_value:w \@@_int_eval:w (#1 + #3 * 1 0000 0000 / #1) / 2 \@@_sep: + #1\@@_sep: {#3} } % \end{macrocode} % \end{macro} % % \begin{macro}[rEXP]{\@@_sqrt_auxi_o:NNNNwnnN} % This function is followed by $10^{8}+x-1$, which has~$9$ digits -% starting with~$1$, then |;| \Arg{a_1} \Arg{a_2} \meta{a'}. Here, $x -% \simeq \sqrt{10^{8} a_1}$ and we want to estimate the square root of +% starting with~$1$, then \cs{@@_sep:} \Arg{a_1} \Arg{a_2} \meta{a'}. Here, +% $x \simeq \sqrt{10^{8} a_1}$ and we want to estimate the square root of % $a = 10^{-8} a_1 + 10^{-16} a_2 + 10^{-17} a'$. We set up an % initial underestimate % \[ @@ -1708,7 +1719,7 @@ % construction, the underestimates~$y$ are always increasing, $a - y^2 % < 3.2 \cdot 10^{-8}$ for all. Also, $y<1$. % \begin{macrocode} -\cs_new:Npn \@@_sqrt_auxi_o:NNNNwnnN 1 #1#2#3#4#5; +\cs_new:Npn \@@_sqrt_auxi_o:NNNNwnnN 1 #1#2#3#4#5\@@_sep: { \@@_sqrt_auxii_o:NnnnnnnnN \@@_sqrt_auxiii_o:wnnnnnnnn @@ -1794,9 +1805,9 @@ \exp_after:wN \@@_pack_big:NNNNNNw \int_value:w \@@_int_eval:w \c_@@_big_trailing_shift_int - - #6 * #6 ; + - #6 * #6 \@@_sep: % ( - - 257 ) * 5000 0000 / (#2#3 + 1) + 10 0000 0000 ; + - 257 ) * 5000 0000 / (#2#3 + 1) + 10 0000 0000 \@@_sep: {#2}{#3}{#4}{#5}{#6} {#7}{#8}#9 } % \end{macrocode} @@ -1811,8 +1822,8 @@ % \@@_sqrt_auxvii_o:NNNNNw % } % We receive here the difference $a-y^2=d=\sum_i d_i \cdot 10^{-4i}$, -% as \meta{d_2} |;| \Arg{d_3} \ldots{} \Arg{d_{10}}, where each block -% has~$4$ digits, except \meta{d_2}. This function finds the largest +% as \meta{d_2} \cs{@@_sep:} \Arg{d_3} \ldots{} \Arg{d_{10}}, where each +% block has~$4$ digits, except \meta{d_2}. This function finds the largest % $j\leq 6$ such that $10^{4j}(a-y^2) < 2\cdot 10^{8}$, then leaves an % open parenthesis and the integer % $\bigl\lfloor 10^{4j}(a-y^2)\bigr\rfloor$ in an integer @@ -1846,7 +1857,7 @@ % \] % \begin{macrocode} \cs_new:Npn \@@_sqrt_auxiii_o:wnnnnnnnn - #1; #2#3#4#5#6#7#8#9 + #1\@@_sep: #2#3#4#5#6#7#8#9 { \if_int_compare:w #1 > \c_one_int \exp_after:wN \@@_sqrt_auxiv_o:NNNNNw @@ -1866,13 +1877,13 @@ \fi: \fi: } -\cs_new:Npn \@@_sqrt_auxiv_o:NNNNNw 1#1#2#3#4#5#6; +\cs_new:Npn \@@_sqrt_auxiv_o:NNNNNw 1#1#2#3#4#5#6\@@_sep: { \@@_sqrt_auxviii_o:nnnnnnn {#1#2#3#4#5#6} {00000000} } -\cs_new:Npn \@@_sqrt_auxv_o:NNNNNw 1#1#2#3#4#5#6; +\cs_new:Npn \@@_sqrt_auxv_o:NNNNNw 1#1#2#3#4#5#6\@@_sep: { \@@_sqrt_auxviii_o:nnnnnnn {000#1#2#3#4#5} {#60000} } -\cs_new:Npn \@@_sqrt_auxvi_o:NNNNNw 1#1#2#3#4#5#6; +\cs_new:Npn \@@_sqrt_auxvi_o:NNNNNw 1#1#2#3#4#5#6\@@_sep: { \@@_sqrt_auxviii_o:nnnnnnn {0000000#1} {#2#3#4#5#6} } -\cs_new:Npn \@@_sqrt_auxvii_o:NNNNNw 1#1#2#3#4#5#6; +\cs_new:Npn \@@_sqrt_auxvii_o:NNNNNw 1#1#2#3#4#5#6\@@_sep: { \if_int_compare:w #1#2 = \c_zero_int \exp_after:wN \@@_sqrt_auxx_o:Nnnnnnnn @@ -1895,9 +1906,9 @@ \exp_after:wN \@@_basics_pack_low:NNNNNw \int_value:w \@@_int_eval:w #1 + 1#4#5 \exp_after:wN \@@_basics_pack_low:NNNNNw - \int_value:w \@@_int_eval:w #2 + 1#6#7 ; + \int_value:w \@@_int_eval:w #2 + 1#6#7 \@@_sep: } -\cs_new:Npn \@@_sqrt_auxix_o:wnwnw #1; #2#3; #4#5; +\cs_new:Npn \@@_sqrt_auxix_o:wnwnw #1\@@_sep: #2#3\@@_sep: #4#5\@@_sep: { \@@_sqrt_auxii_o:NnnnnnnnN \@@_sqrt_auxiii_o:wnnnnnnnn {#1}{#2}{#3}{#4}{#5} @@ -1942,10 +1953,10 @@ { \exp_after:wN \@@_sqrt_auxxi_o:wwnnN \int_value:w \@@_int_eval:w - (#8 + 2499) / 5000 * 5000 ; - {#4} {#5} {#6} {#7} ; + (#8 + 2499) / 5000 * 5000 \@@_sep: + {#4} {#5} {#6} {#7} \@@_sep: } -\cs_new:Npn \@@_sqrt_auxxi_o:wwnnN #1; #2; #3#4#5 +\cs_new:Npn \@@_sqrt_auxxi_o:wwnnN #1\@@_sep: #2\@@_sep: #3#4#5 { \@@_sqrt_auxii_o:NnnnnnnnN \@@_sqrt_auxxii_o:nnnnnnnnw @@ -1967,7 +1978,7 @@ % \texttt{auxxiv} function with argument~$9998$. For an exact result % call it with~$9999$, and for an overestimate call it with~$10000$. % \begin{macrocode} -\cs_new:Npn \@@_sqrt_auxxii_o:nnnnnnnnw 0; #1#2#3#4#5#6#7#8 #9; +\cs_new:Npn \@@_sqrt_auxxii_o:nnnnnnnnw 0\@@_sep: #1#2#3#4#5#6#7#8 #9\@@_sep: { \if_int_compare:w #1#2 > \c_zero_int \if_int_compare:w #1#2 = \c_one_int @@ -1985,12 +1996,12 @@ \exp_after:wN \@@_sqrt_auxxiv_o:wnnnnnnnN \int_value:w 10000 \fi: - ; + \@@_sep: } -\cs_new:Npn \@@_sqrt_auxxiii_o:w \fi: \fi: \fi: \fi: #1 \fi: ; +\cs_new:Npn \@@_sqrt_auxxiii_o:w \fi: \fi: \fi: \fi: #1 \fi: \@@_sep: { \fi: \fi: \fi: \fi: \fi: - \@@_sqrt_auxxiv_o:wnnnnnnnN 9999 ; + \@@_sqrt_auxxiv_o:wnnnnnnnN 9999 \@@_sep: } % \end{macrocode} % \end{macro} @@ -2016,7 +2027,7 @@ % $0001$, $4999$, $5000$, $5001$, or~$9999$, which it converts to $0$, % $1$, $4$, $5$, $6$, and~$9$, respectively. % \begin{macrocode} -\cs_new:Npn \@@_sqrt_auxxiv_o:wnnnnnnnN #1; #2#3#4#5#6 #7#8#9 +\cs_new:Npn \@@_sqrt_auxxiv_o:wnnnnnnnN #1\@@_sep: #2#3#4#5#6 #7#8#9 { \exp_after:wN \@@_basics_pack_high:NNNNNw \int_value:w \@@_int_eval:w 1 0000 0000 + #2#3 @@ -2030,8 +2041,8 @@ \int_value:w \exp_after:wN \use_i:nn \exp_after:wN \@@_round_digit:Nw - \int_value:w \@@_int_eval:w #6 + 19999 - #1 ; - \exp_after:wN ; + \int_value:w \@@_int_eval:w #6 + 19999 - #1 \@@_sep: + \exp_after:wN \@@_sep: } % \end{macrocode} % \end{macro} @@ -2041,7 +2052,7 @@ % \begin{macro}[EXP]{\@@_logb_o:w, \@@_logb_aux_o:w} % The exponent of a normal number is its \meta{exponent} minus one. % \begin{macrocode} -\cs_new:Npn \@@_logb_o:w ? \s_@@ \@@_chk:w #1#2; @ +\cs_new:Npn \@@_logb_o:w ? \s_@@ \@@_chk:w #1#2\@@_sep: @ { \if_case:w #1 \exp_stop_f: \@@_case_use:nw @@ -2050,9 +2061,9 @@ \or: \@@_case_return_o:Nw \c_inf_fp \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #1 #2; + \s_@@ \@@_chk:w #1 #2\@@_sep: } -\cs_new:Npn \@@_logb_aux_o:w \s_@@ \@@_chk:w #1 #2 #3 #4 ; +\cs_new:Npn \@@_logb_aux_o:w \s_@@ \@@_chk:w #1 #2 #3 #4 \@@_sep: { \exp_after:wN \@@_parse:n \exp_after:wN { \int_value:w \int_eval:w #3 - 1 \exp_after:wN } @@ -2064,7 +2075,7 @@ % \begin{macro}[EXP]{\@@_sign_aux_o:w} % Find the sign of the floating point: \texttt{nan}, |+0|, |-0|, |+1| or |-1|. % \begin{macrocode} -\cs_new:Npn \@@_sign_o:w ? \s_@@ \@@_chk:w #1#2; @ +\cs_new:Npn \@@_sign_o:w ? \s_@@ \@@_chk:w #1#2\@@_sep: @ { \if_case:w #1 \exp_stop_f: \@@_case_return_same_o:w @@ -2072,9 +2083,9 @@ \or: \exp_after:wN \@@_sign_aux_o:w \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #1 #2; + \s_@@ \@@_chk:w #1 #2\@@_sep: } -\cs_new:Npn \@@_sign_aux_o:w \s_@@ \@@_chk:w #1 #2 #3 ; +\cs_new:Npn \@@_sign_aux_o:w \s_@@ \@@_chk:w #1 #2 #3 \@@_sep: { \exp_after:wN \@@_set_sign_o:w \exp_after:wN #2 \c_one_fp @ } % \end{macrocode} % \end{macro} @@ -2088,7 +2099,7 @@ % also expands after itself in the input stream, just like % \cs{@@_+_o:ww}. % \begin{macrocode} -\cs_new:Npn \@@_set_sign_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_set_sign_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \exp_after:wN \@@_exp_after_o:w \exp_after:wN \s_@@ @@ -2096,7 +2107,7 @@ \exp_after:wN #2 \int_value:w \if_case:w #3 \exp_stop_f: #1 \or: 1 \or: 0 \fi: \exp_stop_f: - #4; + #4\@@_sep: } % \end{macrocode} % \end{macro} @@ -2120,11 +2131,11 @@ } \cs_new:Npn \@@_tuple_set_sign_aux_o:Nnw #1#2 { \@@_tuple_map_o:nw \@@_tuple_set_sign_aux_o:w } -\cs_new:Npn \@@_tuple_set_sign_aux_o:w #1#2 ; +\cs_new:Npn \@@_tuple_set_sign_aux_o:w #1#2 \@@_sep: { \@@_change_func_type:NNN #1 \@@_set_sign_o:w \@@_parse_apply_unary_error:NNw - 2 #1 #2 ; @ + 2 #1 #2 \@@_sep: @ } % \end{macrocode} % \end{macro} @@ -2137,12 +2148,18 @@ % Importantly we need to dispatch according to the type, and we make % sure to apply the operator in the correct order. % \begin{macrocode} -\cs_new:cpn { @@_*_tuple_o:ww } #1 ; - { \@@_tuple_map_o:nw { \@@_binary_type_o:Nww * #1 ; } } -\cs_new:cpn { @@_tuple_*_o:ww } #1 ; #2 ; - { \@@_tuple_map_o:nw { \@@_binary_rev_type_o:Nww * #2 ; } #1 ; } -\cs_new:cpn { @@_tuple_/_o:ww } #1 ; #2 ; - { \@@_tuple_map_o:nw { \@@_binary_rev_type_o:Nww / #2 ; } #1 ; } +\cs_new:cpn { @@_*_tuple_o:ww } #1 \@@_sep: + { \@@_tuple_map_o:nw { \@@_binary_type_o:Nww * #1 \@@_sep: } } +\cs_new:cpn { @@_tuple_*_o:ww } #1 \@@_sep: #2 \@@_sep: + { + \@@_tuple_map_o:nw { \@@_binary_rev_type_o:Nww * #2 \@@_sep: } + #1 \@@_sep: + } +\cs_new:cpn { @@_tuple_/_o:ww } #1 \@@_sep: #2 \@@_sep: + { + \@@_tuple_map_o:nw { \@@_binary_rev_type_o:Nww / #2 \@@_sep: } + #1 \@@_sep: + } % \end{macrocode} % \end{macro} % @@ -2154,15 +2171,15 @@ \cs_set_protected:Npn \@@_tmp:w #1 { \cs_new:cpn { @@_tuple_#1_tuple_o:ww } - \s_@@_tuple \@@_tuple_chk:w ##1 ; - \s_@@_tuple \@@_tuple_chk:w ##2 ; + \s_@@_tuple \@@_tuple_chk:w ##1 \@@_sep: + \s_@@_tuple \@@_tuple_chk:w ##2 \@@_sep: { \int_compare:nNnTF { \@@_array_count:n {##1} } = { \@@_array_count:n {##2} } { \@@_tuple_mapthread_o:nww { \@@_binary_type_o:Nww #1 } } { \@@_invalid_operation_o:nww #1 } - \s_@@_tuple \@@_tuple_chk:w {##1} ; - \s_@@_tuple \@@_tuple_chk:w {##2} ; + \s_@@_tuple \@@_tuple_chk:w {##1} \@@_sep: + \s_@@_tuple \@@_tuple_chk:w {##2} \@@_sep: } } \@@_tmp:w + diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-convert.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-convert.dtx index 172f2c7ea25..085ebf40285 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-convert.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-convert.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -72,7 +72,7 @@ % representation. We loop through all items, putting |,~| between all % of them and making sure to remove the leading |,~|. % \begin{macrocode} -\cs_new:Npn \@@_tuple_convert:Nw #1 \s_@@_tuple \@@_tuple_chk:w #2 ; +\cs_new:Npn \@@_tuple_convert:Nw #1 \s_@@_tuple \@@_tuple_chk:w #2 \@@_sep: { \int_case:nnF { \@@_array_count:n {#2} } { @@ -81,14 +81,14 @@ } { \@@_tuple_convert_loop:nNw { } #1 - #2 { ? \@@_tuple_convert_end:w } ; + #2 { ? \@@_tuple_convert_end:w } \@@_sep: @ { \use_none:nn } } } -\cs_new:Npn \@@_tuple_convert_loop:nNw #1#2#3#4; #5 @ #6 +\cs_new:Npn \@@_tuple_convert_loop:nNw #1#2#3#4\@@_sep: #5 @ #6 { \use_none:n #3 - \exp_args:Nf \@@_tuple_convert_loop:nNw { #2 #3#4 ; } #2 #5 + \exp_args:Nf \@@_tuple_convert_loop:nNw { #2 #3#4 \@@_sep: } #2 #5 @ { #6 , ~ #1 } } \cs_new:Npn \@@_tuple_convert_end:w #1 @ #2 @@ -108,14 +108,17 @@ % which removes a trailing dot if any. We then clean-up with the % \texttt{end} auxiliary, keeping only the number. % \begin{macrocode} -\cs_new:Npn \@@_trim_zeros:w #1 ; +\cs_new:Npn \@@_trim_zeros:w #1 \@@_sep: { - \@@_trim_zeros_loop:w #1 - ; \@@_trim_zeros_loop:w 0; \@@_trim_zeros_dot:w .; \s_@@_stop + \@@_trim_zeros_loop:w #1 \@@_sep: + \@@_trim_zeros_loop:w 0\@@_sep: + \@@_trim_zeros_dot:w .\@@_sep: + \s_@@_stop } -\cs_new:Npn \@@_trim_zeros_loop:w #1 0; #2 { #2 #1 ; #2 } -\cs_new:Npn \@@_trim_zeros_dot:w #1 .; { \@@_trim_zeros_end:w #1 ; } -\cs_new:Npn \@@_trim_zeros_end:w #1 ; #2 \s_@@_stop { #1 } +\cs_new:Npn \@@_trim_zeros_loop:w #1 0\@@_sep: #2 { #2 #1 \@@_sep: #2 } +\cs_new:Npn \@@_trim_zeros_dot:w #1 .\@@_sep: + { \@@_trim_zeros_end:w #1 \@@_sep: } +\cs_new:Npn \@@_trim_zeros_end:w #1 \@@_sep: #2 \s_@@_stop { #1 } % \end{macrocode} % \end{macro} % \end{macro} @@ -148,9 +151,9 @@ #1 \@@_to_scientific:w \@@_to_scientific_recover:w #1 } -\cs_new:Npn \@@_to_scientific_recover:w #1 #2 ; +\cs_new:Npn \@@_to_scientific_recover:w #1 #2 \@@_sep: { - \@@_error:nffn { unknown-type } { \tl_to_str:n { #2 ; } } { } { } + \@@_error:nffn { unknown-type } { \tl_to_str:n { #2 \@@_sep: } } { } { } nan } \cs_new:Npn \@@_tuple_to_scientific:w @@ -201,14 +204,14 @@ \s_@@ \@@_chk:w #1 #2 } \cs_new:Npn \@@_to_scientific_normal:wnnnnn - \s_@@ \@@_chk:w 1 #1 #2 #3#4#5#6 ; + \s_@@ \@@_chk:w 1 #1 #2 #3#4#5#6 \@@_sep: { \exp_after:wN \@@_to_scientific_normal:wNw \exp_after:wN e \int_value:w \@@_int_eval:w #2 - 1 - ; #3 #4 #5 #6 ; + \@@_sep: #3 #4 #5 #6 \@@_sep: } -\cs_new:Npn \@@_to_scientific_normal:wNw #1 ; #2#3; +\cs_new:Npn \@@_to_scientific_normal:wNw #1 \@@_sep: #2#3\@@_sep: { #2.#3 #1 } % \end{macrocode} % \end{macro} @@ -242,9 +245,9 @@ #1 \@@_to_decimal:w \@@_to_decimal_recover:w #1 } -\cs_new:Npn \@@_to_decimal_recover:w #1 #2 ; +\cs_new:Npn \@@_to_decimal_recover:w #1 #2 \@@_sep: { - \@@_error:nffn { unknown-type } { \tl_to_str:n { #2 ; } } { } { } + \@@_error:nffn { unknown-type } { \tl_to_str:n { #2 \@@_sep: } } { } { } nan } \cs_new:Npn \@@_tuple_to_decimal:w @@ -297,7 +300,7 @@ \s_@@ \@@_chk:w #1 #2 } \cs_new:Npn \@@_to_decimal_normal:wnnnnn - \s_@@ \@@_chk:w 1 #1 #2 #3#4#5#6 ; + \s_@@ \@@_chk:w 1 #1 #2 #3#4#5#6 \@@_sep: { \int_compare:nNnTF {#2} > 0 { @@ -309,7 +312,7 @@ { \exp_after:wN \exp_after:wN \exp_after:wN \@@_to_decimal_huge:wnnnn - \prg_replicate:nn { #2 - \c_@@_prec_int } { 0 } ; + \prg_replicate:nn { #2 - \c_@@_prec_int } { 0 } \@@_sep: } {#3} {#4} {#5} {#6} } @@ -318,19 +321,19 @@ \exp_after:wN 0 \exp_after:wN . \exp:w \exp_end_continue_f:w \prg_replicate:nn { - #2 } { 0 } - #3#4#5#6 ; + #3#4#5#6 \@@_sep: } } -\cs_new:Npn \@@_to_decimal_large:Nnnw #1#2#3#4; +\cs_new:Npn \@@_to_decimal_large:Nnnw #1#2#3#4\@@_sep: { \exp_after:wN \@@_trim_zeros:w \int_value:w \if_int_compare:w #2 > \c_zero_int #2 \fi: \exp_stop_f: - #3.#4 ; + #3.#4 \@@_sep: } -\cs_new:Npn \@@_to_decimal_huge:wnnnn #1; #2#3#4#5 { #2#3#4#5 #1 } +\cs_new:Npn \@@_to_decimal_huge:wnnnn #1\@@_sep: #2#3#4#5 { #2#3#4#5 #1 } % \end{macrocode} % \end{macro} % @@ -355,9 +358,9 @@ % \begin{macrocode} \cs_new:Npn \@@_to_tl_dispatch:w #1 { \@@_change_func_type:NNN #1 \@@_to_tl:w \@@_to_tl_recover:w #1 } -\cs_new:Npn \@@_to_tl_recover:w #1 #2 ; +\cs_new:Npn \@@_to_tl_recover:w #1 #2 \@@_sep: { - \@@_error:nffn { unknown-type } { \tl_to_str:n { #2 ; } } { } { } + \@@_error:nffn { unknown-type } { \tl_to_str:n { #2 \@@_sep: } } { } { } nan } \cs_new:Npn \@@_tuple_to_tl:w @@ -395,15 +398,15 @@ \s_@@ \@@_chk:w 1 0 {#1} } \cs_new:Npn \@@_to_tl_scientific:wnnnnn - \s_@@ \@@_chk:w 1 #1 #2 #3#4#5#6 ; + \s_@@ \@@_chk:w 1 #1 #2 #3#4#5#6 \@@_sep: { \exp_after:wN \@@_to_tl_scientific:wNw \exp_after:wN e \int_value:w \@@_int_eval:w #2 - 1 - ; #3 #4 #5 #6 ; + \@@_sep: #3 #4 #5 #6 \@@_sep: } -\cs_new:Npn \@@_to_tl_scientific:wNw #1 ; #2#3; - { \@@_trim_zeros:w #2.#3 ; #1 } +\cs_new:Npn \@@_to_tl_scientific:wNw #1 \@@_sep: #2#3\@@_sep: + { \@@_trim_zeros:w #2.#3 \@@_sep: #1 } % \end{macrocode} % \end{macro} % @@ -431,14 +434,14 @@ \exp_after:wN \@@_to_dim_dispatch:w \exp:w \exp_end_continue_f:w \@@_parse:n } -\cs_new:Npn \@@_to_dim_dispatch:w #1#2 ; +\cs_new:Npn \@@_to_dim_dispatch:w #1#2 \@@_sep: { \@@_change_func_type:NNN #1 \@@_to_dim:w \@@_to_dim_recover:w - #1 #2 ; + #1 #2 \@@_sep: } \cs_new:Npn \@@_to_dim_recover:w #1 { \@@_invalid_operation:nnw { 0pt } { fp_to_dim } } -\cs_new:Npn \@@_to_dim:w #1 ; { \@@_to_decimal:w #1 ; pt } +\cs_new:Npn \@@_to_dim:w #1 \@@_sep: { \@@_to_decimal:w #1 \@@_sep: pt } % \end{macrocode} % \end{macro} % \end{macro} @@ -459,17 +462,17 @@ \exp_after:wN \@@_to_int_dispatch:w \exp:w \exp_end_continue_f:w \@@_parse:n } -\cs_new:Npn \@@_to_int_dispatch:w #1#2 ; +\cs_new:Npn \@@_to_int_dispatch:w #1#2 \@@_sep: { \@@_change_func_type:NNN #1 \@@_to_int:w \@@_to_int_recover:w - #1 #2 ; + #1 #2 \@@_sep: } \cs_new:Npn \@@_to_int_recover:w #1 { \@@_invalid_operation:nnw { 0 } { fp_to_int } } -\cs_new:Npn \@@_to_int:w #1; +\cs_new:Npn \@@_to_int:w #1\@@_sep: { \exp_after:wN \@@_to_decimal:w \exp:w \exp_end_continue_f:w - \@@_round:Nwn \@@_round_to_nearest:NNN #1; { 0 } + \@@_round:Nwn \@@_round_to_nearest:NNN #1\@@_sep: { 0 } } % \end{macrocode} % \end{macro} @@ -490,7 +493,7 @@ % points), then multiplied by $2^{-16} = 0.0000152587890625$ to give a % value expressed in points. The auxiliary \cs{@@_mul_npos_o:Nww} % expects the desired \meta{final sign} and two floating point -% operands (of the form \cs{s_@@} \ldots{} |;|) as arguments. +% operands (of the form \cs{s_@@} \ldots{} \cs{@@_sep:}) as arguments. % This set of functions is also used to convert dimension registers to % floating points while parsing expressions: in this context there is % an additional exponent, which is the first argument of @@ -504,7 +507,7 @@ \exp_after:wN \@@_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \int_value:w \tex_glueexpr:D #1 ; + \int_value:w \tex_glueexpr:D #1 \@@_sep: } \cs_new:Npn \@@_from_dim_test:ww #1, #2 { @@ -520,18 +523,18 @@ \fi: \fi: } -\cs_new:Npn \@@_from_dim:wNw #1,#2#3; +\cs_new:Npn \@@_from_dim:wNw #1,#2#3\@@_sep: { - \@@_pack_twice_four:wNNNNNNNN \@@_from_dim:wNNnnnnnn ; - #3 000 0000 00 {10}987654321; #2 {#1} + \@@_pack_twice_four:wNNNNNNNN \@@_from_dim:wNNnnnnnn \@@_sep: + #3 000 0000 00 {10}987654321\@@_sep: #2 {#1} } -\cs_new:Npn \@@_from_dim:wNNnnnnnn #1; #2#3#4#5#6#7#8#9 - { \@@_from_dim:wnnnnwNn #1 {#2#300} {0000} ; } -\cs_new:Npn \@@_from_dim:wnnnnwNn #1; #2#3#4#5#6; #7#8 +\cs_new:Npn \@@_from_dim:wNNnnnnnn #1\@@_sep: #2#3#4#5#6#7#8#9 + { \@@_from_dim:wnnnnwNn #1 {#2#300} {0000} \@@_sep: } +\cs_new:Npn \@@_from_dim:wnnnnwNn #1\@@_sep: #2#3#4#5#6\@@_sep: #7#8 { \@@_mul_npos_o:Nww #7 - \s_@@ \@@_chk:w 1 #7 {#5} #1 ; - \s_@@ \@@_chk:w 1 0 {#8} {1525} {8789} {0625} {0000} ; + \s_@@ \@@_chk:w 1 #7 {#5} #1 \@@_sep: + \s_@@ \@@_chk:w 1 0 {#8} {1525} {8789} {0625} {0000} \@@_sep: \prg_do_nothing: } % \end{macrocode} @@ -603,16 +606,16 @@ { \exp_last_unbraced:Ne \use_ii:nn { - \@@_array_to_clist_loop:Nw #1 { ? \prg_break: } ; + \@@_array_to_clist_loop:Nw #1 { ? \prg_break: } \@@_sep: \prg_break_point: } } } -\cs_new:Npn \@@_array_to_clist_loop:Nw #1#2; +\cs_new:Npn \@@_array_to_clist_loop:Nw #1#2\@@_sep: { \use_none:n #1 , ~ - \exp_not:f { \@@_to_tl_dispatch:w #1 #2 ; } + \exp_not:f { \@@_to_tl_dispatch:w #1 #2 \@@_sep: } \@@_array_to_clist_loop:Nw } % \end{macrocode} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-expo.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-expo.dtx index e3b9f5c9a83..39fd6e3dc94 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-expo.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-expo.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -135,15 +135,24 @@ % Those are needed in the implementation. It turns out that we don't % need the value of $\ln(5)$. % \begin{macrocode} -\tl_const:Nn \c_@@_ln_i_fixed_tl { {0000}{0000}{0000}{0000}{0000}{0000};} -\tl_const:Nn \c_@@_ln_ii_fixed_tl { {6931}{4718}{0559}{9453}{0941}{7232};} -\tl_const:Nn \c_@@_ln_iii_fixed_tl {{10986}{1228}{8668}{1096}{9139}{5245};} -\tl_const:Nn \c_@@_ln_iv_fixed_tl {{13862}{9436}{1119}{8906}{1883}{4464};} -\tl_const:Nn \c_@@_ln_vi_fixed_tl {{17917}{5946}{9228}{0550}{0081}{2477};} -\tl_const:Nn \c_@@_ln_vii_fixed_tl {{19459}{1014}{9055}{3133}{0510}{5353};} -\tl_const:Nn \c_@@_ln_viii_fixed_tl{{20794}{4154}{1679}{8359}{2825}{1696};} -\tl_const:Nn \c_@@_ln_ix_fixed_tl {{21972}{2457}{7336}{2193}{8279}{0490};} -\tl_const:Nn \c_@@_ln_x_fixed_tl {{23025}{8509}{2994}{0456}{8401}{7991};} +\tl_const:Nn \c_@@_ln_i_fixed_tl + { {0000}{0000}{0000}{0000}{0000}{0000}\@@_sep:} +\tl_const:Nn \c_@@_ln_ii_fixed_tl + { {6931}{4718}{0559}{9453}{0941}{7232}\@@_sep:} +\tl_const:Nn \c_@@_ln_iii_fixed_tl + {{10986}{1228}{8668}{1096}{9139}{5245}\@@_sep:} +\tl_const:Nn \c_@@_ln_iv_fixed_tl + {{13862}{9436}{1119}{8906}{1883}{4464}\@@_sep:} +\tl_const:Nn \c_@@_ln_vi_fixed_tl + {{17917}{5946}{9228}{0550}{0081}{2477}\@@_sep:} +\tl_const:Nn \c_@@_ln_vii_fixed_tl + {{19459}{1014}{9055}{3133}{0510}{5353}\@@_sep:} +\tl_const:Nn \c_@@_ln_viii_fixed_tl + {{20794}{4154}{1679}{8359}{2825}{1696}\@@_sep:} +\tl_const:Nn \c_@@_ln_ix_fixed_tl + {{21972}{2457}{7336}{2193}{8279}{0490}\@@_sep:} +\tl_const:Nn \c_@@_ln_x_fixed_tl + {{23025}{8509}{2994}{0456}{8401}{7991}\@@_sep:} % \end{macrocode} % \end{variable} % @@ -156,7 +165,7 @@ % $+\infty$ or a \texttt{nan} is itself. Positive normal numbers call % \cs{@@_ln_npos_o:w}. % \begin{macrocode} -\cs_new:Npn \@@_ln_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_ln_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_meaning:w 2 #3 \@@_case_use:nw { \@@_invalid_operation_o:nw { ln } } @@ -168,7 +177,7 @@ \else: \@@_case_return_same_o:w \fi: - \@@_ln_npos_o:w \s_@@ \@@_chk:w #2#3#4; + \@@_ln_npos_o:w \s_@@ \@@_chk:w #2#3#4\@@_sep: } % \end{macrocode} % \end{macro} @@ -180,7 +189,7 @@ % In all other cases, the final result is at least $10^{-4}$, and % then an error of $0.5\cdot 10^{-20}$ is acceptable. % \begin{macrocode} -\cs_new:Npn \@@_ln_npos_o:w \s_@@ \@@_chk:w 10#1#2#3; +\cs_new:Npn \@@_ln_npos_o:w \s_@@ \@@_chk:w 10#1#2#3\@@_sep: { %^^A todo: ln(1) should be "exact zero", not "underflow" \exp_after:wN \@@_sanitize:Nw \int_value:w % for the overall sign @@ -203,7 +212,7 @@ % \end{syntax} % This function expands to % \begin{syntax} -% \meta{continuation} \Arg{Y_1} \Arg{Y_2} \Arg{Y_3} \Arg{Y_4} \Arg{Y_5} \Arg{Y_6} |;| +% \meta{continuation} \Arg{Y_1} \Arg{Y_2} \Arg{Y_3} \Arg{Y_4} \Arg{Y_5} \Arg{Y_6} \cs{@@_sep:} % \end{syntax} % where $Y = - \ln(X)$ as an extended fixed point. % \begin{macrocode} @@ -225,7 +234,7 @@ \or: 2 \else: 1 \fi: - ; { #1 #2 #3 #4 } + \@@_sep: { #1 #2 #3 #4 } } % \end{macrocode} % \end{macro} @@ -234,7 +243,7 @@ % We have thus found $c \in [1,10]$ such that $0.7\leq ac < 1.4$ % in all cases. Compute $ 1 + x = 1 + ac \in [1.7,2.4)$. % \begin{macrocode} -\cs_new:Npn \@@_ln_x_ii:wnnnn #1; #2#3#4#5 +\cs_new:Npn \@@_ln_x_ii:wnnnn #1\@@_sep: #2#3#4#5 { \exp_after:wN \@@_ln_div_after:Nw \cs:w c_@@_ln_ \@@_int_to_roman:w #1 _fixed_tl \exp_after:wN \cs_end: @@ -244,14 +253,14 @@ \exp_after:wN \@@_ln_x_iii_var:NNNNNw \int_value:w \@@_int_eval:w 9999 9990 + #1*#2#3 + \exp_after:wN \@@_ln_x_iii:NNNNNNw - \int_value:w \@@_int_eval:w 10 0000 0000 + #1*#4#5 ; + \int_value:w \@@_int_eval:w 10 0000 0000 + #1*#4#5 \@@_sep: {20000} {0000} {0000} {0000} } %^^A todo: reoptimize (a generalization attempt failed). -\cs_new:Npn \@@_ln_x_iii:NNNNNNw #1#2 #3#4#5#6 #7; - { #1#2; {#3#4#5#6} {#7} } -\cs_new:Npn \@@_ln_x_iii_var:NNNNNw #1 #2#3#4#5 #6; +\cs_new:Npn \@@_ln_x_iii:NNNNNNw #1#2 #3#4#5#6 #7\@@_sep: + { #1#2\@@_sep: {#3#4#5#6} {#7} } +\cs_new:Npn \@@_ln_x_iii_var:NNNNNw #1 #2#3#4#5 #6\@@_sep: { - #1#2#3#4#5 + 1 ; + #1#2#3#4#5 + 1 \@@_sep: {#1#2#3#4#5} {#6} } % \end{macrocode} @@ -322,16 +331,16 @@ % ^^A todo: doc % % \begin{syntax} -% \cs{@@_ln_x_iv:wnnnnnnnn} \meta{1 or 2} \meta{8d} |;| \Arg{4d} \Arg{4d} \meta{fixed-tl} +% \cs{@@_ln_x_iv:wnnnnnnnn} \meta{1 or 2} \meta{8d} \cs{@@_sep:} \Arg{4d} \Arg{4d} \meta{fixed-tl} % \end{syntax} % The number is $x$. Compute $y$ by adding 1 to the five first digits. % \begin{macrocode} -\cs_new:Npn \@@_ln_x_iv:wnnnnnnnn #1; #2#3#4#5 #6#7#8#9 +\cs_new:Npn \@@_ln_x_iv:wnnnnnnnn #1\@@_sep: #2#3#4#5 #6#7#8#9 { \exp_after:wN \@@_div_significand_pack:NNN \int_value:w \@@_int_eval:w - \@@_ln_div_i:w #1 ; - #6 #7 ; {#8} {#9} + \@@_ln_div_i:w #1 \@@_sep: + #6 #7 \@@_sep: {#8} {#9} {#2} {#3} {#4} {#5} { \exp_after:wN \@@_ln_div_ii:wwn \int_value:w #1 } { \exp_after:wN \@@_ln_div_ii:wwn \int_value:w #1 } @@ -339,23 +348,25 @@ { \exp_after:wN \@@_ln_div_ii:wwn \int_value:w #1 } { \exp_after:wN \@@_ln_div_vi:wwn \int_value:w #1 } } -\cs_new:Npn \@@_ln_div_i:w #1; +\cs_new:Npn \@@_ln_div_i:w #1\@@_sep: { \exp_after:wN \@@_div_significand_calc:wwnnnnnnn - \int_value:w \@@_int_eval:w 999999 + 2 0000 0000 / #1 ; % Q1 + \int_value:w \@@_int_eval:w 999999 + 2 0000 0000 / #1 \@@_sep: % Q1 } -\cs_new:Npn \@@_ln_div_ii:wwn #1; #2;#3 % y; B1;B2 <- for k=1 +\cs_new:Npn \@@_ln_div_ii:wwn + #1\@@_sep: #2\@@_sep:#3 % y\@@_sep: B1\@@_sep:B2 <- for k=1 { \exp_after:wN \@@_div_significand_pack:NNN \int_value:w \@@_int_eval:w \exp_after:wN \@@_div_significand_calc:wwnnnnnnn - \int_value:w \@@_int_eval:w 999999 + #2 #3 / #1 ; % Q2 - #2 #3 ; + \int_value:w \@@_int_eval:w 999999 + #2 #3 / #1 \@@_sep: % Q2 + #2 #3 \@@_sep: } -\cs_new:Npn \@@_ln_div_vi:wwn #1; #2;#3#4#5 #6#7#8#9 %y;F1;F2F3F4x1x2x3x4 +\cs_new:Npn \@@_ln_div_vi:wwn + #1\@@_sep: #2\@@_sep:#3#4#5 #6#7#8#9 %y\@@_sep:F1\@@_sep:F2F3F4x1x2x3x4 { \exp_after:wN \@@_div_significand_pack:NNN - \int_value:w \@@_int_eval:w 1000000 + #2 #3 / #1 ; % Q6 + \int_value:w \@@_int_eval:w 1000000 + #2 #3 / #1 \@@_sep: % Q6 } % \end{macrocode} % We now have essentially @@ -368,8 +379,8 @@ % \cs{@@_div_significand_pack:NNN} $10^6 + Q_{3}$ % \cs{@@_div_significand_pack:NNN} $10^6 + Q_{4}$ % \cs{@@_div_significand_pack:NNN} $10^6 + Q_{5}$ -% \cs{@@_div_significand_pack:NNN} $10^6 + Q_{6}$ |;| -% \meta{exponent} |;| \meta{continuation} +% \cs{@@_div_significand_pack:NNN} $10^6 + Q_{6}$ \cs{@@_sep:} +% \meta{exponent} \cs{@@_sep:} \meta{continuation} % \end{syntax} % where \meta{fixed tl} holds the logarithm of a number % in $[1,10]$, and \meta{exponent} is @@ -378,8 +389,9 @@ % correct order to add the $Q_{i}$ together and put semicolons % between each piece. Once those have been expanded, we get % \begin{syntax} -% \cs{@@_ln_div_after:Nw} \meta{fixed-tl} \meta{1d} |;| \meta{4d} |;| \meta{4d} |;| -% ~~\meta{4d} |;| \meta{4d} |;| \meta{4d} |;| \meta{4d} |;| \meta{exponent} |;| +% \cs{@@_ln_div_after:Nw} \meta{fixed-tl} \meta{1d} \cs{@@_sep:} \meta{4d} \cs{@@_sep:} +% ~~\meta{4d} \cs{@@_sep:} \meta{4d} \cs{@@_sep:} \meta{4d} \cs{@@_sep:} \meta{4d} \cs{@@_sep:} +% ~~\meta{4d} \cs{@@_sep:} \meta{exponent} \cs{@@_sep:} % \end{syntax} % ^^A todo: redoc. % Just as with division, we know that the first two digits @@ -388,7 +400,7 @@ % We then compute $1-2/(x+1)$, after testing whether $2/(x+1)$ is % greater than or smaller than $1$. % \begin{macrocode} -\cs_new:Npn \@@_ln_div_after:Nw #1#2; +\cs_new:Npn \@@_ln_div_after:Nw #1#2\@@_sep: { \if_meaning:w 0 #2 \exp_after:wN \@@_ln_t_small:Nw @@ -398,31 +410,35 @@ \fi: #1 } -\cs_new:Npn \@@_ln_t_small:Nw #1 #2; #3; #4; #5; #6; #7; +\cs_new:Npn \@@_ln_t_small:Nw + #1 #2\@@_sep: #3\@@_sep: #4\@@_sep: #5\@@_sep: #6\@@_sep: #7\@@_sep: { \exp_after:wN \@@_ln_t_large:NNw \exp_after:wN + % <sign> \exp_after:wN #1 - \int_value:w \@@_int_eval:w 9999 - #2 \exp_after:wN ; - \int_value:w \@@_int_eval:w 9999 - #3 \exp_after:wN ; - \int_value:w \@@_int_eval:w 9999 - #4 \exp_after:wN ; - \int_value:w \@@_int_eval:w 9999 - #5 \exp_after:wN ; - \int_value:w \@@_int_eval:w 9999 - #6 \exp_after:wN ; - \int_value:w \@@_int_eval:w 1 0000 - #7 ; + \int_value:w \@@_int_eval:w 9999 - #2 \exp_after:wN \@@_sep: + \int_value:w \@@_int_eval:w 9999 - #3 \exp_after:wN \@@_sep: + \int_value:w \@@_int_eval:w 9999 - #4 \exp_after:wN \@@_sep: + \int_value:w \@@_int_eval:w 9999 - #5 \exp_after:wN \@@_sep: + \int_value:w \@@_int_eval:w 9999 - #6 \exp_after:wN \@@_sep: + \int_value:w \@@_int_eval:w 1 0000 - #7 \@@_sep: } % \end{macrocode} % % \begin{syntax} % \cs{@@_ln_t_large:NNw} \meta{sign} \meta{fixed tl} -% ~~\meta{t_1}|;| \meta{t_2} |;| \meta{t_3}|;| \meta{t_4}|;| \meta{t_5} |;| \meta{t_6}|;| -% ~~\meta{exponent} |;| \meta{continuation} +% ~~\meta{t_1}\cs{@@_sep:} \meta{t_2} \cs{@@_sep:} \meta{t_3}\cs{@@_sep:} \meta{t_4} +% ~~\cs{@@_sep:} \meta{t_5} \cs{@@_sep:} \meta{t_6}\cs{@@_sep:} +% ~~\meta{exponent} \cs{@@_sep:} \meta{continuation} % \end{syntax} % Compute the square $|t|^2$, and keep $|t|$ at the end with its % sign. We know that $|t|<0.1765$, so every piece has at most $4$ % digits. However, since we were not careful in \cs{@@_ln_t_small:w}, % they can have less than $4$ digits. % \begin{macrocode} -\cs_new:Npn \@@_ln_t_large:NNw #1 #2 #3; #4; #5; #6; #7; #8; +\cs_new:Npn \@@_ln_t_large:NNw + #1 #2 + #3\@@_sep: #4\@@_sep: #5\@@_sep: #6\@@_sep: #7\@@_sep: #8\@@_sep: { \exp_after:wN \@@_ln_square_t_after:w \int_value:w \@@_int_eval:w 9999 0000 + #3*#3 @@ -436,7 +452,7 @@ \int_value:w \@@_int_eval:w 1 0000 0000 + 2*#3*#7 + 2*#4*#6 + #5*#5 + (2*#3*#8 + 2*#4*#7 + 2*#5*#6) / 1 0000 - % ; ; ; + % \@@_sep: \@@_sep: \@@_sep: \exp_after:wN \@@_ln_twice_t_after:w \int_value:w \@@_int_eval:w -1 + 2*#3 \exp_after:wN \@@_ln_twice_t_pack:Nw @@ -448,15 +464,16 @@ \exp_after:wN \@@_ln_twice_t_pack:Nw \int_value:w \@@_int_eval:w 9999 + 2*#7 \exp_after:wN \@@_ln_twice_t_pack:Nw - \int_value:w \@@_int_eval:w 10000 + 2*#8 ; ; + \int_value:w \@@_int_eval:w 10000 + 2*#8 \@@_sep: \@@_sep: { \@@_ln_c:NwNw #1 } #2 } -\cs_new:Npn \@@_ln_twice_t_pack:Nw #1 #2; { + #1 ; {#2} } -\cs_new:Npn \@@_ln_twice_t_after:w #1; { ;;; {#1} } -\cs_new:Npn \@@_ln_square_t_pack:NNNNNw #1 #2#3#4#5 #6; - { + #1#2#3#4#5 ; {#6} } -\cs_new:Npn \@@_ln_square_t_after:w 1 0 #1#2#3 #4; +\cs_new:Npn \@@_ln_twice_t_pack:Nw #1 #2\@@_sep: { + #1 \@@_sep: {#2} } +\cs_new:Npn \@@_ln_twice_t_after:w #1\@@_sep: + { \@@_sep:\@@_sep:\@@_sep: {#1} } +\cs_new:Npn \@@_ln_square_t_pack:NNNNNw #1 #2#3#4#5 #6\@@_sep: + { + #1#2#3#4#5 \@@_sep: {#6} } +\cs_new:Npn \@@_ln_square_t_after:w 1 0 #1#2#3 #4\@@_sep: { \@@_ln_Taylor:wwNw {0#1#2#3} {#4} } % \end{macrocode} % \end{macro} @@ -465,10 +482,10 @@ % Denoting $T=t^2$, we get % \begin{syntax} % \cs{@@_ln_Taylor:wwNw} -% ~~\Arg{T_1} \Arg{T_2} \Arg{T_3} \Arg{T_4} \Arg{T_5} \Arg{T_6} |;| |;| -% ~~\Arg{(2t)_1} \Arg{(2t)_2} \Arg{(2t)_3} \Arg{(2t)_4} \Arg{(2t)_5} \Arg{(2t)_6} |;| +% ~~\Arg{T_1} \Arg{T_2} \Arg{T_3} \Arg{T_4} \Arg{T_5} \Arg{T_6} \cs{@@_sep:} \cs{@@_sep:} +% ~~\Arg{(2t)_1} \Arg{(2t)_2} \Arg{(2t)_3} \Arg{(2t)_4} \Arg{(2t)_5} \Arg{(2t)_6} \cs{@@_sep:} % ~~|{| \cs{@@_ln_c:NwNw} \meta{sign} |}| -% ~~\meta{fixed tl} \meta{exponent} |;| \meta{continuation} +% ~~\meta{fixed tl} \meta{exponent} \cs{@@_sep:} \meta{continuation} % \end{syntax} % And we want to compute % \[ @@ -491,26 +508,30 @@ % (${}<10^4$). % \begin{macrocode} \cs_new:Npn \@@_ln_Taylor:wwNw - { \@@_ln_Taylor_loop:www 21 ; {0000}{0000}{0000}{0000}{0000}{0000} ; } -\cs_new:Npn \@@_ln_Taylor_loop:www #1; #2; #3; + { + \@@_ln_Taylor_loop:www + 21 \@@_sep: {0000}{0000}{0000}{0000}{0000}{0000} \@@_sep: + } +\cs_new:Npn \@@_ln_Taylor_loop:www #1\@@_sep: #2\@@_sep: #3\@@_sep: { \if_int_compare:w #1 = \c_one_int \@@_ln_Taylor_break:w \fi: - \exp_after:wN \@@_fixed_div_int:wwN \c_@@_one_fixed_tl #1; - \@@_fixed_add:wwn #2; - \@@_fixed_mul:wwn #3; + \exp_after:wN \@@_fixed_div_int:wwN \c_@@_one_fixed_tl #1\@@_sep: + \@@_fixed_add:wwn #2\@@_sep: + \@@_fixed_mul:wwn #3\@@_sep: { \exp_after:wN \@@_ln_Taylor_loop:www - \int_value:w \@@_int_eval:w #1 - 2 ; + \int_value:w \@@_int_eval:w #1 - 2 \@@_sep: } - #3; + #3\@@_sep: } -\cs_new:Npn \@@_ln_Taylor_break:w \fi: #1 \@@_fixed_add:wwn #2#3; #4 ;; +\cs_new:Npn \@@_ln_Taylor_break:w + \fi: #1 \@@_fixed_add:wwn #2#3\@@_sep: #4 \@@_sep:\@@_sep: { \fi: \exp_after:wN \@@_fixed_mul:wwn - \exp_after:wN { \int_value:w \@@_int_eval:w 10000 + #2 } #3; + \exp_after:wN { \int_value:w \@@_int_eval:w 10000 + #2 } #3\@@_sep: } % \end{macrocode} % \end{macro} @@ -518,8 +539,8 @@ % \begin{macro}{\@@_ln_c:NwNw} % \begin{syntax} % \cs{@@_ln_c:NwNw} \meta{sign} -% ~~\Arg{r_1} \Arg{r_2} \Arg{r_3} \Arg{r_4} \Arg{r_5} \Arg{r_6} |;| -% ~~\meta{fixed tl} \meta{exponent} |;| \meta{continuation} +% ~~\Arg{r_1} \Arg{r_2} \Arg{r_3} \Arg{r_4} \Arg{r_5} \Arg{r_6} \cs{@@_sep:} +% ~~\meta{fixed tl} \meta{exponent} \cs{@@_sep:} \meta{continuation} % \end{syntax} % We are now reduced to finding $\ln(c)$ and $\meta{exponent}\ln(10)$ % in a table, and adding it to the mixture. The first step is to @@ -530,14 +551,14 @@ % is $1$ and $c=1$, we shift to working in units of $\cdot 10^4$, % since the final result is at least $\ln(10/7) \simeq 0.35$. % \begin{macrocode} -\cs_new:Npn \@@_ln_c:NwNw #1 #2; #3 +\cs_new:Npn \@@_ln_c:NwNw #1 #2\@@_sep: #3 { \if_meaning:w + #1 \exp_after:wN \exp_after:wN \exp_after:wN \@@_fixed_sub:wwn \else: \exp_after:wN \exp_after:wN \exp_after:wN \@@_fixed_add:wwn \fi: - #3 #2 ; + #3 #2 \@@_sep: } % \end{macrocode} % \end{macro} @@ -545,7 +566,7 @@ % \begin{macro}{\@@_ln_exponent:wn} % \begin{syntax} % \cs{@@_ln_exponent:wn} -% ~~\Arg{s_1} \Arg{s_2} \Arg{s_3} \Arg{s_4} \Arg{s_5} \Arg{s_6} |;| +% ~~\Arg{s_1} \Arg{s_2} \Arg{s_3} \Arg{s_4} \Arg{s_5} \Arg{s_6} \cs{@@_sep:} % ~~\Arg{exponent} % \end{syntax} % Compute \meta{exponent} times $\ln(10)$. Apart from the cases where @@ -559,7 +580,7 @@ % Besides, we already have addition and subtraction for $24$ digits % fixed point numbers. % \begin{macrocode} -\cs_new:Npn \@@_ln_exponent:wn #1; #2 +\cs_new:Npn \@@_ln_exponent:wn #1\@@_sep: #2 { \if_case:w #2 \exp_stop_f: 0 \@@_case_return:nw { \@@_fixed_to_float_o:Nw 2 } @@ -576,16 +597,16 @@ \exp_after:wN \@@_fixed_add:wwn \int_value:w - \fi: \fi: - #2; #1; + #2\@@_sep: #1\@@_sep: } % \end{macrocode} % Now we painfully write all the cases.\footnote{Bruno: do rounding.} % No overflow nor underflow can happen, except when computing \texttt{ln(1)}. % \begin{macrocode} -\cs_new:Npn \@@_ln_exponent_one:ww 1; #1; +\cs_new:Npn \@@_ln_exponent_one:ww 1\@@_sep: #1\@@_sep: { 0 - \exp_after:wN \@@_fixed_sub:wwn \c_@@_ln_x_fixed_tl #1; + \exp_after:wN \@@_fixed_sub:wwn \c_@@_ln_x_fixed_tl #1\@@_sep: \@@_fixed_to_float_o:wN 0 } % \end{macrocode} @@ -594,14 +615,14 @@ % in the conversion from fixed point to floating point). Note that here % the exponent has been made positive. % \begin{macrocode} -\cs_new:Npn \@@_ln_exponent_small:NNww #1#2#3; #4#5#6#7#8#9; +\cs_new:Npn \@@_ln_exponent_small:NNww #1#2#3\@@_sep: #4#5#6#7#8#9\@@_sep: { 4 \exp_after:wN \@@_fixed_mul:wwn \c_@@_ln_x_fixed_tl - {#3}{0000}{0000}{0000}{0000}{0000} ; + {#3}{0000}{0000}{0000}{0000}{0000} \@@_sep: #2 - {0000}{#4}{#5}{#6}{#7}{#8}; + {0000}{#4}{#5}{#6}{#7}{#8}\@@_sep: \@@_fixed_to_float_o:wN #1 } % \end{macrocode} @@ -613,7 +634,7 @@ % % \begin{macro}[EXP]{\@@_exp_o:w} % \begin{macrocode} -\cs_new:Npn \@@_exp_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_exp_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_return_o:Nw \c_one_fp @@ -630,7 +651,7 @@ \or: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2#3#4; + \s_@@ \@@_chk:w #2#3#4\@@_sep: } % \end{macrocode} % \end{macro} @@ -645,7 +666,7 @@ \@@_exp_pos_o:NNwnw - \@@_fixed_inv_to_float_o:wN \fi: } -\cs_new:Npn \@@_exp_pos_o:NNwnw #1#2#3 \fi: #4#5; +\cs_new:Npn \@@_exp_pos_o:NNwnw #1#2#3 \fi: #4#5\@@_sep: { \fi: \if_int_compare:w #4 > \c_@@_max_exp_exponent_int @@ -696,33 +717,33 @@ % delimited by a semicolon, form a fixed point number, so we pack it % in blocks of $4$ digits. % \begin{macrocode} -\cs_new:Npn \@@_exp_Taylor:Nnnwn #1#2#3 #4; #5 #6 +\cs_new:Npn \@@_exp_Taylor:Nnnwn #1#2#3 #4\@@_sep: #5 #6 { #6 \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_exp_Taylor_ii:ww - ; #2#3#4 0000 0000 ; + \@@_sep: #2#3#4 0000 0000 \@@_sep: } -\cs_new:Npn \@@_exp_Taylor_ii:ww #1; #2; - { \@@_exp_Taylor_loop:www 10 ; #1 ; #1 ; \s_@@_stop } -\cs_new:Npn \@@_exp_Taylor_loop:www #1; #2; #3; +\cs_new:Npn \@@_exp_Taylor_ii:ww #1\@@_sep: #2\@@_sep: + { \@@_exp_Taylor_loop:www 10 \@@_sep: #1 \@@_sep: #1 \@@_sep: \s_@@_stop } +\cs_new:Npn \@@_exp_Taylor_loop:www #1\@@_sep: #2\@@_sep: #3\@@_sep: { \if_int_compare:w #1 = \c_one_int \exp_after:wN \@@_exp_Taylor_break:Nww \fi: - \@@_fixed_div_int:wwN #3 ; #1 ; + \@@_fixed_div_int:wwN #3 \@@_sep: #1 \@@_sep: \@@_fixed_add_one:wN - \@@_fixed_mul:wwn #2 ; + \@@_fixed_mul:wwn #2 \@@_sep: { \exp_after:wN \@@_exp_Taylor_loop:www - \int_value:w \@@_int_eval:w #1 - 1 ; - #2 ; + \int_value:w \@@_int_eval:w #1 - 1 \@@_sep: + #2 \@@_sep: } } -\cs_new:Npn \@@_exp_Taylor_break:Nww #1 #2; #3 \s_@@_stop - { \@@_fixed_add_one:wN #2 ; } +\cs_new:Npn \@@_exp_Taylor_break:Nww #1 #2\@@_sep: #3 \s_@@_stop + { \@@_fixed_add_one:wN #2 \@@_sep: } % \end{macrocode} % \end{macro} % \end{macro} @@ -824,23 +845,23 @@ % on to the Taylor series, eventually multiplied with the mantissa % that we have just computed. % \begin{macrocode} -\cs_new:Npn \@@_exp_pos_large:NnnNwn #1#2#3 #4#5; #6 +\cs_new:Npn \@@_exp_pos_large:NnnNwn #1#2#3 #4#5\@@_sep: #6 { \exp_after:wN \exp_after:wN \exp_after:wN \@@_exp_large:NwN \exp_after:wN \exp_after:wN \exp_after:wN #6 \exp_after:wN \c_@@_one_fixed_tl \int_value:w #3 #4 \exp_stop_f: - #5 00000 ; + #5 00000 \@@_sep: } -\cs_new:Npn \@@_exp_large:NwN #1#2; #3 +\cs_new:Npn \@@_exp_large:NwN #1#2\@@_sep: #3 { \if_case:w #3 ~ \exp_after:wN \@@_fixed_continue:wn \else: \exp_after:wN \@@_exp_intarray:w - \int_value:w \@@_int_eval:w 36 * #1 + 4 * #3 \exp_after:wN ; + \int_value:w \@@_int_eval:w 36 * #1 + 4 * #3 \exp_after:wN \@@_sep: \fi: - #2; + #2\@@_sep: { \if_meaning:w 0 #1 \exp_after:wN \@@_exp_large_after:wwn @@ -850,7 +871,7 @@ \fi: } } -\cs_new:Npn \@@_exp_intarray:w #1 ; +\cs_new:Npn \@@_exp_intarray:w #1 \@@_sep: { + \__kernel_intarray_item:Nn \c_@@_exp_intarray @@ -865,13 +886,15 @@ \int_value:w \__kernel_intarray_item:Nn \c_@@_exp_intarray { \@@_int_eval:w #1 - 1 } \exp_after:wN \@@_exp_intarray_aux:w - \int_value:w \__kernel_intarray_item:Nn \c_@@_exp_intarray {#1} ; ; + \int_value:w \__kernel_intarray_item:Nn + \c_@@_exp_intarray {#1} \@@_sep: \@@_sep: } -\cs_new:Npn \@@_exp_intarray_aux:w 1 #1#2#3#4#5 ; { ; {#1#2#3#4} {#5} } -\cs_new:Npn \@@_exp_large_after:wwn #1; #2; #3 +\cs_new:Npn \@@_exp_intarray_aux:w 1 #1#2#3#4#5 \@@_sep: + { \@@_sep: {#1#2#3#4} {#5} } +\cs_new:Npn \@@_exp_large_after:wwn #1\@@_sep: #2\@@_sep: #3 { - \@@_exp_Taylor:Nnnwn ? { } { } 0 #2; {} #3 - \@@_fixed_mul:wwn #1; + \@@_exp_Taylor:Nnnwn ? { } { } 0 #2\@@_sep: {} #3 + \@@_fixed_mul:wwn #1\@@_sep: } % \end{macrocode} % \end{macro} @@ -921,7 +944,7 @@ % \end{itemize} % \begin{macrocode} \cs_new:cpn { @@_ \iow_char:N \^ _o:ww } - \s_@@ \@@_chk:w #1#2#3; \s_@@ \@@_chk:w #4#5#6; + \s_@@ \@@_chk:w #1#2#3\@@_sep: \s_@@ \@@_chk:w #4#5#6\@@_sep: { \if_meaning:w 0 #4 \@@_case_return_o:Nw \c_one_fp @@ -940,10 +963,10 @@ \else: \exp_after:wN \@@_pow_zero_or_inf:ww \fi: - \s_@@ \@@_chk:w #1#2#3; + \s_@@ \@@_chk:w #1#2#3\@@_sep: } - { \s_@@ \@@_chk:w #4#5#6; \s_@@ \@@_chk:w #1#2#3; } - \s_@@ \@@_chk:w #4#5#6; + { \s_@@ \@@_chk:w #4#5#6\@@_sep: \s_@@ \@@_chk:w #1#2#3\@@_sep: } + \s_@@ \@@_chk:w #4#5#6\@@_sep: } % \end{macrocode} % \end{macro} @@ -959,7 +982,7 @@ % unless $b=-\infty$. % \begin{macrocode} \cs_new:Npn \@@_pow_zero_or_inf:ww - \s_@@ \@@_chk:w #1#2; \s_@@ \@@_chk:w #3#4 + \s_@@ \@@_chk:w #1#2\@@_sep: \s_@@ \@@_chk:w #3#4 { \if_meaning:w 1 #4 \@@_case_return_same_o:w @@ -976,7 +999,7 @@ \@@_case_use:nw { \@@_division_by_zero_o:NNww \c_inf_fp ^ - \s_@@ \@@_chk:w #1 #2 ; + \s_@@ \@@_chk:w #1 #2 \@@_sep: } \fi: \s_@@ \@@_chk:w #3#4 @@ -1000,7 +1023,7 @@ % \end{itemize} % \begin{macrocode} \cs_new:Npn \@@_pow_normal_o:ww - \s_@@ \@@_chk:w 1 #1#2#3; \s_@@ \@@_chk:w #4#5 + \s_@@ \@@_chk:w 1 #1#2#3\@@_sep: \s_@@ \@@_chk:w #4#5 { \if:w 0 \@@_str_if_eq:nn { #2 #3 } { 1 {1000} {0000} {0000} {0000} } \if_int_compare:w #4 #1 = 32 \exp_stop_f: @@ -1024,7 +1047,7 @@ \or: \@@_case_return_ii_o:ww \fi: - \s_@@ \@@_chk:w 1 #1 {#2} #3 ; + \s_@@ \@@_chk:w 1 #1 {#2} #3 \@@_sep: \s_@@ \@@_chk:w #4 #5 } % \end{macrocode} @@ -1069,17 +1092,18 @@ % float. Then comes an exponent and the $4$ brace groups of $x$, % followed by $b$. Compute $-\ln(x)$. % \begin{macrocode} -\cs_new:Npn \@@_pow_npos_aux:NNnww #1#2#3#4#5; \s_@@ \@@_chk:w 1#6#7#8; +\cs_new:Npn \@@_pow_npos_aux:NNnww + #1#2#3#4#5\@@_sep: \s_@@ \@@_chk:w 1#6#7#8\@@_sep: { #1 \@@_int_eval:w \@@_ln_significand:NNNNnnnN #4#5 \@@_pow_exponent:wnN {#3} - \@@_fixed_mul:wwn #8 {0000}{0000} ; - \@@_pow_B:wwN #7; + \@@_fixed_mul:wwn #8 {0000}{0000} \@@_sep: + \@@_pow_B:wwN #7\@@_sep: #1 #2 0 % fixed_to_float_o:wN } -\cs_new:Npn \@@_pow_exponent:wnN #1; #2 +\cs_new:Npn \@@_pow_exponent:wnN #1\@@_sep: #2 { \if_int_compare:w #2 > \c_zero_int \exp_after:wN \@@_pow_exponent:Nwnnnnnw % n\ln(10) - (-\ln(x)) @@ -1088,9 +1112,9 @@ \exp_after:wN \@@_pow_exponent:Nwnnnnnw % -(|n|\ln(10) + (-\ln(x))) \exp_after:wN - \fi: - #2; #1; + #2\@@_sep: #1\@@_sep: } -\cs_new:Npn \@@_pow_exponent:Nwnnnnnw #1#2; #3#4#5#6#7#8; +\cs_new:Npn \@@_pow_exponent:Nwnnnnnw #1#2\@@_sep: #3#4#5#6#7#8\@@_sep: { %^^A todo: use that in ln. \exp_after:wN \@@_fixed_mul_after:wwn \int_value:w \@@_int_eval:w \c_@@_leading_shift_int @@ -1109,9 +1133,9 @@ \exp_after:wN \@@_pack:NNNNNw \int_value:w \@@_int_eval:w \c_@@_trailing_shift_int #1 #2*8401 - #1 #7 - #1 ( #2*7991 - #8 ) / 1 0000 ; ; + #1 ( #2*7991 - #8 ) / 1 0000 \@@_sep: \@@_sep: } -\cs_new:Npn \@@_pow_B:wwN #1#2#3#4#5#6; #7; +\cs_new:Npn \@@_pow_B:wwN #1#2#3#4#5#6\@@_sep: #7\@@_sep: { \if_int_compare:w #7 < \c_zero_int \exp_after:wN \@@_pow_C_neg:w \int_value:w - @@ -1122,23 +1146,23 @@ \exp_after:wN \@@_pow_C_overflow:w \int_value:w \fi: \fi: - #7 \exp_after:wN ; + #7 \exp_after:wN \@@_sep: \int_value:w \@@_int_eval:w 10 0000 + #1 \@@_int_eval_end: - #2#3#4#5#6 0000 0000 0000 0000 0000 0000 ; %^^A todo: how many 0? + #2#3#4#5#6 0000 0000 0000 0000 0000 0000 \@@_sep: %^^A todo: how many 0? } -\cs_new:Npn \@@_pow_C_overflow:w #1; #2; #3 +\cs_new:Npn \@@_pow_C_overflow:w #1\@@_sep: #2\@@_sep: #3 { + 2 * \c_@@_max_exponent_int \exp_after:wN \@@_fixed_continue:wn \c_@@_one_fixed_tl } -\cs_new:Npn \@@_pow_C_neg:w #1 ; 1 +\cs_new:Npn \@@_pow_C_neg:w #1 \@@_sep: 1 { \exp_after:wN \exp_after:wN \exp_after:wN \@@_pow_C_pack:w \prg_replicate:nn {#1} {0} } -\cs_new:Npn \@@_pow_C_pos:w #1; 1 - { \@@_pow_C_pos_loop:wN #1; } -\cs_new:Npn \@@_pow_C_pos_loop:wN #1; #2 +\cs_new:Npn \@@_pow_C_pos:w #1\@@_sep: 1 + { \@@_pow_C_pos_loop:wN #1\@@_sep: } +\cs_new:Npn \@@_pow_C_pos_loop:wN #1\@@_sep: #2 { \if_meaning:w 0 #1 \exp_after:wN \@@_pow_C_pack:w @@ -1149,7 +1173,7 @@ \else: \exp_after:wN \@@_pow_C_overflow:w \int_value:w \fi: - \@@_int_eval:w #1 - 1 \exp_after:wN ; + \@@_int_eval:w #1 - 1 \exp_after:wN \@@_sep: \fi: } \cs_new:Npn \@@_pow_C_pack:w @@ -1173,20 +1197,21 @@ % called, |(-0.1)**(12345.67)| gives $+0$ rather than complaining % that the sign is not defined. % \begin{macrocode} -\cs_new:Npn \@@_pow_neg:www \s_@@ \@@_chk:w #1#2; #3; #4; +\cs_new:Npn \@@_pow_neg:www + \s_@@ \@@_chk:w #1#2\@@_sep: #3\@@_sep: #4\@@_sep: { - \if_case:w \@@_pow_neg_case:w #4 ; + \if_case:w \@@_pow_neg_case:w #4 \@@_sep: \exp_after:wN \@@_pow_neg_aux:wNN \or: \if_int_compare:w \@@_int_eval:w #1 / 2 = \c_one_int - \@@_invalid_operation_o:Nww ^ #3; #4; + \@@_invalid_operation_o:Nww ^ #3\@@_sep: #4\@@_sep: \exp:w \exp_end_continue_f:w \exp_after:wN \exp_after:wN \exp_after:wN \@@_use_none_until_s:w \fi: \fi: \@@_exp_after_o:w - \s_@@ \@@_chk:w #1#2; + \s_@@ \@@_chk:w #1#2\@@_sep: } \cs_new:Npn \@@_pow_neg_aux:wNN #1 \s_@@ \@@_chk:w #2#3 { @@ -1216,7 +1241,7 @@ % |0|~if and only if the number was an integer, and |#3| is the $8$ % least significant digits of that integer. % \begin{macrocode} -\cs_new:Npn \@@_pow_neg_case:w \s_@@ \@@_chk:w #1#2#3; +\cs_new:Npn \@@_pow_neg_case:w \s_@@ \@@_chk:w #1#2#3\@@_sep: { \if_case:w #1 \exp_stop_f: -1 @@ -1236,7 +1261,7 @@ {#2} {#3} {#4} {#5} \fi: } -\cs_new:Npn \@@_pow_neg_case_aux:Nnnw #1#2#3#4 ; +\cs_new:Npn \@@_pow_neg_case_aux:Nnnw #1#2#3#4 \@@_sep: { \if_meaning:w 0 #1 \if_int_odd:w #3 \exp_stop_f: @@ -1270,7 +1295,7 @@ % with $24$ digits instead of~$16$. It is easy to check that % computing factorials with this precision is enough. % \begin{macrocode} -\cs_new:Npn \@@_fact_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_fact_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_return_o:Nw \c_one_fp @@ -1286,7 +1311,7 @@ \@@_case_use:nw { \@@_invalid_operation_o:fw { fact } } \fi: \@@_fact_pos_o:w - \s_@@ \@@_chk:w #2 #3 #4 ; + \s_@@ \@@_chk:w #2 #3 #4 \@@_sep: } % \end{macrocode} % \end{macro} @@ -1298,11 +1323,11 @@ % \cs{@@_sanitize:Nw} with a positive sign marker~|0| and an integer % expression that will mop up any exponent in the calculation. % \begin{macrocode} -\cs_new:Npn \@@_fact_pos_o:w #1; +\cs_new:Npn \@@_fact_pos_o:w #1\@@_sep: { - \@@_small_int:wTF #1; + \@@_small_int:wTF #1\@@_sep: { \@@_fact_int_o:n } - { \@@_invalid_operation_o:fw { fact } #1; } + { \@@_invalid_operation_o:fw { fact } #1\@@_sep: } } \cs_new:Npn \@@_fact_int_o:n #1 { @@ -1316,7 +1341,7 @@ \exp_after:wN \@@_sanitize:Nw \exp_after:wN 0 \int_value:w \@@_int_eval:w - \@@_fact_loop_o:w #1 . 4 , { 1 } { } { } { } { } { } ; + \@@_fact_loop_o:w #1 . 4 , { 1 } { } { } { } { } { } \@@_sep: } % \end{macrocode} % \end{macro} @@ -1325,7 +1350,7 @@ % The loop receives an integer |#1| whose factorial we want to % compute, which we progressively decrement, and the result so far as % an extended-precision number |#2| in the form -% \meta{exponent}|,|\meta{mantissa}|;|. The loop goes in steps of two +% \meta{exponent}|,|\meta{mantissa}\cs{@@_sep:}. The loop goes in steps of two % because we compute |#1*#1-1| as an integer expression (it must fit % since |#1| is at most $3248$), then multiply with the result so far. % We don't need to fill in most of the mantissa with zeros because @@ -1335,7 +1360,7 @@ % chosen because the normalization step cannot deal with larger % integers. % \begin{macrocode} -\cs_new:Npn \@@_fact_loop_o:w #1 . #2 ; +\cs_new:Npn \@@_fact_loop_o:w #1 . #2 \@@_sep: { \if_int_compare:w #1 < 12 \exp_stop_f: \@@_fact_small_o:w #1 @@ -1343,14 +1368,14 @@ \exp_after:wN \@@_ep_mul:wwwwn \exp_after:wN 4 \exp_after:wN , \exp_after:wN { \int_value:w \@@_int_eval:w #1 * (#1 - 1) } - { } { } { } { } { } ; - #2 ; + { } { } { } { } { } \@@_sep: + #2 \@@_sep: { \exp_after:wN \@@_fact_loop_o:w \int_value:w \@@_int_eval:w #1 - 2 . } } -\cs_new:Npn \@@_fact_small_o:w #1 \fi: #2 ; #3 ; #4 +\cs_new:Npn \@@_fact_small_o:w #1 \fi: #2 \@@_sep: #3 \@@_sep: #4 { \fi: \exp_after:wN \@@_ep_mul:wwwwn @@ -1362,8 +1387,8 @@ 1 \or: 1 \or: 2 \or: 6 \or: 24 \or: 120 \or: 720 \or: 5040 \or: 40320 \or: 362880 \or: 3628800 \or: 39916800 \fi: - } { } { } { } { } { } ; - #3 ; + } { } { } { } { } { } \@@_sep: + #3 \@@_sep: \@@_ep_to_float_o:wwN 0 } % \end{macrocode} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-extended.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-extended.dtx index d633ce3bc32..ce61593e9dc 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-extended.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-extended.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -76,7 +76,7 @@ % enough to be rounded away when converting back to a floating point % number. The fixed point numbers are expressed as % \begin{quote} -% \Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} |;| +% \Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} \cs{@@_sep:} % \end{quote} % where each \meta{a_i} is exactly $4$ digits (ranging from |0000| to % |9999|), except \meta{a_1}, which may be any \enquote{not-too-large} @@ -89,7 +89,8 @@ % % Most functions we define here have the form % \begin{syntax} -% \cs{@@_fixed_\meta{calculation}:wwn} \meta{operand_1} |;| \meta{operand_2} |;| \Arg{continuation} +% \cs{@@_fixed_\meta{calculation}:wwn} \meta{operand_1} \cs{@@_sep:} +% ~~\meta{operand_2} \cs{@@_sep:} \Arg{continuation} % \end{syntax} % They perform the \meta{calculation} on the two \meta{operands}, then % feed the result ($6$ brace groups followed by a semicolon) to the @@ -97,9 +98,9 @@ % Some functions only accept an \texttt{N}-type \meta{continuation}. % This allows constructions such as % \begin{quote} -% \cs{@@_fixed_add:wwn} \meta{X_1} |;| \meta{X_2} |;| \\ -% \cs{@@_fixed_mul:wwn} \meta{X_3} |;| \\ -% \cs{@@_fixed_add:wwn} \meta{X_4} |;| \\ +% \cs{@@_fixed_add:wwn} \meta{X_1} \cs{@@_sep:} \meta{X_2} \cs{@@_sep:} \\ +% \cs{@@_fixed_mul:wwn} \meta{X_3} \cs{@@_sep:} \\ +% \cs{@@_fixed_add:wwn} \meta{X_4} \cs{@@_sep:} \\ % \end{quote} % to compute $(X_1+X_2)\cdot X_3 + X_4$. This turns out to be very % appropriate for computing continued fractions and Taylor series. @@ -116,29 +117,29 @@ % The fixed-point number~$1$, used in \pkg{l3fp-expo}. % \begin{macrocode} \tl_const:Nn \c_@@_one_fixed_tl - { {10000} {0000} {0000} {0000} {0000} {0000} ; } + { {10000} {0000} {0000} {0000} {0000} {0000} \@@_sep: } % \end{macrocode} % \end{variable} % % \begin{macro}[EXP]{\@@_fixed_continue:wn} % This function simply calls the next function. % \begin{macrocode} -\cs_new:Npn \@@_fixed_continue:wn #1; #2 { #2 #1; } +\cs_new:Npn \@@_fixed_continue:wn #1\@@_sep: #2 { #2 #1\@@_sep: } % \end{macrocode} % \end{macro} % % \begin{macro}[EXP]{\@@_fixed_add_one:wN} % \begin{syntax} -% \cs{@@_fixed_add_one:wN} \meta{a} |;| \meta{continuation} +% \cs{@@_fixed_add_one:wN} \meta{a} \cs{@@_sep:} \meta{continuation} % \end{syntax} % This function adds $1$ to the fixed point \meta{a}, by changing % $a_1$ to $10000+a_1$, then calls the \meta{continuation}. This % requires $a_1 + 10000 < 2^{31}$. % \begin{macrocode} -\cs_new:Npn \@@_fixed_add_one:wN #1#2; #3 +\cs_new:Npn \@@_fixed_add_one:wN #1#2\@@_sep: #3 { \exp_after:wN #3 \exp_after:wN - { \int_value:w \@@_int_eval:w \c_@@_myriad_int + #1 } #2 ; + { \int_value:w \@@_int_eval:w \c_@@_myriad_int + #1 } #2 \@@_sep: } % \end{macrocode} % \end{macro} @@ -151,13 +152,13 @@ % exactly $4$~digits. The choice of shifts allows~|#1| to be in the % range $[0, 5\cdot 10^{8}-1]$. % \begin{macrocode} -\cs_new:Npn \@@_fixed_div_myriad:wn #1#2#3#4#5#6; +\cs_new:Npn \@@_fixed_div_myriad:wn #1#2#3#4#5#6\@@_sep: { \exp_after:wN \@@_fixed_mul_after:wwn \int_value:w \@@_int_eval:w \c_@@_leading_shift_int \exp_after:wN \@@_pack:NNNNNw \int_value:w \@@_int_eval:w \c_@@_trailing_shift_int - + #1 ; {#2}{#3}{#4}{#5}; + + #1 \@@_sep: {#2}{#3}{#4}{#5}\@@_sep: } % \end{macrocode} % \end{macro} @@ -167,7 +168,8 @@ % calling this auxiliary. It braces the last block of digits, and % places the \meta{continuation} |#3| in front. % \begin{macrocode} -\cs_new:Npn \@@_fixed_mul_after:wwn #1; #2; #3 { #3 {#1} #2; } +\cs_new:Npn \@@_fixed_mul_after:wwn #1\@@_sep: #2\@@_sep: #3 + { #3 {#1} #2\@@_sep: } % \end{macrocode} % \end{macro} % @@ -176,20 +178,20 @@ % \begin{macro}[EXP]{\@@_fixed_mul_short:wwn} % \begin{syntax}\parskip=0pt\obeylines % \cs{@@_fixed_mul_short:wwn} -% | |\Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} |;| -% | |\Arg{b_0} \Arg{b_1} \Arg{b_2} |;| \Arg{continuation} +% | |\Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} \cs{@@_sep:} +% | |\Arg{b_0} \Arg{b_1} \Arg{b_2} \cs{@@_sep:} \Arg{continuation} % \end{syntax} % Computes the product $c=ab$ of $a=\sum_i \meta{a_i} 10^{-4i}$ and % $b=\sum_i \meta{b_i} 10^{-4i}$, rounds it to the closest multiple of % $10^{-24}$, and leaves \meta{continuation} \Arg{c_1} \ldots{} -% \Arg{c_6} |;| in the input stream, where each of the \meta{c_i} are +% \Arg{c_6} \cs{@@_sep:} in the input stream, where each of the \meta{c_i} are % blocks of $4$~digits, except \meta{c_1}, which is any \TeX{} % integer. Note that indices for \meta{b} start at~$0$: for instance % a second operand of |{0001}{0000}{0000}| leaves the first operand % unchanged (rather than dividing it by $10^{4}$, as % \cs{@@_fixed_mul:wwn} would). % \begin{macrocode} -\cs_new:Npn \@@_fixed_mul_short:wwn #1#2#3#4#5#6; #7#8#9; +\cs_new:Npn \@@_fixed_mul_short:wwn #1#2#3#4#5#6\@@_sep: #7#8#9\@@_sep: { \exp_after:wN \@@_fixed_mul_after:wwn \int_value:w \@@_int_eval:w \c_@@_leading_shift_int @@ -210,7 +212,7 @@ \int_value:w \@@_int_eval:w \c_@@_trailing_shift_int + #4*#9 + #5*#8 + #6*#7 + ( #5*#9 + #6*#8 + #6*#9 / \c_@@_myriad_int ) - / \c_@@_myriad_int ; ; + / \c_@@_myriad_int \@@_sep: \@@_sep: } % \end{macrocode} % \end{macro} @@ -225,7 +227,7 @@ % \@@_fixed_div_int_after:Nw % } % \begin{syntax} -% \cs{@@_fixed_div_int:wwN} \meta{a} |;| \meta{n} |;| \meta{continuation} +% \cs{@@_fixed_div_int:wwN} \meta{a} \cs{@@_sep:} \meta{n} \cs{@@_sep:} \meta{continuation} % \end{syntax} % Divides the fixed point number \meta{a} by the (small) integer % $0<\meta{n}<10^4$ and feeds the result to the \meta{continuation}. @@ -255,7 +257,7 @@ % \cs{@@_fixed_div_int_pack:Nw} $9999 + Q_{4}$ \\ % \cs{@@_fixed_div_int_pack:Nw} $9999 + Q_{5}$ \\ % \cs{@@_fixed_div_int_pack:Nw} $9999$ \\ -% \cs{@@_fixed_div_int_auxii:wnn} $Q_{6}$ |;| \Arg{n} \Arg{a_{6}} +% \cs{@@_fixed_div_int_auxii:wnn} $Q_{6}$ \cs{@@_sep:} \Arg{n} \Arg{a_{6}} % \end{quote} % where expansion is happening from the last line up. The % \texttt{iii} auxiliary adds $Q_{6} + 2 \simeq a_{6}/n + 1$ to the @@ -268,27 +270,27 @@ % brace group is produced by the \texttt{after} auxiliary, which % places the \meta{continuation} as appropriate. % \begin{macrocode} -\cs_new:Npn \@@_fixed_div_int:wwN #1#2#3#4#5#6 ; #7 ; #8 +\cs_new:Npn \@@_fixed_div_int:wwN #1#2#3#4#5#6 \@@_sep: #7 \@@_sep: #8 { \exp_after:wN \@@_fixed_div_int_after:Nw \exp_after:wN #8 \int_value:w \@@_int_eval:w - 1 \@@_fixed_div_int:wnN - #1; {#7} \@@_fixed_div_int_auxi:wnn - #2; {#7} \@@_fixed_div_int_auxi:wnn - #3; {#7} \@@_fixed_div_int_auxi:wnn - #4; {#7} \@@_fixed_div_int_auxi:wnn - #5; {#7} \@@_fixed_div_int_auxi:wnn - #6; {#7} \@@_fixed_div_int_auxii:wnn ; + #1\@@_sep: {#7} \@@_fixed_div_int_auxi:wnn + #2\@@_sep: {#7} \@@_fixed_div_int_auxi:wnn + #3\@@_sep: {#7} \@@_fixed_div_int_auxi:wnn + #4\@@_sep: {#7} \@@_fixed_div_int_auxi:wnn + #5\@@_sep: {#7} \@@_fixed_div_int_auxi:wnn + #6\@@_sep: {#7} \@@_fixed_div_int_auxii:wnn \@@_sep: } -\cs_new:Npn \@@_fixed_div_int:wnN #1; #2 #3 +\cs_new:Npn \@@_fixed_div_int:wnN #1\@@_sep: #2 #3 { \exp_after:wN #3 - \int_value:w \@@_int_eval:w #1 / #2 - 1 ; + \int_value:w \@@_int_eval:w #1 / #2 - 1 \@@_sep: {#2} {#1} } -\cs_new:Npn \@@_fixed_div_int_auxi:wnn #1; #2 #3 +\cs_new:Npn \@@_fixed_div_int_auxi:wnn #1\@@_sep: #2 #3 { + #1 \exp_after:wN \@@_fixed_div_int_pack:Nw @@ -296,9 +298,9 @@ \exp_after:wN \@@_fixed_div_int:wnN \int_value:w \@@_int_eval:w #3 - #1*#2 \@@_int_eval_end: } -\cs_new:Npn \@@_fixed_div_int_auxii:wnn #1; #2 #3 { + #1 + 2 ; } -\cs_new:Npn \@@_fixed_div_int_pack:Nw #1 #2; { + #1; {#2} } -\cs_new:Npn \@@_fixed_div_int_after:Nw #1 #2; { #1 {#2} } +\cs_new:Npn \@@_fixed_div_int_auxii:wnn #1\@@_sep: #2 #3 { + #1 + 2 \@@_sep: } +\cs_new:Npn \@@_fixed_div_int_pack:Nw #1 #2\@@_sep: { + #1\@@_sep: {#2} } +\cs_new:Npn \@@_fixed_div_int_after:Nw #1 #2\@@_sep: { #1 {#2} } % \end{macrocode} % \end{macro} % \end{macro} @@ -314,7 +316,7 @@ % \@@_fixed_add_after:NNNNNwn % } % \begin{syntax} -% \cs{@@_fixed_add:wwn} \meta{a} |;| \meta{b} |;| \Arg{continuation} +% \cs{@@_fixed_add:wwn} \meta{a} \cs{@@_sep:} \meta{b} \cs{@@_sep:} \Arg{continuation} % \end{syntax} % Computes $a+b$ (resp.\ $a-b$) and feeds the result to the % \meta{continuation}. This function requires $0\leq a_{1},b_{1}\leq @@ -333,7 +335,7 @@ % \begin{macrocode} \cs_new:Npn \@@_fixed_add:wwn { \@@_fixed_add:Nnnnnwnn + } \cs_new:Npn \@@_fixed_sub:wwn { \@@_fixed_add:Nnnnnwnn - } -\cs_new:Npn \@@_fixed_add:Nnnnnwnn #1 #2#3#4#5 #6; #7#8 +\cs_new:Npn \@@_fixed_add:Nnnnnwnn #1 #2#3#4#5 #6\@@_sep: #7#8 { \exp_after:wN \@@_fixed_add_after:NNNNNwn \int_value:w \@@_int_eval:w 9 9999 9998 + #2#3 #1 #7#8 @@ -341,15 +343,16 @@ \int_value:w \@@_int_eval:w 1 9999 9998 + #4#5 \@@_fixed_add:nnNnnnwn #6 #1 } -\cs_new:Npn \@@_fixed_add:nnNnnnwn #1#2 #3 #4#5 #6#7 ; #8 +\cs_new:Npn \@@_fixed_add:nnNnnnwn #1#2 #3 #4#5 #6#7 \@@_sep: #8 { #3 #4#5 \exp_after:wN \@@_fixed_add_pack:NNNNNwn - \int_value:w \@@_int_eval:w 2 0000 0000 #3 #6#7 + #1#2 ; {#8} ; + \int_value:w \@@_int_eval:w + 2 0000 0000 #3 #6#7 + #1#2 \@@_sep: {#8} \@@_sep: } -\cs_new:Npn \@@_fixed_add_pack:NNNNNwn #1 #2#3#4#5 #6; #7 - { + #1 ; {#7} {#2#3#4#5} {#6} } -\cs_new:Npn \@@_fixed_add_after:NNNNNwn 1 #1 #2#3#4#5 #6; #7 +\cs_new:Npn \@@_fixed_add_pack:NNNNNwn #1 #2#3#4#5 #6\@@_sep: #7 + { + #1 \@@_sep: {#7} {#2#3#4#5} {#6} } +\cs_new:Npn \@@_fixed_add_after:NNNNNwn 1 #1 #2#3#4#5 #6\@@_sep: #7 { #7 {#1#2#3#4#5} {#6} } % \end{macrocode} % \end{macro} @@ -361,7 +364,7 @@ % \begin{macro}[EXP]{\@@_fixed_mul:wwn} % \begin{macro}[EXP]{\@@_fixed_mul:nnnnnnnw} % \begin{syntax} -% \cs{@@_fixed_mul:wwn} \meta{a} |;| \meta{b} |;| \Arg{continuation} +% \cs{@@_fixed_mul:wwn} \meta{a} \cs{@@_sep:} \meta{b} \cs{@@_sep:} \Arg{continuation} % \end{syntax} % Computes $a\times b$ and feeds the result to \meta{continuation}. % This function requires $0\leq a_{1}, b_{1} < 10000$. Once more, we @@ -402,7 +405,7 @@ % is finally placed in front of the $6$ brace groups by % \cs{@@_fixed_mul_after:wwn}. % \begin{macrocode} -\cs_new:Npn \@@_fixed_mul:wwn #1#2#3#4 #5; #6#7#8#9 +\cs_new:Npn \@@_fixed_mul:wwn #1#2#3#4 #5\@@_sep: #6#7#8#9 { \exp_after:wN \@@_fixed_mul_after:wwn \int_value:w \@@_int_eval:w \c_@@_leading_shift_int @@ -424,10 +427,10 @@ + ( #3*#9 + #4*#8 + \@@_fixed_mul:nnnnnnnw #5 {#6}{#7} {#1}{#2} } -\cs_new:Npn \@@_fixed_mul:nnnnnnnw #1#2 #3#4 #5#6 #7#8 ; +\cs_new:Npn \@@_fixed_mul:nnnnnnnw #1#2 #3#4 #5#6 #7#8 \@@_sep: { #1*#4 + #2*#3 + #5*#8 + #6*#7 ) / \c_@@_myriad_int - + #1*#3 + #5*#7 ; ; + + #1*#3 + #5*#7 \@@_sep: \@@_sep: } % \end{macrocode} % \end{macro} @@ -442,9 +445,9 @@ % \@@_fixed_mul_one_minus_mul:wwn, % } % \begin{syntax} -% \cs{@@_fixed_mul_add:wwwn} \meta{a} |;| \meta{b} |;| \meta{c} |;| \Arg{continuation} -% \cs{@@_fixed_mul_sub_back:wwwn} \meta{a} |;| \meta{b} |;| \meta{c} |;| \Arg{continuation} -% \cs{@@_fixed_one_minus_mul:wwn} \meta{a} |;| \meta{b} |;| \Arg{continuation} +% \cs{@@_fixed_mul_add:wwwn} \meta{a} \cs{@@_sep:} \meta{b} \cs{@@_sep:} \meta{c} \cs{@@_sep:} \Arg{continuation} +% \cs{@@_fixed_mul_sub_back:wwwn} \meta{a} \cs{@@_sep:} \meta{b} \cs{@@_sep:} \meta{c} \cs{@@_sep:} \Arg{continuation} +% \cs{@@_fixed_one_minus_mul:wwn} \meta{a} \cs{@@_sep:} \meta{b} \cs{@@_sep:} \Arg{continuation} % \end{syntax} % Sometimes called |FMA| (fused multiply-add), these functions % compute $a\times b + c$, $c - a\times b$, and $1 - a\times b$ and @@ -482,32 +485,33 @@ % Each of the three function starts the first two levels (the first, % corresponding to $10^{-4}$, is empty), with $c_{1} c_{2}$ in the % first level, calls the \texttt{i} auxiliary with arguments described -% later, and adds a trailing ${} + c_{5}c_{6}$ |;| -% \Arg{continuation}~|;|. The ${} + c_{5}c_{6}$ piece, which is +% later, and adds a trailing ${} + c_{5}c_{6}$ \cs{@@_sep:} +% \Arg{continuation}~\cs{@@_sep:}. The ${} + c_{5}c_{6}$ piece, which is % omitted for \cs{@@_fixed_one_minus_mul:wwn}, is taken in the % integer expression for the $10^{-24}$ level. % \begin{macrocode} -\cs_new:Npn \@@_fixed_mul_add:wwwn #1; #2; #3#4#5#6#7#8; +\cs_new:Npn \@@_fixed_mul_add:wwwn #1\@@_sep: #2\@@_sep: #3#4#5#6#7#8\@@_sep: { \exp_after:wN \@@_fixed_mul_after:wwn \int_value:w \@@_int_eval:w \c_@@_big_leading_shift_int \exp_after:wN \@@_pack_big:NNNNNNw \int_value:w \@@_int_eval:w \c_@@_big_middle_shift_int + #3 #4 \@@_fixed_mul_add:Nwnnnwnnn + - + #5 #6 ; #2 ; #1 ; #2 ; + - + #7 #8 ; ; + + #5 #6 \@@_sep: #2 \@@_sep: #1 \@@_sep: #2 \@@_sep: + + + #7 #8 \@@_sep: \@@_sep: } -\cs_new:Npn \@@_fixed_mul_sub_back:wwwn #1; #2; #3#4#5#6#7#8; +\cs_new:Npn \@@_fixed_mul_sub_back:wwwn + #1\@@_sep: #2\@@_sep: #3#4#5#6#7#8\@@_sep: { \exp_after:wN \@@_fixed_mul_after:wwn \int_value:w \@@_int_eval:w \c_@@_big_leading_shift_int \exp_after:wN \@@_pack_big:NNNNNNw \int_value:w \@@_int_eval:w \c_@@_big_middle_shift_int + #3 #4 \@@_fixed_mul_add:Nwnnnwnnn - - + #5 #6 ; #2 ; #1 ; #2 ; - - + #7 #8 ; ; + + #5 #6 \@@_sep: #2 \@@_sep: #1 \@@_sep: #2 \@@_sep: - + + #7 #8 \@@_sep: \@@_sep: } -\cs_new:Npn \@@_fixed_one_minus_mul:wwn #1; #2; +\cs_new:Npn \@@_fixed_one_minus_mul:wwn #1\@@_sep: #2\@@_sep: { \exp_after:wN \@@_fixed_mul_after:wwn \int_value:w \@@_int_eval:w \c_@@_big_leading_shift_int @@ -515,17 +519,17 @@ \int_value:w \@@_int_eval:w \c_@@_big_middle_shift_int + 1 0000 0000 \@@_fixed_mul_add:Nwnnnwnnn - - ; #2 ; #1 ; #2 ; - - ; ; + \@@_sep: #2 \@@_sep: #1 \@@_sep: #2 \@@_sep: - + \@@_sep: \@@_sep: } % \end{macrocode} % \end{macro} % % \begin{macro}[EXP]{\@@_fixed_mul_add:Nwnnnwnnn} % \begin{syntax} -% \cs{@@_fixed_mul_add:Nwnnnwnnn} \meta{op} |+| \meta{c_3} \meta{c_4} |;| -% ~~\meta{b} |;| \meta{a} |;| \meta{b} |;| \meta{op} -% ~~|+| \meta{c_5} \meta{c_6} |;| +% \cs{@@_fixed_mul_add:Nwnnnwnnn} \meta{op} |+| \meta{c_3} \meta{c_4} \cs{@@_sep:} +% ~~\meta{b} \cs{@@_sep:} \meta{a} \cs{@@_sep:} \meta{b} \cs{@@_sep:} \meta{op} +% ~~|+| \meta{c_5} \meta{c_6} \cs{@@_sep:} % \end{syntax} % Here, \meta{op} is either |+| or |-|. Arguments |#3|, |#4|, |#5| % are \meta{b_1}, \meta{b_2}, \meta{b_3}; arguments |#7|, |#8|, |#9| @@ -539,7 +543,7 @@ % we've read, but not \meta{b}, since there is another copy later in % the input stream. % \begin{macrocode} -\cs_new:Npn \@@_fixed_mul_add:Nwnnnwnnn #1 #2; #3#4#5#6; #7#8#9 +\cs_new:Npn \@@_fixed_mul_add:Nwnnnwnnn #1 #2\@@_sep: #3#4#5#6\@@_sep: #7#8#9 { #1 #7*#3 \exp_after:wN \@@_pack_big:NNNNNNw @@ -557,8 +561,8 @@ % % \begin{macro}[EXP]{\@@_fixed_mul_add:nnnnwnnnn} % \begin{syntax} -% \cs{@@_fixed_mul_add:nnnnwnnnn} \meta{a} |;| \meta{b} |;| \meta{op} -% ~~|+| \meta{c_5} \meta{c_6} |;| +% \cs{@@_fixed_mul_add:nnnnwnnnn} \meta{a} \cs{@@_sep:} \meta{b} \cs{@@_sep:} \meta{op} +% ~~|+| \meta{c_5} \meta{c_6} \cs{@@_sep:} % \end{syntax} % Level $10^{-20}$ is $(a_{1} \cdot b_{4} + a_{2} \cdot b_{3} + a_{3} % \cdot b_{2} + a_{4} \cdot b_{1})$, multiplied by the sign, which was @@ -577,7 +581,7 @@ % To do all this, we keep $a_{1}$, $a_{5}$, $a_{6}$, and the % corresponding pieces of \meta{b}. % \begin{macrocode} -\cs_new:Npn \@@_fixed_mul_add:nnnnwnnnn #1#2#3#4#5; #6#7#8#9 +\cs_new:Npn \@@_fixed_mul_add:nnnnwnnnn #1#2#3#4#5\@@_sep: #6#7#8#9 { ( #1*#9 + #2*#8 + #3*#7 + #4*#6 ) \exp_after:wN \@@_pack_big:NNNNNNw @@ -585,7 +589,7 @@ \@@_fixed_mul_add:nnnnwnnwN { #6 + #4*#7 + #3*#8 + #2*#9 + #1 } { #7 + #4*#8 + #3*#9 + #2 } - {#1} #5; + {#1} #5\@@_sep: {#6} } % \end{macrocode} @@ -594,8 +598,8 @@ % \begin{macro}[EXP]{\@@_fixed_mul_add:nnnnwnnwN} % \begin{syntax} % \cs{@@_fixed_mul_add:nnnnwnnwN} \Arg{partial_1} \Arg{partial_2} -% ~~\Arg{a_1} \Arg{a_5} \Arg{a_6} |;| \Arg{b_1} \Arg{b_5} \Arg{b_6} |;| -% ~~\meta{op} |+| \meta{c_5} \meta{c_6} |;| +% ~~\Arg{a_1} \Arg{a_5} \Arg{a_6} \cs{@@_sep:} \Arg{b_1} \Arg{b_5} \Arg{b_6} \cs{@@_sep:} +% ~~\meta{op} |+| \meta{c_5} \meta{c_6} \cs{@@_sep:} % \end{syntax} % Complete the \meta{partial_1} and \meta{partial_2} expressions as % explained for the \texttt{ii} auxiliary. The second one is divided @@ -607,7 +611,7 @@ % expected by the packing auxiliaries. See \pkg{l3fp-aux} for the % definition of the shifts and packing auxiliaries. % \begin{macrocode} -\cs_new:Npn \@@_fixed_mul_add:nnnnwnnwN #1#2 #3#4#5; #6#7#8; #9 +\cs_new:Npn \@@_fixed_mul_add:nnnnwnnwN #1#2 #3#4#5\@@_sep: #6#7#8\@@_sep: #9 { #9 (#4* #1 *#7) #9 (#5*#6+#4* #2 *#7+#3*#8) / \c_@@_myriad_int @@ -637,21 +641,22 @@ \cs_new:Npn \@@_ep_to_fixed:wwn #1,#2 { \exp_after:wN \@@_ep_to_fixed_auxi:www - \int_value:w \@@_int_eval:w 1 0000 0000 + #2 \exp_after:wN ; + \int_value:w \@@_int_eval:w 1 0000 0000 + #2 \exp_after:wN \@@_sep: \exp:w \exp_end_continue_f:w - \prg_replicate:nn { 4 - \int_max:nn {#1} { -32 } } { 0 } ; + \prg_replicate:nn { 4 - \int_max:nn {#1} { -32 } } { 0 } \@@_sep: } -\cs_new:Npn \@@_ep_to_fixed_auxi:www 1#1; #2; #3#4#5#6#7; +\cs_new:Npn \@@_ep_to_fixed_auxi:www + 1#1\@@_sep: #2\@@_sep: #3#4#5#6#7\@@_sep: { \@@_pack_eight:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN - \@@_ep_to_fixed_auxii:nnnnnnnwn ; + \@@_ep_to_fixed_auxii:nnnnnnnwn \@@_sep: #2 #1#3#4#5#6#7 0000 ! } -\cs_new:Npn \@@_ep_to_fixed_auxii:nnnnnnnwn #1#2#3#4#5#6#7; #8! #9 - { #9 {#1#2}{#3}{#4}{#5}{#6}{#7}; } +\cs_new:Npn \@@_ep_to_fixed_auxii:nnnnnnnwn #1#2#3#4#5#6#7\@@_sep: #8! #9 + { #9 {#1#2}{#3}{#4}{#5}{#6}{#7}\@@_sep: } % \end{macrocode} % \end{macro} % \end{macro} @@ -675,14 +680,14 @@ % any digit that did not make it in the final mantissa (typically only % zeros, unless the original first block has more than~$4$ digits). % \begin{macrocode} -\cs_new:Npn \@@_ep_to_ep:wwN #1,#2#3#4#5#6#7; #8 +\cs_new:Npn \@@_ep_to_ep:wwN #1,#2#3#4#5#6#7\@@_sep: #8 { \exp_after:wN #8 \int_value:w \@@_int_eval:w #1 + 4 \exp_after:wN \use_i:nn \exp_after:wN \@@_ep_to_ep_loop:N \int_value:w \@@_int_eval:w 1 0000 0000 + #2 \@@_int_eval_end: - #3#4#5#6#7 ; ; ! + #3#4#5#6#7 \@@_sep: \@@_sep: ! } \cs_new:Npn \@@_ep_to_ep_loop:N #1 { @@ -694,21 +699,21 @@ \@@_ep_to_ep_loop:N } \cs_new:Npn \@@_ep_to_ep_end:www - #1 \fi: \@@_ep_to_ep_loop:N #2; #3! + #1 \fi: \@@_ep_to_ep_loop:N #2\@@_sep: #3! { \fi: - \if_meaning:w ; #1 + \if_meaning:w \@@_sep: #1 - 2 * \c_@@_max_exponent_int \@@_ep_to_ep_zero:ww \fi: \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN - \@@_use_i:ww , ; - #1 #2 0000 0000 0000 0000 0000 0000 ; + \@@_use_i:ww , \@@_sep: + #1 #2 0000 0000 0000 0000 0000 0000 \@@_sep: } -\cs_new:Npn \@@_ep_to_ep_zero:ww \fi: #1; #2; #3; - { \fi: , {1000}{0000}{0000}{0000}{0000}{0000} ; } +\cs_new:Npn \@@_ep_to_ep_zero:ww \fi: #1\@@_sep: #2\@@_sep: #3\@@_sep: + { \fi: , {1000}{0000}{0000}{0000}{0000}{0000} \@@_sep: } % \end{macrocode} % \end{macro} % \end{macro} @@ -723,12 +728,14 @@ % works if the numbers are normalized so that their first block is % in~$[1000,9999]$. % \begin{macrocode} -\cs_new:Npn \@@_ep_compare:wwww #1,#2#3#4#5#6#7; - { \@@_ep_compare_aux:wwww {#1}{#2}{#3}{#4}{#5}; #6#7; } -\cs_new:Npn \@@_ep_compare_aux:wwww #1;#2;#3,#4#5#6#7#8#9; +\cs_new:Npn \@@_ep_compare:wwww #1,#2#3#4#5#6#7\@@_sep: + { \@@_ep_compare_aux:wwww {#1}{#2}{#3}{#4}{#5}\@@_sep: #6#7\@@_sep: } +\cs_new:Npn \@@_ep_compare_aux:wwww + #1\@@_sep:#2\@@_sep:#3,#4#5#6#7#8#9\@@_sep: { \if_case:w - \@@_compare_npos:nwnw #1; {#3}{#4}{#5}{#6}{#7}; \exp_stop_f: + \@@_compare_npos:nwnw + #1\@@_sep: {#3}{#4}{#5}{#6}{#7}\@@_sep: \exp_stop_f: \if_int_compare:w #2 = #8#9 \exp_stop_f: 0 \else: @@ -749,19 +756,19 @@ % and~|#4| as fixed point numbers, and sum the exponents |#1| % and~|#3|. The result's first block is in $[100,9999]$. % \begin{macrocode} -\cs_new:Npn \@@_ep_mul:wwwwn #1,#2; #3,#4; +\cs_new:Npn \@@_ep_mul:wwwwn #1,#2\@@_sep: #3,#4\@@_sep: { - \@@_ep_to_ep:wwN #3,#4; + \@@_ep_to_ep:wwN #3,#4\@@_sep: \@@_fixed_continue:wn { - \@@_ep_to_ep:wwN #1,#2; + \@@_ep_to_ep:wwN #1,#2\@@_sep: \@@_ep_mul_raw:wwwwN } \@@_fixed_continue:wn } -\cs_new:Npn \@@_ep_mul_raw:wwwwN #1,#2; #3,#4; #5 +\cs_new:Npn \@@_ep_mul_raw:wwwwN #1,#2\@@_sep: #3,#4\@@_sep: #5 { - \@@_fixed_mul:wwn #2; #4; + \@@_fixed_mul:wwn #2\@@_sep: #4\@@_sep: { \exp_after:wN #5 \int_value:w \@@_int_eval:w #1 + #3 , } } % \end{macrocode} @@ -901,12 +908,12 @@ % \meta{denominator} \meta{numerator}, responsible for estimating the % inverse of the denominator. % \begin{macrocode} -\cs_new:Npn \@@_ep_div:wwwwn #1,#2; #3,#4; +\cs_new:Npn \@@_ep_div:wwwwn #1,#2\@@_sep: #3,#4\@@_sep: { - \@@_ep_to_ep:wwN #1,#2; + \@@_ep_to_ep:wwN #1,#2\@@_sep: \@@_fixed_continue:wn { - \@@_ep_to_ep:wwN #3,#4; + \@@_ep_to_ep:wwN #3,#4\@@_sep: \@@_ep_div_esti:wwwwn } } @@ -935,24 +942,25 @@ % $10^{-9}a/(1-\epsilon)$, that is, $1/(10\meta{d})$ and we finally % multiply this by the numerator~|#8|. % \begin{macrocode} -\cs_new:Npn \@@_ep_div_esti:wwwwn #1,#2#3; #4, +\cs_new:Npn \@@_ep_div_esti:wwwwn #1,#2#3\@@_sep: #4, { \exp_after:wN \@@_ep_div_estii:wwnnwwn \int_value:w \@@_int_eval:w 10 0000 0000 / ( #2 + 1 ) - \exp_after:wN ; + \exp_after:wN \@@_sep: \int_value:w \@@_int_eval:w #4 - #1 + 1 , - {#2} #3; + {#2} #3\@@_sep: } -\cs_new:Npn \@@_ep_div_estii:wwnnwwn #1; #2,#3#4#5; #6; #7 +\cs_new:Npn \@@_ep_div_estii:wwnnwwn + #1\@@_sep: #2,#3#4#5\@@_sep: #6\@@_sep: #7 { \exp_after:wN \@@_ep_div_estiii:NNNNNwwwn \int_value:w \@@_int_eval:w 10 0000 0000 - 1750 - + #1 000 + (10 0000 0000 / #3 - #1) * (1000 - #4 / 10) ; - {#3}{#4}#5; #6; { #7 #2, } + + #1 000 + (10 0000 0000 / #3 - #1) * (1000 - #4 / 10) \@@_sep: + {#3}{#4}#5\@@_sep: #6\@@_sep: { #7 #2, } } -\cs_new:Npn \@@_ep_div_estiii:NNNNNwwwn 1#1#2#3#4#5#6; #7; +\cs_new:Npn \@@_ep_div_estiii:NNNNNwwwn 1#1#2#3#4#5#6\@@_sep: #7\@@_sep: { - \@@_fixed_mul_short:wwn #7; {#1}{#2#3#4#5}{#6}; + \@@_fixed_mul_short:wwn #7\@@_sep: {#1}{#2#3#4#5}{#6}\@@_sep: \@@_ep_div_epsi:wnNNNNNn {#1#2#3#4}#5#6 \@@_fixed_mul:wwn } @@ -978,28 +986,29 @@ % combination of \texttt{short_mul} and \texttt{div_myriad} is both % faster and more precise than a simple \texttt{mul}. % \begin{macrocode} -\cs_new:Npn \@@_ep_div_epsi:wnNNNNNn #1#2#3#4#5#6; +\cs_new:Npn \@@_ep_div_epsi:wnNNNNNn #1#2#3#4#5#6\@@_sep: { \exp_after:wN \@@_ep_div_epsii:wwnNNNNNn \int_value:w \@@_int_eval:w 1 9998 - #2 \exp_after:wN \@@_ep_div_eps_pack:NNNNNw \int_value:w \@@_int_eval:w 1 9999 9998 - #3#4 \exp_after:wN \@@_ep_div_eps_pack:NNNNNw - \int_value:w \@@_int_eval:w 2 0000 0000 - #5#6 ; ; + \int_value:w \@@_int_eval:w 2 0000 0000 - #5#6 \@@_sep: \@@_sep: } -\cs_new:Npn \@@_ep_div_eps_pack:NNNNNw #1#2#3#4#5#6; - { + #1 ; {#2#3#4#5} {#6} } -\cs_new:Npn \@@_ep_div_epsii:wwnNNNNNn 1#1; #2; #3#4#5#6#7#8 +\cs_new:Npn \@@_ep_div_eps_pack:NNNNNw #1#2#3#4#5#6\@@_sep: + { + #1 \@@_sep: {#2#3#4#5} {#6} } +\cs_new:Npn \@@_ep_div_epsii:wwnNNNNNn 1#1\@@_sep: #2\@@_sep: #3#4#5#6#7#8 { - \@@_fixed_mul:wwn {0000}{#1}#2; {0000}{#1}#2; + \@@_fixed_mul:wwn {0000}{#1}#2\@@_sep: {0000}{#1}#2\@@_sep: \@@_fixed_add_one:wN - \@@_fixed_mul:wwn {10000} {#1} #2 ; + \@@_fixed_mul:wwn {10000} {#1} #2 \@@_sep: { - \@@_fixed_mul_short:wwn {0000}{#1}#2; {#3}{#4#5#6#7}{#8000}; + \@@_fixed_mul_short:wwn + {0000}{#1}#2\@@_sep: {#3}{#4#5#6#7}{#8000}\@@_sep: \@@_fixed_div_myriad:wn \@@_fixed_mul:wwn } - \@@_fixed_add:wwn {#3}{#4#5#6#7}{#8000}{0000}{0000}{0000}; + \@@_fixed_add:wwn {#3}{#4#5#6#7}{#8000}{0000}{0000}{0000}\@@_sep: } % \end{macrocode} % \end{macro} @@ -1047,9 +1056,9 @@ % mantissa and an altered continuation where we have stored the % result's exponent. % \begin{macrocode} -\cs_new:Npn \@@_ep_isqrt:wwn #1,#2; +\cs_new:Npn \@@_ep_isqrt:wwn #1,#2\@@_sep: { - \@@_ep_to_ep:wwN #1,#2; + \@@_ep_to_ep:wwN #1,#2\@@_sep: \@@_ep_isqrt_auxi:wwn } \cs_new:Npn \@@_ep_isqrt_auxi:wwn #1, @@ -1060,10 +1069,10 @@ { (1 - #1) / 2 , 535 , { 0 } { } } { 1 - #1 / 2 , 168 , { } { 0 } } } -\cs_new:Npn \@@_ep_isqrt_auxii:wwnnnwn #1, #2, #3#4 #5#6; #7 +\cs_new:Npn \@@_ep_isqrt_auxii:wwnnnwn #1, #2, #3#4 #5#6\@@_sep: #7 { \@@_ep_isqrt_esti:wwwnnwn #2, 0, #5, {#3} {#4} - {#5} #6 ; { #7 #1 , } + {#5} #6 \@@_sep: { #7 #1 , } } % \end{macrocode} % \end{macro} @@ -1106,13 +1115,14 @@ { \exp_after:wN \@@_ep_isqrt_estiii:NNNNNwwwn \int_value:w \@@_int_eval:w 1000 0000 + #2 * #2 #5 * 5 - \exp_after:wN , \int_value:w \@@_int_eval:w 10000 + #2 ; + \exp_after:wN , \int_value:w \@@_int_eval:w 10000 + #2 \@@_sep: } -\cs_new:Npn \@@_ep_isqrt_estiii:NNNNNwwwn 1#1#2#3#4#5#6, 1#7#8; #9; +\cs_new:Npn \@@_ep_isqrt_estiii:NNNNNwwwn + 1#1#2#3#4#5#6, 1#7#8\@@_sep: #9\@@_sep: { - \@@_fixed_mul_short:wwn #9; {#1} {#2#3#4#5} {#600} ; + \@@_fixed_mul_short:wwn #9\@@_sep: {#1} {#2#3#4#5} {#600} \@@_sep: \@@_ep_isqrt_epsi:wN - \@@_fixed_mul_short:wwn {#7} {#80} {0000} ; + \@@_fixed_mul_short:wwn {#7} {#80} {0000} \@@_sep: } % \end{macrocode} % \end{macro} @@ -1124,19 +1134,19 @@ % multiplications. The \texttt{epsii} auxiliary receives $z$ as~|#1| % and $y$ as~|#2|. % \begin{macrocode} -\cs_new:Npn \@@_ep_isqrt_epsi:wN #1; +\cs_new:Npn \@@_ep_isqrt_epsi:wN #1\@@_sep: { - \@@_fixed_sub:wwn {15000}{0000}{0000}{0000}{0000}{0000}; #1; - \@@_ep_isqrt_epsii:wwN #1; - \@@_ep_isqrt_epsii:wwN #1; - \@@_ep_isqrt_epsii:wwN #1; + \@@_fixed_sub:wwn {15000}{0000}{0000}{0000}{0000}{0000}\@@_sep: #1\@@_sep: + \@@_ep_isqrt_epsii:wwN #1\@@_sep: + \@@_ep_isqrt_epsii:wwN #1\@@_sep: + \@@_ep_isqrt_epsii:wwN #1\@@_sep: } -\cs_new:Npn \@@_ep_isqrt_epsii:wwN #1; #2; +\cs_new:Npn \@@_ep_isqrt_epsii:wwN #1\@@_sep: #2\@@_sep: { - \@@_fixed_mul:wwn #1; #1; - \@@_fixed_mul_sub_back:wwwn #2; - {15000}{0000}{0000}{0000}{0000}{0000}; - \@@_fixed_mul:wwn #1; + \@@_fixed_mul:wwn #1\@@_sep: #1\@@_sep: + \@@_fixed_mul_sub_back:wwwn #2\@@_sep: + {15000}{0000}{0000}{0000}{0000}{0000}\@@_sep: + \@@_fixed_mul:wwn #1\@@_sep: } % \end{macrocode} % \end{macro} @@ -1156,9 +1166,10 @@ % \begin{macrocode} \cs_new:Npn \@@_ep_to_float_o:wwN #1, { + \@@_int_eval:w #1 \@@_fixed_to_float_o:wN } -\cs_new:Npn \@@_ep_inv_to_float_o:wwN #1,#2; +\cs_new:Npn \@@_ep_inv_to_float_o:wwN #1,#2\@@_sep: { - \@@_ep_div:wwwwn 1,{1000}{0000}{0000}{0000}{0000}{0000}; #1,#2; + \@@_ep_div:wwwwn + 1,{1000}{0000}{0000}{0000}{0000}{0000}\@@_sep: #1,#2\@@_sep: \@@_ep_to_float_o:wwN } % \end{macrocode} @@ -1178,9 +1189,9 @@ % a floating point number. This could perhaps remain in % \pkg{l3fp-trig}. % \begin{macrocode} -\cs_new:Npn \@@_fixed_to_float_rad_o:wN #1; +\cs_new:Npn \@@_fixed_to_float_rad_o:wN #1\@@_sep: { - \@@_fixed_mul:wwn #1; {5729}{5779}{5130}{8232}{0876}{7981}; + \@@_fixed_mul:wwn #1\@@_sep: {5729}{5779}{5130}{8232}{0876}{7981}\@@_sep: { \@@_ep_to_float_o:wwN 2, } } % \end{macrocode} @@ -1190,11 +1201,11 @@ % \begin{macro}[rEXP] % {\@@_fixed_to_float_o:wN, \@@_fixed_to_float_o:Nw} % \begin{syntax} -% \ldots{} \cs{@@_int_eval:w} \meta{exponent} \cs{@@_fixed_to_float_o:wN} \Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} |;| \meta{sign} +% \ldots{} \cs{@@_int_eval:w} \meta{exponent} \cs{@@_fixed_to_float_o:wN} \Arg{a_1} \Arg{a_2} \Arg{a_3} \Arg{a_4} \Arg{a_5} \Arg{a_6} \cs{@@_sep:} \meta{sign} % \end{syntax} % yields % \begin{quote} -% \meta{exponent'} |;| \Arg{a'_1} \Arg{a'_2} \Arg{a'_3} \Arg{a'_4} |;| +% \meta{exponent'} \cs{@@_sep:} \Arg{a'_1} \Arg{a'_2} \Arg{a'_3} \Arg{a'_4} \cs{@@_sep:} % \end{quote} % And the \texttt{to_fixed} version gives six brace groups instead of % $4$, ensuring that $1000\leq\meta{a'_1}\leq 9999$. At this stage, we @@ -1204,9 +1215,9 @@ % %^^A todo: round properly when rounding to infinity: I need the sign. % \begin{macrocode} -\cs_new:Npn \@@_fixed_to_float_o:Nw #1#2; - { \@@_fixed_to_float_o:wN #2; #1 } -\cs_new:Npn \@@_fixed_to_float_o:wN #1#2#3#4#5#6; #7 +\cs_new:Npn \@@_fixed_to_float_o:Nw #1#2\@@_sep: + { \@@_fixed_to_float_o:wN #2\@@_sep: #1 } +\cs_new:Npn \@@_fixed_to_float_o:wN #1#2#3#4#5#6\@@_sep: #7 { % for the 8-digit-at-the-start thing + \@@_int_eval:w \c_@@_block_int \exp_after:wN \exp_after:wN @@ -1217,8 +1228,8 @@ \int_value:w 1#2 \exp_after:wN \@@_use_none_stop_f:n \int_value:w 1#3#4 \exp_after:wN \@@_use_none_stop_f:n \int_value:w 1#5#6 - \exp_after:wN ; - \exp_after:wN ; + \exp_after:wN \@@_sep: + \exp_after:wN \@@_sep: } \cs_new:Npn \@@_fixed_to_loop:N #1 { @@ -1230,36 +1241,36 @@ \exp_after:wN #1 \fi: } -\cs_new:Npn \@@_fixed_to_loop_end:w #1 #2 ; +\cs_new:Npn \@@_fixed_to_loop_end:w #1 #2 \@@_sep: { - \if_meaning:w ; #1 + \if_meaning:w \@@_sep: #1 \exp_after:wN \@@_fixed_to_float_zero:w \else: \exp_after:wN \@@_pack_twice_four:wNNNNNNNN \exp_after:wN \@@_pack_twice_four:wNNNNNNNN \exp_after:wN \@@_fixed_to_float_pack:ww - \exp_after:wN ; + \exp_after:wN \@@_sep: \fi: - #1 #2 0000 0000 0000 0000 ; + #1 #2 0000 0000 0000 0000 \@@_sep: } -\cs_new:Npn \@@_fixed_to_float_zero:w ; 0000 0000 0000 0000 ; +\cs_new:Npn \@@_fixed_to_float_zero:w \@@_sep: 0000 0000 0000 0000 \@@_sep: { - - 2 * \c_@@_max_exponent_int ; - {0000} {0000} {0000} {0000} ; + - 2 * \c_@@_max_exponent_int \@@_sep: + {0000} {0000} {0000} {0000} \@@_sep: } -\cs_new:Npn \@@_fixed_to_float_pack:ww #1 ; #2#3 ; ; +\cs_new:Npn \@@_fixed_to_float_pack:ww #1 \@@_sep: #2#3 \@@_sep: \@@_sep: { \if_int_compare:w #2 > 4 \exp_stop_f: \exp_after:wN \@@_fixed_to_float_round_up:wnnnnw \fi: - ; #1 ; + \@@_sep: #1 \@@_sep: } -\cs_new:Npn \@@_fixed_to_float_round_up:wnnnnw ; #1#2#3#4 ; +\cs_new:Npn \@@_fixed_to_float_round_up:wnnnnw \@@_sep: #1#2#3#4 \@@_sep: { \exp_after:wN \@@_basics_pack_high:NNNNNw \int_value:w \@@_int_eval:w 1 #1#2 \exp_after:wN \@@_basics_pack_low:NNNNNw - \int_value:w \@@_int_eval:w 1 #3#4 + 1 ; + \int_value:w \@@_int_eval:w 1 #3#4 + 1 \@@_sep: } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-functions.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-functions.dtx index 4825833bca8..2413838ca75 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-functions.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-functions.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -138,7 +138,7 @@ \@@_exp_after_array_f:w #2 \s_@@_expr_stop \exp_after:wN } - \exp_after:wN ; + \exp_after:wN \@@_sep: } } % \end{macrocode} @@ -191,7 +191,7 @@ \exp_not:N \@@_symbolic_chk:w \exp_not:N \@@_function_arg_o:w \int_use:N \l_@@_function_arg_int - ########1 , { } ; + ########1 , { } \@@_sep: } } \cs_set:Npn \@@_function_arg_o:w ##1 @ @@ -203,7 +203,7 @@ \@@_exp_after_symbolic_loop:N ##1 { , \tex_romannumeral:D \use_none:nn } \exp_after:wN \c_zero_int - \exp_after:wN { \exp_after:wN } \exp_after:wN ; + \exp_after:wN { \exp_after:wN } \exp_after:wN \@@_sep: } \fp_set:Nn \l_@@_symbolic_fp {#4} \use:e @@ -250,9 +250,9 @@ #2 } \cs_new:Npn \@@_function_arg_few:w #1 @ { \exp_after:wN \c_nan_fp } -\cs_new:Npn \@@_function_arg_get:w #1#2#3; #4 @ +\cs_new:Npn \@@_function_arg_get:w #1#2#3\@@_sep: #4 @ { - \@@_exp_after_array_f:w #3; \s_@@_expr_stop + \@@_exp_after_array_f:w #3\@@_sep: \s_@@_expr_stop \exp_after:wN \exp_stop_f: } % \end{macrocode} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-logic.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-logic.dtx index 6c21d243866..29b149498b6 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-logic.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-logic.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -75,8 +75,8 @@ % \subsection{Syntax of internal functions} % % \begin{itemize} -% \item \cs{@@_compare_npos:nwnw} \Arg{expo_1} \meta{body_1} |;| -% \Arg{expo_2} \meta{body_2} |;| +% \item \cs{@@_compare_npos:nwnw} \Arg{expo_1} \meta{body_1} \cs{@@_sep:} +% \Arg{expo_2} \meta{body_2} \cs{@@_sep:} % \item \cs{@@_minmax_o:Nw} \meta{sign} \meta{floating point array} % \item \cs{@@_not_o:w} |?| \meta{floating point array} (with one floating point number only) % \item \cs{@@_&_o:ww} \meta{floating point} \meta{floating point} @@ -123,7 +123,7 @@ \exp_after:wN \@@_compare_return:w \exp:w \exp_end_continue_f:w \@@_parse:n {#1} } -\cs_new:Npn \@@_compare_return:w #1#2#3; +\cs_new:Npn \@@_compare_return:w #1#2#3\@@_sep: { \if_charcode:w 0 \@@_if_type_fp:NTwFw @@ -156,10 +156,10 @@ \prg_return_false: \fi: } -\cs_new:Npn \@@_compare_aux:wn #1; #2 +\cs_new:Npn \@@_compare_aux:wn #1\@@_sep: #2 { \exp_after:wN \@@_compare_back_any:ww - \exp:w \exp_end_continue_f:w \@@_parse:n {#2} #1; + \exp:w \exp_end_continue_f:w \@@_parse:n {#2} #1\@@_sep: } % \end{macrocode} % \end{macro} @@ -167,7 +167,7 @@ % % \begin{macro}[EXP]{\@@_compare_back:ww, \@@_bcmp:ww, \@@_compare_back_any:ww, \@@_compare_nan:w} % \begin{quote} -% \cs{@@_compare_back_any:ww} \meta{y} |;| \meta{x} |;| +% \cs{@@_compare_back_any:ww} \meta{y} \cs{@@_sep:} \meta{x} \cs{@@_sep:} % \end{quote} % Expands (in the same way as \cs{int_eval:n}) to $-1$ if $x<y$, $0$ % if $x=y$, $1$ if $x>y$, and $2$ otherwise (denoted as $x?y$). If @@ -180,7 +180,7 @@ % a different type, the highest type is a larger number. Finally, if % $y\leq 0$, then $x>y$, unless both are zero. % \begin{macrocode} -\cs_new:Npn \@@_compare_back:ww #1#2; #3#4; +\cs_new:Npn \@@_compare_back:ww #1#2\@@_sep: #3#4\@@_sep: { \cs:w @@ @@ -189,9 +189,9 @@ \@@_type_from_scan:N #3 :ww \cs_end: - #1#2; #3#4; + #1#2\@@_sep: #3#4\@@_sep: } -\cs_new:Npn \@@_compare_back_any:ww #1#2; #3 +\cs_new:Npn \@@_compare_back_any:ww #1#2\@@_sep: #3 { \@@_if_type_fp:NTwFw #1 { \@@_if_type_fp:NTwFw #3 \use_i:nn \s_@@ \use_ii:nn \s_@@_stop } @@ -206,11 +206,11 @@ :ww \cs_end: } - #1#2 ; #3 + #1#2 \@@_sep: #3 } \cs_new:Npn \@@_bcmp:ww - \s_@@ \@@_chk:w #1 #2 #3; - \s_@@ \@@_chk:w #4 #5 #6; + \s_@@ \@@_chk:w #1 #2 #3\@@_sep: + \s_@@ \@@_chk:w #4 #5 #6\@@_sep: { \int_value:w \if_meaning:w 3 #1 \exp_after:wN \@@_compare_nan:w \fi: @@ -219,7 +219,7 @@ \if_meaning:w #2 #5 \if_meaning:w #1 #4 \if_meaning:w 1 #1 - \@@_compare_npos:nwnw #6; #3; + \@@_compare_npos:nwnw #6\@@_sep: #3\@@_sep: \else: 0 \fi: @@ -247,30 +247,30 @@ % and if any don't match return~$2$ (as \cs{int_value:w} |02| % \cs{exp_stop_f:}). % \begin{macrocode} -\cs_new:Npn \@@_compare_back_tuple:ww #1; #2; { 2 } -\cs_new:Npn \@@_tuple_compare_back:ww #1; #2; { 2 } +\cs_new:Npn \@@_compare_back_tuple:ww #1\@@_sep: #2\@@_sep: { 2 } +\cs_new:Npn \@@_tuple_compare_back:ww #1\@@_sep: #2\@@_sep: { 2 } \cs_new:Npn \@@_tuple_compare_back_tuple:ww - \s_@@_tuple \@@_tuple_chk:w #1; - \s_@@_tuple \@@_tuple_chk:w #2; + \s_@@_tuple \@@_tuple_chk:w #1\@@_sep: + \s_@@_tuple \@@_tuple_chk:w #2\@@_sep: { \int_compare:nNnTF { \@@_array_count:n {#1} } = { \@@_array_count:n {#2} } { \int_value:w 0 \@@_tuple_compare_back_loop:w - #1 { \s_@@ \prg_break: } ; @ - #2 { \s_@@ \prg_break: } ; + #1 { \s_@@ \prg_break: } \@@_sep: @ + #2 { \s_@@ \prg_break: } \@@_sep: \prg_break_point: \exp_stop_f: } { 2 } } -\cs_new:Npn \@@_tuple_compare_back_loop:w #1#2 ; #3 @ #4#5 ; +\cs_new:Npn \@@_tuple_compare_back_loop:w #1#2 \@@_sep: #3 @ #4#5 \@@_sep: { \use_none:n #1 \use_none:n #4 \if_int_compare:w - \@@_compare_back_any:ww #1 #2 ; #4 #5 ; = \c_zero_int + \@@_compare_back_any:ww #1 #2 \@@_sep: #4 #5 \@@_sep: = \c_zero_int \else: 2 \exp_after:wN \prg_break: \fi: @@ -284,8 +284,8 @@ % \begin{macro}[EXP]{\@@_compare_significand:nnnnnnnn} % \begin{quote} % \cs{@@_compare_npos:nwnw} -% \Arg{expo_1} \meta{body_1} |;| -% \Arg{expo_2} \meta{body_2} |;| +% \Arg{expo_1} \meta{body_1} \cs{@@_sep:} +% \Arg{expo_2} \meta{body_2} \cs{@@_sep:} % \end{quote} % Within an \cs{int_value:w} \ldots{} \cs{exp_stop_f:} construction, % this expands to $0$ if the two numbers are equal, $-1$ if the first @@ -296,7 +296,7 @@ % first $8$ digits coincide, the next $8$ decide. Otherwise, the % first $8$ digits are compared. % \begin{macrocode} -\cs_new:Npn \@@_compare_npos:nwnw #1#2; #3#4; +\cs_new:Npn \@@_compare_npos:nwnw #1#2\@@_sep: #3#4\@@_sep: { \if_int_compare:w #1 = #3 \exp_stop_f: \@@_compare_significand:nnnnnnnn #2 #4 @@ -427,20 +427,22 @@ % progress. Conversion to decimal is done just before calling the % user's function. % \begin{macrocode} -\cs_new:Npn \@@_step:wwwN #1#2; #3#4; #5#6; #7 +\cs_new:Npn \@@_step:wwwN #1#2\@@_sep: #3#4\@@_sep: #5#6\@@_sep: #7 { \@@_if_type_fp:NTwFw #1 { } \s_@@ \prg_break: \s_@@_stop \@@_if_type_fp:NTwFw #3 { } \s_@@ \prg_break: \s_@@_stop \@@_if_type_fp:NTwFw #5 { } \s_@@ \prg_break: \s_@@_stop - \use_i:nnnn { \@@_step_fp:wwwN #1#2; #3#4; #5#6; #7 } + \use_i:nnnn + { \@@_step_fp:wwwN #1#2\@@_sep: #3#4\@@_sep: #5#6\@@_sep: #7 } \prg_break_point: \use:n { - \@@_error:nfff { step-tuple } { \fp_to_tl:n { #1#2 ; } } - { \fp_to_tl:n { #3#4 ; } } { \fp_to_tl:n { #5#6 ; } } + \@@_error:nfff { step-tuple } { \fp_to_tl:n { #1#2 \@@_sep: } } + { \fp_to_tl:n { #3#4 \@@_sep: } } { \fp_to_tl:n { #5#6 \@@_sep: } } } } -\cs_new:Npn \@@_step_fp:wwwN #1 ; \s_@@ \@@_chk:w #2#3#4 ; #5; #6 +\cs_new:Npn \@@_step_fp:wwwN + #1 \@@_sep: \s_@@ \@@_chk:w #2#3#4 \@@_sep: #5\@@_sep: #6 { \token_if_eq_meaning:NNTF #2 1 { @@ -456,11 +458,15 @@ } { \@@_error:nnfn { bad-step } { } - { \fp_to_tl:n { \s_@@ \@@_chk:w #2#3#4 ; } } {#6} + { \fp_to_tl:n { \s_@@ \@@_chk:w #2#3#4 \@@_sep: } } {#6} } \use_none:nnnnn } - { #1 ; } { \c_nan_fp } { \s_@@ \@@_chk:w #2#3#4 ; } { #5 ; } #6 + { #1 \@@_sep: } + { \c_nan_fp } + { \s_@@ \@@_chk:w #2#3#4 \@@_sep: } + { #5 \@@_sep: } + #6 } \cs_new:Npn \@@_step:NnnnnN #1#2#3#4#5#6 { @@ -556,8 +562,8 @@ \exp_after:wN \@@_minmax_loop:Nww \exp_after:wN - \fi: #2 - \s_@@ \@@_chk:w 2 #1 \s_@@_exact ; - \s_@@ \@@_chk:w { 3 \@@_minmax_break_o:w } ; + \s_@@ \@@_chk:w 2 #1 \s_@@_exact \@@_sep: + \s_@@ \@@_chk:w { 3 \@@_minmax_break_o:w } \@@_sep: } % \end{macrocode} % \end{macro} @@ -574,7 +580,7 @@ % maximum; otherwise we keep the first number. Then loop. % \begin{macrocode} \cs_new:Npn \@@_minmax_loop:Nww - #1 \s_@@ \@@_chk:w #2#3; \s_@@ \@@_chk:w #4#5; + #1 \s_@@ \@@_chk:w #2#3\@@_sep: \s_@@ \@@_chk:w #4#5\@@_sep: { \if_meaning:w 3 #4 \if_meaning:w 3 #2 @@ -585,8 +591,8 @@ \else: \if_int_compare:w \@@_compare_back:ww - \s_@@ \@@_chk:w #4#5; - \s_@@ \@@_chk:w #2#3; + \s_@@ \@@_chk:w #4#5\@@_sep: + \s_@@ \@@_chk:w #2#3\@@_sep: = #1 1 \exp_stop_f: \@@_minmax_auxii:ww \else: @@ -594,8 +600,8 @@ \fi: \fi: \@@_minmax_loop:Nww #1 - \s_@@ \@@_chk:w #2#3; - \s_@@ \@@_chk:w #4#5; + \s_@@ \@@_chk:w #2#3\@@_sep: + \s_@@ \@@_chk:w #4#5\@@_sep: } % \end{macrocode} % \end{macro} @@ -603,9 +609,10 @@ % \begin{macro}[EXP]{\@@_minmax_auxi:ww, \@@_minmax_auxii:ww} % Keep the first/second number, and remove the other. % \begin{macrocode} -\cs_new:Npn \@@_minmax_auxi:ww #1 \fi: \fi: #2 \s_@@ #3 ; \s_@@ #4; - { \fi: \fi: #2 \s_@@ #3 ; } -\cs_new:Npn \@@_minmax_auxii:ww #1 \fi: \fi: #2 \s_@@ #3 ; +\cs_new:Npn \@@_minmax_auxi:ww + #1 \fi: \fi: #2 \s_@@ #3 \@@_sep: \s_@@ #4\@@_sep: + { \fi: \fi: #2 \s_@@ #3 \@@_sep: } +\cs_new:Npn \@@_minmax_auxii:ww #1 \fi: \fi: #2 \s_@@ #3 \@@_sep: { \fi: \fi: #2 } % \end{macrocode} % \end{macro} @@ -615,8 +622,8 @@ % to the end of the tests, close the current test with \cs{fi:}, clean % up, and return the appropriate number with one post-expansion. % \begin{macrocode} -\cs_new:Npn \@@_minmax_break_o:w #1 \fi: \fi: #2 \s_@@ #3; #4; - { \fi: \@@_exp_after_o:w \s_@@ #3; } +\cs_new:Npn \@@_minmax_break_o:w #1 \fi: \fi: #2 \s_@@ #3\@@_sep: #4\@@_sep: + { \fi: \@@_exp_after_o:w \s_@@ #3\@@_sep: } % \end{macrocode} % \end{macro} % @@ -627,7 +634,7 @@ % exit the conditional, and one to please \pkg{l3fp-parse}. The first % argument is provided by \pkg{l3fp-parse} and is ignored. % \begin{macrocode} -\cs_new:Npn \@@_not_o:w #1 \s_@@ \@@_chk:w #2#3; @ +\cs_new:Npn \@@_not_o:w #1 \s_@@ \@@_chk:w #2#3\@@_sep: @ { \if_meaning:w 0 #2 \exp_after:wN \exp_after:wN \exp_after:wN \c_one_fp @@ -652,30 +659,31 @@ \group_begin: \char_set_catcode_letter:N & \char_set_catcode_letter:N | - \cs_new:Npn \@@_&_o:ww #1 \s_@@ \@@_chk:w #2#3; + \cs_new:Npn \@@_&_o:ww #1 \s_@@ \@@_chk:w #2#3\@@_sep: { \if_meaning:w 0 #2 #1 - \@@_and_return:wNw \s_@@ \@@_chk:w #2#3; + \@@_and_return:wNw \s_@@ \@@_chk:w #2#3\@@_sep: \fi: \@@_exp_after_o:w } - \cs_new:Npn \@@_&_tuple_o:ww #1 \s_@@ \@@_chk:w #2#3; + \cs_new:Npn \@@_&_tuple_o:ww #1 \s_@@ \@@_chk:w #2#3\@@_sep: { \if_meaning:w 0 #2 #1 - \@@_and_return:wNw \s_@@ \@@_chk:w #2#3; + \@@_and_return:wNw \s_@@ \@@_chk:w #2#3\@@_sep: \fi: \@@_exp_after_tuple_o:w } - \cs_new:Npn \@@_tuple_&_o:ww #1; { \@@_exp_after_o:w } - \cs_new:Npn \@@_tuple_&_tuple_o:ww #1; { \@@_exp_after_tuple_o:w } + \cs_new:Npn \@@_tuple_&_o:ww #1\@@_sep: { \@@_exp_after_o:w } + \cs_new:Npn \@@_tuple_&_tuple_o:ww #1\@@_sep: { \@@_exp_after_tuple_o:w } \cs_new:Npn \@@_|_o:ww { \@@_&_o:ww \else: } \cs_new:Npn \@@_|_tuple_o:ww { \@@_&_tuple_o:ww \else: } - \cs_new:Npn \@@_tuple_|_o:ww #1; #2; { \@@_exp_after_tuple_o:w #1; } - \cs_new:Npn \@@_tuple_|_tuple_o:ww #1; #2; - { \@@_exp_after_tuple_o:w #1; } + \cs_new:Npn \@@_tuple_|_o:ww #1\@@_sep: #2\@@_sep: + { \@@_exp_after_tuple_o:w #1\@@_sep: } + \cs_new:Npn \@@_tuple_|_tuple_o:ww #1\@@_sep: #2\@@_sep: + { \@@_exp_after_tuple_o:w #1\@@_sep: } \group_end: -\cs_new:Npn \@@_and_return:wNw #1; \fi: #2; - { \fi: \@@_exp_after_o:w #1; } +\cs_new:Npn \@@_and_return:wNw #1\@@_sep: \fi: #2\@@_sep: + { \fi: \@@_exp_after_o:w #1\@@_sep: } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-parse.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-parse.dtx index 66459badb08..b7fb52e7fdb 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-parse.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-parse.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -71,7 +71,7 @@ % % In this file at least, a \meta{floating point object} is a floating % point number or tuple. This can be extended to anything that starts -% with \cs{s_@@} or \cs{s_@@_\meta{type}} and ends with |;| with some +% with \cs{s_@@} or \cs{s_@@_\meta{type}} and ends with \cs{@@_sep:} with some % internal structure that depends on the \meta{type}. % % \begin{macro}[EXP]{\@@_parse:n} @@ -215,12 +215,12 @@ % |\add:ww| 12345 ; 333444 ; % \end{syntax} % which can safely perform the addition by grabbing two arguments -% delimited by~|;|. +% delimited by~\cs{@@_sep:}. % % If we were to continue parsing the expression, then the following % number should also be cleaned up before the next use of a binary % operation such as |\add:ww|. Just like \cs{int_value:w} |12345| -% \cs{exp_after:wN}~|;| expanded what follows once, we need |\add:ww| +% \cs{exp_after:wN}~\cs{@@_sep:} expanded what follows once, we need |\add:ww| % to do the calculation, and in the process to expand the following % once. This is also true in our real application: all the functions of % the form \cs[no-index]{@@_\ldots_o:ww} expand what follows once. This comes at the @@ -643,7 +643,7 @@ % expansion. That turns out to be useful. % \begin{macrocode} \cs_new:Npn \@@_parse_return_semicolon:w - #1 \fi: \@@_parse_expand:w { \fi: ; #1 } + #1 \fi: \@@_parse_expand:w { \fi: \@@_sep: #1 } % \end{macrocode} % \end{macro} % @@ -665,7 +665,7 @@ % stream, until meeting a non-digit, or up to a number of digits equal % to their index. The full expansion is % \begin{syntax} -% \meta{digits} |;| \meta{filling 0} |;| \meta{length} +% \meta{digits} \cs{@@_sep:} \meta{filling 0} \cs{@@_sep:} \meta{length} % \end{syntax} % where \meta{filling 0} is a string of zeros such that \meta{digits} % \meta{filling 0} has the length given by the index of the function, @@ -687,14 +687,14 @@ \@@_parse_expand:w } } -\@@_tmp:w {vii} \@@_parse_digits_vi:N { 0000000 ; 7 } -\@@_tmp:w {vi} \@@_parse_digits_v:N { 000000 ; 6 } -\@@_tmp:w {v} \@@_parse_digits_iv:N { 00000 ; 5 } -\@@_tmp:w {iv} \@@_parse_digits_iii:N { 0000 ; 4 } -\@@_tmp:w {iii} \@@_parse_digits_ii:N { 000 ; 3 } -\@@_tmp:w {ii} \@@_parse_digits_i:N { 00 ; 2 } -\@@_tmp:w {i} \@@_parse_digits_:N { 0 ; 1 } -\cs_new:Npn \@@_parse_digits_:N { ; ; 0 } +\@@_tmp:w {vii} \@@_parse_digits_vi:N { 0000000 \@@_sep: 7 } +\@@_tmp:w {vi} \@@_parse_digits_v:N { 000000 \@@_sep: 6 } +\@@_tmp:w {v} \@@_parse_digits_iv:N { 00000 \@@_sep: 5 } +\@@_tmp:w {iv} \@@_parse_digits_iii:N { 0000 \@@_sep: 4 } +\@@_tmp:w {iii} \@@_parse_digits_ii:N { 000 \@@_sep: 3 } +\@@_tmp:w {ii} \@@_parse_digits_i:N { 00 \@@_sep: 2 } +\@@_tmp:w {i} \@@_parse_digits_:N { 0 \@@_sep: 1 } +\cs_new:Npn \@@_parse_digits_:N { \@@_sep: \@@_sep: 0 } % \end{macrocode} % \end{macro} % @@ -874,26 +874,26 @@ \exp_after:wN \@@_parse_one_register_auxii:wwwNw } \exp_not:N \exp_after:wN { \exp_not:N \tex_the:D #1 } - ; \exp_not:N \@@_parse_one_register_dim:ww - \tl_to_str:n { pt } ; \exp_not:N \@@_parse_one_register_mu:www - . \tl_to_str:n { pt } ; \exp_not:N \@@_parse_one_register_int:www + \@@_sep: \exp_not:N \@@_parse_one_register_dim:ww + \tl_to_str:n { pt } \@@_sep: \exp_not:N \@@_parse_one_register_mu:www + . \tl_to_str:n { pt } \@@_sep: \exp_not:N \@@_parse_one_register_int:www \s_@@_stop } \exp_args:Nno \use:nn { \cs_new:Npn \@@_parse_one_register_auxii:wwwNw #1 . #2 } - { \tl_to_str:n { pt } #3 ; #4#5 \s_@@_stop } - { #4 #1.#2; } + { \tl_to_str:n { pt } #3 \@@_sep: #4#5 \s_@@_stop } + { #4 #1.#2\@@_sep: } \exp_args:Nno \use:nn { \cs_new:Npn \@@_parse_one_register_mu:www #1 } - { \tl_to_str:n { mu } ; #2 ; } - { \@@_parse_one_register_dim:ww #1 ; } -\cs_new:Npn \@@_parse_one_register_int:www #1; #2.; #3; + { \tl_to_str:n { mu } \@@_sep: #2 \@@_sep: } + { \@@_parse_one_register_dim:ww #1 \@@_sep: } +\cs_new:Npn \@@_parse_one_register_int:www #1\@@_sep: #2.\@@_sep: #3\@@_sep: { \@@_parse:n { #1 e #3 } } -\cs_new:Npn \@@_parse_one_register_dim:ww #1; #2; +\cs_new:Npn \@@_parse_one_register_dim:ww #1\@@_sep: #2\@@_sep: { \exp_after:wN \@@_from_dim_test:ww \int_value:w #2 \exp_after:wN , - \int_value:w \dim_to_decimal_in_sp:n { #1 pt } ; + \int_value:w \dim_to_decimal_in_sp:n { #1 pt } \@@_sep: } % \end{macrocode} % \end{macro} @@ -942,11 +942,11 @@ \exp_after:wN \@@_parse_one_register_wd:Nw #4 \@@_parse_expand:w e } -\cs_new:Npn \@@_parse_one_register_wd:Nw #1#2 ; +\cs_new:Npn \@@_parse_one_register_wd:Nw #1#2 \@@_sep: { \exp_after:wN \@@_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \int_value:w \dim_to_decimal_in_sp:n { #1 #2 } ; + \int_value:w \dim_to_decimal_in_sp:n { #1 #2 } \@@_sep: } % \end{macrocode} % \end{macro} @@ -1020,7 +1020,7 @@ % mixture of lower and upper case, so we test and use a % differently-named control sequence. % \begin{macrocode} -\cs_new:Npn \@@_parse_word:Nw #1#2; +\cs_new:Npn \@@_parse_word:Nw #1#2\@@_sep: { \cs_if_exist_use:cF { @@_parse_word_#2:N } { @@ -1184,7 +1184,7 @@ % \begin{macrocode} \cs_new:Npn \@@_parse_zero: { - \exp_after:wN ; \exp_after:wN 1 + \exp_after:wN \@@_sep: \exp_after:wN 1 \int_value:w \@@_parse_exponent:N } % \end{macrocode} @@ -1220,7 +1220,7 @@ % % \begin{macro}[rEXP]{\@@_parse_small_leading:wwNN} % \begin{syntax} -% \cs{@@_parse_small_leading:wwNN} |1| \meta{digits} |;| \meta{zeros} |;| \meta{number~of~zeros} +% \cs{@@_parse_small_leading:wwNN} |1| \meta{digits} \cs{@@_sep:} \meta{zeros} \cs{@@_sep:} \meta{number~of~zeros} % \end{syntax} % We leave \meta{digits} \meta{zeros} in the input stream: the % functions used to grab digits are such that this constitutes digits @@ -1232,7 +1232,7 @@ % Otherwise put $8$~zeros in to complete the significand, then look % for an exponent. % \begin{macrocode} -\cs_new:Npn \@@_parse_small_leading:wwNN 1 #1 ; #2; #3 #4 +\cs_new:Npn \@@_parse_small_leading:wwNN 1 #1 \@@_sep: #2\@@_sep: #3 #4 { #1 #2 \exp_after:wN \@@_parse_pack_trailing:NNNNNNww @@ -1254,7 +1254,7 @@ % % \begin{macro}[rEXP]{\@@_parse_small_trailing:wwNN} % \begin{syntax} -% \cs{@@_parse_small_trailing:wwNN} |1| \meta{digits} |;| \meta{zeros} |;| \meta{number~of~zeros} \meta{next~token} +% \cs{@@_parse_small_trailing:wwNN} |1| \meta{digits} \cs{@@_sep:} \meta{zeros} \cs{@@_sep:} \meta{number~of~zeros} \meta{next~token} % \end{syntax} % Leave digits $10$ to~$15$ (arguments |#1| and |#2|) in the input % stream. If the \meta{next~token} is a digit, it is the $16$th @@ -1264,7 +1264,7 @@ % Otherwise, there is no $16$-th digit, so we put a~$0$, and look for % an exponent. % \begin{macrocode} -\cs_new:Npn \@@_parse_small_trailing:wwNN 1 #1 ; #2; #3 #4 +\cs_new:Npn \@@_parse_small_trailing:wwNN 1 #1 \@@_sep: #2\@@_sep: #3 #4 { #1 #2 \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f: @@ -1301,19 +1301,20 @@ % this is simple because such a carry can only occur to give rise to a % power of~$10$. % \begin{macrocode} -\cs_new:Npn \@@_parse_pack_trailing:NNNNNNww #1 #2 #3#4#5#6 #7; #8 ; +\cs_new:Npn \@@_parse_pack_trailing:NNNNNNww + #1 #2 #3#4#5#6 #7\@@_sep: #8 \@@_sep: { \if_meaning:w 2 #2 + 1 \fi: - ; #8 + #1 ; {#3#4#5#6} {#7}; + \@@_sep: #8 + #1 \@@_sep: {#3#4#5#6} {#7}\@@_sep: } -\cs_new:Npn \@@_parse_pack_leading:NNNNNww #1 #2#3#4#5 #6; #7; +\cs_new:Npn \@@_parse_pack_leading:NNNNNww #1 #2#3#4#5 #6\@@_sep: #7\@@_sep: { + #7 \if_meaning:w 2 #1 \@@_parse_pack_carry:w \fi: - ; 0 {#2#3#4#5} {#6} + \@@_sep: 0 {#2#3#4#5} {#6} } -\cs_new:Npn \@@_parse_pack_carry:w \fi: ; 0 #1 - { \fi: + 1 ; 0 {1000} } +\cs_new:Npn \@@_parse_pack_carry:w \fi: \@@_sep: 0 #1 + { \fi: + 1 \@@_sep: 0 {1000} } % \end{macrocode} % \end{macro} % @@ -1344,7 +1345,7 @@ % % \begin{macro}[rEXP]{\@@_parse_large_leading:wwNN} % \begin{syntax} -% \cs{@@_parse_large_leading:wwNN} |1| \meta{digits} |;| \meta{zeros} |;| \meta{number~of~zeros} \meta{next~token} +% \cs{@@_parse_large_leading:wwNN} |1| \meta{digits} \cs{@@_sep:} \meta{zeros} \cs{@@_sep:} \meta{number~of~zeros} \meta{next~token} % \end{syntax} % We shift the exponent by the number of digits in~|#1|, namely the % target number, $8$, minus the \meta{number of zeros} (number of @@ -1357,7 +1358,7 @@ % complete the $8$~first digits, insert $8$~more, and look for an % exponent. % \begin{macrocode} -\cs_new:Npn \@@_parse_large_leading:wwNN 1 #1 ; #2; #3 #4 +\cs_new:Npn \@@_parse_large_leading:wwNN 1 #1 \@@_sep: #2\@@_sep: #3 #4 { + \c_@@_half_prec_int - #3 \exp_after:wN \@@_parse_pack_leading:NNNNNww @@ -1392,7 +1393,7 @@ % % \begin{macro}[EXP]{\@@_parse_large_trailing:wwNN} % \begin{syntax} -% \cs{@@_parse_large_trailing:wwNN} |1| \meta{digits} |;| \meta{zeros} |;| \meta{number~of~zeros} \meta{next~token} +% \cs{@@_parse_large_trailing:wwNN} |1| \meta{digits} \cs{@@_sep:} \meta{zeros} \cs{@@_sep:} \meta{number~of~zeros} \meta{next~token} % \end{syntax} % We have just read $15$~digits. If the \meta{next token} is a digit, % then the exponent shift caused by this block of $8$~digits is~$8$, @@ -1408,7 +1409,7 @@ % for an exponent after using the \meta{zeros} and providing a $16$-th % digit of~$0$. % \begin{macrocode} -\cs_new:Npn \@@_parse_large_trailing:wwNN 1 #1 ; #2; #3 #4 +\cs_new:Npn \@@_parse_large_trailing:wwNN 1 #1 \@@_sep: #2\@@_sep: #3 #4 { \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f: \exp_after:wN \@@_parse_pack_trailing:NNNNNNww @@ -1488,9 +1489,9 @@ % time, the result |0| or |1| is added to the % surrounding integer expression. % \begin{macrocode} -\cs_new:Npn \@@_parse_round_after:wN #1; #2 +\cs_new:Npn \@@_parse_round_after:wN #1\@@_sep: #2 { - + #2 \exp_after:wN ; + + #2 \exp_after:wN \@@_sep: \int_value:w \@@_int_eval:w #1 + \@@_parse_exponent:N } % \end{macrocode} @@ -1500,8 +1501,8 @@ % {\@@_parse_small_round:NN, \@@_parse_round_after:wN} % Here, |#1|~is the digit that we are currently rounding (we only care % whether it is even or odd). If |#2|~is not a digit, then fetch an -% exponent and expand to |;|\meta{exponent} only. Otherwise, we -% expand to |+0| or |+1|, then |;|\meta{exponent}. To +% exponent and expand to \cs{@@_sep:}\meta{exponent} only. Otherwise, we +% expand to |+0| or |+1|, then \cs{@@_sep:}\meta{exponent}. To % decide which, call \cs{@@_round_s:NNNw} to know whether to round up, % giving it as arguments a sign~$0$ (all explicit numbers are % positive), the digit |#1|~to round, the first following digit~|#2|, @@ -1581,7 +1582,7 @@ \fi: \@@_parse_expand:w } -\cs_new:Npn \@@_parse_large_round_aux:wNN #1 ; #2 #3 +\cs_new:Npn \@@_parse_large_round_aux:wNN #1 \@@_sep: #2 #3 { + #2 \exp_after:wN \@@_parse_round_after:wN @@ -1591,7 +1592,7 @@ \exp_after:wN \@@_parse_round_loop:N \exp:w \exp_after:wN \@@_parse_expand:w \else: - \exp_after:wN ; + \exp_after:wN \@@_sep: \exp_after:wN 0 \exp_after:wN #3 \fi: @@ -1618,7 +1619,7 @@ % two tokens ahead completely would break the third example (unpacking % is even worse). Indeed, in the course of reading $3.2$, \cs{c_pi_fp} % is expanded to \cs{s_@@} \cs{@@_chk:w} |1| |0| |{-1}| |{3141}| -% $\cdots$ |;| and \cs{s_@@} stops the expansion. Expanding two tokens +% $\cdots$ \cs{@@_sep:} and \cs{s_@@} stops the expansion. Expanding two tokens % ahead would then force the expansion of \cs{@@_chk:w} (despite it % being protected), and that function tries to produce an error. % @@ -1636,7 +1637,7 @@ % \begin{macrocode} \cs_new:Npn \@@_parse_exponent:Nw #1 #2 \@@_parse_expand:w { - \exp_after:wN ; + \exp_after:wN \@@_sep: \int_value:w #2 \@@_parse_exponent:N #1 } % \end{macrocode} @@ -1669,7 +1670,7 @@ { \if_int_compare:w \if_catcode:w \scan_stop: \exp_not:N #2 0 \else: `#2 \fi: > `9 \exp_stop_f: - 0 \exp_after:wN ; \exp_after:wN #1 + 0 \exp_after:wN \@@_sep: \exp_after:wN #1 \else: \exp_after:wN \@@_parse_exponent_sign:N \fi: @@ -1708,7 +1709,7 @@ \@@_parse_exponent_keep:NTF #1 { \@@_parse_return_semicolon:w #1 } { - \exp_after:wN ; + \exp_after:wN \@@_sep: \exp:w } \fi: @@ -1820,7 +1821,7 @@ % \begin{macro}[EXP]{\@@_parse_apply_unary_type:NNN, \@@_parse_apply_unary_error:NNw} % In contrast to \cs{@@_parse_apply_function:NNNwN}, this checks that % the operand |#4| is a single argument (namely there is a single -% |;|). We use the fact that any floating point starts with a +% \cs{@@_sep:}). We use the fact that any floating point starts with a % \enquote{safe} token like \cs{s_@@}. If there is no argument % produce the |fp-no-arg| error; if there are at least two produce % |fp-multi-arg|. For the error message extract the mathematical @@ -1834,12 +1835,12 @@ % \begin{macrocode} \cs_new:Npn \@@_parse_apply_unary:NNNwN #1#2#3#4@#5 { - \@@_parse_apply_unary_chk:NwNw #4 @ ; . \s_@@_stop + \@@_parse_apply_unary_chk:NwNw #4 @ \@@_sep: . \s_@@_stop \@@_parse_apply_unary_type:NNN #3 #2 #4 @ \exp:w \exp_end_continue_f:w #5 #1 } -\cs_new:Npn \@@_parse_apply_unary_chk:NwNw #1#2 ; #3#4 \s_@@_stop +\cs_new:Npn \@@_parse_apply_unary_chk:NwNw #1#2 \@@_sep: #3#4 \s_@@_stop { \if_meaning:w @ #3 \else: \token_if_eq_meaning:NNTF . #3 @@ -2043,7 +2044,7 @@ \cs_new:cpn { @@_parse_word_#1:N } { \@@_exp_after_f:nw { \@@_parse_infix:NN } - \s_@@ \@@_chk:w 10 #2 ; + \s_@@ \@@_chk:w 10 #2 \@@_sep: } } \@@_tmp:w {pt} { {1} {1000} {0000} {0000} {0000} } @@ -2070,7 +2071,7 @@ { \exp_after:wN \@@_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \int_value:w \dim_to_decimal_in_sp:n { 1 #1 } \exp_after:wN ; + \int_value:w \dim_to_decimal_in_sp:n { 1 #1 } \exp_after:wN \@@_sep: \exp:w \exp_end_continue_f:w \@@_parse_infix:NN } } @@ -2220,7 +2221,7 @@ % according to their types, and expands once after the result. % The |rev| version swaps its arguments before doing this. % \begin{macrocode} -\cs_new:Npn \@@_binary_type_o:Nww #1 #2#3 ; #4 +\cs_new:Npn \@@_binary_type_o:Nww #1 #2#3 \@@_sep: #4 { \exp_after:wN \@@_parse_apply_binary_chk:NN \cs:w @@ -2231,9 +2232,9 @@ _o:ww \cs_end: #1 - #2 #3 ; #4 + #2 #3 \@@_sep: #4 } -\cs_new:Npn \@@_binary_rev_type_o:Nww #1 #2#3 ; #4#5 ; +\cs_new:Npn \@@_binary_rev_type_o:Nww #1 #2#3 \@@_sep: #4#5 \@@_sep: { \exp_after:wN \@@_parse_apply_binary_chk:NN \cs:w @@ -2244,7 +2245,7 @@ _o:ww \cs_end: #1 - #4 #5 ; #2 #3 ; + #4 #5 \@@_sep: #2 #3 \@@_sep: } % \end{macrocode} % \end{macro} @@ -2253,10 +2254,10 @@ % % \begin{macro}[EXP]{\@@_parse_infix_after_operand:NwN} % \begin{macrocode} -\cs_new:Npn \@@_parse_infix_after_operand:NwN #1 #2; +\cs_new:Npn \@@_parse_infix_after_operand:NwN #1 #2\@@_sep: { \@@_exp_after_f:nw { \@@_parse_infix:NN #1 } - #2; + #2\@@_sep: } \cs_new:Npn \@@_parse_infix:NN #1 #2 { @@ -2430,7 +2431,7 @@ \exp_after:wN #1 \exp:w \exp_end_continue_f:w \@@_exp_after_tuple_f:nw { } - \s_@@_tuple \@@_tuple_chk:w { #2 #4 } ; + \s_@@_tuple \@@_tuple_chk:w { #2 #4 } \@@_sep: #5 #1 } % \end{macrocode} @@ -2688,14 +2689,14 @@ \fi: #1 #8 #9 } -\cs_new:Npn \@@_parse_apply_compare_aux:NNwN #1 #2 #3; #4 +\cs_new:Npn \@@_parse_apply_compare_aux:NNwN #1 #2 #3\@@_sep: #4 { \if_meaning:w \@@_parse_compare:NNNNNNN #4 \exp_after:wN \@@_parse_continue_compare:NNwNN \exp_after:wN #1 \exp_after:wN #2 \exp:w \exp_end_continue_f:w - \@@_exp_after_o:w #3; + \@@_exp_after_o:w #3\@@_sep: \exp:w \exp_end_continue_f:w \else: \exp_after:wN \@@_parse_continue:NwN @@ -2725,7 +2726,7 @@ { \@@_error:nffn { bad-args } {#1} - { \fp_to_tl:n { \s_@@_tuple \@@_tuple_chk:w {#3} ; } } + { \fp_to_tl:n { \s_@@_tuple \@@_tuple_chk:w {#3} \@@_sep: } } { } \exp_after:wN \c_nan_fp } @@ -2764,11 +2765,11 @@ { \@@_error:nffn { bad-args } {#2} - { \fp_to_tl:n { \s_@@_tuple \@@_tuple_chk:w {#4} ; } } + { \fp_to_tl:n { \s_@@_tuple \@@_tuple_chk:w {#4} \@@_sep: } } { } \exp_after:wN \c_nan_fp } -\cs_new:Npn \@@_parse_function_one_two_aux:nnw #1#2 #3; #4 +\cs_new:Npn \@@_parse_function_one_two_aux:nnw #1#2 #3\@@_sep: #4 { \@@_if_type_fp:NTwFw #4 { } @@ -2780,14 +2781,14 @@ \@@_parse_function_one_two_error_o:w } \s_@@_stop - \@@_parse_function_one_two_auxii:nnw {#1} {#2} #3; #4 + \@@_parse_function_one_two_auxii:nnw {#1} {#2} #3\@@_sep: #4 } -\cs_new:Npn \@@_parse_function_one_two_auxii:nnw #1#2#3; #4; #5 +\cs_new:Npn \@@_parse_function_one_two_auxii:nnw #1#2#3\@@_sep: #4\@@_sep: #5 { \if_meaning:w @ #5 \else: \exp_after:wN \@@_parse_function_one_two_error_o:w \fi: - \use_ii:nn {#1} { \use_none:n #2 } #3; #4; #5 + \use_ii:nn {#1} { \use_none:n #2 } #3\@@_sep: #4\@@_sep: #5 } % \end{macrocode} % \end{macro} @@ -2798,21 +2799,21 @@ % afterwards. The code |#1| should itself expand once after its % result. % \begin{macrocode} -\cs_new:Npn \@@_tuple_map_o:nw #1 \s_@@_tuple \@@_tuple_chk:w #2 ; +\cs_new:Npn \@@_tuple_map_o:nw #1 \s_@@_tuple \@@_tuple_chk:w #2 \@@_sep: { \exp_after:wN \s_@@_tuple \exp_after:wN \@@_tuple_chk:w \exp_after:wN { \exp:w \exp_end_continue_f:w \@@_tuple_map_loop_o:nw {#1} #2 - { \s_@@ \prg_break: } ; + { \s_@@ \prg_break: } \@@_sep: \prg_break_point: - \exp_after:wN } \exp_after:wN ; + \exp_after:wN } \exp_after:wN \@@_sep: } -\cs_new:Npn \@@_tuple_map_loop_o:nw #1#2#3 ; +\cs_new:Npn \@@_tuple_map_loop_o:nw #1#2#3 \@@_sep: { \use_none:n #2 - #1 #2 #3 ; + #1 #2 #3 \@@_sep: \exp:w \exp_end_continue_f:w \@@_tuple_map_loop_o:nw {#1} } @@ -2824,24 +2825,24 @@ % afterwards. % \begin{macrocode} \cs_new:Npn \@@_tuple_mapthread_o:nww #1 - \s_@@_tuple \@@_tuple_chk:w #2 ; - \s_@@_tuple \@@_tuple_chk:w #3 ; + \s_@@_tuple \@@_tuple_chk:w #2 \@@_sep: + \s_@@_tuple \@@_tuple_chk:w #3 \@@_sep: { \exp_after:wN \s_@@_tuple \exp_after:wN \@@_tuple_chk:w \exp_after:wN { \exp:w \exp_end_continue_f:w \@@_tuple_mapthread_loop_o:nw {#1} - #2 { \s_@@ \prg_break: } ; @ - #3 { \s_@@ \prg_break: } ; + #2 { \s_@@ \prg_break: } \@@_sep: @ + #3 { \s_@@ \prg_break: } \@@_sep: \prg_break_point: - \exp_after:wN } \exp_after:wN ; + \exp_after:wN } \exp_after:wN \@@_sep: } -\cs_new:Npn \@@_tuple_mapthread_loop_o:nw #1#2#3 ; #4 @ #5#6 ; +\cs_new:Npn \@@_tuple_mapthread_loop_o:nw #1#2#3 \@@_sep: #4 @ #5#6 \@@_sep: { \use_none:n #2 \use_none:n #5 - #1 #2 #3 ; #5 #6 ; + #1 #2 #3 \@@_sep: #5 #6 \@@_sep: \exp:w \exp_end_continue_f:w \@@_tuple_mapthread_loop_o:nw {#1} #4 @ } diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-random.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-random.dtx index 9180a1f2243..9ca2d3b3b2f 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-random.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-random.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -266,13 +266,13 @@ % \begin{macro}[EXP] % {\@@_rand_myriads:n, \@@_rand_myriads_loop:w, \@@_rand_myriads_get:w} % Used as \cs{@@_rand_myriads:n} |{XXX}| with one letter |X| -% (specifically) per block of four digit we want; it expands to |;| +% (specifically) per block of four digit we want; it expands to \cs{@@_sep:} % followed by the requested number of brace groups, each containing % four (pseudo-random) digits. Digits are produced as a random number % in $[10000,19999]$ for the usual reason of preserving leading zeros. % \begin{macrocode} \cs_new:Npn \@@_rand_myriads:n #1 - { \@@_rand_myriads_loop:w #1 \prg_break: X \prg_break_point: ; } + { \@@_rand_myriads_loop:w #1 \prg_break: X \prg_break_point: \@@_sep: } \cs_new:Npn \@@_rand_myriads_loop:w #1 X { #1 @@ -281,7 +281,7 @@ \__kernel_randint:n { 10000 } \@@_rand_myriads_loop:w } -\cs_new:Npn \@@_rand_myriads_get:w 1 #1 ; { ; {#1} } +\cs_new:Npn \@@_rand_myriads_get:w 1 #1 \@@_sep: { \@@_sep: {#1} } % \end{macrocode} % \end{macro} % @@ -301,7 +301,7 @@ { \exp_after:wN \@@_rand_o:w \exp:w \exp_end_continue_f:w - \@@_rand_myriads:n { XXXX } { 0000 } { 0000 } ; 0 + \@@_rand_myriads:n { XXXX } { 0000 } { 0000 } \@@_sep: 0 } { \msg_expandable_error:nnnnn @@ -309,7 +309,7 @@ \exp_after:wN \c_nan_fp } } -\cs_new:Npn \@@_rand_o:w ; +\cs_new:Npn \@@_rand_o:w \@@_sep: { \exp_after:wN \@@_sanitize:Nw \exp_after:wN 0 @@ -360,41 +360,41 @@ { \@@_randint_default:w \@@_randint_o:w } } \cs_new:Npn \@@_randint_default:w #1 { \exp_after:wN #1 \c_one_fp } -\cs_new:Npn \@@_randint_badarg:w \s_@@ \@@_chk:w #1#2#3; +\cs_new:Npn \@@_randint_badarg:w \s_@@ \@@_chk:w #1#2#3\@@_sep: { - \@@_int:wTF \s_@@ \@@_chk:w #1#2#3; + \@@_int:wTF \s_@@ \@@_chk:w #1#2#3\@@_sep: { \if_meaning:w 1 #1 \if_int_compare:w - \@@_use_i_until_s:nw #3 ; > \c_@@_prec_int + \@@_use_i_until_s:nw #3 \@@_sep: > \c_@@_prec_int \c_one_int \fi: \fi: } { \c_one_int } } -\cs_new:Npn \@@_randint_o:w #1; #2; @ +\cs_new:Npn \@@_randint_o:w #1\@@_sep: #2\@@_sep: @ { \if_case:w - \@@_randint_badarg:w #1; - \@@_randint_badarg:w #2; - \if:w 1 \@@_compare_back:ww #2; #1; \c_one_int \fi: + \@@_randint_badarg:w #1\@@_sep: + \@@_randint_badarg:w #2\@@_sep: + \if:w 1 \@@_compare_back:ww #2\@@_sep: #1\@@_sep: \c_one_int \fi: \c_zero_int - \@@_randint_auxi_o:ww #1; #2; + \@@_randint_auxi_o:ww #1\@@_sep: #2\@@_sep: \or: \@@_invalid_operation_tl_o:ff - { randint } { \@@_array_to_clist:n { #1; #2; } } + { randint } { \@@_array_to_clist:n { #1\@@_sep: #2\@@_sep: } } \exp:w \fi: \exp_after:wN \exp_end: } -\cs_new:Npn \@@_randint_auxi_o:ww #1 ; #2 ; #3 \exp_end: +\cs_new:Npn \@@_randint_auxi_o:ww #1 \@@_sep: #2 \@@_sep: #3 \exp_end: { \fi: - \@@_randint_auxii:wn #2 ; - { \@@_randint_auxii:wn #1 ; \@@_randint_auxiii_o:ww } + \@@_randint_auxii:wn #2 \@@_sep: + { \@@_randint_auxii:wn #1 \@@_sep: \@@_randint_auxiii_o:ww } } -\cs_new:Npn \@@_randint_auxii:wn \s_@@ \@@_chk:w #1#2#3#4 ; +\cs_new:Npn \@@_randint_auxii:wn \s_@@ \@@_chk:w #1#2#3#4 \@@_sep: { \if_meaning:w 0 #1 \exp_after:wN \use_i:nn @@ -405,7 +405,7 @@ { \exp_after:wN \@@_ep_to_fixed:wwn \int_value:w \@@_int_eval:w - #3 - \c_@@_prec_int , #4 {0000} {0000} ; + #3 - \c_@@_prec_int , #4 {0000} {0000} \@@_sep: { \if_meaning:w 0 #2 \exp_after:wN \use_i:nnnn @@ -416,22 +416,22 @@ \@@_fixed_continue:wn } } -\cs_new:Npn \@@_randint_auxiii_o:ww #1 ; #2 ; +\cs_new:Npn \@@_randint_auxiii_o:ww #1 \@@_sep: #2 \@@_sep: { - \@@_fixed_add:wwn #2 ; - {0000} {0000} {0000} {0001} {0000} {0000} ; - \@@_fixed_sub:wwn #1 ; + \@@_fixed_add:wwn #2 \@@_sep: + {0000} {0000} {0000} {0001} {0000} {0000} \@@_sep: + \@@_fixed_sub:wwn #1 \@@_sep: { \exp_after:wN \use_i:nn \exp_after:wN \@@_fixed_mul_add:wwwn - \exp:w \exp_end_continue_f:w \@@_rand_myriads:n { XXXXXX } ; + \exp:w \exp_end_continue_f:w \@@_rand_myriads:n { XXXXXX } \@@_sep: } - #1 ; + #1 \@@_sep: \@@_randint_auxiv_o:ww - #2 ; - \@@_randint_auxv_o:w #1 ; @ + #2 \@@_sep: + \@@_randint_auxv_o:w #1 \@@_sep: @ } -\cs_new:Npn \@@_randint_auxiv_o:ww #1#2#3#4#5 ; #6#7#8#9 +\cs_new:Npn \@@_randint_auxiv_o:ww #1#2#3#4#5 \@@_sep: #6#7#8#9 { \if_int_compare:w \if_int_compare:w #1#2 > #6#7 \exp_stop_f: 1 \else: @@ -441,7 +441,7 @@ \fi: \@@_randint_auxv_o:w {#1}{#2}{#3}{#4}#5 } -\cs_new:Npn \@@_randint_auxv_o:w #1#2#3#4#5 ; #6 @ +\cs_new:Npn \@@_randint_auxv_o:w #1#2#3#4#5 \@@_sep: #6 @ { \exp_after:wN \@@_sanitize:Nw \int_value:w @@ -453,7 +453,7 @@ \exp_after:wN \@@_reverse_args:Nww \fi: \exp_after:wN \@@_fixed_sub:wwn \c_@@_one_fixed_tl - {#1} {#2} {#3} {#4} {0000} {0000} ; + {#1} {#2} {#3} {#4} {0000} {0000} \@@_sep: { \exp_after:wN \exp_stop_f: \int_value:w \@@_int_eval:w \c_@@_prec_int @@ -480,16 +480,16 @@ \int_eval:n { \exp_after:wN \@@_randint:ww - \int_value:w \int_eval:n {#1} \exp_after:wN ; - \int_value:w \int_eval:n {#2} ; + \int_value:w \int_eval:n {#1} \exp_after:wN \@@_sep: + \int_value:w \int_eval:n {#2} \@@_sep: } } -\cs_new:Npn \@@_randint:ww #1; #2; +\cs_new:Npn \@@_randint:ww #1\@@_sep: #2\@@_sep: { \if_int_compare:w #1 > #2 \exp_stop_f: \msg_expandable_error:nnnn { kernel } { randint-backward-range } {#1} {#2} - \@@_randint:ww #2; #1; + \@@_randint:ww #2\@@_sep: #1\@@_sep: \else: \if_int_compare:w \@@_int_eval:w #2 \if_int_compare:w #1 > \c_zero_int @@ -517,15 +517,15 @@ % } % Any $n\in[-2^{31}+1,2^{31}-1]$ is uniquely written as % $2^{14}n_1+n_2$ with $n_1\in[-2^{17},2^{17}-1]$ and -% $n_2\in[0,2^{14}-1]$. Calling \cs{@@_randint_split_o:Nw} $n$ |;| -% gives $n_1$|;| $n_2$|;| and expands the next token once. We do this +% $n_2\in[0,2^{14}-1]$. Calling \cs{@@_randint_split_o:Nw} $n$ \cs{@@_sep:} +% gives $n_1$\cs{@@_sep:} $n_2$\cs{@@_sep:} and expands the next token once. We do this % for two random numbers and apply \cs{@@_randint_split_o:Nw} twice to % fully decompose the range~$R$. One subtlety is that we compute % $R-2^{31}=\meta{max}-\meta{min}-(2^{31}-1)\in[-2^{31}+1,2^{31}-1]$ % rather than $R$ to avoid overflow. % -% Then we have \cs{@@_randint_wide_aux:w} \meta{X_1}|;|\meta{X_0}|;| -% \meta{Y_1}|;|\meta{Y_0}|;| \meta{R_2}|;|\meta{R_1}|;|\meta{R_0}|;.| +% Then we have \cs{@@_randint_wide_aux:w} \meta{X_1}\cs{@@_sep:}\meta{X_0}\cs{@@_sep:} +% \meta{Y_1}\cs{@@_sep:}\meta{Y_0}\cs{@@_sep:} \meta{R_2}\cs{@@_sep:}\meta{R_1}\cs{@@_sep:}\meta{R_0}|;.| % and we apply the algorithm described earlier. % \begin{macrocode} \cs_new:Npn \__kernel_randint:nn #1#2 @@ -534,46 +534,49 @@ \exp_after:wN \@@_randint_wide_aux:w \int_value:w \exp_after:wN \@@_randint_split_o:Nw - \tex_uniformdeviate:D 268435456 ; + \tex_uniformdeviate:D 268435456 \@@_sep: \int_value:w \exp_after:wN \@@_randint_split_o:Nw - \tex_uniformdeviate:D 268435456 ; + \tex_uniformdeviate:D 268435456 \@@_sep: \int_value:w \exp_after:wN \@@_randint_split_o:Nw \int_value:w \@@_int_eval:w 131072 + \exp_after:wN \@@_randint_split_o:Nw \int_value:w - \__kernel_int_add:nnn {#2} { -#1 } { -\c_max_int } ; + \__kernel_int_add:nnn {#2} { -#1 } { -\c_max_int } \@@_sep: . } -\cs_new:Npn \@@_randint_split_o:Nw #1#2 ; +\cs_new:Npn \@@_randint_split_o:Nw #1#2 \@@_sep: { \if_meaning:w 0 #1 - 0 \exp_after:wN ; \int_value:w 0 + 0 \exp_after:wN \@@_sep: \int_value:w 0 \else: \exp_after:wN \@@_randint_split_aux:w - \int_value:w \@@_int_eval:w (#1#2 - 8192) / 16384 ; + \int_value:w \@@_int_eval:w (#1#2 - 8192) / 16384 \@@_sep: + #1#2 \fi: - \exp_after:wN ; + \exp_after:wN \@@_sep: } -\cs_new:Npn \@@_randint_split_aux:w #1 ; +\cs_new:Npn \@@_randint_split_aux:w #1 \@@_sep: { - #1 \exp_after:wN ; + #1 \exp_after:wN \@@_sep: \int_value:w \@@_int_eval:w - #1 * 16384 } -\cs_new:Npn \@@_randint_wide_aux:w #1;#2; #3;#4; #5;#6;#7; . +\cs_new:Npn \@@_randint_wide_aux:w + #1\@@_sep:#2\@@_sep: #3\@@_sep:#4\@@_sep: + #5\@@_sep:#6\@@_sep:#7\@@_sep: . { \exp_after:wN \@@_randint_wide_auxii:w \int_value:w \@@_int_eval:w #5 * #3 + #6 * #1 + (#5 * #4 + #6 * #3 + #7 * #1 + (#5 * #2 + #7 * #3 + (16384 * #6 + #7) * (16384 * #4 + #2) / 268435456) / 16384 - ) / 16384 \exp_after:wN ; - \int_value:w \@@_int_eval:w (#5 + #6) * 16384 + #7 ; - #1 ; #5 ; + ) / 16384 \exp_after:wN \@@_sep: + \int_value:w \@@_int_eval:w (#5 + #6) * 16384 + #7 \@@_sep: + #1 \@@_sep: #5 \@@_sep: } -\cs_new:Npn \@@_randint_wide_auxii:w #1; #2; #3; #4; +\cs_new:Npn \@@_randint_wide_auxii:w + #1\@@_sep: #2\@@_sep: #3\@@_sep: #4\@@_sep: { \if_int_odd:w 0 \if_int_compare:w #1 = #2 \else: \exp_stop_f: \fi: @@ -606,7 +609,7 @@ \if_int_compare:w #1 < \c_one_int \msg_expandable_error:nnnn { kernel } { randint-backward-range } { 1 } {#1} - \@@_randint:ww #1; 1; + \@@_randint:ww #1\@@_sep: 1\@@_sep: \else: \if_int_compare:w #1 > \c__kernel_randint_max_int \__kernel_randint:nn { 1 } {#1} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-round.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-round.dtx index 0ec5136db4d..695b43954c3 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-round.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-round.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -144,7 +144,7 @@ % \item \cs{@@_round:NNN} \meta{sign} \meta{digit_1} \meta{digit_2} % can expand to |0\exp_stop_f:| or |1\exp_stop_f:|. % \item \cs{@@_round_s:NNNw} \meta{sign} \meta{digit_1} \meta{digit_2} -% \meta{more digits}|;| can expand to |0\exp_stop_f:;| or |1\exp_stop_f:;|. +% \meta{more digits}\cs{@@_sep:} can expand to |0\exp_stop_f:;| or |1\exp_stop_f:;|. % \item \cs{@@_round_neg:NNN} \meta{sign} \meta{digit_1} \meta{digit_2} % can expand to |0\exp_stop_f:| or |1\exp_stop_f:|. % \end{itemize} @@ -267,7 +267,7 @@ % % \begin{macro}[EXP]{\@@_round_s:NNNw} % \begin{syntax} -% \cs{@@_round_s:NNNw} \meta{final sign} \meta{digit} \meta{more digits} |;| +% \cs{@@_round_s:NNNw} \meta{final sign} \meta{digit} \meta{more digits} \cs{@@_sep:} % \end{syntax} % Similar to \cs{@@_round:NNN}, but with an extra semicolon, this % function expands to |0\exp_stop_f:;| if rounding $\meta{final sign} @@ -277,7 +277,7 @@ % \cs{@@_int_eval:w} construction. The only relevant information about % this piece is whether it is zero or not. % \begin{macrocode} -\cs_new:Npn \@@_round_s:NNNw #1 #2 #3 #4; +\cs_new:Npn \@@_round_s:NNNw #1 #2 #3 #4\@@_sep: { \exp_after:wN \@@_round:NNN \exp_after:wN #1 @@ -291,14 +291,14 @@ \fi: \fi: #3 - ; + \@@_sep: } % \end{macrocode} % \end{macro} % % \begin{macro}[EXP]{\@@_round_digit:Nw} % \begin{syntax} -% \cs{int_value:w} \cs{@@_round_digit:Nw} \meta{digit} \meta{int expr} |;| +% \cs{int_value:w} \cs{@@_round_digit:Nw} \meta{digit} \meta{int expr} \cs{@@_sep:} % \end{syntax} % This function should always be called within an \cs{int_value:w} % or \cs{@@_int_eval:w} expansion; it may add an extra @@ -306,7 +306,7 @@ % expression should not be ended with a synonym of \tn{relax}, but % with a semi-colon for instance. % \begin{macrocode} -\cs_new:Npn \@@_round_digit:Nw #1 #2; +\cs_new:Npn \@@_round_digit:Nw #1 #2\@@_sep: { \if_int_odd:w \if_meaning:w 0 #1 1 \else: \if_meaning:w 5 #1 1 \else: @@ -427,7 +427,8 @@ % \cs{@@_round_to_nearest_ninf:NNN}, \cs{@@_round_to_nearest_pinf:NNN} % and act accordingly. % \begin{macrocode} -\cs_new:Npn \@@_round:Nwww #1#2 ; #3 ; \s_@@ \@@_chk:w #4#5#6 ; #7 @ +\cs_new:Npn \@@_round:Nwww + #1#2 \@@_sep: #3 \@@_sep: \s_@@ \@@_chk:w #4#5#6 \@@_sep: #7 @ { \cs_if_eq:NNTF #1 \@@_round_to_nearest:NNN { @@ -440,7 +441,7 @@ \if_case:w #5 \exp_stop_f: _pinf \or: \else: _ninf \fi: \fi: :NNN } - #2 ; #3 ; + #2 \@@_sep: #3 \@@_sep: } { \@@_error:nnnn { num-args } { round () } { 1 } { 3 } @@ -488,11 +489,11 @@ % otherwise invalid as we have something like |round(1,3.14)| where % the number of digits is not an integer. % \begin{macrocode} -\cs_new:Npn \@@_round:Nww #1#2 ; #3 ; +\cs_new:Npn \@@_round:Nww #1#2 \@@_sep: #3 \@@_sep: { - \@@_small_int:wTF #3; { \@@_round:Nwn #1#2; } + \@@_small_int:wTF #3\@@_sep: { \@@_round:Nwn #1#2\@@_sep: } { - \if:w 3 \@@_kind:w #3 ; + \if:w 3 \@@_kind:w #3 \@@_sep: \exp_after:wN \use_i:nn \else: \exp_after:wN \use_ii:nn @@ -501,11 +502,11 @@ { \@@_invalid_operation_tl_o:ff { \@@_round_name_from_cs:N #1 } - { \@@_array_to_clist:n { #2; #3; } } + { \@@_array_to_clist:n { #2\@@_sep: #3\@@_sep: } } } } } -\cs_new:Npn \@@_round:Nwn #1 \s_@@ \@@_chk:w #2#3#4; #5 +\cs_new:Npn \@@_round:Nwn #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: #5 { \if_meaning:w 1 #2 \exp_after:wN \@@_round_normal:NwNNnw @@ -514,14 +515,14 @@ \else: \exp_after:wN \@@_exp_after_o:w \fi: - \s_@@ \@@_chk:w #2#3#4; + \s_@@ \@@_chk:w #2#3#4\@@_sep: } -\cs_new:Npn \@@_round_normal:NwNNnw #1#2 \s_@@ \@@_chk:w 1#3#4#5; +\cs_new:Npn \@@_round_normal:NwNNnw #1#2 \s_@@ \@@_chk:w 1#3#4#5\@@_sep: { \@@_decimate:nNnnnn { \c_@@_prec_int - #4 - #2 } \@@_round_normal:NnnwNNnn #5 #1 #3 {#4} {#2} } -\cs_new:Npn \@@_round_normal:NnnwNNnn #1#2#3#4; #5#6 +\cs_new:Npn \@@_round_normal:NnnwNNnn #1#2#3#4\@@_sep: #5#6 { \exp_after:wN \@@_round_normal:NNwNnn \int_value:w \@@_int_eval:w @@ -539,7 +540,7 @@ \use_none:nnnnnnn #3 #1 \@@_int_eval_end: - 0000 0000 0000 0000 ; #6 + 0000 0000 0000 0000 \@@_sep: #6 } \cs_new:Npn \@@_round_pack:Nw #1 { \if_meaning:w 2 #1 + 1 \fi: \@@_int_eval_end: } @@ -552,14 +553,14 @@ \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_round_normal_end:wwNnn - ; #2 + \@@_sep: #2 } -\cs_new:Npn \@@_round_normal_end:wwNnn #1;#2;#3#4#5 +\cs_new:Npn \@@_round_normal_end:wwNnn #1\@@_sep:#2\@@_sep:#3#4#5 { \exp_after:wN \@@_exp_after_o:w \exp:w \exp_end_continue_f:w - \@@_sanitize:Nw #3 #4 ; #1 ; + \@@_sanitize:Nw #3 #4 \@@_sep: #1 \@@_sep: } -\cs_new:Npn \@@_round_special:NwwNnn #1#2;#3;#4#5#6 +\cs_new:Npn \@@_round_special:NwwNnn #1#2\@@_sep:#3\@@_sep:#4#5#6 { \if_meaning:w 0 #1 \@@_case_return:nw @@ -570,12 +571,12 @@ \int_value:w \@@_int_eval:w 1 \if_meaning:w 1 #1 -#6 \else: +#5 \fi: \fi: - ; + \@@_sep: } -\cs_new:Npn \@@_round_special_aux:Nw #1#2; +\cs_new:Npn \@@_round_special_aux:Nw #1#2\@@_sep: { \exp_after:wN \@@_exp_after_o:w \exp:w \exp_end_continue_f:w - \@@_sanitize:Nw #1#2; {1000}{0000}{0000}{0000}; + \@@_sanitize:Nw #1#2\@@_sep: {1000}{0000}{0000}{0000}\@@_sep: } % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-symbolic.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-symbolic.dtx index e2a0e5fa98a..a9cb0ee95e4 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-symbolic.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-symbolic.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -75,14 +75,14 @@ % % Every symbolic expression has the form \cs{s_@@_symbolic} % \cs{@@_symbolic_chk:w} \meta{operation} |,| \Arg{operands} \meta{junk} -% |;| where the \meta{operation} is a list of \texttt{N}-type tokens, +% \cs{@@_sep:} where the \meta{operation} is a list of \texttt{N}-type tokens, % the \meta{operands} is an array of floating point objects, and the % \meta{junk} is to be discarded. If the outermost operator (last to be % evaluated) is unary, the expression has the form % \begin{quote} % \cs{s_@@_symbolic} \cs{@@_symbolic_chk:w} \\ % \cs{@@_types_unary:NNw} |\__fp_|\meta{op}|_o:w| \meta{token} |,| \\ -% |{| \meta{operand} |}| \meta{junk} |;| +% |{| \meta{operand} |}| \meta{junk} \cs{@@_sep:} % \end{quote} % where the \meta{op} is a unary operation (|set_sign|, |cos|, % \ldots{}), and the \meta{token} and \meta{operand} are used as @@ -92,7 +92,7 @@ % \begin{quote} % \cs{s_@@_symbolic} \cs{@@_symbolic_chk:w} \\ % \cs{@@_types_binary:Nww} |\__fp_|\meta{op}|_o:ww| |,| \\ -% |{| \meta{operand_1} \meta{operand_2} |}| \meta{junk} |;| +% |{| \meta{operand_1} \meta{operand_2} |}| \meta{junk} \cs{@@_sep:} % \end{quote} % where the \meta{op} is an operation (|+|, |&|, \ldots{}), and % |\__fp_|\meta{op}|_o:ww| receives the \meta{operands} as arguments. @@ -100,7 +100,7 @@ % \begin{quote} % \cs{s_@@_symbolic} \cs{@@_symbolic_chk:w} \\ % \cs{@@_variable_o:w} \meta{identifier} |,| \\ -% |{| |}| \meta{junk} |;| +% |{| |}| \meta{junk} \cs{@@_sep:} % \end{quote} % % Symbolic expressions are stored in a prefix form. When encountering a @@ -141,12 +141,12 @@ % \begin{macro}{\@@_symbolic_chk:w} % Analog of \cs{@@_chk:w} for symbolic expressions. % \begin{macrocode} -\cs_new_protected:Npn \@@_symbolic_chk:w #1,#2#3; +\cs_new_protected:Npn \@@_symbolic_chk:w #1,#2#3\@@_sep: { \msg_error:nne { fp } { misused-fp } { \@@_to_tl_dispatch:w - \s_@@_symbolic \@@_symbolic_chk:w #1,{#2}; + \s_@@_symbolic \@@_symbolic_chk:w #1,{#2}\@@_sep: } } % \end{macrocode} @@ -181,7 +181,7 @@ % evaluate all pieces of the expression which can be evaluated. % \begin{macrocode} \cs_new:Npn \@@_exp_after_symbolic_f:nw - #1 \s_@@_symbolic \@@_symbolic_chk:w #2, #3#4; + #1 \s_@@_symbolic \@@_symbolic_chk:w #2, #3#4\@@_sep: { \exp_after:wN \@@_exp_after_symbolic_aux:w \exp:w @@ -193,13 +193,13 @@ \@@_exp_after_array_f:w #3 \s_@@_expr_stop \exp_after:wN } - \exp_after:wN ; + \exp_after:wN \@@_sep: \exp:w \exp_end_continue_f:w #1 } -\cs_new:Npn \@@_exp_after_symbolic_aux:w #1, #2; +\cs_new:Npn \@@_exp_after_symbolic_aux:w #1, #2\@@_sep: { \@@_if_has_symbolic:nTF {#2} - { \s_@@_symbolic \@@_symbolic_chk:w #1, {#2} ; } + { \s_@@_symbolic \@@_symbolic_chk:w #1, {#2} \@@_sep: } { #1 #2 @ \prg_do_nothing: } } \cs_new:Npn \@@_exp_after_symbolic_loop:N #1 @@ -218,11 +218,11 @@ % \begin{macro}[EXP]{\@@_symbolic_binary_o:Nww} % Used when applying infix operators to expressions. % \begin{macrocode} -\cs_new:Npn \@@_symbolic_binary_o:Nww #1 #2; #3; +\cs_new:Npn \@@_symbolic_binary_o:Nww #1 #2\@@_sep: #3\@@_sep: { \@@_exp_after_symbolic_f:nw { \exp_after:wN \exp_stop_f: } \s_@@_symbolic \@@_symbolic_chk:w - \@@_types_binary:Nww #1 , { #2; #3; } ; + \@@_types_binary:Nww #1 , { #2\@@_sep: #3\@@_sep: } \@@_sep: } % \end{macrocode} % \end{macro} @@ -280,11 +280,11 @@ % \begin{macro}[EXP]{\@@_symbolic_unary_o:NNw} % Used when applying infix operators to expressions. % \begin{macrocode} -\cs_new:Npn \@@_symbolic_unary_o:NNw #1#2#3; @ +\cs_new:Npn \@@_symbolic_unary_o:NNw #1#2#3\@@_sep: @ { \@@_exp_after_symbolic_f:nw { \exp_after:wN \exp_stop_f: } \s_@@_symbolic \@@_symbolic_chk:w - \@@_types_unary:NNw #1#2 , { #3; } ; + \@@_types_unary:NNw #1#2 , { #3\@@_sep: } \@@_sep: } % \end{macrocode} % \end{macro} @@ -346,11 +346,11 @@ \@@_tmp:w { decimal } { 0 } \@@_to_decimal_dispatch:w \@@_tmp:w { int } { 0 } \@@_to_int_dispatch:w \@@_tmp:w { scientific } { nan } \@@_to_scientific_dispatch:w -\cs_new:Npn \@@_symbolic_convert:wnnN #1#2; #3#4#5 +\cs_new:Npn \@@_symbolic_convert:wnnN #1#2\@@_sep: #3#4#5 { \str_if_eq:nnTF {#1} { \s_@@_symbolic } - { \@@_invalid_operation:nnw {#3} {#4} #1#2; } - { #5 #1#2; } + { \@@_invalid_operation:nnw {#3} {#4} #1#2\@@_sep: } + { #5 #1#2\@@_sep: } } % \end{macrocode} % \end{macro} @@ -390,7 +390,7 @@ % Converting a symbolic expression to a token list is possible. % \begin{macrocode} \cs_new:Npn \@@_symbolic_to_tl:w - \s_@@_symbolic \@@_symbolic_chk:w #1#2, #3#4; + \s_@@_symbolic \@@_symbolic_chk:w #1#2, #3#4\@@_sep: { \str_case:nnTF {#1} { @@ -409,13 +409,13 @@ ( \@@_to_tl_dispatch:w #3 ) } } -\cs_new:Npn \@@_symbolic_binary_to_tl:Nww #1, #2; #3; @ +\cs_new:Npn \@@_symbolic_binary_to_tl:Nww #1, #2\@@_sep: #3\@@_sep: @ { \use:e { - ( \@@_to_tl_dispatch:w #2; ) + ( \@@_to_tl_dispatch:w #2\@@_sep: ) \@@_types_cs_to_op:N #1 - ( \@@_to_tl_dispatch:w #3; ) + ( \@@_to_tl_dispatch:w #3\@@_sep: ) } } \cs_new:Npn \@@_symbolic_function_to_tl:Nw #1, #2@ @@ -492,7 +492,7 @@ \token_if_eq_meaning:NNTF #2 \prg_do_nothing: { \s_@@_symbolic \@@_symbolic_chk:w - \@@_variable_o:w #1 , { } ; + \@@_variable_o:w #1 , { } \@@_sep: } { \exp_after:wN \s_@@_symbolic @@ -502,7 +502,7 @@ \@@_exp_after_symbolic_loop:N #1 { , \exp:w \use_none:nn } \exp_after:wN \exp_end: - \exp_after:wN { \exp_after:wN } \exp_after:wN ; + \exp_after:wN { \exp_after:wN } \exp_after:wN \@@_sep: #2 } } @@ -519,7 +519,7 @@ { \@@_exp_after_symbolic_f:nw { \@@_parse_infix:NN } \s_@@_symbolic \@@_symbolic_chk:w - \@@_variable_o:w #2 , { } ; + \@@_variable_o:w #2 , { } \@@_sep: } \exp_args:NNc \@@_variable_set_parsing_aux:NNn #1 { @@_parse_word_#2:N } {#2} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-traps.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-traps.dtx index 4830f50bd18..5fb3d5d08ae 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-traps.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-traps.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % \maketitle % % \begin{documentation} @@ -163,19 +163,21 @@ \cs_new_protected:Npn \@@_trap_invalid_operation_set:N #1 { \exp_args:Nno \use:n - { \cs_set:Npn \@@_invalid_operation:nnw ##1##2##3; } + { \cs_set:Npn \@@_invalid_operation:nnw ##1##2##3\@@_sep: } { #1 - \@@_error:nnfn { invalid } {##2} { \fp_to_tl:n { ##3; } } { } + \@@_error:nnfn { invalid } {##2} { \fp_to_tl:n { ##3\@@_sep: } } { } \flag_ensure_raised:N \l_fp_invalid_operation_flag ##1 } \exp_args:Nno \use:n - { \cs_set:Npn \@@_invalid_operation_o:Nww ##1##2; ##3; } + { \cs_set:Npn \@@_invalid_operation_o:Nww ##1##2\@@_sep: ##3\@@_sep: } { #1 \@@_error:nffn { invalid-ii } - { \fp_to_tl:n { ##2; } } { \fp_to_tl:n { ##3; } } {##1} + { \fp_to_tl:n { ##2\@@_sep: } } + { \fp_to_tl:n { ##3\@@_sep: } } + {##1} \flag_ensure_raised:N \l_fp_invalid_operation_flag \exp_after:wN \c_nan_fp } @@ -213,19 +215,23 @@ \cs_new_protected:Npn \@@_trap_division_by_zero_set:N #1 { \exp_args:Nno \use:n - { \cs_set:Npn \@@_division_by_zero_o:Nnw ##1##2##3; } + { \cs_set:Npn \@@_division_by_zero_o:Nnw ##1##2##3\@@_sep: } { #1 - \@@_error:nnfn { zero-div } {##2} { \fp_to_tl:n { ##3; } } { } + \@@_error:nnfn { zero-div } {##2} { \fp_to_tl:n { ##3\@@_sep: } } { } \flag_ensure_raised:N \l_fp_division_by_zero_flag \exp_after:wN ##1 } \exp_args:Nno \use:n - { \cs_set:Npn \@@_division_by_zero_o:NNww ##1##2##3; ##4; } + { + \cs_set:Npn \@@_division_by_zero_o:NNww ##1##2##3\@@_sep: ##4\@@_sep: + } { #1 \@@_error:nffn { zero-div-ii } - { \fp_to_tl:n { ##3; } } { \fp_to_tl:n { ##4; } } {##2} + { \fp_to_tl:n { ##3\@@_sep: } } + { \fp_to_tl:n { ##4\@@_sep: } } + {##2} \flag_ensure_raised:N \l_fp_division_by_zero_flag \exp_after:wN ##1 } @@ -281,12 +287,12 @@ \cs_new_protected:Npn \@@_trap_overflow_set:NnNn #1#2#3#4 { \exp_args:Nno \use:n - { \cs_set:cpn { @@_ #2 :w } \s_@@ \@@_chk:w ##1##2##3; } + { \cs_set:cpn { @@_ #2 :w } \s_@@ \@@_chk:w ##1##2##3\@@_sep: } { #1 \@@_error:nffn { flow \if_meaning:w 1 ##1 -to \fi: } - { \fp_to_tl:n { \s_@@ \@@_chk:w ##1##2##3; } } + { \fp_to_tl:n { \s_@@ \@@_chk:w ##1##2##3\@@_sep: } } { \token_if_eq_meaning:NNF 0 ##2 { - } #4 } {#2} \flag_ensure_raised:c { l_fp_#2_flag } @@ -310,11 +316,11 @@ % division by zero, overflow, and underflow to act silently on their % flag. % \begin{macrocode} -\cs_new:Npn \@@_invalid_operation:nnw #1#2#3; { } -\cs_new:Npn \@@_invalid_operation_o:Nww #1#2; #3; { } +\cs_new:Npn \@@_invalid_operation:nnw #1#2#3\@@_sep: { } +\cs_new:Npn \@@_invalid_operation_o:Nww #1#2\@@_sep: #3\@@_sep: { } \cs_new:Npn \@@_invalid_operation_tl_o:ff #1 #2 { } -\cs_new:Npn \@@_division_by_zero_o:Nnw #1#2#3; { } -\cs_new:Npn \@@_division_by_zero_o:NNww #1#2#3; #4; { } +\cs_new:Npn \@@_division_by_zero_o:Nnw #1#2#3\@@_sep: { } +\cs_new:Npn \@@_division_by_zero_o:NNww #1#2#3\@@_sep: #4\@@_sep: { } \cs_new:Npn \@@_overflow:w { } \cs_new:Npn \@@_underflow:w { } \fp_trap:nn { invalid_operation } { error } diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-trig.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-trig.dtx index ea54674a32d..501a6bf2fad 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-trig.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-trig.dtx @@ -42,7 +42,7 @@ % {latex-team@latex-project.org}^^A % }^^A % } -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -168,7 +168,7 @@ % result of the series to a floating point directly rather than taking % its inverse, since $\sin(x) = \#3 \sin\lvert x\rvert$. % \begin{macrocode} -\cs_new:Npn \@@_sin_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_sin_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_return_same_o:w @@ -181,7 +181,7 @@ { \@@_invalid_operation_o:fw { #1 { sin } { sind } } } \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3 #4; + \s_@@ \@@_chk:w #2 #3 #4\@@_sep: } % \end{macrocode} % \end{macro} @@ -195,7 +195,7 @@ % sign~|0| regardless of the sign of~$x$, and with an initial octant % of~$2$, because $\cos(x) = + \sin(\pi/2 + \lvert x\rvert)$. % \begin{macrocode} -\cs_new:Npn \@@_cos_o:w #1 \s_@@ \@@_chk:w #2#3; @ +\cs_new:Npn \@@_cos_o:w #1 \s_@@ \@@_chk:w #2#3\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_return_o:Nw \c_one_fp @@ -208,7 +208,7 @@ { \@@_invalid_operation_o:fw { #1 { cos } { cosd } } } \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3; + \s_@@ \@@_chk:w #2 #3\@@_sep: } % \end{macrocode} % \end{macro} @@ -225,7 +225,7 @@ % point sine to the floating point result, because $\csc(x) = \#3 % \big( \sin\lvert x\rvert\big)^{-1}$. % \begin{macrocode} -\cs_new:Npn \@@_csc_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_csc_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_cot_zero_o:Nfw #3 { #1 { csc } { cscd } } @@ -238,7 +238,7 @@ { \@@_invalid_operation_o:fw { #1 { csc } { cscd } } } \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3 #4; + \s_@@ \@@_chk:w #2 #3 #4\@@_sep: } % \end{macrocode} % \end{macro} @@ -251,7 +251,7 @@ % positive sign~$0$, a starting octant of~$2$, and inverting upon % conversion, because $\sec(x) = + 1 / \sin(\pi/2 + \lvert x\rvert)$. % \begin{macrocode} -\cs_new:Npn \@@_sec_o:w #1 \s_@@ \@@_chk:w #2#3; @ +\cs_new:Npn \@@_sec_o:w #1 \s_@@ \@@_chk:w #2#3\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_return_o:Nw \c_one_fp @@ -264,7 +264,7 @@ { \@@_invalid_operation_o:fw { #1 { sec } { secd } } } \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3; + \s_@@ \@@_chk:w #2 #3\@@_sep: } % \end{macrocode} % \end{macro} @@ -278,7 +278,7 @@ % of~$1$ (this shift is somewhat arbitrary). See \cs{@@_cot_o:w} for % an explanation of the $0$~argument. % \begin{macrocode} -\cs_new:Npn \@@_tan_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_tan_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_return_same_o:w @@ -291,7 +291,7 @@ { \@@_invalid_operation_o:fw { #1 { tan } { tand } } } \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3 #4; + \s_@@ \@@_chk:w #2 #3 #4\@@_sep: } % \end{macrocode} % \end{macro} @@ -308,7 +308,7 @@ % sign of the argument: the first of those indicates whether we % compute tangent or cotangent. Those signs are eventually combined. % \begin{macrocode} -\cs_new:Npn \@@_cot_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_cot_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_cot_zero_o:Nfw #3 { #1 { cot } { cotd } } @@ -321,7 +321,7 @@ { \@@_invalid_operation_o:fw { #1 { cot } { cotd } } } \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3 #4; + \s_@@ \@@_chk:w #2 #3 #4\@@_sep: } \cs_new:Npn \@@_cot_zero_o:Nfw #1#2#3 \fi: { @@ -362,7 +362,7 @@ % four \texttt{trig}/\texttt{trigd} auxiliaries receive the operand as % an extended-precision number. % \begin{macrocode} -\cs_new:Npn \@@_trig:NNNNNwn #1#2#3#4#5 \s_@@ \@@_chk:w 1#6#7#8; +\cs_new:Npn \@@_trig:NNNNNwn #1#2#3#4#5 \s_@@ \@@_chk:w 1#6#7#8\@@_sep: { \exp_after:wN #2 \exp_after:wN #3 @@ -374,7 +374,7 @@ \else: #1 \@@_trig_small:ww \@@_trigd_small:ww \fi: - #7,#8{0000}{0000}; + #7,#8{0000}{0000}\@@_sep: } % \end{macrocode} % \end{macro} @@ -390,8 +390,8 @@ % an extended-precision number) rather than the fixed point number. % The period serves to end the integer expression for the octant. % \begin{macrocode} -\cs_new:Npn \@@_trig_small:ww #1,#2; - { \@@_ep_to_fixed:wwn #1,#2; . #1,#2; } +\cs_new:Npn \@@_trig_small:ww #1,#2\@@_sep: + { \@@_ep_to_fixed:wwn #1,#2\@@_sep: . #1,#2\@@_sep: } % \end{macrocode} % \end{macro} % @@ -400,10 +400,10 @@ % \cs{@@_trig_small:ww} to massage it in the form appropriate for the % \texttt{_series} auxiliary. % \begin{macrocode} -\cs_new:Npn \@@_trigd_small:ww #1,#2; +\cs_new:Npn \@@_trigd_small:ww #1,#2\@@_sep: { \@@_ep_mul_raw:wwwwN - -1,{1745}{3292}{5199}{4329}{5769}{2369}; #1,#2; + -1,{1745}{3292}{5199}{4329}{5769}{2369}\@@_sep: #1,#2\@@_sep: \@@_trig_small:ww } % \end{macrocode} @@ -444,34 +444,34 @@ % those are all~$0$ and no precision is lost (|#6| and~|#7| are % four~$0$ each). % \begin{macrocode} -\cs_new:Npn \@@_trigd_large:ww #1, #2#3#4#5#6#7; +\cs_new:Npn \@@_trigd_large:ww #1, #2#3#4#5#6#7\@@_sep: { \exp_after:wN \@@_pack_eight:wNNNNNNNN \exp_after:wN \@@_pack_eight:wNNNNNNNN \exp_after:wN \@@_pack_twice_four:wNNNNNNNN \exp_after:wN \@@_pack_twice_four:wNNNNNNNN \exp_after:wN \@@_trigd_large_auxi:nnnnwNNNN - \exp_after:wN ; + \exp_after:wN \@@_sep: \exp:w \exp_end_continue_f:w \prg_replicate:nn { \int_max:nn { 22 - #1 } { 0 } } { 0 } #2#3#4#5#6#7 0000 0000 0000 ! } -\cs_new:Npn \@@_trigd_large_auxi:nnnnwNNNN #1#2#3#4#5; #6#7#8#9 +\cs_new:Npn \@@_trigd_large_auxi:nnnnwNNNN #1#2#3#4#5\@@_sep: #6#7#8#9 { \exp_after:wN \@@_trigd_large_auxii:wNw \int_value:w \@@_int_eval:w #1 + #2 - (#1 + #2 - 4) / 9 * 9 \@@_int_eval_end: - #3; - #4; #5{#6#7#8#9}; + #3\@@_sep: + #4\@@_sep: #5{#6#7#8#9}\@@_sep: } -\cs_new:Npn \@@_trigd_large_auxii:wNw #1; #2#3; +\cs_new:Npn \@@_trigd_large_auxii:wNw #1\@@_sep: #2#3\@@_sep: { + (#1#2 - 4) / 9 * 2 \exp_after:wN \@@_trigd_large_auxiii:www \int_value:w \@@_int_eval:w #1#2 - - (#1#2 - 4) / 9 * 9 \@@_int_eval_end: #3 ; + - (#1#2 - 4) / 9 * 9 \@@_int_eval_end: #3 \@@_sep: } -\cs_new:Npn \@@_trigd_large_auxiii:www #1; #2; #3! +\cs_new:Npn \@@_trigd_large_auxiii:www #1\@@_sep: #2\@@_sep: #3! { \if_int_compare:w #1 < 4500 \exp_stop_f: \exp_after:wN \@@_use_i_until_s:nw @@ -479,8 +479,8 @@ \else: + 1 \fi: - \@@_fixed_sub:wwn {9000}{0000}{0000}{0000}{0000}{0000}; - {#1}#2{0000}{0000}; + \@@_fixed_sub:wwn {9000}{0000}{0000}{0000}{0000}{0000}\@@_sep: + {#1}#2{0000}{0000}\@@_sep: { \@@_trigd_small:ww 2, } } % \end{macrocode} @@ -768,12 +768,12 @@ % between $65$ and $72$ at this point) into groups of~$4$ and the % \texttt{auxv} auxiliary is called. % \begin{macrocode} -\cs_new:Npn \@@_trig_large:ww #1, #2#3#4#5#6; +\cs_new:Npn \@@_trig_large:ww #1, #2#3#4#5#6\@@_sep: { \exp_after:wN \@@_trig_large_auxi:w \int_value:w \@@_int_eval:w (#1 - 4) / 8 \exp_after:wN , - \int_value:w #1 , ; - {#2}{#3}{#4}{#5} ; + \int_value:w #1 , \@@_sep: + {#2}{#3}{#4}{#5} \@@_sep: } \cs_new:Npn \@@_trig_large_auxi:w #1, #2, { @@ -818,7 +818,7 @@ \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN \@@_pack_twice_four:wNNNNNNNN - \@@_trig_large_auxv:www ; + \@@_trig_large_auxv:www \@@_sep: } \cs_new:Npn \@@_trig_large_auxiii:w 1 { \exp_stop_f: } % \end{macrocode} @@ -848,7 +848,7 @@ % more step in the ladder. The last semicolon closes the ladder, and % we return control to the \texttt{auxvii} auxiliary. % \begin{macrocode} -\cs_new:Npn \@@_trig_large_auxv:www #1; #2; #3; +\cs_new:Npn \@@_trig_large_auxv:www #1\@@_sep: #2\@@_sep: #3\@@_sep: { \exp_after:wN \@@_use_i_until_s:nw \exp_after:wN \@@_trig_large_auxvii:w @@ -857,17 +857,17 @@ { \@@_trig_large_auxvi:wnnnnnnnn } + \c_@@_trailing_shift_int - \c_@@_middle_shift_int \@@_use_i_until_s:nw - ; #3 #1 ; ; + \@@_sep: #3 #1 \@@_sep: \@@_sep: } -\cs_new:Npn \@@_trig_large_auxvi:wnnnnnnnn #1; #2#3#4#5#6#7#8#9 +\cs_new:Npn \@@_trig_large_auxvi:wnnnnnnnn #1\@@_sep: #2#3#4#5#6#7#8#9 { \exp_after:wN \@@_trig_large_pack:NNNNNw \int_value:w \@@_int_eval:w \c_@@_middle_shift_int + #2*#9 + #3*#8 + #4*#7 + #5*#6 - #1; {#2}{#3}{#4}{#5} {#7}{#8}{#9} + #1\@@_sep: {#2}{#3}{#4}{#5} {#7}{#8}{#9} } -\cs_new:Npn \@@_trig_large_pack:NNNNNw #1#2#3#4#5#6; - { + #1#2#3#4#5 ; #6 } +\cs_new:Npn \@@_trig_large_pack:NNNNNw #1#2#3#4#5#6\@@_sep: + { + #1#2#3#4#5 \@@_sep: #6 } % \end{macrocode} % \end{macro} % @@ -900,10 +900,10 @@ \cs_new:Npn \@@_trig_large_auxvii:w #1#2#3 { \exp_after:wN \@@_trig_large_auxviii:ww - \int_value:w \@@_int_eval:w (#1#2#3 - 62) / 125 ; + \int_value:w \@@_int_eval:w (#1#2#3 - 62) / 125 \@@_sep: #1#2#3 } -\cs_new:Npn \@@_trig_large_auxviii:ww #1; +\cs_new:Npn \@@_trig_large_auxviii:ww #1\@@_sep: { + #1 \if_int_odd:w #1 \exp_stop_f: @@ -922,20 +922,20 @@ \prg_replicate:nn { 13 } { \@@_trig_large_auxx:wNNNNN } + \c_@@_trailing_shift_int - \c_@@_middle_shift_int - ; + \@@_sep: } -\cs_new:Npn \@@_trig_large_auxx:wNNNNN #1; #2 #3#4#5#6 +\cs_new:Npn \@@_trig_large_auxx:wNNNNN #1\@@_sep: #2 #3#4#5#6 { \exp_after:wN \@@_trig_large_pack:NNNNNw \int_value:w \@@_int_eval:w \c_@@_middle_shift_int #2 8 * #3#4#5#6 - #1; #2 + #1\@@_sep: #2 } -\cs_new:Npn \@@_trig_large_auxxi:w #1; +\cs_new:Npn \@@_trig_large_auxxi:w #1\@@_sep: { \exp_after:wN \@@_ep_mul_raw:wwwwN - \int_value:w \@@_int_eval:w 0 \@@_ep_to_ep_loop:N #1 ; ; ! - 0,{7853}{9816}{3397}{4483}{0961}{5661}; + \int_value:w \@@_int_eval:w 0 \@@_ep_to_ep_loop:N #1 \@@_sep: \@@_sep: ! + 0,{7853}{9816}{3397}{4483}{0961}{5661}\@@_sep: \@@_trig_small:ww } % \end{macrocode} @@ -975,9 +975,9 @@ % floating point number with the given sign, and \cs{@@_sanitize:Nw} % checks for overflow and underflow. % \begin{macrocode} -\cs_new:Npn \@@_sin_series_o:NNwwww #1#2#3. #4; +\cs_new:Npn \@@_sin_series_o:NNwwww #1#2#3. #4\@@_sep: { - \@@_fixed_mul:wwn #4; #4; + \@@_fixed_mul:wwn #4\@@_sep: #4\@@_sep: { \exp_after:wN \@@_sin_series_aux_o:NNnwww \exp_after:wN #1 @@ -990,7 +990,7 @@ {#3} } } -\cs_new:Npn \@@_sin_series_aux_o:NNnwww #1#2#3 #4; #5,#6; +\cs_new:Npn \@@_sin_series_aux_o:NNnwww #1#2#3 #4\@@_sep: #5,#6\@@_sep: { \if_int_odd:w \@@_int_eval:w #3 / 2 \@@_int_eval_end: \exp_after:wN \use_i:nn @@ -998,29 +998,46 @@ \exp_after:wN \use_ii:nn \fi: { % 1/18! - \@@_fixed_mul_sub_back:wwwn {0000}{0000}{0000}{0001}{5619}{2070}; - #4;{0000}{0000}{0000}{0477}{9477}{3324}; - \@@_fixed_mul_sub_back:wwwn #4;{0000}{0000}{0011}{4707}{4559}{7730}; - \@@_fixed_mul_sub_back:wwwn #4;{0000}{0000}{2087}{6756}{9878}{6810}; - \@@_fixed_mul_sub_back:wwwn #4;{0000}{0027}{5573}{1922}{3985}{8907}; - \@@_fixed_mul_sub_back:wwwn #4;{0000}{2480}{1587}{3015}{8730}{1587}; - \@@_fixed_mul_sub_back:wwwn #4;{0013}{8888}{8888}{8888}{8888}{8889}; - \@@_fixed_mul_sub_back:wwwn #4;{0416}{6666}{6666}{6666}{6666}{6667}; - \@@_fixed_mul_sub_back:wwwn #4;{5000}{0000}{0000}{0000}{0000}{0000}; - \@@_fixed_mul_sub_back:wwwn#4;{10000}{0000}{0000}{0000}{0000}{0000}; + \@@_fixed_mul_sub_back:wwwn {0000}{0000}{0000}{0001}{5619}{2070}\@@_sep: + #4\@@_sep: + {0000}{0000}{0000}{0477}{9477}{3324}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0000}{0000}{0011}{4707}{4559}{7730}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0000}{0000}{2087}{6756}{9878}{6810}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0000}{0027}{5573}{1922}{3985}{8907}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0000}{2480}{1587}{3015}{8730}{1587}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0013}{8888}{8888}{8888}{8888}{8889}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0416}{6666}{6666}{6666}{6666}{6667}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {5000}{0000}{0000}{0000}{0000}{0000}\@@_sep: + \@@_fixed_mul_sub_back:wwwn#4\@@_sep: + {10000}{0000}{0000}{0000}{0000}{0000}\@@_sep: { \@@_fixed_continue:wn 0, } } { % 1/17! - \@@_fixed_mul_sub_back:wwwn {0000}{0000}{0000}{0028}{1145}{7254}; - #4;{0000}{0000}{0000}{7647}{1637}{3182}; - \@@_fixed_mul_sub_back:wwwn #4;{0000}{0000}{0160}{5904}{3836}{8216}; - \@@_fixed_mul_sub_back:wwwn #4;{0000}{0002}{5052}{1083}{8544}{1719}; - \@@_fixed_mul_sub_back:wwwn #4;{0000}{0275}{5731}{9223}{9858}{9065}; - \@@_fixed_mul_sub_back:wwwn #4;{0001}{9841}{2698}{4126}{9841}{2698}; - \@@_fixed_mul_sub_back:wwwn #4;{0083}{3333}{3333}{3333}{3333}{3333}; - \@@_fixed_mul_sub_back:wwwn #4;{1666}{6666}{6666}{6666}{6666}{6667}; - \@@_fixed_mul_sub_back:wwwn#4;{10000}{0000}{0000}{0000}{0000}{0000}; - { \@@_ep_mul:wwwwn 0, } #5,#6; + \@@_fixed_mul_sub_back:wwwn {0000}{0000}{0000}{0028}{1145}{7254}\@@_sep: + #4\@@_sep: + {0000}{0000}{0000}{7647}{1637}{3182}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0000}{0000}{0160}{5904}{3836}{8216}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0000}{0002}{5052}{1083}{8544}{1719}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0000}{0275}{5731}{9223}{9858}{9065}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0001}{9841}{2698}{4126}{9841}{2698}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {0083}{3333}{3333}{3333}{3333}{3333}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #4\@@_sep: + {1666}{6666}{6666}{6666}{6666}{6667}\@@_sep: + \@@_fixed_mul_sub_back:wwwn#4\@@_sep: + {10000}{0000}{0000}{0000}{0000}{0000}\@@_sep: + { \@@_ep_mul:wwwwn 0, } #5,#6\@@_sep: } { \exp_after:wN \@@_sanitize:Nw @@ -1064,9 +1081,9 @@ % before computing the ratio. Note that this \cs{if_int_odd:w} test % relies on the fact that the octant is at least~$1$. % \begin{macrocode} -\cs_new:Npn \@@_tan_series_o:NNwwww #1#2#3. #4; +\cs_new:Npn \@@_tan_series_o:NNwwww #1#2#3. #4\@@_sep: { - \@@_fixed_mul:wwn #4; #4; + \@@_fixed_mul:wwn #4\@@_sep: #4\@@_sep: { \exp_after:wN \@@_tan_series_aux_o:Nnwww \int_value:w @@ -1077,22 +1094,32 @@ {#3} } } -\cs_new:Npn \@@_tan_series_aux_o:Nnwww #1 #2 #3; #4,#5; +\cs_new:Npn \@@_tan_series_aux_o:Nnwww #1 #2 #3\@@_sep: #4,#5\@@_sep: { - \@@_fixed_mul_sub_back:wwwn {0000}{0000}{1527}{3493}{0856}{7059}; - #3; {0000}{0159}{6080}{0274}{5257}{6472}; - \@@_fixed_mul_sub_back:wwwn #3; {0002}{4571}{2320}{0157}{2558}{8481}; - \@@_fixed_mul_sub_back:wwwn #3; {0115}{5830}{7533}{5397}{3168}{2147}; - \@@_fixed_mul_sub_back:wwwn #3; {1929}{8245}{6140}{3508}{7719}{2982}; - \@@_fixed_mul_sub_back:wwwn #3;{10000}{0000}{0000}{0000}{0000}{0000}; - { \@@_ep_mul:wwwwn 0, } #4,#5; + \@@_fixed_mul_sub_back:wwwn {0000}{0000}{1527}{3493}{0856}{7059}\@@_sep: + #3\@@_sep: + {0000}{0159}{6080}{0274}{5257}{6472}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #3\@@_sep: + {0002}{4571}{2320}{0157}{2558}{8481}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #3\@@_sep: + {0115}{5830}{7533}{5397}{3168}{2147}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #3\@@_sep: + {1929}{8245}{6140}{3508}{7719}{2982}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #3\@@_sep: + {10000}{0000}{0000}{0000}{0000}{0000}\@@_sep: + { \@@_ep_mul:wwwwn 0, } #4,#5\@@_sep: { - \@@_fixed_mul_sub_back:wwwn {0000}{0007}{0258}{0681}{9408}{4706}; - #3;{0000}{2343}{7175}{1399}{6151}{7670}; - \@@_fixed_mul_sub_back:wwwn #3;{0019}{2638}{4588}{9232}{8861}{3691}; - \@@_fixed_mul_sub_back:wwwn #3;{0536}{6357}{0691}{4344}{6852}{4252}; - \@@_fixed_mul_sub_back:wwwn #3;{5263}{1578}{9473}{6842}{1052}{6315}; - \@@_fixed_mul_sub_back:wwwn#3;{10000}{0000}{0000}{0000}{0000}{0000}; + \@@_fixed_mul_sub_back:wwwn {0000}{0007}{0258}{0681}{9408}{4706}\@@_sep: + #3\@@_sep: + {0000}{2343}{7175}{1399}{6151}{7670}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #3\@@_sep: + {0019}{2638}{4588}{9232}{8861}{3691}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #3\@@_sep: + {0536}{6357}{0691}{4344}{6852}{4252}\@@_sep: + \@@_fixed_mul_sub_back:wwwn #3\@@_sep: + {5263}{1578}{9473}{6842}{1052}{6315}\@@_sep: + \@@_fixed_mul_sub_back:wwwn#3\@@_sep: + {10000}{0000}{0000}{0000}{0000}{0000}\@@_sep: { \reverse_if:N \if_int_odd:w \@@_int_eval:w (#2 - 1) / 2 \@@_int_eval_end: @@ -1220,7 +1247,7 @@ % \cs{@@_acotii_o:ww} simply reverses its two arguments. % \begin{macrocode} \cs_new:Npn \@@_atanii_o:Nww - #1 \s_@@ \@@_chk:w #2#3#4; \s_@@ \@@_chk:w #5 #6 @ + #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: \s_@@ \@@_chk:w #5 #6 @ { \if_meaning:w 3 #2 \@@_case_return_i_o:ww \fi: \if_meaning:w 3 #5 \@@_case_return_ii_o:ww \fi: @@ -1236,11 +1263,11 @@ \or: \@@_case_return:nw { \@@_atan_inf_o:NNNw #1 #3 0 } \fi: \@@_atan_normal_o:NNnwNnw #1 - \s_@@ \@@_chk:w #2#3#4; + \s_@@ \@@_chk:w #2#3#4\@@_sep: \s_@@ \@@_chk:w #5 #6 } -\cs_new:Npn \@@_acotii_o:Nww #1#2; #3; - { \@@_atanii_o:Nww #1#3; #2; } +\cs_new:Npn \@@_acotii_o:Nww #1#2\@@_sep: #3\@@_sep: + { \@@_atanii_o:Nww #1#3\@@_sep: #2\@@_sep: } % \end{macrocode} % \end{macro} % @@ -1257,15 +1284,15 @@ % is positive, and $[(7-|#3|)/2]\cdot\pi/4$ for negative~$x$, where % the divisions are rounded up. % \begin{macrocode} -\cs_new:Npn \@@_atan_inf_o:NNNw #1#2#3 \s_@@ \@@_chk:w #4#5#6; +\cs_new:Npn \@@_atan_inf_o:NNNw #1#2#3 \s_@@ \@@_chk:w #4#5#6\@@_sep: { \exp_after:wN \@@_atan_combine_o:NwwwwwN \exp_after:wN #2 \int_value:w \@@_int_eval:w - \if_meaning:w 2 #5 7 - \fi: #3 \exp_after:wN ; + \if_meaning:w 2 #5 7 - \fi: #3 \exp_after:wN \@@_sep: \c_@@_one_fixed_tl - {0000}{0000}{0000}{0000}{0000}{0000}; - 0,{0000}{0000}{0000}{0000}{0000}{0000}; #1 + {0000}{0000}{0000}{0000}{0000}{0000}\@@_sep: + 0,{0000}{0000}{0000}{0000}{0000}{0000}\@@_sep: #1 } % \end{macrocode} % \end{macro} @@ -1279,11 +1306,11 @@ % intermediate rounding errors. % \begin{macrocode} \cs_new_protected:Npn \@@_atan_normal_o:NNnwNnw - #1 \s_@@ \@@_chk:w 1#2#3#4; \s_@@ \@@_chk:w 1#5#6#7; + #1 \s_@@ \@@_chk:w 1#2#3#4\@@_sep: \s_@@ \@@_chk:w 1#5#6#7\@@_sep: { \@@_atan_test_o:NwwNwwN - #2 #3, #4{0000}{0000}; - #5 #6, #7{0000}{0000}; #1 + #2 #3, #4{0000}{0000}\@@_sep: + #5 #6, #7{0000}{0000}\@@_sep: #1 } % \end{macrocode} % \end{macro} @@ -1304,7 +1331,7 @@ % two numbers. The finer test with $0.41421$ is done by % \cs{@@_atan_div:wnwwnw} after the operands have been ordered. % \begin{macrocode} -\cs_new:Npn \@@_atan_test_o:NwwNwwN #1#2,#3; #4#5,#6; +\cs_new:Npn \@@_atan_test_o:NwwNwwN #1#2,#3\@@_sep: #4#5,#6\@@_sep: { \exp_after:wN \@@_atan_combine_o:NwwwwwN \exp_after:wN #1 @@ -1313,11 +1340,11 @@ 7 - \@@_int_eval:w \fi: \if_int_compare:w - \@@_ep_compare:wwww #2,#3; #5,#6; > \c_zero_int + \@@_ep_compare:wwww #2,#3\@@_sep: #5,#6\@@_sep: > \c_zero_int 3 - \exp_after:wN \@@_reverse_args:Nww \fi: - \@@_atan_div:wnwwnw #2,#3; #5,#6; + \@@_atan_div:wnwwnw #2,#3\@@_sep: #5,#6\@@_sep: } % \end{macrocode} % \end{macro} @@ -1337,7 +1364,7 @@ % followed by~$z$, as a comma-delimited exponent and a fixed point % number. % \begin{macrocode} -\cs_new:Npn \@@_atan_div:wnwwnw #1,#2#3; #4,#5#6; +\cs_new:Npn \@@_atan_div:wnwwnw #1,#2#3\@@_sep: #4,#5#6\@@_sep: { \if_int_compare:w \@@_int_eval:w 41421 * #5 < #2 000 @@ -1347,20 +1374,20 @@ \exp_after:wN \@@_atan_near:wwwn \fi: 0 - \@@_ep_div:wwwwn #1,{#2}#3; #4,{#5}#6; + \@@_ep_div:wwwwn #1,{#2}#3\@@_sep: #4,{#5}#6\@@_sep: \@@_atan_auxi:ww } \cs_new:Npn \@@_atan_near:wwwn - 0 \@@_ep_div:wwwwn #1,#2; #3, + 0 \@@_ep_div:wwwwn #1,#2\@@_sep: #3, { 1 - \@@_ep_to_fixed:wwn #1 - #3, #2; + \@@_ep_to_fixed:wwn #1 - #3, #2\@@_sep: \@@_atan_near_aux:wwn } -\cs_new:Npn \@@_atan_near_aux:wwn #1; #2; +\cs_new:Npn \@@_atan_near_aux:wwn #1\@@_sep: #2\@@_sep: { - \@@_fixed_add:wwn #1; #2; - { \@@_fixed_sub:wwn #2; #1; { \@@_ep_div:wwwwn 0, } 0, } + \@@_fixed_add:wwn #1\@@_sep: #2\@@_sep: + { \@@_fixed_sub:wwn #2\@@_sep: #1\@@_sep: { \@@_ep_div:wwwwn 0, } 0, } } % \end{macrocode} % \end{macro} @@ -1372,16 +1399,16 @@ % call to \cs{@@_atan_Taylor_loop:www}, followed by the fixed point % representation of~$z$ and the old representation. % \begin{macrocode} -\cs_new:Npn \@@_atan_auxi:ww #1,#2; - { \@@_ep_to_fixed:wwn #1,#2; \@@_atan_auxii:w #1,#2; } -\cs_new:Npn \@@_atan_auxii:w #1; +\cs_new:Npn \@@_atan_auxi:ww #1,#2\@@_sep: + { \@@_ep_to_fixed:wwn #1,#2\@@_sep: \@@_atan_auxii:w #1,#2\@@_sep: } +\cs_new:Npn \@@_atan_auxii:w #1\@@_sep: { - \@@_fixed_mul:wwn #1; #1; + \@@_fixed_mul:wwn #1\@@_sep: #1\@@_sep: { - \@@_atan_Taylor_loop:www 39 ; - {0000}{0000}{0000}{0000}{0000}{0000} ; + \@@_atan_Taylor_loop:www 39 \@@_sep: + {0000}{0000}{0000}{0000}{0000}{0000} \@@_sep: } - ! #1; + ! #1\@@_sep: } % \end{macrocode} % \end{macro} @@ -1398,22 +1425,22 @@ % computing the octant with a semicolon, and leave the result~|#2| % afterwards. % \begin{macrocode} -\cs_new:Npn \@@_atan_Taylor_loop:www #1; #2; #3; +\cs_new:Npn \@@_atan_Taylor_loop:www #1\@@_sep: #2\@@_sep: #3\@@_sep: { \if_int_compare:w #1 = - \c_one_int \@@_atan_Taylor_break:w \fi: - \exp_after:wN \@@_fixed_div_int:wwN \c_@@_one_fixed_tl #1; - \@@_rrot:www \@@_fixed_mul_sub_back:wwwn #2; #3; + \exp_after:wN \@@_fixed_div_int:wwN \c_@@_one_fixed_tl #1\@@_sep: + \@@_rrot:www \@@_fixed_mul_sub_back:wwwn #2\@@_sep: #3\@@_sep: { \exp_after:wN \@@_atan_Taylor_loop:www - \int_value:w \@@_int_eval:w #1 - 2 ; + \int_value:w \@@_int_eval:w #1 - 2 \@@_sep: } - #3; + #3\@@_sep: } \cs_new:Npn \@@_atan_Taylor_break:w - \fi: #1 \@@_fixed_mul_sub_back:wwwn #2; #3 ! - { \fi: ; #2 ; } + \fi: #1 \@@_fixed_mul_sub_back:wwwn #2\@@_sep: #3 ! + { \fi: \@@_sep: #2 \@@_sep: } % \end{macrocode} % \end{macro} % @@ -1442,7 +1469,8 @@ % both cases, convert to a floating point with % \cs{@@_fixed_to_float_o:wN}. % \begin{macrocode} -\cs_new:Npn \@@_atan_combine_o:NwwwwwN #1 #2; #3; #4; #5,#6; #7 +\cs_new:Npn \@@_atan_combine_o:NwwwwwN + #1 #2\@@_sep: #3\@@_sep: #4\@@_sep: #5,#6\@@_sep: #7 { \exp_after:wN \@@_sanitize:Nw \exp_after:wN #1 @@ -1452,22 +1480,22 @@ \else: \exp_after:wN \use_ii:nn \fi: - { #5 \@@_fixed_mul:wwn #3; #6; } + { #5 \@@_fixed_mul:wwn #3\@@_sep: #6\@@_sep: } { - \@@_fixed_mul:wwn #3; #4; + \@@_fixed_mul:wwn #3\@@_sep: #4\@@_sep: { \exp_after:wN \@@_atan_combine_aux:ww - \int_value:w \@@_int_eval:w #2 / 2 ; #2; + \int_value:w \@@_int_eval:w #2 / 2 \@@_sep: #2\@@_sep: } } { #7 \@@_fixed_to_float_o:wN \@@_fixed_to_float_rad_o:wN } #1 } -\cs_new:Npn \@@_atan_combine_aux:ww #1; #2; +\cs_new:Npn \@@_atan_combine_aux:ww #1\@@_sep: #2\@@_sep: { \@@_fixed_mul_short:wwn - {7853}{9816}{3397}{4483}{0961}{5661}; - {#1}{0000}{0000}; + {7853}{9816}{3397}{4483}{0961}{5661}\@@_sep: + {#1}{0000}{0000}\@@_sep: { \if_int_odd:w #2 \exp_stop_f: \exp_after:wN \@@_fixed_sub:wwn @@ -1491,7 +1519,7 @@ % about what function is being performed (for \enquote{invalid operation} % exceptions). % \begin{macrocode} -\cs_new:Npn \@@_asin_o:w #1 \s_@@ \@@_chk:w #2#3; @ +\cs_new:Npn \@@_asin_o:w #1 \s_@@ \@@_chk:w #2#3\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_return_same_o:w @@ -1504,7 +1532,7 @@ \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3; + \s_@@ \@@_chk:w #2 #3\@@_sep: } % \end{macrocode} % \end{macro} @@ -1517,7 +1545,7 @@ % \texttt{acos} or \texttt{acosd}, and preparing to swap some % arguments down the line. % \begin{macrocode} -\cs_new:Npn \@@_acos_o:w #1 \s_@@ \@@_chk:w #2#3; @ +\cs_new:Npn \@@_acos_o:w #1 \s_@@ \@@_chk:w #2#3\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_use:nw { \@@_atan_inf_o:NNNw #1 0 4 } @@ -1533,7 +1561,7 @@ \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3; + \s_@@ \@@_chk:w #2 #3\@@_sep: } % \end{macrocode} % \end{macro} @@ -1550,7 +1578,7 @@ % outside the domain of arcsine or arccosine. % \begin{macrocode} \cs_new:Npn \@@_asin_normal_o:NfwNnnnnw - #1#2#3 \s_@@ \@@_chk:w 1#4#5#6#7#8#9; + #1#2#3 \s_@@ \@@_chk:w 1#4#5#6#7#8#9\@@_sep: { \if_int_compare:w #5 < \c_one_int \exp_after:wN \@@_use_none_until_s:w @@ -1560,9 +1588,9 @@ \fi: \@@_use_i:ww \@@_invalid_operation_o:fw {#2} - \s_@@ \@@_chk:w 1#4{#5}{#6}{#7}{#8}{#9}; + \s_@@ \@@_chk:w 1#4{#5}{#6}{#7}{#8}{#9}\@@_sep: \@@_asin_auxi_o:NnNww - #1 {#3} #4 #5,{#6}{#7}{#8}{#9}{0000}{0000}; + #1 {#3} #4 #5,{#6}{#7}{#8}{#9}{0000}{0000}\@@_sep: } % \end{macrocode} % \end{macro} @@ -1585,21 +1613,21 @@ % function requires normalized arguments, hence the need for % \texttt{ep_to_ep} and \texttt{continue} after \texttt{ep_mul}. % \begin{macrocode} -\cs_new:Npn \@@_asin_auxi_o:NnNww #1#2#3#4,#5; +\cs_new:Npn \@@_asin_auxi_o:NnNww #1#2#3#4,#5\@@_sep: { - \@@_ep_to_fixed:wwn #4,#5; + \@@_ep_to_fixed:wwn #4,#5\@@_sep: \@@_asin_isqrt:wn - \@@_ep_mul:wwwwn #4,#5; + \@@_ep_mul:wwwwn #4,#5\@@_sep: \@@_ep_to_ep:wwN \@@_fixed_continue:wn { #2 \@@_atan_test_o:NwwNwwN #3 } - 0 1,{1000}{0000}{0000}{0000}{0000}{0000}; #1 + 0 1,{1000}{0000}{0000}{0000}{0000}{0000}\@@_sep: #1 } -\cs_new:Npn \@@_asin_isqrt:wn #1; +\cs_new:Npn \@@_asin_isqrt:wn #1\@@_sep: { - \exp_after:wN \@@_fixed_sub:wwn \c_@@_one_fixed_tl #1; + \exp_after:wN \@@_fixed_sub:wwn \c_@@_one_fixed_tl #1\@@_sep: { - \@@_fixed_add_one:wN #1; + \@@_fixed_add_one:wN #1\@@_sep: \@@_fixed_continue:wn { \@@_ep_mul:wwwwn 0, } 0, } \@@_ep_isqrt:wwn @@ -1619,7 +1647,7 @@ % tests, keeping the function name (\texttt{acsc} or \texttt{acscd}) % as an argument for invalid operation exceptions. % \begin{macrocode} -\cs_new:Npn \@@_acsc_o:w #1 \s_@@ \@@_chk:w #2#3#4; @ +\cs_new:Npn \@@_acsc_o:w #1 \s_@@ \@@_chk:w #2#3#4\@@_sep: @ { \if_case:w \if_meaning:w 2 #2 #3 \fi: #2 \exp_stop_f: \@@_case_use:nw @@ -1630,7 +1658,7 @@ \or: \@@_case_return_same_o:w \else: \@@_case_return_o:Nw \c_minus_zero_fp \fi: - \s_@@ \@@_chk:w #2 #3 #4; + \s_@@ \@@_chk:w #2 #3 #4\@@_sep: } % \end{macrocode} % \end{macro} @@ -1644,7 +1672,7 @@ % \cs{@@_reverse_args:Nww} following precisely that appearing in % \cs{@@_acos_o:w}. % \begin{macrocode} -\cs_new:Npn \@@_asec_o:w #1 \s_@@ \@@_chk:w #2#3; @ +\cs_new:Npn \@@_asec_o:w #1 \s_@@ \@@_chk:w #2#3\@@_sep: @ { \if_case:w #2 \exp_stop_f: \@@_case_use:nw @@ -1658,7 +1686,7 @@ \or: \@@_case_use:nw { \@@_atan_inf_o:NNNw #1 0 4 } \else: \@@_case_return_same_o:w \fi: - \s_@@ \@@_chk:w #2 #3; + \s_@@ \@@_chk:w #2 #3\@@_sep: } % \end{macrocode} % \end{macro} @@ -1672,17 +1700,17 @@ % $\operatorname{acsc}(x)=\operatorname{asin}(1/x)$ and % $\operatorname{asec}(x)=\operatorname{acos}(1/x)$. % \begin{macrocode} -\cs_new:Npn \@@_acsc_normal_o:NfwNnw #1#2#3 \s_@@ \@@_chk:w 1#4#5#6; +\cs_new:Npn \@@_acsc_normal_o:NfwNnw #1#2#3 \s_@@ \@@_chk:w 1#4#5#6\@@_sep: { \int_compare:nNnTF {#5} < 1 { \@@_invalid_operation_o:fw {#2} - \s_@@ \@@_chk:w 1#4{#5}#6; + \s_@@ \@@_chk:w 1#4{#5}#6\@@_sep: } { \@@_ep_div:wwwwn - 1,{1000}{0000}{0000}{0000}{0000}{0000}; - #5,#6{0000}{0000}; + 1,{1000}{0000}{0000}{0000}{0000}{0000}\@@_sep: + #5,#6{0000}{0000}\@@_sep: { \@@_asin_auxi_o:NnNww #1 {#3} #4 } } } diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-types.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-types.dtx index 11f07995ddd..613890919ff 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-types.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp-types.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -153,7 +153,7 @@ \exp_last_unbraced:Nf \@@_types_binary_auxi:Nww { \@@_types_cs_to_op:N #1 } } -\cs_new:Npn \@@_types_binary_auxi:Nww #1#2#3; #4#5; @ +\cs_new:Npn \@@_types_binary_auxi:Nww #1#2#3\@@_sep: #4#5\@@_sep: @ { \exp_after:wN \@@_types_binary_auxii:NNww \cs:w @@ -163,7 +163,7 @@ \@@_type_from_scan:N #4 _o:ww \cs_end: - #1 #2#3; #4#5; + #1 #2#3\@@_sep: #4#5\@@_sep: } \cs_new:Npn \@@_types_binary_auxii:NNww #1#2 { diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp.dtx index 0a883b7cdfe..045f66200af 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fp.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fp.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -59,8 +59,8 @@ % separate exponent. The module implements expandably a wide set of % arithmetic, trigonometric, and other operations on decimal floating point % numbers, to be used within floating point expressions. \emph{Floating point -% expressions} (\enquote{\meta{fp expr}}) support the following operations with their usual -% precedence. +% expressions} (\enquote{\meta{fp expr}}) support the following operations with +% their usual precedence. % \begin{itemize} % \item Basic arithmetic: addition $x+y$, subtraction $x-y$, % multiplication $x*y$, division $x/y$, square root~$\sqrt{x}$, @@ -108,7 +108,8 @@ % towards $+\infty$ if $t>0$ and towards $-\infty$ if $t<0$. % \end{itemize} % And \emph{(not yet)} modulo, and \enquote{quantize}. -% \item Random numbers: $\operatorname{rand}()$, $\operatorname{randint}(m,n)$. +% \item Random numbers: $\operatorname{rand}()$, +% $\operatorname{randint}(m,n)$. % \item Constants: \texttt{pi}, \texttt{deg} (one degree in radians). % \item Dimensions, automatically expressed in points, \emph{e.g.}, % \texttt{pc} is~$12$. @@ -124,9 +125,9 @@ % as |1.234e-34|, or |-.0001|), or as a stored floating point variable, % which is automatically replaced by its current value. % A \enquote{floating point} is a floating point number or a tuple thereof. See -% section~\ref{sec:l3fp:fp-floats} for a description of what a floating point is, -% section~\ref{sec:l3fp:fp-precedence} for details about how an expression is -% parsed, and section~\ref{sec:l3fp:fp-operations} to know what the various +% section~\ref{sec:l3fp:fp-floats} for a description of what a floating point +% is, section~\ref{sec:l3fp:fp-precedence} for details about how an expression +% is parsed, and section~\ref{sec:l3fp:fp-operations} to know what the various % operations do. Some operations may raise exceptions (error messages), % described in section~\ref{sec:l3fp:fp-exceptions}. % @@ -257,7 +258,8 @@ % integers are expressed without a decimal separator. The values % $\pm\infty$ and \nan{} trigger an \enquote{invalid operation} % exception. -% For a tuple, each item is converted using \cs{fp_eval:n} and they are combined as +% For a tuple, each item is converted using \cs{fp_eval:n} and they are +% combined as % |(|\meta{fp_1}\verb*|, |\meta{fp_2}\verb*|, |\ldots{}\meta{fp_n}|)| % if $n>1$ and |(|\meta{fp_1}|,)| or |()| for fewer items. % This function is identical to \cs{fp_to_decimal:n}. @@ -288,7 +290,8 @@ % integers are expressed without a decimal separator. The values % $\pm\infty$ and~\nan{} trigger an \enquote{invalid operation} % exception. -% For a tuple, each item is converted using \cs{fp_to_decimal:n} and they are combined as +% For a tuple, each item is converted using \cs{fp_to_decimal:n} and they are +% combined as % |(|\meta{fp_1}\verb*|, |\meta{fp_2}\verb*|, |\ldots{}\meta{fp_n}|)| % if $n>1$ and |(|\meta{fp_1}|,)| or |()| for fewer items. % \end{function} @@ -340,7 +343,8 @@ % The values $\pm\infty$ and~\nan{} trigger an \enquote{invalid % operation} exception. Normal category codes apply: thus the |e| is % category code~$11$ (a letter). -% For a tuple, each item is converted using \cs{fp_to_scientific:n} and they are combined as +% For a tuple, each item is converted using \cs{fp_to_scientific:n} and they +% are combined as % |(|\meta{fp_1}\verb*|, |\meta{fp_2}\verb*|, |\ldots{}\meta{fp_n}|)| % if $n>1$ and |(|\meta{fp_1}|,)| or |()| for fewer items. % \end{function} @@ -364,7 +368,8 @@ % |0|, |-0|, \texttt{inf}, \texttt{-inf}, and~\texttt{nan} % respectively. Normal category codes apply and thus \texttt{inf} or % \texttt{nan}, if produced, are made up of letters. -% For a tuple, each item is converted using \cs{fp_to_tl:n} and they are combined as +% For a tuple, each item is converted using \cs{fp_to_tl:n} and they are +% combined as % |(|\meta{fp_1}\verb*|, |\meta{fp_2}\verb*|, |\ldots{}\meta{fp_n}|)| % if $n>1$ and |(|\meta{fp_1}|,)| or |()| for fewer items. % \end{function} @@ -380,7 +385,8 @@ % exponent. Non-significant trailing zeros are trimmed. Integers are % expressed without a decimal separator. The values $\pm\infty$ % and~\nan{} trigger an \enquote{invalid operation} exception. -% For a tuple, each item is converted using \cs{fp_to_decimal:n} and they are combined as +% For a tuple, each item is converted using \cs{fp_to_decimal:n} and they are +% combined as % |(|\meta{fp_1}\verb*|, |\meta{fp_2}\verb*|, |\ldots{}\meta{fp_n}|)| % if $n>1$ and |(|\meta{fp_1}|,)| or |()| for fewer items. % This function is identical to \cs{fp_to_decimal:N}. @@ -995,7 +1001,8 @@ % valid floating point numbers. Note that the latter could be mistaken % with the difference of \enquote{\texttt{e}} and $1$. To avoid % confusions, the base of natural logarithms cannot be input as |e| and -% should be input as \texttt{exp(1)} or \cs[module = fp]{c_e_fp} (which is faster). +% should be input as \texttt{exp(1)} or \cs[module = fp]{c_e_fp} (which is +% faster). % % Special numbers are input as follows: % \begin{itemize} @@ -1024,7 +1031,8 @@ % \item Unary |+|, |-|, |!|. % \item Implicit multiplication by juxtaposition (\texttt{2pi}) % when neither factor is in parentheses. -% \item Binary |*| and |/|, implicit multiplication by juxtaposition with parentheses (for instance \texttt{3(4+5)}). +% \item Binary |*| and |/|, implicit multiplication by juxtaposition with +% parentheses (for instance \texttt{3(4+5)}). % \item Binary |+| and |-|. % \item Comparisons |>=|, |!=|, |<?|, \emph{etc}. % \item Logical \texttt{and}, denoted by |&&|. @@ -1061,9 +1069,10 @@ % \cs{fp_eval:n} \{ \meta{operand_1} |?| \meta{operand_2} |:| \meta{operand_3} \} % \end{syntax} % The ternary operator |?:| results in \meta{operand_2} if -% \meta{operand_1} is true (not $\pm 0$), and \meta{operand_3} if \meta{operand_1} -% is false ($\pm 0$). All three \meta{operands} are evaluated in all -% cases; they may be tuples. The operator is right associative, hence +% \meta{operand_1} is true (not $\pm 0$), and \meta{operand_3} if +% \meta{operand_1} is false ($\pm 0$). All three \meta{operands} are +% evaluated in all cases; they may be tuples. The operator is right +% associative, hence % \begin{verbatim} % \fp_eval:n % { @@ -1262,11 +1271,11 @@ % \cs{fp_eval:n} \{ |round| |(| \meta{fp expr_1} , \meta{fp expr_2} , \meta{fp expr_3} |)| \} % \end{syntax} % Only |round| accepts a third argument. -% Evaluates $\meta{fp expr_1}=x$ and $\meta{fp expr_2}=n$ and $\meta{fp expr_3}=t$ then rounds -% $x$~to $n$~places. If $n$~is an integer, this rounds~$x$ to a -% multiple of~$10^{-n}$; if $n=+\infty$, this always yields~$x$; if -% $n=-\infty$, this yields one of $\pm 0$, $\pm\infty$, or~\nan{}; if -% $n=\nan{}$, this yields \nan{}; if +% Evaluates $\meta{fp expr_1}=x$ and $\meta{fp expr_2}=n$ and $\meta{fp +% expr_3}=t$ then rounds $x$~to $n$~places. If $n$~is an integer, this +% rounds~$x$ to a multiple of~$10^{-n}$; if $n=+\infty$, this always +% yields~$x$; if $n=-\infty$, this yields one of $\pm 0$, $\pm\infty$, +% or~\nan{}; if $n=\nan{}$, this yields \nan{}; if % $n$~is neither $\pm\infty$ nor an integer, then an \enquote{invalid % operation} exception is raised. When \meta{fp expr_2} is omitted, % $n=0$, \emph{i.e.}, \meta{fp expr_1} is rounded to an integer. The @@ -1277,8 +1286,8 @@ % as follows. If $t$ is \texttt{nan} (or not given) the even % multiple is chosen (\enquote{ties to even}), if $t=\pm 0$ the % multiple closest to $0$ is chosen (\enquote{ties to zero}), -% if $t$ is positive/negative the multiple closest to $\infty$/$-\infty$ is chosen -% (\enquote{ties towards positive/negative infinity}). +% if $t$ is positive/negative the multiple closest to $\infty$/$-\infty$ +% is chosen (\enquote{ties towards positive/negative infinity}). % \item |floor| yields the largest % multiple of~$10^{-n}$ smaller or equal to~$x$ (\enquote{round % towards negative infinity}); @@ -1459,8 +1468,8 @@ % \cs{fp_eval:n} \{ |sqrt(| \meta{fp expr} |)| \} % \end{syntax} % Computes the square root of the \meta{fp expr}. The \enquote{invalid -% operation} is raised when the \meta{fp expr} is negative or is a tuple; no other -% exception can occur. Special values yield $\sqrt{-0} = -0$, +% operation} is raised when the \meta{fp expr} is negative or is a tuple; no +% other exception can occur. Special values yield $\sqrt{-0} = -0$, % $\sqrt{+0} = +0$, $\sqrt{+\infty} = +\infty$ and % $\sqrt{\text{\nan{}}}=\text{\nan{}}$. % \end{function} @@ -1502,8 +1511,9 @@ % % \begin{variable}[tested = m3fp-parse001]{inf, nan} % The special values $+\infty$, $-\infty$, and \nan{} are represented -% as \texttt{inf}, \texttt{-inf} and \texttt{nan} (see \cs[module = fp]{c_inf_fp}, -% \cs[module = fp]{c_minus_inf_fp} and \cs[module = fp]{c_nan_fp}). +% as \texttt{inf}, \texttt{-inf} and \texttt{nan} (see +% \cs[module = fp]{c_inf_fp}, \cs[module = fp]{c_minus_inf_fp} and +% \cs[module = fp]{c_nan_fp}). % \end{variable} % % \begin{variable}[tested = m3fp-parse001]{pi} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3fparray.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3fparray.dtx index 5e8c6c21dc4..642e75c6591 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3fparray.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3fparray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -266,25 +266,25 @@ \exp_after:wN \@@_array_gset:NNNNww \exp_after:wN #1 \exp_after:wN #1 - \int_value:w \int_eval:n {#2} \exp_after:wN ; + \int_value:w \int_eval:n {#2} \exp_after:wN \@@_sep: \exp:w \exp_end_continue_f:w \@@_parse:n {#3} } \cs_generate_variant:Nn \fparray_gset:Nnn { c } -\cs_new_protected:Npn \@@_array_gset:NNNNww #1#2#3#4#5 ; #6 ; +\cs_new_protected:Npn \@@_array_gset:NNNNww #1#2#3#4#5 \@@_sep: #6 \@@_sep: { \@@_array_bounds:NNnTF \msg_error:nneee #4 {#5} { \exp_after:wN \@@_change_func_type:NNN - \@@_use_i_until_s:nw #6 ; + \@@_use_i_until_s:nw #6 \@@_sep: \@@_array_gset:w \@@_array_gset_recover:Nw - #6 ; {#5} #1 #2 #3 + #6 \@@_sep: {#5} #1 #2 #3 } { } } -\cs_new_protected:Npn \@@_array_gset_recover:Nw #1#2 ; +\cs_new_protected:Npn \@@_array_gset_recover:Nw #1#2 \@@_sep: { - \@@_error:nffn { unknown-type } { \tl_to_str:n { #2 ; } } { } { } + \@@_error:nffn { unknown-type } { \tl_to_str:n { #2 \@@_sep: } } { } { } \exp_after:wN #1 \c_nan_fp } \cs_new_protected:Npn \@@_array_gset:w \s_@@ \@@_chk:w #1#2 @@ -298,7 +298,7 @@ \s_@@ \@@_chk:w #1 #2 } \cs_new_protected:Npn \@@_array_gset_normal:w - \s_@@ \@@_chk:w 1 #1 #2 #3#4#5 ; #6#7#8#9 + \s_@@ \@@_chk:w 1 #1 #2 #3#4#5 \@@_sep: #6#7#8#9 { \__kernel_intarray_gset:Nnn #7 {#6} {#2} \__kernel_intarray_gset:Nnn #8 {#6} @@ -354,7 +354,7 @@ { \exp_after:wN \@@_array_item:NwN \exp_after:wN #1 - \int_value:w \int_eval:n {#2} ; + \int_value:w \int_eval:n {#2} \@@_sep: \@@_to_decimal:w } \cs_generate_variant:Nn \fparray_item:Nn { c } @@ -362,11 +362,11 @@ { \exp_after:wN \@@_array_item:NwN \exp_after:wN #1 - \int_value:w \int_eval:n {#2} ; + \int_value:w \int_eval:n {#2} \@@_sep: \@@_to_tl:w } \cs_generate_variant:Nn \fparray_item_to_tl:Nn { c } -\cs_new:Npn \@@_array_item:NwN #1#2 ; #3 +\cs_new:Npn \@@_array_item:NwN #1#2 \@@_sep: #3 { \@@_array_bounds:NNnTF \msg_expandable_error:nnfff #1 {#2} { \exp_after:wN \@@_array_item:NNNnN #1 {#2} #3 } @@ -375,22 +375,22 @@ \cs_new:Npn \@@_array_item:NNNnN #1#2#3#4 { \exp_after:wN \@@_array_item:N - \int_value:w \__kernel_intarray_item:Nn #2 {#4} \exp_after:wN ; - \int_value:w \__kernel_intarray_item:Nn #3 {#4} \exp_after:wN ; - \int_value:w \__kernel_intarray_item:Nn #1 {#4} ; + \int_value:w \__kernel_intarray_item:Nn #2 {#4} \exp_after:wN \@@_sep: + \int_value:w \__kernel_intarray_item:Nn #3 {#4} \exp_after:wN \@@_sep: + \int_value:w \__kernel_intarray_item:Nn #1 {#4} \@@_sep: } \cs_new:Npn \@@_array_item:N #1 { \if_meaning:w 0 #1 \exp_after:wN \@@_array_item_special:w \fi: \@@_array_item:w #1 } -\cs_new:Npn \@@_array_item:w #1 #2#3#4#5 #6 ; 1 #7 ; +\cs_new:Npn \@@_array_item:w #1 #2#3#4#5 #6 \@@_sep: 1 #7 \@@_sep: { \exp_after:wN \@@_array_item_normal:w \int_value:w \if_meaning:w #1 1 0 \else: 2 \fi: \exp_stop_f: - #7 ; {#2#3#4#5} {#6} ; + #7 \@@_sep: {#2#3#4#5} {#6} \@@_sep: } -\cs_new:Npn \@@_array_item_special:w #1 ; #2 ; #3 ; #4 +\cs_new:Npn \@@_array_item_special:w #1 \@@_sep: #2 \@@_sep: #3 \@@_sep: #4 { \exp_after:wN #4 \exp:w \exp_end_continue_f:w @@ -402,8 +402,9 @@ \else: \exp_after:wN \c_minus_inf_fp \fi: } -\cs_new:Npn \@@_array_item_normal:w #1 #2#3#4#5 #6 ; #7 ; #8 ; #9 - { #9 \s_@@ \@@_chk:w 1 #1 {#8} #7 {#2#3#4#5} {#6} ; } +\cs_new:Npn \@@_array_item_normal:w + #1 #2#3#4#5 #6 \@@_sep: #7 \@@_sep: #8 \@@_sep: #9 + { #9 \s_@@ \@@_chk:w 1 #1 {#8} #7 {#2#3#4#5} {#6} \@@_sep: } % \end{macrocode} % \end{macro} % \end{macro} diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3int.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3int.dtx index d0ee64d1460..120a1b46303 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3int.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3int.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -1182,6 +1182,13 @@ % \end{macro} % \end{macro} % +% \begin{macro}{\@@_sep:} +% See comments in \texttt{l3fp-aux.dtx} for this idea. +% \begin{macrocode} +\cs_new_eq:NN \@@_sep: \tex_right:D +% \end{macrocode} +% \end{macro} +% % \begin{macro}[EXP]{\int_sign:n, \@@_sign:Nw} % See \cs{int_abs:n}. Evaluate the expression once (and when % debugging is enabled, check that the expression is well-formed), @@ -1193,10 +1200,10 @@ \cs_new:Npn \int_sign:n #1 { \int_value:w \exp_after:wN \@@_sign:Nw - \int_value:w \@@_eval:w #1 \@@_eval_end: ; + \int_value:w \@@_eval:w #1 \@@_eval_end: \@@_sep: \exp_stop_f: } -\cs_new:Npn \@@_sign:Nw #1#2 ; +\cs_new:Npn \@@_sign:Nw #1#2 \@@_sep: { \if_meaning:w 0 #1 0 @@ -1230,20 +1237,20 @@ \cs_new:Npn \int_max:nn #1#2 { \int_value:w \exp_after:wN \@@_maxmin:wwN - \int_value:w \@@_eval:w #1 \exp_after:wN ; - \int_value:w \@@_eval:w #2 ; + \int_value:w \@@_eval:w #1 \exp_after:wN \@@_sep: + \int_value:w \@@_eval:w #2 \@@_sep: > \exp_stop_f: } \cs_new:Npn \int_min:nn #1#2 { \int_value:w \exp_after:wN \@@_maxmin:wwN - \int_value:w \@@_eval:w #1 \exp_after:wN ; - \int_value:w \@@_eval:w #2 ; + \int_value:w \@@_eval:w #1 \exp_after:wN \@@_sep: + \int_value:w \@@_eval:w #2 \@@_sep: < \exp_stop_f: } -\cs_new:Npn \@@_maxmin:wwN #1 ; #2 ; #3 +\cs_new:Npn \@@_maxmin:wwN #1 \@@_sep: #2 \@@_sep: #3 { \if_int_compare:w #1 #3 #2 ~ #1 @@ -1283,11 +1290,11 @@ { \int_value:w \@@_eval:w \exp_after:wN \@@_div_truncate:NwNw - \int_value:w \@@_eval:w #1 \exp_after:wN ; - \int_value:w \@@_eval:w #2 ; + \int_value:w \@@_eval:w #1 \exp_after:wN \@@_sep: + \int_value:w \@@_eval:w #2 \@@_sep: \@@_eval_end: } -\cs_new:Npn \@@_div_truncate:NwNw #1#2; #3#4; +\cs_new:Npn \@@_div_truncate:NwNw #1#2 \@@_sep: #3#4 \@@_sep: { \if_meaning:w 0 #1 0 @@ -1311,12 +1318,12 @@ \cs_new:Npn \int_mod:nn #1#2 { \int_value:w \@@_eval:w \exp_after:wN \@@_mod:ww - \int_value:w \@@_eval:w #1 \exp_after:wN ; - \int_value:w \@@_eval:w #2 ; + \int_value:w \@@_eval:w #1 \exp_after:wN \@@_sep: + \int_value:w \@@_eval:w #2 \@@_sep: \@@_eval_end: } -\cs_new:Npn \@@_mod:ww #1; #2; - { #1 - ( \@@_div_truncate:NwNw #1 ; #2 ; ) * #2 } +\cs_new:Npn \@@_mod:ww #1 \@@_sep: #2 \@@_sep: + { #1 - ( \@@_div_truncate:NwNw #1 \@@_sep: #2 \@@_sep: ) * #2 } % \end{macrocode} % \end{macro} % \end{macro} @@ -1986,11 +1993,11 @@ \cs_new:Npn \int_step_function:nnnN #1#2#3 { \exp_after:wN \@@_step:w - \int_value:w \@@_eval:w #1 \exp_after:wN ; - \int_value:w \@@_eval:w #2 \exp_after:wN ; - \int_value:w \@@_eval:w #3 ; + \int_value:w \@@_eval:w #1 \exp_after:wN \@@_sep: + \int_value:w \@@_eval:w #2 \exp_after:wN \@@_sep: + \int_value:w \@@_eval:w #3 \@@_sep: } -\cs_new:Npn \@@_step:w #1; #2; #3; #4 +\cs_new:Npn \@@_step:w #1 \@@_sep: #2 \@@_sep: #3 \@@_sep: #4 { \int_compare:nNnTF {#2} > \c_zero_int { \@@_step:Nw > } @@ -2006,10 +2013,10 @@ } \@@_step:Nw < } - #1 ; {#2} {#3} {#4} + #1 \@@_sep: {#2} {#3} {#4} \prg_break_point: } -\cs_new:Npn \@@_step:Nw #1#2 ; #3#4#5 +\cs_new:Npn \@@_step:Nw #1#2 \@@_sep: #3#4#5 { \if_int_compare:w #2 #1 #4 \exp_stop_f: \prg_break:n @@ -2017,7 +2024,7 @@ #5 {#2} \exp_after:wN \@@_step:Nw \exp_after:wN #1 - \int_value:w \@@_eval:w #2 + #3 ; {#3} {#4} {#5} + \int_value:w \@@_eval:w #2 + #3 \@@_sep: {#3} {#4} {#5} } \cs_new:Npn \int_step_function:nN { \int_step_function:nnnN \c_one_int \c_one_int } diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3intarray.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3intarray.dtx index 4f36df5e4f2..94b979956f9 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3intarray.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3intarray.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3kernel-functions.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3kernel-functions.dtx index 5c6c5df280e..7d38f4a22ee 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3kernel-functions.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3kernel-functions.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3keys.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3keys.dtx index cb33920bb14..93c08eb9fa4 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3keys.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3keys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -1811,25 +1811,34 @@ % \subsection{The key defining mechanism} % % \begin{macro}{\keys_define:nn, \keys_define:ne, \keys_define:nx} -% \begin{macro}{\@@_define:nnn, \@@_define:onn} % The public function for definitions is just a wrapper for the lower % level mechanism, more or less. The outer function is designed to % keep a track of the current module, to allow safe nesting. The module is set % removing any leading |/| (which is not needed here). % \begin{macrocode} -\cs_new_protected:Npn \keys_define:nn - { \@@_define:onn \l_@@_module_str } -\cs_generate_variant:Nn \keys_define:nn { ne , nx } -\cs_new_protected:Npn \@@_define:nnn #1#2#3 +\cs_new_protected:Npn \keys_define:nn #1#2 { - \str_set:Ne \l_@@_module_str { \@@_trim_spaces:n {#2} } - \keyval_parse:NNn \@@_define:n \@@_define:nn {#3} - \str_set:Nn \l_@@_module_str {#1} + \use:e + { + \exp_not:n + { + \str_set:Ne \l_@@_module_str { \@@_trim_spaces:n {#1} } + \keyval_parse:NNn \@@_define:n \@@_define:nn {#2} + } + \@@_reset_var:N \l_@@_module_str + \@@_reset_var:N \l_@@_inherit_str + \@@_reset_var:N \l_keys_choice_tl + \@@_reset_var:N \l_keys_key_tl + \@@_reset_var:N \l_keys_key_str + \@@_reset_var:N \l_keys_path_tl + \@@_reset_var:N \l_keys_path_str + \@@_reset_var:N \l_keys_value_tl + \int_set:Nn \l_keys_choice_int { \int_use:N \l_keys_choice_int } + } } -\cs_generate_variant:Nn \@@_define:nnn { o } +\cs_generate_variant:Nn \keys_define:nn { ne , nx } % \end{macrocode} % \end{macro} -% \end{macro} % % \begin{macro}{\@@_define:n} % \begin{macro}{\@@_define:nn} @@ -2249,14 +2258,8 @@ % function is used here as a meta key should respect the prevailing % filtering, etc. % \begin{macrocode} -\cs_new_protected:Npn \@@_meta_make:n #1 - { - \exp_args:NVo \@@_cmd_set_direct:nn \l_keys_path_str - { - \exp_after:wN \@@_set:nn \exp_after:wN - { \l_@@_module_str } {#1} - } - } +\cs_new_protected:Npn \@@_meta_make:n + { \exp_args:NV \@@_meta_make:nn \l_@@_module_str } \cs_new_protected:Npn \@@_meta_make:nn #1#2 { \exp_args:NV \@@_cmd_set_direct:nn @@ -2841,7 +2844,6 @@ % \subsection{Setting keys} % % \begin{macro}{\@@_set:nnnnNn} -% \begin{macro}{\@@_set:nnnnnnnNn} % \begin{macro}[EXP]{\@@_reset_bool:N, \@@_reset_var:N} % \begin{macro}{\@@_set:nn} % \begin{macro}{\@@_set:nnn} @@ -2858,33 +2860,34 @@ % \item The code to set up the correct selection approach % \end{enumerate} % \begin{macrocode} -\cs_new_protected:Npn \@@_set:nnnnNn +\cs_new_protected:Npn \@@_set:nnnnNn #1#2#3#4#5#6 { - \exp_args:Nooo \@@_set:nnnnnnnNn - \l_@@_unused_clist - \l_@@_selective_clist - \l_@@_relative_tl - } -\cs_new_protected:Npn \@@_set:nnnnnnnNn #1#2#3#4#5#6#7#8#9 - { - \clist_clear:N \l_@@_unused_clist - \clist_set:Ne \l_@@_selective_clist { \tl_to_str:n {#5} } - \tl_set:Nn \l_@@_relative_tl {#7} \use:e { \exp_not:n { - #9 - \@@_set:nn {#4} {#6} + \clist_clear:N \l_@@_unused_clist + \clist_set:Ne \l_@@_selective_clist { \tl_to_str:n {#2} } + \tl_set:Nn \l_@@_relative_tl {#4} + #6 + \@@_set:nn {#1} {#3} + \clist_set_eq:NN #5 \l_@@_unused_clist } \@@_reset_bool:N \l_@@_only_known_bool \@@_reset_bool:N \l_@@_exclude_bool \@@_reset_bool:N \l_@@_selective_bool + \@@_reset_var:N \l_@@_unused_clist + \@@_reset_var:N \l_@@_selective_clist + \@@_reset_var:N \l_@@_relative_tl + \@@_reset_var:N \l_@@_inherit_str + \@@_reset_var:N \l_keys_choice_tl + \@@_reset_var:N \l_keys_key_tl + \@@_reset_var:N \l_keys_key_str + \@@_reset_var:N \l_keys_path_tl + \@@_reset_var:N \l_keys_path_str + \@@_reset_var:N \l_keys_value_tl + \int_set:Nn \l_keys_choice_int { \int_use:N \l_keys_choice_int } } - \clist_set_eq:NN #8 \l_@@_unused_clist - \__kernel_tl_set:Nx \l_@@_unused_clist { \exp_not:n {#1} } - \__kernel_tl_set:Nx \l_@@_selective_clist {#2} - \__kernel_tl_set:Nx \l_@@_relative_tl { \exp_not:n {#3} } } \cs_new:Npn \@@_reset_bool:N #1 { @@ -2892,6 +2895,12 @@ { bool_set_ \bool_if:NTF #1 { true } { false } :N } \exp_not:N #1 } +\cs_new:Npn \@@_reset_var:N #1 + { + \exp_not:n + { \__kernel_tl_set:Nx #1 } + { \exp_not:N \exp_not:n { \exp_not:o { #1 } } } + } \cs_new_protected:Npn \@@_set:nn #1#2 { \exp_args:No \@@_set:nnn \l_@@_module_str {#1} {#2} } \cs_new_protected:Npn \@@_set:nnn #1#2#3 @@ -2905,7 +2914,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro} % { diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3legacy.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3legacy.dtx index 26e581dec09..1f5d5821643 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3legacy.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3legacy.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3luatex.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3luatex.dtx index 840db504959..0e6f1b59676 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3luatex.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3luatex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3msg.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3msg.dtx index 27f824a50ee..817a77e6e9d 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3msg.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3msg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3names.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3names.dtx index 247bf99bcd0..cf38ee9254e 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3names.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3names.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3pdf.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3pdf.dtx index 6e9883fec29..b9f18324ef4 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3pdf.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3pdf.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3prg.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3prg.dtx index c1e0a657b54..01fcec07cfa 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3prg.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3prg.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3prop.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3prop.dtx index ff1776e6b40..e2dd1f5bff3 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3prop.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3prop.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3quark.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3quark.dtx index e836b2bfe4c..9b90b606f7c 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3quark.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3quark.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3regex.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3regex.dtx index 7ee5c2a6b94..868f695f3c1 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3regex.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3regex.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3seq.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3seq.dtx index 0f5e29545ac..b882319b44c 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3seq.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3seq.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3skip.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3skip.dtx index c08565a016b..2ae86598cb8 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3skip.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3skip.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3sort.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3sort.dtx index 1a13e74384b..5bbb0d3b34a 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3sort.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3sort.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3str-convert.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3str-convert.dtx index 3a4b66ba1e0..dcb78721328 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3str-convert.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3str-convert.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3str.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3str.dtx index db285e42694..c6d8c74b806 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3str.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3str.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3sys.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3sys.dtx index 8308f247e12..7c6d0e9dc59 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3sys.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3sys.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3text-case.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3text-case.dtx index 3b06b1586e2..f8529b1090f 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3text-case.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3text-case.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3text-map.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3text-map.dtx index 93f399700a4..accfa0e06e8 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3text-map.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3text-map.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3text-purify.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3text-purify.dtx index 79b171602da..6aa04bf399f 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3text-purify.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3text-purify.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3text.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3text.dtx index 607c2728ca3..f1f4ecee2f6 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3text.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3text.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3tl-analysis.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3tl-analysis.dtx index 560288db9ae..fd162839a84 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3tl-analysis.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3tl-analysis.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % @@ -1028,39 +1028,42 @@ % % \subsection{Showing the results} % -% \begin{macro}{\tl_analysis_show:N, \tl_analysis_log:N, \@@_analysis_show:NNN} +% \begin{macro}{\tl_analysis_show:N, \tl_analysis_log:N, \@@_analysis_show:NNnnN} % Add to \cs{@@_analysis:n} a third pass to display tokens to the terminal. % If the token list variable is not defined, throw the same error % as \cs{tl_show:N} by simply calling that function. % \begin{macrocode} \cs_new_protected:Npn \tl_analysis_show:N - { \@@_analysis_show:NNN \msg_show:nneeee \tl_show:N } + { \@@_analysis_show:NNnnN \msg_show:nneeee \tl_show:N {} {} } \cs_new_protected:Npn \tl_analysis_log:N - { \@@_analysis_show:NNN \msg_log:nneeee \tl_log:N } -\cs_new_protected:Npn \@@_analysis_show:NNN #1#2#3 { - \tl_if_exist:NTF #3 + \@@_analysis_show:NNnnN \msg_log:nneeee \tl_log:N + { \iow_newline: >~ . } { . } + } +\cs_new_protected:Npn \@@_analysis_show:NNnnN #1#2#3#4#5 + { + \tl_if_exist:NTF #5 { - \exp_args:No \@@_analysis:n {#3} + \exp_args:No \@@_analysis:n {#5} #1 { tl } { show-analysis } - { \token_to_str:N #3 } { \@@_analysis_show: } { } { } + { \token_to_str:N #5 } { \@@_analysis_show: } {#3} {#4} } { #2 #3 } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\tl_analysis_show:n, \tl_analysis_log:n, \@@_analysis_show:Nn} +% \begin{macro}{\tl_analysis_show:n, \tl_analysis_log:n, \@@_analysis_show:Nnnn} % No existence test needed here. % \begin{macrocode} \cs_new_protected:Npn \tl_analysis_show:n - { \@@_analysis_show:Nn \msg_show:nneeee } + { \@@_analysis_show:Nnnn \msg_show:nneeee {} {} } \cs_new_protected:Npn \tl_analysis_log:n - { \@@_analysis_show:Nn \msg_log:nneeee } -\cs_new_protected:Npn \@@_analysis_show:Nn #1#2 + { \@@_analysis_show:Nnnn \msg_log:nneeee { \iow_newline: >~ . } { . } } +\cs_new_protected:Npn \@@_analysis_show:Nnnn #1#2#3#4 { - \@@_analysis:n {#2} - #1 { tl } { show-analysis } { } { \@@_analysis_show: } { } { } + \@@_analysis:n {#4} + #1 { tl } { show-analysis } { } { \@@_analysis_show: } {#2} {#3} } % \end{macrocode} % \end{macro} @@ -1654,8 +1657,8 @@ { The~token~list~ \tl_if_empty:nF {#1} { #1 ~ } \tl_if_empty:nTF {#2} - { is~empty } - { contains~the~tokens: #2 } + { is~empty #3 } + { contains~the~tokens: #2 #4 } } % \end{macrocode} % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3tl-build.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3tl-build.dtx index 40b0584590d..ae38f345834 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3tl-build.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3tl-build.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3tl.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3tl.dtx index 8f5e10841b6..85faa334a9f 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3tl.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3tl.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3token.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3token.dtx index b0be7b557d3..73d0ec21026 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3token.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3token.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/source/latex-dev/l3kernel/l3unicode.dtx b/Master/texmf-dist/source/latex-dev/l3kernel/l3unicode.dtx index 4d63a616eb8..535816e979f 100644 --- a/Master/texmf-dist/source/latex-dev/l3kernel/l3unicode.dtx +++ b/Master/texmf-dist/source/latex-dev/l3kernel/l3unicode.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2025-01-14} +% \date{Released 2025-01-18} % % \maketitle % diff --git a/Master/texmf-dist/tex/latex-dev/l3kernel/expl3-code.tex b/Master/texmf-dist/tex/latex-dev/l3kernel/expl3-code.tex index 2ecfc7a982b..8d95f514b00 100644 --- a/Master/texmf-dist/tex/latex-dev/l3kernel/expl3-code.tex +++ b/Master/texmf-dist/tex/latex-dev/l3kernel/expl3-code.tex @@ -75,7 +75,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2025-01-14}% +\def\ExplFileDate{2025-01-18}% \begingroup \def\next{\endgroup}% \expandafter\ifx\csname PackageError\endcsname\relax @@ -6389,13 +6389,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \int_eval:n #1 { \tex_the:D \__int_eval:w #1 \__int_eval_end: } \cs_new:Npn \int_eval:w { \tex_the:D \__int_eval:w } +\cs_new_eq:NN \__int_sep: \tex_right:D \cs_new:Npn \int_sign:n #1 { \int_value:w \exp_after:wN \__int_sign:Nw - \int_value:w \__int_eval:w #1 \__int_eval_end: ; + \int_value:w \__int_eval:w #1 \__int_eval_end: \__int_sep: \exp_stop_f: } -\cs_new:Npn \__int_sign:Nw #1#2 ; +\cs_new:Npn \__int_sign:Nw #1#2 \__int_sep: { \if_meaning:w 0 #1 0 @@ -6414,20 +6415,20 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \int_max:nn #1#2 { \int_value:w \exp_after:wN \__int_maxmin:wwN - \int_value:w \__int_eval:w #1 \exp_after:wN ; - \int_value:w \__int_eval:w #2 ; + \int_value:w \__int_eval:w #1 \exp_after:wN \__int_sep: + \int_value:w \__int_eval:w #2 \__int_sep: > \exp_stop_f: } \cs_new:Npn \int_min:nn #1#2 { \int_value:w \exp_after:wN \__int_maxmin:wwN - \int_value:w \__int_eval:w #1 \exp_after:wN ; - \int_value:w \__int_eval:w #2 ; + \int_value:w \__int_eval:w #1 \exp_after:wN \__int_sep: + \int_value:w \__int_eval:w #2 \__int_sep: < \exp_stop_f: } -\cs_new:Npn \__int_maxmin:wwN #1 ; #2 ; #3 +\cs_new:Npn \__int_maxmin:wwN #1 \__int_sep: #2 \__int_sep: #3 { \if_int_compare:w #1 #3 #2 ~ #1 @@ -6439,11 +6440,11 @@ Type H <return> for immediate help}\def~{\errmessage{% { \int_value:w \__int_eval:w \exp_after:wN \__int_div_truncate:NwNw - \int_value:w \__int_eval:w #1 \exp_after:wN ; - \int_value:w \__int_eval:w #2 ; + \int_value:w \__int_eval:w #1 \exp_after:wN \__int_sep: + \int_value:w \__int_eval:w #2 \__int_sep: \__int_eval_end: } -\cs_new:Npn \__int_div_truncate:NwNw #1#2; #3#4; +\cs_new:Npn \__int_div_truncate:NwNw #1#2 \__int_sep: #3#4 \__int_sep: { \if_meaning:w 0 #1 0 @@ -6461,12 +6462,12 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \int_mod:nn #1#2 { \int_value:w \__int_eval:w \exp_after:wN \__int_mod:ww - \int_value:w \__int_eval:w #1 \exp_after:wN ; - \int_value:w \__int_eval:w #2 ; + \int_value:w \__int_eval:w #1 \exp_after:wN \__int_sep: + \int_value:w \__int_eval:w #2 \__int_sep: \__int_eval_end: } -\cs_new:Npn \__int_mod:ww #1; #2; - { #1 - ( \__int_div_truncate:NwNw #1 ; #2 ; ) * #2 } +\cs_new:Npn \__int_mod:ww #1 \__int_sep: #2 \__int_sep: + { #1 - ( \__int_div_truncate:NwNw #1 \__int_sep: #2 \__int_sep: ) * #2 } \cs_new:Npn \__kernel_int_add:nnn #1#2#3 { \int_value:w \__int_eval:w #1 @@ -6779,11 +6780,11 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \int_step_function:nnnN #1#2#3 { \exp_after:wN \__int_step:w - \int_value:w \__int_eval:w #1 \exp_after:wN ; - \int_value:w \__int_eval:w #2 \exp_after:wN ; - \int_value:w \__int_eval:w #3 ; + \int_value:w \__int_eval:w #1 \exp_after:wN \__int_sep: + \int_value:w \__int_eval:w #2 \exp_after:wN \__int_sep: + \int_value:w \__int_eval:w #3 \__int_sep: } -\cs_new:Npn \__int_step:w #1; #2; #3; #4 +\cs_new:Npn \__int_step:w #1 \__int_sep: #2 \__int_sep: #3 \__int_sep: #4 { \int_compare:nNnTF {#2} > \c_zero_int { \__int_step:Nw > } @@ -6799,10 +6800,10 @@ Type H <return> for immediate help}\def~{\errmessage{% } \__int_step:Nw < } - #1 ; {#2} {#3} {#4} + #1 \__int_sep: {#2} {#3} {#4} \prg_break_point: } -\cs_new:Npn \__int_step:Nw #1#2 ; #3#4#5 +\cs_new:Npn \__int_step:Nw #1#2 \__int_sep: #3#4#5 { \if_int_compare:w #2 #1 #4 \exp_stop_f: \prg_break:n @@ -6810,7 +6811,7 @@ Type H <return> for immediate help}\def~{\errmessage{% #5 {#2} \exp_after:wN \__int_step:Nw \exp_after:wN #1 - \int_value:w \__int_eval:w #2 + #3 ; {#3} {#4} {#5} + \int_value:w \__int_eval:w #2 + #3 \__int_sep: {#3} {#4} {#5} } \cs_new:Npn \int_step_function:nN { \int_step_function:nnnN \c_one_int \c_one_int } @@ -13917,16 +13918,27 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \cs_set_eq:cN {#1} \tex_undefined:D } -\cs_new_protected:Npn \keys_define:nn - { \__keys_define:onn \l__keys_module_str } -\cs_generate_variant:Nn \keys_define:nn { ne , nx } -\cs_new_protected:Npn \__keys_define:nnn #1#2#3 +\cs_new_protected:Npn \keys_define:nn #1#2 { - \str_set:Ne \l__keys_module_str { \__keys_trim_spaces:n {#2} } - \keyval_parse:NNn \__keys_define:n \__keys_define:nn {#3} - \str_set:Nn \l__keys_module_str {#1} + \use:e + { + \exp_not:n + { + \str_set:Ne \l__keys_module_str { \__keys_trim_spaces:n {#1} } + \keyval_parse:NNn \__keys_define:n \__keys_define:nn {#2} + } + \__keys_reset_var:N \l__keys_module_str + \__keys_reset_var:N \l__keys_inherit_str + \__keys_reset_var:N \l_keys_choice_tl + \__keys_reset_var:N \l_keys_key_tl + \__keys_reset_var:N \l_keys_key_str + \__keys_reset_var:N \l_keys_path_tl + \__keys_reset_var:N \l_keys_path_str + \__keys_reset_var:N \l_keys_value_tl + \int_set:Nn \l_keys_choice_int { \int_use:N \l_keys_choice_int } + } } -\cs_generate_variant:Nn \__keys_define:nnn { o } +\cs_generate_variant:Nn \keys_define:nn { ne , nx } \cs_new_protected:Npn \__keys_define:n #1 { \bool_set_true:N \l__keys_no_value_bool @@ -14190,14 +14202,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs:w if#1 \cs_end: } } -\cs_new_protected:Npn \__keys_meta_make:n #1 - { - \exp_args:NVo \__keys_cmd_set_direct:nn \l_keys_path_str - { - \exp_after:wN \__keys_set:nn \exp_after:wN - { \l__keys_module_str } {#1} - } - } +\cs_new_protected:Npn \__keys_meta_make:n + { \exp_args:NV \__keys_meta_make:nn \l__keys_module_str } \cs_new_protected:Npn \__keys_meta_make:nn #1#2 { \exp_args:NV \__keys_cmd_set_direct:nn @@ -14524,33 +14530,34 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__keys_value_requirement:nn { forbidden } {#1} } \cs_new_protected:cpn { \c__keys_props_root_str .value_required:n } #1 { \__keys_value_requirement:nn { required } {#1} } -\cs_new_protected:Npn \__keys_set:nnnnNn - { - \exp_args:Nooo \__keys_set:nnnnnnnNn - \l__keys_unused_clist - \l__keys_selective_clist - \l__keys_relative_tl - } -\cs_new_protected:Npn \__keys_set:nnnnnnnNn #1#2#3#4#5#6#7#8#9 +\cs_new_protected:Npn \__keys_set:nnnnNn #1#2#3#4#5#6 { - \clist_clear:N \l__keys_unused_clist - \clist_set:Ne \l__keys_selective_clist { \tl_to_str:n {#5} } - \tl_set:Nn \l__keys_relative_tl {#7} \use:e { \exp_not:n { - #9 - \__keys_set:nn {#4} {#6} + \clist_clear:N \l__keys_unused_clist + \clist_set:Ne \l__keys_selective_clist { \tl_to_str:n {#2} } + \tl_set:Nn \l__keys_relative_tl {#4} + #6 + \__keys_set:nn {#1} {#3} + \clist_set_eq:NN #5 \l__keys_unused_clist } \__keys_reset_bool:N \l__keys_only_known_bool \__keys_reset_bool:N \l__keys_exclude_bool \__keys_reset_bool:N \l__keys_selective_bool + \__keys_reset_var:N \l__keys_unused_clist + \__keys_reset_var:N \l__keys_selective_clist + \__keys_reset_var:N \l__keys_relative_tl + \__keys_reset_var:N \l__keys_inherit_str + \__keys_reset_var:N \l_keys_choice_tl + \__keys_reset_var:N \l_keys_key_tl + \__keys_reset_var:N \l_keys_key_str + \__keys_reset_var:N \l_keys_path_tl + \__keys_reset_var:N \l_keys_path_str + \__keys_reset_var:N \l_keys_value_tl + \int_set:Nn \l_keys_choice_int { \int_use:N \l_keys_choice_int } } - \clist_set_eq:NN #8 \l__keys_unused_clist - \__kernel_tl_set:Nx \l__keys_unused_clist { \exp_not:n {#1} } - \__kernel_tl_set:Nx \l__keys_selective_clist {#2} - \__kernel_tl_set:Nx \l__keys_relative_tl { \exp_not:n {#3} } } \cs_new:Npn \__keys_reset_bool:N #1 { @@ -14558,6 +14565,12 @@ Type H <return> for immediate help}\def~{\errmessage{% { bool_set_ \bool_if:NTF #1 { true } { false } :N } \exp_not:N #1 } +\cs_new:Npn \__keys_reset_var:N #1 + { + \exp_not:n + { \__kernel_tl_set:Nx #1 } + { \exp_not:N \exp_not:n { \exp_not:o { #1 } } } + } \cs_new_protected:Npn \__keys_set:nn #1#2 { \exp_args:No \__keys_set:nnn \l__keys_module_str {#1} {#2} } \cs_new_protected:Npn \__keys_set:nnn #1#2#3 @@ -15361,21 +15374,24 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new_eq:NN \__fp_int_eval:w \tex_numexpr:D \cs_new_eq:NN \__fp_int_eval_end: \scan_stop: \cs_new_eq:NN \__fp_int_to_roman:w \tex_romannumeral:D +\cs_new_eq:NN \__fp_sep: \tex_right:D \cs_new:Npn \__fp_use_none_stop_f:n #1 { \exp_stop_f: } -\cs_new:Npn \__fp_use_s:n #1 { #1; } -\cs_new:Npn \__fp_use_s:nn #1#2 { #1#2; } -\cs_new:Npn \__fp_use_none_until_s:w #1; { } -\cs_new:Npn \__fp_use_i_until_s:nw #1#2; {#1} -\cs_new:Npn \__fp_use_ii_until_s:nnw #1#2#3; {#2} -\cs_new:Npn \__fp_reverse_args:Nww #1 #2; #3; { #1 #3; #2; } -\cs_new:Npn \__fp_rrot:www #1; #2; #3; { #2; #3; #1; } -\cs_new:Npn \__fp_use_i:ww #1; #2; { #1; } -\cs_new:Npn \__fp_use_i:www #1; #2; #3; { #1; } +\cs_new:Npn \__fp_use_s:n #1 { #1\__fp_sep: } +\cs_new:Npn \__fp_use_s:nn #1#2 { #1#2\__fp_sep: } +\cs_new:Npn \__fp_use_none_until_s:w #1\__fp_sep: { } +\cs_new:Npn \__fp_use_i_until_s:nw #1#2\__fp_sep: {#1} +\cs_new:Npn \__fp_use_ii_until_s:nnw #1#2#3\__fp_sep: {#2} +\cs_new:Npn \__fp_reverse_args:Nww #1 #2\__fp_sep: #3\__fp_sep: + { #1 #3\__fp_sep: #2\__fp_sep: } +\cs_new:Npn \__fp_rrot:www #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: + { #2\__fp_sep: #3\__fp_sep: #1\__fp_sep: } +\cs_new:Npn \__fp_use_i:ww #1\__fp_sep: #2\__fp_sep: { #1\__fp_sep: } +\cs_new:Npn \__fp_use_i:www #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: { #1\__fp_sep: } \cs_new_protected:Npn \__fp_misused:n #1 { \msg_error:nne { fp } { misused } { \fp_to_tl:n {#1} } } \scan_new:N \s__fp -\cs_new_protected:Npn \__fp_chk:w #1 ; - { \__fp_misused:n { \s__fp \__fp_chk:w #1 ; } } +\cs_new_protected:Npn \__fp_chk:w #1 \__fp_sep: + { \__fp_misused:n { \s__fp \__fp_chk:w #1 \__fp_sep: } } \scan_new:N \s__fp_expr_mark \scan_new:N \s__fp_expr_stop \scan_new:N \s__fp_mark @@ -15386,11 +15402,11 @@ Type H <return> for immediate help}\def~{\errmessage{% \scan_new:N \s__fp_overflow \scan_new:N \s__fp_division \scan_new:N \s__fp_exact -\tl_const:Nn \c_zero_fp { \s__fp \__fp_chk:w 0 0 \s__fp_exact ; } -\tl_const:Nn \c_minus_zero_fp { \s__fp \__fp_chk:w 0 2 \s__fp_exact ; } -\tl_const:Nn \c_inf_fp { \s__fp \__fp_chk:w 2 0 \s__fp_exact ; } -\tl_const:Nn \c_minus_inf_fp { \s__fp \__fp_chk:w 2 2 \s__fp_exact ; } -\tl_const:Nn \c_nan_fp { \s__fp \__fp_chk:w 3 1 \s__fp_exact ; } +\tl_const:Nn \c_zero_fp { \s__fp \__fp_chk:w 0 0 \s__fp_exact \__fp_sep: } +\tl_const:Nn \c_minus_zero_fp { \s__fp \__fp_chk:w 0 2 \s__fp_exact \__fp_sep: } +\tl_const:Nn \c_inf_fp { \s__fp \__fp_chk:w 2 0 \s__fp_exact \__fp_sep: } +\tl_const:Nn \c_minus_inf_fp { \s__fp \__fp_chk:w 2 2 \s__fp_exact \__fp_sep: } +\tl_const:Nn \c_nan_fp { \s__fp \__fp_chk:w 3 1 \s__fp_exact \__fp_sep: } \int_const:Nn \c__fp_prec_int { 16 } \int_const:Nn \c__fp_half_prec_int { 8 } \int_const:Nn \c__fp_block_int { 4 } @@ -15402,12 +15418,12 @@ Type H <return> for immediate help}\def~{\errmessage{% { \s__fp \__fp_chk:w 1 0 { \int_eval:n { \c__fp_max_exponent_int + 1 } } - {1000} {0000} {0000} {0000} ; + {1000} {0000} {0000} {0000} \__fp_sep: } \cs_new:Npn \__fp_zero_fp:N #1 - { \s__fp \__fp_chk:w 0 #1 \s__fp_underflow ; } + { \s__fp \__fp_chk:w 0 #1 \s__fp_underflow \__fp_sep: } \cs_new:Npn \__fp_inf_fp:N #1 - { \s__fp \__fp_chk:w 2 #1 \s__fp_overflow ; } + { \s__fp \__fp_chk:w 2 #1 \s__fp_overflow \__fp_sep: } \cs_new:Npn \__fp_exponent:w \s__fp \__fp_chk:w #1 { \if_meaning:w 1 #1 @@ -15426,7 +15442,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \s__fp { \__fp_use_i_until_s:nw 4 } \s__fp_stop } -\cs_new:Npn \__fp_sanitize:Nw #1 #2; +\cs_new:Npn \__fp_sanitize:Nw #1 #2\__fp_sep: { \if_case:w \if_int_compare:w #2 > \c__fp_max_exponent_int 1 ~ \else: @@ -15438,8 +15454,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \s__fp \__fp_chk:w 1 #1 {#2} } -\cs_new:Npn \__fp_sanitize:wN #1; #2 { \__fp_sanitize:Nw #2 #1; } -\cs_new:Npn \__fp_sanitize_zero:w \s__fp \__fp_chk:w #1 #2 #3; +\cs_new:Npn \__fp_sanitize:wN #1\__fp_sep: #2 { \__fp_sanitize:Nw #2 #1\__fp_sep: } +\cs_new:Npn \__fp_sanitize_zero:w \s__fp \__fp_chk:w #1 #2 #3\__fp_sep: { \c_zero_fp } \cs_new:Npn \__fp_exp_after_o:w \s__fp \__fp_chk:w #1 { @@ -15461,52 +15477,52 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp:w \exp_end_continue_f:w #1 } #2 } -\cs_new:Npn \__fp_exp_after_special:nNNw #1#2#3#4; +\cs_new:Npn \__fp_exp_after_special:nNNw #1#2#3#4\__fp_sep: { \exp_after:wN \s__fp \exp_after:wN \__fp_chk:w \exp_after:wN #2 \exp_after:wN #3 \exp_after:wN #4 - \exp_after:wN ; + \exp_after:wN \__fp_sep: #1 } -\cs_new:Npn \__fp_exp_after_normal:nNNw #1 1 #2 #3 #4#5#6#7; +\cs_new:Npn \__fp_exp_after_normal:nNNw #1 1 #2 #3 #4#5#6#7\__fp_sep: { \exp_after:wN \__fp_exp_after_normal:Nwwwww \exp_after:wN #2 - \int_value:w #3 \exp_after:wN ; - \int_value:w 1 #4 \exp_after:wN ; - \int_value:w 1 #5 \exp_after:wN ; - \int_value:w 1 #6 \exp_after:wN ; - \int_value:w 1 #7 \exp_after:wN ; #1 + \int_value:w #3 \exp_after:wN \__fp_sep: + \int_value:w 1 #4 \exp_after:wN \__fp_sep: + \int_value:w 1 #5 \exp_after:wN \__fp_sep: + \int_value:w 1 #6 \exp_after:wN \__fp_sep: + \int_value:w 1 #7 \exp_after:wN \__fp_sep: #1 } \cs_new:Npn \__fp_exp_after_normal:Nwwwww - #1 #2; 1 #3 ; 1 #4 ; 1 #5 ; 1 #6 ; - { \s__fp \__fp_chk:w 1 #1 {#2} {#3} {#4} {#5} {#6} ; } + #1 #2\__fp_sep: 1 #3 \__fp_sep: 1 #4 \__fp_sep: 1 #5 \__fp_sep: 1 #6 \__fp_sep: + { \s__fp \__fp_chk:w 1 #1 {#2} {#3} {#4} {#5} {#6} \__fp_sep: } \scan_new:N \s__fp_tuple -\cs_new_protected:Npn \__fp_tuple_chk:w #1 ; - { \__fp_misused:n { \s__fp_tuple \__fp_tuple_chk:w #1 ; } } +\cs_new_protected:Npn \__fp_tuple_chk:w #1 \__fp_sep: + { \__fp_misused:n { \s__fp_tuple \__fp_tuple_chk:w #1 \__fp_sep: } } \tl_const:Nn \c__fp_empty_tuple_fp - { \s__fp_tuple \__fp_tuple_chk:w { } ; } + { \s__fp_tuple \__fp_tuple_chk:w { } \__fp_sep: } \cs_new:Npn \__fp_array_count:n #1 - { \__fp_tuple_count:w \s__fp_tuple \__fp_tuple_chk:w {#1} ; } -\cs_new:Npn \__fp_tuple_count:w \s__fp_tuple \__fp_tuple_chk:w #1 ; + { \__fp_tuple_count:w \s__fp_tuple \__fp_tuple_chk:w {#1} \__fp_sep: } +\cs_new:Npn \__fp_tuple_count:w \s__fp_tuple \__fp_tuple_chk:w #1 \__fp_sep: { \int_value:w \__fp_int_eval:w 0 - \__fp_tuple_count_loop:Nw #1 { ? \prg_break: } ; + \__fp_tuple_count_loop:Nw #1 { ? \prg_break: } \__fp_sep: \prg_break_point: \__fp_int_eval_end: } -\cs_new:Npn \__fp_tuple_count_loop:Nw #1#2; +\cs_new:Npn \__fp_tuple_count_loop:Nw #1#2\__fp_sep: { \use_none:n #1 + 1 \__fp_tuple_count_loop:Nw } \cs_new:Npn \__fp_if_type_fp:NTwFw #1 \s__fp #2 #3 \s__fp_stop {#2} \cs_new:Npn \__fp_array_if_all_fp:nTF #1 { - \__fp_array_if_all_fp_loop:w #1 { \s__fp \prg_break: } ; + \__fp_array_if_all_fp_loop:w #1 { \s__fp \prg_break: } \__fp_sep: \prg_break_point: \use_i:nn } -\cs_new:Npn \__fp_array_if_all_fp_loop:w #1#2 ; +\cs_new:Npn \__fp_array_if_all_fp_loop:w #1#2 \__fp_sep: { \__fp_if_type_fp:NTwFw #1 \__fp_array_if_all_fp_loop:w @@ -15568,7 +15584,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__fp_exp_after_tuple_o:w { \__fp_exp_after_tuple_f:nw { \exp_after:wN \exp_stop_f: } } \cs_new:Npn \__fp_exp_after_tuple_f:nw - #1 \s__fp_tuple \__fp_tuple_chk:w #2 ; + #1 \s__fp_tuple \__fp_tuple_chk:w #2 \__fp_sep: { \exp_after:wN \s__fp_tuple \exp_after:wN \__fp_tuple_chk:w @@ -15576,7 +15592,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp:w \exp_end_continue_f:w \__fp_exp_after_array_f:w #2 \s__fp_expr_stop \exp_after:wN } - \exp_after:wN ; + \exp_after:wN \__fp_sep: \exp:w \exp_end_continue_f:w #1 } \cs_new:Npn \__fp_exp_after_array_f:w @@ -15584,42 +15600,43 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_const:Nn \c__fp_leading_shift_int { - 5 0000 } \int_const:Nn \c__fp_middle_shift_int { 5 0000 * 9999 } \int_const:Nn \c__fp_trailing_shift_int { 5 0000 * 10000 } -\cs_new:Npn \__fp_pack:NNNNNw #1 #2#3#4#5 #6; { + #1#2#3#4#5 ; {#6} } +\cs_new:Npn \__fp_pack:NNNNNw #1 #2#3#4#5 #6\__fp_sep: + { + #1#2#3#4#5 \__fp_sep: {#6} } \int_const:Nn \c__fp_big_leading_shift_int { - 15 2374 } \int_const:Nn \c__fp_big_middle_shift_int { 15 2374 * 9999 } \int_const:Nn \c__fp_big_trailing_shift_int { 15 2374 * 10000 } -\cs_new:Npn \__fp_pack_big:NNNNNNw #1#2 #3#4#5#6 #7; - { + #1#2#3#4#5#6 ; {#7} } +\cs_new:Npn \__fp_pack_big:NNNNNNw #1#2 #3#4#5#6 #7\__fp_sep: + { + #1#2#3#4#5#6 \__fp_sep: {#7} } \int_const:Nn \c__fp_Bigg_leading_shift_int { - 20 0000 } \int_const:Nn \c__fp_Bigg_middle_shift_int { 20 0000 * 9999 } \int_const:Nn \c__fp_Bigg_trailing_shift_int { 20 0000 * 10000 } -\cs_new:Npn \__fp_pack_Bigg:NNNNNNw #1#2 #3#4#5#6 #7; - { + #1#2#3#4#5#6 ; {#7} } -\cs_new:Npn \__fp_pack_twice_four:wNNNNNNNN #1; #2#3#4#5 #6#7#8#9 - { #1 {#2#3#4#5} {#6#7#8#9} ; } -\cs_new:Npn \__fp_pack_eight:wNNNNNNNN #1; #2#3#4#5 #6#7#8#9 - { #1 {#2#3#4#5#6#7#8#9} ; } -\cs_new:Npn \__fp_basics_pack_low:NNNNNw #1 #2#3#4#5 #6; - { + #1 - 1 ; {#2#3#4#5} {#6} ; } -\cs_new:Npn \__fp_basics_pack_high:NNNNNw #1 #2#3#4#5 #6; +\cs_new:Npn \__fp_pack_Bigg:NNNNNNw #1#2 #3#4#5#6 #7\__fp_sep: + { + #1#2#3#4#5#6 \__fp_sep: {#7} } +\cs_new:Npn \__fp_pack_twice_four:wNNNNNNNN #1\__fp_sep: #2#3#4#5 #6#7#8#9 + { #1 {#2#3#4#5} {#6#7#8#9} \__fp_sep: } +\cs_new:Npn \__fp_pack_eight:wNNNNNNNN #1\__fp_sep: #2#3#4#5 #6#7#8#9 + { #1 {#2#3#4#5#6#7#8#9} \__fp_sep: } +\cs_new:Npn \__fp_basics_pack_low:NNNNNw #1 #2#3#4#5 #6\__fp_sep: + { + #1 - 1 \__fp_sep: {#2#3#4#5} {#6} \__fp_sep: } +\cs_new:Npn \__fp_basics_pack_high:NNNNNw #1 #2#3#4#5 #6\__fp_sep: { \if_meaning:w 2 #1 \__fp_basics_pack_high_carry:w \fi: - ; {#2#3#4#5} {#6} + \__fp_sep: {#2#3#4#5} {#6} } -\cs_new:Npn \__fp_basics_pack_high_carry:w \fi: ; #1 - { \fi: + 1 ; {1000} } -\cs_new:Npn \__fp_basics_pack_weird_low:NNNNw #1 #2#3#4 #5; +\cs_new:Npn \__fp_basics_pack_high_carry:w \fi: \__fp_sep: #1 + { \fi: + 1 \__fp_sep: {1000} } +\cs_new:Npn \__fp_basics_pack_weird_low:NNNNw #1 #2#3#4 #5\__fp_sep: { \if_meaning:w 2 #1 + 1 \fi: \__fp_int_eval_end: - #2#3#4; {#5} ; + #2#3#4\__fp_sep: {#5} \__fp_sep: } \cs_new:Npn \__fp_basics_pack_weird_high:NNNNNNNNw - 1 #1#2#3#4 #5#6#7#8 #9; { ; {#1#2#3#4} {#5#6#7#8} {#9} } + 1 #1#2#3#4 #5#6#7#8 #9\__fp_sep: { \__fp_sep: {#1#2#3#4} {#5#6#7#8} {#9} } \cs_new:Npn \__fp_decimate:nNnnnn #1 { \cs:w @@ -15633,17 +15650,17 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_end: } \cs_new:Npn \__fp_decimate_:Nnnnn #1 #2#3#4#5 - { #1 0 {#2#3} {#4#5} ; } + { #1 0 {#2#3} {#4#5} \__fp_sep: } \cs_new:Npn \__fp_decimate_tiny:Nnnnn #1 #2#3#4#5 - { #1 1 { 0000 0000 } { 0000 0000 } 0 #2#3#4#5 ; } + { #1 1 { 0000 0000 } { 0000 0000 } 0 #2#3#4#5 \__fp_sep: } \cs_new:Npn \__fp_tmp:w #1 #2 #3 { \cs_new:cpn { __fp_decimate_ #1 :Nnnnn } ##1 ##2##3##4##5 { \exp_after:wN ##1 \int_value:w - \exp_after:wN \__fp_round_digit:Nw #2 ; - \__fp_decimate_pack:nnnnnnnnnnw #3 ; + \exp_after:wN \__fp_round_digit:Nw #2 \__fp_sep: + \__fp_decimate_pack:nnnnnnnnnnw #3 \__fp_sep: } } \__fp_tmp:w {i} {\use_none:nnn #50}{ 0{#2}#3{#4}#5 } @@ -15667,18 +15684,19 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__fp_decimate_pack:nnnnnnw #1 #2#3#4#5#6 { {#1} {#2#3#4#5#6} } \cs_new:Npn \__fp_case_use:nw #1#2 \fi: #3 \s__fp { \fi: #1 \s__fp } -\cs_new:Npn \__fp_case_return:nw #1#2 \fi: #3 ; { \fi: #1 } -\cs_new:Npn \__fp_case_return_o:Nw #1#2 \fi: #3 \s__fp #4 ; +\cs_new:Npn \__fp_case_return:nw #1#2 \fi: #3 \__fp_sep: { \fi: #1 } +\cs_new:Npn \__fp_case_return_o:Nw #1#2 \fi: #3 \s__fp #4 \__fp_sep: { \fi: \exp_after:wN #1 } \cs_new:Npn \__fp_case_return_same_o:w #1 \fi: #2 \s__fp { \fi: \__fp_exp_after_o:w \s__fp } -\cs_new:Npn \__fp_case_return_o:Nww #1#2 \fi: #3 \s__fp #4 ; #5 ; +\cs_new:Npn \__fp_case_return_o:Nww #1#2 \fi: #3 \s__fp #4 \__fp_sep: #5 \__fp_sep: { \fi: \exp_after:wN #1 } -\cs_new:Npn \__fp_case_return_i_o:ww #1 \fi: #2 \s__fp #3 ; \s__fp #4 ; - { \fi: \__fp_exp_after_o:w \s__fp #3 ; } -\cs_new:Npn \__fp_case_return_ii_o:ww #1 \fi: #2 \s__fp #3 ; +\cs_new:Npn \__fp_case_return_i_o:ww + #1 \fi: #2 \s__fp #3 \__fp_sep: \s__fp #4 \__fp_sep: + { \fi: \__fp_exp_after_o:w \s__fp #3 \__fp_sep: } +\cs_new:Npn \__fp_case_return_ii_o:ww #1 \fi: #2 \s__fp #3 \__fp_sep: { \fi: \__fp_exp_after_o:w } -\prg_new_conditional:Npnn \__fp_int:w \s__fp \__fp_chk:w #1 #2 #3 #4; +\prg_new_conditional:Npnn \__fp_int:w \s__fp \__fp_chk:w #1 #2 #3 #4\__fp_sep: { TF , T , F , p } { \if_case:w #1 \exp_stop_f: @@ -15697,26 +15715,26 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__fp_small_int:wTF \s__fp \__fp_chk:w #1#2 { \if_case:w #1 \exp_stop_f: - \__fp_case_return:nw { \__fp_small_int_true:wTF 0 ; } + \__fp_case_return:nw { \__fp_small_int_true:wTF 0 \__fp_sep: } \or: \exp_after:wN \__fp_small_int_normal:NnwTF \or: \__fp_case_return:nw { \exp_after:wN \__fp_small_int_true:wTF \int_value:w - \if_meaning:w 2 #2 - \fi: 1 0000 0000 ; + \if_meaning:w 2 #2 - \fi: 1 0000 0000 \__fp_sep: } \else: \__fp_case_return:nw \use_ii:nn \fi: #2 } -\cs_new:Npn \__fp_small_int_true:wTF #1; #2#3 { #2 {#1} } -\cs_new:Npn \__fp_small_int_normal:NnwTF #1#2#3; +\cs_new:Npn \__fp_small_int_true:wTF #1\__fp_sep: #2#3 { #2 {#1} } +\cs_new:Npn \__fp_small_int_normal:NnwTF #1#2#3\__fp_sep: { \__fp_decimate:nNnnnn { \c__fp_prec_int - #2 } \__fp_small_int_test:NnnwNw #3 #1 } -\cs_new:Npn \__fp_small_int_test:NnnwNw #1#2#3#4; #5 +\cs_new:Npn \__fp_small_int_test:NnnwNw #1#2#3#4\__fp_sep: #5 { \if_meaning:w 0 #1 \exp_after:wN \__fp_small_int_true:wTF @@ -15726,7 +15744,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: #3 \fi: - \exp_after:wN ; + \exp_after:wN \__fp_sep: \else: \exp_after:wN \use_ii:nn \fi: @@ -15782,19 +15800,21 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new_protected:Npn \__fp_trap_invalid_operation_set:N #1 { \exp_args:Nno \use:n - { \cs_set:Npn \__fp_invalid_operation:nnw ##1##2##3; } + { \cs_set:Npn \__fp_invalid_operation:nnw ##1##2##3\__fp_sep: } { #1 - \__fp_error:nnfn { invalid } {##2} { \fp_to_tl:n { ##3; } } { } + \__fp_error:nnfn { invalid } {##2} { \fp_to_tl:n { ##3\__fp_sep: } } { } \flag_ensure_raised:N \l_fp_invalid_operation_flag ##1 } \exp_args:Nno \use:n - { \cs_set:Npn \__fp_invalid_operation_o:Nww ##1##2; ##3; } + { \cs_set:Npn \__fp_invalid_operation_o:Nww ##1##2\__fp_sep: ##3\__fp_sep: } { #1 \__fp_error:nffn { invalid-ii } - { \fp_to_tl:n { ##2; } } { \fp_to_tl:n { ##3; } } {##1} + { \fp_to_tl:n { ##2\__fp_sep: } } + { \fp_to_tl:n { ##3\__fp_sep: } } + {##1} \flag_ensure_raised:N \l_fp_invalid_operation_flag \exp_after:wN \c_nan_fp } @@ -15816,19 +15836,23 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new_protected:Npn \__fp_trap_division_by_zero_set:N #1 { \exp_args:Nno \use:n - { \cs_set:Npn \__fp_division_by_zero_o:Nnw ##1##2##3; } + { \cs_set:Npn \__fp_division_by_zero_o:Nnw ##1##2##3\__fp_sep: } { #1 - \__fp_error:nnfn { zero-div } {##2} { \fp_to_tl:n { ##3; } } { } + \__fp_error:nnfn { zero-div } {##2} { \fp_to_tl:n { ##3\__fp_sep: } } { } \flag_ensure_raised:N \l_fp_division_by_zero_flag \exp_after:wN ##1 } \exp_args:Nno \use:n - { \cs_set:Npn \__fp_division_by_zero_o:NNww ##1##2##3; ##4; } + { + \cs_set:Npn \__fp_division_by_zero_o:NNww ##1##2##3\__fp_sep: ##4\__fp_sep: + } { #1 \__fp_error:nffn { zero-div-ii } - { \fp_to_tl:n { ##3; } } { \fp_to_tl:n { ##4; } } {##2} + { \fp_to_tl:n { ##3\__fp_sep: } } + { \fp_to_tl:n { ##4\__fp_sep: } } + {##2} \flag_ensure_raised:N \l_fp_division_by_zero_flag \exp_after:wN ##1 } @@ -15852,23 +15876,23 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new_protected:Npn \__fp_trap_overflow_set:NnNn #1#2#3#4 { \exp_args:Nno \use:n - { \cs_set:cpn { __fp_ #2 :w } \s__fp \__fp_chk:w ##1##2##3; } + { \cs_set:cpn { __fp_ #2 :w } \s__fp \__fp_chk:w ##1##2##3\__fp_sep: } { #1 \__fp_error:nffn { flow \if_meaning:w 1 ##1 -to \fi: } - { \fp_to_tl:n { \s__fp \__fp_chk:w ##1##2##3; } } + { \fp_to_tl:n { \s__fp \__fp_chk:w ##1##2##3\__fp_sep: } } { \token_if_eq_meaning:NNF 0 ##2 { - } #4 } {#2} \flag_ensure_raised:c { l_fp_#2_flag } #3 ##2 } } -\cs_new:Npn \__fp_invalid_operation:nnw #1#2#3; { } -\cs_new:Npn \__fp_invalid_operation_o:Nww #1#2; #3; { } +\cs_new:Npn \__fp_invalid_operation:nnw #1#2#3\__fp_sep: { } +\cs_new:Npn \__fp_invalid_operation_o:Nww #1#2\__fp_sep: #3\__fp_sep: { } \cs_new:Npn \__fp_invalid_operation_tl_o:ff #1 #2 { } -\cs_new:Npn \__fp_division_by_zero_o:Nnw #1#2#3; { } -\cs_new:Npn \__fp_division_by_zero_o:NNww #1#2#3; #4; { } +\cs_new:Npn \__fp_division_by_zero_o:Nnw #1#2#3\__fp_sep: { } +\cs_new:Npn \__fp_division_by_zero_o:NNww #1#2#3\__fp_sep: #4\__fp_sep: { } \cs_new:Npn \__fp_overflow:w { } \cs_new:Npn \__fp_underflow:w { } \fp_trap:nn { invalid_operation } { error } @@ -16006,7 +16030,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \c_zero_int } \cs_new_eq:NN \__fp_round:NNN \__fp_round_to_nearest:NNN -\cs_new:Npn \__fp_round_s:NNNw #1 #2 #3 #4; +\cs_new:Npn \__fp_round_s:NNNw #1 #2 #3 #4\__fp_sep: { \exp_after:wN \__fp_round:NNN \exp_after:wN #1 @@ -16020,9 +16044,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \fi: #3 - ; + \__fp_sep: } -\cs_new:Npn \__fp_round_digit:Nw #1 #2; +\cs_new:Npn \__fp_round_digit:Nw #1 #2\__fp_sep: { \if_int_odd:w \if_meaning:w 0 #1 1 \else: \if_meaning:w 5 #1 1 \else: @@ -16082,7 +16106,8 @@ Type H <return> for immediate help}\def~{\errmessage{% } \exp_after:wN \c_nan_fp } -\cs_new:Npn \__fp_round:Nwww #1#2 ; #3 ; \s__fp \__fp_chk:w #4#5#6 ; #7 @ +\cs_new:Npn \__fp_round:Nwww + #1#2 \__fp_sep: #3 \__fp_sep: \s__fp \__fp_chk:w #4#5#6 \__fp_sep: #7 @ { \cs_if_eq:NNTF #1 \__fp_round_to_nearest:NNN { @@ -16095,7 +16120,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \if_case:w #5 \exp_stop_f: _pinf \or: \else: _ninf \fi: \fi: :NNN } - #2 ; #3 ; + #2 \__fp_sep: #3 \__fp_sep: } { \__fp_error:nnnn { num-args } { round () } { 1 } { 3 } @@ -16119,11 +16144,11 @@ Type H <return> for immediate help}\def~{\errmessage{% } } } -\cs_new:Npn \__fp_round:Nww #1#2 ; #3 ; +\cs_new:Npn \__fp_round:Nww #1#2 \__fp_sep: #3 \__fp_sep: { - \__fp_small_int:wTF #3; { \__fp_round:Nwn #1#2; } + \__fp_small_int:wTF #3\__fp_sep: { \__fp_round:Nwn #1#2\__fp_sep: } { - \if:w 3 \__fp_kind:w #3 ; + \if:w 3 \__fp_kind:w #3 \__fp_sep: \exp_after:wN \use_i:nn \else: \exp_after:wN \use_ii:nn @@ -16132,11 +16157,11 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_invalid_operation_tl_o:ff { \__fp_round_name_from_cs:N #1 } - { \__fp_array_to_clist:n { #2; #3; } } + { \__fp_array_to_clist:n { #2\__fp_sep: #3\__fp_sep: } } } } } -\cs_new:Npn \__fp_round:Nwn #1 \s__fp \__fp_chk:w #2#3#4; #5 +\cs_new:Npn \__fp_round:Nwn #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: #5 { \if_meaning:w 1 #2 \exp_after:wN \__fp_round_normal:NwNNnw @@ -16145,14 +16170,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \exp_after:wN \__fp_exp_after_o:w \fi: - \s__fp \__fp_chk:w #2#3#4; + \s__fp \__fp_chk:w #2#3#4\__fp_sep: } -\cs_new:Npn \__fp_round_normal:NwNNnw #1#2 \s__fp \__fp_chk:w 1#3#4#5; +\cs_new:Npn \__fp_round_normal:NwNNnw #1#2 \s__fp \__fp_chk:w 1#3#4#5\__fp_sep: { \__fp_decimate:nNnnnn { \c__fp_prec_int - #4 - #2 } \__fp_round_normal:NnnwNNnn #5 #1 #3 {#4} {#2} } -\cs_new:Npn \__fp_round_normal:NnnwNNnn #1#2#3#4; #5#6 +\cs_new:Npn \__fp_round_normal:NnnwNNnn #1#2#3#4\__fp_sep: #5#6 { \exp_after:wN \__fp_round_normal:NNwNnn \int_value:w \__fp_int_eval:w @@ -16170,7 +16195,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \use_none:nnnnnnn #3 #1 \__fp_int_eval_end: - 0000 0000 0000 0000 ; #6 + 0000 0000 0000 0000 \__fp_sep: #6 } \cs_new:Npn \__fp_round_pack:Nw #1 { \if_meaning:w 2 #1 + 1 \fi: \__fp_int_eval_end: } @@ -16183,14 +16208,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_round_normal_end:wwNnn - ; #2 + \__fp_sep: #2 } -\cs_new:Npn \__fp_round_normal_end:wwNnn #1;#2;#3#4#5 +\cs_new:Npn \__fp_round_normal_end:wwNnn #1\__fp_sep:#2\__fp_sep:#3#4#5 { \exp_after:wN \__fp_exp_after_o:w \exp:w \exp_end_continue_f:w - \__fp_sanitize:Nw #3 #4 ; #1 ; + \__fp_sanitize:Nw #3 #4 \__fp_sep: #1 \__fp_sep: } -\cs_new:Npn \__fp_round_special:NwwNnn #1#2;#3;#4#5#6 +\cs_new:Npn \__fp_round_special:NwwNnn #1#2\__fp_sep:#3\__fp_sep:#4#5#6 { \if_meaning:w 0 #1 \__fp_case_return:nw @@ -16201,12 +16226,12 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \__fp_int_eval:w 1 \if_meaning:w 1 #1 -#6 \else: +#5 \fi: \fi: - ; + \__fp_sep: } -\cs_new:Npn \__fp_round_special_aux:Nw #1#2; +\cs_new:Npn \__fp_round_special_aux:Nw #1#2\__fp_sep: { \exp_after:wN \__fp_exp_after_o:w \exp:w \exp_end_continue_f:w - \__fp_sanitize:Nw #1#2; {1000}{0000}{0000}{0000}; + \__fp_sanitize:Nw #1#2\__fp_sep: {1000}{0000}{0000}{0000}\__fp_sep: } %% File: l3fp-parse.dtx \int_const:Nn \c__fp_prec_func_int { 16 } @@ -16226,7 +16251,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_const:Nn \c__fp_prec_end_int { 0 } \cs_new:Npn \__fp_parse_expand:w #1 { \exp_end_continue_f:w #1 } \cs_new:Npn \__fp_parse_return_semicolon:w - #1 \fi: \__fp_parse_expand:w { \fi: ; #1 } + #1 \fi: \__fp_parse_expand:w { \fi: \__fp_sep: #1 } \cs_set_protected:Npn \__fp_tmp:w #1 #2 #3 { \cs_new:cpn { __fp_parse_digits_ #1 :N } ##1 @@ -16239,14 +16264,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_parse_expand:w } } -\__fp_tmp:w {vii} \__fp_parse_digits_vi:N { 0000000 ; 7 } -\__fp_tmp:w {vi} \__fp_parse_digits_v:N { 000000 ; 6 } -\__fp_tmp:w {v} \__fp_parse_digits_iv:N { 00000 ; 5 } -\__fp_tmp:w {iv} \__fp_parse_digits_iii:N { 0000 ; 4 } -\__fp_tmp:w {iii} \__fp_parse_digits_ii:N { 000 ; 3 } -\__fp_tmp:w {ii} \__fp_parse_digits_i:N { 00 ; 2 } -\__fp_tmp:w {i} \__fp_parse_digits_:N { 0 ; 1 } -\cs_new:Npn \__fp_parse_digits_:N { ; ; 0 } +\__fp_tmp:w {vii} \__fp_parse_digits_vi:N { 0000000 \__fp_sep: 7 } +\__fp_tmp:w {vi} \__fp_parse_digits_v:N { 000000 \__fp_sep: 6 } +\__fp_tmp:w {v} \__fp_parse_digits_iv:N { 00000 \__fp_sep: 5 } +\__fp_tmp:w {iv} \__fp_parse_digits_iii:N { 0000 \__fp_sep: 4 } +\__fp_tmp:w {iii} \__fp_parse_digits_ii:N { 000 \__fp_sep: 3 } +\__fp_tmp:w {ii} \__fp_parse_digits_i:N { 00 \__fp_sep: 2 } +\__fp_tmp:w {i} \__fp_parse_digits_:N { 0 \__fp_sep: 1 } +\cs_new:Npn \__fp_parse_digits_:N { \__fp_sep: \__fp_sep: 0 } \cs_new:Npn \__fp_parse_one:Nw #1 #2 { \if_catcode:w \scan_stop: \exp_not:N #2 @@ -16346,26 +16371,26 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_parse_one_register_auxii:wwwNw } \exp_not:N \exp_after:wN { \exp_not:N \tex_the:D #1 } - ; \exp_not:N \__fp_parse_one_register_dim:ww - \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_mu:www - . \tl_to_str:n { pt } ; \exp_not:N \__fp_parse_one_register_int:www + \__fp_sep: \exp_not:N \__fp_parse_one_register_dim:ww + \tl_to_str:n { pt } \__fp_sep: \exp_not:N \__fp_parse_one_register_mu:www + . \tl_to_str:n { pt } \__fp_sep: \exp_not:N \__fp_parse_one_register_int:www \s__fp_stop } \exp_args:Nno \use:nn { \cs_new:Npn \__fp_parse_one_register_auxii:wwwNw #1 . #2 } - { \tl_to_str:n { pt } #3 ; #4#5 \s__fp_stop } - { #4 #1.#2; } + { \tl_to_str:n { pt } #3 \__fp_sep: #4#5 \s__fp_stop } + { #4 #1.#2\__fp_sep: } \exp_args:Nno \use:nn { \cs_new:Npn \__fp_parse_one_register_mu:www #1 } - { \tl_to_str:n { mu } ; #2 ; } - { \__fp_parse_one_register_dim:ww #1 ; } -\cs_new:Npn \__fp_parse_one_register_int:www #1; #2.; #3; + { \tl_to_str:n { mu } \__fp_sep: #2 \__fp_sep: } + { \__fp_parse_one_register_dim:ww #1 \__fp_sep: } +\cs_new:Npn \__fp_parse_one_register_int:www #1\__fp_sep: #2.\__fp_sep: #3\__fp_sep: { \__fp_parse:n { #1 e #3 } } -\cs_new:Npn \__fp_parse_one_register_dim:ww #1; #2; +\cs_new:Npn \__fp_parse_one_register_dim:ww #1\__fp_sep: #2\__fp_sep: { \exp_after:wN \__fp_from_dim_test:ww \int_value:w #2 \exp_after:wN , - \int_value:w \dim_to_decimal_in_sp:n { #1 pt } ; + \int_value:w \dim_to_decimal_in_sp:n { #1 pt } \__fp_sep: } \cs_new:Npn \__fp_parse_one_register_special:N #1 { @@ -16398,11 +16423,11 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_parse_one_register_wd:Nw #4 \__fp_parse_expand:w e } -\cs_new:Npn \__fp_parse_one_register_wd:Nw #1#2 ; +\cs_new:Npn \__fp_parse_one_register_wd:Nw #1#2 \__fp_sep: { \exp_after:wN \__fp_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \int_value:w \dim_to_decimal_in_sp:n { #1 #2 } ; + \int_value:w \dim_to_decimal_in_sp:n { #1 #2 } \__fp_sep: } \cs_new:Npn \__fp_parse_one_digit:NN #1 { @@ -16435,7 +16460,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \__fp_parse_expand:w } -\cs_new:Npn \__fp_parse_word:Nw #1#2; +\cs_new:Npn \__fp_parse_word:Nw #1#2\__fp_sep: { \cs_if_exist_use:cF { __fp_parse_word_#2:N } { @@ -16540,7 +16565,7 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new:Npn \__fp_parse_zero: { - \exp_after:wN ; \exp_after:wN 1 + \exp_after:wN \__fp_sep: \exp_after:wN 1 \int_value:w \__fp_parse_exponent:N } \cs_new:Npn \__fp_parse_small:N #1 @@ -16552,7 +16577,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_parse_digits_vii:N \exp:w \__fp_parse_expand:w } -\cs_new:Npn \__fp_parse_small_leading:wwNN 1 #1 ; #2; #3 #4 +\cs_new:Npn \__fp_parse_small_leading:wwNN 1 #1 \__fp_sep: #2\__fp_sep: #3 #4 { #1 #2 \exp_after:wN \__fp_parse_pack_trailing:NNNNNNww @@ -16569,7 +16594,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \__fp_parse_expand:w } -\cs_new:Npn \__fp_parse_small_trailing:wwNN 1 #1 ; #2; #3 #4 +\cs_new:Npn \__fp_parse_small_trailing:wwNN 1 #1 \__fp_sep: #2\__fp_sep: #3 #4 { #1 #2 \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f: @@ -16582,19 +16607,20 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \__fp_parse_expand:w } -\cs_new:Npn \__fp_parse_pack_trailing:NNNNNNww #1 #2 #3#4#5#6 #7; #8 ; +\cs_new:Npn \__fp_parse_pack_trailing:NNNNNNww + #1 #2 #3#4#5#6 #7\__fp_sep: #8 \__fp_sep: { \if_meaning:w 2 #2 + 1 \fi: - ; #8 + #1 ; {#3#4#5#6} {#7}; + \__fp_sep: #8 + #1 \__fp_sep: {#3#4#5#6} {#7}\__fp_sep: } -\cs_new:Npn \__fp_parse_pack_leading:NNNNNww #1 #2#3#4#5 #6; #7; +\cs_new:Npn \__fp_parse_pack_leading:NNNNNww #1 #2#3#4#5 #6\__fp_sep: #7\__fp_sep: { + #7 \if_meaning:w 2 #1 \__fp_parse_pack_carry:w \fi: - ; 0 {#2#3#4#5} {#6} + \__fp_sep: 0 {#2#3#4#5} {#6} } -\cs_new:Npn \__fp_parse_pack_carry:w \fi: ; 0 #1 - { \fi: + 1 ; 0 {1000} } +\cs_new:Npn \__fp_parse_pack_carry:w \fi: \__fp_sep: 0 #1 + { \fi: + 1 \__fp_sep: 0 {1000} } \cs_new:Npn \__fp_parse_large:N #1 { \exp_after:wN \__fp_parse_large_leading:wwNN @@ -16602,7 +16628,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_parse_digits_vii:N \exp:w \__fp_parse_expand:w } -\cs_new:Npn \__fp_parse_large_leading:wwNN 1 #1 ; #2; #3 #4 +\cs_new:Npn \__fp_parse_large_leading:wwNN 1 #1 \__fp_sep: #2\__fp_sep: #3 #4 { + \c__fp_half_prec_int - #3 \exp_after:wN \__fp_parse_pack_leading:NNNNNww @@ -16632,7 +16658,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \__fp_parse_expand:w } -\cs_new:Npn \__fp_parse_large_trailing:wwNN 1 #1 ; #2; #3 #4 +\cs_new:Npn \__fp_parse_large_trailing:wwNN 1 #1 \__fp_sep: #2\__fp_sep: #3 #4 { \if_int_compare:w 9 < 1 \token_to_str:N #4 \exp_stop_f: \exp_after:wN \__fp_parse_pack_trailing:NNNNNNww @@ -16687,9 +16713,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \__fp_parse_expand:w } -\cs_new:Npn \__fp_parse_round_after:wN #1; #2 +\cs_new:Npn \__fp_parse_round_after:wN #1\__fp_sep: #2 { - + #2 \exp_after:wN ; + + #2 \exp_after:wN \__fp_sep: \int_value:w \__fp_int_eval:w #1 + \__fp_parse_exponent:N } \cs_new:Npn \__fp_parse_small_round:NN #1#2 @@ -16739,7 +16765,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \__fp_parse_expand:w } -\cs_new:Npn \__fp_parse_large_round_aux:wNN #1 ; #2 #3 +\cs_new:Npn \__fp_parse_large_round_aux:wNN #1 \__fp_sep: #2 #3 { + #2 \exp_after:wN \__fp_parse_round_after:wN @@ -16749,14 +16775,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_parse_round_loop:N \exp:w \exp_after:wN \__fp_parse_expand:w \else: - \exp_after:wN ; + \exp_after:wN \__fp_sep: \exp_after:wN 0 \exp_after:wN #3 \fi: } \cs_new:Npn \__fp_parse_exponent:Nw #1 #2 \__fp_parse_expand:w { - \exp_after:wN ; + \exp_after:wN \__fp_sep: \int_value:w #2 \__fp_parse_exponent:N #1 } \cs_new:Npn \__fp_parse_exponent:N #1 @@ -16774,7 +16800,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \if_int_compare:w \if_catcode:w \scan_stop: \exp_not:N #2 0 \else: `#2 \fi: > `9 \exp_stop_f: - 0 \exp_after:wN ; \exp_after:wN #1 + 0 \exp_after:wN \__fp_sep: \exp_after:wN #1 \else: \exp_after:wN \__fp_parse_exponent_sign:N \fi: @@ -16800,7 +16826,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_parse_exponent_keep:NTF #1 { \__fp_parse_return_semicolon:w #1 } { - \exp_after:wN ; + \exp_after:wN \__fp_sep: \exp:w } \fi: @@ -16857,12 +16883,12 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new:Npn \__fp_parse_apply_unary:NNNwN #1#2#3#4@#5 { - \__fp_parse_apply_unary_chk:NwNw #4 @ ; . \s__fp_stop + \__fp_parse_apply_unary_chk:NwNw #4 @ \__fp_sep: . \s__fp_stop \__fp_parse_apply_unary_type:NNN #3 #2 #4 @ \exp:w \exp_end_continue_f:w #5 #1 } -\cs_new:Npn \__fp_parse_apply_unary_chk:NwNw #1#2 ; #3#4 \s__fp_stop +\cs_new:Npn \__fp_parse_apply_unary_chk:NwNw #1#2 \__fp_sep: #3#4 \s__fp_stop { \if_meaning:w @ #3 \else: \token_if_eq_meaning:NNTF . #3 @@ -16976,7 +17002,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:cpn { __fp_parse_word_#1:N } { \__fp_exp_after_f:nw { \__fp_parse_infix:NN } - \s__fp \__fp_chk:w 10 #2 ; + \s__fp \__fp_chk:w 10 #2 \__fp_sep: } } \__fp_tmp:w {pt} { {1} {1000} {0000} {0000} {0000} } @@ -16996,7 +17022,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_after:wN \__fp_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \int_value:w \dim_to_decimal_in_sp:n { 1 #1 } \exp_after:wN ; + \int_value:w \dim_to_decimal_in_sp:n { 1 #1 } \exp_after:wN \__fp_sep: \exp:w \exp_end_continue_f:w \__fp_parse_infix:NN } } @@ -17085,7 +17111,7 @@ Type H <return> for immediate help}\def~{\errmessage{% #2 \__fp_invalid_operation_o:Nww #1 } -\cs_new:Npn \__fp_binary_type_o:Nww #1 #2#3 ; #4 +\cs_new:Npn \__fp_binary_type_o:Nww #1 #2#3 \__fp_sep: #4 { \exp_after:wN \__fp_parse_apply_binary_chk:NN \cs:w @@ -17096,9 +17122,9 @@ Type H <return> for immediate help}\def~{\errmessage{% _o:ww \cs_end: #1 - #2 #3 ; #4 + #2 #3 \__fp_sep: #4 } -\cs_new:Npn \__fp_binary_rev_type_o:Nww #1 #2#3 ; #4#5 ; +\cs_new:Npn \__fp_binary_rev_type_o:Nww #1 #2#3 \__fp_sep: #4#5 \__fp_sep: { \exp_after:wN \__fp_parse_apply_binary_chk:NN \cs:w @@ -17109,12 +17135,12 @@ Type H <return> for immediate help}\def~{\errmessage{% _o:ww \cs_end: #1 - #4 #5 ; #2 #3 ; + #4 #5 \__fp_sep: #2 #3 \__fp_sep: } -\cs_new:Npn \__fp_parse_infix_after_operand:NwN #1 #2; +\cs_new:Npn \__fp_parse_infix_after_operand:NwN #1 #2\__fp_sep: { \__fp_exp_after_f:nw { \__fp_parse_infix:NN #1 } - #2; + #2\__fp_sep: } \cs_new:Npn \__fp_parse_infix:NN #1 #2 { @@ -17238,7 +17264,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN #1 \exp:w \exp_end_continue_f:w \__fp_exp_after_tuple_f:nw { } - \s__fp_tuple \__fp_tuple_chk:w { #2 #4 } ; + \s__fp_tuple \__fp_tuple_chk:w { #2 #4 } \__fp_sep: #5 #1 } \cs_set_protected:Npn \__fp_tmp:w #1#2#3#4 @@ -17423,14 +17449,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: #1 #8 #9 } -\cs_new:Npn \__fp_parse_apply_compare_aux:NNwN #1 #2 #3; #4 +\cs_new:Npn \__fp_parse_apply_compare_aux:NNwN #1 #2 #3\__fp_sep: #4 { \if_meaning:w \__fp_parse_compare:NNNNNNN #4 \exp_after:wN \__fp_parse_continue_compare:NNwNN \exp_after:wN #1 \exp_after:wN #2 \exp:w \exp_end_continue_f:w - \__fp_exp_after_o:w #3; + \__fp_exp_after_o:w #3\__fp_sep: \exp:w \exp_end_continue_f:w \else: \exp_after:wN \__fp_parse_continue:NwN @@ -17450,7 +17476,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_error:nffn { bad-args } {#1} - { \fp_to_tl:n { \s__fp_tuple \__fp_tuple_chk:w {#3} ; } } + { \fp_to_tl:n { \s__fp_tuple \__fp_tuple_chk:w {#3} \__fp_sep: } } { } \exp_after:wN \c_nan_fp } @@ -17465,11 +17491,11 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_error:nffn { bad-args } {#2} - { \fp_to_tl:n { \s__fp_tuple \__fp_tuple_chk:w {#4} ; } } + { \fp_to_tl:n { \s__fp_tuple \__fp_tuple_chk:w {#4} \__fp_sep: } } { } \exp_after:wN \c_nan_fp } -\cs_new:Npn \__fp_parse_function_one_two_aux:nnw #1#2 #3; #4 +\cs_new:Npn \__fp_parse_function_one_two_aux:nnw #1#2 #3\__fp_sep: #4 { \__fp_if_type_fp:NTwFw #4 { } @@ -17481,52 +17507,52 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_parse_function_one_two_error_o:w } \s__fp_stop - \__fp_parse_function_one_two_auxii:nnw {#1} {#2} #3; #4 + \__fp_parse_function_one_two_auxii:nnw {#1} {#2} #3\__fp_sep: #4 } -\cs_new:Npn \__fp_parse_function_one_two_auxii:nnw #1#2#3; #4; #5 +\cs_new:Npn \__fp_parse_function_one_two_auxii:nnw #1#2#3\__fp_sep: #4\__fp_sep: #5 { \if_meaning:w @ #5 \else: \exp_after:wN \__fp_parse_function_one_two_error_o:w \fi: - \use_ii:nn {#1} { \use_none:n #2 } #3; #4; #5 + \use_ii:nn {#1} { \use_none:n #2 } #3\__fp_sep: #4\__fp_sep: #5 } -\cs_new:Npn \__fp_tuple_map_o:nw #1 \s__fp_tuple \__fp_tuple_chk:w #2 ; +\cs_new:Npn \__fp_tuple_map_o:nw #1 \s__fp_tuple \__fp_tuple_chk:w #2 \__fp_sep: { \exp_after:wN \s__fp_tuple \exp_after:wN \__fp_tuple_chk:w \exp_after:wN { \exp:w \exp_end_continue_f:w \__fp_tuple_map_loop_o:nw {#1} #2 - { \s__fp \prg_break: } ; + { \s__fp \prg_break: } \__fp_sep: \prg_break_point: - \exp_after:wN } \exp_after:wN ; + \exp_after:wN } \exp_after:wN \__fp_sep: } -\cs_new:Npn \__fp_tuple_map_loop_o:nw #1#2#3 ; +\cs_new:Npn \__fp_tuple_map_loop_o:nw #1#2#3 \__fp_sep: { \use_none:n #2 - #1 #2 #3 ; + #1 #2 #3 \__fp_sep: \exp:w \exp_end_continue_f:w \__fp_tuple_map_loop_o:nw {#1} } \cs_new:Npn \__fp_tuple_mapthread_o:nww #1 - \s__fp_tuple \__fp_tuple_chk:w #2 ; - \s__fp_tuple \__fp_tuple_chk:w #3 ; + \s__fp_tuple \__fp_tuple_chk:w #2 \__fp_sep: + \s__fp_tuple \__fp_tuple_chk:w #3 \__fp_sep: { \exp_after:wN \s__fp_tuple \exp_after:wN \__fp_tuple_chk:w \exp_after:wN { \exp:w \exp_end_continue_f:w \__fp_tuple_mapthread_loop_o:nw {#1} - #2 { \s__fp \prg_break: } ; @ - #3 { \s__fp \prg_break: } ; + #2 { \s__fp \prg_break: } \__fp_sep: @ + #3 { \s__fp \prg_break: } \__fp_sep: \prg_break_point: - \exp_after:wN } \exp_after:wN ; + \exp_after:wN } \exp_after:wN \__fp_sep: } -\cs_new:Npn \__fp_tuple_mapthread_loop_o:nw #1#2#3 ; #4 @ #5#6 ; +\cs_new:Npn \__fp_tuple_mapthread_loop_o:nw #1#2#3 \__fp_sep: #4 @ #5#6 \__fp_sep: { \use_none:n #2 \use_none:n #5 - #1 #2 #3 ; #5 #6 ; + #1 #2 #3 \__fp_sep: #5 #6 \__fp_sep: \exp:w \exp_end_continue_f:w \__fp_tuple_mapthread_loop_o:nw {#1} #4 @ } @@ -17614,9 +17640,9 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_show_validate:nn { #1 } { - \s__fp \__fp_chk:w ??? ;~ or \iow_newline: - \s__fp_tuple \__fp_tuple_chk:w ? ;~ or \iow_newline: - \s__fp_symbolic \__fp_symbolic_chk:w ? , ? ; + \s__fp \__fp_chk:w ??? \__fp_sep: or \iow_newline: + \s__fp_tuple \__fp_tuple_chk:w ? \__fp_sep: or \iow_newline: + \s__fp_symbolic \__fp_symbolic_chk:w ? , ? \__fp_sep: } } \cs_new:Npn \__fp_show_validate_aux:n #1 @@ -17632,46 +17658,49 @@ Type H <return> for immediate help}\def~{\errmessage{% { \s__fp } { \__fp_show_validate:w #1 \s__fp - \__fp_chk:w ??? ; \s__fp_stop + \__fp_chk:w ??? \__fp_sep: \s__fp_stop } { \s__fp_tuple } { \__fp_tuple_show_validate:w #1 - \s__fp_tuple \__fp_tuple_chk:w ?? ; \s__fp_stop + \s__fp_tuple \__fp_tuple_chk:w ?? \__fp_sep: \s__fp_stop } { \s__fp_symbolic } { \__fp_symbolic_show_validate:w #1 - \s__fp_symbolic \__fp_symbolic_chk:w ? , ?? ; \s__fp_stop + \s__fp_symbolic \__fp_symbolic_chk:w ? , ?? \__fp_sep: \s__fp_stop } } { #2 } } } \cs_new:Npn \__fp_show_validate:w - #1 \s__fp \__fp_chk:w #2#3#4#5 ; #6 \s__fp_stop + #1 \s__fp \__fp_chk:w #2#3#4#5 \__fp_sep: #6 \s__fp_stop { \str_if_eq:nnF { #2 } {?} { \token_if_eq_meaning:NNTF #2 1 - { \s__fp \__fp_chk:w #2 #3 { #4 } #5 ; } - { \s__fp \__fp_chk:w #2 #3 #4 #5 ; } + { \s__fp \__fp_chk:w #2 #3 { #4 } #5 \__fp_sep: } + { \s__fp \__fp_chk:w #2 #3 #4 #5 \__fp_sep: } \__fp_show_validate_aux:n { #6 } } } \cs_new:Npn \__fp_tuple_show_validate:w - #1 \s__fp_tuple \__fp_tuple_chk:w #2#3 ; #4 \s__fp_stop + #1 \s__fp_tuple \__fp_tuple_chk:w #2#3 \__fp_sep: #4 \s__fp_stop { \str_if_eq:nnF { #2 } {?} - { \s__fp_tuple \__fp_tuple_chk:w { \__fp_show_validate_aux:n { #2 } } ; } + { + \s__fp_tuple \__fp_tuple_chk:w { \__fp_show_validate_aux:n { #2 } } + \__fp_sep: + } } \cs_new:Npn \__fp_symbolic_show_validate:w - #1 \s__fp_symbolic \__fp_symbolic_chk:w #2 , #3#4 ; #5 \s__fp_stop + #1 \s__fp_symbolic \__fp_symbolic_chk:w #2 , #3#4 \__fp_sep: #5 \s__fp_stop { \str_if_eq:nnF { #2 } {?} { \s__fp_symbolic \__fp_symbolic_chk:w \exp_not:n { #2 } , - { \__fp_show_validate_aux:n { #3 } }; + { \__fp_show_validate_aux:n { #3 } }\__fp_sep: \__fp_show_validate_aux:n { #5 } } } @@ -17707,7 +17736,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_compare_return:w \exp:w \exp_end_continue_f:w \__fp_parse:n {#1} } -\cs_new:Npn \__fp_compare_return:w #1#2#3; +\cs_new:Npn \__fp_compare_return:w #1#2#3\__fp_sep: { \if_charcode:w 0 \__fp_if_type_fp:NTwFw @@ -17729,12 +17758,12 @@ Type H <return> for immediate help}\def~{\errmessage{% \prg_return_false: \fi: } -\cs_new:Npn \__fp_compare_aux:wn #1; #2 +\cs_new:Npn \__fp_compare_aux:wn #1\__fp_sep: #2 { \exp_after:wN \__fp_compare_back_any:ww - \exp:w \exp_end_continue_f:w \__fp_parse:n {#2} #1; + \exp:w \exp_end_continue_f:w \__fp_parse:n {#2} #1\__fp_sep: } -\cs_new:Npn \__fp_compare_back:ww #1#2; #3#4; +\cs_new:Npn \__fp_compare_back:ww #1#2\__fp_sep: #3#4\__fp_sep: { \cs:w __fp @@ -17743,9 +17772,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_type_from_scan:N #3 :ww \cs_end: - #1#2; #3#4; + #1#2\__fp_sep: #3#4\__fp_sep: } -\cs_new:Npn \__fp_compare_back_any:ww #1#2; #3 +\cs_new:Npn \__fp_compare_back_any:ww #1#2\__fp_sep: #3 { \__fp_if_type_fp:NTwFw #1 { \__fp_if_type_fp:NTwFw #3 \use_i:nn \s__fp \use_ii:nn \s__fp_stop } @@ -17760,11 +17789,11 @@ Type H <return> for immediate help}\def~{\errmessage{% :ww \cs_end: } - #1#2 ; #3 + #1#2 \__fp_sep: #3 } \cs_new:Npn \__fp_bcmp:ww - \s__fp \__fp_chk:w #1 #2 #3; - \s__fp \__fp_chk:w #4 #5 #6; + \s__fp \__fp_chk:w #1 #2 #3\__fp_sep: + \s__fp \__fp_chk:w #4 #5 #6\__fp_sep: { \int_value:w \if_meaning:w 3 #1 \exp_after:wN \__fp_compare_nan:w \fi: @@ -17773,7 +17802,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \if_meaning:w #2 #5 \if_meaning:w #1 #4 \if_meaning:w 1 #1 - \__fp_compare_npos:nwnw #6; #3; + \__fp_compare_npos:nwnw #6\__fp_sep: #3\__fp_sep: \else: 0 \fi: @@ -17790,36 +17819,36 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_stop_f: } \cs_new:Npn \__fp_compare_nan:w #1 \fi: \exp_stop_f: { 2 \exp_stop_f: } -\cs_new:Npn \__fp_compare_back_tuple:ww #1; #2; { 2 } -\cs_new:Npn \__fp_tuple_compare_back:ww #1; #2; { 2 } +\cs_new:Npn \__fp_compare_back_tuple:ww #1\__fp_sep: #2\__fp_sep: { 2 } +\cs_new:Npn \__fp_tuple_compare_back:ww #1\__fp_sep: #2\__fp_sep: { 2 } \cs_new:Npn \__fp_tuple_compare_back_tuple:ww - \s__fp_tuple \__fp_tuple_chk:w #1; - \s__fp_tuple \__fp_tuple_chk:w #2; + \s__fp_tuple \__fp_tuple_chk:w #1\__fp_sep: + \s__fp_tuple \__fp_tuple_chk:w #2\__fp_sep: { \int_compare:nNnTF { \__fp_array_count:n {#1} } = { \__fp_array_count:n {#2} } { \int_value:w 0 \__fp_tuple_compare_back_loop:w - #1 { \s__fp \prg_break: } ; @ - #2 { \s__fp \prg_break: } ; + #1 { \s__fp \prg_break: } \__fp_sep: @ + #2 { \s__fp \prg_break: } \__fp_sep: \prg_break_point: \exp_stop_f: } { 2 } } -\cs_new:Npn \__fp_tuple_compare_back_loop:w #1#2 ; #3 @ #4#5 ; +\cs_new:Npn \__fp_tuple_compare_back_loop:w #1#2 \__fp_sep: #3 @ #4#5 \__fp_sep: { \use_none:n #1 \use_none:n #4 \if_int_compare:w - \__fp_compare_back_any:ww #1 #2 ; #4 #5 ; = \c_zero_int + \__fp_compare_back_any:ww #1 #2 \__fp_sep: #4 #5 \__fp_sep: = \c_zero_int \else: 2 \exp_after:wN \prg_break: \fi: \__fp_tuple_compare_back_loop:w #3 @ } -\cs_new:Npn \__fp_compare_npos:nwnw #1#2; #3#4; +\cs_new:Npn \__fp_compare_npos:nwnw #1#2\__fp_sep: #3#4\__fp_sep: { \if_int_compare:w #1 = #3 \exp_stop_f: \__fp_compare_significand:nnnnnnnn #2 #4 @@ -17903,20 +17932,22 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp:w \exp_end_continue_f:w \__fp_parse:n {#3} } \cs_generate_variant:Nn \fp_step_function:nnnN { nnnc } -\cs_new:Npn \__fp_step:wwwN #1#2; #3#4; #5#6; #7 +\cs_new:Npn \__fp_step:wwwN #1#2\__fp_sep: #3#4\__fp_sep: #5#6\__fp_sep: #7 { \__fp_if_type_fp:NTwFw #1 { } \s__fp \prg_break: \s__fp_stop \__fp_if_type_fp:NTwFw #3 { } \s__fp \prg_break: \s__fp_stop \__fp_if_type_fp:NTwFw #5 { } \s__fp \prg_break: \s__fp_stop - \use_i:nnnn { \__fp_step_fp:wwwN #1#2; #3#4; #5#6; #7 } + \use_i:nnnn + { \__fp_step_fp:wwwN #1#2\__fp_sep: #3#4\__fp_sep: #5#6\__fp_sep: #7 } \prg_break_point: \use:n { - \__fp_error:nfff { step-tuple } { \fp_to_tl:n { #1#2 ; } } - { \fp_to_tl:n { #3#4 ; } } { \fp_to_tl:n { #5#6 ; } } + \__fp_error:nfff { step-tuple } { \fp_to_tl:n { #1#2 \__fp_sep: } } + { \fp_to_tl:n { #3#4 \__fp_sep: } } { \fp_to_tl:n { #5#6 \__fp_sep: } } } } -\cs_new:Npn \__fp_step_fp:wwwN #1 ; \s__fp \__fp_chk:w #2#3#4 ; #5; #6 +\cs_new:Npn \__fp_step_fp:wwwN + #1 \__fp_sep: \s__fp \__fp_chk:w #2#3#4 \__fp_sep: #5\__fp_sep: #6 { \token_if_eq_meaning:NNTF #2 1 { @@ -17932,11 +17963,15 @@ Type H <return> for immediate help}\def~{\errmessage{% } { \__fp_error:nnfn { bad-step } { } - { \fp_to_tl:n { \s__fp \__fp_chk:w #2#3#4 ; } } {#6} + { \fp_to_tl:n { \s__fp \__fp_chk:w #2#3#4 \__fp_sep: } } {#6} } \use_none:nnnnn } - { #1 ; } { \c_nan_fp } { \s__fp \__fp_chk:w #2#3#4 ; } { #5 ; } #6 + { #1 \__fp_sep: } + { \c_nan_fp } + { \s__fp \__fp_chk:w #2#3#4 \__fp_sep: } + { #5 \__fp_sep: } + #6 } \cs_new:Npn \__fp_step:NnnnnN #1#2#3#4#5#6 { @@ -18000,11 +18035,11 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_minmax_loop:Nww \exp_after:wN - \fi: #2 - \s__fp \__fp_chk:w 2 #1 \s__fp_exact ; - \s__fp \__fp_chk:w { 3 \__fp_minmax_break_o:w } ; + \s__fp \__fp_chk:w 2 #1 \s__fp_exact \__fp_sep: + \s__fp \__fp_chk:w { 3 \__fp_minmax_break_o:w } \__fp_sep: } \cs_new:Npn \__fp_minmax_loop:Nww - #1 \s__fp \__fp_chk:w #2#3; \s__fp \__fp_chk:w #4#5; + #1 \s__fp \__fp_chk:w #2#3\__fp_sep: \s__fp \__fp_chk:w #4#5\__fp_sep: { \if_meaning:w 3 #4 \if_meaning:w 3 #2 @@ -18015,8 +18050,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \if_int_compare:w \__fp_compare_back:ww - \s__fp \__fp_chk:w #4#5; - \s__fp \__fp_chk:w #2#3; + \s__fp \__fp_chk:w #4#5\__fp_sep: + \s__fp \__fp_chk:w #2#3\__fp_sep: = #1 1 \exp_stop_f: \__fp_minmax_auxii:ww \else: @@ -18024,16 +18059,17 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \fi: \__fp_minmax_loop:Nww #1 - \s__fp \__fp_chk:w #2#3; - \s__fp \__fp_chk:w #4#5; + \s__fp \__fp_chk:w #2#3\__fp_sep: + \s__fp \__fp_chk:w #4#5\__fp_sep: } -\cs_new:Npn \__fp_minmax_auxi:ww #1 \fi: \fi: #2 \s__fp #3 ; \s__fp #4; - { \fi: \fi: #2 \s__fp #3 ; } -\cs_new:Npn \__fp_minmax_auxii:ww #1 \fi: \fi: #2 \s__fp #3 ; +\cs_new:Npn \__fp_minmax_auxi:ww + #1 \fi: \fi: #2 \s__fp #3 \__fp_sep: \s__fp #4\__fp_sep: + { \fi: \fi: #2 \s__fp #3 \__fp_sep: } +\cs_new:Npn \__fp_minmax_auxii:ww #1 \fi: \fi: #2 \s__fp #3 \__fp_sep: { \fi: \fi: #2 } -\cs_new:Npn \__fp_minmax_break_o:w #1 \fi: \fi: #2 \s__fp #3; #4; - { \fi: \__fp_exp_after_o:w \s__fp #3; } -\cs_new:Npn \__fp_not_o:w #1 \s__fp \__fp_chk:w #2#3; @ +\cs_new:Npn \__fp_minmax_break_o:w #1 \fi: \fi: #2 \s__fp #3\__fp_sep: #4\__fp_sep: + { \fi: \__fp_exp_after_o:w \s__fp #3\__fp_sep: } +\cs_new:Npn \__fp_not_o:w #1 \s__fp \__fp_chk:w #2#3\__fp_sep: @ { \if_meaning:w 0 #2 \exp_after:wN \exp_after:wN \exp_after:wN \c_one_fp @@ -18045,30 +18081,31 @@ Type H <return> for immediate help}\def~{\errmessage{% \group_begin: \char_set_catcode_letter:N & \char_set_catcode_letter:N | - \cs_new:Npn \__fp_&_o:ww #1 \s__fp \__fp_chk:w #2#3; + \cs_new:Npn \__fp_&_o:ww #1 \s__fp \__fp_chk:w #2#3\__fp_sep: { \if_meaning:w 0 #2 #1 - \__fp_and_return:wNw \s__fp \__fp_chk:w #2#3; + \__fp_and_return:wNw \s__fp \__fp_chk:w #2#3\__fp_sep: \fi: \__fp_exp_after_o:w } - \cs_new:Npn \__fp_&_tuple_o:ww #1 \s__fp \__fp_chk:w #2#3; + \cs_new:Npn \__fp_&_tuple_o:ww #1 \s__fp \__fp_chk:w #2#3\__fp_sep: { \if_meaning:w 0 #2 #1 - \__fp_and_return:wNw \s__fp \__fp_chk:w #2#3; + \__fp_and_return:wNw \s__fp \__fp_chk:w #2#3\__fp_sep: \fi: \__fp_exp_after_tuple_o:w } - \cs_new:Npn \__fp_tuple_&_o:ww #1; { \__fp_exp_after_o:w } - \cs_new:Npn \__fp_tuple_&_tuple_o:ww #1; { \__fp_exp_after_tuple_o:w } + \cs_new:Npn \__fp_tuple_&_o:ww #1\__fp_sep: { \__fp_exp_after_o:w } + \cs_new:Npn \__fp_tuple_&_tuple_o:ww #1\__fp_sep: { \__fp_exp_after_tuple_o:w } \cs_new:Npn \__fp_|_o:ww { \__fp_&_o:ww \else: } \cs_new:Npn \__fp_|_tuple_o:ww { \__fp_&_tuple_o:ww \else: } - \cs_new:Npn \__fp_tuple_|_o:ww #1; #2; { \__fp_exp_after_tuple_o:w #1; } - \cs_new:Npn \__fp_tuple_|_tuple_o:ww #1; #2; - { \__fp_exp_after_tuple_o:w #1; } + \cs_new:Npn \__fp_tuple_|_o:ww #1\__fp_sep: #2\__fp_sep: + { \__fp_exp_after_tuple_o:w #1\__fp_sep: } + \cs_new:Npn \__fp_tuple_|_tuple_o:ww #1\__fp_sep: #2\__fp_sep: + { \__fp_exp_after_tuple_o:w #1\__fp_sep: } \group_end: -\cs_new:Npn \__fp_and_return:wNw #1; \fi: #2; - { \fi: \__fp_exp_after_o:w #1; } +\cs_new:Npn \__fp_and_return:wNw #1\__fp_sep: \fi: #2\__fp_sep: + { \fi: \__fp_exp_after_o:w #1\__fp_sep: } \cs_new:Npn \__fp_ternary:NwwN #1 #2#3@ #4@ #5 { \if_meaning:w \__fp_parse_infix_::N #5 @@ -18129,7 +18166,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_not:n { \s__fp \__fp_neg_sign:N } } \cs_new:cpn { __fp_+_o:ww } - \s__fp #1 \__fp_chk:w #2 #3 ; \s__fp \__fp_chk:w #4 #5 + \s__fp #1 \__fp_chk:w #2 #3 \__fp_sep: \s__fp \__fp_chk:w #4 #5 { \if_case:w \if_meaning:w #2 #4 @@ -18149,10 +18186,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \exp_after:wN \__fp_add_return_ii_o:Nww \int_value:w \fi: #1 #5 - \s__fp \__fp_chk:w #2 #3 ; + \s__fp \__fp_chk:w #2 #3 \__fp_sep: \s__fp \__fp_chk:w #4 #5 } -\cs_new:Npn \__fp_add_return_ii_o:Nww #1 #2 ; \s__fp \__fp_chk:w #3 #4 +\cs_new:Npn \__fp_add_return_ii_o:Nww #1 #2 \__fp_sep: \s__fp \__fp_chk:w #3 #4 { \__fp_exp_after_o:w \s__fp \__fp_chk:w #3 #1 } \cs_new:Npn \__fp_add_zeros_o:Nww #1 \s__fp \__fp_chk:w 0 #2 { @@ -18165,7 +18202,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \s__fp \__fp_chk:w 0 #2 } \cs_new:Npn \__fp_add_inf_o:Nww - #1 \s__fp \__fp_chk:w 2 #2 #3; \s__fp \__fp_chk:w 2 #4 + #1 \s__fp \__fp_chk:w 2 #2 #3\__fp_sep: \s__fp \__fp_chk:w 2 #4 { \if_meaning:w #1 #2 \__fp_case_return_i_o:ww @@ -18176,7 +18213,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \token_if_eq_meaning:NNTF #1 #4 + - } } \fi: - \s__fp \__fp_chk:w 2 #2 #3; + \s__fp \__fp_chk:w 2 #2 #3\__fp_sep: \s__fp \__fp_chk:w 2 #4 } \cs_new:Npn \__fp_add_normal_o:Nww #1 \s__fp \__fp_chk:w 1 #2 @@ -18188,7 +18225,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: #2 } -\cs_new:Npn \__fp_add_npos_o:NnwNnw #1#2#3 ; \s__fp \__fp_chk:w 1 #4 #5 +\cs_new:Npn \__fp_add_npos_o:NnwNnw #1#2#3 \__fp_sep: \s__fp \__fp_chk:w 1 #4 #5 { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 @@ -18200,9 +18237,9 @@ Type H <return> for immediate help}\def~{\errmessage{% #5 \exp_after:wN \__fp_add_big_ii_o:wNww \int_value:w \fi: - \__fp_int_eval:w #5 - #2 ; #1 #3; + \__fp_int_eval:w #5 - #2 \__fp_sep: #1 #3\__fp_sep: } -\cs_new:Npn \__fp_add_big_i_o:wNww #1; #2 #3; #4; +\cs_new:Npn \__fp_add_big_i_o:wNww #1\__fp_sep: #2 #3\__fp_sep: #4\__fp_sep: { \__fp_decimate:nNnnnn {#1} \__fp_add_significand_o:NnnwnnnnN @@ -18210,7 +18247,7 @@ Type H <return> for immediate help}\def~{\errmessage{% #3 #2 } -\cs_new:Npn \__fp_add_big_ii_o:wNww #1; #2 #3; #4; +\cs_new:Npn \__fp_add_big_ii_o:wNww #1\__fp_sep: #2 #3\__fp_sep: #4\__fp_sep: { \__fp_decimate:nNnnnn {#1} \__fp_add_significand_o:NnnwnnnnN @@ -18218,19 +18255,19 @@ Type H <return> for immediate help}\def~{\errmessage{% #4 #2 } -\cs_new:Npn \__fp_add_significand_o:NnnwnnnnN #1 #2#3 #4; #5#6#7#8 +\cs_new:Npn \__fp_add_significand_o:NnnwnnnnN #1 #2#3 #4\__fp_sep: #5#6#7#8 { \exp_after:wN \__fp_add_significand_test_o:N \int_value:w \__fp_int_eval:w 1#5#6 + #2 \exp_after:wN \__fp_add_significand_pack:NNNNNNN - \int_value:w \__fp_int_eval:w 1#7#8 + #3 ; #1 + \int_value:w \__fp_int_eval:w 1#7#8 + #3 \__fp_sep: #1 } \cs_new:Npn \__fp_add_significand_pack:NNNNNNN #1 #2#3#4#5#6#7 { \if_meaning:w 2 #1 + 1 \fi: - ; #2 #3 #4 #5 #6 #7 ; + \__fp_sep: #2 #3 #4 #5 #6 #7 \__fp_sep: } \cs_new:Npn \__fp_add_significand_test_o:N #1 { @@ -18241,17 +18278,17 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: } \cs_new:Npn \__fp_add_significand_no_carry_o:wwwNN - #1; #2; #3#4 ; #5#6 + #1\__fp_sep: #2\__fp_sep: #3#4 \__fp_sep: #5#6 { \exp_after:wN \__fp_basics_pack_high:NNNNNw \int_value:w \__fp_int_eval:w 1 #1 \exp_after:wN \__fp_basics_pack_low:NNNNNw \int_value:w \__fp_int_eval:w 1 #2 #3#4 + \__fp_round:NNN #6 #4 #5 - \exp_after:wN ; + \exp_after:wN \__fp_sep: } \cs_new:Npn \__fp_add_significand_carry_o:wwwNN - #1; #2; #3#4; #5#6 + #1\__fp_sep: #2\__fp_sep: #3#4\__fp_sep: #5#6 { + 1 \exp_after:wN \__fp_basics_pack_weird_high:NNNNNNNNw @@ -18261,28 +18298,31 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_round:NNN \exp_after:wN #6 \exp_after:wN #3 - \int_value:w \__fp_round_digit:Nw #4 #5 ; - \exp_after:wN ; + \int_value:w \__fp_round_digit:Nw #4 #5 \__fp_sep: + \exp_after:wN \__fp_sep: } -\cs_new:Npn \__fp_sub_npos_o:NnwNnw #1#2#3; \s__fp \__fp_chk:w 1 #4#5#6; +\cs_new:Npn \__fp_sub_npos_o:NnwNnw + #1#2#3\__fp_sep: \s__fp \__fp_chk:w 1 #4#5#6\__fp_sep: { - \if_case:w \__fp_compare_npos:nwnw {#2} #3; {#5} #6; \exp_stop_f: + \if_case:w + \__fp_compare_npos:nwnw {#2} #3\__fp_sep: {#5} #6\__fp_sep: \exp_stop_f: \exp_after:wN \__fp_sub_eq_o:Nnwnw \or: \exp_after:wN \__fp_sub_npos_i_o:Nnwnw \else: \exp_after:wN \__fp_sub_npos_ii_o:Nnwnw \fi: - #1 {#2} #3; {#5} #6; + #1 {#2} #3\__fp_sep: {#5} #6\__fp_sep: } -\cs_new:Npn \__fp_sub_eq_o:Nnwnw #1#2; #3; { \exp_after:wN \c_zero_fp } -\cs_new:Npn \__fp_sub_npos_ii_o:Nnwnw #1 #2; #3; +\cs_new:Npn \__fp_sub_eq_o:Nnwnw #1#2\__fp_sep: #3\__fp_sep: + { \exp_after:wN \c_zero_fp } +\cs_new:Npn \__fp_sub_npos_ii_o:Nnwnw #1 #2\__fp_sep: #3\__fp_sep: { \exp_after:wN \__fp_sub_npos_i_o:Nnwnw \int_value:w \__fp_neg_sign:N #1 - #3; #2; + #3\__fp_sep: #2\__fp_sep: } -\cs_new:Npn \__fp_sub_npos_i_o:Nnwnw #1 #2#3; #4#5; +\cs_new:Npn \__fp_sub_npos_i_o:Nnwnw #1 #2#3\__fp_sep: #4#5\__fp_sep: { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 @@ -18304,42 +18344,43 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_sub_back_near_after:wNNNNw \int_value:w \__fp_int_eval:w 10#5#6 - #1#2 - 11 \exp_after:wN \__fp_sub_back_near_pack:NNNNNNw - \int_value:w \__fp_int_eval:w 11#7#8 - #3#4 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 11#7#8 - #3#4 \exp_after:wN \__fp_sep: } -\cs_new:Npn \__fp_sub_back_near_pack:NNNNNNw #1#2#3#4#5#6#7 ; - { + #1#2 ; {#3#4#5#6} {#7} ; } -\cs_new:Npn \__fp_sub_back_near_after:wNNNNw 10 #1#2#3#4 #5 ; +\cs_new:Npn \__fp_sub_back_near_pack:NNNNNNw #1#2#3#4#5#6#7 \__fp_sep: + { + #1#2 \__fp_sep: {#3#4#5#6} {#7} \__fp_sep: } +\cs_new:Npn \__fp_sub_back_near_after:wNNNNw 10 #1#2#3#4 #5 \__fp_sep: { \if_meaning:w 0 #1 \exp_after:wN \__fp_sub_back_shift:wnnnn \fi: - ; {#1#2#3#4} {#5} + \__fp_sep: {#1#2#3#4} {#5} } -\cs_new:Npn \__fp_sub_back_shift:wnnnn ; #1#2 +\cs_new:Npn \__fp_sub_back_shift:wnnnn \__fp_sep: #1#2 { \exp_after:wN \__fp_sub_back_shift_ii:ww - \int_value:w #1 #2 0 ; + \int_value:w #1 #2 0 \__fp_sep: } -\cs_new:Npn \__fp_sub_back_shift_ii:ww #1 0 ; #2#3 ; +\cs_new:Npn \__fp_sub_back_shift_ii:ww #1 0 \__fp_sep: #2#3 \__fp_sep: { \if_meaning:w @ #1 @ - 7 - \exp_after:wN \use_i:nnn \exp_after:wN \__fp_sub_back_shift_iii:NNNNNNNNw - \int_value:w #2#3 0 ~ 123456789; + \int_value:w #2#3 0 ~ 123456789\__fp_sep: \else: - - \__fp_sub_back_shift_iii:NNNNNNNNw #1 123456789; + - \__fp_sub_back_shift_iii:NNNNNNNNw #1 123456789\__fp_sep: \fi: \exp_after:wN \__fp_pack_twice_four:wNNNNNNNN \exp_after:wN \__fp_pack_twice_four:wNNNNNNNN \exp_after:wN \__fp_sub_back_shift_iv:nnnnw - \exp_after:wN ; + \exp_after:wN \__fp_sep: \int_value:w - #1 ~ #2#3 0 ~ 0000 0000 0000 000 ; + #1 ~ #2#3 0 ~ 0000 0000 0000 000 \__fp_sep: } -\cs_new:Npn \__fp_sub_back_shift_iii:NNNNNNNNw #1#2#3#4#5#6#7#8#9; {#8} -\cs_new:Npn \__fp_sub_back_shift_iv:nnnnw #1 ; #2 ; { ; #1 ; } -\cs_new:Npn \__fp_sub_back_far_o:NnnwnnnnN #1 #2#3 #4; #5#6#7#8 +\cs_new:Npn \__fp_sub_back_shift_iii:NNNNNNNNw #1#2#3#4#5#6#7#8#9\__fp_sep: {#8} +\cs_new:Npn \__fp_sub_back_shift_iv:nnnnw #1 \__fp_sep: #2 \__fp_sep: + { \__fp_sep: #1 \__fp_sep: } +\cs_new:Npn \__fp_sub_back_far_o:NnnwnnnnN #1 #2#3 #4\__fp_sep: #5#6#7#8 { \if_case:w \if_int_compare:w 1 #2 = #5#6 \use_i:nnnn #7 \exp_stop_f: @@ -18356,9 +18397,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \exp_after:wN \__fp_sub_back_very_far_o:wwwwNN \else: \exp_after:wN \__fp_sub_back_not_far_o:wwwwNN \fi: - #2 ~ #3 ; #5 #6 ~ #7 #8 ; #1 + #2 ~ #3 \__fp_sep: #5 #6 ~ #7 #8 \__fp_sep: #1 } -\cs_new:Npn \__fp_sub_back_quite_far_o:wwNN #1; #2; #3#4 +\cs_new:Npn \__fp_sub_back_quite_far_o:wwNN #1\__fp_sep: #2\__fp_sep: #3#4 { \exp_after:wN \__fp_sub_back_quite_far_ii:NN \exp_after:wN #3 @@ -18371,10 +18412,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \exp_after:wN \use_ii:nn \fi: - { ; {1000} {0000} {0000} {0000} ; } - { - 1 ; {9999} {9999} {9999} {9999} ; } + { \__fp_sep: {1000} {0000} {0000} {0000} \__fp_sep: } + { - 1 \__fp_sep: {9999} {9999} {9999} {9999} \__fp_sep: } } -\cs_new:Npn \__fp_sub_back_not_far_o:wwwwNN #1 ~ #2; #3 ~ #4; #5#6 +\cs_new:Npn \__fp_sub_back_not_far_o:wwwwNN #1 ~ #2\__fp_sep: #3 ~ #4\__fp_sep: #5#6 { - 1 \exp_after:wN \__fp_sub_back_near_after:wNNNNw @@ -18384,16 +18425,17 @@ Type H <return> for immediate help}\def~{\errmessage{% - \exp_after:wN \__fp_round_neg:NNN \exp_after:wN #6 \use_none:nnnnnnn #2 #5 - \exp_after:wN ; + \exp_after:wN \__fp_sep: } \cs_new:Npn \__fp_sub_back_very_far_o:wwwwNN #1#2#3#4#5#6#7 { \__fp_pack_eight:wNNNNNNNN \__fp_sub_back_very_far_ii_o:nnNwwNN { 0 #1#2#3 #4#5#6#7 } - ; + \__fp_sep: } -\cs_new:Npn \__fp_sub_back_very_far_ii_o:nnNwwNN #1#2 ; #3 ; #4 ~ #5; #6#7 +\cs_new:Npn \__fp_sub_back_very_far_ii_o:nnNwwNN + #1#2 \__fp_sep: #3 \__fp_sep: #4 ~ #5\__fp_sep: #6#7 { \exp_after:wN \__fp_basics_pack_high:NNNNNw \int_value:w \__fp_int_eval:w 1#4 - #1 - 1 @@ -18404,8 +18446,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \if_int_odd:w \__fp_int_eval:w #5 - #2 \__fp_int_eval_end: 1 \else: 2 \fi: - \int_value:w \__fp_round_digit:Nw #3 #6 ; - \exp_after:wN ; + \int_value:w \__fp_round_digit:Nw #3 #6 \__fp_sep: + \exp_after:wN \__fp_sep: } \cs_new:cpn { __fp_*_o:ww } { @@ -18416,7 +18458,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { } } \cs_new:Npn \__fp_mul_cases_o:NnNnww - #1#2#3#4 \s__fp \__fp_chk:w #5#6#7; \s__fp \__fp_chk:w #8#9 + #1#2#3#4 \s__fp \__fp_chk:w #5#6#7\__fp_sep: \s__fp \__fp_chk:w #8#9 { \if_case:w \__fp_int_eval:w \if_int_compare:w #5 #8 = 11 ~ @@ -18450,11 +18492,12 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \__fp_case_return_o:Nww \c_minus_inf_fp #4 \fi: - \s__fp \__fp_chk:w #5 #6 #7; + \s__fp \__fp_chk:w #5 #6 #7\__fp_sep: \s__fp \__fp_chk:w #8 #9 } \cs_new:Npn \__fp_mul_npos_o:Nww - #1 \s__fp \__fp_chk:w #2 #3 #4 #5 ; \s__fp \__fp_chk:w #6 #7 #8 #9 ; + #1 \s__fp \__fp_chk:w #2 #3 #4 #5 \__fp_sep: + \s__fp \__fp_chk:w #6 #7 #8 #9 \__fp_sep: { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 @@ -18480,13 +18523,13 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_mul_significand_drop:NNNNNw \int_value:w \__fp_int_eval:w 99990000 + #3*#9 + #4*#8 + \exp_after:wN \__fp_mul_significand_drop:NNNNNw - \int_value:w \__fp_int_eval:w 100000000 + #4*#9 ; - ; \exp_after:wN ; + \int_value:w \__fp_int_eval:w 100000000 + #4*#9 \__fp_sep: + \__fp_sep: \exp_after:wN \__fp_sep: } -\cs_new:Npn \__fp_mul_significand_drop:NNNNNw #1#2#3#4#5 #6; - { #1#2#3#4#5 ; + #6 } -\cs_new:Npn \__fp_mul_significand_keep:NNNNNw #1#2#3#4#5 #6; - { #1#2#3#4#5 ; #6 ; } +\cs_new:Npn \__fp_mul_significand_drop:NNNNNw #1#2#3#4#5 #6\__fp_sep: + { #1#2#3#4#5 \__fp_sep: + #6 } +\cs_new:Npn \__fp_mul_significand_keep:NNNNNw #1#2#3#4#5 #6\__fp_sep: + { #1#2#3#4#5 \__fp_sep: #6 \__fp_sep: } \cs_new:Npn \__fp_mul_significand_test_f:NNN #1 #2 #3 { \if_meaning:w 0 #3 @@ -18496,7 +18539,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: #1 #3 } -\cs_new:Npn \__fp_mul_significand_large_f:NwwNNNN #1 #2; #3; #4#5#6#7; + +\cs_new:Npn \__fp_mul_significand_large_f:NwwNNNN + #1 #2\__fp_sep: #3\__fp_sep: #4#5#6#7\__fp_sep: + { \exp_after:wN \__fp_basics_pack_high:NNNNNw \int_value:w \__fp_int_eval:w 1#2 @@ -18507,7 +18551,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN #7 \int_value:w \__fp_round_digit:Nw } -\cs_new:Npn \__fp_mul_significand_small_f:NNwwwN #1 #2#3; #4#5; #6; + #7 +\cs_new:Npn \__fp_mul_significand_small_f:NNwwwN + #1 #2#3\__fp_sep: #4#5\__fp_sep: #6\__fp_sep: + #7 { - 1 \exp_after:wN \__fp_basics_pack_high:NNNNNw @@ -18535,25 +18580,26 @@ Type H <return> for immediate help}\def~{\errmessage{% } } \cs_new:Npn \__fp_div_npos_o:Nww - #1 \s__fp \__fp_chk:w 1 #2 #3 #4 ; \s__fp \__fp_chk:w 1 #5 #6 #7#8#9; + #1 \s__fp \__fp_chk:w 1 #2 #3 #4 \__fp_sep: + \s__fp \__fp_chk:w 1 #5 #6 #7#8#9\__fp_sep: { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 \int_value:w \__fp_int_eval:w #3 - #6 \exp_after:wN \__fp_div_significand_i_o:wnnw - \int_value:w \__fp_int_eval:w #7 \use_i:nnnn #8 + 1 ; + \int_value:w \__fp_int_eval:w #7 \use_i:nnnn #8 + 1 \__fp_sep: #4 - {#7}{#8}#9 ; + {#7}{#8}#9 \__fp_sep: #1 } -\cs_new:Npn \__fp_div_significand_i_o:wnnw #1 ; #2#3 #4 ; +\cs_new:Npn \__fp_div_significand_i_o:wnnw #1 \__fp_sep: #2#3 #4 \__fp_sep: { \exp_after:wN \__fp_div_significand_test_o:w \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_div_significand_calc:wwnnnnnnn - \int_value:w \__fp_int_eval:w 999999 + #2 #3 0 / #1 ; - #2 #3 ; + \int_value:w \__fp_int_eval:w 999999 + #2 #3 0 / #1 \__fp_sep: + #2 #3 \__fp_sep: #4 { \exp_after:wN \__fp_div_significand_ii:wwn \int_value:w #1 } { \exp_after:wN \__fp_div_significand_ii:wwn \int_value:w #1 } @@ -18569,10 +18615,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: } \cs_new:Npn \__fp_div_significand_calc_i:wwnnnnnnn - #1; #2;#3#4 #5#6#7#8 #9 + #1\__fp_sep: #2\__fp_sep:#3#4 #5#6#7#8 #9 { 1 1 #1 - #9 \exp_after:wN ; + #9 \exp_after:wN \__fp_sep: \int_value:w \__fp_int_eval:w \c__fp_Bigg_leading_shift_int + #2 - #1 * #5 - #5#60 \exp_after:wN \__fp_pack_Bigg:NNNNNNw @@ -18583,14 +18629,14 @@ Type H <return> for immediate help}\def~{\errmessage{% + #4 - #1 * #7 - #80 \exp_after:wN \__fp_pack_Bigg:NNNNNNw \int_value:w \__fp_int_eval:w \c__fp_Bigg_trailing_shift_int - - #1 * #8 ; + - #1 * #8 \__fp_sep: {#5}{#6}{#7}{#8} } \cs_new:Npn \__fp_div_significand_calc_ii:wwnnnnnnn - #1; #2;#3#4 #5#6#7#8 #9 + #1\__fp_sep: #2\__fp_sep:#3#4 #5#6#7#8 #9 { 1 0 #1 - #9 \exp_after:wN ; + #9 \exp_after:wN \__fp_sep: \int_value:w \__fp_int_eval:w \c__fp_Bigg_leading_shift_int + #2 - #1 * #5 \exp_after:wN \__fp_pack_Bigg:NNNNNNw @@ -18601,25 +18647,27 @@ Type H <return> for immediate help}\def~{\errmessage{% + #4 - #1 * #7 \exp_after:wN \__fp_pack_Bigg:NNNNNNw \int_value:w \__fp_int_eval:w \c__fp_Bigg_trailing_shift_int - - #1 * #8 ; + - #1 * #8 \__fp_sep: {#5}{#6}{#7}{#8} } -\cs_new:Npn \__fp_div_significand_ii:wwn #1; #2;#3 +\cs_new:Npn \__fp_div_significand_ii:wwn #1\__fp_sep: #2\__fp_sep:#3 { \exp_after:wN \__fp_div_significand_pack:NNN \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_div_significand_calc:wwnnnnnnn - \int_value:w \__fp_int_eval:w 999999 + #2 #3 0 / #1 ; #2 #3 ; + \int_value:w \__fp_int_eval:w + 999999 + #2 #3 0 / #1 \__fp_sep: #2 #3 \__fp_sep: } -\cs_new:Npn \__fp_div_significand_iii:wwnnnnn #1; #2;#3#4#5 #6#7 +\cs_new:Npn \__fp_div_significand_iii:wwnnnnn #1\__fp_sep: #2\__fp_sep:#3#4#5 #6#7 { 0 \exp_after:wN \__fp_div_significand_iv:wwnnnnnnn - \int_value:w \__fp_int_eval:w ( 2 * #2 #3) / #6 #7 ; % <- P - #2 ; {#3} {#4} {#5} + \int_value:w \__fp_int_eval:w ( 2 * #2 #3) / #6 #7 \__fp_sep: % <- P + #2 \__fp_sep: {#3} {#4} {#5} {#6} {#7} } -\cs_new:Npn \__fp_div_significand_iv:wwnnnnnnn #1; #2;#3#4#5 #6#7#8#9 +\cs_new:Npn \__fp_div_significand_iv:wwnnnnnnn + #1\__fp_sep: #2\__fp_sep:#3#4#5 #6#7#8#9 { + 5 * #1 \exp_after:wN \__fp_div_significand_vi:Nw @@ -18627,19 +18675,19 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_div_significand_v:NN \int_value:w \__fp_int_eval:w 499950 + 2*#4 - #1*#8 + \exp_after:wN \__fp_div_significand_v:NN - \int_value:w \__fp_int_eval:w 500000 + 2*#5 - #1*#9 ; + \int_value:w \__fp_int_eval:w 500000 + 2*#5 - #1*#9 \__fp_sep: } \cs_new:Npn \__fp_div_significand_v:NN #1#2 { #1#2 \__fp_int_eval_end: + } -\cs_new:Npn \__fp_div_significand_vi:Nw #1#2; +\cs_new:Npn \__fp_div_significand_vi:Nw #1#2\__fp_sep: { \if_meaning:w 0 #1 \if_int_compare:w \__fp_int_eval:w #2 > 0 + 1 \fi: \else: \if_meaning:w - #1 - \else: + \fi: 1 \fi: - ; + \__fp_sep: } -\cs_new:Npn \__fp_div_significand_pack:NNN 1 #1 #2 { + #1 #2 ; } +\cs_new:Npn \__fp_div_significand_pack:NNN 1 #1 #2 { + #1 #2 \__fp_sep: } \cs_new:Npn \__fp_div_significand_test_o:w 10 #1 { \if_meaning:w 0 #1 @@ -18650,17 +18698,17 @@ Type H <return> for immediate help}\def~{\errmessage{% #1 } \cs_new:Npn \__fp_div_significand_small_o:wwwNNNNwN - 0 #1; #2; #3; #4#5#6#7#8; #9 + 0 #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: #4#5#6#7#8\__fp_sep: #9 { \exp_after:wN \__fp_basics_pack_high:NNNNNw \int_value:w \__fp_int_eval:w 1 #1#2 \exp_after:wN \__fp_basics_pack_low:NNNNNw \int_value:w \__fp_int_eval:w 1 #3#4#5#6#7 + \__fp_round:NNN #9 #7 #8 - \exp_after:wN ; + \exp_after:wN \__fp_sep: } \cs_new:Npn \__fp_div_significand_large_o:wwwNNNNwN - #1; #2; #3; #4#5#6#7#8; #9 + #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: #4#5#6#7#8\__fp_sep: #9 { + 1 \exp_after:wN \__fp_basics_pack_weird_high:NNNNNNNNw @@ -18670,10 +18718,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_round:NNN \exp_after:wN #9 \exp_after:wN #6 - \int_value:w \__fp_round_digit:Nw #7 #8 ; - \exp_after:wN ; + \int_value:w \__fp_round_digit:Nw #7 #8 \__fp_sep: + \exp_after:wN \__fp_sep: } -\cs_new:Npn \__fp_sqrt_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_sqrt_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_meaning:w 0 #2 \__fp_case_return_same_o:w \fi: \if_meaning:w 2 #3 @@ -18681,9 +18729,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \if_meaning:w 1 #2 \else: \__fp_case_return_same_o:w \fi: \__fp_sqrt_npos_o:w - \s__fp \__fp_chk:w #2 #3 #4; + \s__fp \__fp_chk:w #2 #3 #4\__fp_sep: } -\cs_new:Npn \__fp_sqrt_npos_o:w \s__fp \__fp_chk:w 1 0 #1#2#3#4#5; +\cs_new:Npn \__fp_sqrt_npos_o:w \s__fp \__fp_chk:w 1 0 #1#2#3#4#5\__fp_sep: { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN 0 @@ -18692,19 +18740,19 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_sqrt_npos_auxi_o:wwnnN \fi: #1 / 2 - \__fp_sqrt_Newton_o:wwn 56234133; 0; {#2#3} {#4#5} 0 + \__fp_sqrt_Newton_o:wwn 56234133\__fp_sep: 0\__fp_sep: {#2#3} {#4#5} 0 } -\cs_new:Npn \__fp_sqrt_npos_auxi_o:wwnnN #1 / 2 #2; 0; #3#4#5 +\cs_new:Npn \__fp_sqrt_npos_auxi_o:wwnnN #1 / 2 #2\__fp_sep: 0\__fp_sep: #3#4#5 { ( #1 + 1 ) / 2 \__fp_pack_eight:wNNNNNNNN \__fp_sqrt_npos_auxii_o:wNNNNNNNN - ; + \__fp_sep: 0 #3 #4 } -\cs_new:Npn \__fp_sqrt_npos_auxii_o:wNNNNNNNN #1; #2#3#4#5#6#7#8#9 - { \__fp_sqrt_Newton_o:wwn 17782794; 0; {#1} {#2#3#4#5#6#7#8#9} } -\cs_new:Npn \__fp_sqrt_Newton_o:wwn #1; #2; #3 +\cs_new:Npn \__fp_sqrt_npos_auxii_o:wNNNNNNNN #1\__fp_sep: #2#3#4#5#6#7#8#9 + { \__fp_sqrt_Newton_o:wwn 17782794\__fp_sep: 0\__fp_sep: {#1} {#2#3#4#5#6#7#8#9} } +\cs_new:Npn \__fp_sqrt_Newton_o:wwn #1\__fp_sep: #2\__fp_sep: #3 { \if_int_compare:w #1 = #2 \exp_stop_f: \exp_after:wN \__fp_sqrt_auxi_o:NNNNwnnN @@ -18712,10 +18760,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_use_none_until_s:w \fi: \exp_after:wN \__fp_sqrt_Newton_o:wwn - \int_value:w \__fp_int_eval:w (#1 + #3 * 1 0000 0000 / #1) / 2 ; - #1; {#3} + \int_value:w \__fp_int_eval:w (#1 + #3 * 1 0000 0000 / #1) / 2 \__fp_sep: + #1\__fp_sep: {#3} } -\cs_new:Npn \__fp_sqrt_auxi_o:NNNNwnnN 1 #1#2#3#4#5; +\cs_new:Npn \__fp_sqrt_auxi_o:NNNNwnnN 1 #1#2#3#4#5\__fp_sep: { \__fp_sqrt_auxii_o:NnnnnnnnN \__fp_sqrt_auxiii_o:wnnnnnnnn @@ -18751,13 +18799,13 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_pack_big:NNNNNNw \int_value:w \__fp_int_eval:w \c__fp_big_trailing_shift_int - - #6 * #6 ; + - #6 * #6 \__fp_sep: % ( - - 257 ) * 5000 0000 / (#2#3 + 1) + 10 0000 0000 ; + - 257 ) * 5000 0000 / (#2#3 + 1) + 10 0000 0000 \__fp_sep: {#2}{#3}{#4}{#5}{#6} {#7}{#8}#9 } \cs_new:Npn \__fp_sqrt_auxiii_o:wnnnnnnnn - #1; #2#3#4#5#6#7#8#9 + #1\__fp_sep: #2#3#4#5#6#7#8#9 { \if_int_compare:w #1 > \c_one_int \exp_after:wN \__fp_sqrt_auxiv_o:NNNNNw @@ -18777,13 +18825,13 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \fi: } -\cs_new:Npn \__fp_sqrt_auxiv_o:NNNNNw 1#1#2#3#4#5#6; +\cs_new:Npn \__fp_sqrt_auxiv_o:NNNNNw 1#1#2#3#4#5#6\__fp_sep: { \__fp_sqrt_auxviii_o:nnnnnnn {#1#2#3#4#5#6} {00000000} } -\cs_new:Npn \__fp_sqrt_auxv_o:NNNNNw 1#1#2#3#4#5#6; +\cs_new:Npn \__fp_sqrt_auxv_o:NNNNNw 1#1#2#3#4#5#6\__fp_sep: { \__fp_sqrt_auxviii_o:nnnnnnn {000#1#2#3#4#5} {#60000} } -\cs_new:Npn \__fp_sqrt_auxvi_o:NNNNNw 1#1#2#3#4#5#6; +\cs_new:Npn \__fp_sqrt_auxvi_o:NNNNNw 1#1#2#3#4#5#6\__fp_sep: { \__fp_sqrt_auxviii_o:nnnnnnn {0000000#1} {#2#3#4#5#6} } -\cs_new:Npn \__fp_sqrt_auxvii_o:NNNNNw 1#1#2#3#4#5#6; +\cs_new:Npn \__fp_sqrt_auxvii_o:NNNNNw 1#1#2#3#4#5#6\__fp_sep: { \if_int_compare:w #1#2 = \c_zero_int \exp_after:wN \__fp_sqrt_auxx_o:Nnnnnnnn @@ -18797,9 +18845,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_basics_pack_low:NNNNNw \int_value:w \__fp_int_eval:w #1 + 1#4#5 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \int_value:w \__fp_int_eval:w #2 + 1#6#7 ; + \int_value:w \__fp_int_eval:w #2 + 1#6#7 \__fp_sep: } -\cs_new:Npn \__fp_sqrt_auxix_o:wnwnw #1; #2#3; #4#5; +\cs_new:Npn \__fp_sqrt_auxix_o:wnwnw #1\__fp_sep: #2#3\__fp_sep: #4#5\__fp_sep: { \__fp_sqrt_auxii_o:NnnnnnnnN \__fp_sqrt_auxiii_o:wnnnnnnnn {#1}{#2}{#3}{#4}{#5} @@ -18808,17 +18856,17 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_after:wN \__fp_sqrt_auxxi_o:wwnnN \int_value:w \__fp_int_eval:w - (#8 + 2499) / 5000 * 5000 ; - {#4} {#5} {#6} {#7} ; + (#8 + 2499) / 5000 * 5000 \__fp_sep: + {#4} {#5} {#6} {#7} \__fp_sep: } -\cs_new:Npn \__fp_sqrt_auxxi_o:wwnnN #1; #2; #3#4#5 +\cs_new:Npn \__fp_sqrt_auxxi_o:wwnnN #1\__fp_sep: #2\__fp_sep: #3#4#5 { \__fp_sqrt_auxii_o:NnnnnnnnN \__fp_sqrt_auxxii_o:nnnnnnnnw #2 {#1} {#3} { #4 + 1 } #5 } -\cs_new:Npn \__fp_sqrt_auxxii_o:nnnnnnnnw 0; #1#2#3#4#5#6#7#8 #9; +\cs_new:Npn \__fp_sqrt_auxxii_o:nnnnnnnnw 0\__fp_sep: #1#2#3#4#5#6#7#8 #9\__fp_sep: { \if_int_compare:w #1#2 > \c_zero_int \if_int_compare:w #1#2 = \c_one_int @@ -18836,14 +18884,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_sqrt_auxxiv_o:wnnnnnnnN \int_value:w 10000 \fi: - ; + \__fp_sep: } -\cs_new:Npn \__fp_sqrt_auxxiii_o:w \fi: \fi: \fi: \fi: #1 \fi: ; +\cs_new:Npn \__fp_sqrt_auxxiii_o:w \fi: \fi: \fi: \fi: #1 \fi: \__fp_sep: { \fi: \fi: \fi: \fi: \fi: - \__fp_sqrt_auxxiv_o:wnnnnnnnN 9999 ; + \__fp_sqrt_auxxiv_o:wnnnnnnnN 9999 \__fp_sep: } -\cs_new:Npn \__fp_sqrt_auxxiv_o:wnnnnnnnN #1; #2#3#4#5#6 #7#8#9 +\cs_new:Npn \__fp_sqrt_auxxiv_o:wnnnnnnnN #1\__fp_sep: #2#3#4#5#6 #7#8#9 { \exp_after:wN \__fp_basics_pack_high:NNNNNw \int_value:w \__fp_int_eval:w 1 0000 0000 + #2#3 @@ -18857,10 +18905,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \exp_after:wN \use_i:nn \exp_after:wN \__fp_round_digit:Nw - \int_value:w \__fp_int_eval:w #6 + 19999 - #1 ; - \exp_after:wN ; + \int_value:w \__fp_int_eval:w #6 + 19999 - #1 \__fp_sep: + \exp_after:wN \__fp_sep: } -\cs_new:Npn \__fp_logb_o:w ? \s__fp \__fp_chk:w #1#2; @ +\cs_new:Npn \__fp_logb_o:w ? \s__fp \__fp_chk:w #1#2\__fp_sep: @ { \if_case:w #1 \exp_stop_f: \__fp_case_use:nw @@ -18869,14 +18917,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \__fp_case_return_o:Nw \c_inf_fp \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #1 #2; + \s__fp \__fp_chk:w #1 #2\__fp_sep: } -\cs_new:Npn \__fp_logb_aux_o:w \s__fp \__fp_chk:w #1 #2 #3 #4 ; +\cs_new:Npn \__fp_logb_aux_o:w \s__fp \__fp_chk:w #1 #2 #3 #4 \__fp_sep: { \exp_after:wN \__fp_parse:n \exp_after:wN { \int_value:w \int_eval:w #3 - 1 \exp_after:wN } } -\cs_new:Npn \__fp_sign_o:w ? \s__fp \__fp_chk:w #1#2; @ +\cs_new:Npn \__fp_sign_o:w ? \s__fp \__fp_chk:w #1#2\__fp_sep: @ { \if_case:w #1 \exp_stop_f: \__fp_case_return_same_o:w @@ -18884,11 +18932,11 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \exp_after:wN \__fp_sign_aux_o:w \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #1 #2; + \s__fp \__fp_chk:w #1 #2\__fp_sep: } -\cs_new:Npn \__fp_sign_aux_o:w \s__fp \__fp_chk:w #1 #2 #3 ; +\cs_new:Npn \__fp_sign_aux_o:w \s__fp \__fp_chk:w #1 #2 #3 \__fp_sep: { \exp_after:wN \__fp_set_sign_o:w \exp_after:wN #2 \c_one_fp @ } -\cs_new:Npn \__fp_set_sign_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_set_sign_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \exp_after:wN \__fp_exp_after_o:w \exp_after:wN \s__fp @@ -18896,7 +18944,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN #2 \int_value:w \if_case:w #3 \exp_stop_f: #1 \or: 1 \or: 0 \fi: \exp_stop_f: - #4; + #4\__fp_sep: } \cs_new:Npn \__fp_tuple_set_sign_o:w #1#2 @ { @@ -18908,53 +18956,60 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new:Npn \__fp_tuple_set_sign_aux_o:Nnw #1#2 { \__fp_tuple_map_o:nw \__fp_tuple_set_sign_aux_o:w } -\cs_new:Npn \__fp_tuple_set_sign_aux_o:w #1#2 ; +\cs_new:Npn \__fp_tuple_set_sign_aux_o:w #1#2 \__fp_sep: { \__fp_change_func_type:NNN #1 \__fp_set_sign_o:w \__fp_parse_apply_unary_error:NNw - 2 #1 #2 ; @ - } -\cs_new:cpn { __fp_*_tuple_o:ww } #1 ; - { \__fp_tuple_map_o:nw { \__fp_binary_type_o:Nww * #1 ; } } -\cs_new:cpn { __fp_tuple_*_o:ww } #1 ; #2 ; - { \__fp_tuple_map_o:nw { \__fp_binary_rev_type_o:Nww * #2 ; } #1 ; } -\cs_new:cpn { __fp_tuple_/_o:ww } #1 ; #2 ; - { \__fp_tuple_map_o:nw { \__fp_binary_rev_type_o:Nww / #2 ; } #1 ; } + 2 #1 #2 \__fp_sep: @ + } +\cs_new:cpn { __fp_*_tuple_o:ww } #1 \__fp_sep: + { \__fp_tuple_map_o:nw { \__fp_binary_type_o:Nww * #1 \__fp_sep: } } +\cs_new:cpn { __fp_tuple_*_o:ww } #1 \__fp_sep: #2 \__fp_sep: + { + \__fp_tuple_map_o:nw { \__fp_binary_rev_type_o:Nww * #2 \__fp_sep: } + #1 \__fp_sep: + } +\cs_new:cpn { __fp_tuple_/_o:ww } #1 \__fp_sep: #2 \__fp_sep: + { + \__fp_tuple_map_o:nw { \__fp_binary_rev_type_o:Nww / #2 \__fp_sep: } + #1 \__fp_sep: + } \cs_set_protected:Npn \__fp_tmp:w #1 { \cs_new:cpn { __fp_tuple_#1_tuple_o:ww } - \s__fp_tuple \__fp_tuple_chk:w ##1 ; - \s__fp_tuple \__fp_tuple_chk:w ##2 ; + \s__fp_tuple \__fp_tuple_chk:w ##1 \__fp_sep: + \s__fp_tuple \__fp_tuple_chk:w ##2 \__fp_sep: { \int_compare:nNnTF { \__fp_array_count:n {##1} } = { \__fp_array_count:n {##2} } { \__fp_tuple_mapthread_o:nww { \__fp_binary_type_o:Nww #1 } } { \__fp_invalid_operation_o:nww #1 } - \s__fp_tuple \__fp_tuple_chk:w {##1} ; - \s__fp_tuple \__fp_tuple_chk:w {##2} ; + \s__fp_tuple \__fp_tuple_chk:w {##1} \__fp_sep: + \s__fp_tuple \__fp_tuple_chk:w {##2} \__fp_sep: } } \__fp_tmp:w + \__fp_tmp:w - %% File: l3fp-extended.dtx \tl_const:Nn \c__fp_one_fixed_tl - { {10000} {0000} {0000} {0000} {0000} {0000} ; } -\cs_new:Npn \__fp_fixed_continue:wn #1; #2 { #2 #1; } -\cs_new:Npn \__fp_fixed_add_one:wN #1#2; #3 + { {10000} {0000} {0000} {0000} {0000} {0000} \__fp_sep: } +\cs_new:Npn \__fp_fixed_continue:wn #1\__fp_sep: #2 { #2 #1\__fp_sep: } +\cs_new:Npn \__fp_fixed_add_one:wN #1#2\__fp_sep: #3 { \exp_after:wN #3 \exp_after:wN - { \int_value:w \__fp_int_eval:w \c__fp_myriad_int + #1 } #2 ; + { \int_value:w \__fp_int_eval:w \c__fp_myriad_int + #1 } #2 \__fp_sep: } -\cs_new:Npn \__fp_fixed_div_myriad:wn #1#2#3#4#5#6; +\cs_new:Npn \__fp_fixed_div_myriad:wn #1#2#3#4#5#6\__fp_sep: { \exp_after:wN \__fp_fixed_mul_after:wwn \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int \exp_after:wN \__fp_pack:NNNNNw \int_value:w \__fp_int_eval:w \c__fp_trailing_shift_int - + #1 ; {#2}{#3}{#4}{#5}; + + #1 \__fp_sep: {#2}{#3}{#4}{#5}\__fp_sep: } -\cs_new:Npn \__fp_fixed_mul_after:wwn #1; #2; #3 { #3 {#1} #2; } -\cs_new:Npn \__fp_fixed_mul_short:wwn #1#2#3#4#5#6; #7#8#9; +\cs_new:Npn \__fp_fixed_mul_after:wwn #1\__fp_sep: #2\__fp_sep: #3 + { #3 {#1} #2\__fp_sep: } +\cs_new:Npn \__fp_fixed_mul_short:wwn #1#2#3#4#5#6\__fp_sep: #7#8#9\__fp_sep: { \exp_after:wN \__fp_fixed_mul_after:wwn \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int @@ -18975,29 +19030,29 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \__fp_int_eval:w \c__fp_trailing_shift_int + #4*#9 + #5*#8 + #6*#7 + ( #5*#9 + #6*#8 + #6*#9 / \c__fp_myriad_int ) - / \c__fp_myriad_int ; ; + / \c__fp_myriad_int \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_fixed_div_int:wwN #1#2#3#4#5#6 ; #7 ; #8 +\cs_new:Npn \__fp_fixed_div_int:wwN #1#2#3#4#5#6 \__fp_sep: #7 \__fp_sep: #8 { \exp_after:wN \__fp_fixed_div_int_after:Nw \exp_after:wN #8 \int_value:w \__fp_int_eval:w - 1 \__fp_fixed_div_int:wnN - #1; {#7} \__fp_fixed_div_int_auxi:wnn - #2; {#7} \__fp_fixed_div_int_auxi:wnn - #3; {#7} \__fp_fixed_div_int_auxi:wnn - #4; {#7} \__fp_fixed_div_int_auxi:wnn - #5; {#7} \__fp_fixed_div_int_auxi:wnn - #6; {#7} \__fp_fixed_div_int_auxii:wnn ; + #1\__fp_sep: {#7} \__fp_fixed_div_int_auxi:wnn + #2\__fp_sep: {#7} \__fp_fixed_div_int_auxi:wnn + #3\__fp_sep: {#7} \__fp_fixed_div_int_auxi:wnn + #4\__fp_sep: {#7} \__fp_fixed_div_int_auxi:wnn + #5\__fp_sep: {#7} \__fp_fixed_div_int_auxi:wnn + #6\__fp_sep: {#7} \__fp_fixed_div_int_auxii:wnn \__fp_sep: } -\cs_new:Npn \__fp_fixed_div_int:wnN #1; #2 #3 +\cs_new:Npn \__fp_fixed_div_int:wnN #1\__fp_sep: #2 #3 { \exp_after:wN #3 - \int_value:w \__fp_int_eval:w #1 / #2 - 1 ; + \int_value:w \__fp_int_eval:w #1 / #2 - 1 \__fp_sep: {#2} {#1} } -\cs_new:Npn \__fp_fixed_div_int_auxi:wnn #1; #2 #3 +\cs_new:Npn \__fp_fixed_div_int_auxi:wnn #1\__fp_sep: #2 #3 { + #1 \exp_after:wN \__fp_fixed_div_int_pack:Nw @@ -19005,12 +19060,12 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_fixed_div_int:wnN \int_value:w \__fp_int_eval:w #3 - #1*#2 \__fp_int_eval_end: } -\cs_new:Npn \__fp_fixed_div_int_auxii:wnn #1; #2 #3 { + #1 + 2 ; } -\cs_new:Npn \__fp_fixed_div_int_pack:Nw #1 #2; { + #1; {#2} } -\cs_new:Npn \__fp_fixed_div_int_after:Nw #1 #2; { #1 {#2} } +\cs_new:Npn \__fp_fixed_div_int_auxii:wnn #1\__fp_sep: #2 #3 { + #1 + 2 \__fp_sep: } +\cs_new:Npn \__fp_fixed_div_int_pack:Nw #1 #2\__fp_sep: { + #1\__fp_sep: {#2} } +\cs_new:Npn \__fp_fixed_div_int_after:Nw #1 #2\__fp_sep: { #1 {#2} } \cs_new:Npn \__fp_fixed_add:wwn { \__fp_fixed_add:Nnnnnwnn + } \cs_new:Npn \__fp_fixed_sub:wwn { \__fp_fixed_add:Nnnnnwnn - } -\cs_new:Npn \__fp_fixed_add:Nnnnnwnn #1 #2#3#4#5 #6; #7#8 +\cs_new:Npn \__fp_fixed_add:Nnnnnwnn #1 #2#3#4#5 #6\__fp_sep: #7#8 { \exp_after:wN \__fp_fixed_add_after:NNNNNwn \int_value:w \__fp_int_eval:w 9 9999 9998 + #2#3 #1 #7#8 @@ -19018,17 +19073,18 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \__fp_int_eval:w 1 9999 9998 + #4#5 \__fp_fixed_add:nnNnnnwn #6 #1 } -\cs_new:Npn \__fp_fixed_add:nnNnnnwn #1#2 #3 #4#5 #6#7 ; #8 +\cs_new:Npn \__fp_fixed_add:nnNnnnwn #1#2 #3 #4#5 #6#7 \__fp_sep: #8 { #3 #4#5 \exp_after:wN \__fp_fixed_add_pack:NNNNNwn - \int_value:w \__fp_int_eval:w 2 0000 0000 #3 #6#7 + #1#2 ; {#8} ; + \int_value:w \__fp_int_eval:w + 2 0000 0000 #3 #6#7 + #1#2 \__fp_sep: {#8} \__fp_sep: } -\cs_new:Npn \__fp_fixed_add_pack:NNNNNwn #1 #2#3#4#5 #6; #7 - { + #1 ; {#7} {#2#3#4#5} {#6} } -\cs_new:Npn \__fp_fixed_add_after:NNNNNwn 1 #1 #2#3#4#5 #6; #7 +\cs_new:Npn \__fp_fixed_add_pack:NNNNNwn #1 #2#3#4#5 #6\__fp_sep: #7 + { + #1 \__fp_sep: {#7} {#2#3#4#5} {#6} } +\cs_new:Npn \__fp_fixed_add_after:NNNNNwn 1 #1 #2#3#4#5 #6\__fp_sep: #7 { #7 {#1#2#3#4#5} {#6} } -\cs_new:Npn \__fp_fixed_mul:wwn #1#2#3#4 #5; #6#7#8#9 +\cs_new:Npn \__fp_fixed_mul:wwn #1#2#3#4 #5\__fp_sep: #6#7#8#9 { \exp_after:wN \__fp_fixed_mul_after:wwn \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int @@ -19050,32 +19106,33 @@ Type H <return> for immediate help}\def~{\errmessage{% + ( #3*#9 + #4*#8 + \__fp_fixed_mul:nnnnnnnw #5 {#6}{#7} {#1}{#2} } -\cs_new:Npn \__fp_fixed_mul:nnnnnnnw #1#2 #3#4 #5#6 #7#8 ; +\cs_new:Npn \__fp_fixed_mul:nnnnnnnw #1#2 #3#4 #5#6 #7#8 \__fp_sep: { #1*#4 + #2*#3 + #5*#8 + #6*#7 ) / \c__fp_myriad_int - + #1*#3 + #5*#7 ; ; + + #1*#3 + #5*#7 \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_fixed_mul_add:wwwn #1; #2; #3#4#5#6#7#8; +\cs_new:Npn \__fp_fixed_mul_add:wwwn #1\__fp_sep: #2\__fp_sep: #3#4#5#6#7#8\__fp_sep: { \exp_after:wN \__fp_fixed_mul_after:wwn \int_value:w \__fp_int_eval:w \c__fp_big_leading_shift_int \exp_after:wN \__fp_pack_big:NNNNNNw \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int + #3 #4 \__fp_fixed_mul_add:Nwnnnwnnn + - + #5 #6 ; #2 ; #1 ; #2 ; + - + #7 #8 ; ; + + #5 #6 \__fp_sep: #2 \__fp_sep: #1 \__fp_sep: #2 \__fp_sep: + + + #7 #8 \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_fixed_mul_sub_back:wwwn #1; #2; #3#4#5#6#7#8; +\cs_new:Npn \__fp_fixed_mul_sub_back:wwwn + #1\__fp_sep: #2\__fp_sep: #3#4#5#6#7#8\__fp_sep: { \exp_after:wN \__fp_fixed_mul_after:wwn \int_value:w \__fp_int_eval:w \c__fp_big_leading_shift_int \exp_after:wN \__fp_pack_big:NNNNNNw \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int + #3 #4 \__fp_fixed_mul_add:Nwnnnwnnn - - + #5 #6 ; #2 ; #1 ; #2 ; - - + #7 #8 ; ; + + #5 #6 \__fp_sep: #2 \__fp_sep: #1 \__fp_sep: #2 \__fp_sep: - + + #7 #8 \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_fixed_one_minus_mul:wwn #1; #2; +\cs_new:Npn \__fp_fixed_one_minus_mul:wwn #1\__fp_sep: #2\__fp_sep: { \exp_after:wN \__fp_fixed_mul_after:wwn \int_value:w \__fp_int_eval:w \c__fp_big_leading_shift_int @@ -19083,10 +19140,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int + 1 0000 0000 \__fp_fixed_mul_add:Nwnnnwnnn - - ; #2 ; #1 ; #2 ; - - ; ; + \__fp_sep: #2 \__fp_sep: #1 \__fp_sep: #2 \__fp_sep: - + \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_fixed_mul_add:Nwnnnwnnn #1 #2; #3#4#5#6; #7#8#9 +\cs_new:Npn \__fp_fixed_mul_add:Nwnnnwnnn #1 #2\__fp_sep: #3#4#5#6\__fp_sep: #7#8#9 { #1 #7*#3 \exp_after:wN \__fp_pack_big:NNNNNNw @@ -19099,7 +19156,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \__fp_int_eval:w \c__fp_big_middle_shift_int #1 \__fp_fixed_mul_add:nnnnwnnnn {#7}{#8}{#9} } -\cs_new:Npn \__fp_fixed_mul_add:nnnnwnnnn #1#2#3#4#5; #6#7#8#9 +\cs_new:Npn \__fp_fixed_mul_add:nnnnwnnnn #1#2#3#4#5\__fp_sep: #6#7#8#9 { ( #1*#9 + #2*#8 + #3*#7 + #4*#6 ) \exp_after:wN \__fp_pack_big:NNNNNNw @@ -19107,10 +19164,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_fixed_mul_add:nnnnwnnwN { #6 + #4*#7 + #3*#8 + #2*#9 + #1 } { #7 + #4*#8 + #3*#9 + #2 } - {#1} #5; + {#1} #5\__fp_sep: {#6} } -\cs_new:Npn \__fp_fixed_mul_add:nnnnwnnwN #1#2 #3#4#5; #6#7#8; #9 +\cs_new:Npn \__fp_fixed_mul_add:nnnnwnnwN #1#2 #3#4#5\__fp_sep: #6#7#8\__fp_sep: #9 { #9 (#4* #1 *#7) #9 (#5*#6+#4* #2 *#7+#3*#8) / \c__fp_myriad_int @@ -19118,29 +19175,30 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__fp_ep_to_fixed:wwn #1,#2 { \exp_after:wN \__fp_ep_to_fixed_auxi:www - \int_value:w \__fp_int_eval:w 1 0000 0000 + #2 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 1 0000 0000 + #2 \exp_after:wN \__fp_sep: \exp:w \exp_end_continue_f:w - \prg_replicate:nn { 4 - \int_max:nn {#1} { -32 } } { 0 } ; + \prg_replicate:nn { 4 - \int_max:nn {#1} { -32 } } { 0 } \__fp_sep: } -\cs_new:Npn \__fp_ep_to_fixed_auxi:www 1#1; #2; #3#4#5#6#7; +\cs_new:Npn \__fp_ep_to_fixed_auxi:www + 1#1\__fp_sep: #2\__fp_sep: #3#4#5#6#7\__fp_sep: { \__fp_pack_eight:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN - \__fp_ep_to_fixed_auxii:nnnnnnnwn ; + \__fp_ep_to_fixed_auxii:nnnnnnnwn \__fp_sep: #2 #1#3#4#5#6#7 0000 ! } -\cs_new:Npn \__fp_ep_to_fixed_auxii:nnnnnnnwn #1#2#3#4#5#6#7; #8! #9 - { #9 {#1#2}{#3}{#4}{#5}{#6}{#7}; } -\cs_new:Npn \__fp_ep_to_ep:wwN #1,#2#3#4#5#6#7; #8 +\cs_new:Npn \__fp_ep_to_fixed_auxii:nnnnnnnwn #1#2#3#4#5#6#7\__fp_sep: #8! #9 + { #9 {#1#2}{#3}{#4}{#5}{#6}{#7}\__fp_sep: } +\cs_new:Npn \__fp_ep_to_ep:wwN #1,#2#3#4#5#6#7\__fp_sep: #8 { \exp_after:wN #8 \int_value:w \__fp_int_eval:w #1 + 4 \exp_after:wN \use_i:nn \exp_after:wN \__fp_ep_to_ep_loop:N \int_value:w \__fp_int_eval:w 1 0000 0000 + #2 \__fp_int_eval_end: - #3#4#5#6#7 ; ; ! + #3#4#5#6#7 \__fp_sep: \__fp_sep: ! } \cs_new:Npn \__fp_ep_to_ep_loop:N #1 { @@ -19152,27 +19210,29 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_ep_to_ep_loop:N } \cs_new:Npn \__fp_ep_to_ep_end:www - #1 \fi: \__fp_ep_to_ep_loop:N #2; #3! + #1 \fi: \__fp_ep_to_ep_loop:N #2\__fp_sep: #3! { \fi: - \if_meaning:w ; #1 + \if_meaning:w \__fp_sep: #1 - 2 * \c__fp_max_exponent_int \__fp_ep_to_ep_zero:ww \fi: \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN - \__fp_use_i:ww , ; - #1 #2 0000 0000 0000 0000 0000 0000 ; + \__fp_use_i:ww , \__fp_sep: + #1 #2 0000 0000 0000 0000 0000 0000 \__fp_sep: } -\cs_new:Npn \__fp_ep_to_ep_zero:ww \fi: #1; #2; #3; - { \fi: , {1000}{0000}{0000}{0000}{0000}{0000} ; } -\cs_new:Npn \__fp_ep_compare:wwww #1,#2#3#4#5#6#7; - { \__fp_ep_compare_aux:wwww {#1}{#2}{#3}{#4}{#5}; #6#7; } -\cs_new:Npn \__fp_ep_compare_aux:wwww #1;#2;#3,#4#5#6#7#8#9; +\cs_new:Npn \__fp_ep_to_ep_zero:ww \fi: #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: + { \fi: , {1000}{0000}{0000}{0000}{0000}{0000} \__fp_sep: } +\cs_new:Npn \__fp_ep_compare:wwww #1,#2#3#4#5#6#7\__fp_sep: + { \__fp_ep_compare_aux:wwww {#1}{#2}{#3}{#4}{#5}\__fp_sep: #6#7\__fp_sep: } +\cs_new:Npn \__fp_ep_compare_aux:wwww + #1\__fp_sep:#2\__fp_sep:#3,#4#5#6#7#8#9\__fp_sep: { \if_case:w - \__fp_compare_npos:nwnw #1; {#3}{#4}{#5}{#6}{#7}; \exp_stop_f: + \__fp_compare_npos:nwnw + #1\__fp_sep: {#3}{#4}{#5}{#6}{#7}\__fp_sep: \exp_stop_f: \if_int_compare:w #2 = #8#9 \exp_stop_f: 0 \else: @@ -19182,77 +19242,79 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: -1 \fi: } -\cs_new:Npn \__fp_ep_mul:wwwwn #1,#2; #3,#4; +\cs_new:Npn \__fp_ep_mul:wwwwn #1,#2\__fp_sep: #3,#4\__fp_sep: { - \__fp_ep_to_ep:wwN #3,#4; + \__fp_ep_to_ep:wwN #3,#4\__fp_sep: \__fp_fixed_continue:wn { - \__fp_ep_to_ep:wwN #1,#2; + \__fp_ep_to_ep:wwN #1,#2\__fp_sep: \__fp_ep_mul_raw:wwwwN } \__fp_fixed_continue:wn } -\cs_new:Npn \__fp_ep_mul_raw:wwwwN #1,#2; #3,#4; #5 +\cs_new:Npn \__fp_ep_mul_raw:wwwwN #1,#2\__fp_sep: #3,#4\__fp_sep: #5 { - \__fp_fixed_mul:wwn #2; #4; + \__fp_fixed_mul:wwn #2\__fp_sep: #4\__fp_sep: { \exp_after:wN #5 \int_value:w \__fp_int_eval:w #1 + #3 , } } -\cs_new:Npn \__fp_ep_div:wwwwn #1,#2; #3,#4; +\cs_new:Npn \__fp_ep_div:wwwwn #1,#2\__fp_sep: #3,#4\__fp_sep: { - \__fp_ep_to_ep:wwN #1,#2; + \__fp_ep_to_ep:wwN #1,#2\__fp_sep: \__fp_fixed_continue:wn { - \__fp_ep_to_ep:wwN #3,#4; + \__fp_ep_to_ep:wwN #3,#4\__fp_sep: \__fp_ep_div_esti:wwwwn } } -\cs_new:Npn \__fp_ep_div_esti:wwwwn #1,#2#3; #4, +\cs_new:Npn \__fp_ep_div_esti:wwwwn #1,#2#3\__fp_sep: #4, { \exp_after:wN \__fp_ep_div_estii:wwnnwwn \int_value:w \__fp_int_eval:w 10 0000 0000 / ( #2 + 1 ) - \exp_after:wN ; + \exp_after:wN \__fp_sep: \int_value:w \__fp_int_eval:w #4 - #1 + 1 , - {#2} #3; + {#2} #3\__fp_sep: } -\cs_new:Npn \__fp_ep_div_estii:wwnnwwn #1; #2,#3#4#5; #6; #7 +\cs_new:Npn \__fp_ep_div_estii:wwnnwwn + #1\__fp_sep: #2,#3#4#5\__fp_sep: #6\__fp_sep: #7 { \exp_after:wN \__fp_ep_div_estiii:NNNNNwwwn \int_value:w \__fp_int_eval:w 10 0000 0000 - 1750 - + #1 000 + (10 0000 0000 / #3 - #1) * (1000 - #4 / 10) ; - {#3}{#4}#5; #6; { #7 #2, } + + #1 000 + (10 0000 0000 / #3 - #1) * (1000 - #4 / 10) \__fp_sep: + {#3}{#4}#5\__fp_sep: #6\__fp_sep: { #7 #2, } } -\cs_new:Npn \__fp_ep_div_estiii:NNNNNwwwn 1#1#2#3#4#5#6; #7; +\cs_new:Npn \__fp_ep_div_estiii:NNNNNwwwn 1#1#2#3#4#5#6\__fp_sep: #7\__fp_sep: { - \__fp_fixed_mul_short:wwn #7; {#1}{#2#3#4#5}{#6}; + \__fp_fixed_mul_short:wwn #7\__fp_sep: {#1}{#2#3#4#5}{#6}\__fp_sep: \__fp_ep_div_epsi:wnNNNNNn {#1#2#3#4}#5#6 \__fp_fixed_mul:wwn } -\cs_new:Npn \__fp_ep_div_epsi:wnNNNNNn #1#2#3#4#5#6; +\cs_new:Npn \__fp_ep_div_epsi:wnNNNNNn #1#2#3#4#5#6\__fp_sep: { \exp_after:wN \__fp_ep_div_epsii:wwnNNNNNn \int_value:w \__fp_int_eval:w 1 9998 - #2 \exp_after:wN \__fp_ep_div_eps_pack:NNNNNw \int_value:w \__fp_int_eval:w 1 9999 9998 - #3#4 \exp_after:wN \__fp_ep_div_eps_pack:NNNNNw - \int_value:w \__fp_int_eval:w 2 0000 0000 - #5#6 ; ; + \int_value:w \__fp_int_eval:w 2 0000 0000 - #5#6 \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_ep_div_eps_pack:NNNNNw #1#2#3#4#5#6; - { + #1 ; {#2#3#4#5} {#6} } -\cs_new:Npn \__fp_ep_div_epsii:wwnNNNNNn 1#1; #2; #3#4#5#6#7#8 +\cs_new:Npn \__fp_ep_div_eps_pack:NNNNNw #1#2#3#4#5#6\__fp_sep: + { + #1 \__fp_sep: {#2#3#4#5} {#6} } +\cs_new:Npn \__fp_ep_div_epsii:wwnNNNNNn 1#1\__fp_sep: #2\__fp_sep: #3#4#5#6#7#8 { - \__fp_fixed_mul:wwn {0000}{#1}#2; {0000}{#1}#2; + \__fp_fixed_mul:wwn {0000}{#1}#2\__fp_sep: {0000}{#1}#2\__fp_sep: \__fp_fixed_add_one:wN - \__fp_fixed_mul:wwn {10000} {#1} #2 ; + \__fp_fixed_mul:wwn {10000} {#1} #2 \__fp_sep: { - \__fp_fixed_mul_short:wwn {0000}{#1}#2; {#3}{#4#5#6#7}{#8000}; + \__fp_fixed_mul_short:wwn + {0000}{#1}#2\__fp_sep: {#3}{#4#5#6#7}{#8000}\__fp_sep: \__fp_fixed_div_myriad:wn \__fp_fixed_mul:wwn } - \__fp_fixed_add:wwn {#3}{#4#5#6#7}{#8000}{0000}{0000}{0000}; + \__fp_fixed_add:wwn {#3}{#4#5#6#7}{#8000}{0000}{0000}{0000}\__fp_sep: } -\cs_new:Npn \__fp_ep_isqrt:wwn #1,#2; +\cs_new:Npn \__fp_ep_isqrt:wwn #1,#2\__fp_sep: { - \__fp_ep_to_ep:wwN #1,#2; + \__fp_ep_to_ep:wwN #1,#2\__fp_sep: \__fp_ep_isqrt_auxi:wwn } \cs_new:Npn \__fp_ep_isqrt_auxi:wwn #1, @@ -19263,10 +19325,10 @@ Type H <return> for immediate help}\def~{\errmessage{% { (1 - #1) / 2 , 535 , { 0 } { } } { 1 - #1 / 2 , 168 , { } { 0 } } } -\cs_new:Npn \__fp_ep_isqrt_auxii:wwnnnwn #1, #2, #3#4 #5#6; #7 +\cs_new:Npn \__fp_ep_isqrt_auxii:wwnnnwn #1, #2, #3#4 #5#6\__fp_sep: #7 { \__fp_ep_isqrt_esti:wwwnnwn #2, 0, #5, {#3} {#4} - {#5} #6 ; { #7 #1 , } + {#5} #6 \__fp_sep: { #7 #1 , } } \cs_new:Npn \__fp_ep_isqrt_esti:wwwnnwn #1, #2, #3, #4 { @@ -19282,45 +19344,47 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_after:wN \__fp_ep_isqrt_estiii:NNNNNwwwn \int_value:w \__fp_int_eval:w 1000 0000 + #2 * #2 #5 * 5 - \exp_after:wN , \int_value:w \__fp_int_eval:w 10000 + #2 ; + \exp_after:wN , \int_value:w \__fp_int_eval:w 10000 + #2 \__fp_sep: } -\cs_new:Npn \__fp_ep_isqrt_estiii:NNNNNwwwn 1#1#2#3#4#5#6, 1#7#8; #9; +\cs_new:Npn \__fp_ep_isqrt_estiii:NNNNNwwwn + 1#1#2#3#4#5#6, 1#7#8\__fp_sep: #9\__fp_sep: { - \__fp_fixed_mul_short:wwn #9; {#1} {#2#3#4#5} {#600} ; + \__fp_fixed_mul_short:wwn #9\__fp_sep: {#1} {#2#3#4#5} {#600} \__fp_sep: \__fp_ep_isqrt_epsi:wN - \__fp_fixed_mul_short:wwn {#7} {#80} {0000} ; + \__fp_fixed_mul_short:wwn {#7} {#80} {0000} \__fp_sep: } -\cs_new:Npn \__fp_ep_isqrt_epsi:wN #1; +\cs_new:Npn \__fp_ep_isqrt_epsi:wN #1\__fp_sep: { - \__fp_fixed_sub:wwn {15000}{0000}{0000}{0000}{0000}{0000}; #1; - \__fp_ep_isqrt_epsii:wwN #1; - \__fp_ep_isqrt_epsii:wwN #1; - \__fp_ep_isqrt_epsii:wwN #1; + \__fp_fixed_sub:wwn {15000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: #1\__fp_sep: + \__fp_ep_isqrt_epsii:wwN #1\__fp_sep: + \__fp_ep_isqrt_epsii:wwN #1\__fp_sep: + \__fp_ep_isqrt_epsii:wwN #1\__fp_sep: } -\cs_new:Npn \__fp_ep_isqrt_epsii:wwN #1; #2; +\cs_new:Npn \__fp_ep_isqrt_epsii:wwN #1\__fp_sep: #2\__fp_sep: { - \__fp_fixed_mul:wwn #1; #1; - \__fp_fixed_mul_sub_back:wwwn #2; - {15000}{0000}{0000}{0000}{0000}{0000}; - \__fp_fixed_mul:wwn #1; + \__fp_fixed_mul:wwn #1\__fp_sep: #1\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #2\__fp_sep: + {15000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: + \__fp_fixed_mul:wwn #1\__fp_sep: } \cs_new:Npn \__fp_ep_to_float_o:wwN #1, { + \__fp_int_eval:w #1 \__fp_fixed_to_float_o:wN } -\cs_new:Npn \__fp_ep_inv_to_float_o:wwN #1,#2; +\cs_new:Npn \__fp_ep_inv_to_float_o:wwN #1,#2\__fp_sep: { - \__fp_ep_div:wwwwn 1,{1000}{0000}{0000}{0000}{0000}{0000}; #1,#2; + \__fp_ep_div:wwwwn + 1,{1000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: #1,#2\__fp_sep: \__fp_ep_to_float_o:wwN } \cs_new:Npn \__fp_fixed_inv_to_float_o:wN { \__fp_ep_inv_to_float_o:wwN 0, } -\cs_new:Npn \__fp_fixed_to_float_rad_o:wN #1; +\cs_new:Npn \__fp_fixed_to_float_rad_o:wN #1\__fp_sep: { - \__fp_fixed_mul:wwn #1; {5729}{5779}{5130}{8232}{0876}{7981}; + \__fp_fixed_mul:wwn #1\__fp_sep: {5729}{5779}{5130}{8232}{0876}{7981}\__fp_sep: { \__fp_ep_to_float_o:wwN 2, } } -\cs_new:Npn \__fp_fixed_to_float_o:Nw #1#2; - { \__fp_fixed_to_float_o:wN #2; #1 } -\cs_new:Npn \__fp_fixed_to_float_o:wN #1#2#3#4#5#6; #7 +\cs_new:Npn \__fp_fixed_to_float_o:Nw #1#2\__fp_sep: + { \__fp_fixed_to_float_o:wN #2\__fp_sep: #1 } +\cs_new:Npn \__fp_fixed_to_float_o:wN #1#2#3#4#5#6\__fp_sep: #7 { % for the 8-digit-at-the-start thing + \__fp_int_eval:w \c__fp_block_int \exp_after:wN \exp_after:wN @@ -19331,8 +19395,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w 1#2 \exp_after:wN \__fp_use_none_stop_f:n \int_value:w 1#3#4 \exp_after:wN \__fp_use_none_stop_f:n \int_value:w 1#5#6 - \exp_after:wN ; - \exp_after:wN ; + \exp_after:wN \__fp_sep: + \exp_after:wN \__fp_sep: } \cs_new:Npn \__fp_fixed_to_loop:N #1 { @@ -19344,36 +19408,36 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN #1 \fi: } -\cs_new:Npn \__fp_fixed_to_loop_end:w #1 #2 ; +\cs_new:Npn \__fp_fixed_to_loop_end:w #1 #2 \__fp_sep: { - \if_meaning:w ; #1 + \if_meaning:w \__fp_sep: #1 \exp_after:wN \__fp_fixed_to_float_zero:w \else: \exp_after:wN \__fp_pack_twice_four:wNNNNNNNN \exp_after:wN \__fp_pack_twice_four:wNNNNNNNN \exp_after:wN \__fp_fixed_to_float_pack:ww - \exp_after:wN ; + \exp_after:wN \__fp_sep: \fi: - #1 #2 0000 0000 0000 0000 ; + #1 #2 0000 0000 0000 0000 \__fp_sep: } -\cs_new:Npn \__fp_fixed_to_float_zero:w ; 0000 0000 0000 0000 ; +\cs_new:Npn \__fp_fixed_to_float_zero:w \__fp_sep: 0000 0000 0000 0000 \__fp_sep: { - - 2 * \c__fp_max_exponent_int ; - {0000} {0000} {0000} {0000} ; + - 2 * \c__fp_max_exponent_int \__fp_sep: + {0000} {0000} {0000} {0000} \__fp_sep: } -\cs_new:Npn \__fp_fixed_to_float_pack:ww #1 ; #2#3 ; ; +\cs_new:Npn \__fp_fixed_to_float_pack:ww #1 \__fp_sep: #2#3 \__fp_sep: \__fp_sep: { \if_int_compare:w #2 > 4 \exp_stop_f: \exp_after:wN \__fp_fixed_to_float_round_up:wnnnnw \fi: - ; #1 ; + \__fp_sep: #1 \__fp_sep: } -\cs_new:Npn \__fp_fixed_to_float_round_up:wnnnnw ; #1#2#3#4 ; +\cs_new:Npn \__fp_fixed_to_float_round_up:wnnnnw \__fp_sep: #1#2#3#4 \__fp_sep: { \exp_after:wN \__fp_basics_pack_high:NNNNNw \int_value:w \__fp_int_eval:w 1 #1#2 \exp_after:wN \__fp_basics_pack_low:NNNNNw - \int_value:w \__fp_int_eval:w 1 #3#4 + 1 ; + \int_value:w \__fp_int_eval:w 1 #3#4 + 1 \__fp_sep: } %% File: l3fp-expo.dtx \cs_new:Npn \__fp_parse_word_exp:N @@ -19382,16 +19446,25 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_parse_unary_function:NNN \__fp_ln_o:w ? } \cs_new:Npn \__fp_parse_word_fact:N { \__fp_parse_unary_function:NNN \__fp_fact_o:w ? } -\tl_const:Nn \c__fp_ln_i_fixed_tl { {0000}{0000}{0000}{0000}{0000}{0000};} -\tl_const:Nn \c__fp_ln_ii_fixed_tl { {6931}{4718}{0559}{9453}{0941}{7232};} -\tl_const:Nn \c__fp_ln_iii_fixed_tl {{10986}{1228}{8668}{1096}{9139}{5245};} -\tl_const:Nn \c__fp_ln_iv_fixed_tl {{13862}{9436}{1119}{8906}{1883}{4464};} -\tl_const:Nn \c__fp_ln_vi_fixed_tl {{17917}{5946}{9228}{0550}{0081}{2477};} -\tl_const:Nn \c__fp_ln_vii_fixed_tl {{19459}{1014}{9055}{3133}{0510}{5353};} -\tl_const:Nn \c__fp_ln_viii_fixed_tl{{20794}{4154}{1679}{8359}{2825}{1696};} -\tl_const:Nn \c__fp_ln_ix_fixed_tl {{21972}{2457}{7336}{2193}{8279}{0490};} -\tl_const:Nn \c__fp_ln_x_fixed_tl {{23025}{8509}{2994}{0456}{8401}{7991};} -\cs_new:Npn \__fp_ln_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\tl_const:Nn \c__fp_ln_i_fixed_tl + { {0000}{0000}{0000}{0000}{0000}{0000}\__fp_sep:} +\tl_const:Nn \c__fp_ln_ii_fixed_tl + { {6931}{4718}{0559}{9453}{0941}{7232}\__fp_sep:} +\tl_const:Nn \c__fp_ln_iii_fixed_tl + {{10986}{1228}{8668}{1096}{9139}{5245}\__fp_sep:} +\tl_const:Nn \c__fp_ln_iv_fixed_tl + {{13862}{9436}{1119}{8906}{1883}{4464}\__fp_sep:} +\tl_const:Nn \c__fp_ln_vi_fixed_tl + {{17917}{5946}{9228}{0550}{0081}{2477}\__fp_sep:} +\tl_const:Nn \c__fp_ln_vii_fixed_tl + {{19459}{1014}{9055}{3133}{0510}{5353}\__fp_sep:} +\tl_const:Nn \c__fp_ln_viii_fixed_tl + {{20794}{4154}{1679}{8359}{2825}{1696}\__fp_sep:} +\tl_const:Nn \c__fp_ln_ix_fixed_tl + {{21972}{2457}{7336}{2193}{8279}{0490}\__fp_sep:} +\tl_const:Nn \c__fp_ln_x_fixed_tl + {{23025}{8509}{2994}{0456}{8401}{7991}\__fp_sep:} +\cs_new:Npn \__fp_ln_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_meaning:w 2 #3 \__fp_case_use:nw { \__fp_invalid_operation_o:nw { ln } } @@ -19403,9 +19476,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \__fp_case_return_same_o:w \fi: - \__fp_ln_npos_o:w \s__fp \__fp_chk:w #2#3#4; + \__fp_ln_npos_o:w \s__fp \__fp_chk:w #2#3#4\__fp_sep: } -\cs_new:Npn \__fp_ln_npos_o:w \s__fp \__fp_chk:w 10#1#2#3; +\cs_new:Npn \__fp_ln_npos_o:w \s__fp \__fp_chk:w 10#1#2#3\__fp_sep: { %^^A todo: ln(1) should be "exact zero", not "underflow" \exp_after:wN \__fp_sanitize:Nw \int_value:w % for the overall sign @@ -19437,9 +19510,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: 2 \else: 1 \fi: - ; { #1 #2 #3 #4 } + \__fp_sep: { #1 #2 #3 #4 } } -\cs_new:Npn \__fp_ln_x_ii:wnnnn #1; #2#3#4#5 +\cs_new:Npn \__fp_ln_x_ii:wnnnn #1\__fp_sep: #2#3#4#5 { \exp_after:wN \__fp_ln_div_after:Nw \cs:w c__fp_ln_ \__fp_int_to_roman:w #1 _fixed_tl \exp_after:wN \cs_end: @@ -19449,22 +19522,22 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_ln_x_iii_var:NNNNNw \int_value:w \__fp_int_eval:w 9999 9990 + #1*#2#3 + \exp_after:wN \__fp_ln_x_iii:NNNNNNw - \int_value:w \__fp_int_eval:w 10 0000 0000 + #1*#4#5 ; + \int_value:w \__fp_int_eval:w 10 0000 0000 + #1*#4#5 \__fp_sep: {20000} {0000} {0000} {0000} } %^^A todo: reoptimize (a generalization attempt failed). -\cs_new:Npn \__fp_ln_x_iii:NNNNNNw #1#2 #3#4#5#6 #7; - { #1#2; {#3#4#5#6} {#7} } -\cs_new:Npn \__fp_ln_x_iii_var:NNNNNw #1 #2#3#4#5 #6; +\cs_new:Npn \__fp_ln_x_iii:NNNNNNw #1#2 #3#4#5#6 #7\__fp_sep: + { #1#2\__fp_sep: {#3#4#5#6} {#7} } +\cs_new:Npn \__fp_ln_x_iii_var:NNNNNw #1 #2#3#4#5 #6\__fp_sep: { - #1#2#3#4#5 + 1 ; + #1#2#3#4#5 + 1 \__fp_sep: {#1#2#3#4#5} {#6} } -\cs_new:Npn \__fp_ln_x_iv:wnnnnnnnn #1; #2#3#4#5 #6#7#8#9 +\cs_new:Npn \__fp_ln_x_iv:wnnnnnnnn #1\__fp_sep: #2#3#4#5 #6#7#8#9 { \exp_after:wN \__fp_div_significand_pack:NNN \int_value:w \__fp_int_eval:w - \__fp_ln_div_i:w #1 ; - #6 #7 ; {#8} {#9} + \__fp_ln_div_i:w #1 \__fp_sep: + #6 #7 \__fp_sep: {#8} {#9} {#2} {#3} {#4} {#5} { \exp_after:wN \__fp_ln_div_ii:wwn \int_value:w #1 } { \exp_after:wN \__fp_ln_div_ii:wwn \int_value:w #1 } @@ -19472,25 +19545,27 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_after:wN \__fp_ln_div_ii:wwn \int_value:w #1 } { \exp_after:wN \__fp_ln_div_vi:wwn \int_value:w #1 } } -\cs_new:Npn \__fp_ln_div_i:w #1; +\cs_new:Npn \__fp_ln_div_i:w #1\__fp_sep: { \exp_after:wN \__fp_div_significand_calc:wwnnnnnnn - \int_value:w \__fp_int_eval:w 999999 + 2 0000 0000 / #1 ; % Q1 + \int_value:w \__fp_int_eval:w 999999 + 2 0000 0000 / #1 \__fp_sep: % Q1 } -\cs_new:Npn \__fp_ln_div_ii:wwn #1; #2;#3 % y; B1;B2 <- for k=1 +\cs_new:Npn \__fp_ln_div_ii:wwn + #1\__fp_sep: #2\__fp_sep:#3 % y\__fp_sep: B1\__fp_sep:B2 <- for k=1 { \exp_after:wN \__fp_div_significand_pack:NNN \int_value:w \__fp_int_eval:w \exp_after:wN \__fp_div_significand_calc:wwnnnnnnn - \int_value:w \__fp_int_eval:w 999999 + #2 #3 / #1 ; % Q2 - #2 #3 ; + \int_value:w \__fp_int_eval:w 999999 + #2 #3 / #1 \__fp_sep: % Q2 + #2 #3 \__fp_sep: } -\cs_new:Npn \__fp_ln_div_vi:wwn #1; #2;#3#4#5 #6#7#8#9 %y;F1;F2F3F4x1x2x3x4 +\cs_new:Npn \__fp_ln_div_vi:wwn + #1\__fp_sep: #2\__fp_sep:#3#4#5 #6#7#8#9 %y\__fp_sep:F1\__fp_sep:F2F3F4x1x2x3x4 { \exp_after:wN \__fp_div_significand_pack:NNN - \int_value:w \__fp_int_eval:w 1000000 + #2 #3 / #1 ; % Q6 + \int_value:w \__fp_int_eval:w 1000000 + #2 #3 / #1 \__fp_sep: % Q6 } -\cs_new:Npn \__fp_ln_div_after:Nw #1#2; +\cs_new:Npn \__fp_ln_div_after:Nw #1#2\__fp_sep: { \if_meaning:w 0 #2 \exp_after:wN \__fp_ln_t_small:Nw @@ -19500,19 +19575,22 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: #1 } -\cs_new:Npn \__fp_ln_t_small:Nw #1 #2; #3; #4; #5; #6; #7; +\cs_new:Npn \__fp_ln_t_small:Nw + #1 #2\__fp_sep: #3\__fp_sep: #4\__fp_sep: #5\__fp_sep: #6\__fp_sep: #7\__fp_sep: { \exp_after:wN \__fp_ln_t_large:NNw \exp_after:wN + % <sign> \exp_after:wN #1 - \int_value:w \__fp_int_eval:w 9999 - #2 \exp_after:wN ; - \int_value:w \__fp_int_eval:w 9999 - #3 \exp_after:wN ; - \int_value:w \__fp_int_eval:w 9999 - #4 \exp_after:wN ; - \int_value:w \__fp_int_eval:w 9999 - #5 \exp_after:wN ; - \int_value:w \__fp_int_eval:w 9999 - #6 \exp_after:wN ; - \int_value:w \__fp_int_eval:w 1 0000 - #7 ; - } -\cs_new:Npn \__fp_ln_t_large:NNw #1 #2 #3; #4; #5; #6; #7; #8; + \int_value:w \__fp_int_eval:w 9999 - #2 \exp_after:wN \__fp_sep: + \int_value:w \__fp_int_eval:w 9999 - #3 \exp_after:wN \__fp_sep: + \int_value:w \__fp_int_eval:w 9999 - #4 \exp_after:wN \__fp_sep: + \int_value:w \__fp_int_eval:w 9999 - #5 \exp_after:wN \__fp_sep: + \int_value:w \__fp_int_eval:w 9999 - #6 \exp_after:wN \__fp_sep: + \int_value:w \__fp_int_eval:w 1 0000 - #7 \__fp_sep: + } +\cs_new:Npn \__fp_ln_t_large:NNw + #1 #2 + #3\__fp_sep: #4\__fp_sep: #5\__fp_sep: #6\__fp_sep: #7\__fp_sep: #8\__fp_sep: { \exp_after:wN \__fp_ln_square_t_after:w \int_value:w \__fp_int_eval:w 9999 0000 + #3*#3 @@ -19526,7 +19604,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \__fp_int_eval:w 1 0000 0000 + 2*#3*#7 + 2*#4*#6 + #5*#5 + (2*#3*#8 + 2*#4*#7 + 2*#5*#6) / 1 0000 - % ; ; ; + % \__fp_sep: \__fp_sep: \__fp_sep: \exp_after:wN \__fp_ln_twice_t_after:w \int_value:w \__fp_int_eval:w -1 + 2*#3 \exp_after:wN \__fp_ln_twice_t_pack:Nw @@ -19538,48 +19616,53 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_ln_twice_t_pack:Nw \int_value:w \__fp_int_eval:w 9999 + 2*#7 \exp_after:wN \__fp_ln_twice_t_pack:Nw - \int_value:w \__fp_int_eval:w 10000 + 2*#8 ; ; + \int_value:w \__fp_int_eval:w 10000 + 2*#8 \__fp_sep: \__fp_sep: { \__fp_ln_c:NwNw #1 } #2 } -\cs_new:Npn \__fp_ln_twice_t_pack:Nw #1 #2; { + #1 ; {#2} } -\cs_new:Npn \__fp_ln_twice_t_after:w #1; { ;;; {#1} } -\cs_new:Npn \__fp_ln_square_t_pack:NNNNNw #1 #2#3#4#5 #6; - { + #1#2#3#4#5 ; {#6} } -\cs_new:Npn \__fp_ln_square_t_after:w 1 0 #1#2#3 #4; +\cs_new:Npn \__fp_ln_twice_t_pack:Nw #1 #2\__fp_sep: { + #1 \__fp_sep: {#2} } +\cs_new:Npn \__fp_ln_twice_t_after:w #1\__fp_sep: + { \__fp_sep:\__fp_sep:\__fp_sep: {#1} } +\cs_new:Npn \__fp_ln_square_t_pack:NNNNNw #1 #2#3#4#5 #6\__fp_sep: + { + #1#2#3#4#5 \__fp_sep: {#6} } +\cs_new:Npn \__fp_ln_square_t_after:w 1 0 #1#2#3 #4\__fp_sep: { \__fp_ln_Taylor:wwNw {0#1#2#3} {#4} } \cs_new:Npn \__fp_ln_Taylor:wwNw - { \__fp_ln_Taylor_loop:www 21 ; {0000}{0000}{0000}{0000}{0000}{0000} ; } -\cs_new:Npn \__fp_ln_Taylor_loop:www #1; #2; #3; + { + \__fp_ln_Taylor_loop:www + 21 \__fp_sep: {0000}{0000}{0000}{0000}{0000}{0000} \__fp_sep: + } +\cs_new:Npn \__fp_ln_Taylor_loop:www #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: { \if_int_compare:w #1 = \c_one_int \__fp_ln_Taylor_break:w \fi: - \exp_after:wN \__fp_fixed_div_int:wwN \c__fp_one_fixed_tl #1; - \__fp_fixed_add:wwn #2; - \__fp_fixed_mul:wwn #3; + \exp_after:wN \__fp_fixed_div_int:wwN \c__fp_one_fixed_tl #1\__fp_sep: + \__fp_fixed_add:wwn #2\__fp_sep: + \__fp_fixed_mul:wwn #3\__fp_sep: { \exp_after:wN \__fp_ln_Taylor_loop:www - \int_value:w \__fp_int_eval:w #1 - 2 ; + \int_value:w \__fp_int_eval:w #1 - 2 \__fp_sep: } - #3; + #3\__fp_sep: } -\cs_new:Npn \__fp_ln_Taylor_break:w \fi: #1 \__fp_fixed_add:wwn #2#3; #4 ;; +\cs_new:Npn \__fp_ln_Taylor_break:w + \fi: #1 \__fp_fixed_add:wwn #2#3\__fp_sep: #4 \__fp_sep:\__fp_sep: { \fi: \exp_after:wN \__fp_fixed_mul:wwn - \exp_after:wN { \int_value:w \__fp_int_eval:w 10000 + #2 } #3; + \exp_after:wN { \int_value:w \__fp_int_eval:w 10000 + #2 } #3\__fp_sep: } -\cs_new:Npn \__fp_ln_c:NwNw #1 #2; #3 +\cs_new:Npn \__fp_ln_c:NwNw #1 #2\__fp_sep: #3 { \if_meaning:w + #1 \exp_after:wN \exp_after:wN \exp_after:wN \__fp_fixed_sub:wwn \else: \exp_after:wN \exp_after:wN \exp_after:wN \__fp_fixed_add:wwn \fi: - #3 #2 ; + #3 #2 \__fp_sep: } -\cs_new:Npn \__fp_ln_exponent:wn #1; #2 +\cs_new:Npn \__fp_ln_exponent:wn #1\__fp_sep: #2 { \if_case:w #2 \exp_stop_f: 0 \__fp_case_return:nw { \__fp_fixed_to_float_o:Nw 2 } @@ -19596,25 +19679,25 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_fixed_add:wwn \int_value:w - \fi: \fi: - #2; #1; + #2\__fp_sep: #1\__fp_sep: } -\cs_new:Npn \__fp_ln_exponent_one:ww 1; #1; +\cs_new:Npn \__fp_ln_exponent_one:ww 1\__fp_sep: #1\__fp_sep: { 0 - \exp_after:wN \__fp_fixed_sub:wwn \c__fp_ln_x_fixed_tl #1; + \exp_after:wN \__fp_fixed_sub:wwn \c__fp_ln_x_fixed_tl #1\__fp_sep: \__fp_fixed_to_float_o:wN 0 } -\cs_new:Npn \__fp_ln_exponent_small:NNww #1#2#3; #4#5#6#7#8#9; +\cs_new:Npn \__fp_ln_exponent_small:NNww #1#2#3\__fp_sep: #4#5#6#7#8#9\__fp_sep: { 4 \exp_after:wN \__fp_fixed_mul:wwn \c__fp_ln_x_fixed_tl - {#3}{0000}{0000}{0000}{0000}{0000} ; + {#3}{0000}{0000}{0000}{0000}{0000} \__fp_sep: #2 - {0000}{#4}{#5}{#6}{#7}{#8}; + {0000}{#4}{#5}{#6}{#7}{#8}\__fp_sep: \__fp_fixed_to_float_o:wN #1 } -\cs_new:Npn \__fp_exp_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_exp_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_return_o:Nw \c_one_fp @@ -19631,7 +19714,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2#3#4; + \s__fp \__fp_chk:w #2#3#4\__fp_sep: } \cs_new:Npn \__fp_exp_normal_o:w \s__fp \__fp_chk:w 1#1 { @@ -19641,7 +19724,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_exp_pos_o:NNwnw - \__fp_fixed_inv_to_float_o:wN \fi: } -\cs_new:Npn \__fp_exp_pos_o:NNwnw #1#2#3 \fi: #4#5; +\cs_new:Npn \__fp_exp_pos_o:NNwnw #1#2#3 \fi: #4#5\__fp_sep: { \fi: \if_int_compare:w #4 > \c__fp_max_exp_exponent_int @@ -19680,33 +19763,33 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN #1 \exp_after:wN #2 } -\cs_new:Npn \__fp_exp_Taylor:Nnnwn #1#2#3 #4; #5 #6 +\cs_new:Npn \__fp_exp_Taylor:Nnnwn #1#2#3 #4\__fp_sep: #5 #6 { #6 \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_exp_Taylor_ii:ww - ; #2#3#4 0000 0000 ; + \__fp_sep: #2#3#4 0000 0000 \__fp_sep: } -\cs_new:Npn \__fp_exp_Taylor_ii:ww #1; #2; - { \__fp_exp_Taylor_loop:www 10 ; #1 ; #1 ; \s__fp_stop } -\cs_new:Npn \__fp_exp_Taylor_loop:www #1; #2; #3; +\cs_new:Npn \__fp_exp_Taylor_ii:ww #1\__fp_sep: #2\__fp_sep: + { \__fp_exp_Taylor_loop:www 10 \__fp_sep: #1 \__fp_sep: #1 \__fp_sep: \s__fp_stop } +\cs_new:Npn \__fp_exp_Taylor_loop:www #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: { \if_int_compare:w #1 = \c_one_int \exp_after:wN \__fp_exp_Taylor_break:Nww \fi: - \__fp_fixed_div_int:wwN #3 ; #1 ; + \__fp_fixed_div_int:wwN #3 \__fp_sep: #1 \__fp_sep: \__fp_fixed_add_one:wN - \__fp_fixed_mul:wwn #2 ; + \__fp_fixed_mul:wwn #2 \__fp_sep: { \exp_after:wN \__fp_exp_Taylor_loop:www - \int_value:w \__fp_int_eval:w #1 - 1 ; - #2 ; + \int_value:w \__fp_int_eval:w #1 - 1 \__fp_sep: + #2 \__fp_sep: } } -\cs_new:Npn \__fp_exp_Taylor_break:Nww #1 #2; #3 \s__fp_stop - { \__fp_fixed_add_one:wN #2 ; } +\cs_new:Npn \__fp_exp_Taylor_break:Nww #1 #2\__fp_sep: #3 \s__fp_stop + { \__fp_fixed_add_one:wN #2 \__fp_sep: } \intarray_const_from_clist:Nn \c__fp_exp_intarray { 1 , 1 1105 1709 , 1 1807 5647 , 1 6248 1171 , @@ -19764,23 +19847,23 @@ Type H <return> for immediate help}\def~{\errmessage{% 34744 , 1 3618 6973 , 1 3140 0875 , 1 3856 4102 , 39087 , 1 3186 9209 , 1 6113 3900 , 1 6705 9685 , } -\cs_new:Npn \__fp_exp_pos_large:NnnNwn #1#2#3 #4#5; #6 +\cs_new:Npn \__fp_exp_pos_large:NnnNwn #1#2#3 #4#5\__fp_sep: #6 { \exp_after:wN \exp_after:wN \exp_after:wN \__fp_exp_large:NwN \exp_after:wN \exp_after:wN \exp_after:wN #6 \exp_after:wN \c__fp_one_fixed_tl \int_value:w #3 #4 \exp_stop_f: - #5 00000 ; + #5 00000 \__fp_sep: } -\cs_new:Npn \__fp_exp_large:NwN #1#2; #3 +\cs_new:Npn \__fp_exp_large:NwN #1#2\__fp_sep: #3 { \if_case:w #3 ~ \exp_after:wN \__fp_fixed_continue:wn \else: \exp_after:wN \__fp_exp_intarray:w - \int_value:w \__fp_int_eval:w 36 * #1 + 4 * #3 \exp_after:wN ; + \int_value:w \__fp_int_eval:w 36 * #1 + 4 * #3 \exp_after:wN \__fp_sep: \fi: - #2; + #2\__fp_sep: { \if_meaning:w 0 #1 \exp_after:wN \__fp_exp_large_after:wwn @@ -19790,7 +19873,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: } } -\cs_new:Npn \__fp_exp_intarray:w #1 ; +\cs_new:Npn \__fp_exp_intarray:w #1 \__fp_sep: { + \__kernel_intarray_item:Nn \c__fp_exp_intarray @@ -19805,16 +19888,18 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_value:w \__kernel_intarray_item:Nn \c__fp_exp_intarray { \__fp_int_eval:w #1 - 1 } \exp_after:wN \__fp_exp_intarray_aux:w - \int_value:w \__kernel_intarray_item:Nn \c__fp_exp_intarray {#1} ; ; + \int_value:w \__kernel_intarray_item:Nn + \c__fp_exp_intarray {#1} \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_exp_intarray_aux:w 1 #1#2#3#4#5 ; { ; {#1#2#3#4} {#5} } -\cs_new:Npn \__fp_exp_large_after:wwn #1; #2; #3 +\cs_new:Npn \__fp_exp_intarray_aux:w 1 #1#2#3#4#5 \__fp_sep: + { \__fp_sep: {#1#2#3#4} {#5} } +\cs_new:Npn \__fp_exp_large_after:wwn #1\__fp_sep: #2\__fp_sep: #3 { - \__fp_exp_Taylor:Nnnwn ? { } { } 0 #2; {} #3 - \__fp_fixed_mul:wwn #1; + \__fp_exp_Taylor:Nnnwn ? { } { } 0 #2\__fp_sep: {} #3 + \__fp_fixed_mul:wwn #1\__fp_sep: } \cs_new:cpn { __fp_ \iow_char:N \^ _o:ww } - \s__fp \__fp_chk:w #1#2#3; \s__fp \__fp_chk:w #4#5#6; + \s__fp \__fp_chk:w #1#2#3\__fp_sep: \s__fp \__fp_chk:w #4#5#6\__fp_sep: { \if_meaning:w 0 #4 \__fp_case_return_o:Nw \c_one_fp @@ -19833,13 +19918,13 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \exp_after:wN \__fp_pow_zero_or_inf:ww \fi: - \s__fp \__fp_chk:w #1#2#3; + \s__fp \__fp_chk:w #1#2#3\__fp_sep: } - { \s__fp \__fp_chk:w #4#5#6; \s__fp \__fp_chk:w #1#2#3; } - \s__fp \__fp_chk:w #4#5#6; + { \s__fp \__fp_chk:w #4#5#6\__fp_sep: \s__fp \__fp_chk:w #1#2#3\__fp_sep: } + \s__fp \__fp_chk:w #4#5#6\__fp_sep: } \cs_new:Npn \__fp_pow_zero_or_inf:ww - \s__fp \__fp_chk:w #1#2; \s__fp \__fp_chk:w #3#4 + \s__fp \__fp_chk:w #1#2\__fp_sep: \s__fp \__fp_chk:w #3#4 { \if_meaning:w 1 #4 \__fp_case_return_same_o:w @@ -19856,13 +19941,13 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_case_use:nw { \__fp_division_by_zero_o:NNww \c_inf_fp ^ - \s__fp \__fp_chk:w #1 #2 ; + \s__fp \__fp_chk:w #1 #2 \__fp_sep: } \fi: \s__fp \__fp_chk:w #3#4 } \cs_new:Npn \__fp_pow_normal_o:ww - \s__fp \__fp_chk:w 1 #1#2#3; \s__fp \__fp_chk:w #4#5 + \s__fp \__fp_chk:w 1 #1#2#3\__fp_sep: \s__fp \__fp_chk:w #4#5 { \if:w 0 \__fp_str_if_eq:nn { #2 #3 } { 1 {1000} {0000} {0000} {0000} } \if_int_compare:w #4 #1 = 32 \exp_stop_f: @@ -19886,7 +19971,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \__fp_case_return_ii_o:ww \fi: - \s__fp \__fp_chk:w 1 #1 {#2} #3 ; + \s__fp \__fp_chk:w 1 #1 {#2} #3 \__fp_sep: \s__fp \__fp_chk:w #4 #5 } \cs_new:Npn \__fp_pow_npos_o:Nww #1 \s__fp \__fp_chk:w 1#2#3 @@ -19905,17 +19990,18 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: {#3} } -\cs_new:Npn \__fp_pow_npos_aux:NNnww #1#2#3#4#5; \s__fp \__fp_chk:w 1#6#7#8; +\cs_new:Npn \__fp_pow_npos_aux:NNnww + #1#2#3#4#5\__fp_sep: \s__fp \__fp_chk:w 1#6#7#8\__fp_sep: { #1 \__fp_int_eval:w \__fp_ln_significand:NNNNnnnN #4#5 \__fp_pow_exponent:wnN {#3} - \__fp_fixed_mul:wwn #8 {0000}{0000} ; - \__fp_pow_B:wwN #7; + \__fp_fixed_mul:wwn #8 {0000}{0000} \__fp_sep: + \__fp_pow_B:wwN #7\__fp_sep: #1 #2 0 % fixed_to_float_o:wN } -\cs_new:Npn \__fp_pow_exponent:wnN #1; #2 +\cs_new:Npn \__fp_pow_exponent:wnN #1\__fp_sep: #2 { \if_int_compare:w #2 > \c_zero_int \exp_after:wN \__fp_pow_exponent:Nwnnnnnw % n\ln(10) - (-\ln(x)) @@ -19924,9 +20010,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_pow_exponent:Nwnnnnnw % -(|n|\ln(10) + (-\ln(x))) \exp_after:wN - \fi: - #2; #1; + #2\__fp_sep: #1\__fp_sep: } -\cs_new:Npn \__fp_pow_exponent:Nwnnnnnw #1#2; #3#4#5#6#7#8; +\cs_new:Npn \__fp_pow_exponent:Nwnnnnnw #1#2\__fp_sep: #3#4#5#6#7#8\__fp_sep: { %^^A todo: use that in ln. \exp_after:wN \__fp_fixed_mul_after:wwn \int_value:w \__fp_int_eval:w \c__fp_leading_shift_int @@ -19945,9 +20031,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_pack:NNNNNw \int_value:w \__fp_int_eval:w \c__fp_trailing_shift_int #1 #2*8401 - #1 #7 - #1 ( #2*7991 - #8 ) / 1 0000 ; ; + #1 ( #2*7991 - #8 ) / 1 0000 \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_pow_B:wwN #1#2#3#4#5#6; #7; +\cs_new:Npn \__fp_pow_B:wwN #1#2#3#4#5#6\__fp_sep: #7\__fp_sep: { \if_int_compare:w #7 < \c_zero_int \exp_after:wN \__fp_pow_C_neg:w \int_value:w - @@ -19958,23 +20044,23 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_pow_C_overflow:w \int_value:w \fi: \fi: - #7 \exp_after:wN ; + #7 \exp_after:wN \__fp_sep: \int_value:w \__fp_int_eval:w 10 0000 + #1 \__fp_int_eval_end: - #2#3#4#5#6 0000 0000 0000 0000 0000 0000 ; %^^A todo: how many 0? + #2#3#4#5#6 0000 0000 0000 0000 0000 0000 \__fp_sep: %^^A todo: how many 0? } -\cs_new:Npn \__fp_pow_C_overflow:w #1; #2; #3 +\cs_new:Npn \__fp_pow_C_overflow:w #1\__fp_sep: #2\__fp_sep: #3 { + 2 * \c__fp_max_exponent_int \exp_after:wN \__fp_fixed_continue:wn \c__fp_one_fixed_tl } -\cs_new:Npn \__fp_pow_C_neg:w #1 ; 1 +\cs_new:Npn \__fp_pow_C_neg:w #1 \__fp_sep: 1 { \exp_after:wN \exp_after:wN \exp_after:wN \__fp_pow_C_pack:w \prg_replicate:nn {#1} {0} } -\cs_new:Npn \__fp_pow_C_pos:w #1; 1 - { \__fp_pow_C_pos_loop:wN #1; } -\cs_new:Npn \__fp_pow_C_pos_loop:wN #1; #2 +\cs_new:Npn \__fp_pow_C_pos:w #1\__fp_sep: 1 + { \__fp_pow_C_pos_loop:wN #1\__fp_sep: } +\cs_new:Npn \__fp_pow_C_pos_loop:wN #1\__fp_sep: #2 { \if_meaning:w 0 #1 \exp_after:wN \__fp_pow_C_pack:w @@ -19985,7 +20071,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \exp_after:wN \__fp_pow_C_overflow:w \int_value:w \fi: - \__fp_int_eval:w #1 - 1 \exp_after:wN ; + \__fp_int_eval:w #1 - 1 \exp_after:wN \__fp_sep: \fi: } \cs_new:Npn \__fp_pow_C_pack:w @@ -19994,20 +20080,21 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN 5 \c__fp_one_fixed_tl } -\cs_new:Npn \__fp_pow_neg:www \s__fp \__fp_chk:w #1#2; #3; #4; +\cs_new:Npn \__fp_pow_neg:www + \s__fp \__fp_chk:w #1#2\__fp_sep: #3\__fp_sep: #4\__fp_sep: { - \if_case:w \__fp_pow_neg_case:w #4 ; + \if_case:w \__fp_pow_neg_case:w #4 \__fp_sep: \exp_after:wN \__fp_pow_neg_aux:wNN \or: \if_int_compare:w \__fp_int_eval:w #1 / 2 = \c_one_int - \__fp_invalid_operation_o:Nww ^ #3; #4; + \__fp_invalid_operation_o:Nww ^ #3\__fp_sep: #4\__fp_sep: \exp:w \exp_end_continue_f:w \exp_after:wN \exp_after:wN \exp_after:wN \__fp_use_none_until_s:w \fi: \fi: \__fp_exp_after_o:w - \s__fp \__fp_chk:w #1#2; + \s__fp \__fp_chk:w #1#2\__fp_sep: } \cs_new:Npn \__fp_pow_neg_aux:wNN #1 \s__fp \__fp_chk:w #2#3 { @@ -20017,7 +20104,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN #2 \int_value:w \__fp_int_eval:w 2 - #3 \__fp_int_eval_end: } -\cs_new:Npn \__fp_pow_neg_case:w \s__fp \__fp_chk:w #1#2#3; +\cs_new:Npn \__fp_pow_neg_case:w \s__fp \__fp_chk:w #1#2#3\__fp_sep: { \if_case:w #1 \exp_stop_f: -1 @@ -20037,7 +20124,7 @@ Type H <return> for immediate help}\def~{\errmessage{% {#2} {#3} {#4} {#5} \fi: } -\cs_new:Npn \__fp_pow_neg_case_aux:Nnnw #1#2#3#4 ; +\cs_new:Npn \__fp_pow_neg_case_aux:Nnnw #1#2#3#4 \__fp_sep: { \if_meaning:w 0 #1 \if_int_odd:w #3 \exp_stop_f: @@ -20050,7 +20137,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: } \int_const:Nn \c__fp_fact_max_arg_int { 3248 } -\cs_new:Npn \__fp_fact_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_fact_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_return_o:Nw \c_one_fp @@ -20066,13 +20153,13 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_case_use:nw { \__fp_invalid_operation_o:fw { fact } } \fi: \__fp_fact_pos_o:w - \s__fp \__fp_chk:w #2 #3 #4 ; + \s__fp \__fp_chk:w #2 #3 #4 \__fp_sep: } -\cs_new:Npn \__fp_fact_pos_o:w #1; +\cs_new:Npn \__fp_fact_pos_o:w #1\__fp_sep: { - \__fp_small_int:wTF #1; + \__fp_small_int:wTF #1\__fp_sep: { \__fp_fact_int_o:n } - { \__fp_invalid_operation_o:fw { fact } #1; } + { \__fp_invalid_operation_o:fw { fact } #1\__fp_sep: } } \cs_new:Npn \__fp_fact_int_o:n #1 { @@ -20086,9 +20173,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_sanitize:Nw \exp_after:wN 0 \int_value:w \__fp_int_eval:w - \__fp_fact_loop_o:w #1 . 4 , { 1 } { } { } { } { } { } ; + \__fp_fact_loop_o:w #1 . 4 , { 1 } { } { } { } { } { } \__fp_sep: } -\cs_new:Npn \__fp_fact_loop_o:w #1 . #2 ; +\cs_new:Npn \__fp_fact_loop_o:w #1 . #2 \__fp_sep: { \if_int_compare:w #1 < 12 \exp_stop_f: \__fp_fact_small_o:w #1 @@ -20096,14 +20183,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_ep_mul:wwwwn \exp_after:wN 4 \exp_after:wN , \exp_after:wN { \int_value:w \__fp_int_eval:w #1 * (#1 - 1) } - { } { } { } { } { } ; - #2 ; + { } { } { } { } { } \__fp_sep: + #2 \__fp_sep: { \exp_after:wN \__fp_fact_loop_o:w \int_value:w \__fp_int_eval:w #1 - 2 . } } -\cs_new:Npn \__fp_fact_small_o:w #1 \fi: #2 ; #3 ; #4 +\cs_new:Npn \__fp_fact_small_o:w #1 \fi: #2 \__fp_sep: #3 \__fp_sep: #4 { \fi: \exp_after:wN \__fp_ep_mul:wwwwn @@ -20115,8 +20202,8 @@ Type H <return> for immediate help}\def~{\errmessage{% 1 \or: 1 \or: 2 \or: 6 \or: 24 \or: 120 \or: 720 \or: 5040 \or: 40320 \or: 362880 \or: 3628800 \or: 39916800 \fi: - } { } { } { } { } { } ; - #3 ; + } { } { } { } { } { } \__fp_sep: + #3 \__fp_sep: \__fp_ep_to_float_o:wwN 0 } %% File: l3fp-trig.dtx @@ -20147,7 +20234,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_parse_function:NNN \__fp_atan_o:Nw \use_i:nn } \cs_new:Npn \__fp_parse_word_atand:N { \__fp_parse_function:NNN \__fp_atan_o:Nw \use_ii:nn } -\cs_new:Npn \__fp_sin_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_sin_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_return_same_o:w @@ -20160,9 +20247,9 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_invalid_operation_o:fw { #1 { sin } { sind } } } \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3 #4; + \s__fp \__fp_chk:w #2 #3 #4\__fp_sep: } -\cs_new:Npn \__fp_cos_o:w #1 \s__fp \__fp_chk:w #2#3; @ +\cs_new:Npn \__fp_cos_o:w #1 \s__fp \__fp_chk:w #2#3\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_return_o:Nw \c_one_fp @@ -20175,9 +20262,9 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_invalid_operation_o:fw { #1 { cos } { cosd } } } \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3; + \s__fp \__fp_chk:w #2 #3\__fp_sep: } -\cs_new:Npn \__fp_csc_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_csc_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_cot_zero_o:Nfw #3 { #1 { csc } { cscd } } @@ -20190,9 +20277,9 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_invalid_operation_o:fw { #1 { csc } { cscd } } } \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3 #4; + \s__fp \__fp_chk:w #2 #3 #4\__fp_sep: } -\cs_new:Npn \__fp_sec_o:w #1 \s__fp \__fp_chk:w #2#3; @ +\cs_new:Npn \__fp_sec_o:w #1 \s__fp \__fp_chk:w #2#3\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_return_o:Nw \c_one_fp @@ -20205,9 +20292,9 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_invalid_operation_o:fw { #1 { sec } { secd } } } \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3; + \s__fp \__fp_chk:w #2 #3\__fp_sep: } -\cs_new:Npn \__fp_tan_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_tan_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_return_same_o:w @@ -20220,9 +20307,9 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_invalid_operation_o:fw { #1 { tan } { tand } } } \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3 #4; + \s__fp \__fp_chk:w #2 #3 #4\__fp_sep: } -\cs_new:Npn \__fp_cot_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_cot_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_cot_zero_o:Nfw #3 { #1 { cot } { cotd } } @@ -20235,7 +20322,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_invalid_operation_o:fw { #1 { cot } { cotd } } } \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3 #4; + \s__fp \__fp_chk:w #2 #3 #4\__fp_sep: } \cs_new:Npn \__fp_cot_zero_o:Nfw #1#2#3 \fi: { @@ -20245,7 +20332,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_args:NNf \__fp_division_by_zero_o:Nnw \c_minus_inf_fp } {#2} } -\cs_new:Npn \__fp_trig:NNNNNwn #1#2#3#4#5 \s__fp \__fp_chk:w 1#6#7#8; +\cs_new:Npn \__fp_trig:NNNNNwn #1#2#3#4#5 \s__fp \__fp_chk:w 1#6#7#8\__fp_sep: { \exp_after:wN #2 \exp_after:wN #3 @@ -20257,44 +20344,44 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: #1 \__fp_trig_small:ww \__fp_trigd_small:ww \fi: - #7,#8{0000}{0000}; + #7,#8{0000}{0000}\__fp_sep: } -\cs_new:Npn \__fp_trig_small:ww #1,#2; - { \__fp_ep_to_fixed:wwn #1,#2; . #1,#2; } -\cs_new:Npn \__fp_trigd_small:ww #1,#2; +\cs_new:Npn \__fp_trig_small:ww #1,#2\__fp_sep: + { \__fp_ep_to_fixed:wwn #1,#2\__fp_sep: . #1,#2\__fp_sep: } +\cs_new:Npn \__fp_trigd_small:ww #1,#2\__fp_sep: { \__fp_ep_mul_raw:wwwwN - -1,{1745}{3292}{5199}{4329}{5769}{2369}; #1,#2; + -1,{1745}{3292}{5199}{4329}{5769}{2369}\__fp_sep: #1,#2\__fp_sep: \__fp_trig_small:ww } -\cs_new:Npn \__fp_trigd_large:ww #1, #2#3#4#5#6#7; +\cs_new:Npn \__fp_trigd_large:ww #1, #2#3#4#5#6#7\__fp_sep: { \exp_after:wN \__fp_pack_eight:wNNNNNNNN \exp_after:wN \__fp_pack_eight:wNNNNNNNN \exp_after:wN \__fp_pack_twice_four:wNNNNNNNN \exp_after:wN \__fp_pack_twice_four:wNNNNNNNN \exp_after:wN \__fp_trigd_large_auxi:nnnnwNNNN - \exp_after:wN ; + \exp_after:wN \__fp_sep: \exp:w \exp_end_continue_f:w \prg_replicate:nn { \int_max:nn { 22 - #1 } { 0 } } { 0 } #2#3#4#5#6#7 0000 0000 0000 ! } -\cs_new:Npn \__fp_trigd_large_auxi:nnnnwNNNN #1#2#3#4#5; #6#7#8#9 +\cs_new:Npn \__fp_trigd_large_auxi:nnnnwNNNN #1#2#3#4#5\__fp_sep: #6#7#8#9 { \exp_after:wN \__fp_trigd_large_auxii:wNw \int_value:w \__fp_int_eval:w #1 + #2 - (#1 + #2 - 4) / 9 * 9 \__fp_int_eval_end: - #3; - #4; #5{#6#7#8#9}; + #3\__fp_sep: + #4\__fp_sep: #5{#6#7#8#9}\__fp_sep: } -\cs_new:Npn \__fp_trigd_large_auxii:wNw #1; #2#3; +\cs_new:Npn \__fp_trigd_large_auxii:wNw #1\__fp_sep: #2#3\__fp_sep: { + (#1#2 - 4) / 9 * 2 \exp_after:wN \__fp_trigd_large_auxiii:www \int_value:w \__fp_int_eval:w #1#2 - - (#1#2 - 4) / 9 * 9 \__fp_int_eval_end: #3 ; + - (#1#2 - 4) / 9 * 9 \__fp_int_eval_end: #3 \__fp_sep: } -\cs_new:Npn \__fp_trigd_large_auxiii:www #1; #2; #3! +\cs_new:Npn \__fp_trigd_large_auxiii:www #1\__fp_sep: #2\__fp_sep: #3! { \if_int_compare:w #1 < 4500 \exp_stop_f: \exp_after:wN \__fp_use_i_until_s:nw @@ -20302,8 +20389,8 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: + 1 \fi: - \__fp_fixed_sub:wwn {9000}{0000}{0000}{0000}{0000}{0000}; - {#1}#2{0000}{0000}; + \__fp_fixed_sub:wwn {9000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: + {#1}#2{0000}{0000}\__fp_sep: { \__fp_trigd_small:ww 2, } } \intarray_const_from_clist:Nn \c__fp_trig_intarray @@ -20520,12 +20607,12 @@ Type H <return> for immediate help}\def~{\errmessage{% 159592267, 181172796, 144388537, 196763139, 127431422, 179531145, 100064922, 112650013, 132686230, 121550837, } -\cs_new:Npn \__fp_trig_large:ww #1, #2#3#4#5#6; +\cs_new:Npn \__fp_trig_large:ww #1, #2#3#4#5#6\__fp_sep: { \exp_after:wN \__fp_trig_large_auxi:w \int_value:w \__fp_int_eval:w (#1 - 4) / 8 \exp_after:wN , - \int_value:w #1 , ; - {#2}{#3}{#4}{#5} ; + \int_value:w #1 , \__fp_sep: + {#2}{#3}{#4}{#5} \__fp_sep: } \cs_new:Npn \__fp_trig_large_auxi:w #1, #2, { @@ -20570,10 +20657,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN \__fp_pack_twice_four:wNNNNNNNN - \__fp_trig_large_auxv:www ; + \__fp_trig_large_auxv:www \__fp_sep: } \cs_new:Npn \__fp_trig_large_auxiii:w 1 { \exp_stop_f: } -\cs_new:Npn \__fp_trig_large_auxv:www #1; #2; #3; +\cs_new:Npn \__fp_trig_large_auxv:www #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: { \exp_after:wN \__fp_use_i_until_s:nw \exp_after:wN \__fp_trig_large_auxvii:w @@ -20582,24 +20669,24 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_trig_large_auxvi:wnnnnnnnn } + \c__fp_trailing_shift_int - \c__fp_middle_shift_int \__fp_use_i_until_s:nw - ; #3 #1 ; ; + \__fp_sep: #3 #1 \__fp_sep: \__fp_sep: } -\cs_new:Npn \__fp_trig_large_auxvi:wnnnnnnnn #1; #2#3#4#5#6#7#8#9 +\cs_new:Npn \__fp_trig_large_auxvi:wnnnnnnnn #1\__fp_sep: #2#3#4#5#6#7#8#9 { \exp_after:wN \__fp_trig_large_pack:NNNNNw \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int + #2*#9 + #3*#8 + #4*#7 + #5*#6 - #1; {#2}{#3}{#4}{#5} {#7}{#8}{#9} + #1\__fp_sep: {#2}{#3}{#4}{#5} {#7}{#8}{#9} } -\cs_new:Npn \__fp_trig_large_pack:NNNNNw #1#2#3#4#5#6; - { + #1#2#3#4#5 ; #6 } +\cs_new:Npn \__fp_trig_large_pack:NNNNNw #1#2#3#4#5#6\__fp_sep: + { + #1#2#3#4#5 \__fp_sep: #6 } \cs_new:Npn \__fp_trig_large_auxvii:w #1#2#3 { \exp_after:wN \__fp_trig_large_auxviii:ww - \int_value:w \__fp_int_eval:w (#1#2#3 - 62) / 125 ; + \int_value:w \__fp_int_eval:w (#1#2#3 - 62) / 125 \__fp_sep: #1#2#3 } -\cs_new:Npn \__fp_trig_large_auxviii:ww #1; +\cs_new:Npn \__fp_trig_large_auxviii:ww #1\__fp_sep: { + #1 \if_int_odd:w #1 \exp_stop_f: @@ -20618,25 +20705,25 @@ Type H <return> for immediate help}\def~{\errmessage{% \prg_replicate:nn { 13 } { \__fp_trig_large_auxx:wNNNNN } + \c__fp_trailing_shift_int - \c__fp_middle_shift_int - ; + \__fp_sep: } -\cs_new:Npn \__fp_trig_large_auxx:wNNNNN #1; #2 #3#4#5#6 +\cs_new:Npn \__fp_trig_large_auxx:wNNNNN #1\__fp_sep: #2 #3#4#5#6 { \exp_after:wN \__fp_trig_large_pack:NNNNNw \int_value:w \__fp_int_eval:w \c__fp_middle_shift_int #2 8 * #3#4#5#6 - #1; #2 + #1\__fp_sep: #2 } -\cs_new:Npn \__fp_trig_large_auxxi:w #1; +\cs_new:Npn \__fp_trig_large_auxxi:w #1\__fp_sep: { \exp_after:wN \__fp_ep_mul_raw:wwwwN - \int_value:w \__fp_int_eval:w 0 \__fp_ep_to_ep_loop:N #1 ; ; ! - 0,{7853}{9816}{3397}{4483}{0961}{5661}; + \int_value:w \__fp_int_eval:w 0 \__fp_ep_to_ep_loop:N #1 \__fp_sep: \__fp_sep: ! + 0,{7853}{9816}{3397}{4483}{0961}{5661}\__fp_sep: \__fp_trig_small:ww } -\cs_new:Npn \__fp_sin_series_o:NNwwww #1#2#3. #4; +\cs_new:Npn \__fp_sin_series_o:NNwwww #1#2#3. #4\__fp_sep: { - \__fp_fixed_mul:wwn #4; #4; + \__fp_fixed_mul:wwn #4\__fp_sep: #4\__fp_sep: { \exp_after:wN \__fp_sin_series_aux_o:NNnwww \exp_after:wN #1 @@ -20649,7 +20736,7 @@ Type H <return> for immediate help}\def~{\errmessage{% {#3} } } -\cs_new:Npn \__fp_sin_series_aux_o:NNnwww #1#2#3 #4; #5,#6; +\cs_new:Npn \__fp_sin_series_aux_o:NNnwww #1#2#3 #4\__fp_sep: #5,#6\__fp_sep: { \if_int_odd:w \__fp_int_eval:w #3 / 2 \__fp_int_eval_end: \exp_after:wN \use_i:nn @@ -20657,29 +20744,46 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \use_ii:nn \fi: { % 1/18! - \__fp_fixed_mul_sub_back:wwwn {0000}{0000}{0000}{0001}{5619}{2070}; - #4;{0000}{0000}{0000}{0477}{9477}{3324}; - \__fp_fixed_mul_sub_back:wwwn #4;{0000}{0000}{0011}{4707}{4559}{7730}; - \__fp_fixed_mul_sub_back:wwwn #4;{0000}{0000}{2087}{6756}{9878}{6810}; - \__fp_fixed_mul_sub_back:wwwn #4;{0000}{0027}{5573}{1922}{3985}{8907}; - \__fp_fixed_mul_sub_back:wwwn #4;{0000}{2480}{1587}{3015}{8730}{1587}; - \__fp_fixed_mul_sub_back:wwwn #4;{0013}{8888}{8888}{8888}{8888}{8889}; - \__fp_fixed_mul_sub_back:wwwn #4;{0416}{6666}{6666}{6666}{6666}{6667}; - \__fp_fixed_mul_sub_back:wwwn #4;{5000}{0000}{0000}{0000}{0000}{0000}; - \__fp_fixed_mul_sub_back:wwwn#4;{10000}{0000}{0000}{0000}{0000}{0000}; + \__fp_fixed_mul_sub_back:wwwn {0000}{0000}{0000}{0001}{5619}{2070}\__fp_sep: + #4\__fp_sep: + {0000}{0000}{0000}{0477}{9477}{3324}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0000}{0000}{0011}{4707}{4559}{7730}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0000}{0000}{2087}{6756}{9878}{6810}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0000}{0027}{5573}{1922}{3985}{8907}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0000}{2480}{1587}{3015}{8730}{1587}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0013}{8888}{8888}{8888}{8888}{8889}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0416}{6666}{6666}{6666}{6666}{6667}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {5000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn#4\__fp_sep: + {10000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: { \__fp_fixed_continue:wn 0, } } { % 1/17! - \__fp_fixed_mul_sub_back:wwwn {0000}{0000}{0000}{0028}{1145}{7254}; - #4;{0000}{0000}{0000}{7647}{1637}{3182}; - \__fp_fixed_mul_sub_back:wwwn #4;{0000}{0000}{0160}{5904}{3836}{8216}; - \__fp_fixed_mul_sub_back:wwwn #4;{0000}{0002}{5052}{1083}{8544}{1719}; - \__fp_fixed_mul_sub_back:wwwn #4;{0000}{0275}{5731}{9223}{9858}{9065}; - \__fp_fixed_mul_sub_back:wwwn #4;{0001}{9841}{2698}{4126}{9841}{2698}; - \__fp_fixed_mul_sub_back:wwwn #4;{0083}{3333}{3333}{3333}{3333}{3333}; - \__fp_fixed_mul_sub_back:wwwn #4;{1666}{6666}{6666}{6666}{6666}{6667}; - \__fp_fixed_mul_sub_back:wwwn#4;{10000}{0000}{0000}{0000}{0000}{0000}; - { \__fp_ep_mul:wwwwn 0, } #5,#6; + \__fp_fixed_mul_sub_back:wwwn {0000}{0000}{0000}{0028}{1145}{7254}\__fp_sep: + #4\__fp_sep: + {0000}{0000}{0000}{7647}{1637}{3182}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0000}{0000}{0160}{5904}{3836}{8216}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0000}{0002}{5052}{1083}{8544}{1719}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0000}{0275}{5731}{9223}{9858}{9065}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0001}{9841}{2698}{4126}{9841}{2698}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {0083}{3333}{3333}{3333}{3333}{3333}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #4\__fp_sep: + {1666}{6666}{6666}{6666}{6666}{6667}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn#4\__fp_sep: + {10000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: + { \__fp_ep_mul:wwwwn 0, } #5,#6\__fp_sep: } { \exp_after:wN \__fp_sanitize:Nw @@ -20688,9 +20792,9 @@ Type H <return> for immediate help}\def~{\errmessage{% } #2 } -\cs_new:Npn \__fp_tan_series_o:NNwwww #1#2#3. #4; +\cs_new:Npn \__fp_tan_series_o:NNwwww #1#2#3. #4\__fp_sep: { - \__fp_fixed_mul:wwn #4; #4; + \__fp_fixed_mul:wwn #4\__fp_sep: #4\__fp_sep: { \exp_after:wN \__fp_tan_series_aux_o:Nnwww \int_value:w @@ -20701,22 +20805,32 @@ Type H <return> for immediate help}\def~{\errmessage{% {#3} } } -\cs_new:Npn \__fp_tan_series_aux_o:Nnwww #1 #2 #3; #4,#5; - { - \__fp_fixed_mul_sub_back:wwwn {0000}{0000}{1527}{3493}{0856}{7059}; - #3; {0000}{0159}{6080}{0274}{5257}{6472}; - \__fp_fixed_mul_sub_back:wwwn #3; {0002}{4571}{2320}{0157}{2558}{8481}; - \__fp_fixed_mul_sub_back:wwwn #3; {0115}{5830}{7533}{5397}{3168}{2147}; - \__fp_fixed_mul_sub_back:wwwn #3; {1929}{8245}{6140}{3508}{7719}{2982}; - \__fp_fixed_mul_sub_back:wwwn #3;{10000}{0000}{0000}{0000}{0000}{0000}; - { \__fp_ep_mul:wwwwn 0, } #4,#5; +\cs_new:Npn \__fp_tan_series_aux_o:Nnwww #1 #2 #3\__fp_sep: #4,#5\__fp_sep: + { + \__fp_fixed_mul_sub_back:wwwn {0000}{0000}{1527}{3493}{0856}{7059}\__fp_sep: + #3\__fp_sep: + {0000}{0159}{6080}{0274}{5257}{6472}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #3\__fp_sep: + {0002}{4571}{2320}{0157}{2558}{8481}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #3\__fp_sep: + {0115}{5830}{7533}{5397}{3168}{2147}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #3\__fp_sep: + {1929}{8245}{6140}{3508}{7719}{2982}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #3\__fp_sep: + {10000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: + { \__fp_ep_mul:wwwwn 0, } #4,#5\__fp_sep: { - \__fp_fixed_mul_sub_back:wwwn {0000}{0007}{0258}{0681}{9408}{4706}; - #3;{0000}{2343}{7175}{1399}{6151}{7670}; - \__fp_fixed_mul_sub_back:wwwn #3;{0019}{2638}{4588}{9232}{8861}{3691}; - \__fp_fixed_mul_sub_back:wwwn #3;{0536}{6357}{0691}{4344}{6852}{4252}; - \__fp_fixed_mul_sub_back:wwwn #3;{5263}{1578}{9473}{6842}{1052}{6315}; - \__fp_fixed_mul_sub_back:wwwn#3;{10000}{0000}{0000}{0000}{0000}{0000}; + \__fp_fixed_mul_sub_back:wwwn {0000}{0007}{0258}{0681}{9408}{4706}\__fp_sep: + #3\__fp_sep: + {0000}{2343}{7175}{1399}{6151}{7670}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #3\__fp_sep: + {0019}{2638}{4588}{9232}{8861}{3691}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #3\__fp_sep: + {0536}{6357}{0691}{4344}{6852}{4252}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn #3\__fp_sep: + {5263}{1578}{9473}{6842}{1052}{6315}\__fp_sep: + \__fp_fixed_mul_sub_back:wwwn#3\__fp_sep: + {10000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: { \reverse_if:N \if_int_odd:w \__fp_int_eval:w (#2 - 1) / 2 \__fp_int_eval_end: @@ -20746,7 +20860,7 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new:Npe \__fp_atan_default:w #1#2#3 @ { #1 #2 #3 \c_one_fp @ } \cs_new:Npn \__fp_atanii_o:Nww - #1 \s__fp \__fp_chk:w #2#3#4; \s__fp \__fp_chk:w #5 #6 @ + #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: \s__fp \__fp_chk:w #5 #6 @ { \if_meaning:w 3 #2 \__fp_case_return_i_o:ww \fi: \if_meaning:w 3 #5 \__fp_case_return_ii_o:ww \fi: @@ -20762,29 +20876,29 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \__fp_case_return:nw { \__fp_atan_inf_o:NNNw #1 #3 0 } \fi: \__fp_atan_normal_o:NNnwNnw #1 - \s__fp \__fp_chk:w #2#3#4; + \s__fp \__fp_chk:w #2#3#4\__fp_sep: \s__fp \__fp_chk:w #5 #6 } -\cs_new:Npn \__fp_acotii_o:Nww #1#2; #3; - { \__fp_atanii_o:Nww #1#3; #2; } -\cs_new:Npn \__fp_atan_inf_o:NNNw #1#2#3 \s__fp \__fp_chk:w #4#5#6; +\cs_new:Npn \__fp_acotii_o:Nww #1#2\__fp_sep: #3\__fp_sep: + { \__fp_atanii_o:Nww #1#3\__fp_sep: #2\__fp_sep: } +\cs_new:Npn \__fp_atan_inf_o:NNNw #1#2#3 \s__fp \__fp_chk:w #4#5#6\__fp_sep: { \exp_after:wN \__fp_atan_combine_o:NwwwwwN \exp_after:wN #2 \int_value:w \__fp_int_eval:w - \if_meaning:w 2 #5 7 - \fi: #3 \exp_after:wN ; + \if_meaning:w 2 #5 7 - \fi: #3 \exp_after:wN \__fp_sep: \c__fp_one_fixed_tl - {0000}{0000}{0000}{0000}{0000}{0000}; - 0,{0000}{0000}{0000}{0000}{0000}{0000}; #1 + {0000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: + 0,{0000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: #1 } \cs_new_protected:Npn \__fp_atan_normal_o:NNnwNnw - #1 \s__fp \__fp_chk:w 1#2#3#4; \s__fp \__fp_chk:w 1#5#6#7; + #1 \s__fp \__fp_chk:w 1#2#3#4\__fp_sep: \s__fp \__fp_chk:w 1#5#6#7\__fp_sep: { \__fp_atan_test_o:NwwNwwN - #2 #3, #4{0000}{0000}; - #5 #6, #7{0000}{0000}; #1 + #2 #3, #4{0000}{0000}\__fp_sep: + #5 #6, #7{0000}{0000}\__fp_sep: #1 } -\cs_new:Npn \__fp_atan_test_o:NwwNwwN #1#2,#3; #4#5,#6; +\cs_new:Npn \__fp_atan_test_o:NwwNwwN #1#2,#3\__fp_sep: #4#5,#6\__fp_sep: { \exp_after:wN \__fp_atan_combine_o:NwwwwwN \exp_after:wN #1 @@ -20793,13 +20907,13 @@ Type H <return> for immediate help}\def~{\errmessage{% 7 - \__fp_int_eval:w \fi: \if_int_compare:w - \__fp_ep_compare:wwww #2,#3; #5,#6; > \c_zero_int + \__fp_ep_compare:wwww #2,#3\__fp_sep: #5,#6\__fp_sep: > \c_zero_int 3 - \exp_after:wN \__fp_reverse_args:Nww \fi: - \__fp_atan_div:wnwwnw #2,#3; #5,#6; + \__fp_atan_div:wnwwnw #2,#3\__fp_sep: #5,#6\__fp_sep: } -\cs_new:Npn \__fp_atan_div:wnwwnw #1,#2#3; #4,#5#6; +\cs_new:Npn \__fp_atan_div:wnwwnw #1,#2#3\__fp_sep: #4,#5#6\__fp_sep: { \if_int_compare:w \__fp_int_eval:w 41421 * #5 < #2 000 @@ -20809,49 +20923,50 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_atan_near:wwwn \fi: 0 - \__fp_ep_div:wwwwn #1,{#2}#3; #4,{#5}#6; + \__fp_ep_div:wwwwn #1,{#2}#3\__fp_sep: #4,{#5}#6\__fp_sep: \__fp_atan_auxi:ww } \cs_new:Npn \__fp_atan_near:wwwn - 0 \__fp_ep_div:wwwwn #1,#2; #3, + 0 \__fp_ep_div:wwwwn #1,#2\__fp_sep: #3, { 1 - \__fp_ep_to_fixed:wwn #1 - #3, #2; + \__fp_ep_to_fixed:wwn #1 - #3, #2\__fp_sep: \__fp_atan_near_aux:wwn } -\cs_new:Npn \__fp_atan_near_aux:wwn #1; #2; +\cs_new:Npn \__fp_atan_near_aux:wwn #1\__fp_sep: #2\__fp_sep: { - \__fp_fixed_add:wwn #1; #2; - { \__fp_fixed_sub:wwn #2; #1; { \__fp_ep_div:wwwwn 0, } 0, } + \__fp_fixed_add:wwn #1\__fp_sep: #2\__fp_sep: + { \__fp_fixed_sub:wwn #2\__fp_sep: #1\__fp_sep: { \__fp_ep_div:wwwwn 0, } 0, } } -\cs_new:Npn \__fp_atan_auxi:ww #1,#2; - { \__fp_ep_to_fixed:wwn #1,#2; \__fp_atan_auxii:w #1,#2; } -\cs_new:Npn \__fp_atan_auxii:w #1; +\cs_new:Npn \__fp_atan_auxi:ww #1,#2\__fp_sep: + { \__fp_ep_to_fixed:wwn #1,#2\__fp_sep: \__fp_atan_auxii:w #1,#2\__fp_sep: } +\cs_new:Npn \__fp_atan_auxii:w #1\__fp_sep: { - \__fp_fixed_mul:wwn #1; #1; + \__fp_fixed_mul:wwn #1\__fp_sep: #1\__fp_sep: { - \__fp_atan_Taylor_loop:www 39 ; - {0000}{0000}{0000}{0000}{0000}{0000} ; + \__fp_atan_Taylor_loop:www 39 \__fp_sep: + {0000}{0000}{0000}{0000}{0000}{0000} \__fp_sep: } - ! #1; + ! #1\__fp_sep: } -\cs_new:Npn \__fp_atan_Taylor_loop:www #1; #2; #3; +\cs_new:Npn \__fp_atan_Taylor_loop:www #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: { \if_int_compare:w #1 = - \c_one_int \__fp_atan_Taylor_break:w \fi: - \exp_after:wN \__fp_fixed_div_int:wwN \c__fp_one_fixed_tl #1; - \__fp_rrot:www \__fp_fixed_mul_sub_back:wwwn #2; #3; + \exp_after:wN \__fp_fixed_div_int:wwN \c__fp_one_fixed_tl #1\__fp_sep: + \__fp_rrot:www \__fp_fixed_mul_sub_back:wwwn #2\__fp_sep: #3\__fp_sep: { \exp_after:wN \__fp_atan_Taylor_loop:www - \int_value:w \__fp_int_eval:w #1 - 2 ; + \int_value:w \__fp_int_eval:w #1 - 2 \__fp_sep: } - #3; + #3\__fp_sep: } \cs_new:Npn \__fp_atan_Taylor_break:w - \fi: #1 \__fp_fixed_mul_sub_back:wwwn #2; #3 ! - { \fi: ; #2 ; } -\cs_new:Npn \__fp_atan_combine_o:NwwwwwN #1 #2; #3; #4; #5,#6; #7 + \fi: #1 \__fp_fixed_mul_sub_back:wwwn #2\__fp_sep: #3 ! + { \fi: \__fp_sep: #2 \__fp_sep: } +\cs_new:Npn \__fp_atan_combine_o:NwwwwwN + #1 #2\__fp_sep: #3\__fp_sep: #4\__fp_sep: #5,#6\__fp_sep: #7 { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN #1 @@ -20861,22 +20976,22 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \exp_after:wN \use_ii:nn \fi: - { #5 \__fp_fixed_mul:wwn #3; #6; } + { #5 \__fp_fixed_mul:wwn #3\__fp_sep: #6\__fp_sep: } { - \__fp_fixed_mul:wwn #3; #4; + \__fp_fixed_mul:wwn #3\__fp_sep: #4\__fp_sep: { \exp_after:wN \__fp_atan_combine_aux:ww - \int_value:w \__fp_int_eval:w #2 / 2 ; #2; + \int_value:w \__fp_int_eval:w #2 / 2 \__fp_sep: #2\__fp_sep: } } { #7 \__fp_fixed_to_float_o:wN \__fp_fixed_to_float_rad_o:wN } #1 } -\cs_new:Npn \__fp_atan_combine_aux:ww #1; #2; +\cs_new:Npn \__fp_atan_combine_aux:ww #1\__fp_sep: #2\__fp_sep: { \__fp_fixed_mul_short:wwn - {7853}{9816}{3397}{4483}{0961}{5661}; - {#1}{0000}{0000}; + {7853}{9816}{3397}{4483}{0961}{5661}\__fp_sep: + {#1}{0000}{0000}\__fp_sep: { \if_int_odd:w #2 \exp_stop_f: \exp_after:wN \__fp_fixed_sub:wwn @@ -20885,7 +21000,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: } } -\cs_new:Npn \__fp_asin_o:w #1 \s__fp \__fp_chk:w #2#3; @ +\cs_new:Npn \__fp_asin_o:w #1 \s__fp \__fp_chk:w #2#3\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_return_same_o:w @@ -20898,9 +21013,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3; + \s__fp \__fp_chk:w #2 #3\__fp_sep: } -\cs_new:Npn \__fp_acos_o:w #1 \s__fp \__fp_chk:w #2#3; @ +\cs_new:Npn \__fp_acos_o:w #1 \s__fp \__fp_chk:w #2#3\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_use:nw { \__fp_atan_inf_o:NNNw #1 0 4 } @@ -20916,10 +21031,10 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3; + \s__fp \__fp_chk:w #2 #3\__fp_sep: } \cs_new:Npn \__fp_asin_normal_o:NfwNnnnnw - #1#2#3 \s__fp \__fp_chk:w 1#4#5#6#7#8#9; + #1#2#3 \s__fp \__fp_chk:w 1#4#5#6#7#8#9\__fp_sep: { \if_int_compare:w #5 < \c_one_int \exp_after:wN \__fp_use_none_until_s:w @@ -20929,30 +21044,30 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \__fp_use_i:ww \__fp_invalid_operation_o:fw {#2} - \s__fp \__fp_chk:w 1#4{#5}{#6}{#7}{#8}{#9}; + \s__fp \__fp_chk:w 1#4{#5}{#6}{#7}{#8}{#9}\__fp_sep: \__fp_asin_auxi_o:NnNww - #1 {#3} #4 #5,{#6}{#7}{#8}{#9}{0000}{0000}; + #1 {#3} #4 #5,{#6}{#7}{#8}{#9}{0000}{0000}\__fp_sep: } -\cs_new:Npn \__fp_asin_auxi_o:NnNww #1#2#3#4,#5; +\cs_new:Npn \__fp_asin_auxi_o:NnNww #1#2#3#4,#5\__fp_sep: { - \__fp_ep_to_fixed:wwn #4,#5; + \__fp_ep_to_fixed:wwn #4,#5\__fp_sep: \__fp_asin_isqrt:wn - \__fp_ep_mul:wwwwn #4,#5; + \__fp_ep_mul:wwwwn #4,#5\__fp_sep: \__fp_ep_to_ep:wwN \__fp_fixed_continue:wn { #2 \__fp_atan_test_o:NwwNwwN #3 } - 0 1,{1000}{0000}{0000}{0000}{0000}{0000}; #1 + 0 1,{1000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: #1 } -\cs_new:Npn \__fp_asin_isqrt:wn #1; +\cs_new:Npn \__fp_asin_isqrt:wn #1\__fp_sep: { - \exp_after:wN \__fp_fixed_sub:wwn \c__fp_one_fixed_tl #1; + \exp_after:wN \__fp_fixed_sub:wwn \c__fp_one_fixed_tl #1\__fp_sep: { - \__fp_fixed_add_one:wN #1; + \__fp_fixed_add_one:wN #1\__fp_sep: \__fp_fixed_continue:wn { \__fp_ep_mul:wwwwn 0, } 0, } \__fp_ep_isqrt:wwn } -\cs_new:Npn \__fp_acsc_o:w #1 \s__fp \__fp_chk:w #2#3#4; @ +\cs_new:Npn \__fp_acsc_o:w #1 \s__fp \__fp_chk:w #2#3#4\__fp_sep: @ { \if_case:w \if_meaning:w 2 #2 #3 \fi: #2 \exp_stop_f: \__fp_case_use:nw @@ -20963,9 +21078,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \__fp_case_return_same_o:w \else: \__fp_case_return_o:Nw \c_minus_zero_fp \fi: - \s__fp \__fp_chk:w #2 #3 #4; + \s__fp \__fp_chk:w #2 #3 #4\__fp_sep: } -\cs_new:Npn \__fp_asec_o:w #1 \s__fp \__fp_chk:w #2#3; @ +\cs_new:Npn \__fp_asec_o:w #1 \s__fp \__fp_chk:w #2#3\__fp_sep: @ { \if_case:w #2 \exp_stop_f: \__fp_case_use:nw @@ -20979,24 +21094,24 @@ Type H <return> for immediate help}\def~{\errmessage{% \or: \__fp_case_use:nw { \__fp_atan_inf_o:NNNw #1 0 4 } \else: \__fp_case_return_same_o:w \fi: - \s__fp \__fp_chk:w #2 #3; + \s__fp \__fp_chk:w #2 #3\__fp_sep: } -\cs_new:Npn \__fp_acsc_normal_o:NfwNnw #1#2#3 \s__fp \__fp_chk:w 1#4#5#6; +\cs_new:Npn \__fp_acsc_normal_o:NfwNnw #1#2#3 \s__fp \__fp_chk:w 1#4#5#6\__fp_sep: { \int_compare:nNnTF {#5} < 1 { \__fp_invalid_operation_o:fw {#2} - \s__fp \__fp_chk:w 1#4{#5}#6; + \s__fp \__fp_chk:w 1#4{#5}#6\__fp_sep: } { \__fp_ep_div:wwwwn - 1,{1000}{0000}{0000}{0000}{0000}{0000}; - #5,#6{0000}{0000}; + 1,{1000}{0000}{0000}{0000}{0000}{0000}\__fp_sep: + #5,#6{0000}{0000}\__fp_sep: { \__fp_asin_auxi_o:NnNww #1 {#3} #4 } } } %% File: l3fp-convert.dtx -\cs_new:Npn \__fp_tuple_convert:Nw #1 \s__fp_tuple \__fp_tuple_chk:w #2 ; +\cs_new:Npn \__fp_tuple_convert:Nw #1 \s__fp_tuple \__fp_tuple_chk:w #2 \__fp_sep: { \int_case:nnF { \__fp_array_count:n {#2} } { @@ -21005,26 +21120,29 @@ Type H <return> for immediate help}\def~{\errmessage{% } { \__fp_tuple_convert_loop:nNw { } #1 - #2 { ? \__fp_tuple_convert_end:w } ; + #2 { ? \__fp_tuple_convert_end:w } \__fp_sep: @ { \use_none:nn } } } -\cs_new:Npn \__fp_tuple_convert_loop:nNw #1#2#3#4; #5 @ #6 +\cs_new:Npn \__fp_tuple_convert_loop:nNw #1#2#3#4\__fp_sep: #5 @ #6 { \use_none:n #3 - \exp_args:Nf \__fp_tuple_convert_loop:nNw { #2 #3#4 ; } #2 #5 + \exp_args:Nf \__fp_tuple_convert_loop:nNw { #2 #3#4 \__fp_sep: } #2 #5 @ { #6 , ~ #1 } } \cs_new:Npn \__fp_tuple_convert_end:w #1 @ #2 { \exp_after:wN ( \exp:w \exp_end_continue_f:w #2 ) } -\cs_new:Npn \__fp_trim_zeros:w #1 ; +\cs_new:Npn \__fp_trim_zeros:w #1 \__fp_sep: { - \__fp_trim_zeros_loop:w #1 - ; \__fp_trim_zeros_loop:w 0; \__fp_trim_zeros_dot:w .; \s__fp_stop + \__fp_trim_zeros_loop:w #1 \__fp_sep: + \__fp_trim_zeros_loop:w 0\__fp_sep: + \__fp_trim_zeros_dot:w .\__fp_sep: + \s__fp_stop } -\cs_new:Npn \__fp_trim_zeros_loop:w #1 0; #2 { #2 #1 ; #2 } -\cs_new:Npn \__fp_trim_zeros_dot:w #1 .; { \__fp_trim_zeros_end:w #1 ; } -\cs_new:Npn \__fp_trim_zeros_end:w #1 ; #2 \s__fp_stop { #1 } +\cs_new:Npn \__fp_trim_zeros_loop:w #1 0\__fp_sep: #2 { #2 #1 \__fp_sep: #2 } +\cs_new:Npn \__fp_trim_zeros_dot:w #1 .\__fp_sep: + { \__fp_trim_zeros_end:w #1 \__fp_sep: } +\cs_new:Npn \__fp_trim_zeros_end:w #1 \__fp_sep: #2 \s__fp_stop { #1 } \cs_new:Npn \fp_to_scientific:N #1 { \exp_after:wN \__fp_to_scientific_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_scientific:N { c } @@ -21039,9 +21157,9 @@ Type H <return> for immediate help}\def~{\errmessage{% #1 \__fp_to_scientific:w \__fp_to_scientific_recover:w #1 } -\cs_new:Npn \__fp_to_scientific_recover:w #1 #2 ; +\cs_new:Npn \__fp_to_scientific_recover:w #1 #2 \__fp_sep: { - \__fp_error:nffn { unknown-type } { \tl_to_str:n { #2 ; } } { } { } + \__fp_error:nffn { unknown-type } { \tl_to_str:n { #2 \__fp_sep: } } { } { } nan } \cs_new:Npn \__fp_tuple_to_scientific:w @@ -21070,14 +21188,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \s__fp \__fp_chk:w #1 #2 } \cs_new:Npn \__fp_to_scientific_normal:wnnnnn - \s__fp \__fp_chk:w 1 #1 #2 #3#4#5#6 ; + \s__fp \__fp_chk:w 1 #1 #2 #3#4#5#6 \__fp_sep: { \exp_after:wN \__fp_to_scientific_normal:wNw \exp_after:wN e \int_value:w \__fp_int_eval:w #2 - 1 - ; #3 #4 #5 #6 ; + \__fp_sep: #3 #4 #5 #6 \__fp_sep: } -\cs_new:Npn \__fp_to_scientific_normal:wNw #1 ; #2#3; +\cs_new:Npn \__fp_to_scientific_normal:wNw #1 \__fp_sep: #2#3\__fp_sep: { #2.#3 #1 } \cs_new:Npn \fp_to_decimal:N #1 { \exp_after:wN \__fp_to_decimal_dispatch:w #1 } @@ -21093,9 +21211,9 @@ Type H <return> for immediate help}\def~{\errmessage{% #1 \__fp_to_decimal:w \__fp_to_decimal_recover:w #1 } -\cs_new:Npn \__fp_to_decimal_recover:w #1 #2 ; +\cs_new:Npn \__fp_to_decimal_recover:w #1 #2 \__fp_sep: { - \__fp_error:nffn { unknown-type } { \tl_to_str:n { #2 ; } } { } { } + \__fp_error:nffn { unknown-type } { \tl_to_str:n { #2 \__fp_sep: } } { } { } nan } \cs_new:Npn \__fp_tuple_to_decimal:w @@ -21124,7 +21242,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \s__fp \__fp_chk:w #1 #2 } \cs_new:Npn \__fp_to_decimal_normal:wnnnnn - \s__fp \__fp_chk:w 1 #1 #2 #3#4#5#6 ; + \s__fp \__fp_chk:w 1 #1 #2 #3#4#5#6 \__fp_sep: { \int_compare:nNnTF {#2} > 0 { @@ -21136,7 +21254,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_after:wN \exp_after:wN \exp_after:wN \__fp_to_decimal_huge:wnnnn - \prg_replicate:nn { #2 - \c__fp_prec_int } { 0 } ; + \prg_replicate:nn { #2 - \c__fp_prec_int } { 0 } \__fp_sep: } {#3} {#4} {#5} {#6} } @@ -21145,19 +21263,19 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN 0 \exp_after:wN . \exp:w \exp_end_continue_f:w \prg_replicate:nn { - #2 } { 0 } - #3#4#5#6 ; + #3#4#5#6 \__fp_sep: } } -\cs_new:Npn \__fp_to_decimal_large:Nnnw #1#2#3#4; +\cs_new:Npn \__fp_to_decimal_large:Nnnw #1#2#3#4\__fp_sep: { \exp_after:wN \__fp_trim_zeros:w \int_value:w \if_int_compare:w #2 > \c_zero_int #2 \fi: \exp_stop_f: - #3.#4 ; + #3.#4 \__fp_sep: } -\cs_new:Npn \__fp_to_decimal_huge:wnnnn #1; #2#3#4#5 { #2#3#4#5 #1 } +\cs_new:Npn \__fp_to_decimal_huge:wnnnn #1\__fp_sep: #2#3#4#5 { #2#3#4#5 #1 } \cs_new:Npn \fp_to_tl:N #1 { \exp_after:wN \__fp_to_tl_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_tl:N { c } \cs_new:Npn \fp_to_tl:n @@ -21167,9 +21285,9 @@ Type H <return> for immediate help}\def~{\errmessage{% } \cs_new:Npn \__fp_to_tl_dispatch:w #1 { \__fp_change_func_type:NNN #1 \__fp_to_tl:w \__fp_to_tl_recover:w #1 } -\cs_new:Npn \__fp_to_tl_recover:w #1 #2 ; +\cs_new:Npn \__fp_to_tl_recover:w #1 #2 \__fp_sep: { - \__fp_error:nffn { unknown-type } { \tl_to_str:n { #2 ; } } { } { } + \__fp_error:nffn { unknown-type } { \tl_to_str:n { #2 \__fp_sep: } } { } { } nan } \cs_new:Npn \__fp_tuple_to_tl:w @@ -21193,15 +21311,15 @@ Type H <return> for immediate help}\def~{\errmessage{% \s__fp \__fp_chk:w 1 0 {#1} } \cs_new:Npn \__fp_to_tl_scientific:wnnnnn - \s__fp \__fp_chk:w 1 #1 #2 #3#4#5#6 ; + \s__fp \__fp_chk:w 1 #1 #2 #3#4#5#6 \__fp_sep: { \exp_after:wN \__fp_to_tl_scientific:wNw \exp_after:wN e \int_value:w \__fp_int_eval:w #2 - 1 - ; #3 #4 #5 #6 ; + \__fp_sep: #3 #4 #5 #6 \__fp_sep: } -\cs_new:Npn \__fp_to_tl_scientific:wNw #1 ; #2#3; - { \__fp_trim_zeros:w #2.#3 ; #1 } +\cs_new:Npn \__fp_to_tl_scientific:wNw #1 \__fp_sep: #2#3\__fp_sep: + { \__fp_trim_zeros:w #2.#3 \__fp_sep: #1 } \cs_new:Npn \fp_to_dim:N #1 { \exp_after:wN \__fp_to_dim_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_dim:N { c } @@ -21210,14 +21328,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_to_dim_dispatch:w \exp:w \exp_end_continue_f:w \__fp_parse:n } -\cs_new:Npn \__fp_to_dim_dispatch:w #1#2 ; +\cs_new:Npn \__fp_to_dim_dispatch:w #1#2 \__fp_sep: { \__fp_change_func_type:NNN #1 \__fp_to_dim:w \__fp_to_dim_recover:w - #1 #2 ; + #1 #2 \__fp_sep: } \cs_new:Npn \__fp_to_dim_recover:w #1 { \__fp_invalid_operation:nnw { 0pt } { fp_to_dim } } -\cs_new:Npn \__fp_to_dim:w #1 ; { \__fp_to_decimal:w #1 ; pt } +\cs_new:Npn \__fp_to_dim:w #1 \__fp_sep: { \__fp_to_decimal:w #1 \__fp_sep: pt } \cs_new:Npn \fp_to_int:N #1 { \exp_after:wN \__fp_to_int_dispatch:w #1 } \cs_generate_variant:Nn \fp_to_int:N { c } \cs_new:Npn \fp_to_int:n @@ -21225,24 +21343,24 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_to_int_dispatch:w \exp:w \exp_end_continue_f:w \__fp_parse:n } -\cs_new:Npn \__fp_to_int_dispatch:w #1#2 ; +\cs_new:Npn \__fp_to_int_dispatch:w #1#2 \__fp_sep: { \__fp_change_func_type:NNN #1 \__fp_to_int:w \__fp_to_int_recover:w - #1 #2 ; + #1 #2 \__fp_sep: } \cs_new:Npn \__fp_to_int_recover:w #1 { \__fp_invalid_operation:nnw { 0 } { fp_to_int } } -\cs_new:Npn \__fp_to_int:w #1; +\cs_new:Npn \__fp_to_int:w #1\__fp_sep: { \exp_after:wN \__fp_to_decimal:w \exp:w \exp_end_continue_f:w - \__fp_round:Nwn \__fp_round_to_nearest:NNN #1; { 0 } + \__fp_round:Nwn \__fp_round_to_nearest:NNN #1\__fp_sep: { 0 } } \cs_new:Npn \dim_to_fp:n #1 { \exp_after:wN \__fp_from_dim_test:ww \exp_after:wN 0 \exp_after:wN , - \int_value:w \tex_glueexpr:D #1 ; + \int_value:w \tex_glueexpr:D #1 \__fp_sep: } \cs_new:Npn \__fp_from_dim_test:ww #1, #2 { @@ -21258,18 +21376,18 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \fi: } -\cs_new:Npn \__fp_from_dim:wNw #1,#2#3; +\cs_new:Npn \__fp_from_dim:wNw #1,#2#3\__fp_sep: { - \__fp_pack_twice_four:wNNNNNNNN \__fp_from_dim:wNNnnnnnn ; - #3 000 0000 00 {10}987654321; #2 {#1} + \__fp_pack_twice_four:wNNNNNNNN \__fp_from_dim:wNNnnnnnn \__fp_sep: + #3 000 0000 00 {10}987654321\__fp_sep: #2 {#1} } -\cs_new:Npn \__fp_from_dim:wNNnnnnnn #1; #2#3#4#5#6#7#8#9 - { \__fp_from_dim:wnnnnwNn #1 {#2#300} {0000} ; } -\cs_new:Npn \__fp_from_dim:wnnnnwNn #1; #2#3#4#5#6; #7#8 +\cs_new:Npn \__fp_from_dim:wNNnnnnnn #1\__fp_sep: #2#3#4#5#6#7#8#9 + { \__fp_from_dim:wnnnnwNn #1 {#2#300} {0000} \__fp_sep: } +\cs_new:Npn \__fp_from_dim:wnnnnwNn #1\__fp_sep: #2#3#4#5#6\__fp_sep: #7#8 { \__fp_mul_npos_o:Nww #7 - \s__fp \__fp_chk:w 1 #7 {#5} #1 ; - \s__fp \__fp_chk:w 1 0 {#8} {1525} {8789} {0625} {0000} ; + \s__fp \__fp_chk:w 1 #7 {#5} #1 \__fp_sep: + \s__fp \__fp_chk:w 1 0 {#8} {1525} {8789} {0625} {0000} \__fp_sep: \prg_do_nothing: } \cs_new_eq:NN \fp_use:N \fp_to_decimal:N @@ -21289,16 +21407,16 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_last_unbraced:Ne \use_ii:nn { - \__fp_array_to_clist_loop:Nw #1 { ? \prg_break: } ; + \__fp_array_to_clist_loop:Nw #1 { ? \prg_break: } \__fp_sep: \prg_break_point: } } } -\cs_new:Npn \__fp_array_to_clist_loop:Nw #1#2; +\cs_new:Npn \__fp_array_to_clist_loop:Nw #1#2\__fp_sep: { \use_none:n #1 , ~ - \exp_not:f { \__fp_to_tl_dispatch:w #1 #2 ; } + \exp_not:f { \__fp_to_tl_dispatch:w #1 #2 \__fp_sep: } \__fp_array_to_clist_loop:Nw } %% File: l3fp-random.dtx @@ -21313,7 +21431,7 @@ Type H <return> for immediate help}\def~{\errmessage{% + \tex_uniformdeviate:D #1 + 8192 ) / 16384 } \cs_new:Npn \__fp_rand_myriads:n #1 - { \__fp_rand_myriads_loop:w #1 \prg_break: X \prg_break_point: ; } + { \__fp_rand_myriads_loop:w #1 \prg_break: X \prg_break_point: \__fp_sep: } \cs_new:Npn \__fp_rand_myriads_loop:w #1 X { #1 @@ -21322,14 +21440,14 @@ Type H <return> for immediate help}\def~{\errmessage{% \__kernel_randint:n { 10000 } \__fp_rand_myriads_loop:w } -\cs_new:Npn \__fp_rand_myriads_get:w 1 #1 ; { ; {#1} } +\cs_new:Npn \__fp_rand_myriads_get:w 1 #1 \__fp_sep: { \__fp_sep: {#1} } \cs_new:Npn \__fp_rand_o:Nw ? #1 @ { \tl_if_empty:nTF {#1} { \exp_after:wN \__fp_rand_o:w \exp:w \exp_end_continue_f:w - \__fp_rand_myriads:n { XXXX } { 0000 } { 0000 } ; 0 + \__fp_rand_myriads:n { XXXX } { 0000 } { 0000 } \__fp_sep: 0 } { \msg_expandable_error:nnnnn @@ -21337,7 +21455,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \c_nan_fp } } -\cs_new:Npn \__fp_rand_o:w ; +\cs_new:Npn \__fp_rand_o:w \__fp_sep: { \exp_after:wN \__fp_sanitize:Nw \exp_after:wN 0 @@ -21351,41 +21469,41 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_randint_default:w \__fp_randint_o:w } } \cs_new:Npn \__fp_randint_default:w #1 { \exp_after:wN #1 \c_one_fp } -\cs_new:Npn \__fp_randint_badarg:w \s__fp \__fp_chk:w #1#2#3; +\cs_new:Npn \__fp_randint_badarg:w \s__fp \__fp_chk:w #1#2#3\__fp_sep: { - \__fp_int:wTF \s__fp \__fp_chk:w #1#2#3; + \__fp_int:wTF \s__fp \__fp_chk:w #1#2#3\__fp_sep: { \if_meaning:w 1 #1 \if_int_compare:w - \__fp_use_i_until_s:nw #3 ; > \c__fp_prec_int + \__fp_use_i_until_s:nw #3 \__fp_sep: > \c__fp_prec_int \c_one_int \fi: \fi: } { \c_one_int } } -\cs_new:Npn \__fp_randint_o:w #1; #2; @ +\cs_new:Npn \__fp_randint_o:w #1\__fp_sep: #2\__fp_sep: @ { \if_case:w - \__fp_randint_badarg:w #1; - \__fp_randint_badarg:w #2; - \if:w 1 \__fp_compare_back:ww #2; #1; \c_one_int \fi: + \__fp_randint_badarg:w #1\__fp_sep: + \__fp_randint_badarg:w #2\__fp_sep: + \if:w 1 \__fp_compare_back:ww #2\__fp_sep: #1\__fp_sep: \c_one_int \fi: \c_zero_int - \__fp_randint_auxi_o:ww #1; #2; + \__fp_randint_auxi_o:ww #1\__fp_sep: #2\__fp_sep: \or: \__fp_invalid_operation_tl_o:ff - { randint } { \__fp_array_to_clist:n { #1; #2; } } + { randint } { \__fp_array_to_clist:n { #1\__fp_sep: #2\__fp_sep: } } \exp:w \fi: \exp_after:wN \exp_end: } -\cs_new:Npn \__fp_randint_auxi_o:ww #1 ; #2 ; #3 \exp_end: +\cs_new:Npn \__fp_randint_auxi_o:ww #1 \__fp_sep: #2 \__fp_sep: #3 \exp_end: { \fi: - \__fp_randint_auxii:wn #2 ; - { \__fp_randint_auxii:wn #1 ; \__fp_randint_auxiii_o:ww } + \__fp_randint_auxii:wn #2 \__fp_sep: + { \__fp_randint_auxii:wn #1 \__fp_sep: \__fp_randint_auxiii_o:ww } } -\cs_new:Npn \__fp_randint_auxii:wn \s__fp \__fp_chk:w #1#2#3#4 ; +\cs_new:Npn \__fp_randint_auxii:wn \s__fp \__fp_chk:w #1#2#3#4 \__fp_sep: { \if_meaning:w 0 #1 \exp_after:wN \use_i:nn @@ -21396,7 +21514,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_after:wN \__fp_ep_to_fixed:wwn \int_value:w \__fp_int_eval:w - #3 - \c__fp_prec_int , #4 {0000} {0000} ; + #3 - \c__fp_prec_int , #4 {0000} {0000} \__fp_sep: { \if_meaning:w 0 #2 \exp_after:wN \use_i:nnnn @@ -21407,22 +21525,22 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_fixed_continue:wn } } -\cs_new:Npn \__fp_randint_auxiii_o:ww #1 ; #2 ; +\cs_new:Npn \__fp_randint_auxiii_o:ww #1 \__fp_sep: #2 \__fp_sep: { - \__fp_fixed_add:wwn #2 ; - {0000} {0000} {0000} {0001} {0000} {0000} ; - \__fp_fixed_sub:wwn #1 ; + \__fp_fixed_add:wwn #2 \__fp_sep: + {0000} {0000} {0000} {0001} {0000} {0000} \__fp_sep: + \__fp_fixed_sub:wwn #1 \__fp_sep: { \exp_after:wN \use_i:nn \exp_after:wN \__fp_fixed_mul_add:wwwn - \exp:w \exp_end_continue_f:w \__fp_rand_myriads:n { XXXXXX } ; + \exp:w \exp_end_continue_f:w \__fp_rand_myriads:n { XXXXXX } \__fp_sep: } - #1 ; + #1 \__fp_sep: \__fp_randint_auxiv_o:ww - #2 ; - \__fp_randint_auxv_o:w #1 ; @ + #2 \__fp_sep: + \__fp_randint_auxv_o:w #1 \__fp_sep: @ } -\cs_new:Npn \__fp_randint_auxiv_o:ww #1#2#3#4#5 ; #6#7#8#9 +\cs_new:Npn \__fp_randint_auxiv_o:ww #1#2#3#4#5 \__fp_sep: #6#7#8#9 { \if_int_compare:w \if_int_compare:w #1#2 > #6#7 \exp_stop_f: 1 \else: @@ -21432,7 +21550,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \fi: \__fp_randint_auxv_o:w {#1}{#2}{#3}{#4}#5 } -\cs_new:Npn \__fp_randint_auxv_o:w #1#2#3#4#5 ; #6 @ +\cs_new:Npn \__fp_randint_auxv_o:w #1#2#3#4#5 \__fp_sep: #6 @ { \exp_after:wN \__fp_sanitize:Nw \int_value:w @@ -21444,7 +21562,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_reverse_args:Nww \fi: \exp_after:wN \__fp_fixed_sub:wwn \c__fp_one_fixed_tl - {#1} {#2} {#3} {#4} {0000} {0000} ; + {#1} {#2} {#3} {#4} {0000} {0000} \__fp_sep: { \exp_after:wN \exp_stop_f: \int_value:w \__fp_int_eval:w \c__fp_prec_int @@ -21458,16 +21576,16 @@ Type H <return> for immediate help}\def~{\errmessage{% \int_eval:n { \exp_after:wN \__fp_randint:ww - \int_value:w \int_eval:n {#1} \exp_after:wN ; - \int_value:w \int_eval:n {#2} ; + \int_value:w \int_eval:n {#1} \exp_after:wN \__fp_sep: + \int_value:w \int_eval:n {#2} \__fp_sep: } } -\cs_new:Npn \__fp_randint:ww #1; #2; +\cs_new:Npn \__fp_randint:ww #1\__fp_sep: #2\__fp_sep: { \if_int_compare:w #1 > #2 \exp_stop_f: \msg_expandable_error:nnnn { kernel } { randint-backward-range } {#1} {#2} - \__fp_randint:ww #2; #1; + \__fp_randint:ww #2\__fp_sep: #1\__fp_sep: \else: \if_int_compare:w \__fp_int_eval:w #2 \if_int_compare:w #1 > \c_zero_int @@ -21491,46 +21609,49 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_randint_wide_aux:w \int_value:w \exp_after:wN \__fp_randint_split_o:Nw - \tex_uniformdeviate:D 268435456 ; + \tex_uniformdeviate:D 268435456 \__fp_sep: \int_value:w \exp_after:wN \__fp_randint_split_o:Nw - \tex_uniformdeviate:D 268435456 ; + \tex_uniformdeviate:D 268435456 \__fp_sep: \int_value:w \exp_after:wN \__fp_randint_split_o:Nw \int_value:w \__fp_int_eval:w 131072 + \exp_after:wN \__fp_randint_split_o:Nw \int_value:w - \__kernel_int_add:nnn {#2} { -#1 } { -\c_max_int } ; + \__kernel_int_add:nnn {#2} { -#1 } { -\c_max_int } \__fp_sep: . } -\cs_new:Npn \__fp_randint_split_o:Nw #1#2 ; +\cs_new:Npn \__fp_randint_split_o:Nw #1#2 \__fp_sep: { \if_meaning:w 0 #1 - 0 \exp_after:wN ; \int_value:w 0 + 0 \exp_after:wN \__fp_sep: \int_value:w 0 \else: \exp_after:wN \__fp_randint_split_aux:w - \int_value:w \__fp_int_eval:w (#1#2 - 8192) / 16384 ; + \int_value:w \__fp_int_eval:w (#1#2 - 8192) / 16384 \__fp_sep: + #1#2 \fi: - \exp_after:wN ; + \exp_after:wN \__fp_sep: } -\cs_new:Npn \__fp_randint_split_aux:w #1 ; +\cs_new:Npn \__fp_randint_split_aux:w #1 \__fp_sep: { - #1 \exp_after:wN ; + #1 \exp_after:wN \__fp_sep: \int_value:w \__fp_int_eval:w - #1 * 16384 } -\cs_new:Npn \__fp_randint_wide_aux:w #1;#2; #3;#4; #5;#6;#7; . +\cs_new:Npn \__fp_randint_wide_aux:w + #1\__fp_sep:#2\__fp_sep: #3\__fp_sep:#4\__fp_sep: + #5\__fp_sep:#6\__fp_sep:#7\__fp_sep: . { \exp_after:wN \__fp_randint_wide_auxii:w \int_value:w \__fp_int_eval:w #5 * #3 + #6 * #1 + (#5 * #4 + #6 * #3 + #7 * #1 + (#5 * #2 + #7 * #3 + (16384 * #6 + #7) * (16384 * #4 + #2) / 268435456) / 16384 - ) / 16384 \exp_after:wN ; - \int_value:w \__fp_int_eval:w (#5 + #6) * 16384 + #7 ; - #1 ; #5 ; + ) / 16384 \exp_after:wN \__fp_sep: + \int_value:w \__fp_int_eval:w (#5 + #6) * 16384 + #7 \__fp_sep: + #1 \__fp_sep: #5 \__fp_sep: } -\cs_new:Npn \__fp_randint_wide_auxii:w #1; #2; #3; #4; +\cs_new:Npn \__fp_randint_wide_auxii:w + #1\__fp_sep: #2\__fp_sep: #3\__fp_sep: #4\__fp_sep: { \if_int_odd:w 0 \if_int_compare:w #1 = #2 \else: \exp_stop_f: \fi: @@ -21557,7 +21678,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \if_int_compare:w #1 < \c_one_int \msg_expandable_error:nnnn { kernel } { randint-backward-range } { 1 } {#1} - \__fp_randint:ww #1; 1; + \__fp_randint:ww #1\__fp_sep: 1\__fp_sep: \else: \if_int_compare:w #1 > \c__kernel_randint_max_int \__kernel_randint:nn { 1 } {#1} @@ -21605,7 +21726,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_last_unbraced:Nf \__fp_types_binary_auxi:Nww { \__fp_types_cs_to_op:N #1 } } -\cs_new:Npn \__fp_types_binary_auxi:Nww #1#2#3; #4#5; @ +\cs_new:Npn \__fp_types_binary_auxi:Nww #1#2#3\__fp_sep: #4#5\__fp_sep: @ { \exp_after:wN \__fp_types_binary_auxii:NNww \cs:w @@ -21615,7 +21736,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_type_from_scan:N #4 _o:ww \cs_end: - #1 #2#3; #4#5; + #1 #2#3\__fp_sep: #4#5\__fp_sep: } \cs_new:Npn \__fp_types_binary_auxii:NNww #1#2 { @@ -21626,12 +21747,12 @@ Type H <return> for immediate help}\def~{\errmessage{% %% File l3fp-symbolic.dtx (C) Copyright 2012-2015,2017,2018,2020,2021,2023 The LaTeX Project \fp_new:N \l__fp_symbolic_fp \scan_new:N \s__fp_symbolic -\cs_new_protected:Npn \__fp_symbolic_chk:w #1,#2#3; +\cs_new_protected:Npn \__fp_symbolic_chk:w #1,#2#3\__fp_sep: { \msg_error:nne { fp } { misused-fp } { \__fp_to_tl_dispatch:w - \s__fp_symbolic \__fp_symbolic_chk:w #1,{#2}; + \s__fp_symbolic \__fp_symbolic_chk:w #1,{#2}\__fp_sep: } } \cs_new:Npn \__fp_if_has_symbolic:nTF #1 @@ -21644,7 +21765,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__fp_if_has_symbolic_aux:w #1 \s__fp_symbolic #2 \s__fp_mark #3#4 \s__fp_stop { #3 } \cs_new:Npn \__fp_exp_after_symbolic_f:nw - #1 \s__fp_symbolic \__fp_symbolic_chk:w #2, #3#4; + #1 \s__fp_symbolic \__fp_symbolic_chk:w #2, #3#4\__fp_sep: { \exp_after:wN \__fp_exp_after_symbolic_aux:w \exp:w @@ -21656,13 +21777,13 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_exp_after_array_f:w #3 \s__fp_expr_stop \exp_after:wN } - \exp_after:wN ; + \exp_after:wN \__fp_sep: \exp:w \exp_end_continue_f:w #1 } -\cs_new:Npn \__fp_exp_after_symbolic_aux:w #1, #2; +\cs_new:Npn \__fp_exp_after_symbolic_aux:w #1, #2\__fp_sep: { \__fp_if_has_symbolic:nTF {#2} - { \s__fp_symbolic \__fp_symbolic_chk:w #1, {#2} ; } + { \s__fp_symbolic \__fp_symbolic_chk:w #1, {#2} \__fp_sep: } { #1 #2 @ \prg_do_nothing: } } \cs_new:Npn \__fp_exp_after_symbolic_loop:N #1 @@ -21672,11 +21793,11 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp:w \__fp_exp_after_symbolic_loop:N } -\cs_new:Npn \__fp_symbolic_binary_o:Nww #1 #2; #3; +\cs_new:Npn \__fp_symbolic_binary_o:Nww #1 #2\__fp_sep: #3\__fp_sep: { \__fp_exp_after_symbolic_f:nw { \exp_after:wN \exp_stop_f: } \s__fp_symbolic \__fp_symbolic_chk:w - \__fp_types_binary:Nww #1 , { #2; #3; } ; + \__fp_types_binary:Nww #1 , { #2\__fp_sep: #3\__fp_sep: } \__fp_sep: } \cs_set_protected:Npn \__fp_tmp:w #1#2 { @@ -21692,11 +21813,11 @@ Type H <return> for immediate help}\def~{\errmessage{% } \tl_map_inline:nn { + - * / ^ & | } { \exp_args:Nc \__fp_tmp:w { __fp_#1_o:ww } {#1} } -\cs_new:Npn \__fp_symbolic_unary_o:NNw #1#2#3; @ +\cs_new:Npn \__fp_symbolic_unary_o:NNw #1#2#3\__fp_sep: @ { \__fp_exp_after_symbolic_f:nw { \exp_after:wN \exp_stop_f: } \s__fp_symbolic \__fp_symbolic_chk:w - \__fp_types_unary:NNw #1#2 , { #3; } ; + \__fp_types_unary:NNw #1#2 , { #3\__fp_sep: } \__fp_sep: } \tl_map_inline:nn { @@ -21722,11 +21843,11 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_tmp:w { decimal } { 0 } \__fp_to_decimal_dispatch:w \__fp_tmp:w { int } { 0 } \__fp_to_int_dispatch:w \__fp_tmp:w { scientific } { nan } \__fp_to_scientific_dispatch:w -\cs_new:Npn \__fp_symbolic_convert:wnnN #1#2; #3#4#5 +\cs_new:Npn \__fp_symbolic_convert:wnnN #1#2\__fp_sep: #3#4#5 { \str_if_eq:nnTF {#1} { \s__fp_symbolic } - { \__fp_invalid_operation:nnw {#3} {#4} #1#2; } - { #5 #1#2; } + { \__fp_invalid_operation:nnw {#3} {#4} #1#2\__fp_sep: } + { #5 #1#2\__fp_sep: } } \cs_new:Npn \__fp_symbolic_cs_arg_to_fn:NN #1 { @@ -21747,7 +21868,7 @@ Type H <return> for immediate help}\def~{\errmessage{% } } \cs_new:Npn \__fp_symbolic_to_tl:w - \s__fp_symbolic \__fp_symbolic_chk:w #1#2, #3#4; + \s__fp_symbolic \__fp_symbolic_chk:w #1#2, #3#4\__fp_sep: { \str_case:nnTF {#1} { @@ -21766,13 +21887,13 @@ Type H <return> for immediate help}\def~{\errmessage{% ( \__fp_to_tl_dispatch:w #3 ) } } -\cs_new:Npn \__fp_symbolic_binary_to_tl:Nww #1, #2; #3; @ +\cs_new:Npn \__fp_symbolic_binary_to_tl:Nww #1, #2\__fp_sep: #3\__fp_sep: @ { \use:e { - ( \__fp_to_tl_dispatch:w #2; ) + ( \__fp_to_tl_dispatch:w #2\__fp_sep: ) \__fp_types_cs_to_op:N #1 - ( \__fp_to_tl_dispatch:w #3; ) + ( \__fp_to_tl_dispatch:w #3\__fp_sep: ) } } \cs_new:Npn \__fp_symbolic_function_to_tl:Nw #1, #2@ @@ -21820,7 +21941,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \token_if_eq_meaning:NNTF #2 \prg_do_nothing: { \s__fp_symbolic \__fp_symbolic_chk:w - \__fp_variable_o:w #1 , { } ; + \__fp_variable_o:w #1 , { } \__fp_sep: } { \exp_after:wN \s__fp_symbolic @@ -21830,7 +21951,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_exp_after_symbolic_loop:N #1 { , \exp:w \use_none:nn } \exp_after:wN \exp_end: - \exp_after:wN { \exp_after:wN } \exp_after:wN ; + \exp_after:wN { \exp_after:wN } \exp_after:wN \__fp_sep: #2 } } @@ -21841,7 +21962,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \__fp_exp_after_symbolic_f:nw { \__fp_parse_infix:NN } \s__fp_symbolic \__fp_symbolic_chk:w - \__fp_variable_o:w #2 , { } ; + \__fp_variable_o:w #2 , { } \__fp_sep: } \exp_args:NNc \__fp_variable_set_parsing_aux:NNn #1 { __fp_parse_word_#2:N } {#2} @@ -22006,7 +22127,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_exp_after_array_f:w #2 \s__fp_expr_stop \exp_after:wN } - \exp_after:wN ; + \exp_after:wN \__fp_sep: } } \int_new:N \l__fp_function_arg_int @@ -22038,7 +22159,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_not:N \__fp_symbolic_chk:w \exp_not:N \__fp_function_arg_o:w \int_use:N \l__fp_function_arg_int - ########1 , { } ; + ########1 , { } \__fp_sep: } } \cs_set:Npn \__fp_function_arg_o:w ##1 @ @@ -22050,7 +22171,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \__fp_exp_after_symbolic_loop:N ##1 { , \tex_romannumeral:D \use_none:nn } \exp_after:wN \c_zero_int - \exp_after:wN { \exp_after:wN } \exp_after:wN ; + \exp_after:wN { \exp_after:wN } \exp_after:wN \__fp_sep: } \fp_set:Nn \l__fp_symbolic_fp {#4} \use:e @@ -22087,9 +22208,9 @@ Type H <return> for immediate help}\def~{\errmessage{% #2 } \cs_new:Npn \__fp_function_arg_few:w #1 @ { \exp_after:wN \c_nan_fp } -\cs_new:Npn \__fp_function_arg_get:w #1#2#3; #4 @ +\cs_new:Npn \__fp_function_arg_get:w #1#2#3\__fp_sep: #4 @ { - \__fp_exp_after_array_f:w #3; \s__fp_expr_stop + \__fp_exp_after_array_f:w #3\__fp_sep: \s__fp_expr_stop \exp_after:wN \exp_stop_f: } \cs_new_protected:Npn \fp_clear_function:n #1 @@ -22164,25 +22285,25 @@ Type H <return> for immediate help}\def~{\errmessage{% \exp_after:wN \__fp_array_gset:NNNNww \exp_after:wN #1 \exp_after:wN #1 - \int_value:w \int_eval:n {#2} \exp_after:wN ; + \int_value:w \int_eval:n {#2} \exp_after:wN \__fp_sep: \exp:w \exp_end_continue_f:w \__fp_parse:n {#3} } \cs_generate_variant:Nn \fparray_gset:Nnn { c } -\cs_new_protected:Npn \__fp_array_gset:NNNNww #1#2#3#4#5 ; #6 ; +\cs_new_protected:Npn \__fp_array_gset:NNNNww #1#2#3#4#5 \__fp_sep: #6 \__fp_sep: { \__fp_array_bounds:NNnTF \msg_error:nneee #4 {#5} { \exp_after:wN \__fp_change_func_type:NNN - \__fp_use_i_until_s:nw #6 ; + \__fp_use_i_until_s:nw #6 \__fp_sep: \__fp_array_gset:w \__fp_array_gset_recover:Nw - #6 ; {#5} #1 #2 #3 + #6 \__fp_sep: {#5} #1 #2 #3 } { } } -\cs_new_protected:Npn \__fp_array_gset_recover:Nw #1#2 ; +\cs_new_protected:Npn \__fp_array_gset_recover:Nw #1#2 \__fp_sep: { - \__fp_error:nffn { unknown-type } { \tl_to_str:n { #2 ; } } { } { } + \__fp_error:nffn { unknown-type } { \tl_to_str:n { #2 \__fp_sep: } } { } { } \exp_after:wN #1 \c_nan_fp } \cs_new_protected:Npn \__fp_array_gset:w \s__fp \__fp_chk:w #1#2 @@ -22196,7 +22317,7 @@ Type H <return> for immediate help}\def~{\errmessage{% \s__fp \__fp_chk:w #1 #2 } \cs_new_protected:Npn \__fp_array_gset_normal:w - \s__fp \__fp_chk:w 1 #1 #2 #3#4#5 ; #6#7#8#9 + \s__fp \__fp_chk:w 1 #1 #2 #3#4#5 \__fp_sep: #6#7#8#9 { \__kernel_intarray_gset:Nnn #7 {#6} {#2} \__kernel_intarray_gset:Nnn #8 {#6} @@ -22226,7 +22347,7 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_after:wN \__fp_array_item:NwN \exp_after:wN #1 - \int_value:w \int_eval:n {#2} ; + \int_value:w \int_eval:n {#2} \__fp_sep: \__fp_to_decimal:w } \cs_generate_variant:Nn \fparray_item:Nn { c } @@ -22234,11 +22355,11 @@ Type H <return> for immediate help}\def~{\errmessage{% { \exp_after:wN \__fp_array_item:NwN \exp_after:wN #1 - \int_value:w \int_eval:n {#2} ; + \int_value:w \int_eval:n {#2} \__fp_sep: \__fp_to_tl:w } \cs_generate_variant:Nn \fparray_item_to_tl:Nn { c } -\cs_new:Npn \__fp_array_item:NwN #1#2 ; #3 +\cs_new:Npn \__fp_array_item:NwN #1#2 \__fp_sep: #3 { \__fp_array_bounds:NNnTF \msg_expandable_error:nnfff #1 {#2} { \exp_after:wN \__fp_array_item:NNNnN #1 {#2} #3 } @@ -22247,22 +22368,22 @@ Type H <return> for immediate help}\def~{\errmessage{% \cs_new:Npn \__fp_array_item:NNNnN #1#2#3#4 { \exp_after:wN \__fp_array_item:N - \int_value:w \__kernel_intarray_item:Nn #2 {#4} \exp_after:wN ; - \int_value:w \__kernel_intarray_item:Nn #3 {#4} \exp_after:wN ; - \int_value:w \__kernel_intarray_item:Nn #1 {#4} ; + \int_value:w \__kernel_intarray_item:Nn #2 {#4} \exp_after:wN \__fp_sep: + \int_value:w \__kernel_intarray_item:Nn #3 {#4} \exp_after:wN \__fp_sep: + \int_value:w \__kernel_intarray_item:Nn #1 {#4} \__fp_sep: } \cs_new:Npn \__fp_array_item:N #1 { \if_meaning:w 0 #1 \exp_after:wN \__fp_array_item_special:w \fi: \__fp_array_item:w #1 } -\cs_new:Npn \__fp_array_item:w #1 #2#3#4#5 #6 ; 1 #7 ; +\cs_new:Npn \__fp_array_item:w #1 #2#3#4#5 #6 \__fp_sep: 1 #7 \__fp_sep: { \exp_after:wN \__fp_array_item_normal:w \int_value:w \if_meaning:w #1 1 0 \else: 2 \fi: \exp_stop_f: - #7 ; {#2#3#4#5} {#6} ; + #7 \__fp_sep: {#2#3#4#5} {#6} \__fp_sep: } -\cs_new:Npn \__fp_array_item_special:w #1 ; #2 ; #3 ; #4 +\cs_new:Npn \__fp_array_item_special:w #1 \__fp_sep: #2 \__fp_sep: #3 \__fp_sep: #4 { \exp_after:wN #4 \exp:w \exp_end_continue_f:w @@ -22274,8 +22395,9 @@ Type H <return> for immediate help}\def~{\errmessage{% \else: \exp_after:wN \c_minus_inf_fp \fi: } -\cs_new:Npn \__fp_array_item_normal:w #1 #2#3#4#5 #6 ; #7 ; #8 ; #9 - { #9 \s__fp \__fp_chk:w 1 #1 {#8} #7 {#2#3#4#5} {#6} ; } +\cs_new:Npn \__fp_array_item_normal:w + #1 #2#3#4#5 #6 \__fp_sep: #7 \__fp_sep: #8 \__fp_sep: #9 + { #9 \s__fp \__fp_chk:w 1 #1 {#8} #7 {#2#3#4#5} {#6} \__fp_sep: } \prg_new_eq_conditional:NNn \fparray_if_exist:N \cs_if_exist:N { TF , T , F , p } \prg_new_eq_conditional:NNn \fparray_if_exist:c \cs_if_exist:c @@ -25018,27 +25140,30 @@ Type H <return> for immediate help}\def~{\errmessage{% \__tl_analysis_map:NwNw #1 } \cs_new_protected:Npn \tl_analysis_show:N - { \__tl_analysis_show:NNN \msg_show:nneeee \tl_show:N } + { \__tl_analysis_show:NNnnN \msg_show:nneeee \tl_show:N {} {} } \cs_new_protected:Npn \tl_analysis_log:N - { \__tl_analysis_show:NNN \msg_log:nneeee \tl_log:N } -\cs_new_protected:Npn \__tl_analysis_show:NNN #1#2#3 { - \tl_if_exist:NTF #3 + \__tl_analysis_show:NNnnN \msg_log:nneeee \tl_log:N + { \iow_newline: >~ . } { . } + } +\cs_new_protected:Npn \__tl_analysis_show:NNnnN #1#2#3#4#5 + { + \tl_if_exist:NTF #5 { - \exp_args:No \__tl_analysis:n {#3} + \exp_args:No \__tl_analysis:n {#5} #1 { tl } { show-analysis } - { \token_to_str:N #3 } { \__tl_analysis_show: } { } { } + { \token_to_str:N #5 } { \__tl_analysis_show: } {#3} {#4} } { #2 #3 } } \cs_new_protected:Npn \tl_analysis_show:n - { \__tl_analysis_show:Nn \msg_show:nneeee } + { \__tl_analysis_show:Nnnn \msg_show:nneeee {} {} } \cs_new_protected:Npn \tl_analysis_log:n - { \__tl_analysis_show:Nn \msg_log:nneeee } -\cs_new_protected:Npn \__tl_analysis_show:Nn #1#2 + { \__tl_analysis_show:Nnnn \msg_log:nneeee { \iow_newline: >~ . } { . } } +\cs_new_protected:Npn \__tl_analysis_show:Nnnn #1#2#3#4 { - \__tl_analysis:n {#2} - #1 { tl } { show-analysis } { } { \__tl_analysis_show: } { } { } + \__tl_analysis:n {#4} + #1 { tl } { show-analysis } { } { \__tl_analysis_show: } {#2} {#3} } \cs_new:Npn \__tl_analysis_show: { @@ -25371,8 +25496,8 @@ Type H <return> for immediate help}\def~{\errmessage{% { The~token~list~ \tl_if_empty:nF {#1} { #1 ~ } \tl_if_empty:nTF {#2} - { is~empty } - { contains~the~tokens: #2 } + { is~empty #3 } + { contains~the~tokens: #2 #4 } } %% File: l3regex.dtx \cs_new_eq:NN \__regex_int_eval:w \tex_numexpr:D diff --git a/Master/texmf-dist/tex/latex-dev/l3kernel/expl3-generic.tex b/Master/texmf-dist/tex/latex-dev/l3kernel/expl3-generic.tex index 1a0164cb3cd..355f6dc1bbe 100644 --- a/Master/texmf-dist/tex/latex-dev/l3kernel/expl3-generic.tex +++ b/Master/texmf-dist/tex/latex-dev/l3kernel/expl3-generic.tex @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2025-01-14}% +\def\ExplFileDate{2025-01-18}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex-dev/l3kernel/expl3.ltx b/Master/texmf-dist/tex/latex-dev/l3kernel/expl3.ltx index f68f361e3fa..5e107c4ac95 100644 --- a/Master/texmf-dist/tex/latex-dev/l3kernel/expl3.ltx +++ b/Master/texmf-dist/tex/latex-dev/l3kernel/expl3.ltx @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2025-01-14}% +\def\ExplFileDate{2025-01-18}% \let\ExplLoaderFileDate\ExplFileDate \begingroup \catcode`\_=11 diff --git a/Master/texmf-dist/tex/latex-dev/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex-dev/l3kernel/expl3.sty index 48be098c6ec..114fe98424d 100644 --- a/Master/texmf-dist/tex/latex-dev/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex-dev/l3kernel/expl3.sty @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: expl3.dtx -\def\ExplFileDate{2025-01-14}% +\def\ExplFileDate{2025-01-18}% \let\ExplLoaderFileDate\ExplFileDate \ProvidesPackage{expl3} [% diff --git a/Master/texmf-dist/tex/latex-dev/l3kernel/l3debug.def b/Master/texmf-dist/tex/latex-dev/l3kernel/l3debug.def index d6b79d367d6..4dd189fdef2 100644 --- a/Master/texmf-dist/tex/latex-dev/l3kernel/l3debug.def +++ b/Master/texmf-dist/tex/latex-dev/l3kernel/l3debug.def @@ -19,7 +19,7 @@ %% and all files in that bundle must be distributed together. %% %% File: l3debug.dtx -\ProvidesExplFile{l3debug.def}{2025-01-14}{}{L3 Debugging support} +\ProvidesExplFile{l3debug.def}{2025-01-18}{}{L3 Debugging support} \scan_new:N \s__debug_stop \cs_new:Npn \__debug_use_i_delimit_by_s_stop:nw #1 #2 \s__debug_stop {#1} \quark_new:N \q__debug_recursion_tail diff --git a/Master/texmf-dist/tex/latex-dev/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex-dev/l3kernel/l3doc.cls index 020ef66e104..14e4c01f6ac 100644 --- a/Master/texmf-dist/tex/latex-dev/l3kernel/l3doc.cls +++ b/Master/texmf-dist/tex/latex-dev/l3kernel/l3doc.cls @@ -20,7 +20,7 @@ %% %% File: l3doc.dtx \RequirePackage{calc} -\ProvidesExplClass{l3doc}{2025-01-14}{} +\ProvidesExplClass{l3doc}{2025-01-18}{} {L3 Experimental documentation class} \clist_new:N \g_docinput_clist \seq_new:N \g_doc_functions_seq |