summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-06 22:02:47 +0000
committerKarl Berry <karl@freefriends.org>2019-01-06 22:02:47 +0000
commit3354abdc519630ad9975bfce46bada2882fcd6af (patch)
treef803a9bf96bd1c8eb2b618218f06fb20306bf387
parentbee0d2fefd913952b342b909a4a278ce72712e51 (diff)
xint (6jan19)
git-svn-id: svn://tug.org/texlive/trunk@49617 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/generic/xint/CHANGES.html314
-rw-r--r--Master/texmf-dist/doc/generic/xint/CHANGES.pdfbin100332 -> 101153 bytes
-rw-r--r--Master/texmf-dist/doc/generic/xint/README20
-rw-r--r--Master/texmf-dist/doc/generic/xint/README.html56
-rw-r--r--Master/texmf-dist/doc/generic/xint/README.pdfbin32057 -> 31548 bytes
-rw-r--r--Master/texmf-dist/doc/generic/xint/sourcexint.pdfbin1510993 -> 1530668 bytes
-rw-r--r--Master/texmf-dist/doc/generic/xint/xint.pdfbin918245 -> 931961 bytes
-rw-r--r--Master/texmf-dist/source/generic/xint/xint.dtx1695
-rw-r--r--Master/texmf-dist/source/generic/xint/xint.ins4
-rw-r--r--Master/texmf-dist/tex/generic/xint/xint.sty145
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintbinhex.sty6
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcfrac.sty6
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintcore.sty24
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintexpr.sty156
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintfrac.sty86
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintgcd.sty78
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintkernel.sty16
-rw-r--r--Master/texmf-dist/tex/generic/xint/xintseries.sty6
-rw-r--r--Master/texmf-dist/tex/generic/xint/xinttools.sty18
19 files changed, 1750 insertions, 880 deletions
diff --git a/Master/texmf-dist/doc/generic/xint/CHANGES.html b/Master/texmf-dist/doc/generic/xint/CHANGES.html
index 9bd391dc582..6997ee83981 100644
--- a/Master/texmf-dist/doc/generic/xint/CHANGES.html
+++ b/Master/texmf-dist/doc/generic/xint/CHANGES.html
@@ -1,130 +1,143 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta charset="utf-8" />
<meta name="generator" content="pandoc" />
- <meta name="author" content="xint 1.3c" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
+ <meta name="author" content="xint 1.3d" />
<title>CHANGE LOG</title>
- <style type="text/css">code{white-space: pre;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ span.smallcaps{font-variant: small-caps;}
+ span.underline{text-decoration: underline;}
+ div.column{display: inline-block; vertical-align: top; width: 50%;}
+ </style>
<style type="text/css">
body{margin-left : 10%; margin-right : 15%; margin-top: 4ex; font-size: 12pt;}
pre {white-space: pre-wrap;}
code {white-space: pre-wrap;}
#TOC {float: right; position: relative; top: 100px; margin-bottom: 100px;}
</style>
+ <!--[if lt IE 9]>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
+ <![endif]-->
</head>
<body>
-<div id="header">
+<header>
<h1 class="title">CHANGE LOG</h1>
-<h2 class="author">xint 1.3c</h2>
-<h3 class="date">2018/06/17</h3>
-</div>
-<div id="TOC">
+<p class="author">xint 1.3d</p>
+<p class="date">2019/01/06</p>
+</header>
+<nav id="TOC">
<ul>
-<li><a href="#c-20180617"><code>1.3c (2018/06/17)</code></a><ul>
+<li><a href="#d-20190106"><code>1.3d (2019/01/06)</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="#b-20180518"><code>1.3b (2018/05/18)</code></a><ul>
+<li><a href="#c-20180617"><code>1.3c (2018/06/17)</code></a><ul>
<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="#a-20180307"><code>1.3a (2018/03/07)</code></a><ul>
-<li><a href="#removed">Removed</a></li>
+<li><a href="#b-20180518"><code>1.3b (2018/05/18)</code></a><ul>
<li><a href="#improvements-and-new-features-2">Improvements and new features</a></li>
-<li><a href="#bug-fixes-1">Bug fixes</a></li>
</ul></li>
-<li><a href="#section"><code>1.3 (2018/03/01)</code></a><ul>
-<li><a href="#incompatible-changes">Incompatible changes</a></li>
+<li><a href="#a-20180307"><code>1.3a (2018/03/07)</code></a><ul>
+<li><a href="#removed">Removed</a></li>
<li><a href="#improvements-and-new-features-3">Improvements and new features</a></li>
-</ul></li>
-<li><a href="#q-20180206"><code>1.2q (2018/02/06)</code></a><ul>
-<li><a href="#improvements-and-new-features-4">Improvements and new features</a></li>
<li><a href="#bug-fixes-2">Bug fixes</a></li>
</ul></li>
-<li><a href="#p-20171205"><code>1.2p (2017/12/05)</code></a><ul>
+<li><a href="#section"><code>1.3 (2018/03/01)</code></a><ul>
<li><a href="#incompatible-changes-1">Incompatible changes</a></li>
+<li><a href="#improvements-and-new-features-4">Improvements and new features</a></li>
+</ul></li>
+<li><a href="#q-20180206"><code>1.2q (2018/02/06)</code></a><ul>
<li><a href="#improvements-and-new-features-5">Improvements and new features</a></li>
<li><a href="#bug-fixes-3">Bug fixes</a></li>
</ul></li>
-<li><a href="#o-20170829"><code>1.2o (2017/08/29)</code></a><ul>
+<li><a href="#p-20171205"><code>1.2p (2017/12/05)</code></a><ul>
<li><a href="#incompatible-changes-2">Incompatible changes</a></li>
-<li><a href="#deprecated">Deprecated</a></li>
+<li><a href="#improvements-and-new-features-6">Improvements and new features</a></li>
+<li><a href="#bug-fixes-4">Bug fixes</a></li>
</ul></li>
-<li><a href="#n-20170806"><code>1.2n (2017/08/06)</code></a><ul>
+<li><a href="#o-20170829"><code>1.2o (2017/08/29)</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="#deprecated">Deprecated</a></li>
</ul></li>
-<li><a href="#m-20170731"><code>1.2m (2017/07/31)</code></a><ul>
+<li><a href="#n-20170806"><code>1.2n (2017/08/06)</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-4">Bug fixes</a></li>
</ul></li>
-<li><a href="#l-20170726"><code>1.2l (2017/07/26)</code></a><ul>
-<li><a href="#removed-1">Removed</a></li>
+<li><a href="#m-20170731"><code>1.2m (2017/07/31)</code></a><ul>
+<li><a href="#incompatible-changes-5">Incompatible changes</a></li>
<li><a href="#improvements-and-new-features-8">Improvements and new features</a></li>
<li><a href="#bug-fixes-5">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-5">Incompatible changes</a></li>
+<li><a href="#l-20170726"><code>1.2l (2017/07/26)</code></a><ul>
+<li><a href="#removed-1">Removed</a></li>
<li><a href="#improvements-and-new-features-9">Improvements and new features</a></li>
<li><a href="#bug-fixes-6">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-6">Incompatible changes</a></li>
<li><a href="#improvements-and-new-features-10">Improvements and new features</a></li>
<li><a href="#bug-fixes-7">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-6">Incompatible changes</a></li>
-<li><a href="#removed-2">Removed</a></li>
+<li><a href="#j-20161222"><code>1.2j (2016/12/22)</code></a><ul>
<li><a href="#improvements-and-new-features-11">Improvements and new features</a></li>
<li><a href="#bug-fixes-8">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-7">Incompatible changes</a></li>
+<li><a href="#removed-2">Removed</a></li>
<li><a href="#improvements-and-new-features-12">Improvements and new features</a></li>
<li><a href="#bug-fixes-9">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-7">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-13">Improvements and new features</a></li>
+<li><a href="#bug-fixes-10">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-8">Incompatible changes</a></li>
<li><a href="#improvements-and-new-features-14">Improvements and new features</a></li>
-<li><a href="#bug-fixes-10">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-9">Incompatible changes</a></li>
<li><a href="#improvements-and-new-features-15">Improvements and new features</a></li>
<li><a href="#bug-fixes-11">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-16">Improvements and new features</a></li>
<li><a href="#bug-fixes-12">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-17">Improvements and new features</a></li>
<li><a href="#bug-fixes-13">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-18">Improvements and new features</a></li>
<li><a href="#bug-fixes-14">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-18">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-15">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-19">Improvements and new features</a></li>
+<li><a href="#bug-fixes-16">Bug fixes</a></li>
+</ul></li>
<li><a href="#section-1"><code>1.2 (2015/10/10)</code></a><ul>
<li><a href="#removed-3">Removed</a></li>
-<li><a href="#improvements-and-new-features-19">Improvements and new features</a></li>
+<li><a href="#improvements-and-new-features-20">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-2"><code>1.1 (2014/10/28)</code></a><ul>
-<li><a href="#incompatible-changes-9">Incompatible changes</a></li>
+<li><a href="#incompatible-changes-10">Incompatible changes</a></li>
<li><a href="#removed-4">Removed</a></li>
<li><a href="#deprecated-1">Deprecated</a></li>
-<li><a href="#improvements-and-new-features-20">Improvements and new features</a></li>
-<li><a href="#bug-fixes-16">Bug fixes</a></li>
+<li><a href="#improvements-and-new-features-21">Improvements and new features</a></li>
+<li><a href="#bug-fixes-17">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>
@@ -151,26 +164,45 @@
<li><a href="#section-8"><code>1.03 (2013/04/14)</code></a></li>
<li><a href="#section-9"><code>1.0 (2013/03/28)</code></a></li>
</ul>
-</div>
-<pre><code>Source: xint.dtx 1.3c 2018/06/17 (doc 2018/06/17)
+</nav>
+<pre><code>Source: xint.dtx 1.3d 2019/01/06 (doc 2019/01/06)
Author: Jean-Francois Burnol
Info: Expandable operations on big integers, decimals, fractions
-License: LPPL 1.3c</code></pre>
-<h2 id="c-20180617"><code>1.3c (2018/06/17)</code></h2>
+License: LPPL 1.3d</code></pre>
+<h2 id="d-20190106"><code>1.3d (2019/01/06)</code></h2>
+<h3 id="incompatible-changes">Incompatible changes</h3>
+<ul>
+<li><p><strong>xintexpr</strong>: the <code>gcd()</code> and <code>lcm()</code> functions formerly converted their arguments to integers via <code>\xintNum</code>. They now handle general input with no such modification.</p></li>
+<li><p><strong>xintexpr</strong>: former <code>\xinteval</code>, <code>\xintieval</code>, <code>\xintiieval</code>, and <code>\xintfloateval</code> renamed to <code>\xintexpro</code>, <code>\xintiexpro</code>, <code>\xintiiexpro</code>, and <code>\xintfloatexpro</code>.</p></li>
+</ul>
<h3 id="improvements-and-new-features">Improvements and new features</h3>
<ul>
-<li><p><strong>xintexpr</strong>: with <code>\xintglobaldefstrue</code>, <code>\xintdefvar</code>, <code>\xintdeffunc</code>, <code>\xintNewExpr</code> et. al. make definitions with global scope.</p></li>
+<li><p><strong>xintexpr</strong>: the <code>gcd()</code> and <code>lcm()</code> multi-arguments functions have been refactored to handle general fractions. The dependency on <strong>xintgcd</strong> is removed.</p></li>
+<li><p><strong>xintexpr</strong>: three-way branching <code>\xintifsgnexpr</code>, <code>\xintifsgnfloatexpr</code>, <code>\xintifsgniiexpr</code> conditional macros.</p></li>
+<li><p><strong>xintexpr</strong>: <code>\xintunassignexprfunc</code>, <code>\xintunassigniiexprfunc</code>, <code>\xintunassignfloatexprfunc</code> to “undefine” functions.</p></li>
+<li><p><strong>xintexpr</strong>: <code>\xintunassignvar</code> really makes the (multi-letter) variable unknown (formerly, it only gave it value zero),</p></li>
+<li><p><strong>xintexpr</strong>: functions <code>isone()</code> and <code>isint()</code>.</p></li>
+<li><p><strong>xintexpr</strong>: <code>\xinteval</code>, <code>\xintieval</code>, <code>\xintiieval</code>, and <code>\xintfloateval</code> as synonyms to <code>\xintthexpr...\relax</code> etc…, but with the (comma-separated) expression as a usual braced macro argument.</p></li>
+</ul>
+<h3 id="bug-fixes">Bug fixes</h3>
+<ul>
+<li><strong>xintcore</strong>, <strong>xintexpr</strong> : division in <code>\xintiiexpr</code> was broken for a zero dividend and a one-digit divisor (e.g. <code>0//7</code>) since <code>1.2p</code> due to a bug in <code>\xintiiDivMod</code> for such arguments. The bug was signaled (thanks to Kpym for report) and fixed shortly after <code>1.3c</code> release but I then completely forgot to upload a bugfix release to CTAN at that time, apologies for that.</li>
+</ul>
+<h2 id="c-20180617"><code>1.3c (2018/06/17)</code></h2>
+<h3 id="improvements-and-new-features-1">Improvements and new features</h3>
+<ul>
+<li><p><strong>xintexpr</strong>: with <code>\xintglobaldefstrue</code>, <code>\xintdefvar</code>, <code>\xintdeffunc</code>, <code>\xintNewExpr</code> et al. make definitions with global scope.</p></li>
<li><p><strong>xintexpr</strong>: <code>qraw()</code> for fast input of (very many) comma separated numbers (in suitable raw format).</p></li>
<li><p><strong>xintexpr</strong>: the colon in the <code>:=</code> part of the syntax for <code>\xintdefvar</code> and variants is now optional; and if present it may be an active character or have any (reasonable) catcode.</p></li>
<li><p><strong>xintexpr</strong>: <code>\xintdefvar</code>, <code>\xintdeffunc</code> and their variants try to set the catcode of the semi-colon which delimits their arguments; of course this will not work if that catcode is already frozen.</p></li>
<li><p><code>\xintUniformDeviate</code> is better documented and <code>sourcexint.pdf</code> is better hyperlinked and includes indices for the macros defined by each package.</p></li>
</ul>
-<h3 id="bug-fixes">Bug fixes</h3>
+<h3 id="bug-fixes-1">Bug fixes</h3>
<ul>
<li><strong>xintfrac</strong>: since <code>1.3</code> release, it loaded <strong>xintgcd</strong> in contradiction to what the documentation says (hence also <strong>xintexpr</strong> loaded <strong>xintgcd</strong> automatically). There is no actual dependency so the loading is removed for now.</li>
</ul>
<h2 id="b-20180518"><code>1.3b (2018/05/18)</code></h2>
-<h3 id="improvements-and-new-features-1">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-2">Improvements and new features</h3>
<p>All additions related to randomness are marked as work-in-progress. They require an engine providing the <code>\(pdf)uniformdeviate</code> primitive.</p>
<ul>
<li><p><strong>xintkernel</strong>: <code>\xintUniformDeviate</code>.</p></li>
@@ -178,62 +210,62 @@ License: LPPL 1.3c</code></pre>
<li><p><strong>xintfrac</strong>: support macros (not public, mainly because internal format for floats is surely not final) for <code>random()</code> and <code>qrand()</code>.</p></li>
<li><p><strong>xintexpr</strong>: <code>random()</code>, <code>qrand()</code>, and <code>randrange(A[, B])</code>.</p></li>
<li><p><strong>xintexpr</strong>: when a function <code>foo()</code> is declared via <code>\xintdeffunc</code> (et al.) to be parameter-less, it can be used as <code>foo()</code>; formerly <code>foo(nil)</code> syntax was required.</p></li>
-<li><p>The usual provision of user manual &quot;improvements&quot;.</p></li>
+<li><p>The usual provision of user manual “improvements”.</p></li>
</ul>
<h2 id="a-20180307"><code>1.3a (2018/03/07)</code></h2>
<h3 id="removed">Removed</h3>
<ul>
<li><strong>xintcore</strong>, <strong>xint</strong>, <strong>xintfrac</strong>: removal of the internal macros which were used at <code>1.2o</code> to add a deprecation mechanism; all deprecated macros have been removed at <code>1.3</code> so there was no reason to keep the code used for deprecating them.</li>
</ul>
-<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>xintexpr</strong>: new conditionals <code>ifone()</code> and <code>ifint()</code>.</p></li>
<li><p><strong>xintfrac</strong>: <code>\xintREZ</code> is faster on inputs having one hundred digits or more.</p></li>
<li><p>Added to the user manual mention of macros such as <code>\xintDivFloor</code>, <code>\xintMod</code>, <code>\xintModTrunc</code>, which had been left out so far.</p></li>
</ul>
-<h3 id="bug-fixes-1">Bug fixes</h3>
+<h3 id="bug-fixes-2">Bug fixes</h3>
<ul>
<li><strong>xintexpr</strong>: the mechanism for adjunction to the expression parsers of user defined functions was refactored and improved at previous release <code>1.3</code>: in particular recursive definitions became possible. But an oversight made these recursive functions quite inefficient (to remain polite.) This release fixes the problem.</li>
</ul>
<h2 id="section"><code>1.3 (2018/03/01)</code></h2>
-<h3 id="incompatible-changes">Incompatible changes</h3>
+<h3 id="incompatible-changes-1">Incompatible changes</h3>
<ul>
<li><p><strong>xintcore</strong>, <strong>xint</strong>, <strong>xintfrac</strong>: all macros deprecated at <code>1.2o</code> got removed.</p></li>
<li><p><strong>xintfrac</strong>: addition and subtraction of <code>a/b</code> and <code>c/d</code> now use the l.c.m. of the denominators. Similarly the macro supporting the modulo operator <code>/:</code> uses a l.c.m. for the denominator of the result.</p></li>
<li><p><strong>xintexpr</strong>: the addition, subtraction, modulo <code>/:</code>, and the <code>mod()</code> and <code>divmod()</code> functions produce generally smaller denominators (see previous item).</p></li>
<li><p><strong>xintexpr</strong>: formerly, the internal macros which are internally associated to user-declared functions were using comma separated parameter texts. They now do not use such commas (their meanings, which may again change in future, are written for information to the log under <code>\xintverbosetrue</code>).</p></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>xintexpr</strong>: user-defined functions may now be of a recursive nature. This was made possible by a refactoring of the <code>\xintNewExpr</code> mechanism. It became both leaner and more extensive than formerly.</p></li>
<li><p><strong>xintfrac</strong>: new macros <code>\xintPIrr</code> and <code>\xintDecToString</code>. The latter is a backport of a <code>polexpr 0.4</code> utility, and it is to be considered unstable.</p></li>
<li><p><strong>xintexpr</strong>: new function <code>preduce()</code> associated with <code>\xintPIrr</code>.</p></li>
</ul>
<h2 id="q-20180206"><code>1.2q (2018/02/06)</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><strong>xintexpr</strong>: tacit multiplication extended to cases such as <code>3!4!5!</code> or <code>(1+2)3</code>.</li>
</ul>
-<h3 id="bug-fixes-2">Bug fixes</h3>
+<h3 id="bug-fixes-3">Bug fixes</h3>
<ul>
<li><strong>xintcore</strong>: sadly, refactoring at <code>1.2l</code> of subtraction left an extra character in an inner macro causing breakage in some rare circumstances. This should not have escaped our test suite!</li>
</ul>
<h2 id="p-20171205"><code>1.2p (2017/12/05)</code></h2>
-<h3 id="incompatible-changes-1">Incompatible changes</h3>
+<h3 id="incompatible-changes-2">Incompatible changes</h3>
<ul>
-<li><p><strong>xintgcd</strong>: <code>\xintBezout{a}{b}</code>'s output consists of <code>{u}{v}{d}</code> with <code>u*a+v*b==d</code>, with <code>d</code> the GCD. Formerly it was <code>{a}{b}{u}{v}{d}</code>, and with <code>u*a-v*b==d</code>.</p></li>
+<li><p><strong>xintgcd</strong>: <code>\xintBezout{a}{b}</code>’s output consists of <code>{u}{v}{d}</code> with <code>u*a+v*b==d</code>, with <code>d</code> the GCD. Formerly it was <code>{a}{b}{u}{v}{d}</code>, and with <code>u*a-v*b==d</code>.</p></li>
<li><p><strong>xintgcd</strong>: <code>\xintBezout{0}{0}</code> expands to <code>{0}{0}{0}</code>. Formerly (since <code>1.2l</code>) it raised <code>InvalidOperation</code>.</p></li>
<li><p><strong>xintcore</strong>: <code>\xintiiMod</code> is now associated with floored division. The former meaning (associated with truncated division) is available as <code>\xintiiModTrunc</code>.</p></li>
<li><p><strong>xintfrac</strong>: <code>\xintMod</code> is now associated with floored division. The former meaning is available as <code>\xintModTrunc</code>.</p></li>
<li><p><strong>xintexpr</strong>: the <code>//</code> operator and its associated modulo <code>'mod'</code> (or <code>/:</code>) now correspond to floored division, like the Python language <code>//</code>, <code>%</code>, and <code>divmod(x, y)</code>. Formerly they had been associated to truncated division. This is breaking change for operands of opposite signs.</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><strong>xinttools</strong>: <code>\xintListWithSep</code>, which had remained unchanged since its introduction at <code>1.04 (2013/04/25)</code>, was rewritten for increased speed.</p></li>
-<li><p><strong>xintexpr</strong>: <code>\xintdefvar</code>'s syntax is extended to allow simultaneous assignments. Examples: <code>\xintdefvar x1, x2, x3 := 1, 3**10, 3**20;</code> or <code>\xintdefiivar A, B := B, A 'mod' B;</code> for already defined variables <code>A</code> and <code>B</code>.</p></li>
+<li><p><strong>xintexpr</strong>: <code>\xintdefvar</code>’s syntax is extended to allow simultaneous assignments. Examples: <code>\xintdefvar x1, x2, x3 := 1, 3**10, 3**20;</code> or <code>\xintdefiivar A, B := B, A 'mod' B;</code> for already defined variables <code>A</code> and <code>B</code>.</p></li>
<li><p><strong>xintexpr</strong>: added <code>divmod()</code> to the built-in functions. It is associated with floored division, like the Python language <code>divmod()</code>. Related support macros added to <strong>xintcore</strong>, and <strong>xintfrac</strong>.</p></li>
</ul>
-<h3 id="bug-fixes-3">Bug fixes</h3>
+<h3 id="bug-fixes-4">Bug fixes</h3>
<ul>
<li><p><strong>xintgcd</strong>: <code>\xintBezout{6}{3}</code> (for example) expanded to <code>{6}{3}{-0}{-1}{3}</code>, but the <code>-0</code> should have been <code>0</code>.</p></li>
<li><p><strong>xintgcd</strong>: it still used macro <code>\xintiAbs</code> although the latter had been deprecated from <strong>xintcore</strong>.</p></li>
@@ -241,9 +273,9 @@ License: LPPL 1.3c</code></pre>
<li><p>various documentation fixes; in particular, the partial dependency of <strong>xintcfrac</strong> on <strong>xinttools</strong> had not been mentioned.</p></li>
</ul>
<h2 id="o-20170829"><code>1.2o (2017/08/29)</code></h2>
-<h3 id="incompatible-changes-2">Incompatible changes</h3>
+<h3 id="incompatible-changes-3">Incompatible changes</h3>
<ul>
-<li><strong>xint</strong>: <code>\xintAND</code>, <code>\xintOR</code>, ... and similar Boolean logic macros do not apply anymore <code>\xintNum</code> (or <code>\xintRaw</code> if <strong>xintfrac</strong> is loaded), to their arguments (often, from internal usage of <code>\xintSgn</code>), but only f-expand them (using e.g. <code>\xintiiSgn</code>). This is kept un-modified even if loading <strong>xintfrac</strong>.</li>
+<li><strong>xint</strong>: <code>\xintAND</code>, <code>\xintOR</code>, … and similar Boolean logic macros do not apply anymore <code>\xintNum</code> (or <code>\xintRaw</code> if <strong>xintfrac</strong> is loaded), to their arguments (often, from internal usage of <code>\xintSgn</code>), but only f-expand them (using e.g. <code>\xintiiSgn</code>). This is kept un-modified even if loading <strong>xintfrac</strong>.</li>
</ul>
<h3 id="deprecated">Deprecated</h3>
<p>Deprecated macros raise an error but, generally, then expand as in former releases. They will all get removed at some future release.</p>
@@ -257,26 +289,26 @@ License: LPPL 1.3c</code></pre>
<li><p><strong>xint</strong>: <code>\xintNot</code> was renamed to <code>\xintNOT</code>, former denomination is deprecated. See also item about Boolean logic macros in the <em>Incompatible Changes</em> section.</p></li>
</ul>
<h2 id="n-20170806"><code>1.2n (2017/08/06)</code></h2>
-<h3 id="incompatible-changes-3">Incompatible changes</h3>
+<h3 id="incompatible-changes-4">Incompatible changes</h3>
<ul>
<li><strong>xintbinhex</strong> does not load package <strong>xintcore</strong> anymore, but only <strong>xintkernel</strong>.</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><strong>xintbinhex</strong> has only <strong>xintkernel</strong> as dependency.</p></li>
<li><p>Macros of <strong>xintbinhex</strong> have been improved for speed and increased maximal sizes of allowable inputs.</p></li>
</ul>
<h2 id="m-20170731"><code>1.2m (2017/07/31)</code></h2>
-<h3 id="incompatible-changes-4">Incompatible changes</h3>
+<h3 id="incompatible-changes-5">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-7">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-8">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-4">Bug fixes</h3>
+<h3 id="bug-fixes-5">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>
@@ -288,56 +320,56 @@ License: LPPL 1.3c</code></pre>
<li><p><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>.</p></li>
<li><p>internal macro <code>\xint_gob_til_xint_relax</code> removed.</p></li>
</ul>
-<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 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>
<li><p>code comments in <strong>xintcore</strong> are better formatted, but remain sparse.</p></li>
-<li><p><strong>xintcore</strong>, <strong>xint</strong>, <strong>xintfrac</strong>, ... : some macros were not robust against arguments whose expansion looks forward for some termination (e.g. <code>\number\mathcode`\-</code>), and particularly, most were fragile against inputs using non-terminated <code>\numexpr</code> (such as <code>\xintiiAdd{\the\numexpr1}{2}</code> or <code>\xintRaw{\numexpr1}</code>). This was not a bug per se, as the user manual did not claim such inputs were legal, but it was slightly inconvenient. Most macros (particularly those of <strong>xintfrac</strong>) have now been made robust against such inputs. Some macros from <strong>xintcore</strong> primarily destined to internal usage still accept only properly terminated arguments such as <code>\the\mathcode`\-&lt;space&gt;</code> or <code>\the\numexpr1\relax</code>.</p>
-<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><strong>xintcore</strong>, <strong>xint</strong>, <strong>xintfrac</strong>, … : some macros were not robust against arguments whose expansion looks forward for some termination (e.g. <code>\number\mathcode`\-</code>), and particularly, most were fragile against inputs using non-terminated <code>\numexpr</code> (such as <code>\xintiiAdd{\the\numexpr1}{2}</code> or <code>\xintRaw{\numexpr1}</code>). This was not a bug per se, as the user manual did not claim such inputs were legal, but it was slightly inconvenient. Most macros (particularly those of <strong>xintfrac</strong>) have now been made robust against such inputs. Some macros from <strong>xintcore</strong> primarily destined to internal usage still accept only properly terminated arguments such as <code>\the\mathcode`\-&lt;space&gt;</code> or <code>\the\numexpr1\relax</code>.</p>
+<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 “illegal token” 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-5">Bug fixes</h3>
+<h3 id="bug-fixes-6">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>
+<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-5">Incompatible changes</h3>
+<h3 id="incompatible-changes-6">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-9">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-10">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-6">Bug fixes</h3>
+<h3 id="bug-fixes-7">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-10">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-11">Improvements and new features</h3>
<ul>
<li><p><strong>xinttools</strong> and <strong>xintexpr</strong>:</p>
-<ol style="list-style-type: decimal">
+<ol type="1">
<li><p>slightly improves the speed of <code>\xintTrim</code>.</p></li>
<li><p>speed gains for the handlers of comma separated lists implementing Python-like slicing and item extraction. Relevant non (user) documented macros better documented in <code>sourcexint.pdf</code>.</p></li>
</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>
+<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-7">Bug fixes</h3>
+<h3 id="bug-fixes-8">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-6">Incompatible changes</h3>
+<h3 id="incompatible-changes-7">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>
@@ -345,7 +377,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-11">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-12">Improvements and new features</h3>
<ul>
<li><p><strong>xintkernel</strong>: <code>\xintLength</code> is faster. New macros:</p>
<ul>
@@ -362,19 +394,19 @@ License: LPPL 1.3c</code></pre>
<li><p><strong>xintfrac</strong>: as a result of the above <code>\xintTrunc</code>, <code>\xintRound</code> and <code>\xintXTrunc</code> got faster. But the main improvement for them is with decimal inputs which formerly had not been treated separately from the general fraction case. Also, <code>\xintXTrunc</code> does not anymore create a dependency of <strong>xintfrac</strong> on <strong>xinttools</strong>.</p></li>
</ul></li>
<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>
+<li><p>the documentation has dropped the LaTeX “command” 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 “macro”, as after all, all of <strong>xint</strong> is about expansion of macros (plus the use of <code>\numexpr</code>).</p></li>
</ul>
-<h3 id="bug-fixes-8">Bug fixes</h3>
+<h3 id="bug-fixes-9">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-12">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-13">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>
+<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-9">Bug fixes</h3>
+<h3 id="bug-fixes-10">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>
@@ -382,25 +414,25 @@ 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-7">Incompatible changes</h3>
+<h3 id="incompatible-changes-8">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>
+<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 “list” variable.</p></li>
</ul>
-<h3 id="improvements-and-new-features-13">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-14">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>
+<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>
<li><p>a slight speed improvement to <code>\xintFloatSqrt</code> in its quest of correct rounding.</p></li>
<li><p>float multiplication and division handle more swiftly operands (non-fractional) with few digits, when the float precision is large.</p></li>
<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-8">Incompatible changes</h3>
+<h3 id="incompatible-changes-9">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-14">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-15">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>
@@ -411,72 +443,72 @@ License: LPPL 1.3c</code></pre>
<li><p>the float macros for addition, subtraction, multiplication, division now first round their two operands to P, not P+2, significant places before doing the actual computation (P being the target precision). The same applies to the power macros and to the square root macro.</p></li>
<li><p>the documentation offers a more precise (and accurate) discussion of floating point issues.</p></li>
<li><p>various under-the-hood code improvements; the floatexpr operations are chained in a faster way, from skipping some unneeded parsing on results of earlier computations. The absence of a real inner data structure for floats (incorporating their precisions, for one) is however still a bit hair raising: currently the lengths of the mantissas of the operands are computed again by each float macro or expression operation.</p></li>
-<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>(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-10">Bug fixes</h3>
+<h3 id="bug-fixes-11">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><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-15">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-16">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-11">Bug fixes</h3>
+<h3 id="bug-fixes-12">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-16">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-17">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>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-12">Bug fixes</h3>
+<h3 id="bug-fixes-13">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-17">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-18">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-13">Bug fixes</h3>
+<h3 id="bug-fixes-14">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-14">Bug fixes</h3>
+<h3 id="bug-fixes-15">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-18">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-19">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-15">Bug fixes</h3>
+<h3 id="bug-fixes-16">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>
+<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>
<h2 id="section-1"><code>1.2 (2015/10/10)</code></h2>
<h3 id="removed-3">Removed</h3>
<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>
+<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-19">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-20">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>
@@ -485,7 +517,7 @@ License: LPPL 1.3c</code></pre>
<li><p><code>\xintFloatFac</code> macro for computing the factorials of integers as floating point numbers to a given precision. The <code>!</code> postfix operator inside <code>\xintfloatexpr</code> maps to this new macro rather than to the exact factorial as used by <code>\xintexpr</code> and <code>\xintiiexpr</code>.</p></li>
<li><p>there is more flexibility in the parsing done by the macros from <strong>xintfrac</strong> on fractional input: the decimal parts of both the numerator and the denominator may arise from a separate expansion via <code>\romannumeral-`0</code>. Also the strict <code>A/B[N]</code> format is a bit relaxed: <code>N</code> may be anything understood by <code>\numexpr</code> (it could even be empty but that possibility has been removed by later <code>1.2f</code> release.)</p></li>
<li><p>on the other hand an isolated dot <code>.</code> is not legal syntax anymore inside the expression parsers: there must be digits either before or after. It remains legal input for the macros of <strong>xintfrac</strong>.</p></li>
-<li><p>added <code>\ht</code>, <code>\dp</code>, <code>\wd</code>, <code>\fontcharht</code>, etc... to the tokens recognized by the parsers and expanded by <code>\number</code>.</p></li>
+<li><p>added <code>\ht</code>, <code>\dp</code>, <code>\wd</code>, <code>\fontcharht</code>, etc… to the tokens recognized by the parsers and expanded by <code>\number</code>.</p></li>
<li><p>an obscure bug in package <strong>xintkernel</strong> has been fixed, regarding the sanitization of catcodes: under certain circumstances (which could not occur in a normal <code>LaTeX</code> context), unusual catcodes could end up being propagated to the external world.</p></li>
<li><p>an effort at randomly shuffling around various pieces of the documentation has been done.</p></li>
</ul>
@@ -510,14 +542,14 @@ 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-2"><code>1.1 (2014/10/28)</code></h2>
-<h3 id="incompatible-changes-9">Incompatible changes</h3>
+<h3 id="incompatible-changes-10">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>
<li><p><code>1e(3+5)</code> is now illegal. The number parser identifies <code>e</code> and <code>E</code> in the same way it does for the decimal mark, earlier versions treated <code>e</code> as <code>E</code> rather as infix operators of highest precedence,</p></li>
<li><p>the <code>add</code> and <code>mul</code> have a new syntax, old syntax is with <code>`+`</code> and <code>`*`</code> (left quotes mandatory), <code>sum</code> and <code>prd</code> are gone,</p></li>
<li><p>no more special treatment for encountered brace pairs <code>{..}</code> by the number scanner, <code>a/b[N]</code> notation can be used without use of braces (the <code>N</code> will end up as is in a <code>\numexpr</code>, it is not parsed by the <code>\xintexpr</code>-ession scanner),</p></li>
-<li><p>in earlier releases, place holders for <code>\xintNewExpr</code> could either be denoted <code>#1</code>, <code>#2</code>, ... or also <code>$1</code>, <code>$2</code>, ... Only the usual <code>#</code> form is now accepted and the special cases previously treated via the second form are now managed via a <code>protect(...)</code> function.</p></li>
+<li><p>in earlier releases, place holders for <code>\xintNewExpr</code> could either be denoted <code>#1</code>, <code>#2</code>, … or also <code>$1</code>, <code>$2</code>, … Only the usual <code>#</code> form is now accepted and the special cases previously treated via the second form are now managed via a <code>protect(...)</code> function.</p></li>
<li><p><strong>xintfrac</strong>: <code>\xintFloor</code> and <code>\xintCeil</code> add a trailing <code>/1[0]</code> to their (integer) output. New <code>\xintiFloor</code> and <code>\xintiCeil</code> do not.</p></li>
</ul>
<h3 id="removed-4">Removed</h3>
@@ -530,14 +562,14 @@ 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-20">Improvements and new features</h3>
+<h3 id="improvements-and-new-features-21">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>
<li><p>whenever some portion of code has been revised, often use has been made of the <code>\xint_dothis</code> and <code>\xint_orthat</code> pair of macros for expandably branching,</p></li>
-<li><p>these tiny helpful macros, and a few others are in package <strong>xintkernel</strong> which contains also the catcode and loading order management code, initially inspired by code found in Heiko Oberdiek's packages,</p></li>
+<li><p>these tiny helpful macros, and a few others are in package <strong>xintkernel</strong> which contains also the catcode and loading order management code, initially inspired by code found in Heiko Oberdiek’s packages,</p></li>
<li><p>the source code, which was suppressed from <code>xint.pdf</code> in release <code>1.09n</code>, is now compiled into a separate file <code>sourcexint.pdf</code>,</p></li>
-<li><p>faster handling by <code>\xintAdd</code>, <code>\xintSub</code>, <code>\xintMul</code>, ... of the case where one of the arguments is zero,</p></li>
+<li><p>faster handling by <code>\xintAdd</code>, <code>\xintSub</code>, <code>\xintMul</code>, … of the case where one of the arguments is zero,</p></li>
<li><p>the <code>\xintAdd</code> and <code>\xintSub</code> macros from package <strong>xintfrac</strong> check if one of the denominators is a multiple of the other, and only if this is not the case do they multiply the denominators. But systematic reduction would be too costly,</p></li>
<li><p>this naturally will be also the case for the <code>+</code> and <code>-</code> operations in <code>\xintexpr</code>,</p></li>
<li><p><strong>xint</strong> added <code>\xintiiDivRound</code>, <code>\xintiiDivTrunc</code>, <code>\xintiiMod</code> for rounded and truncated division of big integers (next to <code>\xintiiQuo</code> and <code>\xintiiRem</code>),</p></li>
@@ -564,14 +596,14 @@ License: LPPL 1.3c</code></pre>
<li><p>iteration with <code>iter</code> which is like <code>rrseq</code> but outputs only the last <code>K</code> terms, where <code>K</code> was the number of initial terms,</p></li>
<li><p>inside <code>seq</code>, <code>rseq</code>, <code>rrseq</code>, <code>iter</code>, possibility to use <code>omit</code>, <code>abort</code> and <code>break</code> to control termination,</p></li>
<li><p><code>n++</code> potentially infinite index generation for <code>seq</code>, <code>rseq</code>, <code>rrseq</code>, and <code>iter</code>, it is advised to use <code>abort</code> or <code>break(..)</code> at some point,</p></li>
-<li><p>the <code>add</code>, <code>mul</code>, <code>seq</code>, ... are nestable,</p></li>
+<li><p>the <code>add</code>, <code>mul</code>, <code>seq</code>, … are nestable,</p></li>
<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-16">Bug fixes</h3>
+<h3 id="bug-fixes-17">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>
+<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>
<li><p><code>\xinttheexpr \xintiexpr 1.23\relax\relax</code> should have produced <code>1</code>, but it produced <code>1.23</code></p></li>
<li><p>the catcode of <code>;</code> was not set at package launching time.</p></li>
<li><p>the <code>\XINTinFloatPrd:csv</code> macro name had a typo, hence <code>prd</code> was non-functional in <code>\xintfloatexpr</code>.</p></li>
@@ -597,7 +629,7 @@ License: LPPL 1.3c</code></pre>
<li><p>inside <code>\xintexpr..\relax</code> (and its variants) tacit multiplication is implied when a number or operand is followed directly with an opening parenthesis,</p></li>
<li><p>the <code>&quot;</code> for denoting (arbitrarily big) hexadecimal numbers is recognized by <code>\xintexpr</code> and its variants (package <strong>xintbinhex</strong> is required); a fractional hexadecimal part introduced by a dot <code>.</code> is allowed.</p></li>
<li><p>re-organization of the first sections of the user manual.</p></li>
-<li><p>bug fix (<strong>xinttools</strong>, <strong>xint</strong>, ...): forgotten catcode check of <code>&quot;</code> at loading time has been added.</p></li>
+<li><p>bug fix (<strong>xinttools</strong>, <strong>xint</strong>, …): forgotten catcode check of <code>&quot;</code> at loading time has been added.</p></li>
</ul>
<h2 id="j-20140109"><code>1.09j (2014/01/09)</code></h2>
<ul>
@@ -616,11 +648,11 @@ License: LPPL 1.3c</code></pre>
<li><p><em>deprecated</em>: <code>\xintnumexpr</code>, <code>\xintthenumexpr</code>, <code>\xintNewNumExpr</code> are renamed, respectively, <code>\xintiexpr</code>, <code>\xinttheiexpr</code>, <code>\xintNewIExpr</code>. The earlier denominations are kept but are to be removed at some point.</p></li>
<li><p>it is now possible within <code>\xintexpr...\relax</code> and its variants to use count, dimen, and skip registers or variables without explicit <code>\the/\number</code>: the parser inserts automatically <code>\number</code> and a tacit multiplication is implied when a register or variable immediately follows a number or fraction. Regarding dimensions and <code>\number</code>, see the further discussion in <em>Dimensions</em>.</p></li>
<li><p>(<strong>xintfrac</strong>) conditional <code>\xintifOne</code>; <code>\xintifTrueFalse</code> renamed to <code>\xintifTrueAelseB</code>; macros <code>\xintTFrac</code> (<code>fractional part</code>, mapped to function <code>frac</code> in <code>\xintexpr</code>-essions), <code>\xintFloatE</code>.</p></li>
-<li><p>(<strong>xinttools</strong>) <code>\xintAssign</code> admits an optional argument to specify the expansion type to be used: <code>[]</code> (none, default), <code>[o]</code> (once), <code>[oo]</code> (twice), <code>[f]</code> (full), <code>[e]</code> (<code>\edef</code>),... to define the macros</p></li>
-<li><p><strong>xinttools</strong> defines <code>\odef</code>, <code>\oodef</code>, <code>\fdef</code> (if the names have already been assigned, it uses <code>\xintoodef</code> etc...). These tools are provided for the case one uses the package macros in a non-expandable context. <code>\oodef</code> expands twice the macro replacement text, and <code>\fdef</code> applies full expansion. They are useful in situations where one does not want a full <code>\edef</code>. <code>\fdef</code> appears to be faster than <code>\oodef</code> in almost all cases (with less than thousand digits in the result), and even faster than <code>\edef</code> for expanding the package macros when the result has a few dozens of digits. <code>\oodef</code> needs that expansion ends up in thousands of digits to become competitive with the other two.</p></li>
+<li><p>(<strong>xinttools</strong>) <code>\xintAssign</code> admits an optional argument to specify the expansion type to be used: <code>[]</code> (none, default), <code>[o]</code> (once), <code>[oo]</code> (twice), <code>[f]</code> (full), <code>[e]</code> (<code>\edef</code>),… to define the macros</p></li>
+<li><p><strong>xinttools</strong> defines <code>\odef</code>, <code>\oodef</code>, <code>\fdef</code> (if the names have already been assigned, it uses <code>\xintoodef</code> etc…). These tools are provided for the case one uses the package macros in a non-expandable context. <code>\oodef</code> expands twice the macro replacement text, and <code>\fdef</code> applies full expansion. They are useful in situations where one does not want a full <code>\edef</code>. <code>\fdef</code> appears to be faster than <code>\oodef</code> in almost all cases (with less than thousand digits in the result), and even faster than <code>\edef</code> for expanding the package macros when the result has a few dozens of digits. <code>\oodef</code> needs that expansion ends up in thousands of digits to become competitive with the other two.</p></li>
<li><p>some across the board slight efficiency improvement as a result of modifications of various types to <em>fork macros</em> and <em>branching conditionals</em> which are used internally.</p></li>
<li><p>bug fix (<strong>xint</strong>): <code>\xintAND</code> and <code>\xintOR</code> inserted a space token in some cases and did not expand as promised in two steps <code>:-((</code> (bug dating back to <code>1.09a</code> I think; this bug was without consequences when using <code>&amp;</code> and <code>|</code> in <code>\xintexpr-essions</code>, it affected only the macro form).</p></li>
-<li><p>bug fix (<strong>xintcfrac</strong>): <code>\xintFtoCCv</code> still ended fractions with the <code>[0]</code>'s which were supposed to have been removed since release <code>1.09b</code>.</p></li>
+<li><p>bug fix (<strong>xintcfrac</strong>): <code>\xintFtoCCv</code> still ended fractions with the <code>[0]</code>’s which were supposed to have been removed since release <code>1.09b</code>.</p></li>
<li><p><em>deprecated</em>: <code>\xintifTrueFalse</code>, <code>\xintifTrue</code>; use <code>\xintifTrueAelseB</code>.</p></li>
</ul>
<h2 id="h-20131128"><code>1.09h (2013/11/28)</code></h2>
@@ -652,7 +684,7 @@ License: LPPL 1.3c</code></pre>
<ul>
<li><p>(<strong>xint</strong>) <code>\xintintegers</code>, <code>\xintdimensions</code>, <code>\xintrationals</code> for infinite <code>\xintFor</code> loops, interrupted with <code>\xintBreakFor</code> and <code>\xintBreakForAndDo</code>.</p></li>
<li><p><code>\xintifForFirst</code>, <code>\xintifForLast</code> for the <code>\xintFor</code> and <code>\xintFor*</code> loops,</p></li>
-<li><p>the <code>\xintFor</code> and <code>xintFor*</code> loops are now <code>\long</code>, the replacement text and the items may contain explicit <code>\par</code>'s.</p></li>
+<li><p>the <code>\xintFor</code> and <code>xintFor*</code> loops are now <code>\long</code>, the replacement text and the items may contain explicit <code>\par</code>’s.</p></li>
<li><p>conditionals <code>\xintifCmp</code>, <code>\xintifInt</code>, <code>\xintifOdd</code>.</p></li>
<li><p>bug fix (<strong>xint</strong>): the <code>\xintFor</code> loop (not <code>\xintFor*</code>) did not correctly detect an empty list.</p></li>
<li><p>bug fix (<strong>xint</strong>): <code>\xintiSqrt {0}</code> crashed. <code>:-((</code></p></li>
@@ -679,9 +711,9 @@ License: LPPL 1.3c</code></pre>
<ul>
<li><p>various improvements in the documentation,</p></li>
<li><p>more economical catcode management and re-loading handling,</p></li>
-<li><p>removal of all those <code>[0]</code>'s previously forcefully added at the end of fractions by various macros of <strong>xintcfrac</strong>,</p></li>
+<li><p>removal of all those <code>[0]</code>’s previously forcefully added at the end of fractions by various macros of <strong>xintcfrac</strong>,</p></li>
<li><p><code>\xintNthElt</code> with a negative index returns from the tail of the list,</p></li>
-<li><p>macro <code>\xintPRaw</code> to have something like what <code>\xintFrac</code> does in math mode; i.e. a <code>\xintRaw</code> which does not print the denominator if it is one.</p></li>
+<li><p>macro <code>\xintPRaw</code> to have something like what <code>\xintFrac</code> does in math mode; i.e. a <code>\xintRaw</code> which does not print the denominator if it is one.</p></li>
</ul>
<h2 id="a-20130924"><code>1.09a (2013/09/24)</code></h2>
<ul>
@@ -695,7 +727,7 @@ License: LPPL 1.3c</code></pre>
<li><p><code>\xintnumexpr .. \relax</code> (now renamed <code>\xintiexpr</code>) is <code>\xintexpr round( .. ) \relax</code>.</p></li>
<li><p><code>\xintNewExpr</code> now works with the standard macro parameter character <code>#</code>.</p></li>
<li><p>both regular <code>\xintexpr</code>-essions and commands defined by <code>\xintNewExpr</code> will work with comma separated lists of expressions,</p></li>
-<li><p>commands <code>\xintFloor</code>, <code>\xintCeil</code>, <code>\xintMaxof</code>, <code>\xintMinof</code> (package <strong>xintfrac</strong>), <code>\xintGCDof</code>, <code>\xintLCM</code>, <code>\xintLCMof</code> (package <strong>xintgcd</strong>), <code>\xintifLt</code>, <code>\xintifGt</code>, <code>\xintifSgn</code>, <code>\xintANDof</code>, ...</p></li>
+<li><p>commands <code>\xintFloor</code>, <code>\xintCeil</code>, <code>\xintMaxof</code>, <code>\xintMinof</code> (package <strong>xintfrac</strong>), <code>\xintGCDof</code>, <code>\xintLCM</code>, <code>\xintLCMof</code> (package <strong>xintgcd</strong>), <code>\xintifLt</code>, <code>\xintifGt</code>, <code>\xintifSgn</code>, <code>\xintANDof</code>, …</p></li>
<li><p>The arithmetic macros from package <strong>xint</strong> now filter their operands via <code>\xintNum</code> which means that they may use directly count registers and <code>\numexpr</code>-essions without having to prefix them by <code>\the</code>. This is thus similar to the situation holding previously already when <strong>xintfrac</strong> was loaded.</p></li>
<li><p>a bug (<strong>xintfrac</strong>) introduced in <code>1.08b</code> made <code>\xintCmp</code> crash when one of its arguments was zero. <code>:-((</code></p></li>
</ul>
@@ -724,7 +756,7 @@ License: LPPL 1.3c</code></pre>
<pre><code>\xintfloatexpr . . . \relax</code></pre>
<p>allowing on input formulas using the infix operators <code>+</code>, <code>-</code>, <code>*</code>, <code>/</code>, and <code>^</code>, and arbitrary levels of parenthesizing. Within a float expression the operations are executed according to the current value set by <code>\xintDigits</code>. Within an <code>\xintexpr</code>-ession the binary operators are computed exactly.</p>
<p>To write the <code>\xintexpr</code> parser I benefited from the commented source of the <code>l3fp</code> parser; the <code>\xintexpr</code> parser has its own features and peculiarities. <em>See its documentation</em>.</p></li>
-<li><p>The floating point precision <code>D</code> is set (this is a local assignment to a <code>\mathchar</code> variable) with <code>\xintDigits := D;</code> and queried with <code>\xinttheDigits</code>. It may be set to anything up to <code>32767</code>.<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> The macro incarnations of the binary operations admit an optional argument which will replace pointwise <code>D</code>; this argument may exceed the <code>32767</code> bound.</p></li>
+<li><p>The floating point precision <code>D</code> is set (this is a local assignment to a <code>\mathchar</code> variable) with <code>\xintDigits := D;</code> and queried with <code>\xinttheDigits</code>. It may be set to anything up to <code>32767</code>.<a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a> The macro incarnations of the binary operations admit an optional argument which will replace pointwise <code>D</code>; this argument may exceed the <code>32767</code> bound.</p></li>
<li><p>The <strong>xintfrac</strong> macros now accept numbers written in scientific notation, the <code>\xintFloat</code> command serves to output its argument with a given number <code>D</code> of significant figures. The value of <code>D</code> is either given as optional argument to <code>\xintFloat</code> or set with <code>\xintDigits := D;</code>. The default value is <code>16</code>.</p></li>
</ul>
<h2 id="b-20130514"><code>1.06b (2013/05/14)</code></h2>
@@ -736,7 +768,7 @@ License: LPPL 1.3c</code></pre>
<li><p>Some code improvements, particularly for macros of <strong>xint</strong> doing loops.</p></li>
<li><p>New utilities in <strong>xint</strong> for expandable manipulations of lists:</p>
<pre><code>\xintNthElt, \xintCSVtoList, \xintRevWithBraces</code></pre></li>
-<li><p>The macros did only a double expansion of their arguments. They now fully expand them (using <code>\romannumeral-`0</code>). Furthermore, in the case of arguments constrained to obey the TeX bounds they will be inserted inside a <code>\numexpr..\relax</code>, hence completely expanded, one may use count registers, even infix arithmetic operations, etc...</p></li>
+<li><p>The macros did only a double expansion of their arguments. They now fully expand them (using <code>\romannumeral-`0</code>). Furthermore, in the case of arguments constrained to obey the TeX bounds they will be inserted inside a <code>\numexpr..\relax</code>, hence completely expanded, one may use count registers, even infix arithmetic operations, etc…</p></li>
</ul>
<h2 id="section-6"><code>1.05 (2013/05/01)</code></h2>
<p>Minor changes and additions to <strong>xintfrac</strong> and <strong>xintcfrac</strong>.</p>
@@ -767,11 +799,11 @@ License: LPPL 1.3c</code></pre>
<blockquote>
<p>The packages may be used with Plain and with LaTeX.</p>
</blockquote>
-<div class="footnotes">
+<section class="footnotes">
<hr />
<ol>
-<li id="fn1"><p>but values higher than 100 or 200 will presumably give too slow evaluations.<a href="#fnref1">↩</a></p></li>
+<li id="fn1"><p>but values higher than 100 or 200 will presumably give too slow evaluations.<a href="#fnref1" class="footnote-back">↩</a></p></li>
</ol>
-</div>
+</section>
</body>
</html>
diff --git a/Master/texmf-dist/doc/generic/xint/CHANGES.pdf b/Master/texmf-dist/doc/generic/xint/CHANGES.pdf
index fbf292fe8a3..1bc50a5f9a1 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 a2d3a7ddc78..4ee35b71c98 100644
--- a/Master/texmf-dist/doc/generic/xint/README
+++ b/Master/texmf-dist/doc/generic/xint/README
@@ -1,7 +1,7 @@
- Source: xint.dtx 1.3c 2018/06/17 (doc 2018/06/17)
+ Source: xint.dtx 1.3d 2019/01/06 (doc 2019/01/06)
Author: Jean-Francois Burnol
Info: Expandable operations on big integers, decimals, fractions
- License: LPPL 1.3c
+ License: LPPL 1.3d
This README is also available as README.pdf and README.html.
@@ -65,7 +65,7 @@ But the gcd()/lcm() functions require extra loading of xintgcd and
hexadecimal input requires xintbinhex.
Package xintcore is the subset of xint providing only the five
-operations on big integers: \xintiiAdd, \xintiiMul, ...
+operations on big integers: \xintiiAdd, \xintiiMul, …
The LaTeX package bnumexpr defines a more light-weight parser of
arithmetical expressions using big integers, which supports only the
@@ -114,22 +114,22 @@ Assumes a GNU/Linux-like system (or Mac OS X).
2. cd to the download repertory and issue:
- unzip xint.tds.zip -d <TEXMF>
+ unzip xint.tds.zip -d <TEXMF>
where <TEXMF> is a suitable TDS-compliant destination repertory. For
example, with TeXLive:
- Linux, standard access rights, hence sudo is needed,
- installation into the "local" tree:
+ installation into the “local” tree:
- sudo unzip xint.tds.zip -d /usr/local/texlive/texmf-local
- sudo texhash /usr/local/texlive/texmf-local
+ sudo unzip xint.tds.zip -d /usr/local/texlive/texmf-local
+ sudo texhash /usr/local/texlive/texmf-local
- Mac OS X, installation into user home folder (no sudo needed,
and it is recommended to not have a ls-R file there, hence no
texhash):
- unzip xint.tds.zip -d ~/Library/texmf
+ unzip xint.tds.zip -d ~/Library/texmf
Method C: manual installation using Makefile and xint.dtx
@@ -166,7 +166,7 @@ Finishing the installation in a TDS hierarchy:
- xint.dtx goes to TDS:source/generic/xint/
-- The documentation (xint.pdf, README.md,...) goes to
+- The documentation (xint.pdf, README.md,…) goes to
TDS:doc/generic/xint/
Depending on the destination, it may then be necessary to refresh a
@@ -177,7 +177,7 @@ filename database.
LICENSE
-Copyright (C) 2013-2018 by Jean-Francois Burnol
+Copyright (C) 2013-2019 by Jean-Francois Burnol
This Work may be distributed and/or modified under the conditions of the
LaTeX Project Public License version 1.3c. This version of this license
diff --git a/Master/texmf-dist/doc/generic/xint/README.html b/Master/texmf-dist/doc/generic/xint/README.html
index 2688029c251..92968a9a8b3 100644
--- a/Master/texmf-dist/doc/generic/xint/README.html
+++ b/Master/texmf-dist/doc/generic/xint/README.html
@@ -1,26 +1,34 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="Content-Style-Type" content="text/css" />
+ <meta charset="utf-8" />
<meta name="generator" content="pandoc" />
- <meta name="author" content="xint 1.3c" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
+ <meta name="author" content="xint 1.3d" />
<title>README</title>
- <style type="text/css">code{white-space: pre;}</style>
+ <style type="text/css">
+ code{white-space: pre-wrap;}
+ span.smallcaps{font-variant: small-caps;}
+ span.underline{text-decoration: underline;}
+ div.column{display: inline-block; vertical-align: top; width: 50%;}
+ </style>
<style type="text/css">
body{margin-left : 10%; margin-right : 15%; margin-top: 4ex; font-size: 12pt;}
pre {white-space: pre-wrap; }
code {white-space: pre-wrap; }
.mono {font-family: monospace;}
</style>
+ <!--[if lt IE 9]>
+ <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
+ <![endif]-->
</head>
<body>
-<div id="header">
+<header>
<h1 class="title">README</h1>
-<h2 class="author">xint 1.3c</h2>
-<h3 class="date">2018/06/17</h3>
-</div>
-<div id="TOC">
+<p class="author">xint 1.3d</p>
+<p class="date">2019/01/06</p>
+</header>
+<nav id="TOC">
<ul>
<li><a href="#aim">Aim</a></li>
<li><a href="#usage">Usage</a><ul>
@@ -35,11 +43,11 @@
</ul></li>
<li><a href="#license">License</a></li>
</ul>
-</div>
-<pre><code>Source: xint.dtx 1.3c 2018/06/17 (doc 2018/06/17)
+</nav>
+<pre><code>Source: xint.dtx 1.3d 2019/01/06 (doc 2019/01/06)
Author: Jean-Francois Burnol
Info: Expandable operations on big integers, decimals, fractions
-License: LPPL 1.3c</code></pre>
+License: LPPL 1.3d</code></pre>
<p>This <code>README</code> is also available as <code>README.pdf</code> and <code>README.html</code>.</p>
<p>Change log is to be found in <code>CHANGES.pdf</code> or <code>CHANGES.html</code>.</p>
<p>The user manual is <code>xint.pdf</code>, and the commented source code is available as <code>sourcexint.pdf</code>.</p>
@@ -63,7 +71,7 @@ License: LPPL 1.3c</code></pre>
\usepackage{xintexpr} % expressions with infix operators</code></pre>
<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>xinttools</code> and <code>xintfrac</code> (which itself loads <code>xint</code>). But the <code>gcd()/lcm()</code> functions require extra loading of <code>xintgcd</code> and hexadecimal input requires <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>, ...</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>, …</p>
<p>The LaTeX package <a href="http://www.ctan.org/pkg/bnumexpr">bnumexpr</a> defines a more light-weight parser of arithmetical expressions using big integers, which supports only the four operations, the modulo operation, the power operation, and the factorial. By default it uses the macros from <code>xintcore</code> but this can be customized.</p>
<h2 id="with-tex">With TeX</h2>
<p>One does for example:</p>
@@ -77,22 +85,22 @@ License: LPPL 1.3c</code></pre>
<p>There can be a few days of delay between apparition of a new version on <a href="http://www.ctan.org/pkg/xint">CTAN</a> and availability via the distribution package manager.</p>
<h2 id="method-b-manual-installation-using-xint.tds.zip-and-unzip">Method B: manual installation using <code>xint.tds.zip</code> and <code>unzip</code></h2>
<p>Assumes a GNU/Linux-like system (or Mac OS X).</p>
-<ol style="list-style-type: decimal">
+<ol type="1">
<li><p>obtain <code>xint.tds.zip</code> from CTAN: <a href="http://mirror.ctan.org/install/macros/generic/xint.tds.zip" class="uri">http://mirror.ctan.org/install/macros/generic/xint.tds.zip</a></p></li>
<li><p>cd to the download repertory and issue:</p>
-<pre><code>unzip xint.tds.zip -d &lt;TEXMF&gt;</code></pre>
+<pre><code> unzip xint.tds.zip -d &lt;TEXMF&gt;</code></pre>
<p>where <code>&lt;TEXMF&gt;</code> is a suitable TDS-compliant destination repertory. For example, with TeXLive:</p>
<ul>
-<li><p>Linux, standard access rights, hence sudo is needed, installation into the &quot;local&quot; tree:</p>
-<pre><code>sudo unzip xint.tds.zip -d /usr/local/texlive/texmf-local
-sudo texhash /usr/local/texlive/texmf-local</code></pre></li>
+<li><p>Linux, standard access rights, hence sudo is needed, installation into the “local” tree:</p>
+<pre><code> sudo unzip xint.tds.zip -d /usr/local/texlive/texmf-local
+ sudo texhash /usr/local/texlive/texmf-local</code></pre></li>
<li><p>Mac OS X, installation into user home folder (no sudo needed, and it is recommended to not have a ls-R file there, hence no texhash):</p>
-<pre><code>unzip xint.tds.zip -d ~/Library/texmf</code></pre></li>
+<pre><code> unzip xint.tds.zip -d ~/Library/texmf</code></pre></li>
</ul></li>
</ol>
<h2 id="method-c-manual-installation-using-makefile-and-xint.dtx">Method C: manual installation using <code>Makefile</code> and <code>xint.dtx</code></h2>
<p>The Makefile automatizes rebuilding from <code>xint.dtx</code> all documentation files as well as <code>xint.tds.zip</code>. It is for GNU/Linux-like (inc. Mac OS X) systems, with a teTeX like installation such as TeXLive. The <a href="http://personal.psu.edu/jcc8/software/latexmk/">Latexmk</a> and <a href="http://johnmacfarlane.net/pandoc/">Pandoc</a> softwares are required to build all the documentation.</p>
-<ol style="list-style-type: decimal">
+<ol type="1">
<li><p>obtain <code>xint.dtx</code> and <code>Makefile</code> from <a href="http://mirror.ctan.org/macros/generic/xint" class="uri">http://mirror.ctan.org/macros/generic/xint</a>.</p></li>
<li><p>put them in an otherwise empty working repertory, run <code>make</code> or equivalently <code>make help</code> for further instructions.</p></li>
</ol>
@@ -102,12 +110,12 @@ sudo texhash /usr/local/texlive/texmf-local</code></pre></li>
<ul>
<li><p>move the style files to <code>TDS:tex/generic/xint/</code></p></li>
<li><p><code>xint.dtx</code> goes to <code>TDS:source/generic/xint/</code></p></li>
-<li><p>The documentation (xint.pdf, README.md,...) goes to <code>TDS:doc/generic/xint/</code></p></li>
+<li><p>The documentation (xint.pdf, README.md,…) goes to <code>TDS:doc/generic/xint/</code></p></li>
</ul>
<p>Depending on the destination, it may then be necessary to refresh a filename database.</p>
<h1 id="license">License</h1>
<div class="mono">
-<p>Copyright (C) 2013-2018 by Jean-Francois Burnol</p>
+<p>Copyright (C) 2013-2019 by Jean-Francois Burnol</p>
<p>This Work may be distributed and/or modified under the conditions of the LaTeX Project Public License version 1.3c. This version of this license is in</p>
<blockquote>
<p><a href="http://www.latex-project.org/lppl/lppl-1-3c.txt" class="uri">http://www.latex-project.org/lppl/lppl-1-3c.txt</a></p>
diff --git a/Master/texmf-dist/doc/generic/xint/README.pdf b/Master/texmf-dist/doc/generic/xint/README.pdf
index 68a5116382f..d453f2144e9 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 e6f37a4675d..5c18907d36a 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 26afb21b00d..17524693b45 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 95c026ff778..7640d897593 100644
--- a/Master/texmf-dist/source/generic/xint/xint.dtx
+++ b/Master/texmf-dist/source/generic/xint/xint.dtx
@@ -3,28 +3,28 @@
% Extract all files via "etex xint.dtx" and do "make help"
% or follow instructions from extracted README.md.
%<*dtx>
-\def\xintdtxtimestamp {Time-stamp: <17-06-2018 at 20:00:43 CEST>}
+\def\xintdtxtimestamp {Time-stamp: <06-01-2019 at 18:00:05 CET>}
%</dtx>
%<*drv>
%% ---------------------------------------------------------------
-\def\xintdocdate {2018/06/17}
-\def\xintbndldate{2018/06/17}
-\def\xintbndlversion {1.3c}
+\def\xintdocdate {2019/01/06}
+\def\xintbndldate{2019/01/06}
+\def\xintbndlversion {1.3d}
%</drv>
%<readme>% README
%<changes>% CHANGE LOG
-%<readme|changes>% xint 1.3c
-%<readme|changes>% 2018/06/17
+%<readme|changes>% xint 1.3d
+%<readme|changes>% 2019/01/06
%<readme|changes>
-%<readme|changes> Source: xint.dtx 1.3c 2018/06/17 (doc 2018/06/17)
+%<readme|changes> Source: xint.dtx 1.3d 2019/01/06 (doc 2019/01/06)
%<readme|changes> Author: Jean-Francois Burnol
%<readme|changes> Info: Expandable operations on big integers, decimals, fractions
-%<readme|changes> License: LPPL 1.3c
+%<readme|changes> License: LPPL 1.3d
%<readme|changes>
%<*!readme&!changes&!dohtmlsh&!dopdfsh&!makefile&!latexmkrc&!gind>
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%<xintkernel>%% xintkernel: Paraphernalia for the xint packages
%<xinttools>%% xinttools: Expandable and non-expandable utilities
%<xintcore>%% xintcore: Expandable arithmetic on big integers
@@ -208,7 +208,7 @@ License
=======
<div class="mono">
-Copyright (C) 2013-2018 by Jean-Francois Burnol
+Copyright (C) 2013-2019 by Jean-Francois Burnol
This Work may be distributed and/or modified under the
conditions of the LaTeX Project Public License version 1.3c.
@@ -233,13 +233,57 @@ Makefile.mk, xint-gind.ist, and .latexmkrc.</div>
%</readme>--------------------------------------------------------
%<*changes>-------------------------------------------------------
+`1.3d (2019/01/06)`
+----
+
+### Incompatible changes
+
+ - **xintexpr**: the `gcd()` and `lcm()` functions formerly converted
+ their arguments to integers via `\xintNum`. They now handle general
+ input with no such modification.
+
+ - **xintexpr**: former `\xinteval`, `\xintieval`, `\xintiieval`, and
+ `\xintfloateval` renamed to `\xintexpro`, `\xintiexpro`,
+ `\xintiiexpro`, and `\xintfloatexpro`.
+
+### Improvements and new features
+
+ - **xintexpr**: the `gcd()` and `lcm()` multi-arguments functions have
+ been refactored to handle general fractions. The dependency on
+ **xintgcd** is removed.
+
+ - **xintexpr**: three-way branching `\xintifsgnexpr`,
+ `\xintifsgnfloatexpr`, `\xintifsgniiexpr` conditional macros.
+
+ - **xintexpr**: `\xintunassignexprfunc`, `\xintunassigniiexprfunc`,
+ `\xintunassignfloatexprfunc` to "undefine" functions.
+
+ - **xintexpr**: `\xintunassignvar` really makes the (multi-letter) variable
+ unknown (formerly, it only gave it value zero),
+
+ - **xintexpr**: functions `isone()` and `isint()`.
+
+ - **xintexpr**: `\xinteval`, `\xintieval`, `\xintiieval`, and
+ `\xintfloateval` as synonyms to `\xintthexpr...\relax` etc..., but
+ with the (comma-separated) expression as a usual braced macro
+ argument.
+
+### Bug fixes
+
+ - **xintcore**, **xintexpr** : division in `\xintiiexpr` was broken for
+ a zero dividend and a one-digit divisor (e.g. ``0//7``) since `1.2p`
+ due to a bug in `\xintiiDivMod` for such arguments. The bug was
+ signaled (thanks to Kpym for report) and fixed shortly after `1.3c`
+ release but I then completely forgot to upload a bugfix release to
+ CTAN at that time, apologies for that.
+
`1.3c (2018/06/17)`
----
### Improvements and new features
- **xintexpr**: with `\xintglobaldefstrue`, `\xintdefvar`,
- `\xintdeffunc`, `\xintNewExpr` et. al. make definitions with global
+ `\xintdeffunc`, `\xintNewExpr` et al. make definitions with global
scope.
- **xintexpr**: `qraw()` for fast input of (very many) comma separated
@@ -1973,7 +2017,7 @@ auxiliaryfiles = xint.dvi xint.aux xint.toc xint.log\
CHANGES.dvi CHANGES.aux CHANGES.toc CHANGES.out CHANGES.log
xint_cmd = latexmk xint
sourcexint_cmd = latexmk -jobname=sourcexint\
- -latex='latex %O "\\chardef\\dosourcexint=1 \\input{%S}"' xint.tex
+ -latex='latex %O "\chardef\dosourcexint=1 \input{%S}"' xint.tex
all: $(extracted) doc xint.tds.zip
@echo 'make all done.'
@@ -2449,6 +2493,11 @@ dvipdfmx CHANGES.dvi
\else
\documentclass {scrdoc}
\fi
+% Revert change to \smash and other macros at LaTeX 2018/12/01
+% https://github.com/latex3/latex2e/issues/108
+\makeatletter
+\let\leavevmode@ifvmode\empty % for \smash in \NewWith etc...
+\makeatother
% Remove from sectioning commands insertion of marks, because we
% will do it ourself.
@@ -2828,20 +2877,26 @@ pdfpagemode=UseOutlines}
{\color[named]{PineGreen}\normalfont\small
\hsize 1.6cm\rightskip.5cm minus.5cm
\hss\vtop{#2}\ $\to$#1\ }}%
- \vskip\dp\strutbox }\strut\@esphack}
-\def\MyMarginNoteWithBrace #1{\@bsphack
+ \vskip\dp\strutbox
+ }\strut\@esphack}
+\def\MyMarginNoteWithBrace #1#2{\@bsphack
\vadjust{\vskip-\dp\strutbox
\smash{\hbox to 0pt
{\color[named]{PineGreen}%\normalfont\small
- \hss #1\ $\bigg\{$\ }}%
- \vskip\dp\strutbox }\strut\@esphack}
+ \hss #1\ $\bigg\{$#2}}%
+ \vskip\dp\strutbox
+ }\strut\@esphack}
\def\IMPORTANT {\MyMarginNoteWithBrace
- {\raisebox{-.5\height}{\resizebox{2\width}{!}{\ding{43}}}}}
+ {\raisebox{-.5\height}{\resizebox{2\width}{!}{\ding{43}}}}{\ }}
+\def\IMPORTANTf {\MyMarginNoteWithBrace
+ {\raisebox{-.5\height}{\resizebox{2\width}{!}{\ding{43}}}}%
+ {\kern\dimexpr\FrameSep+\FrameRule\relax\ }}
\def\etype #1{\@bsphack
\vadjust{\vskip-\dp\strutbox
\smash{\hbox to 0pt {\hss\color[named]{PineGreen}%
\itshape \xintListWithSep{\,}{#1}\ $\star$\quad }}%
- \vskip\dp\strutbox }\strut\@esphack}
+ \vskip\dp\strutbox
+ }\strut\@esphack}
\def\retype #1{\@bsphack
\vadjust{\vskip-\dp\strutbox
\smash{\hbox to 0pt {\hss\color[named]{PineGreen}%
@@ -3540,10 +3595,10 @@ pdfpagemode=UseOutlines}
\def\Fibonacci #1{%
\expandafter\Fibonacci_a\expandafter
{\the\numexpr #1\expandafter}\expandafter
- {\romannumeral0\xintiieval 1\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval 1\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval 1\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval 0\relax}}
+ {\romannumeral0\xintiiexpro 1\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro 1\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro 1\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro 0\relax}}
%
\def\Fibonacci_a #1{%
\ifcase #1
@@ -3560,15 +3615,15 @@ pdfpagemode=UseOutlines}
}%
\def\Fibonacci_b_i #1#2#3{\expandafter\Fibonacci_a\expandafter
{\the\numexpr #1/2\expandafter}\expandafter
- {\romannumeral0\xintiieval sqr(#2)+sqr(#3)\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval (2#2-#3)#3\relax}%
+ {\romannumeral0\xintiiexpro sqr(#2)+sqr(#3)\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro (2#2-#3)#3\relax}%
}% end of Fibonacci_b_i
\def\Fibonacci_b_ii #1#2#3#4#5{\expandafter\Fibonacci_a\expandafter
{\the\numexpr (#1-1)/2\expandafter}\expandafter
- {\romannumeral0\xintiieval sqr(#2)+sqr(#3)\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval (2#2-#3)#3\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval #2#4+#3#5\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval #2#5+#3(#4-#5)\relax}%
+ {\romannumeral0\xintiiexpro sqr(#2)+sqr(#3)\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro (2#2-#3)#3\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro #2#4+#3#5\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro #2#5+#3(#4-#5)\relax}%
}% end of Fibonacci_b_ii
\def\Fibonacci_end_i #1#2#3#4#5{\xintthe#5}
\def\Fibonacci_end_ii #1#2#3#4#5{\xinttheiiexpr #2#5+#3(#4-#5)\relax}
@@ -3641,7 +3696,8 @@ pdfpagemode=UseOutlines}
\path [line,-{Stealth[length=5mm]}] (frac) to [out=0,in=90] (series.north);
\path [line,-{Stealth[length=5mm]}] (frac) to [out=0,in=90] (cfrac.north);
\path [line,dashed,-{Stealth[length=5mm]}] (binhex.south) -- (expr);
- \path [line,dashed,-{Stealth[length=5mm]}] (gcd.south) -- (expr);
+% at 1.3d gcd() and lcm() needs no support from xintgcd
+% \path [line,dashed,-{Stealth[length=5mm]}] (gcd.south) -- (expr);
\path [line,dashed,-{Stealth[length=5mm]}] (tools) to [out=0, in=90]
(gcd.north);% je dois positionner mieux mais pas le temps de lire 700 pages
\path [line,dashed,-{Stealth[length=5mm]}] (tools.south west) to [out=270, in=225]
@@ -3737,11 +3793,10 @@ Further modules:
hexadecimal inputs requires this module to be loaded by user.
\item[\xintgcdname] implements the Euclidean algorithm and its typesetting.
- The macro \csbxint{Irr} (hence the \xintexprname function
- \func{reduce}) is provided independently in
- \xintfracname. But usage of the \xintexprname
- \func{gcd} and \func{lcm}
- functions requires this module to be loaded by user.
+ The macro \csbxint{Irr} (hence the \xintexprname function \func{reduce}) is
+ provided independently in \xintfracname. Also the \xintexprname functions
+ \func{gcd} and \func{lcm} are implemented directly so loading this
+ module is not needed for them.\NewWith{1.3d}
\item[\xintseriesname] provides some basic functionality for computing in an
expandable manner partial sums of series and power series with fractional
@@ -3779,15 +3834,23 @@ for other formats, you can do computations such as the following.
\begin{description}
\item[with floats:]\leavevmode\par
\begin{everbatim*}
-\thexintfloatexpr 3.25^100/3.2^100, 2^1000000, sqrt(1000!), 10^-3.5\relax
+\thexintfloatexpr 3.25^100/3.2^100, 2^1000000, sqrt(1000!), 10^-3.5\relax\par
\end{everbatim*}
+And |1.3d| adds the input syntax with braces:\NewWith{1.3d}
+\begin{everbatim}
+\xintfloateval{3.25^100/3.2^100, 2^1000000, sqrt(1000!), 10^-3.5}
+\end{everbatim}
\item[with fractions:]\leavevmode\par
\begin{everbatim*}
\thexintexpr reduce(add((-1)^(i-1)/i**2, i=1..25))\relax
+% or \xinteval{reduce(add((-1)^(i-1)/i**2, i=1..25))}
\end{everbatim*}
\item[with integers:]\leavevmode\par
+\begin{everbatim}
+\thexintiiexpr 3^159+2^234\relax % or equivalently:
+\end{everbatim}
\begin{everbatim*}
-\thexintiiexpr 3^159+2^234\relax
+\xintiieval{3^159+2^234}
\end{everbatim*}
\end{description}
@@ -3795,13 +3858,13 @@ Float computations are done by default with \dtt{16} digits of precision.
This can be changed by a prior assignment to |\xintDigits|:
\begin{everbatim*}
% use braces (or a LaTeX environment) to limit the scope of the \xintDigits assignment
-{\xintDigits := 88;\thexintfloatexpr 3.25^100-3.2^100\relax}\par
+{\xintDigits := 88;\xintfloateval{3.25^100-3.2^100}}\par
\end{everbatim*}
We can even try daring things:\footnote{The \cs{printnumber} is not part of
the package, see \autoref{ssec:printnumber}.}
\begin{everbatim*}
-{\xintDigits:=500;\printnumber{\thexintfloatexpr sqrt(2)\relax}}
+{\xintDigits:=500;\printnumber{\xintfloateval{sqrt(2)}}}
\end{everbatim*}
\medskip
@@ -3838,9 +3901,8 @@ This is release \expandafter|\xintbndlversion|.
All operations executed by the parsers are based on underlying macros from
packages \xintfracname and \xintname which are loaded automatically by
-\xintexprname. With extra packages \xintbinhexname and \xintgcdname the
-parsers can handle hexadecimal notation on input (even fractional) and compute
-|gcd|'s or |lcm|'s of integers.
+\xintexprname. With \xintbinhexname loaded the
+parsers can handle hexadecimal notation on (even fractional) input.
All macros doing computations ultimately rely on (and reduce to) the
|\numexpr| primitive from \eTeX{}. These \eTeX{} extensions date back to 1999
@@ -3854,12 +3916,15 @@ extensions.
\subsection{Quick overview (expressions with \xintexprname)}
This section gives a first few examples of using the expression parsers which
-are provided by package \xintexprname. Loading \xintexprname automatically also
+are provided by package \xintexprname. See \autoref{sec:xintexprsyntax} for
+a more detailed description, and perhaps read \autoref{ssec:threeparsers}
+before coming back here.
+
+Loading \xintexprname automatically also
loads packages \xinttoolsname and \xintfracname. The latter loads \xintname
which loads \xintcorename. All three provide the macros which ultimately do the
computations associated in expressions with the various symbols like |+, *, ^,
-!| and functions such as |max, sqrt, gcd| (the latter requires
-explicit loading of \xintgcdname). The package
+!| and functions such as |max, sqrt, gcd|. The package
\xinttoolsname does not handle computations but provides some useful utilities.
\begin{framed}
@@ -3867,32 +3932,30 @@ explicit loading of \xintgcdname). The package
|\thexintfloatexpr| as synonym of |\xintthefloatexpr|, etc...
\end{framed}
-There are three expression parsers and two subsidiary ones. They
-all admit comma separated expressions, and will then output a comma
-separated list of results.
-\begin{itemize}[nosep]
-\item \csbxint{theiiexpr}| ... \relax| does exact computations \emph{only on
- integers.} The forward slash \dtt{/} does the \emph{rounded} integer
- division to match behaviour of |\the\numexpr
- <int>/<int>\relax|.\footnote{For floored integer division, see the \dtt{//}
- operator.} There are two square root extractors \func{sqrt} and
- \func{sqrtr} for truncated and rounded square roots. Scientific notation
- |6.02e23| is \emph{not} accepted on input, one needs to wrap it as
- |num(6.02e23)| which will convert to an integer notation
- \dtt{\printnumber{\xinttheiiexpr num(6.02e23)\relax}}.
-\item \csbxint{thefloatexpr}| ... \relax| does computations with a given
- precision \dtt{P}, as specified via a prior assignment |\xintDigits:=P;|.
- The default is \dtt{P=16} digits. An optional argument controls the
- precision for \emph{formatting the output} (this is not the precision of the
- computations themselves). The four basic operations and the square root
- realize \emph{correct rounding.}\footnote{when the inputs are already
- floating point numbers with at most |P|-digits mantissas.}
-\item \csbxint{theexpr}| ... \relax| handles integers, decimal numbers,
- numbers in scientific notation and fractions. The algebraic computations are
- done \emph{exactly.} The |sqrt| function is available and works
- according to the |\xintDigits| precision or according to its second optional
- argument.
-\end{itemize}
+\begin{framed}
+ Release |1.3d| defines \csbxint{eval}, \csbxint{ieval}, \csbxint{iieval},
+ \NewWithf{1.3d}
+ and \csbxint{floateval} which use braces to delimit their arguments, which
+ will be more familiar to \LaTeX\ users than the \csbxint{theexpr}|...\relax|
+ syntax. For example:
+\begin{everbatim*}
+\xinteval{1+2+3}, \xintfloateval{111/123}, \xintfloateval{[3] 111/123}
+\end{everbatim*}
+
+ This documentation however uses systematically |\xinttheexpr...\relax| or
+ |\thexintexpr...\relax| syntax for legacy reasons. In this input syntax the
+ |\relax| does not have to be physically present it may arise from pure
+ expansion (see \autoref{sec:expr}).
+
+ Notice that for the \csbxint{theiexpr} and \csbxint{thefloatexpr} parsers
+ which admit an optional argument, this optional argument will have to be
+ located \emph{inside} the braces when using |\xintieval| or |\xintfloateval|
+ input syntax, as examplified above.
+
+ The main reason is that it is sometimes useful to hide the square brackets, for
+ example when using the |\num| macro from package
+ \href{http://ctan.org/pkg/siunitx}{siunitx}.
+\end{framed}
\begin{framed}
Currently, the sole available non-algebraic function is the square root
@@ -3905,19 +3968,6 @@ separated list of results.
power followed by a square-root extraction).
\end{framed}
-Two derived parsers:
-\begin{itemize}[nosep]
-\item \csbxint{theiexpr}| ... \relax| does all computations like |\xinttheexpr
- ... \relax| but rounds the result to the nearest integer. With an optional
- positive argument |[D]|, the rounding is to the nearest fixed point number
- with |D| digits after the decimal mark.
-\item \csbxint{theboolexpr}| ... \relax| does all computations like
- |\xinttheexpr ... \relax| but converts the result to $1$ if it is not zero
- (works also on comma separated expressions).
- See also the booleans \csbxint{ifboolexpr}, \csbxint{ifbooliiexpr},
- \csbxint{ifboolfloatexpr} (which do not handle comma separated expressions).
-\end{itemize}
-
Here is a (partial) list of the recognized symbols:
\begin{itemize}[nosep]
\item the comma (to separate distinct computations or arguments to a
@@ -3934,10 +3984,9 @@ Here is a (partial) list of the recognized symbols:
%\item |'| for octal input (\emph{not yet}),
\item functions \xintFor #1 in {num, preduce, reduce, abs, sgn, frac, floor, ceil, sqr, sqrt,
sqrtr, float, round, trunc, mod, quo, rem,
- max, min, |`+`|, |`*`|, not, all, any, xor, if, ifint, ifone, ifsgn, even, odd, first,
- last, reversed, bool, togl, factorial, binomial, pfactorial}\do {\func{#1}, }
-\item multi-arguments \func{gcd} and \func{lcm} are available if \xintgcdname is
- loaded,
+ max, min, |`+`|, |`*`|, not, all, any, xor, if, ifint, ifone, ifsgn, even,
+ odd, isint, isone, first,
+ last, reversed, bool, togl, gcd, lcm, factorial, binomial, pfactorial}\do {\func{#1}, }
\item functions \func{random}, \func{qrand}, \func{randrange} for random
floats or integers (requires that \TeX\ engine provides
\csa{pdfuniformdeviate} or \csa{uniformdeviate} primitive),
@@ -4291,64 +4340,92 @@ run.%
-\subsection{Installation instructions}
+\subsection{License and installation instructions}
+
\label{ssec:install}
\xintname is made available under the
\href{http://www.latex-project.org/lppl/lppl-1-3c.txt}{LaTeX Project Public
- License 1.3c}. It is included in the major \TeX\ distributions, thus there
+ License 1.3c} and is included in the major \TeX\ distributions, thus there
is probably no need for a custom install: just use the package manager to
update if necessary \xintname to the latest version available.
-After installation, issuing in terminal |texdoc --list xint|, on installations
-with a |"texdoc"| or similar utility, will offer the choice to display one of
-the documentation files: |xint.pdf| (this file), |sourcexint.pdf| (source
-code), |README|, |README.pdf|, |README.html|, |CHANGES.pdf|, and
-|CHANGES.html|.
-
-For manual installation, follow the instructions from the |README| file which
-is to be found on \href{http://www.ctan.org/pkg/xint}{CTAN}; it is also
-available there in PDF and HTML formats. The simplest method proposed is to
-use the archive file \href{http://www.ctan.org/pkg/xint}{xint.tds.zip},
-downloadable from the same location.
-
-The next simplest one is to make use of the |Makefile|, which is also
-downloadable from
-\href{http://mirror.ctan.org/macros/generic/xint}{CTAN}. This is
-for GNU/Linux systems and Mac OS X, and necessitates use of the command
-line. If for some reason you have |xint.dtx| but no internet access,
-you can recreate |Makefile| as a file with this name and the following
-contents:
-
-{\def\everbatimindent {0pt }%
-\begin{everbatim}
-include Makefile.mk
-Makefile.mk: xint.dtx ; etex xint.dtx
-\end{everbatim}}
+The |README| files on \href{http://www.ctan.org/pkg/xint}{CTAN} explain how to
+proceed with a custom installation.
+
+On \TeX\ distributions with a |"texdoc"| or similar utility,
+\centeredline{|texdoc --list xint|}
+will offer to display one of those files:
+\begin{itemize}[nosep]
+\item |xint.pdf| (this file),
+\item |sourcexint.pdf| (source code),
+\item |README|, |README.pdf|, |README.html|,
+\item |CHANGES.pdf|, and |CHANGES.html|.
+\end{itemize}
-Then run |make| in a working repertory where there is |xint.dtx| and the file
-named |Makefile| and having only the two lines above. The |make| will extract
-the package files from |xint.dtx| and display some further instructions.
+% For manual installation, follow the instructions from the |README| file which
+% is to be found on \href{http://www.ctan.org/pkg/xint}{CTAN}; it is also
+% available there in PDF and HTML formats. The simplest method proposed is to
+% use the archive file \href{http://www.ctan.org/pkg/xint}{xint.tds.zip},
+% downloadable from the same location.
+
+% The next simplest one is to make use of the |Makefile|, which is also
+% downloadable from
+% \href{http://mirror.ctan.org/macros/generic/xint}{CTAN}. This is
+% for GNU/Linux systems and Mac OS X, and necessitates use of the command
+% line. If for some reason you have |xint.dtx| but no internet access,
+% you can recreate |Makefile| as a file with this name and the following
+% contents:
+
+% {\def\everbatimindent {0pt }%
+% \begin{everbatim}
+% include Makefile.mk
+% Makefile.mk: xint.dtx ; etex xint.dtx
+% \end{everbatim}}
+
+% Then run |make| in a working repertory where there is |xint.dtx| and the file
+% named |Makefile| and having only the two lines above. The |make| will extract
+% the package files from |xint.dtx| and display some further instructions.
-If you have |xint.dtx|, no internet access and can not use the Makefile
-method: |etex xint.dtx| extracts all files and among them the |README| as a
-file with name |README.md|. Further help and options will be found therein.
+% If you have |xint.dtx|, no internet access and can not use the Makefile
+% method: |etex xint.dtx| extracts all files and among them the |README| as a
+% file with name |README.md|. Further help and options will be found therein.
\subsection {Recent changes}
This is release \expandafter|\xintbndlversion| of \expandafter|\xintbndldate|.
-For more information: \centeredline{|texdoc --list xint|} and select e.g.\@
+For more information see
|CHANGES.html|.\centeredline{Internet:
\url{http://mirrors.ctan.org/macros/generic/xint/CHANGES.html}}
The formatted source code is available in file |sourcexint.pdf|:
\centeredline{|texdoc sourcexint|}
-\noindent|1.3c|:
+\noindent|1.3d|:
+\begin{itemize}[nosep]
+\item \func{gcd} and \func{lcm} in \csbxint{expr}|...\relax| now handle
+ general arguments, without converting them to integers,
+\item it is not needed anymore to load package \xintgcdname to benefit from
+ \func{gcd} and \func{lcm} in the parsers,
+\item \csbxint{ifsgnexpr}, \csbxint{ifsgnfloatexpr}, \csbxint{ifsgniiexpr},
+\item \csbxint{unassignexprfunc} and variants for the other parsers,
+\item \func{isone} and \func{isint},
+\item \csbxint{eval}, \csbxint{ieval}, \csbxint{iieval}, and
+ \csbxint{floateval}. Attention: these names were formerly used with some other
+ (barely documented) meanings, for which |\xintexpro|, |\xintiexpro|,
+ etc... are now used.
+\item sadly, in \csbxint{iiexpr}|...\relax| division with a zero dividend and
+ a one-digit divisor got broken at |1.2p|. Fixed. Thanks to \textsc{Kpym} for
+ report. Sorry for long delay in releasing the bugfix, which was done shortly
+ after |1.3c| release.
+\end{itemize}
+
+\pagebreak[3]
+\noindent|1.3c|:\par
\begin{itemize}[nosep]
\item adds \csbxint{globaldefstrue} to give global scope to definitions done
- by \csbxint{defvar}, \csbxint{deffunc}, \csbxint{NewExpr}, et.\@ al.,
+ by \csbxint{defvar}, \csbxint{deffunc}, \csbxint{NewExpr}, et al.,
\item \func{qraw},
\item the colon in the |:=| part of the syntax for
\csbxint{defvar} and variants is now optional; and if present it may be
@@ -4405,6 +4482,53 @@ although long existing, had somehow not made it into the user manual yet.
\localtableofcontents
+\subsection{The three parsers}\label{ssec:threeparsers}
+
+There are three expression parsers and two subsidiary ones. They
+all admit comma separated expressions, and will then output a comma
+separated list of results.
+\begin{itemize}[nosep]
+\item \csbxint{theiiexpr}| ... \relax| does exact computations \emph{only on
+ integers.} The forward slash \dtt{/} does the \emph{rounded} integer
+ division to match behaviour of |\the\numexpr
+ <int>/<int>\relax|.\footnote{For floored integer division, see the \dtt{//}
+ operator.} There are two square root extractors \func{sqrt} and
+ \func{sqrtr} for truncated and rounded square roots. Scientific notation
+ |6.02e23| is \emph{not} accepted on input, one needs to wrap it as
+ |num(6.02e23)| which will convert to an integer notation
+ \dtt{\printnumber{\xinttheiiexpr num(6.02e23)\relax}}.
+\item \csbxint{thefloatexpr}| ... \relax| does computations with a given
+ precision \dtt{P}, as specified via a prior assignment |\xintDigits:=P;|.
+ The default is \dtt{P=16} digits. An optional argument controls the
+ precision for \emph{formatting the output} (this is not the precision of the
+ computations themselves). The four basic operations and the square root
+ realize \emph{correct rounding.}\footnote{when the inputs are already
+ floating point numbers with at most |P|-digits mantissas.}
+\item \csbxint{theexpr}| ... \relax| handles integers, decimal numbers,
+ numbers in scientific notation and fractions. The algebraic computations are
+ done \emph{exactly.} The |sqrt| function is available and works
+ according to the |\xintDigits| precision or according to its second optional
+ argument.
+\end{itemize}
+
+Two derived parsers:
+\begin{itemize}[nosep]
+\item \csbxint{theiexpr}| ... \relax| does all computations like |\xinttheexpr
+ ... \relax| but rounds the result to the nearest integer. With an optional
+ positive argument |[D]|, the rounding is to the nearest fixed point number
+ with |D| digits after the decimal mark.
+\item \csbxint{theboolexpr}| ... \relax| does all computations like
+ |\xinttheexpr ... \relax| but converts the result to $1$ if it is not zero
+ (works also on comma separated expressions).
+ See also the booleans \csbxint{ifboolexpr}, \csbxint{ifbooliiexpr},
+ \csbxint{ifboolfloatexpr}, \csbxint{ifsgnexpr}, \csbxint{ifsgniiexpr},
+ \csbxint{ifsgnfloatexpr} (they do not handle comma separated expressions).
+\end{itemize}
+
+Release |1.3d| provides \csbxint{eval}, \csbxint{ieval},
+\NewWith{1.3d}
+\csbxint{iieval}, \csbxint{floateval}.
+
\subsection{Built-in operators and their precedences}
@@ -4413,7 +4537,10 @@ although long existing, had somehow not made it into the user manual yet.
\makeatletter
\def\@floatboxreset{\@setminipage}% faudra contrôler celui-là
\makeatother
-\begin{table}[htbp]\ht\strutbox12pt\dp\strutbox5pt
+\begin{table}[htbp]
+\edef\restorehtdpstrutbox
+ {\ht\strutbox\the\ht\strutbox\dp\strutbox\the\dp\strutbox}
+\ht\strutbox12pt\dp\strutbox5pt
\capstart
\centering\begin{tabular}{|c|p{.5\textwidth}|}
\hline
@@ -4468,6 +4595,7 @@ when using variables.
\caption{Precedence levels}
\label{tab:precedences}
\etoctoccontentsline {table}{\textbf{(table)} \protect\emph{Precedence levels of operators}}
+\restorehtdpstrutbox
\end{table}
The \autoref{tab:precedences} is hyperlinked to the more detailed discussion
@@ -4671,8 +4799,9 @@ corresponding definitions.
\capstart
\centering
\xintAssignArray\xintCSVtoList{!, ?, |`*`|, |`+`|, abs, add, all, any, binomial, bool, ceil,
-divmod, even, factorial, first, float, floor, frac, gcd, if, ifint, ifone, ifsgn, iter,
-iterr, last, lcm, len, max, min, mod, mul, not, num, odd, pfactorial,
+divmod, even, factorial, first, float, floor, frac, gcd, if, ifint, ifone, ifsgn,
+isint, isone,
+iter, iterr, last, lcm, len, max, min, mod, mul, not, num, odd, pfactorial,
preduce, qfloat,
qfrac, qint, qrand, qraw, quo, random, randrange, reduce, rem, reversed, round, rrseq, rseq, seq, sgn, sqr,
sqrt, sqrtr, subs, togl, trunc, xor}
@@ -4701,13 +4830,14 @@ sqrt, sqrtr, subs, togl, trunc, xor}
Miscellaneous notes:
\begin{itemize}[nosep]
- \item \func{gcd} and \func{lcm} require explicit loading of \xintgcdname,\IMPORTANT
+ \item since release |1.3d| \func{gcd}\NewWith{1.3d} and \func{lcm} are extended to apply
+ to fractions too, and they do NOT require the loading of \xintgcdname,
\item The randomness related functions \func{random}, \func{qrand} and
\func{randrange} require that the \TeX\ engine provides the
\csa{uniformdeviate} or \csa{pdfuniformdeviate} primitive. This is
- currently the case for |pdftex|, |(u)ptex|, |luatex|, but not for
- |xetex|.\IMPORTANT
+ currently the case for |pdftex|, |(u)ptex|, |luatex|, and will be for
+ |xetex| starting with \TeX Live 2019.\IMPORTANT
\item \func{togl} is provided for the case |etoolbox| package is loaded,
@@ -4843,7 +4973,7 @@ Recall that this is NOT done automatically, for example when adding fractions.
\end{everbatim*}
\funcdesc{abs} absolute value
- \funcdesc{sgn} sign
+ \funcdesc{sgn} sign. See also \csbxint{ifsgnexpr}.
\funcdesc{floor} floor function.
\funcdesc{ceil} ceil function.
\funcdesc{sqr} square.
@@ -4867,6 +4997,21 @@ Recall that this is NOT done automatically, for example when adding fractions.
\xintthefloatexpr [3] seq((x,odd(x)), x=-5/2..[1/3]..+5/2)\relax
\end{everbatim*}
+ \funcdesc{isint} evaluates to 1 if |x| is an integer, to 0 if
+ not.\NewWith{1.3d} See \func{ifint}.
+\begin{everbatim*}
+$\xinttheexpr -5/3..[1/3]..+5/3\relax
+\rightarrow \xinttheexpr seq(isint(x), x=-5/3..[1/3]..+5/3)\relax$
+\end{everbatim*}
+
+ \funcdesc{isone} evaluates to 1 if |x| is 1, to 0 if not.\NewWith{1.3d}
+See \func{ifone}.
+\begin{everbatim*}
+$\xintthefloatexpr subs(((x-1)/x, x/x, (x+1)/x), x=2**30)\relax
+\rightarrow
+\xintthefloatexpr seq(isone(y), y=subs(((x-1)/x, x/x, (x+1)/x), x=2**30))\relax$
+\end{everbatim*}
+
\funcdesc{qint} belong with \func{qfrac}, \func{qfloat}, \func{qraw} to a
special category: they require the closing parenthesis of their argument to
be immediately visible, it can not arise from expansion.
@@ -5221,12 +5366,13 @@ for the behaviour if the arguments are negative.
checks if |x| is an integer and in that case chooses the ``yes'' branch.%
\NewWith{1.3a}
+ See also \func{isint}.
\funcdesc[x,yes,no]{ifone} (twofold-way conditional)\mbox{}
checks if |x| is equal to one and in that case chooses the ``yes'' branch.%
\NewWith{1.3a}
- Slightly more efficient than |if(x==1,..,..)|.
+ Slightly more efficient than |if(x==1,..,..)|. See also \func{isone}.
\funcdesc[cond,<0,=0,>0]{ifsgn} (threefold-way conditional)\mbox{}
@@ -5277,9 +5423,38 @@ the resulting logical assertion,
\xinttheexpr `*`(1,3,19), `*`(1^2,3^2,19^2), `*`(1*2,3*4,19*20)\relax
\end{everbatim*}
\funcdesc[x, y, ...]{max} maximum of the (arbitrarily many) arguments,
+
\funcdesc[x, y, ...]{min} minimum of the (arbitrarily many) arguments,
-\funcdesc[x, y, ...]{gcd} first truncates the (arbitrarily many) arguments to integers then computes the |GCD|, requires \xintgcdname,
-\funcdesc[x, y, ...]{lcm} first truncates (arbitrarily many) arguments to integers then computes the |LCM|, requires \xintgcdname,
+
+\funcdesc[x, y, ...]{gcd} computes the positive generator of the fractional
+ideal of rational numbers $x\mathbb Z + y\mathbb Z + ... \subset \mathbb
+Q$.\CHANGED{1.3d} When the inputs are integers it is advantageous to use a sub
+\csbxint{iiexpr}-ession, as the integer-only macro is more efficient than the
+one accepting general fractional inputs. Notice that this may require some
+\func{num} wrapper when using variables, as they may well be in fraction
+format, and \csbxint{iiexpr} accepts only strict integers. Since |1.3d|, this
+function and \func{lcm} are available whether or not package \xintgcdname is
+loaded. Note that like other operations with fractions it does not always
+produce a fraction in irreducible format. This example shows also how to
+reduce an n-uple to its primitive part:
+\begin{everbatim*}
+\xinttheexpr gcd(7/300, 11/150, 13/60)\relax\newline
+$(7/300, 11/150, 13/60)\to
+(\xinttheexpr seq(reduce(x), x = [7/300, 11/150, 13/60]/gcd(7/300, 11/150, 13/60))\relax)$
+\end{everbatim*}
+
+Perhaps a future release will provide a |primpart()| function as built-in
+functionality.
+
+\funcdesc[x, y, ...]{lcm} computes the positive generator of the
+fractional ideal of rational numbers $x\mathbb Z \cap y\mathbb Z \cap ...
+\subset \mathbb Q$.\CHANGED{1.3d} When the inputs are integers it is
+advantageous to use a sub \csbxint{iiexpr}-ession, as the integer-only macro
+is more efficient than the one accepting general fractional inputs.
+\begin{everbatim*}
+\xinttheexpr lcm(7/300, 11/150, 13/60)\relax
+\end{everbatim*}
+
\funcdesc[x, y, ...]{first} first item of the list argument:
\begin{everbatim*}
\xinttheiiexpr first(last(-7..3), 58, 97..105)\relax
@@ -5636,14 +5811,6 @@ With initial value 1161, the maximal number attained is \syrMax{1161} and that l
number is the number of steps which was needed to reach 1.\par
\end{everbatim*}
-Well, one more (but recall that |gcd| is already available as a multi-argument
-function if \xintgcdname is loaded):
-
-\begin{everbatim*}
-\newcommand\GCD [2]{\xinttheiiexpr rrseq(#1,#2; (@1=0)?{abort}{@2/:@1}, i=1++)\relax }
-\GCD {13^10*17^5*29^5}{2^5*3^6*17^2}
-\end{everbatim*}
-
Look at the
\hyperlink{BrentSalamin}{Brent-Salamin algorithm implementation} for a more
interesting recursion.
@@ -5759,27 +5926,13 @@ Example:
\end{everbatim}
This defines the variables |x0|, |x1|, \dots, |x10| for future usage.
-Legal variable names are composed of letters, digits, |@| and |_| characters.
+Legal variable names are composed of letters, digits, |_| and |@| and characters.
+A variable name must start with a letter:
\begin{itemize}[nosep]
-\item a digit is not allowed as first character,
-\item variables names with |@| or |_| as first character are reserved
- by \xintname for internal purposes, and should be avoided:
- \begin{itemize}[nosep]
- \item currently |@|, |@1|, |@2|, |@3|, and |@4| are reserved because they
- have special meanings for use in iterations,
- \item |@@|, |@@@|, |@@@@| are also reserved but
-are technically functions, not variables: a user may possibly define |@@| as
-a variable name, but if it is followed by parentheses, the function
-interpretation will be applied (rather than the variable interpretation
-followed by a tacit multiplication),
- \item since 1.2l, the underscore |_| may be used as separator of digits in
- long numbers.
- Hence a variable whose name starts with |_| will not play well with the
- mechanism of tacit multiplication of variables by numbers: the underscore
- will be removed from input stream by the number scanner, thus creating
- an undefined or wrong variable name, or none at all if the variable
- name was an initial |_| followed by digits.
- \end{itemize}
+\item the first character can not be a digit,
+\item and names starting with |@| or |_| are reserved (worldwide,
+ extra-terrestrial locations included if under UNO supervision) by author for
+ internal purposes.
\end{itemize}
|x_1x| is a licit variable name, as well as |x_1x_| and |x_1x_2| and |x_1x_2y|
@@ -5860,16 +6013,15 @@ Package xintexpr Info: (on line 2892)
\subsubsection{\csh{xintunassignvar}}
\label{xintunassignvar}
-Variable declarations are local. But while in the same scope, one can not
-really ``unassign'' a declared variable; although naturally one can assign to
-the same variable name some new value.
-
-\csa{xintunassignvar}\marg{variable} redefines the variable in such a way that
-using it afterwards in the same scope will raise a \TeX{} ``undefined macro''
-error (and insert a \dtt{0} value in the expression.)
+Variable declarations obey the current scope. To let a (multi-letter) name be
+unknown to (all parsers of) \xintexprname\CHANGED{1.3d} without waiting the
+end of the scope one issues \csa{xintunassignvar}\marg{variable}. Prior to
+|1.3d|, this only redefined the variable to represent the value \dtt{0}.
-Important: \csa{xintunassignvar}\marg{letter}\IMPORTANT{} does let the letter
-recover fully its original meaning as dummy variable in the current scope.
+In the special case of \csa{xintunassignvar}\marg{letter}, the effect is
+different,\IMPORTANT{} as it is synonymous with
+\csbxint{newdummy}\marg{letter}: the (catcode 11) \meta{letter} recovers or
+acquires meaning as a dummy variable in the current scope.
\begin{everbatim*}
\xintFor #1 in {e_1, e_2, e_3, e_4, e} \do {\xintunassignvar {#1}}
% overwriting a dummy letter
@@ -5879,6 +6031,9 @@ recover fully its original meaning as dummy variable in the current scope.
\xinttheiiexpr add(i, i = 1..10)\relax\ ("i" is again a dummy variable)\par
\end{everbatim*}
+Under \csbxint{globaldefstrue} regime the effect of \csa{xintunassignvar} is
+global.
+
\subsubsection{\csh{xintnewdummy}}
\label{xintnewdummy}
@@ -5894,6 +6049,8 @@ For example with Xe\TeX\ or Lua\LaTeX\ the following works:
\xinttheexpr add(ξ, ξ=1..10)\relax
\bye
\end{everbatim}
+Under \csbxint{globaldefstrue} regime the effect of \csa{xintnewdummy} is
+global.
\subsection{User defined functions: \cshnolabel{xintdeffunc},
\cshnolabel{xintdefiifunc}, \cshnolabel{xintdeffloatfunc},
@@ -5914,10 +6071,14 @@ Since release |1.2c| it is possible to declare functions:
and that |x/2y| is interpreted as |x/(2y)|.)
\begin{framed}
- The (dummy) variables used in the function declaration are necessarily single
- letters (lowercase or uppercase) which have \emph{not} been re-declared via
- \csbxint{defvar} as assigned variables. The choice of the letters is entirely
- up to the user and has nil influence on the actual function, naturally.
+ The function names are composed of letters, digits, underscores or |@|
+ signs. A function name must start with a letter. It may be a single letter
+ (see \autoref{sssec:overload}).
+
+ The variables used in the function signature are single letters (lowercase
+ or uppercase) which have \emph{not} been re-declared via \csbxint{defvar} as
+ assigned variables. The choice of the letters is entirely up to the user and
+ has nil influence on the actual function, naturally.
A function can have at most nine variables.
%
@@ -5925,24 +6086,32 @@ and that |x/2y| is interpreted as |x/(2y)|.)
\csbxint{deffunc} makes the function known only to the \csbxint{expr}
parser. See \csbxint{defiifunc} and \csbxint{deffloatfunc} for the two other
parsers.\IMPORTANT
-
- Cryptic error messages will signal failures of using with another parser a
- function declared for one parser (particularly if the name is a single
- letter, because the parser will have made an attempt to use the letter as a
- dummy variable.)
\end{framed}
% \footnotetext{with the current syntax, the |;| as used for |iterr|, |rseq|,
% |rrseq| must be hidden as |{;}| to not be confused with the |;| ending the
% declaration.}
-Currently, it is not possible to define a function of a single variable, say
-|L|, which would stand for a \emph{list} with an undetermined number of
-elements (see \autoref{ssec:lists} for lists). This will perhaps be added in future.
+
+It is perfectly possible to define functions of variables which stand for
+lists (see \autoref{ssec:lists}), or functions defining lists of comma
+separated items. For example the scalar product and cross product of
+3-dimensional vectors can be defined this way:
+\begin{everbatim}
+\xintdeffunc dprod(V, W) := [V][0]*[W][0] + [V][1]*[W][1] + [V][2]*[W][2];
+\xintdeffunc cprod(V, W) := [V][1]*[W][2] - [V][2]*[W][1],
+ [V][2]*[W][0] - [V][0]*[W][2],
+ [V][0]*[W][1] - [V][1]*[W][0];
+\xintdeffunc Det3(U, V, W) := dprod(cprod(U, V), W);
+\end{everbatim}
The mechanism for functions is identical with the one underlying the
-\csbxint{NewExpr} macro. A function once declared is a first class citizen,
-its expression is entirely parsed and converted into a big nested \fexpan
-dable macro. When used its action is via this defined macro. For example
+\csbxint{NewExpr} macro (and has the same
+\hyperref[sssec:limitations]{limitations}). See \csbxint{exprSafeCatcodes} for
+catcode matters.
+
+A function once declared is a first class citizen, its expression is entirely
+parsed and converted into a big nested \fexpan dable macro. When used its
+action is via this defined macro. For example
\begin{everbatim*}
\xintdeffunc
e(z):=(((((((((z/10+1)z/9+1)z/8+1)z/7+1)z/6+1)z/5+1)z/4+1)z/3+1)z/2+1)z+1;
@@ -5959,11 +6128,8 @@ xintMul {\xintAdd {\xintDiv {\xintMul {\xintAdd {\xintDiv {#1}{10}}{1}}{#1}}{9}
{1}}{#1}}{2}}{1}}{#1}}{1}
\end{everbatim}
-This has the same limitations as the \csbxint{NewExpr} macro. See
-\csbxint{exprSafeCatcodes} for catcode matters.
-
-The main problem is that dummy variables are usable only to the extent that
-their values are numerical. For example
+The main problem is that dummy variables in the defining expression are usable
+only to the extent that their values are numerical. For example
%
\centeredline{|\xintdeffunc f(x):=add(i^2,i=1..x);|}
%
@@ -5998,7 +6164,13 @@ iterated over do not depend upon the function parameters:
\label{xintdefiifunc}
With \csbxint{deffunc} the created function is known by the \csbxint{expr}
-parser only. For usage in the \csbxint{iiexpr} parser, it is required to use
+parser only.
+ Cryptic error messages will signal failures of using with another parser a
+ function declared for one parser (particularly if the name is a single
+ letter, because the parser will have made an attempt to use the letter as a
+ dummy variable.)
+
+For usage in the \csbxint{iiexpr} parser, it is required to use
\csa{xintdefiifunc}.
\subsubsection{\csh{xintdeffloatfunc}}
@@ -6008,6 +6180,22 @@ With \csbxint{deffunc} the created function is known by the \csbxint{expr}
parser only. For usage in the \csbxint{floatexpr} parser, it is required to use
\csa{xintdeffloatfunc}.
+\subsubsection{\csh{xintunassignexprfunc}, \csh{xintunassigniiexprfunc},
+ \csh{xintunassignfloatexprfunc}}
+\label{xintunassignexprfunc}
+\label{xintunassigniiexprfunc}
+\label{xintunassignfloatexprfunc}
+
+Function names can be unassigned via \csa{xintunassignexprfunc}\marg{name},
+\csa{xintunassigniiexprfunc}\marg{name}, and
+\csa{xintunassignfloatexprfunc}\marg{name}.\NewWith{1.3d}
+\begin{everbatim*}
+\xintunassignexprfunc{e}
+\xintunassignexprfunc{f}
+\end{everbatim*}
+
+Warning: no check is done to avoid undefining built-in functions...
+
\subsubsection{\csh{ifxintverbose} conditional}
\label{xintverbosetrue}
\label{xintverbosefalse}
@@ -6038,8 +6226,7 @@ xintDiv {\xintMul {\xintAdd {\xintDiv {\xintMul {\xintAdd {\xintDiv {\xintMul {
Starting with |1.2d| the definitions made by \csbxint{NewExpr} have local
scope, hence this is also the case with the definitions made by
-\csbxint{deffunc}.\IMPORTANT{} One can not ``undeclare'' a function, but
-naturally one can provide a new definition for it.
+\csbxint{deffunc}. See also \csb{ifxintglobaldefs} conditional.
\subsubsection{Functions expanding to comma separated values}
@@ -6062,21 +6249,27 @@ and we can check that they work:
\xinttheexpr f(10)\relax; \xinttheexpr g(10)\relax
\end{everbatim*}
-N.B.: we declared in this section |e|, |f|, |g| as functions. Except naturally
-if the function declarations are done in a group or a \LaTeX{} environment
-whose scope has ended, they can not be completely undone, and if |e|, |f|, or
-|g| are used as dummy variables the tacit multiplication in front of
-parentheses will not be applied, it is their function interpretation which will
-prevail. However, with an explicit |*| in front of the opening parenthesis, it
-does work:
+N.B.: we have declared in this section |f| and |g| as functions. They remain
+usable as dummy variables, but tacit multiplication in front of parentheses is
+dropped, in order for their function meanings to prevail.
+
+\begin{everbatim*}
+\xintdeffunc f(x):=x^2;
+\xinttheexpr seq(f(f+f), f= 1..10)\relax\newline % f is used both as function and dummy variable
+\xinttheexpr seq(f*(f+f), f= 1..10)\relax % f is used as dummy variable
+\xintunassignexprfunc{f}\newline % drop meaning as function
+\xinttheexpr seq(f(f+f), f= 1..10)\relax % f as dummy variable, tacit multiplication applies
+\end{everbatim*}
+
+Cleaning up:
\begin{everbatim*}
-\xinttheexpr add(f*(f+f), f= 1..10)\relax % f is used as variable, not as a function.
+\xintunassignexprfunc{g}%
\end{everbatim*}
\subsubsection{\csh{ifxintglobaldefs} conditional}
\label{xintglobaldefstrue}
\label{xintglobaldefsfalse}
-\label{ifxintglobaldes}
+\label{ifxintglobaldefs}
If true user defined variables (\csbxint{defvar}, ...) and functions
(\csbxint{deffunc}, ...) for the expression parsers,\NewWith{1.3c} as well as
@@ -6115,6 +6308,7 @@ precision for the evaluation.
\end{everbatim*}
\subsubsection{Using the same name for both a variable and a function}
+\label{sssec:overload}
It is licit to overload a variable name (all Latin letters are predefined as
dummy variables) with a function name and vice versa. The parsers will decide
@@ -6125,6 +6319,7 @@ from the context if the function or variable interpretation must be used
\xinttheiiexpr add(f(f),f=100..120)\relax\newline
\xintdeffunc f(x,y):=x^2+y^2;
\xinttheexpr mul(f(f(f,f),f(f,f)),f=1..10)\relax
+\xintunassigniiexprfunc{f}\xintunassignexprfunc{f}%
\end{everbatim*}
\subsubsection{Recursive definitions}
@@ -6140,13 +6335,17 @@ which may be fractions. For example:
\begin{everbatim*}
\xinttheexpr GCD(385/102, 605/238)\relax
\end{everbatim*}
-There is already (with \xintgcdname loaded) a built-in \func{gcd} (which
-accepts arbitrarily many arguments), but it is the integer-valued one (and it
-truncates its arguments to integers when used in |\xintexpr|).
+
+But there is already a built-in \func{gcd} (which
+accepts arbitrarily many arguments):
\begin{everbatim*}
-\xinttheexpr gcd(385/102, 605/238)\relax % no good!, does gcd(3, 2)
+\xinttheexpr gcd(385/102, 605/238)\relax
\end{everbatim*}
+Since |1.3d| the built-in \func{gcd} accepts inputs being fractions and
+produces the positive generator of the corresponding fractional ideal. And
+loading of \xintgcdname is not needed for this function to be available.\NewWith{1.3d}
+
Our second example is modular exponentiation:
\begin{everbatim*}
\xintdefiifunc powmod_a(x, m, n) :=
@@ -6412,7 +6611,7 @@ for readability of long numbers.}
We will see in this section how to chain |\xintexpr|-essions with
|\expandafter|'s, like it is possible with |\numexpr|. For this it is
-convenient to use |\romannumeral0\xinteval| which is the once-expanded form of
+convenient to use |\romannumeral0\xintexpro| which is the once-expanded form of
|\xintexpr|, as we can then chain using only one |\expandafter| each time.
For example, here is the code employed
@@ -6424,10 +6623,10 @@ number:
\def\Fibonacci #1{% \Fibonacci{N} computes F(N) with F(0)=0, F(1)=1.
\expandafter\Fibonacci_a\expandafter
{\the\numexpr #1\expandafter}\expandafter
- {\romannumeral0\xintiieval 1\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval 1\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval 1\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval 0\relax}}
+ {\romannumeral0\xintiiexpro 1\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro 1\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro 1\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro 0\relax}}
%
\def\Fibonacci_a #1{%
\ifcase #1
@@ -6444,15 +6643,15 @@ number:
}% * signs are omitted from the next macros, tacit multiplications
\def\Fibonacci_b_i #1#2#3{\expandafter\Fibonacci_a\expandafter
{\the\numexpr #1/2\expandafter}\expandafter
- {\romannumeral0\xintiieval sqr(#2)+sqr(#3)\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval (2#2-#3)#3\relax}%
+ {\romannumeral0\xintiiexpro sqr(#2)+sqr(#3)\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro (2#2-#3)#3\relax}%
}% end of Fibonacci_b_i
\def\Fibonacci_b_ii #1#2#3#4#5{\expandafter\Fibonacci_a\expandafter
{\the\numexpr (#1-1)/2\expandafter}\expandafter
- {\romannumeral0\xintiieval sqr(#2)+sqr(#3)\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval (2#2-#3)#3\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval #2#4+#3#5\expandafter\relax\expandafter}\expandafter
- {\romannumeral0\xintiieval #2#5+#3(#4-#5)\relax}%
+ {\romannumeral0\xintiiexpro sqr(#2)+sqr(#3)\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro (2#2-#3)#3\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro #2#4+#3#5\expandafter\relax\expandafter}\expandafter
+ {\romannumeral0\xintiiexpro #2#5+#3(#4-#5)\relax}%
}% end of Fibonacci_b_ii
% code as used on title page:
%\def\Fibonacci_end_i #1#2#3#4#5{\xintthe#5}
@@ -6461,9 +6660,9 @@ number:
\def\Fibonacci_end_i #1#2#3#4#5{{#4}{#5}}% {F(N+1)}{F(N)} in \xintexpr format
\def\Fibonacci_end_ii #1#2#3#4#5%
{\expandafter
- {\romannumeral0\xintiieval #2#4+#3#5\expandafter\relax
+ {\romannumeral0\xintiiexpro #2#4+#3#5\expandafter\relax
\expandafter}\expandafter
- {\romannumeral0\xintiieval #2#5+#3(#4-#5)\relax}}% idem.
+ {\romannumeral0\xintiiexpro #2#5+#3(#4-#5)\relax}}% idem.
% \FibonacciN returns F(N) (in encapsulated format: needs \xintthe for printing)
\def\FibonacciN {\expandafter\xint_secondoftwo\romannumeral-`0\Fibonacci }%
\catcode`_ 8
@@ -6492,9 +6691,9 @@ numbers, it is only for validating \csa{FibonacciN}).
\end{everbatim}
\endgroup
-The way we use |\expandafter|'s to chain successive |\xintiieval| evaluations
+The way we use |\expandafter|'s to chain successive |\xintiiexpro| evaluations
is exactly analogous to what is possible with |\numexpr|. The various
-|\romannumeral0\xintiieval| could very well all have been |\xintiiexpr|'s but
+|\romannumeral0\xintiiexpro| could very well all have been |\xintiiexpr|'s but
then we would have needed |\expandafter\expandafter\expandafter| each
time.
@@ -6543,7 +6742,7 @@ using |\Fibonacci| for the first two and then using the standard recursion
{#3}\unless\ifnum #1<#4 \Fibonacci_Seq_end\fi
\expandafter\Fibonacci_Seq_loop\expandafter
{\the\numexpr #1+1\expandafter}\expandafter
- {\romannumeral0\xintiieval #2+#3\relax}{#2}{#4}%
+ {\romannumeral0\xintiiexpro #2+#3\relax}{#2}{#4}%
}%
\def\Fibonacci_Seq_end\fi\expandafter\Fibonacci_Seq_loop\expandafter
#1\expandafter #2#3#4{\fi {#3}}%
@@ -6564,7 +6763,7 @@ using |\Fibonacci| for the first two and then using the standard recursion
{#3}\unless\ifnum #1<#4 \Fibonacci_Seq_end\fi
\expandafter\Fibonacci_Seq_loop\expandafter
{\the\numexpr #1+1\expandafter}\expandafter
- {\romannumeral0\xintiieval #2+#3\relax}{#2}{#4}%
+ {\romannumeral0\xintiiexpro #2+#3\relax}{#2}{#4}%
}%
\def\Fibonacci_Seq_end\fi\expandafter\Fibonacci_Seq_loop\expandafter
#1\expandafter #2#3#4{\fi {#3}}%
@@ -7597,7 +7796,8 @@ write to the log and terminal.
need%
%
\footnote{The
- \csa{xintiiGCD} macro is provided by the \xintgcdname package.}
+ \csa{xintiiGCD} macro is provided by both the \xintgcdname package (since
+ |1.0|) and by the \xintname package (since |1.3d|).}
%
\begin{everbatim}
$\xintiiGCD{\theFibonacciN{1859}}{\theFibonacciN{1573}}=%
@@ -9402,14 +9602,14 @@ let's raise a 100 times a random integer to the tenth power:
\begin{everbatim*}
\pdfsetrandomseed 12345678
\pdfresettimer\romannumeral\xintreplicate
- {100}{\fdef\x{\xintiiPow{\xintUniformDeviate{100000000}}{10}}}%
+ {100}{\fdef\foo{\xintiiPow{\xintUniformDeviate{100000000}}{10}}}%
\the\dimexpr\pdfelapsedtime sp\relax\space (with \string\xintUniformDeviate)\newline
-(last result: \x)\newline
+(last result: \foo)\newline
\pdfsetrandomseed 12345678
\pdfresettimer\romannumeral\xintreplicate
- {100}{\fdef\x{\xintiiPow{\pdfuniformdeviate 100000000}{10}}}%
+ {100}{\fdef\foo{\xintiiPow{\pdfuniformdeviate 100000000}{10}}}%
\the\dimexpr\pdfelapsedtime sp\relax\space (with \string\pdfuniformdeviate)\newline
-(last result: \x)\par
+(last result: \foo)\par
\end{everbatim*}
\TeXnote
@@ -9422,6 +9622,9 @@ possibly by the range being a power of 10.
\clearpage
\let\xintkernelnameUp\undefined
\csname xintcorenameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xintcorename package}
\RaisedLabel{sec:core}
@@ -9739,6 +9942,9 @@ called |\xintiCmp| actually),
\clearpage
\let\xintcorenameUp\undefined
\csname xintnameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xintname package}
\RaisedLabel{sec:xint}
@@ -9792,6 +9998,10 @@ Prior to release |1.2o|, \xintname defined additional macros which applied
\csbxint{Num} to their input arguments. All these macros were deprecated at
|1.2o| and have been removed at |1.3|.\CHANGED{1.3}
+At |1.3d| macros \csbxint{iiGCD} and \csbxint{iiLCM} from package \xintgcdname
+are also available from loading \xintname only. They are support macros for
+the (multi-arguments) functions \func{gcd} and \func{lcm} in \csbxint{iiexpr}.
+
See \autoref{ssec:expansions} for the significance of the
\textcolor[named]{PineGreen}{\Numf}, \textcolor[named]{PineGreen}{\emph{f}},
\textcolor[named]{PineGreen}{\numx} and \textcolor[named]{PineGreen}{$\star$}
@@ -9815,6 +10025,8 @@ overhead then.
\subsection{\csh{xintReverseDigits}} \label{xintReverseDigits}
+\the\dp\strutbox, \the\ht\strutbox, \the\baselineskip
+
|\xintReverseDigits|\n\etype{f} will reverse the order of the digits of the
number. \csa{xintRev} is the former denomination and is kept as an alias.
Leading zeroes resulting from the operation are not removed. Contrarily to
@@ -9833,6 +10045,14 @@ upfront in the output.
\end{everbatim*}
\endgroup
+\subsection{\csh{xintiiGCD}}
+
+This is the same as the \csbxint{iiGCD} from package \xintgcdname.
+
+\subsection{\csh{xintiiLCM}}
+
+This is the same as the \csbxint{iiLCM} from package \xintgcdname.
+
\subsection{\csh{xintDecSplit}}
\label{xintDecSplit}
@@ -10478,6 +10698,9 @@ result from \csbxint{UniformDeviate}|{100000000}| but with less overhead.
\clearpage
\let\xintnameUp\undefined
\csname xintfracnameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xintfracname package}
\RaisedLabel{sec:frac}
@@ -10494,9 +10717,6 @@ denominator among various terms, even though some may be reducible.
\localtableofcontents
-\def\x{|{x}|}
-
-
\xintfracname loads automatically \xintcorename and \xintname and inherits
their macro definitions. Only these two are redefined:
\hyperref[xintNumFrac]{\string\xintNum} and
@@ -11317,8 +11537,8 @@ integers only with no need of normalization, is available as \csbxint{iiMax}:
\subsection{\csh{xintMin}}\label{xintMin}
-The maximum of two fractions.\etype{\Ff\Ff} Beware that |\xintMax {2}{3}|
-produces \dtt{\xintMax {2}{3}}. The original, for use with
+The minimum of two fractions.\etype{\Ff\Ff} Beware that |\xintMin {2}{3}|
+produces \dtt{\xintMin {2}{3}}. The original, for use with
integers only with no need of normalization, is available as \csbxint{iiMin}:
|\xintiiMin {2}{3}=|\dtt{\xintiiMin {2}{3}}.\etype{ff}
@@ -11867,6 +12087,9 @@ general tokens (or rather braced items).
\clearpage
\let\xintfracnameUp\undefined
\csname xintexprnameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xintexprname package}%
\RaisedLabel{sec:expr}
@@ -11876,25 +12099,29 @@ The \xintexprname package was first released with version |1.07|
(|2013/05/25|) of the \xintname bundle. It was substantially enhanced with
release |1.1| from |2014/10/28|.
-Release |1.2| removed a limitation to numbers of at most $5000$ digits, among
-other changes.
-
The package loads automatically \xintfracname and \xinttoolsname.
\begin{itemize}
-\item for using the \func{gcd} and \func{lcm} functions, it is necessary to
- load package \xintgcdname.
+\item |1.3d| adds \csbxint{eval}, \csbxint{ieval}, \csbxint{iieval},
+ \csbxint{floateval}.\NewWith{1.3d}
+\item for the \func{gcd} and \func{lcm} functions, it is NOT necessary anymore
+ to
+ load package \xintgcdname. And they now work not only with integers:\NewWith{1.3d}
+\begin{everbatim*}
+\xinttheiiexpr lcm (2^5*7*13^10*17^5,2^3*13^15*19^3,7^3*13*23^2)\relax\newline
+\end{everbatim*}%
+but also with fractions:\IMPORTANT
\begin{everbatim*}
-\xinttheexpr lcm (2^5*7*13^10*17^5,2^3*13^15*19^3,7^3*13*23^2)\relax
+\xinttheexpr lcm(7/300, 11/150, 13/60), gcd(7/300, 11/150, 13/60)\relax\par
\end{everbatim*}
-\item for allowing hexadecimal numbers (uppercase letters) on input, it is necessary
- to load package \xintbinhexname.
+\item for allowing hexadecimal (uppercase letters only) input, it is \emph{necessary}
+ to load package \xintbinhexname.\IMPORTANT
\begin{everbatim*}
\xinttheexpr "A*"B*"C*"D*"D*"F, "FF.FF, reduce("FF.FFF + 16^-3)\relax
\end{everbatim*}
\end{itemize}
Please refer to \autoref{sec:xintexprsyntax} for a more detailed description
-of the syntax elements for expressions.
+of some syntax elements.
\subsection{The \csh{xintexpr} expressions}
\label{xintexpr}
@@ -12014,7 +12241,9 @@ operators and functions. This section now adds some complementary information.
\item There is also \csbxint{boolexpr}| ... \relax| and
\csbxint{theboolexpr}| ... \relax|. Same as |\xintexpr| with the final
- result converted to $1$ if it is not zero. See also
+ result converted to $1$ if it is not zero.
+
+\item See also
\csbxint{ifboolexpr} (\autoref{xintifboolexpr}) and the
\func{bool} and \func{togl} functions
in \autoref{sec:expr}. Here is an example:
@@ -12034,6 +12263,8 @@ operators and functions. This section now adds some complementary information.
This example used for efficiency \csbxint{NewBoolExpr}. See also the
\autoref{xintNewExpr}.
+\item See also \csbxint{ifsgnexpr}.
+
\item There is \csbxint{floatexpr}| ... \relax| where the algebra is done
in floating point approximation (also for each intermediate result). Use the
syntax |\xintDigits:=N;| to set the precision. Default: $16$ digits.
@@ -12199,7 +12430,7 @@ is not the same within such macro arguments.
-\subsection{Expandability, \csh{xinteval}}
+\subsection{Expandability, \csh{xintexpro}}
As is the case with all other package macros |\xintexpr| \fexpan ds (in two
steps) to its final (non-printable) result; and |\xinttheexpr| \fexpan ds (in
@@ -12215,11 +12446,12 @@ more compact representation (five tokens) than |\xinttheexpr| or
The material between |\xintexpr| and |\relax| should contain only expandable
material.
-The once expanded |\xintexpr| is |\romannumeral0\xinteval|. And there is
-similarly |\xintieval|, |\xintiieval|, and |\xintfloateval|. For the other
-cases one can use |\romannumeral-`0| as prefix. For an example of expandable
-algorithms making use of chains of |\xinteval|-uations connected via
-|\expandafter| see \autoref{ssec:fibonacci}.
+The once expanded |\xintexpr| is |\romannumeral0\xintexpro|.\CHANGED{1.3d}
+\centeredline{ATTENTION! Formerly the |\xintexpro| macro was named
+ |\xinteval|. But this |\xinteval| is now something else.} And there
+is similarly |\xintiexpro| (formerly |\xintieval|), |\xintiiexpro| (formerly
+|\xintiieval|), and |\xintfloatexpro| (formerly |\xintfloateval|). For an
+example see \autoref{ssec:fibonacci}.
An expression can only be legally finished by a |\relax| token, which
will be absorbed.
@@ -12483,6 +12715,58 @@ precision of the output; and similarly the power macros and the
square root macro. This does not modify anything for computations with
arguments having at most |P| significant places already.
+\subsection{\csh{xinteval}, \csh{xintieval}, \csh{xintiieval},
+ \csh{xintfloateval}}
+\label{xinteval}\label{xintieval}\label{xintiieval}\label{xintfloateval}
+
+\begin{framed}
+ Prior to |1.3d|,\NewWithf{1.3d} these macros existed but with a different meaning: they
+ arose in the once-expanded \csbxint{expr}, etc..., i.e. one had:
+\begin{everbatim}
+\def\xintexpr{\romannumeral0\xinteval}
+\end{everbatim}
+ The\IMPORTANTf\ old macros were renamed into \csa{xintexpro}, etc..., in order to free
+ their names for new meanings, more alike what one finds in
+ other math packages.
+\end{framed}
+
+\csbxint{eval}\etype{x} is an \fexpan dable macro which is basically defined
+like this:
+\begin{everbatim}
+\def\xinteval#1{\romannumeral-`0\xinttheexpr#1\relax}
+\end{everbatim}
+so it expands in two steps exactly like \csbxint{theexpr} (its
+exact definition differs from the above to achieve a slight optimization).
+\begin{everbatim*}
+\xinteval{add(x^2, x = 100..110), add(x^3, x = 100..110)}
+\end{everbatim*}
+
+\csbxint{ieval}\etype{x} is similarly related to \csbxint{theiexpr}. Its optional
+argument must be located inside the braces:
+\begin{everbatim*}
+\xintieval{[7] 355/113}
+\end{everbatim*}
+
+\csbxint{iieval}\etype{x} is similarly related to \csbxint{theiiexpr}.
+\begin{everbatim*}
+\xintiieval{add(x^2, x = 100..110), add(x^3, x = 100..110)}
+\end{everbatim*}
+
+\csbxint{floateval}\etype{x} is similarly related to \csbxint{thefloatexpr}. Its optional
+argument must be located inside the braces:
+\begin{everbatim*}
+\xintfloateval{[7] 355/113}
+\end{everbatim*}
+
+These macros are useful when one uses some extra wrapper doing some parsing of
+its input, like the |\num| macro of
+\href{http://ctan.org/pkg/siunitx}{siunitx}, which would choke on some of the
+syntax elements allowed inside \csb{xintexpr}|...\relax| (for example
+brackets).
+As shown in the above examples, these macros, like the underlying parsers
+accept arbitrarily many comma separated expressions.
+
+
\subsection{Using an expression parser within another one}
This was already illustrated before. In the following:
@@ -12514,10 +12798,12 @@ from \csbxint{expr} and \csbxint{floatexpr} can not be used directly in
\label{xintthecoords}
It converts a comma separated list into the format for list of coordinates as
-expected by the |TikZ| |coordinates| syntax. The code had to work around the
+expected by the |TikZ| |coordinates| syntax.%
+%
+\footnote{The implementation had to work around the
problem that |TikZ| seemingly allows only a maximal number of about one
-hundred expansion steps for the list to be entirely produced. Presumably to
-catch an infinite loop.
+hundred expansion steps for the list to be entirely produced.}%
+%
\begin{everbatim*}
\begin{figure}[htbp]
\centering\begin{tikzpicture}[scale=10]\xintDigits:=8;
@@ -12535,43 +12821,65 @@ catch an infinite loop.
% Notice: if x goes no take exactly value 1 or -1, the origin appears slightly
% off the curve, not MY fault!!!
-\csbxint{thecoords} should be followed immediately by \csbxint{floatexpr} or
-\csbxint{iexpr} or \csbxint{iiexpr}, but not |\xintthefloatexpr|, etc\dots
+As examplified above, \csbxint{thecoords} is to be used followed immediately
+by either \csbxint{floatexpr} or \csbxint{iexpr} or \csbxint{iiexpr}. See
+\url{https://tex.stackexchange.com/a/447290} for another example.
-Besides, as |TikZ| will not understand the |A/B[N]| format which is used on
-output by |\xintexpr|, |\xintexpr| is not really usable with |\xintthecoords|
-for a |TikZ| picture, but one may use it on its own, and the reason for the
-spaces in and between coordinate pairs is to allow if necessary to print on
-the page for examination with about correct line-breaks.
+As |TikZ| will not understand the |A/B[N]| format which is used on output by
+|\xintexpr|, |\xintthecoords\xintexpr| has no use inside a |TikZ| picture but
+may have other usages; the reason for the spaces in output is to allow if
+necessary to print on the page for examination and give \TeX\ a change to
+establish line-breaks.
\begin{everbatim*}
\edef\x{\xintthecoords \xintexpr rrseq(1/2,1/3; @1+@2, x=1..20)\relax }
\meaning\x +++
\end{everbatim*}
+\subsection{\csh{xintifboolexpr}, \csh{xintifboolfloatexpr}, \csh{xintifbooliiexpr}}
+\label{xintifboolexpr}
+\label{xintifboolfloatexpr}
+\label{xintifbooliiexpr}
+
+\csh{xintifboolexpr}\marg{expr}\marg{YES}\marg{NO}\etype{xnn} does
+\csbxint{theexpr}<expr>|\relax| and then executes the \meta{YES} or the
+\meta{NO} branch depending on whether the outcome was non-zero or zero. Thus
+one can read \emph{if bool expr} as meaning \emph{if not zero}:
+\centeredline{if \meta{expr}-ession does not vanish do \meta{YES} else do
+ \meta{NO}}
-\subsection{\csh{xintifboolexpr}}\label{xintifboolexpr}
+The expression is not limited to using only comparison operators and Boolean
+logic (|<|, |>|, |==|, |!=|, |&&|, \verb+||+, \func{all}, \func{any},
+\func{xor}, \func{bool}, \func{togl}, ...), it can be the most general
+computation.
-\csh{xintifboolexpr}|{<expr>}{YES}{NO}|\etype{xnn} does |\xinttheexpr
-<expr>\relax| and then executes the |YES| or the |NO| branch depending on
-whether the outcome was non-zero or zero. |<expr>| can involve various |&| and
-\verb+|+, parentheses, |all|, |any|, |xor|, the |bool| or |togl| operators, but
-is not limited to them: the most general computation can be done, the test is on
-whether the outcome of the computation vanishes or not.
+\csh{xintifboolfloatexpr}\marg{expr}\marg{YES}\marg{NO}\etype{xnn} does
+\csbxint{thefloatexpr}\meta{expr}|\relax| and then executes the \meta{YES} or the
+\meta{NO} branch depending on whether the outcome was non zero or zero.
-Will not work on an expression composed of comma separated sub-expressions.
+\csh{xintifbooliiexpr}\marg{expr}\marg{YES}\marg{NO}\etype{xnn} does
+\csbxint{theiiexpr}\meta{expr}|\relax| and then executes the \meta{YES} or the
+\meta{NO} branch depending on whether the outcome was non zero or zero.
-\subsection{\csh{xintifboolfloatexpr}}\label{xintifboolfloatexpr}
+The expression argument must be a single one, comma separated sub-expressions
+will cause low-level errors.
-\csh{xintifboolfloatexpr}|{<expr>}{YES}{NO}|\etype{xnn} does |\xintthefloatexpr
-<expr>\relax| and then executes the |YES| or the |NO| branch depending on
-whether the outcome was non zero or zero.
+\subsection{\csh{xintifsgnexpr}, \csh{xintifsgnfloatexpr}, \csh{xintifsgniiexpr}}
+\label{xintifsgnexpr}
+\label{xintifsgnfloatexpr}
+\label{xintifsgniiexpr}
-\subsection{\csh{xintifbooliiexpr}}\label{xintifbooliiexpr}
+\csh{xintifsgnexpr}\marg{expr}\marg{<0}\marg{=0}\marg{>0}\etype{xnnn} evaluates
+the \csbxint{expr}ession and chooses the branch corresponding to its sign.
-\csh{xintifbooliiexpr}|{<expr>}{YES}{NO}|\etype{xnn} does |\xinttheiiexpr
-<expr>\relax| and then executes the |YES| or the |NO| branch depending on
-whether the outcome was non zero or zero.
+\csh{xintifsgnfloatexpr}\marg{expr}\marg{<0}\marg{=0}\marg{>0}\etype{xnnn} evaluates
+the \csbxint{floatexpr}ession and chooses the branch corresponding to its sign.
+
+\csh{xintifsgniiexpr}\marg{expr}\marg{<0}\marg{=0}\marg{>0}\etype{xnnn} evaluates
+the \csbxint{iiexpr}ession and chooses the branch corresponding to its sign.\NewWith{1.3d}
+
+The expression argument must be a single one, comma separated sub-expressions
+will cause low-level errors.
\subsection{The \csh{xintNewExpr} macro}
\label{xintNewExpr}
@@ -12896,7 +13204,7 @@ All the preceeding applies identically for \csbxint{deffunc}, \csbxint{defiifunc
the letters used as function arguments.
There is a final syntax restriction which however applies only to
-\csa{xintNewExpr} et. al., and not to \csa{xintdeffunc}, \csa{xintdefiifunc},
+\csa{xintNewExpr} et al., and not to \csa{xintdeffunc}, \csa{xintdefiifunc},
\csa{xintdeffloatfunc} : it is possible to use sub-expressions only if they use
\csa{xintexpr}, those with \csa{xinttheexpr} are illegal.
\begin{everbatim*}
@@ -13069,6 +13377,9 @@ principles are necessarily different due to the aim of achieving expandability.
\clearpage
\let\xintexprnameUp\undefined
\csname xintbinhexnameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xintbinhexname package}
\RaisedLabel{sec:binhex}
@@ -13245,6 +13556,9 @@ $000000001111101001010001\xrightarrow{\text{\string\xintBinToHex}}
\clearpage
\let\xintbinhexnameUp\undefined
\csname xintgcdnameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xintgcdname package}
\RaisedLabel{sec:gcd}
@@ -13260,21 +13574,35 @@ integers.
Since release |1.1|, the two ``|typeset|'' macros require the explicit
loading by the user of package \xinttoolsname.
+At |1.3d| macros \csbxint{iiGCD} and \csbxint{iiLCM} are copied over to
+\xintname, hence \func{gcd} and \func{lcm} functions in \csbxint{iiexpr} are
+available simply from loading \xintexprname, \xintgcdname is not
+needed.\NewWith{1.3d}
+
%% \clearpage
-\subsection{\csh{xintGCD}, \csh{xintiiGCD}}\label{xintGCD}\label{xintiiGCD}
+\subsection{\csh{xintiiGCD}}\label{xintiiGCD}
-|\xintGCD|\n\m\etype{\Numf\Numf} computes the greatest common divisor. It is
+|\xintiiGCD|\n\m\etype{ff} computes the greatest common divisor. It is
positive, except when both |N| and |M| vanish, in which case the macro returns
zero.
%
-\leftedline{\csa{xintGCD}|{10000}{1113}|\dtt{=\xintGCD{10000}{1113}}}
+\leftedline{\csa{xintiiGCD}|{10000}{1113}|\dtt{=\xintiiGCD{10000}{1113}}}
%
\leftedline{|\xintiiGCD{123456789012345}{9876543210321}=|\dtt
{\xintiiGCD{123456789012345}{9876543210321}}}
-\csa{xintiiGCD} skips the \csbxint{Num} overhead.\etype{ff}
+With release |1.3d|, this macro is also available from loading
+\xintname\NewWith{1.3d}, hence also with \xintexprname, as it used by the
+\func{gcd} function in \csbxint{iiexpr}, hence removes a dependency of
+\xintexprname on \xintgcdname.
+
+\subsection{\csh{xintGCD}}\label{xintGCD}
+
+\csa{xintGCD} uses \csbxint{Num} overhead to make its arguments into strict
+integers\etype{\Numf\Numf} first. With \xintfracname loaded this conversion
+means truncation to integers.
\subsection{\csh{xintGCDof}}\label{xintGCDof}
@@ -13282,12 +13610,27 @@ zero.
integers |a|, |b|, \dots{} The list argument
may be a macro, it is \fexpan ded first and must contain at least one item.
-\subsection{\csh{xintLCM}, \csh{xintiiLCM}}\label{xintLCM}\label{xintiiLCM}
+\subsection{\csh{xintiiLCM}}\label{xintiiLCM}
+
+|\xintiiLCM|\n\m\etype{ff} computes the least common multiple of integers. It
+is positive, except if one |N| or |M| vanishes, in which case the macro
+returns zero.
+%
+\leftedline{\csa{xintiiLCM}|{10000}{1113}|\dtt{=\xintiiLCM{10000}{1113}}}
+%
+\leftedline{|\xintiiLCM{123456789012345}{9876543210321}=|\dtt
+ {\xintiiLCM{123456789012345}{9876543210321}}}
+
+With release |1.3d|, this macro is also available from loading
+\xintname\NewWith{1.3d}, hence also with \xintexprname, as it used by the
+\func{lcm} function in \csbxint{iiexpr}, hence removes a dependency of
+\xintexprname on \xintgcdname.
-|\xintGCD|\n\m\etype{\Numf\Numf} computes the least common multiple. It is
-|0| if one of the two integers vanishes.
+\subsection{\csh{xintLCM}}\label{xintLCM}
-\csa{xintiiLCM} skips the \csbxint{Num} overhead.\etype{ff}
+\csa{xintLCM} uses \csbxint{Num} overhead to make its arguments into strict
+integers\etype{\Numf\Numf} first. With \xintfracname loaded this conversion
+means truncation to integers.
\subsection{\csh{xintLCMof}}\label{xintLCMof}
@@ -13365,6 +13708,9 @@ macro and modify it to what is needed.
\clearpage
\let\xintgcdnameUp\undefined
\csname xintseriesnameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xintseriesname package}
\RaisedLabel{sec:series}
@@ -14312,6 +14658,9 @@ always do it on a value computed with |D+1| truncation.
\clearpage
\let\xintseriesnameUp\undefined
\csname xintcfracnameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xintcfracname package}
\RaisedLabel{sec:cfrac}
@@ -15064,16 +15413,15 @@ $1$ or $-1$.
\clearpage
\let\xintcfracnameUp\undefined
\csname xinttoolsnameUp\endcsname
+\def\n{|{N}|}
+\def\m{|{M}|}
+\def\x{|{x}|}
\section{Macros of the \xinttoolsname package}
\RaisedLabel{sec:tools}
\localtableofcontents
-\def\n{|{N}|}
-\def\m{|{M}|}
-\def\x{|{x}|}
-
These utilities used to be provided within the \xintname package; since |1.09g|
(|2013/11/22|) they have been moved to an independently usable package
\xinttoolsname, which has none of the \xintname facilities regarding big
@@ -15149,13 +15497,16 @@ However, it is assumed that \meta{stuff} does not contain (except inside braced
sub-material) space tokens of character code distinct from $32$.
It expands in two steps, and if the goal is to apply it to the
-expansion text of |\x| to define |\y|, then one should do:
-|\expandafter\def\expandafter\y\expandafter
- {\romannumeral0\expandafter\xintzapfirstspaces\expandafter{\x}}|.
+expansion text of |\x| to define |\y|, then one can do:
+|\odef\y{\romannumeral0\expandafter\xintzapfirstspaces\expandafter{\x}}|
+(one can also define a wrapper macro to |\xintZapFirstSpaces| in order to
+expand once the argument first, but \xinttoolsname not being a programming
+layer, it provides no «Generate Variants» facilities).
-Other use case: inside a macro as |\edef\x{\xintZapFirstSpaces {#1}}| assuming
-naturally that |#1| is compatible with such an |\edef| once the leading spaces
-have been stripped.
+Other use case: inside a macro which received a parameter |#1|, one can do
+|\oodef\x{\xintZapFirstSpaces {#1}}|, or, if |#1|, after leading spaces have
+been stripped can accept |\edef| expansion, one can do
+|\edef\x{\xintZapFirstSpaces{#1}}|.
\begingroup
\def\x { \a { \X } { \b \Y } }
@@ -16798,10 +17149,29 @@ be treated as first item) number.
This is \expandafter|\xintbndlversion| of \expandafter|\xintbndldate|.
\begin{itemize}
+\item Release |1.3d| of |2019/01/06|:
+ \begin{itemize}[nosep]
+\item \csbn{gcd()} and \csbn{lcm()} in \csbxint{expr}|...\relax| now handle
+ general arguments, without converting them to integers,
+\item it is not needed anymore to load package \xintgcdnameimp to benefit from
+ \csbn{gcd()} and \csbn{lcm()} in the parsers,
+\item \csbxint{unassignvar} slightly refactored,
+\item \csbxint{ifsgnexpr}, \csbxint{ifsgnfloatexpr}, \csbxint{ifsgniiexpr},
+\item \csbxint{unassignexprfunc} and variants for the other parsers,
+\item \csbn{isone()} and \csbn{isint()},
+\item \csbxint{eval}, \csbxint{ieval}, \csbxint{iieval}, and
+ \csbxint{floateval} (attention that these macros previously existed with
+ different meanings, now available under new names \csbxint{expro},
+ \csbxint{iexpro}, \csbxint{iiexpro}, and \csbxint{floatexpro}),
+\item sadly, in \csbxint{iiexpr}|...\relax| division with a zero dividend and
+ a one-digit divisor got broken at |1.2p|. Fixed. Thanks to \textsc{Kpym} for
+ report. Sorry for long delay in releasing the bugfix, which was done shortly
+ after |1.3c| release.
+ \end{itemize}
\item Release |1.3c| of |2018/06/17|:
\begin{itemize}[nosep]
\item \csbxint{globaldefstrue} to give global scope to definitions done by
- \csbxint{defvar}, \csbxint{deffunc}, \csbxint{NewExpr}, et.\@ al.
+ \csbxint{defvar}, \csbxint{deffunc}, \csbxint{NewExpr}, et al.
\item \csbn{qraw()} to allow bypassing the normal mode of functioning
and reduce memory footprint from parsing (very many) comma separated
numerical items.
@@ -17153,7 +17523,7 @@ math shift catcode.
\fi
\XINT_providespackage
\ProvidesPackage {xintkernel}%
- [2018/06/17 1.3c Paraphernalia for the xint packages (JFB)]%
+ [2019/01/06 1.3d Paraphernalia for the xint packages (JFB)]%
% \end{macrocode}
% \subsection{Constants}
% \begin{macrocode}
@@ -17237,10 +17607,10 @@ math shift catcode.
\long\def\xint_firstofone #1{#1}%
\long\def\xint_firstoftwo #1#2{#1}%
\long\def\xint_secondoftwo #1#2{#2}%
-\let\xint_gobble_thenstop\xint_gob_andstop_i
-\long\def\xint_firstofone_thenstop #1{ #1}%
-\long\def\xint_firstoftwo_thenstop #1#2{ #1}%
-\long\def\xint_secondoftwo_thenstop #1#2{ #2}%
+\let\xint_stop_aftergobble\xint_gob_andstop_i
+\long\def\xint_stop_atfirstofone #1{ #1}%
+\long\def\xint_stop_atfirstoftwo #1#2{ #1}%
+\long\def\xint_stop_atsecondoftwo #1#2{ #2}%
\long\def\xint_exchangetwo_keepbraces #1#2{{#2}{#1}}%
% \end{macrocode}
% \subsection{``gob til'' macros and UD style fork}
@@ -17278,11 +17648,11 @@ math shift catcode.
% \changed{1.09}{}
% |\xint_bye|
% \changed{1.2i}{}
-% |\xint_Bye| for \csbxint{DSRr} and \csbxint{Round}. Also |\xint_bye_thenstop|.
+% |\xint_Bye| for \csbxint{DSRr} and \csbxint{Round}. Also |\xint_stop_afterbye|.
% \begin{macrocode}
\long\def\xint_bye #1\xint_bye {}%
\long\def\xint_Bye #1\xint_bye {}%
-\long\def\xint_bye_thenstop #1\xint_bye { }%
+\long\def\xint_stop_afterbye #1\xint_bye { }%
% \end{macrocode}
% \subsection{\csh{xintdothis}, \csh{xintorthat}}
% \changed{1.1}{}
@@ -17833,7 +18203,7 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xinttools}%
- [2018/06/17 1.3c Expandable and non-expandable utilities (JFB)]%
+ [2019/01/06 1.3d 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.|
@@ -18184,8 +18554,8 @@ math shift catcode.
\def\XINT_nthelt_neg_a #1%
{%
\xint_UDzerominusfork
- #1-\xint_bye_thenstop
- 0#1\xint_bye_thenstop
+ #1-\xint_stop_afterbye
+ 0#1\xint_stop_afterbye
0-{}%
\krof
\expandafter\XINT_nthelt_neg_b
@@ -18551,7 +18921,7 @@ math shift catcode.
\def\XINT_seq #1#2%
{%
\ifcase\ifnum #1=#2 0\else\ifnum #2>#1 1\else -1\fi\fi\space
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\or
\expandafter\XINT_seq_p
\else
@@ -19404,7 +19774,7 @@ math shift catcode.
\def\xintKeep:f:csv {\romannumeral0\xintkeep:f:csv }%
\long\def\xintkeep:f:csv #1#2%
{%
- \expandafter\xint_gobble_thenstop
+ \expandafter\xint_stop_aftergobble
\romannumeral0\expandafter\XINT_keep:f:csv_a
\the\numexpr #1\expandafter.\expandafter{\romannumeral`&&@#2}%
}%
@@ -19502,7 +19872,7 @@ math shift catcode.
\def\xintTrim:f:csv {\romannumeral0\xinttrim:f:csv }%
\long\def\xinttrim:f:csv #1#2%
{%
- \expandafter\xint_gobble_thenstop
+ \expandafter\xint_stop_aftergobble
\romannumeral0\expandafter\XINT_trim:f:csv_a
\the\numexpr #1\expandafter.\expandafter{\romannumeral`&&@#2}%
}%
@@ -19605,7 +19975,7 @@ math shift catcode.
}%
\def\XINT_nthelt:f:csv_neg_fork #1%
{%
- \if#1-\expandafter\xint_bye_thenstop\fi
+ \if#1-\expandafter\xint_stop_afterbye\fi
\expandafter\XINT_nthelt:f:csv_neg_done
\romannumeral0%
\expandafter\XINT_keep:f:csv_trimloop\the\numexpr-\xint_c_ix+#1%
@@ -19722,7 +20092,7 @@ math shift catcode.
%\let<*xintcore>\gardesinactifs
%</xinttools>^^A--------------------------------------------------
%<*xintcore>^^A---------------------------------------------------
-%^^A -*- coding: utf-8; mode: doctex -*-
+%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; -*-
% \clearpage\csname xintcorenameUp\endcsname
% \StartPackageIndex{core}
% \let\MakePrivateLetters\xintMakePrivateLetters
@@ -19800,7 +20170,7 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintcore}%
- [2018/06/17 1.3c Expandable arithmetic on big integers (JFB)]%
+ [2019/01/06 1.3d 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
@@ -19906,10 +20276,10 @@ math shift catcode.
\XINT_expandableerror{next: #5}%
% not for X3.274
%\XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}%
- \xint_firstofone_thenstop{#5}%
+ \xint_stop_atfirstofone{#5}%
}%
}%
-%% \let\xintUse\xint_firstofthree_thenstop % defined in xint.sty
+%% \let\xintUse\xint_stop_atfirstofthree % defined in xint.sty
\def\XINT_ifFlagRaised #1{%
\ifcsname XINT_#1Flag_ON\endcsname
\expandafter\xint_firstoftwo
@@ -22469,9 +22839,9 @@ math shift catcode.
\def\xintiiQuo {\romannumeral0\xintiiquo }%
\def\xintiiRem {\romannumeral0\xintiirem }%
\def\xintiiquo
- {\expandafter\xint_firstoftwo_thenstop\romannumeral0\xintiidivision }%
+ {\expandafter\xint_stop_atfirstoftwo\romannumeral0\xintiidivision }%
\def\xintiirem
- {\expandafter\xint_secondoftwo_thenstop\romannumeral0\xintiidivision }%
+ {\expandafter\xint_stop_atsecondoftwo\romannumeral0\xintiidivision }%
% \end{macrocode}
% \subsection{\csh{xintiiDivRound}}
% \lverb|1.1, transferred from first release of bnumexpr. Rewritten for 1.2.
@@ -22552,7 +22922,7 @@ math shift catcode.
\krof
}%
\def\XINT_iidivtrunc_pos #1#2\xint:#3\xint:
- {\expandafter\xint_firstoftwo_thenstop
+ {\expandafter\xint_stop_atfirstoftwo
\romannumeral0\XINT_div_prepare {#2}{#1#3}}%
% \end{macrocode}
% \subsection{\csh{xintiiModTrunc}}
@@ -22590,11 +22960,13 @@ math shift catcode.
\krof
}%
\def\XINT_iimodtrunc_pos #1#2\xint:#3\xint:
- {\expandafter\xint_secondoftwo_thenstop\romannumeral0\XINT_div_prepare
+ {\expandafter\xint_stop_atsecondoftwo\romannumeral0\XINT_div_prepare
{#2}{#1#3}}%
% \end{macrocode}
% \subsection{\csh{xintiiDivMod}}
-% \lverb|1.2p. Associated with floored division like Python's divmod.|
+% \changed{1.2p}{}
+% It is associated with floored division (like Python divmod
+% function), and with the |//| operator in \csbxint{iiexpr}.
% \begin{macrocode}
\def\xintiiDivMod {\romannumeral0\xintiidivmod }%
\def\xintiidivmod #1{\expandafter\XINT_iidivmod\romannumeral`&&@#1\xint:}%
@@ -22612,7 +22984,7 @@ math shift catcode.
\XINT_signalcondition{DivisionByZero}{Division by #2 of #1#3}{}%
{{0}{0}}% à revoir...
}%
-\def\XINT_iidivmod_aiszero #1#2\xint:#3\xint:{{0}{0}}%
+\def\XINT_iidivmod_aiszero #1\xint:#2\xint:{{0}{0}}%
\def\XINT_iidivmod_bneg #1%
{%
\expandafter\XINT_iidivmod_bneg_finish
@@ -22633,7 +23005,7 @@ math shift catcode.
% \xintDivFloor which also outputs an integer in strict format.|
% \begin{macrocode}
\def\xintiiDivFloor {\romannumeral0\xintiidivfloor}%
-\def\xintiidivfloor {\expandafter\xint_firstoftwo_thenstop
+\def\xintiidivfloor {\expandafter\xint_stop_atfirstoftwo
\romannumeral0\xintiidivmod}%
% \end{macrocode}
% \subsection{\csh{xintiiMod}}
@@ -22641,7 +23013,7 @@ math shift catcode.
% truncated division.|
% \begin{macrocode}
\def\xintiiMod {\romannumeral0\xintiimod}%
-\def\xintiimod {\expandafter\xint_secondoftwo_thenstop
+\def\xintiimod {\expandafter\xint_stop_atsecondoftwo
\romannumeral0\xintiidivmod}%
% \end{macrocode}
% \subsection{\csh{xintiiSqr}}
@@ -23122,16 +23494,16 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xint}%
- [2018/06/17 1.3c Expandable operations on big integers (JFB)]%
+ [2019/01/06 1.3d Expandable operations on big integers (JFB)]%
% \end{macrocode}
% \subsection{More token management}
% \begin{macrocode}
\long\def\xint_firstofthree #1#2#3{#1}%
\long\def\xint_secondofthree #1#2#3{#2}%
\long\def\xint_thirdofthree #1#2#3{#3}%
-\long\def\xint_firstofthree_thenstop #1#2#3{ #1}% 1.09i
-\long\def\xint_secondofthree_thenstop #1#2#3{ #2}%
-\long\def\xint_thirdofthree_thenstop #1#2#3{ #3}%
+\long\def\xint_stop_atfirstofthree #1#2#3{ #1}%
+\long\def\xint_stop_atsecondofthree #1#2#3{ #2}%
+\long\def\xint_stop_atthirdofthree #1#2#3{ #3}%
% \end{macrocode}
% \subsection{(WIP) A constant needed by \cshnolabel{xintRandomDigits} et al.}
% \begin{macrocode}
@@ -23425,7 +23797,7 @@ math shift catcode.
% \lverb|&
% |
% \begin{macrocode}
- \expandafter\xint_secondoftwo_thenstop\romannumeral0\XINT_dsx_xisPos
+ \expandafter\xint_stop_atsecondoftwo\romannumeral0\XINT_dsx_xisPos
}%
% \end{macrocode}
% \subsection{\csh{xintDSH}}
@@ -23456,7 +23828,7 @@ math shift catcode.
{%
% \end{macrocode}
% \lverb|&
- \expandafter\xint_firstoftwo_thenstop\romannumeral0\XINT_dsx_xisPos
+ \expandafter\xint_stop_atfirstoftwo\romannumeral0\XINT_dsx_xisPos
% |
% \begin{macrocode}
}%
@@ -23752,14 +24124,14 @@ math shift catcode.
% \end{macrocode}
% \subsection{\csh{xintSgnFork}}
% \lverb|Expandable three-way fork added in 1.07. The argument #1 must expand
-% to non-self-ending -1,0 or 1. 1.09i with _thenstop.|
+% to non-self-ending -1,0 or 1. 1.09i with _thenstop (now _stop_at...).|
% \begin{macrocode}
\def\xintSgnFork {\romannumeral0\xintsgnfork }%
\def\xintsgnfork #1%
{%
- \ifcase #1 \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \ifcase #1 \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
% \end{macrocode}
@@ -23767,8 +24139,8 @@ math shift catcode.
% \lverb|Expandable three-way fork added in 1.09a. Branches expandably
% depending on whether <0, =0, >0. Choice of branch guaranteed in two steps.
%
-% 1.09i has \xint_firstofthreeafterstop (now _thenstop) etc for faster
-% expansion.
+% 1.09i has \xint_firstofthreeafterstop (now \xint_stop_atfirstofthree) etc
+% for faster expansion.
%
% 1.1 adds \xintiiifSgn for optimization in xintexpr-essions. Should I move
% them to xintcore? (for bnumexpr)|
@@ -23777,9 +24149,9 @@ math shift catcode.
\def\xintiiifsgn #1%
{%
\ifcase \xintiiSgn{#1}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
% \end{macrocode}
@@ -23791,9 +24163,9 @@ math shift catcode.
\def\xintiiifcmp #1#2%
{%
\ifcase\xintiiCmp {#1}{#2}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
% \end{macrocode}
@@ -23804,8 +24176,8 @@ math shift catcode.
\def\xintiiifeq #1#2%
{%
\if0\xintiiCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else\expandafter\xint_stop_atsecondoftwo
\fi
}%
% \end{macrocode}
@@ -23816,8 +24188,8 @@ math shift catcode.
\def\xintiiifgt #1#2%
{%
\if1\xintiiCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else\expandafter\xint_stop_atsecondoftwo
\fi
}%
% \end{macrocode}
@@ -23829,8 +24201,8 @@ math shift catcode.
\def\xintiiiflt #1#2%
{%
\ifnum\xintiiCmp{#1}{#2}<\xint_c_
- \expandafter\xint_firstoftwo_thenstop
- \else \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else \expandafter\xint_stop_atsecondoftwo
\fi
}%
% \end{macrocode}
@@ -23846,9 +24218,9 @@ math shift catcode.
\def\xintiiifzero #1%
{%
\if0\xintiiSgn{#1}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
% \end{macrocode}
@@ -23858,9 +24230,9 @@ math shift catcode.
\def\xintiiifnotzero #1%
{%
\if0\xintiiSgn{#1}%
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\else
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\fi
}%
% \end{macrocode}
@@ -23871,9 +24243,9 @@ math shift catcode.
\def\xintiiifone #1%
{%
\if1\xintiiIsOne{#1}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
% \end{macrocode}
@@ -23884,9 +24256,9 @@ math shift catcode.
\def\xintiiifodd #1%
{%
\if\xintiiOdd{#1}1%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
% \end{macrocode}
@@ -24029,9 +24401,9 @@ math shift catcode.
\krof }%
\krof
#3#1#2\xint:#4\xint:
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
{#3#4}{#1#2}%
}%
@@ -24040,11 +24412,11 @@ math shift catcode.
% Refactored at 1.2m for avoiding grabbing arguments. Position of inputs
% shared with iiCmp and iiGeq code.|
% \begin{macrocode}
-\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_zerozero #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_max_zeroplus #1\fi{\xint_stop_atsecondoftwo }%
+\def\XINT_max_pluszero #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_max_minusplus #1\fi{\xint_stop_atsecondoftwo }%
+\def\XINT_max_plusminus #1\fi{\xint_stop_atfirstoftwo }%
\def\XINT_max_plusplus
{%
\if1\romannumeral0\XINT_geq_plusplus
@@ -24094,17 +24466,17 @@ math shift catcode.
\krof }%
\krof
#3#1#2\xint:#4\xint:
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\else
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\fi
{#3#4}{#1#2}%
}%
-\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_zerozero #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_min_zeroplus #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_min_pluszero #1\fi{\xint_stop_atsecondoftwo }%
+\def\XINT_min_minusplus #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_min_plusminus #1\fi{\xint_stop_atsecondoftwo }%
\def\XINT_min_plusplus
{%
\if1\romannumeral0\XINT_geq_plusplus
@@ -25185,6 +25557,69 @@ math shift catcode.
\csname if#1\endcsname\expandafter1\else\expandafter0\fi }%
\def\xintToggle #1{\romannumeral`&&@\iftoggle{#1}{1}{0}}%
% \end{macrocode}
+% \subsection{\cshnolabel{xintGCD}, \cshnolabel{xintiiGCD}}
+% Copied over from \csbxint{iiGCD} of \xintgcdnameimp at |1.3d| to
+% support |gcd()| function in \csbxint{iiexpr}.
+% \begin{macrocode}
+\def\xintiiGCD {\romannumeral0\xintiigcd }%
+\def\xintiigcd #1{\expandafter\XINT_iigcd\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_iigcd #1#2\xint:#3%
+{%
+ \expandafter\XINT_gcd_fork\expandafter#1%
+ \romannumeral0\xintiiabs#3\xint:#1#2\xint:
+}%
+\def\XINT_gcd_fork #1#2%
+{%
+ \xint_UDzerofork
+ #1\XINT_gcd_Aiszero
+ #2\XINT_gcd_Biszero
+ 0\XINT_gcd_loop
+ \krof
+ #2%
+}%
+\def\XINT_gcd_AisZero #1\xint:#2\xint:{ #1}%
+\def\XINT_gcd_BisZero #1\xint:#2\xint:{ #2}%
+\def\XINT_gcd_loop #1\xint:#2\xint:
+{%
+ \expandafter\expandafter\expandafter\XINT_gcd_CheckRem
+ \expandafter\xint_secondoftwo
+ \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint:
+}%
+\def\XINT_gcd_CheckRem #1%
+{%
+ \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop #1%
+}%
+\def\XINT_gcd_end0\XINT_gcd_loop #1\xint:#2\xint:{ #2}%
+% \end{macrocode}
+% \subsection{\cshnolabel{xintLCM}, \cshnolabel{xintiiLCM}}
+% \begin{macrocode}
+\def\xintiiLCM {\romannumeral0\xintiilcm}%
+\def\xintiilcm #1{\expandafter\XINT_iilcm\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_iilcm #1#2\xint:#3%
+{%
+ \expandafter\XINT_lcm_fork\expandafter#1%
+ \romannumeral0\xintiiabs#3\xint:#1#2\xint:
+}%
+\def\XINT_lcm_fork #1#2%
+{%
+ \xint_UDzerofork
+ #1\XINT_lcm_iszero
+ #2\XINT_lcm_iszero
+ 0\XINT_lcm_notzero
+ \krof
+ #2%
+}%
+\def\XINT_lcm_iszero #1\xint:#2\xint:{ 0}%
+\def\XINT_lcm_notzero #1\xint:#2\xint:
+{%
+ \expandafter\XINT_lcm_end\romannumeral0%
+ \expandafter\expandafter\expandafter\XINT_gcd_CheckRem
+ \expandafter\xint_secondoftwo
+ \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint:
+ \xint:#1\xint:#2\xint:
+}%
+\def\XINT_lcm_end #1\xint:#2\xint:#3\xint:{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}%
+% \end{macrocode}
% \subsection{(WIP) \csh{xintRandomDigits}}
% \lverb|1.3b. See user manual. Whether this will be part of xintkernel,
% xintcore, or xint is yet to be decided.|
@@ -25468,7 +25903,7 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintbinhex}%
- [2018/06/17 1.3c Expandable binary and hexadecimal conversions (JFB)]%
+ [2019/01/06 1.3d Expandable binary and hexadecimal conversions (JFB)]%
% \end{macrocode}
% \subsection{Constants, etc...}
% \lverb|1.2n switches to \csname-governed expansion at various places.|
@@ -26122,89 +26557,94 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintgcd}%
- [2018/06/17 1.3c Euclide algorithm with xint package (JFB)]%
+ [2019/01/06 1.3d Euclide algorithm with xint package (JFB)]%
% \end{macrocode}
% \subsection{\csh{xintGCD}, \csh{xintiiGCD}}
-% \lverb|1.09a added \xintnum filtering from \xintiabs. This is a bit overhead
-% but makes it easier for the gcd function in \xintexpr.
-%
-% 1.1a defines \xintiiGCD to avoid overhead in \xintiiexpr.
-%
-% 1.2p: but 1.2o deprecated \xintiAbs, and in fact \xintGCD should not have any
-% \xintNum overhead for consistency with other xint macros. But well, it would
-% be breaking change to modify this now. We can not use \xintAbs which will
-% create a fraction A/1, so we use \xintNum directly.|
+% \lverb|&
+% |
+% \changed{1.3d}{}
+% \lverb|Removed some braces in favor of \xint: delimiter at 1.3d (but
+% \xintiiGCD was already robust against non-delimited \numexpr inputs
+% thanks to using \xintiiabs{...}) and refactored the whole
+% \XINT_iigcd_fork. |
% \begin{macrocode}
\def\xintGCD {\romannumeral0\xintgcd }%
\def\xintgcd #1#2{\xintiigcd {\xintNum{#1}}{\xintNum{#2}}}%
\def\xintiiGCD {\romannumeral0\xintiigcd }%
-\def\xintiigcd #1%
-{%
- \expandafter\XINT_iigcd\expandafter{\romannumeral0\xintiiabs{#1}}%
-}%
-\def\XINT_iigcd #1#2%
+% \end{macrocode}
+% This abuses the way \csbxint{iiabs} expands.
+% \begin{macrocode}
+\def\xintiigcd #1{\expandafter\XINT_iigcd\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_iigcd #1#2\xint:#3%
{%
- \expandafter\XINT_gcd_fork\romannumeral0\xintiiabs{#2}\Z #1\Z
+ \expandafter\XINT_gcd_fork\expandafter#1%
+ \romannumeral0\xintiiabs#3\xint:#1#2\xint:
}%
% \end{macrocode}
-% \lverb|&
-% Ici #3#4=A, #1#2=B|
+% \lverb|First argument now in second position (after \xint:) but
+% its first digit is also the #1.|
% \begin{macrocode}
-\def\XINT_gcd_fork #1#2\Z #3#4\Z
+\def\XINT_gcd_fork #1#2%
{%
\xint_UDzerofork
- #1\XINT_gcd_BisZero
- #3\XINT_gcd_AisZero
+ #1\XINT_gcd_Aiszero
+ #2\XINT_gcd_Biszero
0\XINT_gcd_loop
\krof
- {#1#2}{#3#4}%
+ #2%
}%
-\def\XINT_gcd_AisZero #1#2{ #1}%
-\def\XINT_gcd_BisZero #1#2{ #2}%
-\def\XINT_gcd_CheckRem #1#2\Z
-{%
- \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop {#1#2}%
-}%
-\def\XINT_gcd_end0\XINT_gcd_loop #1#2{ #2}%
+\def\XINT_gcd_AisZero #1\xint:#2\xint:{ #1}%
+\def\XINT_gcd_BisZero #1\xint:#2\xint:{ #2}%
% \end{macrocode}
-% \lverb|#1=B, #2=A. \XINT_div_prepare{#1}{#2} divides A by B.|
+% \lverb|\XINT_div_prepare{#1}{#2} divides #2 by #1, and outputs
+% {Quotient}{Remainder}.|
% \begin{macrocode}
-\def\XINT_gcd_loop #1#2%
+\def\XINT_gcd_loop #1\xint:#2\xint:
{%
- \expandafter\expandafter\expandafter
- \XINT_gcd_CheckRem
+ \expandafter\expandafter\expandafter\XINT_gcd_CheckRem
\expandafter\xint_secondoftwo
- \romannumeral0\XINT_div_prepare {#1}{#2}\Z
- {#1}%
+ \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint:
+}%
+\def\XINT_gcd_CheckRem #1%
+{%
+ \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop #1%
}%
+\def\XINT_gcd_end0\XINT_gcd_loop #1\xint:#2\xint:{ #2}%
% \end{macrocode}
% \subsection{\csh{xintLCM}, \csh{xintiiLCM}}
-%\lverb|See comments of \xintGCD.|
+% \lverb|See comments of \xintiiGCD for the refactoring done at 1.3d.
+% No time to make \xintiiLCM code more efficient now.
+%
+% Macros \xintLCM, \xintlcm only for backwards compatibility.|
% \begin{macrocode}
\def\xintLCM {\romannumeral0\xintlcm}%
\def\xintlcm #1#2{\xintiilcm{\xintNum{#1}}{\xintNum{#2}}}%
\def\xintiiLCM {\romannumeral0\xintiilcm}%
-\def\xintiilcm #1%
-{%
- \expandafter\XINT_iilcm\expandafter{\romannumeral0\xintiiabs{#1}}%
-}%
-\def\XINT_iilcm #1#2%
+\def\xintiilcm #1{\expandafter\XINT_iilcm\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_iilcm #1#2\xint:#3%
{%
- \expandafter\XINT_lcm_fork\romannumeral0\xintiiabs{#2}\Z #1\Z
+ \expandafter\XINT_lcm_fork\expandafter#1%
+ \romannumeral0\xintiiabs#3\xint:#1#2\xint:
}%
-\def\XINT_lcm_fork #1#2\Z #3#4\Z
+\def\XINT_lcm_fork #1#2%
{%
\xint_UDzerofork
- #1\XINT_lcm_BisZero
- #3\XINT_lcm_AisZero
- 0\expandafter
+ #1\XINT_lcm_iszero
+ #2\XINT_lcm_iszero
+ 0\XINT_lcm_notzero
\krof
- \XINT_lcm_notzero\expandafter{\romannumeral0\XINT_gcd_loop {#1#2}{#3#4}}%
- {#1#2}{#3#4}%
+ #2%
}%
-\def\XINT_lcm_AisZero #1#2#3#4#5{ 0}%
-\def\XINT_lcm_BisZero #1#2#3#4#5{ 0}%
-\def\XINT_lcm_notzero #1#2#3{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}%
+\def\XINT_lcm_iszero #1\xint:#2\xint:{ 0}%
+\def\XINT_lcm_notzero #1\xint:#2\xint:
+{%
+ \expandafter\XINT_lcm_end\romannumeral0%
+ \expandafter\expandafter\expandafter\XINT_gcd_CheckRem
+ \expandafter\xint_secondoftwo
+ \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint:
+ \xint:#1\xint:#2\xint:
+}%
+\def\XINT_lcm_end #1\xint:#2\xint:#3\xint:{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}%
% \end{macrocode}
% \subsection{\csh{xintBezout}}
% \lverb|&
@@ -26761,7 +27201,7 @@ math shift catcode.
%\let<*xintfrac>\gardesinactifs
%</xintgcd>^^A----------------------------------------------------
%<*xintfrac>^^A---------------------------------------------------
-%^^A -*- coding: utf-8; mode: doctex; -*-
+%^^A -*- coding: utf-8; mode: doctex; fill-column: 78; -*-
% \clearpage\csname xintfracnameUp\endcsname
% \StartPackageIndex{frac}
% \let\MakePrivateLetters\xintMakePrivateLetters
@@ -26829,7 +27269,7 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintfrac}%
- [2018/06/17 1.3c Expandable operations on fractions (JFB)]%
+ [2019/01/06 1.3d 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
@@ -27234,78 +27674,78 @@ math shift catcode.
\def\xintifsgn #1%
{%
\ifcase \xintSgn{#1}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
\def\xintifCmp{\romannumeral0\xintifcmp }%
\def\xintifcmp #1#2%
{%
\ifcase\xintCmp {#1}{#2}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
\def\xintifEq {\romannumeral0\xintifeq }%
\def\xintifeq #1#2%
{%
\if0\xintCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else\expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifGt {\romannumeral0\xintifgt }%
\def\xintifgt #1#2%
{%
\if1\xintCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else\expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifLt {\romannumeral0\xintiflt }%
\def\xintiflt #1#2%
{%
\ifnum\xintCmp{#1}{#2}<\xint_c_
- \expandafter\xint_firstoftwo_thenstop
- \else \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifZero {\romannumeral0\xintifzero }%
\def\xintifzero #1%
{%
\if0\xintSgn{#1}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifNotZero{\romannumeral0\xintifnotzero }%
\def\xintifnotzero #1%
{%
\if0\xintSgn{#1}%
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\else
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\fi
}%
\def\xintifOne {\romannumeral0\xintifone }%
\def\xintifone #1%
{%
\if1\xintIsOne{#1}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifOdd {\romannumeral0\xintifodd }%
\def\xintifodd #1%
{%
\if\xintOdd{#1}1%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
% \end{macrocode}
@@ -27478,7 +27918,7 @@ math shift catcode.
\def\XINT_fracfrac_C 0\XINT_fracfrac_D #1#2#3%
{%
\if1\XINT_isOne {#3}%
- \xint_afterfi {\expandafter\xint_firstoftwo_thenstop\xint_gobble_ii }%
+ \xint_afterfi {\expandafter\xint_stop_atfirstoftwo\xint_gobble_ii }%
\fi
\space
\frac {#2}{#3}%
@@ -27721,12 +28161,19 @@ math shift catcode.
\def\XINT_ifint #1/#2.%
{%
\if 0\xintiiRem {#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
% \end{macrocode}
+% \subsection{\csh{xintIsInt}}
+% \lverb|Added at 1.3d only, for isint() xintexpr function.|
+% \begin{macrocode}
+\def\xintIsInt {\romannumeral0\xintisint }%
+\def\xintisint #1%
+ {\expandafter\XINT_ifint\romannumeral0\xintrawwithzeros {#1}.10}%
+% \end{macrocode}
% \subsection{\csh{xintJrr}}
% \begin{macrocode}
\def\xintJrr {\romannumeral0\xintjrr }%
@@ -29206,6 +29653,32 @@ math shift catcode.
\def\xintOpp {\romannumeral0\xintopp }%
\def\xintopp #1{\expandafter\XINT_opp\romannumeral0\xintraw {#1}}%
% \end{macrocode}
+% \subsection{\csh{xintInv}}
+% \changed{1.3d}{}
+% \begin{macrocode}
+\def\xintInv {\romannumeral0\xintinv }%
+\def\xintinv #1{\expandafter\XINT_inv\romannumeral0\xintraw {#1}}%
+\def\XINT_inv #1%
+{%
+ \xint_UDzerominusfork
+ #1-\XINT_inv_iszero
+ 0#1\XINT_inv_a
+ 0-{\XINT_inv_a {}}%
+ \krof #1%
+}%
+\def\XINT_inv_iszero #1]%
+ {\XINT_signalcondition{DivisionByZero}{Division of 1 by zero (#1])}{}{0/1[0]}}%
+\def\XINT_inv_a #1#2/#3[#4#5]%
+{%
+ \xint_UDzerominusfork
+ #4-\XINT_inv_expiszero
+ 0#4\XINT_inv_b
+ 0-{\XINT_inv_b -#4}%
+ \krof #5.{#1#3/#2}%
+}%
+\def\XINT_inv_expiszero #1.#2{ #2[0]}%
+\def\XINT_inv_b #1.#2{ #2[#1]}%
+% \end{macrocode}
% \subsection{\csh{xintSgn}}
% \begin{macrocode}
\def\xintSgn {\romannumeral0\xintsgn }%
@@ -31357,17 +31830,25 @@ math shift catcode.
\def\XINT_infloatdivmod #1#2#3{ #1,\XINTinFloat[#3]{#2}}%
% \end{macrocode}
% \subsection{\csh{xintifFloatInt}}
+% \lverb|1.3a for ifint() function in \xintfloatexpr.|
% \begin{macrocode}
\def\xintifFloatInt {\romannumeral0\xintiffloatint}%
\def\xintiffloatint #1{\expandafter\XINT_iffloatint
\romannumeral0\xintrez{\XINTinFloat[\XINTdigits]{#1}}}%
\def\XINT_iffloatint #1#2/1[#3]%
{%
- \if 0#1\xint_dothis\xint_firstoftwo_thenstop\fi
- \ifnum#3<\xint_c_\xint_dothis\xint_secondoftwo_thenstop\fi
- \xint_orthat\xint_firstoftwo_thenstop
+ \if 0#1\xint_dothis\xint_stop_atfirstoftwo\fi
+ \ifnum#3<\xint_c_\xint_dothis\xint_stop_atsecondoftwo\fi
+ \xint_orthat\xint_stop_atfirstoftwo
}%
% \end{macrocode}
+% \subsection{\csh{xintFloatIsInt}}
+% \lverb|1.3d for isint() function in \xintfloatexpr.|
+% \begin{macrocode}
+\def\xintFloatIsInt {\romannumeral0\xintfloatisint}%
+\def\xintfloatisint #1{\expandafter\XINT_iffloatint
+ \romannumeral0\xintrez{\XINTinFloat[\XINTdigits]{#1}}10}%
+% \end{macrocode}
% \subsection{(WIP) \csh{XINTinRandomFloatS}, \csh{XINTinRandomFloatSdigits}}
% \lverb|1.3b. Support for random() function.
%
@@ -31510,7 +31991,7 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintseries}%
- [2018/06/17 1.3c Expandable partial sums with xint package (JFB)]%
+ [2019/01/06 1.3d Expandable partial sums with xint package (JFB)]%
% \end{macrocode}
% \subsection{\csh{xintSeries}}
% \begin{macrocode}
@@ -32013,7 +32494,7 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintcfrac}%
- [2018/06/17 1.3c Expandable continued fractions with xint package (JFB)]%
+ [2019/01/06 1.3d Expandable continued fractions with xint package (JFB)]%
% \end{macrocode}
% \subsection{\csh{xintCFrac}}
% \begin{macrocode}
@@ -33264,7 +33745,7 @@ math shift catcode.
% \begin{macrocode}
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2018/06/17 1.3c Expandable expression parser (JFB)]%
+ [2019/01/06 1.3d Expandable expression parser (JFB)]%
\catcode`! 11
\let\XINT_Cmp \xintiiCmp
% \end{macrocode}
@@ -33335,25 +33816,41 @@ math shift catcode.
% \end{macrocode}
% \subsection{\csh{xintexpr}, \csh{xintiexpr}, \csh{xintfloatexpr},
% \csh{xintiiexpr}}
+% \lverb|ATTENTION! 1.3d renamed \xinteval to \xintexpro etc...|
% \begin{macrocode}
-\def\xintexpr {\romannumeral0\xinteval }%
-\def\xintiexpr {\romannumeral0\xintieval }%
-\def\xintfloatexpr {\romannumeral0\xintfloateval }%
-\def\xintiiexpr {\romannumeral0\xintiieval }%
+\def\xintexpr {\romannumeral0\xintexpro }%
+\def\xintiexpr {\romannumeral0\xintiexpro }%
+\def\xintfloatexpr {\romannumeral0\xintfloatexpro }%
+\def\xintiiexpr {\romannumeral0\xintiiexpro }%
% \end{macrocode}
% \subsection{\csh{xinttheexpr}, \csh{xinttheiexpr}, \csh{xintthefloatexpr},
% \csh{xinttheiiexpr}}
% \begin{macrocode}
\def\xinttheexpr
- {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval }%
-\def\xinttheiexpr {\romannumeral`&&@\xintthe\xintiexpr }%
-\def\xintthefloatexpr {\romannumeral`&&@\xintthe\xintfloatexpr }%
+ {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval}%
+\def\xinttheiexpr
+ {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintiexpr}%
+\def\xintthefloatexpr
+ {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintfloatexpr}%
\def\xinttheiiexpr
- {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval }%
+ {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval}%
+% \end{macrocode}
+% \subsection{\csh{xinteval}, \csh{xintieval}, \csh{xintfloateval},
+% \csh{xintiieval}}
+% \begin{macrocode}
+\def\xinteval #1%
+ {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval#1\relax}%
+\def\xintieval #1%
+ {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintiexpr#1\relax}%
+\def\xintfloateval #1%
+ {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintfloatexpr#1\relax}%
+\def\xintiieval #1%
+ {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval#1\relax}%
% \end{macrocode}
-% \subsection{\csh{xintthe}}
+% \subsection{\csh{xintthe}, \csh{xintthe_o}}
% \begin{macrocode}
\def\xintthe #1{\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@#1}%
+\def\xintthe_o #1{\expandafter\xint_gobble_iii\romannumeral`&&@#1}%
% \end{macrocode}
% \subsection{\csh{thexintexpr}, \csh{thexintiexpr}, \csh{thexintfloatexpr},
% \csh{thexintiiexpr}}
@@ -33406,15 +33903,17 @@ math shift catcode.
\def\xintthebarefloateval {\expandafter\XINT_expr_unlock\romannumeral0\xintbarefloateval}%
\def\xintthebareiieval {\expandafter\XINT_expr_unlock\romannumeral0\xintbareiieval}%
% \end{macrocode}
-% \subsection{\csh{xinteval}, \csh{xintiieval}}
+% \subsection{\csh{xintexpro}, \csh{xintiiexpro}}
+% \lverb|ATTENTION! 1.3d renamed \xinteval to \xintexpro etc...|
% \begin{macrocode}
-\def\xinteval {\expandafter\XINT_expr_wrap\romannumeral0\xintbareeval }%
-\def\xintiieval {\expandafter\XINT_iiexpr_wrap\romannumeral0\xintbareiieval }%
+\def\xintexpro {\expandafter\XINT_expr_wrap\romannumeral0\xintbareeval }%
+\def\xintiiexpro {\expandafter\XINT_iiexpr_wrap\romannumeral0\xintbareiieval }%
% \end{macrocode}
-% \subsection{\csh{xintieval}, \csh{XINT_iexpr_wrap}}
+% \subsection{\csh{xintiexpro}, \csh{XINT_iexpr_wrap}}
% \lverb|Optional argument since 1.1.|
+% \lverb|ATTENTION! 1.3d renamed \xinteval to \xintexpro etc...|
% \begin{macrocode}
-\def\xintieval #1%
+\def\xintiexpro #1%
{\ifx [#1\expandafter\XINT_iexpr_withopt\else\expandafter\XINT_iexpr_noopt \fi #1}%
\def\XINT_iexpr_noopt
{\expandafter\XINT_iexpr_wrap \expandafter 0\romannumeral0\xintbareeval }%
@@ -33430,10 +33929,11 @@ math shift catcode.
\csname .=\xintRound::csv {#1}{\XINT_expr_unlock #2}\endcsname
}%
% \end{macrocode}
-% \subsection{\csh{xintfloateval}, \csh{XINT_flexpr_wrap}, \csh{XINT_flexpr_print}}
+% \subsection{\csh{xintfloatexpro}, \csh{XINT_flexpr_wrap}, \csh{XINT_flexpr_print}}
% \lverb|Optional argument since 1.1|
+% \lverb|ATTENTION! 1.3d renamed \xinteval to \xintexpro etc...|
% \begin{macrocode}
-\def\xintfloateval #1%
+\def\xintfloatexpro #1%
{%
\ifx [#1\expandafter\XINT_flexpr_withopt_a\else\expandafter\XINT_flexpr_noopt
\fi #1%
@@ -33463,20 +33963,29 @@ math shift catcode.
\def\XINT_expr_unlock_sp #1.;#2.=#3!{{#2}{#3}}%
% \end{macrocode}
% \subsection{\csh{xintboolexpr}, \csh{xinttheboolexpr}, \csh{thexintboolexpr}}
+% \lverb|ATTENTION! 1.3d renamed \xinteval to \xintexpro etc...|
% \begin{macrocode}
\def\xintboolexpr {\romannumeral0\expandafter\expandafter\expandafter
- \XINT_boolexpr_done \expandafter\xint_gobble_iv\romannumeral0\xinteval }%
+ \XINT_boolexpr_done \expandafter\xint_gobble_iv\romannumeral0\xintexpro }%
\def\xinttheboolexpr {\romannumeral`&&@\expandafter\expandafter\expandafter
- \XINT_boolexpr_print\expandafter\xint_gobble_iv\romannumeral0\xinteval }%
+ \XINT_boolexpr_print\expandafter\xint_gobble_iv\romannumeral0\xintexpro }%
\let\thexintboolexpr\xinttheboolexpr
\def\XINT_boolexpr_done { !\XINT_expr_usethe\XINT_protectii\XINT_boolexpr_print }%
% \end{macrocode}
% \subsection{\csh{xintifboolexpr}, \csh{xintifboolfloatexpr}, \csh{xintifbooliiexpr}}
% \lverb|Do not work with comma separated expressions.|
% \begin{macrocode}
-\def\xintifboolexpr #1{\romannumeral0\xintifnotzero {\xinttheexpr #1\relax}}%
-\def\xintifboolfloatexpr #1{\romannumeral0\xintifnotzero {\xintthefloatexpr #1\relax}}%
-\def\xintifbooliiexpr #1{\romannumeral0\xintifnotzero {\xinttheiiexpr #1\relax}}%
+\def\xintifboolexpr #1{\romannumeral0\xintiiifnotzero {\xinttheexpr #1\relax}}%
+\def\xintifboolfloatexpr #1{\romannumeral0\xintiiifnotzero {\xintthefloatexpr #1\relax}}%
+\def\xintifbooliiexpr #1{\romannumeral0\xintiiifnotzero {\xinttheiiexpr #1\relax}}%
+% \end{macrocode}
+% \subsection{\csh{xintifsgnexpr}, \csh{xintifsgnfloatexpr}, \csh{xintifsgniiexpr}}
+% \changed{1.3d}{}
+% \lverb|Do not work with comma separated expressions.|
+% \begin{macrocode}
+\def\xintifsgnexpr #1{\romannumeral0\xintiiifsgn {\xinttheexpr #1\relax}}%
+\def\xintifsgnfloatexpr #1{\romannumeral0\xintiiifsgn {\xintthefloatexpr #1\relax}}%
+\def\xintifsgniiexpr #1{\romannumeral0\xintiiifsgn {\xinttheiiexpr #1\relax}}%
% \end{macrocode}
% \subsection{Hooks for the functioning of \cshnolabel{xintNewExpr} and
% \cshnolabel{xintdeffunc}}
@@ -33658,10 +34167,10 @@ math shift catcode.
% both \xinttheexpr 1.\relax and \xinttheexpr .1\relax are legal.
%
% The ` syntax is here used for special constructs like `+`(..), `*`(..) where
-% + or * will be treated as functions. Current implementation pick only one
-% token (could have been braced stuff), thus here it will be + or *, and via
-% \XINT_expr_op_` this into becomes a suitable
-% \XINT_{expr|iiexpr|flexpr}_func_+ (or *). Documentation of 1.1 said to use
+% + or * will be treated as functions. Current implementation picks only one
+% token (could have been braced stuff), here it will be + or *, and via
+% \XINT_expr_op_` this then becomes a suitable
+% \XINT_{expr|iiexpr|flexpr}_func_+ (or *). Documentation says to use
% `+`(...), but `+(...) is also valid. The opening parenthesis must be there,
% it is not allowed to come from expansion.@
%
@@ -35311,7 +35820,7 @@ math shift catcode.
% \csh{xintdeffloatvar}}
% \changed{1.1}{}
%
-% \changed{1.2p}{2017/12/01} extends |\xintdefvar| et.\@ al.\@ to accept
+% \changed{1.2p}{2017/12/01} extends |\xintdefvar| et al.\@ to accept
% simultaneous assignments to multiple variables.
%
% \changed{1.3c}{2018/06/17}
@@ -35320,10 +35829,26 @@ math shift catcode.
%
% And allow usage with both syntaxes |name:=expr;| or |name=expr;|. Also the
% colon may have catcode 11, 12, or 13 with no issue.
-% \lverb|
% Variable names may contain letters, digits, underscores, and must not start
-% with a digit. Names starting with @ or an underscore are reserved.
-%
+% with a digit. Names starting with |@| or an underscore are reserved.
+%
+% \begin{itemize}[nosep]
+% \item currently |@|, |@1|, |@2|, |@3|, and |@4| are reserved because they
+% have special meanings for use in iterations,
+% \item |@@|, |@@@|, |@@@@| are also reserved but
+% are technically functions, not variables: a user may possibly define |@@| as
+% a variable name, but if it is followed by parentheses, the function
+% interpretation will be applied (rather than the variable interpretation
+% followed by a tacit multiplication),
+% \item since |1.2l|, the underscore |_| may be used as separator of digits in
+% long numbers.
+% Hence a variable whose name starts with |_| will not play well with the
+% mechanism of tacit multiplication of variables by numbers: the underscore
+% will be removed from input stream by the number scanner, thus creating
+% an undefined or wrong variable name, or none at all if the variable
+% name was an initial |_| followed by digits.
+% \end{itemize}
+% \lverb|
% |
% \odef\MakePrivateLetters{\xintexprMakePrivateLetters \catcode`* 11 }
% \begin{macrocode}
@@ -35345,7 +35870,7 @@ math shift catcode.
% \end{macrocode}
% \let\MakePrivateLetters\xintexprMakePrivateLetters
% \begin{macrocode}
-\catcode`~\active
+\catcode`~ 13
\catcode`: 12
\def\XINT_expr_defvar_getname #1:#2~{\endgroup
\def\XINT_expr_tmpa{#1}\edef\XINT_expr_tmpc{\xintCSVLength{#1}}}%
@@ -35364,7 +35889,7 @@ math shift catcode.
\detokenize\expandafter{\XINT_expr_tmpa}:~%
\ifcase\XINT_expr_tmpc
\xintMessage {xintexpr}{Warning}
- {Aborting: impossible to declare variable with empty name.}%
+ {Aborting: not allowed to declare variable with empty name.}%
\or
\edef\XINT_expr_tmpb{\romannumeral0#1#3\relax}%
\XINT_expr_defvar_one\XINT_expr_tmpa\XINT_expr_tmpb
@@ -35408,10 +35933,17 @@ math shift catcode.
\def\xintdeffloatvar_a #1={\XINT_expr_defvar\xintbarefloateval {#1}}%
% \end{macrocode}
% \subsection{\csh{xintunassignvar}}
-% \lverb|1.2e. Currently not possible to genuinely ``undefine'' a
-% variable, all we can do is to let it stand for zero and generate an
-% error. The reason is that I chose to use \ifcsname tests in
-% \XINT_expr_op__ and \XINT_expr_op_`.|
+% \changed{1.2e}{}
+%
+% \changed{1.3d}{}
+% Embarrassingly I had for a long time a misunderstanding of |\ifcsname|
+% (let's blame its documentation) and I was not aware that it chooses FALSE
+% branch if tested control sequence has been |\let| to |\undefined|... So
+% earlier version didn't do the right thing (and had another bug: failure to
+% protect |\.=0| from expansion).
+%
+% The |\ifcsname| tests are done in \csbXINT{_expr_op__} and
+% \csbXINT{_expr_op_`}.
% \begin{macrocode}
\def\xintunassignvar #1{%
\edef\XINT_expr_tmpa{#1}%
@@ -35420,12 +35952,10 @@ math shift catcode.
\ifnum\expandafter\xintLength\expandafter{\XINT_expr_tmpa}=\@ne
\expandafter\xintnewdummy\XINT_expr_tmpa
\else
- \XINT_global
- \expandafter\edef\csname XINT_expr_var_\XINT_expr_tmpa\endcsname
- {\csname .=0\endcsname\noexpand\XINT_expr_undefined {\XINT_expr_tmpa}}%
- \XINT_global
- \expandafter\edef\csname XINT_expr_onliteral_\XINT_expr_tmpa\endcsname
- {\csname .=0\endcsname\noexpand\XINT_expr_undefined {\XINT_expr_tmpa}*}%
+ \XINT_global\expandafter
+ \let\csname XINT_expr_var_\XINT_expr_tmpa\endcsname\xint_undefined
+ \XINT_global\expandafter
+ \let\csname XINT_expr_onliteral_\XINT_expr_tmpa\endcsname\xint_undefined
\ifxintverbose\xintMessage {xintexpr}{Info}
{Variable \XINT_expr_tmpa\space has been
\ifxintglobaldefs globally \fi ``unassigned''.}%
@@ -35436,7 +35966,6 @@ math shift catcode.
{Error: there was no such variable \XINT_expr_tmpa\space to unassign.}%
\fi
}%
-\def\XINT_expr_undefined #1{\xintError:replaced_by_zero\xint_gobble_i {#1}}%
% \end{macrocode}
% \subsection{seq and the implementation of dummy variables}
% \localtableofcontents
@@ -35819,7 +36348,7 @@ math shift catcode.
\def\XINT_flexpr_func_opxmul #1#2{\XINT_allexpr_opx \xintbarefloateval {\XINTinFloatMul 1}}%
\def\XINT_iiexpr_func_opxmul #1#2{\XINT_allexpr_opx \xintbareiieval {\xintiiMul 1}}%
% \end{macrocode}
-% \lverb|#1=bareval etc, #2={Add0} ou {Mul1}, #3=liste encapsulée, #4=la variable, #5=expression|
+% \lverb|#1=bareeval etc, #2={Add0} ou {Mul1}, #3=liste encapsulée, #4=la variable, #5=expression|
% \begin{macrocode}
\def\XINT_allexpr_opx #1#2#3#4#5%
{%
@@ -36334,16 +36863,103 @@ math shift catcode.
\expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
% \end{macrocode}
% \subsubsection{\csh{xintGCDof:csv}, \csh{xintLCMof:csv}}
-% \lverb|1.09a. Rewritten for 1.1. For use by \xintexpr. Expansion réinstaurée
-% pour besoins de xintNewExpr de version 1.1|
+% \changed{1.09a}{}
+% Non-integer arguments are replaced by integers as |\xintGCD| and |\xintLCM|
+% apply |\xintNum|.
+% \changed{1.1}{}
+% As with other "csv" macros, the (list) argument needs to be expanded in case
+% it arises within a macro created from \csbxint{NewExpr}.
+% \changed{1.3d}{}
+% No more usage of the integer-only \xintgcdnameimp macros, replaced by direct
+% coding here, in order to extend scope to fractions (and produce fractions).
+% Hesitation about allowing empty input, and what to return then.
% \begin{macrocode}
-\def\xintGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintgcd
- \expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
-\def\xintLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintlcm
- \expandafter\xint_firstofone\romannumeral`&&@#1,^,0}%
+\def\xintGCDof:csv #1{\expandafter\XINT_gcdof:_a\romannumeral`&&@#1,^,{1/1[0]}}%
+\def\XINT_gcdof:_a #1%
+ {\if ,#1\expandafter\XINT_oncsv:_empty\else\expandafter\XINT_gcdof:_b\fi #1}%
+% \end{macrocode}
+% This abuses the way |\xintiiabs| works in order to avoid fetching whole
+% argument again.
+% \begin{macrocode}
+\def\XINT_gcdof:_b #1,%
+ {\expandafter\XINT_gcdof:_c\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_gcdof:_c #1\xint:#2,%
+ {\expandafter\XINT_gcdof:_d\romannumeral0\xintiiabs#2\xint:#1\xint:}%
+\def\XINT_gcdof:_d #1%
+ {\if ^#1\expandafter\XINT_gcdof:_end\else\expandafter\XINT_gcdof:_e\fi #1}%
+% \end{macrocode}
+% \lverb|\xintMod will apply \xintRaw on its arguments, and will output in
+% normalized format. But in exceptional case with a one-item or one item and
+% then zeros, the output is (absolute value of) this item, not necessarily in
+% A/B[N] format.|
+% \begin{macrocode}
+\def\XINT_gcdof:_e#1#2\xint:#3\xint:
+{%
+ \if0#1\expandafter\XINT_gcdof:_f\fi
+ \expandafter\XINT_gcdof:_e\romannumeral0\xintmod{#3}{#1#2}\xint:#1#2\xint:
+}%
+\def\XINT_gcdof:_f
+ \expandafter\XINT_gcdof:_e\romannumeral0\xintmod#1#2\xint:#3\xint:#4,%
+{%
+ \expandafter\XINT_gcdof:_d\romannumeral0\xintiiabs#4\xint:#1\xint:
+}%
+% \end{macrocode}
+% \lverb|As for others :csv macros here expansion in the case of \xintNewExpr
+% crafted macros is triggered by (an equivalent to) \romannumeral-`0. Else it
+% happens inside \csname...\endcsname, and there is no triggering
+% \romannumeral, attention to not leave a space upfront.|
+% \begin{macrocode}
+\def\XINT_gcdof:_end ^\xint:#1\xint:#2{#1}%
+% \end{macrocode}
+% \lverb|For least common multiple, we will use \xintInv, but this requires to
+% make sure fractional input is in raw format.|
+% \begin{macrocode}
+\def\xintLCMof:csv #1{\expandafter\XINT_lcmof:_a\romannumeral`&&@#1,^,{0/1[0]}}%
+\def\XINT_lcmof:_a #1%
+ {\if ,#1\expandafter\XINT_oncsv:_empty\else\expandafter\XINT_lcmof:_b\fi #1}%
+\def\XINT_lcmof:_b #1,%
+ {\expandafter\XINT_lcmof:_c\romannumeral0\xintiiabs\xintRaw{#1}\xint:}%
+\def\XINT_lcmof:_c #1{\if0#1\expandafter\XINT_lcmof:_zero\fi
+ \expandafter\XINT_lcmof:_d\romannumeral0\XINT_inv #1}%
+% \end{macrocode}
+% \lverb|We can do \xintiiabs^, but \xintiiabs\xintRaw{^} would throw
+% an error. So we need to delay applying \xintRaw to new item.|
+% \begin{macrocode}
+\def\XINT_lcmof:_d #1\xint:#2,%
+ {\expandafter\XINT_lcmof:_e\romannumeral0\xintiiabs#2\xint:#1\xint:}%
+\def\XINT_lcmof:_e #1%
+ {\if ^#1\expandafter\XINT_lcmof:_end\else\expandafter\XINT_lcmof:_f\fi #1}%
+% \end{macrocode}
+% \lverb|As soon as we hit against a zero item, the l.c.m is known to be zero
+% itself. Else we need to inverse it, but this requires full A/B[N] raw format,
+% hence the \xintraw.|
+% \begin{macrocode}
+\def\XINT_lcmof:_f#1#2\xint:
+{%
+ \if0#1\expandafter\XINT_lcmof:_zero\fi
+ \expandafter\XINT_lcmof:_g\romannumeral0\expandafter\XINT_inv
+ \romannumeral0\xintraw{#1#2}\xint:
+}%
+\def\XINT_lcmof:_g #1#2\xint:#3\xint:
+{%
+ \if0#1\expandafter\XINT_lcmof:_h\fi
+ \expandafter\XINT_lcmof:_g\romannumeral0\xintmod{#3}{#1#2}\xint:#1#2\xint:
+}%
+\def\XINT_lcmof:_h
+ \expandafter\XINT_lcmof:_g\romannumeral0\xintmod#1#2\xint:#3\xint:#4,%
+{%
+ \expandafter\XINT_lcmof:_e\romannumeral0\xintiiabs#4\xint:#1\xint:
+}%
+\def\XINT_lcmof:_zero #1^,#2{0/1[0]}%
+% \end{macrocode}
+% \lverb|We need this \romannumeral0 to remove the up-front space token which
+% will be left by \XINT_inv, in case of \csname..\endcsname expansion.|
+% \begin{macrocode}
+\def\XINT_lcmof:_end ^\xint:#1\xint:#2{\romannumeral0\XINT_inv #1}%
% \end{macrocode}
% \subsubsection{\csh{xintiiGCDof:csv}, \csh{xintiiLCMof:csv}}
-% \lverb|1.1a pour \xintiiexpr. Ces histoires de ii sont pénibles à la fin.|
+% \changed{1.1a}{}
+% For \csbxint{iiexpr}. Requires the \xintgcdnameimp provided macros.
% \begin{macrocode}
\def\xintiiGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiigcd
\expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
@@ -36415,7 +37031,7 @@ math shift catcode.
% {round}{trunc}{mod}{quo}{rem}{divmod}{gcd}{lcm}{max}{min}
% {`+`}
% {`*`}
-% {?}{!}{not}{all}{any}{xor}{if}{ifsgn}{ifint}{ifone}{even}{odd}
+% {?}{!}{not}{all}{any}{xor}{if}{ifsgn}{ifint}{ifone}{even}{odd}{isint}{isone}
% {first}{last}{len}{reversed}{factorial}{binomial}}}
% and \noexpand\cshn{randrange()} functions}
% \expandafter\subsection\expandafter{\zzz}
@@ -36560,6 +37176,28 @@ math shift catcode.
\expandafter #1\expandafter #2\csname.=%
\XINT:NEhook:one\xintiiEven{\XINT_expr_unlock #3}\endcsname
}%
+\def\XINT_expr_func_isint #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintIsInt{\XINT_expr_unlock #3}\endcsname
+}%
+\def\XINT_flexpr_func_isint #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintFloatIsInt{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_iiexpr_func_isint\XINT_expr_func_isint % ? perhaps rather always 1
+\def\XINT_expr_func_isone #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintIsOne{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_flexpr_func_isone\XINT_expr_func_isone
+\def\XINT_iiexpr_func_isone #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiIsOne{\XINT_expr_unlock #3}\endcsname
+}%
% REVOIR nuple
\def\XINT_expr_func_nuple #1#2#3%
{\expandafter #1\expandafter #2\csname.=\XINT_expr_unlock #3\endcsname }%
@@ -37154,6 +37792,24 @@ math shift catcode.
{~xintExpandArgs{XINT_#1_userfunc_#2}{\xintCSVtoListNonStripped{#3}}}%
\catcode`~ 3
% \end{macrocode}
+% \subsection{\csh{xintunassignexprfunc}, \csh{xintunassigniiexprfunc}, \csh{xintunassignfloatexprfunc}}
+% See the \csbxint{unassignvar} for the embarrassing explanations why I had
+% not done that earlier. A bit lazy here, no warning if undefining something
+% not defined, and attention no precaution respective built-in functions.
+% \begin{macrocode}
+\def\XINT_tmpa #1{\expandafter\def\csname xintunassign#1func\endcsname ##1{%
+ \edef\XINT_expr_tmpa{##1}%
+ \edef\XINT_expr_tmpa {\xint_zapspaces_o\XINT_expr_tmpa}%
+ \XINT_global\expandafter
+ \let\csname XINT_#1_func_\XINT_expr_tmpa\endcsname\xint_undefined
+ \XINT_global\expandafter
+ \let\csname XINT_#1_userfunc_\XINT_expr_tmpa\endcsname\xint_undefined
+ \ifxintverbose\xintMessage {xintexpr}{Info}
+ {Function \XINT_expr_tmpa\space for \string\xint #1 parser now
+ \ifxintglobaldefs globally \fi undefined.}%
+ \fi}}%
+\XINT_tmpa{expr}\XINT_tmpa{iiexpr}\XINT_tmpa{floatexpr}%
+% \end{macrocode}
% \subsection{\csh{xintNewFunction}}
% \lverb|1.2h (2016/11/20). Syntax is \xintNewFunction{<name>}[nb of
% arguments]{expression with #1, #2,... as in \xintNewExpr}. This defines
@@ -37600,10 +38256,10 @@ math shift catcode.
% Up to and including 1.2c the definition was global. Starting with 1.2d it is
% done locally.
%
-% Modified at 1.3c so that \XINT_NewFunc et. al. do not execute the
+% Modified at 1.3c so that \XINT_NewFunc et al. do not execute the
% \xintexprSafeCatcodes, as it is now already done earlier by \xintdeffunc:
-% and as already #2 was either \xint_firstofone (for \xintNewExpr et. al.) or
-% \xint_gobble_i (for \XINT_NewFunc et. al.) we can use that #2. This is only
+% and as already #2 was either \xint_firstofone (for \xintNewExpr et al.) or
+% \xint_gobble_i (for \XINT_NewFunc et al.) we can use that #2. This is only
% to avoid doing twice the catcodes, as anyhow there is an \endgroup coming
% later, so external \xintexprRestoreCatcodes would not have been compromised.
%
@@ -37638,7 +38294,7 @@ math shift catcode.
% \the\toks0 inserts the \endgroup, but this will happen
% after \XINT_tmpa has already been expanded...
%
-% The %1 is \xint_firstofone for \xintNewExpr, \xint_gobble_i
+% The $%1 is \xint_firstofone for \xintNewExpr, \xint_gobble_i
% for \xintdeffunc.
% |
% \begin{macrocode}
@@ -37667,9 +38323,9 @@ math shift catcode.
}@
\catcode`% 14
% \end{macrocode}
-% \subsubsection{\csh{ifxintsafecatcodes}, \csh{xintexprSafeCatcodes}, \csh{xintexprRestoreCatcodes}}
+% \subsubsection{\csh{ifxintexprsafecatcodes}, \csh{xintexprSafeCatcodes}, \csh{xintexprRestoreCatcodes}}
% \changed{1.3c}{2018/06/17}
-% \lverb|Added \ifxintsafecatcodes to allow nesting|
+% \lverb|Added \ifxintexprsafecatcodes to allow nesting|
% \begin{macrocode}
\newif\ifxintexprsafecatcodes
\let\xintexprRestoreCatcodes\empty
@@ -37740,34 +38396,34 @@ math shift catcode.
%<*dtx>-----------------------------------------------------------
\iffalse
% grep -c -e "^{%" xint*sty
-xint.sty:182
+xint.sty:189
xintbinhex.sty:53
xintcfrac.sty:183
xintcore.sty:274
-xintexpr.sty:247
-xintfrac.sty:460
-xintgcd.sty:49
+xintexpr.sty:256
+xintfrac.sty:462
+xintgcd.sty:48
xintkernel.sty:15
xintseries.sty:48
xinttools.sty:140
\fi
% grep -o "^{%" xint*sty | wc -l
-\def\totala{ 1651}
+\def\totala{ 1668}
\iffalse
% grep -c -e "^}%" xint*sty
-xint.sty:181
+xint.sty:188
xintbinhex.sty:52
xintcfrac.sty:183
xintcore.sty:271
-xintexpr.sty:272
-xintfrac.sty:461
-xintgcd.sty:51
+xintexpr.sty:281
+xintfrac.sty:463
+xintgcd.sty:50
xintkernel.sty:16
xintseries.sty:48
xinttools.sty:139
\fi
% grep -o "^}%" xint*sty | wc -l
-\def\totalb{ 1674}
+\def\totalb{ 1691}
\cleardoublepage
\makeatletter
\setlength{\columnsep}{20pt}
@@ -37867,7 +38523,8 @@ it is not one of those which are only used as delimiters).
\TeX\strut. Version {\xintbndlversion} of {\xintbndldate}.\par
}
-\CheckSum {31122}% 1.3c
+\CheckSum {31601}% 1.3d
+% 31122 pour 1.3c
% 31069 pour 1.3b, 30482 pour 1.3a, 30621 pour 1.3, 30988 pour 1.2q,
% 30982 pour 1.2p, 30524 pour 1.2o, 30303 pour 1.2h, 30403 pour 1.2i,
% 30750 pour 1.2j, 30677 pour 1.2k, 30931 pour 1.2l, 30439 pour 1.2m,
diff --git a/Master/texmf-dist/source/generic/xint/xint.ins b/Master/texmf-dist/source/generic/xint/xint.ins
index 54ce6d869b6..b48bc725697 100644
--- a/Master/texmf-dist/source/generic/xint/xint.ins
+++ b/Master/texmf-dist/source/generic/xint/xint.ins
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% ---------------------------------------------------------------
%%
%% `tex xint.ins' extracts all package files from xint.dtx, as well as
diff --git a/Master/texmf-dist/tex/generic/xint/xint.sty b/Master/texmf-dist/tex/generic/xint/xint.sty
index 8e8e9405307..f8413488235 100644
--- a/Master/texmf-dist/tex/generic/xint/xint.sty
+++ b/Master/texmf-dist/tex/generic/xint/xint.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xint: Expandable operations on big integers
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -70,13 +70,13 @@
\XINTsetupcatcodes% defined in xintkernel.sty (loaded by xintcore.sty)
\XINT_providespackage
\ProvidesPackage{xint}%
- [2018/06/17 1.3c Expandable operations on big integers (JFB)]%
+ [2019/01/06 1.3d 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}%
-\long\def\xint_firstofthree_thenstop #1#2#3{ #1}% 1.09i
-\long\def\xint_secondofthree_thenstop #1#2#3{ #2}%
-\long\def\xint_thirdofthree_thenstop #1#2#3{ #3}%
+\long\def\xint_stop_atfirstofthree #1#2#3{ #1}%
+\long\def\xint_stop_atsecondofthree #1#2#3{ #2}%
+\long\def\xint_stop_atthirdofthree #1#2#3{ #3}%
\ifdefined\xint_texuniformdeviate
\unless\ifdefined\xint_c_nine_x^viii
\csname newcount\endcsname\xint_c_nine_x^viii
@@ -255,7 +255,7 @@
\def\XINT_dshr_xzeroorneg #1;{ 0}%
\def\XINT_dshr_xpositive
{%
- \expandafter\xint_secondoftwo_thenstop\romannumeral0\XINT_dsx_xisPos
+ \expandafter\xint_stop_atsecondoftwo\romannumeral0\XINT_dsx_xisPos
}%
\def\xintDSH {\romannumeral0\xintdsh }%
\def\xintdsh #1#2%
@@ -273,7 +273,7 @@
\def\XINT_dsh_xiszero #1.#2;{ #2}%
\def\XINT_dsh_xisPos
{%
- \expandafter\xint_firstoftwo_thenstop\romannumeral0\XINT_dsx_xisPos
+ \expandafter\xint_stop_atfirstoftwo\romannumeral0\XINT_dsx_xisPos
}%
\def\xintDSx {\romannumeral0\xintdsx }%
\def\xintdsx #1#2%
@@ -442,87 +442,87 @@
\def\xintSgnFork {\romannumeral0\xintsgnfork }%
\def\xintsgnfork #1%
{%
- \ifcase #1 \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \ifcase #1 \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
\def\xintiiifSgn {\romannumeral0\xintiiifsgn }%
\def\xintiiifsgn #1%
{%
\ifcase \xintiiSgn{#1}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
\def\xintiiifCmp {\romannumeral0\xintiiifcmp }%
\def\xintiiifcmp #1#2%
{%
\ifcase\xintiiCmp {#1}{#2}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
\def\xintiiifEq {\romannumeral0\xintiiifeq }%
\def\xintiiifeq #1#2%
{%
\if0\xintiiCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else\expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintiiifGt {\romannumeral0\xintiiifgt }%
\def\xintiiifgt #1#2%
{%
\if1\xintiiCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else\expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintiiifLt {\romannumeral0\xintiiiflt }%
\def\xintiiiflt #1#2%
{%
\ifnum\xintiiCmp{#1}{#2}<\xint_c_
- \expandafter\xint_firstoftwo_thenstop
- \else \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintiiifZero {\romannumeral0\xintiiifzero }%
\def\xintiiifzero #1%
{%
\if0\xintiiSgn{#1}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintiiifNotZero {\romannumeral0\xintiiifnotzero }%
\def\xintiiifnotzero #1%
{%
\if0\xintiiSgn{#1}%
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\else
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\fi
}%
\def\xintiiifOne {\romannumeral0\xintiiifone }%
\def\xintiiifone #1%
{%
\if1\xintiiIsOne{#1}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintiiifOdd {\romannumeral0\xintiiifodd }%
\def\xintiiifodd #1%
{%
\if\xintiiOdd{#1}1%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifTrueAelseB {\romannumeral0\xintiiifnotzero}%
@@ -592,17 +592,17 @@
\krof }%
\krof
#3#1#2\xint:#4\xint:
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
{#3#4}{#1#2}%
}%
-\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_zerozero #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_max_zeroplus #1\fi{\xint_stop_atsecondoftwo }%
+\def\XINT_max_pluszero #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_max_minusplus #1\fi{\xint_stop_atsecondoftwo }%
+\def\XINT_max_plusminus #1\fi{\xint_stop_atfirstoftwo }%
\def\XINT_max_plusplus
{%
\if1\romannumeral0\XINT_geq_plusplus
@@ -634,17 +634,17 @@
\krof }%
\krof
#3#1#2\xint:#4\xint:
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\else
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\fi
{#3#4}{#1#2}%
}%
-\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_zerozero #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_min_zeroplus #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_min_pluszero #1\fi{\xint_stop_atsecondoftwo }%
+\def\XINT_min_minusplus #1\fi{\xint_stop_atfirstoftwo }%
+\def\XINT_min_plusminus #1\fi{\xint_stop_atsecondoftwo }%
\def\XINT_min_plusplus
{%
\if1\romannumeral0\XINT_geq_plusplus
@@ -1378,6 +1378,61 @@
\def\xintBool #1{\romannumeral`&&@%
\csname if#1\endcsname\expandafter1\else\expandafter0\fi }%
\def\xintToggle #1{\romannumeral`&&@\iftoggle{#1}{1}{0}}%
+\def\xintiiGCD {\romannumeral0\xintiigcd }%
+\def\xintiigcd #1{\expandafter\XINT_iigcd\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_iigcd #1#2\xint:#3%
+{%
+ \expandafter\XINT_gcd_fork\expandafter#1%
+ \romannumeral0\xintiiabs#3\xint:#1#2\xint:
+}%
+\def\XINT_gcd_fork #1#2%
+{%
+ \xint_UDzerofork
+ #1\XINT_gcd_Aiszero
+ #2\XINT_gcd_Biszero
+ 0\XINT_gcd_loop
+ \krof
+ #2%
+}%
+\def\XINT_gcd_AisZero #1\xint:#2\xint:{ #1}%
+\def\XINT_gcd_BisZero #1\xint:#2\xint:{ #2}%
+\def\XINT_gcd_loop #1\xint:#2\xint:
+{%
+ \expandafter\expandafter\expandafter\XINT_gcd_CheckRem
+ \expandafter\xint_secondoftwo
+ \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint:
+}%
+\def\XINT_gcd_CheckRem #1%
+{%
+ \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop #1%
+}%
+\def\XINT_gcd_end0\XINT_gcd_loop #1\xint:#2\xint:{ #2}%
+\def\xintiiLCM {\romannumeral0\xintiilcm}%
+\def\xintiilcm #1{\expandafter\XINT_iilcm\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_iilcm #1#2\xint:#3%
+{%
+ \expandafter\XINT_lcm_fork\expandafter#1%
+ \romannumeral0\xintiiabs#3\xint:#1#2\xint:
+}%
+\def\XINT_lcm_fork #1#2%
+{%
+ \xint_UDzerofork
+ #1\XINT_lcm_iszero
+ #2\XINT_lcm_iszero
+ 0\XINT_lcm_notzero
+ \krof
+ #2%
+}%
+\def\XINT_lcm_iszero #1\xint:#2\xint:{ 0}%
+\def\XINT_lcm_notzero #1\xint:#2\xint:
+{%
+ \expandafter\XINT_lcm_end\romannumeral0%
+ \expandafter\expandafter\expandafter\XINT_gcd_CheckRem
+ \expandafter\xint_secondoftwo
+ \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint:
+ \xint:#1\xint:#2\xint:
+}%
+\def\XINT_lcm_end #1\xint:#2\xint:#3\xint:{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}%
\def\xintRandomDigits{\romannumeral0\xintrandomdigits}%
\def\xintrandomdigits#1%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
index df427eeaa98..a1799fbc3da 100644
--- a/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintbinhex.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xintbinhex: Expandable binary and hexadecimal conversions
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintbinhex}%
- [2018/06/17 1.3c Expandable binary and hexadecimal conversions (JFB)]%
+ [2019/01/06 1.3d 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
\def\XINT_tmpa #1{\ifx\relax#1\else
diff --git a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
index 195b8cae810..530d6e3db7e 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcfrac.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xintcfrac: Expandable continued fractions with xint package
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcfrac}%
- [2018/06/17 1.3c Expandable continued fractions with xint package (JFB)]%
+ [2019/01/06 1.3d 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 de9475ec3f9..b93057a82bd 100644
--- a/Master/texmf-dist/tex/generic/xint/xintcore.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintcore.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xintcore: Expandable arithmetic on big integers
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintcore}%
- [2018/06/17 1.3c Expandable arithmetic on big integers (JFB)]%
+ [2019/01/06 1.3d Expandable arithmetic on big integers (JFB)]%
\csname XINT_Clamped_istrapped\endcsname
\csname XINT_ConversionSyntax_istrapped\endcsname
\csname XINT_DivisionByZero_istrapped\endcsname
@@ -104,10 +104,10 @@
\XINT_expandableerror{next: #5}%
% not for X3.274
%\XINT_expandableerror{<RET>, or I\xintUse{...}<RET>, or I\xintCTRLC<RET>}%
- \xint_firstofone_thenstop{#5}%
+ \xint_stop_atfirstofone{#5}%
}%
}%
-%% \let\xintUse\xint_firstofthree_thenstop % defined in xint.sty
+%% \let\xintUse\xint_stop_atfirstofthree % defined in xint.sty
\def\XINT_ifFlagRaised #1{%
\ifcsname XINT_#1Flag_ON\endcsname
\expandafter\xint_firstoftwo
@@ -1774,9 +1774,9 @@
\def\xintiiQuo {\romannumeral0\xintiiquo }%
\def\xintiiRem {\romannumeral0\xintiirem }%
\def\xintiiquo
- {\expandafter\xint_firstoftwo_thenstop\romannumeral0\xintiidivision }%
+ {\expandafter\xint_stop_atfirstoftwo\romannumeral0\xintiidivision }%
\def\xintiirem
- {\expandafter\xint_secondoftwo_thenstop\romannumeral0\xintiidivision }%
+ {\expandafter\xint_stop_atsecondoftwo\romannumeral0\xintiidivision }%
\def\xintiiDivRound {\romannumeral0\xintiidivround }%
\def\xintiidivround #1{\expandafter\XINT_iidivround\romannumeral`&&@#1\xint:}%
\def\XINT_idivround #1#2\xint:#3%
@@ -1843,7 +1843,7 @@
\krof
}%
\def\XINT_iidivtrunc_pos #1#2\xint:#3\xint:
- {\expandafter\xint_firstoftwo_thenstop
+ {\expandafter\xint_stop_atfirstoftwo
\romannumeral0\XINT_div_prepare {#2}{#1#3}}%
\def\xintiiModTrunc {\romannumeral0\xintiimodtrunc }%
\def\xintiimodtrunc #1{\expandafter\XINT_iimodtrunc\romannumeral`&&@#1\xint:}%
@@ -1873,7 +1873,7 @@
\krof
}%
\def\XINT_iimodtrunc_pos #1#2\xint:#3\xint:
- {\expandafter\xint_secondoftwo_thenstop\romannumeral0\XINT_div_prepare
+ {\expandafter\xint_stop_atsecondoftwo\romannumeral0\XINT_div_prepare
{#2}{#1#3}}%
\def\xintiiDivMod {\romannumeral0\xintiidivmod }%
\def\xintiidivmod #1{\expandafter\XINT_iidivmod\romannumeral`&&@#1\xint:}%
@@ -1891,7 +1891,7 @@
\XINT_signalcondition{DivisionByZero}{Division by #2 of #1#3}{}%
{{0}{0}}% ^^c3^^a0 revoir...
}%
-\def\XINT_iidivmod_aiszero #1#2\xint:#3\xint:{{0}{0}}%
+\def\XINT_iidivmod_aiszero #1\xint:#2\xint:{{0}{0}}%
\def\XINT_iidivmod_bneg #1%
{%
\expandafter\XINT_iidivmod_bneg_finish
@@ -1907,10 +1907,10 @@
}%
\def\XINT_iidivmod_bpos #1#2\xint:#3\xint:{\xintiidivision{#1#3}{#2}}%
\def\xintiiDivFloor {\romannumeral0\xintiidivfloor}%
-\def\xintiidivfloor {\expandafter\xint_firstoftwo_thenstop
+\def\xintiidivfloor {\expandafter\xint_stop_atfirstoftwo
\romannumeral0\xintiidivmod}%
\def\xintiiMod {\romannumeral0\xintiimod}%
-\def\xintiimod {\expandafter\xint_secondoftwo_thenstop
+\def\xintiimod {\expandafter\xint_stop_atsecondoftwo
\romannumeral0\xintiidivmod}%
\def\xintiiSqr {\romannumeral0\xintiisqr }%
\def\xintiisqr #1%
diff --git a/Master/texmf-dist/tex/generic/xint/xintexpr.sty b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
index 72a614e2692..13bbb335437 100644
--- a/Master/texmf-dist/tex/generic/xint/xintexpr.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintexpr.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xintexpr: Expandable expression parser
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -81,7 +81,7 @@
\XINTsetupcatcodes%
\XINT_providespackage
\ProvidesPackage{xintexpr}%
- [2018/06/17 1.3c Expandable expression parser (JFB)]%
+ [2019/01/06 1.3d Expandable expression parser (JFB)]%
\catcode`! 11
\let\XINT_Cmp \xintiiCmp
\def\xint_gob_til_! #1!{}% ! with catcode 11
@@ -113,17 +113,28 @@
\def\XINT_expr_print #1{\xintSPRaw::csv {\XINT_expr_unlock #1}}%
\def\XINT_iiexpr_print #1{\xintCSV::csv {\XINT_expr_unlock #1}}%
\def\XINT_boolexpr_print #1{\xintIsTrue::csv {\XINT_expr_unlock #1}}%
-\def\xintexpr {\romannumeral0\xinteval }%
-\def\xintiexpr {\romannumeral0\xintieval }%
-\def\xintfloatexpr {\romannumeral0\xintfloateval }%
-\def\xintiiexpr {\romannumeral0\xintiieval }%
+\def\xintexpr {\romannumeral0\xintexpro }%
+\def\xintiexpr {\romannumeral0\xintiexpro }%
+\def\xintfloatexpr {\romannumeral0\xintfloatexpro }%
+\def\xintiiexpr {\romannumeral0\xintiiexpro }%
\def\xinttheexpr
- {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval }%
-\def\xinttheiexpr {\romannumeral`&&@\xintthe\xintiexpr }%
-\def\xintthefloatexpr {\romannumeral`&&@\xintthe\xintfloatexpr }%
+ {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval}%
+\def\xinttheiexpr
+ {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintiexpr}%
+\def\xintthefloatexpr
+ {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintfloatexpr}%
\def\xinttheiiexpr
- {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval }%
+ {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval}%
+\def\xinteval #1%
+ {\romannumeral`&&@\expandafter\XINT_expr_print\romannumeral0\xintbareeval#1\relax}%
+\def\xintieval #1%
+ {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintiexpr#1\relax}%
+\def\xintfloateval #1%
+ {\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@\xintfloatexpr#1\relax}%
+\def\xintiieval #1%
+ {\romannumeral`&&@\expandafter\XINT_iiexpr_print\romannumeral0\xintbareiieval#1\relax}%
\def\xintthe #1{\romannumeral`&&@\expandafter\xint_gobble_iii\romannumeral`&&@#1}%
+\def\xintthe_o #1{\expandafter\xint_gobble_iii\romannumeral`&&@#1}%
\let\thexintexpr \xinttheexpr
\let\thexintiexpr \xinttheiexpr
\let\thexintfloatexpr\xintthefloatexpr
@@ -146,9 +157,9 @@
\def\xintthebareeval {\expandafter\XINT_expr_unlock\romannumeral0\xintbareeval}%
\def\xintthebarefloateval {\expandafter\XINT_expr_unlock\romannumeral0\xintbarefloateval}%
\def\xintthebareiieval {\expandafter\XINT_expr_unlock\romannumeral0\xintbareiieval}%
-\def\xinteval {\expandafter\XINT_expr_wrap\romannumeral0\xintbareeval }%
-\def\xintiieval {\expandafter\XINT_iiexpr_wrap\romannumeral0\xintbareiieval }%
-\def\xintieval #1%
+\def\xintexpro {\expandafter\XINT_expr_wrap\romannumeral0\xintbareeval }%
+\def\xintiiexpro {\expandafter\XINT_iiexpr_wrap\romannumeral0\xintbareiieval }%
+\def\xintiexpro #1%
{\ifx [#1\expandafter\XINT_iexpr_withopt\else\expandafter\XINT_iexpr_noopt \fi #1}%
\def\XINT_iexpr_noopt
{\expandafter\XINT_iexpr_wrap \expandafter 0\romannumeral0\xintbareeval }%
@@ -163,7 +174,7 @@
\expandafter\XINT_expr_wrap
\csname .=\xintRound::csv {#1}{\XINT_expr_unlock #2}\endcsname
}%
-\def\xintfloateval #1%
+\def\xintfloatexpro #1%
{%
\ifx [#1\expandafter\XINT_flexpr_withopt_a\else\expandafter\XINT_flexpr_noopt
\fi #1%
@@ -192,14 +203,17 @@
}%
\def\XINT_expr_unlock_sp #1.;#2.=#3!{{#2}{#3}}%
\def\xintboolexpr {\romannumeral0\expandafter\expandafter\expandafter
- \XINT_boolexpr_done \expandafter\xint_gobble_iv\romannumeral0\xinteval }%
+ \XINT_boolexpr_done \expandafter\xint_gobble_iv\romannumeral0\xintexpro }%
\def\xinttheboolexpr {\romannumeral`&&@\expandafter\expandafter\expandafter
- \XINT_boolexpr_print\expandafter\xint_gobble_iv\romannumeral0\xinteval }%
+ \XINT_boolexpr_print\expandafter\xint_gobble_iv\romannumeral0\xintexpro }%
\let\thexintboolexpr\xinttheboolexpr
\def\XINT_boolexpr_done { !\XINT_expr_usethe\XINT_protectii\XINT_boolexpr_print }%
-\def\xintifboolexpr #1{\romannumeral0\xintifnotzero {\xinttheexpr #1\relax}}%
-\def\xintifboolfloatexpr #1{\romannumeral0\xintifnotzero {\xintthefloatexpr #1\relax}}%
-\def\xintifbooliiexpr #1{\romannumeral0\xintifnotzero {\xinttheiiexpr #1\relax}}%
+\def\xintifboolexpr #1{\romannumeral0\xintiiifnotzero {\xinttheexpr #1\relax}}%
+\def\xintifboolfloatexpr #1{\romannumeral0\xintiiifnotzero {\xintthefloatexpr #1\relax}}%
+\def\xintifbooliiexpr #1{\romannumeral0\xintiiifnotzero {\xinttheiiexpr #1\relax}}%
+\def\xintifsgnexpr #1{\romannumeral0\xintiiifsgn {\xinttheexpr #1\relax}}%
+\def\xintifsgnfloatexpr #1{\romannumeral0\xintiiifsgn {\xintthefloatexpr #1\relax}}%
+\def\xintifsgniiexpr #1{\romannumeral0\xintiiifsgn {\xinttheiiexpr #1\relax}}%
\let\XINT:NEhook:two\empty
\let\XINT:NEhook:one\empty
\let\XINT:NEhook:csv\empty
@@ -1469,7 +1483,7 @@
\fi
}%
\catcode`* 12
-\catcode`~\active
+\catcode`~ 13
\catcode`: 12
\def\XINT_expr_defvar_getname #1:#2~{\endgroup
\def\XINT_expr_tmpa{#1}\edef\XINT_expr_tmpc{\xintCSVLength{#1}}}%
@@ -1483,7 +1497,7 @@
\detokenize\expandafter{\XINT_expr_tmpa}:~%
\ifcase\XINT_expr_tmpc
\xintMessage {xintexpr}{Warning}
- {Aborting: impossible to declare variable with empty name.}%
+ {Aborting: not allowed to declare variable with empty name.}%
\or
\edef\XINT_expr_tmpb{\romannumeral0#1#3\relax}%
\XINT_expr_defvar_one\XINT_expr_tmpa\XINT_expr_tmpb
@@ -1528,12 +1542,10 @@
\ifnum\expandafter\xintLength\expandafter{\XINT_expr_tmpa}=\@ne
\expandafter\xintnewdummy\XINT_expr_tmpa
\else
- \XINT_global
- \expandafter\edef\csname XINT_expr_var_\XINT_expr_tmpa\endcsname
- {\csname .=0\endcsname\noexpand\XINT_expr_undefined {\XINT_expr_tmpa}}%
- \XINT_global
- \expandafter\edef\csname XINT_expr_onliteral_\XINT_expr_tmpa\endcsname
- {\csname .=0\endcsname\noexpand\XINT_expr_undefined {\XINT_expr_tmpa}*}%
+ \XINT_global\expandafter
+ \let\csname XINT_expr_var_\XINT_expr_tmpa\endcsname\xint_undefined
+ \XINT_global\expandafter
+ \let\csname XINT_expr_onliteral_\XINT_expr_tmpa\endcsname\xint_undefined
\ifxintverbose\xintMessage {xintexpr}{Info}
{Variable \XINT_expr_tmpa\space has been
\ifxintglobaldefs globally \fi ``unassigned''.}%
@@ -1544,7 +1556,6 @@
{Error: there was no such variable \XINT_expr_tmpa\space to unassign.}%
\fi
}%
-\def\XINT_expr_undefined #1{\xintError:replaced_by_zero\xint_gobble_i {#1}}%
\catcode`* 11
\def\XINT_expr_makedummy #1%
{%
@@ -2049,10 +2060,55 @@
\expandafter\xint_firstofone\romannumeral`&&@#1,^,{1/1[0]}}%
\def\xintiiPrd:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiimul
\expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
-\def\xintGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintgcd
- \expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
-\def\xintLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintlcm
- \expandafter\xint_firstofone\romannumeral`&&@#1,^,0}%
+\def\xintGCDof:csv #1{\expandafter\XINT_gcdof:_a\romannumeral`&&@#1,^,{1/1[0]}}%
+\def\XINT_gcdof:_a #1%
+ {\if ,#1\expandafter\XINT_oncsv:_empty\else\expandafter\XINT_gcdof:_b\fi #1}%
+\def\XINT_gcdof:_b #1,%
+ {\expandafter\XINT_gcdof:_c\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_gcdof:_c #1\xint:#2,%
+ {\expandafter\XINT_gcdof:_d\romannumeral0\xintiiabs#2\xint:#1\xint:}%
+\def\XINT_gcdof:_d #1%
+ {\if ^#1\expandafter\XINT_gcdof:_end\else\expandafter\XINT_gcdof:_e\fi #1}%
+\def\XINT_gcdof:_e#1#2\xint:#3\xint:
+{%
+ \if0#1\expandafter\XINT_gcdof:_f\fi
+ \expandafter\XINT_gcdof:_e\romannumeral0\xintmod{#3}{#1#2}\xint:#1#2\xint:
+}%
+\def\XINT_gcdof:_f
+ \expandafter\XINT_gcdof:_e\romannumeral0\xintmod#1#2\xint:#3\xint:#4,%
+{%
+ \expandafter\XINT_gcdof:_d\romannumeral0\xintiiabs#4\xint:#1\xint:
+}%
+\def\XINT_gcdof:_end ^\xint:#1\xint:#2{#1}%
+\def\xintLCMof:csv #1{\expandafter\XINT_lcmof:_a\romannumeral`&&@#1,^,{0/1[0]}}%
+\def\XINT_lcmof:_a #1%
+ {\if ,#1\expandafter\XINT_oncsv:_empty\else\expandafter\XINT_lcmof:_b\fi #1}%
+\def\XINT_lcmof:_b #1,%
+ {\expandafter\XINT_lcmof:_c\romannumeral0\xintiiabs\xintRaw{#1}\xint:}%
+\def\XINT_lcmof:_c #1{\if0#1\expandafter\XINT_lcmof:_zero\fi
+ \expandafter\XINT_lcmof:_d\romannumeral0\XINT_inv #1}%
+\def\XINT_lcmof:_d #1\xint:#2,%
+ {\expandafter\XINT_lcmof:_e\romannumeral0\xintiiabs#2\xint:#1\xint:}%
+\def\XINT_lcmof:_e #1%
+ {\if ^#1\expandafter\XINT_lcmof:_end\else\expandafter\XINT_lcmof:_f\fi #1}%
+\def\XINT_lcmof:_f#1#2\xint:
+{%
+ \if0#1\expandafter\XINT_lcmof:_zero\fi
+ \expandafter\XINT_lcmof:_g\romannumeral0\expandafter\XINT_inv
+ \romannumeral0\xintraw{#1#2}\xint:
+}%
+\def\XINT_lcmof:_g #1#2\xint:#3\xint:
+{%
+ \if0#1\expandafter\XINT_lcmof:_h\fi
+ \expandafter\XINT_lcmof:_g\romannumeral0\xintmod{#3}{#1#2}\xint:#1#2\xint:
+}%
+\def\XINT_lcmof:_h
+ \expandafter\XINT_lcmof:_g\romannumeral0\xintmod#1#2\xint:#3\xint:#4,%
+{%
+ \expandafter\XINT_lcmof:_e\romannumeral0\xintiiabs#4\xint:#1\xint:
+}%
+\def\XINT_lcmof:_zero #1^,#2{0/1[0]}%
+\def\XINT_lcmof:_end ^\xint:#1\xint:#2{\romannumeral0\XINT_inv #1}%
\def\xintiiGCDof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiigcd
\expandafter\xint_firstofone\romannumeral`&&@#1,^,1}%
\def\xintiiLCMof:csv #1{\expandafter\XINT_oncsv:_a\expandafter\xintiilcm
@@ -2233,6 +2289,28 @@
\expandafter #1\expandafter #2\csname.=%
\XINT:NEhook:one\xintiiEven{\XINT_expr_unlock #3}\endcsname
}%
+\def\XINT_expr_func_isint #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintIsInt{\XINT_expr_unlock #3}\endcsname
+}%
+\def\XINT_flexpr_func_isint #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintFloatIsInt{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_iiexpr_func_isint\XINT_expr_func_isint % ? perhaps rather always 1
+\def\XINT_expr_func_isone #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintIsOne{\XINT_expr_unlock #3}\endcsname
+}%
+\let\XINT_flexpr_func_isone\XINT_expr_func_isone
+\def\XINT_iiexpr_func_isone #1#2#3%
+{%
+ \expandafter #1\expandafter #2\csname.=%
+ \XINT:NEhook:one\xintiiIsOne{\XINT_expr_unlock #3}\endcsname
+}%
\def\XINT_expr_func_nuple #1#2#3%
{\expandafter #1\expandafter #2\csname.=\XINT_expr_unlock #3\endcsname }%
\let\XINT_flexpr_func_nuple\XINT_expr_func_nuple
@@ -2771,6 +2849,18 @@
\def\XINT:newexpr:userfunc #1#2#3%
{~xintExpandArgs{XINT_#1_userfunc_#2}{\xintCSVtoListNonStripped{#3}}}%
\catcode`~ 3
+\def\XINT_tmpa #1{\expandafter\def\csname xintunassign#1func\endcsname ##1{%
+ \edef\XINT_expr_tmpa{##1}%
+ \edef\XINT_expr_tmpa {\xint_zapspaces_o\XINT_expr_tmpa}%
+ \XINT_global\expandafter
+ \let\csname XINT_#1_func_\XINT_expr_tmpa\endcsname\xint_undefined
+ \XINT_global\expandafter
+ \let\csname XINT_#1_userfunc_\XINT_expr_tmpa\endcsname\xint_undefined
+ \ifxintverbose\xintMessage {xintexpr}{Info}
+ {Function \XINT_expr_tmpa\space for \string\xint #1 parser now
+ \ifxintglobaldefs globally \fi undefined.}%
+ \fi}}%
+\XINT_tmpa{expr}\XINT_tmpa{iiexpr}\XINT_tmpa{floatexpr}%
\def\XINT_expr_wrapit #1{\expandafter\XINT_expr_wrap\csname.=#1\endcsname}%
\def\xintNewFunction #1#2[#3]#4%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xintfrac.sty b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
index 2b3ac64e27f..09b2c87192d 100644
--- a/Master/texmf-dist/tex/generic/xint/xintfrac.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintfrac.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xintfrac: Expandable operations on fractions
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintfrac}%
- [2018/06/17 1.3c Expandable operations on fractions (JFB)]%
+ [2019/01/06 1.3d Expandable operations on fractions (JFB)]%
\def\XINT_cntSgnFork #1%
{%
\ifcase #1\expandafter\xint_secondofthree
@@ -317,78 +317,78 @@
\def\xintifsgn #1%
{%
\ifcase \xintSgn{#1}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
\def\xintifCmp{\romannumeral0\xintifcmp }%
\def\xintifcmp #1#2%
{%
\ifcase\xintCmp {#1}{#2}
- \expandafter\xint_secondofthree_thenstop
- \or\expandafter\xint_thirdofthree_thenstop
- \else\expandafter\xint_firstofthree_thenstop
+ \expandafter\xint_stop_atsecondofthree
+ \or\expandafter\xint_stop_atthirdofthree
+ \else\expandafter\xint_stop_atfirstofthree
\fi
}%
\def\xintifEq {\romannumeral0\xintifeq }%
\def\xintifeq #1#2%
{%
\if0\xintCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else\expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifGt {\romannumeral0\xintifgt }%
\def\xintifgt #1#2%
{%
\if1\xintCmp{#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
- \else\expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else\expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifLt {\romannumeral0\xintiflt }%
\def\xintiflt #1#2%
{%
\ifnum\xintCmp{#1}{#2}<\xint_c_
- \expandafter\xint_firstoftwo_thenstop
- \else \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
+ \else \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifZero {\romannumeral0\xintifzero }%
\def\xintifzero #1%
{%
\if0\xintSgn{#1}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifNotZero{\romannumeral0\xintifnotzero }%
\def\xintifnotzero #1%
{%
\if0\xintSgn{#1}%
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\else
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\fi
}%
\def\xintifOne {\romannumeral0\xintifone }%
\def\xintifone #1%
{%
\if1\xintIsOne{#1}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintifOdd {\romannumeral0\xintifodd }%
\def\xintifodd #1%
{%
\if\xintOdd{#1}1%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
\def\xintRaw {\romannumeral0\xintraw }%
@@ -513,7 +513,7 @@
\def\XINT_fracfrac_C 0\XINT_fracfrac_D #1#2#3%
{%
\if1\XINT_isOne {#3}%
- \xint_afterfi {\expandafter\xint_firstoftwo_thenstop\xint_gobble_ii }%
+ \xint_afterfi {\expandafter\xint_stop_atfirstoftwo\xint_gobble_ii }%
\fi
\space
\frac {#2}{#3}%
@@ -726,11 +726,14 @@
\def\XINT_ifint #1/#2.%
{%
\if 0\xintiiRem {#1}{#2}%
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\else
- \expandafter\xint_secondoftwo_thenstop
+ \expandafter\xint_stop_atsecondoftwo
\fi
}%
+\def\xintIsInt {\romannumeral0\xintisint }%
+\def\xintisint #1%
+ {\expandafter\XINT_ifint\romannumeral0\xintrawwithzeros {#1}.10}%
\def\xintJrr {\romannumeral0\xintjrr }%
\def\xintjrr #1%
{%
@@ -1820,6 +1823,28 @@
\def\xintabs #1{\expandafter\XINT_abs\romannumeral0\xintraw {#1}}%
\def\xintOpp {\romannumeral0\xintopp }%
\def\xintopp #1{\expandafter\XINT_opp\romannumeral0\xintraw {#1}}%
+\def\xintInv {\romannumeral0\xintinv }%
+\def\xintinv #1{\expandafter\XINT_inv\romannumeral0\xintraw {#1}}%
+\def\XINT_inv #1%
+{%
+ \xint_UDzerominusfork
+ #1-\XINT_inv_iszero
+ 0#1\XINT_inv_a
+ 0-{\XINT_inv_a {}}%
+ \krof #1%
+}%
+\def\XINT_inv_iszero #1]%
+ {\XINT_signalcondition{DivisionByZero}{Division of 1 by zero (#1])}{}{0/1[0]}}%
+\def\XINT_inv_a #1#2/#3[#4#5]%
+{%
+ \xint_UDzerominusfork
+ #4-\XINT_inv_expiszero
+ 0#4\XINT_inv_b
+ 0-{\XINT_inv_b -#4}%
+ \krof #5.{#1#3/#2}%
+}%
+\def\XINT_inv_expiszero #1.#2{ #2[0]}%
+\def\XINT_inv_b #1.#2{ #2[#1]}%
\def\xintSgn {\romannumeral0\xintsgn }%
\def\xintsgn #1{\expandafter\XINT_sgn\romannumeral0\xintraw {#1}\xint:}%
\def\xintFloat {\romannumeral0\xintfloat }%
@@ -3211,10 +3236,13 @@
\romannumeral0\xintrez{\XINTinFloat[\XINTdigits]{#1}}}%
\def\XINT_iffloatint #1#2/1[#3]%
{%
- \if 0#1\xint_dothis\xint_firstoftwo_thenstop\fi
- \ifnum#3<\xint_c_\xint_dothis\xint_secondoftwo_thenstop\fi
- \xint_orthat\xint_firstoftwo_thenstop
+ \if 0#1\xint_dothis\xint_stop_atfirstoftwo\fi
+ \ifnum#3<\xint_c_\xint_dothis\xint_stop_atsecondoftwo\fi
+ \xint_orthat\xint_stop_atfirstoftwo
}%
+\def\xintFloatIsInt {\romannumeral0\xintfloatisint}%
+\def\xintfloatisint #1{\expandafter\XINT_iffloatint
+ \romannumeral0\xintrez{\XINTinFloat[\XINTdigits]{#1}}10}%
\def\XINTinRandomFloatS{\romannumeral0\XINTinrandomfloatS}%
\def\XINTinRandomFloatSdigits{\XINTinRandomFloatS[\XINTdigits]}%
\def\XINTinrandomfloatS[#1]%
diff --git a/Master/texmf-dist/tex/generic/xint/xintgcd.sty b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
index ffdc8e5be04..60a38048466 100644
--- a/Master/texmf-dist/tex/generic/xint/xintgcd.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintgcd.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xintgcd: Euclidean algorithm with xint package
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -70,66 +70,66 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintgcd}%
- [2018/06/17 1.3c Euclide algorithm with xint package (JFB)]%
+ [2019/01/06 1.3d Euclide algorithm with xint package (JFB)]%
\def\xintGCD {\romannumeral0\xintgcd }%
\def\xintgcd #1#2{\xintiigcd {\xintNum{#1}}{\xintNum{#2}}}%
\def\xintiiGCD {\romannumeral0\xintiigcd }%
-\def\xintiigcd #1%
+\def\xintiigcd #1{\expandafter\XINT_iigcd\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_iigcd #1#2\xint:#3%
{%
- \expandafter\XINT_iigcd\expandafter{\romannumeral0\xintiiabs{#1}}%
+ \expandafter\XINT_gcd_fork\expandafter#1%
+ \romannumeral0\xintiiabs#3\xint:#1#2\xint:
}%
-\def\XINT_iigcd #1#2%
-{%
- \expandafter\XINT_gcd_fork\romannumeral0\xintiiabs{#2}\Z #1\Z
-}%
-\def\XINT_gcd_fork #1#2\Z #3#4\Z
+\def\XINT_gcd_fork #1#2%
{%
\xint_UDzerofork
- #1\XINT_gcd_BisZero
- #3\XINT_gcd_AisZero
+ #1\XINT_gcd_Aiszero
+ #2\XINT_gcd_Biszero
0\XINT_gcd_loop
\krof
- {#1#2}{#3#4}%
+ #2%
}%
-\def\XINT_gcd_AisZero #1#2{ #1}%
-\def\XINT_gcd_BisZero #1#2{ #2}%
-\def\XINT_gcd_CheckRem #1#2\Z
+\def\XINT_gcd_AisZero #1\xint:#2\xint:{ #1}%
+\def\XINT_gcd_BisZero #1\xint:#2\xint:{ #2}%
+\def\XINT_gcd_loop #1\xint:#2\xint:
{%
- \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop {#1#2}%
+ \expandafter\expandafter\expandafter\XINT_gcd_CheckRem
+ \expandafter\xint_secondoftwo
+ \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint:
}%
-\def\XINT_gcd_end0\XINT_gcd_loop #1#2{ #2}%
-\def\XINT_gcd_loop #1#2%
+\def\XINT_gcd_CheckRem #1%
{%
- \expandafter\expandafter\expandafter
- \XINT_gcd_CheckRem
- \expandafter\xint_secondoftwo
- \romannumeral0\XINT_div_prepare {#1}{#2}\Z
- {#1}%
+ \xint_gob_til_zero #1\XINT_gcd_end0\XINT_gcd_loop #1%
}%
+\def\XINT_gcd_end0\XINT_gcd_loop #1\xint:#2\xint:{ #2}%
\def\xintLCM {\romannumeral0\xintlcm}%
\def\xintlcm #1#2{\xintiilcm{\xintNum{#1}}{\xintNum{#2}}}%
\def\xintiiLCM {\romannumeral0\xintiilcm}%
-\def\xintiilcm #1%
+\def\xintiilcm #1{\expandafter\XINT_iilcm\romannumeral0\xintiiabs#1\xint:}%
+\def\XINT_iilcm #1#2\xint:#3%
{%
- \expandafter\XINT_iilcm\expandafter{\romannumeral0\xintiiabs{#1}}%
+ \expandafter\XINT_lcm_fork\expandafter#1%
+ \romannumeral0\xintiiabs#3\xint:#1#2\xint:
}%
-\def\XINT_iilcm #1#2%
-{%
- \expandafter\XINT_lcm_fork\romannumeral0\xintiiabs{#2}\Z #1\Z
-}%
-\def\XINT_lcm_fork #1#2\Z #3#4\Z
+\def\XINT_lcm_fork #1#2%
{%
\xint_UDzerofork
- #1\XINT_lcm_BisZero
- #3\XINT_lcm_AisZero
- 0\expandafter
+ #1\XINT_lcm_iszero
+ #2\XINT_lcm_iszero
+ 0\XINT_lcm_notzero
\krof
- \XINT_lcm_notzero\expandafter{\romannumeral0\XINT_gcd_loop {#1#2}{#3#4}}%
- {#1#2}{#3#4}%
+ #2%
+}%
+\def\XINT_lcm_iszero #1\xint:#2\xint:{ 0}%
+\def\XINT_lcm_notzero #1\xint:#2\xint:
+{%
+ \expandafter\XINT_lcm_end\romannumeral0%
+ \expandafter\expandafter\expandafter\XINT_gcd_CheckRem
+ \expandafter\xint_secondoftwo
+ \romannumeral0\XINT_div_prepare {#1}{#2}\xint:#1\xint:
+ \xint:#1\xint:#2\xint:
}%
-\def\XINT_lcm_AisZero #1#2#3#4#5{ 0}%
-\def\XINT_lcm_BisZero #1#2#3#4#5{ 0}%
-\def\XINT_lcm_notzero #1#2#3{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}%
+\def\XINT_lcm_end #1\xint:#2\xint:#3\xint:{\xintiimul {#2}{\xintiiQuo{#3}{#1}}}%
\def\xintBezout {\romannumeral0\xintbezout }%
\def\xintbezout #1%
{%
diff --git a/Master/texmf-dist/tex/generic/xint/xintkernel.sty b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
index 2267a1f77b6..63719d70a97 100644
--- a/Master/texmf-dist/tex/generic/xint/xintkernel.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintkernel.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xintkernel: Paraphernalia for the xint packages
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -156,7 +156,7 @@
\fi
\XINT_providespackage
\ProvidesPackage {xintkernel}%
- [2018/06/17 1.3c Paraphernalia for the xint packages (JFB)]%
+ [2019/01/06 1.3d Paraphernalia for the xint packages (JFB)]%
\chardef\xint_c_ 0
\chardef\xint_c_i 1
\chardef\xint_c_ii 2
@@ -228,10 +228,10 @@
\long\def\xint_firstofone #1{#1}%
\long\def\xint_firstoftwo #1#2{#1}%
\long\def\xint_secondoftwo #1#2{#2}%
-\let\xint_gobble_thenstop\xint_gob_andstop_i
-\long\def\xint_firstofone_thenstop #1{ #1}%
-\long\def\xint_firstoftwo_thenstop #1#2{ #1}%
-\long\def\xint_secondoftwo_thenstop #1#2{ #2}%
+\let\xint_stop_aftergobble\xint_gob_andstop_i
+\long\def\xint_stop_atfirstofone #1{ #1}%
+\long\def\xint_stop_atfirstoftwo #1#2{ #1}%
+\long\def\xint_stop_atsecondoftwo #1#2{ #2}%
\long\def\xint_exchangetwo_keepbraces #1#2{{#2}{#1}}%
\long\def\xint_gob_til_R #1\R {}%
\long\def\xint_gob_til_W #1\W {}%
@@ -260,7 +260,7 @@
\long\def\xint_afterfi #1#2\fi {\fi #1}%
\long\def\xint_bye #1\xint_bye {}%
\long\def\xint_Bye #1\xint_bye {}%
-\long\def\xint_bye_thenstop #1\xint_bye { }%
+\long\def\xint_stop_afterbye #1\xint_bye { }%
\long\def\xint_dothis #1#2\xint_orthat #3{\fi #1}% 1.1
\let\xint_orthat \xint_firstofone
\long\def\xintdothis #1#2\xintorthat #3{\fi #1}%
diff --git a/Master/texmf-dist/tex/generic/xint/xintseries.sty b/Master/texmf-dist/tex/generic/xint/xintseries.sty
index 94b26505845..7958c90d75d 100644
--- a/Master/texmf-dist/tex/generic/xint/xintseries.sty
+++ b/Master/texmf-dist/tex/generic/xint/xintseries.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xintseries: Expandable partial sums with xint package
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xintseries}%
- [2018/06/17 1.3c Expandable partial sums with xint package (JFB)]%
+ [2019/01/06 1.3d 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 9682ea524e0..f6d378e7c24 100644
--- a/Master/texmf-dist/tex/generic/xint/xinttools.sty
+++ b/Master/texmf-dist/tex/generic/xint/xinttools.sty
@@ -21,8 +21,8 @@
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% ---------------------------------------------------------------
-%% The xint bundle 1.3c 2018/06/17
-%% Copyright (C) 2013-2018 by Jean-Francois Burnol
+%% The xint bundle 1.3d 2019/01/06
+%% Copyright (C) 2013-2019 by Jean-Francois Burnol
%% xinttools: Expandable and non-expandable utilities
%% ---------------------------------------------------------------
\begingroup\catcode61\catcode48\catcode32=10\relax%
@@ -70,7 +70,7 @@
\XINTsetupcatcodes% defined in xintkernel.sty
\XINT_providespackage
\ProvidesPackage{xinttools}%
- [2018/06/17 1.3c Expandable and non-expandable utilities (JFB)]%
+ [2019/01/06 1.3d Expandable and non-expandable utilities (JFB)]%
\newtoks\XINT_toks
\xint_firstofone{\let\XINT_sptoken= } %<- space here!
\def\xintgodef {\global\xintodef }%
@@ -289,8 +289,8 @@
\def\XINT_nthelt_neg_a #1%
{%
\xint_UDzerominusfork
- #1-\xint_bye_thenstop
- 0#1\xint_bye_thenstop
+ #1-\xint_stop_afterbye
+ 0#1\xint_stop_afterbye
0-{}%
\krof
\expandafter\XINT_nthelt_neg_b
@@ -570,7 +570,7 @@
\def\XINT_seq #1#2%
{%
\ifcase\ifnum #1=#2 0\else\ifnum #2>#1 1\else -1\fi\fi\space
- \expandafter\xint_firstoftwo_thenstop
+ \expandafter\xint_stop_atfirstoftwo
\or
\expandafter\XINT_seq_p
\else
@@ -1218,7 +1218,7 @@
\def\xintKeep:f:csv {\romannumeral0\xintkeep:f:csv }%
\long\def\xintkeep:f:csv #1#2%
{%
- \expandafter\xint_gobble_thenstop
+ \expandafter\xint_stop_aftergobble
\romannumeral0\expandafter\XINT_keep:f:csv_a
\the\numexpr #1\expandafter.\expandafter{\romannumeral`&&@#2}%
}%
@@ -1311,7 +1311,7 @@
\def\xintTrim:f:csv {\romannumeral0\xinttrim:f:csv }%
\long\def\xinttrim:f:csv #1#2%
{%
- \expandafter\xint_gobble_thenstop
+ \expandafter\xint_stop_aftergobble
\romannumeral0\expandafter\XINT_trim:f:csv_a
\the\numexpr #1\expandafter.\expandafter{\romannumeral`&&@#2}%
}%
@@ -1408,7 +1408,7 @@
}%
\def\XINT_nthelt:f:csv_neg_fork #1%
{%
- \if#1-\expandafter\xint_bye_thenstop\fi
+ \if#1-\expandafter\xint_stop_afterbye\fi
\expandafter\XINT_nthelt:f:csv_neg_done
\romannumeral0%
\expandafter\XINT_keep:f:csv_trimloop\the\numexpr-\xint_c_ix+#1%