diff options
author | Norbert Preining <norbert@preining.info> | 2022-06-12 03:00:56 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-06-12 03:00:56 +0000 |
commit | 86d0c4c6729cfb43e13fb29790810c3cc2521806 (patch) | |
tree | a22220c1b5432f0c37a91f070cf061eb20991f8b /macros/generic | |
parent | 040c2af2b17f76a6f7e97a17ddbe0eee645508d4 (diff) |
CTAN sync 202206120300
Diffstat (limited to 'macros/generic')
-rw-r--r-- | macros/generic/xint/CHANGES.html | 310 | ||||
-rw-r--r-- | macros/generic/xint/README.md | 71 | ||||
-rw-r--r-- | macros/generic/xint/sourcexint.pdf | bin | 1182807 -> 2623546 bytes | |||
-rw-r--r-- | macros/generic/xint/xint.dtx | 7860 | ||||
-rw-r--r-- | macros/generic/xint/xint.pdf | bin | 1060744 -> 1067429 bytes |
5 files changed, 5062 insertions, 3179 deletions
diff --git a/macros/generic/xint/CHANGES.html b/macros/generic/xint/CHANGES.html index c55d211a14..55e2aedac9 100644 --- a/macros/generic/xint/CHANGES.html +++ b/macros/generic/xint/CHANGES.html @@ -4,7 +4,7 @@ <meta charset="utf-8" /> <meta name="generator" content="pandoc" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> - <meta name="author" content="xint 1.4l" /> + <meta name="author" content="xint 1.4m" /> <title>CHANGE LOG</title> <style> html { @@ -170,15 +170,24 @@ <body> <header id="title-block-header"> <h1 class="title">CHANGE LOG</h1> -<p class="author">xint 1.4l</p> -<p class="date">2022/05/29</p> +<p class="author">xint 1.4m</p> +<p class="date">2022/06/10</p> </header> <nav id="TOC" role="doc-toc"> <ul> +<li><a href="#m-20220610" +id="toc-m-20220610"><code>1.4m (2022/06/10)</code></a> +<ul> +<li><a href="#removed" id="toc-removed">Removed</a></li> +<li><a href="#breaking-changes" id="toc-breaking-changes">Breaking +changes</a></li> +<li><a href="#bug-fixes" id="toc-bug-fixes">Bug fixes</a></li> +<li><a href="#improvements" id="toc-improvements">Improvements</a></li> +</ul></li> <li><a href="#l-20220529" id="toc-l-20220529"><code>1.4l (2022/05/29)</code></a> <ul> -<li><a href="#bug-fixes" id="toc-bug-fixes">Bug fixes</a></li> +<li><a href="#bug-fixes-1" id="toc-bug-fixes-1">Bug fixes</a></li> <li><a href="#new-features" id="toc-new-features">New features</a></li> <li><a href="#documentation" id="toc-documentation">Documentation</a></li> @@ -186,66 +195,66 @@ id="toc-documentation">Documentation</a></li> <li><a href="#k-20220518" id="toc-k-20220518"><code>1.4k (2022/05/18)</code></a> <ul> -<li><a href="#breaking-changes" id="toc-breaking-changes">Breaking +<li><a href="#breaking-changes-1" id="toc-breaking-changes-1">Breaking changes</a></li> -<li><a href="#bug-fixes-1" id="toc-bug-fixes-1">Bug fixes</a></li> +<li><a href="#bug-fixes-2" id="toc-bug-fixes-2">Bug fixes</a></li> <li><a href="#new-features-1" id="toc-new-features-1">New features</a></li> </ul></li> <li><a href="#j-20210713" id="toc-j-20210713"><code>1.4j (2021/07/13)</code></a> <ul> -<li><a href="#bug-fixes-2" id="toc-bug-fixes-2">Bug fixes</a></li> +<li><a href="#bug-fixes-3" id="toc-bug-fixes-3">Bug fixes</a></li> </ul></li> <li><a href="#i-20210611" id="toc-i-20210611"><code>1.4i (2021/06/11)</code></a> <ul> <li><a href="#new-features-2" id="toc-new-features-2">New features</a></li> -<li><a href="#bug-fixes-3" id="toc-bug-fixes-3">Bug fixes</a></li> +<li><a href="#bug-fixes-4" id="toc-bug-fixes-4">Bug fixes</a></li> </ul></li> <li><a href="#h-20210527" id="toc-h-20210527"><code>1.4h (2021/05/27)</code></a> <ul> -<li><a href="#bug-fixes-4" id="toc-bug-fixes-4">Bug fixes</a></li> +<li><a href="#bug-fixes-5" id="toc-bug-fixes-5">Bug fixes</a></li> </ul></li> <li><a href="#g-20210525" id="toc-g-20210525"><code>1.4g (2021/05/25)</code></a> <ul> -<li><a href="#breaking-changes-1" id="toc-breaking-changes-1">Breaking +<li><a href="#breaking-changes-2" id="toc-breaking-changes-2">Breaking changes</a></li> <li><a href="#deprecated" id="toc-deprecated">Deprecated</a></li> <li><a href="#new-features-3" id="toc-new-features-3">New features</a></li> -<li><a href="#bug-fixes-5" id="toc-bug-fixes-5">Bug fixes</a></li> +<li><a href="#bug-fixes-6" id="toc-bug-fixes-6">Bug fixes</a></li> </ul></li> <li><a href="#f-20210510" id="toc-f-20210510"><code>1.4f (2021/05/10)</code></a> <ul> -<li><a href="#breaking-changes-2" id="toc-breaking-changes-2">Breaking +<li><a href="#breaking-changes-3" id="toc-breaking-changes-3">Breaking changes</a></li> -<li><a href="#bug-fixes-6" id="toc-bug-fixes-6">Bug fixes</a></li> +<li><a href="#bug-fixes-7" id="toc-bug-fixes-7">Bug fixes</a></li> </ul></li> <li><a href="#e-20210505" id="toc-e-20210505"><code>1.4e (2021/05/05)</code></a> <ul> -<li><a href="#breaking-changes-3" id="toc-breaking-changes-3">Breaking +<li><a href="#breaking-changes-4" id="toc-breaking-changes-4">Breaking changes</a></li> <li><a href="#new-features-4" id="toc-new-features-4">New features</a></li> -<li><a href="#bug-fixes-7" id="toc-bug-fixes-7">Bug fixes</a></li> +<li><a href="#bug-fixes-8" id="toc-bug-fixes-8">Bug fixes</a></li> </ul></li> <li><a href="#d-20210329" id="toc-d-20210329"><code>1.4d (2021/03/29)</code></a> <ul> -<li><a href="#breaking-changes-4" id="toc-breaking-changes-4">Breaking +<li><a href="#breaking-changes-5" id="toc-breaking-changes-5">Breaking changes</a></li> -<li><a href="#bug-fixes-8" id="toc-bug-fixes-8">Bug fixes</a></li> +<li><a href="#bug-fixes-9" id="toc-bug-fixes-9">Bug fixes</a></li> </ul></li> <li><a href="#c-20210220" id="toc-c-20210220"><code>1.4c (2021/02/20)</code></a> <ul> -<li><a href="#bug-fixes-9" id="toc-bug-fixes-9">Bug fixes</a></li> +<li><a href="#bug-fixes-10" id="toc-bug-fixes-10">Bug fixes</a></li> </ul></li> <li><a href="#b-20200225" id="toc-b-20200225"><code>1.4b (2020/02/25)</code></a> @@ -253,26 +262,26 @@ id="toc-b-20200225"><code>1.4b (2020/02/25)</code></a> <li><a href="#future" id="toc-future">Future</a></li> <li><a href="#new-features-5" id="toc-new-features-5">New features</a></li> -<li><a href="#bug-fixes-10" id="toc-bug-fixes-10">Bug fixes</a></li> +<li><a href="#bug-fixes-11" id="toc-bug-fixes-11">Bug fixes</a></li> </ul></li> <li><a href="#a-20200219" id="toc-a-20200219"><code>1.4a (2020/02/19)</code></a> <ul> -<li><a href="#breaking-changes-5" id="toc-breaking-changes-5">Breaking +<li><a href="#breaking-changes-6" id="toc-breaking-changes-6">Breaking changes</a></li> <li><a href="#new-features-6" id="toc-new-features-6">New features</a></li> -<li><a href="#bug-fixes-11" id="toc-bug-fixes-11">Bug fixes</a></li> +<li><a href="#bug-fixes-12" id="toc-bug-fixes-12">Bug fixes</a></li> </ul></li> <li><a href="#section" id="toc-section"><code>1.4 (2020/01/31)</code></a> <ul> -<li><a href="#breaking-changes-6" id="toc-breaking-changes-6">Breaking +<li><a href="#breaking-changes-7" id="toc-breaking-changes-7">Breaking changes</a></li> <li><a href="#improvements-and-new-features" id="toc-improvements-and-new-features">Improvements and new features</a></li> -<li><a href="#bug-fixes-12" id="toc-bug-fixes-12">Bug fixes</a></li> +<li><a href="#bug-fixes-13" id="toc-bug-fixes-13">Bug fixes</a></li> <li><a href="#todo" id="toc-todo">TODO</a></li> </ul></li> <li><a href="#f-20190910" @@ -281,27 +290,27 @@ id="toc-f-20190910"><code>1.3f (2019/09/10)</code></a> <li><a href="#improvements-and-new-features-1" id="toc-improvements-and-new-features-1">Improvements and new features</a></li> -<li><a href="#bug-fixes-13" id="toc-bug-fixes-13">Bug fixes</a></li> +<li><a href="#bug-fixes-14" id="toc-bug-fixes-14">Bug fixes</a></li> </ul></li> <li><a href="#e-20190405" id="toc-e-20190405"><code>1.3e (2019/04/05)</code></a> <ul> -<li><a href="#breaking-changes-7" id="toc-breaking-changes-7">Breaking +<li><a href="#breaking-changes-8" id="toc-breaking-changes-8">Breaking changes</a></li> <li><a href="#improvements-and-new-features-2" id="toc-improvements-and-new-features-2">Improvements and new features</a></li> -<li><a href="#bug-fixes-14" id="toc-bug-fixes-14">Bug fixes</a></li> +<li><a href="#bug-fixes-15" id="toc-bug-fixes-15">Bug fixes</a></li> </ul></li> <li><a href="#d-20190106" id="toc-d-20190106"><code>1.3d (2019/01/06)</code></a> <ul> -<li><a href="#breaking-changes-8" id="toc-breaking-changes-8">Breaking +<li><a href="#breaking-changes-9" id="toc-breaking-changes-9">Breaking changes</a></li> <li><a href="#improvements-and-new-features-3" id="toc-improvements-and-new-features-3">Improvements and new features</a></li> -<li><a href="#bug-fixes-15" id="toc-bug-fixes-15">Bug fixes</a></li> +<li><a href="#bug-fixes-16" id="toc-bug-fixes-16">Bug fixes</a></li> </ul></li> <li><a href="#c-20180617" id="toc-c-20180617"><code>1.3c (2018/06/17)</code></a> @@ -309,7 +318,7 @@ id="toc-c-20180617"><code>1.3c (2018/06/17)</code></a> <li><a href="#improvements-and-new-features-4" id="toc-improvements-and-new-features-4">Improvements and new features</a></li> -<li><a href="#bug-fixes-16" id="toc-bug-fixes-16">Bug fixes</a></li> +<li><a href="#bug-fixes-17" id="toc-bug-fixes-17">Bug fixes</a></li> </ul></li> <li><a href="#b-20180518" id="toc-b-20180518"><code>1.3b (2018/05/18)</code></a> @@ -321,16 +330,16 @@ features</a></li> <li><a href="#a-20180307" id="toc-a-20180307"><code>1.3a (2018/03/07)</code></a> <ul> -<li><a href="#removed" id="toc-removed">Removed</a></li> +<li><a href="#removed-1" id="toc-removed-1">Removed</a></li> <li><a href="#improvements-and-new-features-6" id="toc-improvements-and-new-features-6">Improvements and new features</a></li> -<li><a href="#bug-fixes-17" id="toc-bug-fixes-17">Bug fixes</a></li> +<li><a href="#bug-fixes-18" id="toc-bug-fixes-18">Bug fixes</a></li> </ul></li> <li><a href="#section-1" id="toc-section-1"><code>1.3 (2018/03/01)</code></a> <ul> -<li><a href="#breaking-changes-9" id="toc-breaking-changes-9">Breaking +<li><a href="#breaking-changes-10" id="toc-breaking-changes-10">Breaking changes</a></li> <li><a href="#improvements-and-new-features-7" id="toc-improvements-and-new-features-7">Improvements and new @@ -342,29 +351,29 @@ id="toc-q-20180206"><code>1.2q (2018/02/06)</code></a> <li><a href="#improvements-and-new-features-8" id="toc-improvements-and-new-features-8">Improvements and new features</a></li> -<li><a href="#bug-fixes-18" id="toc-bug-fixes-18">Bug fixes</a></li> +<li><a href="#bug-fixes-19" id="toc-bug-fixes-19">Bug fixes</a></li> </ul></li> <li><a href="#p-20171205" id="toc-p-20171205"><code>1.2p (2017/12/05)</code></a> <ul> -<li><a href="#breaking-changes-10" id="toc-breaking-changes-10">Breaking +<li><a href="#breaking-changes-11" id="toc-breaking-changes-11">Breaking changes</a></li> <li><a href="#improvements-and-new-features-9" id="toc-improvements-and-new-features-9">Improvements and new features</a></li> -<li><a href="#bug-fixes-19" id="toc-bug-fixes-19">Bug fixes</a></li> +<li><a href="#bug-fixes-20" id="toc-bug-fixes-20">Bug fixes</a></li> </ul></li> <li><a href="#o-20170829" id="toc-o-20170829"><code>1.2o (2017/08/29)</code></a> <ul> -<li><a href="#breaking-changes-11" id="toc-breaking-changes-11">Breaking +<li><a href="#breaking-changes-12" id="toc-breaking-changes-12">Breaking changes</a></li> <li><a href="#deprecated-1" id="toc-deprecated-1">Deprecated</a></li> </ul></li> <li><a href="#n-20170806" id="toc-n-20170806"><code>1.2n (2017/08/06)</code></a> <ul> -<li><a href="#breaking-changes-12" id="toc-breaking-changes-12">Breaking +<li><a href="#breaking-changes-13" id="toc-breaking-changes-13">Breaking changes</a></li> <li><a href="#improvements-and-new-features-10" id="toc-improvements-and-new-features-10">Improvements and new @@ -373,31 +382,31 @@ features</a></li> <li><a href="#m-20170731" id="toc-m-20170731"><code>1.2m (2017/07/31)</code></a> <ul> -<li><a href="#breaking-changes-13" id="toc-breaking-changes-13">Breaking +<li><a href="#breaking-changes-14" id="toc-breaking-changes-14">Breaking changes</a></li> <li><a href="#improvements-and-new-features-11" id="toc-improvements-and-new-features-11">Improvements and new features</a></li> -<li><a href="#bug-fixes-20" id="toc-bug-fixes-20">Bug fixes</a></li> +<li><a href="#bug-fixes-21" id="toc-bug-fixes-21">Bug fixes</a></li> </ul></li> <li><a href="#l-20170726" id="toc-l-20170726"><code>1.2l (2017/07/26)</code></a> <ul> -<li><a href="#removed-1" id="toc-removed-1">Removed</a></li> +<li><a href="#removed-2" id="toc-removed-2">Removed</a></li> <li><a href="#improvements-and-new-features-12" id="toc-improvements-and-new-features-12">Improvements and new features</a></li> -<li><a href="#bug-fixes-21" id="toc-bug-fixes-21">Bug fixes</a></li> +<li><a href="#bug-fixes-22" id="toc-bug-fixes-22">Bug fixes</a></li> </ul></li> <li><a href="#k-20170106" id="toc-k-20170106"><code>1.2k (2017/01/06)</code></a> <ul> -<li><a href="#breaking-changes-14" id="toc-breaking-changes-14">Breaking +<li><a href="#breaking-changes-15" id="toc-breaking-changes-15">Breaking changes</a></li> <li><a href="#improvements-and-new-features-13" id="toc-improvements-and-new-features-13">Improvements and new features</a></li> -<li><a href="#bug-fixes-22" id="toc-bug-fixes-22">Bug fixes</a></li> +<li><a href="#bug-fixes-23" id="toc-bug-fixes-23">Bug fixes</a></li> </ul></li> <li><a href="#j-20161222" id="toc-j-20161222"><code>1.2j (2016/12/22)</code></a> @@ -405,18 +414,18 @@ id="toc-j-20161222"><code>1.2j (2016/12/22)</code></a> <li><a href="#improvements-and-new-features-14" id="toc-improvements-and-new-features-14">Improvements and new features</a></li> -<li><a href="#bug-fixes-23" id="toc-bug-fixes-23">Bug fixes</a></li> +<li><a href="#bug-fixes-24" id="toc-bug-fixes-24">Bug fixes</a></li> </ul></li> <li><a href="#i-20161213" id="toc-i-20161213"><code>1.2i (2016/12/13)</code></a> <ul> -<li><a href="#breaking-changes-15" id="toc-breaking-changes-15">Breaking +<li><a href="#breaking-changes-16" id="toc-breaking-changes-16">Breaking changes</a></li> -<li><a href="#removed-2" id="toc-removed-2">Removed</a></li> +<li><a href="#removed-3" id="toc-removed-3">Removed</a></li> <li><a href="#improvements-and-new-features-15" id="toc-improvements-and-new-features-15">Improvements and new features</a></li> -<li><a href="#bug-fixes-24" id="toc-bug-fixes-24">Bug fixes</a></li> +<li><a href="#bug-fixes-25" id="toc-bug-fixes-25">Bug fixes</a></li> </ul></li> <li><a href="#h-20161120" id="toc-h-20161120"><code>1.2h (2016/11/20)</code></a> @@ -424,12 +433,12 @@ id="toc-h-20161120"><code>1.2h (2016/11/20)</code></a> <li><a href="#improvements-and-new-features-16" id="toc-improvements-and-new-features-16">Improvements and new features</a></li> -<li><a href="#bug-fixes-25" id="toc-bug-fixes-25">Bug fixes</a></li> +<li><a href="#bug-fixes-26" id="toc-bug-fixes-26">Bug fixes</a></li> </ul></li> <li><a href="#g-20160319" id="toc-g-20160319"><code>1.2g (2016/03/19)</code></a> <ul> -<li><a href="#breaking-changes-16" id="toc-breaking-changes-16">Breaking +<li><a href="#breaking-changes-17" id="toc-breaking-changes-17">Breaking changes</a></li> <li><a href="#improvements-and-new-features-17" id="toc-improvements-and-new-features-17">Improvements and new @@ -438,12 +447,12 @@ features</a></li> <li><a href="#f-20160312" id="toc-f-20160312"><code>1.2f (2016/03/12)</code></a> <ul> -<li><a href="#breaking-changes-17" id="toc-breaking-changes-17">Breaking +<li><a href="#breaking-changes-18" id="toc-breaking-changes-18">Breaking changes</a></li> <li><a href="#improvements-and-new-features-18" id="toc-improvements-and-new-features-18">Improvements and new features</a></li> -<li><a href="#bug-fixes-26" id="toc-bug-fixes-26">Bug fixes</a></li> +<li><a href="#bug-fixes-27" id="toc-bug-fixes-27">Bug fixes</a></li> </ul></li> <li><a href="#e-20151122" id="toc-e-20151122"><code>1.2e (2015/11/22)</code></a> @@ -451,7 +460,7 @@ id="toc-e-20151122"><code>1.2e (2015/11/22)</code></a> <li><a href="#improvements-and-new-features-19" id="toc-improvements-and-new-features-19">Improvements and new features</a></li> -<li><a href="#bug-fixes-27" id="toc-bug-fixes-27">Bug fixes</a></li> +<li><a href="#bug-fixes-28" id="toc-bug-fixes-28">Bug fixes</a></li> </ul></li> <li><a href="#d-20151118" id="toc-d-20151118"><code>1.2d (2015/11/18)</code></a> @@ -459,7 +468,7 @@ id="toc-d-20151118"><code>1.2d (2015/11/18)</code></a> <li><a href="#improvements-and-new-features-20" id="toc-improvements-and-new-features-20">Improvements and new features</a></li> -<li><a href="#bug-fixes-28" id="toc-bug-fixes-28">Bug fixes</a></li> +<li><a href="#bug-fixes-29" id="toc-bug-fixes-29">Bug fixes</a></li> </ul></li> <li><a href="#c-20151116" id="toc-c-20151116"><code>1.2c (2015/11/16)</code></a> @@ -467,12 +476,12 @@ id="toc-c-20151116"><code>1.2c (2015/11/16)</code></a> <li><a href="#improvements-and-new-features-21" id="toc-improvements-and-new-features-21">Improvements and new features</a></li> -<li><a href="#bug-fixes-29" id="toc-bug-fixes-29">Bug fixes</a></li> +<li><a href="#bug-fixes-30" id="toc-bug-fixes-30">Bug fixes</a></li> </ul></li> <li><a href="#b-20151029" id="toc-b-20151029"><code>1.2b (2015/10/29)</code></a> <ul> -<li><a href="#bug-fixes-30" id="toc-bug-fixes-30">Bug fixes</a></li> +<li><a href="#bug-fixes-31" id="toc-bug-fixes-31">Bug fixes</a></li> </ul></li> <li><a href="#a-20151019" id="toc-a-20151019"><code>1.2a (2015/10/19)</code></a> @@ -480,12 +489,12 @@ id="toc-a-20151019"><code>1.2a (2015/10/19)</code></a> <li><a href="#improvements-and-new-features-22" id="toc-improvements-and-new-features-22">Improvements and new features</a></li> -<li><a href="#bug-fixes-31" id="toc-bug-fixes-31">Bug fixes</a></li> +<li><a href="#bug-fixes-32" id="toc-bug-fixes-32">Bug fixes</a></li> </ul></li> <li><a href="#section-2" id="toc-section-2"><code>1.2 (2015/10/10)</code></a> <ul> -<li><a href="#removed-3" id="toc-removed-3">Removed</a></li> +<li><a href="#removed-4" id="toc-removed-4">Removed</a></li> <li><a href="#improvements-and-new-features-23" id="toc-improvements-and-new-features-23">Improvements and new features</a></li> @@ -499,14 +508,14 @@ id="toc-a-20141107"><code>1.1a (2014/11/07)</code></a></li> <li><a href="#section-3" id="toc-section-3"><code>1.1 (2014/10/28)</code></a> <ul> -<li><a href="#breaking-changes-18" id="toc-breaking-changes-18">Breaking +<li><a href="#breaking-changes-19" id="toc-breaking-changes-19">Breaking changes</a></li> -<li><a href="#removed-4" id="toc-removed-4">Removed</a></li> +<li><a href="#removed-5" id="toc-removed-5">Removed</a></li> <li><a href="#deprecated-2" id="toc-deprecated-2">Deprecated</a></li> <li><a href="#improvements-and-new-features-24" id="toc-improvements-and-new-features-24">Improvements and new features</a></li> -<li><a href="#bug-fixes-32" id="toc-bug-fixes-32">Bug fixes</a></li> +<li><a href="#bug-fixes-33" id="toc-bug-fixes-33">Bug fixes</a></li> </ul></li> <li><a href="#n-20140401" id="toc-n-20140401"><code>1.09n (2014/04/01)</code></a></li> @@ -558,13 +567,78 @@ id="toc-section-9"><code>1.03 (2013/04/14)</code></a></li> id="toc-section-10"><code>1.0 (2013/03/28)</code></a></li> </ul> </nav> -<pre><code>Source: xint.dtx 1.4l 2022/05/29 (doc 2022/05/29) +<pre><code>Source: xint.dtx 1.4m 2022/06/10 (doc 2022/06/11) Author: Jean-Francois Burnol Info: Expandable operations on big integers, decimals, fractions License: LPPL 1.3c</code></pre> -<h2 id="l-20220529"><code>1.4l (2022/05/29)</code></h2> +<h2 id="m-20220610"><code>1.4m (2022/06/10)</code></h2> +<p>The fix of a compatibility bug with <code>miniltx</code> and the +already in place documentation improvements (in particular, hyperlinked +macro names in code lines) motivated release <code>1.4m</code>. With +some hesitation I decided to not revert the removals and breaking +changes listed here and which had been already acted in preparation of +an hypothetic future <code>1.5</code>.</p> +<h3 id="removed">Removed</h3> +<ul> +<li><p><strong>xintexpr</strong>: <code>\xintdefefunc</code> et al., +deprecated at <code>1.4</code> have been removed.</p></li> +<li><p><strong>xintexpr</strong>: <code>\thexintexpr</code> et al., +deprecated at <code>1.4b</code> have been removed. Use +<code>\xinttheexpr</code> et al.</p></li> +<li><p><strong>xintlog</strong>: <code>\poormanloghack</code> which was +a no-op since <code>1.4e</code> has been removed.</p></li> +<li><p><strong>xintfrac</strong>: <code>\xintFrac</code>, +<code>\xintFwOver</code>, <code>\xintSignedFrac</code>, +<code>\xintSignedFwOver</code> now raise errors. They were deprecated at +<code>1.4g</code>, check the documentation for the new names +<code>\xintTeXFrac</code> et al.</p></li> +</ul> +<h3 id="breaking-changes">Breaking changes</h3> +<ul> +<li><p><strong>xintexpr</strong>: <code>\xinttheboolexpr</code> now +outputs <code>true</code> or <code>false</code> (to match TeX +conventions) and not the <code>True</code> or <code>False</code> +employed since <code>1.4</code> (inside expressions <code>true</code>, +<code>false</code>, <code>True</code> and <code>False</code> are all +recognized keywords anyhow).</p></li> +<li><p>The <code>\pdfstrcmp/\strcmp</code> engine primitive is required. +With <code>LuaTeX</code> it is emulated via <code>Lua</code> code +basically copied over from <code>LaTeX3</code>. Not sure if this is +breaking as the package already requires the <code>\expanded</code> +primitive. Only used so far by (as expected) <code>\xintiiCmp</code>, +and macros which will end up calling it.</p></li> +</ul> <h3 id="bug-fixes">Bug fixes</h3> <ul> +<li><strong>xintexpr</strong>: with +<code>\input xintexpr.sty\relax</code> in <code>(pdf)eTeX</code> plus +<code>miniltx</code> (naturally, if <code>miniltx</code> was already +loaded), and with versions up to <code>1.4k</code> the +<code>xinttrig</code> and <code>xintlog</code> aborted their own +<code>xintexpr</code>-triggered input erroneously thinking the latter +had not yet been loaded, and emitted only a very discrete message to the +log file. With <code>1.4l</code> it became worse as +<code>\input xintexpr\relax</code> auto-repeated itself about six times +until <code>TeX</code> called it quits.</li> +</ul> +<h3 id="improvements">Improvements</h3> +<ul> +<li><p>Documentation: most macros are hyperlinked in the source code to +the code line of their definitions. Furthermore, from the place of the +definition the main macros will link to either their descriptions in the +user manual (in <code>xint-all.pdf</code>) or in the implementation part +(<code>sourcexint.pdf</code>). Conversely inside +<code>xint-all.pdf</code> the macro descriptions are linked towards +their implementation. You may notice some time lag with some pdf viewers +on opening the heavily hyperlinked <code>sourcexint.pdf</code> compared +to previous releases.</p></li> +<li><p>Not sure if that counts as an improvement, but I have shortened +the wording of the expandable error messages, which had been last +modified at <code>1.4g</code>.</p></li> +</ul> +<h2 id="l-20220529"><code>1.4l (2022/05/29)</code></h2> +<h3 id="bug-fixes-1">Bug fixes</h3> +<ul> <li><p><strong>xintkernel</strong>: ever since <code>1.4</code>, loading anyone of the <code>xint*sty</code> packages left the catcode of the character of ascii code <code>1</code> to the internal custom value @@ -614,7 +688,7 @@ various obsoleted comments in extracted files involved in the documentation build process.</p></li> </ul> <h2 id="k-20220518"><code>1.4k (2022/05/18)</code></h2> -<h3 id="breaking-changes">Breaking changes</h3> +<h3 id="breaking-changes-1">Breaking changes</h3> <ul> <li><p><strong>xintfrac</strong>: the longstanding (but documented as undecided and unstable) way of <code>\xintFloat</code> to output the @@ -642,7 +716,7 @@ the latter (see <code>1.4l</code> for update).</p></li> “last in first out” stack. Check the <code>pdf</code> documentation for details.</p></li> </ul> -<h3 id="bug-fixes-1">Bug fixes</h3> +<h3 id="bug-fixes-2">Bug fixes</h3> <ul> <li><p><strong>xintexpr</strong>: the <code>\xintexpr{Safe,Restore}Catcodes</code> were documented at user @@ -678,7 +752,7 @@ and <code>\xintfloateval{[Q]...}</code> is kept for backwards compatibility.</p></li> </ul> <h2 id="j-20210713"><code>1.4j (2021/07/13)</code></h2> -<h3 id="bug-fixes-2">Bug fixes</h3> +<h3 id="bug-fixes-3">Bug fixes</h3> <ul> <li><strong>xinttools</strong>: a brace removal bug affected the venerable <code>\xintSeq</code> if producing a single number @@ -701,7 +775,7 @@ single numeric argument: since <code>1.4</code> a lone argument had to be a <code>nutple</code> (which was automatically unpacked). It can now again be a number.</p></li> </ul> -<h3 id="bug-fixes-3">Bug fixes</h3> +<h3 id="bug-fixes-4">Bug fixes</h3> <ul> <li><p><strong>xintexpr</strong>: simultaneous assignments via <code>\xintdefvar</code> to 10 or more variables was broken if the right @@ -722,7 +796,7 @@ variables (currently <code>subs()</code>, <code>subsm()</code>, <code>seq</code>.</p></li> </ul> <h2 id="h-20210527"><code>1.4h (2021/05/27)</code></h2> -<h3 id="bug-fixes-4">Bug fixes</h3> +<h3 id="bug-fixes-5">Bug fixes</h3> <ul> <li><p><strong>xintexpr</strong>: the recent <code>1.4g</code> introduced a bug breaking input of the type @@ -737,7 +811,7 @@ inserted two, not one, spaces at one specific location near the end of its output. A bit cosmetic problem, fixed nevertheless.</p></li> </ul> <h2 id="g-20210525"><code>1.4g (2021/05/25)</code></h2> -<h3 id="breaking-changes-1">Breaking changes</h3> +<h3 id="breaking-changes-2">Breaking changes</h3> <ul> <li><p><strong>xintexpr</strong>: the parsing of power operators <code>**</code> and <code>^</code> now proceeds in a right associative @@ -769,7 +843,7 @@ about 7 or 8 years too late) to help typesetting values output by <code>\xintfloateval</code> in a more useful way than <code>\xintTeXFrac</code> (formerly <code>\xintFrac</code>).</p></li> </ul> -<h3 id="bug-fixes-5">Bug fixes</h3> +<h3 id="bug-fixes-6">Bug fixes</h3> <ul> <li><p><strong>xintexpr</strong>: with <strong>xintbinhex</strong> loaded, <code>"</code> is recognized as prefix for hexadecimal input; @@ -810,7 +884,7 @@ ultimately caused low-level errors (same with <code>^</code>).</li> parser.</p></li> </ul> <h2 id="f-20210510"><code>1.4f (2021/05/10)</code></h2> -<h3 id="breaking-changes-2">Breaking changes</h3> +<h3 id="breaking-changes-3">Breaking changes</h3> <ul> <li><p><strong>xintexpr</strong>: <code>\xintieval{[-D]...}</code>, which rounds to a multiple of <code>1eD</code> for <code>D</code> @@ -837,7 +911,7 @@ powers, see the bug fixes below.</p></li> <li><p><strong>xintexpr</strong>: the <code>float_()</code> function got renamed into <code>float_dgt()</code>.</p></li> </ul> -<h3 id="bug-fixes-6">Bug fixes</h3> +<h3 id="bug-fixes-7">Bug fixes</h3> <ul> <li><p><strong>xintexpr</strong>: the documentation said <code>float_()</code> function had been renamed <code>float_dgt()</code> @@ -871,7 +945,7 @@ cases.</p></li> Digits was at most <code>8</code>.</p></li> </ul> <h2 id="e-20210505"><code>1.4e (2021/05/05)</code></h2> -<h3 id="breaking-changes-3">Breaking changes</h3> +<h3 id="breaking-changes-4">Breaking changes</h3> <ul> <li><p><strong>xintlog</strong>: <code>\poormanloghack</code> now a no-op.</p></li> @@ -948,7 +1022,7 @@ the letter <code>e</code>.</p></li> like <code>\xintDecToString</code> but starts by removing trailing zeroes.</p></li> </ul> -<h3 id="bug-fixes-7">Bug fixes</h3> +<h3 id="bug-fixes-8">Bug fixes</h3> <ul> <li><strong>xintfrac</strong>, <strong>xintexpr</strong>: it was not possible to use <code>\xinttheDigits</code> in the right hand side of an @@ -958,7 +1032,7 @@ allowed, and the same applies to the macro interface, for example <code>\xintSetDigits*{\xinttheDigits+4}</code>.</li> </ul> <h2 id="d-20210329"><code>1.4d (2021/03/29)</code></h2> -<h3 id="breaking-changes-4">Breaking changes</h3> +<h3 id="breaking-changes-5">Breaking changes</h3> <ul> <li><p><code>quo()</code> and <code>rem()</code> in <code>\xintiiexpr/\xintiieval</code> renamed to <code>iquo()</code> and @@ -970,7 +1044,7 @@ applied to fractions is now always in lowest terms.</p></li> around the name. By the way, quotes were never used for function names.</p></li> </ul> -<h3 id="bug-fixes-8">Bug fixes</h3> +<h3 id="bug-fixes-9">Bug fixes</h3> <ul> <li><p>Ever since <code>1.3</code> the <code>quo()</code> and <code>rem()</code> functions in <code>\xintexpr</code> (not the ones in @@ -995,7 +1069,7 @@ inside an <code>\xintdeffunc</code> caused the defined function to be broken.</p></li> </ul> <h2 id="c-20210220"><code>1.4c (2021/02/20)</code></h2> -<h3 id="bug-fixes-9">Bug fixes</h3> +<h3 id="bug-fixes-10">Bug fixes</h3> <ul> <li>Fix <code>1.4</code> regression which broke syntax <code>varname(...)</code> which supposedly is allowed and inserts a @@ -1037,7 +1111,7 @@ strangely there was no way to customize the output of <code>\xintfloateval</code>. The added <code>\xintPFloatE</code> fixes this.</p></li> </ul> -<h3 id="bug-fixes-10">Bug fixes</h3> +<h3 id="bug-fixes-11">Bug fixes</h3> <ul> <li><code>\xintieval{[D]...}</code> with a negative <code>D</code> (a feature added at <code>1.4a</code>) used erroneously a catcode 12 @@ -1046,7 +1120,7 @@ feature added at <code>1.4a</code>) used erroneously a catcode 12 </ul> <h2 id="a-20200219"><code>1.4a (2020/02/19)</code></h2> <p>All changes regard the <strong>xintexpr</strong> module.</p> -<h3 id="breaking-changes-5">Breaking changes</h3> +<h3 id="breaking-changes-6">Breaking changes</h3> <ul> <li>The macros implementing customization of <code>\xintthealign</code> have modified meanings and names.</li> @@ -1064,7 +1138,7 @@ of <code>10^(-D)</code>.</p> <code>\xintRound</code>, <code>\xintiTrunc</code>, and <code>\xintiRound</code> macros of <strong>xintfrac</strong>.</p></li> </ul> -<h3 id="bug-fixes-11">Bug fixes</h3> +<h3 id="bug-fixes-12">Bug fixes</h3> <ul> <li><p>Usage of <code>round()</code> and <code>trunc()</code> within <code>\xintdeffunc</code> got broken at <code>1.4</code>.</p></li> @@ -1074,7 +1148,7 @@ accepting the <code>omit</code>, <code>abort</code> and broken.</p></li> </ul> <h2 id="section"><code>1.4 (2020/01/31)</code></h2> -<h3 id="breaking-changes-6">Breaking changes</h3> +<h3 id="breaking-changes-7">Breaking changes</h3> <p>Please note that this list may still be incomplete. If not otherly specified all items regard the <strong>xintexpr</strong> module.</p> <ul> @@ -1294,7 +1368,7 @@ example a correct variable or function name in place of the not recognized one. But don’t expect miracles when trying to intervene in the midst of a purely expandable expansion…</p></li> </ul> -<h3 id="bug-fixes-12">Bug fixes</h3> +<h3 id="bug-fixes-13">Bug fixes</h3> <p>Bugs? Those identified in <code>1.3f</code> were almost features. As per <code>1.4</code> the code base of <strong>xintexpr</strong> received multiple successive core refactorings and added numerous new features, @@ -1331,7 +1405,7 @@ token e.g. <code>\xintDigits := 32\relax</code>.</p> expressions by <code>\xintdeffunc</code>. And make them usable also inside macro definitions via <code>\xintNewExpr</code>.</p></li> </ul> -<h3 id="bug-fixes-13">Bug fixes</h3> +<h3 id="bug-fixes-14">Bug fixes</h3> <ul> <li><p><strong>xintexpr</strong>: fix bug preventing usage of <code>\xintdefefunc</code> to define a function without variables.</p> @@ -1339,7 +1413,7 @@ inside macro definitions via <code>\xintNewExpr</code>.</p></li> inside an expression parsed by <code>\xintdeffunc</code> et al.</p></li> </ul> <h2 id="e-20190405"><code>1.3e (2019/04/05)</code></h2> -<h3 id="breaking-changes-7">Breaking changes</h3> +<h3 id="breaking-changes-8">Breaking changes</h3> <ul> <li>(<em>reverted at 1.3f</em>) When defining functions, sub-expressions can only use the <code>\xint(float)expr...\relax</code> syntax. One can @@ -1378,13 +1452,13 @@ shortcomings.</p></li> be negative; it then means to trim (and round) from the output at float precision that many least significant digits.</p></li> </ul> -<h3 id="bug-fixes-14">Bug fixes</h3> +<h3 id="bug-fixes-15">Bug fixes</h3> <ul> <li>Some bugfixes related to user functions with no variables at all; they were dysfunctional.</li> </ul> <h2 id="d-20190106"><code>1.3d (2019/01/06)</code></h2> -<h3 id="breaking-changes-8">Breaking changes</h3> +<h3 id="breaking-changes-9">Breaking changes</h3> <ul> <li><p><strong>xintexpr</strong>: the <code>gcd()</code> and <code>lcm()</code> functions formerly converted their arguments to @@ -1421,7 +1495,7 @@ value zero),</p></li> <code>\xinttheexpr...\relax</code> etc…, but with the (comma-separated) expression as a usual braced macro argument.</p></li> </ul> -<h3 id="bug-fixes-15">Bug fixes</h3> +<h3 id="bug-fixes-16">Bug fixes</h3> <ul> <li><strong>xintcore</strong>, <strong>xintexpr</strong> : division in <code>\xintiiexpr</code> was broken for a zero dividend and a one-digit @@ -1453,7 +1527,7 @@ work if that catcode is already frozen.</p></li> <code>sourcexint.pdf</code> is better hyperlinked and includes indices for the macros defined by each package.</p></li> </ul> -<h3 id="bug-fixes-16">Bug fixes</h3> +<h3 id="bug-fixes-17">Bug fixes</h3> <ul> <li><strong>xintfrac</strong>: since <code>1.3</code> release, it loaded <strong>xintgcd</strong> in contradiction to what the documentation says @@ -1485,7 +1559,7 @@ was required.</p></li> <li><p>The usual provision of user manual “improvements”.</p></li> </ul> <h2 id="a-20180307"><code>1.3a (2018/03/07)</code></h2> -<h3 id="removed">Removed</h3> +<h3 id="removed-1">Removed</h3> <ul> <li><strong>xintcore</strong>, <strong>xint</strong>, <strong>xintfrac</strong>: removal of the internal macros which were @@ -1504,7 +1578,7 @@ inputs having one hundred digits or more.</p></li> <code>\xintDivFloor</code>, <code>\xintMod</code>, <code>\xintModTrunc</code>, which had been left out so far.</p></li> </ul> -<h3 id="bug-fixes-17">Bug fixes</h3> +<h3 id="bug-fixes-18">Bug fixes</h3> <ul> <li><strong>xintexpr</strong>: the mechanism for adjunction to the expression parsers of user defined functions was refactored and improved @@ -1514,7 +1588,7 @@ functions quite inefficient (to remain polite.) This release fixes the problem.</li> </ul> <h2 id="section-1"><code>1.3 (2018/03/01)</code></h2> -<h3 id="breaking-changes-9">Breaking changes</h3> +<h3 id="breaking-changes-10">Breaking changes</h3> <ul> <li><p><strong>xintcore</strong>, <strong>xint</strong>, <strong>xintfrac</strong>: all macros deprecated at <code>1.2o</code> @@ -1555,7 +1629,7 @@ features</h3> <li><strong>xintexpr</strong>: tacit multiplication extended to cases such as <code>3!4!5!</code> or <code>(1+2)3</code>.</li> </ul> -<h3 id="bug-fixes-18">Bug fixes</h3> +<h3 id="bug-fixes-19">Bug fixes</h3> <ul> <li><strong>xintcore</strong>: sadly, refactoring at <code>1.2l</code> of subtraction left an extra character in an inner macro causing @@ -1563,7 +1637,7 @@ breakage in some rare circumstances. This should not have escaped our test suite!</li> </ul> <h2 id="p-20171205"><code>1.2p (2017/12/05)</code></h2> -<h3 id="breaking-changes-10">Breaking changes</h3> +<h3 id="breaking-changes-11">Breaking changes</h3> <ul> <li><p><strong>xintgcd</strong>: <code>\xintBezout{a}{b}</code>’s output consists of <code>{u}{v}{d}</code> with <code>u*a+v*b==d</code>, with @@ -1603,7 +1677,7 @@ built-in functions. It is associated with floored division, like the Python language <code>divmod()</code>. Related support macros added to <strong>xintcore</strong>, and <strong>xintfrac</strong>.</p></li> </ul> -<h3 id="bug-fixes-19">Bug fixes</h3> +<h3 id="bug-fixes-20">Bug fixes</h3> <ul> <li><p><strong>xintgcd</strong>: <code>\xintBezout{6}{3}</code> (for example) expanded to <code>{6}{3}{-0}{-1}{3}</code>, but the @@ -1622,7 +1696,7 @@ dependency of <strong>xintcfrac</strong> on <strong>xinttools</strong> had not been mentioned.</p></li> </ul> <h2 id="o-20170829"><code>1.2o (2017/08/29)</code></h2> -<h3 id="breaking-changes-11">Breaking changes</h3> +<h3 id="breaking-changes-12">Breaking changes</h3> <ul> <li><strong>xint</strong>: <code>\xintAND</code>, <code>\xintOR</code>, … and similar Boolean logic macros do not apply anymore @@ -1681,7 +1755,7 @@ about Boolean logic macros in the <em>Incompatible Changes</em> section.</p></li> </ul> <h2 id="n-20170806"><code>1.2n (2017/08/06)</code></h2> -<h3 id="breaking-changes-12">Breaking changes</h3> +<h3 id="breaking-changes-13">Breaking changes</h3> <ul> <li><strong>xintbinhex</strong> does not load package <strong>xintcore</strong> anymore, but only @@ -1696,7 +1770,7 @@ as dependency.</p></li> speed and increased maximal sizes of allowable inputs.</p></li> </ul> <h2 id="m-20170731"><code>1.2m (2017/07/31)</code></h2> -<h3 id="breaking-changes-13">Breaking changes</h3> +<h3 id="breaking-changes-14">Breaking changes</h3> <ul> <li><p><strong>xintbinhex</strong>: the length of the input is now limited. The maximum size depends on the macro and ranges from about @@ -1716,7 +1790,7 @@ but limited to a few thousand digits. The <code>1.08</code> routines could handle tens of thousands of digits, but not in a reasonable time.</li> </ul> -<h3 id="bug-fixes-20">Bug fixes</h3> +<h3 id="bug-fixes-21">Bug fixes</h3> <ul> <li><p>user manual: the <code>Changes</code> section wrongly stated at <code>1.2l</code> that the macros of <strong>xintbinhex</strong> had @@ -1733,7 +1807,7 @@ This is fixed here with some additional efficiency improvements and pruning of old code.</p></li> </ul> <h2 id="l-20170726"><code>1.2l (2017/07/26)</code></h2> -<h3 id="removed-1">Removed</h3> +<h3 id="removed-2">Removed</h3> <ul> <li><p><code>\xintiiSumExpr</code>, <code>\xintiiPrdExpr</code> (<strong>xint</strong>) and <code>\xintSumExpr</code>, @@ -1785,7 +1859,7 @@ in this example a second <code>\relax</code>.</p></li> interface yet, it is done in preparation for next major release and is completely unstable and undocumented.</p></li> </ul> -<h3 id="bug-fixes-21">Bug fixes</h3> +<h3 id="bug-fixes-22">Bug fixes</h3> <ul> <li><p><strong>xintbinhex</strong>: since <code>1.2 (2015/10/10)</code>, <code>\xintHexToDec</code> was broken due to an undefined macro (it was @@ -1803,7 +1877,7 @@ not to worry about the token count… The ending <code>\relax</code> is now un-needed.</p></li> </ul> <h2 id="k-20170106"><code>1.2k (2017/01/06)</code></h2> -<h3 id="breaking-changes-14">Breaking changes</h3> +<h3 id="breaking-changes-15">Breaking changes</h3> <ul> <li><p>macro <code>\xintFloat</code> which rounds its input to a floating point number does <em>not</em> print anymore @@ -1844,7 +1918,7 @@ variables.)</p></li> improved <code>\xintNewExpr</code> compatibility. Also <code>\xintFirstItem:f:csv</code>.</p></li> </ul> -<h3 id="bug-fixes-22">Bug fixes</h3> +<h3 id="bug-fixes-23">Bug fixes</h3> <ul> <li><p>the <code>1.2f</code> half-integer powers computed within <code>\xintfloatexpr</code> had a silly rounding to the target precision @@ -1883,7 +1957,7 @@ horizontal and vertical rules which bring the documentation of the except that implementation of some math functions is still lacking.</p></li> </ul> -<h3 id="bug-fixes-23">Bug fixes</h3> +<h3 id="bug-fixes-24">Bug fixes</h3> <ul> <li>fix two <code>1.2i</code> regressions caused by undefined macros (<code>\xintNthElt</code> in certain branches and <code>[list][N]</code> @@ -1891,13 +1965,13 @@ item extraction in certain cases.) The test files existed but were not executed prior to release. Automation in progress.</li> </ul> <h2 id="i-20161213"><code>1.2i (2016/12/13)</code></h2> -<h3 id="breaking-changes-15">Breaking changes</h3> +<h3 id="breaking-changes-16">Breaking changes</h3> <ul> <li><code>\xintDecSplit</code> second argument must have no sign (former code replaced it with its absolute value, a sign now may cause an error.)</li> </ul> -<h3 id="removed-2">Removed</h3> +<h3 id="removed-3">Removed</h3> <ul> <li>deprecated macros <code>\xintifTrue</code>, <code>\xintifTrueFalse</code>, <code>\xintQuo</code>, @@ -1953,7 +2027,7 @@ should have been removed long ago) and uses only the more apt “macro”, as after all, all of <strong>xint</strong> is about expansion of macros (plus the use of <code>\numexpr</code>).</p></li> </ul> -<h3 id="bug-fixes-24">Bug fixes</h3> +<h3 id="bug-fixes-25">Bug fixes</h3> <ul> <li><code>\xintDecSplitL</code> and <code>\xintDecSplitR</code> from <strong>xint</strong> produced their output in a spurious brace pair @@ -1973,7 +2047,7 @@ prefix, now <code>\thexintexpr</code>, <code>\thexintiexpr</code>, <code>\thexintfloatexpr</code>, and <code>\thexintiiexpr</code> are provided as synonyms to <code>\xinttheexpr</code>, etc…</p></li> </ul> -<h3 id="bug-fixes-25">Bug fixes</h3> +<h3 id="bug-fixes-26">Bug fixes</h3> <ul> <li><p>the <code>(cond)?{foo}{bar}</code> operator from <strong>xintexpr</strong> mis-behaved in certain circumstances (such as @@ -1998,7 +2072,7 @@ rather than producing respectively <code>0</code> and <code>1</code> as formerly.</p></li> </ul> <h2 id="g-20160319"><code>1.2g (2016/03/19)</code></h2> -<h3 id="breaking-changes-16">Breaking changes</h3> +<h3 id="breaking-changes-17">Breaking changes</h3> <ul> <li><p>inside expressions, list item selector <code>[L][n]</code> counts starting at zero, not at one. This is more coherent with @@ -2038,7 +2112,7 @@ Brent-Salamin algorithm for computation of Pi using <code>iter</code> in a float expression.</p></li> </ul> <h2 id="f-20160312"><code>1.2f (2016/03/12)</code></h2> -<h3 id="breaking-changes-17">Breaking changes</h3> +<h3 id="breaking-changes-18">Breaking changes</h3> <ul> <li>no more <code>\xintFac</code> macro but <code>\xintiFac/\xintiiFac/\xintFloatFac</code>.</li> @@ -2086,7 +2160,7 @@ initial <code>\romannumeral</code> anymore.</p></li> random shuffling of sections and well thought additions; cuts were considered and even performed.</p></li> </ul> -<h3 id="bug-fixes-26">Bug fixes</h3> +<h3 id="bug-fixes-27">Bug fixes</h3> <ul> <li><p>squaring macro <code>\xintSqr</code> from <strong>xintfrac.sty</strong> was broken due to a misspelled sub-macro @@ -2116,7 +2190,7 @@ its included code samples has been entirely re-written; the <em>Commands of the xintexpr package</em> section has been extended and reviewed entirely.</p></li> </ul> -<h3 id="bug-fixes-27">Bug fixes</h3> +<h3 id="bug-fixes-28">Bug fixes</h3> <ul> <li><p>in <strong>xintfrac</strong>: the <code>\xintFloatFac</code> from release <code>1.2</code> parsed its argument only through @@ -2142,7 +2216,7 @@ x/(2*y).</p></li> <li><p>some documentation enhancements, particularly in the chapter on xintexpr.sty, and also in the code source comments.</p></li> </ul> -<h3 id="bug-fixes-28">Bug fixes</h3> +<h3 id="bug-fixes-29">Bug fixes</h3> <ul> <li>in <strong>xintcore</strong>: release <code>1.2c</code> had inadvertently broken the <code>\xintiiDivRound</code> macro.</li> @@ -2157,14 +2231,14 @@ features</h3> <li><p>on-going code improvements and documentation enhancements, but stopped in order to issue this bugfix release.</p></li> </ul> -<h3 id="bug-fixes-29">Bug fixes</h3> +<h3 id="bug-fixes-30">Bug fixes</h3> <ul> <li>in <strong>xintcore</strong>: recent release <code>1.2</code> introduced a bug in the subtraction (happened when 00000001 was found under certain circumstances at certain mod 8 locations).</li> </ul> <h2 id="b-20151029"><code>1.2b (2015/10/29)</code></h2> -<h3 id="bug-fixes-30">Bug fixes</h3> +<h3 id="bug-fixes-31">Bug fixes</h3> <ul> <li>in <strong>xintcore</strong>: recent release <code>1.2</code> introduced a bug in the division macros, causing a crash when the @@ -2186,7 +2260,7 @@ regarding brace stripping.</p></li> <code>\romannumeral`&&@</code> (<code>^</code> being used as letter, had to find another character usable with catcode 7).</p></li> </ul> -<h3 id="bug-fixes-31">Bug fixes</h3> +<h3 id="bug-fixes-32">Bug fixes</h3> <ul> <li>in <strong>xintexpr</strong>: recent release <code>1.2</code> introduced a bad bug in the parsing of decimal numbers and as a result @@ -2194,7 +2268,7 @@ introduced a bad bug in the parsing of decimal numbers and as a result (sigh…)</li> </ul> <h2 id="section-2"><code>1.2 (2015/10/10)</code></h2> -<h3 id="removed-3">Removed</h3> +<h3 id="removed-4">Removed</h3> <ul> <li>the macros <code>\xintAdd</code>, <code>\xintSub</code>, <code>\xintMul</code>, <code>\xintMax</code>, <code>\xintMin</code>, @@ -2300,7 +2374,7 @@ example of nested <code>subs</code>, <code>rseq</code>, <code>iter</code> in <code>\xintiiexpr</code>.</p></li> </ul> <h2 id="section-3"><code>1.1 (2014/10/28)</code></h2> -<h3 id="breaking-changes-18">Breaking changes</h3> +<h3 id="breaking-changes-19">Breaking changes</h3> <ul> <li><p>in <code>\xintiiexpr</code>, <code>/</code> does <em>rounded</em> division, rather than the Euclidean division (for positive arguments, @@ -2330,7 +2404,7 @@ form are now managed via a <code>protect(...)</code> function.</p></li> (integer) output. New <code>\xintiFloor</code> and <code>\xintiCeil</code> do not.</p></li> </ul> -<h3 id="removed-4">Removed</h3> +<h3 id="removed-5">Removed</h3> <ul> <li><code>\xintnumexpr</code>, <code>\xintthenumexpr</code>, <code>\xintNewNumExpr</code>: use <code>\xintiexpr</code>, @@ -2469,7 +2543,7 @@ even number of items to the format expected by the <code>TikZ</code> standard macro parameter <code>#</code>. Not all constructs are compatible with <code>\xintNewExpr</code>.</p></li> </ul> -<h3 id="bug-fixes-32">Bug fixes</h3> +<h3 id="bug-fixes-33">Bug fixes</h3> <ul> <li><p><code>\xintZapFirstSpaces</code> hence also <code>\xintZapSpaces</code> from package <strong>xinttools</strong> were diff --git a/macros/generic/xint/README.md b/macros/generic/xint/README.md index b11925c269..56d49da2fb 100644 --- a/macros/generic/xint/README.md +++ b/macros/generic/xint/README.md @@ -1,8 +1,8 @@ % README -% xint 1.4l -% 2022/05/29 +% xint 1.4m +% 2022/06/10 - Source: xint.dtx 1.4l 2022/05/29 (doc 2022/05/29) + Source: xint.dtx 1.4m 2022/06/10 (doc 2022/06/11) Author: Jean-Francois Burnol Info: Expandable operations on big integers, decimals, fractions License: LPPL 1.3c @@ -63,49 +63,36 @@ Installation [MikTeX](http://www.miktex.org/). Thus, use the package manager to update your distribution. -The simplest alternative is to download +Direct installation of both the macro files and the documentation into a +TDS-compliant hierarchy is available via [`xint.tds.zip`](http://mirror.ctan.org/install/macros/generic/xint.tds.zip) -and install the `xint` package files and documentation in a suitable -TDS-compliant repertory via `unzip`. For example, on a macOS system, -installation in user repertory: +and usage of `unzip`. For example, on a macOS system, installation in +user repertory: unzip xint.tds.zip -d ~/Library/texmf -Admin privileges may be needed when moving the files into the TeX -installation. - -Else, one can download `xint.dtx` and optionally `Makefile` from -https://www.ctan.org/tex-archive/macros/generic/xint and proceed from -there. The package files are extracted automatically from -`etex xint.dtx`. So if one does not need to build the documentation, -one only has to move the files with extension `.sty` to one's working -repertory and start using them. - -Here are various options to build the documentation, from the more -automated to the more manual: - -- (with `Makefile`) run `make help` or `make helpless` (on Unix-like - systems) for extracting package files and receiving further - instructions, or directly `make xint.pdf` to both extract package - files and build the user documentation in the current repertory. - The commented source code will be obtained from `make sourcexint.pdf`. - This process requires `latexmk`. The `CHANGES.html` target requires - `pandoc`. - -- (without `Makefile`) run `etex xint.dtx` then rename the extracted - `Makefile.mk` to `Makefile` and proceed as in the previous item. - -- (with no `make`) run `latexmk` on `xint.dtx`. This will both extract - package files and build a `dvi` combining the user documentation and - the commented source code. Finish with `dvipdfmx xint.dvi`. - -- (with no `make`) execute `etex xint.dtx` to extract files then run - `latexmk` on `xint.tex` and `sourcexint.tex`, or perhaps on - `xint-all.tex` to combine user manual and source code in one `pdf`. - -- (with no `make` and no `latexmk`) proceed as in one of the previous - two items but with `latex` sufficiently many times in place of - `latexmk`. Finish with `dvipdfmx`, or use `pdflatex` initially. +Admin privileges may be needed if the target repertory requires it. + +Else, one can download `xint.dtx` from +https://www.ctan.org/tex-archive/macros/generic/xint and execute +`etex xint.dtx` which will extract all macro files (those with extension +`.sty`). One then only needs to move them to a location where `TeX` can +find them. + +To build the documentation one can execute `latex` directly on +`xint.dtx` (at least three times, perhaps more, so `latexmk` is +recommended) then `dvipdfmx` or directly `pdflatex`. The resulting +`xint.pdf` includes both the user manual and the commented source code, +with hyperlinks. + +For those on Unix-like systems the recommended way is to fetch also +`Makefile` from the location above (or to rename the extracted +`Makefile.mk` into `Makefile`), then one can execute `make xint.pdf` +(user manual only), or `make sourcexint.pdf` or `make xint-all.pdf`. +These targets will require `latexmk`. + +Further help can be obtained via `make help` or from the comments +in extracted files `xint.tex`, `sourcexint.tex`, and `xint-all.tex`. Documentation ============= diff --git a/macros/generic/xint/sourcexint.pdf b/macros/generic/xint/sourcexint.pdf Binary files differindex 6c01348a46..da01735efc 100644 --- a/macros/generic/xint/sourcexint.pdf +++ b/macros/generic/xint/sourcexint.pdf diff --git a/macros/generic/xint/xint.dtx b/macros/generic/xint/xint.dtx index 4235de9233..e063eab917 100644 --- a/macros/generic/xint/xint.dtx +++ b/macros/generic/xint/xint.dtx @@ -3,27 +3,27 @@ % Extract all files via "etex xint.dtx" and do "make help" % or follow instructions from extracted README.md. %<*dtx> -\def\xintdtxtimestamp {Time-stamp: <29-05-2022 at 11:55:32 CEST>} +\def\xintdtxtimestamp {Time-stamp: <11-06-2022 at 19:36:36 CEST>} %</dtx> %<*xintdrv|sourcedrv|alldrv> %% --------------------------------------------------------------- -\def\xintdocdate {2022/05/29} -\def\xintbndldate{2022/05/29} -\def\xintbndlversion {1.4l} +\def\xintdocdate {2022/06/11} +\def\xintbndldate{2022/06/10} +\def\xintbndlversion {1.4m} %</xintdrv|sourcedrv|alldrv> %<readme>% README %<changes>% CHANGE LOG -%<readme|changes>% xint 1.4l -%<readme|changes>% 2022/05/29 +%<readme|changes>% xint 1.4m +%<readme|changes>% 2022/06/10 %<readme|changes> -%<readme|changes> Source: xint.dtx 1.4l 2022/05/29 (doc 2022/05/29) +%<readme|changes> Source: xint.dtx 1.4m 2022/06/10 (doc 2022/06/11) %<readme|changes> Author: Jean-Francois Burnol %<readme|changes> Info: Expandable operations on big integers, decimals, fractions %<readme|changes> License: LPPL 1.3c %<readme|changes> %<*!readme&!changes&!dohtmlsh&!makefile> %% --------------------------------------------------------------- -%% The xint bundle 1.4l 2022/05/29 +%% The xint bundle 1.4m 2022/06/10 %% Copyright (C) 2013-2022 by Jean-Francois Burnol %<xintkernel>%% xintkernel: Paraphernalia for the xint packages %<xinttools>%% xinttools: Expandable and non-expandable utilities @@ -99,49 +99,36 @@ Installation [MikTeX](http://www.miktex.org/). Thus, use the package manager to update your distribution. -The simplest alternative is to download +Direct installation of both the macro files and the documentation into a +TDS-compliant hierarchy is available via [`xint.tds.zip`](http://mirror.ctan.org/install/macros/generic/xint.tds.zip) -and install the `xint` package files and documentation in a suitable -TDS-compliant repertory via `unzip`. For example, on a macOS system, -installation in user repertory: +and usage of `unzip`. For example, on a macOS system, installation in +user repertory: unzip xint.tds.zip -d ~/Library/texmf -Admin privileges may be needed when moving the files into the TeX -installation. +Admin privileges may be needed if the target repertory requires it. -Else, one can download `xint.dtx` and optionally `Makefile` from -https://www.ctan.org/tex-archive/macros/generic/xint and proceed from -there. The package files are extracted automatically from -`etex xint.dtx`. So if one does not need to build the documentation, -one only has to move the files with extension `.sty` to one's working -repertory and start using them. +Else, one can download `xint.dtx` from +https://www.ctan.org/tex-archive/macros/generic/xint and execute +`etex xint.dtx` which will extract all macro files (those with extension +`.sty`). One then only needs to move them to a location where `TeX` can +find them. -Here are various options to build the documentation, from the more -automated to the more manual: +To build the documentation one can execute `latex` directly on +`xint.dtx` (at least three times, perhaps more, so `latexmk` is +recommended) then `dvipdfmx` or directly `pdflatex`. The resulting +`xint.pdf` includes both the user manual and the commented source code, +with hyperlinks. -- (with `Makefile`) run `make help` or `make helpless` (on Unix-like - systems) for extracting package files and receiving further - instructions, or directly `make xint.pdf` to both extract package - files and build the user documentation in the current repertory. - The commented source code will be obtained from `make sourcexint.pdf`. - This process requires `latexmk`. The `CHANGES.html` target requires - `pandoc`. +For those on Unix-like systems the recommended way is to fetch also +`Makefile` from the location above (or to rename the extracted +`Makefile.mk` into `Makefile`), then one can execute `make xint.pdf` +(user manual only), or `make sourcexint.pdf` or `make xint-all.pdf`. +These targets will require `latexmk`. -- (without `Makefile`) run `etex xint.dtx` then rename the extracted - `Makefile.mk` to `Makefile` and proceed as in the previous item. - -- (with no `make`) run `latexmk` on `xint.dtx`. This will both extract - package files and build a `dvi` combining the user documentation and - the commented source code. Finish with `dvipdfmx xint.dvi`. - -- (with no `make`) execute `etex xint.dtx` to extract files then run - `latexmk` on `xint.tex` and `sourcexint.tex`, or perhaps on - `xint-all.tex` to combine user manual and source code in one `pdf`. - -- (with no `make` and no `latexmk`) proceed as in one of the previous - two items but with `latex` sufficiently many times in place of - `latexmk`. Finish with `dvipdfmx`, or use `pdflatex` initially. +Further help can be obtained via `make help` or from the comments +in extracted files `xint.tex`, `sourcexint.tex`, and `xint-all.tex`. Documentation @@ -185,6 +172,66 @@ See `xint.pdf` for contact information. %</readme>-------------------------------------------------------- %<*changes>------------------------------------------------------- +`1.4m (2022/06/10)` +---- + +The fix of a compatibility bug with `miniltx` and the already in place +documentation improvements (in particular, hyperlinked macro names in +code lines) motivated release `1.4m`. With some hesitation I decided to +not revert the removals and breaking changes listed here and which had +been already acted in preparation of an hypothetic future `1.5`. + +### Removed + + - **xintexpr**: `\xintdefefunc` et al., deprecated at `1.4` have been removed. + + - **xintexpr**: `\thexintexpr` et al., deprecated at `1.4b` have been + removed. Use `\xinttheexpr` et al. + + - **xintlog**: `\poormanloghack` which was a no-op since `1.4e` has been removed. + + - **xintfrac**: `\xintFrac`, `\xintFwOver`, `\xintSignedFrac`, + `\xintSignedFwOver` now raise errors. They were deprecated at `1.4g`, + check the documentation for the new names `\xintTeXFrac` et al. + +### Breaking changes + + - **xintexpr**: `\xinttheboolexpr` now outputs `true` or `false` (to + match TeX conventions) and not the `True` or `False` employed since + `1.4` (inside expressions `true`, `false`, `True` and `False` are + all recognized keywords anyhow). + + - The `\pdfstrcmp/\strcmp` engine primitive is required. With `LuaTeX` + it is emulated via `Lua` code basically copied over from `LaTeX3`. + Not sure if this is breaking as the package already requires the + `\expanded` primitive. Only used so far by (as expected) + `\xintiiCmp`, and macros which will end up calling it. + +### Bug fixes + + - **xintexpr**: with `\input xintexpr.sty\relax` in `(pdf)eTeX` plus + `miniltx` (naturally, if `miniltx` was already loaded), and with + versions up to `1.4k` the `xinttrig` and `xintlog` aborted their own + `xintexpr`-triggered input erroneously thinking the latter had not + yet been loaded, and emitted only a very discrete message to the log + file. With `1.4l` it became worse as `\input xintexpr\relax` + auto-repeated itself about six times until `TeX` called it quits. + +### Improvements + + - Documentation: most macros are hyperlinked in the source code to the + code line of their definitions. Furthermore, from the place of the + definition the main macros will link to either their descriptions in + the user manual (in `xint-all.pdf`) or in the implementation part + (`sourcexint.pdf`). Conversely inside `xint-all.pdf` the macro + descriptions are linked towards their implementation. You may notice + some time lag with some pdf viewers on opening the heavily + hyperlinked `sourcexint.pdf` compared to previous releases. + + - Not sure if that counts as an improvement, but I have shortened the + wording of the expandable error messages, which had been last modified + at `1.4g`. + `1.4l (2022/05/29)` ---- @@ -2659,6 +2706,7 @@ Initial announcement: %</changes>------------------------------------------------------ %<*dates>------------------------------------------------------- +`1.4m (2022/06/10)` `1.4l (2022/05/29)` `1.4k (2022/05/18)` `1.4j (2021/07/13)` @@ -2970,7 +3018,6 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- %% Alternative for build without `make': %% latexmk xint.tex %% dvipdfmx xint.dvi -%% (quoting in the above may need shell-dependant changes) %% %% One can also tell latexmk to use xelatex or pdflatex. %% Or use one of them directly enough times on xint.tex. @@ -3054,8 +3101,8 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- % changed 2021/05/30: do not extract files at all if not using etex \ifnum\noetex=1 \chardef\extractfiles 3 % no extract, no typeset \else - \ifx\ProvidesFile\undefined - \chardef\extractfiles 0 % no LaTeX2e: etex, xetex, ... on xint.dtx + \ifx\PassOptionsToClass\undefined + \chardef\extractfiles 0 % no LaTeX2e: probably etex, xetex, ... on xint.dtx \else \ifx\NoSourceCode\undefined % latex/pdflatex/xelatex on xint.dtx, we will extract all files @@ -3152,7 +3199,7 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- \fi \ifnum\extractfiles=1 % direct run on xint.dtx \expandafter\def\expandafter\MessageDeFin\expandafter{\MessageDeFin -\Msg{* Direct latex run on xint.dtx: please repeat at least 3 times.^^J}% +\Msg{* Direct (*)latex run on xint.dtx: repeat as necessary. *^^J}% \Msg{********************************************************************^^J}% }% \fi @@ -3168,7 +3215,6 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- % Check if \MessageDeFin got defined, if yes put it at end of run. \ifdefined\MessageDeFin\AtEndDocument{\MessageDeFin}\fi %----------------------------------------------------------------- -% -*- coding: utf-8; mode: latex, fill-column: 78; -*- % \makeatletter % counts used in particular in the samples from the documentation of the @@ -3206,8 +3252,11 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- \let\pdfelapsedtime\elapsedtime \fi +% 2019/09/10 % Get rid of HARASSMENT by KOMA-Script +% Must be located before \documentclass \def\class@shoulddisablepackagewarning@list{tocloft.} + \ifnum\Withdvipdfmx=1 \def\pgfsysdriver{pgfsys-dvipdfm.def} \documentclass [dvipdfm, dvipdfmx, dvipdfmx-outline-open]{scrartcl} @@ -3268,47 +3317,90 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- \else \usepackage{doc} \fi - -% And let's keep from ltxdoc only some minimal stuff -% Page geometry is set by geometry package and a4paper option from -% xint.tex file. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% MACROS OF doc.sty WILL BE HACKED (2022/06/06) FOR THE IMPLEMENTATION PART +% +% First we want to turn CodelineNo into a real LaTeX counter +% This will spare defining an extra counter for the hyperlinks with \hyperref +\begingroup\let\newcount\@gobble\@definecounter{CodelineNo}\endgroup +% Let's now reenact the doc.sty default for \theCodeLineNo +\def\theCodelineNo{\reset@font\scriptsize\arabic{CodelineNo}} +% But as we will reset CodelineNo at each style file we need some unique id +\def\theHCodelineNo{\the\value{section}.\the\value{CodelineNo}} +% This is all for now. +% The further hacks are to be found after the \StopEventually (i.e. a few +% thousands lines down from here if you don't have access to the private +% sources, which is probably the case if you are not the author). +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% As explained above I was formerly using scrdoc hence ltxdoc indirectly. +% Let's emulate here the little I appear to need from ltxdoc.cls and +% srcdoc.cls. +% \AtBeginDocument{\MakeShortVerb{\|}} \DeclareFontShape{OT1}{cmtt}{bx}{n}{<-> ssub * cmtt/m/n}{} \DeclareFontFamily{OMS}{cmtt}{\skewchar\font 48} % '60 \DeclareFontShape{OMS}{cmtt}{m}{n}{<-> ssub * cmsy/m/n}{} \DeclareFontShape{OMS}{cmtt}{bx}{n}{<-> ssub * cmsy/b/n}{} \DeclareFontShape{OT1}{cmss}{m}{it}{<->ssub*cmss/m/sl}{} +\ifnum\NoSourceCode=1 + \OnlyDescription +\fi \CodelineNumbered -\DisableCrossrefs -\setcounter{StandardModuleDepth}{1} +\EnableCrossrefs % but this will be hacked +% \setcounter{StandardModuleDepth}{1} % we don't use this mechanism currently \def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}} \def\cmd@to@cs#1#2{\char\number`#2\relax} -\DeclareRobustCommand\cs[1]{\texttt{\bslash#1}}% was \char`\\ +% Here I am loading doc=v2 but formerly I was using ltxdoc via scrdoc +% which I dropped at release 1.4l (2022-05-29) and without much +% thinking I had kept this. +\DeclareRobustCommand\cs[1]{\texttt{\bslash#1}} +% As I may have the * active, or macro names with _ or ^, I should +% add \detokenize. But see below for a redefinition anyhow. +% +% More urgent is that I am also using hyperref and this definition gives wrong +% bookmarks if \cs is used in section titles. As I had very very few usags of +% \cs in the whole of xint.dtx, it took me a while to realize the problem +% here. Turns out that doc=v3 by default loads hypdoc which includes this +% configuation for hyperref compatibility: +\AtBeginDocument{% +\pdfstringdefDisableCommands{\def\cs#1{\textbackslash\detokenize{#1}}}% +}% +% As I have not loaded hyperref yet I must delay it to AtBeginDocument. +% Late May, early June 2022 I added to my custom \verb automated detection +% of potential hyperlinks. So I decided to replace \cs ltxdoc definition +% by suitable \verb usage. It is not important to be efficient here, +% I can leave some \expandafter, in fact there are a handful of uses. +\DeclareRobustCommand\cs[1]{\expandafter\verb\expandafter~\bslash#1~} +% As my \verb does a verbatimizing \scantokens I don't need to worry +% here about active characters but I need in the PDF string, hence +% the \detokenize above. \providecommand\marg[1]{% {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}} \providecommand\oarg[1]{% {\ttfamily[}\meta{#1}{\ttfamily]}} \providecommand\parg[1]{% {\ttfamily(}\meta{#1}{\ttfamily)}} -\@addtoreset{CodelineNo}{part} -% \def\partname{File}% j'utilise Part défini plus bas -% Je n'utilise pas d'index en fait -\gdef\codeline@wrindex#1{\if@filesw - \begingroup - \let\protect\noexpand - \immediate\write\@indexfile - {\string\indexentry{#1}% - {\filesep\number\c@CodelineNo}}% - \endgroup\fi} -\let\filesep\@empty - -% There is very little we seem to need from the scrdoc extras: -% Page geometry is set by geometry package and a4paper option from -% xint.tex file. So it seems I only need (perhaps) this hologo thing: +% \@addtoreset{CodelineNo}{part}% No need for this here +% \def\partname{File}% \partname is "fixed" somewhere further down anyhow +% No need for this, anyhow I don't build the indices (I did in 2018-2019 only). +% \gdef\codeline@wrindex#1{\if@filesw +% \begingroup +% \let\protect\noexpand +% \immediate\write\@indexfile +% {\string\indexentry{#1}% +% {\filesep\number\c@CodelineNo}}% +% \endgroup\fi} +% \let\filesep\@empty + +% There is very little we seem to need from the scrdoc extras: page geometry +% is set by geometry package and a4paper option from xint.tex file. So it +% seems I only need the hologo loading: \usepackage{hologo} \DeclareRobustCommand*{\eTeX}{\hologo{eTeX}}% +\DeclareRobustCommand*{\LuaTeX}{\hologo{LuaTeX}}% % -%%% END OF CUSTOM LOADING OF PACKAGE doc.sty V2 +%%% end of ltxdoc+srcdoc emulation. See after \StopEventually for doc.sty hacks. % Remove from sectioning commands insertion of marks, because we % will do it ourself. @@ -3325,9 +3417,6 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- % \@gobble est long donc simplement \def\partmark #1{}% -\ifnum\NoSourceCode=1 - \OnlyDescription -\fi \pagestyle{headings} @@ -3350,7 +3439,7 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- \usepackage{multicol} \usepackage{geometry} -\AtBeginDocument {\ttzfamily % package newtxtt loaded in preamble +\AtBeginDocument {\ttzfamily % package newtxtt is loaded in preamble \newgeometry{textwidth=\dimexpr92\fontcharwd\font`X\relax, vscale=0.75}} @@ -3376,35 +3465,49 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- \usepackage{graphicx} \usepackage[english]{babel} +% 2022/06/05 +% \usepackage{csquotes} +\def\myenquote#1{{\sffamily\textquotedblleft}#1{\sffamily\textquotedblright}} -% 2022/05/24: appears to not be used anywhere anymore in the doc +% 2022/05/24, commenting out this at it appears to not be used anywhere now. % \usepackage[autolanguage,np]{numprint} % \AtBeginDocument{\npthousandsep{,\hskip .5pt plus .1pt minus .1pt}} % But surprisingly it is via numprint that I was loading array package -% whose extended syntax for tabular preambles is used... +% whose extended syntax for tabular preambles is required! \usepackage{array} \usepackage[dvipsnames,svgnames]{xcolor} +%%% DEFINITIONS OF COLORS USED IN DOCUMENT + + +% color for the \xintname, \xintexprname, etc macros \definecolor{xintnamecolor}{RGB}{228,57,0} \colorlet{XINTNAMECOLOR}{xintnamecolor} + +% color for their analogs \xintnameimp, etc... in implementation part \colorlet{xintnameimpcolor}{blue} \colorlet{XINTNAMEIMPCOLOR}{xintnameimpcolor} -\definecolor{xintmanualurlcolor}{RGB}{38,128,192} -\colorlet{xintmanuallinkcolor}{blue} + +% colors for hyperref +\definecolor{xinturlcolor}{RGB}{38,128,192} +\colorlet{xintlinkcolor}{blue} -% Colors for \verb and everbatim/everbatim* environments -% former legacy colors used in xint.pdf up to xint 1.4j (2021/07/13) -% (I should retrieve since when) + +% colors for custom \verb and everbatim/everbatim* environments +% +% the commented-out legacy colors used in xint.pdf for many years up to +% xint 1.4j (2021/07/13) (I should retrieve since when exactly) +% % \colorlet{verbcolor}{jfbrown} % \colorlet{verbsoftwrapiconcolor}{blue} % \colorlet{everbatimfgcolor}{Brown} % \colorlet{everbatimbgcolor}{yellow!5} % \colorlet{everbatimxfgcolor}{OrangeRed} - +% % https://contrast-ratio.com/#rgb%28165%2C100%2C10%29-on-white % says the contrast ratio on white is 4.74 and I do see the contrast % is less strong than @@ -3412,9 +3515,7 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- % \colorlet{verbcolor}{jfbrown} % I will simply use also Maroon \colorlet{verbcolor}{Maroon} -\colorlet{verbimpcolor}{Purple} -\colorlet{digitsttcolor}{Maroon} - +\colorlet{digitsttcolor}{verbcolor} \colorlet{verbsoftwrapiconcolor}{DarkBlue} \colorlet{everbatimfgcolor}{DarkBlue} % @@ -3422,27 +3523,40 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- % https://contrast-ratio.com/#rgb%2811%2C35%2C139%29-on-rgb%28245%2C244%2C220%29 % the DarkBlue on Beige % gives a contrast-ratio of 11.58 which confirmed my intuition it is not bad -% "Passes AAA level for any size text and AA for user interface components and graphical objects" +% "Passes AAA level for any size text and AA for user interface components and +% graphical objects" % % memo: with Apple ColorPicker it seems one needs to select "sRVB" (I guess % "sRGB" in English) for values matching xcolor RGB input or the above html % page rgb(R,G,B) input, also this did not work % 100%, most probably due to the window transparency by default on my mac? \colorlet{everbatimbgcolor}{Beige} - +% % https://contrast-ratio.com/#rgb%28128%2C31%2C19%29-on-white % gives 9.89 contrast ratio which is a bit less but still AAA \colorlet{everbatimxfgcolor}{Maroon} - +% % colors for margin notes \colorlet{marginnotecolor}{PineGreen} \colorlet{marginwarningcolor}{Red} % colors for toc -\colorlet{tocsectioncolor}{cyan} -\colorlet{tocsectionimpcolor}{RoyalPurple} -\colorlet{tocbundlesectioncolor}{xintnamecolor} +\colorlet{tocstylesectioncolor}{cyan} +\colorlet{tocstylesectionimpcolor}{RoyalPurple} +\colorlet{tocstylebundlesectioncolor}{xintnamecolor} + +% colors for macro code and comments +\colorlet{privatecommentcolor}{cyan} +\colorlet{macrocodecommentcolor}{gray} +\colorlet{macrocodenewmacrocolor}{verbcolor} +\colorlet{macrocodelinktouserdoccolor}{xintnamecolor}% and bold face +\colorlet{macrocodelinktosectioncolor}{DarkBlue}% and bold face +\colorlet{macrocodelinktocodelinecolor}{DarkBlue} +\colorlet{macrocodenoncscolor}{Green} + +% colors for the implementation part and the modified macrocode macros +% are to be found after \StopEventually \usepackage{eso-pic}% après xcolor sinon Option clash for package xcolor. @@ -3474,13 +3588,18 @@ pandoc -o CHANGES.html -s --toc -V highlighting-css=' body{margin: 0; margin- % ======== \usepackage{hyperref} +% 2022/06/10 reduce clutter in console and log output, there are already +% enough messages telling we have to execute latex once more +\catcode`_ 11 +\def\perhapshyperref[#1]{\ifcsname r@#1\endcsname \xint_afterfi{\hyperref[#1]}\fi} +\catcode`_ 8 \hypersetup{% linktoc=all,% breaklinks=true,% colorlinks=true,% -urlcolor=xintmanualurlcolor,% -linkcolor=xintmanuallinkcolor,% +urlcolor=xinturlcolor,% +linkcolor=xintlinkcolor,% pdfauthor={Jean-Fran\c cois Burnol},% pdftitle={The xintexpr and allied packages},% pdfsubject={Arithmetic with TeX},% @@ -3497,6 +3616,19 @@ pdfpagemode=UseNone,% \usepackage{bookmark} +% This is for having similarly named labels to get hyperlinks either to the +% user documentation or to the implementation part. From source mark-up with +% \csbxint, \csbXINT, \csb, or automated ones from |...| and the custom \verb +% However in the user manual I have so far (2022/06/11) used manually typed-in +% \label's in contrast to the almost exclusively automated ones of the implementation +% part. So for time being I keep an empty prefix here in place of something +% reasonable such as usr-. +\let\xintdoclabelprefix\empty +\def\xintimplabelprefix{src-} + +% used by \csbxint etc... +\let\xintlabelprefix\xintdoclabelprefix + % FONTS % ===== @@ -3527,30 +3659,30 @@ pdfpagemode=UseNone,% \ifnum\dosourcexint=0 \inmanualmaintoctrue \fi -\def\sectioncouleur{{tocsectioncolor}} -\def\MARGEPAGENO {1.5em}% changera pour la partie implémentation +\def\tocstylesectionbracedcolor{{tocstylesectioncolor}} +\def\tocstyleMARGEPAGENO {1.5em}% changera pour la partie implémentation -\def\SKIPSECTIONINTERSPACE{\vskip\bigskipamount} +\def\tocstylesectionVSKIP{\vskip\bigskipamount} \etocsetstyle{section}{} {\normalfont} - {\etociffirst{}{\SKIPSECTIONINTERSPACE}% - \rightskip \MARGEPAGENO\relax - \parfillskip -\MARGEPAGENO\relax + {\etociffirst{}{\tocstylesectionVSKIP}% + \rightskip \tocstyleMARGEPAGENO\relax + \parfillskip -\tocstyleMARGEPAGENO\relax \bfseries \leftskip \leftmarginii \noindent\llap % \llap {\makebox[\leftmarginii][l]% et \leftmargini le 12/10/2014 - {\expandafter\textcolor\sectioncouleur {\etocnumber}}}% + {\expandafter\textcolor\tocstylesectionbracedcolor{\etocnumber}}}% \strut\etocname \mdseries\nobreak\leaders\etoctoclineleaders\hfill\nobreak\strut - \makebox[\MARGEPAGENO][r]{\etocpage}\par + \makebox[\tocstyleMARGEPAGENO][r]{\etocpage}\par \let\ETOCsectionnumber\etocthenumber }% {}% -\newdimen\margegauchetoc -\AtBeginDocument{\margegauchetoc \dimexpr 5\fontcharwd\font`X\relax} +\newdimen\tocstyleLEFTMARGIN +\AtBeginDocument{\tocstyleLEFTMARGIN \dimexpr 5\fontcharwd\font`X\relax} \etocsetstyle{subsection} {\begingroup\normalfont \setlength{\premulticols}{0pt}% @@ -3561,43 +3693,46 @@ pdfpagemode=UseNone,% \raggedcolumns \addvspace{\smallskipamount}% \begin{multicols}{2} - \leftskip \margegauchetoc % 12 octobre 2014 + \leftskip \tocstyleLEFTMARGIN % 12 octobre 2014 \ifinmanualmaintoc - \rightskip \MARGEPAGENO + \rightskip \tocstyleMARGEPAGENO \else - \rightskip \MARGEPAGENO plus 2em minus 1em + \rightskip \tocstyleMARGEPAGENO plus 2em minus 1em \fi - \parfillskip -\MARGEPAGENO\relax + \parfillskip -\tocstyleMARGEPAGENO\relax } {} {\noindent - \etocifnumbered{\llap{\makebox[\margegauchetoc][l]{\ttzfamily\bfseries\etoclink - {\ifinmanualmaintoc\expandafter\textcolor\sectioncouleur + \etocifnumbered{\llap{\makebox[\tocstyleLEFTMARGIN][l]{\ttzfamily\bfseries\etoclink + {\ifinmanualmaintoc\expandafter\textcolor\tocstylesectionbracedcolor {\normalfont\bfseries\ETOCsectionnumber}\fi - .\expandafter\gobbletodot\etocthenumber}}}}{\kern-\margegauchetoc}% + .\expandafter\gobbletodot\etocthenumber}}}}{\kern-\tocstyleLEFTMARGIN}% \strut\etocname\nobreak \unless\ifinmanualmaintoc\leaders\etoctoclineleaders\fi \hfill\nobreak - \strut\makebox[\MARGEPAGENO][r]{\small\etocpage}\endgraf } + \strut\makebox[\tocstyleMARGEPAGENO][r]{\small\etocpage}\endgraf } {\end{multicols}\endgroup - %\addvspace{\smallskipamount} }% \etocsetstyle{subsubsection} {\begingroup\normalfont\small - \leftskip \dimexpr\leftmargini+1em\relax } + \leftskip\dimexpr\leftmargini+1em\relax + } {} {\noindent \llap{\makebox[\dimexpr\leftmargini+1em\relax][l]% {\ttzfamily\bfseries\etoclink - {\HOOKLOCALTOC.\expandafter\gobbletodot\etocthenumber}}}% + {\tocstylesubsubsectionHOOK.\expandafter\gobbletodot\etocthenumber}}}% \strut\etocname\nobreak \leaders\etoctoclineleaders \hfill\nobreak - \strut\makebox[\MARGEPAGENO][r]{\small\etocpage}\endgraf } + \strut\makebox[\tocstyleMARGEPAGENO][r]{\small\etocpage}\endgraf + } {\endgroup }% -\let\HOOKLOCALTOC\empty% quick hack to get style I want in User defined functions +% 2018/02/28 +% quick hack to get style I want in "User defined functions" section of manual +\let\tocstylesubsubsectionHOOK\empty \etocsetlevel{table}{6} \addtocontents{toc}{\protect\hypersetup{hidelinks}} @@ -3611,9 +3746,9 @@ pdfpagemode=UseNone,% \let\dtt\digitstt % \fexpan 22 octobre 2013 -\newcommand\fexpan {\hyperref[ssec:expansions]{\textit{f}-expan}} +\newcommand\fexpan {\perhapshyperref[ssec:expansions]{\textit{f}-expan}} % \xexpan ajouté 28 mai 2022 -\newcommand\xexpan {\hyperref[ssec:expansions]{\textit{x}-expan}} +\newcommand\xexpan {\perhapshyperref[ssec:expansions]{\textit{x}-expan}} % Septembre 2015 % Address updated to github repo's one, May 2018 % They did s/master/main/ already a few years back, May 2022 @@ -3871,13 +4006,26 @@ pdfpagemode=UseNone,% \ifcat\noexpand#1\noexpand~\catcode`#1\active\fi % No problem with the EOL for the line where the short verb delimiter stands. \def\next ##1#1{% +% 2022/06/04 +% automated hyperlink detection +% - \detokenize needed due to * \active from \makestarlowast in \MicroFont +% - gobbling first char rather than checking if it is backslash +% (and there is an \@empty first so gobbling two tokens) +% mark-up using \csbxint is better way as it allow hyphenation after xint +% Usage of \xintlabelprefix to modify behaviour in implementation part. +% This will NOT WORK if the catcodes were already frozen... + \ifcsname r@\xintlabelprefix\detokenize\expandafter{\xint_gobble_ii##1}\endcsname + \hyperref[\xintlabelprefix\detokenize\expandafter{\xint_gobble_ii##1}]{##1}% + \egroup + \else +% this will add \discretionary's for wrapping at end of line \@vobeyspaces\everyeof{\relax}\endlinechar\m@ne - \expandafter\@@jfverb_a\scantokens\expandafter{##1}}% + \expandafter\@@jfverb_a\scantokens\expandafter{##1}% + \fi}% % hack with \@empty to prevent brace stripping if catcodes have been % frozen earlier, like in footnotes. \next \@empty } - % We don't want a \discretionary at the very start. % But then an empty argument is forbidden! \def\@@jfverb_a #1{#1\@@jfverb_b } @@ -4149,37 +4297,116 @@ pdfpagemode=UseNone,% % \csa, \csbxint, \csh etc... % =========================== -% These definitions in force both in manual and implementation part +% The underscore and caret things are for implementation part \DeclareRobustCommand\csa[1] {{\ttzfamily\char92\endlinechar-1 \makestarlowast \catcode`_ 12 \catcode`^ 12 \scantokens\expandafter{\detokenize{#1}}}} - % csan: n means no backslash \DeclareRobustCommand\csan[1] {{\ttzfamily\endlinechar-1 \makestarlowast \catcode`_ 12 \catcode`^ 12 \scantokens\expandafter{\detokenize{#1}}}} - +% For some legacy reasons rather than doing: +% \pdfstringdefDisableCommands{% +% \def\csa#1{\textbackslash\detokenize{#1}}% +% \def\csan#1{\detokenize{#1}}% +% }% +% I defined years ago variants for usage within section titles. These +% variants will get redefined in implementation section to automatically +% insert \label's and use \csa and \csan. Here in user manual, they simply +% use \csa or \csan, but are careful to do \texorpdfstring. \newcommand\csh[1] {\texorpdfstring{\csa{#1}}{\textbackslash\detokenize{#1}}} +% This one is actually never used inside the user manual, only encountered +% in the implementation part. \newcommand\cshn[1] {\texorpdfstring{\csan{#1}}{\detokenize{#1}}} -% \csh and \cshn will be redefined in implementation section +% Let's preserve these meanings for when I will want to use them in sections +% of the implementation part but not insert labels. \let\cshnolabel\csh \let\cshnnolabel\cshn +% 2022/06/10 +% If producing xint-all.pdf add hyperlinks from user documentation +% to source code. Should have I used some superscript? Less trouble +% and less work intensive for TeX I guess than the centered align. +% \def\myalign@vbox#1{\leavevmode\vbox{\baselineskip\z@skip \lineskip.75ex% +% \ialign{\hfil##\hfil\crcr#1\crcr}}} +% %%\def\oalign#1{\leavevmode\vtop{\baselineskip\z@skip \lineskip.25ex% +% %% \ialign{##\crcr#1\crcr}}} +% \myalign@vbox{\hyperref[\xintimplabelprefix\detokenize{#1}]{\usebox\sourcelinkbox}\cr +% \csa{#1}}% +\def\myalign@vbox#1{%\leavevmode + \vbox{% \@tempboxa is not used by \smash... and I hope \hyperref too + \baselineskip\z@skip\lineskip.75ex\relax + \sbox\@tempboxa{\csa{#1}}% + \hbox to\wd\@tempboxa{\hss + \hyperref[\xintimplabelprefix\detokenize{#1}]{\usebox\sourcelinkbox}% + \hss}% + \box\@tempboxa }% +}% + +\newsavebox\sourcelinkbox +% \familydefault already configured +% trying to add some \vphantom{X} has no impact it seems on the +% size of the clickable area (tested with Skim and Preview on mac os) +% so using \small not \footnotesize +\sbox\sourcelinkbox{\color{macrocodelinktosectioncolor}% + \normalfont\small\itshape source} +\def\cswithsourcelink#1{\smash{\myalign@vbox{#1}}}% +% the references should exist on second LaTeX pass +% and we don't want complications in tables of contents +\def\csperhapswithlink#1{\ifx\thepage\relax\csa{#1}\else + \ifcsname r@\xintimplabelprefix\detokenize{#1}\endcsname + \cswithsourcelink{#1}% + \else + \csa{#1}% + \fi\fi +} +\ifnum\dosourcexint=0 \ifnum\NoSourceCode=0 + \renewcommand\csh[1] + {\texorpdfstring + {\csperhapswithlink{#1}} + {\textbackslash\detokenize{#1}}% + } + % \renewcommand\cshn[1] + % but it is used nowhere in user manual +\fi\fi -% These definitions will be re-done for implementation part -% Don't bother about underscore and caret for time being. +% The "b" is there originally for "blue" in fact, from the hyperlink. \DeclareRobustCommand\csb [1] - {\hyperref[\detokenize{#1}]% - {{\char92 \endlinechar-1 \makestarlowast + {\perhapshyperref[\xintlabelprefix\detokenize{#1}]% + {{\char92 \endlinechar-1 + \makestarlowast \catcode`_ 12 \catcode`^ 12 \scantokens\expandafter{\detokenize{#1}}}}} -\DeclareRobustCommand\csbxint [1] - {\hyperref[\detokenize{xint#1}]% - {{\char92\mbox{xint}\-\endlinechar-1 \makestarlowast +\DeclareRobustCommand\csbn[1] + {\perhapshyperref[\xintlabelprefix\detokenize{#1}]% + {{\endlinechar-1 + \makestarlowast \catcode`_ 12 \catcode`^ 12 + \scantokens\expandafter{\detokenize{#1}}}}} +\DeclareRobustCommand\csbxint[1] + {\perhapshyperref[\xintlabelprefix\detokenize{xint#1}]% + {{\char92\mbox{xint}\-\endlinechar-1 + \makestarlowast \catcode`_ 12 \catcode`^ 12 + \scantokens\expandafter{\detokenize{#1}}}}} +\DeclareRobustCommand\csbXINT[1] + {\perhapshyperref[\xintlabelprefix\detokenize{XINT#1}]% + {{\char92\mbox{XINT}\-\endlinechar-1 + \makestarlowast \catcode`_ 12 \catcode`^ 12 \scantokens\expandafter{\detokenize{#1}}}}} +% 2022/06/08, I finally add this +% although this is is not immediately useful as I have interiorized for years +% not to use \csbxint et al. in section titles... +\pdfstringdefDisableCommands{% + \let\csb\cs % \cs already in DisableCommands, I hope its redefinition is done + % first, well yes one has to chase \ltx@GlobalAppendToMacro + % all the way to ltxcmds... + \let\csbn\detokenize + \def\csbxint#1{\textbackslash xint\detokenize{#1}}% + \def\csbXINT#1{\textbackslash XINT\detokenize{#1}}% +}% + % \func, \funcdesc, \keyword, \keyworddesc, \prec, \precdesc, \oper, \operdesc % ============================================================================ @@ -4209,36 +4436,59 @@ pdfpagemode=UseNone,% \xintForpair #1#2 in -{(xint bundle,bundle), - (xintkernel,kernel), - (xinttools,tools), - (xintcore,core),(xint,xint),(xintbinhex,binhex),(xintgcd,gcd),% - (xintfrac,frac),(xintseries,series),(xintcfrac,cfrac),(xintexpr,expr),% - (xinttrig, trig), (xintlog, log)} +{(\space bundle,bundle), + (kernel,kernel), + (tools,tools), + (core,core),(,xint),(binhex,binhex),(gcd,gcd),% + (frac,frac),(series,series),(cfrac,cfrac),(expr,expr),% + (trig, trig), (log, log)} \do {% - \expandafter\def\csname #1name\endcsname + \expandafter\def\csname xint#1name\endcsname {\texorpdfstring - {\hyperref[sec:#2]% - {\relax{\color{xintnamecolor}\MakeNameUp{#1}}}}% - {#1}% + {\perhapshyperref[sec:#2]% + {{\color{xintnamecolor}\MakeNameUp + {\mbox{xint}\-#1} + {xint#1}% + }% + }% + }% + {xint#1}% \xspace }% - \expandafter\def\csname #1nameimp\endcsname + \expandafter\def\csname xint#1nameimp\endcsname {\texorpdfstring - {\hyperref[sec:#2imp]% - {\relax{\color{xintnameimpcolor}\MakeNameUp{#1}}}}% - {#1}% + {\perhapshyperref[sec:#2imp]% + {{\color{xintnameimpcolor}\MakeNameUp + {\mbox{xint}\-#1} + {xint#1}% + }% + }% + }% + {xint#1}% \xspace }% }% \def\DOCxintfrontpage - {\texorpdfstring - {\hyperref[frontpage]{\relax{\color{xintnamecolor}TOC}}}% - {TOC}% - \xspace }% + {\perhapshyperref[frontpage]{{\color{xintnamecolor}TOC}}}% -\protected\def\MakeNameUp#1{% - \ifcsname #1nameUp\endcsname +\ifnum\dosourcexint=1 +% sourcexint.pdf + \gdef\DOCxintfrontpage + {\perhapshyperref[frontpage]{{\color{xintnameimpcolor}TOC}}}% +\else +\ifnum\NoSourceCode=0 +% xint-all.pdf +% Not using \hypersetup with linkcolor because a few pages are with +% a TOC à cheval on two pages, and my eTOCs are configured to do +% \hypersetup{hidelinks} + \protected\def\DOCxintfrontpage + {\smash{\vbox{\hbox{\perhapshyperref[partiii]{{\color{xintnameimpcolor}TOC}}}% + \kern1ex + \hbox{\perhapshyperref[frontpage]{{\color{xintnamecolor}TOC}}}}}}% +\fi\fi + +\protected\def\MakeNameUp#1#2{% + \ifcsname #2nameUp\endcsname \expandafter\@firstoftwo\else \expandafter\@secondoftwo \fi @@ -4265,6 +4515,14 @@ pdfpagemode=UseNone,% \endgroup \vspace*{#1\baselineskip}% } +% It seems I need this for a bookmark in xint-all.pdf +% reaching the top of the page where Part III starts +% 2022/06/10 +\newcommand\RaisedTarget[2][6]{% +\vspace*{-#1\baselineskip}% +\hypertarget{#2}{}% +\vspace*{#1\baselineskip}% +} % begin{document} % =============== @@ -4278,22 +4536,22 @@ pdfpagemode=UseNone,% \def\partname{Part} \addto\captionsenglish{\def\partname{Part}} -{% -\normalfont\Huge\parindent0pt \parfillskip 0pt\relax - \leftskip 0cm plus 1fil \rightskip 0cm plus 1fil + \ifnum\dosourcexint=1 +\noindent\begin{minipage}[t][8\baselineskip][c]{\linewidth} + \normalfont\Huge + \centering The \xintexprnameimp and allied packages source code\par - \gdef\DOCxintfrontpage - {\texorpdfstring - {\hyperref[frontpage]{\relax{\color{xintnameimpcolor}TOC}}}% - {TOC}% - \xspace }% \else + \begingroup + \normalfont\Huge + \centering The \xintexprname and allied packages\par + \endgroup \fi \RaisedLabel{frontpage} -} +\normalsize\ttzfamily {\centering \textsc{Jean-Fran\c cois Burnol}\par \footnotesize @@ -4303,28 +4561,38 @@ pdfpagemode=UseNone,% {From source file \texttt{xint.dtx}. \xintdtxtimestamp.}\par } +\ifnum\dosourcexint=1 +\end{minipage} +\else \medskip +\fi + % 31 janvier 2020 +% 2022/06/10 no need for \texorpdfstring here \def\DOCxintexprintro - {\texorpdfstring - {\hyperref[part:1]{\relax{\color{xintnamecolor}\MakeNameUp{Start here}}}}% - {Start here}% - \xspace }% + {\perhapshyperref[part:1]{{\color{xintnamecolor}% + \MakeNameUp{Start here}% + {Start here}% + }% + }% + }% \def\DOCxintexprmacros - {\texorpdfstring - {\hyperref[sec:oldxintexpr]{\relax{\color{xintnamecolor}\MakeNameUp{xintexpr - (old doc)}}}}% - {xintexpr (old doc)}% - \xspace }% + {\perhapshyperref[sec:oldxintexpr]{{\color{xintnamecolor}% + \MakeNameUp{xintexpr (old doc)}% + {xintexpr (old doc)}% + }% + }% + }% \def\DOCexamples - {\texorpdfstring - {\hyperref[sec:examples]{\relax{\color{xintnamecolor}\MakeNameUp{Examples}}}}% - {Examples}% - \xspace }% + {\perhapshyperref[sec:examples]{{\color{xintnamecolor}% + \MakeNameUp{Examples}{Examples}% + }% + }% + }% % Vendredi 15 juin 2018 % Someone makes the comma active (not me! not sure if doc.sty or KOMA) and @@ -4348,7 +4616,7 @@ pdfpagemode=UseNone,% \markboth{\makebox[0pt]{\xintRunningHeader}}{\makebox[0pt]{\xintRunningHeader}} % 18 mai 2019, turned into an environment 27 mai 2022 -\newenvironment{TeXnote}{\par\small\medskip\noindent\textbf{\TeX hackers note: +\newenvironment{TeXnote}{\par\small\medskip\noindent\textbf{\TeX-hackers note: }}{\par\medskip} % Skips safely. @@ -4366,14 +4634,14 @@ pdfpagemode=UseNone,% \etocsetlevel{table}{2}% subsection +\let\orig@etocbelowtocskip\etocbelowtocskip +\let\orig@etocinnertopsep\etocinnertopsep +\let\orig@etoctoclineleaders\etoctoclineleaders + \renewcommand*{\etocbelowtocskip}{0pt} \renewcommand*{\etocinnertopsep}{0pt} \renewcommand*{\etoctoclineleaders} {\hbox{\normalfont\normalsize\hbox to 1ex {\hss.\hss}}} -% \etocmulticolstyle [1]{% -% \phantomsection\section* {Contents} -% \etoctoccontentsline*{toctobookmark}{Contents}{1}% -% } \etocsettocstyle{}{} \etocsettagdepth {part1A}{subsection} @@ -4382,12 +4650,22 @@ pdfpagemode=UseNone,% \etocsettagdepth {implementation}{none} \etocsettocdepth{subsection} -%% Legacy etoc style for part, we add an improvement to get "Part" hyperlinked +%% Legacy etoc style for part, with an improvement to get "Part" +%% hyperlinked +%% Also some hack to let the TOC of xint-all.pdf fit on one page %% `part': \etocsetstyle{part} - {\addpenalty\@M\etocskipfirstprefix} + {\ifnum\dosourcexint=0 \ifnum\NoSourceCode=0 % both true only for xint-all.pdf + \def\etocbelowtocskip{\z@skip}% + \def\etocabovetocskip{\z@skip}% + \def\etocsepminusone{\bigskipamount}% + \def\etocsepzero{\medskipamount}% + \def\tocstylesectionVSKIP{\vskip\smallskipamount}% + \fi\fi + \addpenalty\@M\etocskipfirstprefix} {\addpenalty\@secpenalty} - {\begingroup + {% + \begingroup \etocfontminusone \addvspace{\etocsepminusone}% \parindent \z@ @@ -4400,7 +4678,8 @@ pdfpagemode=UseNone,% \etocname \baselineskip\etocbaselinespreadminusone\baselineskip \par}% - \addpenalty\@M\addvspace{\etocsepzero}% + \addpenalty\@M + \addvspace{\etocsepzero}% \endgroup} {}% @@ -4418,7 +4697,13 @@ pdfpagemode=UseNone,% % }% % \etocsetstyle{part}% @minusone in etoc.sty - {\addpenalty\@M\etocskipfirstprefix} + {\if1\ifnum\dosourcexint=1 0\fi\ifnum\NoSourceCode=1 0\fi1% xint-all.pdf + \def\etocbelowtocskip{\z@skip}% + \def\etocabovetocskip{\z@skip}% + \def\etocsepminusone{\bigskipamount}% + \def\etocsepzero{\medskipamount}% + \fi + \addpenalty\@M\etocskipfirstprefix} % May 23, 2022 % Small hack to configure to our taste the TOC for the pdf combining % the user manual and the source code. We want a Part III in the TOC, @@ -4435,7 +4720,15 @@ pdfpagemode=UseNone,% {\end{multicols}% \addpenalty\@secpenalty\addvspace{\etocbelowtocskip}% } - {\begingroup % from etoc.sty default Part style + {% + % \kern and not \vskip to avoid multicolumn balncing columns + \def\tocstylesectionVSKIP{\kern\smallskipamount}% + \if1\ifnum\dosourcexint=1 0\fi\ifnum\NoSourceCode=1 0\fi1% + % xint-all.pdf only + % quite a challenge to get everything on single page, but not too cramped... + \def\tocstylesectionVSKIP{\kern.75\smallskipamount}% + \fi + \begingroup % adapted from etoc.sty default Part style \etocfontminusone \addvspace{\etocsepminusone}% \parindent \z@ @@ -4476,13 +4769,13 @@ pdfpagemode=UseNone,% \etocsettagdepth {part1A}{none} \etocsettagdepth {part1B}{none} \etocsettagdepth {macros} {section} -\ifnum\NoSourceCode=1 - \etocsettagdepth {implementation}{none} +\ifnum\dosourcexint=1 % sourcexint.pdf + \etocsettagdepth {implementation}{section} \else - \ifnum\dosourcexint=1 - \etocsettagdepth {implementation}{section} - \else + \ifnum\NoSourceCode=1 % xint.pdf \etocsettagdepth {implementation}{part} + \else % xint-all.pdf + \etocsettagdepth {implementation}{section} \fi \fi @@ -4707,7 +5000,7 @@ pdfpagemode=UseNone,% his own, although he never mentioned it. % Jürgen suffered a sudden, unexpected, and deadly stroke in - May 2022. I will miss his friendship profundly.} + May 2022. I will miss his friendship profoundly.} \end{framed} \subsection{Basic usage and purpose} @@ -4874,12 +5167,7 @@ Else, \href{https://ctan.org/pkg/xint}{CTAN} access provides |xint.tds.zip| which has all source code and documentation in a TDS-compliant archive, only waiting to be |unzip -d <DIR>| into some suitable hierarchical structure. -Check |README.md| for more possibilities. - -% Else, |etex xint.dtx| extracts all source code. A |Makefile| is also provided -% with targets such as |xint.pdf| or |sourcexint.pdf|. Even if your system does -% not allow executing |make|, the rules it contains can be imitated manually -% (if possible using |Latexmk|). +The |README.md| at \href{https://ctan.org/pkg/xint}{CTAN} lists some alternatives. \subsection{Printing big numbers on the page}\label{ssec:printnumber} @@ -4925,7 +5213,9 @@ reports and feature requests are most welcome. The section formerly included with this documentation and documenting the changes since the |1.4| release has been removed as it was too time-consuming to maintain it here. Please refer to |CHANGES.html| for -the detailed listing: \centeredline{|texdoc CHANGES.html|} On the +the detailed listing: \centeredline{|texdoc --list xint| then select + |CHANGES.html|} +On the internet: \centeredline{\url{http://mirrors.ctan.org/macros/generic/xint/CHANGES.html}} % @@ -4945,15 +5235,15 @@ A one-page condensed ``timeline'' is to be found at the start of \xintexprname provides three numerical expression parsers corresponding to these three respective tasks: \begin{description}[noitemsep] -\item[\csh{xinteval}:] exact evaluations with fractions, decimal fixed point numbers, numbers +\item[\csa{xinteval}:] exact evaluations with fractions, decimal fixed point numbers, numbers in scientific notation, with no size limitation, -\item[\csh{xintiieval}:] evaluations allowing only integers with no size limitation, -\item[\csh{xintfloateval}:] evaluations with floating points numbers according to the prevailing +\item[\csa{xintiieval}:] evaluations allowing only integers with no size limitation, +\item[\csa{xintfloateval}:] evaluations with floating points numbers according to the prevailing precision (see \csbxint{Digits*}), \end{description} and two secondary ones which act like the exact evaluator then round the output to a given number of fractional digits, or convert them to -|False| or |True| according to whether they vanish or do not vanish. +|false| or |true|\CHANGED{1.4m} according to whether they vanish or do not vanish. \begin{framed} Please note the following: @@ -5010,13 +5300,12 @@ the output be formatted with such separators. \item if |D>0|: the nearest fixed point number with |D| digits after the decimal mark, \item if |D=0|: the nearest integer (as for \csbxint{ieval} with no optional argument), - \item if |D<0|: the rounded quotient by |10^(-D)|.\CHANGED{1.4f} + \item if |D<0|: the rounded quotient by |10^(-D)|. \end{itemize} Prior to |1.4k| the optional argument \oarg{D} had to be located - \emph{within} the braces at the start of the expression. At long last, this - is not required anymore.\NewWith{1.4k} The legacy syntax is and will keep - being allowed. + \emph{within} the braces at the start of the expression. The legacy + syntax is and will keep being allowed. \item \csbxint{iieval}\marg{expression} executes computations \emph{on (big) integers only.} It is (only slightly) faster than \csbxint{eval} for @@ -5046,9 +5335,8 @@ the output be formatted with such separators. A negative |Q| is allowed and means to round to |P+Q| digits only. Prior to |1.4k| the optional argument \oarg{Q} had to be located - \emph{within} the braces at the start of the expression. At long - last, this is not required anymore.\NewWith{1.4k} The legacy syntax is - and will keep being allowed. + \emph{within} the braces at the start of the expression. The legacy + syntax is and will keep being allowed. @@ -5090,19 +5378,22 @@ There is a core syntax: \footnote{Currently, empty leaves are output using \csbxint{exprEmptyItem}, i.e.\@ default to \dtt{\xintexprEmptyItem}. This may change.} % -to |True| or |False| (cf.\@ \csbxint{boolexprPrintOne}). There is no -|\xintbooleval|. +to |true| or |false| (cf.\@ \csbxint{boolexprPrintOne}). There is no +|\xintbooleval|.\CHANGED{1.4m}\footnote{This was |True| and |False| prior + to |1.4m|.} -Formerly this legacy syntax needed to be prefixed by |\xintthe| to appear in -the typesetting token flow. It may now be omitted.\NewWith{1.4} +Formerly the \csbxint{expr}|...\relax| legacy syntax had to be prefixed +by |\xintthe| in order to appear make it to \TeX{} typesetting engine, +else would raise (deliberately) an error. The |\xintthe| prefix is +optional since |1.4|. In an |\edef| these constructs expand to some braced nested data, all computations having been completely done, which is prefixed with some -|\protected| «typesetter» macros. +|\protected| \myenquote{typesetter} macros. In an |\edef|, \csbxint{eval} (in contrast to \csbxint{expr}), or \csbxint{floateval} (in contrast to \csbxint{floatexpr}) expand the -«typesetting macros» and the final complete expansion consists of +\myenquote{typesetting macros} and the final complete expansion consists of explicit digits and other characters such as those of scientific notation or square brackets.% % @@ -5112,7 +5403,7 @@ notation or square brackets.% expand to nothing, then naturally \fexpan sion propagates to tokens following up in the input stream.} -In \LaTeX\ it is possible to use the core syntax\NewWith{1.4} +In \LaTeX\ it is possible to use the core syntax \csbxint{expr}\meta{expression}|\relax| also in so-called moving arguments, because when written out to a file the final expansion outcome uses only standard catcodes and thus will get retokenized and expand as expected if @@ -5133,7 +5424,9 @@ convert the fractions into smallest terms). Thus most probably what you want is \csbxint{floateval} and \csbxint{floatexpr}. -\subsection{Customization of the output from the three parsers} +\subsection{Output customization} + +\subsubsection{\csh{xintfloatexprPrintOne} et al{.} for numerical values} \label{xintexprEmptyItem} \label{xintexprPrintOne} \label{xintiexprPrintOne} @@ -5144,13 +5437,10 @@ is \csbxint{floateval} and \csbxint{floatexpr}. The package provides only minimal facilities for formatting the output from \csbxint{eval} or \csbxint{floateval} or\dots. And this output may well consist of comma separated values, even nested ones with, by -default, square brackets. See the section about \csbxint{thealign} and -its customization possibilities. +default, square brackets. First we explain how to influence the handling +of individual \myenquote{leaves}. -Rather to condemn the user customization to have to employ macros able -to handle such comma separated lists, possibly nested, the package -provides an interface to customize the handling of individual numerical -leaves. Here are the default definitions to this effect: +Here are the default definitions to this effect: \begin{everbatim} \def\xintexprEmptyItem{[]} % (all parsers) \def\xintexprPrintOne #1{\xintFracToSci{#1}} % \xinteval @@ -5219,22 +5509,31 @@ individual values may naturally contain the |/| character for fractions which th above mentioned packages will not know how to handle, as far as I know. -Example, with \LaTeX\ and |\num| from \ctanpackage{siunitx}: +Here an example, with \LaTeX{} and |\num| from \ctanpackage{siunitx}: \begin{everbatim} -\def\printwithnum[#1]#2{\num{\xintFloat[#1]{#2}}} -\renewcommand\xintfloatexprPrintOne{\printwithnum} +\def\xintfloatexprPrintOne[#1]#2{\num{\xintFloat[#1]{#2}}} \end{everbatim} -We used |\def| with delimited parameters to define |\printwithnum| -because the optional argument will always be present at time of use, and -further the macro will be submitted to |\expanded|, but \LaTeX2e -commands with optional arguments defined via |\newcommand| are not -compatible with being submitted to |\expanded|. +We used |\def| with delimited parameters because the optional argument +will always be present at time of use, and further the macro will be +submitted to |\expanded|, but \LaTeX2e commands with optional arguments +defined via |\newcommand| are not compatible with being submitted to +|\expanded|. \begin{TeXnote} |\num| is a |\protected| macro, hence it will remain intact in the |\expanded| phase. The argument |\xintFloat[#1]{#2}| will thus expand before |\num| itself. In the case at hand |\num| is a macro which would anyhow have triggered expansion of its argument before further processing. \end{TeXnote} +With the |\numprint| macro from \ctanpackage{numprint}, one can do this: +\begin{everbatim} +\protected\def\xintfloatexprPrintOne[#1]#2{\numprint{\xintPFloat[#1]{#2}}} +\end{everbatim} +For the |\protected| see the explanations in fine print. The other +difference is usage of \csbxint{PFloat} rather than \csbxint{Float}. +This is because (in my limited testing) |\numprint| with not silently +remove a zero scientific exponent but it will typeset it, for example as +$1.5\cdot10^0$. So we use our own \csbxint{PFloat} poor man +\myenquote{prettifier}. The current behaviour of \csbxint{floateval} corresponds to this set-up: @@ -5335,11 +5634,6 @@ denominators. \endgroup % FIN DU GROUPE POUR LES EXEMPLES -% The \csbxint{PFloatE} is now allowed to a be macro with an argument delimited -% by a dot, this argument will be the exponent.\NewWith{1.4e} The output must be produced -% \fexpan dably and again be delimited by a dot. The default does not grab the -% exponent and simply inserts the letter |e|. - \begin{TeXnote} The macro used as customization of \csbxint{exprPrintOne} (whose default is a private variant of \csbxint{FracToSci} with exactly same output) must @@ -5368,8 +5662,7 @@ denominators. compatiblity will be maintained systematically in case of evolution. \end{TeXnote} - -\subsubsection{\csh{xintthealign} for general oples and nutples} +\subsubsection{\csh{xintthealign} for output of general oples} \label{xintthealign} With \csbxint{thealign} one can get nested data use a \TeX{} alignment in the @@ -5381,7 +5674,7 @@ Attention, this \csa{xintthealign} must be a prefix to \csbxint{expr}, or \csbxint{floatexpr} etc..., but there will be low-level \TeX\ errors if it is used to prefix \csbxint{eval} et al. or \csbxint{theexpr} et al. -It is possible to customize the behaviour of |\xintthealign|. For example:\CHANGED{1.4a} +It is possible to customize the behaviour of |\xintthealign|. For example: \begin{everbatim} \protected\def\xintexpralignbegin {\halign\bgroup\tabskip2ex\hfil##&&##\hfil\cr}% \def\xintexpralignend {\crcr\egroup}% removed \protected at 1.4c @@ -5406,12 +5699,17 @@ with the expansion result. \csa{xintexpralignbegin}. \end{TeXnote} -Although we will try to keep stable the way «regular arrays» as in the +Although we will try to keep stable the way \myenquote{regular arrays} as in the above example are rendered by default,\UNSTABLE{} the |\xintthealign| macro (and its associated customizability) is to be considered work-in-progress and may experience breaking changes. -Use for example this for outputting to a file or a terminal: +Use for example this for outputting to a file or a terminal:% +% +{\catcode`^ 12 +\footnote{With the |xetex| engine this will need its |-8bit| option else + the |^^J| in |\xintexpralignlinesep| will be printed literally instead + of being converted into a line separator in the file or terminal output.}} \begin{everbatim} % Better here without \protected. % We assume here \newlinechar has the LaTeX setting. @@ -5472,7 +5770,7 @@ precedence level. This is the case with the analogous operators from the Python language, as well. At |1.4g| the power operators were changed to act in a right associative -way.\CHANGED{1.4g} Again, this matches the behaviour of e.g.\@ Python:% +way. Again, this matches the behaviour of e.g.\@ Python:% \begin{everbatim*} \xinteval{2^-3^4} \end{everbatim*} @@ -5541,7 +5839,7 @@ way.\CHANGED{1.4g} Again, this matches the behaviour of e.g.\@ Python:% % \prec{3}& the comma \oper{,}\strut\\\hline % - \prec{2}& the bracketers \oper{[}, \oper{]} construct nestable «arrays»\strut\\\hline + \prec{2}& the bracketers \oper{[}, \oper{]} construct nestable \myenquote{arrays}\strut\\\hline % \prec{1}& the parentheses \oper{(}, \oper{)}, and the semi-colon \oper{;} in \func{iter}, \func{rseq}, and further structures\strut\\\hline @@ -5587,7 +5885,7 @@ indicates the right-\hskip0pt precedence, if it differs from the left. after the function name is parsed (there are exceptions which are documented at the relevant locations.) - \operdesc{\empty\lowast} Python-like «unpacking» prefix operator. Sometimes one + \operdesc{\empty\lowast} Python-like \myenquote{unpacking} prefix operator. Sometimes one needs to use it as function |*()| (but I can't find an example right now) but most of the time parentheses are unneeded. @@ -5616,7 +5914,7 @@ indicates the right-\hskip0pt precedence, if it differs from the left. \end{everbatim*} It is possible that in future the |"| prefix could be dropped in favour of - |0x| prefix. This would free |"| to be used for input of «string»-like + |0x| prefix. This would free |"| to be used for input of \myenquote{string}-like entities. \end{description} @@ -5675,7 +5973,7 @@ indicates the right-\hskip0pt precedence, if it differs from the left. \begin{description} \operdesc{\string^} \operdesc{\lowast\lowast} Both compute powers. They act in a right associative -way.\CHANGED{1.4g} +way. \begin{everbatim*} \xintiiexpr 2^3^4\relax \end{everbatim*} @@ -5771,7 +6069,7 @@ precedence, use parentheses for disambiguation. if not. \end{description} - Comparisons\NewWith{1.4b} can be chained arbitrarily, e.g., |x < y <= z != + Comparisons can be chained arbitrarily, e.g., |x < y <= z != t| is equivalent to |x < y 'and' y <= z 'and' z != t| (and also to |all(x<y, y<=z, z!=t)|), except that if |y| and |z| involve computations, they are evaluated only once. Currently there is no short-circuit here, i.e.\@ @@ -5829,7 +6127,7 @@ precedence, use parentheses for disambiguation. \operdesc{\empty]} Involved in Python-like slicing |[a:b]| and extracting |[N]| syntax. And its extension à la NumPy |[a:b,N,c:d,...,:]|. Ellipsis |...| is not yet implemented. - The «step» parameter as in |[a:b:step]| is not yet implemented. + The \myenquote{step} parameter as in |[a:b:step]| is not yet implemented. \end{description} \precdesc{3} @@ -5852,10 +6150,10 @@ precedence, use parentheses for disambiguation. \precdesc{2} \begin{description} \operdesc{[} - \operdesc{]} The bracketers construct nestable «array-like» + \operdesc{]} The bracketers construct nestable \myenquote{array-like} structures. Arbitrary (heterogeneous) nesting is allowed. For output related matters see \csbxint{thealign} (its usage is optional, without it rendering - is «one-dimensional»). Output shape of non-homogeneous arrays is to + is \myenquote{one-dimensional}). Output shape of non-homogeneous arrays is to be considered unstable at this time. \end{description} @@ -6033,7 +6331,7 @@ Miscellaneous notes: }% \end{everbatim*} - \funcdesc[]{rbit} returns a random |0| or |1|.\NewWith{1.4} + \funcdesc[]{rbit} returns a random |0| or |1|. \end{description} @@ -6201,9 +6499,7 @@ $\xintthefloatexpr subs(((x-1)/x, x/x, (x+1)/x), x=2**30)\relax check whether it used with its second optional argument. This is useful in the context of converting function definitions done via \csbxint{deffunc} (see explanations there) to functions usable in - \csbxint{floateval}.\NewWith{1.4} - - Breaking change at |1.4e|: formerly the name was |float_()|.\CHANGED{1.4e} + \csbxint{floateval}. \funcdesc{nuple} is currently same as |[...]|.\DNU{(1.4)} Reserved for possible alternative meaning in future. @@ -6211,12 +6507,12 @@ $\xintthefloatexpr subs(((x-1)/x, x/x, (x+1)/x), x=2**30)\relax \xinteval{nuple(1,2,3)} \end{everbatim*} - \funcdesc{unpack} is alternative for |*| unpacking operator.\NewWith{1.4} + \funcdesc{unpack} is alternative for |*| unpacking operator. \begin{everbatim*} \xinteval{unpack([1,2,3])} \end{everbatim*} - \funcdesc[ople]{flat} removes\NewWith{1.4b} all nesting to produce a + \funcdesc[ople]{flat} removes all nesting to produce a (non-bracketed) ople having the same leaves (some possibly empty) but located at depth 1. \begin{everbatim*} @@ -6410,7 +6706,7 @@ $\xintthefloatexpr subs(((x-1)/x, x/x, (x+1)/x), x=2**30)\relax \funcdesc[{A[, B]}]{randrange} when used with a single argument |A| returns a random integer |0 <= x < A|, and when used with two arguments |A| and |B| returns - a random integer |A <= x < B|. As in Python it is an «empty range» error + a random integer |A <= x < B|. As in Python it is an \myenquote{empty range} error in first case if |A| is zero or negative and in second case if |B <= A|. Attention that the arguments are first converted to integers using @@ -6486,7 +6782,7 @@ mod(11/7,1/13)- (11/7)/:(1/13), (11/7)//(1/13)\relax\newline \funcdesc[f, g]{divmod} computes the two mathematical values |floor(f/g)| and |mod(f,g)=f - g*floor(f/g)| and produces them as a bracketed - pair\CHANGEDf{1.4} + pair in other terms it is analogous to the Python |divmod| function. Its output is equivalent to using |f//g, f/:g| but its implementation avoids doing twice @@ -6563,7 +6859,7 @@ The arguments must (expand to) short integers. See \autoref{xintiiPFactorial} for the behaviour if the arguments are negative. \funcdesc[\TeX-macro, n-uple]{ndfillraw} The second argument is |[N1, N2, ..., -Nk]|.\NewWith{1.4} The construct fills an |N1xN2x...xNk| hyperrectangular +Nk]|. The construct fills an |N1xN2x...xNk| hyperrectangular nested list by evaluating the given |macro| as many times as needed. The expansion result goes directly into internal data and must thus comply with what is expected internally for an individual numeric leaf (at |1.4|, @@ -6624,10 +6920,10 @@ The functions \func{all}, \func{any}, \func{xor}, \func{\textasciigrave+\textasciigrave}, \func{\textasciigrave\lowast\textasciigrave}, \func{max}, \func{min}, \func{gcd}, \func{lcm}, \func{first}, \func{last}, -\func{reversed} and \func{len} work both with «open» and «packed» lists (aka |nutples|). +\func{reversed} and \func{len} work both with \myenquote{open} and \myenquote{packed} lists (aka |nutples|). Since |1.4|, when used with a single argument which is a |nutple|, it is automatically unpacked. -But from |1.4| to |1.4h| these functions could not be used with a single numeric argument: either they had at least two arguments, or only one and it had to be a |nutple|. At |1.4i| it is again possible to use them with a lone numeric argument.\NewWith{1.4i} +But from |1.4| to |1.4h| these functions could not be used with a single numeric argument: either they had at least two arguments, or only one and it had to be a |nutple|. At |1.4i| it is again possible to use them with a lone numeric argument. In the specific case of \func{reversed} with a |nutple| argument the output is then repacked so that the output is a |nutple| if and only if the input was one (the reversal does @@ -6747,14 +7043,14 @@ the case here. \xinttheiiexpr len(37.5), len(1..50, [101..150], 1001..1050), len([1..10])\relax \end{everbatim*} - \funcdesc[\lowast nutples]{zip} behaves\NewWith{1.4b} similarly to + \funcdesc[\lowast nutples]{zip} behaves similarly to the Python function of the same name: i.e. it produces \emph{an ople of nutples, where the i-th nutple contains the i-th element from each of the argument nutples. The ople ends when the shortest input nutple is exhausted. With a single nutple argument, it returns an ople of 1-nutples. With no arguments, it returns the empty ople.} - As there is no exact match in \xintexprname of the concept of «iterator» object,% + As there is no exact match in \xintexprname of the concept of \myenquote{iterator} object,% % \footnote{% Speaking of iterators, I have some ideas about this: as \csbxint{expr} does not @@ -6804,8 +7100,6 @@ located in an expression parsed by \csbxint{defvar} or \csbxint{deffunc}, to not be confused with the expression terminator. -This is not needed anymore.\NewWith{1.4} - \func{seq}, \func{rseq}, \func{iter}, \func{rrseq}, \func{iterr} and also \func{add}, \func{mul}, but not \func{subs} admit the \keyword{omit}, \keyword{abort}, and \func{break} keywords. This is a @@ -6819,7 +7113,7 @@ All lowercase and uppercase Latin letters are pre-configured for usage as dummy variables. In Unicode engines one can use \csbxint{newdummy} to turn any letter into a usable dummy variable. -And since |1.4|,\NewWith{1.4} \csbxint{newdummy} works (in all engines) to +And since |1.4|, \csbxint{newdummy} works (in all engines) to turn a multi-letter word into a dummy variable. In the descriptions, |varname| stands for such a dummy variable, either single-letter or word. @@ -6853,7 +7147,7 @@ results. Or one can use \func{seq}. See the documentation of \xintiiexpr add((odd(x))?{x^3}{omit}, x = 1..20)\relax\par % add only odd cubes \end{everbatim*} -At |1.4| (fixed at |1.4a|),\NewWith {1.4a} the keywords \keyword{omit} (as in +At |1.4| (fixed at |1.4a|), the keywords \keyword{omit} (as in example above), \keyword{abort} and \func{break} are allowed. The meaning of \func{break} is specific: its argument serves as last operand for the addition, not as ultimate value. @@ -6878,7 +7172,7 @@ list without usage of a dummy variable. The |@| special variable holds the so-far accumulated value. Initially its value is one. -At |1.4| (fixed at |1.4a|),\NewWith {1.4a} the keywords \keyword{omit}, +At |1.4| (fixed at |1.4a|), the keywords \keyword{omit}, \keyword{abort} and \func{break} are allowed. The meaning of \func{break} is specific: its argument serves as last operand for the multiplication, not as ultimate value. @@ -6915,7 +7209,7 @@ this ``nuple''. For example: Prior to |1.4| the above example had to be written with |[@]|. This is still possible (|@| stands for an ople with two items, bracketing then extracting is -like extracting directly), but it is leaner to drop the extra «packing». +like extracting directly), but it is leaner to drop the extra \myenquote{packing}. \funcdesc[initial value; expr, varname=values]{iter} is exactly like |rseq|, except that it only prints the last iteration. @@ -6995,7 +7289,7 @@ previous items, but decided to drop it as the package was becoming big. \end{everbatim*} \funcdesc[expr, var1=value1; var2=value2; ....; varN=valueN{[;]}]{subsm} -Simultaneous\NewWith{1.4} +Simultaneous substitutions. The assigned values must not involve the variables. An optional final semi-colon is allowed. @@ -7004,7 +7298,7 @@ semi-colon is allowed. \end{everbatim*} \funcdesc[expr, var1=value1; var2=value2; ....; varN=valueN{[;]}]{subsn} -Simultaneous\NewWith{1.4} +Simultaneous substitutions. The assigned values may involve all variables located further to its right. An optional final semi-colon is allowed. @@ -7014,11 +7308,11 @@ semi-colon is allowed. \funcdesc[function, values1; values2; ....; valuesN{[;]}]{ndmap} % -Construction\NewWith{1.4} of a nested list (a priori having |N| dimensions) from function +Construction of a nested list (a priori having |N| dimensions) from function values. The function must be an |N|-variable function (or a function accepting arbitrarily many arguments), but it is not constrained to produce only scalar values. Only in the latter case is the output really an |N|-dimensional -«|ndlist|» type object. An optional final semi-colon in the input before the +\myenquote{|ndlist|} type object. An optional final semi-colon in the input before the closing parenthesis is allowed. \begin{everbatim*} @@ -7030,10 +7324,10 @@ allowed. \funcdesc[expr, var1=values1; var2=values2; ....; varN = valuesN{[;]}]{ndseq} % -Constructs\NewWith{1.4} a nested list (a priori having |N| dimensions) from +Constructs a nested list (a priori having |N| dimensions) from substitutions in an expression involving |N| (dummy) variables. The expression is not constrained to produce only scalar values. Only in the -latter case is the output really an |N|-dimensional «|ndlist|» type object. +latter case is the output really an |N|-dimensional \myenquote{|ndlist|} type object. An optional final semi-colon in the input before the closing parenthesis is allowed. \begin{everbatim*} @@ -7098,7 +7392,7 @@ First Fibonacci number at least |2^31| and its index The step of replacing $a$ by its ceil and $b$ by its floor is a kind of silly overhead, but $a$ and $b$ are allowed to be themselves the result - of computations and there is no notion of «int» type in \csbxint{eval}. + of computations and there is no notion of \myenquote{int} type in \csbxint{eval}. The solution is, when $a$ and $b$ are given explicit integers to temporarily switch to the \csbxint{iiexpr} parser: \begin{everbatim*} @@ -7110,7 +7404,7 @@ First Fibonacci number at least |2^31| and its index in the macros internally involved in computations...\@ thus perhaps what one gains on one side is lost on the other side. - \item |a..[d]..b| generates «real» numbers along arithmetic progression + \item |a..[d]..b| generates \myenquote{real} numbers along arithmetic progression of reason |d|. It does \emph{not} replace |a| by its ceil, nor |b| by its floor. The generated list is empty if |b-a| and |d| are of opposite signs; if |d=0| or if |a=b| @@ -7119,7 +7413,7 @@ First Fibonacci number at least |2^31| and its index \xintexpr 1.5..[1.01]..11.23\relax \end{everbatim*} - At |1.4|,\CHANGED{1.4} this generator behaves in \csbxint{floatexpr} exactly as in + At |1.4|, this generator behaves in \csbxint{floatexpr} exactly as in \csbxint{expr}, i.e.\@ \emph{exactly}. This is breaking change. \begin{everbatim*} @@ -7137,15 +7431,11 @@ First Fibonacci number at least |2^31| and its index \subsection{Python slicing and indexing of one-di\-men\-sional sequences} \label{ssec:lists} -There are some breaking changes in the syntax at |1.4|,\CHANGED{1.4} because previously -\xintexprname had no real notion of a list or sequence type. It now does, and -even allows nesting. - We denote here by \emph{list} or \emph{sequence} a general \emph{ople}, either given as a variable or explicitly. \emph{In the former case the parentheses are optional}.% % -\footnote{Even for an «open list», if it is given as a \emph{variable} then the indexing or slicing will not apply to its last item but to itself as an entity.} +\footnote{Even for an \myenquote{open list}, if it is given as a \emph{variable} then the indexing or slicing will not apply to its last item but to itself as an entity.} \begin{itemize} \item |(list)[n]| returns the |n+1|th item if |n>=0|. If |n<0| it enumerates @@ -7219,8 +7509,6 @@ from Python with \emph{tuple} or \emph{list} types: \subsection{NumPy like nested slicing and indexing for arbitrary oples and nutples} -This is entirely new with |1.4|.\NewWith{1.4} - I will give one illustrative example and refer to the NumPy documentation for more. @@ -7366,7 +7654,7 @@ $x_1 = \xinteval{x_1}, x_2 = \xinteval{x_2}, x_3 = \xinteval{x_3}$\par \end{everbatim*} -Simultaneous assignments\NewWith{1.4i} with more variables than values do not +Simultaneous assignments with more variables than values do not raise an error but simply set the extra variables to the \dtt{nil} value. \begin{everbatim*} \xintdefiivar a, b, c := [1, 2];% will be automatically unpacked @@ -7383,7 +7671,7 @@ Notice that \dtt{nil} variables must be used with caution as they break arithmetic operations if used as operands to them. And they are not the same as the \dtt{None} variables, which can also be input as |[]|. -Simultaneous assignments\NewWith{1.4i} with less variables than values do not +Simultaneous assignments with less variables than values do not raise an error but set the last variable to be the ople concatenating the remaining values. \begin{everbatim*} @@ -7401,7 +7689,7 @@ variable and a function.% % \footnote{But until a bugfix added at release |1.4i|, some built-in function names (those implementing syntax with dummy variables, and the so-called - «pseudo»-functions) were fragile under such overloading.} + \myenquote{pseudo}-functions) were fragile under such overloading.} But for safety we will unassign |seq| now: \begin{everbatim*} \xintunassignvar{a}\xintunassignvar{b}\xintunassignvar{c}\xintunassignvar{d}% @@ -7413,7 +7701,7 @@ restores this initial meaning. See further \csbxint{unassignvar} and \csbxint{newdummy}. Since |1.4| even assigned variables can be used in the call signatures of function declarations. -Regarding the manipulation of an «open list» as above, there is no way +Regarding the manipulation of an \myenquote{open list} as above, there is no way to obtain with only one use of the variable both its last item and the reduction of the variable to its truncated self. One can do rather: \begin{everbatim*} @@ -7429,8 +7717,8 @@ The value of w is \xinteval{w} and mylist is now \xinteval{mylist}.% \xintunassignvar{z}\xintunassignvar{w}\xintunassignvar{mylist}\par \end{everbatim*} -It is recommended generally speaking to work with «closed (i.e. bracketed) -lists» because only them and numbers can be arguments to functions (but see +It is recommended generally speaking to work with \myenquote{closed (i.e. bracketed) +lists} because only them and numbers can be arguments to functions (but see \csbxint{deffunc} and the notion of variadic last argument). For more on the Python-like slicing used above see \autoref{ssec:lists} and \autoref{sssec:opleslicing}. For more information relative to variables @@ -7477,7 +7765,7 @@ freely either with \csa{xintexpr} or \csa{xintfloatexpr} but not with \csa{xintiiexpr}, and variables defined via \csa{xintdefiivar} can be used in all parsers. -When defining a variable with \csa{xintdeffloatvar}\CHANGED{1.4e} it (or +When defining a variable with \csa{xintdeffloatvar} it (or generally speaking its numerical leaves) is rounded to \csbxint{theDigits} precision. So the variable holds the same value as would be printed via \csbxint{floateval} for the same computation. @@ -7555,13 +7843,6 @@ Package xintexpr Info: (on line 5) Variable FourthPowers defined with value {{0}{1}{81}{1296}{10000}{50625}{ 194481}{614656}{1679616}{4100625}{9150625}}. \end{everbatim} -Prior to |1.4e| variable names\CHANGED{1.4e} were printed within straight -double quotes to the log. But this was not the case for function definitions, -so now quotes have been removed. - -The braces one can see around the numerical values date back to the |1.4| -release. - \subsubsection{\csh{xintunassignvar}} \label{xintunassignvar} @@ -7604,7 +7885,7 @@ For example with Xe\TeX\ or Lua\LaTeX\ the following works: Under \csbxint{globaldefstrue} regime the effect of \csa{xintnewdummy} is global. -Starting with |1.4|,\NewWith{1.4} it is allowed to use \csa{xintnewdummy} with multi-letter +Starting with |1.4|, it is allowed to use \csa{xintnewdummy} with multi-letter names (obeying the condition for being a variable name). \subsubsection{\csh{xintensuredummy}, \csh{xintrestorevariable}} @@ -7623,13 +7904,12 @@ if other parts need the letter as an assigned variable name. For example \xinttrigname being written at high level needs a few genuine dummy variables, and it uses \csbxint{ensuredummy} to be certain everything is ok. -\csbxint{restorevariable} was formerly called \csa{xintrestorelettervar}.\CHANGED{1.4} - \subsection{User defined functions} \label{ssec:userfunctions} -\def\HOOKLOCALTOC#1#2#3{} -\etocsetnexttocdepth{subsubsection}\localtableofcontents -\let\HOOKLOCALTOC\empty +\def\tocstylesubsubsectionHOOK#1#2#3{} +\etocsetnexttocdepth{subsubsection} +\localtableofcontents +\let\tocstylesubsubsectionHOOK\empty \subsubsection{\csh{xintdeffunc}} @@ -7661,24 +7941,22 @@ have gained experience in using this interface...): \item The function names are composed of letters, digits, underscores or |@| signs. A function name must start with a letter. It may be a single letter (see \autoref{sssec:overload}). -\item The\NewWith{1.4} variable names used in the function signature may be multi-letter +\item The variable names used in the function signature may be multi-letter words. It is also allowed for them to already be in use for previously declared variables. Their meanings will get restored for usage after the function declaration. \item A function can be declared with at most nine arguments. It can be declared as a function with no arguments. -\item If\NewWith{1.4} in the function declaration the last argument is +\item If in the function declaration the last argument is prefixed by |*|, it stands for a |nutple| which will gather all arguments of the function call beyond the first positional ones. See \autoref{sssec:funcargs} - for additional explanations on such «variadic» arguments. -\item Recursive\CHANGED{1.4} definitions are possible; for them to not generate error or + for additional explanations on such \myenquote{variadic} arguments. +\item Recursive definitions are possible; for them to not generate error or fall in infinite loops, the use of the short-circuit conditionals |?| and |??| is \emph{mandatory}. -\item If\CHANGED{1.4} a function is used in another definition it will check if it is +\item If a function is used in another definition it will check if it is applied to numerical arguments and if this is the case will expand - fully. Prior to |1.4| one needed deprecated \csa{xintdefefunc} for this. But - the latter is now but an alias for \csa{xintdeffunc}, the two have been - merged. + fully. \item The previous item has an exception for functions with no arguments; they never expand immediately in other function definitions (else they would be almost like variables). This provides a way to define functions with @@ -7691,7 +7969,7 @@ have gained experience in using this interface...): \begin{everbatim} \xintdeffloatfunc foo(x) := float_dgt(\xintexpr foo(x)\relax); \end{everbatim} - The \func{float\string_dgt} wrapper\NewWith{1.4} (which was renamed at + The \func{float\string_dgt} wrapper (which was renamed at |1.4e|) is in order for the float variant to produce an already-rounded value, possibly speeding-up usage if used as input for other functions. Using \func{float} here would work the same but the produced @@ -7755,7 +8033,7 @@ xintAdd {\xintDiv {\xintMul {\xintAdd {\xintDiv {\xintMul {\xintAdd {\xintDiv { }{1}}{#1}}{2}}{1}}{#1}}{1}} \end{everbatim} -The above is not entirely true.\CHANGED{1.4} At |1.4|, \csbxint{deffunc} is +The above is not entirely true. At |1.4|, \csbxint{deffunc} is more powerful and digests more of the syntax but it may have to store it in such a way that usage will be done via a sub-expression: hence it is not the case that the original expression has been \emph{entirely} parsed. See @@ -7830,7 +8108,7 @@ minimal), they will not bring added efficiency if the substituted values are to be used multiple times. They may still be useful to visually simplify the input of a big expression by expressing it in terms of smaller constituents. -Another workaround if one wants genuine (not «macro»-) functions for some +Another workaround if one wants genuine (not \myenquote{macro}-) functions for some expression where the same thing is used multiple times is to define helper functions computing the intermediate data. One can see illustrations of this in the code source of \xinttrigname (or in the matrix multiplication example @@ -7855,24 +8133,13 @@ Note: the optional argument |[Q]| accepted by \csbxint{floatexpr} does not work with \csbxint{deffloatfunc}. It is still possible to wrap the expression in |float(expression,Q)|, if it evaluates to a scalar. - -\subsubsection{Deprecated: \csh{xintdefefunc}, \csh{xintdefiiefunc}, - \csh{xintdeffloatefunc}} -\label{xintdefefunc} -\label{xintdeffloatefunc} -\label{xintdefiiefunc} - -They\CHANGED{1.4} are deprecated and currently only aliases to \csbxint{deffunc} et -al.. Please update your documents as they may be removed at any -time. - \subsubsection{\csh{xintdefufunc}, \csh{xintdefiiufunc}, \csh{xintdeffloatufunc}} \label{xintdefufunc} \label{xintdefiiufunc} \label{xintdeffloatufunc} -This allows to define so-called «Universal functions». This is terminology -borrowed from |NumPy|.\NewWith{1.4} +This allows to define so-called \myenquote{Universal functions}. This is terminology +borrowed from |NumPy|. Here is an example: \begin{everbatim*} @@ -7960,7 +8227,7 @@ ub {\xintMul {11}{\xintMul {\xintPow {#1}{2}}{\xintPow {#2}{2}}}}{\xintPow {#2} catcodes.\IMPORTANTf It may thus be impossible to retokenize it (even after having removed the - extra spaces from the added line breaks).\CHANGEDf{1.4} + extra spaces from the added line breaks). This is in contrast with variable values which are always output in the log in the benign way, using digits, braces and some characters of catcode 12. @@ -7991,7 +8258,7 @@ be used in \emph{all three parsers}. \xintexpr seq(foo(0, 3, j), j= 1..10)\relax \end{everbatim*} -Each time the created «macro-function» |foo()| will be encountered the +Each time the created \myenquote{macro-function} |foo()| will be encountered the corresponding replacement text will get inserted as a sub-expression (of the same type as the surrounding one), the macro parameters having been replaced with the (already evaluated) function arguments, and the parser \emph{will @@ -8011,9 +8278,6 @@ does not parse successfully. \subsubsection{Example with vectors and matrices} \label{sssec:csv} -This section\CHANGED{1.4} has changed significantly at |1.4| due to the new extended data -types manipulated by the syntax. - Suppose we want to manipulate 3-dimensional vectors, which will be represented as |nutples| of length 3. And let's add a bit of matrix algebra. \begin{everbatim*} @@ -8132,10 +8396,7 @@ precision for the evaluation. \label{sssec:recursive} Recursive definitions \emph{require} using the short-circuit branching -operators.\CHANGED{1.4} Prior to |1.4|, to the contrary it was explained that -one should use the \func{if} or \func{ifsgn} functions and that they would get -converted into macros doing branching in a short-circuit manner. This was a -bit counter-intuitive. +operators. \begin{everbatim*} \xintdeffunc GCD(a,b):=(b)?{GCD(b,a/:b)}{a}; \end{everbatim*} @@ -8252,7 +8513,7 @@ for \TeX nical reasons (one could imagine using rather some terminator token, but ultimately support macros for built-in and user defined functions rely on \TeX\ macros with undelimited parameters, at least so far). -Our category $\mathcal{C}$ of «oples» is the smallest collection of +Our category $\mathcal{C}$ of \myenquote{oples} is the smallest collection of \emph{totally ordered finite sets} verifying these properties: \begin{enumerate} \item The empty set \dtt{$\emptyset$} is an \emph{ople}, i.e.\@ it belongs to @@ -8283,7 +8544,7 @@ comma. Thus repeated commas are like only one and |nil| is a neutral element. (non-empty) \emph{atom} is called a \emph{number}.% % \footnote{This has to be taken in a general sense, for example with - \ctanpackage{polexpr}, polynomials are represented by such «numbers».} + \ctanpackage{polexpr}, polynomials are represented by such \myenquote{numbers}.} % \item @@ -8301,7 +8562,7 @@ corresponds to enclosing \dtt{$O$} within square brackets: \dtt{$[O]$}. % It is not \dtt{nil}.% % -\footnote{There is (experimental) a pre-defined «\dtt{None}» variable which +\footnote{There is (experimental) a pre-defined \myenquote{\dtt{None}} variable which stands for the \emph{none-ple}. It can also be input as |[]|.} \end{itemize} @@ -8341,8 +8602,8 @@ as separator is misleading. In other terms, the comma is NOT a separator but the (associative) operator of concatenation of totally ordered sets, and the number |3| for example represents a (singleton) set. -If we want to refer to |3| or |5| or |7| or |9| as «the items of the -(open) list |3,5,7,9|» (and probably this documentation already has such +If we want to refer to |3| or |5| or |7| or |9| as \myenquote{the items of the +(open) list |3,5,7,9|} (and probably this documentation already has such utterances, due to legacy reasons from the pre-|1.4| internal model), we \emph{must} realize that this clashes with using the word \emph{item} as synonymous to \emph{element} in the set-theoretical sense. @@ -8355,21 +8616,21 @@ its \emph{items} are the singleton oples (aka one-ples) \dtt{$I_1=\{a_1\}$}, \dtt{$I_j$} is a |nutple| whose depth is one more than the one of the ople \dtt{$a_j$}. -Thus we can refer to «items» but must then understand they are not «elements»: -«items» are «singleton sub-sets». The cardinality (aka length) of an ople is +Thus we can refer to \myenquote{items} but must then understand they are not \myenquote{elements}: +\myenquote{items} are \myenquote{singleton sub-sets}. The cardinality (aka length) of an ople is also the number of its -items. It would be tempting to use the terminology «sub-item» to keep in mind they are «sub-sets» +items. It would be tempting to use the terminology \myenquote{sub-item} to keep in mind they are \myenquote{sub-sets} but this would again create confusion: a |nutple| has only one item which is itself; and we need some terminology to refer to the individual numbers in the |nutple| given in input as |[1,2,3]| for example. It is natural to refer to -|1|, |2|, |3| as «sub-items» of |[1,2,3]| as the latter may be an «item» (it -is in particular an «item» of itself, the unique one at that). +|1|, |2|, |3| as \myenquote{sub-items} of |[1,2,3]| as the latter may be an \myenquote{item} (it +is in particular an \myenquote{item} of itself, the unique one at that). We distinguish the |oples| of length zero (there is only one, the empty set) -or at least two as those which can never be an «item». Those of length one, -the |one-ples|, are exactly those which can be «items». Among them some may -have «sub-items», they are the |nutples| with the exception of the |none-ple|. -And the others do not have «sub-items», they are the |numbers| and the |none-ple| (whose input syntax is +or at least two as those which can never be an \myenquote{item}. Those of length one, +the |one-ples|, are exactly those which can be \myenquote{items}. Among them some may +have \myenquote{sub-items}, they are the |nutples| with the exception of the |none-ple|. +And the others do not have \myenquote{sub-items}, they are the |numbers| and the |none-ple| (whose input syntax is either |[]| or the variable |None|).% % \footnote{% @@ -8394,7 +8655,7 @@ We say that the empty set |nil| and \emph{atoms} are \emph{leaves}. We associate with any \emph{ople} a tree. The root is the ople. In the case of the |nil| ople, there is nothing else than the root, which we then consider also a \emph{leaf}. Else the children at top level are the successive -\emph{elements} (not «items»!) of the ople.% +\emph{elements} (not \myenquote{items}!) of the ople.% % \footnote{\label{fn:alttree}% We could also consider a tree for which the children of the root node would @@ -8444,14 +8705,14 @@ than display it. \subsubsection{Ople slicing and indexing} \label{sssec:opleslicing} -«Set-theoretical» slicing of an \emph{ople} means replacing it with one of its +\myenquote{Set-theoretical} slicing of an \emph{ople} means replacing it with one of its subsets. This applies also if it is a \emph{number}. Then it can be sliced only to itself or to the empty set (indeed it has only one element, which is an atom). Similarly the \emph{none-ple} can only be sliced to give itself or the empty set. And more generally a \emph{nutple} is a singleton so also can only be set-sliced to either the empty set or itself. -\xintexprname extends «Python-like» slicing to act on \emph{oples}: +\xintexprname extends \myenquote{Python-like} slicing to act on \emph{oples}: \begin{itemize}[nosep] \item if they are not \emph{nutples} set-theoretical slicing applies, \item if they are \emph{nutples} (only case having a one-to-one @@ -8470,12 +8731,12 @@ parenthesized ople with |[a:b]|. See \autoref{ssec:lists} for more. There are never any out-of-range errors when slicing or indexing. All operations are licit and resolved by the |nil|, a.k.a. empty set. -«Set-theoretical» item indexing of an \emph{ople} means reducing it to a +\myenquote{Set-theoretical} item indexing of an \emph{ople} means reducing it to a subset which is a singleton. It is thus a special case of set-theoretical slicing (which is the general process of selecting a subset as replacement of a set). -\xintexprname extends «Python-like» indexing to act on \emph{oples}: +\xintexprname extends \myenquote{Python-like} indexing to act on \emph{oples}: \begin{itemize}[nosep] \item if they are not \emph{nutples} set-theoretical item indexing applies, \item if they are \emph{nutples} (only case having a one-to-one @@ -8578,8 +8839,8 @@ compare with NumPy) an input such as \begin{everbatim} [[1, 2], [3, 4]] \end{everbatim} -we may well refer to |1|, |2|, |3|, and |4| as being «the leaves of the 2d -array». But obviously we have here numbers and previously we explained that a +we may well refer to |1|, |2|, |3|, and |4| as being \myenquote{the leaves of the 2d +array}. But obviously we have here numbers and previously we explained that a number is not a \emph{leaf}, its \emph{atom} is. Well, the point here is that we must make a difference between the input form as above and the actual constructed \emph{ople} the parser will obtain out of it. In the input we do @@ -8609,6 +8870,7 @@ I hope this is clear to everyone. If not, maybe time to say this section is not needed to understand almost all of the manual, but I needed to write it to be able to maintain in future my own software. + \subsection{Expansion (for geeks only)} As mentioned already, the parsers are compatible with expansion-only @@ -8635,7 +8897,7 @@ expressions than is usually the case with familiar programming languages such as Python, although admittedly that freedom will prove useful only to power-\TeX users and possibly does not have that many significant use cases) has significative exceptions. These exceptions are mostly related to -«pseudo»-functions. A «pseudo»-function will grab some of its arguments via +\myenquote{pseudo}-functions. A \myenquote{pseudo}-function will grab some of its arguments via delimited macros. For example |subs(expr1,x=expr2)| needs to see the comma, equal sign and closing parenthesis. But it has mechanisms to allow |expr1| and |expr2| to possess their own commas and parentheses. @@ -8643,7 +8905,7 @@ equal sign and closing parenthesis. But it has mechanisms to allow |expr1| and Inner semi-colons on the other hand currently always can originate from expansion. Defining functions or variables requires a visible semi-colon acting as delimiter of the expression, but inner semi-colons do not need to be -hidden within braces or macros\NewWith{1.4}. +hidden within braces or macros. The expansion stops only when the ending |\relax| has been found (it is then removed from the token stream). @@ -8674,10 +8936,42 @@ expansion. never-ending one-dimensional one...\par \end{footnotesize} -\subsection{Known bugs/features (last updated at \texttt{1.4j})} +\subsection{Known bugs/features (last updated at \texttt{1.4m})} \begin{description} -\item[if(100>0,(100,125),(100,128)) breaks my code:] +\item[{\cs{xinteval}\char`\{\cs{xintLength}\char`\{\cs{par}\cs{par}\cs{par}\char`\}\char`\}} complains about a Runaway argument:]\mbox{} + + |\xintLength{\par\par\par}| has no issue as + |\xintLength| is a |\long| macro but this is not the case of + |\xinteval|. Most macros of a non arithmetic nature in + \xintkernelname and \xinttoolsname are declared |\long| but + absolutely none in \xintexprname, and its dependencies \xintname, etc... +% + As a remark in passing, I could not use the \LaTeX{} |\item| directly:% +% + \footnote{For those who wonder my custom |\verb| employs a + |\scantokens| approach, so it can be used in the argument of a + macro, for example \verb+\footnote{\verb|\verb|}+.} +% +\begin{everbatim} +Runaway argument? +{|\xinteval {\xintLength { +! Paragraph ended before \@item was complete. +<to be read again> + \par +l.4434 \item[{|\xinteval{\xintLength{\par + \par\par}| complains about a Runawa... +\end{everbatim} + This is the reason I guess why everything is a priori |\long| in the + \LaTeX3 interface except if asked for otherwise (as far as I know). + + Although most macros are dealing with inputs which can only be with digits + and some other character tokens, it would still be quite some work to + chase all top-level ones. Besides, in pratice, it does help better locate + ill-formed input. + + +\item[|if(100>0,(100,125),(100,128))| breaks my code:] % This is a feature. This is a syntax error, as the comma serves to contatenate "oples" (see \autoref{oples}), and parentheses do not create analogs of @@ -8691,7 +8985,7 @@ expansion. if(100>0,[100,125],[100,128]) \end{everbatim} which will expand to the "tuple" |[100,125]|. -\item[{\detokenize{\xintdeffunc foo(x):= gcd((x>0)?{[x,125]}{[x,128]});} +\item[{\cs{xintdeffunc} |foo(x):= gcd((x>0)?{[x,125]}{[x,128]});| creates a broken function:}] % Bug. Normally \func{gcd} (and other @@ -8712,22 +9006,22 @@ expansion. The same problem will arise with an \oper{??} nested inside \func{gcd} or similar functions, in an \csbxint{deffunc}. - \item[{\detokenize{\xinteval{0^-.5}} says "0 raised to power -1"}] + \item[{\cs{xinteval}|{0^-.5}| says "0 raised to power -1"}] % Feature. Half integer exponents are handled via a square-root extraction, so here \xintexprname wanted to first raise \dtt{0} to power \dtt{-1}, as reported. - \item[{Comparison operator \detokenize{==} crashes with nutples}] + \item[{Comparison operator |==| crashes with nutples}] % Not yet implemented... - \item[{I liked the ``broadcasting'' \detokenize{[1..10]^10} syntax, but it + \item[{I liked the ``broadcasting'' |[1..10]^10| syntax, but it was removed at 1.4}] % Patience...\@ |seq(x^10,x=1..10)| is alternative (add external |[..]| to get a nutple). - \item[{\detokenize{1e\numexpr5+2\relax} crashes}] + \item[{|1e\numexpr5+2\relax| crashes}] % Not clear yet if bug or feature. The syntax accepted in the scientific part is limited, and failure @@ -8738,22 +9032,22 @@ expansion. (although here this relies on output format of |\xinteval| using integer notation with no decoration in this case). - \item[{seq(1e-i,i=1..5) crashes}] + \item[{|seq(1e-i,i=1..5)| crashes}] % Not clear if bug or feature. Use |seq(1e\xinteval{-i},i=1..5)| or, as a possibly faster way |seq(1e\xintiieval{-i},i=\xintiiexpr1..5\relax)|. - \item[{omit/abort if nested and not last in the sub-expression cause a crash}] + \item[{\keyword{omit}/\keyword{abort} if nested and not last in the sub-expression cause a crash}] % For example |seq(subs((i)?{i}{abort},t=i)+10, i=-2, -1, 0, 1)| crashes, due to the presence of the |+10|. This is a longstanding limitation, applying ever since |omit/abort| were added to the syntax at |1.1|. Even without the |+10| the nested case was broken by a |1.4| regression and got fixed only at |1.4h|. The non-nested case |seq((i)?{i}{abort}+10, i=-2, -1, 0, - 1)| works and the «must be last in expression if nested» limitation is + 1)| works and the \myenquote{must be last in expression if nested} limitation is currently considered a feature. -\item[{seq([i,i\string^2], i=1..10) crashes with Ooops, looks like we are missing a +\item[{|seq([i,i\string^2], i=1..10)| crashes with Ooops, looks like we are missing a ]. Aborting!}] % The cause is that the square brackets do not hide the comma from |seq()| @@ -8796,7 +9090,6 @@ already covered in \autoref{sec:expr}. \subsection{The \csh{xintexpr} expressions} \label{xintexpr} \label{xinttheexpr} -\label{thexintexpr} \label{xintthe} An \xintexprname{}ession is a construct @@ -8804,7 +9097,7 @@ An \xintexprname{}ession is a construct expandable expression is read and completely expanded from left to right. An |\xintexpr...\relax| \emph{must} end in a |\relax| (which will be absorbed). -Contrarily to a |\numexpr| expression, it is printable\CHANGED{1.4} as is without a prefix +Contrarily to a |\numexpr| expression, it is printable as is without a prefix |\the| or |\number| (don't use them with |\xintexpr| this will raise an error). @@ -9102,7 +9395,7 @@ catcodes, % (unbraced) digits, binary operators, minus and plus signs as but the characters % |+|, |-|, |*|, |/|, |^|, |!|, |&|, \verb+|+, |?|, |:|, |<|, |>|, %|=|, |(|, |)|, |"|, |[|, |]|, |;|, -in the expression should not be «active» (except on purpose) as everything is +in the expression should not be \myenquote{active} (except on purpose) as everything is expanded along the way, and |\xintexpr| will choke on typesetting related commands. One can use |\string| to prefix a problematic character. @@ -9145,7 +9438,7 @@ These starred variants of \csbxint{Digits} and \csbxint{SetDigits} execute \csbxint{reloadxinttrig} and \csbxint{reloadxintlog}. \subsection{\csh{xintiexpr}, \csh{xinttheiexpr}} -\label{xintiexpr}\label{xinttheiexpr}\label{thexintiexpr} +\label{xintiexpr}\label{xinttheiexpr} Equivalent\etype{x} to doing |\xintexpr round(...)\relax| (more precisely, |round| is applied to each leaf item of the |ople| independently of its @@ -9164,7 +9457,7 @@ expression) to |\xintexpr round(<expression>, D)\relax|. |\xintiexpr [0] ...| is the same as |\xintiexpr ...| and rounds to an integer. The case of negative |D| gives quantization to an integer multiple of -\dtt{1e-D}.\NewWith{1.4a} This was modified at |1.4f| and the produced value +\dtt{1e-D}. This was modified at |1.4f| and the produced value is now the rounded quotient by \dtt{1e-D} (i.e. no trailing zeros nor scientific exponent in the output). @@ -9182,7 +9475,7 @@ this works only for a single scalar value. \end{framed} \subsection{\csh{xintiiexpr}, \csh{xinttheiiexpr}} -\label{xintiiexpr}\label{xinttheiiexpr}\label{thexintiiexpr} +\label{xintiiexpr}\label{xinttheiiexpr} This variant\etype{x} does not know fractions. It deals almost only with long integers. Comma separated lists of expressions are allowed. @@ -9268,23 +9561,20 @@ circa one hundred digits (1.2: this info may be obsolete). \subsection{\csh{xintboolexpr}, \csh{xinttheboolexpr}} -\label{xintboolexpr}\label{xinttheboolexpr}\label{thexintboolexpr} +\label{xintboolexpr}\label{xinttheboolexpr} -Equivalent\etype{x} to doing |\xintexpr ...\relax| and returning $True$ if the -result does not vanish, and $False$ if the result is zero. As |\xintexpr|, this +Equivalent\etype{x} to doing |\xintexpr ...\relax| and returning |true| if the +result does not vanish, and |false| if the result is zero. As |\xintexpr|, this can be used on comma separated lists of expressions, and even bracketed lists. -\CHANGED{1.4} It can be customized, one only needs to modify the following: \begin{everbatim} -\def\xintboolexprPrintOne#1{\xintiiifNotZero{#1}{True}{False}}% +\def\xintboolexprPrintOne#1{\xintiiifNotZero{#1}{true}{talse}}% \end{everbatim} -Not only are |True| and |False| usable in input, also |true| and |false| are +Not only are |true| and |false| usable in input, also |True| and |False| are pre-declared variables. -Maybe obsolete: - -There is slight quirk in case it is used as a sub-expression: the boolean +There is quirk in case it is used as a sub-expression: the boolean expression needs at least one logic operation else the value is not standardized to |1| or |0|, for example we get from \begin{everbatim*} @@ -9306,7 +9596,7 @@ standardized to |1| or |0|, for example we get from \subsection{\csh{xintfloatexpr}, \csh{xintthefloatexpr}} -\label{xintfloatexpr}\label{xintthefloatexpr}\label{thexintfloatexpr} +\label{xintfloatexpr}\label{xintthefloatexpr} \csbxint{floatexpr}|...\relax|\etype{x} is exactly like |\xintexpr...\relax| but with the four binary operations and the power function mapped to @@ -9332,7 +9622,6 @@ of the expression: Since |1.2f| all float operations first round their arguments; a parsed number is not rounded prior to its use as operand to such a float operation. - |\xintDigits:=36\relax|\xintDigits:=36\relax % \leftedline{|\xintthefloatexpr @@ -9489,7 +9778,7 @@ It converts (in two expansion steps) the expansion result of \relax }; \end{tikzpicture} -\caption{Coordinates with \cs{xintthecoords}.} +\caption{Coordinates with \csbxint{thecoords}.} \end{figure} \end{everbatim*} @@ -9505,7 +9794,7 @@ lists of x- and y-coordinates (see an example in next section) \subsection{The \csh{xintthespaceseparated} macro} \label{xintthespaceseparated} -It converts (in two expansion steps)\NewWith{1.4a} the expansion result of +It converts (in two expansion steps) the expansion result of \csbxint{floatexpr} (or \csbxint{expr} or \csbxint{iiexpr}) into the space separated format suitable for usage with |PS-Tricks| |\listplot| macro. @@ -10069,7 +10358,7 @@ This package was first included in release |1.3e| (|2019/04/05|) of \xintexprname. It is automatically loaded by \xintexprname. At |1.4e| (|2021/05/05|) the accuracy was significantly -increased:\CHANGED{1.4e} formerly the high-level user interface used to define +increased: formerly the high-level user interface used to define the functions had as consequences that intermediate steps of the computations could not operate with guard digits, and as a result the last two digits were most of the time off (at least the last one). Now, computations are done @@ -10085,7 +10374,7 @@ them both be thanked here. Jürgen passed away in 2022. I will miss our friendship which was born and grew from numerous and regular exchanges on topics not limited to this package or -even the \TeX\ world. Let's now continue to «take care and keep motivated» ! +even the \TeX\ world. Let's now continue to \myenquote{take care and keep motivated}! \subsection{\csh{xintreloadxinttrig}}\label{xintreloadxinttrig} @@ -10140,9 +10429,6 @@ as this will have no impact whatsoever on the functions. \vardesc{oneDegree} this is one degree in radian: $\pi/180$ \end{description} -Breaking change at |1.4e|:\CHANGED{1.4e} formerly some variables were -defined to hold the inverse factorials. Not anymore. - \subsection{Functions} \subsubsection{Direct trigonometry} @@ -10326,19 +10612,25 @@ with \xintexprname. This package was first included in release |1.3e| (|2019/04/05|) of \xintexprname. It is automatically loaded by \xintexprname. -At release |1.4e| (|2021/05/05|) it was substantially extended.\CHANGED{1.4e} -Formerly, the functions \func{log10}, \func{pow10}, \func{log}, \func{exp}, -and \func{pow} used at their core \ctanpackage{poormanlog} which is -automatically imported, this limited the precision to about \dtt{8} accurate -digits, but was fast. - -With |1.4e|, the |Digits| range is extended up to \dtt{62} -digits. \ctanpackage{poormanlog} is still used as boot-strap for logarithms, -it is not used at all for exponentials. +At release |1.4e| (|2021/05/05|) it was substantially extended to cover +usage with mantissas of up to \dtt{62} digits. -At |Digits| set to \dtt{8} or less, the old faster but less accurate macros -based on \ctanpackage{poormanlog} are used. +At |Digits| set to \dtt{8} or less, the old faster but less accurate +macros based on \ctanpackage{poormanlog} are used. These macros compute +logarithms and exponentials with about \dtt{8} or \dtt{9} nine digits +of \emph{fixed point} precision. +\begin{TeXnote} + There is thus, for |Digits=8| or less a systematic loss of rounding + precision in the floating point sense for logarithms of inputs close + to \dtt{1}: e.g. |log10(1.0011871)| is produced as |5.15245e-4| which + stands for |0.000515145| having indeed \dtt{9} correct fractional + digits, but only \dtt{6} correct digits in the floating point sense. + Situation is worse for |log()| as it applies a conversion factor and + does not remove the trailing junk digits, which we don't have for + |log10()|. Check |sourcexint.pdf| and \ctanpackage{poormanlog} README + for more info. +\end{TeXnote} \localtableofcontents \subsection{\csh{xintreloadxintlog}}\label{xintreloadxintlog} @@ -10500,12 +10792,6 @@ increase a bit the theoretical accuracy of \csbxint{FloatPower}, as I have not had the time to really measure systematically its pratical accuracy, all anecdotical evidence showing it is good. -\subsection{Deprecated: \csh{poormanloghack}} -\label{ssec:poormanloghack} - -|\poormanloghack| is now a no-op, and will be removed at next major release. - - \clearpage \let\xintlognameUp\undefined \csname xinttoolsnameUp\endcsname @@ -10599,7 +10885,7 @@ expansion text of |\x| to define |\y|, then one can do: |\odef\y{\romannumeral0\expandafter\xintzapfirstspaces\expandafter{\x}}| (one can also define a wrapper macro to |\xintZapFirstSpaces| in order to expand once the argument first, but \xinttoolsname not being a programming -layer, it provides no «Generate Variants» facilities). +layer, it provides no \myenquote{Generate Variants} facilities). Other use case: inside a macro which received a parameter |#1|, one can do |\oodef\x{\xintZapFirstSpaces {#1}}|, or, if |#1|, after leading spaces have @@ -10882,7 +11168,7 @@ then |\xintNthElt| produces empty contents. \label{xintNthOnePy} \csa{xintNthOnePy\x}\marg{list}\etype{\numx f} gets (expandably) the |x|th -item of the \meta{list}, adding a brace pair if there wasn't one.\NewWith{1.4} +item of the \meta{list}, adding a brace pair if there wasn't one. Attention, items are counted starting at zero. For negative index, behaves as \csbxint{NthElt}. @@ -13248,9 +13534,8 @@ currently this is implemented by using either |\xintifForFirst| or \markboth{\makebox[0pt]{\xintRunningHeader}}{\makebox[0pt]{\xintRunningHeader}} \etocdepthtag.toc {macros} -\addtocontents{toc}{\gdef\string\sectioncouleur{{tocbundlesectioncolor}}} -\addtocontents{toc}{\gdef\string\SKIPSECTIONINTERSPACE{\kern\smallskipamount}} -\renewcommand{\etocaftertochook}{\addvspace{\bigskipamount}} +\addtocontents{toc}{\gdef\string\tocstylesectionbracedcolor{{tocstylebundlesectioncolor}}} +\def\etocaftertochook{\addvspace{\bigskipamount}} \part{The macro layer for expandable computations: \xintcorename, \xintname, \xintfracname, and some extras} @@ -14222,9 +14507,13 @@ others are more annoying as they may pass through unsignaled. In situations such as division by zero, the \TeX{} run will be interrupted with some error message. It conveys some short information on -the cause of the problem, then an optimistic statement about a possible -recovery if the user (in interactive mode) simply hits the |<return>| key.% -\CHANGED{1.4g} +the cause of the problem,% +% +\footnote{The wording of these messages has been last modified at |1.4m|.\CHANGED{1.4m}} +% +then an optimistic statement about a possible +recovery if the user (in interactive mode) simply hits the |<return>| key. +% In non-interactive (|nonstopmode|) the \TeX{} run goes on uninterrupted and the error data will be found in the compilation log. Often, \xintname will fall-back to using a zero value. This is still an experimental feature.% @@ -14249,77 +14538,67 @@ messages, even though it runs (a priori, but not necessarily) under Plain >>> 1/0; Runaway argument? ! xint error: Division by zero: 1/0. -! Paragraph ended before \romannumeral (or \expanded, - \numexpr, ...) expansion could produce its final output. - See above the exception specifics. - xint will try to recover (if in interactive mode, hit <return> - at the ? prompt) and will go ahead hoping repair was complete. +! Paragraph ended before \xint<...> is done, but will resume: + hit <return> at the ? prompt to try fixing the error above + which has been encountered before expansion was complete. <to be read again> \par ... -l.491 \xintsession +l.602 \xintsession \endinput%^^M ? @_1 0 >>> (-1)^3.2; Runaway argument? ! xint error: Fractional power 32/1[-1] of negative -1[0]. -! Paragraph ended before \romannumeral (or \expanded, - \numexpr, ...) expansion could produce its final output. - See above the exception specifics. - xint will try to recover (if in interactive mode, hit <return> - at the ? prompt) and will go ahead hoping repair was complete. +! Paragraph ended before \xint<...> is done, but will resume: + hit <return> at the ? prompt to try fixing the error above + which has been encountered before expansion was complete. <to be read again> \par ... -l.491 \xintsession +l.602 \xintsession \endinput%^^M ? @_2 0 >>> cos 1); Runaway argument? ! xint error: `cos1' unknown, say `Isome_var' or I use 0. -! Paragraph ended before \romannumeral (or \expanded, - \numexpr, ...) expansion could produce its final output. - See above the exception specifics. - xint will try to recover (if in interactive mode, hit <return> - at the ? prompt) and will go ahead hoping repair was complete. +! Paragraph ended before \xint<...> is done, but will resume: + hit <return> at the ? prompt to try fixing the error above + which has been encountered before expansion was complete. <to be read again> \par ... -l.491 \xintsession +l.602 \xintsession \endinput%^^M ? Runaway argument? ! xint error: Extra ) removed. Hit <return>, fingers crossed. -! Paragraph ended before \romannumeral (or \expanded, - \numexpr, ...) expansion could produce its final output. - See above the exception specifics. - xint will try to recover (if in interactive mode, hit <return> - at the ? prompt) and will go ahead hoping repair was complete. +! Paragraph ended before \xint<...> is done, but will resume: + hit <return> at the ? prompt to try fixing the error above + which has been encountered before expansion was complete. <to be read again> \par ... -l.491 \xintsession +l.602 \xintsession \endinput%^^M ? @_3 0 >>> 3=4; Runaway argument? ! xint error: Expected an operator but got `='. Ignoring. -! Paragraph ended before \romannumeral (or \expanded, - \numexpr, ...) expansion could produce its final output. - See above the exception specifics. - xint will try to recover (if in interactive mode, hit <return> - at the ? prompt) and will go ahead hoping repair was complete. +! Paragraph ended before \xint<...> is done, but will resume: + hit <return> at the ? prompt to try fixing the error above + which has been encountered before expansion was complete. <to be read again> \par ... -l.491 \xintsession +l.602 \xintsession \endinput%^^M ? @_4 12 ->>> +>>> &bye \end{everbatim} In the last example, tacit multiplication was applied as \xintexprname was @@ -14358,7 +14637,7 @@ miscellany regarding control sequence names and catcode matters and is basically in its entirety a \begin{TeXnote} \begin{itemize} -\item The bundle packages %\CHANGED{1.4} +\item The bundle packages force the |\space| and |\empty| control sequences into having their default meanings as in Plain \TeX{} or \LaTeX2e formats. @@ -14366,17 +14645,11 @@ basically in its entirety a |\toks|) have names starting with |\xint_| or |\XINT_|. Some, for legacy or technical reasons, have |\xint| or |\XINT| prefix with no underscore. \item All public macros have their names starting with |\xint| except for: - \begin{itemize} - \item the \xintkernelname provided \hyperref[odef]{|\odef|}, + the \xintkernelname provided \hyperref[odef]{|\odef|}, \hyperref[oodef]{|\oodef|}, \hyperref[fdef]{|\fdef|}. If macros with these names already exist \xinttoolsname will not overwrite them. Their meanings are also available under the names \csbxint{odef}, \csbxint{oodef}, etc... - \item deprecated |\thexintexpr| etc..., which will be removed at next major - release. Use \csbxint{theexpr} etc... rather. - \item deprecated |\poormanloghack| which is now a no-op and will be removed - at next major release. - \end{itemize} \item Whether in arguments of \xintfracname macros or inside \csbxint{expr}essions active characters will cause naturally problems, one @@ -14440,7 +14713,7 @@ At loading time the \label{ssec:origins} |2013/03/28.| Package |bigintcalc| by \textsc{Heiko Oberdiek} already -provides expandable arithmetic operations on «big integers», i.e. integers +provides expandable arithmetic operations on \myenquote{big integers}, i.e. integers beyond the \TeX\ bound $2^{31}-1$, so why another% % \footnote{this section was written before the \xintfracname package; the @@ -14603,7 +14876,7 @@ which first \fexpan ds its argument and then applies the same code. \csa{xintFirstItem}\marg{list}\etype{n} returns the first item of its argument, one pair of braces removed. If the list has no items the output is -empty.\NewWith{1.4} +empty. It does no expansion. For this and the next similar ones, see |sourcexint.pdf| for comments on limitations. @@ -14628,7 +14901,7 @@ argument first. \csa{xintFirstOne}\marg{list}\etype{n} returns the first item as a braced item. i.e.\@ if it was braced the braces are kept, else the braces are added. It looks like using \csbxint{FirstItem} within braces, but the difference is -when the input was empty. Then the output is empty.\NewWith{1.4} +when the input was empty. Then the output is empty. It does no expansion, which should be obtained via suitable |\expandafter|'s. @@ -14638,7 +14911,7 @@ It does no expansion, which should be obtained via suitable |\expandafter|'s. \csa{xintLastOne}\marg{list}\etype{n} returns the last item as a braced item. i.e.\@ if it was braced the braces are kept, else the braces are added. It looks like using \csbxint{LastItem} within braces, but the -difference is when the input was empty. Then the output is empty.\NewWith{1.4} +difference is when the input was empty. Then the output is empty. It does no expansion, which should be obtained via suitable |\expandafter|'s. @@ -14653,7 +14926,7 @@ copied over from \LaTeX3's |\prg_replicate:nn| with some minor changes.% available on an online site.} And \csa{xintReplicate}|{x}| integrates the -\csa{romannumeral} prefix.\NewWith{1.4} +\csa{romannumeral} prefix. It does not do any expansion of its second argument but inserts it in the upcoming @@ -14673,7 +14946,7 @@ written in the spirit of \LaTeX3's |\prg_replicate:nn| (which I cloned as \csbxint{replicate}.) It gobbles |x| tokens upstream, with |x| allowed to be as large as \dtt{531440}. Don't use it with |x<0|. -And \csa{xintGobble}|{x}| integrates the \csa{romannumeral}.\NewWith{1.4} +And \csa{xintGobble}|{x}| integrates the \csa{romannumeral}. \csbxint{gobble} looks as if it must be related to \csbxint{Trim} from @@ -14708,7 +14981,7 @@ negative. For the discussion next, |x| is supposed positive as this avoids having to insert absolute values in formulas. The underlying engine Random Number Generator works with an array of 55 28bits -integers. To produce a « uniform » random integer in a given range +integers. To produce a \myenquote{uniform} random integer in a given range \dtt{0..x-1} it produces next pseudo-random |y| (supposedly uniformly distributed, i.e.\@ non-uniformity can be neglected) such that \dtt{$0\leq y < 2^{28}$} and the output is the rounding of \dtt{$x*(y/2^{28})$}, with upper @@ -14744,7 +15017,7 @@ The engine primitive guarantees only \dtt{$x/2^{28}$} relative non-uniformity, a a factor \dtt{|2^{28}=|\number"10000000}: the non-uniformity is guaranteed to be bounded by \dtt{$x/2^{56}$}.% % -\expandafter\footnote\expandafter{\ifnum\value{footnote}=55 This «56» is proof +\expandafter\footnote\expandafter{\ifnum\value{footnote}=55 This \myenquote{56} is proof of existence of devil, no? \fi These estimates assume that the engine RNG underlying stream of 28-bits integers can be considered uniform; it is known that the parity bits of these 28-bits integers have a period of |55(2^{55}-1)| and @@ -14917,27 +15190,6 @@ strict integer format on output, except:\IMPORTANT input and which truncates them to integers. \end{itemize} -% Most removed macros listed in \autoref{ssec:coredeprecated} were by design -% applying \csbxint{Num} to their inputs. Typically these macros had a single -% |i| in their names, for example \csa{xintiAdd} was such a companion to -% \csa{xintiiAdd}. \xintfracname redefined \csbxint{Num} to be the macro -% accepting general fractional input and truncating it to an integer. Hence a -% macro such as \csa{xintiAdd} was compatible with the output format of -% \xintfracname macros, contrarily to \csbxint{iiAdd} which handles only strict -% integer format for its inputs. Of course, \xintfracname defined also its own -% \csbxint{Add} which did the addition of its arguments without truncating them -% to integers... but whose output format is the |A/B[N]| format explained in -% \autoref{ssec:outputs}, hence even if representing a small integer it can not -% be used directly in a \TeX\ context such as |\ifnum|, contrarily to -% \csa{xintiAdd} or to \csbxint{iiAdd}. - -% \begin{framed} -% This situation was the result of some early-on design -% decisions which now appear misguided and impede further development. Hence, -% at |1.2o| it has been decided to deprecate \emph{all} such |i|-macros. And -% they got removed from the package at |1.3|. -% \end{framed} - The |ii| in the names of the macros such as \csbxint{iiAdd} serves to stress that they accept only strict integers as input (this is signaled by the margin annotation \textcolor[named]{PineGreen}{\emph{f}}), or macros \fexpan ding to @@ -14948,11 +15200,6 @@ Other macros, such as \csbxint{Double}, lack the |ii|, but this is only a legacy of the history of the package and they have the same requirements for input and format of output as the |ii|-macros. -% -% % -% \footnote{Regarding \csbxint{FDg} and \csbxint{LDg}, this is a breaking change -% because formerly they used \csbxint{Num}.} - The letter \texttt{x} (with margin annotation \smash{\textcolor[named]{PineGreen}{\numx}}) stands for an argument which will be handled embedded in |\numexpr..\relax|. It will thus be completely expanded @@ -15188,31 +15435,6 @@ retained as \csa{xintiiModTrunc}. more general inputs. It then becomes an alias to \csbxint{TTrunc} which truncates the general input to an integer in strict format. -% \subsection{Removed macros}\label{ssec:coredeprecated} - -% These macros were deprecated at |1.2o| and removed at |1.3|. -% |\xintiiFDg| (renamed to \csbxint{FDg}), -% |\xintiiLDg| (renamed to \csbxint{LDg}), -% |\xintiOpp|, -% |\xintiAbs|, -% |\xintiAdd|, -% |\xintCmp| (it gets defined by \xintfracname, so deprecation will usually not be -% seen; the macro with this name from former \xintcorename should have been -% called |\xintiCmp| actually), -% |\xintSgn| (it also gets its proper definition from \xintfracname), -% |\xintiSub|, -% |\xintiMul|, -% |\xintiDivision|, -% |\xintiQuo|, -% |\xintiRem|, -% |\xintiDivRound|, -% |\xintiDivTrunc|, -% |\xintiMod|, -% |\xintiSqr|, -% |\xintiPow|, -% |\xintiFac|. - - \clearpage \let\xintcorenameUp\undefined \csname xintnameUp\endcsname @@ -15237,7 +15459,7 @@ Only the \csbxint{iiSum}, \csbxint{iiPrd}, \csbxint{iiSquareRoot}, macros from \xintcorename. (\csbxint{iiFac} which computes factorials is already in \xintcorename.) -With the exception of \csbxint{Len}, of the «Boolean logic macros» (see +With the exception of \csbxint{Len}, of the \myenquote{Boolean logic macros} (see next paragraphs) all macros require inputs being integers in strict format, see \autoref{ssec:inputs}.% % \footnote{of @@ -15257,8 +15479,8 @@ defines a similar one without |ii| in its name. This will handle more general inputs: decimal, scientific numbers, fractions. The |ii| macros provided here by \xintname can be nested inside macros of \xintfracname but the opposite does not apply, because the output format of the \xintfracname macros, even -for representing integers, is not understood by the |ii| macros. The «Boolean -macros» \csbxint{AND} etc...\@ are exceptions though, they work fine if served +for representing integers, is not understood by the |ii| macros. The \myenquote{Boolean +macros} \csbxint{AND} etc...\@ are exceptions though, they work fine if served as inputs some \xintfracname output, despite doing only \fexpan sion. Prior to |1.2o|, these macros did apply the \csbxint{Num} or the more general \xintfracname general parsing, but this overhead was @@ -15410,7 +15632,6 @@ simultaneously. |\xintiiNotEq|\n\m\etype{ff} returns 0 if |N=M|, 1 otherwise. - \subsection{\csh{xintiiGeq}}\label{xintiiGeq} |\xintiiGeq|\n\m\etype{ff} returns 1 if the \emph{absolute value} @@ -15744,15 +15965,15 @@ is a synonym for \csbxint{iiifNotZero}. Note 1: as it does only \fexpan sion on its argument it fails with inputs such as |--0|. But with \xintfracname loaded, it does work fine if nested with other \xintfracname macros, because the output format of such macros is fine -as input to \csbxint{iiifNotZero}. This remark applies to all other «Boolean -logic» macros next. +as input to \csbxint{iiifNotZero}. This remark applies to all other \myenquote{Boolean +logic} macros next. Note 2: prior to |1.2o| this macro was using \csbxint{ifNotZero} which applies \csbxint{Num} to its argument (or gets redefined by \xintfracname to handle general decimal numbers or fractions). Hence it would have worked with input such as |--0|. But it was decided at |1.2o| that the -overhead was not worth it. The same remark applies to the other «Boolean -logic» type macros next. +overhead was not worth it. The same remark applies to the other \myenquote{Boolean +logic} type macros next. \subsection{\csh{xintifFalseAelseB}} \label{xintifFalseAelseB} @@ -15769,7 +15990,6 @@ logic» type macros next. {\small |\xintiiiszero| serves as lowercase companion macro.\par} - \subsection{\csh{xintAND}}\label{xintAND} |\xintAND{f}{g}|\etype{ff} returns \dtt{1} if |f!=0| and |g!=0| and \dtt{0} @@ -15868,58 +16088,6 @@ fractions. \xintfracname loaded its meaning is \hyperref[xintLenFrac]{modified} to accept more general inputs. -% \subsection{Removed macros (they require \xintfracname)}\label{ssec:xintdeprecated} - -% These macros now require \xintfracname. They have been removed from \xintname -% at |1.3|. -% |\xintEq|, -% |\xintNeq|, -% |\xintGeq|, -% |\xintGt|, -% |\xintLt|, -% |\xintGtorEq|, -% |\xintLtorEq|, -% |\xintIsZero|, -% |\xintIsNotZero|, -% |\xintIsOne|, -% |\xintOdd|, -% |\xintEven|, -% |\xintifSgn|, -% |\xintifCmp|, -% |\xintifEq|, -% |\xintifGt|, -% |\xintifLt|, -% |\xintifZero|, -% |\xintifNotZero|, -% |\xintifOne|, -% |\xintifOdd|. - -% With the exception of |\xintNeq| which was renamed to |\xintNotEq|, the above -% listed macros all belong to \xintfracname. - -% At |1.4|, these macros formerly available via \xintgcdname have been moved to -% \xintfracname as well. -% |\xintGCD|, -% |\xintLCM|, -% |\xintGCDof|, -% |\xintLCMof|. - -% \subsection{Removed macros (they used \csh{xintNum})}\label{ssec:xintdeprecatedNum} - -% These macros filtered their arguments via \csbxint{Num}. They got deprecated -% at |1.2o| and removed at |1.3|: -% |\xintMON|, -% |\xintMMON|, -% |\xintiMax|, -% |\xintiMin|, -% |\xintiMaxof|, -% |\xintiMinof|, -% |\xintiSquareRoot|, -% |\xintiSqrt|, -% |\xintiSqrtR|, -% |\xintiBinomial|, -% |\xintiPFactorial|. - \subsection{(WIP) \csh{xintRandomDigits}}\label{xintRandomDigits} \begin{framed} @@ -16086,10 +16254,10 @@ special, for example \csbxint{Trunc} produces decimal numbers, \csbxint{Irr} produces an |A/B| with no |[N]|, \csbxint{iTrunc} and \csbxint{iRound} produce integers without trailing |[N]| either, etc\dots -At |1.4g|,\CHANGED{1.4g} old legacy typesetting macros |\xintFrac|, |\xintSignedFrac|, +At |1.4g|, old legacy typesetting macros |\xintFrac|, |\xintSignedFrac|, |\xintFwOver| and |\xintSignedFwOver| were renamed into \csbxint{TeXFrac}, \csbxint{TeXsignedFrac}, \csbxint{TeXOver}, \csbxint{TeXsignedOver}. The old -names will raise warnings and will be removed at next major release. +names will raise errors\CHANGED{1.4m} and will be removed completely soon. \localtableofcontents @@ -16097,17 +16265,17 @@ names will raise warnings and will be removed at next major release. Experimental.\xtype{} This typesetting math-mode-only macro expects an input which is already in, or will expand to, decimal or scientific -notation.\NewWith{1.4g} A trailing |/B| is accepted and will be handled +notation. A trailing |/B| is accepted and will be handled differently according to whether it follows some scientific exponent |eN| part or not. -It was formerly |\xintTeXfromSci|. Old name deprecated. Also it used +It was formerly |\xintTeXfromSci|. Old name deprecated at |1.4l|. Also it used to be \fexpan dable but is now only \xexpan dable. Use |\expanded| if -needed.\CHANGED{1.4l} +needed. This macro can be used as a typesetting wrapper for \csbxint{eval} or \csbxint{floateval} output: it expects its input (after expansion) to -have been already «prettified» for example via the removal of trailing +have been already \myenquote{prettified} for example via the removal of trailing zeros, usage of fixed point notation if scientific exponent is small, etc\dots\ % @@ -16166,8 +16334,8 @@ simply by a customization of \csbxint{PFloatE} like this: $\xintfloateval{1.1^10000/5}$, $\xinteval{1.1^10000/5}$ \endgroup\newline \end{everbatim*}% -This method is simpler-minded but will leave the trailing |/B|'s «as -is», even if the numerator has no scientific exponent part. The +This method is simpler-minded but will leave the trailing |/B|'s \myenquote{as +is}, even if the numerator has no scientific exponent part. The presence of extra \TeX\ mark-up in the output has the consequences on nesting which were mentioned above. @@ -16189,8 +16357,8 @@ ten part. Macros such as \csbxint{Irr}, \csbxint{PIrr}, \csbxint{REZ} can be inserted to wrap the input and help simplify it. The minus sign ends up in the numerator. -It is the new name of |\xintFrac|.\CHANGED{1.4g} The old name is -deprecated and will emit a warning. +It is the new name since |1.4g| of |\xintFrac|. The old name now raises +a \TeX{} error.\CHANGED{1.4m} \subsection{\csh{xintTeXsignedFrac}}\label{xintTeXsignedFrac} @@ -16200,7 +16368,8 @@ sign ending up in front, not in the numerator. \begin{everbatim*} $\xintTeXFrac {-355/113}=\xintTeXsignedFrac {-355/113}$\newline \end{everbatim*}% -It is the new name of |\xintSignedFrac|.\CHANGED{1.4g} +It is the new name since |1.4g| of |\xintSignedFrac|. The old name now raises +a \TeX{} error.\CHANGED{1.4m} \subsection{\csh{xintTeXOver}}\label{xintTeXOver} @@ -16211,7 +16380,8 @@ pair of braces contains the |A\over B| part). $\xintTeXOver {178.000/25600000}$, $\xintTeXOver {178.000/1}$, $\xintTeXOver {3.5/5.7}$\newline \end{everbatim*}% -It is the new name of |\xintFwOver|.\CHANGED{1.4g} +It is the new name since |1.4g| of |\xintFwOver|. The old name now raises +a \TeX{} error.\CHANGED{1.4m} \subsection{\csh{xintTeXsignedOver}}\label{xintTeXsignedOver} @@ -16220,7 +16390,8 @@ sign put in front, not in the numerator. \begin{everbatim*} $\xintTeXOver{-355/113}=\xintTeXsignedOver{-355/113}$\newline \end{everbatim*}% -It is the new name of |\xintSignedFwOver|.\CHANGED{1.4g} +It is the new name since |1.4g| of |\xintSignedFwOver|. The old name now raises +a \TeX{} error.\CHANGED{1.4m} \subsection{\csh{xintLen}}\label{xintLenFrac} @@ -16276,7 +16447,7 @@ denominator: This macro expands and parses its input\etype{\Ff} |f| as all \xintfracname macros and produces as output |{N}{A}{B}| (with \TeX\ -braces) where \csbxint{Raw} would have returned |A/B[N]|.\NewWith{1.4l} +braces) where \csbxint{Raw} would have returned |A/B[N]|. \subsection{\csh{xintNumerator}}\label{xintNumerator} @@ -16396,7 +16567,7 @@ from removing the |[N]| part if |N=0| and removing the |B| if |B=1|. \csa{xintDecToStringREZ}\etype{\Ff} uses fixed point (decimal) notation for the output. The |REZ| means that it trims (REmoves) trailing Zeros. The name -is a bit strange, because\NewWith{1.4e} it its not limited to +is a bit strange, because it its not limited to \emph{decimal numbers} but accepts the same kind of inputs as most other \xintfracname macros. The parsing of this input transforms it first into an internal format having a numerator |A|, a denominator |B| and a @@ -16462,7 +16633,7 @@ remove trailing zeros, in fact \csbxint{DecToStringREZ}|{f}| is defined as \xintDecToString{70/14} \end{everbatim*} -Since |1.4e|\CHANGED{1.4e}, \csbxint{DecToString} is the default for +Since |1.4e|, \csbxint{DecToString} is the default for \csbxint{iexprPrintOne}, which governs the \csbxint{ieval} output format: in this use case there is never a |/B| fractional part and the output is always either an integer (if \csbxint{ieval} was used without optional argument) or a @@ -16487,8 +16658,8 @@ at user level (not being \fexpan dable it could not be nested within macros of \xintfracname, and besides accepted a limited range of inputs). -It has now been upgraded to behave like all other \xintfracname -macros.\CHANGED{1.4l} +It has been upgraded at |1.4l| to behave like all other \xintfracname +macros. Here is what it does: \begin{itemize}[noitemsep,nosep] @@ -16514,7 +16685,7 @@ Please note: |5|'s and thus could be integrated into some pure decimal notation for the numerator or at least its significand. \end{itemize} -Changes\CHANGED{1.4k} of \csbxint{PFloat} at |1.4k| have an impact here. +Changes of \csbxint{PFloat} at |1.4k| have an impact here. In particular the zero value will give \dtt{0} whether the input was some |0|, |0e-5|, |0/3|, |0.00|, etc\dots, whereas at |1.4e| it would have been \dtt{0.0} for cases triggering some \csbxint{PFloat} @@ -16535,7 +16706,7 @@ The output routine of \csbxint{eval} is customizable via redefining differs from it in so far as it outputs a numerator using decimal notation, i.e. with as many zeros as are needed (and no more) and no scientific exponent. The denominator goes through ``as is'' except if it is |1|, then it -is omitted.\NewWith{1.4k} +is omitted. In other terms its behaviour is currently intermediate between \csbxint{DecToString} and \csbxint{DecToStringREZ}, as it does not @@ -16553,8 +16724,8 @@ despite being documented in the user manual, was not supposed to be used at user level (not being \fexpan dable it could not be nested within macros of \xintfracname, and besides accepted a limited range of inputs). -It has now been upgraded to behave like all other \xintfracname -macros.\CHANGED{1.4l} +It has been upgraded at |1.4l| to behave like all other \xintfracname +macros. \subsection{\csh{xintTrunc}}\label{xintTrunc} @@ -16564,7 +16735,7 @@ expansion of the fraction |f|, truncated to: \begin{itemize} \item if |x>0|, |x| digits after the decimal mark, \item if |x=0|, an integer, -\item if |x<0|, an integer multiple of |10^{-x}| (in scientific notation).\NewWith{1.4a} +\item if |x<0|, an integer multiple of |10^{-x}| (in scientific notation). \end{itemize} The output is the sole digit token \dtt{0} if and only if the input was exactly zero; else it contains always either a decimal mark (even if |x=0|) or a @@ -16796,7 +16967,7 @@ expansion of the fraction |f|, rounded to: \begin{itemize} \item if |x>0|, |x| digits after the decimal mark, \item if |x=0|, an integer, -\item if |x<0|, an integer multiple of |10^{-x}| (in scientific notation).\NewWith{1.4a} +\item if |x<0|, an integer multiple of |10^{-x}| (in scientific notation). \end{itemize} The output is the sole digit token \dtt{0} if and only if the input was exactly zero; else it contains always either a decimal mark (even if |x=0|) or @@ -16899,7 +17070,6 @@ For choosing branches according to the result of comparing |f| and |g|, see |\xintNotEq{f}{g}|\etype{\Ff\Ff} returns 0 if |f=g|, 1 otherwise. - \subsection{\csh{xintGeq}}\label{xintGeq} This\etype{\Ff\Ff} compares the \emph{absolute values} of two @@ -17136,7 +17306,7 @@ Computes the square\etype{\Ff} of one fraction. and the exponent |x| possibly also, but if only \xintfracname is loaded it will be truncated to an integer. -At |1.4e|\CHANGED{1.4e} the behaviour of the macro is enhanced if +At |1.4e| the behaviour of the macro is enhanced if \xintexprname is loaded, at it then becomes the support macro for powers |a^b|, |a**b| (and the \func{pow} function) in \csbxint{eval}: it now handles also non-integer exponents. Also, if the exponent is an integer, it @@ -17152,7 +17322,7 @@ however |2.0| will be recognized as an integer, as of course |2|. If the exponent is considered an integer it is then checked if it is less than \dtt{10000} (in absolute value) and if the output would contain less than \dtt{10000} digits (separately for numerator and denominator) and only -then\CHANGED{1.4e} is the power computed exactly. Else it is computed as by +then is the power computed exactly. Else it is computed as by \csbxint{FloatPower} (but the output uses raw |A[N]| format not scientific notation). Use \csbxint{iiPow} (on integers only, not fractions) for exact powers with larger exponents. @@ -17160,12 +17330,12 @@ powers with larger exponents. Also, a check is done whether the exponent is half-integer. Again this check is not on the value but on the format, so |2.5| is an half integer, as is |25e-1|, or |2.50| but |5/2| is not considered an half-integer (for reasons of -internal efficiency). If the exponent is half-integer\CHANGED{1.4e} the power +internal efficiency). If the exponent is half-integer the power is computed by combining suitably \csbxint{FloatPower} with \csbxint{FloatSqrt} (but the output uses raw |A[N]| format not scientific notation). If the exponent is neither an integer nor an half-integer, the power is -computed using\CHANGED{1.4e} logarithm and exponential based approach (and uses raw |A[N]| +computed using logarithm and exponential based approach (and uses raw |A[N]| output format). If |Digits| is at most \dtt{8} (which triggers \ctanpackage{poormanlog} usage, for very fast logarithms but only with about \dtt{8} or \dtt{9} accurate fractional digits) this will start being @@ -17193,7 +17363,6 @@ This is a convenience variant of \csbxint{iiFac} which applies \csbxint{Num} to its argument\etype{\Numf}. Notice however that the output will have a trailing |[0]| according to the \xintfracname format for integers. - \subsection{\csh{xintBinomial}}\label{xintBinomial} This is a convenience variant of \csbxint{iiBinomial} which applies @@ -17201,7 +17370,6 @@ This is a convenience variant of \csbxint{iiBinomial} which applies output will have a trailing |[0]| according to the \xintfracname format for integers. - \subsection{\csh{xintPFactorial}}\label{xintPFactorial} This is a convenience variant of \csbxint{iiPFactorial} which applies @@ -17209,7 +17377,6 @@ This is a convenience variant of \csbxint{iiPFactorial} which applies output will have a trailing |[0]| according to the \xintfracname format for integers. - \subsection{\csh{xintMax}}\label{xintMax} The maximum of two fractions.\etype{\Ff\Ff} Beware that |\xintMax {2}{3}| @@ -17426,7 +17593,7 @@ lower case |e| and an exponent |N|. The trailing zeroes are not trimmed. \begin{framed} There is one exception to the general description: the zero value, which - gets output as \dtt{\xintFloat{0}}.\CHANGEDf{1.4k} This was changed at + gets output as \dtt{\xintFloat{0}}. This was changed at |1.4k|, until then it was using \dtt{0.e0} as output. Customize via \csh{xintFloatZero} whose default definition is: \begin{everbatim} @@ -17484,7 +17651,7 @@ The experimental macro |\xintFloatBraced[P]{f}|\etype{{\upshape[\numx]}\Ff} does like \csbxint{Float} but its output consists of three \TeX-braced groups \centeredline{\marg{sign bit}\marg{scientific exponent}\marg{full width - mantissa with decimal point}} It is provided\NewWith{1.4l} for users + mantissa with decimal point}} It is provided for users knowing how to pick one or the other of these constituents from usage of auxiliary macros. Or one can use \csbxint{Assign}: \begin{everbatim*} @@ -17514,7 +17681,7 @@ Some aspects are undecided: |\xintFloatToDecimal [P]{f}|\etype{{\upshape[\numx]}\Ff} does float rounding on input like \csbxint{Float} then outputs the number using decimal notation, i.e. with as many zeros as are needed (and no more) and no scientific -exponent.\NewWith{1.4k} +exponent. In other terms it behaves (and is essentially defined) as: \begin{everbatim} @@ -17544,7 +17711,7 @@ behaviour: mantissas trimmed of trailing zeros (whether or not scientific notation was used in the output) and integers printed with a trailing "\dtt{.0}", in particular the zero value was printed as "\dtt{0.0}". -|1.4k|\CHANGED{1.4k} brings some breaking changes, which are reversible +|1.4k| brought some breaking changes, which are reversible via customizing macros: \begin{itemize} \item Integers (when scientific notation is dropped according to @@ -17571,13 +17738,13 @@ These changes impact the \csbxint{floateval} output as The default rules are thus now: \begin{enumerate}[nolistsep] \item The input is float-rounded to either |Digits| or the optional argument. -\item zero is printed as \dtt{\xintPFloat{0}}.\CHANGED{1.4k} +\item zero is printed as \dtt{\xintPFloat{0}}. \item \dtt{x.yz...eN} is printed in decimal fixed point if $-4\leq\text{|N|}\leq+5$ else it is printed in scientific notation. \item Trailing zeros of the mantissa are trimmed if, and only if there are at least \dtt{4} - of them.\CHANGED{1.4k} + of them. \item In case of fixed point output format, and the value is an integer, the - integer is printed with no decimal mark.\CHANGED{1.4k} + integer is printed with no decimal mark. \item In case of scientific notation output format, and the mantissa has only one digit, no decimal mark is used. \end{enumerate} @@ -17592,8 +17759,6 @@ The default rules are thus now: % \item and there is no trimming of trailing zeroes. % \end{enumerate} -% At |1.4e|, there is breaking change\CHANGED{1.4e}. The new rules are: - \begingroup\color{everbatimxfgcolor} \begin{multicols}2 \def\test #1{\item #1${}\to{}$\xintPFloat{#1}}% @@ -17623,25 +17788,25 @@ The default rules are thus now: A number of macros allow to customize the behaviour of \csbxint{PFloat}: \begin{itemize} -\item \csa{xintPFloatE}\NewWith{1.4b} allows to modify the separator of the +\item \csa{xintPFloatE} allows to modify the separator of the scientific notation. Here is its default: % \footnote{For \TeX perts: it is allowed to define \csa{xintPFloatE} as a macro which grabs the exponent as an argument delimited by a dot, and produces \fexpan dably an output also delimited by - a dot (it will removed via further internal processing).\NewWith{1.4e}} + a dot (it will removed via further internal processing).} % \begin{everbatim} \def\xintPFloatE{e} \end{everbatim} -\item \csa{xintPFloatZero}\NewWith{1.4k} says how to print the zero value. +\item \csa{xintPFloatZero} says how to print the zero value. The default: \begin{everbatim} \def\xintPFloatZero{0} \end{everbatim} -\item \csa{xintPFloatIntSuffix}\NewWith{1.4k} is postfixed to integer values +\item \csa{xintPFloatIntSuffix} is postfixed to integer values (when scientific notation is not used). Its default at |1.4k| is to add nothing. It replaces the formerly hard-coded "\dtt{.0}" from |1.4e| (prior to that trailing zeros from the full significand of |P| or @@ -17650,7 +17815,7 @@ A number of macros allow to customize the behaviour of \csbxint{PFloat}: \def\xintPFloatIntSuffix{} \end{everbatim} -\item \csa{xintPFloatLengthOneSuffix}\NewWith{1.4k} is postfixed to trimmed +\item \csa{xintPFloatLengthOneSuffix} is postfixed to trimmed mantissas having only one digit, when scientific notation is used. Its default at |1.4k| is to add nothing. It replaces formerly hard-coded "\dtt{.0}". @@ -17658,7 +17823,7 @@ A number of macros allow to customize the behaviour of \csbxint{PFloat}: \def\xintPFloatLengthOneSuffix{} \end{everbatim} -\item \csa{xintPFloatNoSciEmax}\NewWith{1.4k} is the maximal scientific exponent +\item \csa{xintPFloatNoSciEmax} is the maximal scientific exponent which will trigger use of decimal fixed point notation and \csa{xintPFloatNoSciEmin} is the minimal one. Their defaults at |1.4k| are the same as the formerly hard-coded behaviour from |1.4e|: @@ -17679,7 +17844,7 @@ A number of macros allow to customize the behaviour of \csbxint{PFloat}: \endgroup \end{everbatim*} -\item \csa{xintPFloatMinTrimmed}\NewWith{1.4k} is the minimal number +\item \csa{xintPFloatMinTrimmed} is the minimal number of trailing zeros which have to be present to activate actual trimming. The default definition is: \begin{everbatim} @@ -17690,7 +17855,7 @@ trailing zeros always, and setting it to a value at least equal to |P| (or \csbxint{theDigits} if no |[P]|) will prevent it altogether. -This setting\CHANGED{1.4l} is ignored for the case of an integer value, if the +This setting is ignored for the case of an integer value, if the criteria for using fixed point notation are met, and for the case of a one-digit mantissa in scientific notation. @@ -18299,13 +18464,13 @@ But this will always reproduce the initial input zero-filled to length 4N: \xintCHexToBin{\xintBinToHex{0001111}}\par \end{everbatim*} Another example (visible space characters manually inserted):\newline -$000000001111101001010001\xrightarrow{\text{\string\xintBinToHex}} +$000000001111101001010001\xrightarrow{\text{\string\xintBinToHex}}%$ \xintBinToHex{000000001111101001010001}\xrightarrow{\text{\string\xintHexToBin\hphantom{X}}} \text{\textvisiblespace\textvisiblespace\textvisiblespace} -\xintHexToBin{\xintBinToHex{000000001111101001010001}}$\newline -$000000001111101001010001\xrightarrow{\text{\string\xintBinToHex}} +\xintHexToBin{\xintBinToHex{000000001111101001010001}}$\newline%$ +$000000001111101001010001\xrightarrow{\text{\string\xintBinToHex}}%$ \xintBinToHex{000000001111101001010001}\xrightarrow{\text{\string\xintCHexToBin}} -\xintCHexToBin{\xintBinToHex{000000001111101001010001}}$ +\xintCHexToBin{\xintBinToHex{000000001111101001010001}}$%$ \par \clearpage @@ -18919,6 +19084,7 @@ Perhaps in the next package release. \def\f {-1/2[0]}% \newcount\cnta +\edef\foo{\the\multicolsep} \setlength{\multicolsep}{0pt} \begin{multicols}{3}[% @@ -18930,6 +19096,8 @@ $\xintFxPtPowerSeries {0}{\cnta}{\coeffexp}{\f}{20}$\\ \advance\cnta 1 \repeat\par \end{multicols} +\multicolsep\foo\relax + \everb|@ \def\coeffexp #1{1/\xintiiFac {#1}[0]}% 1/n! \def\f {-1/2[0]}% [0] for faster input parsing @@ -20119,7 +20287,7 @@ $1$ or $-1$. \csname xint bundlename\endcsname}} \part{The \xintexprname and allied packages source code (not - included, see \protect\dtt{sourcexint.pdf})} + included, see \textcolor{verbcolor}{\texttt{sourcexint.pdf}})} \markboth{\makebox[0pt]{\xintRunningHeader}}{\makebox[0pt]{\xintRunningHeader}} \vspace{1cm} @@ -20135,28 +20303,33 @@ $1$ or $-1$. \centeredline{|texdoc sourcexint.pdf|} - To produce a single file |xint-all.pdf| including both the user + To produce a file |xint.pdf| including both the user documentation and the source code: \begin{itemize} \item acquire |xint.dtx| from \centeredline{\url{https://www.ctan.org/tex-archive/macros/generic/xint}} - and optionally the |Makefile| from the same location, - \item execute |etex xint.dtx| to extract files, - \item run |make --file=Makefile.mk xint-all.pdf| + \item execute |latex xint.dtx| sufficiently many times (at least three), then + |dvipdfmx|, or use |pdflatex|. \end{itemize} - The last step can be simplified into |make xint-all.pdf| if the - |Makefile| was downloaded in step one (or extracted |Makefile.mk| - was renamed into |Makefile|). - These steps require not only |make| but also |latexmk|. + For those on Unix-like systems, you can (recommended) alternatively also + download a file |Makefile| from the above location then execute + |make xint-all.pdf|. This requires |latexmk| and will do automatically + the needed number of passes. - See instructions in |xint-all.tex| (which is produced in the second - step) for alternatives without |make| or |latexmk|. + Without the |Makefile| one can first execute |etex| on |xint.dtx| to + extract files then run \centeredline{|make --file=Makefile.mk xint-all.pdf|} - In particular it is possible to execute |latex| (three times may be - enough, then |dvipdfmx|), or |pdflatex|, directly on |xint.dtx|. This - will produce a file |xint.pdf| including both the user manual and the - commented source code. + Other |make| targets include |xint.pdf| (without implementation part) + and |sourcexint.pdf|. Run |make help| for help. Further build + alternatives are explained in extracted file |xint-all.tex|. + + The file\NewWithf{1.4m} with both user manual and implementation (i.e. + either |xint.pdf| from direct runs of |(pdf)latex| on |xint.dtx| or + |xint-all.pdf| if using |make|) will contain hyperlinks from the user + documentation to the implementation part and back. And the macros + inside the code lines are hyperlinked to the location of their + definition. \end{framed} \fi \clearpage @@ -20166,30 +20339,99 @@ $1$ or $-1$. +catcode`\ 0 \catcode0 15 % retour à la normale, peu importe \catcode`\+ 12 -\etocignoredepthtags -\etocsetnexttocdepth{section} -\tableofcontents \makeatletter \@gobble\fi \StopEventually{\end{document}\endinput} -\etocignoredepthtags -\def\MARGEPAGENO{1.25em} -\etocdepthtag.toc {implementation} -\addtocontents{toc}{\gdef\string\sectioncouleur{{tocsectionimpcolor}}} - -\ifnum\dosourcexint=1 - \renewcommand{\etocaftertochook}{\addvspace{\bigskipamount}} - \etocsettocstyle {}{} +\makeatletter +\let\csh\cshnolabel % \clearpage % \newgeometry{%hmarginratio=4:3, % hscale=0.7,vscale=0.75}% ATTENTION \newgeometry fait % % un reset de vscale si on ne le % % précise pas ici !!! + +\AddToHook{env/macrocode/before}{\par@beforemacrocode} +\def\par@beforemacrocode{\par} + +% for \csbxint etc... +\let\xintlabelprefix\xintimplabelprefix + +\def\xintdocMacrocodeFallbackColorCmd{\normalcolor} +\def\xintdocPrivateColorCmd{\color{privatecommentcolor}}% +\def\xintdocPublicColorCmd{\normalcolor} + +% stuff going to .toc file (and hence possibly impacting all TOCs regarding the looks +% of titles originating in the implementation part) +\etocdepthtag.toc {implementation} +\addtocontents{toc}{\gdef\string\tocstylesectionbracedcolor{{tocstylesectionimpcolor}}} + +% reset/set TOC parameters which may have been altered for typesetting the manual +% as we aim to get same layout in sourcexint.pdf and xint-all.pdf. But I have +% not tried to compensate the difference coming from on one hand \maketitle +% and on the other hand \part. I am not *that* of a maniac. +% ...hmm finally yes I am a maniac and I used minipages... +\etocignoredepthtags +\etocsettocstyle {}{} +\inmanualmaintocfalse % already the case anyhow +\let\etocaftertochook\empty +\etocsetnexttocdepth{section} +% make room for some small text on TOC page under the TOC +\def\tocstylesectionVSKIP{\vskip\medskipamount} + +\ifnum\dosourcexint=1 % sourcexint.pdf +\medskip + \tableofcontents + \else - \etocsetnexttocdepth{section} - \part{The \xintexprnameimp and allied packages source code} + \ifnum\NoSourceCode=0 % xint-all.pdf + % reset those two which are used by multicol style (perhaps unneeded) + \let\etocbelowtocskip \orig@etocbelowtocskip + \let\etocinnertopsep \orig@etocinnertopsep + % this one needs to be reset as it is modified for the TOCs of the user + % manual. This way TOCs of Part III will be in xint-all.pdf as in + % sourcexint.pdf + \let\etoctoclineleaders\orig@etoctoclineleaders + \fi + +\bookmark[dest=imp,level=part]{Implementation} + + \begin{minipage}[t][8\baselineskip][c]{\linewidth} + \RaisedTarget{imp} + \part{The \xintexprnameimp and allied packages source code} + \RaisedLabel[15]{partiii} + \end{minipage} +% ne fonctionn pas ici +% \RaisedLabel[15]{partiii} + +% \smash n'est pas \long... mais \smash<space> l'est mais \makesm@sh ne l'est pas +% bon de tout façon plus de \par ici +% \protected à cause du \smash sinon +% ! TeX capacity exceeded, sorry [input stack size=10000]. +% <inserted text> +% \protect \foreignlanguage {english}{\protect \bbl@restore@ac... +% l.97 ...er}}{\makebox[0pt]{\xintImpRunningHeader}} + +% Not using \hypersetup with linkcolor because a few pages are with +% a TOC à cheval on two pages, and my eTOCs are configured to do +% \hypersetup{hidelinks} + \protected\def\DOCxintfrontpage + {\smash{\vbox{\hbox{\perhapshyperref[frontpage]{{\color{xintnamecolor}TOC}}}% + \kern1ex + \hbox{\perhapshyperref[partiii]{{\color{xintnameimpcolor}TOC}}}}}}% +\medskip + \localtableofcontents \fi + +\medskip + +\etocsettocdepth{subsubsection}% 2015/09/15 +% this is a parameter of the custom tocstyling for sections which we +% set to this value only after having typeset the main TOC of sourcexint.pdf +% or TOC of Part III of xint-all.pdf +\def\tocstyleMARGEPAGENO{1.25em} + +% modify the page headers \def\xintImpRunningHeader{{\inheadertrue\catcode`,12\relax \DOCxintfrontpage, \xintkernelnameimp, @@ -20205,47 +20447,276 @@ $1$ or $-1$. \xinttrignameimp, \xintlognameimp}} \markboth{\makebox[0pt]{\xintImpRunningHeader}}{\makebox[0pt]{\xintImpRunningHeader}} -\clearpage +\def\etocaftertochook{\addvspace{\bigskipamount}} -\makeatletter +\section{An introduction and a brief timeline} -\etocsettocdepth{subsubsection}% 2015/09/15 +This is \expandafter|\xintbndlversion| of \expandafter|\xintbndldate|. -\def\storedlinecounts {} -\def\StoreCodelineNo #1{\edef\storedlinecounts{% - \unexpanded\expandafter{\storedlinecounts}% - {{#1}{\the\c@CodelineNo}}}\c@CodelineNo\z@ } +The |CHANGES.html| contains a detailed history of the evolution of the packages: +\centeredline{Internet: + \url{http://mirrors.ctan.org/macros/generic/xint/CHANGES.html}} + +\edef\foo{\columnsep\the\columnsep} +\columnsep5\fontcharwd\font`X\relax +\begin{multicols}{2}\small\raggedcolumns\columnsep9\fontcharwd\font`X\relax + At |1.4m| I added hyperlinks to the macro code. Each instance of a macro + in the code is linked with target the location of its definition (via |\def| + or |\let| or variants). This has been done via a heist on \ctanpackage{doc} + (|v2| version) automated indexing which has been transformed here into + automated hyperlinking. The details are commented upon in the next section. + Furthermore the codeline where the macro is defined will link to its + description in the user manual, if available, inside |xint-all.pdf| which + combines user manual and source code. In |sourcexint.pdf| the link is more + modestly targeting the sectioning heading referencing the macro name, if + available. Again in |xint-all.pdf| the macros documented in the user manual + have a link \emph{source} to their source code. + + The sad truth however is that my code is poorly documented. On two counts: + \begin{itemize}[nosep] + \item scarcity at times, + \item occasional excessive verbosity, + \item generally inadequate or irrelevant contents. + \end{itemize} + The macro comments have had a distinct tendency to record the changes across + releases or even those occurring during pre-release development phase, + rather than explaining the interface, or perhaps an algorithm. As I am + aware of that, I have a mechanism of \myenquote{private comments} which are + removed by the |dtx| build script. But then I sometimes use it en masse as + it would be too much work to clean-up the existing comments, and as a result + the code is not commented at all anymore... A typical example is with + \csbxint{iiSquareRoot} which is amply documented in the private sources but + only 10\% of it could be of any value to any other reader than myself and it + would be simply the description of what |#1|, |#2|, ... stand for. As a + result I converted at some point (perhaps even originally) everything into + private comments. Extracting the useful parts describing the macro + parameters and checking they are actually still valid would be very + time-consuming. The real problem here is that the actual underlying + algorithms are rarely if ever described. But rest assured this is all only + school mathematics anyway. +\end{multicols} +\foo + +%\normalsize + +\begin{itemize} +\item Release |1.4m| of |2022/06/09| is mainly a documentation upgrade, with + proud hyperlinked macros in the code, and various documentation + enhancements. It is also fixing a longstanding incompatibility with + \ctanpackage{miniltx} of which the author was unaware. It also inaugurates + usage of the engine string comparison primitive. +\item Release |1.4i| of |2021/06/11|: extension of the + «simultaneous assignments» concept (backwards compatible). +\item Release |1.4g| of |2021/05/25|: + powers are now parsed in a right associative way. Removal of the + single-character operators |&|, \verb=|=, and |=| (deprecated at |1.1|). + Reformatted expandable error messages. +\item Release |1.4e| of |2021/05/05|: logarithms and exponentials up to 62 + digits, trigonometry still mainly done at high level but with guard digits + so all digits up to the last one included can be trusted for faithful + rounding and high probability of correct rounding. +\item Release |1.4| of |2020/01/31|: \xintexprnameimp overhaul to use + |\expanded| based expansion control. Many new features, in particular + support for input and output of nested structures. Breaking changes, main + ones being the (provisory) drop of |x*[a, b,...]|, |x+[a, b,...]| et al.\@ + syntax and the requirement of |\expanded| primitive (currently required only + by \xintexprnameimp). +\item Release |1.3e| of |2019/04/05|: packages \xinttrignameimp, \xintlognameimp; + \csa{xintdefefunc} ``non-protected'' variant of \csbxint{deffunc} (at |1.4| + the two got merged and \csa{xintdefefunc} became a deprecated alias for + \csbxint{deffunc}). + Indices removed from |sourcexint.pdf|. +% Their functionality is advantageously + % made available via the search function in PDF viewers. Already the local + % tables of contents are useful enough most of the time. +\item Release |1.3d| of |2019/01/06|: fix of |1.2p| bug for division with a + zero dividend and a one-digit divisor, \csbxint{eval} et al. wrappers, + |gcd()| and |lcm()| work with fractions. +\item Release |1.3c| of |2018/06/17|: documentation better hyperlinked, + indices added to |sourcexint.pdf|. Colon in |:=| now optional for + \csbxint{defvar} and \csbxint{deffunc}. +\item Release |1.3b| of |2018/05/18|: randomness related additions (still WIP). +\item Release |1.3a| of |2018/03/07|: efficiency fix of the mechanism for + recursive functions. +\item Release |1.3| of |2018/03/01|: addition and subtraction use + systematically least common multiple of denominators. Extensive + under-the-hood refactoring of \csbxint{NewExpr} and \csbxint{deffunc} which + now allow recursive definitions. Removal of |1.2o| deprecated macros. +\item Release |1.2q| of |2018/02/06|: fix of |1.2l| subtraction bug + in special situation; tacit multiplication extended to cases such as + |10!20!30!|. +\item Release |1.2p| of |2017/12/05|: maps |//| and |/:| to the floored, not + truncated, division. Simultaneous assignments possible with \csbxint{defvar}. + Efficiency improvements in \xinttoolsnameimp. +\item Release |1.2o| of |2017/08/29|: massive deprecations of those macros + from \xintcorenameimp and \xintnameimp which filtered their arguments via + \csbxint{Num}. +\item Release |1.2n| of |2017/08/06|: improvements of \xintbinhexnameimp. +\item Release |1.2m| of |2017/07/31|: rewrite of \xintbinhexnameimp in the + style of the |1.2| techniques. +\item Release |1.2l| of |2017/07/26|: under the hood efficiency improvements + in the style of the |1.2| techniques; subtraction refactored. Compatibility + of most \xintfracnameimp macros with arguments using non-delimited + |\the\numexpr| or |\the\mathcode| etc... +\item Release |1.2i| of |2016/12/13|: under the hood efficiency improvements + in the style of the |1.2| techniques. +\item Release |1.2| of |2015/10/10|: complete refactoring of the core + arithmetic macros and faster \csbxint{expr} parser. +\item Release |1.1| of |2014/10/28|: extensive changes in \xintexprnameimp. + Addition and subtraction do not multiply denominators blindly but sometimes + produce smaller ones. Also with that release, packages \xintkernelnameimp + and \xintcorenameimp got extracted from \xinttoolsnameimp and \xintnameimp. +\item Release |1.09g| of |2013/11/22|: the \xinttoolsnameimp package is + extracted from \xintnameimp; addition of \csbxint{loop} and \csbxint{iloop}. +\item Release |1.09c| of |2013/10/09|: \csbxint{For}, \csa{xintNewNumExpr} + (ancestor of \csbxint{NewExpr}/\csbxint{deffunc} mechanism). +\item Release |1.09a| of |2013/09/24|: support for functions by \xintexprnameimp. +\item Release |1.08| of |2013/06/07|: the \xintbinhexnameimp package. +\item Release |1.07| of |2013/05/25|: support for floating point numbers + added to \xintfracnameimp and first release of the \xintexprnameimp package + (provided + \csbxint{expr} and \csbxint{floatexpr}). +\item Release |1.04| of |2013/04/25|: the \xintcfracnameimp package. +\item Release |1.03| of |2013/04/14|: the \xintfracnameimp and + \xintseriesnameimp packages. +\item Release |1.0| of |2013/03/28|: initial release of the \xintnameimp and + \xintgcdnameimp packages. +\end{itemize} +%\clearpage + +\section{Custom macrocode environment} + +I have always used the monospaced \ctanpackage{newtxtt} typeface, more +precisely its |newtxttz| variant with variable interword spacing and allowed +hyphenation, both for the user manual and for the code comments. But as the +code itself is also rendered with |newtxtt|, naturally using this time the +monospace typeface preventing hyphenation, and with a verbatim rendering +obeying spaces and linebreaks, it is somewhat of an issue to help better +separate visually the comments from the code. I long used a special color +(\textcolor{Purple}{which was Purple for a long time}), not for all code +comments but for those which in the source were inside a custom verbatim +environment% +% +\footnote{I used to employ a Plain \TeX\ mark-up with a macro |\lverb| +(meaning \myenquote{long |\verb|}), but I converted this +into an environment at the time of adding the hacks described next.} +% +which allows free-flowing of horizontal whitespace and soft-wrapping at +linebreaks.% +% +\footnote{Some special mark-up at starts of lines such as +\expandafter|\@percentchar(| and \expandafter|\@percentchar)| serves to +delimit portions where whitespace is obeyed as in regular verbatim.} +% +Using this verbatim rendering spared me the tedious task of +escaping macros or other special characters inside my code comments. + +But other paragraphs of code comments% +% +\footnote{I do employ the standard |dtx| mark-up for such code comments, + i.e. with these comments on lines with a \expandafter|\@percentchar| as + their first character; but the part of |xint.dtx| giving the user manual is + a regular \LaTeX\ document, as this is easier to manage on the long term. + Also the present comments are input as if in a regular \LaTeX\ document.} +% +were typed-in as normal +\LaTeX-markup with occasional usage of the \verb+|+ escape for short verbatim +and some custom |\cs|-type macros enhanced for hyperlinks. +So I ended up in a situation with some paragraphs of code comments all +uniformly colorized (apart from rare hyperlinks allowed by an escape inside) +and others in black containing some colored short verbatim and +some hyperlinks. + +To try to alleviate this I modified my custom verbatim to work with an active +backslash character |\| in order to gather the control sequence name, check if +it corresponds to a labeled reference in the implementation if yes insert the +usage of |\hyperref| to link to it. + + +Those familiar with |doc.sty| will have recognized immediately that it too +activates the |\| in order to insert suitable indexing commands.% +% +\footnote{The |sourcexint.pdf| documentation included automated indices thanks + to by \ctanpackage{doc}, but only during 2018-2019. I felt the indices made + the build process quite longer, produced very big PDFs and, in view of the + capabilities of the modern \textcolor{verbcolor}{PDF} viewers had a limited + interest in the case at hand. Besides, they were some limitations such as + requiring user intervention for macros created via |\csname| constructs. + This limitation can not be overcome easily, especially when furthermore, as + in \xintexprnameimp, this is done sometimes via loops applying some + templates, as it would seem for that one has to emulate \TeX{} itself. This + limitation applies naturally also to the hacks described in this section!} + +I had actually never really looked into |doc.sty| code, but I started +wondering if one could not indeed divert its indexing facility into an +automated generation of hyperlinks: i.e. hyperlinking from macro names to the +line where they are first defined.% +% +\footnote{The recently released |V3| of \ctanpackage{doc} is about + hyperlinking, I have to check better its documentation but I don't think it + creates hyperlinks from code lines to code lines as we will do here.} + +In this section I will display and comment the hacks I have done to convert +the |doc.sty| macros into achieving automatic hyperlinking inside the code +lines, from the places of use of a macro to the place of its definition, and +from the place of its definition to the user documentation (if building +|xint-all.pdf|), if available. Using the colored links of +\ctanpackage{hyperref} this already provides a kind of minimal syntax +highlighting to the code lines, which we will enhance via colorizing the +inline comments (i.e. \textcolor{macrocodecommentcolor}{everything following a +\@percentchar{} in the source code}), and also colorizing +\textcolor{macrocodenoncscolor}{the tokens not involved in control sequence names}. + +Horrified readers will see I have completely botchered not only the indexing +facilities but also this business of \myenquote{modules} which is in a part of +\ctanpackage{doc}umentation I haven't read yet. And, now that you are +appalled enough let's admit that the |sourcexint.pdf| documentation never has +made any usage of the |macro| and |environment| environments from |doc.sty|, +so I have not even tested if they survive the mistreatment here.% +% +\footnote{Of course I did use those facilities for some of my \LaTeX\ +packages... but for \textcolor{verbcolor}{sourceint.pdf} I have always used +the \LaTeX\ sectioning commands rather. With a hack which will be described +at the end of this section to introduce suitable hyperlink targets for those +names entered into the comma separated section titles.} + +\begin{everbatim*} % \macrocode % ========== -% 2014/11/04 did some hack with active characters à la upquote for -% straight quotes, but this is now irrelevant as we use suitable font -% from newtxtt with straight quotes. -% -% Actually, I should not at all rely on the doc class, I should do it all by -% myself. As I don't use at all \DocInput (which caused me loads of problems -% back then when I was trying to get a workflow satisfying my views on how -% .dtx files should be structured), there is not much rationale for using the -% doc class. +% 2014/11/04 did some hack with active characters à la upquote for straight +% quotes, but this is now irrelevant as we use suitable font from newtxtt with +% straight quotes. -\def\macrocode{\macro@code - \frenchspacing \@vobeyspaces - \makestarlowast - \xmacro@code } +% doc.sty does \AtBeginDocument{\let\macro@font\MacroFont} and formerly I +% overwrote \macro@font to use a newtxtt font with a slashed 0 in the +% implementation part. -% finally 2022/05/17 removes slashed 0 dedicated ttbfamily usage -\def\macro@font {\ttfamily }% +% 2022/05/17 removes this, but I still need to redefine \macro@font to remove some +% stuff I formerly added to \MacroFont and which is only useful for the user manual. +\def\macro@font {\ttfamily } +\end{everbatim*} -% \lverb -% ====== +The |\makestarlowast| makes the \textcolor{verbcolor}{*} active to be lowered +like this |*|. Formerly I hacked |\macrocode| or used |\macro@font| (which +comes before |\dospecials| in |\macro@code| but the |*| is not a special +character) but it seems now cleaner to use the \LaTeX\ environment hooks. +\begin{everbatim*} +% no problem as * is not "special" so the active catcode will not be reset +\AddToHook{env/macrocode/begin}{\makestarlowast} +\end{everbatim*} +Let's continue benefiting from modern hooks to work around vertical spacing issues +\centeredline{\url{https://github.com/latex3/latex2e/issues/563}} % Updated 2021/05/24 to work-around macrocode bug % https://github.com/latex3/latex2e/issues/563 % which shows when I have some \subsection directly % followed by macrocode, then next time there is some actual % text the spacing to next macrocode block will be wrong. +\begin{everbatim*} \AddToHook{env/macrocode/after}{\@nobreakfalse} +\end{everbatim*} % I suspect the \par\medskip which was in \lverb code % below was a poorman workaround, dating back to 2014 % or earlier. @@ -20257,62 +20728,756 @@ $1$ or $-1$. % from the usage of the \trivlist mechanism). % The presence of \par will add \partopsep space. % \setlength{\partopsep}{0pt} +\begin{everbatim*} \AddToHook{env/macrocode/begin}{\partopsep0pt\relax} +\end{everbatim*} + +As explained above I make the \% active in order to colorize comments so here +I do need to overwrite the core delimited macro |\xmacro@code|. +\begin{everbatim*} +\begingroup +\catcode`\|=\z@ \catcode`\[=\@ne \catcode`\]=\tw@ +\catcode`\{=12 \catcode`\}=12 +% Let % be active to use a color for it and gray-out +% comments left in code (there are few) +\catcode`\%=13 \catcode`\ =\active \catcode`\\=\active +|gdef|xmacro@code#1% \end{macrocode}[#1|end[macrocode]] +|endgroup +\end{everbatim*} + +I will give a document wide definition to the active \%, other places where I +need an active \% like my |lverb| environment use |\let| at the appropriate +time to give it another meaning. The redefinition makes it change the color, +and for this it opens a scope limiting group, which gets closed via the active +end of line, suitably locally altered. +\begin{everbatim*} +\begingroup\catcode`\%=\active\catcode`\^^M 13 +\gdef%{\begingroup\color{macrocodecommentcolor}\@percentchar\odef +{\expandafter\endgroup +}}\endgroup +\end{everbatim*} + +The |\odef| in the above code is an \xintkernelnameimp utility. +\begin{everbatim*} +\texttt{\meaning\odef} +\end{everbatim*} + +Let's mention already that there better should not be a |\def\foo| in a +comment as no mechanism has been added here to prevent the macrocode to believe +this is an actual definition (whose detection method is described below). + +For hyperlinking I turn |CodelineNo| into a regular \LaTeX\ counter. The +next few lines were actually executed right after having loaded |doc v2|: +\begin{everbatim} +% First we want to turn CodelineNo into a real LaTeX counter +% This will spare defining an extra counter for the hyperlinks with \hyperref +\begingroup\let\newcount\@gobble\@definecounter{CodelineNo}\endgroup +% Let's now reenact the doc.sty default for \theCodeLineNo +\def\theCodelineNo{\reset@font\scriptsize\arabic{CodelineNo}} +% But as we will reset CodelineNo at each style file we need some unique id +\def\theHCodelineNo{\the\value{section}.\the\value{CodelineNo}} +\end{everbatim} + +% si on écrit "further" au lieu de "also", TeX induit une ligne vide après +% celle donnant ce texte. À mon avis c'est un bug de comportement de TeX +% que j'ai déjà rencontré plusieurs fois. +The \xintnameimp packages use |@|, |:|, |?|, |^| and |_| as letters, +and \xintexprnameimp also uses |!| as letter. +\begin{everbatim*} +\def\xintMakePrivateLetters{\catcode`: 11 \catcode`? 11 \catcode`@ 11 + \catcode`^ 11 \catcode`_ 11 } +\def\xintexprMakePrivateLetters{\xintMakePrivateLetters \catcode`! 11 } +\let\MakePrivateLetters\xintMakePrivateLetters +\end{everbatim*} + +The whole idea is to colorize things so we executed the following in the +preamble after having loaded \ctanpackage{xcolor} in order to have all such +settings in one place only. +\begin{everbatim} +\definecolor{xintnamecolor}{RGB}{228,57,0} +\colorlet{verbcolor}{Maroon} +% +\colorlet{privatecommentcolor}{cyan} +\colorlet{macrocodecommentcolor}{gray} +\colorlet{macrocodenewmacrocolor}{verbcolor} +\colorlet{macrocodelinktouserdoccolor}{xintnamecolor}% and bold face +\colorlet{macrocodelinktosectioncolor}{DarkBlue}% and bold face +\colorlet{macrocodelinktocodelinecolor}{DarkBlue} +\colorlet{macrocodenoncscolor}{Green} +\def\xintdocMacrocodeFallbackColorCmd{\normalcolor} +\end{everbatim} + +Let's overwrite the |macrocode| |\everypar| and use for this |\init@crossref| +as suitable hook. We need this to +\begin{itemize}[nosep] +\item make the \% active (after the |\macro@code| has done |\dospecials| + already), in order to colorize the inline comments, +\item reset the color, because we will place an overall |\color| command in a + \myenquote{before} hook to colorize the non control sequence tokens, +\item insert a suitable |\refstepcounter|. This would not be needed if using + an |\hypertarget/\hyperlink| approach. +\end{itemize} +In passing we start the destruction of FM's work by not including the +|\check@module| inside the |\everypar|. I had used it as an entry-point hook +before actually deciding to overwrite the |\everypar| and remove +|\check@module| altogether from it. +\begin{everbatim*} +\odef\init@crossref{\init@crossref% + \everypar{\refstepcounter{CodelineNo}% + \llap{{\xintdocMacrocodeFallbackColorCmd\theCodelineNo}\ + \hskip\@totalleftmargin}% + }% + \catcode`\%\active +}% +\end{everbatim*} + +In the environment the backslash is active and is given the meaning of +|\scan@macro|. Let's modify this meaning +\begin{itemize}[nosep] +\item to not insert itself yet, +\item and to prepare for collecting not only a name but also spaces (for +reasons explained below). +\end{itemize} +\begin{everbatim*} +\def\scan@macro{% + % we do not insert it yet + % \special@escape@char + \step@checksum +% \ifscan@allowed + \let\macro@namepart\@empty + % we need this for reasons explained below + \let\macro@spacepart\@empty + \def\next{\futurelet\next\macro@switch}% +% \else \let\next\@empty \fi + \next +} +% unchanged: +% \def\macro@switch{\ifcat\noexpand\next a% +% \let\next\macro@name +% \else \let\next\short@macro \fi +% \next} +\end{everbatim*} + +We do not bother with \myenquote{short} control sequences: +\begin{everbatim*} +\def\short@macro#1{\special@escape@char#1} +\end{everbatim*} + +The |\macro@name| is not modified but |\more@macroname| gets overwritten: +\begin{everbatim*} +% \def\macro@name#1{\edef\macro@namepart{\macro@namepart#1}% +% \futurelet\next\more@macroname} +% \def\more@macroname{\ifcat\noexpand\next a% +% \let\next\macro@name +% \else \let\next\macro@finish \fi +% \next} +\def\more@macroname{\ifcat\noexpand\next a% + \expandafter\macro@name + % we keep the \next for usage later and start filtering out of the way spaces + % this is caused by necessity of handling things such as \let<space>\foo\bar + % but also not be fooled by \let<space>#6\macro + \else \expandafter\macro@gatherspaces \fi + } +\end{everbatim*} + +Now a simple |\futurelet| loop will gather consecutive active spaces which may +separate a |\def| or |\let| from the control sequence which is getting defined +in the source code: +\begin{everbatim*} +\def\macro@gatherspaces{% + \ifx\next\@xobeysp + \expandafter\macro@gatherspaces@i + \else + \expandafter\macro@finish + \fi}% +\def\macro@gatherspaces@i#1{% + \odef\macro@spacepart{\macro@spacepart#1}% #1 = active space + \futurelet\next\macro@gatherspaces}% +\end{everbatim*} + +We need to collect those spaces in order to have a peek at what is coming +next. +Some code comments, but I am not going to comment my comments... +\begin{everbatim} +% We do not want \expandafter\def\csname to consider it defines \csname +% We de no want \expanded{\edef\expandafter\noexpand\csname...} +% to consider it defines \noexpand. We do not want this input +% expandafter\def\expandafter#1\expandafter{\romannumeral +% to consider it defines \expandafter or \romannumeral. +% We do not want \ifdefined\odef\else to be interpreted as definition +% of \else +\end{everbatim} + +When we scan a |\def| or |\let| or... we +toggle a boolean that says that what comes next will either insert a \LaTeX\ +|\label| (and the counter |CodelineNo| is suitably |\refstepcounter|ed in +|\everypar| to create an hypertarget), or an |\hyperref|. I also use a +\LaTeX\ counter simply to be able to boast about the number of defined macros +at the end of the |PDF|.% +% +\footnote{But I needed to make a manual estimate of a correction due to the + many macros defined in \xintexprnameimp via |\csname| constructors. On June + 6, 2022, I estimated there are at least about |452| of them and I since + correct the macro counter with this addition at the end of source file for + \xintexprnameimp.} +% +\begin{everbatim*} +\newif\iflabelmacro@allowed +\newcounter{xintMacroCnt} +\def\xintimplabelprefix{src-} +\let\xintdoclabelprefix\empty +\let\xintlabelprefix\xintimplabelprefix +\end{everbatim*} + +Now to the crux of the matter. The core of our hacks is in |\macro@finish|. +We will need the |_| to be of catcode letter there. +\begin{everbatim} +\catcode`_ 11 % +\def\macro@finish{% + \iflabelmacro@allowed +\end{everbatim} + +% +Some control sequence names should never create hyperlinking. I hesitate +about what to do with |\empty| and |\space|: \xintkernelnameimp does define +them if they do not exist (which seems improbable) but we know what they are +anyhow. Let's be careful here with how |\in@| works and add suitable +delimiters to avoid sub-matches. +\begin{everbatim} + \expandafter\in@\expandafter{\expandafter.\macro@namepart,}% + {.csname,.expandafter,.noexpand,.else,% + .t,.w,.x,.y,.z,.XINT_x,.XINT_y,% + .XINT_tmpa,.XINT_tmpb,.XINT_tmpc,.XINT_tmpd,.XINT_tmpe,% _ is letter here + .XINT_expr_defbin_b,.XINT_expr_defbin_c,.XINT_expr_defbin_d,% + .empty,.space,}% +\end{everbatim} + +% +If the thing is not excluded we check via a custom flag if we created already +a |\label|, if not we create the |\label| and step the macro counter. In the +latter case we will try to link to a target in the user manual (which may be +available naturally only if we are creating |xint-all.pdf|) or to a label from +a sectioning title in the implementation part. The latter situation is a bit +silly because it will mean a link to a place perhaps only a few lines above +the location of the macro definition but well. For some macros I wrote a very +long incipit and then the link is useful as it jumps back to its start and +allows to read the whole thing again in a never ending cycle. + +A link to the user documentation part will be colorized +{\textbf{\textcolor{macrocodelinktouserdoccolor}{\bslash likethis}}} whereas +hyperlinking to the nearby section will look +{\textbf{\textcolor{macrocodelinktosectioncolor}{\bslash likethat}}}. If no +such target exists we use \textcolor{macrocodenewmacrocolor}{\bslash +this\string_color} to highlight the new macro (it is currently the same +highlighting as for |\verb| usage in the code comments). It is then not a +link but a target only. Finally, things excluded from the mechanism are +rendered using a fall-back color, which currently is simply the color from +{\xintdocMacrocodeFallbackColorCmd\string\normalcolor}, i.e. the black color. +\begin{everbatim} + \ifin@ + {\xintdocMacrocodeFallbackColorCmd\special@escape@char\macro@namepart}% + \else + \ifcsname alreadydefined-\macro@namepart\endcsname +\end{everbatim} + +Contrarily to |doc.sty| we have not yet typeset the |\| so we insert it via +|\special@escape@char| (this makes me realize I have not yet checked if I use +a special catcode zero character anywhere in the sources; I surely do in the +sources for this documentation, but probably not for the actual packages). +\begin{everbatim} + \hyperref[xintmacro-\macro@namepart]{\special@escape@char\macro@namepart}% + \else +\end{everbatim} + +We rarely define things twice but it happens sometimes when a macro needs a +space token. Unfortunately LaTeX's |\label| has no mechanism to tell if a +label has already been used and if we issue a second |\label| with same name +it will complain at some later stage. We can not use |CodelineNo| as how are +we going then to refer to it? So we set up a flag to signal the |\label| has +been created. +\begin{everbatim} + % this will make a rather large number of macro names in the string pool... + \global\expandafter\let\csname alreadydefined-\macro@namepart\endcsname\@empty + \label{xintmacro-\macro@namepart}% +\end{everbatim} + +I considered a +|\hypertarget/\hyperlink| method, but use finally |\label| and |\hyperref|. +It is actually fun to see a gigantic |.aux| file allowing to get the +information and to have the possibility to count again with |grep| for +example. +\begin{everbatim} + \stepcounter{xintMacroCnt}% + % try to link to a label in user documentation if building xint-all.pdf + \ifcsname r@\xintdoclabelprefix\macro@namepart\endcsname + {\hypersetup{linkcolor=macrocodelinktouserdoccolor}% + \hyperref[\xintdoclabelprefix\macro@namepart]% + {\textbf{\special@escape@char\macro@namepart}}}% + \else + % try to link to a labeled section in implementation part + \ifcsname r@\xintimplabelprefix \macro@namepart\endcsname + {\hypersetup{linkcolor=macrocodelinktosectioncolor}% + \hyperref[\xintimplabelprefix\macro@namepart]% + {\textbf{\special@escape@char\macro@namepart}}}% + \else + \textcolor{macrocodenewmacrocolor}{\special@escape@char\macro@namepart}% + \fi\fi + \fi + \fi +\end{everbatim} + +In all cases we now turn off the toggle for |\label| creation. Except if we +were dealing with |\expandafter|, then we do keep it on. But only if what is +coming next is a control sequence. +\begin{everbatim} + \labelmacro@allowedfalse + \expandafter\in@\expandafter{\expandafter.\macro@namepart,}{.expandafter,}% + \ifin@ + \ifx\next\scan@macro\labelmacro@allowedtrue\fi + \fi + \else % end of \labelmacro@allowedtrue branch +\end{everbatim} + +Now we return to the original |\macro@finish| code, with some check of the +macro name to detect when it is |\def| or a cousin, and if it is we turn on +the toggle to associate a |\label| or an |\hyperref| to the next control +sequence. However we do this only if the next token is the catcode zero +character. For this to work we have moved away the spaces beforehand. + +I hesitated about adding |\chardef| and |\mathchardef| but this would have the +effect of adding hyperlinks for the |\xint_c_i| et al. constants, whose names +are anyhow pretty much explicit. An end of line separating |\def| from the +actual control sequence will cause the code to not activate the labelling +process. +\begin{everbatim} + \ifx\next\scan@macro + \expandafter\in@\expandafter{\expandafter.\macro@namepart,}% + {.def,.edef,.let,.gdef,.xdef,.odef,.oodef,.fdef,}% + \ifin@\labelmacro@allowedtrue\fi + \fi +\end{everbatim} + +If the reference exists, use it. The link will use color like in this +example: \hyperref[xintmacro-xint\string_dothis]{\bslash xint\string_dothis}. +In development, I had an alternative method not using |\label/\hyperref| but +|\hypertarget/\hyperlink|. But here arose the question about how to know if a +target existed (possibly located later in the source code). And it seems the +answer would have been to use a mechanisme like the commented-out +|\ifnot@exclude| below or the above |\in@| direct usages, but with a big list +of all words we know will not have been associated with a target in the other +branch. I.e. basically the \TeX\ primitives in the code, or also the constants +|\xint_c_|\meta{roman numeral} which deliberately were not set-up to configure +(as we did not handle |\chardef| or |\mathchardef| or |\newcount| to turn the +toggle on. And if were to use a double-pass system via the |.aux| file, then +what was the point. In view of this I opted for the |\label/\hyperref| even +though it makes for very large |.aux| file and a lot of noise in the console +output and in the log. +\begin{everbatim} + \ifcsname r@xintmacro-\macro@namepart\endcsname + \hyperref[xintmacro-\macro@namepart]{\special@escape@char\macro@namepart}% + \else + {\xintdocMacrocodeFallbackColorCmd\special@escape@char\macro@namepart}% + \fi + \fi +\end{everbatim} + +We do not use any index, but this could be reenacted. The |\short@macro| +which then would needs to be resurrected as well. The |xint| source code +contains no definition of such short (i.e.\@ one non-letter character +following the backslash or escape character) macros anyhow. +\begin{everbatim} + % \ifnot@excluded + % \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}% + % \@tempa + % \fi +\end{everbatim} + +And to conclude we now produce the fetched spaces. And after the +|\scan@macro| definition we reset the catcode of |_| (this code is not part of +the |xint*.sty| style files where the |_| anyhow is of catcode |letter|, but +of the user documentation). +\begin{everbatim} + \macro@spacepart +}% +\catcode`_ 8 +\end{everbatim} + +% I could not use everbatim* with pieces... so lets actually make the definition +% now +\catcode`_ 11 +\def\macro@finish{% + \iflabelmacro@allowed + \expandafter\in@\expandafter{\expandafter.\macro@namepart,}% + {.csname,.expandafter,.noexpand,.else,% + .t,.w,.x,.y,.z,.XINT_x,.XINT_y,% + .XINT_tmpa,.XINT_tmpb,.XINT_tmpc,.XINT_tmpd,.XINT_tmpe,% _ is letter here + .XINT_expr_defbin_b,.XINT_expr_defbin_c,.XINT_expr_defbin_d,% + .empty,.space,}% + \ifin@ + {\xintdocMacrocodeFallbackColorCmd\special@escape@char\macro@namepart}% + \else + \ifcsname alreadydefined-\macro@namepart\endcsname + \hyperref[xintmacro-\macro@namepart]{\special@escape@char\macro@namepart}% + \else + % this will make a rather large number of macro names in the string pool... + \global\expandafter\let\csname alreadydefined-\macro@namepart\endcsname\@empty + \label{xintmacro-\macro@namepart}% + \stepcounter{xintMacroCnt}% + % try to link to a labeled reference in the user documentation (xint-all.pdf) + \ifcsname r@\xintdoclabelprefix\macro@namepart\endcsname + {\hypersetup{linkcolor=macrocodelinktouserdoccolor}% + \hyperref[\xintdoclabelprefix\macro@namepart]% + {\special@escape@char\macro@namepart}}% + \else + % try to link to a labeled section in implementation part + \ifcsname r@\xintimplabelprefix\macro@namepart\endcsname + {\hypersetup{linkcolor=macrocodelinktosectioncolor}% + \hyperref[\xintimplabelprefix\macro@namepart]% + {\textbf{\special@escape@char\macro@namepart}}}% + \else + \textcolor{macrocodenewmacrocolor}{\special@escape@char\macro@namepart}% + \fi\fi + \fi + \fi + \labelmacro@allowedfalse + \expandafter\in@\expandafter{\expandafter.\macro@namepart,}{.expandafter,}% + \ifin@ + \ifx\next\scan@macro\labelmacro@allowedtrue\fi + \fi + \else % end of labelmacro@allowedtrue branch + \ifx\next\scan@macro + \expandafter\in@\expandafter{\expandafter.\macro@namepart,}% + {.def,.edef,.let,.gdef,.xdef,.odef,.oodef,.fdef,}% + \ifin@\labelmacro@allowedtrue\fi + \fi + \ifcsname r@xintmacro-\macro@namepart\endcsname + \hyperref[xintmacro-\macro@namepart]{\special@escape@char\macro@namepart}% + \else + {\xintdocMacrocodeFallbackColorCmd\special@escape@char\macro@namepart}% + \fi + \fi + % \ifnot@excluded + % \edef\@tempa{\noexpand\SpecialIndex{\bslash\macro@namepart}}% + % \@tempa + % \fi + \macro@spacepart +}% +\catcode`_ 8 + +There is one last topic. We want to colorize the tokens more in the +macrocode. At some point before the hacks into |doc.sty| I had decided to +issue one single top-level |\color| command at start of the implementation +part in order to unify the looks of the two types of comments which were +described at start of this section. So I needed to colorize the |macrocode| +environments back to the black normal color. Now I need to colorize it to +some color, knowing that control sequences will be rendered with their own +individual colors, either {\xintdocMacrocodeFallbackColorCmd the normal +color}, or the \textcolor{macrocodelinktocodelinecolor}{color for a link to a code line}, +possibly the \textbf{\textcolor{macrocodelinktouserdoccolor}{color for a link to the +user documentation}}, or the \textbf{\textcolor{macrocodelinktosectioncolor}{color for a +link to a sectioning title in the implementation part}} (normally immediately a +few lines above), or the \textcolor{macrocodenewmacrocolor}{color for being a +target} (then it is not a link), and that comments have been configured +\textcolor{macrocodecommentcolor}{to be rendered in their own color}. So +what remains are \textcolor{macrocodenoncscolor}{the non commented out and +non-control sequences token}. + +What is next is done in order to: +\begin{enumerate}[noitemsep] +\item not induce spacing changes in the output compared to no color +commands +\item not cause a color stack overflow from |\normalcolor| or a |\color| at +top level with |dvipdfmx| (same problem in |xetex|). +\end{enumerate} +% +I had encountered the color stack overflow with |dvipdfmx| (and |xetex| also) +already many years ago for the |everbatim*| environment which is used in the +user manual and in this section to display \TeX{} code and execute it. So I +only needed to copy the method and find the correct hooks to use for the +|macrocode|, turns out the good choices are |env/macrocode/before| to set the +color and |env/macrocode/end| to unset it (not |after| which causes extra +vertical spacing). + +\begin{everbatim*} +{\sbox0{\color{macrocodenoncscolor}\xdef\foo{\current@color}}} +\ifpdf + \edef\xintdoc@macrocode@pushcolor + {\pdfcolorstack\noexpand\@pdfcolorstack push{\foo}\relax} + \def\xintdoc@macrocode@popcolor{\pdfcolorstack\@pdfcolorstack pop\relax} +\else +\ifxetex + \edef\xintdoc@macrocode@pushcolor{\special{color push \foo}} + \def\xintdoc@macrocode@popcolor{\special{color pop}} +\else +\ifnum\Withdvipdfmx=1 + \edef\xintdoc@macrocode@pushcolor{\special{color push \foo}} + \def\xintdoc@macrocode@popcolor{\special{color pop}} +\fi\fi\fi +\AddToHook{env/macrocode/before}{\xintdoc@macrocode@pushcolor} +\AddToHook{env/macrocode/end}{\xintdoc@macrocode@popcolor} +% let's use some more quiet color for links inside the code +\AddToHook{env/macrocode/begin}{\hypersetup{linkcolor=macrocodelinktocodelinecolor}} +% let code line numbers really be fully in the margin +\MacroIndent\z@ +\end{everbatim*} + +This concludes this section devoted to how the documentation is formatted. +Now enjoy the nice colors and hyperlinking! + +Ah wait I had forgotten one piece. In order to minimize the mark-up I have +hacked into sectioning commands to add automatically labels. And an old +commented out part seems to indicate I experimented with inserting +automatically |macro| environments too, but I must have encountered problems +and dropped the idea.% +% +\footnote{It seems to me now that I have read \ctanpackage{doc} documentation + that I had initially completely mis-understood what |\DescribeMacro| was + supposed to be used for... or perhaps I intended to do something like the + present |\@sect| hack to serve in the user manual part?} +% +\begin{everbatim*} +% HACK OF \@sect +% ============== +% goal is to add labels but without having to modify currently +% existing mark-up in sources. But KOMA makes an extra step needed. +% 2018/06/11 +\let\original@sect\@sect +\def\@sect#1#2#3#4#5#6[#7]#8{\original@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]% + {\begingroup + %not possible because of KOMA wrappers + %\def\csh##1{\csa{##1}\label{\xintdoclabelprefix\detokenize{##1}}}% + \let\csh\cshintitle + \let\cshn\cshnintitle + #8% + \endgroup}% +}% +\def\cshintitle#1{\csa{#1}% + \label{\xintlabelprefix\detokenize{#1}}% + %\expandafter\DescribeMacro\csname#1\endcsname + } +% \csan: no backslash +\def\cshnintitle#1{\csan{#1}\label{\xintlabelprefix\detokenize{#1}}} +\end{everbatim*} -% Définition de \lverb -% Has become more complicated for 1.2l +The |\csa| is defined this way: +\begin{everbatim} +\DeclareRobustCommand\csa[1] + {{\ttzfamily\char92\endlinechar-1 + \makestarlowast \catcode`_ 12 \catcode`^ 12 + \scantokens\expandafter{\detokenize{#1}}}} +\end{everbatim} +And the |\csh| is defined like this: +\begin{everbatim} +\newcommand\csh[1] + {\texorpdfstring{\csa{#1}}{\textbackslash\detokenize{#1}}} +\end{everbatim} +for use like in this example from \xintkernelnameimp: +\begin{everbatim} +% \subsubsection{\csh{XINTrestorecatcodes}, \csh{XINTsetcatcodes}, +% \csh{XINTrestorecatcodesendinput}} +\end{everbatim} + +Finally before the |\endinput| of each style file I insert +|\StoreCodeLineNo{xint...}| in order to prepare the last page of +|sourcexint.pdf|. +\begin{everbatim*} +\def\storedlinecounts {} +\def\StoreCodelineNo #1{% + \edef\storedlinecounts{\storedlinecounts + {{#1}{\the\c@CodelineNo}{\the\c@xintMacroCnt}}% + }% + \global\c@CodelineNo \z@ + \global\c@xintMacroCnt \z@ +} +\end{everbatim*} +% I guess this is where |\check@module| could have been +% used... maybe I should read its documentation... + +% awful complications...3 hours on this.. for ONLY FOUR instances in xintexpr +% which I had to search for in source and none in the other files... currently... +\def\FixInterMacrocodeVspace{% + \def\par@beforemacrocode{\gdef\par@beforemacrocode{\par}}% + \edef\xintdoc@macrocode@pushcolor{\xdef\noexpand\xintdoc@macrocode@pushcolor + {\xintdoc@macrocode@pushcolor}}% + \def\macro@font{\ttfamily\unskip\unskip\unskip\unskip\unskip\unskip + \global\def\macro@font{\ttfamily}% + \xintdoc@macrocode@pushcolor % ai hésité à le mettre au début de \@item + }% + \let\saved@@item\@item + \def\@item[##1]{\let\saved@addpenalty\addpenalty + \let\addpenalty\@gobble + \saved@@item[{##1}]% + \let\addpenalty\saved@addpenalty + \global\let\@item\saved@@item}% + }% + +% This is obsolete it is when I was issueing at top level a \color not black. +% This is executed in a group +%\renewcommand\etocbeforetitlehook{\normalcolor} + +% lverb environment (formerly \lverb|...|) +% ================= +% +% This started as "long \verb" with same syntax, to be used in the code +% comments and spare endless hassle of adding mark-up for verbatim stuff. It +% also used \MicroFont like the custom \verb mainly used in user manual but +% also in sourcexint for parts written "normally" (but using anyhow monospace +% font with variable space and hyphenation) which use |...| mark-up. +% +% It was turned into an environment June 3, 2022 (1.4m) and a mechanism with +% active backslash was added to identify control sequence names and add +% hyperlinks if available (labels are autogenerated from sectioning headings). +% +% lverb is a verbatim environment with free flowing of whitespace. +% It MUST be used with % characters at start of lines: +% +%\begin{lverb} +% all lines start with % and preferably with %<space> +%\end{lverb} +% +% There must not be a space between % and \end{lverb} +% +% Inside the environment: +% - % is active and must be exclusively located at start of lines + +% - \ is active and identifies control sequence names, with the _, :, ^, ?, +% and @ as letters. The \ should not follow immediately the %, except for +% the end of the environment %\end{lverb} +% +% It would arguably be better to have used specific mark-up in source but +% * then we need some way to have catcode 1 and 2 characters +% * well, I added no mark-up. I could spend one hour +% TeX-programming to reconstruct the source with mark-up +% but... +% - $ is a catcode 0 escape +% - space and end of lines are normal, text flows normally and uses the +% newtxttz font currently +% - & serves as comment character +% - (, :, and ) serve to enter, continue, and exit a sub-mode which does obey +% spaces and lines. One can use & at end of a line to let it flow with the +% next one if desired. They must immediately follow the % at start of line. +% - A dash after the % (%-) inserts a \par +% - also the * is active via \makestarlowast Apart from %, \, $, and & special +% characters are like in verbatim. So a macro \oneargcs is defined if one +% needs an escape for a macro with one parameter: \catcode`_ 11 +\def\oneargcs{\catcode`{1\catcode`}2 \onearg_cs} +\def\onearg_cs#1#2{#1{#2}\catcode`{12\catcode`}12\relax} +% This \oneargcs is to be used as $oneargcs$<cs name>{<arg>} {\catcode32\active% \gdef\myobeyspaces{\catcode32\active\def {\leavevmode\kern\fontcharwd\font`X}}} +% +% Let \ fetch control sequences names in lverb environments. +% For this the characters _, ^, : and ? are considered letters. +% \XINT_sptoken is defined in xinttools which is loaded here +% even if only typesetting sourcexint.pdf +% \xint_dothis/\xint_orthat in xintkernel loaded by xinttools +\def\lverbbackslash{\bgroup\toks@{}\futurelet\lverb_token\lverb_bs}% +\def\lverb_bs{% + \ifx\lverb_token\XINT_sptoken\xint_dothis{\lverb_bs_end}\fi + % \ifx\lverb_token\lverbpercent should never happen + \ifcat\noexpand\lverb_token\relax\xint_dothis{\lverb_bs_end}\fi + \ifcat\lverb_token a\xint_dothis{\lverb_bs_i}\fi + \if\lverb_token _\xint_dothis{\lverb_bs_i}\fi + \if\lverb_token ^\xint_dothis{\lverb_bs_i}\fi +% TODO quel mark-up pour autoriser : and ? sans espace pour ponctuation +% TODO anglo-saxonne ? +% A bit cumbersome but $null or $empty can be used if : is used for +% punctuation and not as last letter of a cs, such as \foo$empty: +% I checked all instances with : and ? as last character found +% by this and added $empty in sources (June 3, 2022). + \if\lverb_token :\xint_dothis{\lverb_bs_i}\fi + \if\lverb_token ?\xint_dothis{\lverb_bs_i}\fi + \xint_orthat{\lverb_bs_end}% +}% +\def\lverb_bs_i#1{\toks@\expandafter{\the\toks@#1}\futurelet\lverb_token\lverb_bs}% +\def\lverb_bs_end{\expandafter\lverbcs\expandafter{\the\toks@}\egroup}% +\let\lverbcs\cs + +% The % is active in the environment +% Some complications to change color of private lines and then restore +% (the ^^M is not active), so we split into two steps _a and _b +\newif\ifprivatecolorison \def\lverbpercent {\catcode32\active\lverbpercent_a}% \def\lverbpercent_a #1{% + \if\XINT_sptoken\detokenize{#1}\xint_dothis{% + \catcode32 10 + \ifprivatecolorison\xintdocPublicColorCmd\fi + \privatecolorisonfalse + }\fi +% The %! mark-up is used for private things which are trimmed by the +% build-script out of the dtx. + \if!\detokenize{#1}\xint_dothis{% + \ifprivatecolorison + \else + \xintdocPrivateColorCmd + \privatecolorisontrue + \fi + \lverbpercent_b + }\fi + \xint_orthat{\lverbpercent_b{#1}}% +}% +\def\lverbpercent_b#1{% \if\XINT_sptoken\detokenize{#1}\xint_dothis{\catcode32 10 }\fi +% Special mark-up after % to control linewrap +% %- says to start a new paragraph \if-\detokenize{#1}\xint_dothis{\par #1}\fi +% %( start an obeylines+obeyspaces context \if(\detokenize{#1}\xint_dothis{\par\bgroup\myobeyspaces\obeylines}\fi \if:\detokenize{#1}\xint_dothis{}\fi +% I don't remember why this, it seems I want to kill next indentation +% after the obeylines context \if)\detokenize{#1}\xint_dothis{\egroup\everypar{\hskip-\parindent\everypar{}}}\fi - \if!\detokenize{#1}\xint_dothis{\lverbpercent}\fi +% Introduce a \par token if we have two empty commented-out lines +% Or if we have a % at the end of the input line \ifx#1\lverbpercent\xint_dothis{\catcode32 10 \par #1}\fi +% For tranformation of lverb into environment mark-up 2022/06/03 +% The reason for the \detokenize{#1} upfront is that in original +% private sources there might a wrapper environment which has made +% the % alias to \lverbpercent already but not made the \ active +% and then %\begin{lverb} may be encountered with a +% catcode 0 backslash. If I did \if\@backslashchar\detokenize{#1} +% there would be trouble. This test identifies %\end in a +% somewhat fragile way but by convention my mark-up will never +% have %\ except for %\end{lverb} + \if\detokenize{#1}\@backslashchar\xint_dothis{\lverb@end}\fi \xint_orthat{\catcode32 10 #1}% } \catcode`_ 8 -\long\def\lverb {% - \relax\par\smallskip%\noindent\null -% \begingroup - \bgroup -% this mechanism (whose motivation I do not really recall, in particular -% probably the \medskip was related to counteract the macrocode bug -% latex2e#563 whose effects I must have seen in 2013/2014) now removed -% at 1.4g. I vaguely remember this code was originally done -% in relation to coloured short verbatims? -% -% Removing the \medskip has reduced when it was done xint-source.pdf to 545 -% from 550 pages. Update: and removing the bad extra spacing when a macrocode -% block follows immediately a \section or \subsection had the result of -% reducing further to 542 pages... -% \aftergroup\@@par \aftergroup\endgroup \aftergroup\medskip +% \long\def\lverb +\def\lverb@end end#1lverb#2{\end{lverb}} +\newenvironment{lverb} +{% + \relax\ifhanged\else\par\smallskip\fi \let\do\do@noligs \verbatim@nolig@list \let\do\@makeother \dospecials \catcode32 10 \catcode`\& 14 \catcode`\$ 0 \catcode`\% \active \begingroup\lccode`\~`\%\lowercase{\endgroup\let~\lverbpercent}% - \MicroFont % sera donc en couleur. - \@lverb + \catcode`\\ \active + \begingroup\lccode`\~`\\\lowercase{\endgroup\let~\lverbbackslash}% + \LverbFont + \ignorespaces +}{\par} +% This \@lverb was used before conversion into an environment +% \def\@lverb #1{\catcode`#1\active +% \lccode`\~`#1\lowercase{\def~}{\egroup\par}}% +\def\LverbFont {% +% pas concluant \itshape (June 3, 2022) +% pas concluant \bfseries + %\xintdocPublicColorCmd + \makestarlowast } -% let's use (7 years later) simply a \def and not \let~\egroup -\def\@lverb #1{\catcode`#1\active - \lccode`\~`#1\lowercase{\def~}{\egroup\par}}% - -% there is a group to handle restore -\def\MicroFont {%\ttzfamily - \color{verbimpcolor}\makestarlowast } - % privatecodecomments % =================== + +% This is used in the xint*sty files (before being embedded in dtx) +% with %! lines. Those lines are removed from public xint.dtx before +% upload to CTAN. \newenvironment{privatecodecomments} {\par \textbf{\textcolor{red}{COMMENTAIRES PRIVÉS.}}\par - \def\MicroFont{\color[named]{BlueGreen}\makestarlowast}% (<-- 2021/05/24...) + \makestarlowast \begingroup\lccode`\~`\%\lowercase{\endgroup\let~\lverbpercent}% \catcode`\%\active} {\par \textbf{\textcolor{red}{FIN DES COMMENTAIRES PRIVÉS.}}\par} @@ -20322,13 +21487,24 @@ $1$ or $-1$. % updated 2021/05/29 to use \xintreleasedate (always) and put % second argument if non empty within square brackets. -% updated again same day to make \changed a LaTeX macro with optional -% parameter, so order is permuted +% 2022/06/05 now says "Modified at", and does not display the optional +% argument, which contains actual date of the comment. +% I wonder if I should keep displaying release date. +% 2022/06/10 adds the \ifinchanged +\newif\ifhanged \newcommand\changed[2][]{% \par\smallskip\noindent - \textbf{#2\space(\xintreleasedate{#2})\if\relax\detokenize{#1}\relax - \else\space[commented #1]\fi.}% + \textbf{Modified at #2\space(\xintreleasedate{#2})%\if\relax\detokenize{#1}\relax + %\else\space[commented #1]\fi + .}% \hangindent\parindent + \hangedtrue +% This is absolutely NOT robust. By the way I added a hook to env/macrocode/before +% to do \par. + \everypar\expandafter\expandafter\expandafter + {\expandafter\the\expandafter\everypar + \expandafter\everypar\expandafter{\the\everypar}% + \hangedfalse}% } % \added @@ -20339,7 +21515,16 @@ $1$ or $-1$. \par\smallskip\noindent \textbf{Added at #2\space(\xintreleasedate{#2})\if\relax\detokenize{#1}\relax \else\space[on #1]\fi.}% + \hangindent\parindent + \hangedtrue +% This is absolutely NOT robust. By the way I added a hook to env/macrocode/before +% to do \par. + \everypar\expandafter\expandafter\expandafter + {\expandafter\the\expandafter\everypar + \expandafter\everypar\expandafter{\the\everypar}% + \hangedfalse}% } +% hoping the \hangedfalse will not accumulate % \xintreleasedate % ================ @@ -20368,161 +21553,7 @@ $1$ or $-1$. \expandafter\edef\csname xintreleasedate_\xintbndlversion\endcsname{\xintbndldate} -% Hyperlinks -% ========== - -% renew some definitions (new labels, prefixed with src-) - -% hyperlink and slash -\DeclareRobustCommand\csbxint[1] - {\hyperref[\detokenize{src-xint#1}]% - {{\char92\mbox{xint}\-\endlinechar-1 - \makestarlowast \catcode`_ 12 \catcode`^ 12 - \scantokens\expandafter{\detokenize{#1}}}}} - -\DeclareRobustCommand\csbXINT[1] - {\hyperref[\detokenize{src-XINT#1}]% - {{\char92\mbox{XINT}\-\endlinechar-1 - \makestarlowast \catcode`_ 12 \catcode`^ 12 - \scantokens\expandafter{\detokenize{#1}}}}} - -\DeclareRobustCommand\csb [1] - {\hyperref[\detokenize{src-#1}]% - {{\char92 \endlinechar-1 - \makestarlowast \catcode`_ 12 \catcode`^ 12 - \scantokens\expandafter{\detokenize{#1}}}}} - -% hyperlink and no slash -\DeclareRobustCommand\csbn[1] - {\hyperref[\detokenize{src-#1}]% - {{\endlinechar-1 - \makestarlowast \catcode`_ 12 \catcode`^ 12 - \scantokens\expandafter{\detokenize{#1}}}}} - -% HACK OF \@sect -% ============== -% goal is to add labels but without having to modify currently -% existing mark-up in sources. But KOMA annoyingly makes an extra -% step needed. 2018/06/11 -\let\original@sect\@sect -\def\@sect#1#2#3#4#5#6[#7]#8{\original@sect{#1}{#2}{#3}{#4}{#5}{#6}[{#7}]% - {\begingroup - %not possible because of KOMA wrappers - %\def\csh##1{\csa{##1}\label{\detokenize{src-##1}}}% - \let\csh\cshintitle - \let\cshn\cshnintitle - #8% - \endgroup}% -}% -\def\cshintitle#1{\csa{#1}% - \label{\detokenize{src-#1}}% - %\expandafter\DescribeMacro\csname#1\endcsname - } -% \csan: no backslash -\def\cshnintitle#1{\csan{#1}\label{\detokenize{src-#1}}} - %% END OF MACRO DEFINITIONS FOR SOURCEXINT - -\makeatother - -\section{Timeline (in brief)} - -This is \expandafter|\xintbndlversion| of \expandafter|\xintbndldate|. - -Please refer to |CHANGES.html| for a (very) detailed history. -\centeredline{Internet: - \url{http://mirrors.ctan.org/macros/generic/xint/CHANGES.html}} - -\begin{itemize} -\item Release |1.4i| of |2021/06/11|: extension of the - «simultaneous assignments» concept (backwards compatible). -\item Release |1.4g| of |2021/05/25|: - powers are now parsed in a right associative way. Removal of the - single-character operators |&|, \verb=|=, and |=| (deprecated at |1.1|). - Reformatted expandable error messages. -\item Release |1.4e| of |2021/05/05|: logarithms and exponentials up to 62 - digits, trigonometry still mainly done at high level but with guard digits - so all digits up to the last one included can be trusted for faithful - rounding and high probability of correct rounding. -\item Release |1.4| of |2020/01/31|: \xintexprnameimp overhaul to use - |\expanded| based expansion control. Many new features, in particular - support for input and output of nested structures. Breaking changes, main - ones being the (provisory) drop of |x*[a, b,...]|, |x+[a, b,...]| et al.\@ - syntax and the requirement of |\expanded| primitive (currently required only - by \xintexprnameimp). -\item Release |1.3e| of |2019/04/05|: packages \xinttrignameimp, \xintlognameimp; - \csa{xintdefefunc} ``non-protected'' variant of \csbxint{deffunc} (at |1.4| - the two got merged and \csa{xintdefefunc} became a deprecated alias for - \csbxint{deffunc}). - Indices removed from |sourcexint.pdf|. -% Their functionality is advantageously - % made available via the search function in PDF viewers. Already the local - % tables of contents are useful enough most of the time. -\item Release |1.3d| of |2019/01/06|: fix of |1.2p| bug for division with a - zero dividend and a one-digit divisor, \csbxint{eval} et al. wrappers, - |gcd()| and |lcm()| work with fractions. -\item Release |1.3c| of |2018/06/17|: documentation better hyperlinked, - indices added to |sourcexint.pdf|. Colon in |:=| now optional for - \csbxint{defvar} and \csbxint{deffunc}. -\item Release |1.3b| of |2018/05/18|: randomness related additions (still WIP). -\item Release |1.3a| of |2018/03/07|: efficiency fix of the mechanism for - recursive functions. -\item Release |1.3| of |2018/03/01|: addition and subtraction use - systematically least common multiple of denominators. Extensive - under-the-hood refactoring of \csbxint{NewExpr} and \csbxint{deffunc} which - now allow recursive definitions. Removal of |1.2o| deprecated macros. -\item Release |1.2q| of |2018/02/06|: fix of |1.2l| subtraction bug - in special situation; tacit multiplication extended to cases such as - |10!20!30!|. -\item Release |1.2p| of |2017/12/05|: maps |//| and |/:| to the floored, not - truncated, division. Simultaneous assignments possible with \csbxint{defvar}. - Efficiency improvements in \xinttoolsnameimp. -\item Release |1.2o| of |2017/08/29|: massive deprecations of those macros - from \xintcorenameimp and \xintnameimp which filtered their arguments via - \csbxint{Num}. -\item Release |1.2n| of |2017/08/06|: improvements of \xintbinhexnameimp. -\item Release |1.2m| of |2017/07/31|: rewrite of \xintbinhexnameimp in the - style of the |1.2| techniques. -\item Release |1.2l| of |2017/07/26|: under the hood efficiency improvements - in the style of the |1.2| techniques; subtraction refactored. Compatibility - of most \xintfracnameimp macros with arguments using non-delimited - |\the\numexpr| or |\the\mathcode| etc... -\item Release |1.2i| of |2016/12/13|: under the hood efficiency improvements - in the style of the |1.2| techniques. -\item Release |1.2| of |2015/10/10|: complete refactoring of the core - arithmetic macros and faster \csbxint{expr} parser. -\item Release |1.1| of |2014/10/28|: extensive changes in \xintexprnameimp. - Addition and subtraction do not multiply denominators blindly but sometimes - produce smaller ones. Also with that release, packages \xintkernelnameimp - and \xintcorenameimp got extracted from \xinttoolsnameimp and \xintnameimp. -\item Release |1.09g| of |2013/11/22|: the \xinttoolsnameimp package is - extracted from \xintnameimp; addition of \csbxint{loop} and \csbxint{iloop}. -\item Release |1.09c| of |2013/10/09|: \csbxint{For}, \csa{xintNewNumExpr} - (ancestor of \csbxint{NewExpr}/\csbxint{deffunc} mechanism). -\item Release |1.09a| of |2013/09/24|: support for functions by \xintexprnameimp. -\item Release |1.08| of |2013/06/07|: the \xintbinhexnameimp package. -\item Release |1.07| of |2013/05/25|: support for floating point numbers - added to \xintfracnameimp and first release of the \xintexprnameimp package - (provided - \csbxint{expr} and \csbxint{floatexpr}). -\item Release |1.04| of |2013/04/25|: the \xintcfracnameimp package. -\item Release |1.03| of |2013/04/14|: the \xintfracnameimp and - \xintseriesnameimp packages. -\item Release |1.0| of |2013/03/28|: initial release of the \xintnameimp and - \xintgcdnameimp packages. -\end{itemize} - -Some parts of the code still date back to the initial release, and - at that time I was learning my trade in expandable TeX macro programming. - At some point in the future, I will have to re-examine the older parts of - the code. - -Warning: pay attention when looking at the code to the catcode configuration -as found in \csbXINT{setcatcodes} from \xintkernelnameimp. Additional -temporary configuration is used at some locations. For example |!| is of -catcode letter in \xintexprnameimp and there are locations with funny catcodes -e.g. using some letters with the math shift catcode. - \MakePercentIgnore %\def\gardesactifs {^^A %\catcode`\<=0 \catcode`\>=11 \catcode`\*=11 \catcode`\/=11 } @@ -20533,8 +21564,9 @@ e.g. using some letters with the math shift catcode. %\let<*xintkernel>\gardesinactifs %</dtx>^^A-------------------------------------------------------- %<*xintkernel>^^A------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintkernelnameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section {Package \xintkernelnameimp implementation} % \RaisedLabel{sec:kernelimp} % @@ -20563,6 +21595,11 @@ e.g. using some letters with the math shift catcode. % Fix the |1.4| added bug that |\XINTrestorecatcodes| forgot to restore % the catcode of |^||^A| which is set to |3| by |\XINTsetcatcodes|. % +% \changed{1.4m} +% Fix incompatibility under \eTeX{} with \ctanpackage{miniltx}, if latter was +% loaded before \xintexprnameimp. The fix happens here because it relates to +% matters of |\ProvidesPackage|. +% % \subsection{Catcodes, \protect\eTeX{} and reload detection} % % The code for reload detection was initially copied from \textsc{Heiko @@ -20571,7 +21608,8 @@ e.g. using some letters with the math shift catcode. % The method for catcodes was also initially directly inspired by these % packages. % -% \lverb|1.4l replaces Info level user messages issued in case of problems +%\begin{lverb} +% 1.4l replaces Info level user messages issued in case of problems % such as \numexpr not being available with Warning level messages (in the % LaTeX terminolgy). Should arguably be Error level in that case. % @@ -20581,7 +21619,8 @@ e.g. using some letters with the math shift catcode. % debugging. Starting with 1.4l, it will abort input silently in such case. % % Also at 1.4l I refactored a bit the loading code in the xint*sty files for -% no real reason other than losing time.| +% no real reason other than losing time. +%\end{lverb} % \begin{macrocode} \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode13=5 % ^^M @@ -20595,7 +21634,7 @@ e.g. using some letters with the math shift catcode. \def\space{ }\newlinechar10 \let\z\relax \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintkernel Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -20614,11 +21653,14 @@ e.g. using some letters with the math shift catcode. % \subsubsection{\csh{XINTrestorecatcodes}, \csh{XINTsetcatcodes}, % \csh{XINTrestorecatcodesendinput}} % \changed{1.4e} -% \lverb|Renamed \XINT{set,restore}catcodes +%\begin{lverb} +% Renamed \XINT{set,restore}catcodes % to be without underscores, to facilitate the reloading process -% for xintlog.sty and xinttrig.sty in uncontrolled contexts.| +% for xintlog.sty and xinttrig.sty in uncontrolled contexts. +%\end{lverb} % \changed{1.4l} -% \lverb|Fix the 1.4 bug of omission of \catcode1 restore. +%\begin{lverb} +% Fix the 1.4 bug of omission of \catcode1 restore. % % Reordered all catcodes assignements for easier maintenance and dropped most % disparate indications of which packages make use of which settings. @@ -20628,14 +21670,15 @@ e.g. using some letters with the math shift catcode. % % However \edef needs usually { and } so there is a potential difficulty with % telling people to do \edef\myrestore{\XINTrestorecatcodes}, and I almost -% added at 1.4l some \XINTsettorestore:#1->\edef#1{\XINTrestorecatcodes} but +% added at 1.4l some \XINTsettorestore$empty:#1->\edef#1{\XINTrestorecatcodes} but % well, this is not public interface anyhow. The reloading method of % xintlog.sty and xinttrig.sty does protect itself though against such irreal % usage possibility with non standard { or }. % % Removed at 1.4l the \XINT_setcatcodes and \XINT_restorecatcodes not used % anywhere now. Used by old version of xintsession.tex, but not anymore since -% a while.| +% a while. +%\end{lverb} % \begin{macrocode} \def\PrepareCatcodes {% @@ -20679,9 +21722,11 @@ e.g. using some letters with the math shift catcode. \endlinechar=\the\endlinechar\relax }% % \end{macrocode} -% \lverb|The \noexpand here is required. This feels to me a bit surprising, +%\begin{lverb} +% The \noexpand here is required. This feels to me a bit surprising, % but is a fact, and the source of this must be in the \edef implementation -% but I have not checked it out at this time.| +% but I have not checked it out at this time. +%\end{lverb} % \begin{macrocode} \edef\XINTrestorecatcodesendinput {% @@ -20741,24 +21786,44 @@ e.g. using some letters with the math shift catcode. % \end{macrocode} % \subsection{Package identification} % -% Inspired from \textsc{Heiko Oberdiek}'s packages. Modified in |1.09b| to allow -% re-use in the other modules. Also I assume now that if |\ProvidesPackage| +% Inspired from \textsc{Heiko Oberdiek}'s packages.% +% \changed{1.09b} +% Re-usability in the other modules. Also I assume now that if |\ProvidesPackage| % exists it then does define |\ver@<pkgname>.sty|, code of |HO| for some reason % escaping me (compatibility with LaTeX 2.09 or other things ??) seems to set -% extra precautions. -% -% |1.09c| uses e-\TeX{} |\ifdefined|. +% extra precautions. [nine years later I understood my mistake, see below]. +% +% \changed{1.09c} +% Usage of \eTeX{} |\ifdefined|. +% +% \changed[2022/06/09]{1.4m} +% Nine years too late, I understand that the |HO| \myenquote{extra +% precautions} were there for some respectable reasons including +% |etex+miniltx| and surely other things I can not imagine. So let's now make +% sure |\ver@xintkernel.sty| and friends get defined on load, even if +% |\ProvidesPackage| exists! However I remain careless in using |\ifdefined| +% which could be fooled if some previous macro file ended up testing for +% |\ProvidesPackage| in a way letting it to |\relax|. I do not test for that. +% If I fixed that carelessness here I would have to fix it in other places +% where I use similarly |\ifdefined\RequirePackage| or +% |\ifdefined\PackageWarning| or whatever. % \begin{macrocode} \ifdefined\ProvidesPackage - \let\XINT_providespackage\relax + \def\XINT_providespackage\ProvidesPackage#1[#2]{% + \ProvidesPackage{#1}[{#2}]% + \expandafter\ifx\csname ver@#1.sty\endcsname\relax + \expandafter\xdef\csname ver@#1.sty\endcsname{#2}% + \fi + }% \else - \def\XINT_providespackage #1#2[#3]% - {\immediate\write-1{Package: #2 #3}% - \expandafter\xdef\csname ver@#2.sty\endcsname{#3}}% + \def\XINT_providespackage\ProvidesPackage#1[#2]{% + \immediate\write-1{Package: #1 #2}% + \expandafter\xdef\csname ver@#1.sty\endcsname{#2}% + }% \fi \XINT_providespackage \ProvidesPackage {xintkernel}% - [2022/05/29 v1.4l Paraphernalia for the xint packages (JFB)]% + [2022/06/10 v1.4m Paraphernalia for the xint packages (JFB)]% % \end{macrocode} % \subsection{Constants} % \begin{macrocode} @@ -20899,7 +21964,10 @@ e.g. using some letters with the math shift catcode. % \changed{1.09} % |\xint_bye| % \changed{1.2i} -% |\xint_Bye| for \csbxint{DSRr} and \csbxint{Round}. Also |\xint_stop_afterbye|. +%^^A test de lverb +%\begin{lverb} +% \xint_Bye for \xintDSRr and \xintRound. Also \xint_stop_afterbye. +%\end{lverb} % \begin{macrocode} \long\def\xint_bye #1\xint_bye {}% \long\def\xint_Bye #1\xint_bye {}% @@ -20910,13 +21978,14 @@ e.g. using some letters with the math shift catcode. % \changed{1.2} Names without underscores. % % To be used this way: -% \lverb| +%\begin{lverb} %( \if..\xint_dothis{..}\fi %: \if..\xint_dothis{..}\fi %: \if..\xint_dothis{..}\fi %: ...more such... %: \xint_orthat{...} -%) | +%) +%\end{lverb} % Ancient testing indicated it is more efficient to list first the more % improbable clauses. % \begin{macrocode} @@ -20927,7 +21996,6 @@ e.g. using some letters with the math shift catcode. % \end{macrocode} % \subsection{\csh{xint_zapspaces}} % \changed{1.1} -% % This little (quite fragile in the normal sense i.e. non robust in the normal % sense of programming lingua) utility zaps leading, intermediate, trailing, % spaces in completely expanding context (|\edef|, |\csname...\endcsname|). @@ -21083,8 +22151,10 @@ e.g. using some letters with the math shift catcode. \long\def\XINT_last_loop_endh #1#2#3#4#5#6#7#8#9\xint_bye{ #8}% % \end{macrocode} % \subsection{\csh{xintFirstItem}} -% \lverb|1.4. There must be neither \xint: -% nor \xint_bye in its first item.| +%\begin{lverb} +% 1.4. There must be neither \xint: +% nor \xint_bye in its first item. +%\end{lverb} % \begin{macrocode} \def\xintFirstItem {\romannumeral0\xintfirstitem }% \long\def\xintfirstitem #1{\XINT_firstitem #1{\xint:\XINT_firstitem_end}\xint_bye}% @@ -21092,7 +22162,7 @@ e.g. using some letters with the math shift catcode. \def\XINT_firstitem_end\xint:{ }% % \end{macrocode} % \subsection{\csh{xintLastOne}} -% \lverb|& +%\begin{lverb} % % As xintexpr 1.4 uses {c1}{c2}....{cN} storage when gathering comma separated % values we need to not handle identically an empty list and a list with an @@ -21106,7 +22176,7 @@ e.g. using some letters with the math shift catcode. % % The \xint: token must not be found (visible) among the item contents. % -% | +%\end{lverb} % \begin{macrocode} \def\xintLastOne {\romannumeral0\xintlastone }% \long\def\xintlastone #1% @@ -21133,7 +22203,7 @@ e.g. using some letters with the math shift catcode. \long\def\XINT_lastone_loop_endh #1#2#3#4#5#6#7#8#9\xint_bye{ #8}% % \end{macrocode} % \subsection{\csh{xintFirstOne}} -% \lverb|& +%\begin{lverb} % For xintexpr 1.4 too. Jan 3, 2020. % % This is an experimental macro, don't use it. If input is nil (empty set) it @@ -21145,7 +22215,7 @@ e.g. using some letters with the math shift catcode. % (we could first test if empty via combination with \detokenize), etc...) % as I need to get xint 1.4 out soon. So in particular attention that % the macro assumes the \xint: token is absent from first item of input. -% | +%\end{lverb} % \begin{macrocode} \def\xintFirstOne {\romannumeral0\xintfirstone }% \long\def\xintfirstone #1{\XINT_firstone #1{\xint:\XINT_firstone_empty}\xint:}% @@ -21196,7 +22266,6 @@ e.g. using some letters with the math shift catcode. % \end{macrocode} % \subsection{\csh{xintreplicate}, \csh{xintReplicate}} % \changed{1.2i} -% % This is cloned from LaTeX3's |\prg_replicate:nn|, see Joseph's post % at % \centeredline{http://tex.stackexchange.com/questions/16189/repeat-command-n-times} @@ -21274,7 +22343,6 @@ e.g. using some letters with the math shift catcode. % \end{macrocode} % \subsection{\csh{xintgobble}, \csh{xintGobble}} % \changed{1.2i} -% % I hesitated about allowing as many as |9^6-1=531440| tokens to gobble, but % |9^5-1=59058| is too low for playing with long decimal expansions. % \centeredline{Usage: |\romannumeral\xintgobble{N}...|} @@ -21477,7 +22545,7 @@ e.g. using some letters with the math shift catcode. % % \def\xintsession{\ctanpackage{xintsession}} % -% \lverb`& +%\begin{lverb} % I. Explanations on 2021/05/19 and 2021/05/20 before final change % % First I tried out things with undefined control sequence such as @@ -21530,7 +22598,7 @@ e.g. using some letters with the math shift catcode. %) % % 1) When in the context, what happens with ^^J is independent of the setting of -% \newlinechar: and with TeXLive pdflatex the ^^J will induce a linebreak, but +% \newlinechar, and with TeXLive pdflatex the ^^J will induce a linebreak, but % with xelatex it must be used with option -8bit. % % $noindent2) When in the control sequence name the behaviour in log/terminal of ^^J is @@ -21605,15 +22673,16 @@ e.g. using some letters with the math shift catcode. % sequence. The cases with or without \newlinechar being 10 diverge a bit, as % in the latter case I had to ensure acceptable linebreaks at 79 chars, and I % did that first and then had spent enough time on the matter not to add more -% to backport the latest ^^J style message.` +% to backport the latest ^^J style message. +%\end{lverb} +% \changed[2022/06/05]{1.4m} +% Shorten the error message. I am always too verbose initially. % \begin{macrocode} \ifnum\newlinechar=10 \expandafter\def\csname -romannumeral (or \string\expanded,&&J \space -\string\numexpr, ...) expansion could produce its final output.&&J \space -See above the exception specifics.&&J \space -xint will try to recover (if in interactive mode, hit <return>&&J \space -at the ? prompt) and will go ahead hoping repair\endcsname +xint<...> is done, but will resume:&&J \space +hit <return> at the ? prompt to try fixing the error above&&J \space +which has been encountered before expansion\endcsname #1\xint:{}% \def\XINT_expandableerror#1{% \def\XINT_expandableerror##1{% @@ -21621,17 +22690,14 @@ at the ? prompt) and will go ahead hoping repair\endcsname \XINT_expandableerrorcontinue #1! xint error: ##1\par }}\expandafter\XINT_expandableerror\csname -romannumeral (or \string\expanded,&&J \space -\string\numexpr, ...) expansion could produce its final output.&&J \space -See above the exception specifics.&&J \space -xint will try to recover (if in interactive mode, hit <return>&&J \space -at the ? prompt) and will go ahead hoping repair\endcsname +xint<...> is done, but will resume:&&J \space +hit <return> at the ? prompt to try fixing the error above&&J \space +which has been encountered before expansion\endcsname \else \expandafter\def\csname -numexpr or \string\expanded\space or \string\romannumeral\space expansion -could terminate because an exception was raised (see the above short explanation for -specifics). xint will now try to recover (hit <return> if in interactive -mode) and will go ahead hoping repair\endcsname +xint<...> is done, but will resume: hit <return> +at \space the ? prompt to try fixing the error +encountered before expansion\endcsname #1\xint:{}% \def\XINT_expandableerror#1{% \def\XINT_expandableerror##1{% @@ -21639,12 +22705,45 @@ mode) and will go ahead hoping repair\endcsname \XINT_expandableerrorcontinue #1! xint error: ##1\par }}\expandafter\XINT_expandableerror\csname -numexpr or \string\expanded\space or \string\romannumeral\space expansion -could terminate because an exception was raised (see the above short explanation for -specifics). xint will now try to recover (hit <return> if in interactive -mode) and will go ahead hoping repair\endcsname +xint<...> is done, but will resume: hit <return> +at \space the ? prompt to try fixing the error +encountered before expansion\endcsname \fi \def\XINT_expandableerrorcontinue#1\par{#1}% +% \end{macrocode} +% \subsection{The \csh{xintstrcmp} as alias of the engine primitive} +% \added[2022/06/05]{1.4m} +% For the \LuaTeX{} engine the code is copied over from |l3names.dtx|. I also +% looked at Heiko Oberdiek's |pdftexcmds.sty| and |pdftexcmds.lua|, but I +% removed |\luaescapestring| and used |token.scan_string()| as seen in +% |l3names.dtx| (and I did try to inform myself about this in the \LuaTeX{} +% manual, but only briefly). I am not sure about my syntax with the +% |local|'s. And should I use |\directlua0|? Testing was minimal +% Thus, we proceed at the user own risk. +% \begin{macrocode} +\ifdefined\strcmp\let\xintstrcmp\strcmp +\else\ifdefined\pdfstrcmp\let\xintstrcmp\pdfstrcmp +\else\ifdefined\directlua\directlua{% +xintkernel = xintkernel or {} +local minus_tok = token.new(string.byte'-', 12) +local zero_tok = token.new(string.byte'0', 12) +local one_tok = token.new(string.byte'1', 12) +function xintkernel.strcmp() + local A = token.scan_string() + local B = token.scan_string() + if A < B then + tex.write(minus_tok, one_tok) + else + tex.write(A == B and zero_tok or one_tok) + end +end +}\def\xintstrcmp{% + \directlua{xintkernel.strcmp()}% +}% +\else +\xintMessage{xintkernel}{Error}{Could not set-up \string\xintstrcmp.}% +\errhelp{What kind of format are you using? Perhaps write the author? Bye now}% +\errmessage{Sorry, could not find or define string comparison primitive}\fi\fi\fi \XINTrestorecatcodesendinput% % \end{macrocode} % \StoreCodelineNo {xintkernel} @@ -21654,15 +22753,16 @@ mode) and will go ahead hoping repair\endcsname %\let<*xinttools>\gardesinactifs %</xintkernel>^^A------------------------------------------------- %<*xinttools>^^A-------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xinttoolsnameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xinttoolsnameimp implementation} % \RaisedLabel{sec:toolsimp} % % \localtableofcontents % -% Release |1.09g| of |2013/11/22| splits off |xinttools.sty| from |xint.sty|. -% Starting with |1.1|, \xinttoolsnameimp ceases being loaded automatically by +% \added{1.09g} Splits off \xinttoolsnameimp from \xintnameimp. +% \changed{1.1} \xinttoolsnameimp ceases being loaded automatically by % \xintnameimp. % % \subsection{Catcodes, \protect\eTeX{} and reload detection} @@ -21689,7 +22789,7 @@ mode) and will go ahead hoping repair\endcsname \expandafter\let\expandafter\x\csname ver@xinttools.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintkernel.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xinttools Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -21720,27 +22820,29 @@ mode) and will go ahead hoping repair\endcsname % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xinttools}% - [2022/05/29 v1.4l Expandable and non-expandable utilities (JFB)]% + [2022/06/10 v1.4m Expandable and non-expandable utilities (JFB)]% % \end{macrocode} -% \lverb|\XINT_toks is used in macros such as \xintFor. It is not used -% elsewhere in the xint bundle.| +%\begin{lverb} +% \XINT_toks is used in macros such as \xintFor. It is not used +% elsewhere in the xint bundle. +%\end{lverb} % \begin{macrocode} \newtoks\XINT_toks \xint_firstofone{\let\XINT_sptoken= } %<- space here! % \end{macrocode} % \subsection{\csh{xintgodef}, \csh{xintgoodef}, \csh{xintgfdef}} -% \lverb|1.09i. For use in \xintAssign.| +% \added{1.09i} For use in |\xintAssign|. % \begin{macrocode} \def\xintgodef {\global\xintodef }% \def\xintgoodef {\global\xintoodef }% \def\xintgfdef {\global\xintfdef }% % \end{macrocode} % \subsection{\csh{xintRevWithBraces}} -% \lverb|New with 1.06. Makes the expansion of its argument and then reverses +% \added{1.06} Makes the expansion of its argument and then reverses % the resulting tokens or braced tokens, adding a pair of braces to each (thus, % maintaining it when it was already there.) The reason for -% \xint:, here and in other locations, is in case #1 expands to nothing, -% the \romannumeral-`0 must be stopped| +% |\xint:|, here and in other locations, is in case |#1| expands to nothing, +% the |\romannumeral-`0| must be stopped. % \begin{macrocode} \def\xintRevWithBraces {\romannumeral0\xintrevwithbraces }% \def\xintRevWithBracesNoExpand {\romannumeral0\xintrevwithbracesnoexpand }% @@ -21778,24 +22880,28 @@ mode) and will go ahead hoping repair\endcsname \R\XINT_revwbr_finish_c \xint_gobble_i\Z }% % \end{macrocode} -% \lverb|1.1c revisited this old code and improved upon the earlier endings.| +%\begin{lverb} +% 1.1c revisited this old code and improved upon the earlier endings. +%\end{lverb} % \begin{macrocode} \def\XINT_revwbr_finish_c#1{% \def\XINT_revwbr_finish_c##1##2\Z{\expandafter#1##1}% }\XINT_revwbr_finish_c{ }% % \end{macrocode} % \subsection{\csh{xintZapFirstSpaces}} -% \lverb|1.09f, written [2013/11/01]. Modified (2014/10/21) for release 1.1 to +% \added[2013/11/01]{1.09f} +% \changed[2014/10/21]{1.1} To % correct the bug in case of an empty argument, or argument containing only % spaces, which had been forgotten in first version. New version is simpler than -% the initial one. This macro does NOT expand its argument.| +% the initial one. This macro does NOT expand its argument. % \begin{macrocode} \def\xintZapFirstSpaces {\romannumeral0\xintzapfirstspaces }% \def\xintzapfirstspaces#1{\long \def\xintzapfirstspaces ##1{\XINT_zapbsp_a #1##1\xint:#1#1\xint:}% }\xintzapfirstspaces{ }% % \end{macrocode} -% \lverb|If the original #1 started with a space, the grabbed #1 is empty. Thus +%\begin{lverb} +% If the original #1 started with a space, the grabbed #1 is empty. Thus % _again? will see #1=\xint_bye, and hand over control to _again which will loop % back into \XINT_zapbsp_a, with one initial space less. If the original #1 did % not start with a space, or was empty, then the #1 below will be a <sptoken>, @@ -21804,7 +22910,8 @@ mode) and will go ahead hoping repair\endcsname % if none preexisted, <sptoken> and all of #1 (possibly empty) plus an ending % \xint:. The added initial space will stop later the \romannumeral0. No % brace stripping is possible. Control is handed over to \XINT_zapbsp_b which -% strips out the ending \xint:<sp><sp>\xint:| +% strips out the ending \xint:<sp><sp>\xint: +%\end{lverb} % \begin{macrocode} \def\XINT_zapbsp_a#1{\long\def\XINT_zapbsp_a ##1#1#1{% \XINT_zapbsp_again?##1\xint_bye\XINT_zapbsp_b ##1#1#1}% @@ -21814,54 +22921,65 @@ mode) and will go ahead hoping repair\endcsname \long\def\XINT_zapbsp_b #1\xint:#2\xint:{#1}% % \end{macrocode} % \subsection{\csh{xintZapLastSpaces}} -% \lverb+1.09f, written [2013/11/01]. + +% \added[2013/11/01]{1.09f} % \begin{macrocode} \def\xintZapLastSpaces {\romannumeral0\xintzaplastspaces }% \def\xintzaplastspaces#1{\long \def\xintzaplastspaces ##1{\XINT_zapesp_a {}\empty##1#1#1\xint_bye\xint:}% }\xintzaplastspaces{ }% % \end{macrocode} -% \lverb|The \empty from \xintzaplastspaces is to prevent brace removal in the -% #2 below. The \expandafter chain removes it.| +%\begin{lverb} +% The \empty from \xintzaplastspaces is to prevent brace removal in the +% #2 below. The \expandafter chain removes it. +%\end{lverb} % \begin{macrocode} \xint_firstofone {\long\def\XINT_zapesp_a #1#2 } %<- second space here {\expandafter\XINT_zapesp_b\expandafter{#2}{#1}}% % \end{macrocode} -% \lverb|Notice again an \empty added here. This is in preparation for possibly looping +%\begin{lverb} +% Notice again an \empty added here. This is in preparation for possibly looping % back to \XINT_zapesp_a. If the initial #1 had no <sp><sp>, the stuff however % will not loop, because #3 will already be <some spaces>\xint_bye. Notice % that this macro fetches all way to the ending \xint:. This looks not % very efficient, but how often do we have to strip ending spaces from -% something which also has inner stretches of _multiple_ space tokens ?;-). | +% something which also has inner stretches of _multiple_ space tokens ?;-). +%\end{lverb} % \begin{macrocode} \long\def\XINT_zapesp_b #1#2#3\xint:% {\XINT_zapesp_end? #3\XINT_zapesp_e {#2#1}\empty #3\xint:}% % \end{macrocode} -% \lverb|When we have been over all possible <sp><sp> things, we reach the +%\begin{lverb} +% When we have been over all possible <sp><sp> things, we reach the % ending space tokens, and #3 will be a bunch of spaces (possibly none) % followed by \xint_bye. So the #1 in _end? will be \xint_bye. In all other cases % #1 can not be \xint_bye (assuming naturally this token does nor arise in % original input), hence control falls back to \XINT_zapesp_e which will loop back -% to \XINT_zapesp_a.| +% to \XINT_zapesp_a. +%\end{lverb} % \begin{macrocode} \long\def\XINT_zapesp_end? #1{\xint_bye #1\XINT_zapesp_end }% % \end{macrocode} -% \lverb|We are done. The #1 here has accumulated all the previous material, -% and is stripped of its ending spaces, if any.| +%\begin{lverb} +% We are done. The #1 here has accumulated all the previous material, +% and is stripped of its ending spaces, if any. +%\end{lverb} % \begin{macrocode} \long\def\XINT_zapesp_end\XINT_zapesp_e #1#2\xint:{ #1}% % \end{macrocode} -% \lverb|We haven't yet reached the end, so we need to re-inject two space -% tokens after what we have gotten so far. Then we loop.| +%\begin{lverb} +% We haven't yet reached the end, so we need to re-inject two space +% tokens after what we have gotten so far. Then we loop. +%\end{lverb} % \begin{macrocode} \def\XINT_zapesp_e#1{% \long\def\XINT_zapesp_e ##1{\XINT_zapesp_a {##1#1#1}}% }\XINT_zapesp_e{ }% % \end{macrocode} % \subsection{\csh{xintZapSpaces}} -% \lverb+1.09f, written [2013/11/01]. Modified for 1.1, 2014/10/21 as it has the -% same bug as \xintZapFirstSpaces. We in effect do first \xintZapFirstSpaces, -% then \xintZapLastSpaces.+ +% \added[2013/11/01]{1.09f} +% \changed[2014/10/21]{1.1} It had the +% same bug as |\xintZapFirstSpaces|. We in effect do first |\xintZapFirstSpaces|, +% then |\xintZapLastSpaces|. % \begin{macrocode} \def\xintZapSpaces {\romannumeral0\xintzapspaces }% \def\xintzapspaces#1{% @@ -21881,8 +22999,8 @@ mode) and will go ahead hoping repair\endcsname }\XINT_zapsp_c{ }% % \end{macrocode} % \subsection{\csh{xintZapSpacesB}} -% \lverb+1.09f, written [2013/11/01]. Strips up to one pair of braces (but then -% does not strip spaces inside).+ +% \added[2013/11/01]{1.09f} Strips up to one pair of braces (but then +% does not strip spaces inside). % \begin{macrocode} \def\xintZapSpacesB {\romannumeral0\xintzapspacesb }% \long\def\xintzapspacesb #1{\XINT_zapspb_one? #1\xint:\xint:% @@ -21898,18 +23016,19 @@ mode) and will go ahead hoping repair\endcsname \xint_bye #1\xint:\xint_bye\xintzapspaces #2{ #1}% % \end{macrocode} % \subsection{\csh{xintCSVtoList}, \csh{xintCSVtoListNonStripped}} -% \lverb|\xintCSVtoList transforms a,b,..,z into {a}{b}...{z}. The comma -% separated list may be a macro which is first f-expanded. First included in -% release 1.06. Here, use of \Z (and \R) perfectly safe. -% -% [2013/11/02]: Starting with 1.09f, automatically filters items with -% \xintZapSpacesB to strip away all spaces around commas, and spaces at the start -% and end of the list. The original is kept as \xintCSVtoListNonStripped, and is +% \added{1.06} +%\begin{lverb} \xintCSVtoList transforms a,b,..,z into {a}{b}...{z}. The comma +% separated list may be a macro which is first f-expanded. Here, use of \Z +% (and \R) perfectly safe. +%\end{lverb} +% \changed[2013/11/02]{1.09f} Automatically filters items with +% |\xintZapSpacesB| to strip away all spaces around commas, and spaces at the start +% and end of the list. The original is kept as |\xintCSVtoListNonStripped|, and is % faster. But ... it doesn't strip spaces. % % ATTENTION: if the input is empty the output contains one item (empty, of -% course). This means an \xintFor loop always executes at least once the -% iteration, contrarily to \xintFor*.| +% course). This means an |\xintFor| loop always executes at least once the +% iteration, contrarily to |\xintFor*|. % \begin{macrocode} \def\xintCSVtoList {\romannumeral0\xintcsvtolist }% \long\def\xintcsvtolist #1{\expandafter\xintApply @@ -21946,10 +23065,12 @@ mode) and will go ahead hoping repair\endcsname \XINT_csvtol_finish_b #3\R,\R,\R,\R,\R,\R,\R,\Z #2{#1}% }% % \end{macrocode} -% \lverb|1.1c revisits this old code and improves upon the earlier endings. +%\begin{lverb} +% 1.1c revisits this old code and improves upon the earlier endings. % But as the _d.. macros have already nine parameters, I needed the % \expandafter and \xint_gob_til_Z in finish_b (compare \XINT_keep_endb, or -% also \XINT_RQ_end_b).| +% also \XINT_RQ_end_b). +%\end{lverb} % \begin{macrocode} \def\XINT_csvtol_finish_b #1,#2,#3,#4,#5,#6,#7,#8\Z {% @@ -21975,21 +23096,25 @@ mode) and will go ahead hoping repair\endcsname { #9{#1}{#2}{#3}{#4}{#5}{#6}{#7}}% % \end{macrocode} % \subsection{\csh{xintListWithSep}} -% \lverb|1.04. +% \added{1.04} +%\begin{lverb} % \xintListWithSep {\sep}{{a}{b}...{z}} returns a \sep b \sep ....\sep z. It % f-expands its second argument. The 'sep' may be \par's: the macro % \xintlistwithsep etc... are all declared long. 'sep' does not have to be a % single token. It is not expanded. The "list" argument may be empty. % % \xintListWithSepNoExpand does not f-expand its second argument. -% +%\end{lverb} +% \changed{1.2p} +%\begin{lverb} % This venerable macro from 1.04 remained unchanged for a long time and was % finally refactored at 1.2p for increased speed. Tests done with a list of % identical {\x} items and a sep of \z demonstrated a speed increase of about: %( - 3x for 30 items, %: - 4.5x for 100 items, %: - 7.5x--8x for 1000 items. -%) | +%) +%\end{lverb} % \begin{macrocode} \def\xintListWithSep {\romannumeral0\xintlistwithsep }% \def\xintListWithSepNoExpand {\romannumeral0\xintlistwithsepnoexpand }% @@ -22036,7 +23161,10 @@ mode) and will go ahead hoping repair\endcsname { #2}% % \end{macrocode} % \subsection{\csh{xintNthElt}} -% \lverb?First included in release 1.06. Last refactored in 1.2j. +% \added{1.06} +% \changed{1.2j} +%\begin{lverb} +% Last refactored in 1.2j. % % \xintNthElt {i}{List} returns the i th item from List (one pair of braces % removed). The list is first f-expanded. The \xintNthEltNoExpand does no @@ -22048,7 +23176,7 @@ mode) and will go ahead hoping repair\endcsname % Negative values return the |i|th element from the end. % % When i is out of range, an empty value is returned. -% ? +%\end{lverb} % \begin{macrocode} \def\xintNthElt {\romannumeral0\xintnthelt }% \def\xintNthEltNoExpand {\romannumeral0\xintntheltnoexpand }% @@ -22097,9 +23225,8 @@ mode) and will go ahead hoping repair\endcsname }\XINT_nthelt_pos_done{ }% % \end{macrocode} % \subsection{\csh{xintNthOnePy}} -% \lverb| -% First included in release 1.4. See relevant code comments in xintexpr. -% | +% \added{1.4} +% See relevant code comments in \xintexprnameimp. % \begin{macrocode} \def\xintNthOnePy {\romannumeral0\xintnthonepy }% \def\xintNthOnePyNoExpand {\romannumeral0\xintnthonepynoexpand }% @@ -22146,10 +23273,8 @@ mode) and will go ahead hoping repair\endcsname }\XINT_nthonepy_nonneg_done{ }% % \end{macrocode} % \subsection{\csh{xintKeep}} -% \lverb@& -% -% First included in release 1.09m. -% +% \added{1.09m} +%\begin{lverb} % \xintKeep{i}{L} f-expands its second argument L. It then grabs the first i % items from L and discards the rest. % @@ -22163,13 +23288,13 @@ mode) and will go ahead hoping repair\endcsname % (with no braces added.) % % \xintKeepNoExpand does not expand the L argument. -% -% -% +%\end{lverb} +% \changed{1.2i} +%\begin{lverb} % Prior to 1.2i the code proceeded along a loop with no pre-computation of % the length of L, for the i>0 case. The faster 1.2i version takes advantage % of novel \xintLengthUpTo from xintkernel.sty. -% @ +%\end{lverb} % \begin{macrocode} \def\xintKeep {\romannumeral0\xintkeep }% \def\xintKeepNoExpand {\romannumeral0\xintkeepnoexpand }% @@ -22239,14 +23364,16 @@ mode) and will go ahead hoping repair\endcsname #1#2\xint_bye { #1}% % \end{macrocode} % \subsection{\csh{xintKeepUnbraced}} -% \lverb?1.2a. Same as \xintKeep but will *not* add (or maintain) brace pairs +% \added{1.2a} +%\begin{lverb} +% Same as \xintKeep but will *not* add (or maintain) brace pairs % around the kept items when length(L)>i>0. % % The name may cause a mis-understanding: for i<0, (i.e. keeping only % trailing items), there is no brace removal at all happening. +%\end{lverb} % -% Modified for 1.2i like \xintKeep. -% ? +% \changed{1.2i} As |\xintKeep|. % \begin{macrocode} \def\xintKeepUnbraced {\romannumeral0\xintkeepunbraced }% \def\xintKeepUnbracedNoExpand {\romannumeral0\xintkeepunbracednoexpand }% @@ -22301,10 +23428,8 @@ mode) and will go ahead hoping repair\endcsname #1#2\xint_bye { #1}% % \end{macrocode} % \subsection{\csh{xintTrim}} -% \lverb?& -% -% First included in release 1.09m. -% +% \added{1.09m} +%\begin{lverb} % \xintTrim{i}{L} f-expands its second argument L. It then removes the first i % items from L and keeps the rest. For i equal or larger to the number N of % items in (expanded) L, the macro returns an empty output. For i=0, the @@ -22313,11 +23438,13 @@ mode) and will go ahead hoping repair\endcsname % items. For |i|>= N, the empty list is returned. % % \xintTrimNoExpand does not expand the L argument. -% -% Speed improvements with 1.2i for i<0 branch (which hands over to +%\end{lverb} +% \changed{1.2i} +%\begin{lverb} +% Speed improvements for i<0 branch (which hands over to % \xintKeep). Speed improvements with 1.2j for i>0 branch which gobbles items % nine by nine despite not knowing in advance if it will go too far. -% ? +%\end{lverb} % \begin{macrocode} \def\xintTrim {\romannumeral0\xinttrim }% \def\xintTrimNoExpand {\romannumeral0\xinttrimnoexpand }% @@ -22353,9 +23480,11 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_trim_trimall {\expandafter#1\xint_bye}% }\XINT_trim_trimall{ }% % \end{macrocode} -% \lverb|This branch doesn't pre-evaluate the length of the list argument. +%\begin{lverb} +% This branch doesn't pre-evaluate the length of the list argument. % Redone again for 1.2j, manages to trim nine by nine. Some non optimal -% looking aspect of the code is for allowing sharing with \xintNthElt.| +% looking aspect of the code is for allowing sharing with \xintNthElt. +%\end{lverb} % \begin{macrocode} \long\def\XINT_trim_pos #1.#2% {% @@ -22385,7 +23514,8 @@ mode) and will go ahead hoping repair\endcsname \long\def\XINT_trim_pos_done #1\xint:#2\xint_bye {#1}% % \end{macrocode} % \subsection{\csh{xintTrimUnbraced}} -% \lverb?1.2a. Modified in 1.2i like \xintTrim? +% \added{1.2a} +% \changed{1.2i} As |\xintTrim|. % \begin{macrocode} \def\xintTrimUnbraced {\romannumeral0\xinttrimunbraced }% \def\xintTrimUnbracedNoExpand {\romannumeral0\xinttrimunbracednoexpand }% @@ -22420,9 +23550,12 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintApply}} -% \lverb|\xintApply {\macro}{{a}{b}...{z}} returns {\macro{a}}...{\macro{b}} +% \added{1.04} +%\begin{lverb} +% \xintApply {\macro}{{a}{b}...{z}} returns {\macro{a}}...{\macro{b}} % where each instance of \macro is f-expanded. The list itself is first -% f-expanded and may thus be a macro. Introduced with release 1.04.| +% f-expanded and may thus be a macro. +%\end{lverb} % \begin{macrocode} \def\xintApply {\romannumeral0\xintapply }% \def\xintApplyNoExpand {\romannumeral0\xintapplynoexpand }% @@ -22445,7 +23578,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter #1#2#3{ #2}% % \end{macrocode} % \subsection{\csh{xintApply:x} (WIP, commented-out)} -% \lverb|Done for 1.4 (2020/01/27). For usage in the NumPy-like slicing +% \added[2020/01/27]{1.4} +%\begin{lverb} +% For usage in the NumPy-like slicing % routines. Well, actually, in the end I sticked with old-fashioned (quadratic % cost) \xintApply for 1.4 2020/01/31 release. See comments there. % @@ -22528,13 +23663,16 @@ mode) and will go ahead hoping repair\endcsname %: \XINT_apply:x_loop {#1}$% %: }$% %) -% | +%\end{lverb} % \subsection{\csh{xintApplyUnbraced}} -% \lverb|\xintApplyUnbraced {\macro}{{a}{b}...{z}} returns \macro{a}...\macro{z} +% \added{1.06b} +%\begin{lverb} +% \xintApplyUnbraced {\macro}{{a}{b}...{z}} returns \macro{a}...\macro{z} % where each instance of \macro is f-expanded using \romannumeral-`0. The second % argument may be a macro as it is itself also f-expanded. No braces % are added: this allows for example a non-expandable \def in \macro, without -% having to do \gdef. Introduced with release 1.06b.| +% having to do \gdef. +%\end{lverb} % \begin{macrocode} \def\xintApplyUnbraced {\romannumeral0\xintapplyunbraced }% \def\xintApplyUnbracedNoExpand {\romannumeral0\xintapplyunbracednoexpand }% @@ -22557,7 +23695,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter #1#2#3{ #2}% % \end{macrocode} % \subsection{\csh{xintApplyUnbraced:x} (WIP, commented-out)} -% \lverb|Done for 1.4, 2020/01/27. For usage in the NumPy-like slicing +% \added[2020/01/27]{1.4} +%\begin{lverb} +% For usage in the NumPy-like slicing % routines. % % The items should not contain \xint: and the applied macro should not contain @@ -22565,8 +23705,11 @@ mode) and will go ahead hoping repair\endcsname % % Finally, xintexpr.sty 1.4 code did not use this macro but the f-expandable % one \xintApplyUnbraced. -% -% For 1.4b I prefer leave the code commented out, and classify it as WIP. +%\end{lverb} +% \changed{1.4b} +%\begin{lverb} +% For 1.4b I prefer to keep the \xintApplyUnbraced:x code commented out, +% and classify it as WIP. %( \long\def\xintApplyUnbraced:x #1#2$% %: {$% %: \XINT_applyunbraced:x_loop {#1}#2$% @@ -22618,10 +23761,10 @@ mode) and will go ahead hoping repair\endcsname %: #6\empty %: #7\empty#8\xint_bye{#1#2#3#4#5#6#7}$% %) -% | +%\end{lverb} % \subsection{\csh{xintZip} (WIP, not public)} -% \lverb|1.4b. (2020/02/25) -% +% \added[2020/02/25]{1.4b} +%\begin{lverb} % Support for zip(). Requires \expanded. % % The implementation here thus considers the argument is already completely @@ -22643,7 +23786,8 @@ mode) and will go ahead hoping repair\endcsname % had to double the whole thing simply to avoid the overhead of having to grab % the final result delimited by some % \xint_bye\xint_bye\xint_bye\xint_bye\empty terminator. Now actually rather -% \xint_bye\xint_bye\xint_bye\xint_bye\xint: | +% \xint_bye\xint_bye\xint_bye\xint_bye\xint: +%\end{lverb} % \begin{macrocode} \def\xintZip #1{\expanded\XINT_zip_A#1\xint_bye\xint_bye}% \def\XINT_zip_A#1% @@ -22673,7 +23817,8 @@ mode) and will go ahead hoping repair\endcsname \xint_bye #4\XINT_ziptwo_e \xint_bye \xint_bye #9\XINT_ziptwo_e \xint_bye {{#4}#9}% % \end{macrocode} -% \lverb|Attention here that #6 can very well deliver no tokens at all. But +%\begin{lverb} +% Attention here that #6 can very well deliver no tokens at all. But % the \ifx will then do the expected thing. Only mentioning! % % By the way, the \xint_bye method means TeX needs to look into tokens @@ -22685,7 +23830,7 @@ mode) and will go ahead hoping repair\endcsname % than \ifnum to check for 0000 in numerical core context for example, at the % early days when xint used blocks of 4 digits, not 8), or usage of \if/\ifx % only on single tokens, combined with some \xint_dothis/\xint_orthat syntax. -% | +%\end{lverb} % \begin{macrocode} \ifx \empty#6\expandafter\XINT_zipone_a\fi \XINT_ziptwo_b #5\xint: @@ -22754,8 +23899,9 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_zipone_end #1\XINT_zipone_B #2\xint:#3\xint:{\iffalse{\fi}}% % \end{macrocode} % \subsection{\csh{xintSeq}} -% \lverb|1.09c. Without the optional argument puts stress on the input stack, -% should not be used to generated thousands of terms then.| +% \added{1.09c} +% Without the optional argument puts stress on the input stack, +% should not be used to generated thousands of terms then. % % \changed{1.4j} % This venerable macro had a brace removal bug in case it produced a single @@ -22888,9 +24034,10 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_seqo_nd #1#2#3#4{\XINT_seqo_nb {#1}{#2}{#3}{#4{#1}}}% % \end{macrocode} -%\subsection{\csh{xintloop}, \csh{xintbreakloop}, \csh{xintbreakloopanddo}, +% \subsection{\csh{xintloop}, \csh{xintbreakloop}, \csh{xintbreakloopanddo}, % \csh{xintloopskiptonext}} -% \lverb|1.09g [2013/11/22]. Made long with 1.09h.| +% \added[2013/11/22]{1.09g} +% \changed{1.09h} Made |\long|. % \begin{macrocode} \long\def\xintloop #1#2\repeat {#1#2\xintloop_again\fi\xint_gobble_i {#1#2}}% \long\def\xintloop_again\fi\xint_gobble_i #1{\fi @@ -22909,9 +24056,10 @@ mode) and will go ahead hoping repair\endcsname % \csh{xintbreakiloopanddo}, % \csh{xintiloopskiptonext}, % \csh{xintiloopskipandredo}} -% \lverb|1.09g [2013/11/22]. Made long with 1.09h. -% -% «braced» variants added (2018/04/24) for 1.3b.| +% \added[2013/11/22]{1.09g} +% \changed{1.09h} Made |\long|. +% \added[2018/04/24]{1.3b} +% \myenquote{braced} variants. % \begin{macrocode} \def\xintiloop [#1+#2]{% \expandafter\xintiloop_a\the\numexpr #1\expandafter.\the\numexpr #2.}% @@ -22940,8 +24088,9 @@ mode) and will go ahead hoping repair\endcsname #4\xintiloop_again\fi\xint_gobble_iii {#2}{#3}{#4}}% % \end{macrocode} % \subsection{\csh{XINT_xflet}} -% \lverb|1.09e [2013/10/29]: we f-expand unbraced tokens and swallow arising -% space tokens until the dust settles.| +% \added[2013/10/29]{1.09e} +% We f-expand unbraced tokens and swallow arising +% space tokens until the dust settles. % \begin{macrocode} \def\XINT_xflet #1% {% @@ -22980,13 +24129,16 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintApplyInline}} -% \lverb|1.09a: \xintApplyInline\macro{{a}{b}...{z}} has the same effect as +% \added{1.09a} +%\begin{lverb} +% \xintApplyInline\macro{{a}{b}...{z}} has the same effect as % executing \macro{a} and then applying again \xintApplyInline to the shortened % list {{b}...{z}} until nothing is left. This is a non-expandable command % which will result in quicker code than using \xintApplyUnbraced. It f-expands % its second (list) argument first, which may thus be encapsulated in a macro. -% -% Rewritten in 1.09c. Nota bene: uses catcode 3 Z as privated list terminator.| +%\end{lverb} +% \changed{1.09c} +% Rewritten. Nota bene: uses catcode 3 Z as privated list terminator. % \begin{macrocode} \catcode`Z 3 \long\def\xintApplyInline #1#2% @@ -23024,29 +24176,38 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintFor}, \csh{xintFor*}, \csh{xintBreakFor}, \csh{xintBreakForAndDo}} -% \lverb|1.09c [2013/10/09]: a new kind of loop which uses macro parameters +% \added[2013/10/09]{1.09c} +%\begin{lverb} +% A new kind of loop which uses macro parameters % #1, #2, #3, #4 rather than macros; while not expandable it survives executing % code closing groups, like what happens in an alignment with the $& character. % When inserted in a macro for later use, the # character must be doubled. % % The non-star variant works on a csv list, which it expands once, the % star variant works on a token list, which it (repeatedly) f-expands. -% -% 1.09e adds \XINT_forever with \xintintegers, \xintdimensions, \xintrationals +%\end{lverb} +% \changed{1.09e} +%\begin{lverb} +% Adds \XINT_forever with \xintintegers, \xintdimensions, \xintrationals % and \xintBreakFor, \xintBreakForAndDo, \xintifForFirst, \xintifForLast. On % this occasion \xint_firstoftwo and \xint_secondoftwo are made long. -% -% 1.09f: rewrites large parts of \xintFor code in order to filter the comma +%\end{lverb} +% \changed[2013/11/03]{1.09f} +%\begin{lverb} +% Rewrites large parts of \xintFor code in order to filter the comma % separated list via \xintCSVtoList which gets rid of spaces. The #1 in % \XINT_for_forever? has an initial space token which serves two purposes: % preventing brace stripping, and stopping the expansion made by \xintcsvtolist. % If the \XINT_forever branch is taken, the added space will not be a problem % there. % -% 1.09f rewrites (2013/11/03) the code which now allows all macro parameters +% Now allows all macro parameters % from #1 to #9 in \xintFor, \xintFor*, and \XINT_forever. -% 1.2i: slightly more robust \xintifForFirst/Last in case of nesting. -% | +%\end{lverb} +% \changed{1.2i} +%\begin{lverb} +% Slightly more robust \xintifForFirst/Last in case of nesting. +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa #1#2{\ifnum #2<#1 \xint_afterfi {{#########2}}\fi}% \def\XINT_tmpb #1#2{\ifnum #1<#2 \xint_afterfi {{#########2}}\fi}% @@ -23148,13 +24309,20 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{XINT_forever}, \csh{xintintegers}, \csh{xintdimensions}, \csh{xintrationals}} -% \lverb|New with 1.09e. But this used inadvertently \xintiadd/\xintimul which -% have the unnecessary \xintnum overhead. Changed in 1.09f to use +% \added{1.09e} +%\begin{lverb} +% But this used inadvertently \xintiadd/\xintimul which +% have the unnecessary \xintnum overhead. +%\end{lverb} +% \changed{1.09f} +%\begin{lverb} +% Use % \xintiiadd/\xintiimul which do not have this overhead. Also 1.09f uses % \xintZapSpacesB for the \xintrationals case to get rid of leading and ending % spaces in the #4 and #5 delimited parameters of \XINT_forever_opt_a % (for \xintintegers and \xintdimensions this is not necessary, due to the use -% of \numexpr resp. \dimexpr in \XINT_?expr_Ua, resp.\XINT_?expr_Da).| +% of \numexpr resp. \dimexpr in \XINT_?expr_Ua, resp.\XINT_?expr_Da). +%\end{lverb} % \begin{macrocode} \catcode`U 3 \catcode`D 3 @@ -23249,17 +24417,20 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintForpair}, \csh{xintForthree}, \csh{xintForfour}} -% \lverb|1.09c. -% -% [2013/11/02] 1.09f \xintForpair delegate to \xintCSVtoList and its +% \added{1.09c} +% \changed[2013/11/02]{1.09f} +%\begin{lverb} +% \xintForpair delegate to \xintCSVtoList and its % \xintZapSpacesB the handling of spaces. Does not share code with \xintFor % anymore. % -% [2013/11/03] 1.09f: \xintForpair extended to accept #1#2, #2#3 etc... up to +% \xintForpair extended to accept #1#2, #2#3 etc... up to % #8#9, \xintForthree, #1#2#3 up to #7#8#9, \xintForfour id. -% -% 1.2i: slightly more robust \xintifForFirst/Last in case of nesting. -% | +%\end{lverb} +% \changed{1.2i} +%\begin{lverb} +% Slightly more robust \xintifForFirst/Last in case of nesting. +%\end{lverb} % \begin{macrocode} \catcode`j 3 \long\def\xintForpair #1#2#3in#4#5#6% @@ -23323,16 +24494,20 @@ mode) and will go ahead hoping repair\endcsname \catcode`j 11 % \end{macrocode} % \subsection{\csh{xintAssign}, \csh{xintAssignArray}, \csh{xintDigitsOf}} -% \lverb|\xintAssign {a}{b}..{z}\to\A\B...\Z resp. \xintAssignArray +%\begin{lverb} +% \xintAssign {a}{b}..{z}\to\A\B...\Z resp. \xintAssignArray % {a}{b}..{z}\to\U. % % \xintDigitsOf=\xintAssignArray. -% -% 1.1c 2015/09/12 has (belatedly) corrected some "features" of +%\end{lverb} +% \changed[2015/09/12]{1.1c} +%\begin{lverb} +% Belatedly corrects some "features" of % \xintAssign which didn't like the case of a space right before the "\to", or % the case with the first token not an opening brace and the subsequent % material containing brace groups. The new code handles gracefully these -% situations.| +% situations. +%\end{lverb} % \begin{macrocode} \def\xintAssign{\def\XINT_flet_macro {\XINT_assign_fork}\XINT_flet_zapsp }% \def\XINT_assign_fork @@ -23369,8 +24544,8 @@ mode) and will go ahead hoping repair\endcsname }% \long\def\XINT_assign_c #1% {% - \def\xint_temp {#1}% - \ifx\xint_temp\xint_bracedstopper + \def\XINT_assign_tmp {#1}% + \ifx\XINT_assign_tmp\xint_bracedstopper \expandafter\XINT_assign_e \else \expandafter\XINT_assign_d @@ -23378,7 +24553,7 @@ mode) and will go ahead hoping repair\endcsname }% \long\def\XINT_assign_d #1\to #2% {% - \expandafter\XINT_assign_def\expandafter #2\expandafter{\xint_temp}% + \expandafter\XINT_assign_def\expandafter #2\expandafter{\XINT_assign_tmp}% \XINT_assign_c #1\to }% \def\XINT_assign_e #1\to {}% @@ -23429,8 +24604,8 @@ mode) and will go ahead hoping repair\endcsname }% \long\def\XINT_assignarray_loop #1% {% - \def\xint_temp {#1}% - \ifx\xint_temp\xint_bracedstopper + \def\XINT_assign_tmp {#1}% + \ifx\XINT_assign_tmp\xint_bracedstopper \expandafter\def\csname\xint_arrayname 0\expandafter\endcsname \expandafter{\the\numexpr\xint_itemcount}% \expandafter\expandafter\expandafter\XINT_assignarray_end @@ -23439,7 +24614,7 @@ mode) and will go ahead hoping repair\endcsname {\the\numexpr\xint_itemcount+\xint_c_i}% \expandafter\XINT_assignarray_def \csname\xint_arrayname\xint_itemcount\expandafter\endcsname - \expandafter{\xint_temp }% + \expandafter{\XINT_assign_tmp }% \expandafter\XINT_assignarray_loop \fi }% @@ -23466,8 +24641,8 @@ mode) and will go ahead hoping repair\endcsname }% \let\xintDigitsOf\xintAssignArray % \end{macrocode} -%\subsection{CSV (non user documented) variants of Length, Keep, Trim, NthElt, Reverse} -% +% \subsection{CSV (non user documented) variants of Length, Keep, Trim, NthElt, Reverse} +% \changed{1.2j} % These routines are for use by |\xintListSel:x:csv| and |\xintListSel:f:csv| % from \xintexprnameimp, and also for the |reversed| and |len| functions. % Refactored for |1.2j| release, following |1.2i| updates to |\xintKeep|, @@ -23539,8 +24714,10 @@ mode) and will go ahead hoping repair\endcsname % described above) are to be considered \emph{unstable} for the time being. % % \subsubsection{\csh{xintLength:f:csv}} -% \lverb|1.2g. Redone for 1.2j. Contrarily to \xintLength from xintkernel.sty, -% this one expands its argument.| +% \added{1.2g} +% \changed{1.2j} +% Contrarily to |\xintLength| from \xintkernelnameimp +% this one expands its argument. % \begin{macrocode} \def\xintLength:f:csv {\romannumeral0\xintlength:f:csv}% \def\xintlength:f:csv #1% @@ -23553,7 +24730,9 @@ mode) and will go ahead hoping repair\endcsname \relax }}\xintlength:f:csv { }% % \end{macrocode} -% \lverb|Must first check if empty list.| +%\begin{lverb} +% Must first check if empty list. +%\end{lverb} % \begin{macrocode} \long\def\XINT_length:f:csv_a #1% {% @@ -23569,10 +24748,13 @@ mode) and will go ahead hoping repair\endcsname #1,#2,#3,#4,#5,#6,#7,#8,#9,{#9\xint_bye}% % \end{macrocode} % \subsubsection{\csh{xintLengthUpTo:f:csv}} -% \lverb|1.2j. \xintLengthUpTo:f:csv{N}{comma-list}. No ending comma. Returns +% \added{1.2j} +%\begin{lverb} +% \added{1.2j}\xintLengthUpTo:f:csv{N}{comma-list}. No ending comma. Returns % -0 if length>N, else returns difference N-length. **N must be non-negative!!** % -% Attention to the dot after \xint_bye for the loop interface.| +% Attention to the dot after \xint_bye for the loop interface. +%\end{lverb} % \begin{macrocode} \def\xintLengthUpTo:f:csv {\romannumeral0\xintlengthupto:f:csv}% \long\def\xintlengthupto:f:csv #1#2% @@ -23585,7 +24767,9 @@ mode) and will go ahead hoping repair\endcsname \xint_c_iv,\xint_c_iii,\xint_c_ii,\xint_c_i,\xint_bye.% }% % \end{macrocode} -% \lverb|Must first recognize if empty list. If this is the case, return N.| +%\begin{lverb} +% Must first recognize if empty list. If this is the case, return N. +%\end{lverb} % \begin{macrocode} \long\def\XINT_lengthupto:f:csv_a #1.#2% {% @@ -23621,8 +24805,11 @@ mode) and will go ahead hoping repair\endcsname \krof }% % \end{macrocode} -%\subsubsection{\csh{xintKeep:f:csv}} -% \lverb|1.2g 2016/03/17. Redone for 1.2j with use of \xintLengthUpTo:f:csv. +% \subsubsection{\csh{xintKeep:f:csv}} +% \added[2016/03/17]{1.2g} +% \changed{1.2j} +%\begin{lverb} +% Redone with use of \xintLengthUpTo:f:csv. % Same code skeleton as \xintKeep but handling comma separated but non % terminated lists has complications. The \xintKeep in case of a negative #1 % uses \xintgobble, we don't have that for comma delimited items, hence we do @@ -23630,7 +24817,7 @@ mode) and will go ahead hoping repair\endcsname % xintgobble for a few dozens items and even more). The loop knows before % starting that it will not go too far. % -%| +%\end{lverb} % \begin{macrocode} \def\xintKeep:f:csv {\romannumeral0\xintkeep:f:csv }% \long\def\xintkeep:f:csv #1#2% @@ -23726,9 +24913,10 @@ mode) and will go ahead hoping repair\endcsname \long\expandafter\def\csname XINT_keep:f:csv_end8\endcsname #1#2\xint_bye {#1}% % \end{macrocode} -%\subsubsection{\csh{xintTrim:f:csv}} -% \lverb|1.2g 2016/03/17. Redone for 1.2j 2016/12/20 on the basis of new -% \xintTrim.| +% \subsubsection{\csh{xintTrim:f:csv}} +% \added[2016/03/17]{1.2g} +% \changed[2016/12/20]{1.2j} +% Redone on the basis of new |\xintTrim|. % \begin{macrocode} \def\xintTrim:f:csv {\romannumeral0\xinttrim:f:csv }% \long\def\xinttrim:f:csv #1#2% @@ -23807,9 +24995,11 @@ mode) and will go ahead hoping repair\endcsname \long\def\XINT_trim:f:csv_pos_done #1\xint:#2\xint_bye{#1}% % \end{macrocode} % \subsubsection{\csh{xintNthEltPy:f:csv}} -% \lverb|Counts like Python starting at zero. Last refactored with 1.2j. +%\begin{lverb} +% Counts like Python starting at zero. Last refactored with 1.2j. % Attention, makes currently no effort at removing leading spaces in the -% picked item.| +% picked item. +%\end{lverb} % \begin{macrocode} \def\xintNthEltPy:f:csv {\romannumeral0\xintntheltpy:f:csv }% \long\def\xintntheltpy:f:csv #1#2% @@ -23855,20 +25045,25 @@ mode) and will go ahead hoping repair\endcsname \xint_gob_til_xint:##1\XINT_nthelt:f:csv_pos_cleanup\xint:#1##1}% }\XINT_nthelt:f:csv_pos_done{ }% % \end{macrocode} -% \lverb|This strange thing is in case the picked item was the last one, hence +%\begin{lverb} +% This strange thing is in case the picked item was the last one, hence % there was an ending \xint: (we could not put a comma earlier for % matters of not confusing empty list with a singleton list), and we do this % here to activate brace-stripping of item as all other items may be % brace-stripped if picked. This is done for coherence. Of course, in the -% context of the xintexpr.sty parsers, there are no braces in list items...| +% context of the xintexpr.sty parsers, there are no braces in list items... +%\end{lverb} % \begin{macrocode} \xint_firstofone{\long\def\XINT_nthelt:f:csv_pos_cleanup\xint:} % #1\xint:{ #1}% % \end{macrocode} % \subsubsection{\csh{xintReverse:f:csv}} -% \lverb|1.2g. Contrarily to \xintReverseOrder from xintkernel.sty, this -% one expands its argument. Handles empty list too. 2016/03/17. -% Made \long for 1.2j.| +% \added[2016/03/17]{1.2g} +%\begin{lverb} +% Contrarily to \xintReverseOrder from xintkernel.sty, this +% one expands its argument. Handles empty list too. . +%\end{lverb} +% \changed{1.2j} Made |\long|. % \begin{macrocode} \def\xintReverse:f:csv {\romannumeral0\xintreverse:f:csv }% \long\def\xintreverse:f:csv #1% @@ -23892,8 +25087,11 @@ mode) and will go ahead hoping repair\endcsname \long\def\XINT_reverse:f:csv_finish #1\xint:,{ }% % \end{macrocode} % \subsubsection{\csh{xintFirstItem:f:csv}} -% \lverb|Added with 1.2k for use by first() in -% \xintexpr-essions, and some amount of compatibility with \xintNewExpr.| +% \added{1.2k} +%\begin{lverb} +% For use by first() in +% \xintexpr-essions, and some amount of compatibility with \xintNewExpr. +%\end{lverb} % \begin{macrocode} \def\xintFirstItem:f:csv {\romannumeral0\xintfirstitem:f:csv}% \long\def\xintfirstitem:f:csv #1% @@ -23903,10 +25101,13 @@ mode) and will go ahead hoping repair\endcsname \long\def\XINT_first:f:csv_a #1,#2\xint_bye{ #1}% % \end{macrocode} % \subsubsection{\csh{xintLastItem:f:csv}} -% \lverb|Added with 1.2k, based on and sharing code with xintkernel's +% \added{1.2k} +%\begin{lverb} +% Based on and sharing code with xintkernel's % \xintLastItem from 1.2i. Output empty if input empty. f-expands its argument % (hence first item, if not protected.) For use by last() in -% \xintexpr-essions with to some extent \xintNewExpr compatibility.| +% \xintexpr-essions with to some extent \xintNewExpr compatibility. +%\end{lverb} % \begin{macrocode} \def\xintLastItem:f:csv {\romannumeral0\xintlastitem:f:csv}% \long\def\xintlastitem:f:csv #1% @@ -23926,13 +25127,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsubsection{\csh{xintKeep:x:csv}} -% \lverb|Added to xintexpr at 1.2j. -% -% But data model changed at 1.4, this macro moved to xinttools, not part of +% \added{1.2j} To \xintexprnameimp. Moved here at |1.4|. +% Not part of % publicly supported macros, may be removed at any time. -% -% This macro is used only with positive first argument. -% | % \begin{macrocode} \def\xintKeep:x:csv #1#2% {% @@ -23981,11 +25178,13 @@ mode) and will go ahead hoping repair\endcsname % \csh{xintCSVNthEltPy}, \csh{xintCSVReverse}, % \csh{xintCSVFirstItem}, \csh{xintCSVLastItem}} % -% \lverb|Completely unstable macros: currently they expand the list argument +%\begin{lverb} +% Completely unstable macros: currently they expand the list argument % and want no final comma. But for matters of xintexpr.sty I could as well % decide to require a final comma, and then I could simplify implementation % but of course this would break the macros if used with current -% functionalities.| +% functionalities. +%\end{lverb} % \begin{macrocode} \let\xintCSVLength \xintLength:f:csv \let\xintCSVKeep \xintKeep:f:csv @@ -24005,8 +25204,9 @@ mode) and will go ahead hoping repair\endcsname %\let<*xintcore>\gardesinactifs %</xinttools>^^A-------------------------------------------------- %<*xintcore>^^A--------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintcorenameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xintcorenameimp implementation} % \RaisedLabel{sec:coreimp} % @@ -24048,7 +25248,7 @@ mode) and will go ahead hoping repair\endcsname \expandafter\let\expandafter\x\csname ver@xintcore.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintkernel.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintcore Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -24079,10 +25279,11 @@ mode) and will go ahead hoping repair\endcsname % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xintcore}% - [2022/05/29 v1.4l Expandable arithmetic on big integers (JFB)]% + [2022/06/10 v1.4m Expandable arithmetic on big integers (JFB)]% % \end{macrocode} % \subsection{(WIP!) Error conditions and exceptions} -% \lverb|As per the Mike Cowlishaw/IBM's General Decimal Arithmetic Specification +%\begin{lverb} +% As per the Mike Cowlishaw/IBM's General Decimal Arithmetic Specification % % http://speleotrove.com/decimal/decarith.html % @@ -24145,7 +25346,8 @@ mode) and will go ahead hoping repair\endcsname % I did it quickly, anyhow this will become more palpable when some of the % Decimal Specification is actually implemented. The plan is to first do the % X3.274 norm, then more complete implementation will follow... perhaps... -% | +%\end{lverb} +%\odef\MakePrivateLetters{\MakePrivateLetters\catcode`- 11}^^A % \begin{macrocode} \csname XINT_Clamped_istrapped\endcsname \csname XINT_ConversionSyntax_istrapped\endcsname @@ -24166,9 +25368,11 @@ mode) and will go ahead hoping repair\endcsname \xint_dothis{\csname XINT_#1-signal\endcsname}% \fi\xint_orthat{{#1}}{#1}}% \def\XINT_signalcondition_a #1#2#3#4#5{% copied over from Python Decimal module -% #1=signal, #2=condition, #3=explanation for user, -% #4=context for error handlers, #5=used - \ifcsname XINT_#1_isignoredflag\endcsname +% \end{macrocode} +% |#1|=signal, |#2|=condition, |#3|=explanation for user, +% |#4|=context for error handlers, |#5|=used. +% \begin{macrocode} +\ifcsname XINT_#1_isignoredflag\endcsname \xint_dothis{\csname XINT_#1.handler\endcsname {#4}}% \fi \expandafter\xint_gobble_i\csname XINT_#1Flag_ON\endcsname @@ -24179,8 +25383,8 @@ mode) and will go ahead hoping repair\endcsname % the flag raised is named after the signal #1, but we show condition % #2 % \end{macrocode} -% \lverb|& -% +% \let\MakePrivateLetters\xintMakePrivateLetters +%\begin{lverb} % On 2021/05/19, 1.4g, I re-examined \XINT_expandableerror experimenting % at first with an added ^^J to shift to next line the actual message. % @@ -24220,12 +25424,11 @@ mode) and will go ahead hoping repair\endcsname % The maximal size of #3 here was increased from 48 characters (method % with \xint/ being badly delimited), to now 55 characters, longer % messages being truncated at 56 characters with an appended "\ETC.". -% -% | +%\end{lverb} % \begin{macrocode} \XINT_expandableerror{#3}% % not for X3.274 - %\XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}% + % \XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}% \xint_firstofone{#5}% }% }% @@ -24248,6 +25451,7 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_RaiseFlag #1{\expandafter\xint_gobble_i\csname XINT_#1Flag_ON\endcsname}% % \end{macrocode} % NOT IMPLEMENTED! WORK IN PROGRESS! (ALL SIGNALS TRAPPED, NO HANDLERS USED) +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`. 11 }% % \begin{macrocode} \catcode`. 11 \let\XINT_Clamped.handler\xint_firstofone % WIP @@ -24264,6 +25468,7 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_Underflow.handler#1{_NaN}% WIP \catcode`. 12 % \end{macrocode} +% \let\MakePrivateLetters\xintMakePrivateLetters % \subsection{Counts for holding needed constants} % \begin{macrocode} \ifdefined\m@ne\let\xint_c_mone\m@ne @@ -24280,7 +25485,7 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection*{Routines handling integers as lists of token digits} % \addcontentsline{toc}{subsection}{Routines handling integers as lists of token digits} -% \lverb|& +%\begin{lverb} % Routines handling big integers which are lists of digit tokens with no % special additional structure. % @@ -24289,12 +25494,13 @@ mode) and will go ahead hoping repair\endcsname % or "\the\mathcode`\-", others do. % % These routines or their sub-routines are mainly for internal usage. -% | +%\end{lverb} % % \subsection{\csh{XINT_cuz_small}} -% \lverb|& +%\begin{lverb} % \XINT_cuz_small removes leading zeroes from the first eight digits. Expands -% following \romannumeral0. At least one digit is produced.| +% following \romannumeral0. At least one digit is produced. +%\end{lverb} % \begin{macrocode} \def\XINT_cuz_small#1{% \def\XINT_cuz_small ##1##2##3##4##5##6##7##8% @@ -24302,8 +25508,8 @@ mode) and will go ahead hoping repair\endcsname \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8\relax }}\XINT_cuz_small{ }% % \end{macrocode} -% \subsection{\csh{xintNum}, \csh{xintiNum}} -% \lverb|& +% \subsection{\cshnolabel{xintNum}, \csh{xintiNum}} +%\begin{lverb} % For example \xintNum {----+-+++---+----000000000000003} % % Very old routine got completely rewritten at 1.2l. @@ -24319,9 +25525,7 @@ mode) and will go ahead hoping repair\endcsname % % Also, up to 1.2k inclusive, the macro fetched tokens eight by eight, and not % nine by nine as is done now. I have no idea why. -% -% \xintNum gets redefined by $xintfracnameimp. -% | +%\end{lverb} % \begin{macrocode} \def\xintiNum {\romannumeral0\xintinum }% \def\xintinum #1% @@ -24331,6 +25535,10 @@ mode) and will go ahead hoping repair\endcsname }% \def\xintNum {\romannumeral0\xintnum }% \let\xintnum\xintinum +% \end{macrocode} +% Attention |\xintnum| (hence |\xintNum|) gets redefined by +% \xintfracnameimp. Click on names to see the redefinition there. +% \begin{macrocode} \def\XINT_num #1% {% \expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop @@ -24342,20 +25550,20 @@ mode) and will go ahead hoping repair\endcsname #1#2#3#4#5#6#7#8#9% \ifnum \numexpr #1#2#3#4#5#6#7#8#9+\xint_c_ = \xint_c_ % \end{macrocode} -% \lverb|& +%\begin{lverb} % means that so far only signs encountered, (if syntax is legal) then possibly % zeroes % or a terminated or not terminated \numexpr evaluating to zero % In that latter case a correct zero will be produced in the end. -% | +%\end{lverb} % \begin{macrocode} \expandafter\XINT_num_loop \else % \end{macrocode} -% \lverb|& +%\begin{lverb} % non terminated \numexpr (with nine tokens total) are % safe as after \fi, there is then \xint: -% | +%\end{lverb} % \begin{macrocode} \expandafter\relax \fi @@ -24364,11 +25572,11 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_num_cleanup #1\xint:#2\Z { #1}% % \end{macrocode} % \subsection{\csh{xintiiSgn}} -% \lverb|& +%\begin{lverb} % 1.2l made \xintiiSgn robust against non terminated input. % % 1.2o deprecates here \xintSgn (it requires xintfrac.sty). -% | +%\end{lverb} % \begin{macrocode} \def\xintiiSgn {\romannumeral0\xintiisgn }% \def\xintiisgn #1% @@ -24401,9 +25609,11 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiOpp}} -% \lverb|Attention, \xintiiOpp non robust against non terminated inputs. +%\begin{lverb} +% Attention, \xintiiOpp non robust against non terminated inputs. % Reason is I don't want to have to grab a delimiter at the end, as everything -% happens "upfront".| +% happens "upfront". +%\end{lverb} % \begin{macrocode} \def\xintiiOpp {\romannumeral0\xintiiopp }% \def\xintiiopp #1% @@ -24421,9 +25631,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiAbs}} -% \lverb|& +%\begin{lverb} % Attention \xintiiAbs non robust against non terminated input. -%| +%\end{lverb} % \begin{macrocode} \def\xintiiAbs {\romannumeral0\xintiiabs }% \def\xintiiabs #1% @@ -24446,12 +25656,13 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintFDg}} -% \lverb|& +%\begin{lverb} % FIRST DIGIT. % % 1.2l: \xintiiFDg made robust against non terminated input. % -% 1.2o deprecates \xintiiFDg, gives to \xintFDg former meaning of \xintiiFDg.| +% 1.2o deprecates \xintiiFDg, gives to \xintFDg former meaning of \xintiiFDg. +%\end{lverb} % \begin{macrocode} \def\xintFDg {\romannumeral0\xintfdg }% \def\xintfdg #1{\expandafter\XINT_fdg \romannumeral`&&@#1\xint:\Z}% @@ -24467,7 +25678,7 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintLDg}} -% \lverb|& +%\begin{lverb} % LAST DIGIT. % % Rewritten for 1.2i (2016/12/10). Surprisingly perhaps, it is faster than @@ -24476,7 +25687,7 @@ mode) and will go ahead hoping repair\endcsname % 1.2o deprecates \xintiiLDg, gives to \xintLDg former meaning of \xintiiLDg. % % Attention \xintLDg non robust against non terminated input. -% | +%\end{lverb} % \begin{macrocode} \def\xintLDg {\romannumeral0\xintldg }% \def\xintldg #1{\expandafter\XINT_ldg_fork\romannumeral`&&@#1% @@ -24501,7 +25712,9 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % % \subsection{\csh{xintDouble}} -% \lverb|Attention \xintDouble non robust against non terminated input.| +%\begin{lverb} +% Attention \xintDouble non robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintDouble {\romannumeral0\xintdouble}% \def\xintdouble #1{\expandafter\XINT_dbl_fork\romannumeral`&&@#1% @@ -24523,7 +25736,9 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_dbl_e#1{*\xint_c_ii\if#13+\xint_c_i\fi\relax}% % \end{macrocode} % \subsection{\csh{xintHalf}} -% \lverb|Attention \xintHalf non robust against non terminated input.| +%\begin{lverb} +% Attention \xintHalf non robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintHalf {\romannumeral0\xinthalf}% \def\xinthalf #1{\expandafter\XINT_half_fork\romannumeral`&&@#1% @@ -24531,7 +25746,7 @@ mode) and will go ahead hoping repair\endcsname *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax}% \def\XINT_half_fork #1% {% - \xint_UDsignfork + \xint_UDsignfork #1\XINT_half_neg -\XINT_half \krof #1% @@ -24547,12 +25762,14 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_half_e#1{*\xint_c_v+#1-\xint_c_v)\relax}% % \end{macrocode} % \subsection{\csh{xintInc}} -% \lverb|1.2i much delayed complete rewrite in 1.2 style. +%\begin{lverb} +% 1.2i much delayed complete rewrite in 1.2 style. % % As we take 9 by 9 with the input save stack at 5000 this allows a bit less % than 9 times 2500 = 22500 digits on input. % -% Attention \xintInc non robust against non terminated input.| +% Attention \xintInc non robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintInc {\romannumeral0\xintinc}% \def\xintinc #1{\expandafter\XINT_inc_fork\romannumeral`&&@#1% @@ -24575,10 +25792,12 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_inc_e#1{\if#12+\xint_c_i\fi\relax}% % \end{macrocode} % \subsection{\csh{xintDec}} -% \lverb|1.2i much delayed complete rewrite in the 1.2 style. Things are a +%\begin{lverb} +% 1.2i much delayed complete rewrite in the 1.2 style. Things are a % bit more complicated than \xintInc because 2999999999 is too big for TeX. % -% Attention \xintDec non robust against non terminated input.| +% Attention \xintDec non robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintDec {\romannumeral0\xintdec}% \def\xintdec #1{\expandafter\XINT_dec_fork\romannumeral`&&@#1% @@ -24604,11 +25823,13 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_dec_e#1{\unless\if#11\xint_dothis{-\xint_c_i#1}\fi\xint_orthat\relax}% % \end{macrocode} % \subsection{\csh{xintDSL}} -% \lverb|DECIMAL SHIFT LEFT (=MULTIPLICATION PAR 10). Rewritten for 1.2i. +%\begin{lverb} +% DECIMAL SHIFT LEFT (=MULTIPLICATION PAR 10). Rewritten for 1.2i. % This was very old code... I never came back to it, but I should have % rewritten it long time ago. % -% Attention \xintDSL non robust against non terminated input.| +% Attention \xintDSL non robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintDSL {\romannumeral0\xintdsl }% \def\xintdsl #1{\expandafter\XINT_dsl\romannumeral`&&@#10}% @@ -24618,10 +25839,12 @@ mode) and will go ahead hoping repair\endcsname \def\xint_dsl_zero 0 0{ }% % \end{macrocode} % \subsection{\csh{xintDSR}} -% \lverb|Decimal shift right, truncates towards zero. Rewritten for 1.2i. +%\begin{lverb} +% Decimal shift right, truncates towards zero. Rewritten for 1.2i. % Limited to 22483 digits on input. % -% Attention \xintDSR non robust against non terminated input.| +% Attention \xintDSR non robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintDSR{\romannumeral0\xintdsr}% \def\xintdsr #1{\expandafter\XINT_dsr_fork\romannumeral`&&@#1% @@ -24644,13 +25867,15 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_dsr_e #1{)\relax}% % \end{macrocode} % \subsection{\csh{xintDSRr}} -% \lverb|New with 1.2i. Decimal shift right, rounds away from zero; done in +%\begin{lverb} +% New with 1.2i. Decimal shift right, rounds away from zero; done in % the 1.2 spirit (with much delay, sorry). Used by \xintRound, \xintDivRound. % % This is about the first time I am happy that the division in \numexpr % rounds! % -% Attention \xintDSRr non robust against non terminated input.| +% Attention \xintDSRr non robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintDSRr{\romannumeral0\xintdsrr}% \def\xintdsrr #1{\expandafter\XINT_dsrr_fork\romannumeral`&&@#1% @@ -24674,10 +25899,13 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection*{Blocks of eight digits} % \addcontentsline{toc}{subsection}{Blocks of eight digits} -% \lverb|The lingua of release 1.2.| +%\begin{lverb} +% The lingua of release 1.2. +%\end{lverb} % % \subsection{\csh{XINT_cuz}} -% \lverb|This (launched by \romannumeral0) iterately removes all leading +%\begin{lverb} +% This (launched by \romannumeral0) iterately removes all leading % zeroes from a sequence of 8N digits ended by \R. % % Rewritten for 1.2l, now uses \numexpr governed expansion and \ifnum test @@ -24686,7 +25914,7 @@ mode) and will go ahead hoping repair\endcsname % Note 2015/11/28: with only four digits the gob_til_fourzeroes had proved % in some old testing faster than \ifnum test. But with eight digits, the % execution times are much closer, as I tested back then. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_cuz #1{% \def\XINT_cuz {\expandafter#1\the\numexpr\XINT_cuz_loop}% @@ -24704,9 +25932,11 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_cuz_cleantoend #1\R{\relax #1}% % \end{macrocode} % \subsection{\csh{XINT_cuz_byviii}} -% \lverb|This removes eight by eight leading zeroes from a sequence of 8N digits +%\begin{lverb} +% This removes eight by eight leading zeroes from a sequence of 8N digits % ended by \R. Thus, we still have 8N digits on output. Expansion started by -% \romannumeral0 | +% \romannumeral0 +%\end{lverb} % \begin{macrocode} \def\XINT_cuz_byviii #1#2#3#4#5#6#7#8#9% {% @@ -24720,7 +25950,8 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_unsep_loop}} % -% \lverb|This is used as +%\begin{lverb} +% This is used as %( \the\numexpr0\XINT_unsep_loop (blocks of 1<8digits>!)% %: \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax %) @@ -24736,7 +25967,8 @@ mode) and will go ahead hoping repair\endcsname % But these memory constraints related to \numexpr chaining seems to be in % many places in xint code base. The 1.2l version is written in the 1.2i style % of \xintInc etc... and is compatible with some 1! block without digits -% among the treated blocks, they will disappear.| +% among the treated blocks, they will disappear. +%\end{lverb} % \begin{macrocode} \def\XINT_unsep_loop #1!#2!#3!#4!#5!#6!#7!#8!#9!% {% @@ -24755,14 +25987,16 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_unsep_cuzsmall}} % -% \lverb|This is used as +%\begin{lverb} +% This is used as %( \romannumeral0\XINT_unsep_cuzsmall (blocks of 1<8d>!)% %: \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax %) % It removes the 1's and !'s, and removes the leading zeroes *of % the first block*. % -% Redone for 1.2l: the 1.2 variant was strangely in O(N^2) style.| +% Redone for 1.2l: the 1.2 variant was strangely in O(N^2) style. +%\end{lverb} % \begin{macrocode} \def\XINT_unsep_cuzsmall {% @@ -24776,14 +26010,16 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_div_unsepQ}} % -% \lverb|This is used by division to remove separators from the produced +%\begin{lverb} +% This is used by division to remove separators from the produced % quotient. The quotient is produced in the correct order. The routine will % also remove leading zeroes. An extra initial block of 8 zeroes is possible % and thus if present must be removed. Then the next eight digits must be % cleaned of leading zeroes. Attention that there might be a single % block of 8 zeroes. Expansion launched by \romannumeral0. % -% Rewritten for 1.2l in 1.2i style.| +% Rewritten for 1.2l in 1.2i style. +%\end{lverb} % \begin{macrocode} \def\XINT_div_unsepQ_delim {\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax\Z}% \def\XINT_div_unsepQ @@ -24806,7 +26042,8 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_div_unsepR}} % -% \lverb|This is used by division to remove separators from the produced +%\begin{lverb} +% This is used by division to remove separators from the produced % remainder. The remainder is here in correct order. It must be cleaned of % leading zeroes, possibly all the way. % @@ -24815,7 +26052,8 @@ mode) and will go ahead hoping repair\endcsname % Terminator \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax\R % % We have a need for something like \R because it is not guaranteed the thing -% is not actually zero.| +% is not actually zero. +%\end{lverb} % \begin{macrocode} \def\XINT_div_unsepR {% @@ -24827,11 +26065,12 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_zeroes_forviii}} % -% \lverb|& +%\begin{lverb} %( \romannumeral0\XINT_zeroes_forviii #1\R\R\R\R\R\R\R\R{10}0000001\W %) % produces a string of k 0's such that k+length(#1) is smallest bigger multiple -% of eight.| +% of eight. +%\end{lverb} % \begin{macrocode} \def\XINT_zeroes_forviii #1#2#3#4#5#6#7#8% {% @@ -24845,7 +26084,8 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_sepbyviii_Z}} % -% \lverb|This is used as +%\begin{lverb} +% This is used as %( \the\numexpr\XINT_sepbyviii_Z <8Ndigits>\XINT_sepbyviii_Z_end 2345678\relax %) % It produces 1<8d>!...1<8d>!1;! @@ -24853,7 +26093,8 @@ mode) and will go ahead hoping repair\endcsname % Prior to 1.2l it used \Z as terminator not the semi-colon (hence the name). % The switch to ; was done at a time I thought perhaps I would use an internal % format maintaining such 8 digits blocks, and this has to be compatible with -% the \csname...\endcsname encapsulation in \xintexpr parsers.| +% the \csname...\endcsname encapsulation in \xintexpr parsers. +%\end{lverb} % \begin{macrocode} \def\XINT_sepbyviii_Z #1#2#3#4#5#6#7#8% {% @@ -24863,7 +26104,8 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_sepbyviii_andcount}} % -% \lverb|This is used as +%\begin{lverb} +% This is used as %( \the\numexpr\XINT_sepbyviii_andcount <8Ndigits>$% %: \XINT_sepbyviii_end 2345678\relax %: \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!$% @@ -24873,7 +26115,8 @@ mode) and will go ahead hoping repair\endcsname %( 1<8d>!1<8d>!....1<8d>!1\xint:<count of blocks>\xint: %) % Used by -% \XINT_div_prepare_g for \XINT_div_prepare_h, and also by \xintiiCmp.| +% \XINT_div_prepare_g for \XINT_div_prepare_h, and also by \xintiiCmp. +%\end{lverb} % \begin{macrocode} \def\XINT_sepbyviii_andcount {% @@ -24897,7 +26140,8 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_rsepbyviii}} % -% \lverb|This is used as +%\begin{lverb} +% This is used as %( \the\numexpr1\XINT_rsepbyviii <8Ndigits>$% %: \XINT_rsepbyviii_end_A 2345678$% %: \XINT_rsepbyviii_end_B 2345678\relax UV$% @@ -24913,7 +26157,7 @@ mode) and will go ahead hoping repair\endcsname % The U an V should be \numexpr1 stoppers (or will expand and be ended by !). % This macro is currently (1.2..1.2l) exclusively used in combination with % \XINT_sepandrev_andcount or \XINT_sepandrev. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_rsepbyviii #1#2#3#4#5#6#7#8% {% @@ -24928,7 +26172,8 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_rsepbyviii_end_A #11#2\expandafter #3\relax #4#5{#5!1#2\xint:}% % \end{macrocode} % \subsection{\csh{XINT_sepandrev}} -% \lverb|This is used typically as +%\begin{lverb} +% This is used typically as %( \romannumeral0\XINT_sepandrev <8Ndigits>$% %: \XINT_rsepbyviii_end_A 2345678$% %: \XINT_rsepbyviii_end_B 2345678\relax UV$% @@ -24940,7 +26185,8 @@ mode) and will go ahead hoping repair\endcsname % where the blocks have % been globally reversed. The UV here are only place holders (must be \numexpr1 % stoppers) to share same -% syntax as \XINT_sepandrev_andcount, they are gobbled (#2 in \XINT_sepandrev_done).| +% syntax as \XINT_sepandrev_andcount, they are gobbled (#2 in \XINT_sepandrev_done). +%\end{lverb} % \begin{macrocode} \def\XINT_sepandrev {% @@ -24956,7 +26202,8 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_sepandrev_done #11#2!{ }% % \end{macrocode} % \subsection{\csh{XINT_sepandrev_andcount}} -% \lverb|This is used typically as +%\begin{lverb} +% This is used typically as %( \romannumeral0\XINT_sepandrev_andcount <8Ndigits>$% %: \XINT_rsepbyviii_end_A 2345678$% %: \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i @@ -24967,7 +26214,8 @@ mode) and will go ahead hoping repair\endcsname %( <length>.1<8digits>!1<8digits>!1<8digits>!... %) % where the -% blocks have been globally reversed and <length> is the number of blocks.| +% blocks have been globally reversed and <length> is the number of blocks. +%\end{lverb} % \begin{macrocode} \def\XINT_sepandrev_andcount {% @@ -24988,11 +26236,13 @@ mode) and will go ahead hoping repair\endcsname }\XINT_sepandrev_andcount_done{ }% % \end{macrocode} % \subsection{\csh{XINT_rev_nounsep}} -% \lverb|This is used as +%\begin{lverb} +% This is used as %( \romannumeral0\XINT_rev_nounsep {}<blocks 1<8d>!>\R!\R!\R!\R!\R!\R!\R!\R!\W %) % It reverses the blocks, keeping the 1's and ! separators. Used multiple -% times in the division algorithm. The inserted {} here is not optional.| +% times in the division algorithm. The inserted {} here is not optional. +%\end{lverb} % \begin{macrocode} \def\XINT_rev_nounsep #1#2!#3!#4!#5!#6!#7!#8!#9!% {% @@ -25003,13 +26253,15 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_rev_nounsep_done #11{ 1}% % \end{macrocode} % \subsection{\csh{XINT_unrevbyviii}} -% \lverb|Used as \romannumeral0\XINT_unrevbyviii 1<8d>!....1<8d>! terminated +%\begin{lverb} +% Used as \romannumeral0\XINT_unrevbyviii 1<8d>!....1<8d>! terminated % by %( 1;!1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W %) % The \romannumeral in unrevbyviii_a is for special effects (expand some token % which was put as 1<token>! at the end of the original blocks). This -% mechanism is used by 1.2 subtraction (still true for 1.2l).| +% mechanism is used by 1.2 subtraction (still true for 1.2l). +%\end{lverb} % \begin{macrocode} \def\XINT_unrevbyviii #11#2!1#3!1#4!1#5!1#6!1#7!1#8!1#9!% {% @@ -25021,10 +26273,12 @@ mode) and will go ahead hoping repair\endcsname {\expandafter#1\romannumeral`&&@\xint_gob_til_sc ##1}% }\XINT_unrevbyviii_a{ }% % \end{macrocode} -% \lverb|Can work with shorter ending pattern: 1;!1\R!1\R!1\R!1\R!1\R!1\R!\W +%\begin{lverb} +% Can work with shorter ending pattern: 1;!1\R!1\R!1\R!1\R!1\R!1\R!\W % but the longer one of unrevbyviii is ok here too. Used currently (1.2) only % by addition, now (1.2c) with long ending pattern. Does the final clean up of -% leading zeroes contrarily to general \XINT_unrevbyviii.| +% leading zeroes contrarily to general \XINT_unrevbyviii. +%\end{lverb} % \begin{macrocode} \def\XINT_smallunrevbyviii 1#1!1#2!1#3!1#4!1#5!1#6!1#7!1#8!#9\W% {% @@ -25033,7 +26287,8 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection*{Core arithmetic} % \addcontentsline{toc}{subsection}{Core arithmetic} -% \lverb|The four operations have been rewritten entirely for release 1.2. +%\begin{lverb} +% The four operations have been rewritten entirely for release 1.2. % The new routines works with separated blocks of eight digits. They all measure % first the lengths of the arguments, even addition and subtraction (this was % not the case with xintcore.sty 1.1 or earlier.) @@ -25046,10 +26301,13 @@ mode) and will go ahead hoping repair\endcsname % % Side remark: I tested that \the\numexpr was more efficient than \number. But % it reduced the allowable numbers for addition from 19976 digits to 19968 -% digits.| +% digits. +%\end{lverb} % % \subsection{\csh{xintiiAdd}} -% \lverb|1.2l: \xintiiAdd made robust against non terminated input.| +%\begin{lverb} +% 1.2l: \xintiiAdd made robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintiiAdd {\romannumeral0\xintiiadd }% \def\xintiiadd #1{\expandafter\XINT_iiadd\romannumeral`&&@#1\xint:}% @@ -25091,8 +26349,6 @@ mode) and will go ahead hoping repair\endcsname \X #1% }% \let\XINT_add_plusplus \XINT_add_pp_a -% \end{macrocode} -% \begin{macrocode} \def\XINT_add_pp_b #1\xint:#2\X #3\xint: {% \expandafter\XINT_add_checklengths @@ -25107,8 +26363,10 @@ mode) and will go ahead hoping repair\endcsname 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W }% % \end{macrocode} -% \lverb|I keep #1.#2. to check if at most 6 + 6 base 10^8 digits which can be -% treated faster for final reverse. But is this overhead at all useful ? | +%\begin{lverb} +% I keep #1.#2. to check if at most 6 + 6 base 10^8 digits which can be +% treated faster for final reverse. But is this overhead at all useful ? +%\end{lverb} % \begin{macrocode} \def\XINT_add_checklengths #1\xint:#2\xint:% {% @@ -25135,7 +26393,8 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_add_aa_small {\expandafter\XINT_smallunrevbyviii\the\numexpr\XINT_add_a \xint_c_ii}% % \end{macrocode} -% \lverb|2 as first token of #1 stands for "no carry", 3 will mean a carry (we +%\begin{lverb} +% 2 as first token of #1 stands for "no carry", 3 will mean a carry (we % are adding 1<8digits> to 1<8digits>.) Version 1.2c has terminators of the % shape 1;!, replacing the \Z! used in 1.2. % @@ -25149,7 +26408,7 @@ mode) and will go ahead hoping repair\endcsname % thus conveniently be reused as part of input terminator (up to the length % problem). % -%| +%\end{lverb} % \begin{macrocode} \def\XINT_add_a #1!#2!#3!#4!#5\W #6!#7!#8!#9!% @@ -25214,8 +26473,6 @@ mode) and will go ahead hoping repair\endcsname {% 1#2\expandafter!\the\numexpr\XINT_add_a #1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_add_k #1{\if #12\expandafter\XINT_add_ke\else\expandafter\XINT_add_l \fi}% \def\XINT_add_ke #11;#2\W {\XINT_add_kf #11;!}% \def\XINT_add_kf 1{1\relax }% @@ -25224,18 +26481,16 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_add_m #1!{\expandafter\XINT_add_n\the\numexpr\xint_c_i+#1\xint:}% \def\XINT_add_n #1#2\xint:{1#2\expandafter!\the\numexpr\XINT_add_o #1}% % \end{macrocode} -% \lverb|Here 2 stands for "carry", and 1 for "no carry" (we have been adding -% 1 to 1<8digits>.)| +%\begin{lverb} +% Here 2 stands for "carry", and 1 for "no carry" (we have been adding +% 1 to 1<8digits>.) +%\end{lverb} % \begin{macrocode} \def\XINT_add_o #1{\if #12\expandafter\XINT_add_l\else\expandafter\XINT_add_ke \fi}% % \end{macrocode} % \subsection{\csh{xintiiCmp}} -% \lverb|Moved from xint.sty to xintcore.sty and rewritten for 1.2l. -% -% 1.2l's \xintiiCmp is robust against non terminated input. -% -% 1.2o deprecates \xintCmp, with xintfrac loaded it will get overwritten anyhow. -%| +% \changed[2022/06/05]{1.4m} +% Now uses the |\xintstrcmp| engine primitive. % \begin{macrocode} \def\xintiiCmp {\romannumeral0\xintiicmp }% \def\xintiicmp #1{\expandafter\XINT_iicmp\romannumeral`&&@#1\xint:}% @@ -25277,67 +26532,86 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_cmp_minusplus #1\xint:#2\xint:{ -1}% \def\XINT_cmp_minusminus --{\expandafter\XINT_opp\romannumeral0\XINT_cmp_plusplus {}{}}% -\def\XINT_cmp_plusplus #1#2#3\xint: -{% - \expandafter\XINT_cmp_pp - \the\numexpr\expandafter\XINT_sepbyviii_andcount - \romannumeral0\XINT_zeroes_forviii #2#3\R\R\R\R\R\R\R\R{10}0000001\W - #2#3\XINT_sepbyviii_end 2345678\relax - \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!% - \xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W - #1% -}% -\def\XINT_cmp_pp #1\xint:#2\xint:#3\xint: -{% - \expandafter\XINT_cmp_checklengths - \the\numexpr #2\expandafter\xint:% - \the\numexpr\expandafter\XINT_sepbyviii_andcount - \romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W - #3\XINT_sepbyviii_end 2345678\relax - \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!% - \xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W - #1;!1;!1;!1;!\W -}% -\def\XINT_cmp_checklengths #1\xint:#2\xint:#3\xint: -{% - \ifnum #1=#3 - \expandafter\xint_firstoftwo - \else - \expandafter\xint_secondoftwo - \fi - \XINT_cmp_a {\XINT_cmp_distinctlengths {#1}{#3}}#2;!1;!1;!1;!\W +% \end{macrocode} +%\begin{lverb} +% The \romannumeral0 trigger induces some complications here to terminate +% nicely without grabbing too many tokens in the stream or deteriorating +% expansion quality of the non-equal-length branches. +% \expanded simplifies things. +%\end{lverb} +% \begin{macrocode} +\def\XINT_cmp_plusplus #1#2#3\xint:#4\xint:{\expanded{ % + \ifcase\expandafter\XINT_cntSgn\the\numexpr\xintLength{#1#4}-\xintLength{#2#3}\xint: + \xintstrcmp{#1#4}{#2#3}\or1\else-1\fi + }% }% -\def\XINT_cmp_distinctlengths #1#2#3\W #4\W -{% - \ifnum #1>#2 - \expandafter\xint_firstoftwo - \else - \expandafter\xint_secondoftwo - \fi - { -1}{ 1}% -}% -\def\XINT_cmp_a 1#1!1#2!1#3!1#4!#5\W 1#6!1#7!1#8!1#9!% -{% - \xint_gob_til_sc #1\XINT_cmp_equal ;% - \ifnum #1>#6 \XINT_cmp_gt\fi - \ifnum #1<#6 \XINT_cmp_lt\fi - \xint_gob_til_sc #2\XINT_cmp_equal ;% - \ifnum #2>#7 \XINT_cmp_gt\fi - \ifnum #2<#7 \XINT_cmp_lt\fi - \xint_gob_til_sc #3\XINT_cmp_equal ;% - \ifnum #3>#8 \XINT_cmp_gt\fi - \ifnum #3<#8 \XINT_cmp_lt\fi - \xint_gob_til_sc #4\XINT_cmp_equal ;% - \ifnum #4>#9 \XINT_cmp_gt\fi - \ifnum #4<#9 \XINT_cmp_lt\fi - \XINT_cmp_a #5\W -}% -\def\XINT_cmp_lt#1{\def\XINT_cmp_lt\fi ##1\W ##2\W {\fi#1-1}}\XINT_cmp_lt{ }% -\def\XINT_cmp_gt#1{\def\XINT_cmp_gt\fi ##1\W ##2\W {\fi#11}}\XINT_cmp_gt{ }% -\def\XINT_cmp_equal #1\W #2\W { 0}% % \end{macrocode} +% Prior to |1.4m| the «strcmp» primitive was not used by \xintcorenameimp. +% Here is the old implementation: +%\begin{lverb} +%( \def\XINT_cmp_plusplus #1#2#3\xint: +%: {$% +%: \expandafter\XINT_cmp_pp +%: \the\numexpr\expandafter\XINT_sepbyviii_andcount +%: \romannumeral0\XINT_zeroes_forviii #2#3\R\R\R\R\R\R\R\R{10}0000001\W +%: #2#3\XINT_sepbyviii_end 2345678\relax +%: \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!$% +%: \xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W +%: #1$% +%: }$% +%: \def\XINT_cmp_pp #1\xint:#2\xint:#3\xint: +%: {$% +%: \expandafter\XINT_cmp_checklengths +%: \the\numexpr #2\expandafter\xint:$% +%: \the\numexpr\expandafter\XINT_sepbyviii_andcount +%: \romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W +%: #3\XINT_sepbyviii_end 2345678\relax +%: \xint_c_vii!\xint_c_vi!\xint_c_v!\xint_c_iv!$% +%: \xint_c_iii!\xint_c_ii!\xint_c_i!\xint_c_\W +%: #1;!1;!1;!1;!\W +%: }$% +%: \def\XINT_cmp_checklengths #1\xint:#2\xint:#3\xint: +%: {$% +%: \ifnum #1=#3 +%: \expandafter\xint_firstoftwo +%: \else +%: \expandafter\xint_secondoftwo +%: \fi +%: \XINT_cmp_a {\XINT_cmp_distinctlengths {#1}{#3}}#2;!1;!1;!1;!\W +%: }$% +%: \def\XINT_cmp_distinctlengths #1#2#3\W #4\W +%: {$% +%: \ifnum #1>#2 +%: \expandafter\xint_firstoftwo +%: \else +%: \expandafter\xint_secondoftwo +%: \fi +%: { -1}{ 1}$% +%: }$% +%: \def\XINT_cmp_a 1#1!1#2!1#3!1#4!#5\W 1#6!1#7!1#8!1#9!$% +%: {$% +%: \xint_gob_til_sc #1\XINT_cmp_equal ;$% +%: \ifnum #1>#6 \XINT_cmp_gt\fi +%: \ifnum #1<#6 \XINT_cmp_lt\fi +%: \xint_gob_til_sc #2\XINT_cmp_equal ;$% +%: \ifnum #2>#7 \XINT_cmp_gt\fi +%: \ifnum #2<#7 \XINT_cmp_lt\fi +%: \xint_gob_til_sc #3\XINT_cmp_equal ;$% +%: \ifnum #3>#8 \XINT_cmp_gt\fi +%: \ifnum #3<#8 \XINT_cmp_lt\fi +%: \xint_gob_til_sc #4\XINT_cmp_equal ;$% +%: \ifnum #4>#9 \XINT_cmp_gt\fi +%: \ifnum #4<#9 \XINT_cmp_lt\fi +%: \XINT_cmp_a #5\W +%: }$% +%: \def\XINT_cmp_lt#1{\def\XINT_cmp_lt\fi ##1\W ##2\W {\fi#1-1}}\XINT_cmp_lt{ }$% +%: \def\XINT_cmp_gt#1{\def\XINT_cmp_gt\fi ##1\W ##2\W {\fi#11}}\XINT_cmp_gt{ }$% +%: \def\XINT_cmp_equal #1\W #2\W { 0}$% +%) +%\end{lverb} % \subsection{\csh{xintiiSub}} -% \lverb|Entirely rewritten for 1.2. +%\begin{lverb} +% Entirely rewritten for 1.2. % % Refactored at 1.2l. I was initially aiming at clinching some internal format % of the type 1<8digits>!....1<8digits>! for chaining the arithmetic @@ -25363,7 +26637,8 @@ mode) and will go ahead hoping repair\endcsname % there are many issues of this type. % % I considered also an approach like in the 1.2l \xintiiCmp, but decided to -% stick with the method here for now.| +% stick with the method here for now. +%\end{lverb} % \begin{macrocode} \def\xintiiSub {\romannumeral0\xintiisub }% \def\xintiisub #1{\expandafter\XINT_iisub\romannumeral`&&@#1\xint:}% @@ -25394,8 +26669,6 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_sub_minusplus #1#2% {\expandafter-\romannumeral0\XINT_add_pp_a {}#2}% \def\XINT_sub_minusminus #1#2{\XINT_sub_mm_a {}{}}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_sub_mm_a #1#2#3\xint: {% \expandafter\XINT_sub_mm_b @@ -25439,14 +26712,17 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_sub_out\the\numexpr\XINT_sub_a\xint_c_i }% % \end{macrocode} -% \lverb|The post-processing (clean-up of zeros, or rescue of situation with +%\begin{lverb} +% The post-processing (clean-up of zeros, or rescue of situation with % A-B where actually B turns out bigger than A) will be done by a macro which % depends on circumstances and will be initially last token before the -% reversion done by \XINT_unrevbyviii.| +% reversion done by \XINT_unrevbyviii. +%\end{lverb} % \begin{macrocode} \def\XINT_sub_out {\XINT_unrevbyviii{}}% % \end{macrocode} -% \lverb|1 as first token of #1 stands for "no carry", 0 will mean a carry. +%\begin{lverb} +% 1 as first token of #1 stands for "no carry", 0 will mean a carry. % %( Call: \the\numexpr %: \XINT_sub_a 1#11;!1;!1;!1;!\W @@ -25491,7 +26767,8 @@ mode) and will go ahead hoping repair\endcsname % final result can not be zero. % % The 1.2l method for this correction is (presumably, testing takes lots of -% time, which I do not have) more efficient than in 1.2 release. | +% time, which I do not have) more efficient than in 1.2 release. +%\end{lverb} % \begin{macrocode} \def\XINT_sub_a #1!#2!#3!#4!#5\W #6!#7!#8!#9!% {% @@ -25500,9 +26777,11 @@ mode) and will go ahead hoping repair\endcsname #5\W }% % \end{macrocode} -% \lverb|As 1.2l code uses 1<8digits>! blocks one has to be careful with +%\begin{lverb} +% As 1.2l code uses 1<8digits>! blocks one has to be careful with % the carry digit 1 or 0: A #11#2#3 pattern would result into an empty #1 -% if the carry digit which is upfront is 1, rather than setting #1=1.| +% if the carry digit which is upfront is 1, rather than setting #1=1. +%\end{lverb} % \begin{macrocode} \def\XINT_sub_b #1#2#3#4!#5!% {% @@ -25565,7 +26844,8 @@ mode) and will go ahead hoping repair\endcsname \XINT_sub_k #1#2!% }% % \end{macrocode} -% \lverb|B terminated. Have we reached the end of A (necessarily at least as +%\begin{lverb} +% B terminated. Have we reached the end of A (necessarily at least as % long as B) ? (we are computing A-B, digits of B come first). % % If not, then we are certain that even if there is carry it will not @@ -25575,7 +26855,8 @@ mode) and will go ahead hoping repair\endcsname % % If A and B have the same length (in base 10^8) then arbitrarily many zeros % might have to be cleaned up, and if A<B, the whole result will have to be -% complemented first.| +% complemented first. +%\end{lverb} % \begin{macrocode} \def\XINT_sub_k #1#2#3% {% @@ -25585,9 +26866,9 @@ mode) and will go ahead hoping repair\endcsname {\xint_UDzerofork #1\XINT_sub_l_carry 0\XINT_sub_l_Ia\krof}% \def\XINT_sub_l_Ia 1#1;!#2\W{1\relax#1;!1\XINT_sub_fix_none!}% % \end{macrocode} -% \lverb| +%\begin{lverb} % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_sub_l_carry 1#1!{\ifcase #1 \expandafter \XINT_sub_l_Id @@ -25600,10 +26881,10 @@ mode) and will go ahead hoping repair\endcsname 1\relax 00000000!1#2#3!#4;!1\XINT_sub_fix_none!% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % We need to add some extra delimiters at the end for post-action by % \XINT_num, so we first grab the material up to \W -% | +%\end{lverb} % \begin{macrocode} \def\XINT_sub_l_Ica#1\W {% @@ -25624,7 +26905,7 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_sub_l_Ida#1\XINT_sub_fix_none{1;!1\XINT_sub_fix_none}% % \end{macrocode} -% \lverb|& +%\begin{lverb} % This is the case where both operands have same 10^8-base length. % % We were handling A-B but perhaps B>A. The situation with A=B is also @@ -25633,7 +26914,7 @@ mode) and will go ahead hoping repair\endcsname % % Here again we need to grab #3\W to position the actually used terminating % delimiters. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_sub_p;\XINT_sub_l #1#2\W #3\W {% @@ -25647,18 +26928,22 @@ mode) and will go ahead hoping repair\endcsname \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z }% % \end{macrocode} -% \lverb|Routines for post-processing after reversal, and removal of +%\begin{lverb} +% Routines for post-processing after reversal, and removal of % separators. It is a matter of cleaning up zeros, and possibly in the bad -% case to take a complement before that.| +% case to take a complement before that. +%\end{lverb} % \begin{macrocode} \def\XINT_sub_fix_none;{\XINT_cuz_small}% \def\XINT_sub_fix_cuz ;{\expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop}% % \end{macrocode} -% \lverb|Case with A and B same number of digits in base 10^8 and B>A. +%\begin{lverb} +% Case with A and B same number of digits in base 10^8 and B>A. % % 1.2l subtle chaining on the model of the 1.2i rewrite of \xintInc and % similar routines. After taking complement, leading zeroes need to be -% cleaned up as in B<=A branch.| +% cleaned up as in B<=A branch. +%\end{lverb} % \begin{macrocode} \def\XINT_sub_fix_neg;% {% @@ -25672,16 +26957,20 @@ mode) and will go ahead hoping repair\endcsname \the\numexpr \xint_c_xi_e_viii_mone-#1#2#3#4#5#6#7#8\XINT_sub_comp_loop }% % \end{macrocode} -% \lverb|#1 = 0 signifie une retenue, #1 = 1 pas de retenue, ce qui ne peut +%\begin{lverb} +% #1 = 0 signifie une retenue, #1 = 1 pas de retenue, ce qui ne peut % arriver que tant qu'il n'y a que des zéros du côté non significatif. -% Lorsqu'on est revenu au début on a forcément une retenue.| +% Lorsqu'on est revenu au début on a forcément une retenue. +%\end{lverb} % \begin{macrocode} \def\XINT_sub_comp_clean 1#1{+#1\relax}% % \end{macrocode} % \subsection{\csh{xintiiMul}} -% \lverb|Completely rewritten for 1.2. +%\begin{lverb} +% Completely rewritten for 1.2. % -% 1.2l: \xintiiMul made robust against non terminated input.| +% 1.2l: \xintiiMul made robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintiiMul {\romannumeral0\xintiimul }% \def\xintiimul #1% @@ -25693,9 +26982,11 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_mul_nfork\expandafter #1\romannumeral`&&@#3\xint:#2\xint: }% % \end{macrocode} -% \lverb|1.2 I have changed the fork, and it complicates matters elsewhere. +%\begin{lverb} +% 1.2 I have changed the fork, and it complicates matters elsewhere. % -% ATTENTION for example that 1.4 \xintiiPrd uses \XINT_mul_nfork now.| +% ATTENTION for example that 1.4 \xintiiPrd uses \XINT_mul_nfork now. +%\end{lverb} % \begin{macrocode} \def\XINT_mul_fork #1#2\xint:#3\xint:{\XINT_mul_nfork #1#3\xint:#2\xint:}% \def\XINT_mul_nfork #1#2% @@ -25743,7 +27034,9 @@ mode) and will go ahead hoping repair\endcsname 1\R!1\R!1\R!1\R!1\R!1\R!1\R!1\R!\W }% % \end{macrocode} -% \lverb|Cooking recipe, 2015/10/05.| +%\begin{lverb} +% Cooking recipe, 2015/10/05. +%\end{lverb} % \begin{macrocode} \def\XINT_mul_checklengths #1\xint:#2\xint:% {% @@ -25778,16 +27071,12 @@ mode) and will go ahead hoping repair\endcsname {\expandafter\XINT_mul_out\the\numexpr\XINT_verysmallmul 0\xint:#1!}% \def\XINT_mul_exchange #1\XINT_mul_start #2\W #31;!% {\fi\fi\XINT_mul_start #31;!\W #2}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_mul_start {\expandafter\XINT_mul_out\the\numexpr\XINT_mul_loop 100000000!1;!\W}% \def\XINT_mul_out {\expandafter\XINT_cuz_small\romannumeral0\XINT_unrevbyviii {}}% % \end{macrocode} -% \lverb|& +%\begin{lverb} % %( Call: %: \the\numexpr \XINT_mul_loop 100000000!1;!\W #11;!\W #21;! @@ -25803,7 +27092,8 @@ mode) and will go ahead hoping repair\endcsname % % Thus \XINT_mul_loop can be conveniently called directly in recursive % routines, as the output terminator can serve as input terminator, we can -% arrange to not have to grab the whole thing again.| +% arrange to not have to grab the whole thing again. +%\end{lverb} % \begin{macrocode} \def\XINT_mul_loop #1\W #2\W 1#3!% {% @@ -25812,7 +27102,9 @@ mode) and will go ahead hoping repair\endcsname #1\W #2\W }% % \end{macrocode} -% \lverb|Each of #1 and #2 brings its 1;! for \XINT_add_a.| +%\begin{lverb} +% Each of #1 and #2 brings its 1;! for \XINT_add_a. +%\end{lverb} % \begin{macrocode} \def\XINT_mul_a #1\W #2\W {% @@ -25822,7 +27114,8 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_mul_b 1#1!{1#1\expandafter!\the\numexpr\XINT_mul_loop }% \def\XINT_mul_e;#1\W 1#2\W #3\W {1\relax #2}% % \end{macrocode} -% \lverb|1.2 small and mini multiplication in base 10^8 with carry. Used by +%\begin{lverb} +% 1.2 small and mini multiplication in base 10^8 with carry. Used by % the main multiplication routines. But division, float factorial, etc.. have % their own variants as they need output with specific constraints. % @@ -25834,7 +27127,8 @@ mode) and will go ahead hoping repair\endcsname % multiplicand for re-use later. When the loop terminates, the final carry is % checked for being nul, and in all cases the output is terminated by a 1;! % -% Multiplication by zero will produce blocks of zeros.| +% Multiplication by zero will produce blocks of zeros. +%\end{lverb} % \begin{macrocode} \def\XINT_minimulwc_a 1#1\xint:#2\xint:#3!#4#5#6#7#8\xint:% {% @@ -25863,10 +27157,6 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_smallmul_e;\XINT_minimulwc_a 1#1\xint:#2;#3!% {\xint_gob_til_eightzeroes #1\XINT_smallmul_f 000000001\relax #1!1;!}% \def\XINT_smallmul_f 000000001\relax 00000000!1{1\relax}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_verysmallmul #1\xint:#2!1#3!% {% \xint_gob_til_sc #3\XINT_verysmallmul_e;% @@ -25890,11 +27180,13 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_verysmallmul_bi\the\numexpr\xint_c_x^ix+#1#2#3\xint:% {1#3\expandafter!\the\numexpr\XINT_verysmallmul #1#2\xint:}% % \end{macrocode} -% \lverb|Used by division and by squaring, not by multiplication itself. +%\begin{lverb} +% Used by division and by squaring, not by multiplication itself. % % This routine does not loop, it only does one mini multiplication with input % format <4 high digits>.<4 low digits>!<8 digits>!, and on output -% 1<8d>!1<8d>!, with least significant block first.| +% 1<8d>!1<8d>!, with least significant block first. +%\end{lverb} % \begin{macrocode} \def\XINT_minimul_a #1\xint:#2!#3#4#5#6#7!% {% @@ -25912,7 +27204,8 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiDivision}} -% \lverb|Completely rewritten for 1.2. +%\begin{lverb} +% Completely rewritten for 1.2. % % WARNING: some comments below try to describe the flow of tokens but they % date back to xint 1.09j and I updated them on the fly while doing the 1.2 @@ -25932,16 +27225,20 @@ mode) and will go ahead hoping repair\endcsname % % % 1.2l: \xintiiDivision et al. made robust against non terminated input. -% | -% \lverb-#1 = A, #2 = B. On calcule le quotient et le reste dans la division -% euclidienne de A par B: A=BQ+R, 0<= R < |B|.- +%\end{lverb} +%\begin{lverb} +% #1 = A, #2 = B. On calcule le quotient et le reste dans la division +% euclidienne de A par B: A=BQ+R, 0<= R < |B|. +%\end{lverb} % \begin{macrocode} \def\xintiiDivision {\romannumeral0\xintiidivision }% \def\xintiidivision #1{\expandafter\XINT_iidivision \romannumeral`&&@#1\xint:}% \def\XINT_iidivision #1#2\xint:#3{\expandafter\XINT_iidivision_a\expandafter #1% \romannumeral`&&@#3\xint:#2\xint:}% % \end{macrocode} -% \lverb|On regarde les signes de A et de B.| +%\begin{lverb} +% On regarde les signes de A et de B. +%\end{lverb} % \begin{macrocode} \def\XINT_iidivision_a #1#2% #1 de A, #2 de B. {% @@ -25966,13 +27263,15 @@ mode) and will go ahead hoping repair\endcsname \krof }% % \end{macrocode} -% \lverb|Donc attention malgré son nom \XINT_div_prepare va jusqu'au bout. +%\begin{lverb} +% Donc attention malgré son nom \XINT_div_prepare va jusqu'au bout. % C'est donc en fait l'entrée principale (pour B>0, A>0) mais elle va % regarder si B est < 10^8 et s'il vaut alors 1 ou 2, et si A < 10^8. Dans % tous les cas le résultat est produit sous la forme {Q}{R}, avec Q et R sous % leur forme final. On doit ensuite ajuster si le B ou le A initial était % négatif. Je n'ai pas fait beaucoup d'efforts pour être un minimum efficace -% si A ou B n'est pas positif.| +% si A ou B n'est pas positif. +%\end{lverb} % \begin{macrocode} \def\XINT_iidivision_apos #1#2\xint:#3\xint:{\XINT_div_prepare {#2}{#1#3}}% \def\XINT_iidivision_aneg #1\xint:#2\xint: @@ -25995,8 +27294,10 @@ mode) and will go ahead hoping repair\endcsname \expandafter{\romannumeral0\XINT_sub_mm_a {}{}#3\xint:#2\xint:}{#1}% r-> b-r }% % \end{macrocode} -% \lverb|Le diviseur B va être étendu par des zéros pour que sa longueur soit -% multiple de huit. Les zéros seront mis du côté non significatif.| +%\begin{lverb} +% Le diviseur B va être étendu par des zéros pour que sa longueur soit +% multiple de huit. Les zéros seront mis du côté non significatif. +%\end{lverb} % \begin{macrocode} \def\XINT_div_prepare #1% {% @@ -26008,9 +27309,11 @@ mode) and will go ahead hoping repair\endcsname \XINT_div_prepare_b #9% }% % \end{macrocode} -% \lverb|B a au plus huit chiffres. On se débarrasse des trucs superflus. Si +%\begin{lverb} +% B a au plus huit chiffres. On se débarrasse des trucs superflus. Si % B>0 n'est ni 1 ni 2, le point d'entrée est \XINT_div_small_a {B}{A} (avec un -% A positif).| +% A positif). +%\end{lverb} % \begin{macrocode} \def\XINT_div_prepare_small\R #1!#2% {% @@ -26033,9 +27336,11 @@ mode) and will go ahead hoping repair\endcsname *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax}{#1}% }% % \end{macrocode} -% \lverb|B a au plus huit chiffres et est au moins 3. On va l'utiliser +%\begin{lverb} +% B a au plus huit chiffres et est au moins 3. On va l'utiliser % directement, sans d'abord le multiplier par une puissance de 10 pour qu'il -% ait 8 chiffres.| +% ait 8 chiffres. +%\end{lverb} % \begin{macrocode} \def\XINT_div_small_a #1#2% {% @@ -26047,13 +27352,17 @@ mode) and will go ahead hoping repair\endcsname #2\XINT_sepbyviii_Z_end 2345678\relax }% % \end{macrocode} -% \lverb|Le #2 poursuivra l'expansion par \XINT_div_dosmallsmall ou par -% \XINT_smalldivx_a suivi de \XINT_sdiv_out.| +%\begin{lverb} +% Le #2 poursuivra l'expansion par \XINT_div_dosmallsmall ou par +% \XINT_smalldivx_a suivi de \XINT_sdiv_out. +%\end{lverb} % \begin{macrocode} \def\XINT_div_small_b #1!#2{#2#1!}% % \end{macrocode} -% \lverb|On ajoute des zéros avant A, puis on le prépare sous la forme de -% blocs 1<8d>! Au passage on repère le cas d'un A<10^8.| +%\begin{lverb} +% On ajoute des zéros avant A, puis on le prépare sous la forme de +% blocs 1<8d>! Au passage on repère le cas d'un A<10^8. +%\end{lverb} % \begin{macrocode} \def\XINT_div_small_ba #1#2#3#4#5#6#7#8#9% {% @@ -26064,9 +27373,11 @@ mode) and will go ahead hoping repair\endcsname #1#2#3#4#5#6#7#8#9% }% % \end{macrocode} -% \lverb|Si A<10^8, on va poursuivre par \XINT_div_dosmallsmall +%\begin{lverb} +% Si A<10^8, on va poursuivre par \XINT_div_dosmallsmall % round(B/2).10^8+B!{A}. On fait la division directe par \numexpr. Le résultat -% est produit sous la forme {Q}{R}.| +% est produit sous la forme {Q}{R}. +%\end{lverb} % \begin{macrocode} \def\XINT_div_smallsmall\R \expandafter\XINT_div_dosmalldiv @@ -26081,16 +27392,20 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_div_smallsmallend #1\xint:#2\xint:#3\xint:{\expandafter {\the\numexpr #1\expandafter}\expandafter{\the\numexpr #3-#1*#2}}% % \end{macrocode} -% \lverb|Si A>=10^8, il est maintenant sous la forme 1<8d>!...1<8d>!1;! avec +%\begin{lverb} +% Si A>=10^8, il est maintenant sous la forme 1<8d>!...1<8d>!1;! avec % plus significatifs en premier. Donc on poursuit par$newline % \expandafter\XINT_sdiv_out\the\numexpr\XINT_smalldivx_a -% x.1B!1<8d>!...1<8d>!1;! avec x =round(B/2), 1B=10^8+B.| +% x.1B!1<8d>!...1<8d>!1;! avec x =round(B/2), 1B=10^8+B. +%\end{lverb} % \begin{macrocode} \def\XINT_div_dosmalldiv {{\expandafter\XINT_sdiv_out\the\numexpr\XINT_smalldivx_a}}% % \end{macrocode} -% \lverb|Ici B est au moins 10^8, on détermine combien de zéros lui adjoindre -% pour qu'il soit de longueur 8N.| +%\begin{lverb} +% Ici B est au moins 10^8, on détermine combien de zéros lui adjoindre +% pour qu'il soit de longueur 8N. +%\end{lverb} % \begin{macrocode} \def\XINT_div_prepare_b {\expandafter\XINT_div_prepare_c\romannumeral0\XINT_zeroes_forviii }% @@ -26107,12 +27422,14 @@ mode) and will go ahead hoping repair\endcsname \XINT_div_prepare_f #4#3\X {#1}{#3}% }% % \end{macrocode} -% \lverb|attention qu'on calcule ici x'=x+1 (x = huit premiers chiffres du +%\begin{lverb} +% attention qu'on calcule ici x'=x+1 (x = huit premiers chiffres du % diviseur) et que si x=99999999, x' aura donc 9 chiffres, pas compatible avec % div_mini (avant 1.2, x avait 4 chiffres, et on faisait la division avec x' % dans un \numexpr). Bon, facile à dire après avoir laissé passer ce bug dans % 1.2. C'est le problème lorsqu'au lieu de tout refaire à partir de zéro on -% recycle d'anciennes routines qui avaient un contexte différent.| +% recycle d'anciennes routines qui avaient un contexte différent. +%\end{lverb} % \begin{macrocode} \def\XINT_div_prepare_f #1#2#3#4#5#6#7#8#9\X {% @@ -26142,10 +27459,12 @@ mode) and will go ahead hoping repair\endcsname \XINT_div_start_a {#2}{#6}{#1}{#3}{#4}{#5}%{#7}{#8}% }% % \end{macrocode} -% \lverb|L, K, A, x',y,x, B, «c». Attention que K est diminué de 1 plus loin. +%\begin{lverb} +% L, K, A, x',y,x, B, «c». Attention que K est diminué de 1 plus loin. % Comme xint 1.2 a déjà repéré K=1, on a ici au minimum K=2. Attention B est à % l'envers, A est à l'endroit et les deux avec séparateurs. Attention que ce -% n'est pas ici qu'on boucle mais en \XINT_div_I_a.| +% n'est pas ici qu'on boucle mais en \XINT_div_I_a. +%\end{lverb} % \begin{macrocode} \def\XINT_div_start_a #1#2% {% @@ -26165,7 +27484,9 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_div_zeroQ_end #1\xint:#2% {\expandafter{\expandafter0\expandafter}\XINT_div_cleanR #1#2\xint:}% % \end{macrocode} -% \lverb|L, K, A, x',y,x, B, «c»->K.A.x{LK{x'y}x}B«c»| +%\begin{lverb} +% L, K, A, x',y,x, B, «c»->K.A.x{LK{x'y}x}B«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_start_b #1#2#3#4#5#6% {% @@ -26178,7 +27499,9 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_div_finish_a #1\Z #2\xint:{\XINT_div_finish_b #2\xint:{#1}}% % \end{macrocode} -% \lverb|Ici ce sont routines de fin. Le reste déjà nettoyé. R.Q«c».| +%\begin{lverb} +% Ici ce sont routines de fin. Le reste déjà nettoyé. R.Q«c». +%\end{lverb} % \begin{macrocode} \def\XINT_div_finish_b #1% {% @@ -26196,9 +27519,11 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_div_cleanR #100000000\xint:{{#1}}% % \end{macrocode} -% \lverb|Kalpha.A.x{LK{x'y}x}, B, «c», au début #2=alpha est vide. On fait une +%\begin{lverb} +% Kalpha.A.x{LK{x'y}x}, B, «c», au début #2=alpha est vide. On fait une % boucle pour prendre K unités de A (on a au moins L égal à K) et les mettre -% dans alpha.| +% dans alpha. +%\end{lverb} % \begin{macrocode} \def\XINT_div_start_c #1% {% @@ -26228,17 +27553,21 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_div_start_c_vi #1\xint:#2!#3!#4!#5!#6!#7!% {\XINT_div_start_c_ #1#2!#3!#4!#5!#6!#7!\xint:}% % \end{macrocode} -% \lverb|#1=a, #2=alpha (de longueur K, à l'endroit).#3=reste de A.#4=x, +%\begin{lverb} +% #1=a, #2=alpha (de longueur K, à l'endroit).#3=reste de A.#4=x, % #5={LK{x'y}x},#6=B,«c» -> a, x, alpha, B, {00000000}, L, K, {x'y},x, -% alpha'=reste de A, B«c».| +% alpha'=reste de A, B«c». +%\end{lverb} % \begin{macrocode} \def\XINT_div_start_c_ 1#1!#2\xint:#3\xint:#4#5#6% {% \XINT_div_I_a {#1}{#4}{1#1!#2}{#6}{00000000}#5{#3}{#6}% }% % \end{macrocode} -% \lverb|Ceci est le point de retour de la boucle principale. a, x, alpha, B, -% q0, L, K, {x'y}, x, alpha', B«c» | +%\begin{lverb} +% Ceci est le point de retour de la boucle principale. a, x, alpha, B, +% q0, L, K, {x'y}, x, alpha', B«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_I_a #1#2% {% @@ -26249,9 +27578,11 @@ mode) and will go ahead hoping repair\endcsname \xint_gob_til_zero #1\XINT_div_I_czero 0\XINT_div_I_c #1% }% % \end{macrocode} -% \lverb|On intercepte petit quotient nul: #1=a, x, alpha, B, #5=q0, L, K, +%\begin{lverb} +% On intercepte petit quotient nul: #1=a, x, alpha, B, #5=q0, L, K, % {x'y}, x, alpha', B«c» -> on lâche un q puis {alpha} L, K, {x'y}, x, -% alpha', B«c».| +% alpha', B«c». +%\end{lverb} % \begin{macrocode} \def\XINT_div_I_czero 0\XINT_div_I_c 0\xint:#1#2#3#4#5{1#5\XINT_div_I_g {#3}}% \def\XINT_div_I_c #1\xint:#2#3% @@ -26259,7 +27590,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_div_I_da\the\numexpr #2-#1*#3\xint:#1\xint:{#2}{#3}% }% % \end{macrocode} -% \lverb|r.q.alpha, B, q0, L, K, {x'y}, x, alpha', B«c»| +%\begin{lverb} +% r.q.alpha, B, q0, L, K, {x'y}, x, alpha', B«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_I_da #1\xint:% {% @@ -26274,7 +27607,9 @@ mode) and will go ahead hoping repair\endcsname \fi }% % \end{macrocode} -% \lverb|attention très mauvaises notations avec _b et _db.| +%\begin{lverb} +% attention très mauvaises notations avec _b et _db. +%\end{lverb} % \begin{macrocode} \def\XINT_div_I_dN #1\xint:% {% @@ -26289,8 +27624,10 @@ mode) and will go ahead hoping repair\endcsname \Z {#4}{#5}% }% % \end{macrocode} -% \lverb|La soustraction spéciale renvoie simplement - si le chiffre q est -% trop grand. On invoque dans ce cas I_dP.| +%\begin{lverb} +% La soustraction spéciale renvoie simplement - si le chiffre q est +% trop grand. On invoque dans ce cas I_dP. +%\end{lverb} % \begin{macrocode} \def\XINT_div_I_dc #1#2% {% @@ -26308,8 +27645,10 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_div_I_de #1#2\Z #3#4#5{1#5+#1\XINT_div_I_g {#2}}% % \end{macrocode} -% \lverb|q.alpha, B, q0, L, K, {x'y},x, alpha'B«c» (q=0 has been intercepted) -% -> 1nouveauq.nouvel alpha, L, K, {x'y}, x, alpha',B«c»| +%\begin{lverb} +% q.alpha, B, q0, L, K, {x'y},x, alpha'B«c» (q=0 has been intercepted) +% -> 1nouveauq.nouvel alpha, L, K, {x'y}, x, alpha',B«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_I_dP #1\xint:#2#3#4#5#6% {% @@ -26320,11 +27659,15 @@ mode) and will go ahead hoping repair\endcsname }% }% % \end{macrocode} -% \lverb|1#1=nouveau q. nouvel alpha, L, K, {x'y},x,alpha', BQ«c»| +%\begin{lverb} +% 1#1=nouveau q. nouvel alpha, L, K, {x'y},x,alpha', BQ«c» +%\end{lverb} % \begin{macrocode} % \end{macrocode} -% \lverb|#1=q,#2=nouvel alpha,#3=L, #4=K, #5={x'y}, #6=x, #7= alpha',#8=B, -% «c» -> on laisse q puis {x'y}alpha.alpha'.{{x'y}xKL}B«c»| +%\begin{lverb} +% #1=q,#2=nouvel alpha,#3=L, #4=K, #5={x'y}, #6=x, #7= alpha',#8=B, +% «c» -> on laisse q puis {x'y}alpha.alpha'.{{x'y}xKL}B«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_I_g #1#2#3#4#5#6#7% {% @@ -26337,9 +27680,11 @@ mode) and will go ahead hoping repair\endcsname {#4}#1\xint:#6\xint:{{#4}{#5}{#3}{#2}}{#7}% }% % \end{macrocode} -% \lverb|{x'y}alpha.alpha'.{{x'y}xKL}B«c» -> Attention retour à l'envoyeur ici +%\begin{lverb} +% {x'y}alpha.alpha'.{{x'y}xKL}B«c» -> Attention retour à l'envoyeur ici % par terminaison des \the\numexpr. On doit reprendre le Q déjà sorti, qui n'a -% plus de séparateurs, ni de leading 1. Ensuite R sans leading zeros.«c»| +% plus de séparateurs, ni de leading 1. Ensuite R sans leading zeros.«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_exittofinish #1#2\xint:#3\xint:#4#5% {% @@ -26348,16 +27693,20 @@ mode) and will go ahead hoping repair\endcsname \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax\R\xint: }% % \end{macrocode} -% \lverb|ATTENTION DESCRIPTION OBSOLÈTE. #1={x'y}alpha.#2!#3=reste de A. +%\begin{lverb} +% ATTENTION DESCRIPTION OBSOLÈTE. #1={x'y}alpha.#2!#3=reste de A. % #4={{x'y},x,K,L},#5=B,«c» devient {x'y},alpha sur K+4 chiffres.B, -% {{x'y},x,K,L}, #6= nouvel alpha',B,«c»| +% {{x'y},x,K,L}, #6= nouvel alpha',B,«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_I_h #1\xint:#2!#3\xint:#4#5% {% \XINT_div_II_b #1#2!\xint:{#5}{#4}{#3}{#5}% }% % \end{macrocode} -% \lverb|{x'y}alpha.B, {{x'y},x,K,L}, nouveau alpha',B,«c»| +%\begin{lverb} +% {x'y}alpha.B, {{x'y},x,K,L}, nouveau alpha',B,«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_b #11#2!#3!% {% @@ -26365,19 +27714,22 @@ mode) and will go ahead hoping repair\endcsname \XINT_div_II_c #1{1#2}{#3}% }% % \end{macrocode} -% \lverb|x'y{100000000}{1<8>}reste de alpha.#6=B,#7={{x'y},x,K,L}, alpha',B, +%\begin{lverb} +% x'y{100000000}{1<8>}reste de alpha.#6=B,#7={{x'y},x,K,L}, alpha',B, % «c» -> {x'y}x,K,L (à diminuer de 4), {alpha sur -% K}B{q1=00000000}{alpha'}B,«c»| +% K}B{q1=00000000}{alpha'}B,«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_skipc 00000000\XINT_div_II_c #1#2#3#4#5\xint:#6#7% {% \XINT_div_II_k #7{#4!#5}{#6}{00000000}% }% % \end{macrocode} -% \lverb|x'ya->1qx'yalpha.B, {{x'y},x,K,L}, nouveau alpha',B, «c». En fait, +%\begin{lverb} +% x'ya->1qx'yalpha.B, {{x'y},x,K,L}, nouveau alpha',B, «c». En fait, % attention, ici #3 et #4 sont les 16 premiers chiffres du numérateur,sous la % forme blocs 1<8chiffres>. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_c #1#2#3#4% {% @@ -26397,13 +27749,17 @@ mode) and will go ahead hoping repair\endcsname \xint_gob_til_zero #7\XINT_div_xmini_c 0\XINT_div_mini 10#1#2#3#4#5#6#7% }% % \end{macrocode} -% \lverb|x'=10^8 and we return #1=1<8digits>.| +%\begin{lverb} +% x'=10^8 and we return #1=1<8digits>. +%\end{lverb} % \begin{macrocode} \def\XINT_div_xmini_c 0\XINT_div_mini 100000000\xint:50000000!#1!#2!{#1!}% % \end{macrocode} -% \lverb|1 suivi de q1 sur huit chiffres! #2=x', #3=y, #4=alpha.#5=B, +%\begin{lverb} +% 1 suivi de q1 sur huit chiffres! #2=x', #3=y, #4=alpha.#5=B, % {{x'y},x,K,L}, alpha', B, «c» --> nouvel alpha.x',y,B,q1,{{x'y},x,K,L}, -% alpha', B, «c» | +% alpha', B, «c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_d 1#1#2#3#4#5!#6#7#8\xint:#9% {% @@ -26414,8 +27770,10 @@ mode) and will go ahead hoping repair\endcsname \xint:{#6}{#7}{#9}{#1#2#3#4#5}% }% % \end{macrocode} -% \lverb|alpha.x',y,B,q1, {{x'y},x,K,L}, alpha', B, «c». Attention la -% soustraction spéciale doit maintenir les blocs 1<8>!| +%\begin{lverb} +% alpha.x',y,B,q1, {{x'y},x,K,L}, alpha', B, «c». Attention la +% soustraction spéciale doit maintenir les blocs 1<8>! +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_e 1#1!% {% @@ -26423,20 +27781,24 @@ mode) and will go ahead hoping repair\endcsname \XINT_div_II_f 1#1!% }% % \end{macrocode} -% \lverb|100000000! alpha sur K chiffres.#2=x',#3=y,#4=B,#5=q1, #6={{x'y},x,K,L}, +%\begin{lverb} +% 100000000! alpha sur K chiffres.#2=x',#3=y,#4=B,#5=q1, #6={{x'y},x,K,L}, % #7=alpha',B«c» -> {x'y}x,K,L (à diminuer de 1), -% {alpha sur K}B{q1}{alpha'}B«c»| +% {alpha sur K}B{q1}{alpha'}B«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_skipf 00000000\XINT_div_II_f 100000000!#1\xint:#2#3#4#5#6% {% \XINT_div_II_k #6{#1}{#4}{#5}% }% % \end{macrocode} -% \lverb|1<a1>!1<a2>!, alpha (sur K+1 blocs de 8). x', y, B, q1, {{x'y},x,K,L}, +%\begin{lverb} +% 1<a1>!1<a2>!, alpha (sur K+1 blocs de 8). x', y, B, q1, {{x'y},x,K,L}, % alpha', B,«c». % % Here also we are dividing with x' which could be 10^8 in the exceptional -% case x=99999999. Must intercept it before sending to \XINT_div_mini.| +% case x=99999999. Must intercept it before sending to \XINT_div_mini. +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_f #1!#2!#3\xint:% {% @@ -26447,9 +27809,11 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_div_II_g \the\numexpr\XINT_div_xmini #3\xint:#4!#1{#2}% }% % \end{macrocode} -% \lverb|#1=q, #2=alpha (K+4), #3=B, #4=q1, {{x'y},x,K,L}, alpha', BQ«c» +%\begin{lverb} +% #1=q, #2=alpha (K+4), #3=B, #4=q1, {{x'y},x,K,L}, alpha', BQ«c» % -> 1 puis nouveau q sur 8 chiffres. nouvel alpha sur K blocs, -% B, {{x'y},x,K,L}, alpha',B«c» | +% B, {{x'y},x,K,L}, alpha',B«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_g 1#1#2#3#4#5!#6#7#8% {% @@ -26463,18 +27827,22 @@ mode) and will go ahead hoping repair\endcsname {#7}% }% % \end{macrocode} -% \lverb|1 puis nouveau q sur 8 chiffres, #2=nouvel alpha sur K blocs, +%\begin{lverb} +% 1 puis nouveau q sur 8 chiffres, #2=nouvel alpha sur K blocs, % #3=B, #4={{x'y},x,K,L} avec L à ajuster, alpha', BQ«c» -% -> {x'y}x,K,L à diminuer de 1, {alpha}B{q}, alpha', BQ«c»| +% -> {x'y}x,K,L à diminuer de 1, {alpha}B{q}, alpha', BQ«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_h 1#1\xint:#2#3#4% {% \XINT_div_II_k #4{#2}{#3}{#1}% }% % \end{macrocode} -% \lverb|{x'y}x,K,L à diminuer de 1, alpha, B{q}alpha',B«c» +%\begin{lverb} +% {x'y}x,K,L à diminuer de 1, alpha, B{q}alpha',B«c» % ->nouveau L.K,x',y,x,alpha.B,q,alpha',B,«c» -% ->{LK{x'y}x},x,a,alpha.B,q,alpha',B,«c»| +% ->{LK{x'y}x},x,a,alpha.B,q,alpha',B,«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_k #1#2#3#4#5% {% @@ -26485,16 +27853,20 @@ mode) and will go ahead hoping repair\endcsname \XINT_div_II_m {{#1}{#2}{{#3}{#4}}{#5}}{#5}{#6}1#6!% }% % \end{macrocode} -% \lverb|{LK{x'y}x},x,a,alpha.B{q}alpha'B -> a, x, alpha, B, q, -% L, K, {x'y}, x, alpha', B«c» | +%\begin{lverb} +% {LK{x'y}x},x,a,alpha.B{q}alpha'B -> a, x, alpha, B, q, +% L, K, {x'y}, x, alpha', B«c» +%\end{lverb} % \begin{macrocode} \def\XINT_div_II_m #1#2#3#4\xint:#5#6% {% \XINT_div_I_a {#3}{#2}{#4}{#5}{#6}#1% }% % \end{macrocode} -% \lverb|This multiplication is exactly like \XINT_smallmul -- apart from not -% inserting an ending 1;! --, but keeps ever a vanishing ending carry.| +%\begin{lverb} +% This multiplication is exactly like \XINT_smallmul -- apart from not +% inserting an ending 1;! --, but keeps ever a vanishing ending carry. +%\end{lverb} % \begin{macrocode} \def\XINT_div_minimulwc_a 1#1\xint:#2\xint:#3!#4#5#6#7#8\xint:% {% @@ -26519,11 +27891,13 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_div_smallmul_e;\XINT_div_minimulwc_a 1#1\xint:#2;#3!{1\relax #1!}% % \end{macrocode} -% \lverb|Special very small multiplication for division. We only need to cater +%\begin{lverb} +% Special very small multiplication for division. We only need to cater % for multiplicands from 1 to 9. The ending is different from standard % verysmallmul, a zero carry is not suppressed. And no final 1;! is added. If % multiplicand is just 1 let's not forget to add the zero carry 100000000! at -% the end.| +% the end. +%\end{lverb} % \begin{macrocode} \def\XINT_div_verysmallmul #1% {\xint_gob_til_one #1\XINT_div_verysmallisone 1\XINT_div_verysmallmul_a 0\xint:#1}% @@ -26539,9 +27913,11 @@ mode) and will go ahead hoping repair\endcsname {1#2\expandafter!\the\numexpr\XINT_div_verysmallmul_a #1\xint:}% \def\XINT_div_verysmallmul_e;#1;+#2#3!{1\relax 0000000#2!}% % \end{macrocode} -% \lverb|Special subtraction for division purposes. If the subtracted thing +%\begin{lverb} +% Special subtraction for division purposes. If the subtracted thing % turns out to be bigger, then just return a -. If not, then we must reverse -% the result, keeping the separators.| +% the result, keeping the separators. +%\end{lverb} % \begin{macrocode} \def\XINT_div_sub #1#2% {% @@ -26627,7 +28003,8 @@ mode) and will go ahead hoping repair\endcsname -\ifnum 0#1=\xint_c_ 1\else2\fi\relax }% % \end{macrocode} -% \lverb|Ici B<10^8 (et est >2). On +%\begin{lverb} +% Ici B<10^8 (et est >2). On % exécute$newline % \expandafter\XINT_sdiv_out\the\numexpr\XINT_smalldivx_a % x.1B!1<8d>!...1<8d>!1;!$newline @@ -26637,7 +28014,7 @@ mode) and will go ahead hoping repair\endcsname % et nécessitant le nettoyage du premier bloc. Dans cette branche le B n'a pas % été multiplié par une puissance de 10, il peut avoir moins de huit chiffres. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_sdiv_out #1;!#2!% {\expandafter @@ -26645,8 +28022,10 @@ mode) and will go ahead hoping repair\endcsname #1\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax}% {#2}}% % \end{macrocode} -% \lverb|La toute première étape fait la première division pour être sûr par -% la suite d'avoir un premier bloc pour A qui sera < B.| +%\begin{lverb} +% La toute première étape fait la première division pour être sûr par +% la suite d'avoir un premier bloc pour A qui sera < B. +%\end{lverb} % \begin{macrocode} \def\XINT_smalldivx_a #1\xint:1#2!1#3!% {% @@ -26664,11 +28043,12 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_smalldiv_d\the\numexpr #4-#1*#3!#2\xint:#3!% }% % \end{macrocode} -% \lverb|On va boucler ici: #1 est un reste, #2 est x.B (avec B sans le 1 mais +%\begin{lverb} +% On va boucler ici: #1 est un reste, #2 est x.B (avec B sans le 1 mais % sur huit chiffres). #3#4 est le premier bloc qui reste de A. Si on a terminé % avec A, alors #1 est le reste final. Le quotient lui est terminé par un 1! % ce 1! disparaîtra dans le nettoyage par \XINT_unsep_cuzsmall. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_smalldiv_d #1!#2!1#3#4!% {% @@ -26677,10 +28057,12 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_smalldiv_end;\XINT_smalldiv_e #1!#2!1;!{1!;!#1!}% % \end{macrocode} -% \lverb|Il est crucial que le reste #1 est < #3. J'ai documenté cette routine +%\begin{lverb} +% Il est crucial que le reste #1 est < #3. J'ai documenté cette routine % dans le fichier où j'ai préparé 1.2, il faudra transférer ici. Il n'est pas % nécessaire pour cette routine que le diviseur B ait au moins 8 chiffres. -% Mais il doit être < 10^8.| +% Mais il doit être < 10^8. +%\end{lverb} % \begin{macrocode} \def\XINT_smalldiv_e #1!#2\xint:#3!% {% @@ -26717,14 +28099,17 @@ mode) and will go ahead hoping repair\endcsname #1!% }% % \end{macrocode} -% \lverb|On boucle vers \XINT_smalldiv_d.| +%\begin{lverb} +% On boucle vers \XINT_smalldiv_d. +%\end{lverb} % \begin{macrocode} \def\XINT_smalldiv_k #1!#2!#3\xint:#4!% {% \expandafter\XINT_smalldiv_d\the\numexpr #2-#1*#4!#3\xint:#4!% }% % \end{macrocode} -% \lverb|Cette routine fait la division euclidienne d'un nombre de seize +%\begin{lverb} +% Cette routine fait la division euclidienne d'un nombre de seize % chiffres par #1 = C = diviseur sur huit chiffres >= 10^7, avec #2 = sa % moitié utilisée dans \numexpr pour contrebalancer l'arrondi % (ARRRRRRGGGGGHHHH) fait par /. Le nombre divisé XY = X*10^8+Y se présente @@ -26736,7 +28121,8 @@ mode) and will go ahead hoping repair\endcsname % % ATTENTION UNIQUEMENT UTILISÉ POUR DES SITUATIONS OÙ IL EST GARANTI QUE X < % C ! (et C au moins 10^7) le quotient euclidien de X*10^8+Y par C sera donc < -% 10^8. Il sera renvoyé sous la forme 1<8chiffres>.| +% 10^8. Il sera renvoyé sous la forme 1<8chiffres>. +%\end{lverb} % \begin{macrocode} \def\XINT_div_mini #1\xint:#2!1#3!% {% @@ -26744,9 +28130,11 @@ mode) and will go ahead hoping repair\endcsname \xint_c_xi_e_viii_mone+#3*\xint_c_x^viii/#1!#1\xint:#2!#3!% }% % \end{macrocode} -% \lverb|Note (2015/10/08). Attention à la différence dans l'ordre des +%\begin{lverb} +% Note (2015/10/08). Attention à la différence dans l'ordre des % arguments avec ce que je vois en dans \XINT_smalldiv_f. Je ne me souviens -% plus du tout s'il y a une raison quelconque.| +% plus du tout s'il y a une raison quelconque. +%\end{lverb} % \begin{macrocode} \def\XINT_div_mini_a 1#1#2#3#4#5#6!#7\xint:#8!% {% @@ -26787,10 +28175,12 @@ mode) and will go ahead hoping repair\endcsname {\expandafter\xint_stop_atsecondoftwo\romannumeral0\xintiidivision }% % \end{macrocode} % \subsection{\csh{xintiiDivRound}} -% \lverb|1.1, transferred from first release of bnumexpr. Rewritten for 1.2. +%\begin{lverb} +% 1.1, transferred from first release of bnumexpr. Rewritten for 1.2. % Ending rewritten for 1.2i. (new \xintDSRr). % -% 1.2l: \xintiiDivRound made robust against non terminated input.| +% 1.2l: \xintiiDivRound made robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintiiDivRound {\romannumeral0\xintiidivround }% \def\xintiidivround #1{\expandafter\XINT_iidivround\romannumeral`&&@#1\xint:}% @@ -26829,7 +28219,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiDivTrunc}} -% \lverb|1.2l: \xintiiDivTrunc made robust against non terminated input.| +%\begin{lverb} +% 1.2l: \xintiiDivTrunc made robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintiiDivTrunc {\romannumeral0\xintiidivtrunc }% \def\xintiidivtrunc #1{\expandafter\XINT_iidivtrunc\romannumeral`&&@#1\xint:}% @@ -26843,7 +28235,9 @@ mode) and will go ahead hoping repair\endcsname \xint_orthat{\XINT_iidivtrunc_bpos #1#2}% }% % \end{macrocode} -% \lverb|Attention to not move DivRound code beyond that point.| +%\begin{lverb} +% Attention to not move DivRound code beyond that point. +%\end{lverb} % \begin{macrocode} \let\XINT_iidivtrunc_divbyzero\XINT_iidivround_divbyzero \let\XINT_iidivtrunc_aiszero \XINT_iidivround_aiszero @@ -26866,7 +28260,9 @@ mode) and will go ahead hoping repair\endcsname \romannumeral0\XINT_div_prepare {#2}{#1#3}}% % \end{macrocode} % \subsection{\csh{xintiiModTrunc}} -% \lverb|Renamed from \xintiiMod to \xintiiModTrunc at 1.2p.| +%\begin{lverb} +% Renamed from \xintiiMod to \xintiiModTrunc at 1.2p. +%\end{lverb} % \begin{macrocode} \def\xintiiModTrunc {\romannumeral0\xintiimodtrunc }% \def\xintiimodtrunc #1{\expandafter\XINT_iimodtrunc\romannumeral`&&@#1\xint:}% @@ -26880,8 +28276,10 @@ mode) and will go ahead hoping repair\endcsname \xint_orthat{\XINT_iimodtrunc_bpos #1#2}% }% % \end{macrocode} -% \lverb|Attention to not move DivRound code beyond that point. A bit of abuse -% here for divbyzero defaulted-to value, which happily works in both.| +%\begin{lverb} +% Attention to not move DivRound code beyond that point. A bit of abuse +% here for divbyzero defaulted-to value, which happily works in both. +%\end{lverb} % \begin{macrocode} \let\XINT_iimodtrunc_divbyzero\XINT_iidivround_divbyzero \let\XINT_iimodtrunc_aiszero \XINT_iidivround_aiszero @@ -26941,23 +28339,29 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_iidivmod_bpos #1#2\xint:#3\xint:{\xintiidivision{#1#3}{#2}}% % \end{macrocode} % \subsection{\csh{xintiiDivFloor}} -% \lverb|1.2p. For bnumexpr actually, because \xintiiexpr could use -% \xintDivFloor which also outputs an integer in strict format.| +%\begin{lverb} +% 1.2p. For bnumexpr actually, because \xintiiexpr could use +% \xintDivFloor which also outputs an integer in strict format. +%\end{lverb} % \begin{macrocode} \def\xintiiDivFloor {\romannumeral0\xintiidivfloor}% \def\xintiidivfloor {\expandafter\xint_stop_atfirstoftwo \romannumeral0\xintiidivmod}% % \end{macrocode} % \subsection{\csh{xintiiMod}} -% \lverb|Associated with floored division at 1.2p. Formerly was associated with -% truncated division.| +%\begin{lverb} +% Associated with floored division at 1.2p. Formerly was associated with +% truncated division. +%\end{lverb} % \begin{macrocode} \def\xintiiMod {\romannumeral0\xintiimod}% \def\xintiimod {\expandafter\xint_stop_atsecondoftwo \romannumeral0\xintiidivmod}% % \end{macrocode} % \subsection{\csh{xintiiSqr}} -% \lverb|1.2l: \xintiiSqr made robust against non terminated input.| +%\begin{lverb} +% 1.2l: \xintiiSqr made robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintiiSqr {\romannumeral0\xintiisqr }% \def\xintiisqr #1% @@ -26976,8 +28380,10 @@ mode) and will go ahead hoping repair\endcsname \xint: }% % \end{macrocode} -% \lverb|1.2c \XINT_mul_loop can now be called directly even with small -% arguments, thus the following check is not anymore a necessity.| +%\begin{lverb} +% 1.2c \XINT_mul_loop can now be called directly even with small +% arguments, thus the following check is not anymore a necessity. +%\end{lverb} % \begin{macrocode} \def\XINT_sqr_a #1\xint: {% @@ -27000,9 +28406,11 @@ mode) and will go ahead hoping repair\endcsname \XINT_cuz #2#1\R }% % \end{macrocode} -% \lverb|An ending 1;! is produced on output for \XINT_mul_loop and gets +%\begin{lverb} +% An ending 1;! is produced on output for \XINT_mul_loop and gets % incorporated to the delimiter needed by the \XINT_unrevbyviii done by -% \XINT_mul_out.| +% \XINT_mul_out. +%\end{lverb} % \begin{macrocode} \def\XINT_sqr_start #1\xint: {% @@ -27013,7 +28421,7 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiPow}} -% \lverb|& +%\begin{lverb} % The exponent is not limited but with current default settings of tex memory, % with xint 1.2, the maximal exponent for 2^N is N = 2^17 = 131072. % @@ -27023,7 +28431,8 @@ mode) and will go ahead hoping repair\endcsname % the exponent, contradicting the documentation related to the "i" convention % in names. % -% 1.2l: \xintiiPow made robust against non terminated input.| +% 1.2l: \xintiiPow made robust against non terminated input. +%\end{lverb} % \begin{macrocode} \def\xintiiPow {\romannumeral0\xintiipow }% \def\xintiipow #1#2% @@ -27087,8 +28496,10 @@ mode) and will go ahead hoping repair\endcsname {Inverse power is not an integer.}{}{ 0}}% \def\XINT_pow_BisZero #1\xint:{ 1}% % \end{macrocode} -% \lverb|B = #1 > 0, A = #2 > 1. Earlier code checked if size of B did not -% exceed a given limit (for example 131000).| +%\begin{lverb} +% B = #1 > 0, A = #2 > 1. Earlier code checked if size of B did not +% exceed a given limit (for example 131000). +%\end{lverb} % \begin{macrocode} \def\XINT_pow_I_in #1#2\xint: {% @@ -27113,11 +28524,13 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_pow_I_exit \ifodd #1\fi #2\xint:#3\W {\XINT_mul_out #3}% % \end{macrocode} -% \lverb|The 1.2c \XINT_mul_loop can be called directly even with small +%\begin{lverb} +% The 1.2c \XINT_mul_loop can be called directly even with small % arguments, hence the "butcheckifsmall" is not a necessity as it was earlier % with 1.2. On 2^30, it does bring roughly a 40$char37 $space time gain % though, and 30$char37 $space gain for 2^60. The overhead on big computations -% should be negligible.| +% should be negligible. +%\end{lverb} % \begin{macrocode} \def\XINT_pow_I_squareit #1\xint:#2\W% {% @@ -27175,13 +28588,8 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiFac}} -% \lverb|Moved here from xint.sty with release 1.2 (to be usable by \bnumexpr). -% -% An \xintiFac is needed by xintexpr.sty. Prior to 1.2o it was defined here -% as an alias to \xintiiFac, then redefined by xintfrac to use \xintNum. This -% was incoherent. Contrarily to other similarly named macros, -% \xintiiFac uses \numexpr on its input. This is also incoherent with the -% naming scheme, alas. +%\begin{lverb} +% Moved here from xint.sty with release 1.2 (to be usable by \bnumexpr). % % Partially rewritten with release 1.2 to benefit from the inner format of the % 1.2 multiplication. @@ -27234,12 +28642,7 @@ mode) and will go ahead hoping repair\endcsname % should be more in the style of \xintiiBinomial, but I left matters % untouched. % -% -% -% 1.2o modifies \xintiFac to be coherent with \xintiBinomial: only with -% xintfrac.sty loaded does it use \xintNum. It is documented only as macro of -% xintfrac.sty, not as macro of xint.sty. -% | +%\end{lverb} % \begin{macrocode} \def\xintiiFac {\romannumeral0\xintiifac }% \def\xintiifac #1{\expandafter\XINT_fac_fork\the\numexpr#1.}% @@ -27254,8 +28657,6 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_fac_zero #1.{ 1}% \def\XINT_fac_neg #1.{\XINT_signalcondition{InvalidOperation}{Factorial of negative argument: #1.}{}{ 0}}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_fac_checksize #1.% {% \ifnum #1>\xint_c_x^iv \xint_dothis{\XINT_fac_toobig #1.}\fi @@ -27351,7 +28752,9 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_fac_loop_exit #1!#2;!#3{#3#2;!}% % \end{macrocode} % \subsection{\csh{XINT_useiimessage}} -% \lverb|1.2o| +%\begin{lverb} +% 1.2o +%\end{lverb} % \begin{macrocode} \def\XINT_useiimessage #1% used in LaTeX only {% @@ -27369,8 +28772,9 @@ mode) and will go ahead hoping repair\endcsname %\let<*xint>\gardesinactifs %</xintcore>^^A--------------------------------------------------- %<*xint>^^A------------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintnameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xintnameimp implementation} % \RaisedLabel{sec:xintimp} % @@ -27381,8 +28785,6 @@ mode) and will go ahead hoping repair\endcsname % the main component of the then new % \xintcorenameimp. % -% At |1.3| the macros deprecated at |1.2o| got all removed. -% % |1.3b| adds randomness related macros. % \begin{macrocode} \begingroup\catcode61\catcode48\catcode32=10\relax% @@ -27400,7 +28802,7 @@ mode) and will go ahead hoping repair\endcsname \expandafter\let\expandafter\x\csname ver@xint.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintcore.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xint Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -27431,7 +28833,7 @@ mode) and will go ahead hoping repair\endcsname % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xint}% - [2022/05/29 v1.4l Expandable operations on big integers (JFB)]% + [2022/06/10 v1.4m Expandable operations on big integers (JFB)]% % \end{macrocode} % \subsection{More token management} % \begin{macrocode} @@ -27452,7 +28854,8 @@ mode) and will go ahead hoping repair\endcsname \fi % \end{macrocode} % \subsection{\csh{xintLen}, \csh{xintiLen}} -% \lverb|\xintLen gets extended to fractions by xintfrac.sty: A/B is given +%\begin{lverb} +% \xintLen gets extended to fractions by xintfrac.sty: A/B is given % length len(A)+len(B)-1 (somewhat arbitrary). It applies \xintNum to its % argument. A minus sign is accepted and ignored. % @@ -27460,7 +28863,7 @@ mode) and will go ahead hoping repair\endcsname % For parallelism with \xintiNum/\xintNum, 1.2o defines \xintiLen. % % \xintLen gets redefined by $xintfracnameimp. -% | +%\end{lverb} % \begin{macrocode} \def\xintiLen {\romannumeral0\xintilen }% \def\xintilen #1{\def\xintilen ##1% @@ -27473,19 +28876,17 @@ mode) and will go ahead hoping repair\endcsname }}\xintilen{ }% \def\xintLen {\romannumeral0\xintlen }% \let\xintlen\xintilen -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_len_fork #1% {% \expandafter\XINT_length_loop\xint_UDsignfork#1{}-#1\krof }% % \end{macrocode} % \subsection{\csh{xintiiLogTen}} -% \lverb|1.3e. Support for ilog10() function in \xintiiexpr. See \XINTiLogTen +%\begin{lverb} +% 1.3e. Support for ilog10() function in \xintiiexpr. See \XINTiLogTen % in xintfrac.sty which also currently uses -"7FFF8000 as value if input is -% zero.| +% zero. +%\end{lverb} % \begin{macrocode} \def\xintiiLogTen {\the\numexpr\xintiilogten }% \def\xintiilogten #1% @@ -27500,7 +28901,7 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_length_loop\xint_UDsignfork#1{}-#1\krof}% % \end{macrocode} % \subsection{\csh{xintReverseDigits}} -% \lverb|& +%\begin{lverb} % 1.2. % % This puts digits in reverse order, not suppressing leading zeros @@ -27510,7 +28911,7 @@ mode) and will go ahead hoping repair\endcsname % 1.2l variant is robust against non terminated \the\numexpr input. % % This macro is currently not used elsewhere in xint code. -% | +%\end{lverb} % \begin{macrocode} \def\xintReverseDigits {\romannumeral0\xintreversedigits }% \def\xintreversedigits #1% @@ -27551,13 +28952,14 @@ mode) and will go ahead hoping repair\endcsname \let\xintRev\xintReverseDigits % \end{macrocode} % \subsection{\csh{xintiiE}} -% \lverb|Originally was used in \xintiiexpr. Transferred from xintfrac for +%\begin{lverb} +% Originally was used in \xintiiexpr. Transferred from xintfrac for % 1.1. % Code rewritten for 1.2i. % \xintiiE{x}{e} extends x with e zeroes if e is positive and simply outputs % x if e is zero or negative. Attention, le comportement pour e < 0 ne doit % pas être modifié car \xintMod et autres macros en dépendent. -% | +%\end{lverb} % \begin{macrocode} \def\xintiiE {\romannumeral0\xintiie }% \def\xintiie #1#2% @@ -27570,16 +28972,17 @@ mode) and will go ahead hoping repair\endcsname \krof #1% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % le #2 a le bon pattern terminé par ; #1=0 est OK pour \XINT_rep. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_iie_a #1.% {\expandafter\XINT_dsx_append\romannumeral\XINT_rep #1\endcsname 0.}% \def\XINT_iie_neg #1.#2;{ #2}% % \end{macrocode} % \subsection{\csh{xintDecSplit}} -% \lverb@DECIMAL SPLIT +%\begin{lverb} +% DECIMAL SPLIT % % The macro \xintDecSplit {x}{A} cuts A which is composed of digits (leading % zeroes ok, but no sign) (*) into two (each possibly empty) pieces L and R. @@ -27598,7 +29001,7 @@ mode) and will go ahead hoping repair\endcsname % Entirely rewritten for 1.2i (2016/12/11). % % Attention: \xintDecSplit not robust against non terminated second argument. -% @ +%\end{lverb} % \begin{macrocode} \def\xintDecSplit {\romannumeral0\xintdecsplit }% \def\xintdecsplit #1#2% @@ -27609,10 +29012,6 @@ mode) and will go ahead hoping repair\endcsname \xint_bye2345678\xint_bye..% }% \def\XINT_split_finish #1.#2.{{#1}{#2}}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_split_xfork #1% {% \xint_UDzerominusfork @@ -27659,10 +29058,6 @@ mode) and will go ahead hoping repair\endcsname {#1#2#3#4#5#6#7\XINT_split_fromleft_end_b}% \expandafter\def\csname XINT_split_fromleft_end0\endcsname #1#2#3#4#5#6#7#8% {#1#2#3#4#5#6#7#8\XINT_split_fromleft_end_b}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_split_fromleft_end_b #1\xint_bye#2\xint_bye.{.#1}% puis . \def\XINT_split_fromright #1.#2\xint_bye {% @@ -27673,10 +29068,6 @@ mode) and will go ahead hoping repair\endcsname \xint_c_iv\xint_c_iii\xint_c_ii\xint_c_i\xint_c_\xint_bye .#2\xint_bye }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_split_fromright_a #1% {% \xint_UDsignfork @@ -27711,7 +29102,8 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_splitr_finish #1.#2.{ #2}% % \end{macrocode} % \subsection{\csh{xintDSHr}} -% \lverb@DECIMAL SHIFTS \xintDSH {x}{A}$\ +%\begin{lverb} +% DECIMAL SHIFTS \xintDSH {x}{A}$\ % si x <= 0, fait A -> A.10^(|x|). % si x > 0, et A >=0, fait A -> quo(A,10^(x))$\ % si x > 0, et A < 0, fait A -> -quo(-A,10^(x))$\ @@ -27721,19 +29113,11 @@ mode) and will go ahead hoping repair\endcsname % Badly named macros. % % Rewritten for 1.2i, this was old code and \xintDSx has changed interface. -% @ +%\end{lverb} % \begin{macrocode} \def\xintDSHr {\romannumeral0\xintdshr }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\xintdshr #1#2% {% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \expandafter\XINT_dshr_fork\the\numexpr#1\expandafter.\romannumeral`&&@#2;% }% \def\XINT_dshr_fork #1% @@ -27747,10 +29131,6 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_dshr_xzeroorneg #1;{ 0}% \def\XINT_dshr_xpositive {% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \expandafter\xint_stop_atsecondoftwo\romannumeral0\XINT_dsx_xisPos }% % \end{macrocode} @@ -27759,20 +29139,12 @@ mode) and will go ahead hoping repair\endcsname \def\xintDSH {\romannumeral0\xintdsh }% \def\xintdsh #1#2% {% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \expandafter\XINT_dsh_fork\the\numexpr#1\expandafter.\romannumeral`&&@#2;% }% \def\XINT_dsh_fork #1% {% \xint_UDzerominusfork #1-\XINT_dsh_xiszero -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} 0#1\XINT_dsx_xisNeg_checkA 0-{\XINT_dsh_xisPos #1}% \krof @@ -27780,15 +29152,11 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_dsh_xiszero #1.#2;{ #2}% \def\XINT_dsh_xisPos {% -% \end{macrocode} -% \lverb|& \expandafter\xint_stop_atfirstoftwo\romannumeral0\XINT_dsx_xisPos -% | -% \begin{macrocode} }% % \end{macrocode} % \subsection{\csh{xintDSx}} -% \lverb@& +%\begin{lverb} % --> Attention le cas x=0 est traité dans la même catégorie que x > 0 <-- % %( si x < 0, fait A -> A.10^(|x|) @@ -27803,15 +29171,11 @@ mode) and will go ahead hoping repair\endcsname % % Rewritten for 1.2i, this was old code. % -% @ +%\end{lverb} % \begin{macrocode} \def\xintDSx {\romannumeral0\xintdsx }% \def\xintdsx #1#2% {% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \expandafter\XINT_dsx_fork\the\numexpr#1\expandafter.\romannumeral`&&@#2;% }% \def\XINT_dsx_fork #1% @@ -27826,30 +29190,14 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_dsx_xisNeg_checkA #1.#2% {% \xint_gob_til_zero #2\XINT_dsx_xisNeg_Azero 0% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \expandafter\XINT_dsx_append\romannumeral\XINT_rep #1\endcsname 0.#2% }% \def\XINT_dsx_xisNeg_Azero #1;{ 0}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_dsx_addzeros #1% {\expandafter\XINT_dsx_append\romannumeral\XINT_rep#1\endcsname0.}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_dsx_addzerosnofuss #1% {\expandafter\XINT_dsx_append\romannumeral\xintreplicate{#1}0.}% \def\XINT_dsx_append #1.#2;{ #2#1}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_dsx_xisPos #1.#2% {% \xint_UDzerominusfork @@ -27864,10 +29212,6 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_dsx_AisNeg_checkiffirstempty \romannumeral0\XINT_split_xfork #1.#2\xint_bye2345678\xint_bye..% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_dsx_AisNeg_checkiffirstempty #1% {% \xint_gob_til_dot #1\XINT_dsx_AisNeg_finish_zero.% @@ -27883,19 +29227,11 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_dsx_end \expandafter {\romannumeral0\XINT_num {#2}}{-#1}% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_dsx_AisPos #1.#2;% {% \expandafter\XINT_dsx_AisPos_finish \romannumeral0\XINT_split_xfork #1.#2\xint_bye2345678\xint_bye..% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_dsx_AisPos_finish #1.#2.% {% \expandafter\XINT_dsx_end @@ -27905,17 +29241,21 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_dsx_end #1#2{\expandafter{#2}{#1}}% % \end{macrocode} % \subsection{\csh{xintiiEq}} -% \lverb|no \xintiieq.| +%\begin{lverb} +% no \xintiieq. +%\end{lverb} % \begin{macrocode} \def\xintiiEq #1#2{\romannumeral0\xintiiifeq{#1}{#2}{1}{0}}% % \end{macrocode} % \subsection{\csh{xintiiNotEq}} -% \lverb|Pour xintexpr. Pas de version en lowercase.| +%\begin{lverb} +% Pour xintexpr. Pas de version en lowercase. +%\end{lverb} % \begin{macrocode} \def\xintiiNotEq #1#2{\romannumeral0\xintiiifeq {#1}{#2}{0}{1}}% % \end{macrocode} % \subsection{\csh{xintiiGeq}} -% \lverb|& +%\begin{lverb} % PLUS GRAND OU ÉGAL % attention compare les **valeurs absolues** % @@ -27924,7 +29264,7 @@ mode) and will go ahead hoping repair\endcsname % 1.2l rewrote \xintiiCmp, but forgot to handle \xintiiGeq too. Done at 1.2m. % % This macro should have been called \xintGEq for example. -% | +%\end{lverb} % \begin{macrocode} \def\xintiiGeq {\romannumeral0\xintiigeq }% \def\xintiigeq #1{\expandafter\XINT_iigeq\romannumeral`&&@#1\xint:}% @@ -27932,10 +29272,6 @@ mode) and will go ahead hoping repair\endcsname {% \expandafter\XINT_geq_fork\expandafter #1\romannumeral`&&@#3\xint:#2\xint: }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_geq #1#2\xint:#3% {% \expandafter\XINT_geq_fork\expandafter #1\romannumeral0\xintnum{#3}\xint:#2\xint: @@ -27984,29 +29320,34 @@ mode) and will go ahead hoping repair\endcsname \def\xintiiLtorEq #1#2{\romannumeral0\xintiiifgt {#1}{#2}{0}{1}}% % \end{macrocode} % \subsection{\csh{xintiiIsZero}} -% \lverb|1.09a. restyled in 1.09i. 1.1 adds \xintiiIsZero, etc... for -% optimization in \xintexpr| +%\begin{lverb} +% 1.09a. restyled in 1.09i. 1.1 adds \xintiiIsZero, etc... for +% optimization in \xintexpr +%\end{lverb} % \begin{macrocode} \def\xintiiIsZero {\romannumeral0\xintiiiszero }% \def\xintiiiszero #1{\if0\xintiiSgn{#1}\xint_afterfi{ 1}\else\xint_afterfi{ 0}\fi}% % \end{macrocode} % \subsection{\csh{xintiiIsNotZero}} -% \lverb|1.09a. restyled in 1.09i. 1.1 adds \xintiiIsZero, etc... for -% optimization in \xintexpr| +%\begin{lverb} +% 1.09a. restyled in 1.09i. 1.1 adds \xintiiIsZero, etc... for +% optimization in \xintexpr +%\end{lverb} % \begin{macrocode} \def\xintiiIsNotZero {\romannumeral0\xintiiisnotzero }% \def\xintiiisnotzero #1{\if0\xintiiSgn{#1}\xint_afterfi{ 0}\else\xint_afterfi{ 1}\fi}% % \end{macrocode} % \subsection{\csh{xintiiIsOne}} -% \lverb|Added in 1.03. 1.09a defines \xintIsOne. 1.1a adds \xintiiIsOne. +%\begin{lverb} +% Added in 1.03. 1.09a defines \xintIsOne. 1.1a adds \xintiiIsOne. % % \XINT_isOne rewritten for 1.2g. Works with expanded strict integers, % positive or negative. % % % -%| +%\end{lverb} % \begin{macrocode} \def\xintiiIsOne {\romannumeral0\xintiiisone }% \def\xintiiisone #1{\expandafter\XINT_isone\romannumeral`&&@#1XY}% @@ -28025,8 +29366,10 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiOdd}} -% \lverb|\xintOdd is needed for the xintexpr-essions even() and odd() -% functions (and also by \xintNewExpr).| +%\begin{lverb} +% \xintOdd is needed for the xintexpr-essions even() and odd() +% functions (and also by \xintNewExpr). +%\end{lverb} % \begin{macrocode} \def\xintiiOdd {\romannumeral0\xintiiodd }% \def\xintiiodd #1% @@ -28051,7 +29394,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiMON}} -% \lverb|MINUS ONE TO THE POWER N| +%\begin{lverb} +% MINUS ONE TO THE POWER N +%\end{lverb} % \begin{macrocode} \def\xintiiMON {\romannumeral0\xintiimon }% \def\xintiimon #1% @@ -28064,7 +29409,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiMMON}} -% \lverb|MINUS ONE TO THE POWER N-1| +%\begin{lverb} +% MINUS ONE TO THE POWER N-1 +%\end{lverb} % \begin{macrocode} \def\xintiiMMON {\romannumeral0\xintiimmon }% \def\xintiimmon #1% @@ -28077,8 +29424,10 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintSgnFork}} -% \lverb|Expandable three-way fork added in 1.07. The argument #1 must expand -% to non-self-ending -1,0 or 1. 1.09i with _thenstop (now _stop_at...).| +%\begin{lverb} +% Expandable three-way fork added in 1.07. The argument #1 must expand +% to non-self-ending -1,0 or 1. 1.09i with _thenstop (now _stop_at...). +%\end{lverb} % \begin{macrocode} \def\xintSgnFork {\romannumeral0\xintsgnfork }% \def\xintsgnfork #1% @@ -28090,14 +29439,16 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiifSgn}} -% \lverb|Expandable three-way fork added in 1.09a. Branches expandably +%\begin{lverb} +% Expandable three-way fork added in 1.09a. Branches expandably % depending on whether <0, =0, >0. Choice of branch guaranteed in two steps. % % 1.09i has \xint_firstofthreeafterstop (now \xint_stop_atfirstofthree) etc % for faster expansion. % % 1.1 adds \xintiiifSgn for optimization in xintexpr-essions. Should I move -% them to xintcore? (for bnumexpr)| +% them to xintcore? (for bnumexpr) +%\end{lverb} % \begin{macrocode} \def\xintiiifSgn {\romannumeral0\xintiiifsgn }% \def\xintiiifsgn #1% @@ -28110,8 +29461,10 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiifCmp}} -% \lverb|1.09e -% \xintifCmp {n}{m}{if n<m}{if n=m}{if n>m}. 1.1a adds ii variant| +%\begin{lverb} +% 1.09e +% \xintifCmp {n}{m}{if n<m}{if n=m}{if n>m}. 1.1a adds ii variant +%\end{lverb} % \begin{macrocode} \def\xintiiifCmp {\romannumeral0\xintiiifcmp }% \def\xintiiifcmp #1#2% @@ -28124,7 +29477,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiifEq}} -% \lverb|1.09a \xintifEq {n}{m}{YES if n=m}{NO if n<>m}. 1.1a adds ii variant| +%\begin{lverb} +% 1.09a \xintifEq {n}{m}{YES if n=m}{NO if n<>m}. 1.1a adds ii variant +%\end{lverb} % \begin{macrocode} \def\xintiiifEq {\romannumeral0\xintiiifeq }% \def\xintiiifeq #1#2% @@ -28136,7 +29491,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiifGt}} -% \lverb|1.09a \xintifGt {n}{m}{YES if n>m}{NO if n<=m}. 1.1a adds ii variant| +%\begin{lverb} +% 1.09a \xintifGt {n}{m}{YES if n>m}{NO if n<=m}. 1.1a adds ii variant +%\end{lverb} % \begin{macrocode} \def\xintiiifGt {\romannumeral0\xintiiifgt }% \def\xintiiifgt #1#2% @@ -28148,8 +29505,10 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiifLt}} -% \lverb|1.09a \xintifLt {n}{m}{YES if n<m}{NO if n>=m}. Restyled in 1.09i. -% 1.1a adds ii variant| +%\begin{lverb} +% 1.09a \xintifLt {n}{m}{YES if n<m}{NO if n>=m}. Restyled in 1.09i. +% 1.1a adds ii variant +%\end{lverb} % \begin{macrocode} \def\xintiiifLt {\romannumeral0\xintiiiflt }% \def\xintiiiflt #1#2% @@ -28161,12 +29520,12 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiifZero}} -% \lverb|Expandable two-way fork added in 1.09a. Branches expandably depending on +%\begin{lverb} +% Expandable two-way fork added in 1.09a. Branches expandably depending on % whether the argument is zero (branch A) or not (branch B). 1.09i restyling. By % the way it appears (not thoroughly tested, though) that \if tests are faster % than \ifnum tests. 1.1 adds ii versions. -% -% 1.2o deprecates \xintifZero.| +%\end{lverb} % \begin{macrocode} \def\xintiiifZero {\romannumeral0\xintiiifzero }% \def\xintiiifzero #1% @@ -28191,7 +29550,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiifOne}} -% \lverb|added in 1.09i. 1.1a adds \xintiiifOne.| +%\begin{lverb} +% added in 1.09i. 1.1a adds \xintiiifOne. +%\end{lverb} % \begin{macrocode} \def\xintiiifOne {\romannumeral0\xintiiifone }% \def\xintiiifone #1% @@ -28204,7 +29565,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiifOdd}} -% \lverb|1.09e. Restyled in 1.09i. 1.1a adds \xintiiifOdd.| +%\begin{lverb} +% 1.09e. Restyled in 1.09i. 1.1a adds \xintiiifOdd. +%\end{lverb} % \begin{macrocode} \def\xintiiifOdd {\romannumeral0\xintiiifodd }% \def\xintiiifodd #1% @@ -28217,36 +29580,42 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintifTrueAelseB}, \csh{xintifFalseAelseB}} -% \lverb|1.09i. 1.2i has removed deprecated \xintifTrueFalse, \xintifTrue. +%\begin{lverb} +% 1.09i, with name changes at 1.2i. % % 1.2o uses \xintiiifNotZero, see comments to \xintAND etc... This will work % fine with arguments being nested xintfrac.sty macros, without the overhead -% of \xintNum or \xintRaw parsing.| +% of \xintNum or \xintRaw parsing. +%\end{lverb} % \begin{macrocode} \def\xintifTrueAelseB {\romannumeral0\xintiiifnotzero}% \def\xintifFalseAelseB{\romannumeral0\xintiiifzero}% % \end{macrocode} % \subsection{\csh{xintIsTrue}, \csh{xintIsFalse}} -% \lverb|1.09c. Suppressed at 1.2o. They seem not to have been documented, fortunately.| +%\begin{lverb} +% 1.09c. Suppressed at 1.2o. They seem not to have been documented, fortunately. +%\end{lverb} % \begin{macrocode} %\let\xintIsTrue \xintIsNotZero %\let\xintIsFalse\xintIsZero % \end{macrocode} % \subsection{\csh{xintNOT}} -% \lverb|1.09c. But it should have been called \xintNOT, not \xintNot. Former -% denomination deprecated at 1.2o. Besides, the macro is now defined as ii-type. -% | +%\begin{lverb} +% 1.09c with name change at 1.2o. Besides, the macro is now defined as ii-type. +%\end{lverb} % \begin{macrocode} \def\xintNOT{\romannumeral0\xintiiiszero}% % \end{macrocode} % \subsection{\csh{xintAND}, \csh{xintOR}, \csh{xintXOR}} -% \lverb|Added with 1.09a. But they used \xintSgn, etc... rather than +%\begin{lverb} +% Added with 1.09a. But they used \xintSgn, etc... rather than % \xintiiSgn. This brings \xintNum overhead which is not really desired, and % which is not needed for use by xintexpr.sty. At 1.2o I modify them to use % only ii macros. This is enough for sign or zeroness even for xintfrac % format, as manipulated inside the \xintexpr. Big hesitation whether there % should be however \xintiiAND outputting 1 or 0 versus an \xintAND outputting -% 1[0] versus 0[0] for example.| +% 1[0] versus 0[0] for example. +%\end{lverb} % \begin{macrocode} \def\xintAND {\romannumeral0\xintand }% \def\xintand #1#2{\if0\xintiiSgn{#1}\expandafter\xint_firstoftwo @@ -28261,7 +29630,8 @@ mode) and will go ahead hoping repair\endcsname \xint_afterfi{ 0}\else\xint_afterfi{ 1}\fi }% % \end{macrocode} % \subsection{\csh{xintANDof}} -% \lverb|New with 1.09a. \xintANDof works also with an empty list. Empty items +%\begin{lverb} +% New with 1.09a. \xintANDof works also with an empty list. Empty items % however are not accepted. % % 1.2l made \xintANDof robust against non terminated items. @@ -28276,7 +29646,7 @@ mode) and will go ahead hoping repair\endcsname % family (such as \xintGCDof, \xintSum) also use \xint: internally and % although not strictly needed having two separate ones clarifies. % -% | +%\end{lverb} % \begin{macrocode} \def\xintANDof {\romannumeral0\xintandof }% \def\xintandof #1{\expandafter\XINT_andof\romannumeral`&&@#1^}% @@ -28290,12 +29660,14 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_andof_yes ^#1\XINT_andof_no{ 1}% % \end{macrocode} % \subsection{\csh{xintORof}} -% \lverb|New with 1.09a. Works also with an empty list. Empty items +%\begin{lverb} +% New with 1.09a. Works also with an empty list. Empty items % however are not accepted. % % 1.2l made \xintORof robust against non terminated items. % -% Refactored at 1.4.| +% Refactored at 1.4. +%\end{lverb} % \begin{macrocode} \def\xintORof {\romannumeral0\xintorof }% \def\xintorof #1{\expandafter\XINT_orof\romannumeral`&&@#1^}% @@ -28309,7 +29681,8 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_orof_no ^#1\XINT_orof{ 0}% % \end{macrocode} % \subsection{\csh{xintXORof}} -% \lverb|New with 1.09a. Works with an empty list, too. Empty items +%\begin{lverb} +% New with 1.09a. Works with an empty list, too. Empty items % however are not accepted. \XINT_xorof_c more % efficient in 1.09i. % @@ -28318,7 +29691,7 @@ mode) and will go ahead hoping repair\endcsname % Refactored at 1.4 to use \numexpr (or an \ifnum). I have not tested if % more efficient or not or if one can do better without \the. % \XINT_XORof for xintexpr matters. -% | +%\end{lverb} % \begin{macrocode} \def\xintXORof {\romannumeral0\xintxorof }% \def\xintxorof #1{\expandafter\XINT_xorof\romannumeral`&&@#1^}% @@ -28333,13 +29706,13 @@ mode) and will go ahead hoping repair\endcsname {1\relax\xint_afterfi{ 0}\else\xint_afterfi{ 1}\fi}% % \end{macrocode} % \subsection{\csh{xintiiMax}} -% \lverb|& +%\begin{lverb} % At 1.2m, a long-standing bug was fixed: \xintiiMax had the overhead of % applying \xintNum to its arguments due to use of a sub-macro of \xintGeq % code to which this overhead was added at some point. % % And on this occasion I reduced even more number of times input is grabbed. -% | +%\end{lverb} % \begin{macrocode} \def\xintiiMax {\romannumeral0\xintiimax }% \def\xintiimax #1% @@ -28351,10 +29724,11 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_max_fork\romannumeral`&&@#2\xint:#1\xint: }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % #3#4 vient du *premier*, % #1#2 vient du *second*. I have renamed the sub-macros at 1.2m because the -% terminology was quite counter-intuitive; there was no bug, but still.| +% terminology was quite counter-intuitive; there was no bug, but still. +%\end{lverb} % \begin{macrocode} \def\XINT_max_fork #1#2\xint:#3#4\xint: {% @@ -28377,9 +29751,10 @@ mode) and will go ahead hoping repair\endcsname {#3#4}{#1#2}% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Refactored at 1.2m for avoiding grabbing arguments. Position of inputs -% shared with iiCmp and iiGeq code.| +% shared with iiCmp and iiGeq code. +%\end{lverb} % \begin{macrocode} \def\XINT_max_zerozero #1\fi{\xint_stop_atfirstoftwo }% \def\XINT_max_zeroplus #1\fi{\xint_stop_atsecondoftwo }% @@ -28391,9 +29766,11 @@ mode) and will go ahead hoping repair\endcsname \if1\romannumeral0\XINT_geq_plusplus }% % \end{macrocode} -% \lverb+Premier des testés |A|=-A, second est |B|=-B. On veut le max(A,B), +%\begin{lverb} +% Premier des testés |A|=-A, second est |B|=-B. On veut le max(A,B), % c'est donc A si |A|<|B| (ou |A|=|B|, mais peu importe alors). Donc on peut -% faire cela avec \unless. Simple.+ +% faire cela avec \unless. Simple. +%\end{lverb} % \begin{macrocode} \def\XINT_max_minusminus --% {% @@ -28401,16 +29778,16 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiMin}} -% \lverb|\xintnum added New with 1.09a. I add \xintiiMin in 1.1 and mark as -% deprecated \xintMin, renamed \xintiMin. \xintMin NOW REMOVED (1.2, as -% \xintMax, \xintMaxof), only provided by \xintfracnameimp. +%\begin{lverb} +% New with 1.09a. I add \xintiiMin in 1.1 and \xintMin is +% an $xintfracnameimp macro. % % At 1.2m, a long-standing bug was fixed: \xintiiMin had the overhead of % applying \xintNum to its arguments due to use of a sub-macro of \xintGeq % code to which this overhead was added at some point. % % And on this occasion I reduced even more number of times input is grabbed. -% | +%\end{lverb} % \begin{macrocode} \def\xintiiMin {\romannumeral0\xintiimin }% \def\xintiimin #1% @@ -28456,7 +29833,8 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintiiMaxof}} -% \lverb|New with 1.09a. 1.2 has NO MORE \xintMaxof, requires \xintfracname. +%\begin{lverb} +% New with 1.09a. 1.2 has NO MORE \xintMaxof, requires \xintfracname. % 1.2a adds \xintiiMaxof, as \xintiiMaxof:csv is not public. % % NOT compatible with empty list. @@ -28465,7 +29843,8 @@ mode) and will go ahead hoping repair\endcsname % % 1.4 refactors code to allow empty argument. For usage by \xintiiexpr. % Slight deterioration, will come back. -% | +% +%\end{lverb} % \begin{macrocode} \def\xintiiMaxof {\romannumeral0\xintiimaxof }% \def\xintiimaxof #1{\expandafter\XINT_iimaxof\romannumeral`&&@#1^}% @@ -28484,9 +29863,11 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_iimaxof_e ^#1\xintiimax #2#3\xint:{ #2}% % \end{macrocode} % \subsection{\csh{xintiiMinof}} -% \lverb|1.09a. 1.2a adds \xintiiMinof which was lacking. +%\begin{lverb} +% 1.09a. 1.2a adds \xintiiMinof which was lacking. % -% 1.4 refactoring for \xintiiexpr matters.| +% 1.4 refactoring for \xintiiexpr matters. +%\end{lverb} % \begin{macrocode} \def\xintiiMinof {\romannumeral0\xintiiminof }% \def\xintiiminof #1{\expandafter\XINT_iiminof\romannumeral`&&@#1^}% @@ -28505,12 +29886,13 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_iiminof_e ^#1\xintiimin #2#3\xint:{ #2}% % \end{macrocode} % \subsection{\csh{xintiiSum}} -% \lverb|\xintiiSum {{a}{b}...{z}} +%\begin{lverb} +% \xintiiSum {{a}{b}...{z}} % Refactored at 1.4 for matters initially related to xintexpr delimiter % choice. % % -% | +%\end{lverb} % \begin{macrocode} \def\xintiiSum {\romannumeral0\xintiisum }% \def\xintiisum #1{\expandafter\XINT_iisum\romannumeral`&&@#1^}% @@ -28526,7 +29908,9 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_iisum_empty ^#1\xint:{ 0}% % \end{macrocode} -% \lverb|bad coding as it depends on internal conventions of \XINT_add_nfork| +%\begin{lverb} +% bad coding as it depends on internal conventions of \XINT_add_nfork +%\end{lverb} % \begin{macrocode} \def\XINT_iisum_loop #1#2\xint:#3% {% @@ -28539,12 +29923,15 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_iisum_loop\romannumeral0\XINT_add_nfork #1#2% }% % \end{macrocode} -% \lverb|see previous comment!| +%\begin{lverb} +% see previous comment! +%\end{lverb} % \begin{macrocode} \def\XINT_iisum_loop_end ^#1\XINT_add_nfork #2#3\xint:#4\xint:\xint:{ #2#4}% % \end{macrocode} % \subsection{\csh{xintiiPrd}} -% \lverb|\xintiiPrd {{a}...{z}} +%\begin{lverb} +% \xintiiPrd {{a}...{z}} % % % Macros renamed and refactored (slightly more macros here to supposedly bring @@ -28555,17 +29942,18 @@ mode) and will go ahead hoping repair\endcsname % hits a zero value. % % -%| +%\end{lverb} % \begin{macrocode} \def\xintiiPrd {\romannumeral0\xintiiprd }% \def\xintiiprd #1{\expandafter\XINT_iiprd\romannumeral`&&@#1^}% \def\XINT_iiPrd{\romannumeral0\XINT_iiprd}% % \end{macrocode} -% \lverb|The above romannumeral caused f-expansion of the list argument. +%\begin{lverb} +% The above romannumeral caused f-expansion of the list argument. % We f-expand below the first item and each successive items because % we do not use \xintiiMul but jump directly into \XINT_mul_nfork. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_iiprd #1% {% @@ -28580,7 +29968,9 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_iiprd_empty ^#1\xint:{ 1}% \def\XINT_iiprd_zero 0#1^{ 0}% % \end{macrocode} -% \lverb|bad coding as it depends on internal conventions of \XINT_mul_nfork| +%\begin{lverb} +% bad coding as it depends on internal conventions of \XINT_mul_nfork +%\end{lverb} % \begin{macrocode} \def\XINT_iiprd_loop #1#2\xint:#3% {% @@ -28594,12 +29984,15 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_iiprd_loop\romannumeral0\XINT_mul_nfork #1#2% }% % \end{macrocode} -% \lverb|see previous comment!| +%\begin{lverb} +% see previous comment! +%\end{lverb} % \begin{macrocode} \def\XINT_iiprd_loop_end ^#1\XINT_mul_nfork #2#3\xint:#4\xint:\xint:{ #2#4}% % \end{macrocode} % \subsection{\csh{xintiiSquareRoot}} -% \lverb|First done with 1.08. +%\begin{lverb} +% First done with 1.08. % % 1.1 added \xintiiSquareRoot. % @@ -28634,7 +30027,7 @@ mode) and will go ahead hoping repair\endcsname % Also, 1.2k adds an \xintiSqrtR macro, for coherence as \xintiSqrt is % defined (and mentioned in user manual.) % -% | +%\end{lverb} % % \begin{macrocode} \def\xintiiSquareRoot {\romannumeral0\xintiisquareroot }% @@ -28671,26 +30064,14 @@ mode) and will go ahead hoping repair\endcsname \fi #1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_bE #1.#2#3#4% {% \XINT_sqrt_c {#3#4}#2{#1}#3#4% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_bO #1.#2#3% {% \XINT_sqrt_c #3#2{#1}#3% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_c #1#2% {% \expandafter #2% @@ -28702,28 +30083,16 @@ mode) and will go ahead hoping repair\endcsname 10\else 9\fi \else 8\fi \else 7\fi \else 6\fi \else 5\fi \else 4\fi \else 3\fi \else 2\fi \else 1\fi .% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_small_d #1.#2% {% \expandafter\XINT_sqrt_small_e \the\numexpr #1\ifcase \numexpr #2/\xint_c_ii-\xint_c_i\relax \or 0\or 00\or 000\or 0000\fi .% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_small_e #1.#2.% {% \expandafter\XINT_sqrt_small_ea\the\numexpr #1*#1-#2.#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_small_ea #1% {% \if0#1\xint_dothis\XINT_sqrt_small_ez\fi @@ -28732,37 +30101,21 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_sqrt_small_ez 0.#1.{\expandafter{\the\numexpr#1+\xint_c_i \expandafter}\expandafter{\the\numexpr #1*\xint_c_ii+\xint_c_i}}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_small_eb -#1.#2.% {% \expandafter\XINT_sqrt_small_ec \the\numexpr (#1-\xint_c_i+#2)/(\xint_c_ii*#2).#1.#2.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_small_ec #1.#2.#3.% {% \expandafter\XINT_sqrt_small_f \the\numexpr -#2+\xint_c_ii*#3*#1+#1*#1\expandafter.\the\numexpr #3+#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_small_f #1.#2.% {% \expandafter\XINT_sqrt_small_g \the\numexpr (#1+#2)/(\xint_c_ii*#2)-\xint_c_i.#1.#2.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_small_g #1#2.% {% \if 0#1% @@ -28772,10 +30125,6 @@ mode) and will go ahead hoping repair\endcsname \fi #1#2.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_small_h #1.#2.#3.% {% \expandafter\XINT_sqrt_small_f @@ -28783,41 +30132,21 @@ mode) and will go ahead hoping repair\endcsname \the\numexpr #3-#1.% }% \def\XINT_sqrt_small_end #1.#2.#3.{{#3}{#2}}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_d #1.#2% {% \ifodd #2 \xint_dothis{\expandafter\XINT_sqrt_big_eO}\fi \xint_orthat{\expandafter\XINT_sqrt_big_eE}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \the\numexpr (#2-\xint_c_i)/\xint_c_ii.#1;% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_eE #1;#2#3#4#5#6#7#8#9% {% \XINT_sqrt_big_eE_a #1;{#2#3#4#5#6#7#8#9}% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_eE_a #1.#2;#3% {% \expandafter\XINT_sqrt_bigormed_f \romannumeral0\XINT_sqrt_small_e #2000.#3.#1;% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_eO #1;#2#3#4#5#6#7#8#9% {% \XINT_sqrt_big_eO_a #1;{#2#3#4#5#6#7#8#9}% @@ -28827,10 +30156,6 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_sqrt_bigormed_f \romannumeral0\XINT_sqrt_small_e #20000.#3#4.#1;% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_bigormed_f #1#2#3;% {% \ifnum#3<\xint_c_ix @@ -28842,37 +30167,21 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_sqrt_med_fvi {\XINT_sqrt_med_fa 0.}% \def\XINT_sqrt_med_fvii {\XINT_sqrt_med_fa 00.}% \def\XINT_sqrt_med_fviii{\XINT_sqrt_med_fa 000.}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_med_fa #1.#2.#3.#4;% {% \expandafter\XINT_sqrt_med_fb \the\numexpr (#30#1-5#1)/(\xint_c_ii*#2).#1.#2.#3.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_med_fb #1.#2.#3.#4.#5.% {% \expandafter\XINT_sqrt_small_ea \the\numexpr (#40#2-\xint_c_ii*#3*#1)*10#2+(#1*#1-#5)\expandafter.% \the\numexpr #30#2-#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_f #1;#2#3#4#5#6#7#8#9% {% \XINT_sqrt_big_fa #1;{#2#3#4#5#6#7#8#9}% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_fa #1.#2.#3;#4% {% \expandafter\XINT_sqrt_big_ga @@ -28880,9 +30189,9 @@ mode) and will go ahead hoping repair\endcsname \romannumeral0\XINT_sqrt_med_fa 000.#1.#2.;#4.% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_sqrt_big_ga #1.#2#3% {% @@ -28891,20 +30200,12 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_sqrt_big_ka \fi #1.#3.#2.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gb #1.#2.#3.% {% \expandafter\XINT_sqrt_big_gc \the\numexpr (\xint_c_ii*#2-\xint_c_i)*\xint_c_x^viii/(\xint_c_iv*#3).% #3.#2.#1;% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gc #1.#2.#3.% {% \expandafter\XINT_sqrt_big_gd @@ -28913,26 +30214,14 @@ mode) and will go ahead hoping repair\endcsname {\xintiiSqr {#1}}.% \romannumeral0\xintiisub{#200000000}{#1}.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gd #1.#2.% {% \expandafter\XINT_sqrt_big_ge #2.#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_ge #1;#2#3#4#5#6#7#8#9% {\XINT_sqrt_big_gf #1.#2#3#4#5#6#7#8#9;}% \def\XINT_sqrt_big_gf #1;#2#3#4#5#6#7#8#9% {\XINT_sqrt_big_gg #1#2#3#4#5#6#7#8#9.}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gg #1.#2.#3.#4.% {% \expandafter\XINT_sqrt_big_gloop @@ -28940,27 +30229,15 @@ mode) and will go ahead hoping repair\endcsname \the\numexpr #3-\xint_c_viii\expandafter.% \romannumeral0\xintiisub {#2}{\xintiNum{#4}}.#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gloop #1.#2.% {% \unless\ifnum #1<#2 \xint_dothis\XINT_sqrt_big_ka \fi \xint_orthat{\XINT_sqrt_big_gi #1.}#2.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gi #1.% {% \expandafter\XINT_sqrt_big_gj\romannumeral\xintreplicate{#1}0.#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gj #1.#2.#3.#4.#5.% {% \expandafter\XINT_sqrt_big_gk @@ -28968,42 +30245,22 @@ mode) and will go ahead hoping repair\endcsname {\XINT_dbl #5\xint_bye2345678\xint_bye*\xint_c_ii\relax}.% #1.#5.#2.#3.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gk #1#2.#3.#4.% {% \expandafter\XINT_sqrt_big_gl \romannumeral0\xintiiadd {#2#3}{\xintiiSqr{#1}}.% \romannumeral0\xintiisub {#4#3}{#1}.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gl #1.#2.% {% \expandafter\XINT_sqrt_big_gm #2.#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gm #1.#2.#3.#4.#5.% {% \expandafter\XINT_sqrt_big_gn -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \romannumeral0\XINT_split_fromleft\xint_c_ii*#3.#5\xint_bye2345678\xint_bye..% #1.#2.#3.#4.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_gn #1.#2.#3.#4.#5.#6.% {% \expandafter\XINT_sqrt_big_gloop @@ -29011,17 +30268,9 @@ mode) and will go ahead hoping repair\endcsname \the\numexpr #6-#5\expandafter.% \romannumeral0\xintiisub{#4}{\xintiNum{#1}}.#3.#2.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_ka #1.#2.#3.#4.% {% \expandafter\XINT_sqrt_big_kb -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \romannumeral0\XINT_dsx_addzeros {#1}#3;.% \romannumeral0\xintiisub {\XINT_dsx_addzerosnofuss {\xint_c_ii*#1}#2;}% @@ -29031,10 +30280,6 @@ mode) and will go ahead hoping repair\endcsname {% \expandafter\XINT_sqrt_big_kc #2.#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_kc #1% {% \if0#1\xint_dothis\XINT_sqrt_big_kz\fi @@ -29050,20 +30295,12 @@ mode) and will go ahead hoping repair\endcsname {% \expandafter{\romannumeral0\xintinc{#2}}{#1}% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_kloop #1.#2.% {% \expandafter\XINT_sqrt_big_ke \romannumeral0\xintiidivision{#1}% {\romannumeral0\XINT_dbl #2\xint_bye2345678\xint_bye*\xint_c_ii\relax}{#2}% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_ke #1% {% \if0\XINT_Sgn #1\xint: @@ -29071,10 +30308,6 @@ mode) and will go ahead hoping repair\endcsname \else \expandafter \XINT_sqrt_big_kf \fi {#1}% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_kf #1#2#3% {% \expandafter\XINT_sqrt_big_kg @@ -29085,10 +30318,6 @@ mode) and will go ahead hoping repair\endcsname {% \expandafter\XINT_sqrt_big_kloop #2.#1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_sqrt_big_end #1#2#3{{#3}{#2}}% % \end{macrocode} % \subsection{\csh{xintiiSqrt}, \csh{xintiiSqrtR}} @@ -29099,15 +30328,18 @@ mode) and will go ahead hoping repair\endcsname \def\xintiiSqrtR {\romannumeral0\xintiisqrtr }% \def\xintiisqrtr {\expandafter\XINT_sqrtr_post\romannumeral0\xintiisquareroot }% % \end{macrocode} -% \lverb|N = (#1)^2 - #2 avec #1 le plus petit possible et #2>0 (hence #2<2*#1). +%\begin{lverb} +% N = (#1)^2 - #2 avec #1 le plus petit possible et #2>0 (hence #2<2*#1). % (#1-.5)^2=#1^2-#1+.25=N+#2-#1+.25. Si 0<#2<#1, <= N-0.75<N, donc rounded->#1 -% si #2>=#1, (#1-.5)^2>=N+.25>N, donc rounded->#1-1.| +% si #2>=#1, (#1-.5)^2>=N+.25>N, donc rounded->#1-1. +%\end{lverb} % \begin{macrocode} \def\XINT_sqrtr_post #1#2% {\xintiiifLt {#2}{#1}{ #1}{\XINT_dec #1\XINT_dec_bye234567890\xint_bye}}% % \end{macrocode} % \subsection{\csh{xintiiBinomial}} -% \lverb|2015/11/28-29 for 1.2f. +%\begin{lverb} +% 2015/11/28-29 for 1.2f. % % 2016/11/19 for 1.2h: I truly can't understand why I hard-coded last % year an error-message for arguments outside of the range for binomial @@ -29115,10 +30347,7 @@ mode) and will go ahead hoping repair\endcsname % value for binomial(x,y), if y<0 or x<y ! % % I really lack some kind of infinity or NaN value. -% -% 1.2o deprecates \xintiBinomial. (which xintfrac.sty redefined to use -% \xintNum) -% | +%\end{lverb} % \begin{macrocode} \def\xintiiBinomial {\romannumeral0\xintiibinomial }% \def\xintiibinomial #1#2% @@ -29130,10 +30359,12 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_binom_fork \the\numexpr#1-#2.#2.#1.% }% % \end{macrocode} -% \lverb|k.x-k.x. I hesitated to restrict maximal allowed value of x to 10000. +%\begin{lverb} +% k.x-k.x. I hesitated to restrict maximal allowed value of x to 10000. % Finally I don't. But due to using small multiplication and small division, x % must have at most eight digits. If x>=2^31 an arithmetic overflow error will -% have happened already.| +% have happened already. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_fork #1#2.#3#4.#5#6.% {% @@ -29150,19 +30381,22 @@ mode) and will go ahead hoping repair\endcsname \xint_orthat{\XINT_binom_a #3#4.#1#2.}% }% % \end{macrocode} -% \lverb|x-k.k. avec 0<k<x, k<=x-k. Les divisions produiront en extra après le +%\begin{lverb} +% x-k.k. avec 0<k<x, k<=x-k. Les divisions produiront en extra après le % quotient un terminateur 1!\Z!0!. On va procéder par petite multiplication % suivie par petite division. Donc ici on met le 1!\Z!0! pour amorcer. % % Le \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax est le terminateur pour le -% \XINT_unsep_cuzsmall final.| +% \XINT_unsep_cuzsmall final. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_a #1.#2.% {% \expandafter\XINT_binom_b\the\numexpr \xint_c_i+#1.1.#2.100000001!1!;!0!% }% % \end{macrocode} -% \lverb|y=x-k+1.j=1.k. On va évaluer par y/1*(y+1)/2*(y+2)/3 etc... On essaie +%\begin{lverb} +% y=x-k+1.j=1.k. On va évaluer par y/1*(y+1)/2*(y+2)/3 etc... On essaie % de regrouper de manière à utiliser au mieux \numexpr. On peut aller jusqu'à % x=10000 car 9999*10000<10^8. 463*464*465=99896880, 98*99*100*101=97990200. % On va vérifier à chaque étape si on dépasse un seuil. Le style de @@ -29170,7 +30404,8 @@ mode) and will go ahead hoping repair\endcsname % pourrait tout-à-fait avoir une verybigloop, mais bon. Je rajoute aussi un % verysmall. Le traitement est un peu différent pour elle afin d'aller jusqu'à % x=29 (et pas seulement 26 si je suivais le modèle des autres, mais je veux -% pouvoir faire binomial(29,1), binomial(29,2), ... en vsmall).| +% pouvoir faire binomial(29,1), binomial(29,2), ... en vsmall). +%\end{lverb} % \begin{macrocode} \def\XINT_binom_b #1.% {% @@ -29181,9 +30416,11 @@ mode) and will go ahead hoping repair\endcsname \xint_orthat\XINT_binom_vsmallloop #1.% }% % \end{macrocode} -% \lverb|y.j.k. Au départ on avait x-k+1.1.k. Ensuite on a des blocs 1<8d>! +%\begin{lverb} +% y.j.k. Au départ on avait x-k+1.1.k. Ensuite on a des blocs 1<8d>! % donnant le résultat intermédiaire, dans l'ordre, et à la fin on a 1!1;!0!. -% Dans smallloop on peut prendre 4 par 4.| +% Dans smallloop on peut prendre 4 par 4. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_smallloop #1.#2.#3.% {% @@ -29196,9 +30433,11 @@ mode) and will go ahead hoping repair\endcsname \fi #1.#2.#3.% }% % \end{macrocode} -% \lverb|Ça m'ennuie un peu de reprendre les #1, #2, #3 ici. On a besoin de +%\begin{lverb} +% Ça m'ennuie un peu de reprendre les #1, #2, #3 ici. On a besoin de % \numexpr pour \XINT_binom_div, mais de \romannumeral0 pour le unsep après -% \XINT_binom_mul.| +% \XINT_binom_mul. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_smallloop_a #1.#2.#3.% {% @@ -29217,7 +30456,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_binom_smallloop \fi #1.% }% % \end{macrocode} -% \lverb|Ici on prend trois par trois.| +%\begin{lverb} +% Ici on prend trois par trois. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_medloop #1.#2.#3.% {% @@ -29245,7 +30486,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_binom_medloop \fi #1.% }% % \end{macrocode} -% \lverb|Ici on prend deux par deux.| +%\begin{lverb} +% Ici on prend deux par deux. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_bigloop #1.#2.#3.% {% @@ -29272,7 +30515,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_binom_bigloop \fi #1.% }% % \end{macrocode} -% \lverb|Et finalement un par un.| +%\begin{lverb} +% Et finalement un par un. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_vbigloop #1.#2.#3.% {% @@ -29291,13 +30536,15 @@ mode) and will go ahead hoping repair\endcsname !\romannumeral0\XINT_binom_mul #1!% }% % \end{macrocode} -% \lverb|y.j.k. La partie very small. y est au plus 26 (non 29 mais retesté +%\begin{lverb} +% y.j.k. La partie very small. y est au plus 26 (non 29 mais retesté % dans \XINT_binom_vsmallloop_a), et tous les binomial(29,n) sont <10^8. On % peut donc faire y(y+1)(y+2)(y+3) et aussi il y a le fait que etex fait a*b/c % en double precision. Pour ne pas bifurquer à la fin sur smallloop, si n=27, % 27, ou 29 on procède un peu différemment des autres boucles. Si je testais % aussi #1 après #3-#2 pour les autres il faudrait des terminaisons -% différentes.| +% différentes. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_vsmallloop #1.#2.#3.% {% @@ -29324,8 +30571,6 @@ mode) and will go ahead hoping repair\endcsname \the\numexpr #2*(#2+\xint_c_i)*(#2+\xint_c_ii)*(#2+\xint_c_iii)\expandafter !\the\numexpr #1*(#1+\xint_c_i)*(#1+\xint_c_ii)*(#1+\xint_c_iii)!% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_binom_mul #1!#21!;!0!% {% \expandafter\XINT_rev_nounsep\expandafter{\expandafter}% @@ -29343,13 +30588,17 @@ mode) and will go ahead hoping repair\endcsname \the\numexpr \xint_c_x^viii+#1!% }% % \end{macrocode} -% \lverb|Vaguement envisagé d'éviter le 10^8+ mais bon.| +%\begin{lverb} +% Vaguement envisagé d'éviter le 10^8+ mais bon. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_vsmallmuldiv #1!#2!1#3!{\xint_c_x^viii+#2*#3/#1!}% % \end{macrocode} -% \lverb|On a des terminaisons communes aux trois situations small, med, big, +%\begin{lverb} +% On a des terminaisons communes aux trois situations small, med, big, % et on est sûr de pouvoir faire les multiplications dans \numexpr, car on -% vient ici *après* avoir comparé à 9999 ou 463 ou 98.| +% vient ici *après* avoir comparé à 9999 ou 463 ou 98. +%\end{lverb} % \begin{macrocode} \def\XINT_binom_end_iii #1.#2.#3.% {% @@ -29381,14 +30630,14 @@ mode) and will go ahead hoping repair\endcsname \the\numexpr\expandafter\XINT_binom_div\the\numexpr #2\expandafter !\romannumeral0\XINT_binom_mul #1!% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_binom_finish #1;!0!% {\XINT_unsep_cuzsmall #1\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax}% % \end{macrocode} -% \lverb|Duplication de code seulement pour la boucle avec très +%\begin{lverb} +% Duplication de code seulement pour la boucle avec très % petits coeffs, mais en plus on fait au maximum des possibilités. (on -% pourrait tester plus le résultat déjà obtenu).| +% pourrait tester plus le résultat déjà obtenu). +%\end{lverb} % \begin{macrocode} \def\XINT_binom_vsmallend_iii #1.% {% @@ -29441,7 +30690,8 @@ mode) and will go ahead hoping repair\endcsname }\XINT_binom_vsmallfinish{ }% % \end{macrocode} % \subsection{\csh{xintiiPFactorial}} -% \lverb?2015/11/29 for 1.2f. Partial factorial pfac(a,b)=(a+1)...b, only for +%\begin{lverb} +% 2015/11/29 for 1.2f. Partial factorial pfac(a,b)=(a+1)...b, only for % non-negative integers with a<=b<10^8. % % 1.2h (2016/11/20) removes the non-negativity condition. It was a bit @@ -29450,7 +30700,8 @@ mode) and will go ahead hoping repair\endcsname % for a<j<=b (not as a ratio of Gamma function), hence if a>=b, return 1 % because of an empty product. If a<b: if a<0, return 0 for b>=0 and % (-1)^(b-a) times |b|...(|a|-1) for b<0. But only for the range 0<= -% a <= b < 10^8 is the macro result to be considered as stable.? +% a <= b < 10^8 is the macro result to be considered as stable. +%\end{lverb} % \begin{macrocode} \def\xintiiPFactorial {\romannumeral0\xintiipfactorial }% \def\xintiipfactorial #1#2% @@ -29460,8 +30711,10 @@ mode) and will go ahead hoping repair\endcsname \def\xintPFactorial{\romannumeral0\xintpfactorial}% \let\xintpfactorial\xintiipfactorial % \end{macrocode} -% \lverb|Code is a simplified version of the one for \xintiiBinomial, with no -% attempt at implementing a "very small" branch.| +%\begin{lverb} +% Code is a simplified version of the one for \xintiiBinomial, with no +% attempt at implementing a "very small" branch. +%\end{lverb} % \begin{macrocode} \def\XINT_pfac_fork #1#2.#3#4.% {% @@ -29601,7 +30854,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintBool}, \csh{xintToggle}} -% \lverb|1.09c| +%\begin{lverb} +% 1.09c +%\end{lverb} % \begin{macrocode} \def\xintBool #1{\romannumeral`&&@% \csname if#1\endcsname\expandafter1\else\expandafter0\fi }% @@ -29654,7 +30909,8 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_gcd_end0\XINT_gcd_loop #1\xint:#2\xint:{ #2}% % \end{macrocode} % \subsection{\csh{xintiiGCDof}} -% \lverb|New with 1.09a (was located in xintgcd.sty). +%\begin{lverb} +% New with 1.09a (was located in xintgcd.sty). % % 1.2l adds protection against items being non-terminated \the\numexpr. % @@ -29665,7 +30921,7 @@ mode) and will go ahead hoping repair\endcsname % any argument vanished. % % Currently does not support empty list of arguments. -% | +%\end{lverb} % \begin{macrocode} \def\xintiiGCDof {\romannumeral0\xintiigcdof }% \def\xintiigcdof #1{\expandafter\XINT_iigcdof_a\romannumeral`&&@#1^}% @@ -29711,7 +30967,9 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_lcm_end #1\xint:#2\xint:#3\xint:{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}% % \end{macrocode} % \subsection{\csh{xintiiLCMof}} -% \lverb|See comments of \xintiiGCDof|. +%\begin{lverb} +% See comments of \xintiiGCDof. +%\end{lverb} % \begin{macrocode} \def\xintiiLCMof {\romannumeral0\xintiilcmof }% \def\xintiilcmof #1{\expandafter\XINT_iilcmof_a\romannumeral`&&@#1^}% @@ -29723,8 +30981,10 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_iilcmof_e #1!#2!{ #2}% % \end{macrocode} % \subsection{(WIP) \csh{xintRandomDigits}} -% \lverb|1.3b. See user manual. Whether this will be part of xintkernel, -% xintcore, or xint is yet to be decided.| +%\begin{lverb} +% 1.3b. See user manual. Whether this will be part of xintkernel, +% xintcore, or xint is yet to be decided. +%\end{lverb} % \begin{macrocode} \def\xintRandomDigits{\romannumeral0\xintrandomdigits}% \def\xintrandomdigits#1% @@ -29757,7 +31017,9 @@ mode) and will go ahead hoping repair\endcsname \let\XINT_XINT_rdg\endcsname % \end{macrocode} % \subsection{(WIP) \csh{XINT_eightrandomdigits}, \csh{xintEightRandomDigits}} -% \lverb|1.3b. 1.4 adds some public alias...| +%\begin{lverb} +% 1.3b. 1.4 adds some public alias... +%\end{lverb} % \begin{macrocode} \def\XINT_eightrandomdigits {% @@ -29774,12 +31036,16 @@ mode) and will go ahead hoping repair\endcsname \def\xintRandBit{\xint_texuniformdeviate\xint_c_ii}% % \end{macrocode} % \subsection{(WIP) \csh{xintRandBit}} -% \lverb|1.4 And let's add also \xintRandBit while we are at it.| +%\begin{lverb} +% 1.4 And let's add also \xintRandBit while we are at it. +%\end{lverb} % \begin{macrocode} \def\xintRandBit{\xint_texuniformdeviate\xint_c_ii}% % \end{macrocode} % \subsection{(WIP) \csh{xintXRandomDigits}} -% \lverb|1.3b.| +%\begin{lverb} +% 1.3b. +%\end{lverb} % \begin{macrocode} \def\xintXRandomDigits#1% {% @@ -29798,7 +31064,8 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{(WIP) \csh{xintiiRandRangeAtoB}} -% \lverb|1.3b. Support for randrange() function. +%\begin{lverb} +% 1.3b. Support for randrange() function. % % We do it f-expandably for matters of \xintNewExpr etc... The \xintexpr will % add \xintNum wrapper to possible fractional input. But \xintiiexpr will call @@ -29807,7 +31074,8 @@ mode) and will go ahead hoping repair\endcsname % TODO: ? implement third argument (STEP) % TODO: \xintNum wrapper (which truncates) not so good in floatexpr. Use round? % -% It is an error if b<=a, as in Python.| +% It is an error if b<=a, as in Python. +%\end{lverb} % \begin{macrocode} \def\xintiiRandRangeAtoB{\romannumeral`&&@\xintiirandrangeAtoB}% \def\xintiirandrangeAtoB#1% @@ -29822,7 +31090,9 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{(WIP) \csh{xintiiRandRange}} -% \lverb|1.3b. Support for randrange().| +%\begin{lverb} +% 1.3b. Support for randrange(). +%\end{lverb} % \begin{macrocode} \def\xintiiRandRange{\romannumeral`&&@\xintiirandrange}% \def\xintiirandrange#1% @@ -29858,12 +31128,14 @@ mode) and will go ahead hoping repair\endcsname #2#3#4#5#6#7#8#9\xint:#1\xint: }% % \end{macrocode} -% \lverb|This raises following annex question: immediately after setting the +%\begin{lverb} +% This raises following annex question: immediately after setting the % seed is it possible for \xintUniformDeviate{N} where N>0 has exactly eight % digits to return either 0 or N-1 ? It could be that this is never the case, % then there is a bias in randrange(). Of course there are anyhow only 2^28 % seeds so randrange(10^X) is by necessity biased when executed immediately -% after setting the seed, if X is at least 9.| +% after setting the seed, if X is at least 9. +%\end{lverb} % \begin{macrocode} \def\XINT_randrange_d #1\xint:#2\xint: {% @@ -29877,21 +31149,25 @@ mode) and will go ahead hoping repair\endcsname \romannumeral0\xintrandomdigits{#2-\xint_c_viii}% }% % \end{macrocode} -% \lverb|This is quite unlikely to get executed but if it does it must +%\begin{lverb} +% This is quite unlikely to get executed but if it does it must % pay attention to leading zeros, hence the \xintinum. % We don't have to be -% overly obstinate about removing overheads...| +% overly obstinate about removing overheads... +%\end{lverb} % \begin{macrocode} \def\XINT_randrange_Z 0\xint:#1\xint:#2\xint: {% \xintinum{\xintRandomDigits{#1-\xint_c_viii}}% }% % \end{macrocode} -% \lverb|Here too, overhead is not such a problem. The idea is that we got by +%\begin{lverb} +% Here too, overhead is not such a problem. The idea is that we got by % extraordinary same first 8 digits as upper range bound so we pick at random % the remaining needed digits in one go and compare with the upper bound. If too % big, we start again with another random 8 leading digits in given range. No -% need to aim at any kind of efficiency for the check and loop back.| +% need to aim at any kind of efficiency for the check and loop back. +%\end{lverb} % \begin{macrocode} \def\XINT_randrange_A #1\xint:#2\xint:#3\xint: {% @@ -29908,7 +31184,9 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_randrange_again #1\xint:{\XINT_randrange_c}% % \end{macrocode} % \subsection{(WIP) Adjustments for engines without uniformdeviate primitive} -% \lverb|1.3b.| +%\begin{lverb} +% 1.3b. +%\end{lverb} % \begin{macrocode} \ifdefined\xint_texuniformdeviate \else @@ -29933,8 +31211,9 @@ mode) and will go ahead hoping repair\endcsname %\let<*xintbinhex>\gardesinactifs %</xint>^^A------------------------------------------------------- %<*xintbinhex>^^A------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintbinhexnameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xintbinhexnameimp implementation} % \RaisedLabel{sec:binheximp} % @@ -29977,7 +31256,7 @@ mode) and will go ahead hoping repair\endcsname \expandafter\let\expandafter\x\csname ver@xintbinhex.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintkernel.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintbinhex Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -30008,10 +31287,12 @@ mode) and will go ahead hoping repair\endcsname % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xintbinhex}% - [2022/05/29 v1.4l Expandable binary and hexadecimal conversions (JFB)]% + [2022/06/10 v1.4m Expandable binary and hexadecimal conversions (JFB)]% % \end{macrocode} % \subsection{Constants, etc...} -% \lverb|1.2n switches to \csname-governed expansion at various places.| +%\begin{lverb} +% 1.2n switches to \csname-governed expansion at various places. +%\end{lverb} % \begin{macrocode} \newcount\xint_c_ii^xv \xint_c_ii^xv 32768 \newcount\xint_c_ii^xvi \xint_c_ii^xvi 65536 @@ -30066,12 +31347,13 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{Helper macros} % \subsubsection{\csh{XINT_zeroes_foriv}} -% \lverb|& +%\begin{lverb} %( \romannumeral0\XINT_zeroes_foriv #1\R{0\R}{00\R}{000\R}$% %: \R{0\R}{00\R}{000\R}\R\W %) % expands to the <empty> or 0 or 00 or 000 needed which when adjoined to #1 -% extend it to length 4N.| +% extend it to length 4N. +%\end{lverb} % \begin{macrocode} \def\XINT_zeroes_foriv #1#2#3#4#5#6#7#8% {% @@ -30082,13 +31364,15 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_zeroes_foriv_done #1\R{ #1}% % \end{macrocode} % \subsection{\csh{xintDecToHex}} -% \lverb|Complete rewrite at 1.2m in the 1.2 style. Also, 1.2m is robust +%\begin{lverb} +% Complete rewrite at 1.2m in the 1.2 style. Also, 1.2m is robust % against non terminated inputs. % % Improvements of coding at 1.2n, increased maximal size. Again some coding % improvement at 1.2o, about 6$% speed gain. % -% An input without leading zeroes gives an output without leading zeroes.| +% An input without leading zeroes gives an output without leading zeroes. +%\end{lverb} % \begin{macrocode} \def\xintDecToHex {\romannumeral0\xintdectohex }% \def\xintdectohex #1% @@ -30124,7 +31408,8 @@ mode) and will go ahead hoping repair\endcsname #5#6#7#8!\XINT_dthb_exclam\relax\XINT_dthb_nextfour #9% }% % \end{macrocode} -% \lverb|The 1.2n inserted +%\begin{lverb} +% The 1.2n inserted % exclamations marks, which when bumping back from \XINT_dthb_again gave rise % to a \numexpr-loop which gathered the ! delimited arguments and inserted % \expandafter\XINT_dthb_update\the\numexpr dynamically. The 1.2o trick is to @@ -30132,7 +31417,7 @@ mode) and will go ahead hoping repair\endcsname % trigger an already prepared chain. % % The crux of the thing is handling of #3 at \XINT_dthb_update_a. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_dthb_exclam {!\XINT_dthb_exclam\relax \expandafter\XINT_dthb_update\the\numexpr}% @@ -30147,10 +31432,11 @@ mode) and will go ahead hoping repair\endcsname 0000+#1\expandafter#3\the\numexpr#2-#1*\xint_c_ii^xvi }% % \end{macrocode} -% \lverb|1.2m and 1.2n had some unduly complicated ending pattern for +%\begin{lverb} +% 1.2m and 1.2n had some unduly complicated ending pattern for % \XINT_dthb_nextfour as inheritance of a loop needing ! separators which was % pruned out at 1.2o (see previous comment). -% | +%\end{lverb} % \begin{macrocode} \def\XINT_dthb_nextfour #1#2#3#4#5% {% @@ -30208,13 +31494,15 @@ mode) and will go ahead hoping repair\endcsname \csname XINT_csdth_\the\numexpr #2-\xint_c_xvi*#1\endcsname }% % \end{macrocode} -% \lverb|We only clean-up up to 3 zero hexadecimal digits, as output was +%\begin{lverb} +% We only clean-up up to 3 zero hexadecimal digits, as output was % produced in chunks of 4 hex digits. If input had no leading zero, output % will have none either. If input had many leading zeroes, output will have % some number (unspecified, but a recipe can be given...) of leading zeroes... % % The coding is for varying a bit, I did not check if efficient, it does not -% matter.| +% matter. +%\end{lverb} % \begin{macrocode} \def\XINT_dth_finish !\XINT_dth_tohex!#1#2#3% {% @@ -30225,15 +31513,16 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintDecToBin}} -% \lverb|Complete rewrite at 1.2m in the 1.2 style. Also, 1.2m is robust +%\begin{lverb} +% Complete rewrite at 1.2m in the 1.2 style. Also, 1.2m is robust % against non terminated inputs. % -% Revisited at 1.2n like in \xintDecToHex: increased maximal size. +% Revisited at 1.2n like in \xintDecToHex$empty: increased maximal size. % % An input without leading zeroes gives an output without leading zeroes. % % Most of the code canvas is shared with \xintDecToHex. -% | +%\end{lverb} % \begin{macrocode} \def\xintDecToBin {\romannumeral0\xintdectobin }% \def\xintdectobin #1% @@ -30302,7 +31591,8 @@ mode) and will go ahead hoping repair\endcsname }}\XINT_dtb_finish_a { }% % \end{macrocode} % \subsection{\csh{xintHexToDec}} -% \lverb|Completely (and belatedly) rewritten at 1.2m in the 1.2 style. +%\begin{lverb} +% Completely (and belatedly) rewritten at 1.2m in the 1.2 style. % % 1.2m version robust against non terminated inputs, but there is no primitive % from TeX which may generate hexadecimal digits and provoke expansion ahead, @@ -30315,7 +31605,7 @@ mode) and will go ahead hoping repair\endcsname % 1.2m version robust against non terminated inputs. % % An input without leading zeroes gives an output without leading zeroes. -% | +%\end{lverb} % \begin{macrocode} \def\xintHexToDec {\romannumeral0\xinthextodec }% \def\xinthextodec #1% @@ -30350,10 +31640,12 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_htd_startbb 1#1#2!{\XINT_htd_again #1!#2% \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\XINT_htd_nextfour}% % \end{macrocode} -% \lverb|It is a bit annoying to grab all to the end here. I have a version, +%\begin{lverb} +% It is a bit annoying to grab all to the end here. I have a version, % modeled on the 1.2n variant of \xintDecToHex which solved that problem % there, but it did not prove enough if at all faster in my brief testing and -% it had the defect of a reduced maximal allowed size of the input. | +% it had the defect of a reduced maximal allowed size of the input. +%\end{lverb} % \begin{macrocode} \def\XINT_htd_again #1\XINT_htd_nextfour #2% {% @@ -30380,9 +31672,11 @@ mode) and will go ahead hoping repair\endcsname 2!3!4!5!6!7!8!9!\xint_bye\XINT_htd_nextfour }% % \end{macrocode} -% \lverb|If the innocent looking commented out $#6 is left in the pattern as +%\begin{lverb} +% If the innocent looking commented out $#6 is left in the pattern as % was the case at 1.2m, the maximal size becomes limited at 5538 digits, not -% 8298! (with parameter stack size = 10000.) | +% 8298! (with parameter stack size = 10000.) +%\end{lverb} % \begin{macrocode} \def\XINT_htd_update 1#1#2#3#4#5%#6!% {% @@ -30425,14 +31719,16 @@ mode) and will go ahead hoping repair\endcsname }\XINT_htd_finish_cuz{ }% % \end{macrocode} % \subsection{\csh{xintBinToDec}} -% \lverb|Redone entirely for 1.2m. Starts by converting to hexadecimal +%\begin{lverb} +% Redone entirely for 1.2m. Starts by converting to hexadecimal % first. % % Increased maximal size at 1.2n. % % An input without leading zeroes gives an output without leading zeroes. % -% Robust against non-terminated input.| +% Robust against non-terminated input. +%\end{lverb} % \begin{macrocode} \def\xintBinToDec {\romannumeral0\xintbintodec }% \def\xintbintodec #1% @@ -30464,7 +31760,8 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintBinToHex}} -% \lverb|Complete rewrite for 1.2m. +%\begin{lverb} +% Complete rewrite for 1.2m. % But input for 1.2m version limited to about 13320 binary digits (expansion % depth=10000). % @@ -30476,7 +31773,7 @@ mode) and will go ahead hoping repair\endcsname % An input without leading zeroes gives an output without leading zeroes. % % Robust against non-terminated input. -% | +%\end{lverb} % \begin{macrocode} \def\xintBinToHex {\romannumeral0\xintbintohex }% \def\xintbintohex #1% @@ -30506,7 +31803,8 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintHexToBin}} -% \lverb|Completely rewritten for 1.2m. +%\begin{lverb} +% Completely rewritten for 1.2m. % % Attention this macro is not robust against arguments expanding after % themselves. @@ -30515,7 +31813,8 @@ mode) and will go ahead hoping repair\endcsname % leading zero, there will be a leading zero (and then possibly 4n of them if % inputs had more leading zeroes) on output. % -% Rewritten again at 1.2n for \csname governed expansion.| +% Rewritten again at 1.2n for \csname governed expansion. +%\end{lverb} % \begin{macrocode} \def\xintHexToBin {\romannumeral0\xinthextobin }% \def\xinthextobin #1% @@ -30551,12 +31850,14 @@ mode) and will go ahead hoping repair\endcsname }\XINT_htb_cuz { }% % \end{macrocode} % \subsection{\csh{xintCHexToBin}} -% \lverb|The 1.08 macro had same functionality as \xintHexToBin, and slightly +%\begin{lverb} +% The 1.08 macro had same functionality as \xintHexToBin, and slightly % different code, the 1.2m version has the same code as \xintHexToBin except % that it does not remove leading zeros from output: if the input had N % hexadecimal digits, the output will have exactly 4N binary digits. % -% Rewritten again at 1.2n for \csname governed expansion.| +% Rewritten again at 1.2n for \csname governed expansion. +%\end{lverb} % \begin{macrocode} \def\xintCHexToBin {\romannumeral0\xintchextobin }% \def\xintchextobin #1% @@ -30582,8 +31883,9 @@ mode) and will go ahead hoping repair\endcsname %\let<*xintgcd>\gardesinactifs %</xintbinhex>^^A------------------------------------------------- %<*xintgcd>^^A---------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintgcdnameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xintgcdnameimp implementation} % \RaisedLabel{sec:gcdimp} % @@ -30641,7 +31943,7 @@ mode) and will go ahead hoping repair\endcsname \expandafter\let\expandafter\w\csname ver@xint.sty\endcsname \expandafter\let\expandafter\t\csname ver@xinttools.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintgcd Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -30678,10 +31980,10 @@ mode) and will go ahead hoping repair\endcsname % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xintgcd}% - [2022/05/29 v1.4l Euclide algorithm with xint package (JFB)]% + [2022/06/10 v1.4m Euclide algorithm with xint package (JFB)]% % \end{macrocode} % \subsection{\csh{xintBezout}} -% \lverb|& +%\begin{lverb} % \xintBezout{#1}{#2} % produces {U}{V}{D} with UA+VB=D, D = PGCD(A,B) (non-positive), % where #1 and #2 f-expand to big integers A and B. @@ -30707,7 +32009,7 @@ mode) and will go ahead hoping repair\endcsname % % Also 1.2l raised InvalidOperation if both A and B vanished, but I removed % this behaviour at 1.2p. -%| +%\end{lverb} % \begin{macrocode} \def\xintBezout {\romannumeral0\xintbezout }% \def\xintbezout #1% @@ -30719,7 +32021,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_bezout_fork \romannumeral0\xintnum{#2}\Z #1\Z }% % \end{macrocode} -% \lverb|#3#4 = A, #1#2=B. Micro improvement for 1.2l.| +%\begin{lverb} +% #3#4 = A, #1#2=B. Micro improvement for 1.2l. +%\end{lverb} % \begin{macrocode} \def\XINT_bezout_fork #1#2\Z #3#4\Z {% @@ -30752,7 +32056,9 @@ mode) and will go ahead hoping repair\endcsname \krof }% % \end{macrocode} -% \lverb|#4#2= A < 0, #3#1 = B < 0| +%\begin{lverb} +% #4#2= A < 0, #3#1 = B < 0 +%\end{lverb} % \begin{macrocode} \def\XINT_bezout_minusminus #1#2#3#4% {% @@ -30767,7 +32073,9 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_bezout_mm_postb #1#2{\expandafter{#2}{#1}}% % \end{macrocode} -% \lverb|minusplus #4#2= A > 0, B < 0| +%\begin{lverb} +% minusplus #4#2= A > 0, B < 0 +%\end{lverb} % \begin{macrocode} \def\XINT_bezout_minusplus #1#2#3#4% {% @@ -30781,7 +32089,9 @@ mode) and will go ahead hoping repair\endcsname {\romannumeral0\xintiiopp {#2}}{#1}% }% % \end{macrocode} -% \lverb|plusminus A < 0, B > 0| +%\begin{lverb} +% plusminus A < 0, B > 0 +%\end{lverb} % \begin{macrocode} \def\XINT_bezout_plusminus #1#2#3#4% {% @@ -30791,7 +32101,9 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_bezout_pm_post #1{\expandafter{\romannumeral0\xintiiopp{#1}}}% % \end{macrocode} -% \lverb|plusplus, B = #3#1 > 0, A = #4#2 > 0| +%\begin{lverb} +% plusplus, B = #3#1 > 0, A = #4#2 > 0 +%\end{lverb} % \begin{macrocode} \def\XINT_bezout_plusplus #1#2#3#4% {% @@ -30799,7 +32111,7 @@ mode) and will go ahead hoping repair\endcsname \romannumeral0\XINT_div_prepare {#3#1}{#4#2}{#3#1}% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} %( n = 0: BA1001 (B, A, e=1, vv, uu, v, u) %: r(1)=B, r(0)=A, après n étapes {r(n+1)}{r(n)}{vv}{uu}{v}{u} %: q(n) quotient de r(n-1) par r(n) @@ -30818,7 +32130,8 @@ mode) and will go ahead hoping repair\endcsname % one possibly leading to U or V zero (for A and B positive which is the case % here.) Thus the general case always leads to non-zero U and V's and assigning % a final sign is done simply adding a - to one of them, with no fear of -% producing -0. | +% producing -0. +%\end{lverb} % \begin{macrocode} \def\XINT_bezout_preloop_a #1#2#3% {% @@ -30850,7 +32163,7 @@ mode) and will go ahead hoping repair\endcsname \fi {#1}{#2}% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % We use the fact that the \romannumeral-`0 (or equivalent) done by \xintiiadd % will absorb the initial space token left by \XINT_mul_plusplus in its % output. @@ -30859,7 +32172,7 @@ mode) and will go ahead hoping repair\endcsname % \XINT_mul_plusplus entry point (last time I checked...). Admittedly this % kind of optimization is not good for maintenance of code, but I can't resist % temptation of limiting the shuffling around of tokens... -% | +%\end{lverb} % \begin{macrocode} \def\XINT_bezout_loop_C #1#2#3#4#5#6#7% {% @@ -30900,21 +32213,23 @@ mode) and will go ahead hoping repair\endcsname \romannumeral0\XINT_div_prepare {#3}{#4}{#3}{#2}{#1}% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % sortir U, V, D mais on a travaillé avec vv, uu, v, u dans cet ordre.$\ % The code is structured so that #4 and #5 are guaranteed non-zero -% if we exit here, hence we can not create a -0 in output.| +% if we exit here, hence we can not create a -0 in output. +%\end{lverb} % \begin{macrocode} \def\XINT_bezout_exita #1#2#3#4#5#6#7{{-#5}{#4}{#3}}% \def\XINT_bezout_exitA #1#2#3#4#5#6#7{{#5}{-#4}{#3}}% % \end{macrocode} % \subsection{\csh{xintEuclideAlgorithm}} -% \lverb|& +%\begin{lverb} % Pour Euclide: % {N}{A}{D=r(n)}{B}{q1}{r1}{q2}{r2}{q3}{r3}....{qN}{rN=0}$\ % u<2n> = u<2n+3>u<2n+2> + u<2n+4> à la n ième étape. % -% Formerly, used \xintiabs, but got deprecated at 1.2o.| +% Formerly, used \xintiabs, but got deprecated at 1.2o. +%\end{lverb} % \begin{macrocode} \def\xintEuclideAlgorithm {\romannumeral0\xinteuclidealgorithm }% \def\xinteuclidealgorithm #1% @@ -30926,7 +32241,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_euc_fork\romannumeral0\xintiiabs{\xintNum{#2}}\Z #1\Z }% % \end{macrocode} -% \lverb|Ici #3#4=A, #1#2=B| +%\begin{lverb} +% Ici #3#4=A, #1#2=B +%\end{lverb} % \begin{macrocode} \def\XINT_euc_fork #1#2\Z #3#4\Z {% @@ -30938,19 +32255,21 @@ mode) and will go ahead hoping repair\endcsname {0}{#1#2}{#3#4}{{#3#4}{#1#2}}{}\Z }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Le {} pour protéger {{A}{B}} si on s'arrête après une étape (B divise % A). % On va renvoyer:$\ -% {N}{A}{D=r(n)}{B}{q1}{r1}{q2}{r2}{q3}{r3}....{qN}{rN=0}| +% {N}{A}{D=r(n)}{B}{q1}{r1}{q2}{r2}{q3}{r3}....{qN}{rN=0} +%\end{lverb} % \begin{macrocode} \def\XINT_euc_AisZero #1#2#3#4#5#6{{1}{0}{#2}{#2}{0}{0}}% \def\XINT_euc_BisZero #1#2#3#4#5#6{{1}{0}{#3}{#3}{0}{0}}% % \end{macrocode} -% \lverb|& +%\begin{lverb} % {n}{rn}{an}{{qn}{rn}}...{{A}{B}}{}\Z$\ % a(n) = r(n-1). Pour n=0 on a juste {0}{B}{A}{{A}{B}}{}\Z$\ -% \XINT_div_prepare {u}{v} divise v par u| +% \XINT_div_prepare {u}{v} divise v par u +%\end{lverb} % \begin{macrocode} \def\XINT_euc_a #1#2#3% {% @@ -30958,26 +32277,31 @@ mode) and will go ahead hoping repair\endcsname \romannumeral0\XINT_div_prepare {#2}{#3}{#2}% }% % \end{macrocode} -% \lverb|{n+1}{q(n+1)}{r(n+1)}{rn}{{qn}{rn}}...| +%\begin{lverb} +% {n+1}{q(n+1)}{r(n+1)}{rn}{{qn}{rn}}... +%\end{lverb} % \begin{macrocode} \def\XINT_euc_b #1.#2#3#4% {% \XINT_euc_c #3\Z {#1}{#3}{#4}{{#2}{#3}}% }% % \end{macrocode} -% \lverb|r(n+1)\Z {n+1}{r(n+1)}{r(n)}{{q(n+1)}{r(n+1)}}{{qn}{rn}}...$\ -% Test si r(n+1) est nul.| +%\begin{lverb} +% r(n+1)\Z {n+1}{r(n+1)}{r(n)}{{q(n+1)}{r(n+1)}}{{qn}{rn}}...$\ +% Test si r(n+1) est nul. +%\end{lverb} % \begin{macrocode} \def\XINT_euc_c #1#2\Z {% \xint_gob_til_zero #1\XINT_euc_end0\XINT_euc_a }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % {n+1}{r(n+1)}{r(n)}{{q(n+1)}{r(n+1)}}...{}\Z % Ici r(n+1) = 0. On arrête on se prépare à inverser % {n+1}{0}{r(n)}{{q(n+1)}{r(n+1)}}.....{{q1}{r1}}{{A}{B}}{}\Z$\ -% On veut renvoyer: {N=n+1}{A}{D=r(n)}{B}{q1}{r1}{q2}{r2}{q3}{r3}....{qN}{rN=0}| +% On veut renvoyer: {N=n+1}{A}{D=r(n)}{B}{q1}{r1}{q2}{r2}{q3}{r3}....{qN}{rN=0} +%\end{lverb} % \begin{macrocode} \def\XINT_euc_end0\XINT_euc_a #1#2#3#4\Z% {% @@ -30992,11 +32316,12 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_euc_end_a #1#2#3{{#1}{#3}{#2}}% % \end{macrocode} % \subsection{\csh{xintBezoutAlgorithm}} -% \lverb|& +%\begin{lverb} % Pour Bezout: objectif, renvoyer$\ % {N}{A}{0}{1}{D=r(n)}{B}{1}{0}{q1}{r1}{alpha1=q1}{beta1=1}$\ % {q2}{r2}{alpha2}{beta2}....{qN}{rN=0}{alphaN=A/D}{betaN=B/D}$\ -% alpha0=1, beta0=0, alpha(-1)=0, beta(-1)=1| +% alpha0=1, beta0=0, alpha(-1)=0, beta(-1)=1 +%\end{lverb} % \begin{macrocode} \def\xintBezoutAlgorithm {\romannumeral0\xintbezoutalgorithm }% \def\xintbezoutalgorithm #1% @@ -31009,7 +32334,9 @@ mode) and will go ahead hoping repair\endcsname \expandafter\XINT_bezalg_fork\romannumeral0\xintiiabs{\xintNum{#2}}\Z #1\Z }% % \end{macrocode} -% \lverb|Ici #3#4=A, #1#2=B| +%\begin{lverb} +% Ici #3#4=A, #1#2=B +%\end{lverb} % \begin{macrocode} \def\XINT_bezalg_fork #1#2\Z #3#4\Z {% @@ -31023,11 +32350,12 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_bezalg_AisZero #1#2#3\Z{{1}{0}{0}{1}{#2}{#2}{1}{0}{0}{0}{0}{1}}% \def\XINT_bezalg_BisZero #1#2#3#4\Z{{1}{0}{0}{1}{#3}{#3}{1}{0}{0}{0}{0}{1}}% % \end{macrocode} -% \lverb|& +%\begin{lverb} % pour préparer l'étape n+1 il faut % {n}{r(n)}{r(n-1)}{alpha(n)}{beta(n)}{alpha(n-1)}{beta(n-1)}& % {{q(n)}{r(n)}{alpha(n)}{beta(n)}}... -% division de #3 par #2| +% division de #3 par #2 +%\end{lverb} % \begin{macrocode} \def\XINT_bezalg_a #1#2#3% {% @@ -31035,8 +32363,9 @@ mode) and will go ahead hoping repair\endcsname \romannumeral0\XINT_div_prepare {#2}{#3}{#2}% }% % \end{macrocode} -% \lverb|& -% {n+1}{q(n+1)}{r(n+1)}{r(n)}{alpha(n)}{beta(n)}{alpha(n-1)}{beta(n-1)}...| +%\begin{lverb} +% {n+1}{q(n+1)}{r(n+1)}{r(n)}{alpha(n)}{beta(n)}{alpha(n-1)}{beta(n-1)}... +%\end{lverb} % \begin{macrocode} \def\XINT_bezalg_b #1.#2#3#4#5#6#7#8% {% @@ -31046,37 +32375,43 @@ mode) and will go ahead hoping repair\endcsname {#1}{#2}{#3}{#4}{#5}{#6}% }% % \end{macrocode} -% \lverb|& -% {beta(n+1)}{alpha(n+1)}{n+1}{q(n+1)}{r(n+1)}{r(n)}{alpha(n)}{beta(n}}| +%\begin{lverb} +% {beta(n+1)}{alpha(n+1)}{n+1}{q(n+1)}{r(n+1)}{r(n)}{alpha(n)}{beta(n}} +%\end{lverb} % \begin{macrocode} \def\XINT_bezalg_c #1#2#3#4#5#6% {% \expandafter\XINT_bezalg_d\expandafter {#2}{#3}{#4}{#5}{#6}{#1}% }% % \end{macrocode} -% \lverb|{alpha(n+1)}{n+1}{q(n+1)}{r(n+1)}{r(n)}{beta(n+1)}| +%\begin{lverb} +% {alpha(n+1)}{n+1}{q(n+1)}{r(n+1)}{r(n)}{beta(n+1)} +%\end{lverb} % \begin{macrocode} \def\XINT_bezalg_d #1#2#3#4#5#6#7#8% {% \XINT_bezalg_e #4\Z {#2}{#4}{#5}{#1}{#6}{#7}{#8}{{#3}{#4}{#1}{#6}}% }% % \end{macrocode} -% \lverb|r(n+1)\Z {n+1}{r(n+1)}{r(n)}{alpha(n+1)}{beta(n+1)}$\ +%\begin{lverb} +% r(n+1)\Z {n+1}{r(n+1)}{r(n)}{alpha(n+1)}{beta(n+1)}$\ % {alpha(n)}{beta(n)}{q,r,alpha,beta(n+1)}$\ -% Test si r(n+1) est nul.| +% Test si r(n+1) est nul. +%\end{lverb} % \begin{macrocode} \def\XINT_bezalg_e #1#2\Z {% \xint_gob_til_zero #1\XINT_bezalg_end0\XINT_bezalg_a }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Ici r(n+1) = 0. On arrête on se prépare à inverser.$\ % {n+1}{r(n+1)}{r(n)}{alpha(n+1)}{beta(n+1)}{alpha(n)}{beta(n)}$\ % {q,r,alpha,beta(n+1)}...{{A}{B}}{}\Z$\ % On veut renvoyer$\ % {N}{A}{0}{1}{D=r(n)}{B}{1}{0}{q1}{r1}{alpha1=q1}{beta1=1}$\ -% {q2}{r2}{alpha2}{beta2}....{qN}{rN=0}{alphaN=A/D}{betaN=B/D}| +% {q2}{r2}{alpha2}{beta2}....{qN}{rN=0}{alphaN=A/D}{betaN=B/D} +%\end{lverb} % \begin{macrocode} \def\XINT_bezalg_end0\XINT_bezalg_a #1#2#3#4#5#6#7#8\Z {% @@ -31089,17 +32424,18 @@ mode) and will go ahead hoping repair\endcsname \xint: }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % {N}{D}{A}{B}{q1}{r1}{alpha1=q1}{beta1=1}{q2}{r2}{alpha2}{beta2}$\ % ....{qN}{rN=0}{alphaN=A/D}{betaN=B/D}$\ % On veut renvoyer$\ % {N}{A}{0}{1}{D=r(n)}{B}{1}{0}{q1}{r1}{alpha1=q1}{beta1=1}$\ -% {q2}{r2}{alpha2}{beta2}....{qN}{rN=0}{alphaN=A/D}{betaN=B/D}| +% {q2}{r2}{alpha2}{beta2}....{qN}{rN=0}{alphaN=A/D}{betaN=B/D} +%\end{lverb} % \begin{macrocode} \def\XINT_bezalg_end_a #1#2#3#4{{#1}{#3}{0}{1}{#2}{#4}{1}{0}}% % \end{macrocode} % \subsection{\csh{xintTypesetEuclideAlgorithm}} -% \lverb|& +%\begin{lverb} % TYPESETTING % % Organisation: @@ -31115,7 +32451,8 @@ mode) and will go ahead hoping repair\endcsname % (avec n entre 1 et N) % % 1.09h uses \xintloop, and \par rather than \endgraf; and \par rather than -% \hfill\break| +% \hfill\break +%\end{lverb} % \begin{macrocode} \def\xintTypesetEuclideAlgorithm {% \unless\ifdefined\xintAssignArray @@ -31146,7 +32483,7 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintTypesetBezoutAlgorithm}} -% \lverb|& +%\begin{lverb} % Pour Bezout on a: % {N}{A}{0}{1}{D=r(n)}{B}{1}{0}{q1}{r1}{alpha1=q1}{beta1=1}$\ % {q2}{r2}{alpha2}{beta2}....{qN}{rN=0}{alphaN=A/D}{betaN=B/D}% @@ -31157,7 +32494,7 @@ mode) and will go ahead hoping repair\endcsname % beta(n) = U{4n+8}, n au moins -1 % % 1.09h uses \xintloop, and \par rather than \endgraf; and no more \parindent0pt -% | +%\end{lverb} % \begin{macrocode} \def\xintTypesetBezoutAlgorithm {% \unless\ifdefined\xintAssignArray @@ -31212,8 +32549,9 @@ mode) and will go ahead hoping repair\endcsname %\let<*xintfrac>\gardesinactifs %</xintgcd>^^A---------------------------------------------------- %<*xintfrac>^^A--------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 72; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 72; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintfracnameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xintfracnameimp implementation} % \RaisedLabel{sec:fracimp} % @@ -31245,7 +32583,7 @@ mode) and will go ahead hoping repair\endcsname \expandafter\let\expandafter\x\csname ver@xintfrac.sty\endcsname \expandafter\let\expandafter\w\csname ver@xint.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintfrac Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -31276,11 +32614,13 @@ mode) and will go ahead hoping repair\endcsname % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xintfrac}% - [2022/05/29 v1.4l Expandable operations on fractions (JFB)]% + [2022/06/10 v1.4m Expandable operations on fractions (JFB)]% % \end{macrocode} % \subsection{\csh{XINT_cntSgnFork}} -% \lverb|1.09i. Used internally, #1 must expand to \m@ne, \z@, or \@ne or -% equivalent. \XINT_cntSgnFork does not insert a romannumeral stopper.| +%\begin{lverb} +% 1.09i. Used internally, #1 must expand to \m@ne, \z@, or \@ne or +% equivalent. \XINT_cntSgnFork does not insert a romannumeral stopper. +%\end{lverb} % \begin{macrocode} \def\XINT_cntSgnFork #1% {% @@ -31291,10 +32631,12 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\cshnolabel{xintLen}} -% \lverb|The used formula is disputable, the idea is that A/1 and A should have +%\begin{lverb} +% The used formula is disputable, the idea is that A/1 and A should have % same length. Venerable code rewritten for 1.2i, following updates to % \xintLength in xintkernel.sty. And sadly, I forgot on this -% occasion that this macro is not supposed to count the sign... Fixed in 1.2k.| +% occasion that this macro is not supposed to count the sign... Fixed in 1.2k. +%\end{lverb} % \begin{macrocode} \def\xintLen {\romannumeral0\xintlen }% \def\xintlen #1% @@ -31304,8 +32646,6 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_flen#1{\def\XINT_flen ##1##2##3% {% \expandafter#1% -% \end{macrocode} -% \begin{macrocode} \the\numexpr \XINT_abs##1+% \XINT_len_fork ##2##3\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint: \xint_c_viii\xint_c_vii\xint_c_vi\xint_c_v @@ -31315,7 +32655,7 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_outfrac}} % \changed{1.06b} -% \lverb|& +%\begin{lverb} % 1.06b version now outputs 0/1[0] and not 0[0] in case of zero. More generally % all macros have been checked in xintfrac, xintseries, xintcfrac, to make sure % the output format for fractions was always A/B[n]. (except \xintIrr, @@ -31325,7 +32665,8 @@ mode) and will go ahead hoping repair\endcsname % before I forget? from {e}{N}{D} it outputs N/D[e], checking in passing if % D=0 or if N=0. It also makes sure D is not < 0. I am not sure but I don't % think there is any place in the code which could call \XINT_outfrac with a D -% < 0, but I should check.| +% < 0, but I should check. +%\end{lverb} % \begin{macrocode} \def\XINT_outfrac #1#2#3% {% @@ -31359,20 +32700,20 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_infrac}} % \added{1.03} -% \lverb|& +%\begin{lverb} % Parses fraction, scientific notation, etc... and produces {n}{A}{B} % corresponding to A/B times 10^n. No reduction to smallest terms. -% | +%\end{lverb} % \changed{1.07} -% \lverb|& +%\begin{lverb} % Extended in 1.07 to accept scientific notation on input. With lowercase % e only. The \xintexpr parser does accept uppercase E also. Ah, by the way, % perhaps I should at least say what this macro does? (belated addition % 2014/10/22...), before I forget! It prepares the fraction in the internal % format {exponent}{Numerator}{Denominator} where Denominator is at least 1. -% | +%\end{lverb} % \changed[2015/10/09]{1.2} -% \lverb|& +%\begin{lverb} % This venerable macro from the very early days % has gotten a lifting for release 1.2. There were two kinds of issues: % @@ -31381,7 +32722,7 @@ mode) and will go ahead hoping repair\endcsname % % 2) the new \XINT_frac_gen handles macros (possibly empty) in the input as % general as \A.\Be\C/\D.\Ee\F. The earlier version would not have expanded -% the \B or \E: digits after decimal mark were constrained to arise from +% the \B or \E$empty: digits after decimal mark were constrained to arise from % expansion of the first token. Thus the 1.03 original code would have % expanded only \A, \D, \C, and \F for this input. % @@ -31424,9 +32765,9 @@ mode) and will go ahead hoping repair\endcsname % numerator and denominator will be parsed for the more general format % allowing decimal digits and scientific part and possibly multiple leading % signs. -% | +%\end{lverb} % \changed{1.2l} -% \lverb|& +%\begin{lverb} % 1.2l fixes frailty of \XINT_infrac (hence basically of all xintfrac macros) % respective to non terminated \numexpr input: \xintRaw{\the\numexpr1} for % example. The issue was that \numexpr sees the / and expands what's next. @@ -31434,15 +32775,16 @@ mode) and will go ahead hoping repair\endcsname % a defect of \numexpr. It should be able to trace back and see that / was % used as delimiter not as operator. Anyway, I thus fixed this problem % belatedly here regarding \XINT_infrac. -% | +%\end{lverb} % \changed{1.4l} -% \lverb|& +%\begin{lverb} % The venerable \XINT_inFrac is used nowhere, only \XINT_infrac is. % It is deprecated and I will remove it at next major release. % See \xintRawBraced. -% | +%\end{lverb} % \begin{macrocode} -\def\XINT_inFrac {\romannumeral0\XINT_infrac }% this one deprecated +\def\XINT_inFrac {\XINT_expandableerror{\XINT_inFrac is deprecated, use \xintRawBraced}% + \romannumeral0\XINT_infrac }% \def\XINT_infrac #1% this one is core xintfrac macro {% \expandafter\XINT_infrac_fork\romannumeral`&&@#1\xint:/\XINT_W[\XINT_W\XINT_T @@ -31460,7 +32802,9 @@ mode) and will go ahead hoping repair\endcsname \xint_gob_til_zero #1\XINT_infrac_res_zero 0\XINT_infrac_res_b #1% }% % \end{macrocode} -% \lverb|Note that input exponent is here ignored and forced to be zero.| +%\begin{lverb} +% Note that input exponent is here ignored and forced to be zero. +%\end{lverb} % \begin{macrocode} \def\XINT_infrac_res_zero 0\XINT_infrac_res_b #1\XINT_T {{0}{0}{1}}% \def\XINT_infrac_res_b #1/#2% @@ -31472,8 +32816,10 @@ mode) and will go ahead hoping repair\endcsname #1/#2% }% % \end{macrocode} -% \lverb|An empty [] is not allowed. (this was authorized in 1.2, removed in -% 1.2f).| +%\begin{lverb} +% An empty [] is not allowed. (this was authorized in 1.2, removed in +% 1.2f). +%\end{lverb} % \begin{macrocode} \def\XINT_infrac_res_ca #1[#2]\xint:/\XINT_W[\XINT_W\XINT_T {\expandafter{\the\numexpr #2}{#1}{1}}% @@ -31484,21 +32830,23 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{XINT_frac_gen}} % \changed{1.07} -% \lverb|Extended at to recognize and accept scientific notation both at +%\begin{lverb} +% Extended at to recognize and accept scientific notation both at % the numerator and (possible) denominator. Only a lowercase e will do here, % but uppercase E is possible within an \xintexpr..\relax -% | +%\end{lverb} % \changed{1.2} -% \lverb|& +%\begin{lverb} % Completely rewritten. The parsing handles inputs such as % \A.\Be\C/\D.\Ee\F where each of \A, \B, \D, and \E may need f-expansion and % \C and \F will end up in \numexpr. -% | +%\end{lverb} % \changed{1.2f} -% \lverb|& +%\begin{lverb} % 1.2f corrects an issue to allow \C and \F to be \count variable (or % expressions with \numexpr): 1.2 did a bad \numexpr0#1 which allowed only -% explicit digits for expanded #1.| +% explicit digits for expanded #1. +%\end{lverb} % \begin{macrocode} \def\XINT_frac_gen #1/#2% {% @@ -31509,7 +32857,9 @@ mode) and will go ahead hoping repair\endcsname #1/#2% }% % \end{macrocode} -% \lverb|Note that #1 is only expanded so far up to decimal mark or "e".| +%\begin{lverb} +% Note that #1 is only expanded so far up to decimal mark or "e". +%\end{lverb} % \begin{macrocode} \def\XINT_frac_gen_A #1\xint:/\XINT_W [\XINT_W {\XINT_frac_gen_C 0~1!#1ee.\XINT_W }% \def\XINT_frac_gen_B #1/#2\xint:/\XINT_W[%\XINT_W @@ -31531,8 +32881,6 @@ mode) and will go ahead hoping repair\endcsname {% \expandafter\XINT_frac_gen_Bd\romannumeral`&&@#2.#1e% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_frac_gen_Bd #1.#2e#3e#4\XINT_Z {% \expandafter\XINT_frac_gen_C\the\numexpr #3-% @@ -31563,14 +32911,10 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_frac_gen_Cc #1.#2~#3!#4e#5e#6\XINT_T {% \expandafter\XINT_frac_gen_F\the\numexpr #5-#2-% -% \end{macrocode} -% \begin{macrocode} \numexpr\XINT_length_loop #1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint: \xint_c_viii\xint_c_vii\xint_c_vi\xint_c_v \xint_c_iv\xint_c_iii\xint_c_ii\xint_c_i\xint_c_\xint_bye -% \end{macrocode} -% \begin{macrocode} \relax\expandafter~% \romannumeral0\expandafter\XINT_num_cleanup\the\numexpr\XINT_num_loop #3\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z @@ -31608,17 +32952,20 @@ mode) and will go ahead hoping repair\endcsname \def\XINT_frac_gen_zero 0#1#2#3{{0}{0}{1}}% % \end{macrocode} % \subsection{\csh{XINT_factortens}} -% \lverb|This is the core macro for \xintREZ. To be used as +%\begin{lverb} +% This is the core macro for \xintREZ. To be used as % \romannumeral0\XINT_factortens{...}. Output is A.N. (formerly {A}{N}) where % A is the integer stripped from trailing zeroes and N is the number of -% removed zeroes. Only for positive strict integers!| +% removed zeroes. Only for positive strict integers! +%\end{lverb} % \changed{1.3a} -% \lverb|& +%\begin{lverb} % Completely rewritten at 1.3a to replace a double \xintReverseOrder by a % direct \numexpr governed expansion to the end and back, à la 1.2. I should % comment more... and perhaps improve again in future. % -% Testing shows significant gain at 100 digits or more.| +% Testing shows significant gain at 100 digits or more. +%\end{lverb} % \begin{macrocode} \def\XINT_factortens #1{\expandafter\XINT_factortens_z \romannumeral0\XINT_factortens_a#1% @@ -31658,10 +33005,11 @@ mode) and will go ahead hoping repair\endcsname % {xintEven}{xintifSgn}{xintifCmp}{xintifEq}{xintifGt}{xintifLt} % {xintifZero}{xintifNotZero}{xintifOne}{xintifOdd}}}} % -% \lverb|Moved here at 1.3. Formerly these macros were already defined in +%\begin{lverb} +% Moved here at 1.3. Formerly these macros were already defined in % xint.sty or even xintcore.sty. They are slim wrappers of macros defined % elsewhere in xintfrac. -% | +%\end{lverb} % \begin{macrocode} \def\xintEq {\romannumeral0\xinteq }% \def\xinteq #1#2{\xintifeq{#1}{#2}{1}{0}}% @@ -31776,10 +33124,11 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{xintRaw}} % \added{1.07} -% \lverb|& +%\begin{lverb} % 1.07: this macro simply prints in a user readable form the fraction after its % initial scanning. Useful when put inside braces in an \xintexpr, when the -% input is not yet in the A/B[n] form.| +% input is not yet in the A/B[n] form. +%\end{lverb} % \begin{macrocode} \def\xintRaw {\romannumeral0\xintraw }% \def\xintraw @@ -31790,19 +33139,20 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{xintRawBraced}} % \added{1.4l} -% \lverb|& +%\begin{lverb} % User level interface to core \romannumeral0\XINT_infrac. Replaces -% \XINT_inFrac which was defined but nowhere used by the xint packages.| +% \XINT_inFrac which was defined but nowhere used by the xint packages. +%\end{lverb} % \begin{macrocode} \def\xintRawBraced {\romannumeral0\xintrawbraced }% \let\xintrawbraced \XINT_infrac % \end{macrocode} % \subsection{\csh{xintiLogTen}} % \added{1.3e} -% \lverb|& +%\begin{lverb} % The exponent a, such that 10^a<= abs(x) < 10^(a+1). No rounding done on x, % handled as an exact fraction. -% | +%\end{lverb} % \begin{macrocode} \def\xintiLogTen {\the\numexpr\xintilogten}% \def\xintilogten @@ -31866,13 +33216,14 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintSPRaw}} -% \lverb|This private macro was for internal usage by \xinttheexpr. +%\begin{lverb} +% This private macro was for internal usage by \xinttheexpr. % It got moved here % at 1.4 and is not used anymore by the package. % % It checks if input has a [N] part, if yes uses \xintPRaw, else % simply lets the input pass through as is. -% | +%\end{lverb} % \begin{macrocode} \def\xintSPRaw {\romannumeral0\xintspraw }% \def\xintspraw #1{\expandafter\XINT_spraw\romannumeral`&&@#1[\W]}% @@ -31882,7 +33233,8 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{xintFracToSci}} % \added{1.4l} -% \lverb|The macro with this name which was added here at 1.4 then had +%\begin{lverb} +% The macro with this name which was added here at 1.4 then had % various changes and finally was moved to $xintexprnameimp at 1.4k % is now called there % \xint_FracToSci_x and is private. The present macro is public and @@ -31891,7 +33243,8 @@ mode) and will go ahead hoping repair\endcsname % \xint_FracToSci_x for same inputs, with the exception of the empty % input which \xintFracToSci will output as 0 but \xint_FracToSci_x % as empty. But the latter is not used by \xinteval for an empty -% leaf as it employs then \xintexprEmptyItem.| +% leaf as it employs then \xintexprEmptyItem. +%\end{lverb} % \begin{macrocode} \def\xintFracToSci{\romannumeral0\xintfractosci}% \def\xintfractosci#1{\expandafter\XINT_fractosci\romannumeral0\xintraw{#1}}% @@ -31904,10 +33257,12 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{xintFracToDecimal}} % \added{1.4l} -% \lverb|The macro with this name which was added at 1.4k to +%\begin{lverb} +% The macro with this name which was added at 1.4k to % $xintexprnameimp has been removed. The public variant here % behaves like the other -% $xintfracnameimp macros: f-expandable and accepts general input.| +% $xintfracnameimp macros: f-expandable and accepts general input. +%\end{lverb} % \begin{macrocode} \def\xintFracToDecimal{\romannumeral0\xintfractodecimal}% \def\xintfractodecimal#1{\expandafter\XINT_fractodecimal\romannumeral0\xintraw{#1}}% @@ -31919,18 +33274,15 @@ mode) and will go ahead hoping repair\endcsname }% % \end{macrocode} % \subsection{\csh{xintRawWithZeros}} -% \lverb|& -% This was called \xintRaw in versions earlier than 1.07| +%\begin{lverb} +% This was called \xintRaw in versions earlier than 1.07 +%\end{lverb} % \begin{macrocode} \def\xintRawWithZeros {\romannumeral0\xintrawwithzeros }% \def\xintrawwithzeros {% \expandafter\XINT_rawz_fork\romannumeral0\XINT_infrac }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_rawz_fork #1% {% \ifnum#1<\xint_c_ @@ -31947,8 +33299,10 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{xintDecToString}} % \added{1.3} -% \lverb|This is a backport from polexpr 0.4. It is definitely not in -% final form, consider it to be an unstable macro.| +%\begin{lverb} +% This is a backport from polexpr 0.4. It is definitely not in +% final form, consider it to be an unstable macro. +%\end{lverb} % \begin{macrocode} \def\xintDecToString{\romannumeral0\xintdectostring}% \def\xintdectostring#1{\expandafter\XINT_dectostr\romannumeral0\xintraw{#1}}% @@ -31971,15 +33325,19 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{xintDecToStringREZ}} % \added{1.4e} -% \lverb|And I took this opportunity to improve documentation in manual.| +%\begin{lverb} +% And I took this opportunity to improve documentation in manual. +%\end{lverb} % \begin{macrocode} \def\xintDecToStringREZ{\romannumeral0\xintdectostringrez}% \def\xintdectostringrez#1{\expandafter\XINT_dectostr\romannumeral0\xintrez{#1}}% % \end{macrocode} % \subsection{\csh{xintFloor}, \csh{xintiFloor}} % \added{1.09a} -% \lverb|1.1 for \xintiFloor/\xintFloor. Not efficient if big negative -% decimal exponent. Also sub-efficient if big positive decimal exponent.| +%\begin{lverb} +% 1.1 for \xintiFloor/\xintFloor. Not efficient if big negative +% decimal exponent. Also sub-efficient if big positive decimal exponent. +%\end{lverb} % \begin{macrocode} \def\xintFloor {\romannumeral0\xintfloor }% \def\xintfloor #1% devrais-je faire \xintREZ? @@ -32027,8 +33385,6 @@ mode) and will go ahead hoping repair\endcsname }% \def\XINT_denom_fork #1% {% -% \end{macrocode} -% \begin{macrocode} \ifnum#1<\xint_c_ \expandafter\XINT_denom_B \else @@ -32041,11 +33397,17 @@ mode) and will go ahead hoping repair\endcsname % \end{macrocode} % \subsection{\csh{xintTeXFrac}} % \added{1.03} -% \lverb|Useless typesetting macro.| +%\begin{lverb} +% Useless typesetting macro. +%\end{lverb} % \changed[2021/05/24]{1.4g} -% \lverb|Renamed from \xintFrac. Old name deprecated but still usable.| +%\begin{lverb} +% Renamed from \xintFrac. +%\end{lverb} +% \changed{1.4m} +% The old name now raises an error, not a warning. % \begin{macrocode} -\ifdefined\documentclass +\ifdefined\PackageWarning \def\xintfracTeXDeprecation#1#2{% \PackageWarning{xintfrac}{\string#1 is deprecated. Use \string#2\MessageBreak to suppress this warning}#2% @@ -32058,7 +33420,20 @@ mode) and will go ahead hoping repair\endcsname on input line \noexpand\the\inputlineno.&&J}}#2% }% \fi -\def\xintFrac {\xintfracTeXDeprecation\xintFrac\xintTeXFrac}% +\ifdefined\PackageError +\def\xintfracTeXError#1#2{% +\PackageError{xintfrac}{\string#1 has been removed.\MessageBreak + Use \string#2 to suppress this error}% + {I will fix it for now if you hit the `Return' key.}#2% +}% +\else +\edef\xintfracTeXError#1#2{{\newlinechar10 +\errhelp{I will fix it for now if you hit the `Return' key.}% +\errmessage{Package xintfrac Error: \noexpand\string#1 has been removed.&&J% +(xintfrac)\xintReplicate{16}{ }Use \noexpand\string#2 to suppress this error}}#2% +}% +\fi +\def\xintFrac {\xintfracTeXError\xintFrac\xintTeXFrac}% \def\xintTeXFrac{\romannumeral0\xintfrac }% \def\xintfrac #1% {% @@ -32088,10 +33463,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintTeXsignedFrac}} % \changed[2021/05/24]{1.4g} -% \lverb|Renamed from \xintSignedFrac. Old name deprecated but -% still usable.| +%\begin{lverb} +% Renamed from \xintSignedFrac. +%\end{lverb} +% \changed{1.4m} +% The old name now raises an error, not a warning. % \begin{macrocode} -\def\xintSignedFrac {\xintfracTeXDeprecation\xintSignedFrac\xintTeXsignedFrac}% +\def\xintSignedFrac {\xintfracTeXError\xintSignedFrac\xintTeXsignedFrac}% \def\xintTeXsignedFrac{\romannumeral0\xintsignedfrac }% \def\xintsignedfrac #1% {% @@ -32119,7 +33497,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintTeXFromSci}} % \added{1.4g} -% \lverb|The main problem is how to name this and related macros. +%\begin{lverb} +% The main problem is how to name this and related macros. % % I use \expanded here, as \xintFracToSci is not f-expandable. % @@ -32129,9 +33508,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% %(- if no scientific part, use \frac (or \over) for A/B %:- if scientific part, postfix /B as \cdot B^{-1} %) -% | +%\end{lverb} % \changed{1.4l} -% \lverb|Suppress external \expanded. Keep internal one. +%\begin{lverb} +% Suppress external \expanded. Keep internal one. % % Rename \xintTeXFromSci from \xintTeXfromSci. Keep deprecated old name % for the moment. @@ -32139,9 +33519,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Add \xintTeXFromScifracmacro. Make it \protected. % % Nota bene: catcode of ^ is normal one here (else nothing would work). -% | +%\end{lverb} % \begin{macrocode} -\def\xintTeXfromSci{\xintfracTeXDeprecation\xintTeXfromSci\xintTeXFromSci}% +\def\xintTeXfromSci{\xintfracTeXDeprecated\xintTeXfromSci\xintTeXFromSci}% \def\xintTeXFromSci#1% {% \expandafter\XINT_texfromsci\expanded{#1}/\relax/\xint: @@ -32165,10 +33545,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintTeXOver}} % \changed[2021/05/24]{1.4g} -% \lverb|Renamed from \xintFwOver. Old name deprecated but -% still usable.| +%\begin{lverb} +% Renamed from \xintFwOver. +%\end{lverb} +% \changed{1.4m} +% The old name now raises an error, not a warning. % \begin{macrocode} -\def\xintFwOver {\xintfracTeXDeprecation\xintFwOver\xintTeXOver}% +\def\xintFwOver {\xintfracTeXError\xintFwOver\xintTeXOver}% \def\xintTeXOver{\romannumeral0\xintfwover }% \def\xintfwover #1% {% @@ -32196,10 +33579,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintTeXsignedOver}} % \changed[2021/05/24]{1.4g} -% \lverb|Renamed from \xintSignedFwOver. Old name deprecated but -% still usable.| +%\begin{lverb} +% Renamed from \xintSignedFwOver. +%\end{lverb} +% \changed{1.4m} +% The old name now raises an error, not a warning. % \begin{macrocode} -\def\xintSignedFwOver {\xintfracTeXDeprecation\xintSignedFwOver\xintTeXsignedOver}% +\def\xintSignedFwOver {\xintfracTeXError\xintSignedFwOver\xintTeXsignedOver}% \def\xintTeXsignedOver{\romannumeral0\xintsignedfwover }% \def\xintsignedfwover #1% {% @@ -32226,10 +33612,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintREZ}} -% \lverb|Removes trailing zeros from A and B and adjust the N in A/B[N]. +%\begin{lverb} +% Removes trailing zeros from A and B and adjust the N in A/B[N]. % % The macro really doing the job \XINT_factortens was redone at 1.3a. But -% speed gain really noticeable only beyond about 100 digits.| +% speed gain really noticeable only beyond about 100 digits. +%\end{lverb} % \begin{macrocode} \def\xintREZ {\romannumeral0\xintrez }% \def\xintrez @@ -32266,11 +33654,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintE}} % \added{1.07} -% \lverb|The fraction is the first argument contrarily to \xintTrunc and -% \xintRound.| +%\begin{lverb} +% The fraction is the first argument contrarily to \xintTrunc and +% \xintRound. +%\end{lverb} % \changed{1.1} -% \lverb|& -% 1.1 modifies and moves \xintiiE to xint.sty.| +%\begin{lverb} +% 1.1 modifies and moves \xintiiE to xint.sty. +%\end{lverb} % \begin{macrocode} \def\xintE {\romannumeral0\xinte }% \def\xinte #1% @@ -32284,12 +33675,23 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_e_end #1.#2#3{ #2/#3[#1]}% % \end{macrocode} % \subsection{\csh{xintIrr}, \csh{xintPIrr}} -% \changed{1.04}\lverb|fixes a buggy \xintIrr {0}.| -% \changed{1.05}\lverb|modifies the initial parsing and post-processing to use \xintrawwithzeros -% and to more quickly deal with an input denominator equal to 1.| -% \changed{1.08}\lverb|this version does not remove a /1 denominator.| +% \changed{1.04} +%\begin{lverb} +% fixes a buggy \xintIrr {0}. +%\end{lverb} +% \changed{1.05} +%\begin{lverb} +% modifies the initial parsing and post-processing to use \xintrawwithzeros +% and to more quickly deal with an input denominator equal to 1. +%\end{lverb} +% \changed{1.08} +%\begin{lverb} +% this version does not remove a /1 denominator. +%\end{lverb} % \changed{1.3} -% \lverb|added \xintPIrr (partial Irr, which ignores the decimal part).| +%\begin{lverb} +% added \xintPIrr (partial Irr, which ignores the decimal part). +%\end{lverb} % \begin{macrocode} \def\xintIrr {\romannumeral0\xintirr }% \def\xintPIrr{\romannumeral0\xintpirr }% @@ -32388,7 +33790,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintIsInt}} -% \lverb|Added at 1.3d only, for isint() xintexpr function.| +%\begin{lverb} +% Added at 1.3d only, for isint() xintexpr function. +%\end{lverb} % \begin{macrocode} \def\xintIsInt {\romannumeral0\xintisint }% \def\xintisint #1% @@ -32466,13 +33870,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintTFrac}} % \added{1.09i} -% \lverb|For frac in \xintexpr. And \xintFrac is already assigned. T for +%\begin{lverb} +% For frac in \xintexpr. And \xintFrac is already assigned. T for % truncation. However, potentially not very efficient with numbers in scientific % notations, with big exponents. Will have to think it again some day. I % hesitated how to call the macro. Same convention as in maple, but some people % reserve fractional part to x - floor(x). Also, not clear if I had to make it % negative (or zero) if x < 0, or rather always positive. There should be in -% fact such a thing for each rounding function, trunc, round, floor, ceil. | +% fact such a thing for each rounding function, trunc, round, floor, ceil. +%\end{lverb} % \begin{macrocode} \def\xintTFrac {\romannumeral0\xinttfrac }% \def\xinttfrac #1{\expandafter\XINT_tfrac_fork\romannumeral0\xintrawwithzeros {#1}\Z }% @@ -32489,11 +33895,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\xintiirem{#1}{#2}\Z {0}{#2}}% % \end{macrocode} % \subsection{\csh{xintTrunc}, \csh{xintiTrunc}} -% \lverb|& +%\begin{lverb} % -% This of course has a long history. Only showing here some comments.| +% This of course has a long history. Only showing here some comments. +%\end{lverb} % \changed{1.2i} -% \lverb|& +%\begin{lverb} % 1.2i release notes: ever since its inception this macro was stupid for a % decimal input: it did not handle it separately from the general fraction % case A/B[N] with B>1, hence ended up doing divisions by powers of ten. But @@ -32504,9 +33911,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % is implemented in \xintXTrunc, but its logic is more complicated, the code % is quite longer and making it f-expandable would not shorten it... I decided % for the time being to not complicate things here. -% | +%\end{lverb} % \changed[2020/02/18]{1.4a} -% \lverb|& +%\begin{lverb} % % Adds handling of a negative first argument. % @@ -32530,7 +33937,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % to understand the original code to hack into its ending via \XINT_trunc_G or % \XINT_itrunc_G. For the latter it looks as if logically I simply have to do % nothing. For the former I simply have to add some eD postfix. -% | +%\end{lverb} % \begin{macrocode} \def\xintTrunc {\romannumeral0\xinttrunc }% \def\xintiTrunc {\romannumeral0\xintitrunc}% @@ -32569,8 +33976,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\XINT_dsx_addzeros{#1}#3;.{#2}% }% \def\XINT_trunc_CE #1.#2{\XINT_trunc_E #2.{#1}}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_trunc_sp_C -#1.#2#3{\XINT_trunc_sp_Ca #2.#1.}% \def\XINT_trunc_sp_Ca #1% {% @@ -32661,12 +34066,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\xintTTrunc {\romannumeral0\xintttrunc }% \def\xintttrunc {\xintitrunc\xint_c_}% % \end{macrocode} -% \subsection{\cshnolabel{xintNum}} +% \subsection{\csh{xintNum}, \csh{xintnum}} % \begin{macrocode} \let\xintnum \xintttrunc % \end{macrocode} % \subsection{\csh{xintRound}, \csh{xintiRound}} -% \lverb|Modified in 1.2i. +%\begin{lverb} +% Modified in 1.2i. % % It benefits first of all from the faster \xintTrunc, particularly when the % input is already a decimal number (denominator B=1). @@ -32676,7 +34082,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % At 1.4a, first argument can be negative. This is handled at \XINT_trunc_G. % -% | +%\end{lverb} % \begin{macrocode} \def\xintRound {\romannumeral0\xintround }% \def\xintiRound {\romannumeral0\xintiround }% @@ -32700,9 +34106,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintXTrunc}} % \added[2014/01/06]{1.09j} -% \lverb@This is completely expandable but not f-expandable.@ +%\begin{lverb} +% This is completely expandable but not f-expandable. +%\end{lverb} % \changed[2016/12/04]{1.2i} -% \lverb|& +%\begin{lverb} % Rewritten: % % - no more use of \xintiloop from xinttools.sty @@ -32712,7 +34120,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \csname...\endcsname % % - handles better the case of an input already a decimal number -% | +%\end{lverb} % \begin{macrocode} \def\xintXTrunc #1%#2% {% @@ -32723,15 +34131,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \expandafter\XINT_xtrunc_b\the\numexpr\ifnum#1<\xint_c_i \xint_c_i-\fi #1.% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_xtrunc_b #1.#2{\XINT_xtrunc_c #2{#1}}% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_xtrunc_c #1% {% \xint_UDzerominusfork @@ -32741,8 +34141,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \krof }%[ \def\XINT_xtrunc_zero #1#2]{0.\romannumeral\xintreplicate{#1}0}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_d #1#2#3/#4[#5]% {% \XINT_xtrunc_prepare_a#4\R\R\R\R\R\R\R\R {10}0000001\W @@ -32766,8 +34164,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \or\expandafter\XINT_xtrunc_BisEight \fi\XINT_xtrunc_BisSmall {#2}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_BisOne\XINT_xtrunc_BisSmall #1#2#3#4% {\XINT_xtrunc_sp_e {#2}{#4}{#3}}% \def\XINT_xtrunc_BisTwo\XINT_xtrunc_BisSmall #1#2#3#4% @@ -32801,8 +34197,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr #1/\xint_c_ii\expandafter .\the\numexpr \xint_c_x^viii+#1!}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_small_a #1.#2!#3% {% \expandafter\XINT_div_small_b\the\numexpr #1\expandafter @@ -32810,8 +34204,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\XINT_div_small_ba #3\R\R\R\R\R\R\R\R{10}0000001\W #3\XINT_sepbyviii_Z_end 2345678\relax }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_prepare_b {\expandafter\XINT_xtrunc_prepare_c\romannumeral0\XINT_zeroes_forviii }% \def\XINT_xtrunc_prepare_c #1!% @@ -32841,11 +34233,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W \X }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_prepare_g #1;{\XINT_xtrunc_e {#1}}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_e #1#2% {% \ifnum #2<\xint_c_ @@ -32854,20 +34242,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_xtrunc_II \fi #2\xint:{#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_I -#1\xint:#2#3#4% {% \expandafter\XINT_xtrunc_I_a\romannumeral0#2{#4}{#2}{#1}{#3}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_I_a #1#2#3#4#5% {% \expandafter\XINT_xtrunc_I_b\the\numexpr #4-#5\xint:#4\xint:{#5}{#2}{#3}{#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_I_b #1% {% \xint_UDsignfork @@ -32875,8 +34257,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% -\XINT_xtrunc_IB_c \krof #1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_IA_c -#1\xint:#2\xint:#3#4#5#6% {% \expandafter\XINT_xtrunc_IA_d @@ -32884,8 +34264,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_xtrunc_IA_xd \the\numexpr (#1+\xint_c_ii^v)/\xint_c_ii^vi-\xint_c_i\xint:#1\xint:{#5}{#4}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_IA_d #1% {% \xint_UDsignfork @@ -32893,46 +34271,32 @@ on input line \noexpand\the\inputlineno.&&J}}#2% -\XINT_xtrunc_IAB_e \krof #1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_IAA_e -#1\xint:#2% {% \romannumeral0\XINT_split_fromleft #1.#2\xint_gobble_i\xint_bye2345678\xint_bye..% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_IAB_e #1\xint:#2% {% 0.\romannumeral\XINT_rep#1\endcsname0#2% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_IA_xd #1\xint:#2\xint:% {% \expandafter\XINT_xtrunc_IA_xe\the\numexpr #2-\xint_c_ii^vi*#1\xint:#1\xint:% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_IA_xe #1\xint:#2\xint:#3#4% {% \XINT_xtrunc_loop {#2}{#4}{#3}{#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_IB_c #1\xint:#2\xint:#3#4#5#6% {% \expandafter\XINT_xtrunc_IB_d \romannumeral0\XINT_split_xfork #1.#6\xint_bye2345678\xint_bye..{#3}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_IB_d #1.#2.#3% {% \expandafter\XINT_xtrunc_IA_d\the\numexpr#3-\xintLength {#1}\xint:{#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_II #1\xint:% {% \expandafter\XINT_xtrunc_II_a\romannumeral\xintreplicate{#1}0\xint:% @@ -32947,14 +34311,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \expandafter\XINT_xtrunc_II_c\the\numexpr #2-\xint_c_ii^vi*#1\xint:#1\xint:% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_II_c #1\xint:#2\xint:#3#4#5% {% #3.\XINT_xtrunc_loop {#2}{#4}{#5}{#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_loop #1% {% \ifnum #1=\xint_c_ \expandafter\XINT_xtrunc_transition\fi @@ -32971,8 +34331,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral\xintreplicate{\xint_c_ii^vi-\xintLength{#1}}0#1% \XINT_xtrunc_loop {#3}{#2}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_transition \expandafter\XINT_xtrunc_loop_a\the\numexpr #1\xint:#2#3#4% {% @@ -32988,8 +34346,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \romannumeral\xintreplicate{#3-\xintLength{#1}}0#1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_e #1% {% \ifnum #1<\xint_c_ @@ -32998,14 +34354,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_xtrunc_sp_II \fi #1\xint:% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_I -#1\xint:#2#3% {% \expandafter\XINT_xtrunc_sp_I_a\the\numexpr #1-#3\xint:#1\xint:{#3}{#2}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_I_a #1% {% \xint_UDsignfork @@ -33013,15 +34365,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% -\XINT_xtrunc_sp_IB_b \krof #1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_IA_b -#1\xint:#2\xint:#3#4% {% \expandafter\XINT_xtrunc_sp_IA_c \the\numexpr#2-\xintLength{#4}\xint:{#4}\romannumeral\XINT_rep#1\endcsname0% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_IA_c #1% {% \xint_UDsignfork @@ -33029,34 +34377,24 @@ on input line \noexpand\the\inputlineno.&&J}}#2% -\XINT_xtrunc_sp_IAB \krof #1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_IAA -#1\xint:#2% {% \romannumeral0\XINT_split_fromleft #1.#2\xint_gobble_i\xint_bye2345678\xint_bye..% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_IAB #1\xint:#2% {% 0.\romannumeral\XINT_rep#1\endcsname0#2% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_IB_b #1\xint:#2\xint:#3#4% {% \expandafter\XINT_xtrunc_sp_IB_c \romannumeral0\XINT_split_xfork #1.#4\xint_bye2345678\xint_bye..{#3}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_IB_c #1.#2.#3% {% \expandafter\XINT_xtrunc_sp_IA_c\the\numexpr#3-\xintLength {#1}\xint:{#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_xtrunc_sp_II #1\xint:#2#3% {% #2\romannumeral\XINT_rep#1\endcsname0.\romannumeral\XINT_rep#3\endcsname0% @@ -33064,7 +34402,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintAdd}} % \changed{1.3} -% \lverb|Big change at 1.3: a/b+c/d uses lcm(b,d) as denominator.| +%\begin{lverb} +% Big change at 1.3: a/b+c/d uses lcm(b,d) as denominator. +%\end{lverb} % \begin{macrocode} \def\xintAdd {\romannumeral0\xintadd }% \def\xintadd #1{\expandafter\XINT_fadd\romannumeral0\xintraw {#1}}% @@ -33106,9 +34446,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\XINT_div_prepare{#2}{#3}{#2}{#2}{#3}{#1}% }% % \end{macrocode} -% \lverb|Basically a clone of the \XINT_irr_loop_a loop. I should modify the +%\begin{lverb} +% Basically a clone of the \XINT_irr_loop_a loop. I should modify the % output of \XINT_div_prepare perhaps to be optimized for checking if -% remainder vanishes.| +% remainder vanishes. +%\end{lverb} % \begin{macrocode} \def\XINT_fadd_D_a #1#2% {% @@ -33141,7 +34483,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintSub}} % \changed{1.3} -% \lverb|Since 1.3 will use least common multiple of denominators.| +%\begin{lverb} +% Since 1.3 will use least common multiple of denominators. +%\end{lverb} % \begin{macrocode} \def\xintSub {\romannumeral0\xintsub }% \def\xintsub #1{\expandafter\XINT_fsub\romannumeral0\xintraw {#1}}% @@ -33156,14 +34500,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \krof }% % \end{macrocode} % \subsection{\csh{xintSum}} -% \lverb|There was (not documented anymore since 1.09d, 2013/10/22) a macro +%\begin{lverb} +% There was (not documented anymore since 1.09d, 2013/10/22) a macro % \xintSumExpr, but it has been deleted at 1.2l. % % Empty items in the input are not accepted by this macro, but the input % may be empty. % % Refactored slightly at 1.4. \XINT_Sum used in xintexpr code. -% | +%\end{lverb} % \begin{macrocode} \def\xintSum {\romannumeral0\xintsum }% \def\xintsum #1{\expandafter\XINT_sum\romannumeral`&&@#1^}% @@ -33220,13 +34565,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_fsqr_zero #1]{ 0/1[0]}% % \end{macrocode} % \subsection{\csh{xintPow}} -% \lverb|& +%\begin{lverb} % 1.2f: to be coherent with the "i" convention \xintiPow should parse also its % exponent via \xintNum when xintfrac.sty is loaded. This was not the case so % far. Cependant le problème est que le fait d'appliquer \xintNum rend % impossible certains inputs qui auraient pu être gérès par \numexpr. Le % \numexpr externe est ici pour intercepter trop grand input. -% | +%\end{lverb} % \begin{macrocode} \def\xintipow #1#2% {% @@ -33273,9 +34618,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_fpow_pos_B #1#2{\XINT_outfrac {#2}{#1}}% % \end{macrocode} % \subsection{\csh{xintFac}} -% \lverb|Factorial coefficients: variant which can be chained with other -% xintfrac macros. \xintiFac deprecated at 1.2o and removed at 1.3; \xintFac -% used by xintexpr.sty.| +%\begin{lverb} +% Factorial coefficients: variant which can be chained with other +% xintfrac macros. +%\end{lverb} % \begin{macrocode} \def\xintFac {\romannumeral0\xintfac}% \def\xintfac #1{\expandafter\XINT_fac_fork\the\numexpr\xintNum{#1}.[0]}% @@ -33292,7 +34638,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintPFactorial}} % \added{1.2f} -% \lverb|Partial factorial. For needs of xintexpr.sty.| +%\begin{lverb} +% Partial factorial. For needs of xintexpr.sty. +%\end{lverb} % \begin{macrocode} \def\xintipfactorial #1#2% {% @@ -33307,12 +34655,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintPrd}} -% \lverb| +%\begin{lverb} % Refactored at 1.4. After some hesitation the routine still does % not try to detect on the fly a zero item, to abort the loop. Indeed % this would add some overhead generally (as we need normalizing the item before % checking if it vanishes hence we must then grab things once more). -% | +%\end{lverb} % \begin{macrocode} \def\xintPrd {\romannumeral0\xintprd }% \def\xintprd #1{\expandafter\XINT_prd\romannumeral`&&@#1^}% @@ -33356,9 +34704,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintDivFloor}} % \added{1.1} -% \lverb|Changed at 1.2p to not append /1[0] ending but rather output a +%\begin{lverb} +% Changed at 1.2p to not append /1[0] ending but rather output a % big integer in strict format, like \xintDivTrunc and \xintDivRound. -% | +%\end{lverb} % \begin{macrocode} \def\xintDivFloor {\romannumeral0\xintdivfloor }% \def\xintdivfloor #1#2{\xintifloor{\xintDiv {#1}{#2}}}% @@ -33370,20 +34719,25 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\xintdivtrunc #1#2{\xintttrunc {\xintDiv {#1}{#2}}}% % \end{macrocode} % \subsection{\csh{xintDivRound}} -% \lverb|1.1| +%\begin{lverb} +% 1.1 +%\end{lverb} % \begin{macrocode} \def\xintDivRound {\romannumeral0\xintdivround }% \def\xintdivround #1#2{\xintiround 0{\xintDiv {#1}{#2}}}% % \end{macrocode} % \subsection{\csh{xintModTrunc}} % \added{1.1} -% \lverb|\xintModTrunc {q1}{q2} computes q1 - q2*t(q1/q2) with t(q1/q2) +%\begin{lverb} +% \xintModTrunc {q1}{q2} computes q1 - q2*t(q1/q2) with t(q1/q2) % equal to the truncated division of two fractions q1 and q2. % -% Its former name, prior to 1.2p, was \xintMod.| +% Its former name, prior to 1.2p, was \xintMod. +%\end{lverb} % \changed{1.3} -% \lverb|& -% At 1.3, uses least common multiple denominator, like \xintMod (next).| +%\begin{lverb} +% At 1.3, uses least common multiple denominator, like \xintMod (next). +%\end{lverb} % \begin{macrocode} \def\xintModTrunc {\romannumeral0\xintmodtrunc }% \def\xintmodtrunc #1{\expandafter\XINT_modtrunc_a\romannumeral0\xintraw{#1}.}% @@ -33416,9 +34770,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \krof }% % \end{macrocode} -% \lverb|Attention. This crucially uses that xint's \xintiiE{x}{e} is defined +%\begin{lverb} +% Attention. This crucially uses that xint's \xintiiE{x}{e} is defined % to return x unchanged if e is negative (and x extended by e zeroes if e >= -% 0).| +% 0). +%\end{lverb} % \begin{macrocode} \def\XINT_modtrunc_pos #1#2/#3[#4]#5/#6[#7].% {% @@ -33432,12 +34788,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintDivMod}} % \added{1.2p} -% \lverb|\xintDivMod{q1}{q2} outputs {floor(q1/q2)}{q1 - q2*floor(q1/q2)}. -% Attention that it relies on \xintiiE{x}{e} returning x if e < 0.| +%\begin{lverb} +% \xintDivMod{q1}{q2} outputs {floor(q1/q2)}{q1 - q2*floor(q1/q2)}. +% Attention that it relies on \xintiiE{x}{e} returning x if e < 0. +%\end{lverb} % \changed{1.3} -% \lverb|& +%\begin{lverb} % Modified (like \xintAdd and \xintSub) at 1.3 to use a l.c.m for final -% denominator of the "mod" part.| +% denominator of the "mod" part. +%\end{lverb} % \begin{macrocode} \def\xintDivMod {\romannumeral0\xintdivmod }% \def\xintdivmod #1{\expandafter\XINT_divmod_a\romannumeral0\xintraw{#1}.}% @@ -33486,15 +34845,17 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintMod}} % \added{1.2p} -% \lverb|\xintMod{q1}{q2} computes q1 - q2*floor(q1/q2). Attention that +%\begin{lverb} +% \xintMod{q1}{q2} computes q1 - q2*floor(q1/q2). Attention that % it relies on \xintiiE{x}{e} returning x if e < 0. % % Prior to 1.2p, that macro had the meaning now attributed to \xintModTrunc. -% | +%\end{lverb} % \changed{1.3} -% \lverb|& +%\begin{lverb} % Modified (like \xintAdd and \xintSub) at 1.3 to use a l.c.m for final -% denominator.| +% denominator. +%\end{lverb} % \begin{macrocode} \def\xintMod {\romannumeral0\xintmod }% \def\xintmod #1{\expandafter\XINT_mod_a\romannumeral0\xintraw{#1}.}% @@ -33508,7 +34869,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xint_orthat{\XINT_mod_bpos #1#2}% }% % \end{macrocode} -% \lverb|Attention to not move ModTrunc code beyond that point.| +%\begin{lverb} +% Attention to not move ModTrunc code beyond that point. +%\end{lverb} % \begin{macrocode} \let\XINT_mod_divbyzero\XINT_modtrunc_divbyzero \let\XINT_mod_aiszero \XINT_modtrunc_aiszero @@ -33556,8 +34919,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintIsOne}} % \added{1.09a} -% \lverb|Could be more efficient. For fractions with big -% powers of tens, it is better to use \xintCmp{f}{1}. Restyled in 1.09i.| +%\begin{lverb} +% Could be more efficient. For fractions with big +% powers of tens, it is better to use \xintCmp{f}{1}. Restyled in 1.09i. +%\end{lverb} % \begin{macrocode} \def\xintIsOne {\romannumeral0\xintisone }% \def\xintisone #1{\expandafter\XINT_fracisone @@ -33609,8 +34974,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% -{\XINT_fgeq_Fn #1}% \krof }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_fgeq_Fd #1\Z #2#3% {% \expandafter\XINT_fgeq_Fe @@ -33662,7 +35025,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintMaxof}} -% \lverb|1.2l protects \xintMaxof against items with non terminated +%\begin{lverb} +% 1.2l protects \xintMaxof against items with non terminated % \the\numexpr expressions. % % 1.4 renders the macro compatible with an empty argument and it also defines @@ -33670,7 +35034,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % had its own macro handling comma separated values, but it changed % internal representation at 1.4). % -% | +%\end{lverb} % \begin{macrocode} \def\xintMaxof {\romannumeral0\xintmaxof }% \def\xintmaxof #1{\expandafter\XINT_maxof\romannumeral`&&@#1^}% @@ -33727,10 +35091,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintMinof}} -% \lverb|1.2l protects \xintMinof against items with non terminated +%\begin{lverb} +% 1.2l protects \xintMinof against items with non terminated % \the\numexpr expressions. % -% 1.4 version is compatible with an empty input (empty items are handled as zero).| +% 1.4 version is compatible with an empty input (empty items are handled as zero). +%\end{lverb} % \begin{macrocode} \def\xintMinof {\romannumeral0\xintminof }% \def\xintminof #1{\expandafter\XINT_minof\romannumeral`&&@#1^}% @@ -33814,8 +35180,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% -{\XINT_fcmp_Fn #1}% \krof }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_fcmp_Fd #1\Z #2#3% {% \expandafter\XINT_fcmp_Fe @@ -34157,7 +35521,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % cost of fetching long sequences of tokens. % \end{framed} % -% \lverb|Changes at 1.4e (done 2021/04/15; undone 2021/04/29) +%\begin{lverb} +% Changes at 1.4e (done 2021/04/15; undone 2021/04/29) % % Macros named \XINTinFloat<name> are not public user-level but were designed % a long time ago for \xintfloatexpr context as a very preliminary step @@ -34240,12 +35605,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% %: \XINTinFloatFacdigits %: \XINTinFloatSqrtdigits %) -% | +%\end{lverb} % % \subsection{\csh{xintDigits}, \csh{xintSetDigits}} % \changed{1.3} -% \lverb|& -% 1.3f allows \xintDigits= in place of \xintDigits:= syntax. +%\begin{lverb} +% 1.3f allows \xintDigits= in place of \xintDigits$empty:= syntax. % It defines \xintDigits*[:]= which reloads xinttrig.sty. Perhaps this should % be default, well. % @@ -34255,7 +35620,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % 1.4e fixes the issue that \xinttheDigits could not be used in the right hand % side of \xintDigits[*][:]=...; or inside the argument to \xintSetDigits. -% | +%\end{lverb} % \begin{macrocode} \mathchardef\XINTdigits 16 \chardef\XINTguarddigits 0 @@ -34275,7 +35640,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % % \subsection{\csh{xintFloat}, \csh{xintFloatZero}} -% \lverb|& +%\begin{lverb} % 1.2f and 1.2g brought some refactoring which resulted in faster treatment of % decimal inputs. 1.2i dropped use of some old routines dating back to pre 1.2 % era in favor of more modern \xintDSRr for rounding. Then 1.2k improves @@ -34322,7 +35687,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % To avoid duplication of code, and any extra burden on \XINTinFloat, which is % the macro used internally by the float macros for parsing their inputs, we -% simply make now \xintFloat a wrapper of \XINTinFloat.| +% simply make now \xintFloat a wrapper of \XINTinFloat. +%\end{lverb} % \begin{macrocode} \def\xintFloatZero{0.0e0}% 1.4k breaking change. Replaces hard-coded 0.e0 \def\xintFloat {\romannumeral0\xintfloat }% @@ -34365,7 +35731,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintFloatBraced}} % \added{1.4l} -%\lverb|& +%\begin{lverb} % Je ne le fais pas comme un wrapper au-dessus de \xintFloat % car c'est pénible avec argument optionnel donc finalemnt % on est obligé de rajouter overhead comme ici. @@ -34381,7 +35747,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Finalement je décide {signe}{exposant}{mantisse sans point décimal}. % Avec en fait 0 ou 1 pour signe (mais ce sign bit mais ça n'a pas grand % sens en décimal...). Non finalement mantisse avec point décimal. -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatBraced{\romannumeral0\xintfloatbraced }% \def\xintfloatbraced#1{\XINT_floatbr_chkopt #1\xint:}% @@ -34414,7 +35780,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \krof #1% }% % \end{macrocode} -%\lverb|& +%\begin{lverb} % Hésitation à faire %( \def\XINT_floatbr_zero #1]#2.{\expandafter\XINT_floatbr_zero_a\xintFloatZero e0e\relax}% %: \def\XINT_floatbr_zero_a#1e#2e#3\relax{{#1}{#2}}% @@ -34423,7 +35789,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % De plus depuis j'ai opté pour {sign bit}{exposant}{mantisse} % Hésitation si mantisse avec ou sans le séparateur décimal. % Est-ce que je devrais mettre plutôt -0+ au début? -% | +%\end{lverb} % \begin{macrocode} \def\XINT_floatbr_zero #1]#2.{\expanded{{0}{0}{0.\xintReplicate{#2-\xint_c_i}0}}}% \def\XINT_floatbr_neg-{\expandafter\XINT_floatbr_neg_a\romannumeral0\XINT_floatbr_pos}% @@ -34434,7 +35800,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{XINTinFloat}, \csh{XINTinFloatS}} -% \lverb|& +%\begin{lverb} % This routine is like \xintFloat but produces an output of the shape A[N] % which is then parsed faster as input to other float macros. % Float operations in \xintfloatexpr...\relax use internally this format. @@ -34464,21 +35830,25 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Since 1.2k, \XINTinFloat always correctly rounds its argument, even if it % is a fraction with very big numerator and denominator. See the discussion of % \xintFloat. -% | +%\end{lverb} % \begin{macrocode} \def\XINTinFloat {\romannumeral0\XINTinfloat }% \def\XINTinfloat {\expandafter\XINT_infloat_clean\romannumeral0\XINT_infloat}% % \end{macrocode} -% \lverb|Attention que ici le fait que l'on grabbe #1 est important car il -% pourrait y avoir un zéro (en particulier dans le cas où input est nul).| +%\begin{lverb} +% Attention que ici le fait que l'on grabbe #1 est important car il +% pourrait y avoir un zéro (en particulier dans le cas où input est nul). +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_clean #1% {\if #1!\xint_dothis\XINT_infloat_clean_a\fi\xint_orthat{ }#1}% % \end{macrocode} -% \lverb|Ici on ajoute les zeros pour faire exactement avec P chiffres. +%\begin{lverb} +% Ici on ajoute les zeros pour faire exactement avec P chiffres. % Car le #1 = P - L avec L la longueur de #2, (ou plutôt de abs(#2), -% car ici le #2 peut avoir un signe) et L < P| +% car ici le #2 peut avoir un signe) et L < P +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_clean_a !#1.#2[#3]% {% @@ -34488,7 +35858,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_infloat_done #1.#2;{ #2[#1]}% % \end{macrocode} -% \lverb|variant which allows output with shorter mantissas.| +%\begin{lverb} +% variant which allows output with shorter mantissas. +%\end{lverb} % \begin{macrocode} \def\XINTinFloatS {\romannumeral0\XINTinfloatS}% \def\XINTinfloatS @@ -34497,9 +35869,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\if #1!\xint_dothis\XINT_infloatS_clean_a\fi\xint_orthat{ }#1}% \def\XINT_infloatS_clean_a !#1.{ }% % \end{macrocode} -% \lverb|début de la routine proprement dite, +%\begin{lverb} +% début de la routine proprement dite, % l'argument optionnel est obligatoire. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_infloat [#1]%#2% {% @@ -34507,12 +35880,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\XINT_infrac% {#2}% }% % \end{macrocode} -% \lverb| #1=P, #2=n, #3=A, #4=B.| +%\begin{lverb} +% #1=P, #2=n, #3=A, #4=B. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_a #1.#2#3#4% {% % \end{macrocode} -% \lverb|micro boost au lieu d'utiliser \XINT_isOne{#4}, mais pas bon style.| +%\begin{lverb} +% micro boost au lieu d'utiliser \XINT_isOne{#4}, mais pas bon style. +%\end{lverb} % \begin{macrocode} \if1\XINT_is_One#4XY% \expandafter\XINT_infloat_sp @@ -34520,10 +35897,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi #3.{#1}{#2}{#4}% }% % \end{macrocode} -% \lverb|Special quick treatment of B=1 case (1.2f then again 1.2g.)$newline +%\begin{lverb} +% Special quick treatment of B=1 case (1.2f then again 1.2g.)$newline % maintenant: A.{P}{N}{1} % Il est possible que A soit nul. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_sp #1% {% @@ -34534,7 +35912,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \krof #1% }% % \end{macrocode} -% \lverb|Attention surtout pas 0/1[0] ici.| +%\begin{lverb} +% Attention surtout pas 0/1[0] ici. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_spzero 0.#1#2#3{ 0[0]}% \def\XINT_infloat_spneg-% @@ -34543,17 +35923,21 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\if#1!\expandafter\XINT_infloat_spneg_needzeros\fi -#1}% \def\XINT_infloat_spneg_needzeros -!#1.{!#1.-}% % \end{macrocode} -% \lverb|in: A.{P}{N}{1}$newline -% out: P-L.A.P.N.| +%\begin{lverb} +% in: A.{P}{N}{1}$newline +% out: P-L.A.P.N. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_sppos #1.#2#3#4% {% \expandafter\XINT_infloat_sp_b\the\numexpr#2-\xintLength{#1}.#1.#2.#3.% }% % \end{macrocode} -% \lverb|#1= P-L. Si c'est positif ou nul il faut retrancher #1 à l'exposant, et +%\begin{lverb} +% #1= P-L. Si c'est positif ou nul il faut retrancher #1 à l'exposant, et % ajouter autant de zéros. On regarde premier token. -% P-L.A.P.N.| +% P-L.A.P.N. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_sp_b #1% {% @@ -34564,24 +35948,30 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \krof #1% }% % \end{macrocode} -% \lverb|Ici P=L. Le cas usuel dans \xintfloatexpr.| +%\begin{lverb} +% Ici P=L. Le cas usuel dans \xintfloatexpr. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_sp_quick 0.#1.#2.#3.{ #1[#3]}% % \end{macrocode} -% \lverb|Ici #1=P-L est >0. L'exposant sera N-(P-L). #2=A. #3=P. #4=N.$newline +%\begin{lverb} +% Ici #1=P-L est >0. L'exposant sera N-(P-L). #2=A. #3=P. #4=N.$newline % 18 mars 2016. En fait dans certains contextes il est sous-optimal d'ajouter les % zéros. Par exemple quand c'est appelé par la multiplication ou la division, % c'est idiot de convertir 2 en 200000...00000[-499]. % Donc je redéfinis addzeros en needzeroes. Si on appelle sous la forme -% \XINTinFloatS, on ne fait pas l'addition de zeros.| +% \XINTinFloatS, on ne fait pas l'addition de zeros. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_sp_needzeros #1.#2.#3.#4.{!#1.#2[#4]}% % \end{macrocode} -% \lverb|L-P=#1.A=#2#3.P=#4.N=#5.$newline +%\begin{lverb} +% L-P=#1.A=#2#3.P=#4.N=#5.$newline % Ici P<L. Il va falloir arrondir. Attention si on va à la puissance de 10 % suivante. En #1 on a L-P qui est >0. L'exposant final sera N+L-P, % sauf dans le cas spécial, il sera alors N+L-P+1. L'ajustement final -% est fait par \XINT_infloat_Y.| +% est fait par \XINT_infloat_Y. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_sp_c -#1.#2#3.#4.#5.% {% @@ -34596,9 +35986,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_dsrr#1\xint_bye\xint_Bye3456789\xint_bye/\xint_c_x\relax.% }% % \end{macrocode} -% \lverb|General branch for A/B with B>1 inputs. It achieves correct rounding +%\begin{lverb} +% General branch for A/B with B>1 inputs. It achieves correct rounding % always since 1.2k (done January 2, 2017.) This branch is never taken for A=0 -% because \XINT_infrac will have returned B=1 then.| +% because \XINT_infrac will have returned B=1 then. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_fork #1% {% @@ -34609,7 +36001,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_infloat_J-{\expandafter-\romannumeral0\XINT_infloat_K }% % \end{macrocode} -% \lverb?A.{P}{n}{B} avec B>1.? +%\begin{lverb} +% A.{P}{n}{B} avec B>1. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_K #1.#2% {% @@ -34617,8 +36011,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr\xintLength{#1}\expandafter.\the\numexpr #2+\xint_c_iv.{#1}{#2}% }% % \end{macrocode} -% \lverb?|A|.P+4.{A}{P}{n}{B}. We check if A already has length -% <= P+4.? +%\begin{lverb} +% |A|.P+4.{A}{P}{n}{B}. We check if A already has length +% <= P+4. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_L #1.#2.% {% @@ -34629,10 +36025,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi #1.#2.% }% % \end{macrocode} -% \lverb?|A|.P+4.{A}{P}{n}{B}. We will keep only the first P+4 +%\begin{lverb} +% |A|.P+4.{A}{P}{n}{B}. We will keep only the first P+4 % digits of A, denoted A'' in what follows. % -% output: u=-0.A''.junk.P+4.|A|.{A}{P}{n}{B}? +% output: u=-0.A''.junk.P+4.|A|.{A}{P}{n}{B} +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Ma #1.#2.#3% {% @@ -34641,10 +36039,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #2.#1.{#3}% }% % \end{macrocode} -% \lverb?|A|.P+4.{A}{P}{n}{B}.$newline +%\begin{lverb} +% |A|.P+4.{A}{P}{n}{B}.$newline % Here A is short. We set u = P+4-|A|, and A''=A (A' = 10^u A) % -% output: u.A''..P+4.|A|.{A}{P}{n}{B}? +% output: u.A''..P+4.|A|.{A}{P}{n}{B} +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Mb #1.#2.#3% {% @@ -34652,8 +36052,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #3..#2.#1.{#3}% }% % \end{macrocode} -% \lverb?input u.A''.junk.P+4.|A|.{A}{P}{n}{B}$newline -% output |B|.P+4.{B}u.A''.P.|A|.n.{A}{B}? +%\begin{lverb} +% input u.A''.junk.P+4.|A|.{A}{P}{n}{B}$newline +% output |B|.P+4.{B}u.A''.P.|A|.n.{A}{B} +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_MtoN #1.#2.#3.#4.#5.#6#7#8#9% {% @@ -34669,8 +36071,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi #1.#2.% }% % \end{macrocode} -% \lverb?input |B|.P+4.{B}u.A''.P.|A|.n.{A}{B}$newline -% output v=-0.B''.junk.|B|.u.A''.P.|A|.n.{A}{B}? +%\begin{lverb} +% input |B|.P+4.{B}u.A''.P.|A|.n.{A}{B}$newline +% output v=-0.B''.junk.|B|.u.A''.P.|A|.n.{A}{B} +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Oa #1.#2.#3% {% @@ -34679,21 +36083,25 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #1.% }% % \end{macrocode} -% \lverb?output v=P+4-|B|>=0.B''.junk.|B|.u.A''.P.|A|.n.{A}{B}? +%\begin{lverb} +% output v=P+4-|B|>=0.B''.junk.|B|.u.A''.P.|A|.n.{A}{B} +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Ob #1.#2.#3% {% \expandafter\XINT_infloat_P\the\numexpr#2-#1.#3..#1.% }% % \end{macrocode} -% \lverb?input v.B''.junk.|B|.u.A''.P.|A|.n.{A}{B}$newline +%\begin{lverb} +% input v.B''.junk.|B|.u.A''.P.|A|.n.{A}{B}$newline % output Q1.P.|B|.|A|.n.{A}{B}$newline % Q1 = division euclidienne de A''.10^{u-v+P+3} par B''. % % Special detection of cases with A and B both having length at most P+4: this % will happen when called from \xintFloatDiv as A and B (produced then via % \XINTinFloatS) will have at most P digits. We then only need integer division -% with P+1 extra zeros, not P+3.? +% with P+1 extra zeros, not P+3. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_P #1#2.#3.#4.#5.#6#7.#8.#9.% {% @@ -34704,7 +36112,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {#3}.#9.#5.% }% % \end{macrocode} -% \lverb?«quick» branch.? +%\begin{lverb} +% «quick» branch. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Qq #1.#2.% {% @@ -34720,8 +36130,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\if.#3.\xint_c_\else\xint_c_i\fi}#1.% }% % \end{macrocode} -% \lverb?standard branch which will have to handle undecided rounding, if too -% close to a mid-value.? +%\begin{lverb} +% standard branch which will have to handle undecided rounding, if too +% close to a mid-value. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Q #1.#2.% {% @@ -34734,8 +36146,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #2#3#4#5.#1.% }% % \end{macrocode} -% \lverb?trailing digits.Q.P.|B|.|A|.n.{A}{B}$newline -% #1=trailing digits (they may have leading zeros.)? +%\begin{lverb} +% trailing digits.Q.P.|B|.|A|.n.{A}{B}$newline +% #1=trailing digits (they may have leading zeros.) +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Sa #1.% {% @@ -34750,8 +36164,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xint_orthat\XINT_infloat_X\xint_c_i }% % \end{macrocode} -% \lverb?epsilon #2=Q.#3=P.#4=|B|.#5=|A|.#6=n.{A}{B}$newline -% exposant final est n+|A|-|B|-P+epsilon? +%\begin{lverb} +% epsilon #2=Q.#3=P.#4=|B|.#5=|A|.#6=n.{A}{B}$newline +% exposant final est n+|A|-|B|-P+epsilon +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_SEq #1#2.#3.#4.#5.#6.#7#8% {% @@ -34760,8 +36176,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_infloat_SY #1.#2.{ #2[#1]}% % \end{macrocode} -% \lverb?initial digit #2 put aside to check for case of rounding up to -% next power of ten, which will need adjustment of mantissa and exponent.? +%\begin{lverb} +% initial digit #2 put aside to check for case of rounding up to +% next power of ten, which will need adjustment of mantissa and +% exponent. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_SUp #1#2#3.#4.#5.#6.#7.#8#9% {% @@ -34770,7 +36189,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\xintinc{#2#3}.#2% }% % \end{macrocode} -% \lverb?epsilon Q.P.|B|.|A|.n.{A}{B}$newline +%\begin{lverb} +% epsilon Q.P.|B|.|A|.n.{A}{B}$newline % % \xintDSH{-x}{U} multiplies U by 10^x. When x is negative, this means % it truncates (i.e. it drops the last -x digits). @@ -34779,7 +36199,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % for this branch to be taken. Perhaps in future I will use higher free % parameter d, which currently is set at 4. % -% #1=epsilon, #2#3=Q, #4=P, #5=|B|, #6=|A|, #7=n, #8=A, #9=B? +% #1=epsilon, #2#3=Q, #4=P, #5=|B|, #6=|A|, #7=n, #8=A, #9=B +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_X #1#2#3.#4.#5.#6.#7.#8#9% {% @@ -34792,7 +36213,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xintinc{#2#3}.#2% }% % \end{macrocode} -% \lverb?check for rounding up to next power of ten.? +%\begin{lverb} +% check for rounding up to next power of ten. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Y #1{% \def\XINT_infloat_Y ##1.##2##3.##4% @@ -34801,7 +36224,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #1##2##3[##1]% }}\XINT_infloat_Y{ }% % \end{macrocode} -% \lverb?#1=1, #2=0.? +%\begin{lverb} +% #1=1, #2=0. +%\end{lverb} % \begin{macrocode} \def\XINT_infloat_Z #1#2#3[#4]% {% @@ -34811,14 +36236,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{XINTFloatiLogTen}} % \added{1.3e} -% \lverb|Le comportement pour un input nul est non +%\begin{lverb} +% Le comportement pour un input nul est non % encore finalisé. Il changera lorsque NaN, +Inf, -Inf existeront. % % The optional argument [#1] is in fact mandatory and #1 is % not pre-expanded in a \numexpr. % % The return value here 2^31-2^15 is highly undecided. -% | +%\end{lverb} % \begin{macrocode} \def\XINTFloatiLogTen {\the\numexpr\XINTfloatilogten}% \def\XINTfloatilogten [#1]#2% @@ -34836,7 +36262,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsection{\csh{xintPFloat}} % \added{1.1} % \changed{1.4e} -% \lverb|& +%\begin{lverb} % % xint has not yet incorporated a general formatter as it was % not a priority during development and external solutions exist @@ -34860,8 +36286,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % 1.4b added \xintPFloatE to customize whether to use % e or E. -% | -% \lverb|& +% +% % 1.4e, with some hesitation, decided to make a breaking change and to modify % the behaviour. % @@ -34890,9 +36316,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % as it knows it will % be used always with a [P] argument in the xintexpr.sty context. -% | +%\end{lverb} % \changed{1.4k} -% \lverb|& +%\begin{lverb} % Addition of customization via \xintPFloatZero, \xintPFloatLengthOneSuffix, % \xintPFloatNoSciEmax, \xintPFloatNoSciEmin which replace formerly % hard-coded behaviour. @@ -34926,14 +36352,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % most 6 digits (for example) wide, else use no trimming. % % Threshold customizable via \xintPFloatMinTrimmed. -% | +%\end{lverb} % \changed[2022/05/22]{1.4l} -% \lverb|The 1.4k check for canceling the trimming of trailing zeros +%\begin{lverb} +% The 1.4k check for canceling the trimming of trailing zeros % took over priority over the later check for being an integer when % decimal fixed point notation was used (or being only with a one-digit % trimmed mantissa). In particular if user set \xintPFloatMinTrimmed to % the value of Digits (or P) to avoid trimming it also prevented -% recognition of some integers (but not all). Fixed at 1.4l| +% recognition of some integers (but not all). Fixed at 1.4l +%\end{lverb} % \begin{macrocode} \def\xintPFloatE{e}% \def\xintPFloatNoSciEmax{\xint_c_v}% 1e6 uses sci.not. @@ -34986,7 +36414,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #3.#2.#1.% }% % \end{macrocode} -%\lverb|& +%\begin{lverb} %( #1 est la longueur de la mantisse trimmée %: #2 est Digits ou P %: Si #2-#1 < MinTrimmed, on se prépare à peut-être remettre les trailing zeros @@ -34995,7 +36423,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % On teste pour #2=#1, car c'est le cas le plus fréquent (mais est-ce % une bonne idée) car on sait qu'alors il n'y a pas de trailing zéros % donc on va direct vers \XINT_pfloat_a. -%| +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_aa #1.#2.% {% @@ -35005,9 +36433,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xint_orthat\XINT_pfloat_a #1.% }% % \end{macrocode} -%\lverb|Needed for \xintFracToSci, which uses old pre 1.4k interface, +%\begin{lverb} +% Needed for \xintFracToSci, which uses old pre 1.4k interface, % where the P parameter was not stored for counting how many zeros -% were trimmed. \xintFracToSci trims always.| +% were trimmed. \xintFracToSci trims always. +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_a_fork#1% {% @@ -35024,21 +36454,21 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_pfloat_a\the\numexpr\xintLength{#1}.#2.#1.% }% % \end{macrocode} -%\lverb|& +%\begin{lverb} %( #1 est P > #2 mais peut être encore sous la forme \XINTdigits %: #2 est la longueur de la mantisse trimmée %: #3 est l'exposant non normalisé %: #4 est la mantisse %) % On reconstitue les trailing zéros à remettre éventuellement. -%| +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_i #1.#2.%#3.#4.% {% \expandafter\XINT_pfloat_j\romannumeral\xintreplicate{#1-#2}0.#2.% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} %( #1 est les trailing zeros à remettre peut-être %: #2 est la longueur de la mantisse trimmée %: #3#4 est l'exposant N pour mantisse trimmée entière @@ -35048,7 +36478,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % La façon bizarre de mettre #3 est liée aux versions anciennes % de la macro, héritage conservé pour minimiser effort d'adaptation. -%| +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_j #1.#2.#3#4.%#5. {% @@ -35056,7 +36486,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #3#2.#1.% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} %( #1 est la longueur de la mantisse trimmée %: #2#3 est l'exposant N pour mantisse trimmée %: #4 serait la mantisse @@ -35064,7 +36494,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % On calcule l'exposant scientifique. On est arrivé ici dans % une branche où on n'a pas besoin de remettre les zéros trimmés % donc on positionne un dernier argument vide pour \XINT_pfloat_b -% | +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_a #1.#2#3.%#4. {% @@ -35072,7 +36502,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #2#1..% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} %( #1 est l'exposant scientifique K %: #2 est le signe ou premier chiffre de l'exposant N pour mantisse trimmée %: #3 serait la longueur de la mantisse trimmée @@ -35085,7 +36515,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % On va vers \XINT_pfloat_N lorsque l'on n'utilise pas la notation % scientifique et que l'exposant scientifique était strictement négatif. -%| +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_b #1.#2%#3.#4.#5. {% @@ -35097,13 +36527,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #1.% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % #1 is the scientific exponent, #2 is the length of the trimmed mantissa, % #3 are the trailing zeros, #4 is the trimmed integer mantissa % % \xintPFloatE can be replaced by any f-expandable macro with a dot-delimited % argument which produces a dot-delimited output. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_sci #1.#2.% {% @@ -35112,21 +36542,21 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_pfloat_sci_a #1.#2.#3#4.{ #3.#4#2#1}% % \end{macrocode} -% \lverb|& +%\begin{lverb} % #1#2=\fi\XINT_pfloat_sci_a % % 1-digit mantissa, hesitation between d.0eK or deK % Finally at 1.4k, \xintPFloatLengthOneSuffix for customization. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_sci_i #1#2#3.#4.#5.{\expanded{#1 #5\xintPFloatLengthOneSuffix}#3}% % \end{macrocode} -% \lverb|& +%\begin{lverb} % #1=sci.exp. K, #2=mant. wd L, #3=trailing zéros, #4=trimmed mantissa % % For _N, #1 is at most -1, for _P, #1 is at least 0. For _P there % will be fractional digits, and #1+1 digits before the mark. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_N#1.#2.#3.#4.% {% @@ -35134,7 +36564,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_pfloat_N_e 0{ 0.}% % \end{macrocode} -% \lverb|& +%\begin{lverb} % #1=sci.exp. K, #2=mant. wd L, #3=trailing zéros, #4=trimmed mantissa % % Abusive usage of internal \XINT_split_fromleft_a. @@ -35142,7 +36572,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % We benefit also with the way \xintDecSplit is built upon % \XINT_split_fromleft with a final clean-up which here % we can shortcut via using terminator "\xint_bye." not "\xint_bye.." -% | +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_P #1.#2.#3.#4.% {% @@ -35150,11 +36580,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr\xint_c_vii-#1.#4\xint_bye2345678\xint_bye.#3% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Here we have an integer so we only need to postfix the trimmed mantissa #4 % with #1+1-#2 zeros (#1=sci exp., #2=trimmed mantissa width). Less cumbersome % to do that with \expanded. And the trailing zeros #3 ignored here. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_pfloat_Ps #1.#2.#3.#4.% {% @@ -35182,10 +36612,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_floattodec\romannumeral0\XINTinfloatS[#1]% }% % \end{macrocode} -% \lverb|Temptation to try to use direct access to lower entry points +%\begin{lverb} +% Temptation to try to use direct access to lower entry points % from \xintREZ, but it dates back from very early days and uses old \Z % delimiters (same remarks for the code jumping from \xintFracToSci -% to \xintrez)| +% to \xintrez) +%\end{lverb} % \begin{macrocode} \def\XINT_floattodec#1]% {% @@ -35196,27 +36628,31 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsection{\csh{XINTinFloatFrac}} % \added{1.09i} % -% \lverb|For frac function in \xintfloatexpr. This version computes +%\begin{lverb} +% For frac function in \xintfloatexpr. This version computes % exactly from the input the fractional part and then only converts it % into a float with the asked-for number of digits. I will have to think -% it again some day, certainly.| +% it again some day, certainly. +%\end{lverb} % % \changed{1.1} -% \lverb|& +%\begin{lverb} % 1.1 removes optional argument for which there was anyhow no interface, for -% technical reasons having to do with \xintNewExpr.| +% technical reasons having to do with \xintNewExpr. +%\end{lverb} % % \changed{1.1a} -% \lverb|& +%\begin{lverb} % 1.1a renames the macro as \XINTinFloatFracdigits (from \XINTinFloatFrac) to % be synchronous with the \XINTinFloatSqrt and \XINTinFloat habits related to -% \xintNewExpr context and issues with macro names.| +% \xintNewExpr context and issues with macro names. +%\end{lverb} % % \changed{1.4e} -% \lverb|& +%\begin{lverb} % 1.4e renames it back to \XINTinFloatFrac because of all such similarly named % macros also using \XINTdigits forcedly. -% | +%\end{lverb} % \begin{macrocode} \def\XINTinFloatFrac {\romannumeral0\XINTinfloatfrac}% \def\XINTinfloatfrac #1% @@ -35226,7 +36662,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_infloatfrac_a {\XINTinfloat[\XINTdigits]}% % \end{macrocode} % \subsection{\csh{xintFloatAdd}, \csh{XINTinFloatAdd}} -% \lverb|First included in release 1.07. +%\begin{lverb} +% First included in release 1.07. % % 1.09ka improved a bit the efficiency. However the add, sub, mul, div % routines were provisory and supposed to be revised soon. @@ -35237,8 +36674,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % See general introduction for important changes at 1.4e relative to % the \XINTinFloat<name> macros. % -% -%| +%\end{lverb} % \begin{macrocode} \def\xintFloatAdd {\romannumeral0\xintfloatadd}% \def\xintfloatadd #1{\XINT_fladd_chkopt \xintfloat #1\xint:}% @@ -35270,21 +36706,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \xint_gob_til_zero #1\XINT_FL_add_zero 0\XINT_FL_add_b #1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_FL_add_zero #1.#2{#2}%[[ \def\XINT_FL_add_b #1]#2.#3% {% \expandafter\XINT_FL_add_c\romannumeral0\XINTinfloat[#2]{#3}#2.#1]% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_FL_add_c #1% {% \xint_gob_til_zero #1\XINT_FL_add_zero 0\XINT_FL_add_d #1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_FL_add_d #1[#2]#3.#4[#5]% {% \ifnum\numexpr #2-#3-#5>\xint_c_\xint_dothis\xint_firstoftwo\fi @@ -35295,9 +36725,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsection{\csh{xintFloatSub}, \csh{XINTinFloatSub}} % \added{1.07} % \changed{1.2f} -% \lverb|& +%\begin{lverb} % Starting with 1.2f the arguments undergo an intial rounding to the target -% precision P not P+2.| +% precision P not P+2. +%\end{lverb} % % \begin{macrocode} \def\xintFloatSub {\romannumeral0\xintfloatsub}% @@ -35330,14 +36761,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsection{\csh{xintFloatMul}, \csh{XINTinFloatMul}} % \added{1.07} % \changed{1.2d} -% \lverb|& +%\begin{lverb} % Starting with 1.2f the arguments are rounded to the target precision P not -% P+2.| +% P+2. +%\end{lverb} % \changed{1.2g} -% \lverb|& +%\begin{lverb} % 1.2g handles the inputs via \XINTinFloatS which will be more efficient when % the precision is large and the input is for example a small constant like 2. -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatMul {\romannumeral0\xintfloatmul}% \def\xintfloatmul #1{\XINT_flmul_chkopt \xintfloat #1\xint:}% @@ -35369,15 +36801,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \expandafter\XINT_FL_mul_b\romannumeral0\XINTinfloatS[#3]{#4}#1[#2]% }% -% \end{macrocode} -% \lverb|& -% | -% \begin{macrocode} \def\XINT_FL_mul_b #1[#2]#3[#4]{\xintiiMul{#3}{#1}/1[#4+#2]}% % \end{macrocode} % \subsection{\csh{xintFloatSqr}, \csh{XINTinFloatSqr}} % \added{1.4e} -% \lverb|Strangely \xintFloatSqr had never been defined so far. +%\begin{lverb} +% Strangely \xintFloatSqr had never been defined so far. % % An \XINTinFloatSqr{#1} was defined in xintexpr.sty directly as % \XINTinFloatMul[\XINTdigits]{#1}{#1}, to support the sqr() function. The @@ -35387,7 +36816,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % be. % % Anyway let's do this finally properly here. -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatSqr {\romannumeral0\xintfloatsqr}% \def\xintfloatsqr #1{\XINT_flsqr_chkopt \xintfloat #1\xint:}% @@ -35417,9 +36846,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{XINTinFloatInv}} % \added{1.3e} -% \lverb|Added belatedly at 1.3e, to support inv() function. We use Short +%\begin{lverb} +% Added belatedly at 1.3e, to support inv() function. We use Short % output, for rare inv(\xintexpr 1/3\relax) case. I need to think the whole -% thing out at some later date.| +% thing out at some later date. +%\end{lverb} % \begin{macrocode} \def\XINTinFloatInv#1{\XINTinFloatS[\XINTdigits]{\xintInv{#1}}}% \def\XINTinFloatInv_wopt[#1]#2{\XINTinFloatS[#1]{\xintInv{#2}}}% @@ -35427,21 +36858,23 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsection{\csh{xintFloatDiv}, \csh{XINTinFloatDiv}} % \added{1.07} % \changed{1.2f} -% \lverb|Starting with 1.2f the arguments are rounded to the target precision P not -% P+2.| +%\begin{lverb} +% Starting with 1.2f the arguments are rounded to the target precision P not +% P+2. +%\end{lverb} % \changed{1.2g} -% \lverb|& +%\begin{lverb} % 1.2g handles the inputs via \XINTinFloatS which will be more efficient when % the precision is large and the input is for example a small constant like 2. % % The actual rounding of the quotient is handled via \xintfloat (or % \XINTinfloatS). -% | +%\end{lverb} % \changed{1.2k} -% \lverb|& +%\begin{lverb} % 1.2k does the same kind of improvement in \XINT_FL_div_b as for % multiplication: earlier code was unnecessarily high level. -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatDiv {\romannumeral0\xintfloatdiv}% \def\xintfloatdiv #1{\XINT_fldiv_chkopt \xintfloat #1\xint:}% @@ -35455,14 +36888,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi #1#2% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % 1.4g adds here intercept of second argument being zero, % else a low level error will arise at later stage from the % the fall-back value returned by core iidivision being 0 % and not having expected number of digits at \XINT_infloat_Qq % and split from left returning some empty value breaking the % \ifnum test in \XINT_infloat_Rq. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_fldiv_noopt #1#2\xint:#3% {% @@ -35483,9 +36916,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_fldiv_opt_a\the\numexpr #2.#1% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Also here added early check at 1.4g if divisor is zero. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_fldiv_opt_a #1.#2#3#4% {% @@ -35495,14 +36928,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \expandafter\XINT_FL_div_b\romannumeral0\XINTinfloatS[#3]{#4}/#1e#2% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_FL_div_b #1[#2]{#1e#2}% % \end{macrocode} % \subsection{\csh{xintFloatPow}, \csh{XINTinFloatPow}} % \added{1.07} % -% \lverb|1.09j has re-organized the core loop. +%\begin{lverb} +% 1.09j has re-organized the core loop. % % 2015/12/07. I have hesitated to map ^ in expressions to \xintFloatPow rather % than \xintFloatPower. But for 1.234567890123456 to the power 2145678912 with @@ -35510,14 +36942,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % gain. % % This routine requires the exponent x to be compatible with \numexpr parsing. -% | +%\end{lverb} % % \changed{1.2f} -% \lverb|& +%\begin{lverb} % 1.2f has rewritten the code for better efficiency. Also, now the argument A % for A^x is first rounded to P digits before switching to the increased % working precision (which depends upon x). -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatPow {\romannumeral0\xintfloatpow}% \def\xintfloatpow #1{\XINT_flpow_chkopt \xintfloat #1\xint:}% @@ -35553,42 +36985,32 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \krof }% \def\XINT_flpow_BisZero .#1.#2#3{#3{1[0]}}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_checkB_b #1#2.#3.% {% \expandafter\XINT_flpow_checkB_c \the\numexpr\xintLength{#2}+\xint_c_iii.#3.#2.{#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_checkB_c #1.#2.% {% \expandafter\XINT_flpow_checkB_d\the\numexpr#1+#2.#1.#2.% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % % 1.2f rounds input to P digits, first. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_flpow_checkB_d #1.#2.#3.#4.#5#6% {% \expandafter \XINT_flpow_aa \romannumeral0\XINTinfloat [#3]{#6}{#2}{#1}{#4}{#5}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_aa #1[#2]#3% {% \expandafter\XINT_flpow_ab\the\numexpr #2-#3\expandafter.% \romannumeral\XINT_rep #3\endcsname0.#1.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_ab #1.#2.#3.{\XINT_flpow_a #3#2[#1]}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_a #1% {% \xint_UDzerominusfork @@ -35604,22 +37026,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\XINT_signalcondition{DivisionByZero}{0 raised to power -#4.}{}{ 0[0]}}% }% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_b #1#2[#3]#4#5% {% \XINT_flpow_loopI #5.#3.#2.#4.{#1\ifodd #5 \xint_c_i\fi\fi}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_truncate #1.#2.#3.% {% \expandafter\XINT_flpow_truncate_a \romannumeral0\XINT_split_fromleft #3.#2\xint_bye2345678\xint_bye..#1.#3.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_truncate_a #1.#2.#3.{#3+\xintLength{#2}.#1.}% \def\XINT_flpow_loopI #1.% {% @@ -35631,14 +37047,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi #1.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_ItoIII\ifodd #1\fi #2.#3.#4.#5.#6% {% \expandafter\XINT_flpow_III\the\numexpr #6+\xint_c_.#3.#4.#5.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_loopI_even #1.#2.#3.%#4.% {% \expandafter\XINT_flpow_loopI @@ -35685,8 +37097,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr\xint_c_ii*#5\expandafter.\romannumeral0\xintiisqr{#6}.#3.% #1.#2.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_IItoIII\ifodd #1\fi #2.#3.#4.#5.#6.#7.#8% {% \expandafter\XINT_flpow_III\the\numexpr #8+\xint_c_\expandafter.% @@ -35694,7 +37104,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr#3+#6\expandafter.\romannumeral0\xintiimul{#4}{#7}.#5.% }% % \end{macrocode} -% \lverb|This ending is common with \xintFloatPower. +%\begin{lverb} +% This ending is common with \xintFloatPower. % % In the case of negative exponent we need to inverse the Q-digits mantissa. % This requires no special attention now as 1.2k's \xintFloat does correct @@ -35714,8 +37125,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % precision. The total error (for positive as well as negative exponent) has % been estimated to at worst possibly exceed slightly 0.5125 ulp(Z), and at % any rate it is less than 0.52 ulp(Z). -% -% | +%\end{lverb} % \begin{macrocode} \def\XINT_flpow_III #1.#2.#3.#4.#5% {% @@ -35725,19 +37135,18 @@ on input line \noexpand\the\inputlineno.&&J}}#2% -{{#3[#2]}}% \krof #1% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpow_IIIend #1#2#3% {#3{\if#21\xint_afterfi{\expandafter-\romannumeral`&&@}\fi#1}}% % \end{macrocode} % \subsection{\csh{xintFloatPower}, \csh{XINTinFloatPower}} % \added{1.07} -% \lverb|The core loop has been re-organized in 1.09j for some slight +%\begin{lverb} +% The core loop has been re-organized in 1.09j for some slight % efficiency gain. The exponent B is given to \xintNum. The ^ in expressions % is mapped to this routine. -% | +%\end{lverb} % \changed{1.2f} -% \lverb|& +%\begin{lverb} % Same modifications as in \xintFloatPow for 1.2f. % % 1.2f \XINTinFloatPowerH (now moved to $xintlognameimp, and renamed). It @@ -35746,22 +37155,24 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % rounded to Digits before, not after the square root extraction, 1.2k kept 3 % guard digits for this last step. And the initial step was % changed to a rounding rather than truncating. -% | +%\end{lverb} % \changed{1.4e} -% \lverb|& +%\begin{lverb} % Until 1.4e this \XINTinFloatPowerH was the macro for a^b in expressions, % but of course it behaved strangely for b not an integer or an half-integer! % At 1.4e, the non-integer, non-half-integer exponents will be handled via % log10() and pow10() support macros, see $xintlognameimp. The code % has now been relocated there. -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatPower {\romannumeral0\xintfloatpower}% \def\xintfloatpower #1{\XINT_flpower_chkopt \xintfloat #1\xint:}% \def\XINTinFloatPower{\romannumeral0\XINTinfloatpower }% \def\XINTinfloatpower{\XINT_flpower_opt_a\XINTdigits.\XINTinfloatS}% % \end{macrocode} -% \lverb|Start of macro. Check for optional argument.| +%\begin{lverb} +% Start of macro. Check for optional argument. +%\end{lverb} % \begin{macrocode} \def\XINT_flpower_chkopt #1#2% {% @@ -35798,21 +37209,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_flpower_checkB_c \the\numexpr\xintLength{#2}+\xint_c_iii.#3.#2.{#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpower_checkB_c #1.#2.% {% \expandafter\XINT_flpower_checkB_d\the\numexpr#1+#2.#1.#2.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpower_checkB_d #1.#2.#3.#4.#5#6% {% \expandafter \XINT_flpower_aa \romannumeral0\XINTinfloat [#3]{#6}{#2}{#1}{#4}{#5}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flpower_aa #1[#2]#3% {% \expandafter\XINT_flpower_ab\the\numexpr #2-#3\expandafter.% @@ -35837,8 +37242,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \ifodd\xintLDg{#1} %<- intentional space \xint_dothis{\expandafter\XINT_flpower_loopI_odd}\fi \xint_orthat{\expandafter\XINT_flpower_loopI_even}% -% \end{macrocode} -% \begin{macrocode} \romannumeral0\XINT_half #1\xint_bye\xint_Bye345678\xint_bye *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax.% @@ -35868,8 +37271,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \ifodd\xintLDg{#1} %<- intentional space \xint_dothis{\expandafter\XINT_flpower_loopII_odd}\fi \xint_orthat{\expandafter\XINT_flpower_loopII_even}% -% \end{macrocode} -% \begin{macrocode} \romannumeral0\XINT_half#1\xint_bye\xint_Bye345678\xint_bye *\xint_c_v+\xint_c_v)/\xint_c_x-\xint_c_i\relax.% }% @@ -35938,7 +37339,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_FL_fac_iszero #1.#2#3#4#5{#5{1[0]}}% % \end{macrocode} -% \lverb|1.2f XINT_FL_fac_isneg returns 0, earlier versions used 1 here.| +%\begin{lverb} +% 1.2f XINT_FL_fac_isneg returns 0, earlier versions used 1 here. +%\end{lverb} % \begin{macrocode} \def\XINT_FL_fac_isneg #1.#2#3#4#5% {% @@ -35960,7 +37363,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {Factorial argument is too large: #1>=10^8.}{}{ 0[0]}}% }% % \end{macrocode} -% \lverb?Computations are done with Q blocks of eight digits. When a +%\begin{lverb} +% Computations are done with Q blocks of eight digits. When a % multiplication has a carry, hence creates Q+1 blocks, the least significant % one is dropped. The goal is to compute an approximate value X' to the exact % value X, such that the final relative error (X-X')/X will be at most @@ -35996,7 +37400,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % $egroup % Maple's result (contrarily to xint) is thus not the correct rounding but % still it is less than 0.6 ulp wrong. -% ? +%\end{lverb} % \begin{macrocode} \def\XINT_FL_fac_vbig {\expandafter\XINT_FL_fac_vbigloop_a @@ -36109,10 +37513,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr #1-\xint_c_viii.100000000!% }% % \end{macrocode} -% \lverb|We will manipulate by successive *small* multiplications Q blocks +%\begin{lverb} +% We will manipulate by successive *small* multiplications Q blocks % 1<8d>!, terminated by 1;!. We need a custom small multiplication which % tells us when it has create a new block, and the least significant one -% should be dropped.| +% should be dropped. +%\end{lverb} % \begin{macrocode} \def\XINT_FL_fac_addzeros_exit #1.#2.#3#4{\XINT_FL_fac_smallloop_loop #3#21;![-#4]}% \def\XINT_FL_fac_smallloop_loop #1.#2.% @@ -36166,13 +37572,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_FL_fac_minimulwc_a #2!#3!{#1}{#2}% }% % \end{macrocode} -% \lverb|This is the crucial ending. I note that I used here an \ifnum test +%\begin{lverb} +% This is the crucial ending. I note that I used here an \ifnum test % rather than the gob_til_eightzeroes thing. Actually for eight digits there % is much less difference than for only four. % % The "carry" situation is marked by a final !-1 rather than !-2 for no-carry. % (a \numexpr muste be stopped, and leaving a - as delimiter is good as it -% will not arise earlier.)| +% will not arise earlier.) +%\end{lverb} % \begin{macrocode} \def\XINT_FL_fac_smallmul_end;\XINT_FL_fac_minimulwc_a #1!;!#2#3[#4]% {% @@ -36187,15 +37595,20 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintFloatPFactorial}, \csh{XINTinFloatPFactorial}} % \added[2015/11/29]{1.2f} -% \lverb|Partial factorial pfactorial(a,b)=(a+1)...b, -% only for non-negative integers with a<=b<10^8.| +%\begin{lverb} +% Partial factorial pfactorial(a,b)=(a+1)...b, +% only for non-negative integers with a<=b<10^8. +%\end{lverb} % \changed[2016/11/20]{1.2h} -% \lverb|Now avoids raising \xintError:OutOfRangePFac if the -% condition 0<=a<=b<10^8 is violated. Same as for \xintiiPFactorial.| +%\begin{lverb} +% Now avoids raising \xintError:OutOfRangePFac if the +% condition 0<=a<=b<10^8 is violated. Same as for \xintiiPFactorial. +%\end{lverb} % \changed{1.4e} -% \lverb|& +%\begin{lverb} % 1.4e extends the precision in floating point context adding some overhead -% but well.| +% but well. +%\end{lverb} % \begin{macrocode} \def\xintFloatPFactorial {\romannumeral0\xintfloatpfactorial}% \def\xintfloatpfactorial #1{\XINT_flpfac_chkopt \xintfloat #1\xint:}% @@ -36248,7 +37661,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr #2-\xint_c_i\expandafter.\the\numexpr#1-\xint_c_i.% }% % \end{macrocode} -% \lverb|See the comments for \XINT_FL_pfac_increaseP. Case of b=a+1 should be +%\begin{lverb} +% See the comments for \XINT_FL_pfac_increaseP. Case of b=a+1 should be % filtered out perhaps. We only needed here to copy the \xintPFactorial macros and % re-use \XINT_FL_fac_mul/\XINT_FL_fac_out. Had to modify a bit % \XINT_FL_pfac_addzeroes. We can enter here directly with #3 equal to specify @@ -36256,7 +37670,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % error less than #3.10^{-#4-1}), and #5 would hold the macro doing the final % rounding (or truncating, if I make a FloatTrunc available) to a given number % of digits, possibly not #4. By default the #3 is 1, but FloatBinomial calls -% it with #3=4.| +% it with #3=4. +%\end{lverb} % \begin{macrocode} \def\XINT_FL_pfac_increaseP #1.#2.#3#4% {% @@ -36393,21 +37808,24 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintFloatBinomial}, \csh{XINTinFloatBinomial}} % \added[2015/12/01]{1.2f} -% \lverb|We compute binomial(x,y) as pfac(x-y,x)/y!, where the numerator +%\begin{lverb} +% We compute binomial(x,y) as pfac(x-y,x)/y!, where the numerator % and denominator are computed with a relative error at most 4.10^{-P-2}, then % rounded (once I have a float truncation, I will use truncation rather) to % P+3 digits, and finally the quotient is correctly rounded to P digits. This % will guarantee that the exact value X differs from the computed one Y by at -% most 0.6 ulp(Y).| +% most 0.6 ulp(Y). +%\end{lverb} % \changed[2016/11/19]{1.2h} -% \lverb|As for \xintiiBinomial, hard to understand why last +%\begin{lverb} +% As for \xintiiBinomial, hard to understand why last % year I coded this to raise an error if y<0 or y>x ! The question of the % Gamma function is for another occasion, here x and y must be (small) % integers. % % 1.4e: same remarks as for factorial and partial factorial about added % overhead due to extra guard digits. -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatBinomial {\romannumeral0\xintfloatbinomial}% \def\xintfloatbinomial #1{\XINT_flbinom_chkopt \xintfloat #1\xint:}% @@ -36458,8 +37876,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_FL_binom_one #1.#2.#3.#4.#5{#5[#4]{1[0]}}% \def\XINT_FL_binom_zero #1.#2.#3.#4.#5{#5[#4]{0[0]}}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_FL_binom_aa #1.#2.#3.#4.#5% {% #5[#4]{\xintDiv{\XINT_FL_pfac_increaseP @@ -36478,7 +37894,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsection{\csh{xintFloatSqrt}, \csh{XINTinFloatSqrt}} % \added{1.08} % \changed{1.2f} -% \lverb|& +%\begin{lverb} % % The float version was developed at the same time as the integer one and even % a bit earlier. As a result the integer variant had some sub-optimal parts. @@ -36498,7 +37914,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % macros. % % Final note: with 1.2f the input is always first rounded to P significant -% places.| +% places. +%\end{lverb} % \begin{macrocode} \def\xintFloatSqrt {\romannumeral0\xintfloatsqrt}% \def\xintfloatsqrt #1{\XINT_flsqrt_chkopt \xintfloat #1\xint:}% @@ -36538,27 +37955,17 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #3[#2]{\XINT_signalcondition{InvalidOperation} {Square root of negative: -#1].}{}{ 0[0]}}% }% -% \end{macrocode} -% \begin{privatecodecomments} -% \end{privatecodecomments} -% \begin{macrocode} \def\XINT_FL_sqrt_pos #1[#2]#3.% {% \expandafter\XINT_flsqrt \the\numexpr #3\ifodd #2 \xint_dothis {+\xint_c_iii.(#2+\xint_c_i).0}\fi \xint_orthat {+\xint_c_ii.#2.{}}#100.#3.% }% -% \end{macrocode} -% \begin{privatecodecomments} -% \end{privatecodecomments} -% \begin{macrocode} \def\XINT_flsqrt #1.#2.% {% \expandafter\XINT_flsqrt_a \the\numexpr #2/\xint_c_ii-(#1-\xint_c_i)/\xint_c_ii.#1.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flsqrt_a #1.#2.#3#4.#5.% {% \expandafter\XINT_flsqrt_b @@ -36576,40 +37983,28 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\xintiiDivRound{\XINT_dsx_addzeros {#1}#3;}% {\XINT_dbl#2\xint_bye2345678\xint_bye*\xint_c_ii\relax}}.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flsqrt_c #1.#2.% {% \expandafter\XINT_flsqrt_d \romannumeral0\XINT_split_fromleft#2.#1\xint_bye2345678\xint_bye..% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flsqrt_d #1.#2#3.% {% \ifnum #2=\xint_c_v \expandafter\XINT_flsqrt_f\else\expandafter\XINT_flsqrt_finish\fi #2#3.#1.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flsqrt_finish #1#2.#3.#4.#5.#6.#7.#8{#8[#6]{#3#1[#7]}}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flsqrt_f 5#1.% {\expandafter\XINT_flsqrt_g\romannumeral0\xintinum{#1}\relax.}% \def\XINT_flsqrt_g #1#2#3.{\if\relax#2\xint_dothis{\XINT_flsqrt_h #1}\fi \xint_orthat{\XINT_flsqrt_finish 5.}}% \def\XINT_flsqrt_h #1{\ifnum #1<\xint_c_iii\xint_dothis{\XINT_flsqrt_again}\fi \xint_orthat{\XINT_flsqrt_finish 5.}}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flsqrt_again #1.#2.% {% \expandafter\XINT_flsqrt_again_a\the\numexpr #2+\xint_c_viii.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_flsqrt_again_a #1.#2.#3.% {% \expandafter\XINT_flsqrt_b @@ -36620,12 +38015,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintFloatE}, \csh{XINTinFloatE}} % \added{1.07} -% \lverb|The fraction is the first argument contrarily to \xintTrunc and -% \xintRound.| -% \lverb|& -% Attention to \XINTinFloatE: it is for use by xintexpr.sty. +%\begin{lverb} +% The fraction is the first argument contrarily to \xintTrunc and +% \xintRound. +%\end{lverb} +%\begin{lverb} +% Attention to \XINTinFloatE$empty: it is for use by $xintexprnameimp. % With input 0 it produces on output an 0[N], not 0[0]. -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatE {\romannumeral0\xintfloate }% \def\xintfloate #1{\XINT_floate_chkopt #1\xint:}% @@ -36659,8 +38056,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }%[ \def\XINT_floate_zero #1]#2.#3{ 0.e0}% \def\XINT_floate_neg-{\expandafter-\romannumeral0\XINT_floate_pos}% -% \end{macrocode} -% \begin{macrocode} \def\XINT_floate_pos #1#2[#3]#4.#5% {% \expandafter\XINT_float_pos_done\the\numexpr#3+#4+#5-\xint_c_i.#1.#2;% @@ -36674,7 +38069,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{XINTinFloatMod}} % \added{1.1} -% \lverb|Pour emploi dans xintexpr. Code shortened at 1.2p.| +%\begin{lverb} +% Pour emploi dans xintexpr. Code shortened at 1.2p. +%\end{lverb} % \begin{macrocode} \def\XINTinFloatMod {\romannumeral0\XINTinfloatmod [\XINTdigits]}% \def\XINTinfloatmod [#1]#2#3% @@ -36686,8 +38083,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{XINTinFloatDivFloor}} % \added{1.2p} -% \lverb|Formerly // and /: in \xintfloatexpr used \xintDivFloor and -% \xintMod, hence did not round their operands to float precision beforehand.| +%\begin{lverb} +% Formerly // and /: in \xintfloatexpr used \xintDivFloor and +% \xintMod, hence did not round their operands to float precision beforehand. +%\end{lverb} % \begin{macrocode} \def\XINTinFloatDivFloor {\romannumeral0\XINTinfloatdivfloor [\XINTdigits]}% \def\XINTinfloatdivfloor [#1]#2#3% @@ -36699,7 +38098,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{XINTinFloatDivMod}} % \added{1.2p} -% \lverb|Pour emploi dans xintexpr, donc je ne prends pas la peine de +%\begin{lverb} +% Pour emploi dans xintexpr, donc je ne prends pas la peine de % faire l'expansion du modulo, qui se produira dans le \csname. % % Hésitation sur le quotient, faut-il l'arrondir immédiatement ? @@ -36710,7 +38110,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % No time now at the time of completion of the big 1.4 rewrite of xintexpr % to test whether code efficiency here can be improved to expand the second -% item of output.| +% item of output. +%\end{lverb} % \begin{macrocode} \def\XINTinFloatDivMod {\romannumeral0\XINTinfloatdivmod [\XINTdigits]}% \def\XINTinfloatdivmod [#1]#2#3% @@ -36725,7 +38126,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintifFloatInt}} % \added{1.3a} -% \lverb|For ifint() function in \xintfloatexpr.| +%\begin{lverb} +% For ifint() function in \xintfloatexpr. +%\end{lverb} % \begin{macrocode} \def\xintifFloatInt {\romannumeral0\xintiffloatint}% \def\xintiffloatint #1{\expandafter\XINT_iffloatint @@ -36739,7 +38142,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintFloatIsInt}} % \added{1.3d} -% \lverb|For isint() function in \xintfloatexpr.| +%\begin{lverb} +% For isint() function in \xintfloatexpr. +%\end{lverb} % \begin{macrocode} \def\xintFloatIsInt {\romannumeral0\xintfloatisint}% \def\xintfloatisint #1{\expandafter\XINT_iffloatint @@ -36747,9 +38152,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{xintFloatIntType}} % \added{1.4e} -% \lverb|For fractional powers. Expands to \xint_c_mone if argument is not an +%\begin{lverb} +% For fractional powers. Expands to \xint_c_mone if argument is not an % integer, to \xint_c_ if it is an even integer and to \xint_c_i if it is an -% odd integer.| +% odd integer. +%\end{lverb} % \begin{macrocode} \def\xintFloatIntType {\romannumeral`&&@\xintfloatinttype}% \def\xintfloatinttype #1% @@ -36773,7 +38180,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{(WIP) \csh{XINTinRandomFloatS}, \csh{XINTinRandomFloatSdigits}} % \added{1.3b} -% \lverb|Support for random() function. +%\begin{lverb} +% Support for random() function. % % Thus as it is a priori only for xintexpr usage, it expands inside \csname % context, but as we need to get rid of initial zeros we use \xintRandomDigits @@ -36797,7 +38205,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % ends up with trailing zeros. That did not feel right but I checked random() % in Python (which of course uses radix 2), and indeed this is what happens % there. -% | +%\end{lverb} % \begin{macrocode} \def\XINTinRandomFloatS{\romannumeral0\XINTinrandomfloatS}% \def\XINTinRandomFloatSdigits{\XINTinRandomFloatS[\XINTdigits]}% @@ -36811,9 +38219,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\xintrandomdigits{#1}[-#1]% }% % \end{macrocode} -% \lverb|We add one macro to handle a tiny bit faster 90$% +%\begin{lverb} +% We add one macro to handle a tiny bit faster 90$% % of cases, after all -% we also use one extra macro for the completely improbable all 0 case.| +% we also use one extra macro for the completely improbable all 0 case. +%\end{lverb} % \begin{macrocode} \def\XINT_inrandomfloatS_a#1% {% @@ -36830,7 +38240,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{(WIP) \csh{XINTinRandomFloatSixteen}} % \added{1.3b} -% \lverb|Support for qrand() function.| +%\begin{lverb} +% Support for qrand() function. +%\end{lverb} % \begin{macrocode} \def\XINTinRandomFloatSixteen% {% @@ -36851,8 +38263,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% %\let<*xintseries>\gardesinactifs %</xintfrac>^^A--------------------------------------------------- %<*xintseries>^^A------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintseriesnameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xintseriesnameimp implementation} % \RaisedLabel{sec:seriesimp} % @@ -36884,7 +38297,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\let\expandafter\x\csname ver@xintseries.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintfrac.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintseries Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -36915,7 +38328,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xintseries}% - [2022/05/29 v1.4l Expandable partial sums with xint package (JFB)]% + [2022/06/10 v1.4m Expandable partial sums with xint package (JFB)]% % \end{macrocode} % \subsection{\csh{xintSeries}} % \begin{macrocode} @@ -36976,7 +38389,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintPowerSeries}} -% \lverb|& +%\begin{lverb} % The 1.03 version was very lame and created a build-up of denominators. % (this was at a time \xintAdd always multiplied denominators, by the way) % The Horner scheme for polynomial evaluation is used in 1.04, this @@ -36984,7 +38397,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % of the macro. % Modified in 1.06 to give the indices first to a \numexpr rather than expanding % twice. I just use \the\numexpr and maintain the previous code after that. -% 1.08a adds the forgotten optimization following that previous change.| +% 1.08a adds the forgotten optimization following that previous change. +%\end{lverb} % \begin{macrocode} \def\xintPowerSeries {\romannumeral0\xintpowerseries }% \def\xintpowerseries #1#2% @@ -37023,11 +38437,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintPowerSeriesX}} -% \lverb|& +%\begin{lverb} % Same as \xintPowerSeries except for the initial expansion of the x parameter. % Modified in 1.06 to give the indices first to a \numexpr rather than expanding % twice. I just use \the\numexpr and maintain the previous code after that. -% 1.08a adds the forgotten optimization following that previous change.| +% 1.08a adds the forgotten optimization following that previous change. +%\end{lverb} % \begin{macrocode} \def\xintPowerSeriesX {\romannumeral0\xintpowerseriesx }% \def\xintpowerseriesx #1#2% @@ -37052,7 +38467,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintRationalSeries}} -% \lverb|& +%\begin{lverb} % This computes F(a)+...+F(b) on the basis of the value of F(a) and the % ratios F(n)/F(n-1). As in \xintPowerSeries we use an iterative scheme which % has the great advantage to avoid denominator build-up. This makes exact @@ -37061,7 +38476,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % #1=a, #2=b, #3=F(a), #4=ratio function % Modified in 1.06 to give the indices first to a \numexpr rather than expanding % twice. I just use \the\numexpr and maintain the previous code after that. -% 1.08a adds the forgotten optimization following that previous change.| +% 1.08a adds the forgotten optimization following that previous change. +%\end{lverb} % \begin{macrocode} \def\xintRationalSeries {\romannumeral0\xintratseries }% \def\xintratseries #1#2% @@ -37099,7 +38515,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintRationalSeriesX}} -% \lverb|& +%\begin{lverb} % a,b,initial,ratiofunction,x$\ % This computes F(a,x)+...+F(b,x) on the basis of the value of F(a,x) and the % ratios F(n,x)/F(n-1,x). The argument x is first expanded and it is the value @@ -37107,7 +38523,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % must be defined as one-parameter macro which will be given x. % Modified in 1.06 to give the indices first to a \numexpr rather than expanding % twice. I just use \the\numexpr and maintain the previous code after that. -% 1.08a adds the forgotten optimization following that previous change.| +% 1.08a adds the forgotten optimization following that previous change. +%\end{lverb} % \begin{macrocode} \def\xintRationalSeriesX {\romannumeral0\xintratseriesx }% \def\xintratseriesx #1#2% @@ -37132,12 +38549,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintFxPtPowerSeries}} -% \lverb|& +%\begin{lverb} % I am not two happy with this piece of code. Will make it more economical % another day. % Modified in 1.06 to give the indices first to a \numexpr rather than expanding % twice. I just use \the\numexpr and maintain the previous code after that. -% 1.08a: forgot last time some optimization from the change to \numexpr.| +% 1.08a: forgot last time some optimization from the change to \numexpr. +%\end{lverb} % \begin{macrocode} \def\xintFxPtPowerSeries {\romannumeral0\xintfxptpowerseries }% \def\xintfxptpowerseries #1#2% @@ -37191,11 +38609,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintFxPtPowerSeriesX}} -% \lverb|& +%\begin{lverb} % a,b,coeff,x,D$\ % Modified in 1.06 to give the indices first to a \numexpr rather than expanding % twice. I just use \the\numexpr and maintain the previous code after that. -% 1.08a adds the forgotten optimization following that previous change.| +% 1.08a adds the forgotten optimization following that previous change. +%\end{lverb} % \begin{macrocode} \def\xintFxPtPowerSeriesX {\romannumeral0\xintfxptpowerseriesx }% \def\xintfxptpowerseriesx #1#2% @@ -37222,13 +38641,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintFloatPowerSeries}} -% \lverb|1.08a. I still have to re-visit \xintFxPtPowerSeries; temporarily I +%\begin{lverb} +% 1.08a. I still have to re-visit \xintFxPtPowerSeries; temporarily I % just adapted the code to the case of floats. % % Usage of new names % \XINTinfloatpow_wopt \XINTinfloatmul_wopt, \XINTinfloatadd_wopt to track % xintfrac.sty changes at 1.4e. -% | +%\end{lverb} % \begin{macrocode} \def\xintFloatPowerSeries {\romannumeral0\xintfloatpowerseries }% \def\xintfloatpowerseries #1{\XINT_flpowseries_chkopt #1\xint:}% @@ -37297,9 +38717,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintFloatPowerSeriesX}} -% \lverb|1.08a +%\begin{lverb} +% 1.08a % -% See \xintFloatPowerSeries for 1.4e comments.| +% See \xintFloatPowerSeries for 1.4e comments. +%\end{lverb} % \begin{macrocode} \def\xintFloatPowerSeriesX {\romannumeral0\xintfloatpowerseriesx }% \def\xintfloatpowerseriesx #1{\XINT_flpowseriesx_chkopt #1\xint:}% @@ -37348,8 +38770,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% %\let<*xintcfrac>\gardesinactifs %</xintseries>^^A------------------------------------------------- %<*xintcfrac>^^A-------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintcfracnameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xintcfracnameimp implementation} % \RaisedLabel{sec:cfracimp} % @@ -37390,7 +38813,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\let\expandafter\x\csname ver@xintcfrac.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintfrac.sty\endcsname \expandafter\ifx\csname numexpr\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintcfrac Warning:^^J% \space\space\space\space \numexpr not available, aborting input.^^J}% @@ -37421,7 +38844,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xintcfrac}% - [2022/05/29 v1.4l Expandable continued fractions with xint package (JFB)]% + [2022/06/10 v1.4m Expandable continued fractions with xint package (JFB)]% % \end{macrocode} % \subsection{\csh{xintCFrac}} % \begin{macrocode} @@ -37559,7 +38982,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_gcfrac_end_b #1\cfrac#2#3{ #3}% % \end{macrocode} % \subsection{\csh{xintGGCFrac}} -% \lverb|New with 1.09m| +%\begin{lverb} +% New with 1.09m +%\end{lverb} % \begin{macrocode} \def\xintGGCFrac {\romannumeral0\xintggcfrac }% \def\xintggcfrac #1{\XINT_ggcfrac_opt_a #1\xint:}% @@ -37633,7 +39058,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_gctgcx_end!\XINT_gctgcx_loop_b #1#2#3#4{ #1}% % \end{macrocode} % \subsection{\csh{xintFtoCs}} -% \lverb|Modified in 1.09m: a space is added after the inserted commas.| +%\begin{lverb} +% Modified in 1.09m: a space is added after the inserted commas. +%\end{lverb} % \begin{macrocode} \def\xintFtoCs {\romannumeral0\xintftocs }% \def\xintftocs #1% @@ -37712,10 +39139,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\xint_ftcx_loop_exit0\XINT_ftcx_loop_f #1.#2#3#4#5{ #4{#2}}% % \end{macrocode} % \subsection{\csh{xintFtoC}} -% \lverb|New in 1.09m: this is the same as \xintFtoCx with empty separator. I +%\begin{lverb} +% New in 1.09m: this is the same as \xintFtoCx with empty separator. I % had temporarily during preparation of 1.09m removed braces from \xintFtoCx, % but I recalled later why that was useful (see doc), thus let's just here do -% \xintFtoCx {}| +% \xintFtoCx {} +%\end{lverb} % \begin{macrocode} \def\xintFtoC {\romannumeral0\xintftoc }% \def\xintftoc {\xintftocx {}}% @@ -37726,9 +39155,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\xintftogc {\xintftocx {+1/}}% % \end{macrocode} % \subsection{\csh{xintFGtoC}} -% \lverb|New with 1.09m of 2014/02/26. Computes the common initial coefficients +%\begin{lverb} +% New with 1.09m of 2014/02/26. Computes the common initial coefficients % for the two fractions f and g, and outputs them as a sequence of braced -% items.| +% items. +%\end{lverb} % \begin{macrocode} \def\xintFGtoC {\romannumeral0\xintfgtoc}% \def\xintfgtoc#1% @@ -37851,10 +39282,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintCtoF}, \csh{xintCstoF}} -% \lverb|1.09m uses \xintCSVtoList on the argument of \xintCstoF to allow +%\begin{lverb} +% 1.09m uses \xintCSVtoList on the argument of \xintCstoF to allow % spaces also before the commas. And the original \xintCstoF code became the % one of the new \xintCtoF dealing with a braced rather than comma separated -% list.| +% list. +%\end{lverb} % \begin{macrocode} \def\xintCstoF {\romannumeral0\xintcstof }% \def\xintcstof #1% @@ -38046,10 +39479,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_igctf_end #1.#2#3#4#5{\xintrawwithzeros {#4/#5}}% 1.09b removes [0] % \end{macrocode} % \subsection{\csh{xintCtoCv}, \csh{xintCstoCv}} -% \lverb|1.09m uses \xintCSVtoList on the argument of \xintCstoCv to allow +%\begin{lverb} +% 1.09m uses \xintCSVtoList on the argument of \xintCstoCv to allow % spaces also before the commas. The original \xintCstoCv code became the % one of the new \xintCtoF dealing with a braced rather than comma separated -% list.| +% list. +%\end{lverb} % \begin{macrocode} \def\xintCstoCv {\romannumeral0\xintcstocv }% \def\xintcstocv #1% @@ -38272,7 +39707,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_igctcv_end_b #1#2{ #2{#1}}% 1.09b removes [0] % \end{macrocode} % \subsection{\csh{xintFtoCv}} -% \lverb|Still uses \xinticstocv \xintFtoCs rather than \xintctocv \xintFtoC.| +%\begin{lverb} +% Still uses \xinticstocv \xintFtoCs rather than \xintctocv \xintFtoC. +%\end{lverb} % \begin{macrocode} \def\xintFtoCv {\romannumeral0\xintftocv }% \def\xintftocv #1% @@ -38289,9 +39726,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintCntoF}} -% \lverb|& +%\begin{lverb} % Modified in 1.06 to give the N first to a \numexpr rather than expanding -% twice. I just use \the\numexpr and maintain the previous code after that.| +% twice. I just use \the\numexpr and maintain the previous code after that. +%\end{lverb} % \begin{macrocode} \def\xintCntoF {\romannumeral0\xintcntof }% \def\xintcntof #1% @@ -38328,9 +39766,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintGCntoF}} -% \lverb|Modified in 1.06 to give the N argument first to a \numexpr rather +%\begin{lverb} +% Modified in 1.06 to give the N argument first to a \numexpr rather % than expanding twice. I just use \the\numexpr and maintain the previous code -% after that.| +% after that. +%\end{lverb} % \begin{macrocode} \def\xintGCntoF {\romannumeral0\xintgcntof }% \def\xintgcntof #1% @@ -38367,11 +39807,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{xintCntoCs}} -% \lverb|Modified in 1.09m: added spaces after the commas in the produced list. +%\begin{lverb} +% Modified in 1.09m: added spaces after the commas in the produced list. % Moreover the coefficients are not braced anymore. A slight induced limitation % is that the macro argument should not contain some explicit comma (cf. % \XINT_cntcs_exit_b), hence \xintCntoCs {\macro,} with \def\macro,#1{<stuff>} -% would crash. Not a very serious limitation, I believe. | +% would crash. Not a very serious limitation, I believe. +%\end{lverb} % \begin{macrocode} \def\xintCntoCs {\romannumeral0\xintcntocs }% \def\xintcntocs #1% @@ -38404,14 +39846,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_cntcs_exit_b #1,{}% romannumeral stopping space already there % \end{macrocode} % \subsection{\csh{xintCntoGC}} -% \lverb|& +%\begin{lverb} % Modified in 1.06 to give the N first to a \numexpr rather than expanding % twice. I just use \the\numexpr and maintain the previous code after that. % % 1.09m maintains the braces, as the coeff are allowed to be fraction and the % slash can not be naked in the GC format, contrarily to what happens in % \xintCntoCs. Also the separators given to \xintGCtoGCx may then fetch the -% coefficients as argument, as they are braced.| +% coefficients as argument, as they are braced. +%\end{lverb} % \begin{macrocode} \def\xintCntoGC {\romannumeral0\xintcntogc }% \def\xintcntogc #1% @@ -38444,9 +39887,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_cntgc_exit_b #1+1/{ }% % \end{macrocode} % \subsection{\csh{xintGCntoGC}} -% \lverb|& +%\begin{lverb} % Modified in 1.06 to give the N first to a \numexpr rather than expanding -% twice. I just use \the\numexpr and maintain the previous code after that.| +% twice. I just use \the\numexpr and maintain the previous code after that. +%\end{lverb} % \begin{macrocode} \def\xintGCntoGC {\romannumeral0\xintgcntogc }% \def\xintgcntogc #1% @@ -38535,14 +39979,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% %\let<*xintexpr>\gardesinactifs %</xintcfrac>^^A-------------------------------------------------- %<*xintexpr>^^A--------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); ; fill-paragraph-function: nil; -*- % \clearpage\csname xintexprnameUp\endcsname +% \let\MakePrivateLetters\xintexprMakePrivateLetters % \section{Package \xintexprnameimp implementation} % \RaisedLabel{sec:exprimp} % \etocarticlestylenomarks % \etocstandardlines -% \etocsetnexttocdepth {subsubsection} -% +% \etocsettocdepth {paragraph} % % This is release \expandafter|\xintbndlversion| of % \expandafter|\xintbndldate|. @@ -38553,9 +39997,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % \subsection{READ ME! Important warnings and explanations relative to the % status of the code source at the time of the 1.4 release} -% \def\mybeginitemize{\begin{itemize}\catcode`\% 9 }% -% \def\myenditemize{\end{itemize}} -% \lverb|& +% \def\mybeginitemize{\begin{itemize}\catcode`\% 9 }^^A +% \def\myenditemize{\end{itemize}}^^A +%\begin{lverb} % At release 1.4 the csname encapsulation of intermediate evaluations during % parsing of expressions is dropped, and $xintexprnameimp requires the % \expanded primitive. This means that there is no more impact on the string @@ -38612,8 +40056,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % \xintthe\xintexpr <expression>\relax or \xinteval{<expression>} serve as % formerly to deliver the explicit digits, or more exactly some prettifying -% view of the actual <internal number representation>. For example -% \xintthe\xintboolexpr will (this is tentative) use True and False in output. +% view of the actual <internal number representation>. % % Nested contents like this % @@ -38639,7 +40082,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % regarding functions with multiple arguments, and the 1.4 «unpacking» % Python-like * prefix operator. % -% | +%\end{lverb} % % \begin{framed} % I have suppressed (from the public dtx) many big chunks of @@ -38660,7 +40103,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{framed} % % -% \lverb|Warning: in text below and also in left-over old comments I may refer +%\begin{lverb} +% Warning: in text below and also in left-over old comments I may refer % to «until» and «op» macros; due to the change of data storage at 1.4, I % needed to refactor a bit the way expansion is controlled, and the situation % now is mainly governed by «op», «exec», «check-» and «checkp» macros the @@ -38687,7 +40131,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % that advanced features crucially exploit injecting sub-\xintexpr-essions, as % all is expandable there is no real «context» (only a minimal one) which one % would have to perhaps store and restore and doing this sub-expression -% injection is rather cheap and efficient operation.| +% injection is rather cheap and efficient operation. +%\end{lverb} % % \subsection{Old comments} % @@ -38766,7 +40211,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\let\expandafter\t\csname ver@xinttools.sty\endcsname % I don't think engine exists providing \expanded but not \numexpr \expandafter\ifx\csname expanded\endcsname\relax - \expandafter\ifx\csname PackageWarning\endcsname\relax + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax \immediate\write128{^^JPackage xintexpr Warning:^^J% \space\space\space\space \expanded not available, aborting input.^^J}% @@ -38775,8 +40220,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi \def\z{\endgroup\endinput}% \else - \ifx\x\relax % plain-TeX, first loading of xintexpr.sty - \ifx\w\relax % but xintfrac.sty not yet loaded. + \ifx\x\relax % plain-TeX (possibly with miniltx!), first loading of xintexpr.sty + \ifx\w\relax % but xintfrac.sty not yet loaded (made miniltx robust 2022/06/09) \expandafter\def\expandafter\z\expandafter {\z\input xintfrac.sty\relax}% \fi @@ -38804,25 +40249,26 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINTsetupcatcodes% % \end{macrocode} % \subsection{Package identification} -% \lverb|& +%\begin{lverb} % \XINT_Cmp alias for \xintiiCmp needed for some forgotten reason related to % \xintNewExpr (FIX THIS!) % -% | +%\end{lverb} % \begin{macrocode} \XINT_providespackage \ProvidesPackage{xintexpr}% - [2022/05/29 v1.4l Expandable expression parser (JFB)]% + [2022/06/10 v1.4m Expandable expression parser (JFB)]% \catcode`! 11 \let\XINT_Cmp \xintiiCmp \def\XINTfstop{\noexpand\XINTfstop}% % \end{macrocode} % \subsection{\csh{xintDigits*}, \csh{xintSetDigits*}, \csh{xintreloadscilibs}} -% \lverb|1.3f. 1.4e added some \xintGuardDigits and \XINTdigitsx mechanism but +%\begin{lverb} +% 1.3f. 1.4e added some \xintGuardDigits and \XINTdigitsx mechanism but % it was finally removed, due to pending issues of user interface, % functionality, and documentation (the worst part) for whose resolution % no time was left. -%| +%\end{lverb} % \begin{macrocode} \def\xintreloadscilibs{\xintreloadxintlog\xintreloadxinttrig}% \def\xintDigits {\futurelet\XINT_token\xintDigits_i}% @@ -38843,14 +40289,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsection{\csh{XINTdigitsormax}} -% \lverb|1.4f. To not let xintlog and xinttrig work with, and produce, +%\begin{lverb} +% 1.4f. To not let xintlog and xinttrig work with, and produce, % long mantissas exceeeding the supported range for accuracy of the math % functions. The official maximal value is 62, let's set the cut-off at 64. % % A priori, no need for \expandafter, always ends up expanded in \numexpr (I % saw also in an \edef in xinttrig as argument to \xintReplicate prior % to its \numexpr). -%| +%\end{lverb} % \begin{macrocode} \def\XINTdigitsormax{\ifnum\XINTdigits>\xint_c_ii^vi\xint_c_ii^vi\else\XINTdigits\fi}% % \end{macrocode} @@ -38861,14 +40308,18 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsubsection{Bracketed list rendering with prettifying of leaves from nested % braced contents} % \added{1.4} -% \lverb|The braces in \XINT:expr:toblistwith are there because there is -% an \expanded trigger.| +% The braces in |\XINT:expr:toblistwith| are there because there is +% an |\expanded| trigger. % \changed{1.4d} -% \lverb|Add support for the polexpr 0.8 polynomial type. See \XINT:expr:toblist_a| +%\begin{lverb} +% Add support for the polexpr 0.8 polynomial type. See \XINT:expr:toblist_a. +%\end{lverb} % \changed{1.4l} -% \lverb|Let \XINT:expr:toblist_b use #1{#2} with regular { and } in case +%\begin{lverb} +% Let \XINT:expr:toblist_b use #1{#2} with regular { and } in case % macro #1 is \protected and things are output to external file where former -% #1<#2> would end up with catcode 12 < and >.| +% #1<#2> would end up with catcode 12 < and >. +%\end{lverb} % \begin{macrocode} \def\XINT:expr:toblistwith#1#2% {% @@ -38907,7 +40358,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{Flattening nested % braced contents} -% \lverb|1.4b I hesitated whether using this technique or some variation of +%\begin{lverb} +% 1.4b I hesitated whether using this technique or some variation of % the method of the ListSel macros. I chose this one which I downscaled from % toblistwith, I will revisit later. I only have a few minutes right now. % @@ -38915,7 +40367,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % See \XINT_expr_func_flat. I hesitated with «flattened», but short names % are faster parsed. -% | +%\end{lverb} % \begin{macrocode} \def\XINT:expr:flatten#1% {% @@ -38926,7 +40378,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \if ^#1\expandafter\xint_gobble_i\else\expandafter\XINT:expr:flatten_a\fi #1% }% -\begingroup % should I check lccode s generally if corrupted context at load? +\begingroup \catcode`[ 1 \catcode`] 2 \lccode`[`{ \lccode`]`} \catcode`< 1 \catcode`> 2 \catcode`{ 12 \catcode`} 12 \lowercase<\endgroup @@ -38948,7 +40400,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% >% back to normal catcodes % \end{macrocode} % \subsubsection{Braced contents rendering via a \TeX{} alignment with prettifying of leaves} -% \lverb|1.4. +%\begin{lverb} +% 1.4. % % Breaking change at 1.4a as helper macros were renamed and their meanings % refactored: no more \xintexpraligntab nor \xintexpraligninnercomma or @@ -38956,8 +40409,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % At 1.4c I remove the \protected from \xintexpralignend. I had made note a % year ago that it served nothing. Let's trust myself on this one (risky one -% year later!) -% .| +% year later!). +%\end{lverb} % \begin{macrocode} \catcode`& 4 \protected\def\xintexpralignbegin {\halign\bgroup\tabskip2ex\hfil##&&##\hfil\cr}% @@ -39012,7 +40465,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsubsection{Transforming all leaves within nested % braced contents} % -% \lverb|1.4. Leaves must be of catcode 12... This is currently not a +%\begin{lverb} +% 1.4. Leaves must be of catcode 12... This is currently not a % constraint (or rather not a new constraint) for xintexpr because formerly % anyhow all data went through csname encapsulation and extraction via string. % @@ -39022,7 +40476,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % with an xintfrac macro such as \xintiRound{0} one needs first to define % a wrapper which will expand it inside an added brace pair: % -% \def\foo#1{{\xintiRound{0}{#1}}}% +% \def\foo#1{{\xintiRound{0}{#1}}} % % As the things will expand inside expanded, propagating expansion is not an % issue. @@ -39034,7 +40488,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % I should modify \XINT:expr:mapwithin_b like I did with \XINT:expr:toblist_b % to use regular braces in case the applied macro is \protected and % things end up in external file. -% | +%\end{lverb} % % \begin{macrocode} \def\XINT:expr:mapwithin#1#2% @@ -39073,7 +40527,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \localtableofcontents % \subsubsection{\csh{xintexpr}, \csh{xintiexpr}, \csh{xintfloatexpr}, % \csh{xintiiexpr}} -% \lverb|& +%\begin{lverb} % % \xintiexpr and \xintfloatexpr have an optional argument since 1.1. % @@ -39096,7 +40550,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % post-fix so it can not be inserted as sub-expression in \xintiiexpr without % a num() or \xintiexpr ...\relax (extra) wrapper. % -% | +%\end{lverb} % \begin{macrocode} \def\xintexpr {\romannumeral0\xintexpro }% \def\xintiexpr {\romannumeral0\xintiexpro }% @@ -39137,7 +40591,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expanded \XINT:NEhook:x:mapwithin\XINT:expr:mapwithin{\XINTiRound_braced{#1}}% }% -\def\XINTiRound_braced#1#2{{\xintiRound{#1}{#2}[\the\numexpr\ifnum#1<\xint_c_i0\else-#1\fi]}}% +\def\XINTiRound_braced#1#2% + {{\xintiRound{#1}{#2}[\the\numexpr\ifnum#1<\xint_c_i0\else-#1\fi]}}% \def\xintfloatexpro #1% {% \ifx [#1\expandafter\XINT_flexpr_withopt\else\expandafter\XINT_flexpr_noopt @@ -39168,13 +40623,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINTinFloat_braced[#1]#2{{\XINTinFloat[#1]{#2}}}% % \end{macrocode} % \subsubsection{\csh{XINT_expr_wrap}, \csh{XINT_iiexpr_wrap}, \csh{XINT_flexpr_wrap}} -% \lverb|1.3e removes some leading space tokens which served nothing. There is +%\begin{lverb} +% 1.3e removes some leading space tokens which served nothing. There is % no \XINT_iexpr_wrap, because \XINT_expr_wrap is used directly. % % 1.4e has \XINT_iexpr_wrap separated from \XINT_expr_wrap, thus simplifying % internal matters as output printer for \xintexpr will not have to handle % fixed point input but only extended-raw type input (i.e. A, A/B, A[N] or A/B[N]). -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_wrap {\XINTfstop\XINTexprprint.}% \def\XINT_iexpr_wrap {\XINTfstop\XINTiexprprint.}% @@ -39182,26 +40638,32 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_flexpr_wrap {\XINTfstop\XINTflexprprint}% % \end{macrocode} % \subsubsection{\csh{XINTexprprint}, \csh{XINTiexprprint}, \csh{XINTiiexprprint}, \csh{XINTflexprprint}} -% \lverb| -% -% Comments (still) currently under reconstruction. +% \label{\xintimplabelprefix xintexprPrintOne} +% \label{\xintimplabelprefix xintiexprPrintOne} +% \label{\xintimplabelprefix xintfloatexprPrintOne} +% \label{\xintimplabelprefix xintiiexprprintone} % -% 1.4: this now requires \expanded context. +% \changed{1.4} +% Requires |\expanded|. % -% 1.4e has a separate \XINTiexprprint and \xintiexprPrintOne. % +% \changed{1.4e} +%\begin{lverb} % 1.4e has a breaking change of \XINTflexprprint and \xintfloatexprPrintOne -% which now requires \xintfloatexprPrintOne[D]{x} usage, with first argument +% which now requires \xintfloatexprPrintOne[D]{x} syntax, with first argument % in brackets. % -% -% 1.4k has moved definition of \xintFracToSci to this macro file, so must -% delay \let\xintexprPrintOne\xintFracToSci to after it has been defined. -% | +%\end{lverb} +% \changed{1.4l} +% The code does |\let\xintexprPrintOne\xint_FracToSci_x| but the latter is not yet +% defined so this is delayed until |\xint_FracToSci_x| definition. +% \changed[2022/06/05]{1.4m} +% \csa{xintboolexprPrintOne} outputs |true| or |false|, not |True| or |False|. +% By the way (undocumented) all four keywords |true|, |false|, |True|, +% |False| are recognized as genuine variables since |1.4i|. % \begin{macrocode} \protected\def\XINTexprprint.% {\XINT:NEhook:x:toblist\XINT:expr:toblistwith\xintexprPrintOne}% -% \let\xintexprPrintOne\xintFracToSci \protected\def\XINTiexprprint.% {\XINT:NEhook:x:toblist\XINT:expr:toblistwith\xintiexprPrintOne}% \let\xintiexprPrintOne\xintDecToString @@ -39214,11 +40676,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \let\xintfloatexprPrintOne\xintPFloat_wopt \protected\def\XINTboolexprprint.% {\XINT:NEhook:x:toblist\XINT:expr:toblistwith\xintboolexprPrintOne}% -\def\xintboolexprPrintOne#1{\xintiiifNotZero{#1}{True}{False}}% +\def\xintboolexprPrintOne#1{\xintiiifNotZero{#1}{true}{false}}% % \end{macrocode} % \subsubsection{\csh{xintthe}, \csh{xintthealign}, \csh{xinttheexpr}, \csh{xinttheiexpr}, \csh{xintthefloatexpr}, % \csh{xinttheiiexpr}} -% \lverb|The reason why \xinttheiexpr et \xintthefloatexpr are handled +%\begin{lverb} +% The reason why \xinttheiexpr et \xintthefloatexpr are handled % differently is that they admit an optional argument which acts via a custom % «printing» stage. % @@ -39246,7 +40709,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % The \expanded upfront ensures \xintthe mechanism does expand % completely in two steps. -% | +%\end{lverb} % \begin{macrocode} \def\xintthe #1{\expanded\expandafter\xint_gobble_i\romannumeral`&&@#1}% \def\xintthealign #1{\expandafter\xintexpralignbegin @@ -39263,21 +40726,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\xinttheiiexpr {\expanded\expandafter\XINTiiexprprint\expandafter.\romannumeral0\xintbareiieval}% % \end{macrocode} -% \subsubsection{\csh{thexintexpr}, \csh{thexintiexpr}, \csh{thexintfloatexpr}, -% \csh{thexintiiexpr}} -% \lverb|New with 1.2h. I have been for the last three years very strict -% regarding macros with \xint or \XINT, but well. -% -% 1.4. Definitely I don't like those. I will remove them at 1.5.| -% \begin{macrocode} -\let\thexintexpr \xinttheexpr -\let\thexintiexpr \xinttheiexpr -\let\thexintfloatexpr\xintthefloatexpr -\let\thexintiiexpr \xinttheiiexpr -% \end{macrocode} % \subsubsection{\csh{xintbareeval}, \csh{xintbarefloateval}, \csh{xintbareiieval}} -% \lverb|At 1.4 added one expansion step via _start macros. Triggering is expected to be -% via either \romannumeral`^^@ or \romannumeral0 is also ok| +%\begin{lverb} +% At 1.4 added one expansion step via _start macros. Triggering is expected to be +% via either \romannumeral`^^@ or \romannumeral0 is also ok +%\end{lverb} % \begin{macrocode} \def\xintbareeval {\XINT_expr_start }% \def\xintbarefloateval{\XINT_flexpr_start}% @@ -39285,13 +40738,17 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\csh{xintthebareeval}, \csh{xintthebarefloateval}, % \csh{xintthebareiieval}} -% \lverb|For matters of \XINT_NewFunc -% | +%\begin{lverb} +% For matters of \XINT_NewFunc +%\end{lverb} % \begin{macrocode} \def\XINT_expr_unlock {\expandafter\xint_firstofone\romannumeral`&&@}% -\def\xintthebareeval {\romannumeral0\expandafter\xint_stop_atfirstofone\romannumeral0\xintbareeval}% -\def\xintthebareiieval {\romannumeral0\expandafter\xint_stop_atfirstofone\romannumeral0\xintbareiieval}% -\def\xintthebarefloateval {\romannumeral0\expandafter\xint_stop_atfirstofone\romannumeral0\xintbarefloateval}% +\def\xintthebareeval + {\romannumeral0\expandafter\xint_stop_atfirstofone\romannumeral0\xintbareeval}% +\def\xintthebareiieval + {\romannumeral0\expandafter\xint_stop_atfirstofone\romannumeral0\xintbareiieval}% +\def\xintthebarefloateval + {\romannumeral0\expandafter\xint_stop_atfirstofone\romannumeral0\xintbarefloateval}% \def\xintthebareroundedfloateval {% \romannumeral0\expandafter\xintthebareroundedfloateval_a\romannumeral0\xintbarefloateval @@ -39305,7 +40762,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\csh{xinteval}, \csh{xintieval}, \csh{xintfloateval}, % \csh{xintiieval}} -% \lverb|Refactored at 1.4. +%\begin{lverb} +% Refactored at 1.4. % % The \expanded upfront ensures \xinteval still expands % completely in two steps. No \romannumeral trigger here, in relation to the @@ -39313,13 +40771,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % (and attention that \xintexpr\relax is now legal, and an empty ople can be % produced in output also from \xintexpr [17][1]\relax for example) -% | +%\end{lverb} % \changed[2022/05/16]{1.4k} -% \lverb|The \xintieval and \xintfloateval optional bracketed argument can now +%\begin{lverb} +% The \xintieval and \xintfloateval optional bracketed argument can now % be located outside the braces... took me years to finally make the step toward LaTeX -% users expectations for a decent interface.| +% users expectations for a decent interface. +%\end{lverb} % \begin{macrocode} -\let\xint_relax\relax \def\xinteval #1% {\expanded\expandafter\XINTexprprint\expandafter.\romannumeral0\xintbareeval#1\relax}% \def\xintieval @@ -39348,14 +40807,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\xint_floateval#1% {\expandafter\xint_gobble_i\romannumeral`&&@\xintfloatexpr#1\relax}% \def\xintiieval #1% - {\expanded\expandafter\XINTiiexprprint\expandafter.\romannumeral0\xintbareiieval#1\relax}% + {\expanded\expandafter\XINTiiexprprint + \expandafter.\romannumeral0\xintbareiieval#1\relax}% % \end{macrocode} -% \subsubsection{\csh{xintboolexpr}, \csh{XINT_boolexpr_print}, \csh{xinttheboolexpr}, -% \csh{thexintboolexpr}} -% \lverb|ATTENTION! 1.3d renamed \xinteval to \xintexpro etc... +% \subsubsection{\csh{xintboolexpr}, \csh{XINT_boolexpr_print}, \csh{xinttheboolexpr}} +%\begin{lverb} +% ATTENTION! 1.3d renamed \xinteval to \xintexpro etc... % % Attention, the conversion to 1 or 0 is done only by the print macro. -% Perhaps I should force it also inside raw result.| +% Perhaps I should force it also inside raw result. +%\end{lverb} % \begin{macrocode} \def\xintboolexpr {% @@ -39366,10 +40827,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \expanded\expandafter\XINTboolexprprint\expandafter.\romannumeral0\xintbareeval }% -\let\thexintboolexpr\xinttheboolexpr % \end{macrocode} % \subsubsection{\csh{xintifboolexpr}, \csh{xintifboolfloatexpr}, \csh{xintifbooliiexpr}} -% \lverb|They do not accept comma separated expressions input.| +%\begin{lverb} +% They do not accept comma separated expressions input. +%\end{lverb} % \begin{macrocode} \def\xintifboolexpr #1{\romannumeral0\xintiiifnotzero {\xinttheexpr #1\relax}}% \def\xintifboolfloatexpr #1{\romannumeral0\xintiiifnotzero {\xintthefloatexpr #1\relax}}% @@ -39377,7 +40839,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\csh{xintifsgnexpr}, \csh{xintifsgnfloatexpr}, \csh{xintifsgniiexpr}} % \changed{1.3d} -% \lverb|They do not accept comma separated expressions.| +%\begin{lverb} +% They do not accept comma separated expressions. +%\end{lverb} % \begin{macrocode} \def\xintifsgnexpr #1{\romannumeral0\xintiiifsgn {\xinttheexpr #1\relax}}% \def\xintifsgnfloatexpr #1{\romannumeral0\xintiiifsgn {\xintthefloatexpr #1\relax}}% @@ -39387,12 +40851,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \added{1.4} % Under the name of |\xintFracToSci| and defined in \xintfracnameimp. % \changed{1.4e} -% \lverb|Refactored and much simplified +%\begin{lverb} +% Refactored and much simplified % % It only needs to be x-expandable, and indeed the implementation here is only % x-expandable. -% | -% \lverb|& +%\end{lverb} +%\begin{lverb} % % Finally for 1.4e release I modify. This is breaking change for all % \xinteval output in case of scientific notation: it will not be with an @@ -39419,11 +40884,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% %: The zero gives 0, except in A[N] and A/B[N] cases, it may give& % 0.0 %) -% | +%\end{lverb} % \changed{1.4k} % Moved from \xintfracnameimp to \xintexprnameimp. % \changed{1.4l} -% \lverb|& +%\begin{lverb} % Renamed to \xint_FracToSci_x to make it private and provide in % $xintfracnameimp another \xintFracToSci with same output but which behaves % like other macros there: f-expandable and accepting the whole range of @@ -39431,7 +40896,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % The private x-expandable macro here will have an empty output for an empty % input but is never used for an empty input (see \xintexprEmptyItem). -% | +%\end{lverb} % \begin{macrocode} \def\xint_FracToSci_x #1{\expandafter\XINT_FracToSci_x\romannumeral`&&@#1/\W[\R}% \def\XINT_FracToSci_x #1/#2#3[#4% @@ -39467,7 +40932,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \let\xintexprPrintOne\xint_FracToSci_x % \end{macrocode} % \subsubsection{Small bits we have to put somewhere} -% \lverb|& +%\begin{lverb} % Some renaming and modifications here with release 1.2 to switch from % using chains of \romannumeral-`0 in order to gather numbers, possibly % hexadecimals, to using a \csname governed expansion. In this way no more @@ -39491,7 +40956,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % fractional part), and in a second stage to apply \xintHexToDec to do the % actual conversion. This should be faster than updating on the fly the number % (which would be hard for the fraction part...). -% | +%\end{lverb} % \begin{macrocode} \def\XINT_embrace#1{{#1}}% \def\xint_gob_til_! #1!{}% ! with catcode 11 @@ -39501,7 +40966,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \paragraph{\csh{xintthecoords}} -% \lverb|1.1 Wraps up an even number of comma separated items into pairs of +%\begin{lverb} +% 1.1 Wraps up an even number of comma separated items into pairs of % TikZ coordinates; for use in the following way: % % coordinates {\xintthecoords\xintfloatexpr ... \relax} @@ -39514,7 +40980,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Not to be used as \xintthecoords\xintthefloatexpr, only as % \xintthecoords\xintfloatexpr (or \xintiexpr etc...). Perhaps \xintthecoords % could make an extra check, but one should not accustom users to too loose -% requirements!| +% requirements! +%\end{lverb} % \begin{macrocode} \def\xintthecoords#1% {\romannumeral`&&@\expandafter\XINT_thecoords_a\romannumeral0#1}% @@ -39525,8 +40992,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_thecoords_c #1^{}% % \end{macrocode} % \paragraph{\csh{xintthespaceseparated}} -% \lverb|1.4a This is a utility macro which was distributed previously -% separately for usage with PSTricks \listplot| +%\begin{lverb} +% 1.4a This is a utility macro which was distributed previously +% separately for usage with PSTricks \listplot +%\end{lverb} % \begin{macrocode} \def\xintthespaceseparated#1% {\expanded\expandafter\xintthespaceseparated_a\romannumeral0#1}% @@ -39537,7 +41006,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #1#2#3#4#5#6#7#8#9% \xintthespaceseparated_b}% % \end{macrocode} -% \lverb|1.4c I add a space here to stop the \romannumeral`$&$&@ in case of +%\begin{lverb} +% 1.4c I add a space here to stop the \romannumeral`$&$&@ in case of % empty input. % But this space induces an extra un-needed space token after 9, 18, 27,... % items before the last group of less than 9 items. @@ -39551,15 +41021,17 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % systematic trailing space, at least it is more aesthetic). % % Again, I did have a test file, but it was not incorporated in my test suite, -% so I discovered the problem accidentally by compiling all files in an archive.| +% so I discovered the problem accidentally by compiling all files in an archive. +%\end{lverb} % \begin{macrocode} \def\xintthespaceseparated_c !#1!#2^{#1}% % \end{macrocode} % \subsection{Hooks into the numeric parser for usage by the % \cshnolabel{xintdeffunc} symbolic parser} -% \lverb|This is new with 1.3 and considerably refactored at 1.4. See +%\begin{lverb} +% This is new with 1.3 and considerably refactored at 1.4. See % «Mysterious stuff». -% | +%\end{lverb} % \begin{macrocode} \let\XINT:NEhook:f:one:from:one\expandafter \let\XINT:NEhook:f:one:from:one:direct\empty @@ -39573,12 +41045,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \let\XINT:NEhook:x:listsel\empty \let\XINT:NEhook:f:reverse\empty % \end{macrocode} -% \lverb|At 1.4 it was \def\XINT:NEhook:f:from:delim:u #1#2^{#1#2^} +%\begin{lverb} +% At 1.4 it was \def\XINT:NEhook:f:from:delim:u #1#2^{#1#2^} % which was trick to allow automatic unpacking of a nutple argument % to multi-arguments functions such as gcd() or max(). But this -% sacrificied the usage with a single numeric argument.| +% sacrificied the usage with a single numeric argument. +%\end{lverb} % \changed{1.4i} -% \lverb|More sophisticated code to check if the argument ople +%\begin{lverb} +% More sophisticated code to check if the argument ople % was actually a single number. Notice that this forces numeric % types to actually use catcode 12 tokens, and polexpr diverges % a bit using P, but actually always testing with \if not \ifx. @@ -39589,7 +41064,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % The nil and None will give the same result due to the initial brace % stripping done by \XINT:NEhook:f:from:delim:u (there was even a prior brace % stripping to provide the #2 which is empty here for the nil and {} for the -% None). | +% None). +%\end{lverb} % \begin{macrocode} \def\XINT:NEhook:f:from:delim:u #1#2^% {% @@ -39606,7 +41082,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_fooof_no{\expandafter{\iffalse}\fi}% % \end{macrocode} % \changed{1.4i} -% \lverb|Same changes as for the other multiple arguments functions, +%\begin{lverb} +% Same changes as for the other multiple arguments functions, % making them again usable with a single numeric input. % % Was at 1.4 \def\XINT:NEhook:f:noeval:from:braced:u#1#2^{#1{#2}} which @@ -39619,7 +41096,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % The None is here handled as nil, i.e. it is unpacked, which is fine % as the documentations says nutples are unpacked. % -%| +%\end{lverb} % \begin{macrocode} \def\XINT:NEhook:f:LFL #1{\expandafter#1\expandafter}% \def\XINT:NEhook:r:check #1^% @@ -39654,7 +41131,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsection{\csh{XINT_expr_getnext}: fetch some value then an operator and % present them to last waiter with the found operator precedence, then % the operator, then the value} -% \lverb|Big change in 1.1, no attempt to detect braced stuff anymore as the +%\begin{lverb} +% Big change in 1.1, no attempt to detect braced stuff anymore as the % [N] notation is implemented otherwise. Now, braces should not be used at % all; one level removed, then \romannumeral-`0 expansion. % @@ -39697,7 +41175,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % handling), and then there is the overhead of possibly moving around many % digits in the #1 of \XINT_expr_put_op_first. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_getnext #1% {% @@ -39718,11 +41196,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expanded{\unexpanded{{#2}}\expandafter}\romannumeral`&&@\XINT_expr_getop }% % \end{macrocode} -% \lverb|1.2 adds \ht, \dp, \wd and the eTeX font things. 1.4 avoids big +%\begin{lverb} +% 1.2 adds \ht, \dp, \wd and the eTeX font things. 1.4 avoids big % nested \if's, simply for code readability. % % This "fetch as number" is dangerous as long as list is not complete... at -% 1.4g I belatedly add \catcode| +% 1.4g I belatedly add \catcode +%\end{lverb} % \begin{macrocode} \def\XINT_expr_countetc\XINT_expr_getnextfork#1% {% @@ -39750,7 +41230,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expanded{{{\number#1}}\expandafter}\romannumeral`&&@\XINT_expr_getop }% % \end{macrocode} -% \lverb|This is the key initial dispatch component. It has been refactored at +%\begin{lverb} +% This is the key initial dispatch component. It has been refactored at % 1.4g to give priority to identifying letter and digit tokens first. It % thus combines former \XINT_expr_getnextfork, \XINT_expr_scan_nbr_or_func and % \XINT_expr_scanfunc. A branch of the latter having become @@ -39824,7 +41305,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % others. Anyway. This is all negligible compared to actual computations... % % Note: the above may not be in sync with code as it is extremely -% time-consuming to maintain correspondence in case of re-factoring. | +% time-consuming to maintain correspondence in case of re-factoring. +%\end{lverb} +%\odef\MakePrivateLetters{\MakePrivateLetters\catcode`` 11 }^^A % \begin{macrocode} \def\XINT_expr_getnextfork #1% {% @@ -39862,7 +41345,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% }\expandafter\XINT_tmpa\string#% % \end{macrocode} -% \lverb@ +%\begin{lverb} % The ` syntax is here used for special constructs like `+`(..), `*`(..) where % + or * will be treated as functions. Current implementation picks only one % token (could have been braced stuff), here it will be + or *, and via @@ -39870,14 +41353,17 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \XINT_{expr|iiexpr|flexpr}_func_+ (or *). Documentation says to use % `+`(...), but `+(...) is also valid. The opening parenthesis must be there, % it is not allowed to require some expansion. -% @ +%\end{lverb} % \begin{macrocode} \def\XINT_expr_onliteral_` #1#2({{#1}\xint_c_ii^v `}% \catcode96 12 % ` % \end{macrocode} -% \lverb@ Prior to 1.4g, I was using a \lowercase technique to insert the +% \let\MakePrivateLetters\xintexprMakePrivateLetters +%\begin{lverb} +% Prior to 1.4g, I was using a \lowercase technique to insert the % catcode 12 #, but this is a bit risky when one does not ensure a priori control of all -% lccodes. @ +% lccodes. +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa #1{% \def\XINT_expr_getmacropar ##1% @@ -39892,13 +41378,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_expr_missing_arg#1% {% - \expanded{\XINT_expandableerror{Expected a value, got nothing before `#1'. Inserting 0.}{{0}}\expandafter}% + \expanded{\XINT_expandableerror + {Expected a value, got nothing before `#1'. Inserting 0.}{{0}}\expandafter}% \romannumeral`&&@\XINT_expr_getop_a#1% }% % \end{macrocode} % \subsection{\csh{XINT_expr_startint}} % \localtableofcontents -% \lverb@1.2 release has replaced chains of \romannumeral-`0 by \csname +%\begin{lverb} +% 1.2 release has replaced chains of \romannumeral-`0 by \csname % governed expansion. Thus there is no more the limit at about 5000 digits for % parsed numbers. % @@ -39934,7 +41422,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % 1.4. % % We assume anyhow that catcodes of digits are 12... -% @ +%\end{lverb} % \begin{macrocode} \def\XINT_expr_startint #1% {% @@ -39951,12 +41439,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_expr_scandec_a\romannumeral`&&@#1}% % \end{macrocode} % \subsubsection{Integral part (skipping zeroes)} -% \lverb|1.2 has modified the code to give highest priority to digits, the +%\begin{lverb} +% 1.2 has modified the code to give highest priority to digits, the % accelerating impact is non-negligeable. I don't think the doubled \string is % a serious penalty. % % (reference to \string is obsolete: it is only used in the test but the -% tokens are not submitted to \string anymore)| +% tokens are not submitted to \string anymore) +%\end{lverb} % \begin{macrocode} \def\XINT_expr_scanint_main #1% {% @@ -39976,7 +41466,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#2% }% % \end{macrocode} -% \lverb|With 1.2d the tacit multiplication in front of a variable name or +%\begin{lverb} +% With 1.2d the tacit multiplication in front of a variable name or % function name is now done with a higher precedence, intermediate between the % common one of * and / and the one of ^. Thus x/2y is like x/(2y), but x^2y % is like x^2*y and 2y! is not (2y)! but 2*y!. @@ -39990,9 +41481,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % parsing of big numbers should be a tiny bit faster now. % % Extended for 1.2l to ignore underscore character _ if encountered within -% digits; so it can serve as separator for better readability.| +% digits; so it can serve as separator for better readability. +%\end{lverb} % -% \lverb|It is not obvious at 1.4 to support [] for three things: packing, +%\begin{lverb} +% It is not obvious at 1.4 to support [] for three things: packing, % slicing, ... and raw xintfrac syntax A/B[N]. The only good way would be to % actually really separate completely \xintexpr, \xintfloatexpr and % \xintiiexpr code which would allow to handle both / and [] from A/B[N] as we @@ -40014,7 +41507,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % operator elsewhere in the syntax and need to hook into \XINT_expr_getop_b. % No finally I use the null char. It must be of catcode 12. % -% 1.4f had _getop here, but let's jump directly to _getop_a.| +% 1.4f had _getop here, but let's jump directly to _getop_a. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_scanint_next #1\XINT_expr_scanint_again {% @@ -40060,7 +41554,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsubsection{Fractional part} -% \lverb|Annoying duplication of code to allow 0. as input. +%\begin{lverb} +% Annoying duplication of code to allow 0. as input. % % 1.2a corrects a very bad bug in 1.2 \XINT_expr_gobz_scandec_b which should % have stripped leading zeroes in the fractional part but didn't; as a result @@ -40068,7 +41563,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % reported the issue. Does it improve things if I say the bug was introduced % in 1.2, it wasn't present before ? % -% 1.4f had _getop here, but let's jump directly to _getop_a.| +% 1.4f had _getop here, but let's jump directly to _getop_a. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_startdec_a .#1% {% @@ -40102,7 +41598,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr #1\expandafter.\romannumeral`&&@#2% }% % \end{macrocode} -%|1.4f| had |_getop| here, but let's jump directly to |_getop_a|. +% |1.4f| had |_getop| here, but let's jump directly to |_getop_a|. % \begin{macrocode} \def\XINT_expr_scandec_hit_cs\ifnum#1\fi #2\expandafter\XINT_expr_scandec_again\the\numexpr#3-\xint_c_i.% @@ -40117,8 +41613,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xint_orthat {[#3]\iffalse{{{\fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop_a#1}% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_expr_gobz_scandec_main #1.#2% {% \ifcat \relax #2\expandafter\XINT_expr_gobz_scandec_hit_cs\fi @@ -40144,13 +41638,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsubsection{Scientific notation} -% \lverb|Some pluses and minuses are allowed at the start of the scientific +%\begin{lverb} +% Some pluses and minuses are allowed at the start of the scientific % part, however not later, and no parenthesis. % % ATTENTION! 1e\numexpr2+3\relax or 1e\xintiexpr i\relax, i=1..5 % are not allowed and 1e1\numexpr2\relax does 1e1 * \numexpr2\relax. % Use \the\numexpr, \xinttheiexpr, etc... -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_scanexp_a #1#2% {% @@ -40206,7 +41701,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsubsection{Hexadecimal numbers} -% \lverb|1.2d has moved most of the handling of tacit multiplication to +%\begin{lverb} +% 1.2d has moved most of the handling of tacit multiplication to % \XINT_expr_getop, but we have to do some of it here, because we apply % \string before calling \XINT_expr_scanhexI_aa. I do not insert the * % in \XINT_expr_scanhexI_a, because it is its higher precedence variant which @@ -40236,7 +41732,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % circumstances (presence of a fractional part, or \xintiiexpr context) lead % to wrong results. Leading zeros are now trimmed during input. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_hex_in #1.#2#3;% {% @@ -40248,8 +41744,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi}}\expandafter}\romannumeral`&&@\XINT_expr_getop }% % \end{macrocode} -% \lverb|Let's not forget to grab-expand next token first as is normal rule -% of operation. Formerly called \XINT_expr_scanhex_I and had " upfront.| +%\begin{lverb} +% Let's not forget to grab-expand next token first as is normal rule +% of operation. Formerly called \XINT_expr_scanhex_I and had " upfront. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_starthex #1% {% @@ -40352,7 +41850,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsubsection{\csh{XINT_expr_startfunc}: collecting names of functions and % variables} % -% \lverb|At 1.4 the first token left over has not been submitted to +%\begin{lverb} +% At 1.4 the first token left over has not been submitted to % \string. We also know it is not a control sequence. So we can test catcode % to identify if operator is found. And it is allowed to hit some operator % such as a closing parenthesis we will then insert the «nil» value (edited: which @@ -40366,15 +41865,17 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Comments here have been removed because 1.4g did a refactoring % and renamed \XINT_expr_scanfunc to \XINT_expr_startfunc, moving half of % it earlier inside the getnextfork macros. -% | +%\end{lverb} % \begin{macrocode} -\def\XINT_expr_startfunc #1{\expandafter\XINT_expr_func\expanded\bgroup#1\XINT_expr_scanfunc_a}% +\def\XINT_expr_startfunc #1% + {\expandafter\XINT_expr_func\expanded\bgroup#1\XINT_expr_scanfunc_a}% \def\XINT_expr_scanfunc_a #1% {% \expandafter\XINT_expr_scanfunc_b\romannumeral`&&@#1% }% % \end{macrocode} -% \lverb|This handles: 1) (indirectly) tacit multiplication by a variable in +%\begin{lverb} +% This handles: 1) (indirectly) tacit multiplication by a variable in % front a of sub-expression, 2) (indirectly) tacit multiplication in front of % a \count etc..., 3) functions which are recognized via an encountered opening % parenthesis (but later this must be disambiguated from variables with tacit @@ -40398,7 +41899,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % treatment of tacit multiplication for situations such as <variable>\count or % <variable>\xintexpr..\relax, perhaps a bit sub-optimal, but first the % variable name must be gathered, second the variable must expand to its -% value.| +% value. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_scanfunc_b #1% {% @@ -40415,7 +41917,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\csh{XINT_expr_func}: dispatch to variable replacement or to % function execution} -% \lverb@Comments written 2015/11/12: earlier there was an \ifcsname test for +%\begin{lverb} +% Comments written 2015/11/12: earlier there was an \ifcsname test for % checking if we had a variable in front of a (, for tacit multiplication for % example in x(y+z(x+w)) to work. But after I had implemented functions (that % was yesterday...), I had the problem if was impossible to re-declare a @@ -40446,7 +41949,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % have to be followed by tacit multiplication before the opening parenthesis. % % The \xint_c_ii^v is there because _op_` must know in which parser -% it works. Dispendious for _. Hence I modify for 1.2d. @ +% it works. Dispendious for _. Hence I modify for 1.2d. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func #1(#2{\if _#2\xint_dothis{\XINT_expr_op__{#1}}\fi \xint_orthat{{#1}\xint_c_ii^v #2}}% @@ -40455,7 +41959,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % pseudo-function, or evaluate variable and insert operator of multiplication % in front of parenthesized contents} % -% \lverb|The "onliteral" intercepts is for bool, togl, protect, ... but also +%\begin{lverb} +% The "onliteral" intercepts is for bool, togl, protect, ... but also % for add, mul, seq, etc... Genuine functions have expr, iiexpr and flexpr % versions (or only one or two of the three) and trigger here the use of the % suitable parser-dependant form. The former (pseudo functions and functions @@ -40471,11 +41976,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % The advantage of 1.2c code is that the same name can be used for % a variable or a function. -% | +%\end{lverb} % % \changed[2021/06/11]{1.4i} -% -% \lverb|The 1.2c abuse of «onliteral» for both tacit multiplication in front +%\begin{lverb} +% The 1.2c abuse of «onliteral» for both tacit multiplication in front % of an opening parenthesis and «generic» functions or pseudo-functions meant % that the latter were vulnerable against user redefinition of a function name % as a variable name. This applied to subs, subsm, subsn, seq, add, mul, @@ -40485,7 +41990,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Now variables have an associated «var*» named macro, not «onliteral». % % In passing I refactor here in a \romannumeral inspired way how \csname and -% TeX booleans are intertwined, minimizing \expandafter usage.| +% TeX booleans are intertwined, minimizing \expandafter usage. +%\end{lverb} % % \begin{macrocode} \def\XINT_tmpa #1#2#3{% @@ -40522,7 +42028,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % \subsection{\csh{XINT_expr_op__}: replace a variable by its value and % then fetch next operator} -% \lverb|The 1.1 mechanism for \XINT_expr_var_<varname> has been +%\begin{lverb} +% The 1.1 mechanism for \XINT_expr_var_<varname> has been % modified in 1.2c. The <varname> associated macro is now only expanded % once, not twice. We arrive here via \XINT_expr_func. % @@ -40571,7 +42078,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Updated for 1.4i: now rather existence of \XINT_expr_var*_foo is tested. % % This is -% a trick which allosw to distinguish actual or dummy variables from really +% a trick which allows to distinguish actual or dummy variables from really % fake variables omit and abort (must check if there are others). For the real % or dummy variables we can trigger the expansion of the \XINT_expr_getop % before the one of the variable. I could test vor varvalue_foo but this @@ -40596,7 +42103,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % expanded once with deliver {\XINT_expr_varvalue_foo} (if not dummy), and the % braces are maintained by \XINT_expr_getop_legacy. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_op__ #1% op__ with two _'s {% @@ -40622,7 +42129,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{\csh{XINT_expr_getop}: fetch the next operator or closing % parenthesis or end of expression} -% \lverb|Release 1.1 implements multi-character operators. +%\begin{lverb} +% Release 1.1 implements multi-character operators. % % 1.2d adds tacit mutiplication also in front of variable or functions names % starting with a letter, not only a @ or a _ as was already the case. This is @@ -40662,7 +42170,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % scantokens are done which need to work with the : of catcode 11, and it % would be misconstrued to start a name if not filtered out. % -% | +%\end{lverb} +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`* 11 }^^A % \begin{macrocode} \def\XINT_expr_getop #1% {% @@ -40680,30 +42189,38 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \ifcat a#1\xint_dothis \xint_secondofthree\fi \xint_orthat \xint_thirdofthree % \end{macrocode} -% \lverb|Formerly \XINT_expr_foundend as firstofthree but at 1.4g let's +%\begin{lverb} +% Formerly \XINT_expr_foundend as firstofthree but at 1.4g let's % simply insert \xint_c_ as the #1 is \relax (and anyhow a place-holder -% according to remark in definition of \XINT_expr_foundend| +% according to remark in definition of \XINT_expr_foundend +%\end{lverb} % \begin{macrocode} \xint_c_ % \end{macrocode} -% \lverb|Tacit multiplication with higher precedence. Formerly +%\begin{lverb} +% Tacit multiplication with higher precedence. Formerly % \XINT_expr_precedence_*** was used, renamed to \XINT_expr_prec_tacit at -% 1.4g in case a backport is done of the \bnumdefinfix from bnumexpr.| +% 1.4g in case a backport is done of the \bnumdefinfix from bnumexpr. +%\end{lverb} % \begin{macrocode} {\XINT_expr_prec_tacit *}% % \end{macrocode} -% \lverb|This is only location which jumps to \XINT_expr_getop_b. At 1.4f and +%\begin{lverb} +% This is only location which jumps to \XINT_expr_getop_b. At 1.4f and % perhaps for old legacy reasons this was \expandafter\XINT_expr_getop_b % \string#1 but I see no reason now for applying \string to #1. Removed at % 1.4g. And the #1 now moved out of the secondofthree and thirdofthree -% branches.| +% branches. +%\end{lverb} % \begin{macrocode} \XINT_expr_getop_b #1% }% \catcode`* 12 % \end{macrocode} -% \lverb|\relax is a place holder here. At 1.4g, we don't use +% \let\MakePrivateLetters\xintexprMakePrivateLetters +%\begin{lverb} +% \relax is a place holder here. At 1.4g, we don't use % \XINT_expr_foundend anymore in \XINT_expr_getop_a which was slightly % refactored, but it is used elsewhere. % @@ -40711,20 +42228,26 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % crucial to good functioning of dummy variables after 1.4g refactoring of % \XINT_expr_op__, the \relax being used as delimiter by dummy variables, and % \XINT_expr_getop is now expanded before the variable itself does its thing. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_foundend {\xint_c_ \relax}% % \end{macrocode} -% \lverb|? is a very special operator with top precedence which will check if +%\begin{lverb} +% ? is a very special operator with top precedence which will check if % the next token is another ?, while avoiding removing a brace pair from token % stream due to its syntax. Pre 1.1 releases used : rather than ??, but we -% need : for Python like slices of lists.| +% need : for Python like slices of lists. +%\end{lverb} % -% \lverb|null char is used as hack to implement A/B[N] raw input at 1.4. See -% also \XINT_expr_scanint_c.| +%\begin{lverb} +% null char is used as hack to implement A/B[N] raw input at 1.4. See +% also \XINT_expr_scanint_c. +%\end{lverb} % -% \lverb|Memo: 1.4g, the token fetched by \XINT_expr_getop_b has not anymore -% been previously submitted in \XINT_expr_getop_a to \string.| +%\begin{lverb} +% Memo: 1.4g, the token fetched by \XINT_expr_getop_b has not anymore +% been previously submitted in \XINT_expr_getop_a to \string. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_getop_b#1{\def\XINT_expr_getop_b ##1% {% @@ -40743,7 +42266,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_expr_scanop_b\expandafter#1\romannumeral`&&@#2% }% % \end{macrocode} -% \lverb|Multi-character operators have an associated itself macro at each +%\begin{lverb} +% Multi-character operators have an associated itself macro at each % stage of decomposition starting at two characters. Here, nothing imposes to % the operator characters not to be of catcode letter, this constraint applies % only on the first character and is done via \XINT_expr_getop_a, to handle in @@ -40765,7 +42289,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % token first so a space would stop the \romannumeral and then the #2 in % \XINT_expr_scanop_d was not pre-expanded and ended up alone in \ifcat. It % is too distant in the past the time when I wrote the core of xintexpr in -% 2013... older and dumber now.| +% 2013... older and dumber now. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_scanop_b #1#2% {% @@ -40803,7 +42328,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_expr_foundop #1{\csname XINT_expr_precedence_#1\endcsname #1}% % \end{macrocode} % \subsection{Expansion spanning; opening and closing parentheses} -% \lverb|& +%\begin{lverb} % % These comments apply to all definitions coming next relative % to execution of operations from parsing of syntax. @@ -40829,8 +42354,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % 1.2c, see the subsection where omit and abort are discussed. % % Exceptionally, the check- is here abbreviated to check. -% | % +%\end{lverb} +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`) 11 }^^A % \begin{macrocode} \catcode`) 11 \def\XINT_tmpa #1#2#3#4#5#6% @@ -40874,9 +42400,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {#1}% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Here also we take some shortcuts relative to general philosophy and have no explicit -% exec macro.| +% exec macro. +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa #1#2#3#4#5#6#7% {% @@ -40886,7 +42413,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def #2##1% op_) {% - \expanded{\unexpanded{\XINT_expr_put_op_first{##1}}\expandafter}\romannumeral`&&@\XINT_expr_getop + \expanded{\unexpanded{\XINT_expr_put_op_first{##1}}\expandafter}% + \romannumeral`&&@\XINT_expr_getop }% \def #3% oparen {% @@ -40924,8 +42452,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \let\XINT_expr_precedence_)\xint_c_i \catcode`) 12 % \end{macrocode} +% \let\MakePrivateLetters\xintexprMakePrivateLetters % \subsection{The comma as binary operator} -% \lverb|New with 1.09a. Refactored at 1.4.| +%\begin{lverb} +% New with 1.09a. Refactored at 1.4. +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa #1#2#3#4#5#6% {% @@ -40963,7 +42494,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\let\csname XINT_expr_precedence_,\endcsname\xint_c_iii % \end{macrocode} % \subsection{The minus as prefix operator of variable precedence level} -% \lverb|Inherits the precedence level of the previous infix operator, if the +%\begin{lverb} +% Inherits the precedence level of the previous infix operator, if the % latter has at least the precedence level of binary + and -, i.e. currently % 12. % @@ -40984,7 +42516,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % At 1.4g we need 17 and not 18 anymore as the precedence of unary minus % following power operators ^ and **. The needed \xint_c_xvii creation was -% added to xintkernel.sty.| +% added to xintkernel.sty. +%\end{lverb} % \begin{macrocode} \def\XINT_tmpb #1#2#3#4#5#6#7% {% @@ -41033,10 +42566,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{The \texorpdfstring{\protect\lowast}{*}{} as Python-like «unpacking» prefix operator} % -% \lverb|New with 1.4. Prior to 1.4 the internal data structure was +%\begin{lverb} +% New with 1.4. Prior to 1.4 the internal data structure was % the one of \csname encapsulated comma separated numbers. No hierarchical % structure was (easily) possible. At 1.4, we can use TeX braces because there -% is no detokenization to catcode 12.| +% is no detokenization to catcode 12. +%\end{lverb} % % % \begin{macrocode} @@ -41062,7 +42597,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % \localtableofcontents % -% \lverb|1.2d adds the *** for tying via tacit multiplication, for example +%\begin{lverb} +% 1.2d adds the *** for tying via tacit multiplication, for example % x/2y. Actually I don't need the _itself mechanism for ***, only a % precedence. % @@ -41070,7 +42606,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % of catcode 12 and not of catcode 11. This is because implementation of % chaining of comparison operators proceeds via inserting the itself macro % directly into upcoming token stream, whereas formerly such itself macros -% would be expanded only in a \csname...\endcsname context.| +% would be expanded only in a \csname...\endcsname context. +%\end{lverb} % \begin{macrocode} \catcode`& 12 \catcode`! 12 \xintFor* #1 in {{==}{!=}{<=}{>=}{&&}{||}{//}{/:}{..}{..[}{].}{]..}}% @@ -41083,12 +42620,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % or\textquotesingle, \textquotesingle xor\textquotesingle, and % \textquotesingle mod\textquotesingle} % -% \lverb? -% Single character boolean operators $& and | had been deprecated since -% 1.1 and finally got removed (together with = comparison test) -% from syntax at 1.4g. -% -% Also, at 1.4g I finally decide to enact the switch to right +%\begin{lverb} +% At 1.4g I finally decide to enact the switch to right % associativity for the power operators ^ and **. % % This goes via inserting into the checkp macros not anymore the precedence @@ -41101,7 +42634,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % #6 and #7 got permuted and the new #7 is directly a control sequence. % Also #3 and #4 are now integers which need \romannumeral. The change in % \XINT_expr_defbin_c does not propagate as it is re-defined shortly thereafter. -% ? +%\end{lverb} % \begin{macrocode} \def\XINT_expr_defbin_c #1#2#3#4#5#6#7#8% {% @@ -41178,22 +42711,28 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_expr_defbin_b {flexpr} / {14}{14}\XINTinFloatDiv \XINT_expr_defbin_b {iiexpr} / {14}{14}\xintiiDivRound % \end{macrocode} -% \lverb|At 1.4g, right associativity is implemented via -% a lowered right precedence here.| +%\begin{lverb} +% At 1.4g, right associativity is implemented via +% a lowered right precedence here. +%\end{lverb} % \begin{macrocode} \XINT_expr_defbin_b {expr} ^ {18}{17}\xintPow \XINT_expr_defbin_b {flexpr} ^ {18}{17}\XINTinFloatSciPow \XINT_expr_defbin_b {iiexpr} ^ {18}{17}\xintiiPow % \end{macrocode} -% \lverb|1.4g This is a trick (which was in old version of bnumexpr, I +%\begin{lverb} +% 1.4g This is a trick (which was in old version of bnumexpr, I % wonder why I did not have it here) but it will make error messages in case -% of **<token> confusing. The ^ here is of catcode 11 but it does not matter.| +% of **<token> confusing. The ^ here is of catcode 11 but it does not matter. +%\end{lverb} % \begin{macrocode} \expandafter\def\csname XINT_expr_itself_**\endcsname{^}% \catcode`& 12 % \end{macrocode} -% \lverb|For this which contributes to implementing 'and', 'or', etc... see -% \XINT_expr_binopwrd.| +%\begin{lverb} +% For this which contributes to implementing 'and', 'or', etc... see +% \XINT_expr_binopwrd. +%\end{lverb} % \begin{macrocode} \xintFor #1 in {and,or,xor,mod} \do {% @@ -41217,11 +42756,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \catcode`& 7 % \end{macrocode} % \subsubsection{.., ..[, and ].. for a..b and a..[b]..c syntax} -% \lverb|The 1.4 exec_..[ macros (which do no further expansion!) had silly +%\begin{lverb} +% The 1.4 exec_..[ macros (which do no further expansion!) had silly % \expandafter doing nothing for the sole reason of sharing a common % \XINT_expr_defbin_c as used previously for the +, - etc... operators. At % 1.4b we take the time to set things straight and do other similar -% simplifications.| +% simplifications. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_defbin_c #1#2#3#4#5#6#7% {% @@ -41316,11 +42857,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_expr_defbin_b {iiexpr}{]..}\xintiiSeqB:tl:x % \end{macrocode} % \subsubsection{<, >, ==, <=, >=, != with Python-like chaining} -% \lverb|1.4b +%\begin{lverb} +% 1.4b % This is preliminary implementation of chaining of comparison % operators like Python and (I think) l3fp do. I am not too happy % with how many times the (second) operand (already evaluated) is fetched. -% | +% +%\end{lverb} % \begin{macrocode} \def\XINT_expr_defbin_d #1#2% {% @@ -41382,16 +42925,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {#1}%#3% }% % \end{macrocode} -% \lverb? -% Single character comparison operator = had been deprecated for many -% years (but I can't find since when precisely; $& and | were deprecated at -% 1.1 as since in CHANGES.md) and it finally got removed from syntax at -% 1.4g, as well as $& and |. -% ? -% \lverb|Attention that third token here is left in stream by defbin_b, then +%\begin{lverb} +% Attention that third token here is left in stream by defbin_b, then % also by defbin_c and is picked up as #2 of defbin_d. Had to work around TeX % accepting only 9 arguments. Why did it not start counting at #0 like all -% decent mathematicians do?| +% decent mathematicians do? +%\end{lverb} % \begin{macrocode} \XINT_expr_defbin_b {expr} <\xintLt \XINT_expr_defbin_b {flexpr}<\xintLt @@ -41413,15 +42952,17 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_expr_defbin_b {iiexpr}{!=}\xintiiNotEq % \end{macrocode} % \subsubsection{Support macros for .., ..[ and ]..} +% \localtableofcontents % -% -%\paragraph{\csh{xintSeq:tl:x}} -%\lverb|Commence par remplacer a par ceil(a) et b par floor(b) et renvoie +% \paragraph{\csh{xintSeq:tl:x}} +%\begin{lverb} +% Commence par remplacer a par ceil(a) et b par floor(b) et renvoie % ensuite les entiers entre les deux, possiblement en décroissant, et % extrémités comprises. Si a=b est non entier en obtient donc ceil(a) et % floor(a). Ne renvoie jamais une liste vide. % -% Note: le a..b dans \xintfloatexpr utilise cette routine.| +% Note: le a..b dans \xintfloatexpr utilise cette routine. +%\end{lverb} % \begin{macrocode} \def\xintSeq:tl:x #1#2% {% @@ -41448,7 +42989,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_Seq:tl:x_e#1#2.#3.{#1}% % \end{macrocode} -%\paragraph{\csh{xintiiSeq:tl:x}} +% \paragraph{\csh{xintiiSeq:tl:x}} % \begin{macrocode} \def\xintiiSeq:tl:x #1#2% {% @@ -41474,9 +43015,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_iiSeq:tl:x_n \the\numexpr #1-\xint_c_i.#2.% }% % \end{macrocode} -% \lverb|Contrarily to a..b which is limited to small integers, this works +%\begin{lverb} +% Contrarily to a..b which is limited to small integers, this works % with a, b, and d (big) fractions. It will produce a «nil» list, if a>b and -% d<0 or a<b and d>0.| +% d<0 or a<b and d>0. +%\end{lverb} % % \paragraph{\csh{xintSeqA}, \csh{xintiiSeqA}} % @@ -41491,19 +43034,23 @@ on input line \noexpand\the\inputlineno.&&J}}#2% 0-{p}% \krof #1}% % \end{macrocode} -%\paragraph{\csh{xintSeqB:tl:x}} -%\lverb|At 1.4, delayed expansion of start and step done here and not before, +% \paragraph{\csh{xintSeqB:tl:x}} +%\begin{lverb} +% At 1.4, delayed expansion of start and step done here and not before, % for matters of \xintdeffunc and «NEhooks». % % The float variant at 1.4 is made identical to the exact variant. I.e. % stepping is exact and comparison to the range limit too. But recall that a/b % input will be converted to a float. To handle 1/3 step for example still -% better to use \xintexpr 1..1/3..10\relax for example inside the \xintfloateval.| +% better to use \xintexpr 1..1/3..10\relax for example inside the \xintfloateval. +% +%\end{lverb} % \begin{macrocode} \def\xintSeqB:tl:x #1{\expandafter\XINT_SeqB:tl:x\romannumeral`&&@\xintSeqA#1}% \def\XINT_SeqB:tl:x #1{\csname XINT_SeqB#1:tl:x\endcsname}% \def\XINT_SeqBz:tl:x #1]#2]#3{{#2]}}% -\def\XINT_SeqBp:tl:x #1]#2]#3{\expandafter\XINT_SeqBp:tl:x_a\romannumeral0\xintraw{#3}#2]#1]}% +\def\XINT_SeqBp:tl:x #1]#2]#3% + {\expandafter\XINT_SeqBp:tl:x_a\romannumeral0\xintraw{#3}#2]#1]}% \def\XINT_SeqBp:tl:x_a #1]#2]#3]% {% \xintifCmp{#1]}{#2]}% @@ -41514,7 +43061,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xintifCmp{#1]}{#2]}% {{#1]}\expandafter\XINT_SeqBp:tl:x_b\romannumeral0\xintadd{#3]}{#1]}#2]#3]}{{#1]}}{}% }% -\def\XINT_SeqBn:tl:x #1]#2]#3{\expandafter\XINT_SeqBn:tl:x_a\romannumeral0\xintraw{#3}#2]#1]}% +\def\XINT_SeqBn:tl:x #1]#2]#3% + {\expandafter\XINT_SeqBn:tl:x_a\romannumeral0\xintraw{#3}#2]#1]}% \def\XINT_SeqBn:tl:x_a #1]#2]#3]% {% \xintifCmp{#1]}{#2]}% @@ -41554,21 +43102,25 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {}{{#1}}{{#1}\expandafter\XINT_iiSeqBn:tl:x_b\romannumeral0\xintiiadd{#3}{#1};#2;#3;}% }% % \end{macrocode} -% \subsection{Square brackets [\,] both as a container and a Python slicer} +% \subsection{Square brackets [\texorpdfstring{\,}{ }] both as a container and a Python slicer} % Refactored at |1.4| % -% \lverb|The architecture allows to implement separately a «left» and a «right» -% precedence and this is crucial.| +%\begin{lverb} +% The architecture allows to implement separately a «left» and a «right» +% precedence and this is crucial. +%\end{lverb} % \localtableofcontents % % % \subsubsection{[...] as «oneple» constructor} % -% \lverb|In the definition of \XINT_expr_op_obracket the parameter +%\begin{lverb} +% In the definition of \XINT_expr_op_obracket the parameter % is trash {}. The [ is intercepted by the getnextfork and handled % via the \xint_c_ii^v highest precedence trick to get op_obracket % executed. -% | +%\end{lverb} +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`[ 11 \catcode`] 11 }^^A % \begin{macrocode} \def\XINT_expr_itself_obracket{obracket}% \catcode`] 11 \catcode`[ 11 @@ -41621,7 +43173,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{[...] brackets and : operator for NumPy-like slicing and item % indexing syntax} -% \lverb|& +%\begin{lverb} % The opening bracket [ for the nutple constructor is filtered out by % \XINT_expr_getnextfork and becomes «obracket» which behaves with % precedence level 2. For the [..] Python slicer on the other hand, a real @@ -41643,7 +43195,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % not yet implemented. % % There are some subtle things here with possibility of variables been passed -% by reference.| +% by reference. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_defbin_c #1#2#3#4#5#6% {% @@ -41695,12 +43248,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_expr_defbin_b {iiexpr}% \catcode`] 12 \catcode`[ 12 % \end{macrocode} -% \lverb|At 1.4 the getnext, scanint, scanfunc, getop chain got revisited to +% \let\MakePrivateLetters\xintexprMakePrivateLetters +%\begin{lverb} +% At 1.4 the getnext, scanint, scanfunc, getop chain got revisited to % trigger automatic insertion of the nil variable if needed, without having in % situations like here to define operators to support «[:» or «:]». And as we % want to implement nested slicing à la NumPy, we would have had to handle % also «:,» for example. Thus here we simply have to define the sole operator -% «:» and it will be some sort of inert joiner preparing a slicing spec.| +% «:» and it will be some sort of inert joiner preparing a slicing spec. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_defbin_c #1#2#3#4#5#6% {% @@ -41744,7 +43300,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_expr_defbin_b {iiexpr}% % \end{macrocode} % \subsubsection{Macro layer implementing indexing and slicing} -% \lverb|xintexpr applies slicing not only to «objects» (which can be passed +%\begin{lverb} +% xintexpr applies slicing not only to «objects» (which can be passed % as arguments to functions) but also to «oples». % % Our «nlists» are not necessarily regular N-dimensional arrays à la NumPy. @@ -41769,7 +43326,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % 5$% for 400x400 array of 1 digit... % % Currently sticking with old macros. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_ListSel_deeper #1% {% @@ -41861,7 +43418,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \if-#1\expandafter\xintkeep\else\expandafter\xinttrim\fi {#2}{#4}}% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % % \xintNthElt from xinttools (knowingly) strips one level of % braces when fetching kth «item» from {v1}...{vN}. If we expand @@ -41884,7 +43441,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % But here arguments are either numerical or already expanded. % Normally. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_ListSel_nthone #1#2% {% @@ -41902,11 +43459,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\expandafter\XINT_nthonepy_a\the\numexpr\xintNum{#1}.%{#3} }% % \end{macrocode} -% \lverb|The macros here are basically f-expandable and use the +%\begin{lverb} +% The macros here are basically f-expandable and use the % f-expandable \xintKeep and \xintTrim. Prior to xint 1.4, there was % here an x-expandable \xintKeep:x:csv dealing with comma separated % items, for time being we make do with our f-expandable toolkit. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_ListSel_slice_b #1;#2_#3% {% @@ -41969,7 +43527,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_ListSel_P:O\XINT_ListSel_P:P #1;#2;{\XINT_ListSel_P:P #1;0;}% % \end{macrocode} % \subsection{Support for raw A/B[N]} -% \lverb| +%\begin{lverb} % Releases earlier than 1.1 required the use of braces around A/B[N] % input. The [N] is now implemented directly. *BUT* this uses a delimited macro! % thus N is not allowed to be itself an expression (I could add it...). @@ -41989,7 +43547,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % As for ? operator we needed % to hack into \XINT_expr_getop_b for intercepting that pseudo operator. See -% also \XINT_expr_scanint_c (\XINT_expr_rawxintfrac).| +% also \XINT_expr_scanint_c (\XINT_expr_rawxintfrac). +%\end{lverb} +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`& 11 }^^A % \begin{macrocode} \catcode0 11 \let\XINT_expr_precedence_&&@ \xint_c_xiv @@ -42013,14 +43573,18 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \catcode0 12 % \end{macrocode} +% \let\MakePrivateLetters\xintexprMakePrivateLetters % \subsection{? as two-way and ?? as three-way «short-circuit» conditionals} -% \lverb| +%\begin{lverb} % Comments undergoing reconstruction. -% | +%\end{lverb} % % \begin{macrocode} \let\XINT_expr_precedence_? \xint_c_xx \catcode`- 11 +% \end{macrocode} +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`- 11 }\FixInterMacrocodeVspace +% \begin{macrocode} \def\XINT_expr_op_? {\XINT_expr_op__? \XINT_expr_op_-xii}% \def\XINT_flexpr_op_?{\XINT_expr_op__? \XINT_flexpr_op_-xii}% \def\XINT_iiexpr_op_?{\XINT_expr_op__? \XINT_iiexpr_op_-xii}% @@ -42030,8 +43594,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_expr_op__?_a #1{\expandafter\XINT_expr_op__?_b\detokenize{#1}}% \def\XINT_expr_op__?_b #1% {\if ?#1\expandafter\XINT_expr_op__?_c\else\expandafter\xint_bye\fi }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_expr_op__?_c #1{\xint_gob_til_! #1\XINT_expr_op_?? !\xint_bye}% \def\XINT_expr_op_?? !\xint_bye\xint_bye\XINT_expr_exec_?{\XINT_expr_exec_??}% \catcode`- 11 @@ -42055,9 +43617,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }}\expandafter\XINT_expr_check-_after?\string -% \catcode`- 12 % \end{macrocode} +% \let\MakePrivateLetters\xintexprMakePrivateLetters % \subsection{! as postfix factorial operator} -% \lverb|& -% | % \begin{macrocode} \let\XINT_expr_precedence_! \xint_c_xx \def\XINT_expr_op_! #1% @@ -42070,7 +43631,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \expandafter\XINT_expr_put_op_first \expanded{{\romannumeral`&&@\XINT:NEhook:f:one:from:one - {\romannumeral`&&@\XINTinFloatFacdigits#1}}\expandafter}\romannumeral`&&@\XINT_expr_getop + {\romannumeral`&&@\XINTinFloatFacdigits#1}}\expandafter}% + \romannumeral`&&@\XINT_expr_getop }% \def\XINT_iiexpr_op_! #1% {% @@ -42079,14 +43641,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\romannumeral`&&@\xintiiFac#1}}\expandafter}\romannumeral`&&@\XINT_expr_getop }% % \end{macrocode} -% \lverb|At 1.4g, fix for input "x! == y" via a fake operator !==. The ! +%\begin{lverb} +% At 1.4g, fix for input "x! == y" via a fake operator !==. The ! % is of catcode 11 but this does not matter here. The definition of % \XINT_expr_itself_!== is required by the functioning of the scanop macros. % % We don't have to worry about "x! = y" as the single-character Boolean % comparison = operator has been removed from syntax. Fixing it would have % required obeying space tokens when parsing operators. For "x! == y" case, -% obeying space tokens would not solve "x!==y" input case anyhow.| +% obeying space tokens would not solve "x!==y" input case anyhow. +%\end{lverb} % \begin{macrocode} \expandafter \def\csname XINT_expr_precedence_!==\expandafter\endcsname @@ -42099,10 +43663,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsubsection{\csh{xintdefvar}, \csh{xintdefiivar}, % \csh{xintdeffloatvar}} % \changed{1.1} -% % \changed[2017/12/01]{1.2p} Extends |\xintdefvar| et al.\@ to accept % simultaneous assignments to multiple variables. -% % \changed[2018/06/17]{1.3c} % Use \csbxint{exprSafeCatcodes} (to palliate issue with % active semi-colon from Babel+French if in body of a \LaTeX{} document). @@ -42129,10 +43691,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % name was an initial |_| followed by digits. % \end{itemize} % -% \lverb|Note that the optional argument [P] as usable with +%\begin{lverb} +% Note that the optional argument [P] as usable with % \xintfloatexpr is **not** % supported by \xintdeffloatvar. One must do \xintdeffloatvar -% foo = \xintfloatexpr[16] blabla \relax; to achieve the effect.| +% foo = \xintfloatexpr[16] blabla \relax; to achieve the effect. +%\end{lverb} % % \changed[2020/01/27]{1.4} % The expression will be fetched up to final semi-colon in a manner @@ -42172,15 +43736,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % else. % % \changed[2021/04/17]{1.4e} -% \lverb|& +%\begin{lverb} % Modifies \xintdeffloatvar to round to the prevailing % precision (formerly, any operation would induce rounding, but in case of % things such as \xintdeffloatvar foo:=\xintexpr 1/100!\relax; there was no % automatic rounding. One could use 0+ syntax to trigger it, and for oples, % some trick like \xintfloatexpr[\XINTdigits]...\relax extra wrapper. -% | +%\end{lverb} % \changed[2021/05/22]{1.4g} -% \lverb|& +%\begin{lverb} % The \expandafter\expandafter\expandafter et al. chain % which was kept by \XINT_expr_defvar_one_b for expanding only at time of use % the \XINT_expr_var_foo in \XINT_expr_onliteral_foo were senseless overhead @@ -42191,12 +43755,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % The \XINT_expr_onliteral_foo is expanded as result of action of \XINT_expr_op_` % (or \XINT_flexpr_op_`, \XINT_iiexpr_op_`) which itself was triggered consuming % already an \XINT_expr_put_op_first, so its expansion has to produce tokens -% as expected after \XINT_expr_put_op_first: <precedence token><op token>{expanded value}. -% -% | +% as expected after \XINT_expr_put_op_first$empty: +% <precedence token><op token>{expanded value}. +%\end{lverb} % % \changed[2021/06/10]{1.4i} -% % Implement extended notion of simultaneous assignments: if there are more % variables than values, define the extra variables to be nil. If there are % less variables than values let the last variable @@ -42207,14 +43770,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % rules apply. % % \changed[2021/06/11]{1.4i} -% -% \lverb|Fix the long-standing «seq renaming bug» via a change here of the +%\begin{lverb} +% Fix the long-standing «seq renaming bug» via a change here of the % name of auxiliary macro. Previously «onliteral_<varname>» now % «var*_<varname>». I hesitated with using «var_varname*» rather. % % Hesitated adding \XINT_expr_letvar_one (motivation: case of simultaneous -% assignments leading to defining «nil» variables). Finally, no.| +% assignments leading to defining «nil» variables). Finally, no. +%\end{lverb} % +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`* 11 }^^A % \begin{macrocode} \catcode`* 11 \def\XINT_expr_defvar_one #1#2% @@ -42254,11 +43819,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \xintexprRestoreCatcodes % \end{macrocode} -% \lverb|Maybe SafeCatcodes was without effect because the colon and the rest +% \let\MakePrivateLetters\xintexprMakePrivateLetters +%\begin{lverb} +% Maybe SafeCatcodes was without effect because the colon and the rest % are from some earlier macro definition. Give a safe definition to active % colon (even if in math mode with a math active colon..). % -% The \XINT_expr_defvar_getname closes the group opened here.| +% The \XINT_expr_defvar_getname closes the group opened here. +%\end{lverb} % \begin{macrocode} \begingroup\lccode`~`: \lowercase{\let~}\empty \edef\XINT_defvar_tmpa{\XINT_defvar_tmpa}% @@ -42336,7 +43904,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \catcode`~ 3 \catcode`: 11 % \end{macrocode} -% \lverb|This SafeCatcodes is mainly in the hope that semi-colon ending the +%\begin{lverb} +% This SafeCatcodes is mainly in the hope that semi-colon ending the % expression can still be sanitized. % % Pre 1.4e definition: @@ -42351,7 +43920,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % nested values. But for a single one, one can use simply the float() % function. % -% | +%\end{lverb} % \begin{macrocode} \def\xintdefvar {\xintexprSafeCatcodes\xintdefvar_a}% \def\xintdefvar_a#1={\XINT_expr_defvar\xintthebareeval{#1}}% @@ -42362,7 +43931,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\csh{xintunassignvar}} % \changed{1.2e} -% % \changed{1.3d} % Embarrassingly I had for a long time a misunderstanding of |\ifcsname| % (let's blame its documentation) and I was not aware that it chooses FALSE @@ -42403,15 +43971,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsection{Support for dummy variables} % \localtableofcontents % \subsubsection{\csh{xintnewdummy}} -% \lverb|& +%\begin{lverb} % Comments under reconstruction. % % 1.4 adds multi-letter names as usable dummy variables! -% | +%\end{lverb} % \changed[2021/06/11]{1.4i} -% \lverb|s/onliteral/var*/ to fix the «seq renaming bug».| -% -% +%\begin{lverb} +% s/onliteral/var*/ to fix the «seq renaming bug». +%\end{lverb} % \begin{macrocode} \catcode`* 11 \def\XINT_expr_makedummy #1% @@ -42448,7 +44016,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi }% \catcode`* 12 -% \begin{macrocode} +% \end{macrocode} % The |nil| variable was need in |xint < 1.4| (with some other meaning) % in places the syntax could not allow emptiness, such as |,,|, and % other things, but at |1.4| meaning as changed. @@ -42470,12 +44038,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_expr_defvar_one{True}{{1}}% % \end{macrocode} % \subsubsection{\csh{xintensuredummy}, \csh{xintrestorevariable}} -% \lverb|1.3e \xintensuredummy differs from \xintnewdummy only in the informational message... +%\begin{lverb} +% 1.3e \xintensuredummy differs from \xintnewdummy only in the informational message... % Attention that this is not meant to be nested. % % 1.4 fixes that the message mentioned non-existent \xintrestoredummy (real % name was \xintrestorelettervar and renames the latter to -% \xintrestorevariable as it applies also to multi-letter names.| +% \xintrestorevariable as it applies also to multi-letter names. +%\end{lverb} % \begin{macrocode} \def\xintensuredummy #1{% \XINT_expr_makedummy{#1}% @@ -42509,39 +44079,50 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \subsubsection{Checking (without expansion) that a symbolic expression % contains correctly nested parentheses} % -% \lverb|Expands to \xint_c_mone in case a closing ) had no opening ( matching +%\begin{lverb} +% Expands to \xint_c_mone in case a closing ) had no opening ( matching % it, to \@ne if opening ( had no closing ) matching it, to \z@ if expression % was balanced. Call it as: % % \XINT_isbalanced_a \relax #1(\xint_bye)\xint_bye % % This is legacy f-expandable code not using \expanded even at 1.4. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_isbalanced_a #1({\XINT_isbalanced_b #1)\xint_bye }% \def\XINT_isbalanced_b #1)#2% {\xint_bye #2\XINT_isbalanced_c\xint_bye\XINT_isbalanced_error }% % \end{macrocode} -% \lverb|if #2 is not \xint_bye, a ) was found, but there was no (. Hence error -> -1| +%\begin{lverb} +% if #2 is not \xint_bye, a ) was found, but there was no (. Hence error -> -1 +%\end{lverb} % \begin{macrocode} \def\XINT_isbalanced_error #1)\xint_bye {\xint_c_mone}% % \end{macrocode} -% \lverb|#2 was \xint_bye, was there a ) in original #1?| +%\begin{lverb} +% #2 was \xint_bye, was there a ) in original #1? +%\end{lverb} % \begin{macrocode} \def\XINT_isbalanced_c\xint_bye\XINT_isbalanced_error #1% {\xint_bye #1\XINT_isbalanced_yes\xint_bye\XINT_isbalanced_d #1}% % \end{macrocode} -% \lverb|#1 is \xint_bye, there was never ( nor ) in original #1, hence OK.| +%\begin{lverb} +% #1 is \xint_bye, there was never ( nor ) in original #1, hence OK. +%\end{lverb} % \begin{macrocode} \def\XINT_isbalanced_yes\xint_bye\XINT_isbalanced_d\xint_bye )\xint_bye {\xint_c_ }% % \end{macrocode} -% \lverb|#1 is not \xint_bye, there was indeed a ( in original #1. We check if -% we see a ). If we do, we then loop until no ( nor ) is to be found.| +%\begin{lverb} +% #1 is not \xint_bye, there was indeed a ( in original #1. We check if +% we see a ). If we do, we then loop until no ( nor ) is to be found. +%\end{lverb} % \begin{macrocode} \def\XINT_isbalanced_d #1)#2% {\xint_bye #2\XINT_isbalanced_no\xint_bye\XINT_isbalanced_a #1#2}% % \end{macrocode} -% \lverb|#2 was \xint_bye, we did not find a closing ) in original #1. Error.| +%\begin{lverb} +% #2 was \xint_bye, we did not find a closing ) in original #1. Error. +%\end{lverb} % \begin{macrocode} \def\XINT_isbalanced_no\xint_bye #1\xint_bye\xint_bye {\xint_c_i }% % \end{macrocode} @@ -42572,11 +44153,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi {#1}{#2#3}% }% -\def\XINT_expr_fetch_E_comma_V_equal_E_e #1#2{\XINT_expr_fetch_E_comma_V_equal_E_d {#1}{#2)}}% +\def\XINT_expr_fetch_E_comma_V_equal_E_e #1#2% + {\XINT_expr_fetch_E_comma_V_equal_E_d {#1}{#2)}}% % \end{macrocode} % \subsubsection{Fetching a balanced expression delimited by a semi-colon} % -% \lverb|1.4. For subsn() leaner syntax of nested substitutions. +%\begin{lverb} +% 1.4. For subsn() leaner syntax of nested substitutions. % % Will also serve to \xintdeffunc, to not have to hide inner semi-colons in % for example an iter() from \xintdeffunc. @@ -42584,7 +44167,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Adding brace removal protection for no serious reason, anyhow the xintexpr % parsers always removes braces when moving forward, but well. % -% Trigger by \romannumeral\XINT_expr_fetch_to_semicolon upfront.| +% Trigger by \romannumeral\XINT_expr_fetch_to_semicolon upfront. +%\end{lverb} % % \begin{macrocode} \def\XINT_expr_fetch_to_semicolon {\XINT_expr_fetch_to_semicolon_a {}\empty}% @@ -42603,16 +44187,18 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % function, the n++ construct and the semi-colon as used in the syntax of % seq(), add(), mul(), iter(), rseq(), iterr(), rrseq(), subsm(), subsn(), ndseq(), % ndmap()} -% \lverb|There is some clever play simply based on setting suitable precedence +%\begin{lverb} +% There is some clever play simply based on setting suitable precedence % levels combined with special meanings given to op macros. % % The special !? internal operator is a helper for omit and abort keywords in % list generators. % % Prior to 1.4 support for +[, *[, ..., ]+, ]*, had some elements here. -% | +%\end{lverb} % \paragraph{The n++ construct} -% \lverb|1.1 2014/10/29 did \expandafter\.=+\xintiCeil which transformed it into +%\begin{lverb} +% 1.1 2014/10/29 did \expandafter\.=+\xintiCeil which transformed it into % \romannumeral0\xinticeil, which seems a bit weird. This exploited the fact % that dummy variables macros could back then pick braced material (which in the % case at hand here ended being {\romannumeral0\xinticeil...} and were submitted @@ -42624,7 +44210,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % now need to fetch a single locked token, which they do not expand. % % The \xintiCeil appears a bit dispendious, but I need the starting value in a -% \numexpr compatible form in the iteration loops.| +% \numexpr compatible form in the iteration loops. +%\end{lverb} % \begin{macrocode} \expandafter\def\csname XINT_expr_itself_++\endcsname {++}% \expandafter\def\csname XINT_expr_itself_++)\endcsname {++)}% @@ -42637,8 +44224,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \paragraph{The \cshn{break()} function} -% \lverb|break is a true function, the parsing via expansion of the enclosed -% material proceeds via _oparen macros as with any other function.| +%\begin{lverb} +% break is a true function, the parsing via expansion of the enclosed +% material proceeds via _oparen macros as with any other function. +%\end{lverb} % \begin{macrocode} \catcode`? 3 \def\XINT_expr_func_break #1#2#3{#1#2{?#3}}% @@ -42647,7 +44236,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \let\XINT_iiexpr_func_break \XINT_expr_func_break % \end{macrocode} % \paragraph{The \cshn{omit} and \cshn{abort} keywords} -% \lverb|& +%\begin{lverb} % Comments are currently undergoing reconstruction. % % The mechanism is somewhat complex. The operator !? will fetch a dummy value @@ -42679,7 +44268,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % So finally things here remain unchanged and the refactoring to fix this % breakage was done in \XINT_allexpr_subsx (and also subsm). -% Done at 1.4h. See \XINT_allexpr_subsx for comments.| +% Done at 1.4h. See \XINT_allexpr_subsx for comments. +%\end{lverb} % % \begin{macrocode} \edef\XINT_expr_var_omit #1\relax !{1\string !?!\relax !}% @@ -42692,7 +44282,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \paragraph{The semi-colon} % -% \lverb|Obsolete comments undergoing re-construction| +%\begin{lverb} +% Obsolete comments undergoing re-construction +%\end{lverb} % % \begin{macrocode} \xintFor #1 in {expr,flexpr,iiexpr} \do {% @@ -42704,7 +44296,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{Reserved dummy variables @, @1, @2, @3, @4, @@, @@(1), \dots, @@@, % @@@(1), \dots{} for recursions} -% \lverb|& +%\begin{lverb} % Comments currently under reconstruction. % % 1.4 breaking change: @ and @1 behave differently and one can not use @ in @@ -42716,8 +44308,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % For the record, the ~ and ? have catcode 3 in this code. % -% | +%\end{lverb} % +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`* 11 }^^A % \begin{macrocode} \catcode`* 11 \def\XINT_expr_var_@ #1~#2{{#2}#1~{#2}}% @@ -42739,6 +44332,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\def\csname XINT_expr_var*_@4\endcsname #1~#2#3#4#5% {\XINT_expr_prec_tacit *{{#5}}(#1~{#2}{#3}{#4}{#5}}% \catcode`* 12 +% \end{macrocode} +% \let\MakePrivateLetters\xintexprMakePrivateLetters\FixInterMacrocodeVspace +% \begin{macrocode} \catcode`? 3 \def\XINT_expr_func_@@ #1#2#3#4~#5?% {% @@ -42779,7 +44375,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \localtableofcontents % % \subsubsection{Comments} -% \lverb|& +%\begin{lverb} % Comments added 2020/01/16. % % The mechanism for «seq» is the following. When the parser encounters «seq», @@ -42890,9 +44486,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % formerly) by macros. Now that 1.4 does not impact the string pool we can % make \xintdeffunc much more powerful but it will not be a construct using % only xintfrac macros, it will still be partially the \xintexpr etc... -% parsers in such cases.| +% parsers in such cases. +%\end{lverb} % -% \lverb|Got simpler with 1.2c as now the dummy variable fetches an +%\begin{lverb} +% Got simpler with 1.2c as now the dummy variable fetches an % already encapsulated value, which is anyhow the form in which we get % it. % @@ -42900,7 +44498,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % And support for multi-letter variables, which means function declarations % can now use multi-letter variables ! -% | +%\end{lverb} % \subsubsection{\cshn{subs()}: substitution of one variable} % \begin{macrocode} \def\XINT_expr_onliteral_subs @@ -42913,7 +44511,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_flexpr_func_subsx #1#2{\XINT_allexpr_subsx \xintbarefloateval}% \def\XINT_iiexpr_func_subsx #1#2{\XINT_allexpr_subsx \xintbareiieval }% % \end{macrocode} -% \lverb| +%\begin{lverb} % #2 is the value to assign to the dummy variable % #3 is the dummy variable name (possibly multi-letter), #4 is the expression % to evaluate @@ -42968,7 +44566,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % future developments. Done at 1.4h (2021/01/27). % % No need for the \expandafter's from \XINT_expr_put_op_first in -% \XINT_expr_clean_and_put_op_first. | +% \XINT_expr_clean_and_put_op_first. +%\end{lverb} % \begin{macrocode} \def\XINT_allexpr_subsx #1#2#3#4% {% @@ -42980,12 +44579,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_expr_clean_and_put_op_first #1#2\xint:#3#4{#3#4{#1}}% % \end{macrocode} % \subsubsection{\cshn{subsm()}: simultaneous independent substitutions} -% \lverb|New with 1.4. Globally the var1=expr1; var2=expr2; var2=expr3;... +%\begin{lverb} +% New with 1.4. Globally the var1=expr1; var2=expr2; var2=expr3;... % part can arise from expansion, except that once a semi-colon has been found % (from expansion) the varK= thing following it must be there. And as for % subs() the final parenthesis must be there from the start. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_onliteral_subsm {% @@ -43022,15 +44622,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_allexpr_subsm_A\expandafter#1\romannumeral`&&@#1% }% % \end{macrocode} -% \lverb| +%\begin{lverb} %( #1 = \xintbareeval, or \xintbarefloateval or \xintbareiieval %: #2 = evaluation of last variable assignment %) -% | +%\end{lverb} % \begin{macrocode} \def\XINT_allexpr_subsm_done #1#2{{#2}\iffalse{{\fi}}}% % \end{macrocode} -% \lverb| +%\begin{lverb} %( #1 = \xintbareeval or \xintbarefloateval or \xintbareiieval %: #2 = {value1}\relax !var2{value2}....\relax !varN{valueN} (value's may be oples) %: #3 = {var1} @@ -43038,7 +44638,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% %) % Refactored at 1.4h as for \XINT_allexpr_subsx, see comments there related % to the omit/abort conundrum. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_allexpr_subsmx #1#2#3#4% {% @@ -43049,9 +44649,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsubsection{\cshn{subsn()}: leaner syntax for nesting (possibly dependent) substitutions} -% \lverb|New with 1.4. 2020/01/24 +%\begin{lverb} +% New with 1.4. 2020/01/24 % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_onliteral_subsn {% @@ -43060,7 +44661,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_allexpr_subsn_f #1{\XINT_allexpr_subsn_g #1}% % \end{macrocode} -% \lverb| +%\begin{lverb} %( #1 = Name1 %: #2 = Expression in all variables which is to evaluate %: #3 = all the stuff after Name1 = and up to final parenthesis @@ -43073,7 +44674,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % I only added usage of \XINT_expr_put_op_first_noexpand. There may be other % locations where it could be used, but I can't afford now reviewing % usage. For next release after 1.4h bugfix. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_allexpr_subsn_g #1#2#3% {% @@ -43138,12 +44739,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\cshn{seq()}: sequences from assigning values to a % dummy variable} -% \lverb| +%\begin{lverb} % In seq_f, the #2 is the ExprValues expression which needs evaluation to % provide the values to the dummy variable and #1 is {Name}{ExprSeq} % where Name is the name of dummy variable and {ExprSeq} the expression % which will have to be evaluated. -% | +%\end{lverb} % % % \begin{macrocode} @@ -43162,7 +44763,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_expr_cb_and_getop{\iffalse{\fi\expandafter}\romannumeral`&&@\XINT_expr_getop}% % \end{macrocode} % -% \lverb|Comments undergoing reconstruction.| +%\begin{lverb} +% Comments undergoing reconstruction. +%\end{lverb} % \begin{macrocode} \catcode`? 3 \def\XINT_expr_seq:_b #1#2% @@ -43195,7 +44798,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\cshn{iter()}} % -% \lverb|Prior to 1.2g, the iter keyword was what is now called iterr, +%\begin{lverb} +% Prior to 1.2g, the iter keyword was what is now called iterr, % analogous with rrseq. Somehow I forgot an iter functioning like rseq % with the sole difference of printing only the last iteration. Both rseq and % iter work well with list selectors, as @ refers to the whole comma separated @@ -43209,7 +44813,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % 1.4) there was no such token. The change is motivated to using ; also in % subsm() syntax. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func_iter {\XINT_allexpr_iter \xintbareeval }% \def\XINT_flexpr_func_iter {\XINT_allexpr_iter \xintbarefloateval }% @@ -43261,7 +44865,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_expr_iter:_Goon_a #1#2#3~#4{\XINT_expr_iter:_Cb #3~{#1}}% % \end{macrocode} % \subsubsection{\cshn{add()}, \cshn{mul()}} -% \lverb|Comments under reconstruction. +%\begin{lverb} +% Comments under reconstruction. % % These were a bit anomalous as they did not implement omit and abort keyword % and the break() function (and per force then neither the n++ syntax). @@ -43270,7 +44875,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % iter(). Thus, there is small loss in efficiency, but supporting omit, abort % and break is important. Using dedicated macros here would have caused also % slight efficiency drop. Simpler to remove the old approach. -% | +%\end{lverb} % % \begin{macrocode} \def\XINT_expr_onliteral_add @@ -43283,7 +44888,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_flexpr_func_opx {\XINT:NEhook:opx \XINT_allexpr_opx \xintbarefloateval}% \def\XINT_iiexpr_func_opx {\XINT:NEhook:opx \XINT_allexpr_opx \xintbareiieval }% % \end{macrocode} -% \lverb|1.4a In case of usage of omit (did I not test it? obviously +%\begin{lverb} +% 1.4a In case of usage of omit (did I not test it? obviously % I didn't as neither omit nor abort could work; and break neither), % 1.4 code using (#6) syntax caused a % (somewhat misleading) «missing )» error message which originated in the @@ -43297,7 +44903,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % \break() has special meaning here as it is used as last operand, not as last % value. The code is very unsatisfactory and inefficient but this is hotfix -% for 1.4a.| +% for 1.4a. +%\end{lverb} % \begin{macrocode} \def\XINT_allexpr_opx #1#2#3#4#5#6#7#8% {% @@ -43321,12 +44928,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\cshn{rseq()}} % -% \lverb|When func_rseq has its turn, initial segment has been scanned by +%\begin{lverb} +% When func_rseq has its turn, initial segment has been scanned by % oparen, the ; mimicking the rôle of a closing parenthesis, and stopping % further expansion (and leaving a \xint_c_i left-over token since 1.4). The ; % is discovered during standard parsing mode, it may be for example {;} or % arise from expansion as rseq does not use a delimited macro to locate it. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func_rseq {\XINT_allexpr_rseq \xintbareeval }% \def\XINT_flexpr_func_rseq {\XINT_allexpr_rseq \xintbarefloateval }% @@ -43379,8 +44987,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_expr_rseq:_Goon_a #1#2#3~#4{#1\XINT_expr_rseq:_Cb #3~{#1}}% % \end{macrocode} % \subsubsection{\cshn{iterr()}} -% \lverb|ATTENTION! at 1.4 the @ and @1 are not synonymous anymore. One *must* use -% @1 in iterr() context.| +%\begin{lverb} +% ATTENTION! at 1.4 the @ and @1 are not synonymous anymore. One *must* use +% @1 in iterr() context. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func_iterr {\XINT_allexpr_iterr \xintbareeval }% \def\XINT_flexpr_func_iterr {\XINT_allexpr_iterr \xintbarefloateval }% @@ -43425,7 +45035,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_expr_iterr:_Ca #1#2#3{\XINT_expr_iterr:_Cc#3.{#2}}% \def\XINT_expr_iterr:_Cb #1{\expandafter\XINT_expr_iterr:_Cc\the\numexpr#1+\xint_c_i.}% -\def\XINT_expr_iterr:_Cc #1.#2{\expandafter\XINT_expr_iterr:_D\romannumeral0#2{{#1}}{#1}{#2}}% +\def\XINT_expr_iterr:_Cc #1.#2% + {\expandafter\XINT_expr_iterr:_D\romannumeral0#2{{#1}}{#1}{#2}}% \def\XINT_expr_iterr:_D #1{\ifx ^#1\xint_dothis\XINT_expr_iterr:_abort\fi \ifx ?#1\xint_dothis\XINT_expr_iterr:_break\fi \ifx !#1\xint_dothis\XINT_expr_iterr:_Omit\fi @@ -43439,9 +45050,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\cshn{rrseq()}} % -% \lverb|When func_rrseq has its turn, initial segment has been scanned +%\begin{lverb} +% When func_rrseq has its turn, initial segment has been scanned % by oparen, the ; mimicking the rôle of a closing parenthesis, and -% stopping further expansion. #2 = \xint_c_i and #3 are left-over trash.| +% stopping further expansion. #2 = \xint_c_i and #3 are left-over trash. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func_rrseq {\XINT_allexpr_rrseq \xintbareeval }% \def\XINT_flexpr_func_rrseq {\XINT_allexpr_rrseq \xintbarefloateval }% @@ -43486,7 +45099,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_expr_rrseq:_Ca #1#2#3{\XINT_expr_rrseq:_Cc#3.{#2}}% \def\XINT_expr_rrseq:_Cb #1{\expandafter\XINT_expr_rrseq:_Cc\the\numexpr#1+\xint_c_i.}% -\def\XINT_expr_rrseq:_Cc #1.#2{\expandafter\XINT_expr_rrseq:_D\romannumeral0#2{{#1}}{#1}{#2}}% +\def\XINT_expr_rrseq:_Cc #1.#2% + {\expandafter\XINT_expr_rrseq:_D\romannumeral0#2{{#1}}{#1}{#2}}% \def\XINT_expr_rrseq:_D #1{\ifx ^#1\xint_dothis\XINT_expr_rrseq:_abort\fi \ifx ?#1\xint_dothis\XINT_expr_rrseq:_break\fi \ifx !#1\xint_dothis\XINT_expr_rrseq:_Omit\fi @@ -43501,10 +45115,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{Pseudo-functions related to N-dimensional hypercubic lists} % \subsubsection{\cshn{ndseq()}} -% \lverb|New with 1.4. 2020/01/23. It is derived from subsm() but instead of +%\begin{lverb} +% New with 1.4. 2020/01/23. It is derived from subsm() but instead of % evaluating one expression according to one value per variable, it constructs % a nested bracketed seq... this means the expression is parsed each time ! -% Anyway, proof of concept. Nota Bene : omit, abort, break() work !| +% Anyway, proof of concept. Nota Bene : omit, abort, break() work ! +%\end{lverb} % \begin{macrocode} \def\XINT_expr_onliteral_ndseq {% @@ -43547,19 +45163,19 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_allexpr_ndseq_A\expandafter#1\romannumeral`&&@#1% }% % \end{macrocode} -% \lverb| +%\begin{lverb} % #1 = \xintbareeval, or \xintbarefloateval or \xintbareiieval % #2 = values for last coordinate -% | +%\end{lverb} % \begin{macrocode} \def\XINT_allexpr_ndseq_C #1#2{{#2}\iffalse{{{\fi}}}}% % \end{macrocode} -% \lverb| +%\begin{lverb} % #1 = \xintbareeval or \xintbarefloateval or \xintbareiieval % #2 = {valuesN}...{values2}{var2}{values1} % #3 = {var1} % #4 = the expression to evaluate -% | +%\end{lverb} % \begin{macrocode} \def\XINT_allexpr_ndseqx #1#2#3#4% {% @@ -43582,7 +45198,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_allexpr_ndseqx_e ^#1\XINT_allexpr_ndseqx_a{}% % \end{macrocode} % \subsubsection{\cshn{ndmap()}} -% \lverb|New with 1.4. 2020/01/24.| +%\begin{lverb} +% New with 1.4. 2020/01/24. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_onliteral_ndmap #1,{\xint_c_ii^v `{ndmapx}\XINTfstop.{#1};}% \def\XINT_expr_func_ndmapx #1#2#3% @@ -43653,7 +45271,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\iffalse{\fi}\xint_gobble_iii}% % \end{macrocode} % \subsubsection{\cshn{ndfillraw()}} -% \lverb|New with 1.4. 2020/01/24. J'hésite à autoriser un #1 quelconque, +%\begin{lverb} +% New with 1.4. 2020/01/24. J'hésite à autoriser un #1 quelconque, % ou plutôt à le wrapper dans un \xintbareval. Mais il faut alors distinguer % les trois. De toute façon les variables ne marcheraient pas donc j'hésite % à mettre un wrapper automatique. Mais ce n'est pas bien d'autoriser l'injection @@ -43664,7 +45283,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Je n'aime pas le nom !. Le changer. ndconst? Surtout je n'aime pas % que dans le premier argument il faut rajouter explicitement si nécessaire % \xintiiexpr wrap. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_onliteral_ndfillraw #1,{\xint_c_ii^v `{ndfillrawx}\XINTfstop.{{#1}},}% \def\XINT_expr_func_ndfillrawx #1#2#3% @@ -43693,8 +45312,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \cshn{qraw()}, \cshn{qint()}, \cshn{qfrac()}, \cshn{qfloat()}, \cshn{qrand()}, % \cshn{random()}, \cshn{rbit()}} % -% \lverb|bool, togl and protect use delimited macros. They are not true -% functions, they turn off the parser to gather their "variable".| +%\begin{lverb} +% bool, togl and protect use delimited macros. They are not true +% functions, they turn off the parser to gather their "variable". +%\end{lverb} % % \changed{1.2} Adds |qint()|, |qfrac()|, |qfloat()|. % @@ -43704,24 +45325,29 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % \changed{1.3e} |qfloat()| keeps a short mantissa if possible. % -% \lverb|They allow the user to hand over quickly a big number to the parser, +%\begin{lverb} +% They allow the user to hand over quickly a big number to the parser, % spaces not immediately removed but should be harmless in general. The qraw() % does no post-processing at all apart complete expansion, useful for % comma-separated values, but must be obedient to (non really documented) % expected format. Each uses a delimited macro, the closing parenthesis can -% not emerge from expansion.| +% not emerge from expansion. +%\end{lverb} % -% \lverb|1.3b. random(), qrand() +%\begin{lverb} +% 1.3b. random(), qrand() % Function-like syntax but with no argument currently, so let's % use fast parsing which requires though the closing parenthesis to be -% explicit.| +% explicit. +%\end{lverb} % -% \lverb|Attention that qraw() +%\begin{lverb} +% Attention that qraw() % which pre-supposes knowledge of internal storage model is fragile % and may break at any release. % % 1.4 adds rbit(). Short for random bit. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_onliteral_bool #1)% {\expandafter\XINT_expr_put_op_first\expanded{{{\xintBool{#1}}}\expandafter @@ -43852,7 +45478,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\romannumeral`&&@\XINTinFloatFrac#3}}% }% % \end{macrocode} -% \lverb|no \XINT_iiexpr_func_frac| +%\begin{lverb} +% no \XINT_iiexpr_func_frac +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func_floor #1#2#3% {% @@ -43862,9 +45490,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \let\XINT_flexpr_func_floor\XINT_expr_func_floor % \end{macrocode} -% \lverb|The floor and ceil functions in \xintiiexpr require protect(a/b) or, +%\begin{lverb} +% The floor and ceil functions in \xintiiexpr require protect(a/b) or, % better, \qfrac(a/b); else the / will be executed first and do an integer -% rounded division.| +% rounded division. +%\end{lverb} % \begin{macrocode} \def\XINT_iiexpr_func_floor #1#2#3% {% @@ -44062,8 +45692,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }}% }% % \end{macrocode} -% \lverb|Hesitation at 1.3e about using \XINTinFloatSdigits and \XINTinFloatS. -% Finally I add a sfloat() function. It helps for xinttrig.sty.| +%\begin{lverb} +% Hesitation at 1.3e about using \XINTinFloatSdigits and \XINTinFloatS. +% Finally I add a sfloat() function. It helps for xinttrig.sty. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func_float #1#2#3% {% @@ -44074,7 +45706,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \let\XINT_flexpr_func_float\XINT_expr_func_float % \end{macrocode} -% \lverb|& +%\begin{lverb} % float_() was added at 1.4, as a shortcut alias to float() skipping the check % for an optional second argument. This is useful to transfer function % definitions between \xintexpr and \xintfloatexpr contexts. @@ -44097,7 +45729,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % 1.4f also adds private float_dgtormax and sfloat_dgtormax for matters of xinttrig. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func_float_dgt #1#2#3% {% @@ -44497,7 +46129,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT:expr:zip#1{\expandafter{\expanded\XINT_zip_A#1\xint_bye\xint_bye}}% % \end{macrocode} % \subsection{User declared functions} -% \lverb|& +%\begin{lverb} % It is possible that % the author actually does understand at this time the % \xintNewExpr/\xintdeffunc refactored code and mechanisms for the first time @@ -44518,7 +46150,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % At 1.4 fetching the expression up to final semi-colon is done using % \XINT_expr_fetch_to_semicolon, hence semi-colons arising in the syntax do % not need to be hidden inside braces. -% | +%\end{lverb} % % \localtableofcontents % @@ -44526,61 +46158,82 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \csh{xintdeffloatfunc}} % % \changed[2015/11/12]{1.2c} -% \lverb|Note: it is possible to have same name assigned both to a variable -% and a function: things such as add(f(f), f=1..10) are possible.| +%\begin{lverb} +% Note: it is possible to have same name assigned both to a variable +% and a function: things such as add(f(f), f=1..10) are possible. +%\end{lverb} % % \changed[2015/11/13]{1.2c} -% \lverb|Function names first expanded then detokenized and cleaned of spaces.| +%\begin{lverb} +% Function names first expanded then detokenized and cleaned of spaces. +%\end{lverb} % % \changed[2015/11/21]{1.2e} -% \lverb|No \detokenize anymore on the function +%\begin{lverb} +% No \detokenize anymore on the function % names. And #1(#2)#3=#4 parameter pattern to avoid to have to worry if a : is -% there and it is active.| +% there and it is active. +%\end{lverb} % % \changed[2016/02/22]{1.2f} -% \lverb|La macro associée à la fonction ne débute +%\begin{lverb} +% La macro associée à la fonction ne débute % plus par un \romannumeral, car de toute façon elle est pour emploi dans -% \csname..\endcsname.| +% \csname..\endcsname. +%\end{lverb} % % \changed[2016/03/08]{1.2f} -% \lverb|Comma separated expressions allowed (formerly this required using -% parenthesis \xintdeffunc foo(x,..):=(.., .., ..);| +%\begin{lverb} +% Comma separated expressions allowed (formerly this required using +% parenthesis \xintdeffunc foo(x,..):=(.., .., ..); +%\end{lverb} % % \changed[2018/06/17]{1.3c} -% \lverb|Usage of \xintexprSafeCatcodes to be compatible with an active -% semi-colon at time of use; the colon was not a problem (see ##3) already.| +%\begin{lverb} +% Usage of \xintexprSafeCatcodes to be compatible with an active +% semi-colon at time of use; the colon was not a problem (see ##3) already. +%\end{lverb} % % \changed{1.3e} -% \lverb|\xintdefefunc variant added for functions which will expand +%\begin{lverb} +% \xintdefefunc variant added for functions which will expand % completely if used with numeric arguments in other function definitions. -% They can't be used for recursive definitions.| +% They can't be used for recursive definitions. +% +% Their functionality was merged into \xintdeffunc et al. at 1.4. The +% original macros were removed at 1.4m. +%\end{lverb} % % \changed[2020/01/10]{1.4} -% \lverb|Multi-letter variables can be used (with no prior declaration)| +%\begin{lverb} +% Multi-letter variables can be used (with no prior declaration) +%\end{lverb} % % \changed[2020/01/11]{1.4} -% \lverb|The new internal data model has caused many worries initially (such +%\begin{lverb} +% The new internal data model has caused many worries initially (such % as whether to allow functions with «ople» outputs in contrast to «numbers» % or «nutples») but in the end all is simpler again and the refactoring of ? % and ?? in function definitions allows to fuse inert functions (allowing % recursive definitions) and expanding functions (expanding completely if with % numeric arguments) into a single entity. % -% Thus the 1.3e \xintdefefunc, \xintdefiiefunc, \xintdeffloatefunc constructors -% of «expanding» functions are kept only as aliases of legacy \xintdeffunc et al. and -% deprecated. -% % A special situation is with % functions of no variables. In that case it will be handled as an inert % entity, else they would not be different from variables. % -% | +%\end{lverb} % % \changed[2020/01/19]{1.4} -% \lverb|Addition de la syntaxe déclarative \xintdeffunc foo(a,b,...,*z) = ...; +%\begin{lverb} +% Addition de la syntaxe déclarative \xintdeffunc foo(a,b,...,*z) = ...; % -% | +%\end{lverb} % +% \changed[2022/06/05]{1.4m} +%\begin{lverb} +% Removal of the \xintdefefunc et al.$@ macros deprecated at 1.4. +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa #1#2#3#4#5% {% @@ -44673,7 +46326,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \else % \end{macrocode} -% \lverb|Last argument in the call signature is variadic (was prefixed by *).| +%\begin{lverb} +% Last argument in the call signature is variadic (was prefixed by *). +%\end{lverb} % \begin{macrocode} \def #1##1{% \XINT_global\def #1####1####2%####3% @@ -44684,15 +46339,18 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi }% % \end{macrocode} -% \lverb|Deliberate brace stripping of #3 to reveal the elements of the ople, +%\begin{lverb} +% Deliberate brace stripping of #3 to reveal the elements of the ople, % which may be atoms i.e. numeric data such as {1}, or again oples, which % means that the corresponding item was a nutple, for example it came from % input syntax such as foo(1, 2, [1, 2], 3), so (up to details of raw -% encoding) {1}{2}{{1}{2}}{3}, which gives 4 braced arguments to macro #2.| +% encoding) {1}{2}{{1}{2}}{3}, which gives 4 braced arguments to macro #2. +%\end{lverb} % \begin{macrocode} \def\XINT:NEhook:userfunc #1#2#3{#2#3\iffalse{{\fi}}}% % \end{macrocode} -% \lverb|Here #1 indicates the number k-1 of standard positional arguments of +%\begin{lverb} +% Here #1 indicates the number k-1 of standard positional arguments of % the call signature, the kth and last one having been declared of variadic % type. The braces around \xintTrim{#1}{#4} have the effect to gather all % these remaining elements to provide a single one to the TeX macro. @@ -44731,20 +46389,21 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % items that z is mapped to the ople of extra elements beyond the first % two ones. For my sanity I stick with my January 2020 concept of (x,y,*z) % which makes z stand for a nutple always and having to be used as such in the -% function body (possibly unpacked there using *z).| +% function body (possibly unpacked there using *z). +%\end{lverb} % \begin{macrocode} \def\XINT:NEhook:userfunc:argv #1#2#3#4% {\expandafter#3\expanded{\xintKeep{#1}{#4}{\xintTrim{#1}{#4}}}\iffalse{{\fi}}}% -\let\xintdefefunc\xintdeffunc -\let\xintdefiifunc\xintdefiifunc -\let\xintdeffloatefunc\xintdeffloatfunc % \end{macrocode} % \subsubsection{\csh{xintdefufunc}, \csh{xintdefiiufunc}, % \csh{xintdeffloatufunc}} % -% \lverb|Added at 1.4| +%\begin{lverb} +% Added at 1.4 +%\end{lverb} % \changed[2022/05/15]{1.4k} -% \lverb+The \xintexprSafeCatcodes was not paired correctly with +%\begin{lverb} +% The \xintexprSafeCatcodes was not paired correctly with % \xintexprRestoreCatcodes which was in only one branch of \xint_defufunc_b, % and as a result sanitization of catcodes was never reverted. That the % bug remained unseen and in particular did not break compilation of @@ -44754,7 +46413,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % i.e. it did a restore to the state before the first unpaired Safe, and this % miraculous recovery happened before breakage had happened, by sheer luck, % or rather lack of luck, else I would have seen and solved -% the problem two years ago...+ +% the problem two years ago... +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa #1#2#3#4#5#6% {% @@ -44821,6 +46481,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % See the \csbxint{unassignvar} for the embarrassing explanations why I had % not done that earlier. A bit lazy here, no warning if undefining something % not defined, and attention no precaution respective built-in functions. +% % \begin{macrocode} \def\XINT_tmpa #1{\expandafter\def\csname xintunassign#1func\endcsname ##1{% \edef\XINT_unfunc_tmpa{##1}% @@ -44838,7 +46499,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_tmpa{expr}\XINT_tmpa{iiexpr}\XINT_tmpa{floatexpr}% % \end{macrocode} % \subsubsection{\csh{xintNewFunction}} -% \lverb|1.2h (2016/11/20). Syntax is \xintNewFunction{<name>}[nb of +%\begin{lverb} +% 1.2h (2016/11/20). Syntax is \xintNewFunction{<name>}[nb of % arguments]{expression with #1, #2,... as in \xintNewExpr}. This defines % a function for all three parsers but the expression parsing is delayed until % function execution. Hence the expression admits all constructs, contrarily @@ -44849,7 +46511,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % ...) how to decide if #1 stands for a or a, b etc... ? Or course «a» can be % packed and thus the macro function can handle #1 as a «nutple» and for this % be defined with the * unpacking operator being applied to it. -% | +%\end{lverb} % \begin{macrocode} \def\xintNewFunction #1#2[#3]#4% {% @@ -45064,7 +46726,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }}\expandafter\XINT:NE:f:iitacitzeroifone:direct\string#% \def\XINT:NE:f:iitacitzeroifone_a #1#2&&A#3% {% - \detokenize{\romannumeral`$XINT_expr_null\expandafter#1\expanded{#2}$XINT_expr_exclam#3}% + \detokenize + {\romannumeral`$XINT_expr_null\expandafter#1\expanded{#2}$XINT_expr_exclam#3}% }% \def\XINT:NE:f:iitacitzeroifone_b\XINT:expr:f:iitacitzeroifone #1#2#3&&A#4% {% @@ -45138,7 +46801,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }}\expandafter\XINT:NE:f:from:delim:u\string#% \def\XINT:NE:f:from:delim:u:p #1#2^% {% - \detokenize{\expandafter\XINT:fooof:checkifnumber\expandafter#1}~expanded{#2}$XINT_expr_caret%$ + \detokenize + {\expandafter\XINT:fooof:checkifnumber\expandafter#1}~expanded{#2}$XINT_expr_caret%$ }% \def\XINT:fooof:checkifnumber#1{\expandafter\XINT_fooof_checkifnumber\expandafter#1\string}% \def\XINT:NE:f:LFL#1#2{\expandafter\XINT:NE:f:LFL_a\expandafter#1#2\XINT:NE:f:LFL_a}% @@ -45172,6 +46836,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \XINT:NE:exec_?_b #2&&A#1{#2}% }% +% \end{macrocode} +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`- 11 }\FixInterMacrocodeVspace +% \begin{macrocode} \def\XINT:NE:exec_?_b #1{% \def\XINT:NE:exec_?_b ##1&&A% {% @@ -45221,6 +46888,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #1#2{~expanded{~xintiiifSgn#3}}% }% \catcode`- 12 +% \end{macrocode} +% \let\MakePrivateLetters\xintexprMakePrivateLetters\FixInterMacrocodeVspace +% \begin{macrocode} \def\XINT:NE:branch #1% {% \if0\XINT:NE:hastilde #1~!\relax 0\else @@ -45446,11 +47116,19 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {{% \detokenize {% +% \end{macrocode} +% Attention (2022/06/10) I do not remember why I left these two commented +% lines which docstrip will not remove, I hope this is not a forgotten +% left=over from some debugging session. +% \begin{macrocode} %% \expanded %% {% \expandafter\XINT:expr:mapwithin_checkempty \expanded{\noexpand#1$XINT_expr_exclam\expandafter}%$ \detokenize\expandafter{\expanded{#2}}$XINT_expr_caret%$ +% \end{macrocode} +% This is is the matching one. +% \begin{macrocode} %% }% }% }}% @@ -45474,7 +47152,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Attention here that user function % names may contain digits, so we don't use a \detokenize or ~ approach. % @@ -45490,7 +47168,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % The \XINTusefunc % uses \expanded. Its ancestor \xintExpandArgs (xinttools 1.3) % had some more primitive f-expansion technique. -% | +%\end{lverb} % \begin{macrocode} \def\XINTusenoargfunc #1% {% @@ -45549,14 +47227,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsubsection{\csh{XINT_expr_redefinemacros}} -% \lverb|Completely refactored at 1.3. +%\begin{lverb} +% Completely refactored at 1.3. % % Again refactored at 1.4. The availability of \expanded allows more powerful % mechanisms and more importantly I better thought out the root problems % caused by the handling of list operations in this context and this helped % simplify considerably the code. -% -% | +%\end{lverb} +% \odef\MakePrivateLetters{\MakePrivateLetters\catcode`- 11 }^^A % \begin{macrocode} \catcode`- 11 \def\XINT_expr_redefinemacros {% @@ -45603,9 +47282,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \catcode`- 12 % \end{macrocode} +% \let\MakePrivateLetters\xintexprMakePrivateLetters % \subsubsection{\csh{xintNewExpr}, \csh{xintNewIExpr}, \csh{xintNewFloatExpr}, % \csh{xintNewIIExpr}} -% \lverb|& +%\begin{lverb} % 1.2c modifications to accomodate \XINT_expr_deffunc_newexpr etc.. % % 1.2f adds token \XINT_newexpr_clean to be able to have a different @@ -45625,7 +47305,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % The #2#3 in clean stands for \noexpand\XINTfstop (where the actual % scantoken-ized input uses $$ originally with catcode letter as the escape % character). -% | +%\end{lverb} % \begin{macrocode} \def\xintNewExpr {\XINT_NewExpr\xint_firstofone\xintexpr \XINT_newexpr_clean}% \def\xintNewFloatExpr{\XINT_NewExpr\xint_firstofone\xintfloatexpr\XINT_newexpr_clean}% @@ -45635,7 +47315,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_newexpr_clean #1>#2#3{\noexpand\expanded\noexpand\xintNEprinthook}% \def\xintNEprinthook#1.#2{\expanded{\unexpanded{#1.}{#2}}}% % \end{macrocode} -% \lverb|1.2c for \xintdeffunc, \xintdefiifunc, \xintdeffloatfunc. +%\begin{lverb} +% 1.2c for \xintdeffunc, \xintdefiifunc, \xintdeffloatfunc. % % At 1.3, NewFunc does not use anymore a comma delimited pattern for the % arguments to the macro being defined. @@ -45643,14 +47324,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % At 1.4 we use \xintthebareeval, whose meaning now does not mean unlock % from csname but firstofone to remove a level of braces % This is involved in functioning of expr:userfunc and expr:userefunc -% | +%\end{lverb} % \begin{macrocode} \def\XINT_NewFunc {\XINT_NewExpr\xint_gobble_i\xintthebareeval\XINT_newfunc_clean}% \def\XINT_NewFloatFunc{\XINT_NewExpr\xint_gobble_i\xintthebarefloateval\XINT_newfunc_clean}% \def\XINT_NewIIFunc {\XINT_NewExpr\xint_gobble_i\xintthebareiieval\XINT_newfunc_clean}% \def\XINT_newfunc_clean #1>{}% % \end{macrocode} -% \lverb|1.2c adds optional logging. For this needed to pass to _NewExpr_a the +%\begin{lverb} +% 1.2c adds optional logging. For this needed to pass to _NewExpr_a the % macro name as parameter. % % Up to and including 1.2c the definition was global. Starting with 1.2d it is @@ -45663,7 +47345,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \xintexprSafeCatcodes, as it gets already done by \xintdeffunc prior % to arriving here. % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_NewExpr #1#2#3#4#5[#6]% {% @@ -45685,7 +47367,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_NewExpr_a #1#2#3#4% }% % \end{macrocode} -% \lverb|& attention que & est de catcode 14 +%\begin{lverb} +% $catcode38 12 % % 1.2d's \xintNewExpr makes a local definition. In earlier releases, the % definition was global. @@ -45724,7 +47407,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % contain digits by the way), when the macro can not be immediately fully % expanded. Thus its meaning (with its possibly funny catcodes) is not % exposed. And this gives opportunity to pre-expand its arguments before -% actually expanding the macro. | +% actually expanding the macro. +%\end{lverb} % \begin{macrocode} \catcode`~ 3 \catcode`? 3 \def\XINT_expr_tilde{~}\def\XINT_expr_qmark{?}% catcode 3 @@ -45759,9 +47443,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsubsection{\csh{xintexprSafeCatcodes}, \csh{xintexprRestoreCatcodes}} % \changed[2018/06/17]{1.3c} -% \lverb|Added \ifxintexprsafecatcodes to allow nesting| +%\begin{lverb} +% Added \ifxintexprsafecatcodes to allow nesting +%\end{lverb} % \changed[2022/05/15]{1.4k} -% \lverb|The "allow nesting" from the 2018 comment was strange, because +%\begin{lverb} +% The "allow nesting" from the 2018 comment was strange, because % the behaviour, as correctly documented in user manual, was that % in case of a series of \xintexprSafeCatcodes, the \xintexprRestoreCatcodes % would set catcodes to what they were before the *first* sanitization. @@ -45771,12 +47458,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % very lame situation. Anyway. I finally % fix at 1.4k that by removing the silly \ifxintexprsafecatcodes thing % and replace it by some stack-like method, avoiding extra macros -% thanks to the help of \unexpanded.| +% thanks to the help of \unexpanded. +%\end{lverb} +% \changed{1.4m} Use |\protected| rather than |\unexpanded| mechanism, +% for lisibility. % \begin{macrocode} -\def\xintexprRestoreCatcodes{}% +\protected\def\xintexprRestoreCatcodes{}% \def\xintexprSafeCatcodes {% - \edef\xintexprRestoreCatcodes {% + \protected\edef\xintexprRestoreCatcodes{% \endlinechar=\the\endlinechar \catcode59=\the\catcode59 % ; \catcode34=\the\catcode34 % " @@ -45801,8 +47491,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \catcode44=\the\catcode44 % , \catcode61=\the\catcode61 % = \catcode96=\the\catcode96 % ` - \catcode32=\the\catcode32 % space - \def\noexpand\xintexprRestoreCatcodes{\unexpanded\expandafter{\xintexprRestoreCatcodes}}% + \catcode32=\the\catcode32\relax % space + \protected\odef\xintexprRestoreCatcodes{\xintexprRestoreCatcodes}% }% \endlinechar=13 % \catcode59=12 % ; @@ -45833,7 +47523,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \let\XINT_tmpa\undefined \let\XINT_tmpb\undefined \let\XINT_tmpc\undefined \let\XINT_tmpd\undefined \let\XINT_tmpe\undefined % \end{macrocode} -%\lverb|1.4l makes \usepackage{xintlog} with no prior \usepackage{xintexpr} +%\begin{lverb} +% 1.4l makes \usepackage{xintlog} with no prior \usepackage{xintexpr} % not abort but attempt to do the right thing. We have to work-around the % fact that LaTeX will ignore a \usepackage here. Simpler for non-LaTeX. % @@ -45844,34 +47535,65 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % their own endinput wrappers. And that the rescue attempt of loading % xintexpr (which will load xintlog) from xintlog itself is done carefully. % -% | +%\end{lverb} % \begin{macrocode} \ifdefined\RequirePackage \ifcsname ver@xinttrig.sty\endcsname +% \end{macrocode} +% We end up here since |1.4l| with \LaTeX{} if the user has issued +% |\usepackage{xinttrig}| or |\RequirePackage{xinttrig}| with no prior loading +% of \xintexprnameimp. In such (not officially supported) case, the loading +% of |xintexpr| was launched from this first instance of \xinttrignameimp. +% This first \xinttrignameimp will abort itself, once this input conludes. +% But before that a second instance of \xinttrignameimp is |\input| and will +% do all its macro definitions. We can not do |\RequirePackage{xinttrig}| or +% |\usepackage{xinttrig}| as it has occurred already under the user +% responsability, so we use |\@@input|. +% \begin{macrocode} \@@input xinttrig.sty\relax \else +% \end{macrocode} +% Here this is either the normal case with \LaTeX{} (or other formats +% providing |\RequirePackage|) and \xintexprnameimp requested by user +% directly, or some more exotic possibility such as \eTeX{} with the +% \ctanpackage{miniltx} loaded and then |\input xintexpr.sty\relax| was done. +% As |\RequirePackage| appears to be defined we use it. +% \begin{macrocode} \RequirePackage{xinttrig}% \fi +% \end{macrocode} +% Same situation with \xintlognameimp. +% \begin{macrocode} \ifcsname ver@xintlog.sty\endcsname \@@input xintlog.sty\relax \else \RequirePackage{xintlog}% \fi \else +% \end{macrocode} +% Here we are not with \LaTeX{} and not with \ctanpackage{miniltx} either. +% Let's just use |\input|. Perhaps there was an |\input xinttrig.sty| earlier +% which triggered |\input xintexpr.sty| after a warning to the user. The +% second |\input xinttrig.sty| issued here will execute the macro definitions, +% and the former one will abort its own input after that. +% \begin{macrocode} \input xinttrig.sty \input xintlog.sty \fi \XINTrestorecatcodesendinput% % \end{macrocode} +% \setcounter{xintMacroCnt}{\the\numexpr452+\value{xintMacroCnt}\relax} % \StoreCodelineNo {xintexpr} +% \etocsettocdepth{subsubsection} % \cleardoublepage\let\xintexprnameUp\undefined %\gardesactifs %\let</xintexpr>\relax %\let<*xinttrig>\gardesinactifs %</xintexpr>^^A-------------------------------------------------- %<*xinttrig>^^A--------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xinttrignameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xinttrignameimp implementation} % \RaisedLabel{sec:trigimp} % \etocarticlestylenomarks @@ -45880,7 +47602,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \localtableofcontents % % A preliminary implementation was done only late in the development of -% \cs{xintexpr}, as an example of the high level user interface, in January +% \xintexprnameimp, as an example of the high level user interface, in January % 2019. In March and April 2019 I improved the algorithm for the inverse % trigonometrical functions and included the whole as a new \csbxint{expr} % module. But, as the high level interface provided no way to have @@ -45953,7 +47675,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % \subsection{Catcodes, \protect\eTeX{} and reload detection} % \changed{1.4l} -% \lverb|Silly paranoid modification of \z in case { and } do not have their +%\begin{lverb} +% Silly paranoid modification of \z in case { and } do not have their % normal catcodes when xinttrig.sty is reloaded (initial loading via % xintexpr.sty does not need this), to define \XINTtrigendinput there and not % after the \endgroup from \z has already restored possibly bad catcodes. @@ -45962,7 +47685,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % previous loading of xintexpr (or same with \input and etex). cf comments in % xintlog.sty. % -%| +%\end{lverb} % \begin{macrocode} \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode13=5 % ^^M @@ -45980,7 +47703,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\let\expandafter\x\csname ver@xinttrig.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintexpr.sty\endcsname \expandafter - \ifx\csname PackageWarning\endcsname\relax + \ifx\csname PackageWarningNoLine\endcsname\relax \def\y#1#2{\immediate\write128{^^JPackage #1 Warning:^^J% \space\space\space\space#2.^^J}}% \else @@ -46018,6 +47741,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \catcode`? 12 % \end{macrocode} % \subsection{Library identification} +% If the file has already been loaded, let's skip the |\ProvidesPackage|. +% Else let's do it and set a flag to indicate loading happened at least once +% already. +% \changed{1.4l} +% Message also to Terminal not only log file. % \begin{macrocode} \ifcsname xintlibver@trig\endcsname \expandafter\xint_firstoftwo @@ -46025,10 +47753,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\xint_secondoftwo \fi {\immediate\write128{Reloading xinttrig library using Digits=\xinttheDigits.}}% -{\expandafter\gdef\csname xintlibver@trig\endcsname{2022/05/29 v1.4l}% -\XINT_providespackage -\ProvidesPackage{xinttrig}% -[2022/05/29 v1.4l Trigonometrical functions for xintexpr (JFB)]% +{\expandafter\gdef\csname xintlibver@trig\endcsname{2022/06/10 v1.4m}% + \XINT_providespackage + \ProvidesPackage{xinttrig}% + [2022/06/10 v1.4m Trigonometrical functions for xintexpr (JFB)]% }% % \end{macrocode} % \subsection{Ensure used letters are dummy letters} @@ -46036,23 +47764,25 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xintFor* #1 in {iDTVtuwxyzX}\do{\xintensuredummy{#1}}% % \end{macrocode} % \subsection{\csh{xintreloadxinttrig}} -% \lverb|Much simplified at 1.4e, from a modified catcode regime management.| +%\begin{lverb} +% Much simplified at 1.4e, from a modified catcode regime management. +%\end{lverb} % \begin{macrocode} \def\xintreloadxinttrig{\input xinttrig.sty }% % \end{macrocode} % \subsection{Auxiliary variables} -% \lverb|& +%\begin{lverb} % The variables with private names have extra digits. Whether private or % public, the variables can all be redefined without impacting the defined % functions, whose meanings will contain already the variable values. % % Formerly variables holding the 1/n! were defined, but this got removed at 1.4e. -% | +%\end{lverb} % \subsubsection{\cshn{@twoPi}, \cshn{@threePiover2}, \cshn{@Pi}, \cshn{@Piover2}} -% \lverb|& +%\begin{lverb} % At 1.4e we need more digits, also \xintdeffloatvar changed and always rounds % to P=Digits precision so we use another path to store values with extra digits. -% | +%\end{lverb} % \begin{macrocode} \xintdefvar @twoPi := float( @@ -46072,10 +47802,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% ,\XINTdigitsormax+4);% % \end{macrocode} % \subsubsection{\cshn{@oneDegree}, \cshn{@oneRadian}} -% \lverb|& +%\begin{lverb} % Those are needed for range reduction, particularly @oneRadian. We define % it with 12 extra digits. But the whole process of range reduction in radians -% is very naive one.| +% is very naive one. +%\end{lverb} % \begin{macrocode} \xintdefvar @oneDegree := float( @@ -46087,19 +47818,22 @@ on input line \noexpand\the\inputlineno.&&J}}#2% ,\XINTdigitsormax+12);% % \end{macrocode} % \subsection{Hack \cs{xintdeffloatfunc} for inserting usage of guard digits} -% \lverb|1.4e. This is not a general approach, but it sufficient for the +%\begin{lverb} +% 1.4e. This is not a general approach, but it sufficient for the % limited use case done here of \xintdeffloatfunc. What it does is to let % \xintdeffloatfunc hardcode usage of macros which will execute computations % with an elevated number of digits. But for example if 5/3 is encountered in % a float expression it will remain unevaluated so one would have to use % alternate input syntax for efficiency (\xintexpr -% float(5/3,\xinttheDigits+4)\relax as a subexpression, for example).| +% float(5/3,\xinttheDigits+4)\relax as a subexpression, for example). +%\end{lverb} % \begin{macrocode} \catcode`~ 12 \def\XINT_tmpa#1#2#3.#4.% {% \let #1#2% - \def #2##1##2##3##4{##2##3{{~expanded{~unexpanded{#4[#3]}~expandafter}~expanded{##1##4}}}}% + \def #2##1##2##3##4% + {##2##3{{~expanded{~unexpanded{#4[#3]}~expandafter}~expanded{##1##4}}}}% }% \expandafter\XINT_tmpa \csname XINT_flexpr_exec_+_\expandafter\endcsname @@ -46137,7 +47871,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \catcode`~ 3 % \end{macrocode} % \subsection{The sine and cosine series} -% \lverb|& +%\begin{lverb} % Old pending question: should I rather use successive divisions by (2n+1)(2n), or rather % multiplication by their precomputed inverses, in a modified Horner scheme ? % The \ifnum tests are executed at time of definition. @@ -46171,10 +47905,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % But the main reason I don't do it now is that I spend too much time % fine-tuning the table of thresholds... maybe in next release. -% | +%\end{lverb} % \subsubsection{Support macros for the sine and cosine series} % -% \lverb|Computing the 1/n! from n! then inverting would require +%\begin{lverb} +% Computing the 1/n! from n! then inverting would require % costly divisions and significantly increase the loading time. % % So a method is employed to simply divide by 2k(2k-1) or (2k+1)(2k) @@ -46182,7 +47917,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % reducing the sizes of the mantissas at each step. % % This whole section is conditional on Digits being at least nine. -% | +%\end{lverb} % % \begin{macrocode} \ifnum\XINTdigits>8 @@ -46240,7 +47975,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def##4########1\xint:########2\xint: {% \expandafter##5% - \romannumeral0\xintsub{####5}{\XINTinFloat[####1]{\xintMul{########1}{########2}}}\xint: + \romannumeral0\xintsub{####5}% + {\XINTinFloat[####1]{\xintMul{########1}{########2}}}\xint: }% }% }% @@ -46390,7 +48126,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{Range reduction for sine and cosine using degrees} % -% \lverb|& +%\begin{lverb} % As commented in the package introduction, Range reduction is a demanding % domain and we handle it semi-satisfactorily. The main problem is that in % January 2019 I had done only support for degrees, and when I added radians I @@ -46409,9 +48145,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % with a positive argument. % % We start with an auxiliary macro to reduce modulo 360 quickly. -% | +%\end{lverb} % \subsubsection{Low level modulo 360 helper macro \csh{XINT_mod_ccclx_i}} -% \lverb|& +%\begin{lverb} % input: \the\numexpr\XINT_mod_ccclx_i k.N. (delimited by dots) % % output: (N times 10^k) modulo 360. (with a final dot) @@ -46422,7 +48158,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % 360 divides 9000 hence 10^{k} is 280 for k at least 3 and the additive % group generated by it modulo 360 is the set of multiples of 40. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_mod_ccclx_i #1.% {% @@ -46439,10 +48175,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_mod_ccclx_jb #1\xint_firstoftwo#2#3{#1+0)*280\XINT_mod_ccclx_jc #1#3}% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Attention that \XINT_cclcx_e wants non negative input because \numexpr % division is not periodical ... -% | +%\end{lverb} % \begin{macrocode} \def\XINT_mod_ccclx_jc +#1+#2+#3#4\relax{+80*(#3+#2+#1)+#3#2#1.}% \def\XINT_mod_ccclx_e#1.{\expandafter\XINT_mod_ccclx_z\the\numexpr(#1+180)/360-1.#1.}% @@ -46456,7 +48192,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral`&&@\XINT:NEhook:f:one:from:one{\romannumeral`&&@\xintSind#3}}% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % old comment: Must be f-expandable for nesting macros from \xintNewExpr % % This is where the prize of using the same macros for two distinct use cases @@ -46470,7 +48206,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % improvement, when times allows. % % ATTENTION \xintSind ONLY FOR POSITIVE ARGUMENTS -% | +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa #1.{% \def\xintSind##1% @@ -46506,8 +48242,6 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \else\expandafter\XINT_sind_E\the\numexpr-360+% \fi#1.% }% -% \end{macrocode} -% \begin{macrocode} \def\XINT_tmpa #1.#2.{% \def\XINT_sind_A##1.##2.% {% @@ -46564,9 +48298,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral`&&@\XINT:NEhook:f:one:from:one{\romannumeral`&&@\xintCosd#3}}% }% % \end{macrocode} -% \lverb|& +%\begin{lverb} % ATTENTION ONLY FOR POSITIVE ARGUMENTS -% | +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa #1.{% \def\xintCosd##1% @@ -46603,10 +48337,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi#1.% }% % \end{macrocode} -% \lverb|#2 will be empty in the "integer" branch, but attention in general +%\begin{lverb} +% #2 will be empty in the "integer" branch, but attention in general % branch to handling of negative integer part after the subtraction of 90, % 180, 270, or 360. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa#1.#2.{% \def\XINT_cosd_A##1.##2.% @@ -46657,14 +48392,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_cosd_D#1{\xint_UDsignfork#1\XINT_cosd_D_n-\XINT_cosd_D_p\krof #1}% % \end{macrocode} % \subsection{\cshn{@sind()}, \cshn{@cosd()}} -% \lverb|& +%\begin{lverb} % The -45 is stored internally as -45/1[0] from the action of the unary minus % operator, which float macros then parse faster. The 45e0 is to let it become % 45[0] and not simply 45. % % Here and below the \ifnum\XINTdigits>8 45\else60\fi will all be resolved % at time of definition. This is the charm and power of expandable parsers! -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @sind(x) := (x)?? {(x>=-\ifnum\XINTdigits>8 45\else60\fi)? @@ -46690,7 +48425,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% ;% % \end{macrocode} % \subsection{\cshn{@sin()}, \cshn{@cos()}} -% \lverb|& +%\begin{lverb} % For some reason I did not define sin() and cos() in January 2019 ?? % % The sub \xintexpr x*@oneRadian\relax means that the multiplication will be @@ -46699,7 +48434,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \xintCosd, to P+12 mantissa. % % The strange 79e-2 could be 0.79 which would give 79[-2] internally too. -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @sin(x):= (abs(x)<\ifnum\XINTdigits>8 79e-2\else1e0\fi)? {@sin_series(x)} @@ -46715,10 +48450,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% ;% % \end{macrocode} % \subsection{\cshn{@sinc()}} -% \lverb|& +%\begin{lverb} % Should I also consider adding (1-cos(x))/(x^2/2) ? it is sinc^2(x/2) but % avoids a square. -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @sinc(x):= (abs(x)<\ifnum\XINTdigits>8 79e-2\else1e0\fi) ? {@sin_aux(sqr(x))} @@ -46726,8 +48461,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% ;% % \end{macrocode} % \subsection{\cshn{@tan()}, \cshn{@tand()}, \cshn{@cot()}, \cshn{@cotd()}} -% \lverb|The 0 in cot(x) is a dummy place holder. We don't have a notion of -% Inf yet.| +%\begin{lverb} +% The 0 in cot(x) is a dummy place holder. We don't have a notion of +% Inf yet. +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @tand(x):= @sind(x)/@cosd(x);% \xintdeffloatfunc @cotd(x):= @cosd(x)/@sind(x);% @@ -46760,7 +48497,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{Core routine for inverse trigonometry} % -% \lverb|& +%\begin{lverb} % I always liked very much the general algorithm whose idea I found % in 2019. But it costs a square root plus a sine plus a cosine all % at target precision. For the arctangent the square root will be @@ -46810,12 +48547,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % All seems to work perfectly fine, in practice... % % -% | +%\end{lverb} % -% \lverb|First we let the @sin_aux() and @cos_aux() functions be usable in exact +%\begin{lverb} +% First we let the @sin_aux() and @cos_aux() functions be usable in exact % \xintexpr context. % -% The @asin_II() function will be used only for Digits>16.| +% The @asin_II() function will be used only for Digits>16. +%\end{lverb} % \begin{macrocode} \expandafter\let\csname XINT_expr_func_@sin_aux\expandafter\endcsname \csname XINT_flexpr_func_@sin_aux\endcsname @@ -46854,7 +48593,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_Arcsin_II_b##1\xint: {% - \expandafter\XINT_Arcsin_II_c_i\romannumeral0\xintadd{#4}{\XINTinFloat[#2]{\xintMul{#3}{##1}}}\xint: + \expandafter\XINT_Arcsin_II_c_i + \romannumeral0\xintadd{#4}{\XINTinFloat[#2]{\xintMul{#3}{##1}}}\xint: }% \def\XINT_Arcsin_II_c_i##1\xint:##2\xint: {% @@ -46904,7 +48644,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral`&&@\XINT:NEhook:f:one:from:one {\romannumeral`&&@\XINT_Arcsin_I#3}}% }% -\def\XINT_Arcsin_I#1{\the\numexpr\expandafter\XINT_Arcsin_Ia\romannumeral0\xintiround9{#1}.}% +\def\XINT_Arcsin_I#1% +{% + \the\numexpr\expandafter\XINT_Arcsin_Ia\romannumeral0\xintiround9{#1}.% +}% \def\XINT_Arcsin_Ia#1.% {% (\expandafter\XINT_Arcsin_Ib\the\numexpr#1*#1/\xint_c_x^ix.)*% @@ -46957,9 +48700,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xintdeffloatfunc @asin_l(t, u) := @asin_m(@asin_I(t), t, u);% % \end{macrocode} % \subsection{\cshn{@asin()}, \cshn{@asind()}} -% \lverb|& +%\begin{lverb} % Only non-negative arguments t and u for asin_a(t,u), and asind_a(t,u). -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @asin_a(t, u) := (t<u)? {@asin_l(t, u)} @@ -46986,13 +48729,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xintdeffloatfunc @acosd(t):= 9e1 - @asind(t);% % \end{macrocode} % \subsection{\cshn{@atan()}, \cshn{@atand()}} -% \lverb|& +%\begin{lverb} % Uses same core routine asin_l() as for asin(), but avoiding a square-root % extraction in preparing its arguments (to the cost of computing an inverse, % rather). % % radians -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @atan_b(t, w, z):= 5e-1 * (w< 0)? {@Pi - @asin_a(2e0*z * t, -w*z)} @@ -47005,9 +48748,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {@atan_a(t, sqr(t))} ;% % \end{macrocode} -% \lverb|& +%\begin{lverb} % degrees -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @atand_b(t, w, z) := 5e-1 * (w< 0)? {18e1 - @asind_a(2e0*z * t, -w*z)} @@ -47021,9 +48764,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% ;% % \end{macrocode} % \subsection{\cshn{@Arg()}, \cshn{@atan2()}, \cshn{@Argd()}, \cshn{@atan2d()}, \cshn{@pArg()}, \cshn{@pArgd()}} -% \lverb|& +%\begin{lverb} % Arg(x,y) function from -π (excluded) to +π (included) -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @Arg(x, y):= (y>x)? {(y>-x)? @@ -47039,16 +48782,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% } ;% % \end{macrocode} -% \lverb|& +%\begin{lverb} % atan2(y,x) = Arg(x,y) ... (some people have atan2 with arguments reversed % but the convention here seems the most often encountered) -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @atan2(y,x) := @Arg(x, y);% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Argd(x,y) function from -180 (excluded) to +180 (included) -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @Argd(x, y):= (y>x)? {(y>-x)? @@ -47064,16 +48807,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% } ;% % \end{macrocode} -% \lverb|& +%\begin{lverb} % atan2d(y,x) = Argd(x,y) -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @atan2d(y,x) := @Argd(x, y);% % \end{macrocode} -% \lverb|& +%\begin{lverb} % pArg(x,y) function from 0 (included) to 2π (excluded) % I hesitated between pArg, Argpos, and Argplus. Opting for pArg in the end. -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @pArg(x, y):= (y>x)? {(y>-x)? @@ -47089,9 +48832,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% } ;% % \end{macrocode} -% \lverb|& +%\begin{lverb} % pArgd(x,y) function from 0 (included) to 360 (excluded) -% | +%\end{lverb} % \begin{macrocode} \xintdeffloatfunc @pArgd(x, y):=(y>x)? {(y>-x)? @@ -47107,8 +48850,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% } ;% % \end{macrocode} -% \subsection{Restore \cs{xintdeffloatfunc} to its normal state, with no extra -% digits} +% \subsection{Restore \cs{xintdeffloatfunc} to its normal state, with no extra digits} % \begin{macrocode} \expandafter\let \csname XINT_flexpr_exec_+\expandafter\endcsname @@ -47133,9 +48875,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \csname XINT_flexpr_invfunc\endcsname % \end{macrocode} % \subsection{Let the functions be known to the \cshnolabel{xintexpr} parser} -% \lverb|& +%\begin{lverb} % We use here float_dgtormax which uses the smaller of Digits and 64. -% | +%\end{lverb} % \begin{macrocode} \edef\XINTinFloatdigitsormax{\noexpand\XINTinFloat[\the\numexpr\XINTdigitsormax]}% \edef\XINTinFloatSdigitsormax{\noexpand\XINTinFloatS[\the\numexpr\XINTdigitsormax]}% @@ -47151,15 +48893,19 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {% \xintdeffloatfunc #1(x, y) := float_dgtormax(@#1(x, y));% \xintdeffloatfunc #1d(x, y) := float_dgtormax(@#1d(x, y));% - \xintdeffunc #1(x, y) := float_dgtormax(\xintfloatexpr @#1(sfloat_dgtormax(x), sfloat_dgtormax(y))\relax);% - \xintdeffunc #1d(x, y):= float_dgtormax(\xintfloatexpr @#1d(sfloat_dgtormax(x), sfloat_dgtormax(y))\relax);% + \xintdeffunc #1(x, y) := + float_dgtormax(\xintfloatexpr @#1(sfloat_dgtormax(x), sfloat_dgtormax(y))\relax);% + \xintdeffunc #1d(x, y):= + float_dgtormax(\xintfloatexpr @#1d(sfloat_dgtormax(x), sfloat_dgtormax(y))\relax);% }% \xintdeffloatfunc sinc(x):= float_dgtormax(@sinc(x));% \xintdeffunc sinc(x):= float_dgtormax(\xintfloatexpr @sinc(sfloat_dgtormax(x))\relax);% % \end{macrocode} % \subsection{Synonyms: \cshn{@tg()}, \cshn{@cotg()}} -% \lverb|These are my childhood notations and I am attached to them. In -% radians only, and for \xintfloateval only. We skip some overhead here by using a \let at core level.| +%\begin{lverb} +% These are my childhood notations and I am attached to them. In +% radians only, and for \xintfloateval only. We skip some overhead here by using a \let at core level. +%\end{lverb} % \begin{macrocode} \expandafter\let\csname XINT_flexpr_func_tg\expandafter\endcsname \csname XINT_flexpr_func_tan\endcsname @@ -47167,9 +48913,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \csname XINT_flexpr_func_cot\endcsname % \end{macrocode} % \subsection{Final clean-up} -% \lverb|Restore used dummy variables to their status prior to the package reloading. +%\begin{lverb} +% Restore used dummy variables to their status prior to the package reloading. % On first loading this is not needed, but I have not added a way to check -% here whether this a first loading or a re-loading.| +% here whether this a first loading or a re-loading. +%\end{lverb} % \begin{macrocode} \xintdefvar twoPi := float_dgtormax(@twoPi);% \xintdefvar threePiover2 := float_dgtormax(@threePiover2);% @@ -47190,8 +48938,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% %\let<*xintlog>\gardesinactifs %</xinttrig>^^A-------------------------------------------------- %<*xintlog>^^A--------------------------------------------------- -%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; -*- +%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; sentence-end-double-space: t; eval: (auto-fill-mode -1); fill-paragraph-function: nil; -*- % \clearpage\csname xintlognameUp\endcsname +% \let\MakePrivateLetters\xintMakePrivateLetters % \section{Package \xintlognameimp implementation} % \RaisedLabel{sec:logimp} % \etocarticlestylenomarks @@ -47217,7 +48966,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Digits<=8, there is a systematic loss of rounding precision in the floating % point sense in the case of log10(x) for inputs close to 1: % -% \lverb|& +%\begin{lverb} % % Summary of limitations of log10() and pow10() in the case of Digits<=8: %( - For log10(x) with x near 1, the precision of output as floating point& @@ -47239,15 +48988,18 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % inputs are correctly rounded in 99.4$% of cases, and at 6 digits it is& % 99.94$% of cases.& % -% Againd with Digits=8, the log10(i) for i in 1..1000 are all correctly& +% Again with Digits=8, the log10(i) for i in 1..1000 are all correctly& % rounded to 8 digits with two exceptions: log10(3) and log10(297) with a& -% 1ulp error. +% 1ulp error. And the log(i) in the same range are correctly rounded to 8& +% digits with the 15 exceptions i= 99, 105, 130, 178, 224, 329, 446, 464,& +% 564, 751, 772, 777, 886, 907, 962, whose natural logarithms& +% are obtained with a 1ulp error. %: - Regarding the computation of 10^x, I obtained for -1<x<1 the following& % with 10000 random inputs: 518/10000 errors at 1ulp, 60/10000, and 8/10000,& % at respectively Digits = 8, 7, 6 so chances of correct rounding are& % respectively about 95$%, 99.4$% and more than 99.9$%. %) -% | +%\end{lverb} % % Despite its limitations the poormanlog based approach used for Digits up to % 8 has the advantage of speed (at least 8X compared to working with 16 @@ -47264,14 +49016,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % computations which have always been marked as provisory and rudimentary and % instills intrinsic non-efficiency: % -%\lverb|& +%\begin{lverb} %( - no internal data format for a ``floating point number at P digits'', %: - mantissa lengths are again and again computed, %: - digits are not pre-organized say in blocks of 4 by 4 or 8 by 8, %: - floating point multiplication is done via an *exact* multiplication, then& % rounding to P digits! %) -% | +%\end{lverb} % % This is legacy of the fact that the project was initially devoted to big % integers only, but in the weeks that followed its inception in March 2013 I @@ -47299,7 +49051,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % \subsection{Catcodes, \protect\eTeX{} and reload detection} % \changed{1.4l} -% \lverb|Silly paranoid modification of \z in case { and } do not have their +%\begin{lverb} +% Silly paranoid modification of \z in case { and } do not have their % normal catcodes when xintlog.sty is reloaded (initial loading via % xintexpr.sty does not need this), to define \XINTlogendinput there and not % after the \endgroup from \z has already restored possibly bad catcodes. @@ -47312,7 +49065,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % xintexpr itself. This required an adaptation at end of xintexpr and some % care to not leave bad catcodes. % -% | +%\end{lverb} % \begin{macrocode} \begingroup\catcode61\catcode48\catcode32=10\relax% \catcode13=5 % ^^M @@ -47330,7 +49083,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\let\expandafter\x\csname ver@xintlog.sty\endcsname \expandafter\let\expandafter\w\csname ver@xintexpr.sty\endcsname \expandafter - \ifx\csname PackageWarning\endcsname\relax + \ifx\csname PackageWarningNoLine\endcsname\relax \def\y#1#2{\immediate\write128{^^JPackage #1 Warning:^^J% \space\space\space\space#2.^^J}}% \else @@ -47365,7 +49118,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi \z% % \end{macrocode} -% \lverb|Here we set catcodes to the package values, the current settings +%\begin{lverb} +% Here we set catcodes to the package values, the current settings % having been saved in the \XINTlogendinput macro. We arrive here only if % xintlog is either loaded from xintexpr or is being reloaded via an \input % from \xintreloadxintlog. Else we aborted right before via \endinput and do @@ -47374,13 +49128,17 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \XINTsetupcatcodes which would badly redefine \XINTrestorecatcodesendinput % as executed at end of xintexpr.sty. There is slight inefficiency here to % execute \XINTsetcatcodes when xintexpr initiated the xintlog loading, but -% let's live with it.| +% let's live with it. +%\end{lverb} % \begin{macrocode} \XINTsetcatcodes% % \end{macrocode} % \subsection{Library identification} +% If the file has already been loaded, let's skip the |\ProvidesPackage|. +% Else let's do it and set a flag to indicate loading happened at least once +% already. % \changed{1.4l} -% \lverb|Reloading message also to Terminal not only log file.| +% Message also to Terminal not only log file. % \begin{macrocode} \ifcsname xintlibver@log\endcsname \expandafter\xint_firstoftwo @@ -47388,28 +49146,29 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\xint_secondoftwo \fi {\immediate\write128{Reloading xintlog library using Digits=\xinttheDigits.}}% -{\expandafter\gdef\csname xintlibver@log\endcsname{2022/05/29 v1.4l}% -\XINT_providespackage -\ProvidesPackage{xintlog}% -[2022/05/29 v1.4l Logarithms and exponentials for xintexpr (JFB)]% +{\expandafter\gdef\csname xintlibver@log\endcsname{2022/06/10 v1.4m}% + \XINT_providespackage + \ProvidesPackage{xintlog}% + [2022/06/10 v1.4m Logarithms and exponentials for xintexpr (JFB)]% }% % \end{macrocode} % \subsection{\csh{xintreloadxintlog}} -% \lverb|Now needed at 1.4e. +%\begin{lverb} +% Now needed at 1.4e. % -% | +%\end{lverb} % \begin{macrocode} \def\xintreloadxintlog{\input xintlog.sty }% % \end{macrocode} % \subsection{Loading the \cshn{poormanlog} package} -% \lverb|& +%\begin{lverb} % Attention to the catcode regime when loading poormanlog. % % % Also, for xintlog.sty to be multiple-times loadable, we need to avoid using % LaTeX's \RequirePackage twice. % -%| +%\end{lverb} % \begin{macrocode} \xintexprSafeCatcodes \unless\ifdefined\XINTinFloatPowTen @@ -47421,12 +49180,13 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xintexprRestoreCatcodes % \end{macrocode} % \subsection{Macro layer on top of the poormanlog package} -% \lverb|This was moved here with some macro renames from xintfrac on occasion +%\begin{lverb} +% This was moved here with some macro renames from xintfrac on occasion % of 1.4e release. % % Breaking changes at 1.4e: % -%( - \poormanloghack now a no-op, +%( - \poormanloghack now a no-op (removed at 1.4m), %: - \xintLog was used for \xinteval and differed slightly from its& % counterpart used for \xintfloateval, the latter float-rounded& % to P = Digits, the former did not and kept completly meaning-less& @@ -47450,10 +49210,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % See the general xintlog introduction for some comments on the achieved % precision and probabilities of correct rounding. % -% | +%\end{lverb} % % \subsubsection{\csh{PoorManLogBaseTen}, \csh{PoorManLog}} -% \lverb|1.3f. Code originally in poormanlog v0.04 got transferred here. It +%\begin{lverb} +% 1.3f. Code originally in poormanlog v0.04 got transferred here. It % produces the logarithm in base 10 with an error (believed to be at most) of % the order of 1 unit in the 9th (i.e. last, fixed point) fractional % digit. Testing seems to indicate the error is never exceeding 2 units in the @@ -47480,7 +49241,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % from floating point to fixed point, and coercing it into pure floating point % has moral costs. Anyway, I shall obide. % -% | +%\end{lverb} % \begin{macrocode} \def\PoorManLogBaseTen{\romannumeral0\poormanlogbaseten}% \def\poormanlogbaseten #1% @@ -47502,7 +49263,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% % \end{macrocode} % \subsubsection{\csh{PoorManPowerOfTen}, \csh{PoorManExp}} -% \lverb|Originally in poormanlog v0.04, got transferred into xintfrac.sty at +%\begin{lverb} +% Originally in poormanlog v0.04, got transferred into xintfrac.sty at % 1.3f, then here into xintlog.sty at 1.4e. % % Produces 10^x with 9 digits of float precision, with an error (believed to @@ -47525,7 +49287,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % Before using \xintRound we screen out the case of zero as \xintRound in this % case outputs no fractional digits. -% | +%\end{lverb} % \begin{macrocode} \def\PoorManPowerOfTen{\romannumeral0\poormanpoweroften}% \def\poormanpoweroften #1% @@ -47562,22 +49324,15 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\PoorManExp#1{\PoorManPowerOfTen{\xintMul{#1}{43429448190325182765[-20]}}}% % \end{macrocode} % \subsubsection{Removed: \csh{PoorManPower}, see \cshnolabel{XINTinFloatSciPow}} -% \lverb|Removed at 1.4e. See \XINTinFloatSciPow.| -% \subsubsection{Made a no-op: \csh{poormanloghack}} -% \lverb|Made a no-op at 1.4e.| -% \begin{macrocode} -\def\poormanloghack#1% -{% - \xintMessage{xintexpr}{Warning}% - {\string\poormanloghack\space is a no-op since 1.4e and will be removed at next major release}% -}% -% \end{macrocode} +%\begin{lverb} +% Removed at 1.4e. See \XINTinFloatSciPow. +%\end{lverb} % \subsection{Macro support for powers} % % \subsubsection{\csh{XINTinFloatSciPow}} % % -% \lverb|& +%\begin{lverb} % % This is the new name and extension of \XINTinFloatPowerH which was % a non user-documented macro used for a^b previously, and previously @@ -47629,7 +49384,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Digits=8 with perfectly acceptable accuracy for fractional abs(b)<10, and at % high speed, and accuracy for big exponents can be obtained by manually % splitting as above (although the above has no user interface for keeping -% each contribution with its extra digits; a single one for a^h, -1<h<1).| +% each contribution with its extra digits; a single one for a^h, -1<h<1). +%\end{lverb} % \begin{macrocode} \def\XINTinFloatSciPow{\romannumeral0\XINTinfloatscipow}% \def\XINTinfloatscipow#1#2% @@ -47659,9 +49415,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \romannumeral0\XINT_dsx_addzeros{#2}#1;.\XINTdigits.{#3}{\XINTinfloatS[\XINTdigits]}% }% % \end{macrocode} -% \lverb|The \XINT_flpowerh_finish is the sole remnant of \XINTinFloatPowerH +%\begin{lverb} +% The \XINT_flpowerh_finish is the sole remnant of \XINTinFloatPowerH % which was formerly stitched to \xintFloatPower and checked for half-integer -% exponent.| +% exponent. +%\end{lverb} % \begin{macrocode} \def\XINT_scipow_halfint#1/1[#2]#3% {% @@ -47689,13 +49447,14 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_scipow_Aiszero #1\xint:#2#3\xint: {% % \end{macrocode} -% \lverb|Missing NaN and Infinity causes problems. Inserting something +%\begin{lverb} +% Missing NaN and Infinity causes problems. Inserting something % like 1["7FFF8000] is risky as certain macros convert [N] into N zeros... % so the run can appear to stall and will crash possibly badly if we do that. % There is some usage in relation to ilog10 in xint.sty and xintfrac.sty % of "7FFF8000 but here I will stay prudent and insert the usual 0 value % (changed at 1.4g) -% | +%\end{lverb} % \begin{macrocode} \if-#2\xint_dothis {\XINT_signalcondition{InvalidOperation}{0 raised to power #2#3.}{}{ 0[0]}}\fi @@ -47706,8 +49465,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINTinfloatpowten{\xintMul{#2}{\XINTinFloatLogTen_xdgout#1}}% }% % \end{macrocode} -% \lverb|If a^b with a<0, we arrive here only if b was not considered to be -% an integer exponent. So let's raise an error.| +%\begin{lverb} +% If a^b with a<0, we arrive here only if b was not considered to be +% an integer exponent. So let's raise an error. +%\end{lverb} % \begin{macrocode} \def\XINT_scipow_Aisneg #1#2\xint:#3\xint: {% @@ -47716,7 +49477,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \ifnum\XINTdigits<9 % \end{macrocode} -% \lverb|At 1.4f we only need for Digits up to 8 to insert usage of poormanlog +%\begin{lverb} +% At 1.4f we only need for Digits up to 8 to insert usage of poormanlog % for non integer, non half-integer exponents. At 1.4e the code was more % complicated because I had strangely opted for using always the log10() % path. However we have to be careful to use \PML@logbaseten with 9 digits @@ -47725,7 +49487,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % As the legacy macros used for integer and half-integer exponents float-round % the input to Digits digits, we must do the same here for coherence. Which % induces some small complications here. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa#1.#2.#3.{% \def\XINT_scipow_c ##1[##2]##3% @@ -47745,7 +49507,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi % \end{macrocode} % \subsubsection{\cshnolabel{xintPow}} -% \lverb|& +%\begin{lverb} % % Support macro for a^b in \xinteval. This overloads the original % $xintfracnameimp macro, keeping its original meaning only for integer @@ -47775,7 +49537,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % 1.4f fixes this. Also, it handles Digits<=8 as Digits>8, bringing much % simplification here. -% | +%\end{lverb} % \begin{macrocode} \def\xintPow{\romannumeral0\xintpow}% \def\xintpow#1#2% @@ -47783,20 +49545,24 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\XINT_scipow_a\romannumeral0\xintrez{#2}\XINT_pow_int{#1}% }% % \end{macrocode} -% \lverb|In case of half-integer exponent the \XINT_scipow_a will have +%\begin{lverb} +% In case of half-integer exponent the \XINT_scipow_a will have % triggered usage of the (new incarnation) of \XINTinFloatPowerH which combines % \xintFloatPower and square root extraction. So we only have to handle here % the case of integer exponents which will trigger execution of this -% \XINT_pow_int macro passed as parameter to \xintpow.| +% \XINT_pow_int macro passed as parameter to \xintpow. +%\end{lverb} % \begin{macrocode} \def\XINT_pow_int #1/1[#2]% {% \expandafter\XINT_pow_int_a\romannumeral0\XINT_dsx_addzeros{#2}#1;.% }% % \end{macrocode} -% \lverb|1.4e had a bug here for integer exponents >= 10000: they triggered +%\begin{lverb} +% 1.4e had a bug here for integer exponents >= 10000: they triggered % going back to the floating point routine but at a late location where -% the log10()/pow10() approach is used.| +% the log10()/pow10() approach is used. +%\end{lverb} % \begin{macrocode} \def\XINT_pow_int_a #1#2.% {% @@ -47806,9 +49572,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi #1#2.% }% % \end{macrocode} -% \lverb|At 1.4f we correctly jump to the appropriate entry point into the +%\begin{lverb} +% At 1.4f we correctly jump to the appropriate entry point into the % \xintFloatPower routine of $xintfracnameimp, in case of a big integer -% exponent.| +% exponent. +%\end{lverb} % \begin{macrocode} \def\XINT_pow_bigint #1.#2% {% @@ -47817,7 +49585,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def\XINT_pow_int_b #1.#2% {% % \end{macrocode} -% \lverb|We now check if the output will not be too bulky. We use here (on the +%\begin{lverb} +% We now check if the output will not be too bulky. We use here (on the % a of a^b) \xintraw, not \xintrez, on purpose so that for example 9.0^9999 % is computed in floating point sense but 9^9999 is computed exactly. However % 9.0^5000 will be computed exactly. And if I used \xintrez here \xinteval{100^2} @@ -47828,16 +49597,18 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \xinteval does print 81.0 but the truth is that internally it does have the % more bulky 8100/1[-2] maybe I should make some revision of this, i.e. use % rather systematically \xintREZ on input rather than \xintRaw (note taken on -% 2021/05/08 at time of doing 1.4f bugfix release).| +% 2021/05/08 at time of doing 1.4f bugfix release). +%\end{lverb} % \begin{macrocode} \expandafter\XINT_pow_int_c\romannumeral0\xintraw{#2}\xint:#1\xint: }% % \end{macrocode} -% \lverb|The \XINT_fpow_fork is (quasi top level) entry point we have found +%\begin{lverb} +% The \XINT_fpow_fork is (quasi top level) entry point we have found % into the legacy \xintPow routine of $xintfracnameimp. Its interface is a bit % weird, but let's not worry about this now. % -%| +%\end{lverb} % \begin{macrocode} \def\XINT_pow_int_c#1#2/#3[#4]\xint:#5\xint: {% @@ -47852,8 +49623,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% #5\Z{#4}{#1#2}{#3}% }% % \end{macrocode} -% \lverb|\XINT_pow_bigint_i is like \XINT_pow_bigint but has its parameters -% organized differently.| +%\begin{lverb} +% \XINT_pow_bigint_i is like \XINT_pow_bigint but has its parameters +% organized differently. +%\end{lverb} % \begin{macrocode} \def\XINT_pow_bigint_i#1\Z#2#3#4% {% @@ -47862,9 +49635,9 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % \end{macrocode} % \subsection{Macro support for \cshnolabel{xintexpr} and \cshnolabel{xintfloatexpr} syntax} % \subsubsection{The \cshn{log10()} and \cshn{pow10()} functions} -% \lverb|& +%\begin{lverb} % Up to 8 digits included we use the poormanlog based ones. -% | +%\end{lverb} % \begin{macrocode} \ifnum\XINTdigits<9 \expandafter\def\csname XINT_expr_func_log10\endcsname#1#2#3% @@ -47933,9 +49706,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi % \end{macrocode} % \subsubsection{The \cshn{pow()} function} -% \lverb|The mapping of ** and ^ to \XINTinFloatSciPow (in \xintfloatexpr +%\begin{lverb} +% The mapping of ** and ^ to \XINTinFloatSciPow (in \xintfloatexpr % context) and \xintPow (in \xintexpr context), -% is done in $xintexprnameimp.| +% is done in $xintexprnameimp. +%\end{lverb} % \begin{macrocode} \def\XINT_expr_func_pow #1#2#3% {% @@ -47955,7 +49730,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \ifnum\XINTdigits<9 \expandafter\XINTlogendinput\fi% % \end{macrocode} % \subsection{Stored constants} -% \lverb|The constants were obtained from Maple at 80 digits: fractional power +%\begin{lverb} +% The constants were obtained from Maple at 80 digits: fractional power % of 10, but only one logarithm log(10). % % Currently the code whether for exponential or logarihm will not screen out 0 @@ -47974,7 +49750,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % even with large exponents, say in absolute value up to 1e7,& % degradation beginning to show-up at 1e8. %) -% | +%\end{lverb} +% \def\macro@font{\ttfamily \hfuzz 30pt } % \begin{macrocode} \def\XINT_tmpa{1[0]}% \expandafter\let\csname XINT_c_1_0\endcsname\XINT_tmpa @@ -48002,8 +49779,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \expandafter\let\csname XINT_c_5_0_inv_x\endcsname\XINT_tmpa \expandafter\let\csname XINT_c_6_0_inv_x\endcsname\XINT_tmpa \def\XINT_tmpa#1#2#3#4;% - {\expandafter\edef\csname XINT_c_#1_#2\endcsname{\XINTinFloat[\XINTdigitsormax+5]{#3#4[-79]}}% - \expandafter\edef\csname XINT_c_#1_#2_x\endcsname{\XINTinFloat[\XINTdigitsormax+10]{#3#4[-79]}}% + {\expandafter\edef\csname XINT_c_#1_#2\endcsname + {\XINTinFloat[\XINTdigitsormax+5]{#3#4[-79]}}% + \expandafter\edef\csname XINT_c_#1_#2_x\endcsname + {\XINTinFloat[\XINTdigitsormax+10]{#3#4[-79]}}% }% % 10^0.i \XINT_tmpa 1 1 12589254117941672104239541063958006060936174094669310691079230195266476157825020;% @@ -48066,8 +49845,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \XINT_tmpa 6 8 10000184208504057336610176132939223090407041937631374389422968832433217547184883;% \XINT_tmpa 6 9 10000207234805653031739097001771331138303016031686764989867510425362339583809842;% \def\XINT_tmpa#1#2#3#4;% - {\expandafter\edef\csname XINT_c_#1_#2_inv\endcsname{\XINTinFloat[\XINTdigitsormax+5]{#3#4[-80]}}% - \expandafter\edef\csname XINT_c_#1_#2_inv_x\endcsname{\XINTinFloat[\XINTdigitsormax+10]{#3#4[-80]}}% + {\expandafter\edef + \csname XINT_c_#1_#2_inv\endcsname{\XINTinFloat[\XINTdigitsormax+5]{#3#4[-80]}}% + \expandafter\edef + \csname XINT_c_#1_#2_inv_x\endcsname{\XINTinFloat[\XINTdigitsormax+10]{#3#4[-80]}}% }% % 10^-0.i \XINT_tmpa 1 1 79432823472428150206591828283638793258896063175548433209232392931695569719148754;% @@ -48140,8 +49921,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% {\XINTinFloat[\XINTdigitsormax+14] {43429448190325182765112891891660508229439700580366656611445378316586464920887077[-80]}}% % \end{macrocode} +% \def\macro@font{\ttfamily} % \subsection{April 2021: at last, \csh{XINTinFloatPowTen}, \csh{XINTinFloatExp}} -% \lverb|Done April 2021. I have procrastinated (or did not have time to +%\begin{lverb} +% Done April 2021. I have procrastinated (or did not have time to % devote to this) at least 5 years, even more. % % Speed improvements will have to wait to long delayed refactoring of core @@ -48222,7 +50005,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % is not enormously costly. % % Of course all these things pile up... -% | +%\end{lverb} % \begin{macrocode} \def\XINTinFloatExp{\romannumeral0\XINTinfloatexp}% \def\XINT_tmpa#1.{% @@ -48233,7 +50016,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% }\expandafter\XINT_tmpa\the\numexpr\XINTdigitsormax+14.% % \end{macrocode} -% \lverb|& +%\begin{lverb} % Here is how the reduction to computations of an exp(h) via series is done. % % Starting from x, after initial argument normalization, it is fixed-point @@ -48253,7 +50036,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % Currently I may use nested macros for some operations but will perhaps % revise in future (it makes tracing very complicated if one does not have % intermediate macros). The exponential series itself was initially only one -% single macro, but as commented above I have now modified it.| +% single macro, but as commented above I have now modified it. +%\end{lverb} % \begin{macrocode} \def\XINTinFloatPowTen{\romannumeral0\XINTinfloatpowten}% \def\XINT_tmpa#1.{% @@ -48273,10 +50057,11 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_powten_zero #1[#2]{ 1[0]}% % \end{macrocode} -% \lverb|This rounding may produce 0.000000 but will always have 6 exactly +%\begin{lverb} +% This rounding may produce 0.000000 but will always have 6 exactly % fractional digits, because the special case of a zero input was filtered out % preventively. -% | +%\end{lverb} % \begin{macrocode} \def\XINT_powten_pos#1[#2]% {% @@ -48312,8 +50097,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr\XINTdigitsormax-1\expandafter.% \the\numexpr\XINTdigitsormax.% % \end{macrocode} -% \lverb|This rounding may produce -0.000000 but will always have 6 exactly -% fractional digits and a leading minus sign.| +%\begin{lverb} +% This rounding may produce -0.000000 but will always have 6 exactly +% fractional digits and a leading minus sign. +%\end{lverb} % \begin{macrocode} \def\XINT_powten_neg#1[#2]% {% @@ -48350,10 +50137,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \the\numexpr\XINTdigitsormax.% % \end{macrocode} % \subsubsection{Exponential series} -% \lverb|Or rather here h(1 + h(1/2 + h (1/6 + ....))). Upto at most h^9/9! +%\begin{lverb} +% Or rather here h(1 + h(1/2 + h (1/6 + ....))). Upto at most h^9/9! % term. % -% The used initial h has been float rounded to P-1 digits.| +% The used initial h has been float rounded to P-1 digits. +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa#1.#2.{% \def\XINT_Exp_series_a_ii##1\xint: @@ -48455,7 +50244,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \def##3########1\xint:########2\xint: {% \expandafter##4% - \romannumeral0\xintadd{####4}{\XINTinFloat[####2]{\xintMul{########1}{########2}}}\xint: + \romannumeral0\xintadd{####4}% + {\XINTinFloat[####2]{\xintMul{########1}{########2}}}\xint: }% }% }% @@ -48479,7 +50269,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \fi % \end{macrocode} % \subsection{April 2021: at last \csh{XINTinFloagLogTen}, \csh{XINTinFloatLog}} -% \lverb?& +%\begin{lverb} % Attention that this is not supposed to be used with \XINTdigits at % 8 or less, it will crash if that is the case. The log10() and log() % functions in case \XINTdigits is at most 8 are mapped to \PoormanLogBaseTen @@ -48629,7 +50419,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % variant will be the one used by the power function for fractional exponents % (non integer, non half-integer). % -% ? +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa#1.{% \def\XINTinFloatLog{\romannumeral0\XINTinfloatlog}% @@ -48666,14 +50456,16 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xintadd{#1}{\xintMul{\XINT_c_oneoverlogten_xx}{#2}}% }% % \end{macrocode} -% \lverb|No check is done whether input is negative or vanishes. We apply +%\begin{lverb} +% No check is done whether input is negative or vanishes. We apply % \XINTinfloat[9] which if input is not zero always produces 9 digits (and % perhaps a minus sign) the first digit is non-zero. This is the expected % input to \numexpr\PML@<digits><dot>.\relax % % The variants xdg_a, xdg_b, xdg_c, xdg_d were added at 1.4f to always go via % II or III, ensuring more fractional digits to the logarithm for accuracy of -% fractional powers with big exponents. "Old" 1.4e routines were removed.| +% fractional powers with big exponents. "Old" 1.4e routines were removed. +%\end{lverb} % \begin{macrocode} \def\XINT_logtenxdg_a#1[#2]% {% @@ -48690,10 +50482,12 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \xint: }% % \end{macrocode} -% \lverb|If we were either in 100000000[0] or 999999999[-1] for the #1[#2] +%\begin{lverb} +% If we were either in 100000000[0] or 999999999[-1] for the #1[#2] % \XINT_logten_b input, and only in those cases, the \xintRound{6} produced % "0". We are very near 1 and will treat this as case III, but this is -% sub-optimal.| +% sub-optimal. +%\end{lverb} % \begin{macrocode} \def\XINT_logtenxdg_c #1#2% {% @@ -48702,7 +50496,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }% \def\XINT_logten_IV\xint:\XINT_logtenxdg_d0{\XINT_logten_f_III}% % \end{macrocode} -% \lverb|Here we are certain that \xintRound{6} produced a decimal point and +%\begin{lverb} +% Here we are certain that \xintRound{6} produced a decimal point and % 6 fractional digit tokens #2, but they can be zeros and also -0.000000 is possible. % % If #1 vanishes and #2>100000 we are in case I. @@ -48717,7 +50512,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % At 1.4f, we handle the case I with as many digits as case II (and exceptionnally case III). % -% | +%\end{lverb} % \begin{macrocode} \def\XINT_logtenxdg_d #1.#2\xint: {% @@ -48742,8 +50537,10 @@ on input line \noexpand\the\inputlineno.&&J}}#2% \krof #1% }% % \end{macrocode} -% \lverb|We are here only with a non-zero ##1, so no risk of a -0[0] which -% would be illegal usage of A[N] raw format. A negative ##1 is no trouble in ##3-##1.| +%\begin{lverb} +% We are here only with a non-zero ##1, so no risk of a -0[0] which +% would be illegal usage of A[N] raw format. A negative ##1 is no trouble in ##3-##1. +%\end{lverb} % \begin{macrocode} \def\XINT_tmpa#1.{% \def\XINT_logten_f_Isp##1.000000\xint:##2[##3]% @@ -48814,7 +50611,8 @@ on input line \noexpand\the\inputlineno.&&J}}#2% }\expandafter\XINT_tmpa \the\numexpr\XINTdigitsormax+10\expandafter.\the\numexpr\XINTdigitsormax+4.% % \end{macrocode} -% \lverb|Initially all of this was done in a single big nested macro but the +%\begin{lverb} +% Initially all of this was done in a single big nested macro but the % float-rounding of argument to less digits worked again each time from % initial long input; the advantage on the other hand was that the 1/i % constants were all pre-computed and rounded. @@ -48854,7 +50652,7 @@ on input line \noexpand\the\inputlineno.&&J}}#2% % % (1.4f: hesitation on 2021/05/09 after removal or case I log series should % I not follow the simplifying logic and use always the slightly more costly III?) -% | +%\end{lverb} % % \subsubsection{Log series, case II} % \begin{macrocode} @@ -49423,60 +51221,84 @@ on input line \noexpand\the\inputlineno.&&J}}#2% xint.sty:205 xintbinhex.sty:53 xintcfrac.sty:183 -xintcore.sty:272 +xintcore.sty:267 xintexpr.sty:461 xintfrac.sty:522 xintgcd.sty:41 xintkernel.sty:17 -xintlog.sty:150 +xintlog.sty:149 xintseries.sty:48 xinttools.sty:157 -xinttrig.sty:65 +xinttrig.sty:66 \fi % grep -o "^{%" xint*sty | wc -l -\def\totala{ 2174} +\def\totala{ 2169} \iffalse % grep -c -e "^}%" xint*sty xint.sty:204 xintbinhex.sty:52 xintcfrac.sty:183 -xintcore.sty:269 +xintcore.sty:265 xintexpr.sty:442 -xintfrac.sty:528 +xintfrac.sty:530 xintgcd.sty:43 -xintkernel.sty:17 -xintlog.sty:151 +xintkernel.sty:18 +xintlog.sty:150 xintseries.sty:48 xinttools.sty:156 -xinttrig.sty:64 +xinttrig.sty:65 \fi % grep -o "^}%" xint*sty | wc -l -\def\totalb{ 2157} +\def\totalb{ 2156} \cleardoublepage -\section{Cumulative line count} +\section{Cumulative line and macro count} +% le 6 juin 2022 j'ajoute le décompte des macros \def\mymacro #1{\mymacroaux #1} -\def\mymacroaux #1#2{\strut \csname #1nameimp\endcsname:& \dtt{ #2.}\tabularnewline } +\def\mymacroaux #1#2#3{\strut + \csname #1nameimp\endcsname&\dtt{#2}&(\dtt{#3})\tabularnewline } \indent -\begin{tabular}[t]{r@{}r} +\begin{tabular}[t]{rrr} +module&lines¯os\tabularnewline \xintApplyInline\mymacro\storedlinecounts \end{tabular} -\def\mymacroaux #1#2{#2}% -% -\parbox[t]{10cm}{Total number of code lines: +\hfil +\begin{minipage}[t]{10cm} +\def\mymacroaux #1#2#3{#2}% + + Total number of code lines: \dtt{\the\numexpr \xintListWithSep+{\xintApply\mymacro\storedlinecounts}\relax }. \ifdefined\totala (but \dtt{\the\numexpr \totala+\totalb\relax} lines among them - start either with \{\% or with \}\%.)\fi - + start either with \{\% or with \}\%). \fi Each package starts with circa \dtt{50} lines dealing with catcodes, package identification and reloading management, also for Plain - \TeX\strut. Version {\xintbndlversion} of {\xintbndldate}.\par -} + \TeX\strut. + +\bigskip +\def\mymacroaux #1#2#3{#3}% + + Total number of def'ed (or let'ed) macros: \dtt{\the\numexpr + \xintListWithSep+{\xintApply\mymacro\storedlinecounts}\relax }. + This is an approximation as some macros are def'ed in a way escaping + the automated detection, in particular this applies to + \xintexprnameimp macros associated to infix operators and syntax + elements, whose construction uses + |\csname|-based definitions with a template and auxiliary macros. + Their number has + been evaluated manually at being at least about \dtt{452} (this is + incorporated into the \xintexprnameimp count shown left, and the + total above.) + +\bigskip + + Version {\xintbndlversion} of {\xintbndldate}.\par +\end{minipage} -\CheckSum {39032}% 1.4l -% 38925 pour 1.4j, 38590 pour 1.4j, 38591 pour 1.4i, 38427 pour 1.4h +\CheckSum {38900}% 1.4m +% 39032 pour 1.4l +% 38925 pour 1.4k, 38590 pour 1.4j, 38591 pour 1.4i, 38427 pour 1.4h % 38423 pour 1.4g, 38212 pour 1.4f, 38813 pour 1.4e, 35184 pour 1.4d % 35109 pour 1.4c, 35103 pour 1.4b, 34648 pour 1.4a, 34575 pour 1.4 % 33497 pour 1.3f, 33274 pour 1.3e, 31601 pour 1.3d, 31122 pour 1.3c diff --git a/macros/generic/xint/xint.pdf b/macros/generic/xint/xint.pdf Binary files differindex 0042a3091a..6629cd4936 100644 --- a/macros/generic/xint/xint.pdf +++ b/macros/generic/xint/xint.pdf |