summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-01 21:38:49 +0000
committerKarl Berry <karl@freefriends.org>2017-08-01 21:38:49 +0000
commit9a9c1b6e2502a6a9c90e739c411de26012b9db2c (patch)
treeb72c9fa43c71360ad6c0d3c8e1b86c2530273492
parent7ba0b2e501e4b5d83a48295804d3570ef3407f8a (diff)
xint (1aug17)
git-svn-id: svn://tug.org/texlive/trunk@44934 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/xint/CHANGES.html135
-rw-r--r--Master/texmf-dist/doc/generic/xint/CHANGES.pdfbin87813 -> 89171 bytes
-rw-r--r--Master/texmf-dist/doc/generic/xint/README54
-rw-r--r--Master/texmf-dist/doc/generic/xint/README.html26
-rw-r--r--Master/texmf-dist/doc/generic/xint/README.pdfbin33598 -> 33830 bytes
-rw-r--r--Master/texmf-dist/doc/generic/xint/sourcexint.pdfbin655664 -> 656406 bytes
-rw-r--r--Master/texmf-dist/doc/generic/xint/xint.pdfbin786538 -> 790007 bytes
-rw-r--r--Master/texmf-dist/source/generic/xint/xint.dtx1590
-rw-r--r--Master/texmf-dist/source/generic/xint/xint.ins2
-rw-r--r--Master/texmf-dist/tex/generic/xint/xint.sty231
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintbinhex.sty761
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcfrac.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcore.sty24
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintexpr.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintfrac.sty32
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintgcd.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintkernel.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintseries.sty4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xinttools.sty4
19 files changed, 1404 insertions, 1475 deletions
diff --git a/Master/texmf-dist/doc/generic/xint/CHANGES.html b/Master/texmf-dist/doc/generic/xint/CHANGES.html
index 0f0c24af9eb..f13f479db1a 100644
--- a/Master/texmf-dist/doc/generic/xint/CHANGES.html
+++ b/Master/texmf-dist/doc/generic/xint/CHANGES.html
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
- <meta name="author" content="xint 1.2l" />
+ <meta name="author" content="xint 1.2m" />
<title>CHANGE LOG</title>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
@@ -17,76 +17,81 @@
<body>
<div id="header">
<h1 class="title">CHANGE LOG</h1>
-<h2 class="author">xint 1.2l</h2>
-<h3 class="date">2017/07/26</h3>
+<h2 class="author">xint 1.2m</h2>
+<h3 class="date">2017/07/31</h3>
</div>
<div id="TOC">
<ul>
-<li><a href="#l-20170726"><code>1.2l (2017/07/26)</code></a><ul>
-<li><a href="#removed">Removed</a></li>
+<li><a href="#m-20170731"><code>1.2m (2017/07/31)</code></a><ul>
+<li><a href="#incompatible-changes">Incompatible changes</a></li>
<li><a href="#improvements-and-new-features">Improvements and new features</a></li>
<li><a href="#bug-fixes">Bug fixes</a></li>
</ul></li>
-<li><a href="#k-20170106"><code>1.2k (2017/01/06)</code></a><ul>
-<li><a href="#incompatible-changes">Incompatible changes</a></li>
+<li><a href="#l-20170726"><code>1.2l (2017/07/26)</code></a><ul>
+<li><a href="#removed">Removed</a></li>
<li><a href="#improvements-and-new-features-1">Improvements and new features</a></li>
<li><a href="#bug-fixes-1">Bug fixes</a></li>
</ul></li>
-<li><a href="#j-20161222"><code>1.2j (2016/12/22)</code></a><ul>
+<li><a href="#k-20170106"><code>1.2k (2017/01/06)</code></a><ul>
+<li><a href="#incompatible-changes-1">Incompatible changes</a></li>
<li><a href="#improvements-and-new-features-2">Improvements and new features</a></li>
<li><a href="#bug-fixes-2">Bug fixes</a></li>
</ul></li>
-<li><a href="#i-20161213"><code>1.2i (2016/12/13)</code></a><ul>
-<li><a href="#incompatible-changes-1">Incompatible changes</a></li>
-<li><a href="#removed-1">Removed</a></li>
+<li><a href="#j-20161222"><code>1.2j (2016/12/22)</code></a><ul>
<li><a href="#improvements-and-new-features-3">Improvements and new features</a></li>
<li><a href="#bug-fixes-3">Bug fixes</a></li>
</ul></li>
-<li><a href="#h-20161120"><code>1.2h (2016/11/20)</code></a><ul>
+<li><a href="#i-20161213"><code>1.2i (2016/12/13)</code></a><ul>
+<li><a href="#incompatible-changes-2">Incompatible changes</a></li>
+<li><a href="#removed-1">Removed</a></li>
<li><a href="#improvements-and-new-features-4">Improvements and new features</a></li>
<li><a href="#bug-fixes-4">Bug fixes</a></li>
</ul></li>
-<li><a href="#g-20160319"><code>1.2g (2016/03/19)</code></a><ul>
-<li><a href="#incompatible-changes-2">Incompatible changes</a></li>
+<li><a href="#h-20161120"><code>1.2h (2016/11/20)</code></a><ul>
<li><a href="#improvements-and-new-features-5">Improvements and new features</a></li>
+<li><a href="#bug-fixes-5">Bug fixes</a></li>
</ul></li>
-<li><a href="#f-20160312"><code>1.2f (2016/03/12)</code></a><ul>
+<li><a href="#g-20160319"><code>1.2g (2016/03/19)</code></a><ul>
<li><a href="#incompatible-changes-3">Incompatible changes</a></li>
<li><a href="#improvements-and-new-features-6">Improvements and new features</a></li>
-<li><a href="#bug-fixes-5">Bug fixes</a></li>
</ul></li>
-<li><a href="#e-20151122"><code>1.2e (2015/11/22)</code></a><ul>
+<li><a href="#f-20160312"><code>1.2f (2016/03/12)</code></a><ul>
+<li><a href="#incompatible-changes-4">Incompatible changes</a></li>
<li><a href="#improvements-and-new-features-7">Improvements and new features</a></li>
<li><a href="#bug-fixes-6">Bug fixes</a></li>
</ul></li>
-<li><a href="#d-20151118"><code>1.2d (2015/11/18)</code></a><ul>
+<li><a href="#e-20151122"><code>1.2e (2015/11/22)</code></a><ul>
<li><a href="#improvements-and-new-features-8">Improvements and new features</a></li>
<li><a href="#bug-fixes-7">Bug fixes</a></li>
</ul></li>
-<li><a href="#c-20151116"><code>1.2c (2015/11/16)</code></a><ul>
+<li><a href="#d-20151118"><code>1.2d (2015/11/18)</code></a><ul>
<li><a href="#improvements-and-new-features-9">Improvements and new features</a></li>
<li><a href="#bug-fixes-8">Bug fixes</a></li>
</ul></li>
-<li><a href="#b-20151029"><code>1.2b (2015/10/29)</code></a><ul>
+<li><a href="#c-20151116"><code>1.2c (2015/11/16)</code></a><ul>
+<li><a href="#improvements-and-new-features-10">Improvements and new features</a></li>
<li><a href="#bug-fixes-9">Bug fixes</a></li>
</ul></li>
-<li><a href="#a-20151019"><code>1.2a (2015/10/19)</code></a><ul>
-<li><a href="#improvements-and-new-features-10">Improvements and new features</a></li>
+<li><a href="#b-20151029"><code>1.2b (2015/10/29)</code></a><ul>
<li><a href="#bug-fixes-10">Bug fixes</a></li>
</ul></li>
+<li><a href="#a-20151019"><code>1.2a (2015/10/19)</code></a><ul>
+<li><a href="#improvements-and-new-features-11">Improvements and new features</a></li>
+<li><a href="#bug-fixes-11">Bug fixes</a></li>
+</ul></li>
<li><a href="#section"><code>1.2 (2015/10/10)</code></a><ul>
<li><a href="#removed-2">Removed</a></li>
-<li><a href="#improvements-and-new-features-11">Improvements and new features</a></li>
+<li><a href="#improvements-and-new-features-12">Improvements and new features</a></li>
</ul></li>
<li><a href="#c-20150912"><code>1.1c (2015/09/12)</code></a></li>
<li><a href="#b-20150831"><code>1.1b (2015/08/31)</code></a></li>
<li><a href="#a-20141107"><code>1.1a (2014/11/07)</code></a></li>
<li><a href="#section-1"><code>1.1 (2014/10/28)</code></a><ul>
-<li><a href="#incompatible-changes-4">Incompatible changes</a></li>
+<li><a href="#incompatible-changes-5">Incompatible changes</a></li>
<li><a href="#removed-3">Removed</a></li>
<li><a href="#deprecated">Deprecated</a></li>
-<li><a href="#improvements-and-new-features-12">Improvements and new features</a></li>
-<li><a href="#bug-fixes-11">Bug fixes</a></li>
+<li><a href="#improvements-and-new-features-13">Improvements and new features</a></li>
+<li><a href="#bug-fixes-12">Bug fixes</a></li>
</ul></li>
<li><a href="#n-20140401"><code>1.09n (2014/04/01)</code></a></li>
<li><a href="#m-20140226"><code>1.09m (2014/02/26)</code></a></li>
@@ -114,16 +119,32 @@
<li><a href="#section-8"><code>1.0 (2013/03/28)</code></a></li>
</ul>
</div>
-<pre><code>Source: xint.dtx 1.2l 2017/07/26 (doc 2017/07/26)
+<pre><code>Source: xint.dtx 1.2m 2017/07/31 (doc 2017/07/31)
Author: Jean-Francois Burnol
Info: Expandable operations on big integers, decimals, fractions
License: LPPL 1.3c</code></pre>
+<h2 id="m-20170731"><code>1.2m (2017/07/31)</code></h2>
+<h3 id="incompatible-changes">Incompatible 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 <code>4000</code> to about <code>19900</code> digits.</p></li>
+<li><p><strong>xintbinhex</strong>: <code>\xintCHexToBin</code> is now the variant of <code>\xintHexToBin</code> which does not remove leading binary zeroes: <code>N</code> hex-digits give on output exactly <code>4N</code> binary digits.</p></li>
+</ul>
+<h3 id="improvements-and-new-features">Improvements and new features</h3>
+<ul>
+<li><strong>xintbinhex</strong>: all macros have been rewritten using techniques from the 1.2 release (they had remained unmodified since <code>1.08</code> of <code>2013/06/07</code>.) The new macros are faster 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">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 been made robust against non terminated input such as <code>\number\mathcode`\-</code>. Unfortunately the author fell into the trap of believing his own documentation and he forgot to actually implement the change. Now done.</p></li>
+<li><p>user manual: the PDF bookmarks were messed up.</p></li>
+<li><p><strong>xint</strong>, <strong>xintfrac</strong>: <code>\xintGeq</code>, <code>\xintMax</code>, <code>\xintMin</code>, suffered from some extra overhead. This was caused by use of some auxiliaries from the very early days which got redefined at some stage. 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">Removed</h3>
<ul>
<li><code>\xintiiSumExpr</code>, <code>\xintiiPrdExpr</code> (<strong>xint</strong>) and <code>\xintSumExpr</code>, <code>\xintPrdExpr</code> (<strong>xintfrac</strong>). They had not been formally deprecated, but had been left un-documented since <code>1.09d (2013/10/22)</code>.</li>
</ul>
-<h3 id="improvements-and-new-features">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-1">Improvements and new features</h3>
<ul>
<li><p>the underscore character <code>_</code> is accepted by the <strong>xintexpr</strong> parsers as a digit separator (the space character already could be used for improved readability of big numbers). It is not allowed as <em>first</em> character of a number, as it would then be mis-interpreted as the start of a possible variable name.</p></li>
<li><p>some refactoring in <strong>xintcore</strong> auxiliary routines and in <code>\xintiiSub</code> and <code>\xintiiCmp</code> for some small efficiency gains.</p></li>
@@ -132,33 +153,33 @@ License: LPPL 1.3c</code></pre>
<p>The situation with expressions is unchanged: syntax such as <code>\xintexpr \numexpr1+2\relax</code> is illegal as the ending <code>\relax</code> token will get swallowed by the <code>\numexpr</code>; but it is needed by the <code>xintexpr</code>-ession parser, hence the parser will expand forward and presumably end with in an &quot;illegal token&quot; error, or provoke some low-level TeX error (N.B.: a closing brace <code>}</code> for example can not terminate an <code>xintexpr</code>-ession, the parser must find a <code>\relax</code> token at some point). Thus there must be in this example a second <code>\relax</code>.</p></li>
<li><p>experimental code for error conditions; there is no complete user interface yet, it is done in preparation for next major release and is completely unstable and undocumented.</p></li>
</ul>
-<h3 id="bug-fixes">Bug fixes</h3>
+<h3 id="bug-fixes-1">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 in <code>xint.sty</code>, but the module by itself is supposedly dependent only upon <code>xintcore.sty</code>).</p></li>
<li><p><strong>xintgcd</strong>: macro <code>\xintBezout</code> produced partially wrong output if one of its two arguments was zero.</p></li>
<li><p><strong>xintfrac</strong>: the manual said one could use directly <code>\numexpr</code> compatible expressions in arithmetic macros (without even a <code>\numexpr</code> encapsulation) if they were expressed with up to 8 tokens. There was a bug if these 8 tokens evaluated to zero. The bug has been fixed, and up to 9 tokens are now accepted. But it is simpler to use <code>\the\numexpr</code> prefix and 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="incompatible-changes">Incompatible changes</h3>
+<h3 id="incompatible-changes-1">Incompatible changes</h3>
<ul>
<li><p>macro <code>\xintFloat</code> which rounds its input to a floating point number does <em>not</em> print anymore <code>10.0...0eN</code> to signal an upwards rounding to the next power of ten. The mantissa has in all cases except the zero input exactly one digit before the decimal mark.</p></li>
<li><p>some floating point computations may differ in the least significant digits, due to a change in the rounding algorithm applied to macro arguments expressed as fractions and to an improvement in precision regarding half-integer powers in expressions. See next.</p></li>
</ul>
-<h3 id="improvements-and-new-features-1">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-2">Improvements and new features</h3>
<ul>
<li><p>the initial rounding to the target precision <code>P</code> which is applied by the floating point macros from <strong>xintfrac</strong> to their arguments achieves the <em>exact (aka correct) rounding</em> even for inputs which are fractions with more than <code>P+2</code> digits in their numerators and denominators (<code>&gt;1</code>.) Hence the computed values depend only on the arguments as rational numbers and not upon their representatives. This is not relevant to <em>expressions</em> (<strong>xintexpr</strong>), because the <code>\xintfloatexpr</code> parser sees there <code>/</code> as an operator and does not (apart from special constructs) get to manipulate fractions as such.</p></li>
<li><p><code>\xintnewdummy</code> is public interface to a <code>1.2e</code> macro which serves to declare any given catcode 11 character as a dummy variable for expressions (<strong>xintexpr</strong>). This is useful for Unicode engines (the Latin letters being already all pre-declared as dummy variables.)</p></li>
<li><p>added <code>\xintiSqrtR</code>, there was only <code>\xintiiSqrtR</code> alongside <code>\xintiSqrt</code> and <code>\xintiiSqrt</code> (<strong>xint</strong>).</p></li>
<li><p>added non public <code>\xintLastItem:f:csv</code> to <strong>xinttools</strong> for faster <code>last()</code> function, and improved <code>\xintNewExpr</code> compatibility. Also <code>\xintFirstItem:f:csv</code>.</p></li>
</ul>
-<h3 id="bug-fixes-1">Bug fixes</h3>
+<h3 id="bug-fixes-2">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 just <em>before</em> the final square-root extraction, thus possibly losing some precision. The <code>1.2k</code> implementation keeps guard digits for this final square root extraction. As for integer exponents, it is guaranteed that the computed value differs from the exact one by less than <code>0.52 ulp</code> (for inputs having at most <code>\xinttheDigits</code> digits.)</p></li>
<li><p>more regressions from <code>1.2i</code> were fixed: <code>\xintLen</code> (<strong>xint</strong>, <strong>xintfrac</strong>) and <code>\xintDouble</code> (<strong>xintcore</strong>) had forgotten that their argument was allowed to be negative. A regression test suite is now in place and is being slowly expanded to cover more macros.</p></li>
<li><p><code>\xintiiSquareRoot{0}</code> now produces <code>{1}{1}</code>, which fits better the general documented behaviour of this macro than <code>11</code>.</p></li>
</ul>
<h2 id="j-20161222"><code>1.2j (2016/12/22)</code></h2>
-<h3 id="improvements-and-new-features-2">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-3">Improvements and new features</h3>
<ul>
<li><p><strong>xinttools</strong> and <strong>xintexpr</strong>:</p>
<ol style="list-style-type: decimal">
@@ -167,12 +188,12 @@ License: LPPL 1.3c</code></pre>
</ol></li>
<li><p>significant documentations tweaks (inclusive of suppressing things!), and among them two beautiful hyperlinked tables with both horizontal and vertical rules which bring the documentation of the <strong>xintexpr</strong> syntax to a kind of awe-inspiring perfection... except that implementation of some math functions is still lacking.</p></li>
</ul>
-<h3 id="bug-fixes-2">Bug fixes</h3>
+<h3 id="bug-fixes-3">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> 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="incompatible-changes-1">Incompatible changes</h3>
+<h3 id="incompatible-changes-2">Incompatible 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>
@@ -180,7 +201,7 @@ License: LPPL 1.3c</code></pre>
<ul>
<li>deprecated macros <code>\xintifTrue</code>, <code>\xintifTrueFalse</code>, <code>\xintQuo</code>, <code>\xintRem</code>, <code>\xintquo</code>, <code>\xintrem</code>.</li>
</ul>
-<h3 id="improvements-and-new-features-3">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-4">Improvements and new features</h3>
<ul>
<li><p><strong>xintkernel</strong>: <code>\xintLength</code> is faster. New macros:</p>
<ul>
@@ -199,17 +220,17 @@ License: LPPL 1.3c</code></pre>
<li><p>the documentation has again been (slightly) re-organized; it has a new sub-section on the Miller-Rabin primality test, to illustrate some use of <code>\xintNewFunction</code> for recursive definitions.</p></li>
<li><p>the documentation has dropped the LaTeX &quot;command&quot; terminology (which had been used initially in 2013 for some forgotten reasons and should have been removed long ago) and uses only the more apt &quot;macro&quot;, 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-3">Bug fixes</h3>
+<h3 id="bug-fixes-4">Bug fixes</h3>
<ul>
<li><code>\xintDecSplitL</code> and <code>\xintDecSplitR</code> from <strong>xint</strong> produced their output in a spurious brace pair (bug introduced in <code>1.2f</code>).</li>
</ul>
<h2 id="h-20161120"><code>1.2h (2016/11/20)</code></h2>
-<h3 id="improvements-and-new-features-4">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-5">Improvements and new features</h3>
<ul>
<li><p>new macro <code>\xintNewFunction</code> in <strong>xintexpr</strong> which allows to extend the parser syntax with functions in situations where <code>\xintdeffunc</code> is not usable (typically, because dummy variables are used over a not yet determined range of values because it depends on the variables).</p></li>
<li><p>after three years of strict obedience to <code>xint</code> 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-4">Bug fixes</h3>
+<h3 id="bug-fixes-5">Bug fixes</h3>
<ul>
<li><p>the <code>(cond)?{foo}{bar}</code> operator from <strong>xintexpr</strong> mis-behaved in certain circumstances (such as an empty <code>foo</code>).</p></li>
<li><p>the <strong>xintexpr</strong> <code>1.2f</code> <code>binomial</code> function (which uses <code>\xintiiBinomial</code> from <strong>xint.sty</strong> or <code>\xintFloatBinomial</code> from <strong>xintfrac.sty</strong>) deliberately raised an error for <code>binomial(x,y)</code> with <code>y&lt;0</code> or <code>x&lt;y</code>. This was unfortunate, and it now simply evaluates to zero in such cases.</p></li>
@@ -217,12 +238,12 @@ License: LPPL 1.3c</code></pre>
<li><p>the <code>add</code> and <code>mul</code> from <strong>xintexpr</strong>, which work with dummy variables since <code>1.1</code>, raised an error since <code>1.2c 2015/11/16</code> when the dummy variable was given an empty range (or list) of values, 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="incompatible-changes-2">Incompatible changes</h3>
+<h3 id="incompatible-changes-3">Incompatible 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 <code>[L][a:b]</code> which was already exactly like in Python since its introduction. A function len(L) replaces earlier <code>[L][0]</code>.</p></li>
<li><p>former <code>iter</code> keyword now called <code>iterr</code>. Indeed it matched with <code>rrseq</code>, the new <code>iter</code> (which was somehow missing from <code>1.1</code>) is the one matching <code>rseq</code>. Allows to iterate more easily with a &quot;list&quot; variable.</p></li>
</ul>
-<h3 id="improvements-and-new-features-5">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-6">Improvements and new features</h3>
<ul>
<li><p>in <strong>xintexpr.sty</strong>: list selectors <code>[L][n]</code> and <code>[L][a:b]</code> are more efficient: the earlier <code>1.1</code> routines did back and forth conversions from comma separated values to braced tokens, the <code>1.2g</code> routines use macros from <strong>xinttools.sty</strong> handling directly the encountered lists of comma separated values.</p></li>
<li><p>in <strong>xinttools.sty</strong>: slight improvements in the efficiency of the <code>\xintNthElt</code>, <code>\xintKeep</code>, <code>\xintTrim</code> routines and new routines handling directly comma separated values. The latter are not included in the user manual (they are not <code>\long</code>, they don't make efforts to preserve some braces, do not worry about spaces, all those worries being irrelevant to the use in expressions for list selectors).</p></li>
@@ -231,11 +252,11 @@ License: LPPL 1.3c</code></pre>
<li><p>the syntax of expressions is described in a devoted chapter of the documentation; an example shows how to implement (expandably) the 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="incompatible-changes-3">Incompatible changes</h3>
+<h3 id="incompatible-changes-4">Incompatible changes</h3>
<ul>
<li>no more <code>\xintFac</code> macro but <code>\xintiFac/\xintiiFac/\xintFloatFac</code>.</li>
</ul>
-<h3 id="improvements-and-new-features-6">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-7">Improvements and new features</h3>
<ul>
<li><p>functions <code>binomial</code>, <code>pfactorial</code> and <code>factorial</code> in both integer and float versions.</p></li>
<li><p>macros <code>\xintiiBinomial</code>, <code>\xintiiPFactorial</code> (<strong>xint.sty</strong>) and <code>\xintFloatBinomial</code>, <code>\xintFloatPFactorial</code> (<strong>xintfrac.sty</strong>). Improvements to <code>\xintFloatFac</code>.</p></li>
@@ -249,60 +270,60 @@ License: LPPL 1.3c</code></pre>
<li><p>(TeXperts only) the macros defined (internally) from <code>\xintdeffunc</code> et al. constructs do not incorporate an initial <code>\romannumeral</code> anymore.</p></li>
<li><p>renewed desperate efforts at improving the documentation by random shuffling of sections and well thought additions; cuts were considered and even performed.</p></li>
</ul>
-<h3 id="bug-fixes-5">Bug fixes</h3>
+<h3 id="bug-fixes-6">Bug fixes</h3>
<ul>
<li><p>squaring macro <code>\xintSqr</code> from <strong>xintfrac.sty</strong> was broken due to a misspelled sub-macro name. Dates back to <code>1.1</code> release of <code>2014/10/28</code> <code>:-((</code>.</p></li>
<li><p><code>1.2c</code>'s fix to the subtraction bug from <code>1.2</code> introduced another bug, which in some cases could create leading zeroes in the output, or even worse. This could invalidate other routines using subtractions, like <code>\xintiiSquareRoot</code>.</p></li>
<li><p>the comparison operators were not recognized by <code>\xintNewIIExpr</code> and <code>\xintdefiifunc</code> constructs.</p></li>
</ul>
<h2 id="e-20151122"><code>1.2e (2015/11/22)</code></h2>
-<h3 id="improvements-and-new-features-7">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-8">Improvements and new features</h3>
<ul>
<li><p>macro <code>\xintunassignvar</code>.</p></li>
<li><p>slight modifications of the logged messages in case of <code>\xintverbosetrue</code>.</p></li>
<li><p>a space in <code>\xintdeffunc f(x)&lt;space&gt;:= expression ;</code> is now accepted.</p></li>
<li><p>documentation enhancements: the <em>Quick Sort</em> section with 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-6">Bug fixes</h3>
+<h3 id="bug-fixes-7">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 <code>\numexpr</code> but it should have used <code>\xintNum</code>.</p></li>
<li><p>in <strong>xintexpr</strong>: release <code>1.2d</code> had broken the recognition of sub-expressions immediately after variable names (with tacit multiplication).</p></li>
<li><p>in <strong>xintexpr</strong>: contrarily to what <code>1.2d</code> documentation said, tacit multiplication was not yet always done with enhanced precedence. Now yes.</p></li>
</ul>
<h2 id="d-20151118"><code>1.2d (2015/11/18)</code></h2>
-<h3 id="improvements-and-new-features-8">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-9">Improvements and new features</h3>
<ul>
<li><p>the function definitions done by <code>\xintdeffunc</code> et al., as well as the macro declarations by <code>\xintNewExpr</code> et al. now have only local scope.</p></li>
<li><p>tacit multiplication applies to more cases, for example (x+y)z, and always ties more than standard * infix operator, e.g. x/2y is like 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-7">Bug fixes</h3>
+<h3 id="bug-fixes-8">Bug fixes</h3>
<ul>
<li>in <strong>xintcore</strong>: release <code>1.2c</code> had inadvertently broken the <code>\xintiiDivRound</code> macro.</li>
</ul>
<h2 id="c-20151116"><code>1.2c (2015/11/16)</code></h2>
-<h3 id="improvements-and-new-features-9">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-10">Improvements and new features</h3>
<ul>
<li><p>macros <code>\xintdeffunc</code>, <code>\xintdefiifunc</code>, <code>\xintdeffloatfunc</code> and boolean <code>\ifxintverbose</code>.</p></li>
<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-8">Bug fixes</h3>
+<h3 id="bug-fixes-9">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-9">Bug fixes</h3>
+<h3 id="bug-fixes-10">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 divisor started with 99999999 (it was attempted to use with 1+99999999 a subroutine expecting only 8-digits numbers).</li>
</ul>
<h2 id="a-20151019"><code>1.2a (2015/10/19)</code></h2>
-<h3 id="improvements-and-new-features-10">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-11">Improvements and new features</h3>
<ul>
<li><p>added <code>\xintKeepUnbraced</code>, <code>\xintTrimUnbraced</code> (<strong>xinttools</strong>) and fixed documentation of <code>\xintKeep</code> and <code>\xintTrim</code> regarding brace stripping.</p></li>
<li><p>added <code>\xintiiMaxof/\xintiiMinof</code> (<strong>xint</strong>).</p></li>
<li><p>TeX hackers only: replaced all code uses of <code>\romannumeral-`0</code> by the quicker <code>\romannumeral`&amp;&amp;@</code> (<code>^</code> being used as letter, had to find another character usable with catcode 7).</p></li>
</ul>
-<h3 id="bug-fixes-10">Bug fixes</h3>
+<h3 id="bug-fixes-11">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 <code>\xinttheexpr 0.01\relax</code> expanded to <code>0</code> ! (sigh...)</li>
</ul>
@@ -311,7 +332,7 @@ License: LPPL 1.3c</code></pre>
<ul>
<li>the macros <code>\xintAdd</code>, <code>\xintSub</code>, <code>\xintMul</code>, <code>\xintMax</code>, <code>\xintMin</code>, <code>\xintMaxof</code>, <code>\xintMinof</code> are removed from package <strong>xint</strong>, and only exist in the versions from <strong>xintfrac</strong>. With only <strong>xintcore</strong> or <strong>xint</strong> loaded, one <em>must</em> use <code>\xintiiAdd</code>, <code>\xintiiSub</code>, ..., or <code>\xintiAdd</code>, <code>\xintiSub</code>, etc...</li>
</ul>
-<h3 id="improvements-and-new-features-11">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-12">Improvements and new features</h3>
<ul>
<li><p>the basic arithmetic implemented in <strong>xintcore</strong> has been entirely rewritten. The mathematics remains the elementary school one, but the <code>TeX</code> implementation achieves higher speed (except, regarding addition/subtraction, for numbers up to about thirty digits), the gains becoming quite significant for numbers with hundreds of digits.</p></li>
<li><p>the inputs must have less than 19959 digits. But computations with thousands of digits take time.</p></li>
@@ -345,7 +366,7 @@ License: LPPL 1.3c</code></pre>
<li><p>various typographical fixes throughout the documentation, and a bit of clean up of the code comments. Improved <code>\Factors</code> example of nested <code>subs</code>, <code>rseq</code>, <code>iter</code> in <code>\xintiiexpr</code>.</p></li>
</ul>
<h2 id="section-1"><code>1.1 (2014/10/28)</code></h2>
-<h3 id="incompatible-changes-4">Incompatible changes</h3>
+<h3 id="incompatible-changes-5">Incompatible changes</h3>
<ul>
<li><p>in <code>\xintiiexpr</code>, <code>/</code> does <em>rounded</em> division, rather than the Euclidean division (for positive arguments, this is truncated division). The <code>//</code> operator does truncated division,</p></li>
<li><p>the <code>:</code> operator for three-way branching is gone, replaced with <code>??</code>,</p></li>
@@ -364,7 +385,7 @@ License: LPPL 1.3c</code></pre>
<li><p><code>\xintMax</code>, <code>\xintMin</code>, <code>\xintAdd</code>, <code>\xintSub</code>, <code>\xintMul</code> (<strong>xint</strong>): their usage without <strong>xintfrac</strong> is deprecated; use <code>\xintiMax</code>, <code>\xintiMin</code>, <code>\xintiAdd</code>, <code>\xintiSub</code>, <code>\xintiMul</code>.</p></li>
<li><p>the <code>&amp;</code> and <code>|</code> as Boolean operators in <code>xintexpr</code>-essions are deprecated in favour of <code>&amp;&amp;</code> and <code>||</code>. The single letter operators might be assigned some other meaning in some later release (bitwise operations, perhaps). Do not use them.</p></li>
</ul>
-<h3 id="improvements-and-new-features-12">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-13">Improvements and new features</h3>
<ul>
<li><p>new package <strong>xintcore</strong> has been split off <strong>xint</strong>. It contains the core arithmetic macros (it is loaded by LaTeX package <strong>bnumexpr</strong>),</p></li>
<li><p>neither <strong>xint</strong> nor <strong>xintfrac</strong> load <strong>xinttools</strong>. Only <strong>xintexpr</strong> does,</p></li>
@@ -401,7 +422,7 @@ License: LPPL 1.3c</code></pre>
<li><p><code>\xintthecoords</code> converts a comma separated list of an even number of items to the format expected by the <code>TikZ</code> <code>coordinates</code> syntax,</p></li>
<li><p>completely new version <code>\xintNewExpr</code>, <code>protect</code> function to handle external macros. The dollar sign <code>$</code> for place holders is not accepted anymore, only the standard macro parameter <code>#</code>. Not all constructs are compatible with <code>\xintNewExpr</code>.</p></li>
</ul>
-<h3 id="bug-fixes-11">Bug fixes</h3>
+<h3 id="bug-fixes-12">Bug fixes</h3>
<ul>
<li><p><code>\xintZapFirstSpaces</code> hence also <code>\xintZapSpaces</code> from package <strong>xinttools</strong> were buggy when used with an argument either empty or containing only space tokens.</p></li>
<li><p><code>\xintiiexpr</code> did not strip leading zeroes, hence <code>\xinttheiiexpr 001+1\relax</code> did not obtain the expected result ...</p></li>
diff --git a/Master/texmf-dist/doc/generic/xint/CHANGES.pdf b/Master/texmf-dist/doc/generic/xint/CHANGES.pdf
index f7658b2fd95..499c65650e5 100644
--- a/Master/texmf-dist/doc/generic/xint/CHANGES.pdf
+++ b/Master/texmf-dist/doc/generic/xint/CHANGES.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/xint/README b/Master/texmf-dist/doc/generic/xint/README
index e4f2dc94469..c131f78ba73 100644
--- a/Master/texmf-dist/doc/generic/xint/README
+++ b/Master/texmf-dist/doc/generic/xint/README
@@ -1,4 +1,4 @@
- Source: xint.dtx 1.2l 2017/07/26 (doc 2017/07/26)
+ Source: xint.dtx 1.2m 2017/07/31 (doc 2017/07/31)
Author: Jean-Francois Burnol
Info: Expandable operations on big integers, decimals, fractions
License: LPPL 1.3c
@@ -20,49 +20,58 @@ fractions, and floating point numbers. For example
\xinttheexpr reduce(37189719/183618963+11390170/17310720)^17\relax
-will evaluate exactly the fraction (the result has 462 characters
-including the fraction slash). One can also work with dummy variables:
+will evaluate exactly the fraction; the result has 462 characters
+(including the fraction slash.) One can also work with dummy variables:
\xinttheexpr mul(add(x(x+1)(x+2), x=y..y+15), y=171286,98762,9296)\relax
-(evaluates to 15979066346135829902328007959448563667099190784.)
+evaluates to 15979066346135829902328007959448563667099190784.
Float computations are possible at an adjustable precision (default 16).
- \xintDigits:=48;\xintthefloatexpr 123456789^1000.5\relax
+ \xintDigits:=48;\xintthefloatexpr 123_456_789^1_000.5\relax
->3.63692761822782679930738270515740797370813691938e8095
-However, only integer and half-integer exponents are currently allowed.
-The sqrt operation achieves correct rounding in arbitrary precision.
-
-It is possible to use the package with Plain as well as with LaTeX.
+But currently, only integer and half-integer exponents are allowed for
+the power operation in expressions and only the square-root operation is
+implemented besides the four arithmetic operations. Square-root and the
+four operations achieve correct rounding in the given arbitrary
+precision.
Sub-units xintcore, xint and xintfrac provide the underlying macros, and
xintexpr loads all of them and provides expandable parsers allowing
computations such as the above (and more).
-A more light-weight (LaTeX only) package bnumexpr loads only xintcore
-and provides a parser which handles only big integers, the four
-operations, the power operation and the factorial.
-
USAGE
+It is possible to use the package with Plain (via \input anywhere) or
+with LaTeX (via \usepackage in the preamble).
+
+
With LaTeX
\usepackage{xint} % expandable arithmetic with big integers
\usepackage{xintfrac} % decimal numbers, fractions, floats
\usepackage{xintexpr} % expressions with infix operators
-Further packages: xintbinhex, xintgcd, xintseries and xintcfrac. All
-dependencies are handled automatically. For example xintexpr
-automatically loads xintfrac which itself loads xint. Package xintcore
-is the subset of xint providing only the five operations on big
-integers: \xintiiAdd, \xintiiMul, ... There is also xinttools which is a
-separate package providing, among others, expandable and non-expandable
-loops such as \xintFor.
+Further packages: xintbinhex, xintgcd, xintseries and xintcfrac.
+
+Main dependencies are handled automatically. For example xintexpr
+automatically loads xintfrac which itself loads xint; but use of the gcd
+and lcm functions in expressions require explicit loading of xintgcd,
+and hexadecimal notation requires explicit loading of xintbinhex.
+
+Package xintcore is the subset of xint providing only the five
+operations on big integers: \xintiiAdd, \xintiiMul, ... It is (by
+default) loaded by the (LaTeX only) package bnumexpr which provides a
+more light-weight expression parser handling only big integers, the four
+operations, the power operation and the factorial.
+
+There is also xinttools which is a separate package providing, among
+others, expandable and non-expandable loops such as \xintFor.
With TeX
@@ -71,9 +80,8 @@ One does for example:
\input xintexpr.sty
-All dependencies are handled automatically. The packages may be loaded
-in any catcode context such that letters, digits, \ and % have their
-standard catcodes.
+The packages may be loaded in any catcode context such that letters,
+digits, \ and % have their standard catcodes.
xintcore.sty and xinttools.sty both import xintkernel.sty which has the
catcode handler and package identifier and defines a few utilities such
diff --git a/Master/texmf-dist/doc/generic/xint/README.html b/Master/texmf-dist/doc/generic/xint/README.html
index 793c0bcbe65..a707f040216 100644
--- a/Master/texmf-dist/doc/generic/xint/README.html
+++ b/Master/texmf-dist/doc/generic/xint/README.html
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
- <meta name="author" content="xint 1.2l" />
+ <meta name="author" content="xint 1.2m" />
<title>README</title>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
@@ -17,8 +17,8 @@
<body>
<div id="header">
<h1 class="title">README</h1>
-<h2 class="author">xint 1.2l</h2>
-<h3 class="date">2017/07/26</h3>
+<h2 class="author">xint 1.2m</h2>
+<h3 class="date">2017/07/31</h3>
</div>
<div id="TOC">
<ul>
@@ -36,7 +36,7 @@
<li><a href="#license">License</a></li>
</ul>
</div>
-<pre><code>Source: xint.dtx 1.2l 2017/07/26 (doc 2017/07/26)
+<pre><code>Source: xint.dtx 1.2m 2017/07/31 (doc 2017/07/31)
Author: Jean-Francois Burnol
Info: Expandable operations on big integers, decimals, fractions
License: LPPL 1.3c</code></pre>
@@ -46,26 +46,28 @@ License: LPPL 1.3c</code></pre>
<h1 id="aim">Aim</h1>
<p>The basic aim is provide <em>expandable</em> computations on integers, fractions, and floating point numbers. For example</p>
<pre><code>\xinttheexpr reduce(37189719/183618963+11390170/17310720)^17\relax</code></pre>
-<p>will evaluate exactly the fraction (the result has 462 characters including the fraction slash). One can also work with dummy variables:</p>
+<p>will evaluate exactly the fraction; the result has 462 characters (including the fraction slash.) One can also work with dummy variables:</p>
<pre><code>\xinttheexpr mul(add(x(x+1)(x+2), x=y..y+15), y=171286,98762,9296)\relax</code></pre>
-<p>(evaluates to <code>15979066346135829902328007959448563667099190784</code>.)</p>
+<p>evaluates to <code>15979066346135829902328007959448563667099190784</code>.</p>
<p>Float computations are possible at an adjustable precision (default 16).</p>
-<pre><code>\xintDigits:=48;\xintthefloatexpr 123456789^1000.5\relax
+<pre><code>\xintDigits:=48;\xintthefloatexpr 123_456_789^1_000.5\relax
-&gt;3.63692761822782679930738270515740797370813691938e8095</code></pre>
-<p>However, only integer and half-integer exponents are currently allowed. The <code>sqrt</code> operation achieves correct rounding in arbitrary precision.</p>
-<p>It is possible to use the package with Plain as well as with LaTeX.</p>
+<p>But currently, only integer and half-integer exponents are allowed for the power operation in expressions and only the square-root operation is implemented besides the four arithmetic operations. Square-root and the four operations achieve correct rounding in the given arbitrary precision.</p>
<p>Sub-units <code>xintcore</code>, <code>xint</code> and <code>xintfrac</code> provide the underlying macros, and <code>xintexpr</code> loads all of them and provides expandable parsers allowing computations such as the above (and more).</p>
-<p>A more light-weight (LaTeX only) package <a href="http://www.ctan.org/pkg/bnumexpr">bnumexpr</a> loads only <code>xintcore</code> and provides a parser which handles only big integers, the four operations, the power operation and the factorial.</p>
<h1 id="usage">Usage</h1>
+<p>It is possible to use the package with Plain (via <code>\input</code> anywhere) or with LaTeX (via <code>\usepackage</code> in the preamble).</p>
<h2 id="with-latex">With LaTeX</h2>
<pre><code>\usepackage{xint} % expandable arithmetic with big integers
\usepackage{xintfrac} % decimal numbers, fractions, floats
\usepackage{xintexpr} % expressions with infix operators</code></pre>
-<p>Further packages: <code>xintbinhex</code>, <code>xintgcd</code>, <code>xintseries</code> and <code>xintcfrac</code>. All dependencies are handled automatically. For example <code>xintexpr</code> automatically loads <code>xintfrac</code> which itself loads <code>xint</code>. Package <code>xintcore</code> is the subset of <code>xint</code> providing only the five operations on big integers: <code>\xintiiAdd</code>, <code>\xintiiMul</code>, ... There is also <code>xinttools</code> which is a separate package providing, among others, expandable and non-expandable loops such as <code>\xintFor</code>.</p>
+<p>Further packages: <code>xintbinhex</code>, <code>xintgcd</code>, <code>xintseries</code> and <code>xintcfrac</code>.</p>
+<p>Main dependencies are handled automatically. For example <code>xintexpr</code> automatically loads <code>xintfrac</code> which itself loads <code>xint</code>; but use of the <code>gcd</code> and <code>lcm</code> functions in expressions require explicit loading of <code>xintgcd</code>, and hexadecimal notation requires explicit loading of <code>xintbinhex</code>.</p>
+<p>Package <code>xintcore</code> is the subset of <code>xint</code> providing only the five operations on big integers: <code>\xintiiAdd</code>, <code>\xintiiMul</code>, ... It is (by default) loaded by the (LaTeX only) package <a href="http://www.ctan.org/pkg/bnumexpr">bnumexpr</a> which provides a more light-weight expression parser handling only big integers, the four operations, the power operation and the factorial.</p>
+<p>There is also <code>xinttools</code> which is a separate package providing, among others, expandable and non-expandable loops such as <code>\xintFor</code>.</p>
<h2 id="with-tex">With TeX</h2>
<p>One does for example:</p>
<pre><code>\input xintexpr.sty</code></pre>
-<p>All dependencies are handled automatically. The packages may be loaded in any catcode context such that letters, digits, <code>\</code> and <code>%</code> have their standard catcodes.</p>
+<p>The packages may be loaded in any catcode context such that letters, digits, <code>\</code> and <code>%</code> have their standard catcodes.</p>
<p><code>xintcore.sty</code> and <code>xinttools.sty</code> both import <code>xintkernel.sty</code> which has the catcode handler and package identifier and defines a few utilities such as <code>\oodef</code>, <code>\fdef</code>, or <code>\xint_dothis/\xint_orthat</code>.</p>
<h1 id="installation">Installation</h1>
<h2 id="method-a-using-the-package-manager-of-your-tex-distribution">Method A: using the package manager of your TeX distribution</h2>
diff --git a/Master/texmf-dist/doc/generic/xint/README.pdf b/Master/texmf-dist/doc/generic/xint/README.pdf
index 84f07090ca3..a997c4043f4 100644
--- a/Master/texmf-dist/doc/generic/xint/README.pdf
+++ b/Master/texmf-dist/doc/generic/xint/README.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/xint/sourcexint.pdf b/Master/texmf-dist/doc/generic/xint/sourcexint.pdf
index 8e67b42bb03..9f2d02efc74 100644
--- a/Master/texmf-dist/doc/generic/xint/sourcexint.pdf
+++ b/Master/texmf-dist/doc/generic/xint/sourcexint.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/xint/xint.pdf b/Master/texmf-dist/doc/generic/xint/xint.pdf
index 0b6e7a54db4..921ddcf7159 100644
--- a/Master/texmf-dist/doc/generic/xint/xint.pdf
+++ b/Master/texmf-dist/doc/generic/xint/xint.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/generic/xint/xint.dtx b/Master/texmf-dist/source/generic/xint/xint.dtx
index 8e22f7797dd..0c3e58ba9cc 100644
--- a/Master/texmf-dist/source/generic/xint/xint.dtx
+++ b/Master/texmf-dist/source/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: <26-07-2017 at 19:42:16 CEST>}
+\def\xintdtxtimestamp {Time-stamp: <31-07-2017 at 22:49:40 CEST>}
%</dtx>
%<*drv>
%% ---------------------------------------------------------------
-\def\xintdocdate {2017/07/26}
-\def\xintbndldate{2017/07/26}
-\def\xintbndlversion {1.2l}
+\def\xintdocdate {2017/07/31}
+\def\xintbndldate{2017/07/31}
+\def\xintbndlversion {1.2m}
%</drv>
%<readme>% README
%<changes>% CHANGE LOG
-%<readme|changes>% xint 1.2l
-%<readme|changes>% 2017/07/26
+%<readme|changes>% xint 1.2m
+%<readme|changes>% 2017/07/31
%<readme|changes>
-%<readme|changes> Source: xint.dtx 1.2l 2017/07/26 (doc 2017/07/26)
+%<readme|changes> Source: xint.dtx 1.2m 2017/07/31 (doc 2017/07/31)
%<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&!dopdfsh&!makefile>
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%<xintkernel>%% xintkernel: Paraphernalia for the xint packages
%<xinttools>%% xinttools: Expandable and non-expandable utilities
@@ -56,48 +56,56 @@ fractions, and floating point numbers. For example
\xinttheexpr reduce(37189719/183618963+11390170/17310720)^17\relax
-will evaluate exactly the fraction (the result has 462 characters
-including the fraction slash). One can also work with dummy
-variables:
+will evaluate exactly the fraction; the result has 462 characters
+(including the fraction slash.) One can also work with dummy variables:
\xinttheexpr mul(add(x(x+1)(x+2), x=y..y+15), y=171286,98762,9296)\relax
-(evaluates to `15979066346135829902328007959448563667099190784`.)
+evaluates to `15979066346135829902328007959448563667099190784`.
Float computations are possible at an adjustable precision (default 16).
- \xintDigits:=48;\xintthefloatexpr 123456789^1000.5\relax
+ \xintDigits:=48;\xintthefloatexpr 123_456_789^1_000.5\relax
->3.63692761822782679930738270515740797370813691938e8095
-However, only integer and half-integer exponents are currently allowed.
-The `sqrt` operation achieves correct rounding in arbitrary precision.
-
-It is possible to use the package with Plain as well as with LaTeX.
+But currently, only integer and half-integer exponents are allowed for
+the power operation in expressions and only the square-root operation is
+implemented besides the four arithmetic operations. Square-root and the
+four operations achieve correct rounding in the given arbitrary
+precision.
Sub-units `xintcore`, `xint` and `xintfrac` provide the underlying
macros, and `xintexpr` loads all of them and provides expandable
parsers allowing computations such as the above (and more).
-A more light-weight (LaTeX only) package
-[bnumexpr](http://www.ctan.org/pkg/bnumexpr) loads only `xintcore` and
-provides a parser which handles only big integers, the four operations,
-the power operation and the factorial.
-
Usage
=====
+It is possible to use the package with Plain (via `\input` anywhere) or with
+LaTeX (via `\usepackage` in the preamble).
+
## With LaTeX
\usepackage{xint} % expandable arithmetic with big integers
\usepackage{xintfrac} % decimal numbers, fractions, floats
\usepackage{xintexpr} % expressions with infix operators
-Further packages: `xintbinhex`, `xintgcd`, `xintseries` and
-`xintcfrac`. All dependencies are handled automatically. For example
-`xintexpr` automatically loads `xintfrac` which itself loads `xint`.
+Further packages: `xintbinhex`, `xintgcd`, `xintseries` and `xintcfrac`.
+
+Main dependencies are handled automatically. For example `xintexpr`
+automatically loads `xintfrac` which itself loads `xint`; but use of the
+`gcd` and `lcm` functions in expressions require explicit loading of
+`xintgcd`, and hexadecimal notation requires explicit loading of
+`xintbinhex`.
+
Package `xintcore` is the subset of `xint` providing only the five
-operations on big integers: `\xintiiAdd`, `\xintiiMul`,\ ...
+operations on big integers: `\xintiiAdd`, `\xintiiMul`,\ ... It is (by
+default) loaded by the (LaTeX only) package
+[bnumexpr](http://www.ctan.org/pkg/bnumexpr) which provides a more
+light-weight expression parser handling only big integers, the four
+operations, the power operation and the factorial.
+
There is also `xinttools` which is a separate package providing,
among others, expandable and non-expandable loops such as `\xintFor`.
@@ -107,9 +115,8 @@ One does for example:
\input xintexpr.sty
-All dependencies are handled automatically. The packages may
-be loaded in any catcode context such that letters, digits, `\` and
-`%` have their standard catcodes.
+The packages may be loaded in any catcode context such that letters,
+digits, `\` and `%` have their standard catcodes.
`xintcore.sty` and `xinttools.sty` both import `xintkernel.sty`
which has the catcode handler and package identifier and defines a
@@ -243,6 +250,44 @@ Makefile.mk.</div>
%</readme>--------------------------------------------------------
%<*changes>-------------------------------------------------------
+`1.2m (2017/07/31)`
+----
+
+### Incompatible changes
+
+ - **xintbinhex**: the length of the input is now limited. The maximum
+ size depends on the macro and ranges from about `4000` to about
+ `19900` digits.
+
+ - **xintbinhex**: `\xintCHexToBin` is now the variant of
+ `\xintHexToBin` which does not remove leading binary zeroes: `N`
+ hex-digits give on output exactly `4N` binary digits.
+
+### Improvements and new features
+
+ - **xintbinhex**: all macros have been rewritten using techniques from
+ the 1.2 release (they had remained unmodified since `1.08` of
+ `2013/06/07`.) The new macros are faster but limited to a few
+ thousand digits. The `1.08` routines could handle tens of thousands
+ of digits, but not in a reasonable time.
+
+### Bug fixes
+
+ - user manual: the `Changes` section wrongly stated at `1.2l` that the
+ macros of **xintbinhex** had been made robust against non terminated
+ input such as ``\number\mathcode`\-``. Unfortunately the author fell
+ into the trap of believing his own documentation and he forgot to
+ actually implement the change. Now done.
+
+ - user manual: the PDF bookmarks were messed up.
+
+ - **xint**, **xintfrac**: `\xintGeq`, `\xintMax`, `\xintMin`, suffered
+ from some extra overhead. This was caused by use of some auxiliaries
+ from the very early days which got redefined at some stage. This is
+ fixed here with some additional efficiency improvements and pruning
+ of old code.
+
+
`1.2l (2017/07/26)`
----
@@ -2144,7 +2189,7 @@ dvipdfmx CHANGES.dvi
\def\SKIPSECTIONINTERSPACE{\vskip\bigskipamount}
\etocsetstyle{section}{}
{\normalfont}
- {\SKIPSECTIONINTERSPACE
+ {\etociffirst{}{\SKIPSECTIONINTERSPACE}%
\rightskip \MARGEPAGENO\relax
\parfillskip -\MARGEPAGENO\relax
\bfseries
@@ -2990,7 +3035,7 @@ pdfpagemode=UseOutlines}
{From source file \texttt{xint.dtx}. \xintdtxtimestamp.}\par
}
-\bigskip
+\medskip
% Mercredi 08 octobre 2014 à 22:03:19
% Skips safely.
@@ -3017,21 +3062,6 @@ pdfpagemode=UseOutlines}
\etocsettagdepth {macros}{none}
\etocsettagdepth {implementation}{none}
\tableofcontents
-\renewcommand*\etocabovetocskip{\bigskipamount}
-\makeatletter
-\etocmulticolstyle [2]{\parskip\z@skip\raggedcolumns
- \setlength{\columnsep}{\leftmarginii}%
- \setlength{\columnseprule}{0pt}%
-}%
-\makeatother
- \etocsettagdepth {description}{none}
- \etocsettagdepth {macros} {section}
-\ifnum\NoSourceCode=1
- \etocsettagdepth {implementation}{none}
-\else
- \etocsettagdepth {implementation}{section}
-\fi
-\tableofcontents
\begingroup\makeatletter
\etocsetlevel{table}{0}
@@ -3042,7 +3072,7 @@ pdfpagemode=UseOutlines}
\rightskip \MARGEPAGENO\relax
\parfillskip -\MARGEPAGENO\relax
\leftskip \z@skip
- \noindent\strut Table of \etocname
+ \noindent\strut \etoclink{Table of \etocthename}%
\nobreak\leaders\etoctoclineleaders\hfill\nobreak\strut
\makebox[\MARGEPAGENO][r]{\etocpage}\par
}%
@@ -3051,10 +3081,26 @@ pdfpagemode=UseOutlines}
\etocsettagdepth{macros}{none}
\etocsettagdepth{implementation}{none}
\etocsettocstyle{}{}
-\smallskip
+\medskip
\tableofcontents
\endgroup
+\renewcommand*\etocabovetocskip{\bigskipamount}
+\makeatletter
+\etocmulticolstyle [2]{\parskip\z@skip\raggedcolumns
+ \setlength{\columnsep}{\leftmarginii}%
+ \setlength{\columnseprule}{0pt}%
+}%
+\makeatother
+ \etocsettagdepth {description}{none}
+ \etocsettagdepth {macros} {section}
+\ifnum\NoSourceCode=1
+ \etocsettagdepth {implementation}{none}
+\else
+ \etocsettagdepth {implementation}{section}
+\fi
+\tableofcontents
+
\etocignoredepthtags
\etocmulticolstyle [1]{%
\phantomsection% \section* {Contents}
@@ -3885,7 +3931,12 @@ This is release \expandafter|\xintbndlversion| of \expandafter|\xintbndldate|.
-The underscore |_| is accepted inside the expression parsers as an ignored
+The macros of \xintbinhexname for conversion routines between binary, decimal,
+and hexadecimal bases have been entirely re-written. They are faster, the more
+so for long inputs. But they have the drawback of now limiting their input to
+a maximal length of a few thousands characters.
+
+Since |1.2l|, the underscore |_| is accepted inside the expression parsers as an ignored
digit separator\footnote{The space character has already always been accepted
in this rôle by the \xintexprname parsers, contrarily to the
situation inside |\numexpr|.}, for long numbers:
@@ -3899,15 +3950,15 @@ from \xintfracname or \xintname though, only in expressions from
\xintexprname.
Macro usage with non properly terminated inputs such as
-|\xintiiAdd{\the\numexpr1}{2}| or |\xintDecToHex{\number\mathcode`\-}| caused
-crashes. This has been fixed: the arithmetic macros of \xintcorename, the
-macros of \xintfracname, those of \xintgcdname and \xintbinhexname have been
-made robust against such inputs. Some routines of \xintcorename principally
-destined to internal usage such as \csbxint{Inc} remain incompatible though
-(to avoid adding some overhead; check |sourcexint.pdf| for details).
+|\xintiiAdd{\the\numexpr1}{2}| caused crashes. This has been fixed: the
+arithmetic macros of \xintcorename, the macros of \xintfracname, those of
+\xintgcdname, have been made robust against such inputs. Some routines of
+\xintcorename principally destined to internal usage such as \csbxint{Inc}
+remain incompatible though (to avoid adding some overhead; check
+|sourcexint.pdf| for details).
-Some refactoring took place in the sources of \xintcorename for efficiency
-gains. Some improvements in the user documentation and the code comments.
+Some refactoring took place at |1.2l| in the sources of \xintcorename for some
+efficiency gains, and improvements in the code comments.
See |CHANGES.html| or |CHANGES.pdf| for more information (either |texdoc
--list xint| or on the internet via
@@ -3972,7 +4023,7 @@ See |CHANGES.html| or |CHANGES.pdf| for more information (either |texdoc
\end{tabular}
\caption{Precedence levels (click on levels)}
\label{tab:precedences}
-\addcontentsline {toc}{table}{Precedence levels of operators in expressions}
+\etoctoccontentsline {table}{Precedence levels of operators in expressions}
\end{table}
The \autoref{tab:precedences} is hyperlinked to the more detailed discussion
@@ -4194,7 +4245,7 @@ corresponding definitions.
% \ifnumgreater{\cnta}{0}{\xintFor*#1in{\xintSeq[1]{\cnta}{4}}\do{&}\\\hline}{}%
\end{tabular}
\caption{Functions (click on names)}\label{tab:functions}
-\addcontentsline{toc}{table}{Functions in expressions}
+\etoctoccontentsline {table}{Functions in expressions}
\end{table}
Miscellaneous notes:
@@ -5449,7 +5500,13 @@ variants:
token.
\item In particular, spaces between digits (and not only around infix
operators or parentheses) do not stop |\xintiiexpr|, contrarily to the
- situation with |numexpr|: |\the\numexpr 7 + 3 5\relax| expands (in one step)
+ situation with |numexpr|: |\the\numexpr 7 + 3 5\relax| expands (in one
+ step)%
+%
+\footnote {The |\numexpr| triggers continued expansion after the space
+ following the |3| to check if some operator like |+| is upstream. But
+ after having found the |5| it treats it as and end-marker.}
+%
to \dtt{\detokenize\expandafter{\the\numexpr 7 + 3 5\relax}\unskip}, whereas
|\xintthe\xintiiexpr 7 + 3 5\relax| expands (in two steps) to
\dtt{\detokenize\expandafter\expandafter\expandafter {\xintthe\xintiiexpr 7
@@ -5458,20 +5515,25 @@ variants:
\footnote {Since |1.2l| one can also use the underscore |_| to separate digits
for readability of long numbers.}
- \item Inside an |\edef|, expressions |\xintiiexpr...\relax| get fully
- evaluated, but to a private format which needs the prefix \csbxint{the} to
- get printed or used as arguments to some macros; on the other hand
- expansion of |\numexpr| in an |\edef| occurs only if prefixed with |\the|
- or |\number| (or |\romannumeral|, or the expression is included in a
- bigger |\numexpr| which will be the one to have to be prefixed\dots .)
- \item |\the\numexpr| or |\number\numexpr| expands in one step, but
- |\xintthe\xintiiexpr| needs two steps.
-\item |\numexpr -(1)\relax| is illegal.
- But |\xintiiexpr -(1)\relax| is perfectly legal and gives the expected
- result (what else ?).
-\item |\numexpr 2\cnta\relax| is illegal, with |\cnta| a |\count|. But
+\item Inside an |\edef|, an expression |\xintiiexpr...\relax| get fully
+ evaluated, whereas |\numexpr| without |\the| or |\number| prefix would not,
+ if not itself embedded in another |\the\numexpr| or similar context.
+\item (ctd.) The private format to which |\xintiiexpr...\relax| (et al.)
+ evaluates needs |\xintthe| prefix to be printed on the page, or be used in
+ macros (expanding their argument.) The |\the| \TeX\ primitive prefix would
+ not work here.
+\item (ctd.) As a synonym to |\xintthe\xintiiexpr| one can use |\xinttheiiexpr|,
+ or (since |1.2h|) |\thexintiiexpr|.
+\item (ctd.) One can embed a |\numexpr...\relax| (with its |\relax|!) inside an
+ |\xintiiexpr...\relax| without |\the| or |\number|, but the reverse situation
+ requires use of |\xinthe|.
+\item |\numexpr -(1)\relax| is illegal. But |\xintiiexpr -(1)\relax| is
+ perfectly legal and gives the expected result (what else ?).
+\item |\numexpr 2\cnta\relax| is illegal (with |\cnta| a |\count| register.) But
|\xintiiexpr 2\cnta\relax| is perfectly legal and will do the tacit
multiplication.
+\item |\the\numexpr| or |\number\numexpr| expands in one step, but
+ |\xintthe\xintiiexpr| or |\xinttheiiexpr| needs two steps.
\end{itemize}
\subsection{Chaining expressions for expandable algorithmics}
@@ -13257,25 +13319,53 @@ principles are necessarily different due to the aim of achieving expandability.
\localtableofcontents
-This package was first included in the |1.08| (|2013/06/07|) release of
-\xintname. It provides expandable conversions of arbitrarily big integers to and
-from binary and hexadecimal. Routines have not been modified since.
+This package provides expandable conversions of arbitrarily big integers to
+and from binary and hexadecimal.
+
+It was first included in the |1.08| (|2013/06/07|) release of \xintname. Its
+routines remained un-modified until their complete rewrite at release |1.2m|
+(|2017/07/31|). The new macros are faster, using techniques from the |1.2|
+(|2015/10/10|) release of \xintcorename. But the inputs are now limited to a
+few thousand characters (check next for the respective maxima, the values
+given have a safety margin for nested contexts).
The argument is first \fexpan ded.
-It may optionally have a leading minus sign (explicit plus sign is not
-allowed), then leading zeroes, then digits. Hexadecimal digits |A..F| must be
-in uppercase. Category code for them on input may be \emph{letter} or
-\emph{other}. The hexadecimal letters on output are of category code
-\emph{letter}, and again in uppercase.
+It may optionally have a unique leading minus sign (a plus sign is not
+allowed), and leading zeroes.
+
+An input (possibly signed) with no leading zeroes is guaranteed to give an
+output without leading zero, with the sole, deliberate, exception of
+\csbxint{CHexToBin}: from |N| hexadecimal digits it produces |4N| binary
+digits,\CHANGED{1.2m} hence possibly with up to three leading zeroes (if the
+input had none.)
+
+Inputs with leading zeroes usually produce outputs with an unspecified,
+case-dependent, number of leading zeroes (\csbxint{BinToHex} always uses the
+minimal number of hexadecimal digits needed to represent the binary digits,
+inclusive of leading zeroes if present.)
-Input must not be within quotes or with |0b|, |0x|, |#x| or similar prefixes:
-simply decimal, binary, or hexadecimal digits.
+The macros\CHANGED{1.2m} converting from binary or decimal are robust against
+non terminated inputs like |\the\numexpr 2+3| or |\the\mathcode`\-|. The macro
+\csbxint{HexToDec} also but not \csbxint{HexToBin} and \csbxint{CHexToBin}
+(anyway there are no primitive in (e)-\TeX\ to my knowledge which will
+generate hexadecimal digits and may force expansion of next token).
-With this package loaded additionally to \xintexprname, hexadecimal input
-becomes possible in expressions with the prefix |"|. Such hexadecimal numbers
-may have an hexadecimal mark and fractional digits. The letters must be in
-uppercase.
+Hexadecimal digits |A..F| must be in uppercase. Category code for them on
+input may be \emph{letter} or \emph{other}. On output they are of category
+code \emph{letter}, and in uppercase.
+
+Low-level unrecoverable errors will happen if for example a supposedly binary
+input contains other digits than |0| and |1|. Inputs can not start with a
+|0b|, |0x|, |#x|, |"| or similar prefix: only digits/letters according to the
+binary, decimal, or hexadecimal notation.
+
+
+With this package loaded additionally to \xintexprname, hexadecimal input is
+possible in expressions: simply by using the prefix |"|. Such hexadecimal
+numbers may have a fractional part. Lowercase letters are allowed there.
+Currently the |p| postfix notation from standard programming languages given a
+power of two multiplicand is not implemented.
% \clearpage
@@ -13283,18 +13373,27 @@ uppercase.
Converts from decimal to hexadecimal.\etype{f}
+Input limited to |4000| digits (only a few more allowed) with standard \TeX\
+settings.\CHANGED{1.2m}
+
\texttt{\string\xintDecToHex \string{\printnumber{2718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003}\string}}\endgraf\noindent\dtt{->\printnumber{\xintDecToHex{2718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003}}}
\subsection{\csbh{xintDecToBin}}\label{xintDecToBin}
Converts from decimal to binary.\etype{f}
+Input limited to |4000| digits (only a few more allowed) with standard \TeX\
+settings.\CHANGED{1.2m}
+
\texttt{\string\xintDecToBin \string{\printnumber{2718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003}\string}}\endgraf\noindent\dtt{->\printnumber{\xintDecToBin{2718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427427466391932003}}}
\subsection{\csbh{xintHexToDec}}\label{xintHexToDec}
Converts from hexadecimal to decimal.\etype{f}
+Input limited to about |5500| hexadecimal digits with standard \TeX\
+settings.\CHANGED{1.2m}
+
\texttt{\string\xintHexToDec
\string{\printnumber{11A9397C66949A97051F7D0A817914E3E0B17C41B11C48BAEF2B5760BB38D272F46DCE46C6032936BF37DAC918814C63}\string}}\endgraf\noindent
\dtt{->\printnumber{\xintHexToDec{11A9397C66949A97051F7D0A817914E3E0B17C41B11C48BAEF2B5760BB38D272F46DCE46C6032936BF37DAC918814C63}}}
@@ -13303,6 +13402,9 @@ Converts from hexadecimal to decimal.\etype{f}
Converts from binary to decimal.\etype{f}
+Input limited to about |19950| binary digits with standard \TeX\
+settings.\CHANGED{1.2m}
+
\texttt{\string\xintBinToDec
\string{\printnumber{100011010100100111001011111000110011010010100100110101001011100000101000111110111110100001010100000010111100100010100111000111110000010110001011111000100000110110001000111000100100010111010111011110010101101010111011000001011101100111000110100100111001011110100011011011100111001000110110001100000001100101001001101101011111100110111110110101100100100011000100000010100110001100011}\string}}\endgraf\noindent
\dtt{->\printnumber{\xintBinToDec{100011010100100111001011111000110011010010100100110101001011100000101000111110111110100001010100000010111100100010100111000111110000010110001011111000100000110110001000111000100100010111010111011110010101101010111011000001011101100111000110100100111001011110100011011011100111001000110110001100000001100101001001101101011111100110111110110101100100100011000100000010100110001100011}}}
@@ -13311,13 +13413,20 @@ Converts from binary to decimal.\etype{f}
Converts from binary to hexadecimal.\etype{f}
+Input limited to about |13300| binary digits with standard \TeX\
+settings.\CHANGED{1.2m}
+
\texttt{\string\xintBinToHex
\string{\printnumber{100011010100100111001011111000110011010010100100110101001011100000101000111110111110100001010100000010111100100010100111000111110000010110001011111000100000110110001000111000100100010111010111011110010101101010111011000001011101100111000110100100111001011110100011011011100111001000110110001100000001100101001001101101011111100110111110110101100100100011000100000010100110001100011}\string}}\endgraf\noindent
\dtt{->\printnumber{\xintBinToHex{100011010100100111001011111000110011010010100100110101001011100000101000111110111110100001010100000010111100100010100111000111110000010110001011111000100000110110001000111000100100010111010111011110010101101010111011000001011101100111000110100100111001011110100011011011100111001000110110001100000001100101001001101101011111100110111110110101100100100011000100000010100110001100011}}}
\subsection{\csbh{xintHexToBin}}\label{xintHexToBin}
-Converts from hexadecimal to binary.\etype{f}
+Converts from hexadecimal to binary. Up to three leading zeroes of the output
+are trimmed.\etype{f}
+
+Input limited to about |4950| hexadecimal digits with standard \TeX\
+settings.\CHANGED{1.2m}
\texttt{\string\xintHexToBin
\string{\printnumber{11A9397C66949A97051F7D0A817914E3E0B17C41B11C48BAEF2B5760BB38D272F46DCE46C6032936BF37DAC918814C63}\string}}\endgraf\noindent
@@ -13325,8 +13434,12 @@ Converts from hexadecimal to binary.\etype{f}
\subsection{\csbh{xintCHexToBin}}\label{xintCHexToBin}
-Also converts from hexadecimal to binary.\etype{f} Faster on inputs with at
-least one hundred hexadecimal digits.
+Converts from hexadecimal to binary.\etype{f} Same as \csbxint{HexToBin}, but
+an input with |N| hexadecimal digits will give an output with exactly |4N|
+binary digits, leading zeroes are not trimmed.\CHANGED{1.2m}
+
+Input limited to about |4950| hexadecimal digits with standard \TeX\
+settings.
\texttt{\string\xintCHexToBin
\string{\printnumber{11A9397C66949A97051F7D0A817914E3E0B17C41B11C48BAEF2B5760BB38D272F46DCE46C6032936BF37DAC918814C63}\string}}\endgraf\noindent
@@ -13490,7 +13603,7 @@ stage not immediately.
\subsection{\csbh{xintSeries}}\label{xintSeries}
\csa{xintSeries}|{A}{B}{\coeff}|\etype{\numx\numx\Ff} computes
-$\sum_{\text{|n=A|}}^{\text{|n=B|}}|\coeff{n}|$. The initial and final indices
+$\sum_{\text{|n=A|}}^{\text{|n=B|}}$|\coeff{n}|. The initial and final indices
must obey the |\numexpr| constraint of expanding to numbers at most |2^31-1|.
The |\coeff| macro must be a one-parameter \fexpan dable macro, taking on
input an explicit number |n| and producing some number or fraction |\coeff{n}|;
@@ -13623,7 +13736,7 @@ and that the sum of rounded terms fared a bit better.
\noindent \csa{xintRationalSeries}|{A}{B}{f}{\ratio}|\etype{\numx\numx\Ff\Ff}
-evaluates $\sum_{\text{|n=A|}}^{\text{|n=B|}}|F(n)|$, where |F(n)| is specified
+evaluates $\sum_{\text{|n=A|}}^{\text{|n=B|}}$|F(n)|, where |F(n)| is specified
indirectly via the data of |f=F(A)| and the one-parameter macro |\ratio| which
must be such that |\macro{n}| expands to |F(n)/F(n-1)|. The name indicates that
\csa{xintRationalSeries} was designed to be useful in the cases where
@@ -13836,7 +13949,7 @@ needs a general calculus of special functions. This is why the package
\csa{xintPowerSeries}|{A}{B}{\coeff}{f}|\etype{\numx\numx\Ff\Ff}
evaluates the sum
-$\sum_{\text{|n=A|}}^{\text{|n=B|}}|\coeff{n}|\cdot |f|^{\text{|n|}}$. The
+$\sum_{\text{|n=A|}}^{\text{|n=B|}}$|\coeff{n}|${}\cdot |f|^{\text{|n|}}$. The
initial and final indices are given to a |\numexpr| expression. The |\coeff|
macro (which, as argument to \csa{xintPowerSeries} is expanded only at the time
|\coeff{n}| is needed) should be defined as a one-parameter expandable macro,
@@ -13940,7 +14053,7 @@ an expanding only context, doing |\edef\g{\f}| is no option, then
\csa{xintFxPtPowerSeries}|{A}{B}{\coeff}{f}{D}|\etype{\numx\numx}
computes
-$\sum_{\text{|n=A|}}^{\text{|n=B|}}|\coeff{n}|\cdot |f|^{\,\text{|n|}}$ with each
+$\sum_{\text{|n=A|}}^{\text{|n=B|}}$|\coeff{n}|${}\cdot |f|^{\,\text{|n|}}$ with each
term of the series truncated to |D| digits\etype{\Ff\Ff\numx}
after the decimal point. As
usual, |A| and |B| are completely expanded through their inclusion in a
@@ -14092,7 +14205,7 @@ release.
\noindent\csa{xintFloatPowerSeries}|[P]{A}{B}{\coeff}{f}|%
\ntype{{\upshape[\numx]}\numx\numx}
computes
-$\sum_{\text{|n=A|}}^{\text{|n=B|}}|\coeff{n}|\cdot |f|^{\,\text{|n|}}$
+$\sum_{\text{|n=A|}}^{\text{|n=B|}}$|\coeff{n}|${}\cdot |f|^{\,\text{|n|}}$
with a floating point
precision given by the optional parameter |P| or by the current setting of
|\xintDigits|.\etype{\Ff\Ff}
@@ -15221,10 +15334,18 @@ $1$ or $-1$.
% This is \expandafter|\xintbndlversion| of \expandafter|\xintbndldate|.
%
% \begin{itemize}
+% \item Release |1.2m| of |2017/07/31| has rewritten entirely the
+% \xintbinhexnameimp module. The new routines (in the style of the |1.2|
+% from \xintcorenameimp) are faster (depending on the macro |1.5x--2.5x|
+% faster at |100| digits, |5x--9x| times faster at |1000| digits) but they
+% limit the maximal size of the inputs to a few thousand characters, from
+% 4000 to about 19900 depending on the macro. The |1.08| routines could
+% handle (slowly) tens of thousands of digits.
+%
% \item Release |1.2l| of |2017/07/26| refactored the subtraction and also
-% |\xintiiCmp| got a rewrite. It should presumably use |\pdfstrcmp| and
-% related PDF\TeX\ utilities, but I do not want to have to worry about
-% multi-engine usage.
+% |\xintiiCmp| got a rewrite. It should certainly use |\pdfstrcmp| for
+% dramatic speed-up but I do not want to have to worry about multi-engine
+% usage.
%
% Some utility routines in \xintcorenameimp manipulating blocks of eight
% digits and still in |O(N^2)| style have been re-written analogously to the
@@ -15451,7 +15572,7 @@ $1$ or $-1$.
\fi
\XINT_providespackage
\ProvidesPackage {xintkernel}%
- [2017/07/26 1.2l Paraphernalia for the xint packages (JFB)]%
+ [2017/07/31 1.2m Paraphernalia for the xint packages (JFB)]%
% \end{macrocode}
% \subsection{Constants}
% \begin{macrocode}
@@ -16037,7 +16158,7 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xinttools}%
- [2017/07/26 1.2l Expandable and non-expandable utilities (JFB)]%
+ [2017/07/31 1.2m 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.|
@@ -17941,7 +18062,7 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintcore}%
- [2017/07/26 1.2l Expandable arithmetic on big integers (JFB)]%
+ [2017/07/31 1.2m 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
@@ -18543,11 +18664,15 @@ $1$ or $-1$.
% \subsection{\csh{XINT_unsep_loop}}
%
% \lverb|This is used as
-%( \the\numexpr0\XINT_unsep_loop (blocks of 1<8d>!)%
+%( \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
%)
-% It removes the 1's and !'s, from the 8N digits and outputs them prefixed by
-% a 0 token.
+% It removes the 1's and !'s, and outputs the 8N digits with a 0 token as
+% as prefix which will have to be cleaned out by caller.
+%
+% Actually it does not matter whether the blocks contain really 8 digits, all
+% that matters is that they have 1 as first digit (and at most 9 digits after
+% that to obey the TeX-\numexpr bound).
%
% Done at 1.2l for usage by other macros. The similar code in earlier releases
% was strangely in O(N^2) style, apparently to avoid some memory constraints.
@@ -18571,6 +18696,33 @@ $1$ or $-1$.
}%
\def\XINT_unsep_clean 1{\relax}%
% \end{macrocode}
+% \subsection{\csh{XINT_unsepb_loop}}
+%
+% \lverb|This is used as
+%( \the\numexpr0\XINT_unsepb_loop (blocks of digits with ! as separator)%
+%: \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\xint_c_i\relax
+%)
+% It removes the !'s and outputs the digits (being careful not to suppress
+% leading zeroes) with a 0 prefix to remove later. Each block is allowed up to
+% nine digits.
+%
+% This is the same as \XINT_unsep_loop except that the digits blocks have no
+% 1-prefix. Used by \xintHexToDec of 1.2m.|
+% \begin{macrocode}
+\def\XINT_unsepb_loop #1!#2!#3!#4!#5!#6!#7!#8!#9!%
+{%
+ \expandafter\XINT_unsep_clean
+ \the\numexpr 1#1\expandafter\XINT_unsep_clean
+ \the\numexpr 1#2\expandafter\XINT_unsep_clean
+ \the\numexpr 1#3\expandafter\XINT_unsep_clean
+ \the\numexpr 1#4\expandafter\XINT_unsep_clean
+ \the\numexpr 1#5\expandafter\XINT_unsep_clean
+ \the\numexpr 1#6\expandafter\XINT_unsep_clean
+ \the\numexpr 1#7\expandafter\XINT_unsep_clean
+ \the\numexpr 1#8\expandafter\XINT_unsep_clean
+ \the\numexpr 1#9\XINT_unsepb_loop
+}%
+% \end{macrocode}
% \subsection{\csh{XINT_unsep_cuzsmall}}
%
% \lverb|This is used as
@@ -18661,6 +18813,21 @@ $1$ or $-1$.
\expandafter#1\xint_gob_til_one ##2##3##4##5##6##7##8%
}}\XINT_zeroes_forviii_end{ }%
% \end{macrocode}
+% \subsection{\csh{XINT_zeroes_foriv}}
+% \lverb|&
+%( \romannumeral0\XINT_zeroes_foriv #1\R{0\R}{00\R}{000\R}%
+%: \R{0\R}{00\R}{000\R}\R\W
+%)
+% Helper macro needed by 1.2m \xintHexToDec of xintbinhex.|
+% \begin{macrocode}
+\def\XINT_zeroes_foriv #1#2#3#4#5#6#7#8%
+{%
+ \xint_gob_til_R #8\XINT_zeroes_foriv_end\R\XINT_zeroes_foriv
+}%
+\def\XINT_zeroes_foriv_end\R\XINT_zeroes_foriv #1#2\W
+ {\XINT_zeroes_foriv_done #1}%
+\def\XINT_zeroes_foriv_done #1\R{ #1}%
+% \end{macrocode}
% \subsection{\csh{XINT_sepbyviii_Z}}
%
% \lverb|This is used as
@@ -21227,7 +21394,7 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xint}%
- [2017/07/26 1.2l Expandable operations on big integers (JFB)]%
+ [2017/07/31 1.2m Expandable operations on big integers (JFB)]%
% \end{macrocode}
% \subsection{More token management}
% \begin{macrocode}
@@ -21685,8 +21852,12 @@ $1$ or $-1$.
% \subsection{\csh{xintGeq}, \csh{xintiiGeq}}
% \lverb|&
% PLUS GRAND OU ÉGAL
-% attention compare les **valeurs absolues**|
-% \lverb|1.2l made \xintiiGeq robust against non terminated items.|
+% attention compare les **valeurs absolues**
+%
+% 1.2l made \xintiiGeq robust against non terminated items.
+%
+% 1.2l rewrote \xintiiCmp, but forgot to handle \xintiiGeq too. Done at 1.2m.
+% |
% \begin{macrocode}
\def\xintGeq {\romannumeral0\xintgeq }%
\def\xintgeq #1{\expandafter\XINT_geq\romannumeral0\xintnum{#1}\xint:}%
@@ -21696,8 +21867,6 @@ $1$ or $-1$.
{%
\expandafter\XINT_geq_fork\expandafter #1\romannumeral`&&@#3\xint:#2\xint:
}%
-\let\XINT_geq_pre \xintiigeq % TEMPORAIRE (oui, mais depuis quand ?)
-\let\XINT_Geq \xintGeq % TEMPORAIRE ATTENTION FAIT xintNum (et alors?)
\def\XINT_geq #1#2\xint:#3%
{%
\expandafter\XINT_geq_fork\expandafter #1\romannumeral0\xintnum{#3}\xint:#2\xint:
@@ -21721,198 +21890,98 @@ $1$ or $-1$.
\def\XINT_geq_secondiszero #1\krof #20#3\xint:#4\xint:{ 1}%
\def\XINT_geq_plusminus #1-{\XINT_geq_plusplus #1{}}%
\def\XINT_geq_minusplus -#1{\XINT_geq_plusplus {}#1}%
-\def\XINT_geq_minusminus --{\XINT_geq_plusplus {}{}}%
-\def\XINT_geq_plusplus #1#2#3\xint:#4\xint:{\XINT_geq_pp #1#4\xint:#2#3\xint:}%
-\def\XINT_geq_pp #1\xint:
-{%
- \expandafter\XINT_geq_pp_a
- \romannumeral0\expandafter\XINT_sepandrev_andcount
- \romannumeral0\XINT_zeroes_forviii #1\R\R\R\R\R\R\R\R{10}0000001\W
- #1\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
- \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
- \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
- \X
-}%
-\def\XINT_geq_pp_a #1\xint:#2\X #3\xint:
-{%
- \expandafter\XINT_geq_checklengths
- \the\numexpr #1\expandafter\xint:%
- \romannumeral0\expandafter\XINT_sepandrev_andcount
- \romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W
- #3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
- \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
- \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
- \Z!\Z!\Z!\Z!\Z!\W #2\Z!\Z!\Z!\Z!\Z!\W
-}%
-\def\XINT_geq_checklengths #1\xint:#2\xint:
-{%
- \ifnum #1=#2
- \expandafter\xint_firstoftwo
- \else
- \expandafter\xint_secondoftwo
- \fi
- \XINT_geq_aa {\XINT_geq_distinctlengths {#1}{#2}}%
-}%
-\def\XINT_geq_distinctlengths #1#2#3\W #4\W
-{%
- \ifnum #1>#2
- \expandafter\xint_firstoftwo
- \else
- \expandafter\xint_secondoftwo
- \fi
- { 1}{ 0}%
-}%
-\def\XINT_geq_aa {\expandafter\XINT_geq_w\the\numexpr\XINT_geq_a \xint_c_i }%
-\def\XINT_geq_a #1!#2!#3!#4!#5\W #6!#7!#8!#9!%
-{%
- \XINT_geq_b #1!#6!#2!#7!#3!#8!#4!#9!#5\W
-}%
-\def\XINT_geq_b #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_geq_bi \Z
- \expandafter\XINT_geq_c\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
-}%
-\def\XINT_geq_c 1#1#2\xint:%
-{%
- 1#2\expandafter!\the\numexpr\XINT_geq_d #1%
-}%
-\def\XINT_geq_d #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_geq_di \Z
- \expandafter\XINT_geq_e\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
-}%
-\def\XINT_geq_e 1#1#2\xint:%
-{%
- 1#2\expandafter!\the\numexpr\XINT_geq_f #1%
-}%
-\def\XINT_geq_f #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_geq_fi \Z
- \expandafter\XINT_geq_g\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
-}%
-\def\XINT_geq_g 1#1#2\xint:%
-{%
- 1#2\expandafter!\the\numexpr\XINT_geq_h #1%
-}%
-\def\XINT_geq_h #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_geq_hi \Z
- \expandafter\XINT_geq_i\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
-}%
-\def\XINT_geq_i 1#1#2\xint:%
-{%
- 1#2\expandafter!\the\numexpr\XINT_geq_a #1%
-}%
-\def\XINT_geq_bi\Z
- \expandafter\XINT_geq_c\the\numexpr#1+1#2-#3\xint:#4!#5!#6!#7!#8!#9!\Z !\W
-{%
- \XINT_geq_k #1#2!#5!#7!#9!%
-}%
-\def\XINT_geq_di\Z
- \expandafter\XINT_geq_e\the\numexpr#1+1#2-#3\xint:#4!#5!#6!#7!#8\W
-{%
- \XINT_geq_k #1#2!#5!#7!%
-}%
-\def\XINT_geq_fi\Z
- \expandafter\XINT_geq_g\the\numexpr#1+1#2-#3\xint:#4!#5!#6\W
-{%
- \XINT_geq_k #1#2!#5!%
-}%
-\def\XINT_geq_hi\Z
- \expandafter\XINT_geq_i\the\numexpr#1+1#2-#3\xint:#4\W
-{%
- \XINT_geq_k #1#2!%
-}%
-\def\XINT_geq_k #1#2\W
-{%
- \xint_UDzerofork
- #1{-1\relax { 0}}%
- 0{-1\relax { 1}}%
- \krof
-}%
-\def\XINT_geq_w #1-1#2{#2}%
+\def\XINT_geq_minusminus --{\XINT_geq_plusplus {}{}}%
+\def\XINT_geq_plusplus
+ {\expandafter\XINT_geq_finish\romannumeral0\XINT_cmp_plusplus}%
+\def\XINT_geq_finish #1{\if-#1\expandafter\XINT_geq_no
+ \else\expandafter\XINT_geq_yes\fi}%
+\def\XINT_geq_no 1{ 0}%
+\def\XINT_geq_yes { 1}%
% \end{macrocode}
% \subsection{\csh{xintiMax}, \csh{xintiiMax}}
% \lverb|&
-% 1.2 REMOVES \xintMax, \xintMin, \xintMaxof, \xintMinof.|
+% 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.
+% |
% \begin{macrocode}
\def\xintiMax {\romannumeral0\xintimax }%
\def\xintimax #1%
{%
- \expandafter\xint_max\expandafter {\romannumeral0\xintnum{#1}}%
+ \expandafter\xint_max\romannumeral0\xintnum{#1}\xint:
}%
-\def\xint_max #1#2%
+\def\xint_max #1\xint:#2%
{%
- \expandafter\XINT_max_pre\expandafter {\romannumeral0\xintnum{#2}}{#1}%
+ \expandafter\XINT_max_fork\romannumeral0\xintnum{#2}\xint:#1\xint:
}%
\def\xintiiMax {\romannumeral0\xintiimax }%
\def\xintiimax #1%
{%
- \expandafter\xint_iimax\expandafter {\romannumeral`&&@#1}%
+ \expandafter\xint_iimax \romannumeral`&&@#1\xint:
}%
-\def\xint_iimax #1#2%
+\def\xint_iimax #1\xint:#2%
{%
- \expandafter\XINT_max_pre\expandafter {\romannumeral`&&@#2}{#1}%
+ \expandafter\XINT_max_fork\romannumeral`&&@#2\xint:#1\xint:
}%
-\def\XINT_max_pre #1#2{\XINT_max_fork #1\Z #2\Z {#2}{#1}}%
-\def\XINT_Max #1#2{\romannumeral0\XINT_max_fork #2\Z #1\Z {#1}{#2}}%
% \end{macrocode}
% \lverb|&
% #3#4 vient du *premier*,
-% #1#2 vient du *second*|
+% #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.|
% \begin{macrocode}
-\def\XINT_max_fork #1#2\Z #3#4\Z
+\def\XINT_max_fork #1#2\xint:#3#4\xint:
{%
\xint_UDsignsfork
#1#3\XINT_max_minusminus % A < 0, B < 0
- #1-\XINT_max_minusplus % B < 0, A >= 0
- #3-\XINT_max_plusminus % A < 0, B >= 0
+ #1-\XINT_max_plusminus % B < 0, A >= 0
+ #3-\XINT_max_minusplus % A < 0, B >= 0
--{\xint_UDzerosfork
#1#3\XINT_max_zerozero % A = B = 0
- #10\XINT_max_zeroplus % B = 0, A > 0
- #30\XINT_max_pluszero % A = 0, B > 0
+ #10\XINT_max_pluszero % B = 0, A > 0
+ #30\XINT_max_zeroplus % A = 0, B > 0
00\XINT_max_plusplus % A, B > 0
\krof }%
\krof
- {#2}{#4}#1#3%
+ #3#1#2\xint:#4\xint:
+ \expandafter\xint_firstoftwo_thenstop
+ \else
+ \expandafter\xint_secondoftwo_thenstop
+ \fi
+ {#3#4}{#1#2}%
}%
% \end{macrocode}
% \lverb|&
-% A = #4#2, B = #3#1|
+% Refactored at 1.2m for avoiding grabbing arguments. Position of inputs
+% shared with iiCmp and iiGeq code.|
% \begin{macrocode}
-\def\XINT_max_zerozero #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_max_zeroplus #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_max_pluszero #1#2#3#4{\xint_secondoftwo_thenstop }%
-\def\XINT_max_minusplus #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_max_plusminus #1#2#3#4{\xint_secondoftwo_thenstop }%
-\def\XINT_max_plusplus #1#2#3#4%
+\def\XINT_max_zerozero #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_max_zeroplus #1\fi{\xint_secondoftwo_thenstop }%
+\def\XINT_max_pluszero #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_max_minusplus #1\fi{\xint_secondoftwo_thenstop }%
+\def\XINT_max_plusminus #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_max_plusplus
{%
- \ifodd\XINT_Geq {#4#2}{#3#1}
- \expandafter\xint_firstoftwo_thenstop
- \else
- \expandafter\xint_secondoftwo_thenstop
- \fi
+ \if1\romannumeral0\XINT_geq_plusplus
}%
% \end{macrocode}
-% \lverb+#3=-, #4=-, #1 = |B| = -B, #2 = |A| = -A+
+% \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.+
% \begin{macrocode}
-\def\XINT_max_minusminus #1#2#3#4%
+\def\XINT_max_minusminus --%
{%
- \ifodd\XINT_Geq {#1}{#2}
- \expandafter\xint_firstoftwo_thenstop
- \else
- \expandafter\xint_secondoftwo_thenstop
- \fi
+ \unless\if1\romannumeral0\XINT_geq_plusplus{}{}%
}%
% \end{macrocode}
% \subsection{\csh{xintiMaxof}, \csh{xintiiMaxof}}
% \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.|
-% \lverb|1.2l made \xintiiMaxof robust against non terminated items.|
+% NOT compatible with empty list.
+%
+% 1.2l made \xintiiMaxof robust against non terminated items.|
% \begin{macrocode}
\def\xintiMaxof {\romannumeral0\xintimaxof }%
\def\xintimaxof #1{\expandafter\XINT_imaxof_a\romannumeral`&&@#1\xint:}%
@@ -21943,75 +22012,65 @@ $1$ or $-1$.
% \subsection{\csh{xintiMin}, \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.|
+% \xintMax, \xintMaxof), only provided by \xintfracnameimp.
+%
+% 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.
+% |
% \begin{macrocode}
\def\xintiMin {\romannumeral0\xintimin }%
\def\xintimin #1%
{%
- \expandafter\xint_min\expandafter {\romannumeral0\xintnum{#1}}%
+ \expandafter\xint_min\romannumeral0\xintnum{#1}\xint:
}%
-\def\xint_min #1#2%
+\def\xint_min #1\xint:#2%
{%
- \expandafter\XINT_min_pre\expandafter {\romannumeral0\xintnum{#2}}{#1}%
+ \expandafter\XINT_min_fork\romannumeral0\xintnum{#2}\xint:#1\xint:
}%
\def\xintiiMin {\romannumeral0\xintiimin }%
\def\xintiimin #1%
{%
- \expandafter\xint_iimin\expandafter {\romannumeral`&&@#1}%
+ \expandafter\xint_iimin \romannumeral`&&@#1\xint:
}%
-\def\xint_iimin #1#2%
+\def\xint_iimin #1\xint:#2%
{%
- \expandafter\XINT_min_pre\expandafter {\romannumeral`&&@#2}{#1}%
+ \expandafter\XINT_min_fork\romannumeral`&&@#2\xint:#1\xint:
}%
-\def\XINT_min_pre #1#2{\XINT_min_fork #1\Z #2\Z {#2}{#1}}%
-\def\XINT_Min #1#2{\romannumeral0\XINT_min_fork #2\Z #1\Z {#1}{#2}}%
-% \end{macrocode}
-% \lverb|&
-% #3#4 vient du *premier*,
-% #1#2 vient du *second*|
-% \begin{macrocode}
-\def\XINT_min_fork #1#2\Z #3#4\Z
+\def\XINT_min_fork #1#2\xint:#3#4\xint:
{%
\xint_UDsignsfork
#1#3\XINT_min_minusminus % A < 0, B < 0
- #1-\XINT_min_minusplus % B < 0, A >= 0
- #3-\XINT_min_plusminus % A < 0, B >= 0
+ #1-\XINT_min_plusminus % B < 0, A >= 0
+ #3-\XINT_min_minusplus % A < 0, B >= 0
--{\xint_UDzerosfork
#1#3\XINT_min_zerozero % A = B = 0
- #10\XINT_min_zeroplus % B = 0, A > 0
- #30\XINT_min_pluszero % A = 0, B > 0
+ #10\XINT_min_pluszero % B = 0, A > 0
+ #30\XINT_min_zeroplus % A = 0, B > 0
00\XINT_min_plusplus % A, B > 0
\krof }%
\krof
- {#2}{#4}#1#3%
-}%
-% \end{macrocode}
-% \lverb|&
-% A = #4#2, B = #3#1|
-% \begin{macrocode}
-\def\XINT_min_zerozero #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_min_zeroplus #1#2#3#4{\xint_secondoftwo_thenstop }%
-\def\XINT_min_pluszero #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_min_minusplus #1#2#3#4{\xint_secondoftwo_thenstop }%
-\def\XINT_min_plusminus #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_min_plusplus #1#2#3#4%
-{%
- \ifodd\XINT_Geq {#4#2}{#3#1}
+ #3#1#2\xint:#4\xint:
\expandafter\xint_secondoftwo_thenstop
\else
\expandafter\xint_firstoftwo_thenstop
\fi
+ {#3#4}{#1#2}%
}%
-% \end{macrocode}
-% \lverb+#3=-, #4=-, #1 = |B| = -B, #2 = |A| = -A+
-% \begin{macrocode}
-\def\XINT_min_minusminus #1#2#3#4%
+\def\XINT_min_zerozero #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_min_zeroplus #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_min_pluszero #1\fi{\xint_secondoftwo_thenstop }%
+\def\XINT_min_minusplus #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_min_plusminus #1\fi{\xint_secondoftwo_thenstop }%
+\def\XINT_min_plusplus
{%
- \ifodd\XINT_Geq {#1}{#2}
- \expandafter\xint_secondoftwo_thenstop
- \else
- \expandafter\xint_firstoftwo_thenstop
- \fi
+ \if1\romannumeral0\XINT_geq_plusplus
+}%
+\def\XINT_min_minusminus --%
+{%
+ \unless\if1\romannumeral0\XINT_geq_plusplus{}{}%
}%
% \end{macrocode}
% \subsection{\csh{xintiMinof}, \csh{xintiiMinof}}
@@ -23290,6 +23349,9 @@ $1$ or $-1$.
%
% The commenting is currently (\xintdocdate) very sparse.
%
+% The macros from |1.08| (|2013/06/07|) remained unchanged
+% until their complete rewrite at |1.2m| (|2017/07/31|).
+%
% \subsection{Catcodes, \protect\eTeX{} and reload detection}
%
% The code for reload detection was initially copied from \textsc{Heiko
@@ -23347,20 +23409,9 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintbinhex}%
- [2017/07/26 1.2l Expandable binary and hexadecimal conversions (JFB)]%
-% \end{macrocode}
-% \subsection{Antique helper macro}
-% \lverb!At 1.2, it was left in xint.sty rather than being moved to
-% xintcore.sty, thus breaking \xintHexToDec here.!
-% \begin{macrocode}
-\def\xint_cleanupzeros_andstop#1{%
-\def\xint_cleanupzeros_andstop ##1##2##3##4%
-{%
- \expandafter#1\the\numexpr ##1##2##3##4\relax
-}}\xint_cleanupzeros_andstop{ }%
+ [2017/07/31 1.2m Expandable binary and hexadecimal conversions (JFB)]%
% \end{macrocode}
% \subsection{Constants, etc...}
-% \lverb!1.08!
% \begin{macrocode}
\newcount\xint_c_ii^xv \xint_c_ii^xv 32768
\newcount\xint_c_ii^xvi \xint_c_ii^xvi 65536
@@ -23368,59 +23419,40 @@ $1$ or $-1$.
\def\XINT_tmpa #1{\ifx\relax#1\else
\expandafter\edef\csname XINT_sdth_#1\endcsname
{\ifcase #1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
- 8\or 9\or A\or B\or C\or D\or E\or F\fi}%
+ 8\or 9\or A\or B\or C\or D\or E\or F\else\space\fi}%
\expandafter\XINT_tmpa\fi }%
-\XINT_tmpa {0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}\relax
+\XINT_tmpa {-1}{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}\relax
\def\XINT_tmpa #1{\ifx\relax#1\else
\expandafter\edef\csname XINT_sdtb_#1\endcsname
{\ifcase #1
0000\or 0001\or 0010\or 0011\or 0100\or 0101\or 0110\or 0111\or
- 1000\or 1001\or 1010\or 1011\or 1100\or 1101\or 1110\or 1111\fi}%
+ 1000\or 1001\or 1010\or 1011\or 1100\or 1101\or 1110\or 1111\else\space\fi}%
\expandafter\XINT_tmpa\fi }%
-\XINT_tmpa {0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}\relax
+\XINT_tmpa {-1}{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}\relax
\let\XINT_tmpa\relax
-\expandafter\def\csname XINT_sbtd_0000\endcsname {0}%
-\expandafter\def\csname XINT_sbtd_0001\endcsname {1}%
-\expandafter\def\csname XINT_sbtd_0010\endcsname {2}%
-\expandafter\def\csname XINT_sbtd_0011\endcsname {3}%
-\expandafter\def\csname XINT_sbtd_0100\endcsname {4}%
-\expandafter\def\csname XINT_sbtd_0101\endcsname {5}%
-\expandafter\def\csname XINT_sbtd_0110\endcsname {6}%
-\expandafter\def\csname XINT_sbtd_0111\endcsname {7}%
-\expandafter\def\csname XINT_sbtd_1000\endcsname {8}%
-\expandafter\def\csname XINT_sbtd_1001\endcsname {9}%
-\expandafter\def\csname XINT_sbtd_1010\endcsname {10}%
-\expandafter\def\csname XINT_sbtd_1011\endcsname {11}%
-\expandafter\def\csname XINT_sbtd_1100\endcsname {12}%
-\expandafter\def\csname XINT_sbtd_1101\endcsname {13}%
-\expandafter\def\csname XINT_sbtd_1110\endcsname {14}%
-\expandafter\def\csname XINT_sbtd_1111\endcsname {15}%
-\expandafter\let\csname XINT_sbth_0000\expandafter\endcsname
- \csname XINT_sbtd_0000\endcsname
-\expandafter\let\csname XINT_sbth_0001\expandafter\endcsname
- \csname XINT_sbtd_0001\endcsname
-\expandafter\let\csname XINT_sbth_0010\expandafter\endcsname
- \csname XINT_sbtd_0010\endcsname
-\expandafter\let\csname XINT_sbth_0011\expandafter\endcsname
- \csname XINT_sbtd_0011\endcsname
-\expandafter\let\csname XINT_sbth_0100\expandafter\endcsname
- \csname XINT_sbtd_0100\endcsname
-\expandafter\let\csname XINT_sbth_0101\expandafter\endcsname
- \csname XINT_sbtd_0101\endcsname
-\expandafter\let\csname XINT_sbth_0110\expandafter\endcsname
- \csname XINT_sbtd_0110\endcsname
-\expandafter\let\csname XINT_sbth_0111\expandafter\endcsname
- \csname XINT_sbtd_0111\endcsname
-\expandafter\let\csname XINT_sbth_1000\expandafter\endcsname
- \csname XINT_sbtd_1000\endcsname
-\expandafter\let\csname XINT_sbth_1001\expandafter\endcsname
- \csname XINT_sbtd_1001\endcsname
+\expandafter\def\csname XINT_sbth_0000\endcsname {0}%
+\expandafter\def\csname XINT_sbth_0001\endcsname {1}%
+\expandafter\def\csname XINT_sbth_0010\endcsname {2}%
+\expandafter\def\csname XINT_sbth_0011\endcsname {3}%
+\expandafter\def\csname XINT_sbth_0100\endcsname {4}%
+\expandafter\def\csname XINT_sbth_0101\endcsname {5}%
+\expandafter\def\csname XINT_sbth_0110\endcsname {6}%
+\expandafter\def\csname XINT_sbth_0111\endcsname {7}%
+\expandafter\def\csname XINT_sbth_1000\endcsname {8}%
+\expandafter\def\csname XINT_sbth_1001\endcsname {9}%
+\expandafter\def\csname XINT_sbth_1010\endcsname {10}%
+\expandafter\def\csname XINT_sbth_1011\endcsname {11}%
+\expandafter\def\csname XINT_sbth_1100\endcsname {12}%
+\expandafter\def\csname XINT_sbth_1101\endcsname {13}%
+\expandafter\def\csname XINT_sbth_1110\endcsname {14}%
+\expandafter\def\csname XINT_sbth_1111\endcsname {15}%
\expandafter\def\csname XINT_sbth_1010\endcsname {A}%
\expandafter\def\csname XINT_sbth_1011\endcsname {B}%
\expandafter\def\csname XINT_sbth_1100\endcsname {C}%
\expandafter\def\csname XINT_sbth_1101\endcsname {D}%
\expandafter\def\csname XINT_sbth_1110\endcsname {E}%
\expandafter\def\csname XINT_sbth_1111\endcsname {F}%
+\let\XINT_sbth_none \empty
\expandafter\def\csname XINT_shtb_0\endcsname {0000}%
\expandafter\def\csname XINT_shtb_1\endcsname {0001}%
\expandafter\def\csname XINT_shtb_2\endcsname {0010}%
@@ -23437,545 +23469,573 @@ $1$ or $-1$.
\def\XINT_shtb_D {1101}%
\def\XINT_shtb_E {1110}%
\def\XINT_shtb_F {1111}%
-\def\XINT_shtb_G {}%
-\def\XINT_smallhex #1%
+\let\XINT_shtb_none \empty
+\def\XINT_smallhex #1!%
{%
- \expandafter\XINT_smallhex_a\expandafter
- {\the\numexpr (#1+\xint_c_viii)/\xint_c_xvi-\xint_c_i}{#1}%
+ \expandafter\XINT_smallhex_a
+ \the\numexpr (#1+\xint_c_viii)/\xint_c_xvi-\xint_c_i\xint:#1\xint:
}%
-\def\XINT_smallhex_a #1#2%
+\def\XINT_smallhex_a #1\xint:#2\xint:
{%
\csname XINT_sdth_#1\expandafter\expandafter\expandafter\endcsname
- \csname XINT_sdth_\the\numexpr #2-\xint_c_xvi*#1\endcsname
+ \csname XINT_sdth_\the\numexpr #2-\xint_c_xvi*#1\relax\expandafter\endcsname
+ \romannumeral`&&@%
}%
-\def\XINT_smallbin #1%
+\def\XINT_smallbin #1!%
{%
- \expandafter\XINT_smallbin_a\expandafter
- {\the\numexpr (#1+\xint_c_viii)/\xint_c_xvi-\xint_c_i}{#1}%
+ \expandafter\XINT_smallbin_a
+ \the\numexpr (#1+\xint_c_viii)/\xint_c_xvi-\xint_c_i\xint:#1\xint:
}%
-\def\XINT_smallbin_a #1#2%
+\def\XINT_smallbin_a #1\xint:#2\xint:
{%
\csname XINT_sdtb_#1\expandafter\expandafter\expandafter\endcsname
- \csname XINT_sdtb_\the\numexpr #2-\xint_c_xvi*#1\endcsname
+ \csname XINT_sdtb_\the\numexpr #2-\xint_c_xvi*#1\relax\expandafter\endcsname
+ \romannumeral`&&@%
}%
% \end{macrocode}
-% \subsection{\csh{XINT_OQ}}
-% \lverb|Moved with release 1.2 from xintcore 1.1 as it is used only here.
-% Will be probably suppressed once I review the code of xintbinhex.|
-% \begin{macrocode}
-\def\XINT_OQ #1#2#3#4#5#6#7#8#9%
-{%
- \xint_gob_til_R #9\XINT_OQ_end_a\R\XINT_OQ {#9#8#7#6#5#4#3#2#1}%
-}%
-\def\XINT_OQ_end_a\R\XINT_OQ #1#2\Z
-{%
- \XINT_OQ_end_b #1\Z
-}%
-\def\XINT_OQ_end_b #1#2#3#4#5#6#7#8%
-{%
- \xint_gob_til_R
- #8\XINT_OQ_end_viii
- #7\XINT_OQ_end_vii
- #6\XINT_OQ_end_vi
- #5\XINT_OQ_end_v
- #4\XINT_OQ_end_iv
- #3\XINT_OQ_end_iii
- #2\XINT_OQ_end_ii
- \R\XINT_OQ_end_i
- \Z #2#3#4#5#6#7#8%
-}%
-\def\XINT_OQ_end_viii #1\Z #2#3#4#5#6#7#8#9\Z { #9}%
-\def\XINT_OQ_end_vii #1\Z #2#3#4#5#6#7#8#9\Z { #8#90000000}%
-\def\XINT_OQ_end_vi #1\Z #2#3#4#5#6#7#8#9\Z { #7#8#9000000}%
-\def\XINT_OQ_end_v #1\Z #2#3#4#5#6#7#8#9\Z { #6#7#8#900000}%
-\def\XINT_OQ_end_iv #1\Z #2#3#4#5#6#7#8#9\Z { #5#6#7#8#90000}%
-\def\XINT_OQ_end_iii #1\Z #2#3#4#5#6#7#8#9\Z { #4#5#6#7#8#9000}%
-\def\XINT_OQ_end_ii #1\Z #2#3#4#5#6#7#8#9\Z { #3#4#5#6#7#8#900}%
-\def\XINT_OQ_end_i \Z #1#2#3#4#5#6#7#8\Z { #1#2#3#4#5#6#7#80}%
-% \end{macrocode}
-% \subsection{\csh{xintDecToHex}, \csh{xintDecToBin}}
-% \lverb!1.08!
+% \subsection{\csh{xintDecToHex}}
+% \lverb|Complete rewrite at 1.2m in the 1.2 style.
+%
+% Faster but currently limited at about 4007 decimal digits on input
+% [expansion depth=10000].
+%
+% 1.2m version robust against non terminated inputs.
+%
+% An input without leading zeroes gives an output without leading zeroes.|
% \begin{macrocode}
\def\xintDecToHex {\romannumeral0\xintdectohex }%
\def\xintdectohex #1%
- {\expandafter\XINT_dth_checkin\romannumeral`&&@#1\W\W\W\W \T}%
+{%
+ \expandafter\XINT_dth_checkin\romannumeral`&&@#1\xint:
+}%
\def\XINT_dth_checkin #1%
{%
\xint_UDsignfork
- #1\XINT_dth_N
- -{\XINT_dth_P #1}%
+ #1\XINT_dth_neg
+ -{\XINT_dth_main #1}%
\krof
}%
-\def\XINT_dth_N {\expandafter-\romannumeral0\XINT_dth_P }%
-\def\XINT_dth_P {\expandafter\XINT_dth_III\romannumeral`&&@\XINT_dtbh_I {0.}}%
-\def\xintDecToBin {\romannumeral0\xintdectobin }%
-\def\xintdectobin #1%
- {\expandafter\XINT_dtb_checkin\romannumeral`&&@#1\W\W\W\W \T }%
-\def\XINT_dtb_checkin #1%
+\def\XINT_dth_neg {\expandafter-\romannumeral0\XINT_dth_main}%
+\def\XINT_dth_main #1\xint:
{%
- \xint_UDsignfork
- #1\XINT_dtb_N
- -{\XINT_dtb_P #1}%
- \krof
+ \expandafter\XINT_dth_start
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\xint_bye\xint_bye\XINT_dthb_final_a!2!3!4!5!6!7!8!9!\W
}%
-\def\XINT_dtb_N {\expandafter-\romannumeral0\XINT_dtb_P }%
-\def\XINT_dtb_P {\expandafter\XINT_dtb_III\romannumeral`&&@\XINT_dtbh_I {0.}}%
-\def\XINT_dtbh_I #1#2#3#4#5%
+\def\XINT_dth_start #1#2#3#4#5%
{%
- \xint_gob_til_W #5\XINT_dtbh_II_a\W\XINT_dtbh_I_a {}{#2#3#4#5}#1\Z.%
+ \xint_bye#5\XINT_dth_small\xint_bye
+ \XINT_dth_start_a #1#2#3#4#5%
}%
-\def\XINT_dtbh_II_a\W\XINT_dtbh_I_a #1#2{\XINT_dtbh_II_b #2}%
-\def\XINT_dtbh_II_b #1#2#3#4%
+\def\XINT_dth_start_a #1#2#3#4#5%
{%
- \xint_gob_til_W
- #1\XINT_dtbh_II_c
- #2\XINT_dtbh_II_ci
- #3\XINT_dtbh_II_cii
- \W\XINT_dtbh_II_ciii #1#2#3#4%
+ \expandafter\XINT_dth_A\the\numexpr\XINT_dth_a
+ #1#2#3#4\XINT_dth_nextfour!2!3!4!5!6!7!8!9!\Z #5%
}%
-\def\XINT_dtbh_II_c \W\XINT_dtbh_II_ci
- \W\XINT_dtbh_II_cii
- \W\XINT_dtbh_II_ciii \W\W\W\W {{}}%
-\def\XINT_dtbh_II_ci #1\XINT_dtbh_II_ciii #2\W\W\W
- {\XINT_dtbh_II_d {}{#2}{0}}%
-\def\XINT_dtbh_II_cii\W\XINT_dtbh_II_ciii #1#2\W\W
- {\XINT_dtbh_II_d {}{#1#2}{00}}%
-\def\XINT_dtbh_II_ciii #1#2#3\W
- {\XINT_dtbh_II_d {}{#1#2#3}{000}}%
-\def\XINT_dtbh_I_a #1#2#3.%
+\def\XINT_dth_small\xint_bye\XINT_dth_start_a #1\xint_bye #2\W
{%
- \xint_gob_til_Z #3\XINT_dtbh_I_z\Z
- \expandafter\XINT_dtbh_I_b\the\numexpr #2+#30000.{#1}%
+ \expandafter\XINT_dth_B_finish
+ \romannumeral`&&@\XINT_tofourhex#1!\space
}%
-\def\XINT_dtbh_I_b #1.%
+\def\XINT_dth_a #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \expandafter\XINT_dtbh_I_c\the\numexpr
- (#1+\xint_c_ii^xv)/\xint_c_ii^xvi-\xint_c_i.#1.%
+ \expandafter\XINT_dth_update
+ \the\numexpr #1\expandafter\XINT_dth_update
+ \the\numexpr #2\expandafter\XINT_dth_update
+ \the\numexpr #3\expandafter\XINT_dth_update
+ \the\numexpr #4\expandafter\XINT_dth_update
+ \the\numexpr #5\expandafter\XINT_dth_update
+ \the\numexpr #6\expandafter\XINT_dth_update
+ \the\numexpr #7\expandafter\XINT_dth_update
+ \the\numexpr #8\expandafter\XINT_dth_update
+ \the\numexpr #9\XINT_dth_a
+}%
+\def\XINT_dth_nextfour #1\Z #2#3#4#5%
+{%
+ #2#3#4#5!\relax\XINT_dth_nextfour!2!3!4!5!6!7!8!9!\Z
}%
-\def\XINT_dtbh_I_c #1.#2.%
+\def\XINT_dth_update #1!%
{%
- \expandafter\XINT_dtbh_I_d\expandafter
- {\the\numexpr #2-\xint_c_ii^xvi*#1}{#1}%
+ \expandafter\XINT_dth_update_a
+ \the\numexpr (#1+\xint_c_ii^xv)/\xint_c_ii^xvi-\xint_c_i\xint:
+ #1\xint:%
}%
-\def\XINT_dtbh_I_d #1#2#3{\XINT_dtbh_I_a {#3#1.}{#2}}%
-\def\XINT_dtbh_I_z\Z\expandafter\XINT_dtbh_I_b\the\numexpr #1+#2.%
+\def\XINT_dth_update_a #1\xint:#2\xint:
{%
- \ifnum #1=\xint_c_ \expandafter\XINT_dtbh_I_end_zb\fi
- \XINT_dtbh_I_end_za {#1}%
+ 0000+#1\expandafter!\expandafter!\the\numexpr#2-#1*\xint_c_ii^xvi
}%
-\def\XINT_dtbh_I_end_za #1#2{\XINT_dtbh_I {#2#1.}}%
-\def\XINT_dtbh_I_end_zb\XINT_dtbh_I_end_za #1#2{\XINT_dtbh_I {#2}}%
-\def\XINT_dtbh_II_d #1#2#3#4.%
+\def\XINT_dth_A #1!!%
{%
- \xint_gob_til_Z #4\XINT_dtbh_II_z\Z
- \expandafter\XINT_dtbh_II_e\the\numexpr #2+#4#3.{#1}{#3}%
+ \ifnum #1>\xint_c_ \xint_dothis{\XINT_dth_again #1!}\fi
+ \xint_orthat{\XINT_dth_again}%
}%
-\def\XINT_dtbh_II_e #1.%
+\def\XINT_dth_again #1\Z #2%
{%
- \expandafter\XINT_dtbh_II_f\the\numexpr
- (#1+\xint_c_ii^xv)/\xint_c_ii^xvi-\xint_c_i.#1.%
+ \xint_bye #2\XINT_dth_B_a\xint_bye
+ \expandafter\XINT_dth_A\the\numexpr\XINT_dth_a #1\Z #2%
}%
-\def\XINT_dtbh_II_f #1.#2.%
+\def\XINT_dth_B_a\xint_bye
+ \expandafter\XINT_dth_A\the\numexpr\XINT_dth_a #1\XINT_dth_nextfour #2\Z
{%
- \expandafter\XINT_dtbh_II_g\expandafter
- {\the\numexpr #2-\xint_c_ii^xvi*#1}{#1}%
+ \expandafter\XINT_dth_B_finish\romannumeral`&&@\XINT_dth_B_c #1!%
}%
-\def\XINT_dtbh_II_g #1#2#3{\XINT_dtbh_II_d {#3#1.}{#2}}%
-\def\XINT_dtbh_II_z\Z\expandafter\XINT_dtbh_II_e\the\numexpr #1+#2.%
+\def\XINT_dth_B_c #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \ifnum #1=\xint_c_ \expandafter\XINT_dtbh_II_end_zb\fi
- \XINT_dtbh_II_end_za {#1}%
+ \XINT_tofourhex#1!%
+ \XINT_tofourhex#2!%
+ \XINT_tofourhex#3!%
+ \XINT_tofourhex#4!%
+ \XINT_tofourhex#5!%
+ \XINT_tofourhex#6!%
+ \XINT_tofourhex#7!%
+ \XINT_tofourhex#8!%
+ \XINT_tofourhex#9!%
+ \XINT_dth_B_c
}%
-\def\XINT_dtbh_II_end_za #1#2#3{{}#2#1.\Z.}%
-\def\XINT_dtbh_II_end_zb\XINT_dtbh_II_end_za #1#2#3{{}#2\Z.}%
-\def\XINT_dth_III #1#2.%
+% attention ici mon #1 compte pour 4 chiffres hexa
+\def\XINT_tofourhex #1!%
{%
- \xint_gob_til_Z #2\XINT_dth_end\Z
- \expandafter\XINT_dth_III\expandafter
- {\romannumeral`&&@\XINT_dth_small #2.#1}%
+ \expandafter\XINT_tofourhex_a
+ \the\numexpr (#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i\xint: #1\xint:
}%
-\def\XINT_dth_small #1.%
+\def\XINT_tofourhex_a #1\xint: #2\xint:
{%
- \expandafter\XINT_smallhex\expandafter
- {\the\numexpr (#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i\expandafter}%
- \romannumeral`&&@\expandafter\XINT_smallhex\expandafter
- {\the\numexpr
- #1-((#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i)*\xint_c_ii^viii}%
+ \expandafter\XINT_tofourhex_b
+ \the\numexpr #2-\xint_c_ii^viii*#1\xint:#1\xint:
}%
-\def\XINT_dth_end\Z\expandafter\XINT_dth_III\expandafter #1#2\T
+\def\XINT_tofourhex_b #1\xint: #2\xint:
+{%
+ \XINT_smallhex #2!%
+ \XINT_smallhex #1!%
+}%
+\def\XINT_dthb_final_a #1\W{1)\relax \xint:\XINT_dthb_final_b\xint:\W}%
+\def\XINT_dthb_final_b #1\W{1\relax \xint:\XINT_dthb_final_c\xint:\W}%
+\def\XINT_dthb_final_c #1\W{-1)\relax \XINT_dthb_final_d\xint:\xint:\W}%
+\def\XINT_dthb_final_d #1\W{\endcsname}%
+% \end{macrocode}
+% \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.|
+% \begin{macrocode}
+\def\XINT_dth_B_finish #1#2#3%
{%
- \XINT_dth_end_b #1%
+ \unless\if#10\xint_dothis{ #1#2#3}\fi
+ \unless\if#20\xint_dothis{ #2#3}\fi
+ \unless\if#30\xint_dothis{ #3}\fi
+ \xint_orthat{ }%
}%
-\def\XINT_dth_end_b #1.{\XINT_dth_end_c }%
-\def\XINT_dth_end_c #1{\xint_gob_til_zero #1\XINT_dth_end_d 0\space #1}%
-\def\XINT_dth_end_d 0\space 0#1%
+% \end{macrocode}
+% \subsection{\csh{xintDecToBin}}
+% \lverb|Complete rewrite at 1.2m in the 1.2 style.
+%
+% Much faster but currently limited at about 4007 decimal digits on input
+% [expansion depth=10000]
+%
+% 1.2m version robust against non terminated inputs.
+%
+% An input without leading zeroes gives an output without leading zeroes.
+% |
+% \begin{macrocode}
+\def\xintDecToBin {\romannumeral0\xintdectobin }%
+\def\xintdectobin #1%
{%
- \xint_gob_til_zero #1\XINT_dth_end_e 0\space #1%
+ \expandafter\XINT_dtb_checkin\romannumeral`&&@#1\xint:
}%
-\def\XINT_dth_end_e 0\space 0#1%
+\def\XINT_dtb_checkin #1%
{%
- \xint_gob_til_zero #1\XINT_dth_end_f 0\space #1%
+ \xint_UDsignfork
+ #1\XINT_dtb_neg
+ -{\XINT_dtb_main #1}%
+ \krof
}%
-\def\XINT_dth_end_f 0\space 0{ }%
-\def\XINT_dtb_III #1#2.%
+\def\XINT_dtb_neg {\expandafter-\romannumeral0\XINT_dtb_main}%
+\def\XINT_dtb_main #1\xint:
{%
- \xint_gob_til_Z #2\XINT_dtb_end\Z
- \expandafter\XINT_dtb_III\expandafter
- {\romannumeral`&&@\XINT_dtb_small #2.#1}%
+ \expandafter\XINT_dtb_start
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\xint_bye\xint_bye\XINT_dthb_final_a!2!3!4!5!6!7!8!9!\W
}%
-\def\XINT_dtb_small #1.%
+\def\XINT_dtb_start #1#2#3#4#5%
{%
- \expandafter\XINT_smallbin\expandafter
- {\the\numexpr (#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i\expandafter}%
- \romannumeral`&&@\expandafter\XINT_smallbin\expandafter
- {\the\numexpr
- #1-((#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i)*\xint_c_ii^viii}%
+ \xint_bye#5\XINT_dtb_small\xint_bye
+ \XINT_dtb_start_a #1#2#3#4#5%
}%
-\def\XINT_dtb_end\Z\expandafter\XINT_dtb_III\expandafter #1#2\T
+\def\XINT_dtb_start_a #1#2#3#4#5%
{%
- \XINT_dtb_end_b #1%
+ \expandafter\XINT_dtb_A\the\numexpr\XINT_dtb_a
+ #1#2#3#4\XINT_dtb_nextfour!2!3!4!5!6!7!8!9!\Z #5%
}%
-\def\XINT_dtb_end_b #1.{\XINT_dtb_end_c }%
-\def\XINT_dtb_end_c #1#2#3#4#5#6#7#8%
+\def\XINT_dtb_small\xint_bye\XINT_dtb_start_a #1\xint_bye #2\W
{%
- \expandafter\XINT_dtb_end_d\the\numexpr #1#2#3#4#5#6#7#8\relax
+ \expandafter\XINT_dtb_B_finish
+ \romannumeral`&&@\XINT_tosixteenbits#1!\space
}%
-\def\XINT_dtb_end_d#1{%
-\def\XINT_dtb_end_d ##1##2##3##4##5##6##7##8##9%
+\def\XINT_dtb_a #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
-}}\XINT_dtb_end_d{ }%
-% \end{macrocode}
-% \subsection{\csh{xintHexToDec}}
-% \lverb!1.08!
-% \begin{macrocode}
-\def\xintHexToDec {\romannumeral0\xinthextodec }%
-\def\xinthextodec #1%
- {\expandafter\XINT_htd_checkin\romannumeral`&&@#1\W\W\W\W \T }%
-\def\XINT_htd_checkin #1%
+ \expandafter\XINT_dtb_update
+ \the\numexpr #1\expandafter\XINT_dtb_update
+ \the\numexpr #2\expandafter\XINT_dtb_update
+ \the\numexpr #3\expandafter\XINT_dtb_update
+ \the\numexpr #4\expandafter\XINT_dtb_update
+ \the\numexpr #5\expandafter\XINT_dtb_update
+ \the\numexpr #6\expandafter\XINT_dtb_update
+ \the\numexpr #7\expandafter\XINT_dtb_update
+ \the\numexpr #8\expandafter\XINT_dtb_update
+ \the\numexpr #9\XINT_dtb_a
+}%
+\def\XINT_dtb_nextfour #1\Z #2#3#4#5%
{%
- \xint_UDsignfork
- #1\XINT_htd_neg
- -{\XINT_htd_I {0000}#1}%
- \krof
+ #2#3#4#5!\relax\XINT_dtb_nextfour!2!3!4!5!6!7!8!9!\Z
}%
-\def\XINT_htd_neg {\expandafter-\romannumeral0\XINT_htd_I {0000}}%
-\def\XINT_htd_I #1#2#3#4#5%
+\def\XINT_dtb_update #1!%
{%
- \xint_gob_til_W #5\XINT_htd_II_a\W
- \XINT_htd_I_a {}{"#2#3#4#5}#1\Z\Z\Z\Z
+ \expandafter\XINT_dtb_update_a
+ \the\numexpr (#1+\xint_c_ii^xv)/\xint_c_ii^xvi-\xint_c_i\xint:
+ #1\xint:%
}%
-\def\XINT_htd_II_a \W\XINT_htd_I_a #1#2{\XINT_htd_II_b #2}%
-\def\XINT_htd_II_b "#1#2#3#4%
+\def\XINT_dtb_update_a #1\xint:#2\xint:
{%
- \xint_gob_til_W
- #1\XINT_htd_II_c
- #2\XINT_htd_II_ci
- #3\XINT_htd_II_cii
- \W\XINT_htd_II_ciii #1#2#3#4%
+ 0000+#1\expandafter!\expandafter!\the\numexpr#2-#1*\xint_c_ii^xvi
}%
-\def\XINT_htd_II_c \W\XINT_htd_II_ci
- \W\XINT_htd_II_cii
- \W\XINT_htd_II_ciii \W\W\W\W #1\Z\Z\Z\Z\T
+\def\XINT_dtb_A #1!!%
{%
- \expandafter\xint_cleanupzeros_andstop
- \romannumeral0\XINT_rord_main {}#1%
- \xint:
- \xint_bye\xint_bye\xint_bye\xint_bye
- \xint_bye\xint_bye\xint_bye\xint_bye
- \xint:
+ \ifnum #1>\xint_c_ \xint_dothis{\XINT_dtb_again #1!}\fi
+ \xint_orthat{\XINT_dtb_again}%
}%
-\def\XINT_htd_II_ci #1\XINT_htd_II_ciii
- #2\W\W\W {\XINT_htd_II_d {}{"#2}{\xint_c_xvi}}%
-\def\XINT_htd_II_cii\W\XINT_htd_II_ciii
- #1#2\W\W {\XINT_htd_II_d {}{"#1#2}{\xint_c_ii^viii}}%
-\def\XINT_htd_II_ciii #1#2#3\W {\XINT_htd_II_d {}{"#1#2#3}{\xint_c_ii^xii}}%
-\def\XINT_htd_I_a #1#2#3#4#5#6%
+\def\XINT_dtb_again #1\Z #2%
{%
- \xint_gob_til_Z #3\XINT_htd_I_end_a\Z
- \expandafter\XINT_htd_I_b\the\numexpr
- #2+\xint_c_ii^xvi*#6#5#4#3+\xint_c_x^ix\relax {#1}%
+ \xint_bye #2\XINT_dtb_B_a\xint_bye
+ \expandafter\XINT_dtb_A\the\numexpr\XINT_dtb_a #1\Z #2%
}%
-\def\XINT_htd_I_b 1#1#2#3#4#5#6#7#8#9{\XINT_htd_I_c {#1#2#3#4#5}{#9#8#7#6}}%
-\def\XINT_htd_I_c #1#2#3{\XINT_htd_I_a {#3#2}{#1}}%
-\def\XINT_htd_I_end_a\Z\expandafter\XINT_htd_I_b\the\numexpr #1+#2\relax
+\def\XINT_dtb_B_a\xint_bye
+ \expandafter\XINT_dtb_A\the\numexpr\XINT_dtb_a #1\XINT_dtb_nextfour #2\Z
{%
- \expandafter\XINT_htd_I_end_b\the\numexpr \xint_c_x^v+#1\relax
+ \expandafter\XINT_dtb_B_finish\romannumeral`&&@\XINT_dtb_B_c #1!%
}%
-\def\XINT_htd_I_end_b 1#1#2#3#4#5%
+\def\XINT_dtb_B_c #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \xint_gob_til_zero #1\XINT_htd_I_end_bz0%
- \XINT_htd_I_end_c #1#2#3#4#5%
+ \XINT_tosixteenbits#1!%
+ \XINT_tosixteenbits#2!%
+ \XINT_tosixteenbits#3!%
+ \XINT_tosixteenbits#4!%
+ \XINT_tosixteenbits#5!%
+ \XINT_tosixteenbits#6!%
+ \XINT_tosixteenbits#7!%
+ \XINT_tosixteenbits#8!%
+ \XINT_tosixteenbits#9!%
+ \XINT_dtb_B_c
}%
-\def\XINT_htd_I_end_c #1#2#3#4#5#6{\XINT_htd_I {#6#5#4#3#2#1000}}%
-\def\XINT_htd_I_end_bz0\XINT_htd_I_end_c 0#1#2#3#4%
+% attention ici mon #1 compte pour 4 chiffres hexa
+\def\XINT_tosixteenbits #1!%
{%
- \xint_gob_til_zeros_iv #1#2#3#4\XINT_htd_I_end_bzz 0000%
- \XINT_htd_I_end_D {#4#3#2#1}%
+ \expandafter\XINT_tosixteenbits_a
+ \the\numexpr (#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i\xint: #1\xint:
}%
-\def\XINT_htd_I_end_D #1#2{\XINT_htd_I {#2#1}}%
-\def\XINT_htd_I_end_bzz 0000\XINT_htd_I_end_D #1{\XINT_htd_I }%
-\def\XINT_htd_II_d #1#2#3#4#5#6#7%
+\def\XINT_tosixteenbits_a #1\xint: #2\xint:
{%
- \xint_gob_til_Z #4\XINT_htd_II_end_a\Z
- \expandafter\XINT_htd_II_e\the\numexpr
- #2+#3*#7#6#5#4+\xint_c_x^viii\relax {#1}{#3}%
+ \expandafter\XINT_tosixteenbits_b
+ \the\numexpr #2-\xint_c_ii^viii*#1\xint:#1\xint:
}%
-\def\XINT_htd_II_e 1#1#2#3#4#5#6#7#8{\XINT_htd_II_f {#1#2#3#4}{#5#6#7#8}}%
-\def\XINT_htd_II_f #1#2#3{\XINT_htd_II_d {#2#3}{#1}}%
-\def\XINT_htd_II_end_a\Z\expandafter\XINT_htd_II_e
- \the\numexpr #1+#2\relax #3#4\T
+\def\XINT_tosixteenbits_b #1\xint: #2\xint:
+{%
+ \XINT_smallbin #2!%
+ \XINT_smallbin #1!%
+}%
+\def\XINT_dtb_B_finish #1#2#3#4#5#6#7#8%
{%
- \XINT_htd_II_end_b #1#3%
+ \expandafter\XINT_dtb_B_finish_a\the\numexpr #1#2#3#4#5#6#7#8\relax
}%
-\def\XINT_htd_II_end_b#1{%
-\def\XINT_htd_II_end_b ##1##2##3##4##5##6##7##8%
+\def\XINT_dtb_B_finish_a #1{%
+\def\XINT_dtb_B_finish_a ##1##2##3##4##5##6##7##8##9%
{%
- \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8\relax
-}}\XINT_htd_II_end_b{ }%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
+}}\XINT_dtb_B_finish_a { }%
% \end{macrocode}
-% \subsection{\csh{xintBinToDec}}
-% \lverb!1.08!
+% \subsection{\csh{xintHexToDec}}
+% \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,
+% afaik, except of course if decimal digits are treated as hexadecimal. This
+% robustness is not on purpose but from need to expand argument and then grab
+% it again. So we do it safely.
+%
+% Input should not have more than circa 5538 hexadecimal digits, else, TeX
+% capacity exceeded [parameter stack size=10000]
+%
+% 1.2m version robust against non terminated inputs.
+%
+% An input without leading zeroes gives an output without leading zeroes.
+% |
% \begin{macrocode}
-\def\xintBinToDec {\romannumeral0\xintbintodec }%
-\def\xintbintodec #1{\expandafter\XINT_btd_checkin
- \romannumeral`&&@#1\W\W\W\W\W\W\W\W \T }%
-\def\XINT_btd_checkin #1%
+\def\xintHexToDec {\romannumeral0\xinthextodec }%
+\def\xinthextodec #1%
+{%
+ \expandafter\XINT_htd_checkin\romannumeral`&&@#1\xint:
+}%
+\def\XINT_htd_checkin #1%
{%
\xint_UDsignfork
- #1\XINT_btd_neg
- -{\XINT_btd_I {000000}#1}%
+ #1\XINT_htd_neg
+ -{\XINT_htd_main #1}%
\krof
}%
-\def\XINT_btd_neg {\expandafter-\romannumeral0\XINT_btd_I {000000}}%
-\def\XINT_btd_I #1#2#3#4#5#6#7#8#9%
+\def\XINT_htd_neg {\expandafter-\romannumeral0\XINT_htd_main}%
+\def\XINT_htd_main #1\xint:
{%
- \xint_gob_til_W #9\XINT_btd_II_a {#2#3#4#5#6#7#8#9}\W
- \XINT_btd_I_a {}{\csname XINT_sbtd_#2#3#4#5\endcsname*\xint_c_xvi+%
- \csname XINT_sbtd_#6#7#8#9\endcsname}%
- #1\Z\Z\Z\Z\Z\Z
+ \expandafter\XINT_htd_startb
+ \the\numexpr\expandafter\XINT_htd_starta
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\relax
}%
-\def\XINT_btd_II_a #1\W\XINT_btd_I_a #2#3{\XINT_btd_II_b #1}%
-\def\XINT_btd_II_b #1#2#3#4#5#6#7#8%
+\def\XINT_htd_starta #1#2#3#4{"#1#2#3#4+100000!}%
+\def\XINT_htd_startb 1#1%
{%
- \xint_gob_til_W
- #1\XINT_btd_II_c
- #2\XINT_btd_II_ci
- #3\XINT_btd_II_cii
- #4\XINT_btd_II_ciii
- #5\XINT_btd_II_civ
- #6\XINT_btd_II_cv
- #7\XINT_btd_II_cvi
- \W\XINT_btd_II_cvii #1#2#3#4#5#6#7#8%
+ \if#10\expandafter\XINT_htd_startba\else
+ \expandafter\XINT_htd_startbb
+ \fi 1#1%
}%
-\def\XINT_btd_II_c #1\XINT_btd_II_cvii \W\W\W\W\W\W\W\W #2\Z\Z\Z\Z\Z\Z\T
+\def\XINT_htd_startba 10#1!{\XINT_htd_again #1%
+ \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\XINT_htd_nextfour}%
+\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}%
+\def\XINT_htd_again #1\XINT_htd_nextfour #2%
{%
- \expandafter\XINT_btd_II_c_end
- \romannumeral0\XINT_rord_main {}#2%
- \xint:
- \xint_bye\xint_bye\xint_bye\xint_bye
- \xint_bye\xint_bye\xint_bye\xint_bye
- \xint:
+ \xint_bye #2\XINT_htd_end_a\xint_bye
+ \expandafter\XINT_htd_A\the\numexpr
+ \XINT_htd_a #1\XINT_htd_nextfour #2%
}%
-\def\XINT_btd_II_c_end#1{%
-\def\XINT_btd_II_c_end ##1##2##3##4##5##6%
+\def\XINT_htd_a #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \expandafter#1\the\numexpr ##1##2##3##4##5##6\relax
-}}\XINT_btd_II_c_end{ }%
-\def\XINT_btd_II_ci #1\XINT_btd_II_cvii #2\W\W\W\W\W\W\W
- {\XINT_btd_II_d {}{#2}{\xint_c_ii }}%
-\def\XINT_btd_II_cii #1\XINT_btd_II_cvii #2\W\W\W\W\W\W
- {\XINT_btd_II_d {}{\csname XINT_sbtd_00#2\endcsname }{\xint_c_iv }}%
-\def\XINT_btd_II_ciii #1\XINT_btd_II_cvii #2\W\W\W\W\W
- {\XINT_btd_II_d {}{\csname XINT_sbtd_0#2\endcsname }{\xint_c_viii }}%
-\def\XINT_btd_II_civ #1\XINT_btd_II_cvii #2\W\W\W\W
- {\XINT_btd_II_d {}{\csname XINT_sbtd_#2\endcsname}{\xint_c_xvi }}%
-\def\XINT_btd_II_cv #1\XINT_btd_II_cvii #2#3#4#5#6\W\W\W
+ #1\expandafter\XINT_htd_update
+ \the\numexpr #2\expandafter\XINT_htd_update
+ \the\numexpr #3\expandafter\XINT_htd_update
+ \the\numexpr #4\expandafter\XINT_htd_update
+ \the\numexpr #5\expandafter\XINT_htd_update
+ \the\numexpr #6\expandafter\XINT_htd_update
+ \the\numexpr #7\expandafter\XINT_htd_update
+ \the\numexpr #8\expandafter\XINT_htd_update
+ \the\numexpr #9\expandafter\XINT_htd_update
+ \the\numexpr \XINT_htd_a
+}%
+\def\XINT_htd_nextfour #1#2#3#4%
{%
- \XINT_btd_II_d {}{\csname XINT_sbtd_#2#3#4#5\endcsname*\xint_c_ii+%
- #6}{\xint_c_ii^v }%
+ *\xint_c_ii^xvi+"#1#2#3#4+\xint_c_x^ix\relax\xint_bye!%
+ 2!3!4!5!6!7!8!9!\xint_bye\XINT_htd_nextfour
}%
-\def\XINT_btd_II_cvi #1\XINT_btd_II_cvii #2#3#4#5#6#7\W\W
+\def\XINT_htd_update 1#1#2#3#4#5#6!%
{%
- \XINT_btd_II_d {}{\csname XINT_sbtd_#2#3#4#5\endcsname*\xint_c_iv+%
- \csname XINT_sbtd_00#6#7\endcsname}{\xint_c_ii^vi }%
+ *\xint_c_ii^xvi+#1#2#3#4#5+\xint_c_x^ix!#6!%
}%
-\def\XINT_btd_II_cvii #1#2#3#4#5#6#7\W
+\def\XINT_htd_A 1#1%
{%
- \XINT_btd_II_d {}{\csname XINT_sbtd_#1#2#3#4\endcsname*\xint_c_viii+%
- \csname XINT_sbtd_0#5#6#7\endcsname}{\xint_c_ii^vii }%
+ \if#10\expandafter\XINT_htd_Aa\else
+ \expandafter\XINT_htd_Ab
+ \fi 1#1%
}%
-\def\XINT_btd_II_d #1#2#3#4#5#6#7#8#9%
+\def\XINT_htd_Aa 10#1#2#3#4#5!{\XINT_htd_again #1#2#3#4!#5!}%
+\def\XINT_htd_Ab 1#1#2#3#4#5#6!{\XINT_htd_again #1!#2#3#4#5!#6!}%
+% \end{macrocode}
+% \lverb|\XINT_unsepb_loop is in xintcore. It removes the ! separators, the
+% blocs of digits not being prefixed by 1; \XINT_unsep_loop on the other hand
+% assumes 1 prefix on the digit blocks|
+% \begin{macrocode}
+\def\XINT_htd_end_a\xint_bye
+ \expandafter\XINT_htd_A\the\numexpr \XINT_htd_a #1\XINT_htd_nextfour
{%
- \xint_gob_til_Z #4\XINT_btd_II_end_a\Z
- \expandafter\XINT_btd_II_e\the\numexpr
- #2+(\xint_c_x^ix+#3*#9#8#7#6#5#4)\relax {#1}{#3}%
+ \expandafter\XINT_htd_end_b\the\numexpr0\XINT_unsepb_loop #1%
}%
-\def\XINT_btd_II_e 1#1#2#3#4#5#6#7#8#9{\XINT_btd_II_f {#1#2#3}{#4#5#6#7#8#9}}%
-\def\XINT_btd_II_f #1#2#3{\XINT_btd_II_d {#2#3}{#1}}%
-\def\XINT_btd_II_end_a\Z\expandafter\XINT_btd_II_e
- \the\numexpr #1+(#2\relax #3#4\T
+\def\XINT_htd_end_b #1{%
+\def\XINT_htd_end_b ##1##2##3##4##5%
+ {\expandafter#1\the\numexpr ##1##2##3##4##5\relax}%
+}\XINT_htd_end_b{ }%
+% \end{macrocode}
+% \subsection{\csh{xintBinToDec}}
+% \lverb|Redone entirely for 1.2m. Starts by converting to hexadecimal
+% first (but with unexpanded \XINT_sbth_xxxx macros).
+%
+% Maximal size of input around 19984 digits (expansion depth=10000).
+%
+% An input without leading zeroes gives an output without leading zeroes.
+%
+% 1.2m robust against non-terminated input.|
+% \begin{macrocode}
+\def\xintBinToDec {\romannumeral0\xintbintodec }%
+\def\xintbintodec #1%
{%
- \XINT_btd_II_end_b #1#3%
+ \expandafter\XINT_btd_checkin\romannumeral`&&@#1\xint:
}%
-\def\XINT_btd_II_end_b#1{%
-\def\XINT_btd_II_end_b ##1##2##3##4##5##6##7##8##9%
+\def\XINT_btd_checkin #1%
{%
- \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
-}}\XINT_btd_II_end_b{ }%
-\def\XINT_btd_I_a #1#2#3#4#5#6#7#8%
+ \xint_UDsignfork
+ #1\XINT_btd_N
+ -{\XINT_btd_main #1}%
+ \krof
+}%
+\def\XINT_btd_N {\expandafter-\romannumeral0\XINT_btd_main }%
+\def\XINT_btd_main #1\xint:
{%
- \xint_gob_til_Z #3\XINT_btd_I_end_a\Z
- \expandafter\XINT_btd_I_b\the\numexpr
- #2+\xint_c_ii^viii*#8#7#6#5#4#3+\xint_c_x^ix\relax {#1}%
+ \expandafter\XINT_btd_htd
+ \csname\expandafter\XINT_btd_tohex
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\XINT_btd_tohex_endcsname2345678\W
}%
-\def\XINT_btd_I_b 1#1#2#3#4#5#6#7#8#9{\XINT_btd_I_c {#1#2#3}{#9#8#7#6#5#4}}%
-\def\XINT_btd_I_c #1#2#3{\XINT_btd_I_a {#3#2}{#1}}%
-\def\XINT_btd_I_end_a\Z\expandafter\XINT_btd_I_b
- \the\numexpr #1+\xint_c_ii^viii #2\relax
+\def\XINT_btd_tohex #1#2#3#4#5#6#7#8%
{%
- \expandafter\XINT_btd_I_end_b\the\numexpr 1000+#1\relax
+ XINT_sbth_#1#2#3#4\expandafter\endcsname
+ \csname XINT_sbth_#5#6#7#8\expandafter\endcsname
+ \csname\XINT_btd_tohex
}%
-\def\XINT_btd_I_end_b 1#1#2#3%
+\def\XINT_btd_tohex_endcsname#1\W{none\endcsname}%
+\def\XINT_btd_htd #1\XINT_sbth_none
{%
- \xint_gob_til_zeros_iii #1#2#3\XINT_btd_I_end_bz 000%
- \XINT_btd_I_end_c #1#2#3%
+ \expandafter\XINT_htd_startb
+ \the\numexpr\expandafter\XINT_htd_starta
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\relax
}%
-\def\XINT_btd_I_end_c #1#2#3#4{\XINT_btd_I {#4#3#2#1000}}%
-\def\XINT_btd_I_end_bz 000\XINT_btd_I_end_c 000{\XINT_btd_I }%
% \end{macrocode}
% \subsection{\csh{xintBinToHex}}
-% \lverb!1.08!
+% \lverb|Complete rewrite for 1.2m.
+%
+% But input should not have more than about 13320 binary digits (expansion
+% depth=10000).
+%
+% Size of output is ceil(size(input)/4), leading zeroes in output (inherited
+% from the input) are not trimmed.
+%
+% An input without leading zeroes gives an output without leading zeroes.
+%
+% 1.2m robust against non-terminated input.
+% |
% \begin{macrocode}
\def\xintBinToHex {\romannumeral0\xintbintohex }%
\def\xintbintohex #1%
{%
- \expandafter\XINT_bth_checkin
- \romannumeral0\expandafter\XINT_num_cleanup
- \the\numexpr\expandafter\XINT_num_loop
- \romannumeral`&&@#1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
- \R\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W\W
+ \expandafter\XINT_bth_checkin\romannumeral`&&@#1\xint:
}%
\def\XINT_bth_checkin #1%
{%
\xint_UDsignfork
#1\XINT_bth_N
- -{\XINT_bth_P #1}%
+ -{\XINT_bth_main #1}%
\krof
}%
-\def\XINT_bth_N {\expandafter-\romannumeral0\XINT_bth_P }%
-\def\XINT_bth_P {\expandafter\XINT_bth_I\expandafter{\expandafter}%
- \romannumeral0\XINT_OQ {}}%
-\def\XINT_bth_I #1#2#3#4#5#6#7#8#9%
+\def\XINT_bth_N {\expandafter-\romannumeral0\XINT_bth_main }%
+\def\XINT_bth_main #1{%
+\def\XINT_bth_main ##1\xint:
{%
- \xint_gob_til_W #9\XINT_bth_end_a\W
- \expandafter\expandafter\expandafter
- \XINT_bth_I
- \expandafter\expandafter\expandafter
- {\csname XINT_sbth_#9#8#7#6\expandafter\expandafter\expandafter\endcsname
- \csname XINT_sbth_#5#4#3#2\endcsname #1}%
-}%
-\def\XINT_bth_end_a\W \expandafter\expandafter\expandafter
- \XINT_bth_I \expandafter\expandafter\expandafter #1%
-{%
- \XINT_bth_end_b #1%
-}%
-\def\XINT_bth_end_b #1\endcsname #2\endcsname #3%
+ \expandafter\expandafter\expandafter#1%
+ \csname\expandafter\XINT_bth_tohex
+ \romannumeral0\XINT_zeroes_foriv
+ ##1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ ##1\XINT_bth_tohex_endcsname2345678\W
+}}\XINT_bth_main{ }%
+\def\XINT_bth_tohex #1#2#3#4#5#6#7#8%
{%
- \xint_gob_til_zero #3\XINT_bth_end_z 0\space #3%
+ XINT_sbth_#1#2#3#4\expandafter\expandafter\expandafter\endcsname
+ \csname XINT_sbth_#5#6#7#8\expandafter\expandafter\expandafter\endcsname
+ \csname\XINT_bth_tohex
}%
-\def\XINT_bth_end_z0\space 0{ }%
+\def\XINT_bth_tohex_endcsname#1\W{none\endcsname}%
% \end{macrocode}
% \subsection{\csh{xintHexToBin}}
-% \lverb!1.08!
+% \lverb|Completely rewritten for 1.2m. Limited to inputs of at most about
+% 4994 hexadecimal digits [input stack size=5000].
+%
+% Attention this macro is not robust against arguments expanding after
+% themselves.
+%
+% Only up to three zeros are removed on front of output: if the input had a
+% leading zero, there will be a leading zero (and then possibly 4n of them if
+% inputs had more leading zeroes) on output.|
% \begin{macrocode}
\def\xintHexToBin {\romannumeral0\xinthextobin }%
\def\xinthextobin #1%
{%
- \expandafter\XINT_htb_checkin\romannumeral`&&@#1GGGGGGGG\T
+ \expandafter\XINT_htb_checkin\romannumeral`&&@#1%
+ \xint_bye 23456789\xint_bye none\endcsname\relax
}%
\def\XINT_htb_checkin #1%
{%
\xint_UDsignfork
#1\XINT_htb_N
- -{\XINT_htb_P #1}%
+ -{\XINT_htb_main #1}%
\krof
}%
-\def\XINT_htb_N {\expandafter-\romannumeral0\XINT_htb_P }%
-\def\XINT_htb_P {\XINT_htb_I_a {}}%
-\def\XINT_htb_I_a #1#2#3#4#5#6#7#8#9%
-{%
- \xint_gob_til_G #9\XINT_htb_II_a G%
- \expandafter\expandafter\expandafter
- \XINT_htb_I_b
- \expandafter\expandafter\expandafter
- {\csname XINT_shtb_#2\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#3\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#4\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#5\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#6\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#7\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#8\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#9\endcsname }{#1}%
-}%
-\def\XINT_htb_I_b #1#2{\XINT_htb_I_a {#2#1}}%
-\def\XINT_htb_II_a G\expandafter\expandafter\expandafter\XINT_htb_I_b
-{%
- \expandafter\expandafter\expandafter \XINT_htb_II_b
-}%
-\def\XINT_htb_II_b #1#2#3\T
-{%
- \expandafter\XINT_num_cleanup
- \the\numexpr\expandafter\XINT_num_loop #2#1%
- \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
-}%
+\def\XINT_htb_N {\expandafter-\romannumeral0\XINT_htb_main }%
+\def\XINT_htb_main {\expandafter\XINT_htb_cuz\the\numexpr\XINT_htb_loop}%
+\def\XINT_htb_loop #1#2#3#4#5#6#7#8#9%
+{%
+ 1\csname XINT_shtb_#1\endcsname
+ \csname XINT_shtb_#2\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#3\endcsname
+ \csname XINT_shtb_#4\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#5\endcsname
+ \csname XINT_shtb_#6\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#7\endcsname
+ \csname XINT_shtb_#8\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#9\endcsname
+ \XINT_htb_loop_a
+}%
+\def\XINT_htb_loop_a #1#2#3#4#5#6#7#8#9%
+{%
+ \csname XINT_shtb_#1\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#2\endcsname
+ \csname XINT_shtb_#3\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#4\endcsname
+ \csname XINT_shtb_#5\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#6\endcsname
+ \csname XINT_shtb_#7\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#8\endcsname
+ \csname XINT_shtb_#9\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr\XINT_htb_loop
+}%
+\def\XINT_htb_cuz #1{%
+\def\XINT_htb_cuz 1##1##2##3##4%
+ {\expandafter#1\the\numexpr##1##2##3##4\relax}%
+}\XINT_htb_cuz { }%
% \end{macrocode}
% \subsection{\csh{xintCHexToBin}}
-% \lverb!1.08!
+% \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.|
% \begin{macrocode}
\def\xintCHexToBin {\romannumeral0\xintchextobin }%
\def\xintchextobin #1%
{%
\expandafter\XINT_chtb_checkin\romannumeral`&&@#1%
- \R\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W\W
+ \xint_bye 23456789\xint_bye none\endcsname\relax
}%
\def\XINT_chtb_checkin #1%
{%
\xint_UDsignfork
#1\XINT_chtb_N
- -{\XINT_chtb_P #1}%
+ -{\XINT_chtb_main #1}%
\krof
}%
-\def\XINT_chtb_N {\expandafter-\romannumeral0\XINT_chtb_P }%
-\def\XINT_chtb_P {\expandafter\XINT_chtb_I\expandafter{\expandafter}%
- \romannumeral0\XINT_OQ {}}%
-\def\XINT_chtb_I #1#2#3#4#5#6#7#8#9%
-{%
- \xint_gob_til_W #9\XINT_chtb_end_a\W
- \expandafter\expandafter\expandafter
- \XINT_chtb_I
- \expandafter\expandafter\expandafter
- {\csname XINT_shtb_#9\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#8\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#7\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#6\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#5\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#4\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#3\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#2\endcsname
- #1}%
-}%
-\def\XINT_chtb_end_a\W\expandafter\expandafter\expandafter
- \XINT_chtb_I\expandafter\expandafter\expandafter #1%
-{%
- \XINT_chtb_end_b #1%
- \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
-}%
-\def\XINT_chtb_end_b #1\W#2\W#3\W#4\W#5\W#6\W#7\W#8\W\endcsname
-{%
- \expandafter\XINT_num_cleanup
- \the\numexpr\expandafter\XINT_num_loop
-}%
+\def\XINT_chtb_N {\expandafter-\romannumeral0\XINT_chtb_main }%
+\def\XINT_chtb_main
+ {\expandafter\xint_gobble_thenstop\the\numexpr\XINT_htb_loop}%
\XINT_restorecatcodes_endinput%
% \end{macrocode}
%
@@ -24060,7 +24120,7 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintgcd}%
- [2017/07/26 1.2l Euclide algorithm with xint package (JFB)]%
+ [2017/07/31 1.2m Euclide algorithm with xint package (JFB)]%
% \end{macrocode}
% \subsection{\csh{xintGCD}, \csh{xintiiGCD}}
% \begin{macrocode}
@@ -24727,7 +24787,7 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintfrac}%
- [2017/07/26 1.2l Expandable operations on fractions (JFB)]%
+ [2017/07/31 1.2m 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
@@ -26480,15 +26540,16 @@ $1$ or $-1$.
}%
\def\XINT_fgeq_Fd #1\Z #2#3%
{%
- \expandafter\XINT_fgeq_Fe\expandafter
- {\romannumeral0\XINT_dsx_addzeros {#1}#3;}{#2}%
+ \expandafter\XINT_fgeq_Fe
+ \romannumeral0\XINT_dsx_addzeros {#1}#3;\xint:#2\xint:
}%
-\def\XINT_fgeq_Fe #1#2{\XINT_geq_pre {#2}{#1}}%
+\def\XINT_fgeq_Fe #1\xint:#2#3\xint:{\XINT_geq_plusplus #2#1\xint:#3\xint:}%
\def\XINT_fgeq_Fn #1\Z #2#3%
{%
- \expandafter\XINT_geq_pre\expandafter
- {\romannumeral0\XINT_dsx_addzeros {#1}#2;}{#3}%
+ \expandafter\XINT_fgeq_Fo
+ \romannumeral0\XINT_dsx_addzeros {#1}#2;\xint:#3\xint:
}%
+\def\XINT_fgeq_Fo #1#2\xint:#3\xint:{\XINT_geq_plusplus #1#3\xint:#2\xint:}%
% \end{macrocode}
% \subsection{\csh{xintMax}}
% \begin{macrocode}
@@ -26632,9 +26693,9 @@ $1$ or $-1$.
\krof
#1#2%
}%
-\def\XINT_fcmp_zerozero #1#2#3#4{ 0}% 1.08b had some [ and ] here!!!
-\def\XINT_fcmp_firstzero #1#2#3#4{ -1}% incredibly I never saw that until
-\def\XINT_fcmp_secondzero #1#2#3#4{ 1}% preparing 1.09a.
+\def\XINT_fcmp_zerozero #1#2#3#4{ 0}%
+\def\XINT_fcmp_firstzero #1#2#3#4{ -1}%
+\def\XINT_fcmp_secondzero #1#2#3#4{ 1}%
\def\XINT_fcmp_pos #1#2#3#4%
{%
\XINT_fcmp_B #1#3#2#4%
@@ -26666,15 +26727,16 @@ $1$ or $-1$.
}%
\def\XINT_fcmp_Fd #1\Z #2#3%
{%
- \expandafter\XINT_fcmp_Fe\expandafter
- {\romannumeral0\XINT_dsx_addzeros {#1}#3;}{#2}%
+ \expandafter\XINT_fcmp_Fe
+ \romannumeral0\XINT_dsx_addzeros {#1}#3;\xint:#2\xint:
}%
-\def\XINT_fcmp_Fe #1#2{\xintiicmp {#2}{#1}}%
+\def\XINT_fcmp_Fe #1\xint:#2#3\xint:{\XINT_cmp_plusplus #2#1\xint:#3\xint:}%
\def\XINT_fcmp_Fn #1\Z #2#3%
{%
- \expandafter\xintiicmp\expandafter
- {\romannumeral0\XINT_dsx_addzeros {#1}#2;}{#3}%
+ \expandafter\XINT_fcmp_Fo
+ \romannumeral0\XINT_dsx_addzeros {#1}#2;\xint:#3\xint:
}%
+\def\XINT_fcmp_Fo #1#2\xint:#3\xint:{\XINT_cmp_plusplus #1#3\xint:#2\xint:}%
% \end{macrocode}
% \subsection{\csh{xintAbs}}
% \begin{macrocode}
@@ -28714,7 +28776,7 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintseries}%
- [2017/07/26 1.2l Expandable partial sums with xint package (JFB)]%
+ [2017/07/31 1.2m Expandable partial sums with xint package (JFB)]%
% \end{macrocode}
% \subsection{\csh{xintSeries}}
% \begin{macrocode}
@@ -29212,7 +29274,7 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintcfrac}%
- [2017/07/26 1.2l Expandable continued fractions with xint package (JFB)]%
+ [2017/07/31 1.2m Expandable continued fractions with xint package (JFB)]%
% \end{macrocode}
% \subsection{\csh{xintCFrac}}
% \begin{macrocode}
@@ -30463,7 +30525,7 @@ $1$ or $-1$.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2017/07/26 1.2l Expandable expression parser (JFB)]%
+ [2017/07/31 1.2m Expandable expression parser (JFB)]%
\catcode`! 11
\let\XINT_Cmp \xintiiCmp
% \end{macrocode}
@@ -34464,10 +34526,10 @@ $1$ or $-1$.
%<*dtx>-----------------------------------------------------------
\iffalse
% grep -c -e "^{%" xint*sty
-xint.sty:196
-xintbinhex.sty:70
+xint.sty:178
+xintbinhex.sty:66
xintcfrac.sty:183
-xintcore.sty:278
+xintcore.sty:280
xintexpr.sty:168
xintfrac.sty:439
xintgcd.sty:50
@@ -34476,13 +34538,13 @@ xintseries.sty:48
xinttools.sty:138
\fi
% grep -o "^{%" xint*sty | wc -l
-\def\totala{ 1583}
+\def\totala{ 1563}
\iffalse
% grep -c -e "^}%" xint*sty
-xint.sty:195
-xintbinhex.sty:65
+xint.sty:177
+xintbinhex.sty:64
xintcfrac.sty:183
-xintcore.sty:275
+xintcore.sty:277
xintexpr.sty:199
xintfrac.sty:437
xintgcd.sty:52
@@ -34491,7 +34553,7 @@ xintseries.sty:48
xinttools.sty:137
\fi
% grep -o "^}%" xint*sty | wc -l
-\def\totalb{ 1605}
+\def\totalb{ 1588}
\DeleteShortVerb{\|}
\def\mymacro #1{\mymacroaux #1}
\def\mymacroaux #1#2{\strut \csname #1nameimp\endcsname:& \dtt{ #2.}\tabularnewline }
@@ -34528,8 +34590,8 @@ xinttools.sty:137
Right bracket \] Circumflex \^ Underscore \_
Grave accent \` Left brace \{ Vertical bar \|
Right brace \} Tilde \~}
-\CheckSum {30931}% 30303 pour 1.2h, 30403 pour 1.2i, 30750 pour 1.2j,
- % 30677 pour 1.2k
+\CheckSum {30439}% 30303 pour 1.2h, 30403 pour 1.2i, 30750 pour 1.2j,
+ % 30677 pour 1.2k, 30931 pour 1.2l
\makeatletter\check@checksum\makeatother
\Finale
%% End of file xint.dtx
diff --git a/Master/texmf-dist/source/generic/xint/xint.ins b/Master/texmf-dist/source/generic/xint/xint.ins
index 9389268dca2..b405e1f602a 100644
--- a/Master/texmf-dist/source/generic/xint/xint.ins
+++ b/Master/texmf-dist/source/generic/xint/xint.ins
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% ---------------------------------------------------------------
%%
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty
index de8669e6acb..4641adb163b 100644
--- a/Master/texmf-dist/tex/generic/xint/xint.sty
+++ b/Master/texmf-dist/tex/generic/xint/xint.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xint: Expandable operations on big integers
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty (loaded by xintcore.sty)
\XINT_providespackage
\ProvidesPackage{xint}%
- [2017/07/26 1.2l Expandable operations on big integers (JFB)]%
+ [2017/07/31 1.2m Expandable operations on big integers (JFB)]%
\long\def\xint_firstofthree #1#2#3{#1}%
\long\def\xint_secondofthree #1#2#3{#2}%
\long\def\xint_thirdofthree #1#2#3{#3}%
@@ -389,8 +389,6 @@
{%
\expandafter\XINT_geq_fork\expandafter #1\romannumeral`&&@#3\xint:#2\xint:
}%
-\let\XINT_geq_pre \xintiigeq % TEMPORAIRE (oui, mais depuis quand ?)
-\let\XINT_Geq \xintGeq % TEMPORAIRE ATTENTION FAIT xintNum (et alors?)
\def\XINT_geq #1#2\xint:#3%
{%
\expandafter\XINT_geq_fork\expandafter #1\romannumeral0\xintnum{#3}\xint:#2\xint:
@@ -414,173 +412,63 @@
\def\XINT_geq_secondiszero #1\krof #20#3\xint:#4\xint:{ 1}%
\def\XINT_geq_plusminus #1-{\XINT_geq_plusplus #1{}}%
\def\XINT_geq_minusplus -#1{\XINT_geq_plusplus {}#1}%
-\def\XINT_geq_minusminus --{\XINT_geq_plusplus {}{}}%
-\def\XINT_geq_plusplus #1#2#3\xint:#4\xint:{\XINT_geq_pp #1#4\xint:#2#3\xint:}%
-\def\XINT_geq_pp #1\xint:
-{%
- \expandafter\XINT_geq_pp_a
- \romannumeral0\expandafter\XINT_sepandrev_andcount
- \romannumeral0\XINT_zeroes_forviii #1\R\R\R\R\R\R\R\R{10}0000001\W
- #1\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
- \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
- \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
- \X
-}%
-\def\XINT_geq_pp_a #1\xint:#2\X #3\xint:
-{%
- \expandafter\XINT_geq_checklengths
- \the\numexpr #1\expandafter\xint:%
- \romannumeral0\expandafter\XINT_sepandrev_andcount
- \romannumeral0\XINT_zeroes_forviii #3\R\R\R\R\R\R\R\R{10}0000001\W
- #3\XINT_rsepbyviii_end_A 2345678%
- \XINT_rsepbyviii_end_B 2345678\relax\xint_c_ii\xint_c_i
- \R\xint:\xint_c_xii \R\xint:\xint_c_x \R\xint:\xint_c_viii \R\xint:\xint_c_vi
- \R\xint:\xint_c_iv \R\xint:\xint_c_ii \R\xint:\xint_c_\W
- \Z!\Z!\Z!\Z!\Z!\W #2\Z!\Z!\Z!\Z!\Z!\W
-}%
-\def\XINT_geq_checklengths #1\xint:#2\xint:
-{%
- \ifnum #1=#2
- \expandafter\xint_firstoftwo
- \else
- \expandafter\xint_secondoftwo
- \fi
- \XINT_geq_aa {\XINT_geq_distinctlengths {#1}{#2}}%
-}%
-\def\XINT_geq_distinctlengths #1#2#3\W #4\W
-{%
- \ifnum #1>#2
- \expandafter\xint_firstoftwo
- \else
- \expandafter\xint_secondoftwo
- \fi
- { 1}{ 0}%
-}%
-\def\XINT_geq_aa {\expandafter\XINT_geq_w\the\numexpr\XINT_geq_a \xint_c_i }%
-\def\XINT_geq_a #1!#2!#3!#4!#5\W #6!#7!#8!#9!%
-{%
- \XINT_geq_b #1!#6!#2!#7!#3!#8!#4!#9!#5\W
-}%
-\def\XINT_geq_b #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_geq_bi \Z
- \expandafter\XINT_geq_c\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
-}%
-\def\XINT_geq_c 1#1#2\xint:%
-{%
- 1#2\expandafter!\the\numexpr\XINT_geq_d #1%
-}%
-\def\XINT_geq_d #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_geq_di \Z
- \expandafter\XINT_geq_e\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
-}%
-\def\XINT_geq_e 1#1#2\xint:%
-{%
- 1#2\expandafter!\the\numexpr\XINT_geq_f #1%
-}%
-\def\XINT_geq_f #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_geq_fi \Z
- \expandafter\XINT_geq_g\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
-}%
-\def\XINT_geq_g 1#1#2\xint:%
-{%
- 1#2\expandafter!\the\numexpr\XINT_geq_h #1%
-}%
-\def\XINT_geq_h #1#2#3!#4!%
-{%
- \xint_gob_til_Z #2\XINT_geq_hi \Z
- \expandafter\XINT_geq_i\the\numexpr#1+1#4-#3-\xint_c_i\xint:%
-}%
-\def\XINT_geq_i 1#1#2\xint:%
-{%
- 1#2\expandafter!\the\numexpr\XINT_geq_a #1%
-}%
-\def\XINT_geq_bi\Z
- \expandafter\XINT_geq_c\the\numexpr#1+1#2-#3\xint:#4!#5!#6!#7!#8!#9!\Z !\W
-{%
- \XINT_geq_k #1#2!#5!#7!#9!%
-}%
-\def\XINT_geq_di\Z
- \expandafter\XINT_geq_e\the\numexpr#1+1#2-#3\xint:#4!#5!#6!#7!#8\W
-{%
- \XINT_geq_k #1#2!#5!#7!%
-}%
-\def\XINT_geq_fi\Z
- \expandafter\XINT_geq_g\the\numexpr#1+1#2-#3\xint:#4!#5!#6\W
-{%
- \XINT_geq_k #1#2!#5!%
-}%
-\def\XINT_geq_hi\Z
- \expandafter\XINT_geq_i\the\numexpr#1+1#2-#3\xint:#4\W
-{%
- \XINT_geq_k #1#2!%
-}%
-\def\XINT_geq_k #1#2\W
-{%
- \xint_UDzerofork
- #1{-1\relax { 0}}%
- 0{-1\relax { 1}}%
- \krof
-}%
-\def\XINT_geq_w #1-1#2{#2}%
+\def\XINT_geq_minusminus --{\XINT_geq_plusplus {}{}}%
+\def\XINT_geq_plusplus
+ {\expandafter\XINT_geq_finish\romannumeral0\XINT_cmp_plusplus}%
+\def\XINT_geq_finish #1{\if-#1\expandafter\XINT_geq_no
+ \else\expandafter\XINT_geq_yes\fi}%
+\def\XINT_geq_no 1{ 0}%
+\def\XINT_geq_yes { 1}%
\def\xintiMax {\romannumeral0\xintimax }%
\def\xintimax #1%
{%
- \expandafter\xint_max\expandafter {\romannumeral0\xintnum{#1}}%
+ \expandafter\xint_max\romannumeral0\xintnum{#1}\xint:
}%
-\def\xint_max #1#2%
+\def\xint_max #1\xint:#2%
{%
- \expandafter\XINT_max_pre\expandafter {\romannumeral0\xintnum{#2}}{#1}%
+ \expandafter\XINT_max_fork\romannumeral0\xintnum{#2}\xint:#1\xint:
}%
\def\xintiiMax {\romannumeral0\xintiimax }%
\def\xintiimax #1%
{%
- \expandafter\xint_iimax\expandafter {\romannumeral`&&@#1}%
+ \expandafter\xint_iimax \romannumeral`&&@#1\xint:
}%
-\def\xint_iimax #1#2%
+\def\xint_iimax #1\xint:#2%
{%
- \expandafter\XINT_max_pre\expandafter {\romannumeral`&&@#2}{#1}%
+ \expandafter\XINT_max_fork\romannumeral`&&@#2\xint:#1\xint:
}%
-\def\XINT_max_pre #1#2{\XINT_max_fork #1\Z #2\Z {#2}{#1}}%
-\def\XINT_Max #1#2{\romannumeral0\XINT_max_fork #2\Z #1\Z {#1}{#2}}%
-\def\XINT_max_fork #1#2\Z #3#4\Z
+\def\XINT_max_fork #1#2\xint:#3#4\xint:
{%
\xint_UDsignsfork
#1#3\XINT_max_minusminus % A < 0, B < 0
- #1-\XINT_max_minusplus % B < 0, A >= 0
- #3-\XINT_max_plusminus % A < 0, B >= 0
+ #1-\XINT_max_plusminus % B < 0, A >= 0
+ #3-\XINT_max_minusplus % A < 0, B >= 0
--{\xint_UDzerosfork
#1#3\XINT_max_zerozero % A = B = 0
- #10\XINT_max_zeroplus % B = 0, A > 0
- #30\XINT_max_pluszero % A = 0, B > 0
+ #10\XINT_max_pluszero % B = 0, A > 0
+ #30\XINT_max_zeroplus % A = 0, B > 0
00\XINT_max_plusplus % A, B > 0
\krof }%
\krof
- {#2}{#4}#1#3%
-}%
-\def\XINT_max_zerozero #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_max_zeroplus #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_max_pluszero #1#2#3#4{\xint_secondoftwo_thenstop }%
-\def\XINT_max_minusplus #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_max_plusminus #1#2#3#4{\xint_secondoftwo_thenstop }%
-\def\XINT_max_plusplus #1#2#3#4%
-{%
- \ifodd\XINT_Geq {#4#2}{#3#1}
+ #3#1#2\xint:#4\xint:
\expandafter\xint_firstoftwo_thenstop
\else
\expandafter\xint_secondoftwo_thenstop
\fi
+ {#3#4}{#1#2}%
}%
-\def\XINT_max_minusminus #1#2#3#4%
+\def\XINT_max_zerozero #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_max_zeroplus #1\fi{\xint_secondoftwo_thenstop }%
+\def\XINT_max_pluszero #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_max_minusplus #1\fi{\xint_secondoftwo_thenstop }%
+\def\XINT_max_plusminus #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_max_plusplus
{%
- \ifodd\XINT_Geq {#1}{#2}
- \expandafter\xint_firstoftwo_thenstop
- \else
- \expandafter\xint_secondoftwo_thenstop
- \fi
+ \if1\romannumeral0\XINT_geq_plusplus
+}%
+\def\XINT_max_minusminus --%
+{%
+ \unless\if1\romannumeral0\XINT_geq_plusplus{}{}%
}%
\def\xintiMaxof {\romannumeral0\xintimaxof }%
\def\xintimaxof #1{\expandafter\XINT_imaxof_a\romannumeral`&&@#1\xint:}%
@@ -606,58 +494,53 @@
\def\xintiMin {\romannumeral0\xintimin }%
\def\xintimin #1%
{%
- \expandafter\xint_min\expandafter {\romannumeral0\xintnum{#1}}%
+ \expandafter\xint_min\romannumeral0\xintnum{#1}\xint:
}%
-\def\xint_min #1#2%
+\def\xint_min #1\xint:#2%
{%
- \expandafter\XINT_min_pre\expandafter {\romannumeral0\xintnum{#2}}{#1}%
+ \expandafter\XINT_min_fork\romannumeral0\xintnum{#2}\xint:#1\xint:
}%
\def\xintiiMin {\romannumeral0\xintiimin }%
\def\xintiimin #1%
{%
- \expandafter\xint_iimin\expandafter {\romannumeral`&&@#1}%
+ \expandafter\xint_iimin \romannumeral`&&@#1\xint:
}%
-\def\xint_iimin #1#2%
+\def\xint_iimin #1\xint:#2%
{%
- \expandafter\XINT_min_pre\expandafter {\romannumeral`&&@#2}{#1}%
+ \expandafter\XINT_min_fork\romannumeral`&&@#2\xint:#1\xint:
}%
-\def\XINT_min_pre #1#2{\XINT_min_fork #1\Z #2\Z {#2}{#1}}%
-\def\XINT_Min #1#2{\romannumeral0\XINT_min_fork #2\Z #1\Z {#1}{#2}}%
-\def\XINT_min_fork #1#2\Z #3#4\Z
+\def\XINT_min_fork #1#2\xint:#3#4\xint:
{%
\xint_UDsignsfork
#1#3\XINT_min_minusminus % A < 0, B < 0
- #1-\XINT_min_minusplus % B < 0, A >= 0
- #3-\XINT_min_plusminus % A < 0, B >= 0
+ #1-\XINT_min_plusminus % B < 0, A >= 0
+ #3-\XINT_min_minusplus % A < 0, B >= 0
--{\xint_UDzerosfork
#1#3\XINT_min_zerozero % A = B = 0
- #10\XINT_min_zeroplus % B = 0, A > 0
- #30\XINT_min_pluszero % A = 0, B > 0
+ #10\XINT_min_pluszero % B = 0, A > 0
+ #30\XINT_min_zeroplus % A = 0, B > 0
00\XINT_min_plusplus % A, B > 0
\krof }%
\krof
- {#2}{#4}#1#3%
-}%
-\def\XINT_min_zerozero #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_min_zeroplus #1#2#3#4{\xint_secondoftwo_thenstop }%
-\def\XINT_min_pluszero #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_min_minusplus #1#2#3#4{\xint_secondoftwo_thenstop }%
-\def\XINT_min_plusminus #1#2#3#4{\xint_firstoftwo_thenstop }%
-\def\XINT_min_plusplus #1#2#3#4%
-{%
- \ifodd\XINT_Geq {#4#2}{#3#1}
+ #3#1#2\xint:#4\xint:
\expandafter\xint_secondoftwo_thenstop
\else
\expandafter\xint_firstoftwo_thenstop
\fi
+ {#3#4}{#1#2}%
}%
-\def\XINT_min_minusminus #1#2#3#4%
+\def\XINT_min_zerozero #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_min_zeroplus #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_min_pluszero #1\fi{\xint_secondoftwo_thenstop }%
+\def\XINT_min_minusplus #1\fi{\xint_firstoftwo_thenstop }%
+\def\XINT_min_plusminus #1\fi{\xint_secondoftwo_thenstop }%
+\def\XINT_min_plusplus
{%
- \ifodd\XINT_Geq {#1}{#2}
- \expandafter\xint_secondoftwo_thenstop
- \else
- \expandafter\xint_firstoftwo_thenstop
- \fi
+ \if1\romannumeral0\XINT_geq_plusplus
+}%
+\def\XINT_min_minusminus --%
+{%
+ \unless\if1\romannumeral0\XINT_geq_plusplus{}{}%
}%
\def\xintiMinof {\romannumeral0\xintiminof }%
\def\xintiminof #1{\expandafter\XINT_iminof_a\romannumeral`&&@#1\xint:}%
diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
index bdbc76c5089..7cf6463d960 100644
--- a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintbinhex: Expandable binary and hexadecimal conversions
%% ---------------------------------------------------------------
@@ -70,71 +70,47 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintbinhex}%
- [2017/07/26 1.2l Expandable binary and hexadecimal conversions (JFB)]%
-\def\xint_cleanupzeros_andstop#1{%
-\def\xint_cleanupzeros_andstop ##1##2##3##4%
-{%
- \expandafter#1\the\numexpr ##1##2##3##4\relax
-}}\xint_cleanupzeros_andstop{ }%
+ [2017/07/31 1.2m Expandable binary and hexadecimal conversions (JFB)]%
\newcount\xint_c_ii^xv \xint_c_ii^xv 32768
\newcount\xint_c_ii^xvi \xint_c_ii^xvi 65536
\newcount\xint_c_x^v \xint_c_x^v 100000
\def\XINT_tmpa #1{\ifx\relax#1\else
\expandafter\edef\csname XINT_sdth_#1\endcsname
{\ifcase #1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or
- 8\or 9\or A\or B\or C\or D\or E\or F\fi}%
+ 8\or 9\or A\or B\or C\or D\or E\or F\else\space\fi}%
\expandafter\XINT_tmpa\fi }%
-\XINT_tmpa {0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}\relax
+\XINT_tmpa {-1}{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}\relax
\def\XINT_tmpa #1{\ifx\relax#1\else
\expandafter\edef\csname XINT_sdtb_#1\endcsname
{\ifcase #1
0000\or 0001\or 0010\or 0011\or 0100\or 0101\or 0110\or 0111\or
- 1000\or 1001\or 1010\or 1011\or 1100\or 1101\or 1110\or 1111\fi}%
+ 1000\or 1001\or 1010\or 1011\or 1100\or 1101\or 1110\or 1111\else\space\fi}%
\expandafter\XINT_tmpa\fi }%
-\XINT_tmpa {0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}\relax
+\XINT_tmpa {-1}{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}{11}{12}{13}{14}{15}\relax
\let\XINT_tmpa\relax
-\expandafter\def\csname XINT_sbtd_0000\endcsname {0}%
-\expandafter\def\csname XINT_sbtd_0001\endcsname {1}%
-\expandafter\def\csname XINT_sbtd_0010\endcsname {2}%
-\expandafter\def\csname XINT_sbtd_0011\endcsname {3}%
-\expandafter\def\csname XINT_sbtd_0100\endcsname {4}%
-\expandafter\def\csname XINT_sbtd_0101\endcsname {5}%
-\expandafter\def\csname XINT_sbtd_0110\endcsname {6}%
-\expandafter\def\csname XINT_sbtd_0111\endcsname {7}%
-\expandafter\def\csname XINT_sbtd_1000\endcsname {8}%
-\expandafter\def\csname XINT_sbtd_1001\endcsname {9}%
-\expandafter\def\csname XINT_sbtd_1010\endcsname {10}%
-\expandafter\def\csname XINT_sbtd_1011\endcsname {11}%
-\expandafter\def\csname XINT_sbtd_1100\endcsname {12}%
-\expandafter\def\csname XINT_sbtd_1101\endcsname {13}%
-\expandafter\def\csname XINT_sbtd_1110\endcsname {14}%
-\expandafter\def\csname XINT_sbtd_1111\endcsname {15}%
-\expandafter\let\csname XINT_sbth_0000\expandafter\endcsname
- \csname XINT_sbtd_0000\endcsname
-\expandafter\let\csname XINT_sbth_0001\expandafter\endcsname
- \csname XINT_sbtd_0001\endcsname
-\expandafter\let\csname XINT_sbth_0010\expandafter\endcsname
- \csname XINT_sbtd_0010\endcsname
-\expandafter\let\csname XINT_sbth_0011\expandafter\endcsname
- \csname XINT_sbtd_0011\endcsname
-\expandafter\let\csname XINT_sbth_0100\expandafter\endcsname
- \csname XINT_sbtd_0100\endcsname
-\expandafter\let\csname XINT_sbth_0101\expandafter\endcsname
- \csname XINT_sbtd_0101\endcsname
-\expandafter\let\csname XINT_sbth_0110\expandafter\endcsname
- \csname XINT_sbtd_0110\endcsname
-\expandafter\let\csname XINT_sbth_0111\expandafter\endcsname
- \csname XINT_sbtd_0111\endcsname
-\expandafter\let\csname XINT_sbth_1000\expandafter\endcsname
- \csname XINT_sbtd_1000\endcsname
-\expandafter\let\csname XINT_sbth_1001\expandafter\endcsname
- \csname XINT_sbtd_1001\endcsname
+\expandafter\def\csname XINT_sbth_0000\endcsname {0}%
+\expandafter\def\csname XINT_sbth_0001\endcsname {1}%
+\expandafter\def\csname XINT_sbth_0010\endcsname {2}%
+\expandafter\def\csname XINT_sbth_0011\endcsname {3}%
+\expandafter\def\csname XINT_sbth_0100\endcsname {4}%
+\expandafter\def\csname XINT_sbth_0101\endcsname {5}%
+\expandafter\def\csname XINT_sbth_0110\endcsname {6}%
+\expandafter\def\csname XINT_sbth_0111\endcsname {7}%
+\expandafter\def\csname XINT_sbth_1000\endcsname {8}%
+\expandafter\def\csname XINT_sbth_1001\endcsname {9}%
+\expandafter\def\csname XINT_sbth_1010\endcsname {10}%
+\expandafter\def\csname XINT_sbth_1011\endcsname {11}%
+\expandafter\def\csname XINT_sbth_1100\endcsname {12}%
+\expandafter\def\csname XINT_sbth_1101\endcsname {13}%
+\expandafter\def\csname XINT_sbth_1110\endcsname {14}%
+\expandafter\def\csname XINT_sbth_1111\endcsname {15}%
\expandafter\def\csname XINT_sbth_1010\endcsname {A}%
\expandafter\def\csname XINT_sbth_1011\endcsname {B}%
\expandafter\def\csname XINT_sbth_1100\endcsname {C}%
\expandafter\def\csname XINT_sbth_1101\endcsname {D}%
\expandafter\def\csname XINT_sbth_1110\endcsname {E}%
\expandafter\def\csname XINT_sbth_1111\endcsname {F}%
+\let\XINT_sbth_none \empty
\expandafter\def\csname XINT_shtb_0\endcsname {0000}%
\expandafter\def\csname XINT_shtb_1\endcsname {0001}%
\expandafter\def\csname XINT_shtb_2\endcsname {0010}%
@@ -151,516 +127,471 @@
\def\XINT_shtb_D {1101}%
\def\XINT_shtb_E {1110}%
\def\XINT_shtb_F {1111}%
-\def\XINT_shtb_G {}%
-\def\XINT_smallhex #1%
+\let\XINT_shtb_none \empty
+\def\XINT_smallhex #1!%
{%
- \expandafter\XINT_smallhex_a\expandafter
- {\the\numexpr (#1+\xint_c_viii)/\xint_c_xvi-\xint_c_i}{#1}%
+ \expandafter\XINT_smallhex_a
+ \the\numexpr (#1+\xint_c_viii)/\xint_c_xvi-\xint_c_i\xint:#1\xint:
}%
-\def\XINT_smallhex_a #1#2%
+\def\XINT_smallhex_a #1\xint:#2\xint:
{%
\csname XINT_sdth_#1\expandafter\expandafter\expandafter\endcsname
- \csname XINT_sdth_\the\numexpr #2-\xint_c_xvi*#1\endcsname
+ \csname XINT_sdth_\the\numexpr #2-\xint_c_xvi*#1\relax\expandafter\endcsname
+ \romannumeral`&&@%
}%
-\def\XINT_smallbin #1%
+\def\XINT_smallbin #1!%
{%
- \expandafter\XINT_smallbin_a\expandafter
- {\the\numexpr (#1+\xint_c_viii)/\xint_c_xvi-\xint_c_i}{#1}%
+ \expandafter\XINT_smallbin_a
+ \the\numexpr (#1+\xint_c_viii)/\xint_c_xvi-\xint_c_i\xint:#1\xint:
}%
-\def\XINT_smallbin_a #1#2%
+\def\XINT_smallbin_a #1\xint:#2\xint:
{%
\csname XINT_sdtb_#1\expandafter\expandafter\expandafter\endcsname
- \csname XINT_sdtb_\the\numexpr #2-\xint_c_xvi*#1\endcsname
+ \csname XINT_sdtb_\the\numexpr #2-\xint_c_xvi*#1\relax\expandafter\endcsname
+ \romannumeral`&&@%
}%
-\def\XINT_OQ #1#2#3#4#5#6#7#8#9%
+\def\xintDecToHex {\romannumeral0\xintdectohex }%
+\def\xintdectohex #1%
{%
- \xint_gob_til_R #9\XINT_OQ_end_a\R\XINT_OQ {#9#8#7#6#5#4#3#2#1}%
+ \expandafter\XINT_dth_checkin\romannumeral`&&@#1\xint:
}%
-\def\XINT_OQ_end_a\R\XINT_OQ #1#2\Z
+\def\XINT_dth_checkin #1%
{%
- \XINT_OQ_end_b #1\Z
+ \xint_UDsignfork
+ #1\XINT_dth_neg
+ -{\XINT_dth_main #1}%
+ \krof
}%
-\def\XINT_OQ_end_b #1#2#3#4#5#6#7#8%
+\def\XINT_dth_neg {\expandafter-\romannumeral0\XINT_dth_main}%
+\def\XINT_dth_main #1\xint:
{%
- \xint_gob_til_R
- #8\XINT_OQ_end_viii
- #7\XINT_OQ_end_vii
- #6\XINT_OQ_end_vi
- #5\XINT_OQ_end_v
- #4\XINT_OQ_end_iv
- #3\XINT_OQ_end_iii
- #2\XINT_OQ_end_ii
- \R\XINT_OQ_end_i
- \Z #2#3#4#5#6#7#8%
+ \expandafter\XINT_dth_start
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\xint_bye\xint_bye\XINT_dthb_final_a!2!3!4!5!6!7!8!9!\W
}%
-\def\XINT_OQ_end_viii #1\Z #2#3#4#5#6#7#8#9\Z { #9}%
-\def\XINT_OQ_end_vii #1\Z #2#3#4#5#6#7#8#9\Z { #8#90000000}%
-\def\XINT_OQ_end_vi #1\Z #2#3#4#5#6#7#8#9\Z { #7#8#9000000}%
-\def\XINT_OQ_end_v #1\Z #2#3#4#5#6#7#8#9\Z { #6#7#8#900000}%
-\def\XINT_OQ_end_iv #1\Z #2#3#4#5#6#7#8#9\Z { #5#6#7#8#90000}%
-\def\XINT_OQ_end_iii #1\Z #2#3#4#5#6#7#8#9\Z { #4#5#6#7#8#9000}%
-\def\XINT_OQ_end_ii #1\Z #2#3#4#5#6#7#8#9\Z { #3#4#5#6#7#8#900}%
-\def\XINT_OQ_end_i \Z #1#2#3#4#5#6#7#8\Z { #1#2#3#4#5#6#7#80}%
-\def\xintDecToHex {\romannumeral0\xintdectohex }%
-\def\xintdectohex #1%
- {\expandafter\XINT_dth_checkin\romannumeral`&&@#1\W\W\W\W \T}%
-\def\XINT_dth_checkin #1%
+\def\XINT_dth_start #1#2#3#4#5%
{%
- \xint_UDsignfork
- #1\XINT_dth_N
- -{\XINT_dth_P #1}%
- \krof
+ \xint_bye#5\XINT_dth_small\xint_bye
+ \XINT_dth_start_a #1#2#3#4#5%
}%
-\def\XINT_dth_N {\expandafter-\romannumeral0\XINT_dth_P }%
-\def\XINT_dth_P {\expandafter\XINT_dth_III\romannumeral`&&@\XINT_dtbh_I {0.}}%
-\def\xintDecToBin {\romannumeral0\xintdectobin }%
-\def\xintdectobin #1%
- {\expandafter\XINT_dtb_checkin\romannumeral`&&@#1\W\W\W\W \T }%
-\def\XINT_dtb_checkin #1%
+\def\XINT_dth_start_a #1#2#3#4#5%
{%
- \xint_UDsignfork
- #1\XINT_dtb_N
- -{\XINT_dtb_P #1}%
- \krof
+ \expandafter\XINT_dth_A\the\numexpr\XINT_dth_a
+ #1#2#3#4\XINT_dth_nextfour!2!3!4!5!6!7!8!9!\Z #5%
}%
-\def\XINT_dtb_N {\expandafter-\romannumeral0\XINT_dtb_P }%
-\def\XINT_dtb_P {\expandafter\XINT_dtb_III\romannumeral`&&@\XINT_dtbh_I {0.}}%
-\def\XINT_dtbh_I #1#2#3#4#5%
+\def\XINT_dth_small\xint_bye\XINT_dth_start_a #1\xint_bye #2\W
{%
- \xint_gob_til_W #5\XINT_dtbh_II_a\W\XINT_dtbh_I_a {}{#2#3#4#5}#1\Z.%
+ \expandafter\XINT_dth_B_finish
+ \romannumeral`&&@\XINT_tofourhex#1!\space
}%
-\def\XINT_dtbh_II_a\W\XINT_dtbh_I_a #1#2{\XINT_dtbh_II_b #2}%
-\def\XINT_dtbh_II_b #1#2#3#4%
+\def\XINT_dth_a #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \xint_gob_til_W
- #1\XINT_dtbh_II_c
- #2\XINT_dtbh_II_ci
- #3\XINT_dtbh_II_cii
- \W\XINT_dtbh_II_ciii #1#2#3#4%
+ \expandafter\XINT_dth_update
+ \the\numexpr #1\expandafter\XINT_dth_update
+ \the\numexpr #2\expandafter\XINT_dth_update
+ \the\numexpr #3\expandafter\XINT_dth_update
+ \the\numexpr #4\expandafter\XINT_dth_update
+ \the\numexpr #5\expandafter\XINT_dth_update
+ \the\numexpr #6\expandafter\XINT_dth_update
+ \the\numexpr #7\expandafter\XINT_dth_update
+ \the\numexpr #8\expandafter\XINT_dth_update
+ \the\numexpr #9\XINT_dth_a
}%
-\def\XINT_dtbh_II_c \W\XINT_dtbh_II_ci
- \W\XINT_dtbh_II_cii
- \W\XINT_dtbh_II_ciii \W\W\W\W {{}}%
-\def\XINT_dtbh_II_ci #1\XINT_dtbh_II_ciii #2\W\W\W
- {\XINT_dtbh_II_d {}{#2}{0}}%
-\def\XINT_dtbh_II_cii\W\XINT_dtbh_II_ciii #1#2\W\W
- {\XINT_dtbh_II_d {}{#1#2}{00}}%
-\def\XINT_dtbh_II_ciii #1#2#3\W
- {\XINT_dtbh_II_d {}{#1#2#3}{000}}%
-\def\XINT_dtbh_I_a #1#2#3.%
+\def\XINT_dth_nextfour #1\Z #2#3#4#5%
{%
- \xint_gob_til_Z #3\XINT_dtbh_I_z\Z
- \expandafter\XINT_dtbh_I_b\the\numexpr #2+#30000.{#1}%
+ #2#3#4#5!\relax\XINT_dth_nextfour!2!3!4!5!6!7!8!9!\Z
}%
-\def\XINT_dtbh_I_b #1.%
+\def\XINT_dth_update #1!%
{%
- \expandafter\XINT_dtbh_I_c\the\numexpr
- (#1+\xint_c_ii^xv)/\xint_c_ii^xvi-\xint_c_i.#1.%
+ \expandafter\XINT_dth_update_a
+ \the\numexpr (#1+\xint_c_ii^xv)/\xint_c_ii^xvi-\xint_c_i\xint:
+ #1\xint:%
}%
-\def\XINT_dtbh_I_c #1.#2.%
+\def\XINT_dth_update_a #1\xint:#2\xint:
{%
- \expandafter\XINT_dtbh_I_d\expandafter
- {\the\numexpr #2-\xint_c_ii^xvi*#1}{#1}%
+ 0000+#1\expandafter!\expandafter!\the\numexpr#2-#1*\xint_c_ii^xvi
}%
-\def\XINT_dtbh_I_d #1#2#3{\XINT_dtbh_I_a {#3#1.}{#2}}%
-\def\XINT_dtbh_I_z\Z\expandafter\XINT_dtbh_I_b\the\numexpr #1+#2.%
+\def\XINT_dth_A #1!!%
{%
- \ifnum #1=\xint_c_ \expandafter\XINT_dtbh_I_end_zb\fi
- \XINT_dtbh_I_end_za {#1}%
+ \ifnum #1>\xint_c_ \xint_dothis{\XINT_dth_again #1!}\fi
+ \xint_orthat{\XINT_dth_again}%
}%
-\def\XINT_dtbh_I_end_za #1#2{\XINT_dtbh_I {#2#1.}}%
-\def\XINT_dtbh_I_end_zb\XINT_dtbh_I_end_za #1#2{\XINT_dtbh_I {#2}}%
-\def\XINT_dtbh_II_d #1#2#3#4.%
+\def\XINT_dth_again #1\Z #2%
{%
- \xint_gob_til_Z #4\XINT_dtbh_II_z\Z
- \expandafter\XINT_dtbh_II_e\the\numexpr #2+#4#3.{#1}{#3}%
+ \xint_bye #2\XINT_dth_B_a\xint_bye
+ \expandafter\XINT_dth_A\the\numexpr\XINT_dth_a #1\Z #2%
}%
-\def\XINT_dtbh_II_e #1.%
+\def\XINT_dth_B_a\xint_bye
+ \expandafter\XINT_dth_A\the\numexpr\XINT_dth_a #1\XINT_dth_nextfour #2\Z
{%
- \expandafter\XINT_dtbh_II_f\the\numexpr
- (#1+\xint_c_ii^xv)/\xint_c_ii^xvi-\xint_c_i.#1.%
+ \expandafter\XINT_dth_B_finish\romannumeral`&&@\XINT_dth_B_c #1!%
}%
-\def\XINT_dtbh_II_f #1.#2.%
+\def\XINT_dth_B_c #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \expandafter\XINT_dtbh_II_g\expandafter
- {\the\numexpr #2-\xint_c_ii^xvi*#1}{#1}%
+ \XINT_tofourhex#1!%
+ \XINT_tofourhex#2!%
+ \XINT_tofourhex#3!%
+ \XINT_tofourhex#4!%
+ \XINT_tofourhex#5!%
+ \XINT_tofourhex#6!%
+ \XINT_tofourhex#7!%
+ \XINT_tofourhex#8!%
+ \XINT_tofourhex#9!%
+ \XINT_dth_B_c
}%
-\def\XINT_dtbh_II_g #1#2#3{\XINT_dtbh_II_d {#3#1.}{#2}}%
-\def\XINT_dtbh_II_z\Z\expandafter\XINT_dtbh_II_e\the\numexpr #1+#2.%
+\def\XINT_tofourhex #1!%
{%
- \ifnum #1=\xint_c_ \expandafter\XINT_dtbh_II_end_zb\fi
- \XINT_dtbh_II_end_za {#1}%
+ \expandafter\XINT_tofourhex_a
+ \the\numexpr (#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i\xint: #1\xint:
}%
-\def\XINT_dtbh_II_end_za #1#2#3{{}#2#1.\Z.}%
-\def\XINT_dtbh_II_end_zb\XINT_dtbh_II_end_za #1#2#3{{}#2\Z.}%
-\def\XINT_dth_III #1#2.%
+\def\XINT_tofourhex_a #1\xint: #2\xint:
{%
- \xint_gob_til_Z #2\XINT_dth_end\Z
- \expandafter\XINT_dth_III\expandafter
- {\romannumeral`&&@\XINT_dth_small #2.#1}%
+ \expandafter\XINT_tofourhex_b
+ \the\numexpr #2-\xint_c_ii^viii*#1\xint:#1\xint:
}%
-\def\XINT_dth_small #1.%
+\def\XINT_tofourhex_b #1\xint: #2\xint:
{%
- \expandafter\XINT_smallhex\expandafter
- {\the\numexpr (#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i\expandafter}%
- \romannumeral`&&@\expandafter\XINT_smallhex\expandafter
- {\the\numexpr
- #1-((#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i)*\xint_c_ii^viii}%
+ \XINT_smallhex #2!%
+ \XINT_smallhex #1!%
}%
-\def\XINT_dth_end\Z\expandafter\XINT_dth_III\expandafter #1#2\T
+\def\XINT_dthb_final_a #1\W{1)\relax \xint:\XINT_dthb_final_b\xint:\W}%
+\def\XINT_dthb_final_b #1\W{1\relax \xint:\XINT_dthb_final_c\xint:\W}%
+\def\XINT_dthb_final_c #1\W{-1)\relax \XINT_dthb_final_d\xint:\xint:\W}%
+\def\XINT_dthb_final_d #1\W{\endcsname}%
+\def\XINT_dth_B_finish #1#2#3%
{%
- \XINT_dth_end_b #1%
+ \unless\if#10\xint_dothis{ #1#2#3}\fi
+ \unless\if#20\xint_dothis{ #2#3}\fi
+ \unless\if#30\xint_dothis{ #3}\fi
+ \xint_orthat{ }%
}%
-\def\XINT_dth_end_b #1.{\XINT_dth_end_c }%
-\def\XINT_dth_end_c #1{\xint_gob_til_zero #1\XINT_dth_end_d 0\space #1}%
-\def\XINT_dth_end_d 0\space 0#1%
+\def\xintDecToBin {\romannumeral0\xintdectobin }%
+\def\xintdectobin #1%
{%
- \xint_gob_til_zero #1\XINT_dth_end_e 0\space #1%
+ \expandafter\XINT_dtb_checkin\romannumeral`&&@#1\xint:
}%
-\def\XINT_dth_end_e 0\space 0#1%
+\def\XINT_dtb_checkin #1%
{%
- \xint_gob_til_zero #1\XINT_dth_end_f 0\space #1%
+ \xint_UDsignfork
+ #1\XINT_dtb_neg
+ -{\XINT_dtb_main #1}%
+ \krof
}%
-\def\XINT_dth_end_f 0\space 0{ }%
-\def\XINT_dtb_III #1#2.%
+\def\XINT_dtb_neg {\expandafter-\romannumeral0\XINT_dtb_main}%
+\def\XINT_dtb_main #1\xint:
{%
- \xint_gob_til_Z #2\XINT_dtb_end\Z
- \expandafter\XINT_dtb_III\expandafter
- {\romannumeral`&&@\XINT_dtb_small #2.#1}%
+ \expandafter\XINT_dtb_start
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\xint_bye\xint_bye\XINT_dthb_final_a!2!3!4!5!6!7!8!9!\W
}%
-\def\XINT_dtb_small #1.%
+\def\XINT_dtb_start #1#2#3#4#5%
{%
- \expandafter\XINT_smallbin\expandafter
- {\the\numexpr (#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i\expandafter}%
- \romannumeral`&&@\expandafter\XINT_smallbin\expandafter
- {\the\numexpr
- #1-((#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i)*\xint_c_ii^viii}%
+ \xint_bye#5\XINT_dtb_small\xint_bye
+ \XINT_dtb_start_a #1#2#3#4#5%
}%
-\def\XINT_dtb_end\Z\expandafter\XINT_dtb_III\expandafter #1#2\T
+\def\XINT_dtb_start_a #1#2#3#4#5%
{%
- \XINT_dtb_end_b #1%
+ \expandafter\XINT_dtb_A\the\numexpr\XINT_dtb_a
+ #1#2#3#4\XINT_dtb_nextfour!2!3!4!5!6!7!8!9!\Z #5%
}%
-\def\XINT_dtb_end_b #1.{\XINT_dtb_end_c }%
-\def\XINT_dtb_end_c #1#2#3#4#5#6#7#8%
+\def\XINT_dtb_small\xint_bye\XINT_dtb_start_a #1\xint_bye #2\W
{%
- \expandafter\XINT_dtb_end_d\the\numexpr #1#2#3#4#5#6#7#8\relax
+ \expandafter\XINT_dtb_B_finish
+ \romannumeral`&&@\XINT_tosixteenbits#1!\space
}%
-\def\XINT_dtb_end_d#1{%
-\def\XINT_dtb_end_d ##1##2##3##4##5##6##7##8##9%
+\def\XINT_dtb_a #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
-}}\XINT_dtb_end_d{ }%
-\def\xintHexToDec {\romannumeral0\xinthextodec }%
-\def\xinthextodec #1%
- {\expandafter\XINT_htd_checkin\romannumeral`&&@#1\W\W\W\W \T }%
-\def\XINT_htd_checkin #1%
+ \expandafter\XINT_dtb_update
+ \the\numexpr #1\expandafter\XINT_dtb_update
+ \the\numexpr #2\expandafter\XINT_dtb_update
+ \the\numexpr #3\expandafter\XINT_dtb_update
+ \the\numexpr #4\expandafter\XINT_dtb_update
+ \the\numexpr #5\expandafter\XINT_dtb_update
+ \the\numexpr #6\expandafter\XINT_dtb_update
+ \the\numexpr #7\expandafter\XINT_dtb_update
+ \the\numexpr #8\expandafter\XINT_dtb_update
+ \the\numexpr #9\XINT_dtb_a
+}%
+\def\XINT_dtb_nextfour #1\Z #2#3#4#5%
{%
- \xint_UDsignfork
- #1\XINT_htd_neg
- -{\XINT_htd_I {0000}#1}%
- \krof
+ #2#3#4#5!\relax\XINT_dtb_nextfour!2!3!4!5!6!7!8!9!\Z
}%
-\def\XINT_htd_neg {\expandafter-\romannumeral0\XINT_htd_I {0000}}%
-\def\XINT_htd_I #1#2#3#4#5%
+\def\XINT_dtb_update #1!%
{%
- \xint_gob_til_W #5\XINT_htd_II_a\W
- \XINT_htd_I_a {}{"#2#3#4#5}#1\Z\Z\Z\Z
+ \expandafter\XINT_dtb_update_a
+ \the\numexpr (#1+\xint_c_ii^xv)/\xint_c_ii^xvi-\xint_c_i\xint:
+ #1\xint:%
}%
-\def\XINT_htd_II_a \W\XINT_htd_I_a #1#2{\XINT_htd_II_b #2}%
-\def\XINT_htd_II_b "#1#2#3#4%
+\def\XINT_dtb_update_a #1\xint:#2\xint:
{%
- \xint_gob_til_W
- #1\XINT_htd_II_c
- #2\XINT_htd_II_ci
- #3\XINT_htd_II_cii
- \W\XINT_htd_II_ciii #1#2#3#4%
+ 0000+#1\expandafter!\expandafter!\the\numexpr#2-#1*\xint_c_ii^xvi
}%
-\def\XINT_htd_II_c \W\XINT_htd_II_ci
- \W\XINT_htd_II_cii
- \W\XINT_htd_II_ciii \W\W\W\W #1\Z\Z\Z\Z\T
+\def\XINT_dtb_A #1!!%
{%
- \expandafter\xint_cleanupzeros_andstop
- \romannumeral0\XINT_rord_main {}#1%
- \xint:
- \xint_bye\xint_bye\xint_bye\xint_bye
- \xint_bye\xint_bye\xint_bye\xint_bye
- \xint:
+ \ifnum #1>\xint_c_ \xint_dothis{\XINT_dtb_again #1!}\fi
+ \xint_orthat{\XINT_dtb_again}%
}%
-\def\XINT_htd_II_ci #1\XINT_htd_II_ciii
- #2\W\W\W {\XINT_htd_II_d {}{"#2}{\xint_c_xvi}}%
-\def\XINT_htd_II_cii\W\XINT_htd_II_ciii
- #1#2\W\W {\XINT_htd_II_d {}{"#1#2}{\xint_c_ii^viii}}%
-\def\XINT_htd_II_ciii #1#2#3\W {\XINT_htd_II_d {}{"#1#2#3}{\xint_c_ii^xii}}%
-\def\XINT_htd_I_a #1#2#3#4#5#6%
+\def\XINT_dtb_again #1\Z #2%
{%
- \xint_gob_til_Z #3\XINT_htd_I_end_a\Z
- \expandafter\XINT_htd_I_b\the\numexpr
- #2+\xint_c_ii^xvi*#6#5#4#3+\xint_c_x^ix\relax {#1}%
+ \xint_bye #2\XINT_dtb_B_a\xint_bye
+ \expandafter\XINT_dtb_A\the\numexpr\XINT_dtb_a #1\Z #2%
}%
-\def\XINT_htd_I_b 1#1#2#3#4#5#6#7#8#9{\XINT_htd_I_c {#1#2#3#4#5}{#9#8#7#6}}%
-\def\XINT_htd_I_c #1#2#3{\XINT_htd_I_a {#3#2}{#1}}%
-\def\XINT_htd_I_end_a\Z\expandafter\XINT_htd_I_b\the\numexpr #1+#2\relax
+\def\XINT_dtb_B_a\xint_bye
+ \expandafter\XINT_dtb_A\the\numexpr\XINT_dtb_a #1\XINT_dtb_nextfour #2\Z
{%
- \expandafter\XINT_htd_I_end_b\the\numexpr \xint_c_x^v+#1\relax
+ \expandafter\XINT_dtb_B_finish\romannumeral`&&@\XINT_dtb_B_c #1!%
}%
-\def\XINT_htd_I_end_b 1#1#2#3#4#5%
+\def\XINT_dtb_B_c #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \xint_gob_til_zero #1\XINT_htd_I_end_bz0%
- \XINT_htd_I_end_c #1#2#3#4#5%
+ \XINT_tosixteenbits#1!%
+ \XINT_tosixteenbits#2!%
+ \XINT_tosixteenbits#3!%
+ \XINT_tosixteenbits#4!%
+ \XINT_tosixteenbits#5!%
+ \XINT_tosixteenbits#6!%
+ \XINT_tosixteenbits#7!%
+ \XINT_tosixteenbits#8!%
+ \XINT_tosixteenbits#9!%
+ \XINT_dtb_B_c
}%
-\def\XINT_htd_I_end_c #1#2#3#4#5#6{\XINT_htd_I {#6#5#4#3#2#1000}}%
-\def\XINT_htd_I_end_bz0\XINT_htd_I_end_c 0#1#2#3#4%
+\def\XINT_tosixteenbits #1!%
{%
- \xint_gob_til_zeros_iv #1#2#3#4\XINT_htd_I_end_bzz 0000%
- \XINT_htd_I_end_D {#4#3#2#1}%
+ \expandafter\XINT_tosixteenbits_a
+ \the\numexpr (#1+\xint_c_ii^vii)/\xint_c_ii^viii-\xint_c_i\xint: #1\xint:
}%
-\def\XINT_htd_I_end_D #1#2{\XINT_htd_I {#2#1}}%
-\def\XINT_htd_I_end_bzz 0000\XINT_htd_I_end_D #1{\XINT_htd_I }%
-\def\XINT_htd_II_d #1#2#3#4#5#6#7%
+\def\XINT_tosixteenbits_a #1\xint: #2\xint:
{%
- \xint_gob_til_Z #4\XINT_htd_II_end_a\Z
- \expandafter\XINT_htd_II_e\the\numexpr
- #2+#3*#7#6#5#4+\xint_c_x^viii\relax {#1}{#3}%
+ \expandafter\XINT_tosixteenbits_b
+ \the\numexpr #2-\xint_c_ii^viii*#1\xint:#1\xint:
}%
-\def\XINT_htd_II_e 1#1#2#3#4#5#6#7#8{\XINT_htd_II_f {#1#2#3#4}{#5#6#7#8}}%
-\def\XINT_htd_II_f #1#2#3{\XINT_htd_II_d {#2#3}{#1}}%
-\def\XINT_htd_II_end_a\Z\expandafter\XINT_htd_II_e
- \the\numexpr #1+#2\relax #3#4\T
+\def\XINT_tosixteenbits_b #1\xint: #2\xint:
{%
- \XINT_htd_II_end_b #1#3%
+ \XINT_smallbin #2!%
+ \XINT_smallbin #1!%
}%
-\def\XINT_htd_II_end_b#1{%
-\def\XINT_htd_II_end_b ##1##2##3##4##5##6##7##8%
+\def\XINT_dtb_B_finish #1#2#3#4#5#6#7#8%
{%
- \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8\relax
-}}\XINT_htd_II_end_b{ }%
-\def\xintBinToDec {\romannumeral0\xintbintodec }%
-\def\xintbintodec #1{\expandafter\XINT_btd_checkin
- \romannumeral`&&@#1\W\W\W\W\W\W\W\W \T }%
-\def\XINT_btd_checkin #1%
+ \expandafter\XINT_dtb_B_finish_a\the\numexpr #1#2#3#4#5#6#7#8\relax
+}%
+\def\XINT_dtb_B_finish_a #1{%
+\def\XINT_dtb_B_finish_a ##1##2##3##4##5##6##7##8##9%
+{%
+ \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
+}}\XINT_dtb_B_finish_a { }%
+\def\xintHexToDec {\romannumeral0\xinthextodec }%
+\def\xinthextodec #1%
+{%
+ \expandafter\XINT_htd_checkin\romannumeral`&&@#1\xint:
+}%
+\def\XINT_htd_checkin #1%
{%
\xint_UDsignfork
- #1\XINT_btd_neg
- -{\XINT_btd_I {000000}#1}%
+ #1\XINT_htd_neg
+ -{\XINT_htd_main #1}%
\krof
}%
-\def\XINT_btd_neg {\expandafter-\romannumeral0\XINT_btd_I {000000}}%
-\def\XINT_btd_I #1#2#3#4#5#6#7#8#9%
+\def\XINT_htd_neg {\expandafter-\romannumeral0\XINT_htd_main}%
+\def\XINT_htd_main #1\xint:
{%
- \xint_gob_til_W #9\XINT_btd_II_a {#2#3#4#5#6#7#8#9}\W
- \XINT_btd_I_a {}{\csname XINT_sbtd_#2#3#4#5\endcsname*\xint_c_xvi+%
- \csname XINT_sbtd_#6#7#8#9\endcsname}%
- #1\Z\Z\Z\Z\Z\Z
+ \expandafter\XINT_htd_startb
+ \the\numexpr\expandafter\XINT_htd_starta
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\relax
}%
-\def\XINT_btd_II_a #1\W\XINT_btd_I_a #2#3{\XINT_btd_II_b #1}%
-\def\XINT_btd_II_b #1#2#3#4#5#6#7#8%
+\def\XINT_htd_starta #1#2#3#4{"#1#2#3#4+100000!}%
+\def\XINT_htd_startb 1#1%
{%
- \xint_gob_til_W
- #1\XINT_btd_II_c
- #2\XINT_btd_II_ci
- #3\XINT_btd_II_cii
- #4\XINT_btd_II_ciii
- #5\XINT_btd_II_civ
- #6\XINT_btd_II_cv
- #7\XINT_btd_II_cvi
- \W\XINT_btd_II_cvii #1#2#3#4#5#6#7#8%
+ \if#10\expandafter\XINT_htd_startba\else
+ \expandafter\XINT_htd_startbb
+ \fi 1#1%
}%
-\def\XINT_btd_II_c #1\XINT_btd_II_cvii \W\W\W\W\W\W\W\W #2\Z\Z\Z\Z\Z\Z\T
+\def\XINT_htd_startba 10#1!{\XINT_htd_again #1%
+ \xint_bye!2!3!4!5!6!7!8!9!\xint_bye\XINT_htd_nextfour}%
+\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}%
+\def\XINT_htd_again #1\XINT_htd_nextfour #2%
{%
- \expandafter\XINT_btd_II_c_end
- \romannumeral0\XINT_rord_main {}#2%
- \xint:
- \xint_bye\xint_bye\xint_bye\xint_bye
- \xint_bye\xint_bye\xint_bye\xint_bye
- \xint:
+ \xint_bye #2\XINT_htd_end_a\xint_bye
+ \expandafter\XINT_htd_A\the\numexpr
+ \XINT_htd_a #1\XINT_htd_nextfour #2%
}%
-\def\XINT_btd_II_c_end#1{%
-\def\XINT_btd_II_c_end ##1##2##3##4##5##6%
+\def\XINT_htd_a #1!#2!#3!#4!#5!#6!#7!#8!#9!%
{%
- \expandafter#1\the\numexpr ##1##2##3##4##5##6\relax
-}}\XINT_btd_II_c_end{ }%
-\def\XINT_btd_II_ci #1\XINT_btd_II_cvii #2\W\W\W\W\W\W\W
- {\XINT_btd_II_d {}{#2}{\xint_c_ii }}%
-\def\XINT_btd_II_cii #1\XINT_btd_II_cvii #2\W\W\W\W\W\W
- {\XINT_btd_II_d {}{\csname XINT_sbtd_00#2\endcsname }{\xint_c_iv }}%
-\def\XINT_btd_II_ciii #1\XINT_btd_II_cvii #2\W\W\W\W\W
- {\XINT_btd_II_d {}{\csname XINT_sbtd_0#2\endcsname }{\xint_c_viii }}%
-\def\XINT_btd_II_civ #1\XINT_btd_II_cvii #2\W\W\W\W
- {\XINT_btd_II_d {}{\csname XINT_sbtd_#2\endcsname}{\xint_c_xvi }}%
-\def\XINT_btd_II_cv #1\XINT_btd_II_cvii #2#3#4#5#6\W\W\W
+ #1\expandafter\XINT_htd_update
+ \the\numexpr #2\expandafter\XINT_htd_update
+ \the\numexpr #3\expandafter\XINT_htd_update
+ \the\numexpr #4\expandafter\XINT_htd_update
+ \the\numexpr #5\expandafter\XINT_htd_update
+ \the\numexpr #6\expandafter\XINT_htd_update
+ \the\numexpr #7\expandafter\XINT_htd_update
+ \the\numexpr #8\expandafter\XINT_htd_update
+ \the\numexpr #9\expandafter\XINT_htd_update
+ \the\numexpr \XINT_htd_a
+}%
+\def\XINT_htd_nextfour #1#2#3#4%
{%
- \XINT_btd_II_d {}{\csname XINT_sbtd_#2#3#4#5\endcsname*\xint_c_ii+%
- #6}{\xint_c_ii^v }%
+ *\xint_c_ii^xvi+"#1#2#3#4+\xint_c_x^ix\relax\xint_bye!%
+ 2!3!4!5!6!7!8!9!\xint_bye\XINT_htd_nextfour
}%
-\def\XINT_btd_II_cvi #1\XINT_btd_II_cvii #2#3#4#5#6#7\W\W
+\def\XINT_htd_update 1#1#2#3#4#5#6!%
{%
- \XINT_btd_II_d {}{\csname XINT_sbtd_#2#3#4#5\endcsname*\xint_c_iv+%
- \csname XINT_sbtd_00#6#7\endcsname}{\xint_c_ii^vi }%
+ *\xint_c_ii^xvi+#1#2#3#4#5+\xint_c_x^ix!#6!%
}%
-\def\XINT_btd_II_cvii #1#2#3#4#5#6#7\W
+\def\XINT_htd_A 1#1%
{%
- \XINT_btd_II_d {}{\csname XINT_sbtd_#1#2#3#4\endcsname*\xint_c_viii+%
- \csname XINT_sbtd_0#5#6#7\endcsname}{\xint_c_ii^vii }%
+ \if#10\expandafter\XINT_htd_Aa\else
+ \expandafter\XINT_htd_Ab
+ \fi 1#1%
}%
-\def\XINT_btd_II_d #1#2#3#4#5#6#7#8#9%
+\def\XINT_htd_Aa 10#1#2#3#4#5!{\XINT_htd_again #1#2#3#4!#5!}%
+\def\XINT_htd_Ab 1#1#2#3#4#5#6!{\XINT_htd_again #1!#2#3#4#5!#6!}%
+\def\XINT_htd_end_a\xint_bye
+ \expandafter\XINT_htd_A\the\numexpr \XINT_htd_a #1\XINT_htd_nextfour
{%
- \xint_gob_til_Z #4\XINT_btd_II_end_a\Z
- \expandafter\XINT_btd_II_e\the\numexpr
- #2+(\xint_c_x^ix+#3*#9#8#7#6#5#4)\relax {#1}{#3}%
+ \expandafter\XINT_htd_end_b\the\numexpr0\XINT_unsepb_loop #1%
}%
-\def\XINT_btd_II_e 1#1#2#3#4#5#6#7#8#9{\XINT_btd_II_f {#1#2#3}{#4#5#6#7#8#9}}%
-\def\XINT_btd_II_f #1#2#3{\XINT_btd_II_d {#2#3}{#1}}%
-\def\XINT_btd_II_end_a\Z\expandafter\XINT_btd_II_e
- \the\numexpr #1+(#2\relax #3#4\T
+\def\XINT_htd_end_b #1{%
+\def\XINT_htd_end_b ##1##2##3##4##5%
+ {\expandafter#1\the\numexpr ##1##2##3##4##5\relax}%
+}\XINT_htd_end_b{ }%
+\def\xintBinToDec {\romannumeral0\xintbintodec }%
+\def\xintbintodec #1%
{%
- \XINT_btd_II_end_b #1#3%
+ \expandafter\XINT_btd_checkin\romannumeral`&&@#1\xint:
}%
-\def\XINT_btd_II_end_b#1{%
-\def\XINT_btd_II_end_b ##1##2##3##4##5##6##7##8##9%
+\def\XINT_btd_checkin #1%
{%
- \expandafter#1\the\numexpr ##1##2##3##4##5##6##7##8##9\relax
-}}\XINT_btd_II_end_b{ }%
-\def\XINT_btd_I_a #1#2#3#4#5#6#7#8%
+ \xint_UDsignfork
+ #1\XINT_btd_N
+ -{\XINT_btd_main #1}%
+ \krof
+}%
+\def\XINT_btd_N {\expandafter-\romannumeral0\XINT_btd_main }%
+\def\XINT_btd_main #1\xint:
{%
- \xint_gob_til_Z #3\XINT_btd_I_end_a\Z
- \expandafter\XINT_btd_I_b\the\numexpr
- #2+\xint_c_ii^viii*#8#7#6#5#4#3+\xint_c_x^ix\relax {#1}%
+ \expandafter\XINT_btd_htd
+ \csname\expandafter\XINT_btd_tohex
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\XINT_btd_tohex_endcsname2345678\W
}%
-\def\XINT_btd_I_b 1#1#2#3#4#5#6#7#8#9{\XINT_btd_I_c {#1#2#3}{#9#8#7#6#5#4}}%
-\def\XINT_btd_I_c #1#2#3{\XINT_btd_I_a {#3#2}{#1}}%
-\def\XINT_btd_I_end_a\Z\expandafter\XINT_btd_I_b
- \the\numexpr #1+\xint_c_ii^viii #2\relax
+\def\XINT_btd_tohex #1#2#3#4#5#6#7#8%
{%
- \expandafter\XINT_btd_I_end_b\the\numexpr 1000+#1\relax
+ XINT_sbth_#1#2#3#4\expandafter\endcsname
+ \csname XINT_sbth_#5#6#7#8\expandafter\endcsname
+ \csname\XINT_btd_tohex
}%
-\def\XINT_btd_I_end_b 1#1#2#3%
+\def\XINT_btd_tohex_endcsname#1\W{none\endcsname}%
+\def\XINT_btd_htd #1\XINT_sbth_none
{%
- \xint_gob_til_zeros_iii #1#2#3\XINT_btd_I_end_bz 000%
- \XINT_btd_I_end_c #1#2#3%
+ \expandafter\XINT_htd_startb
+ \the\numexpr\expandafter\XINT_htd_starta
+ \romannumeral0\XINT_zeroes_foriv
+ #1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ #1\xint_bye!2!3!4!5!6!7!8!9!\xint_bye\relax
}%
-\def\XINT_btd_I_end_c #1#2#3#4{\XINT_btd_I {#4#3#2#1000}}%
-\def\XINT_btd_I_end_bz 000\XINT_btd_I_end_c 000{\XINT_btd_I }%
\def\xintBinToHex {\romannumeral0\xintbintohex }%
\def\xintbintohex #1%
{%
- \expandafter\XINT_bth_checkin
- \romannumeral0\expandafter\XINT_num_cleanup
- \the\numexpr\expandafter\XINT_num_loop
- \romannumeral`&&@#1\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
- \R\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W\W
+ \expandafter\XINT_bth_checkin\romannumeral`&&@#1\xint:
}%
\def\XINT_bth_checkin #1%
{%
\xint_UDsignfork
#1\XINT_bth_N
- -{\XINT_bth_P #1}%
+ -{\XINT_bth_main #1}%
\krof
}%
-\def\XINT_bth_N {\expandafter-\romannumeral0\XINT_bth_P }%
-\def\XINT_bth_P {\expandafter\XINT_bth_I\expandafter{\expandafter}%
- \romannumeral0\XINT_OQ {}}%
-\def\XINT_bth_I #1#2#3#4#5#6#7#8#9%
+\def\XINT_bth_N {\expandafter-\romannumeral0\XINT_bth_main }%
+\def\XINT_bth_main #1{%
+\def\XINT_bth_main ##1\xint:
{%
- \xint_gob_til_W #9\XINT_bth_end_a\W
- \expandafter\expandafter\expandafter
- \XINT_bth_I
- \expandafter\expandafter\expandafter
- {\csname XINT_sbth_#9#8#7#6\expandafter\expandafter\expandafter\endcsname
- \csname XINT_sbth_#5#4#3#2\endcsname #1}%
-}%
-\def\XINT_bth_end_a\W \expandafter\expandafter\expandafter
- \XINT_bth_I \expandafter\expandafter\expandafter #1%
-{%
- \XINT_bth_end_b #1%
-}%
-\def\XINT_bth_end_b #1\endcsname #2\endcsname #3%
+ \expandafter\expandafter\expandafter#1%
+ \csname\expandafter\XINT_bth_tohex
+ \romannumeral0\XINT_zeroes_foriv
+ ##1\R{0\R}{00\R}{000\R}\R{0\R}{00\R}{000\R}\R\W
+ ##1\XINT_bth_tohex_endcsname2345678\W
+}}\XINT_bth_main{ }%
+\def\XINT_bth_tohex #1#2#3#4#5#6#7#8%
{%
- \xint_gob_til_zero #3\XINT_bth_end_z 0\space #3%
+ XINT_sbth_#1#2#3#4\expandafter\expandafter\expandafter\endcsname
+ \csname XINT_sbth_#5#6#7#8\expandafter\expandafter\expandafter\endcsname
+ \csname\XINT_bth_tohex
}%
-\def\XINT_bth_end_z0\space 0{ }%
+\def\XINT_bth_tohex_endcsname#1\W{none\endcsname}%
\def\xintHexToBin {\romannumeral0\xinthextobin }%
\def\xinthextobin #1%
{%
- \expandafter\XINT_htb_checkin\romannumeral`&&@#1GGGGGGGG\T
+ \expandafter\XINT_htb_checkin\romannumeral`&&@#1%
+ \xint_bye 23456789\xint_bye none\endcsname\relax
}%
\def\XINT_htb_checkin #1%
{%
\xint_UDsignfork
#1\XINT_htb_N
- -{\XINT_htb_P #1}%
+ -{\XINT_htb_main #1}%
\krof
}%
-\def\XINT_htb_N {\expandafter-\romannumeral0\XINT_htb_P }%
-\def\XINT_htb_P {\XINT_htb_I_a {}}%
-\def\XINT_htb_I_a #1#2#3#4#5#6#7#8#9%
-{%
- \xint_gob_til_G #9\XINT_htb_II_a G%
- \expandafter\expandafter\expandafter
- \XINT_htb_I_b
- \expandafter\expandafter\expandafter
- {\csname XINT_shtb_#2\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#3\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#4\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#5\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#6\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#7\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#8\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#9\endcsname }{#1}%
-}%
-\def\XINT_htb_I_b #1#2{\XINT_htb_I_a {#2#1}}%
-\def\XINT_htb_II_a G\expandafter\expandafter\expandafter\XINT_htb_I_b
-{%
- \expandafter\expandafter\expandafter \XINT_htb_II_b
-}%
-\def\XINT_htb_II_b #1#2#3\T
-{%
- \expandafter\XINT_num_cleanup
- \the\numexpr\expandafter\XINT_num_loop #2#1%
- \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
-}%
+\def\XINT_htb_N {\expandafter-\romannumeral0\XINT_htb_main }%
+\def\XINT_htb_main {\expandafter\XINT_htb_cuz\the\numexpr\XINT_htb_loop}%
+\def\XINT_htb_loop #1#2#3#4#5#6#7#8#9%
+{%
+ 1\csname XINT_shtb_#1\endcsname
+ \csname XINT_shtb_#2\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#3\endcsname
+ \csname XINT_shtb_#4\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#5\endcsname
+ \csname XINT_shtb_#6\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#7\endcsname
+ \csname XINT_shtb_#8\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#9\endcsname
+ \XINT_htb_loop_a
+}%
+\def\XINT_htb_loop_a #1#2#3#4#5#6#7#8#9%
+{%
+ \csname XINT_shtb_#1\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#2\endcsname
+ \csname XINT_shtb_#3\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#4\endcsname
+ \csname XINT_shtb_#5\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#6\endcsname
+ \csname XINT_shtb_#7\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr1\csname XINT_shtb_#8\endcsname
+ \csname XINT_shtb_#9\endcsname
+ \expandafter\XINT_unsep_clean
+ \the\numexpr\XINT_htb_loop
+}%
+\def\XINT_htb_cuz #1{%
+\def\XINT_htb_cuz 1##1##2##3##4%
+ {\expandafter#1\the\numexpr##1##2##3##4\relax}%
+}\XINT_htb_cuz { }%
\def\xintCHexToBin {\romannumeral0\xintchextobin }%
\def\xintchextobin #1%
{%
\expandafter\XINT_chtb_checkin\romannumeral`&&@#1%
- \R\R\R\R\R\R\R\R\Z \W\W\W\W\W\W\W\W
+ \xint_bye 23456789\xint_bye none\endcsname\relax
}%
\def\XINT_chtb_checkin #1%
{%
\xint_UDsignfork
#1\XINT_chtb_N
- -{\XINT_chtb_P #1}%
+ -{\XINT_chtb_main #1}%
\krof
}%
-\def\XINT_chtb_N {\expandafter-\romannumeral0\XINT_chtb_P }%
-\def\XINT_chtb_P {\expandafter\XINT_chtb_I\expandafter{\expandafter}%
- \romannumeral0\XINT_OQ {}}%
-\def\XINT_chtb_I #1#2#3#4#5#6#7#8#9%
-{%
- \xint_gob_til_W #9\XINT_chtb_end_a\W
- \expandafter\expandafter\expandafter
- \XINT_chtb_I
- \expandafter\expandafter\expandafter
- {\csname XINT_shtb_#9\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#8\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#7\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#6\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#5\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#4\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#3\expandafter\expandafter\expandafter\endcsname
- \csname XINT_shtb_#2\endcsname
- #1}%
-}%
-\def\XINT_chtb_end_a\W\expandafter\expandafter\expandafter
- \XINT_chtb_I\expandafter\expandafter\expandafter #1%
-{%
- \XINT_chtb_end_b #1%
- \xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\xint:\Z
-}%
-\def\XINT_chtb_end_b #1\W#2\W#3\W#4\W#5\W#6\W#7\W#8\W\endcsname
-{%
- \expandafter\XINT_num_cleanup
- \the\numexpr\expandafter\XINT_num_loop
-}%
+\def\XINT_chtb_N {\expandafter-\romannumeral0\XINT_chtb_main }%
+\def\XINT_chtb_main
+ {\expandafter\xint_gobble_thenstop\the\numexpr\XINT_htb_loop}%
\XINT_restorecatcodes_endinput%
\endinput
%%
diff --git a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
index 244f3fa5cff..de079d94c89 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintcfrac: Expandable continued fractions with xint package
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcfrac}%
- [2017/07/26 1.2l Expandable continued fractions with xint package (JFB)]%
+ [2017/07/31 1.2m Expandable continued fractions with xint package (JFB)]%
\def\xintCFrac {\romannumeral0\xintcfrac }%
\def\xintcfrac #1%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xintcore.sty b/Master/texmf-dist/tex/generic/xint/xintcore.sty
index 96b159fb997..5c2950f160c 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcore.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcore.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintcore: Expandable arithmetic on big integers
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcore}%
- [2017/07/26 1.2l Expandable arithmetic on big integers (JFB)]%
+ [2017/07/31 1.2m Expandable arithmetic on big integers (JFB)]%
\csname XINT_Clamped_istrapped\endcsname
\csname XINT_ConversionSyntax_istrapped\endcsname
\csname XINT_DivisionByZero_istrapped\endcsname
@@ -446,6 +446,19 @@
\the\numexpr #9\XINT_unsep_loop
}%
\def\XINT_unsep_clean 1{\relax}%
+\def\XINT_unsepb_loop #1!#2!#3!#4!#5!#6!#7!#8!#9!%
+{%
+ \expandafter\XINT_unsep_clean
+ \the\numexpr 1#1\expandafter\XINT_unsep_clean
+ \the\numexpr 1#2\expandafter\XINT_unsep_clean
+ \the\numexpr 1#3\expandafter\XINT_unsep_clean
+ \the\numexpr 1#4\expandafter\XINT_unsep_clean
+ \the\numexpr 1#5\expandafter\XINT_unsep_clean
+ \the\numexpr 1#6\expandafter\XINT_unsep_clean
+ \the\numexpr 1#7\expandafter\XINT_unsep_clean
+ \the\numexpr 1#8\expandafter\XINT_unsep_clean
+ \the\numexpr 1#9\XINT_unsepb_loop
+}%
\def\XINT_unsep_cuzsmall
{%
\expandafter\XINT_unsep_cuzsmall_x\the\numexpr0\XINT_unsep_loop
@@ -489,6 +502,13 @@
{%
\expandafter#1\xint_gob_til_one ##2##3##4##5##6##7##8%
}}\XINT_zeroes_forviii_end{ }%
+\def\XINT_zeroes_foriv #1#2#3#4#5#6#7#8%
+{%
+ \xint_gob_til_R #8\XINT_zeroes_foriv_end\R\XINT_zeroes_foriv
+}%
+\def\XINT_zeroes_foriv_end\R\XINT_zeroes_foriv #1#2\W
+ {\XINT_zeroes_foriv_done #1}%
+\def\XINT_zeroes_foriv_done #1\R{ #1}%
\def\XINT_sepbyviii_Z #1#2#3#4#5#6#7#8%
{%
1#1#2#3#4#5#6#7#8\expandafter!\the\numexpr\XINT_sepbyviii_Z
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index 8b8abe637c1..469337572ba 100644
--- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
@@ -81,7 +81,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2017/07/26 1.2l Expandable expression parser (JFB)]%
+ [2017/07/31 1.2m Expandable expression parser (JFB)]%
\catcode`! 11
\let\XINT_Cmp \xintiiCmp
\def\xint_gob_til_! #1!{}% ! with catcode 11
diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
index d5fbc30c454..60c14bb01d0 100644
--- a/Master/texmf-dist/tex/generic/xint/xintfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintfrac: Expandable operations on fractions
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintfrac}%
- [2017/07/26 1.2l Expandable operations on fractions (JFB)]%
+ [2017/07/31 1.2m Expandable operations on fractions (JFB)]%
\def\XINT_cntSgnFork #1%
{%
\ifcase #1\expandafter\xint_secondofthree
@@ -1479,15 +1479,16 @@
}%
\def\XINT_fgeq_Fd #1\Z #2#3%
{%
- \expandafter\XINT_fgeq_Fe\expandafter
- {\romannumeral0\XINT_dsx_addzeros {#1}#3;}{#2}%
+ \expandafter\XINT_fgeq_Fe
+ \romannumeral0\XINT_dsx_addzeros {#1}#3;\xint:#2\xint:
}%
-\def\XINT_fgeq_Fe #1#2{\XINT_geq_pre {#2}{#1}}%
+\def\XINT_fgeq_Fe #1\xint:#2#3\xint:{\XINT_geq_plusplus #2#1\xint:#3\xint:}%
\def\XINT_fgeq_Fn #1\Z #2#3%
{%
- \expandafter\XINT_geq_pre\expandafter
- {\romannumeral0\XINT_dsx_addzeros {#1}#2;}{#3}%
+ \expandafter\XINT_fgeq_Fo
+ \romannumeral0\XINT_dsx_addzeros {#1}#2;\xint:#3\xint:
}%
+\def\XINT_fgeq_Fo #1#2\xint:#3\xint:{\XINT_geq_plusplus #1#3\xint:#2\xint:}%
\def\xintMax {\romannumeral0\xintmax }%
\def\xintmax #1%
{%
@@ -1608,9 +1609,9 @@
\krof
#1#2%
}%
-\def\XINT_fcmp_zerozero #1#2#3#4{ 0}% 1.08b had some [ and ] here!!!
-\def\XINT_fcmp_firstzero #1#2#3#4{ -1}% incredibly I never saw that until
-\def\XINT_fcmp_secondzero #1#2#3#4{ 1}% preparing 1.09a.
+\def\XINT_fcmp_zerozero #1#2#3#4{ 0}%
+\def\XINT_fcmp_firstzero #1#2#3#4{ -1}%
+\def\XINT_fcmp_secondzero #1#2#3#4{ 1}%
\def\XINT_fcmp_pos #1#2#3#4%
{%
\XINT_fcmp_B #1#3#2#4%
@@ -1642,15 +1643,16 @@
}%
\def\XINT_fcmp_Fd #1\Z #2#3%
{%
- \expandafter\XINT_fcmp_Fe\expandafter
- {\romannumeral0\XINT_dsx_addzeros {#1}#3;}{#2}%
+ \expandafter\XINT_fcmp_Fe
+ \romannumeral0\XINT_dsx_addzeros {#1}#3;\xint:#2\xint:
}%
-\def\XINT_fcmp_Fe #1#2{\xintiicmp {#2}{#1}}%
+\def\XINT_fcmp_Fe #1\xint:#2#3\xint:{\XINT_cmp_plusplus #2#1\xint:#3\xint:}%
\def\XINT_fcmp_Fn #1\Z #2#3%
{%
- \expandafter\xintiicmp\expandafter
- {\romannumeral0\XINT_dsx_addzeros {#1}#2;}{#3}%
+ \expandafter\XINT_fcmp_Fo
+ \romannumeral0\XINT_dsx_addzeros {#1}#2;\xint:#3\xint:
}%
+\def\XINT_fcmp_Fo #1#2\xint:#3\xint:{\XINT_cmp_plusplus #1#3\xint:#2\xint:}%
\def\xintAbs {\romannumeral0\xintabs }%
\def\xintabs #1{\expandafter\XINT_abs\romannumeral0\xintraw {#1}}%
\def\xintOpp {\romannumeral0\xintopp }%
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
index d38d188a8c8..37b396cb7ca 100644
--- a/Master/texmf-dist/tex/generic/xint/xintgcd.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintgcd: Euclidean algorithm with xint package
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintgcd}%
- [2017/07/26 1.2l Euclide algorithm with xint package (JFB)]%
+ [2017/07/31 1.2m Euclide algorithm with xint package (JFB)]%
\def\xintGCD {\romannumeral0\xintgcd }%
\def\xintgcd #1%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
index 92af7369012..8c9b9371df6 100644
--- a/Master/texmf-dist/tex/generic/xint/xintkernel.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintkernel: Paraphernalia for the xint packages
%% ---------------------------------------------------------------
@@ -156,7 +156,7 @@
\fi
\XINT_providespackage
\ProvidesPackage {xintkernel}%
- [2017/07/26 1.2l Paraphernalia for the xint packages (JFB)]%
+ [2017/07/31 1.2m Paraphernalia for the xint packages (JFB)]%
\chardef\xint_c_ 0
\chardef\xint_c_i 1
\chardef\xint_c_ii 2
diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty
index 16bfec971a4..d6f66718cee 100644
--- a/Master/texmf-dist/tex/generic/xint/xintseries.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintseries.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xintseries: Expandable partial sums with xint package
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintseries}%
- [2017/07/26 1.2l Expandable partial sums with xint package (JFB)]%
+ [2017/07/31 1.2m Expandable partial sums with xint package (JFB)]%
\def\xintSeries {\romannumeral0\xintseries }%
\def\xintseries #1#2%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xinttools.sty b/Master/texmf-dist/tex/generic/xint/xinttools.sty
index b23ed5ac1e7..ed3e2606850 100644
--- a/Master/texmf-dist/tex/generic/xint/xinttools.sty
+++ b/Master/texmf-dist/tex/generic/xint/xinttools.sty
@@ -21,7 +21,7 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.2l 2017/07/26
+%% The xint bundle 1.2m 2017/07/31
%% Copyright (C) 2013-2017 by Jean-Francois Burnol
%% xinttools: Expandable and non-expandable utilities
%% ---------------------------------------------------------------
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xinttools}%
- [2017/07/26 1.2l Expandable and non-expandable utilities (JFB)]%
+ [2017/07/31 1.2m Expandable and non-expandable utilities (JFB)]%
\newtoks\XINT_toks
\xint_firstofone{\let\XINT_sptoken= } %<- space here!
\def\xintgodef {\global\xintodef }%