Debian Codegraph @

texmf-dist/doc/generic/xint/xintchanges.md

raw
1 % CHANGE LOG
2 % xint 1.4n
3 % 2025/09/05
4
5 Source: xint.dtx 1.4n 2025/09/05 (doc 2025/09/05)
6 Author: Jean-François Burnol
7 Info: Expandable operations on big integers, decimals, fractions
8 License: LPPL 1.3c
9
10 `1.4n (2025/09/05)`
11 ----
12
13 ### Improvements and new features
14
15 - **xintexpr**: Babel-active characters with `pdflatex` (such as for
16 the example `!` with French) are automagically taken care of by
17 `\xintfloateval`, `\xinteval` and `\xintiieval`: there is no need to
18 use for example `\string!`, or to turn off locally the language-triggered
19 activation of some characters.
20
21 - **xintexpr**: the three
22 parsers support, in addition to `"` for hexadecimal, the `'` prefix
23 for octal numbers. Also implemented: the `0x`, `0o` and `0b`
24 prefixes for hexadecimal, octal, and binary. In `\xinteval` and
25 `\xintfloateval` such inputs may have a fractional part. Package
26 **xintbinhex** is automatically imported.
27
28 - **xintexpr**: `\xintiieval` admits an optional argument `[h]`, `[o]`,
29 or `[b]` for conversion of the output (or outputs) to respectively
30 hexadecimal, octal or binary.
31
32 - **xintbinhex**: now handles octal in addition to the binary, decimal,
33 and hexadecimal radices. The input sizes for conversions between the
34 non-decimal bases are now limited only by TeX main memory. The
35 maximal sizes for conversion to and from decimal are increased. This
36 is explained (additionally to the effect of TeX memory parameters in
37 TeXLive having increased since last release) by some internal
38 refactoring using `\expanded`. This engine primitive was not yet
39 available at the last previous update to the package (`1.2n`
40 `2017/08/06`).
41
42 - **xintcfrac**: now imports automatically **xinttools**, which is
43 required for two of the **xintcfrac** macros.
44
45 - **xinttools**: an extraneous comma at the end of the list argument
46 for `\xintForpair`, `\xintForthree`, and `\xintForfour` is now
47 silently ignored, rather than causing a crash. Regarding `\xintFor`,
48 such a final comma keeps being interpreted as formerly: it triggers
49 an extra iteration using an empty parameter in the substitution text.
50
51 - Compatibility with `OpTeX`.
52
53 - Compatibility (at least partial, not fully tested nor maintained)
54 with `ConTeXt mkxl`. Older `ConTeXt`'s are not supported.
55
56 - As anyhow **xintexpr** will probably be the customary entry point,
57 and as it imports most other packages of the bundle, it was decided
58 to migrate to **xintkernel** all needed `\newcount`'s needed by the
59 various packages, as well as some macro definitions, even though some
60 are unneeded for users of only **xinttools**, **xintbinhex**, or
61 **xint**.
62
63 ### Packaging
64
65 With this release, the documentation file `xint.pdf` includes again the
66 commented source code, in addition to the user manual. It benefits from
67 hyperlinking going back and forth between user documentation and source
68 code, as did already in 2022 `xint-all.pdf`, which however needed to be
69 built from sources, and has now been renamed to `xint.pdf` and is the
70 distributed documentation. There is no more a file `sourcexint.pdf` but
71 it can be built from sources under the new name `xintsource.pdf`. Brief
72 build instructions are at start of `xint.dtx`.
73
74 The CTAN upload has `xintchanges.md` (accessible via `texdoc` if with a
75 `TeXLive` install) as replacement for `CHANGES.html`. One can find the
76 latter at the repository front page. The CTAN upload does not include
77 anymore a commodity `Makefile`, as `Makefile.mk` extracted from
78 `xint.dtx` is enough (use `-f` option of `make`).
79
80 ### Repository
81
82 The package has a [web site](https://jfbu.github.io/xint/) which
83 serves as a (minimalistic) front page to its
84 [github repository](https://github.com/jfbu/xint). The repository is
85 not destined to hold intermediate development versions, but only to
86 archive the new and old CTAN uploads since the package initial release
87 in 2013. Use it to report [issues](https://github.com/jfbu/xint/issues)
88 (please ping `@jfbu` in your ticket else I may not notice).
89
90
91 `1.4m (2022/06/10)`
92 ----
93
94 ### Removed
95
96 - **xintexpr**: `\xintdefefunc` et al., deprecated at `1.4` have been removed.
97
98 - **xintexpr**: `\thexintexpr` et al., deprecated at `1.4b` have been
99 removed. Use `\xinttheexpr` et al.
100
101 - **xintlog**: `\poormanloghack` which was a no-op since `1.4e` has been removed.
102
103 - **xintfrac**: `\xintFrac`, `\xintFwOver`, `\xintSignedFrac`,
104 `\xintSignedFwOver` now raise errors. They were deprecated at `1.4g`,
105 check the documentation for the new names `\xintTeXFrac` et al.
106
107 ### Breaking changes
108
109 - **xintexpr**: `\xinttheboolexpr` now outputs `true` or `false` (to
110 match TeX conventions) and not the `True` or `False` employed since
111 `1.4` (inside expressions `true`, `false`, `True` and `False` are
112 all recognized keywords anyhow).
113
114 - The `\pdfstrcmp/\strcmp` engine primitive is required. With `LuaTeX`
115 it is emulated via `Lua` code basically copied over from `LaTeX3`.
116 Not sure if this is breaking as the package already requires the
117 `\expanded` primitive. Only used so far by (as expected)
118 `\xintiiCmp`, and macros which will end up calling it.
119
120 ### Bug fixes
121
122 - Compatibility with `miniltx` under Plain TeX. Becoming aware of the
123 incompatibilty motivated a release `1.4m`. With some hesitation I
124 decided to not revert the removals and breaking changes listed above
125 and which had been already acted in preparation of an hypothetic
126 future `1.5`.
127
128 - **xintexpr**: with `\input xintexpr.sty\relax` in `(pdf)eTeX` plus
129 `miniltx` (naturally, if `miniltx` was already loaded), and with
130 versions up to `1.4k` the `xinttrig` and `xintlog` aborted their own
131 `xintexpr`-triggered input erroneously thinking the latter had not
132 yet been loaded, and emitted only a very discrete message to the log
133 file. With `1.4l` it became worse as `\input xintexpr\relax`
134 auto-repeated itself about six times until `TeX` called it quits.
135
136 ### Improvements
137
138 - Documentation: most macros are hyperlinked in the source code to the
139 code line of their definitions. Furthermore, from the place of the
140 definition the main macros will link to either their descriptions in
141 the user manual (in `xint-all.pdf`) or in the implementation part
142 (`sourcexint.pdf`). Conversely inside `xint-all.pdf` the macro
143 descriptions are linked towards their implementation. You may notice
144 some time lag with some pdf viewers on opening the heavily
145 hyperlinked `sourcexint.pdf` compared to previous releases.
146
147 - Not sure if that counts as an improvement, but I have shortened the
148 wording of the expandable error messages, which had been last modified
149 at `1.4g`.
150
151 `1.4l (2022/05/29)`
152 ----
153
154 ### Bug fixes
155
156 - **xintkernel**: ever since `1.4`, loading anyone of the `xint*sty`
157 packages left the catcode of the character of ascii code `1` to
158 the internal custom value `3`.
159
160 - **xintfrac**: the `\xintPFloat` checks for an output being an integer
161 in decimal notation or a number with a one-digit trimmed mantissa
162 could fail if `\xintPFloatMinTrimmed` (added at `1.4k`) was large
163 enough, e.g. equal to the target precision. Then, the outputs always
164 kept trailing zeros, as expected in general but not for those special
165 cases.
166
167 - **xintlog**, **xinttrig**: since `1.4e` the message emitted if
168 `\usepackage{xintlog}` or `\usepackage{xinttrig}` was encountered in
169 place of the correct `\usepackage{xintexpr}` was wrong. It advised
170 to use `\input xintexpr.sty\relax`, which would have failed with
171 LaTeX. The warning is corrected and now the macro file in place of
172 aborting will (be it with or without LaTeX) trigger the loading of
173 `xintexpr` (hence of itself after it).
174
175
176 - The possibility to run `latex` directly on `xint.dtx` had been broken
177 since `1.4i`.
178
179 ### New features
180
181 - **xintfrac**: `\xintRawBraced` as a public alias to an **xintfrac**
182 entry point to its core input handler. Experimental additions
183 `\xintSignBit` and `\xintFloatBraced`. Deprecate `\xintTeXfromSci`
184 in favor of new name `\xintTeXFromSci`, and remove its `\expanded`
185 wrapper (so it is not f-expandable anymore). Add
186 `\xintTeXFromScifracmacro`.
187
188 - **xintfrac**, **xintexpr**: `\xintFracToSci` and `\xintFracToDecimal`
189 now behave like all other **xintfrac** macros in terms of allowed
190 arguments and f-expandability and have been moved back to
191 **xintfrac**.
192
193 ### Documentation
194
195 - Renewed random shuffling of large parts of the documentation has
196 greatly improved it.
197
198 - Simpler build flow to produce a `pdf` containing both user manual and
199 source code. Removal of dependency on `grep` binary for such builds or
200 the one of `sourcexint.pdf`. Fix of various obsoleted comments in
201 extracted files involved in the documentation build process.
202
203 `1.4k (2022/05/18)`
204 ----
205
206 ### Breaking changes
207
208 - **xintfrac**: the longstanding (but documented as undecided and
209 unstable) way of `\xintFloat` to output the zero value was `0.e0` and
210 it has now been modified into `0.0e0`. Now customizable via
211 `\xintFloatZero`.
212
213 - **xintfrac**/**xintexpr**: the behaviour of `\xintPFloat` (hence of
214 `\xintfloateval`) has again changed: when the output is an integer
215 (not using scientific notation) it does not get postfixed by `.0`.
216 This applies in particular for the zero value, now printed `0`.
217 Similarly, in the case of scientific notation with a single-digit
218 (trimmed) mantissa, no `.0` is used.
219
220 Customizable via
221 `\xintPFloatIntSuffix`, `\xintPFloatLengthOneSuffix`, and
222 `\xintPFloatZero`.
223
224 Also, `\xintPFloat` trims trailing zeros from the full significand
225 only if there are, by default, at least `4` of them, see
226 `\xintPFloatMinTrimmed`.
227
228 - **xintfrac**/**xintexpr**: macro definition of `\xintFracToSci`
229 migrated from the former to the latter (see `1.4l` for update).
230
231 - **xintexpr**: `\xintexpr{Safe,Restore}Catcodes` pairs now behave like
232 a "last in first out" stack. Check the `pdf` documentation for
233 details.
234
235 ### Bug fixes
236
237 - **xintexpr**: the `\xintexpr{Safe,Restore}Catcodes` were documented
238 at user level, but also used by the package `\xintdefvar` or
239 `\xintdeffunc`. This could result in some bad interaction due to the
240 somewhat strange (but documented) behaviour of nested
241 `\xintexpr{Safe,Restore}Catcodes` (which has now been modified).
242
243 - **xintexpr**: ever since `1.4`, `\xintdefufunc` (but not
244 `\xintdeffunc`) forgot to reset the catcodes to their status prior to
245 the sanitization done by the macro at the start of its execution.
246
247 ### New features
248
249 - **xintfrac**: `\xintPFloatZero`, `\xintPFloatIntSuffix`,
250 `\xintPFloatLengthOneSuffix`, `\xintPFloatNoSciEmax`,
251 `\xintPFloatNoSciEmin` and `\xintPFloatMinTrimmed` customize the
252 output of `\xintPFloat`, hence also of `\xintfloateval` (and of
253 `\xinteval` when scientific notation was used in the expression).
254 Also added `\xintFloatZero`.
255
256 - **xintfrac**: `\xintFloatToDecimal`.
257
258 - **xintexpr**: `\xintFracToDecimal`, an alternative to the default
259 `\xintFracToSci` configuration of `\xintexprPrintOne`.
260
261 - **xintexpr**: long awaited syntax `\xintieval[D]{...}` and
262 `\xintfloateval[Q]{...}` now implemented. The legacy syntax with
263 `\xintieval{[D]...}` and `\xintfloateval{[Q]...}` is kept for
264 backwards compatibility.
265
266 `1.4j (2021/07/13)`
267 ----
268
269 ### Bug fixes
270
271 - **xinttools**: a brace removal bug affected the venerable `\xintSeq`
272 if producing a single number (e.g. `\xintSeq{10}{10}` expanded to
273 `10` not `{10}`). Thanks to Christophe Poulain for report.
274
275 `1.4i (2021/06/11)`
276 ----
277
278 ### New features
279
280 - **xintexpr**: the concept of simultaneous assignments is extended: in
281 case of more variables than values the extraneous variables do not
282 cause an error message but are simply set to the `nil` value; in case
283 of more values than variables, the last variable is defined to be the
284 ople concatenating all the extra values.
285
286 - **xintexpr**: built-in functions usable with arbitrarily many
287 arguments such as `max()`, `gcd()`, or `len()` are now again usable
288 with a single numeric argument: since `1.4` a lone argument had to be
289 a `nutple` (which was automatically unpacked). It can now again be a
290 number.
291
292 ### Bug fixes
293
294 - **xintexpr**: simultaneous assignments via `\xintdefvar` to 10 or
295 more variables was broken if the right hand side was an ople (of
296 length at least 10, as it had prior to this release to match the
297 number of variables).
298
299 - **xintexpr**: the mechanism which allows to define variables with
300 names already in use for pre-existing functions was broken for some
301 built-in functions: those handling syntax with dummy variables
302 (currently `subs()`, `subsm()`, `subsn()`, `seq()`, `add()`, `mul()`,
303 `ndseq()`, `ndmap()`, `ndfillraw()`) and the so-called "pseudo"
304 functions (currently `bool()`, `togl()`, `protect()`, `qint()`,
305 `qfrac()`, `qfloat()`, `qraw()`, `random()`, `qrand()`, `rbit()`).
306 For example the function `seq()` was broken if the user had defined a
307 variable `seq`.
308
309 `1.4h (2021/05/27)`
310 ----
311
312 ### Bug fixes
313
314 - **xintexpr**: the recent `1.4g` introduced a bug breaking input of
315 the type `<operator><space token><macro>`.
316
317 - **xintexpr**: since `1.4` (`2020/01/31`) the `omit` and `abort`
318 keywords were broken if used inside a substitution, itself nested in
319 a `seq()` or similar construct.
320
321 - **xintexpr**: since `1.4c` the `\xintthespaceseparated` (added at
322 `1.4a`) inserted two, not one, spaces at one specific location near
323 the end of its output. A bit cosmetic problem, fixed nevertheless.
324
325 `1.4g (2021/05/25)`
326 ----
327
328 ### Breaking changes
329
330 - **xintexpr**: the parsing of power operators `**` and `^` now
331 proceeds in a right associative way: `2^3^4==2^(3^4)`.
332
333 - **xintexpr**: single-character operators `&`, `|`, and `=`
334 (deprecated since `1.1`) have been removed. Use `&&`, `||` and `==`
335 respectively.
336
337 ### Deprecated
338
339 - **xintfrac**: old typesetting macros dating back to `1.03` and `1.04`
340 releases `\xintFrac`, `\xintSignedFrac`, `\xintFwOver`,
341 `\xintSignedFwOver` are deprecated. Please use the new names
342 `\xintTeXFrac`, `\xintTeXsignedFrac`, `\xintTeXOver`,
343 `\xintTeXsignedOver`. The old names will emit warnings.
344
345 ### New features
346
347 - Messages written to the terminal and log file during the handling of
348 recovery from exceptions use a new mechanism; when in interactive
349 mode, the user is prompted only once, not thrice, to enter `<return>`
350 for recovery and continued processing.
351
352 - **xintfrac**: `\xintTeXfromSci` (added about 7 or 8 years too late)
353 to help typesetting values output by `\xintfloateval` in a more
354 useful way than `\xintTeXFrac` (formerly `\xintFrac`).
355
356 ### Bug fixes
357
358 - **xintexpr**: with **xintbinhex** loaded, `"` is recognized as prefix
359 for hexadecimal input; but a bug (present ever since this support for
360 hexadecimal input was added) caused syntax such as `"\macro` to break
361 the parser. Also, leading zeros such as in `"0000A` where not properly
362 trimmed since `1.2m`.
363
364 - **xintexpr**: authorize `x! == y` without parentheses. Formerly the
365 parser mis-interpreted `!` as first character of the `!=`
366 not-equal-to comparison operator, subsequently causing breakage when
367 finding the second `=`.
368
369 - **xintexpr**: various error situations were badly handled.
370 - `\xinteval{1/0}` did not recover gracefully due to
371 longstanding bug in **xintfrac**.
372 - `\xintfloateval{1/0}` did not recover gracefully either... due to some
373 other reason.
374 - recovery from encountering an unknown variable name was
375 broken since `1.4`; also, with an unknown function name if in
376 `\xintfloatexpr`.
377 - `\xinteval{_4}` caused an infinite loop (with underscore `_` having
378 its normal catcode). This was unexpected, as the `_` is documented
379 to be ignored if in-between digits (and is ignored if last after
380 some digits). It will be now ignored also if encountered upfront.
381 A similar problem existed with variable names starting with a `_`
382 (of normal catcode), which however are clearly not legal. The
383 (normal catcode) `_` will then be ignored as well if encountered in
384 front of a variable or function name (but not inside of course).
385 - ``\xinteval{\catcode`@}`` crashed (one had to use an added `\the`
386 or `\number`).
387 - illegal ``\xinteval{/3}`` was not intercepted and ultimately
388 caused low-level errors (same with `^`).
389
390 Surely, further situations remain where bad input will crash parser.
391
392 `1.4f (2021/05/10)`
393 ----
394
395 ### Breaking changes
396
397 - **xintexpr**: `\xintieval{[-D]...}`, which rounds to a multiple of
398 `1eD` for `D` positive now *does not insert the trailing zeros* (as
399 done at `1.4e`) *nor a scientific part* `eD` (as prior to `1.4e`).
400 The use case envisioned is for the quantized value to be used with an
401 appropriate unit, for example `k` for `D=3` or `M` for `D=6`
402 etc... Sorry for the very long process which was needed to reach this
403 final decision.
404
405 - **xintexpr**: for Digits beyond the officially supported range for
406 accurate math functions, i.e. for `D>62`, computations were still
407 done and printed with full number of digits, but the extra digits
408 were meaningless; they now operate on and output mantissas limited to
409 `min(D,64)` digits.
410
411 - **xintexpr**: for powers `a^b` with Digits at most `8`, the number
412 `a` is now float-rounded to Digits before computation, as is done for
413 `Digits>8`; previously `9` significant digits were kept.
414
415 - **xintexpr**: further changes in the computation of powers, see the
416 bug fixes below.
417
418 - **xintexpr**: the `float_()` function got renamed into `float_dgt()`.
419
420 ### Bug fixes
421
422 - **xintexpr**: the documentation said `float_()` function had been
423 renamed `float_dgt()` but actually that was not yet the case.
424
425 - **xintexpr**: powers `a^b` (with exponent `b` neither integer nor
426 half-integer) stopped being accurate regarding the last digits for
427 `|b|` about `1000` and beyond. Except for `0.8<a<1.25` for which
428 accuracy was maintained up to about `|b|=10^7`. Fixed via keeping
429 the same suitable number of extra digits for internal computations of
430 logarithms, independently of whether `a` is close to `1` or not.
431
432 - **xintexpr**: powers `a^b` in `\xinteval` with `|b|` an integer at
433 least `10000` were paradoxically computed with less accuracy than in
434 `\xintfloateval`... although they were documented to be handled
435 exactly the same in the two parsers.
436
437 - **xintexpr**: powers `a^b` for Digits at most `8` unconditionally
438 used `log10()/pow10()` approach but due to the limited accuracy of
439 the poorman logarithm (`9` fractional digits) this was inaccurate
440 already for `b` about `100`. So, the handling is now as for Digits at
441 least `9`, i.e. integer and half-integer exponents are handled via
442 the legacy `\xintFloatPower/\xintFloatSqrt` allowing arbitrarily big
443 exponents. It is advised to split big powers with non integer non
444 half integer exponents into a product; this is not done internally
445 to avoid costly overhead for possibly rare use cases.
446
447 - **xintexpr**: the invalid input `(-1)^2.5` triggered an undefined
448 control sequence error if Digits was at most `8`.
449
450 `1.4e (2021/05/05)`
451 ----
452
453 ### Breaking changes
454
455 - **xintlog**: `\poormanloghack` now a no-op.
456
457 - **xinttrig**: loading the package does not define left-over variables
458 holding the values of the inverse factorials used in the sine and
459 cosine series.
460
461 - **xintexpr**: the output format of `\xinteval`, which uses
462 `\xintFracToSci,` has changed. In particular, if the number has a
463 power of ten part, it is not output with an integer mantissa, but
464 with a scientific mantissa `d.d...` with always at least one digit
465 after the decimal mark (possibly `0`) and trailing zeros are trimmed
466 out. This is the same output format as used for `\xintfloateval`,
467 apart of course from the fact that the mantissa lengths are not
468 limited.
469
470 - **xintexpr**: the output format of `\xintfloateval`, which uses
471 `\xintPFloat`, changed. The `\xintfloatexprPrintOne` macro has
472 changed its signature to `[#1]{#2}` i.e. its first argument
473 will be within brackets not braces.
474
475 - **xintexpr**: when using `\xintieval{[D]...}` optional `[D]` with a
476 negative `D`, which triggers quantization to a positive power of ten,
477 the output (if not the zero value) will be an integer with `N=abs(D)`
478 explicit trailing zeros, not an integer mantissa followed by `eN`.
479
480 - **xintexpr**: `\xinteval` will not compute powers `a^N` exactly if
481 `N` in absolute value is at least the (rounded) quotient of `10000`
482 by the number of digits of `a`; it will then use the
483 logarithm/exponential (in base 10) approach, according to the
484 prevailing Digits setting (at `1.4f` this got modified again and integer
485 exponents large enough to trigger floating point evaluation are handled
486 exactly as in `\xintfloateval`, i.e. using the legacy **xintfrac**
487 `\xintFloatPower`,
488 not the logarithm/exponential approach which loses accuracy for exponents
489 of the order of `100000000` and beyond).
490
491 - **xintexpr**: `\xintdeffloatvar` now always rounds the assigned value
492 to the target precision. Formerly, inputs actually involving no
493 float operations, such as for example a sub-expression `\xintexpr1/20!\relax`
494 (in
495 contrast to `1/20!`), or an explicit single number having more digits
496 than the precision, got stored "as is" in the defined variable,
497 without pre-rounding to the Digits precision.
498
499 - **xintfrac**:`\xintPFloat` and `\xintFracToSci` have both been
500 modified. The macro `\xintFracToSciE` does not exist anymore, as
501 `\xintFracToSci` in the case of scientific exponents hands over the
502 process to `\xintPFloat` (without the rounding to Digits, of course).
503
504 ### New features
505
506 - **xintlog**: now working up to `62` digits. The legacy faster
507 `poormanlog`-based macros are kept for computations with Digits up to
508 `8`. Fractional powers are now available both in `xinteval` and
509 `xintfloateval`, per default.
510
511 - **xinttrig**: now working up to `62` digits and with increased
512 accuracy. Special faster (or not as slow if you prefer) mode at `8`
513 digits or less.
514
515 - **xintexpr**: the constraints on the `\xintexprPrintOne` replacement
516 macro, which defaults to `\xintFracToSci`, have been much simplified.
517
518 - **xintexpr**: `\xintiexprPrintOne` (defaults to `\xintDecToString`)
519
520 - **xintfrac**: `\xintPFloatE` may be redefined as a macro which
521 fetches the scientific exponent as a mandatory argument delimited
522 with a dot, and outputs a suitable formatted result (f-expandably),
523 also delimited with a dot which will be removed by internal
524 processing. The default however simply expands to the letter `e`.
525
526 - **xintfrac**: `\xintDecToStringREZ` is like `\xintDecToString` but
527 starts by removing trailing zeroes.
528
529 ### Bug fixes
530
531 - **xintfrac**, **xintexpr**: it was not possible to use
532 `\xinttheDigits` in the right hand side of an `\xintDigits`
533 assignment. For example: `\xintDigits*:=\numexpr\xinttheDigits+4;`.
534 This is now allowed, and the same applies to the macro interface,
535 for example `\xintSetDigits*{\xinttheDigits+4}`.
536
537
538 `1.4d (2021/03/29)`
539 ----
540
541 ### Breaking changes
542
543 - `quo()` and `rem()` in `\xintiiexpr/\xintiieval` renamed to
544 `iquo()` and `irem()`.
545
546 - The output of `gcd()` and `lcm()` as applied to fractions is now
547 always in lowest terms.
548
549 - The log message to report a variable creation (if `\xintverbosetrue`)
550 does not use (double) quotes anymore around the name. By the way,
551 quotes were never used for function names.
552
553 ### Bug fixes
554
555 - Ever since `1.3` the `quo()` and `rem()` functions in `\xintexpr`
556 (not the ones in `\xintiiexpr`) were broken as their (officially
557 deprecated) support macros had been removed! They had somewhat
558 useless definitions anyway. They have now been officially removed
559 from the syntax. Their siblings in `\xintiieval` were renamed to
560 `iquo()` and `irem()`.
561
562 - Sadly, `gcd()` was broken in `\xintexpr` since `1.4`, if the first
563 argument vanished. And `gcd()` was broken in `\xintiiexpr` since
564 `1.3d` if *any* argument vanished. I did have a unit test! (which
565 obviously was too limited ...)
566
567 Further, the `\xintGCDof` and `\xintLCMof` **xintfrac** macros were
568 added at `1.4` but did not behave like other **xintfrac** macros with
569 respect to parsing their arguments: e.g. `\xintGCDof{2}{03}` gave an
570 unexpected non-numeric result.
571
572 - The `first()` and `last()` functions, if used as arguments to
573 numerical functions such as `sqr()` inside an `\xintdeffunc`
574 caused the defined function to be broken.
575
576 `1.4c (2021/02/20)`
577 ----
578
579 ### Bug fixes
580
581 - Fix `1.4` regression which broke syntax `varname(...)` which supposedly
582 is allowed and inserts a tacit multiplication.
583
584 `1.4b (2020/02/25)`
585 ----
586
587 All changes regard the **xintexpr** module.
588
589 ### Future
590
591 - `&`, `|`, (as Boolean operators) and `=` (as equality test) have long
592 been deprecated in favour of `&&`, `||` and `==`. They will be
593 removed at next major release.
594
595 - At next major release the power operators `**` and `^` will turn from
596 left to right associative. I.e. `2**2**3` will give `256`, not `64`.
597 This is to match with Python and l3fp.
598
599 - `\thexintexpr` et al. (introduced at `1.2h` but not documented
600 anymore for some time) will be removed at next major release. The
601 original `\xinttheexpr` et al. have always been so much better names.
602 Besides, since `1.4`, `\xintexpr` can be used directly in typesetting
603 flow.
604
605 ### New features
606
607 - Function `zip()` is modeled on Python's function of the same name.
608
609 - Function `flat()` removes all nesting to produce a "one-dimensional"
610 list having the exact same leaves (some possibly empty) as the
611 original (in the same order).
612
613 - Chaining of comparison operators (e.g. `x<y<z`) as in Python (but all
614 comparisons are done even if one is found false) and l3fp.
615
616 - It was possible since `1.4`'s `\xintFracToSciE` to configure the
617 separator between mantissas and exponents in the output of
618 `\xinteval` but strangely there was no way to customize the output of
619 `\xintfloateval`. The added `\xintPFloatE` fixes this.
620
621 ### Bug fixes
622
623 - `\xintieval{[D]...}` with a negative `D` (a feature added at `1.4a`)
624 used erroneously a catcode 12 `e` in output, which moreover remained
625 immuned to the `\xintFracToSciE` setting.
626
627 `1.4a (2020/02/19)`
628 ----
629
630 All changes regard the **xintexpr** module.
631
632 ### Breaking changes
633
634 - The macros implementing customization of
635 `\xintthealign` have modified meanings and names.
636
637 ### New features
638
639 - `\xintthespaceseparated` (serves to provide
640 suitable input to PS-Tricks `\listplot`).
641
642 - The optional argument `[D]` to `\xintieval/\xintiexpr`
643 can be negative, with the same meaning as the non-negative case, i.e.
644 rounding to an integer multiple of `10^(-D)`.
645
646 The same applies to the functions `trunc()` and `round()`. And to
647 the `\xintTrunc`, `\xintRound`, `\xintiTrunc`, and `\xintiRound` macros
648 of **xintfrac**.
649
650 ### Bug fixes
651
652 - Usage of `round()` and `trunc()` within `\xintdeffunc`
653 got broken at `1.4`.
654
655 - `add()` and `mul()` were supposedly accepting the
656 `omit`, `abort` and `break()` keywords since `1.4` but this was
657 broken.
658
659
660 `1.4 (2020/01/31)`
661 ----
662
663 ### Breaking changes
664
665 Please note that this list may still be incomplete. If not otherly
666 specified all items regard the **xintexpr** module.
667
668 - The `\expanded` primitive (TeXLive 2019) is **required**. This does
669 not affect the macro layer **xintcore**, **xint**, **xintfrac**,
670 **xinttools** (yet).
671
672 - Formerly square brackets `[...]` were, on their own, not different
673 from parentheses (and thus disappeared from the output), but they are
674 now a genuine constructor of nested lists. For example `\xinteval{1,
675 [2, [3, 4]], 5}` produces `1, [2, [3, 4]], 5` (recall this is free
676 bloatware).
677
678 - The output of `\xinteval` has changed (besides containing brackets).
679 It does not use anymore the so-called *raw* **xintfrac** format,
680 i.e. things such as `A/B[N]` (which can still be used in input but
681 are discouraged in **xintexpr** context), but scientific notation
682 `AeN/B`. As formerly, the denominator is printed only if `B>1` and
683 the scientific part is dropped if the exponent vanishes. In this way
684 the output of `\xinteval` can be pasted to alternative software.
685
686 - The output format of `\xinthe\xintboolexpr` also has changed. It uses
687 `True` and `False` (which are accepted on input), and this can
688 easily be configured otherwise (also `true` and `false` are accepted
689 on input).
690
691 - The "broadcasting" (as it turned out, à la `NumPy`) of scalar
692 operations on one-dimensional "lists", e.g `3*[1,3,5,7]+10` acting
693 itemwise is **dropped**. It is hoped to implement such operations
694 again in stronger form in future releases. Pre-existing alternative
695 syntax is available, also to produce the bracketed (cf. next item)
696 `[13,19,25,31]` which will be the output in future.
697
698 - The `divmod()` function now produces on output such a bracketed
699 pair, but simultaneous assignment such as `\xintdefvar xq, xr =
700 divmod(a,b);` will work transparently.
701
702 - The syntax for using conditionals in function declarations has
703 changed. Now, one *must* use the `?` and `??` short-circuit boolean
704 branching operators whereas in the past it was explained that the
705 syntax had to use the `if()` and `ifsgn()` functions.
706
707 - Macros `\xintGCD`, `\xintLCM`, `\xintGCDof` and `\xintLCMof` formerly
708 provided by **xintgcd** got moved to **xintfrac** (which is not
709 loaded by **xintgcd**). Moreover, they were extended to handle
710 general fractions on input but this also means that their output is
711 now obiding by the raw **xintfrac** format. The integer only
712 `\xintiiGCD`, `\xintiiLCM` also got moved out of **xintgcd**, but to
713 **xint** which is now loaded automatically by **xintgcd**. The few
714 remaining macros of **xintgcd** at least do not need other imports as
715 **xintgcd** now loads also automatically **xinttools** which is a
716 dependency for two of them.
717
718 ### Improvements and new features
719
720 Please note that this list is currently incomplete. For more
721 information look at the user manual and the documented source code
722 `sourcexint.pdf`.
723
724 Unless otherwise specified all changes commented upon here regard
725 **xintexpr**. Important: all the new syntax is to be considered
726 experimental. The author may change some names in future release, or
727 even the interface (whether to use semi-colons or colons etc...).
728
729 - The `\csname` encapsulation technique used since **xintexpr** initial
730 release (`1.07 2013/05/25`) to move around possibly large data during
731 expansion-only operations is replaced with methods based on the
732 `\expanded` engine primitive. The latter is available in all major
733 engines since TeXLive 2019.
734
735 Formerly, and with default memory settings, one would typically
736 saturate the string pool memory after about of the order of 50,000
737 independent floating point evaluations of expressions of average
738 complexity on 16-digits numbers.
739
740 There is thus no string pool memory impact at all but one can
741 now hit TeX's main memory limit (which typically stands at 5,000,000
742 words) from defining large variables or generating on the fly large
743 data. TeX distributions have a configuration file allowing to enlarge
744 TeX memory parameters and regenerate the (eTeX based) formats.
745
746 - The package supports input and output of arbitrarily *nested lists*,
747 a.k.a. *oples* or *nlists*, with `[...]` as the constructor of
748 *bracketed lists*, a.k.a *nut-ples*. Operations on these objects (as
749 briefly surveyed in later items) are inspired from syntax and
750 functionalities of `NumPy`'s *ndarrays*. Our *oples* (hence also
751 their packaged form *nut-ples*) may have *leaves* at varying depths
752 rather than obeying an N-dimensional hyperrectangular shape. But the
753 syntax does provide specific constructors for *ndlists*
754 (i.e. hyperrectangular *oples* or *nut-ples*).
755
756 In a (distant?) future, perhaps **xintexpr** itself or a
757 third-party package will provide an interface, say `\xintstorearray`,
758 `\xintgetarray`, to store (which can not be expandable) and retrieve
759 (which can be expandable and thus be embedded inside expressions
760 parsed by `\xintexpr`, `\xintiiexpr` or `\xintfloatexpr`) such
761 *ndlists* from TeX memory. This is why the package does not use the
762 word *ndarray* and reserves it for such memory stored objects.
763
764 - The `*` serves as *unpacking* operator on *nut-ples*, i.e. reversing
765 the `[]` bracketing of an *ople*.
766
767 - *oples* have no exact equivalent in `Python`. For example
768 **xintexpr** allows `foo(Var1, x)` if `foo` is a function of 4
769 variables and `Var1` is a variable producing a length 3 *ople*, or
770 `foo(Var2)` if `Var2` is a variable producing a length 4 *ople*.
771 Python would require here to use explicitly the `*`-unpacking notation
772 on some "packed" objects.
773
774 Variable and function values may be *oples* (even *nil*), but in
775 function declarations variables must stand for *one-ples*, i.e. either
776 *numbers* or *nut-ples* (as there is no non-ambiguous way to split
777 e.g. 5 arguments into two separate *oples*).
778
779 - Simultaneous assignment to at least two variables via `\xintdefvar`
780 et al. automatically unpacks the assigned value if it is a *one-ple*.
781 If this value was in fact a *number*, low-level errors will result
782 shortly afterwards as no check is done if the unpacking was illicit.
783 (update: this last remark does not apply since the `1.4i` extension to
784 the concept of simultaneous assignments)
785
786 - The `NumPy` concept and syntax for nested slicing and item selection
787 are implemented. Currently *stepping* and the *Ellipsis object* are
788 not yet available. Only so-called basic slicing is currently
789 supported. (The author has not yet read the section of `NumPy`
790 documentation on so-called *advanced indexing*).
791
792 - The *broadcasting* of scalar operations, such as itemwise addition or
793 multiplication of *nut-ples* of the same shape is **not yet implemented**.
794
795 - Slicing and indexing apply also at top level to the *oples* with
796 behaviour conforming to intuitive expectations (see user manual); if
797 it turns out the *ople* is in fact a *nut-ple*, the top-level
798 slicing/indexing switches to the `Python/NumPy` conventions, i.e. it
799 operates inside the brackets for slicing and removes brackets if
800 indexing.
801
802 - The syntax `ndseq(expression in x, y, ..., x = values; y = values;
803 ...)` constructs a (bracketed) *ndlist* by evaluation the expression
804 on all possible Cartesian n-uples, where the first variable indexes
805 the first axis, the second the next, etc...
806
807 - The `ndmap(foo, values1; values2; ...; valuesN)` syntax constructs a
808 (bracketed) *ndlist* by evaluating the function `foo` on all elements
809 of the cartesian product of the given (one-dimensional) value lists.
810
811 - The two concepts of `\xintdeffunc` (for recursive definitions) and
812 `\xintdefefunc` (for functions which expand immediately in other
813 function declarations) have been merged. The `\xintdefefunc` et al.
814 are deprecated and kept as aliases for `\xintdeffunc` et al.
815
816 - `\xintdefufunc` allows to define so-called *universal functions*,
817 i.e. functions `foo` such that `foo(myople)` will apply itemwise at
818 arbitrary depth in the nested structure. The function `foo` is
819 allowed to produce from a scalar an *ople*...
820
821 - The variables in function declarations can now be multi-letter words.
822
823 - The last positional variable in a function declaration can be prefixed
824 with a `*` meaning exactly as in Python (*variadic* function
825 argument) that it stands for a one-dimensional *nut-ple* receiving all
826 remaining arguments from the function call beyond the first
827 positional ones. It is thus an optional argument, but syntax for
828 named optional arguments with default values is not yet implemented.
829
830 - Dummy variables used in constructors can also be multi-letter words,
831 if they have been declared as such.
832
833 - In variable and function declarations, if the expression contains
834 inner semi-colons, it is not needed anymore to brace them to avoid
835 mis-interpretation as the final semi-colon which is mandated by the
836 syntax to serve as expression terminator.
837
838 - `subsm(expression, var1 = value1; var2 = value2; ...)` provides a leaner
839 syntax for multiple substitutions; they must be independent, though.
840
841 - `subsn(expression, var1 = value1; var2 = value2; ...)` provides a
842 leaner syntax for nested substitutions, i.e., each `valueJ` may be an
843 expression using the dummy variables `varK` with `K>J`. And finally
844 of course the evaluated expression can refer to all variables.
845
846 - `\xintthealign\xintexpr...\relax` (or with `\xintfloatexpr` or
847 `\xintiiexpr` or `\xintboolexpr`...) will use a TeX alignment to
848 display *oples*. The output (for regular N-dimensional lists) looks
849 very similar to what `Python/NumPy` produces in interactive session.
850 This is entirely configurable and can also be set-up to be used for
851 writing into external files.
852
853 Attention that `\xintthealign` only works if followed by `\xintexpr`
854 et al., not by `\xinteval{}`.
855
856 - It is now possible to use `\xintexpr...\relax` directly for
857 typesetting. The syntax `\xinteval{...}` or
858 `\xintthe\xintexpr...\relax` is needed only if one wants the
859 expansion to give the explicit digits, but `\xintexpr...\relax` by
860 itself will typeset as would have the other ones. Further it can be
861 used in so-called moving arguments, because when output to an
862 external file it uses only characters with standard catcodes (and
863 produces the same protected and re-tokenizable result it would in an
864 `\edef`.)
865
866 As formerly, `\xintexpr...\relax` is the preferred way to include an
867 expression into another one. Using `\xinteval` is a waste because it
868 forces the outer parser to re-digest all the digits (or now also the
869 square brackets).
870
871 - The output format of `\xintfloateval` with scientific notation has
872 not changed (apart from possible presence of bracketed lists), but
873 the author hesitates because the *prettifying* it does by default is
874 not really adapted to display of arrays (see `\xintthealign`).
875 Anyway, this is configurable by the user. It is possible to
876 specify whether to use `e` or `E`.
877
878 - Function declarations are able to parse a much wider part of the
879 syntax, but some severe limitations remain. Refer to the user manual for
880 related information.
881
882 - We have made an effort on some error messages, and when working
883 interactively in a shell it may even be sometimes possible to insert
884 for example a correct variable or function name in place of the not
885 recognized one. But don't expect miracles when trying to intervene
886 in the midst of a purely expandable expansion...
887
888 ### Bug fixes
889
890 Bugs? Those identified in `1.3f` were almost features. As per `1.4` the
891 code base of **xintexpr** received multiple successive core refactorings
892 and added numerous new features, and our test suite although
893 significantly enlarged is not yet extensive enough. Please report bugs
894 by mail.
895
896 ### TODO
897
898 - The long delayed overhaul of how floating point numbers are handled
899 is delayed again. It has remained basically identical to its initial
900 provisory version from `1.07 2013/05/25` (which was based upon what
901 was originally only a set of expandable macros for computations with
902 big integers), and suffers from the author lack of knowledge of the
903 notion of "data type" in modern programming. Indeed, he never took a
904 CS class, and disables JavaScript in his browser (or allows only
905 select non-tracking scripts, a rare beast in modern days).
906
907 - Prior to integrating all of `NumPy`, it is envisioned to start with
908 matrix algebra first.
909
910
911 `1.3f (2019/09/10)`
912 ----
913
914 ### Improvements and new features
915
916 - **xintfrac**: `\xintDigits = P;` syntax (i.e. without a colon) is now
917 accepted in addition to `\xintDigits := P;`.
918
919 Document that the ending semi-colon can not be an active character
920 and that it has always been allowed to use in its place a
921 non-expanding token e.g. `\xintDigits := 32\relax`.
922
923 Add `\xintSetDigits`.
924
925 - **xintexpr**: add starred variants `\xintDigits*` and `\xintSetDigits*`
926 which execute `\xintreloadxinttrig`.
927
928 Revert 1.3e ban on usage of `\xinteval` et al. inside expressions by
929 `\xintdeffunc`. And make them usable also inside macro definitions via
930 `\xintNewExpr`.
931
932 ### Bug fixes
933
934 - **xintexpr**: fix bug preventing usage of `\xintdefefunc` to define a
935 function without variables.
936
937 Fix some issue with `\xintfloatexpr[D]..\relax` if used inside an
938 expression parsed by `\xintdeffunc` et al.
939
940
941 `1.3e (2019/04/05)`
942 ----
943
944 ### Breaking changes
945
946 - (_reverted at 1.3f_) When defining functions, sub-expressions can only
947 use the `\xint(float)expr...\relax` syntax. One can not use there the
948 `\xint(float)eval` wrappers.
949
950 ### Improvements and new features
951
952 - The **xinttrig** library is automatically loaded by **xintexpr**. It
953 provides direct and inverse trigonometrical functions using either
954 degrees or radians with a precision of up to (a bit less than) 60
955 digits. It is for the most part implemented using high level user
956 interface, but will probably get some optimizations in future (and
957 perhaps extension to more digits).
958
959 - The **xintlog** library is automatically loaded by **xintexpr**. It
960 uses [poormanlog](http://ctan.org/pkg/poormanlog) to provide
961 logarithms and exponentials with almost 9 digits of precision.
962 Extended precision is for a future release.
963
964 - **xintexpr**: `\xintdefefunc`, `\xintdeffloatefunc`, `\xintdefiiefunc`
965 define functions which are not protected against expansion in the
966 definition of other functions; refer to `xint.pdf` for the related
967 explanations.
968
969 Notice that whole area of `\xintdef(e)func`, `\xintNewExpr`,
970 `\xintNewFunction` is complex and to be considered still as work in
971 progress as it has a number of shortcomings.
972
973 - **xintexpr**: `inv()`, `ilog10()`, `sfloat()`, behaviour of
974 `qfloat()` slightly modified.
975
976 - **xintexpr**: `\xintensuredummy`, `\xintrestorelettervar`.
977
978 - The optional argument of `\xintfloatexpr` or `\xintfloateval` (it
979 must be at start of braced argument) can be negative; it then means
980 to trim (and round) from the output at float precision that many
981 least significant digits.
982
983 ### Bug fixes
984
985 - Some bugfixes related to user functions with no variables at all;
986 they were dysfunctional.
987
988 `1.3d (2019/01/06)`
989 ----
990
991 ### Breaking changes
992
993 - **xintexpr**: the `gcd()` and `lcm()` functions formerly converted
994 their arguments to integers via `\xintNum`. They now handle general
995 input with no such modification.
996
997 - **xintexpr**: former `\xinteval`, `\xintieval`, `\xintiieval`, and
998 `\xintfloateval` renamed to `\xintexpro`, `\xintiexpro`,
999 `\xintiiexpro`, and `\xintfloatexpro`.
1000
1001 ### Improvements and new features
1002
1003 - **xintexpr**: the `gcd()` and `lcm()` multi-arguments functions have
1004 been refactored to handle general fractions. The dependency on
1005 **xintgcd** is removed.
1006
1007 - **xintexpr**: three-way branching `\xintifsgnexpr`,
1008 `\xintifsgnfloatexpr`, `\xintifsgniiexpr` conditional macros.
1009
1010 - **xintexpr**: `\xintunassignexprfunc`, `\xintunassigniiexprfunc`,
1011 `\xintunassignfloatexprfunc` to "undefine" functions.
1012
1013 - **xintexpr**: `\xintunassignvar` really makes the (multi-letter) variable
1014 unknown (formerly, it only gave it value zero),
1015
1016 - **xintexpr**: functions `isone()` and `isint()`.
1017
1018 - **xintexpr**: `\xinteval`, `\xintieval`, `\xintiieval`, and
1019 `\xintfloateval` as synonyms to `\xinttheexpr...\relax` etc..., but
1020 with the (comma-separated) expression as a usual braced macro
1021 argument.
1022
1023 ### Bug fixes
1024
1025 - **xintcore**, **xintexpr** : division in `\xintiiexpr` was broken for
1026 a zero dividend and a one-digit divisor (e.g. ``0//7``) since `1.2p`
1027 due to a bug in `\xintiiDivMod` for such arguments. The bug was
1028 signaled (thanks to Kpym for report) and fixed shortly after `1.3c`
1029 release but I then completely forgot to upload a bugfix release to
1030 CTAN at that time, apologies for that.
1031
1032 `1.3c (2018/06/17)`
1033 ----
1034
1035 ### Improvements and new features
1036
1037 - **xintexpr**: with `\xintglobaldefstrue`, `\xintdefvar`,
1038 `\xintdeffunc`, `\xintNewExpr` et al. make definitions with global
1039 scope.
1040
1041 - **xintexpr**: `qraw()` for fast input of (very many) comma separated
1042 numbers (in suitable raw format).
1043
1044 - **xintexpr**: the colon in the `:=` part of the syntax for
1045 `\xintdefvar` and variants is now optional; and if present it may be
1046 an active character or have any (reasonable) catcode.
1047
1048 - **xintexpr**: `\xintdefvar`, `\xintdeffunc` and their variants try to
1049 set the catcode of the semi-colon which delimits their arguments; of
1050 course this will not work if that catcode is already frozen.
1051
1052 - `\xintUniformDeviate` is better documented and `sourcexint.pdf` is better
1053 hyperlinked and includes indices for the macros defined by each package.
1054
1055 ### Bug fixes
1056
1057 - **xintfrac**: since `1.3` release, it loaded **xintgcd** in
1058 contradiction to what the documentation says (hence also **xintexpr**
1059 loaded **xintgcd** automatically). There is no actual dependency so
1060 the loading is removed for now.
1061
1062 `1.3b (2018/05/18)`
1063 ----
1064
1065 ### Improvements and new features
1066
1067 All additions related to randomness are marked as work-in-progress. They
1068 require an engine providing the `\(pdf)uniformdeviate` primitive.
1069
1070 - **xintkernel**: `\xintUniformDeviate`.
1071
1072 - **xint**: `\xintRandomDigits`, `\xintXRandomDigits`, `\xintiiRandRange`,
1073 `\xintiiRandRangeAtoB`.
1074
1075 - **xintfrac**: support macros (not public, mainly because internal
1076 format for floats is surely not final) for `random()` and `qrand()`.
1077
1078 - **xintexpr**: `random()`, `qrand()`, and `randrange(A[, B])`.
1079
1080 - **xintexpr**: when a function `foo()` is declared via `\xintdeffunc`
1081 (et al.) to be parameter-less, it can be used as `foo()`; formerly
1082 `foo(nil)` syntax was required.
1083
1084 - The usual provision of user manual "improvements".
1085
1086
1087 `1.3a (2018/03/07)`
1088 ----
1089
1090 ### Removed
1091
1092 - **xintcore**, **xint**, **xintfrac**: removal of the internal macros
1093 which were used at `1.2o` to add a deprecation mechanism; all
1094 deprecated macros have been removed at `1.3` so there was no reason
1095 to keep the code used for deprecating them.
1096
1097 ### Improvements and new features
1098
1099 - **xintexpr**: new conditionals `ifone()` and `ifint()`.
1100
1101 - **xintfrac**: `\xintREZ` is faster on inputs having one hundred
1102 digits or more.
1103
1104 - Added to the user manual mention of macros such as `\xintDivFloor`,
1105 `\xintMod`, `\xintModTrunc`, which had been left out so far.
1106
1107 ### Bug fixes
1108
1109 - **xintexpr**: the mechanism for adjunction to the expression parsers
1110 of user defined functions was refactored and improved at previous
1111 release `1.3`: in particular recursive definitions became possible.
1112 But an oversight made these recursive functions quite inefficient (to
1113 remain polite.) This release fixes the problem.
1114
1115
1116 `1.3 (2018/03/01)`
1117 ----
1118
1119 ### Breaking changes
1120
1121 - **xintcore**, **xint**, **xintfrac**: all macros deprecated at `1.2o`
1122 got removed.
1123
1124 - **xintfrac**: addition and subtraction of `a/b` and `c/d` now use the
1125 l.c.m. of the denominators. Similarly the macro supporting the modulo
1126 operator `/:` uses a l.c.m. for the denominator of the result.
1127
1128 - **xintexpr**: the addition, subtraction, modulo `/:`, and the
1129 `mod()` and `divmod()` functions produce generally smaller denominators
1130 (see previous item).
1131
1132 - **xintexpr**: formerly, the internal macros which are internally
1133 associated to user-declared functions were using comma separated
1134 parameter texts. They now do not use such commas (their meanings,
1135 which may again change in future, are written for information to the
1136 log under `\xintverbosetrue`).
1137
1138 ### Improvements and new features
1139
1140 - **xintexpr**: user-defined functions may now be of a recursive
1141 nature. This was made possible by a refactoring of the `\xintNewExpr`
1142 mechanism. It became both leaner and more extensive than formerly.
1143
1144 - **xintfrac**: new macros `\xintPIrr` and `\xintDecToString`. The
1145 latter is a backport of a `polexpr 0.4` utility, and it is to be
1146 considered unstable.
1147
1148 - **xintexpr**: new function `preduce()` associated with `\xintPIrr`.
1149
1150
1151 `1.2q (2018/02/06)`
1152 ----
1153
1154 ### Improvements and new features
1155
1156 - **xintexpr**: tacit multiplication extended to cases such as `3!4!5!`
1157 or `(1+2)3`.
1158
1159 ### Bug fixes
1160
1161 - **xintcore**: sadly, refactoring at `1.2l` of subtraction left an
1162 extra character in an inner macro causing breakage in some rare
1163 circumstances. This should not have escaped our test suite!
1164
1165
1166 `1.2p (2017/12/05)`
1167 ----
1168
1169 ### Breaking changes
1170
1171 - **xintgcd**: `\xintBezout{a}{b}`'s output consists of `{u}{v}{d}`
1172 with `u*a+v*b==d`, with `d` the GCD. Formerly it was
1173 `{a}{b}{u}{v}{d}`, and with `u*a-v*b==d`.
1174
1175 - **xintgcd**: `\xintBezout{0}{0}` expands to `{0}{0}{0}`. Formerly
1176 (since `1.2l`) it raised `InvalidOperation`.
1177
1178 - **xintcore**: `\xintiiMod` is now associated with floored division.
1179 The former meaning (associated with truncated division) is available
1180 as `\xintiiModTrunc`.
1181
1182 - **xintfrac**: `\xintMod` is now associated with floored division. The
1183 former meaning is available as `\xintModTrunc`.
1184
1185 - **xintexpr**: the ``//`` operator and its associated modulo ``'mod'``
1186 (or ``/:``) now correspond to floored division, like the Python
1187 language `//`, `%`, and `divmod(x, y)`. Formerly they had been
1188 associated to truncated division. This is breaking change for
1189 operands of opposite signs.
1190
1191 ### Improvements and new features
1192
1193 - **xinttools**: `\xintListWithSep`, which had remained unchanged since
1194 its introduction at `1.04 (2013/04/25)`, was rewritten for increased
1195 speed.
1196
1197 - **xintexpr**: `\xintdefvar`'s syntax is extended to allow
1198 simultaneous assignments. Examples:
1199 `\xintdefvar x1, x2, x3 := 1, 3**10, 3**20;` or
1200 `\xintdefiivar A, B := B, A 'mod' B;`
1201 for already defined variables `A` and `B`.
1202
1203 - **xintexpr**: added `divmod()` to the built-in functions. It is
1204 associated with floored division, like the Python language `divmod()`.
1205 Related support macros added to **xintcore**, and **xintfrac**.
1206
1207 ### Bug fixes
1208
1209 - **xintgcd**: `\xintBezout{6}{3}` (for example) expanded to
1210 `{6}{3}{-0}{-1}{3}`, but the `-0` should have been `0`.
1211
1212 - **xintgcd**: it still used macro `\xintiAbs` although the latter had
1213 been deprecated from **xintcore**.
1214
1215 - **xintexpr**: in float expressions the `//` and `/:` (aka `'mod'`)
1216 operators did not round their operands to the float precision prior
1217 to computing with them, contrarily to other infix arithmetic
1218 operators and to the `mod(f,g)` function; thus, `mod(f,g)` and
1219 `f 'mod' g` were not completely equivalent.
1220
1221 - various documentation fixes; in particular, the partial dependency of
1222 **xintcfrac** on **xinttools** had not been mentioned.
1223
1224
1225 `1.2o (2017/08/29)`
1226 ----
1227
1228 ### Breaking changes
1229
1230 - **xint**: `\xintAND`, `\xintOR`, ... and similar Boolean logic macros do
1231 not apply anymore `\xintNum` (or `\xintRaw` if **xintfrac** is loaded), to
1232 their arguments (often, from internal usage of `\xintSgn`), but only
1233 f-expand them (using e.g. `\xintiiSgn`). This is kept un-modified even if
1234 loading **xintfrac**.
1235
1236 ### Deprecated
1237
1238 Deprecated macros raise an error but, generally, then expand as in former
1239 releases. They will all get removed at some future release.
1240
1241 - **xintcore**: `\xintiOpp`, `\xintiAbs`, `\xintiAdd`, `\xintiSub`,
1242 `\xintiMul`, `\xintiDivision`, `\xintiQuo`, `\xintiRem`, `\xintiDivRound`,
1243 `\xintiDivTrunc`, `\xintiMod`, `\xintiSqr`, `\xintiPow`, and `\xintiFac`
1244 are deprecated. Only the `ii`-named variants get defined.
1245
1246 - **xintcore**: `\xintCmp` and `\xintSgn` are deprecated from **xintcore**
1247 (which only defines `\xintiiCmp` and `\xintiiSgn`) as they actually belong
1248 to **xintfrac**.
1249
1250 - **xintcore**: `\xintiiFDg`, resp. `\xintiiLDg`, are renamed `\xintFDg`,
1251 resp. `\xintLDg`. Former denominations are deprecated.
1252
1253 - **xint**: `\xintMON`, `\xintMMON`, `\xintiMax`,
1254 `\xintiMin`, `\xintiMaxof`, `\xintiMinof`, `\xintiSquareRoot`,
1255 `\xintiSqrt`, `\xintiSqrtR`, `\xintiBinomial`, and `\xintiPFactorial` are
1256 deprecated. Only `ii`-named variants get defined.
1257
1258 - **xint**: `\xintEq`, `\xintGeq`, `\xintGt`, `\xintLt`, `\xintGtorEq`,
1259 `\xintLtorEq`, `\xintIsZero`, `\xintIsNotZero`, `\xintIsOne`,
1260 `\xintOdd`, `\xintEven`, `\xintifSgn`,
1261 `\xintifCmp`, `\xintifEq`, `\xintifGt`, `\xintifLt`, `\xintifZero`,
1262 `\xintifNotZero`, `\xintifOne`, `\xintifOdd`, are deprecated. These macros
1263 belong to **xintfrac**. Package **xint** defines only the `ii`-named
1264 variants.
1265
1266 - **xint**: `\xintNeq` was renamed to `\xintNotEq` which however is only
1267 provided by **xintfrac**. Package **xint** defines `\xintiiNotEq`, and
1268 `\xintNeq` is deprecated.
1269
1270 - **xint**: `\xintNot` was renamed to `\xintNOT`, former denomination is
1271 deprecated. See also item about Boolean logic macros in the *Incompatible
1272 Changes* section.
1273
1274
1275 `1.2n (2017/08/06)`
1276 ----
1277
1278 ### Breaking changes
1279
1280 - **xintbinhex** does not load package **xintcore** anymore, but only
1281 **xintkernel**.
1282
1283 ### Improvements and new features
1284
1285 - **xintbinhex** has only **xintkernel** as dependency.
1286
1287 - Macros of **xintbinhex** have been improved for speed and increased maximal
1288 sizes of allowable inputs.
1289
1290
1291 `1.2m (2017/07/31)`
1292 ----
1293
1294 ### Breaking changes
1295
1296 - **xintbinhex**: the length of the input is now limited. The maximum
1297 size depends on the macro and ranges from about `4000` to about
1298 `19900` digits.
1299
1300 - **xintbinhex**: `\xintCHexToBin` is now the variant of
1301 `\xintHexToBin` which does not remove leading binary zeroes: `N`
1302 hex-digits give on output exactly `4N` binary digits.
1303
1304 ### Improvements and new features
1305
1306 - **xintbinhex**: all macros have been rewritten using techniques from
1307 the 1.2 release (they had remained unmodified since `1.08` of
1308 `2013/06/07`.) The new macros are faster but limited to a few
1309 thousand digits. The `1.08` routines could handle tens of thousands
1310 of digits, but not in a reasonable time.
1311
1312 ### Bug fixes
1313
1314 - user manual: the `Changes` section wrongly stated at `1.2l` that the
1315 macros of **xintbinhex** had been made robust against non terminated
1316 input such as ``\number\mathcode`\-``. Unfortunately the author fell
1317 into the trap of believing his own documentation and he forgot to
1318 actually implement the change. Now done.
1319
1320 - user manual: the PDF bookmarks were messed up.
1321
1322 - **xint**, **xintfrac**: `\xintGeq`, `\xintMax`, `\xintMin`, suffered
1323 from some extra overhead. This was caused by use of some auxiliaries
1324 from the very early days which got redefined at some stage. This is
1325 fixed here with some additional efficiency improvements and pruning
1326 of old code.
1327
1328
1329 `1.2l (2017/07/26)`
1330 ----
1331
1332 ### Removed
1333
1334 - `\xintiiSumExpr`, `\xintiiPrdExpr` (**xint**) and `\xintSumExpr`,
1335 `\xintPrdExpr` (**xintfrac**). They had not been formally deprecated,
1336 but had been left un-documented since `1.09d (2013/10/22)`.
1337
1338 - internal macro `\xint_gob_til_xint_relax` removed.
1339
1340 ### Improvements and new features
1341
1342 - the underscore character `_` is accepted by the **xintexpr** parsers
1343 as a digit separator (the space character already could be used for
1344 improved readability of big numbers). It is not allowed as *first*
1345 character of a number, as it would then be mis-interpreted as the
1346 start of a possible variable name.
1347
1348 - some refactoring in **xintcore** auxiliary routines and in
1349 `\xintiiSub` and `\xintiiCmp` for some small efficiency gains.
1350
1351 - code comments in **xintcore** are better formatted, but remain
1352 sparse.
1353
1354 - **xintcore**, **xint**, **xintfrac**, ... : some macros were not
1355 robust against arguments whose expansion looks forward for some
1356 termination (e.g. ``\number\mathcode`\-``), and particularly, most
1357 were fragile against inputs using non-terminated ``\numexpr`` (such
1358 as `\xintiiAdd{\the\numexpr1}{2}` or `\xintRaw{\numexpr1}`). This was
1359 not a bug per se, as the user manual did not claim such inputs were
1360 legal, but it was slightly inconvenient. Most macros (particularly
1361 those of **xintfrac**) have now been made robust against such inputs.
1362 Some macros from **xintcore** primarily destined to internal usage
1363 still accept only properly terminated arguments such as
1364 ``\the\mathcode`\-<space>`` or ``\the\numexpr1\relax``.
1365
1366 The situation with expressions is unchanged: syntax such as
1367 `\xintexpr \numexpr1+2\relax` is illegal as the ending `\relax` token
1368 will get swallowed by the `\numexpr`; but it is needed by the
1369 ``xintexpr``-ession parser, hence the parser will expand forward and
1370 presumably end with in an "illegal token" error, or provoke some
1371 low-level TeX error (N.B.: a closing brace `}` for example can not
1372 terminate an ``xintexpr``-ession, the parser must find a `\relax`
1373 token at some point). Thus there must be in this example a second
1374 `\relax`.
1375
1376 - experimental code for error conditions; there is no complete user
1377 interface yet, it is done in preparation for next major release and
1378 is completely unstable and undocumented.
1379
1380 ### Bug fixes
1381
1382 - **xintbinhex**: since `1.2 (2015/10/10)`, `\xintHexToDec` was
1383 broken due to an undefined macro (it was in `xint.sty`, but the
1384 module by itself is supposedly dependent only upon `xintcore.sty`).
1385
1386 - **xintgcd**: macro `\xintBezout` produced partially wrong output if
1387 one of its two arguments was zero.
1388
1389 - **xintfrac**: the manual said one could use directly `\numexpr`
1390 compatible expressions in arithmetic macros (without even a
1391 `\numexpr` encapsulation) if they were expressed with up to 8 tokens.
1392 There was a bug if these 8 tokens evaluated to zero. The bug has been
1393 fixed, and up to 9 tokens are now accepted. But it is simpler to use
1394 `\the\numexpr` prefix and not to worry about the token count... The
1395 ending `\relax` is now un-needed.
1396
1397
1398 `1.2k (2017/01/06)`
1399 ----
1400
1401 ### Breaking changes
1402
1403 - macro `\xintFloat` which rounds its input to a floating point number
1404 does _not_ print anymore `10.0...0eN` to signal an upwards rounding
1405 to the next power of ten. The mantissa has in all cases except the
1406 zero input exactly one digit before the decimal mark.
1407
1408 - some floating point computations may differ in the least significant
1409 digits, due to a change in the rounding algorithm applied to macro
1410 arguments expressed as fractions and to an improvement in precision
1411 regarding half-integer powers in expressions. See next.
1412
1413 ### Improvements and new features
1414
1415 - the initial rounding to the target precision `P` which is applied by
1416 the floating point macros from **xintfrac** to their arguments
1417 achieves the _exact (aka correct) rounding_ even for inputs which are
1418 fractions with more than `P+2` digits in their numerators and
1419 denominators (`>1`.) Hence the computed values depend only on the
1420 arguments as rational numbers and not upon their representatives.
1421 This is not relevant to _expressions_ (**xintexpr**), because the
1422 `\xintfloatexpr` parser sees there `/` as an operator and does not
1423 (apart from special constructs) get to manipulate fractions as such.
1424
1425 - `\xintnewdummy` is public interface to a `1.2e` macro which serves to
1426 declare any given catcode 11 character as a dummy variable for
1427 expressions (**xintexpr**). This is useful for Unicode engines (the
1428 Latin letters being already all pre-declared as dummy variables.)
1429
1430 - added `\xintiSqrtR`, there was only `\xintiiSqrtR` alongside
1431 `\xintiSqrt` and `\xintiiSqrt` (**xint**).
1432
1433 - added non public `\xintLastItem:f:csv` to **xinttools** for faster
1434 `last()` function, and improved `\xintNewExpr` compatibility. Also
1435 `\xintFirstItem:f:csv`.
1436
1437 ### Bug fixes
1438
1439 - the `1.2f` half-integer powers computed within `\xintfloatexpr` had a
1440 silly rounding to the target precision just _before_ the final
1441 square-root extraction, thus possibly losing some precision. The
1442 `1.2k` implementation keeps guard digits for this final square root
1443 extraction. As for integer exponents, it is guaranteed that the
1444 computed value differs from the exact one by less than `0.52 ulp`
1445 (for inputs having at most `\xinttheDigits` digits.)
1446
1447 - more regressions from `1.2i` were fixed: `\xintLen` (**xint**,
1448 **xintfrac**) and `\xintDouble` (**xintcore**) had forgotten that
1449 their argument was allowed to be negative. A regression test suite is
1450 now in place and is being slowly expanded to cover more macros.
1451
1452 - `\xintiiSquareRoot{0}` now produces `{1}{1}`, which fits better the
1453 general documented behaviour of this macro than `11`.
1454
1455
1456 `1.2j (2016/12/22)`
1457 ----
1458
1459 ### Improvements and new features
1460
1461 - **xinttools** and **xintexpr**:
1462
1463 1. slightly improves the speed of `\xintTrim`.
1464
1465 2. speed gains for the handlers of comma separated lists
1466 implementing Python-like slicing and item extraction. Relevant
1467 non (user) documented macros better documented in
1468 `sourcexint.pdf`.
1469
1470 - significant documentations tweaks (inclusive of suppressing things!),
1471 and among them two beautiful hyperlinked tables with both horizontal
1472 and vertical rules which bring the documentation of the **xintexpr**
1473 syntax to a kind of awe-inspiring perfection... except that
1474 implementation of some math functions is still lacking.
1475
1476 ### Bug fixes
1477
1478 - fix two `1.2i` regressions caused by undefined macros (`\xintNthElt`
1479 in certain branches and `[list][N]` item extraction in certain
1480 cases.) The test files existed but were not executed prior to
1481 release. Automation in progress.
1482
1483
1484 `1.2i (2016/12/13)`
1485 ----
1486
1487 ### Breaking changes
1488
1489 - `\xintDecSplit` second argument must have no sign (former code
1490 replaced it with its absolute value, a sign now may cause an error.)
1491
1492 ### Removed
1493
1494 - deprecated macros `\xintifTrue`, `\xintifTrueFalse`, `\xintQuo`,
1495 `\xintRem`, `\xintquo`, `\xintrem`.
1496
1497 ### Improvements and new features
1498
1499 - **xintkernel**: `\xintLength` is faster. New macros:
1500
1501 - `\xintLastItem` to fetch the last item from its argument,
1502
1503 - `\romannumeral\xintgobble` for gobbling many (up to 531440)
1504 upstream braced items or tokens.
1505
1506 - `\romannumeral\xintreplicate` which is copied over from the expl3
1507 `\prg_replicate:nn` with some minor changes.
1508
1509 - **xinttools**: general token list handling routines `\xintKeep`,
1510 `\xintTrim` and `\xintNthElt` are faster; but the novel `\xintTrim`
1511 can only remove up to a maximum of 531440 items.
1512
1513
1514 Also, `\xintFor` partially improves on some issues which are
1515 reported upon in the documentation.
1516
1517 - some old macros have been rewritten entirely or partially using
1518 techniques which **xint** started using in release `1.2`:
1519
1520 - **xintcore**: `\xintDouble`, `\xintHalf`, `\xintInc`, `\xintDec`,
1521 `\xintiiLDg`, `\xintDSR` (originally from **xint**), a novel
1522 `\xintDSRr`.
1523
1524 - **xint**: `\xintDSH`, `\xintDSx`, `\xintDecSplit`, `\xintiiE`.
1525
1526 - **xintfrac**: as a result of the above `\xintTrunc`, `\xintRound`
1527 and `\xintXTrunc` got faster. But the main improvement for them is
1528 with decimal inputs which formerly had not been treated separately
1529 from the general fraction case. Also, `\xintXTrunc` does not
1530 anymore create a dependency of **xintfrac** on **xinttools**.
1531
1532 - the documentation has again been (slightly) re-organized; it has a
1533 new sub-section on the Miller-Rabin primality test, to illustrate
1534 some use of `\xintNewFunction` for recursive definitions.
1535
1536 - the documentation has dropped the LaTeX "command" terminology (which
1537 had been used initially in 2013 for some forgotten reasons and should
1538 have been removed long ago) and uses only the more apt "macro", as
1539 after all, all of **xint** is about expansion of macros (plus the use
1540 of `\numexpr`).
1541
1542 ### Bug fixes
1543
1544 - `\xintDecSplitL` and `\xintDecSplitR` from **xint** produced their
1545 output in a spurious brace pair (bug introduced in `1.2f`).
1546
1547
1548 `1.2h (2016/11/20)`
1549 ----
1550
1551 ### Improvements and new features
1552
1553 - new macro `\xintNewFunction` in **xintexpr** which allows to extend
1554 the parser syntax with functions in situations where `\xintdeffunc`
1555 is not usable (typically, because dummy variables are used over a not
1556 yet determined range of values because it depends on the variables).
1557
1558 - after three years of strict obedience to `xint` prefix, now
1559 `\thexintexpr`, `\thexintiexpr`, `\thexintfloatexpr`, and
1560 `\thexintiiexpr` are provided as synonyms to `\xinttheexpr`, etc...
1561
1562 ### Bug fixes
1563
1564 - the `(cond)?{foo}{bar}` operator from **xintexpr** mis-behaved in
1565 certain circumstances (such as an empty `foo`).
1566
1567 - the **xintexpr** `1.2f` `binomial` function (which uses
1568 `\xintiiBinomial` from **xint.sty** or `\xintFloatBinomial` from
1569 **xintfrac.sty**) deliberately raised an error for `binomial(x,y)`
1570 with `y<0` or `x<y`. This was unfortunate, and it now simply
1571 evaluates to zero in such cases.
1572
1573 - similarly the `pfactorial` function was very strict and
1574 `pfactorial(x,y)` deliberately raised an out-of-range error if not
1575 used with non-negative integers with `x` less than `y`. It now avoids
1576 doing that and allows negative arguments.
1577
1578 - the `add` and `mul` from **xintexpr**, which work with dummy
1579 variables since `1.1`, raised an error since `1.2c 2015/11/16` when
1580 the dummy variable was given an empty range (or list) of values,
1581 rather than producing respectively `0` and `1` as formerly.
1582
1583
1584 `1.2g (2016/03/19)`
1585 ----
1586
1587 ### Breaking changes
1588
1589 - inside expressions, list item selector `[L][n]` counts starting at
1590 zero, not at one. This is more coherent with `[L][a:b]` which was
1591 already exactly like in Python since its introduction. A function
1592 len(L) replaces earlier `[L][0]`.
1593
1594 - former `iter` keyword now called `iterr`. Indeed it matched with
1595 `rrseq`, the new `iter` (which was somehow missing from `1.1`) is the
1596 one matching `rseq`. Allows to iterate more easily with a "list"
1597 variable.
1598
1599 ### Improvements and new features
1600
1601 - in **xintexpr.sty**: list selectors `[L][n]` and `[L][a:b]` are more
1602 efficient: the earlier `1.1` routines did back and forth conversions
1603 from comma separated values to braced tokens, the `1.2g` routines use
1604 macros from **xinttools.sty** handling directly the encountered lists
1605 of comma separated values.
1606
1607 - in **xinttools.sty**: slight improvements in the efficiency of the
1608 `\xintNthElt`, `\xintKeep`, `\xintTrim` routines and new routines
1609 handling directly comma separated values. The latter are not included
1610 in the user manual (they are not `\long`, they don't make efforts to
1611 preserve some braces, do not worry about spaces, all those worries
1612 being irrelevant to the use in expressions for list selectors).
1613
1614 - a slight speed improvement to `\xintFloatSqrt` in its quest of
1615 correct rounding.
1616
1617 - float multiplication and division handle more swiftly operands
1618 (non-fractional) with few digits, when the float precision is large.
1619
1620 - the syntax of expressions is described in a devoted chapter of the
1621 documentation; an example shows how to implement (expandably) the
1622 Brent-Salamin algorithm for computation of Pi using `iter` in a float
1623 expression.
1624
1625
1626 `1.2f (2016/03/12)`
1627 ----
1628
1629 ### Breaking changes
1630
1631 - no more `\xintFac` macro but `\xintiFac/\xintiiFac/\xintFloatFac`.
1632
1633 ### Improvements and new features
1634
1635 - functions `binomial`, `pfactorial` and `factorial` in both integer
1636 and float versions.
1637
1638 - macros `\xintiiBinomial`, `\xintiiPFactorial`
1639 (**xint.sty**) and `\xintFloatBinomial`, `\xintFloatPFactorial`
1640 (**xintfrac.sty**). Improvements to `\xintFloatFac`.
1641
1642 - faster implementation and increased accuracy of float power macros.
1643 Half-integer exponents are now accepted inside float expressions.
1644
1645 - faster implementation of both integral and float square root macros.
1646
1647 - the float square root achieves
1648 *correct* (aka *exact*) rounding in arbitrary precision.
1649
1650 - modified behaviour for the `\xintPFloat` macro, used by
1651 `\xintthefloatexpr` to prettify its output. It now opts for decimal
1652 notation if and only if scientific notation would use an exponent between
1653 `-5` and `5` inclusive. The zero value is printed `0.` with a dot.
1654
1655 - the float macros for addition, subtraction, multiplication, division now
1656 first round their two operands to P, not P+2, significant places before
1657 doing the actual computation (P being the target precision). The same
1658 applies to the power macros and to the square root macro.
1659
1660 - the documentation offers a more precise (and accurate) discussion of
1661 floating point issues.
1662
1663 - various under-the-hood code improvements; the floatexpr operations are
1664 chained in a faster way, from skipping some unneeded parsing on results of
1665 earlier computations. The absence of a real inner data structure for floats
1666 (incorporating their precisions, for one) is however still a bit hair
1667 raising: currently the lengths of the mantissas of the operands are computed
1668 again by each float macro or expression operation.
1669
1670 - (TeXperts only) the macros defined (internally) from `\xintdeffunc` et al.
1671 constructs do not incorporate an initial `\romannumeral` anymore.
1672
1673 - renewed desperate efforts at improving the documentation by random
1674 shuffling of sections and well thought additions; cuts were considered and
1675 even performed.
1676
1677 ### Bug fixes
1678
1679 - squaring macro `\xintSqr` from **xintfrac.sty** was broken due to a
1680 misspelled sub-macro name. Dates back to `1.1` release of `2014/10/28`
1681 `:-((`.
1682
1683 - `1.2c`'s fix to the subtraction bug from `1.2` introduced another bug,
1684 which in some cases could create leading zeroes in the output, or even
1685 worse. This could invalidate other routines using subtractions, like
1686 `\xintiiSquareRoot`.
1687
1688 - the comparison operators were not recognized by `\xintNewIIExpr` and
1689 `\xintdefiifunc` constructs.
1690
1691
1692 `1.2e (2015/11/22)`
1693 ----
1694
1695 ### Improvements and new features
1696
1697 - macro `\xintunassignvar`.
1698
1699 - slight modifications of the logged messages in case of `\xintverbosetrue`.
1700
1701 - a space in `\xintdeffunc f(x)<space>:= expression ;` is now accepted.
1702
1703 - documentation enhancements: the _Quick Sort_ section with its included
1704 code samples has been entirely re-written; the _Commands of the xintexpr
1705 package_ section has been extended and reviewed entirely.
1706
1707 ### Bug fixes
1708
1709 - in **xintfrac**: the `\xintFloatFac` from release `1.2` parsed its
1710 argument only through `\numexpr` but it should have used `\xintNum`.
1711
1712 - in **xintexpr**: release `1.2d` had broken the recognition of
1713 sub-expressions immediately after variable names (with tacit
1714 multiplication).
1715
1716 - in **xintexpr**: contrarily to what `1.2d` documentation said, tacit
1717 multiplication was not yet always done with enhanced precedence. Now
1718 yes.
1719
1720
1721 `1.2d (2015/11/18)`
1722 ----
1723
1724 ### Improvements and new features
1725
1726 - the function definitions done by `\xintdeffunc` et al., as well as
1727 the macro declarations by `\xintNewExpr` et al. now have only local
1728 scope.
1729
1730 - tacit multiplication applies to more cases, for example (x+y)z, and
1731 always ties more than standard * infix operator, e.g. x/2y is like
1732 x/(2*y).
1733
1734 - some documentation enhancements, particularly in the chapter on
1735 xintexpr.sty, and also in the code source comments.
1736
1737 ### Bug fixes
1738
1739 - in **xintcore**: release `1.2c` had inadvertently broken the
1740 `\xintiiDivRound` macro.
1741
1742
1743 `1.2c (2015/11/16)`
1744 ----
1745
1746 ### Improvements and new features
1747
1748 - macros `\xintdeffunc`, `\xintdefiifunc`, `\xintdeffloatfunc` and
1749 boolean `\ifxintverbose`.
1750
1751 - on-going code improvements and documentation enhancements, but
1752 stopped in order to issue this bugfix release.
1753
1754 ### Bug fixes
1755
1756 - in **xintcore**: recent release `1.2` introduced a bug in the
1757 subtraction (happened when 00000001 was found under certain
1758 circumstances at certain mod 8 locations).
1759
1760
1761 `1.2b (2015/10/29)`
1762 ----
1763
1764 ### Bug fixes
1765
1766 - in **xintcore**: recent release `1.2` introduced a bug in the division
1767 macros, causing a crash when the divisor started with 99999999 (it was
1768 attempted to use with 1+99999999 a subroutine expecting only 8-digits
1769 numbers).
1770
1771 `1.2a (2015/10/19)`
1772 ----
1773
1774 ### Improvements and new features
1775
1776 - added `\xintKeepUnbraced`, `\xintTrimUnbraced` (**xinttools**) and fixed
1777 documentation of `\xintKeep` and `\xintTrim` regarding brace stripping.
1778
1779 - added `\xintiiMaxof/\xintiiMinof` (**xint**).
1780
1781 - TeX hackers only: replaced all code uses of ``\romannumeral-`0``
1782 by the quicker ``\romannumeral`&&@`` (`^` being used as letter,
1783 had to find another character usable with catcode 7).
1784
1785 ### Bug fixes
1786
1787 - in **xintexpr**: recent release `1.2` introduced a bad bug in the
1788 parsing of decimal numbers and as a result `\xinttheexpr 0.01\relax`
1789 expanded to `0` ! (sigh...)
1790
1791
1792 `1.2 (2015/10/10)`
1793 ----
1794
1795 ### Removed
1796
1797 - the macros `\xintAdd`, `\xintSub`, `\xintMul`, `\xintMax`,
1798 `\xintMin`, `\xintMaxof`, `\xintMinof` are removed from package
1799 **xint**, and only exist in the versions from **xintfrac**. With only
1800 **xintcore** or **xint** loaded, one _must_ use `\xintiiAdd`,
1801 `\xintiiSub`, ..., or `\xintiAdd`, `\xintiSub`, etc...
1802
1803 ### Improvements and new features
1804
1805 - the basic arithmetic implemented in **xintcore** has been entirely
1806 rewritten. The mathematics remains the elementary school one, but the
1807 `TeX` implementation achieves higher speed (except, regarding
1808 addition/subtraction, for numbers up to about thirty digits), the
1809 gains becoming quite significant for numbers with hundreds of digits.
1810
1811 - the inputs must have less than 19959 digits. But computations with
1812 thousands of digits take time.
1813
1814 - a previously standing limitation of `\xintexpr`, `\xintiiexpr`, and
1815 of `\xintfloatexpr` to numbers of less than 5000 digits has been
1816 lifted.
1817
1818 - a *qint* function is provided to help the parser gather huge integers
1819 in one-go, as an exception to its normal mode of operation which
1820 expands token by token.
1821
1822 - `\xintFloatFac` macro for computing the factorials of integers as
1823 floating point numbers to a given precision. The `!` postfix operator
1824 inside `\xintfloatexpr` maps to this new macro rather than to the
1825 exact factorial as used by `\xintexpr` and `\xintiiexpr`.
1826
1827 - there is more flexibility in the parsing done by the macros from
1828 **xintfrac** on fractional input: the decimal parts of both the
1829 numerator and the denominator may arise from a separate expansion via
1830 ``\romannumeral-`0``. Also the strict `A/B[N]` format is a bit
1831 relaxed: `N` may be anything understood by `\numexpr` (it could even
1832 be empty but that possibility has been removed by later `1.2f`
1833 release.)
1834
1835 - on the other hand an isolated dot `.` is not legal syntax anymore
1836 inside the expression parsers: there must be digits either before or
1837 after. It remains legal input for the macros of **xintfrac**.
1838
1839 - added `\ht`, `\dp`, `\wd`, `\fontcharht`, etc... to the tokens
1840 recognized by the parsers and expanded by `\number`.
1841
1842 - an obscure bug in package **xintkernel** has been fixed, regarding
1843 the sanitization of catcodes: under certain circumstances (which
1844 could not occur in a normal `LaTeX` context), unusual catcodes could
1845 end up being propagated to the external world.
1846
1847 - an effort at randomly shuffling around various pieces of the
1848 documentation has been done.
1849
1850
1851 `1.1c (2015/09/12)`
1852 ----
1853
1854 - bugfix regarding macro `\xintAssign` from **xinttools** which did
1855 not behave correctly in some circumstances (if there was a space
1856 before `\to`, in particular).
1857
1858 - very minor code improvements, and correction of some issues
1859 regarding the source code formatting in `sourcexint.pdf`, and
1860 minor issues in `Makefile.mk`.
1861
1862
1863 `1.1b (2015/08/31)`
1864 ----
1865
1866 - bugfix: some macros needed by the integer division routine from
1867 **xintcore** had been left in **xint.sty** since release `1.1`. This
1868 for example broke the `\xintGCD` from **xintgcd** if package **xint**
1869 was not loaded.
1870
1871 - Slight enhancements to the documentation, particularly in the
1872 `Read this first` section.
1873
1874
1875 `1.1a (2014/11/07)`
1876 ----
1877
1878 - fixed a bug which prevented `\xintNewExpr` from producing correctly working
1879 macros from a comma separated replacement text.
1880
1881 - `\xintiiSqrtR` for rounded integer square root; former `\xintiiSqrt`
1882 already produced truncated integer square root; corresponding function
1883 `sqrtr` added to `\xintiiexpr..\relax` syntax.
1884
1885 - use of straight quotes in the documentation for better legibility.
1886
1887 - added `\xintiiIsOne`, `\xintiiifOne`, `\xintiiifCmp`, `\xintiiifEq`,
1888 `\xintiiifGt`, `\xintiiifLt`, `\xintiiifOdd`, `\xintiiCmp`, `\xintiiEq`,
1889 `\xintiiGt`, `\xintiiLt`, `\xintiiLtorEq`, `\xintiiGtorEq`, `\xintiiNeq`,
1890 mainly for efficiency of `\xintiiexpr`.
1891
1892 - for the same reason, added `\xintiiGCD` and `\xintiiLCM`.
1893
1894 - added the previously mentioned `ii` macros, and some others from `1.1`, to
1895 the user manual. But their main usage is internal to `\xintiiexpr`, to skip
1896 unnecessary overheads.
1897
1898 - various typographical fixes throughout the documentation, and a bit
1899 of clean up of the code comments. Improved `\Factors` example of nested
1900 `subs`, `rseq`, `iter` in `\xintiiexpr`.
1901
1902
1903 `1.1 (2014/10/28)`
1904 ----
1905
1906 ### Breaking changes
1907
1908 - in `\xintiiexpr`, `/` does _rounded_ division, rather than the
1909 Euclidean division (for positive arguments, this is truncated division).
1910 The `//` operator does truncated division,
1911
1912 - the `:` operator for three-way branching is gone, replaced with `??`,
1913
1914 - `1e(3+5)` is now illegal. The number parser identifies `e` and `E`
1915 in the same way it does for the decimal mark, earlier versions treated
1916 `e` as `E` rather as infix operators of highest precedence,
1917
1918 - the `add` and `mul` have a new syntax, old syntax is with `` `+` `` and
1919 `` `*` `` (left quotes mandatory), `sum` and `prd` are gone,
1920
1921 - no more special treatment for encountered brace pairs `{..}` by the
1922 number scanner, `a/b[N]` notation can be used without use of braces (the
1923 `N` will end up as is in a `\numexpr`, it is not parsed by the
1924 `\xintexpr`-ession scanner),
1925
1926 - in earlier releases, place holders for `\xintNewExpr` could either
1927 be denoted `#1`, `#2`, ... or also `$1`, `$2`, ...
1928 Only the usual `#` form is now accepted and the special cases previously
1929 treated via the second form are now managed via a `protect(...)` function.
1930
1931 - **xintfrac**: `\xintFloor` and `\xintCeil` add a trailing `/1[0]` to their
1932 (integer) output. New `\xintiFloor` and `\xintiCeil` do not.
1933
1934 ### Removed
1935
1936 - `\xintnumexpr`, `\xintthenumexpr`, `\xintNewNumExpr`: use
1937 `\xintiexpr`, `\xinttheiexpr`, `\xintNewIExpr`.
1938
1939 ### Deprecated
1940
1941 - `\xintDivision`, `\xintQuo`, `\xintRem`: use `\xintiDivision`,
1942 `\xintiQuo`, `\xintiRem`.
1943
1944 - `\xintMax`, `\xintMin`, `\xintAdd`, `\xintSub`, `\xintMul`
1945 (**xint**): their usage without **xintfrac** is deprecated; use
1946 `\xintiMax`, `\xintiMin`, `\xintiAdd`, `\xintiSub`, `\xintiMul`.
1947
1948 - the `&` and `|` as Boolean operators in `xintexpr`-essions are
1949 deprecated in favour of `&&` and `||`. The single letter operators
1950 might be assigned some other meaning in some later release (bitwise
1951 operations, perhaps). Do not use them.
1952
1953 ### Improvements and new features
1954
1955 * new package **xintcore** has been split off **xint**. It contains the
1956 core arithmetic macros (it is loaded by LaTeX package **bnumexpr**),
1957
1958 * neither **xint** nor **xintfrac** load **xinttools**. Only
1959 **xintexpr** does,
1960
1961 * whenever some portion of code has been revised, often use has been made of
1962 the `\xint_dothis` and `\xint_orthat` pair of macros for expandably
1963 branching,
1964
1965 * these tiny helpful macros, and a few others are in package
1966 **xintkernel** which contains also the catcode and loading order
1967 management code, initially inspired by code found in Heiko Oberdiek's
1968 packages,
1969
1970 * the source code, which was suppressed from `xint.pdf` in release
1971 `1.09n`, is now compiled into a separate file `sourcexint.pdf`,
1972
1973 * faster handling by `\xintAdd`, `\xintSub`, `\xintMul`, ... of the case
1974 where one of the arguments is zero,
1975
1976 * the `\xintAdd` and `\xintSub` macros from package **xintfrac** check if
1977 one of the denominators is a multiple of the other, and only if this is
1978 not the case do they multiply the denominators. But systematic reduction
1979 would be too costly,
1980
1981 * this naturally will be also the case for the `+` and `-` operations
1982 in `\xintexpr`,
1983
1984 * **xint** added `\xintiiDivRound`, `\xintiiDivTrunc`, `\xintiiMod`
1985 for rounded and truncated division of big integers (next to
1986 `\xintiiQuo` and `\xintiiRem`),
1987
1988 * with **xintfrac** loaded, the `\xintNum` macro does `\xintTTrunc`
1989 (which is truncation to an integer, same as `\xintiTrunc {0}`),
1990
1991 * added `\xintMod` to **xintfrac** for modulo operation with
1992 fractional numbers,
1993
1994 * added `\xintiFloor` and `\xintiCeil` to **xintfrac**,
1995
1996 * `\xintiexpr`, `\xinttheiexpr` admit an optional argument within brackets
1997 `[d]`, they round the computation result (or results, if comma separated)
1998 to `d` digits after decimal mark, (the whole computation is done exactly,
1999 as in `xintexpr`),
2000
2001 * `\xintfloatexpr`, `\xintthefloatexpr` similarly admit an optional
2002 argument which serves to keep only `d` digits of precision, getting rid
2003 of cumulated uncertainties in the last digits (the whole computation is
2004 done according to the precision set via `\xintDigits`),
2005
2006 * `\xinttheexpr` and `\xintthefloatexpr` _pretty-print_ if possible, the
2007 former removing unit denominator or `[0]` brackets, the latter avoiding
2008 scientific notation if decimal notation is practical,
2009
2010 * the `//` does truncated division and `/:` is the associated modulo,
2011
2012 * multi-character operators `&&`, `||`, `==`, `<=`, `>=`, `!=`,
2013 `**`,
2014
2015 * multi-letter infix binary words `'and'`, `'or'`, `'xor'`, `'mod'`
2016 (straight quotes mandatory),
2017
2018 * functions `even`, `odd`,
2019
2020 * `\xintdefvar A3:=3.1415;` for variable definitions (non expandable,
2021 naturally), usable in subsequent expressions; variable names may contain
2022 letters, digits, underscores. They should not start with a digit, the `@`
2023 is reserved, and single lowercase and uppercase Latin letters are
2024 predefined to work as dummy variables (see next),
2025
2026 * generation of comma separated lists `a..b`, `a..[d]..b`,
2027
2028 * Python syntax-like list extractors `[list][n:]`, `[list][:n]`,
2029 `[list][a:b]` allowing negative indices, but no optional step argument,
2030 and `[list][n]` (`n=0` for the number of items in the list),
2031
2032 * functions `first`, `last`, `reversed`,
2033
2034 * itemwise operations on comma separated lists `a*[list]`, etc.., possible
2035 on both sides `a*[list]^b`, and obeying the same precedence rules as with
2036 numbers,
2037
2038 * `add` and `mul` must use a dummy variable: `add(x(x+1)(x-1), x=-10..10)`,
2039
2040 * variable substitutions with `subs`:
2041 `subs(subs(add(x^2+y^2,x=1..y),y=t),t=20)`,
2042
2043 * sequence generation using `seq` with a dummy variable: `seq(x^3,
2044 x=-10..10)`,
2045
2046 * simple recursive lists with `rseq`, with `@` given the last value,
2047 `rseq(1;2@+1,i=1..10)`,
2048
2049 * higher recursion with `rrseq`, `@1`, `@2`, `@3`, `@4`, and `@@(n)`
2050 for earlier values, up to `n=K` where `K` is the number of terms of the
2051 initial stretch `rrseq(0,1;@1+@2,i=2..100)`,
2052
2053 * iteration with `iter` which is like `rrseq` but outputs only the
2054 last `K` terms, where `K` was the number of initial terms,
2055
2056 * inside `seq`, `rseq`, `rrseq`, `iter`, possibility to use `omit`,
2057 `abort` and `break` to control termination,
2058
2059 * `n++` potentially infinite index generation for `seq`, `rseq`,
2060 `rrseq`, and `iter`, it is advised to use `abort` or `break(..)` at
2061 some point,
2062
2063 * the `add`, `mul`, `seq`, ... are nestable,
2064
2065 * `\xintthecoords` converts a comma separated list of an even number
2066 of items to the format expected by the `TikZ` `coordinates` syntax,
2067
2068 * completely new version `\xintNewExpr`, `protect` function to handle
2069 external macros. The dollar sign
2070 `$` for place holders is not accepted anymore, only the standard macro
2071 parameter `#`. Not all constructs are compatible with `\xintNewExpr`.
2072 % $ this docstripped line for emacs buffer fontification issues in doctex-mode
2073
2074 ### Bug fixes
2075
2076 - `\xintZapFirstSpaces` hence also `\xintZapSpaces` from package **xinttools**
2077 were buggy when used with an argument either empty or containing only
2078 space tokens.
2079
2080 - `\xintiiexpr` did not strip leading zeroes, hence
2081 `\xinttheiiexpr 001+1\relax` did not obtain the expected result ...
2082
2083 - `\xinttheexpr \xintiexpr 1.23\relax\relax` should have produced `1`,
2084 but it produced `1.23`
2085
2086 - the catcode of `;` was not set at package launching time.
2087
2088 - the `\XINTinFloatPrd:csv` macro name had a typo, hence `prd` was
2089 non-functional in `\xintfloatexpr`.
2090
2091
2092 `1.09n (2014/04/01)`
2093 ----
2094
2095 * the user manual does not include by default the source code
2096 anymore: the `\NoSourceCode` toggle in file `xint.tex` has to
2097 be set to 0 before compilation to get source code inclusion
2098 (later release `1.1` made source code available as `sourcexint.pdf`).
2099
2100 * bug fix (**xinttools**) in `\XINT_nthelt_finish` (this bug was
2101 introduced in `1.09i` of `2013/12/18` and showed up when the index
2102 `N` was larger than the number of elements of the list).
2103
2104
2105 `1.09m (2014/02/26)`
2106 ----
2107
2108 * new in **xinttools**: `\xintKeep` keeps the first `N` or last
2109 `N` elements of a list (sequence of braced items); `\xintTrim`
2110 cuts out either the first `N` or the last `N` elements from a
2111 list.
2112
2113 * new in **xintcfrac**: `\xintFGtoC` finds the initial partial
2114 quotients common to two numbers or fractions `f` and `g`;
2115 `\xintGGCFrac` is a clone of `\xintGCFrac` which however does not
2116 assume that the coefficients of the generalized continued
2117 fraction are numeric quantities. Some other minor changes.
2118
2119
2120 `1.09kb (2014/02/13)`
2121 ----
2122
2123 * bug fix (**xintexpr**): an aloof modification done by `1.09i` to
2124 `\xintNewExpr` had resulted in a spurious trailing space present
2125 in the outputs of all macros created by `\xintNewExpr`, making
2126 nesting of such macros impossible.
2127
2128 * bug fix (**xinttools**): `\xintBreakFor` and `\xintBreakForAndDo`
2129 were buggy when used in the last iteration of an `\xintFor` loop.
2130
2131 * bug fix (**xinttools**): `\xintSeq` from `1.09k` needed a `\chardef`
2132 which was missing from `xinttools.sty`, it was in `xint.sty`.
2133
2134
2135 `1.09k (2014/01/21)`
2136 ----
2137
2138 * inside `\xintexpr..\relax` (and its variants) tacit multiplication is
2139 implied when a number or operand is followed directly with an
2140 opening parenthesis,
2141
2142 * the `"` for denoting (arbitrarily big) hexadecimal numbers is
2143 recognized by `\xintexpr` and its variants (package
2144 **xintbinhex** is required); a fractional hexadecimal part
2145 introduced by a dot `.` is allowed.
2146
2147 * re-organization of the first sections of the user manual.
2148
2149 * bug fix (**xinttools**, **xint**, ...): forgotten catcode check of
2150 `"` at loading time has been added.
2151
2152
2153 `1.09j (2014/01/09)`
2154 ----
2155
2156 * (**xint**) the core division routines have been re-written for some
2157 (limited) efficiency gain, more pronounced for small divisors. As a
2158 result the *computation of one thousand digits of $\pi$* is close
2159 to three times faster than with earlier releases.
2160
2161 * some various other small improvements, particularly in the power
2162 routines.
2163
2164 * (**xintfrac**) a macro `\xintXTrunc` is designed to produce
2165 thousands or even tens of thousands of digits of the decimal
2166 expansion of a fraction. Although completely expandable it has its
2167 use limited to inside an `\edef`, `\write`, `\message`, \dots. It
2168 can thus not be nested as argument to another package macro.
2169
2170 * (**xintexpr**) the tacit multiplication done in `\xintexpr..\relax`
2171 on encountering a count register or variable, or a `\numexpr`,
2172 while scanning a (decimal) number, is extended to the case of a sub
2173 `\xintexpr`-ession.
2174
2175 * `\xintexpr` can now be used in an `\edef` with no `\xintthe` prefix;
2176 it will execute completely the computation, and the error message
2177 about a missing `\xintthe` will be inhibited. Previously, in the
2178 absence of `\xintthe`, expansion could only be a full one (with
2179 ``\romannumeral-`0``), not a complete one (with `\edef`). Note
2180 that this differs from the behavior of the non-expandable
2181 `\numexpr`: `\the` or `\number` (or `\romannumeral`) are needed
2182 not only to print but
2183 also to trigger the computation, whereas `\xintthe` is mandatory
2184 only for the printing step.
2185
2186 * the default behavior of `\xintAssign` is changed, it now does not
2187 do any further expansion beyond the initial full-expansion which
2188 provided the list of items to be assigned to macros.
2189
2190 * bug fix (**xintfrac**): `1.09i` did an unexplainable change to
2191 `\XINT_infloat_zero` which broke the floating point routines for
2192 vanishing operands =:(((
2193
2194 * bug fix: the `1.09i` `xint.ins` file produced a buggy `xint.tex` file.
2195
2196
2197 `1.09i (2013/12/18)`
2198 ----
2199
2200 * (**xintexpr**) `\xintiiexpr` is a variant of `\xintexpr` which is
2201 optimized to deal only with (long) integers, `/` does a euclidean
2202 quotient.
2203
2204 * *deprecated*: `\xintnumexpr`, `\xintthenumexpr`, `\xintNewNumExpr` are
2205 renamed, respectively, `\xintiexpr`, `\xinttheiexpr`, `\xintNewIExpr`. The
2206 earlier denominations are kept but are to be removed at some point.
2207
2208 * it is now possible within `\xintexpr...\relax` and its variants to
2209 use count, dimen, and skip registers or variables without
2210 explicit `\the/\number`: the parser inserts automatically
2211 `\number` and a tacit multiplication is implied when a register
2212 or variable immediately follows a number or fraction. Regarding
2213 dimensions and `\number`, see the further discussion in
2214 *Dimensions*.
2215
2216 * (**xintfrac**) conditional `\xintifOne`; `\xintifTrueFalse`
2217 renamed to `\xintifTrueAelseB`; macros `\xintTFrac`
2218 (`fractional part`, mapped to function `frac` in
2219 `\xintexpr`-essions), `\xintFloatE`.
2220
2221 * (**xinttools**) `\xintAssign` admits an optional argument to
2222 specify the expansion type to be used: `[]` (none, default), `[o]`
2223 (once), `[oo]` (twice), `[f]` (full), `[e]` (`\edef`),... to define
2224 the macros
2225
2226 * **xinttools** defines `\odef`, `\oodef`, `\fdef` (if the names have
2227 already been assigned, it uses `\xintoodef` etc...). These tools are
2228 provided for the case one uses the package macros in a non-expandable
2229 context. `\oodef` expands twice the macro replacement text, and `\fdef`
2230 applies full expansion. They are useful in situations where one does not
2231 want a full `\edef`. `\fdef` appears to be faster than `\oodef` in almost
2232 all cases (with less than thousand digits in the result), and even faster
2233 than `\edef` for expanding the package macros when the result has a few
2234 dozens of digits. `\oodef` needs that expansion ends up in thousands of
2235 digits to become competitive with the other two.
2236
2237 * some across the board slight efficiency improvement as a result of
2238 modifications of various types to *fork macros* and *branching
2239 conditionals* which are used internally.
2240
2241 * bug fix (**xint**): `\xintAND` and `\xintOR` inserted a space token
2242 in some cases and did not expand as promised in two steps `:-((`
2243 (bug dating back to `1.09a` I think; this bug was without
2244 consequences when using `&` and `|` in `\xintexpr-essions`, it
2245 affected only the macro form).
2246
2247 * bug fix (**xintcfrac**): `\xintFtoCCv` still ended fractions with
2248 the `[0]`'s which were supposed to have been removed since release
2249 `1.09b`.
2250
2251 * *deprecated*: `\xintifTrueFalse`, `\xintifTrue`; use `\xintifTrueAelseB`.
2252
2253
2254 `1.09h (2013/11/28)`
2255 ----
2256
2257 * parts of the documentation have been re-written or re-organized,
2258 particularly the discussion of expansion issues and of input and
2259 output formats.
2260
2261 * the expansion types of macro arguments are documented in the margin
2262 of the macro descriptions, with conventions mainly taken over
2263 from those in the `LaTeX3` documentation.
2264
2265 * a dependency of **xinttools** on **xint** (inside `\xintSeq`) has
2266 been removed.
2267
2268 * (**xintgcd**) `\xintTypesetEuclideAlgorithm` and
2269 `\xintTypesetBezoutAlgorithm` have been slightly modified
2270 (regarding indentation).
2271
2272 * (**xint**) macros `xintiSum` and `xintiPrd` are renamed to
2273 `\xintiiSum` and `\xintiiPrd`.
2274
2275 * (**xinttools**) a count register used in `1.09g` in the `\xintFor`
2276 loops for parsing purposes has been removed and replaced by use of
2277 a `\numexpr`.
2278
2279 * the few uses of `\loop` have been replaced by `\xintloop/\xintiloop`.
2280
2281 * all macros of **xinttools** for which it makes sense are now declared
2282 `\long`.
2283
2284
2285 `1.09g (2013/11/22)`
2286 ----
2287
2288 * a package **xinttools** is detached from **xint**, to make tools such
2289 as `\xintFor`, `\xintApplyUnbraced`, and `\xintiloop` available
2290 without the **xint** overhead.
2291
2292 * expandable nestable loops `\xintloop` and `\xintiloop`.
2293
2294 * bugfix: `\xintFor` and `\xintFor*` do not modify anymore the value of
2295 `\count 255`.
2296
2297
2298 `1.09f (2013/11/04)`
2299 ----
2300
2301 * (**xint**) `\xintZapFirstSpaces`, `\xintZapLastSpaces`,
2302 `\xintZapSpaces`, `\xintZapSpacesB`, for expandably stripping away
2303 leading and/or ending spaces.
2304
2305 * `\xintCSVtoList` by default uses `\xintZapSpacesB` to strip away
2306 spaces around commas (or at the start and end of the comma
2307 separated list).
2308
2309 * also the `\xintFor` loop will strip out all spaces around commas and
2310 at the start and the end of its list argument; and similarly for
2311 `\xintForpair`, `\xintForthree`, `\xintForfour`.
2312
2313 * `\xintFor` *et al.* accept all macro parameters from `#1` to
2314 `#9`.
2315
2316 * for reasons of inner coherence some macros previously with one extra
2317 `i` in their names (e.g. `\xintiMON`) now have a doubled
2318 `ii` (`\xintiiMON`) to indicate that they skip the overhead of
2319 parsing their inputs via `\xintNum`. Macros with a *single*
2320 `i` such as `\xintiAdd` are those which maintain the
2321 non-**xintfrac** output format for big integers, but do parse
2322 their inputs via `\xintNum` (since release `1.09a`). They too may
2323 have doubled-`i` variants for matters of programming optimization
2324 when working only with (big) integers and not fractions or
2325 decimal numbers.
2326
2327
2328 `1.09e (2013/10/29)`
2329 ----
2330
2331 * (**xint**) `\xintintegers`, `\xintdimensions`, `\xintrationals`
2332 for infinite `\xintFor` loops, interrupted with `\xintBreakFor` and
2333 `\xintBreakForAndDo`.
2334
2335 * `\xintifForFirst`, `\xintifForLast` for the `\xintFor` and
2336 `\xintFor*` loops,
2337
2338 * the `\xintFor` and `xintFor*` loops are now `\long`, the
2339 replacement text and the items may contain explicit `\par`'s.
2340
2341 * conditionals `\xintifCmp`, `\xintifInt`, `\xintifOdd`.
2342
2343 * bug fix (**xint**): the `\xintFor` loop (not `\xintFor*`) did
2344 not correctly detect an empty list.
2345
2346 * bug fix (**xint**): `\xintiSqrt {0}` crashed. `:-((`
2347
2348 * the documentation has been enriched with various additional examples,
2349 such as the *the quick sort algorithm
2350 illustrated* or the various ways of *computing prime numbers*.
2351
2352 * the documentation explains with more details various expansion
2353 related issues, particularly in relation to conditionals.
2354
2355
2356 `1.09d (2013/10/22)`
2357 ----
2358
2359 * bug fix (**xint**): `\xintFor*` is modified to gracefully
2360 handle a space token (or more than one) located at the very end of
2361 its list argument (as the space before `\do` in `\xintFor* #1 in
2362 {{a}{b}{c}<space>} \do {stuff}`; spaces at other locations were
2363 already harmless). Furthermore this new version _f-expands_ the
2364 un-braced list items. After `\def\x{{1}{2}}` and `\def\y{{a}\x
2365 {b}{c}\x }`, `\y` will appear to `\xintFor*` exactly as if it had
2366 been defined as `\def\y{{a}{1}{2}{b}{c}{1}{2}}`.
2367
2368 * same bug fix for `\xintApplyInline`.
2369
2370
2371 `1.09c (2013/10/09)`
2372 ----
2373
2374 * (**xintexpr**) added `bool` and `togl` to the `\xintexpr` syntax;
2375 also added `\xintboolexpr` and `\xintifboolexpr`.
2376
2377 * added `\xintNewNumExpr`.
2378
2379 * the factorial `!` and branching `?`, `:`, operators (in
2380 `\xintexpr...\relax`) have now less precedence than a function
2381 name located just before,
2382
2383 * (**xint**) `\xintFor` is a new type of loop, whose replacement text
2384 inserts the comma separated values or list items via macro
2385 parameters, rather than encapsulated in macros; the loops are
2386 nestable up to four levels (nine levels since `1.09f`) and their
2387 replacement texts are allowed to close groups as happens with the
2388 tabulation in alignments,
2389
2390 * `\xintForpair`, `\xintForthree`, `\xintForfour` are experimental
2391 variants of `\xintFor`,
2392
2393 * `\xintApplyInline` has been enhanced in order to be usable for
2394 generating rows (partially or completely) in an alignment,
2395
2396 * command `\xintSeq` to generate (expandably) arithmetic sequences
2397 of (short) integers,
2398
2399 * again various improvements and changes in the documentation.
2400
2401
2402 `1.09b (2013/10/03)`
2403 ----
2404
2405 * various improvements in the documentation,
2406
2407 * more economical catcode management and re-loading handling,
2408
2409 * removal of all those `[0]`'s previously forcefully added at the end
2410 of fractions by various macros of **xintcfrac**,
2411
2412 * `\xintNthElt` with a negative index returns from the tail of the
2413 list,
2414
2415 * macro `\xintPRaw` to have something like what `\xintFrac` does in
2416 math mode; i.e. a `\xintRaw` which does not print the denominator
2417 if it is one.
2418
2419
2420 `1.09a (2013/09/24)`
2421 ----
2422
2423 * (**xintexpr**) `\xintexpr..\relax` and `\xintfloatexpr..\relax`
2424 admit functions in their syntax, with comma separated values as
2425 arguments, among them `reduce, sqr, sqrt, abs, sgn, floor, ceil,
2426 quo, rem, round, trunc, float, gcd, lcm, max, min, sum, prd, add,
2427 mul, not, all, any, xor`.
2428
2429 * comparison (`<`, `>`, `=`) and logical (`|`, `&`) operators.
2430
2431 * the command `\xintthe` which converts `\xintexpr`essions into
2432 printable format (like `\the` with `\numexpr`) is more efficient,
2433 for example one can do `\xintthe\x` if `\x` was defined to be an
2434 `\xintexpr..\relax`:
2435
2436 \def\x{\xintexpr 3^57\relax}
2437 \def\y{\xintexpr \x^(-2)\relax}
2438 \def\z{\xintexpr \y-3^-114\relax}
2439 \xintthe\z
2440
2441 * `\xintnumexpr .. \relax` (now renamed `\xintiexpr`) is `\xintexpr
2442 round( .. ) \relax`.
2443
2444 * `\xintNewExpr` now works with the standard macro parameter character
2445 `#`.
2446
2447 * both regular `\xintexpr`-essions and commands defined by
2448 `\xintNewExpr` will work with comma separated lists of
2449 expressions,
2450
2451 * commands `\xintFloor`, `\xintCeil`, `\xintMaxof`, `\xintMinof`
2452 (package **xintfrac**), `\xintGCDof`, `\xintLCM`, `\xintLCMof`
2453 (package **xintgcd**), `\xintifLt`, `\xintifGt`, `\xintifSgn`,
2454 `\xintANDof`, ...
2455
2456 * The arithmetic macros from package **xint** now filter their operands
2457 via `\xintNum` which means that they may use directly count
2458 registers and `\numexpr`-essions without having to prefix them by
2459 `\the`. This is thus similar to the situation holding previously
2460 already when **xintfrac** was loaded.
2461
2462 * a bug (**xintfrac**) introduced in `1.08b` made `\xintCmp` crash
2463 when one of its arguments was zero. `:-((`
2464
2465
2466 `1.08b (2013/06/14)`
2467 ----
2468
2469 * (**xintexpr**) Correction of a problem with spaces inside
2470 `\xintexpr`-essions.
2471
2472 * (**xintfrac**) Additional improvements to the handling of floating
2473 point numbers.
2474
2475 * section *Use of count registers* documenting how count
2476 registers may be directly used in arguments to the macros of
2477 **xintfrac**.
2478
2479
2480 `1.08a (2013/06/11)`
2481 ----
2482
2483 * (**xintfrac**) Improved efficiency of the basic conversion from
2484 exact fractions to floating point numbers, with ensuing speed gains
2485 especially for the power function macros `\xintFloatPow` and
2486 `\xintFloatPower`,
2487
2488 * Better management by `\xintCmp`, `\xintMax`, `\xintMin` and
2489 `\xintGeq` of inputs having big powers of ten in them.
2490
2491 * Macros for floating point numbers added to the **xintseries**
2492 package.
2493
2494
2495 `1.08 (2013/06/07)`
2496 ----
2497
2498 * (**xint** and **xintfrac**) Macros for extraction of square roots,
2499 for floating point numbers (`\xintFloatSqrt`), and integers
2500 (`\xintiSqrt`).
2501
2502 * new package **xintbinhex** providing *conversion routines* to and from
2503 binary and hexadecimal bases.
2504
2505
2506 `1.07 (2013/05/25)`
2507 ----
2508
2509 * The **xintexpr** package is a new core constituent (which loads
2510 automatically **xintfrac** and **xint**) and implements the
2511 expandable expanding parser
2512
2513 \xintexpr . . . \relax,
2514
2515 and its variant
2516
2517 \xintfloatexpr . . . \relax
2518
2519 allowing on input formulas using the infix operators `+`, `-`, `*`,
2520 `/`, and `^`, and arbitrary levels of parenthesizing. Within a
2521 float expression the operations are executed according to the
2522 current value set by `\xintDigits`. Within an `\xintexpr`-ession the
2523 binary operators are computed exactly.
2524
2525 To write the `\xintexpr` parser I benefited from the commented
2526 source of the `l3fp` parser; the `\xintexpr` parser has its own
2527 features and peculiarities. *See its documentation*.
2528
2529 * The floating point precision `D` is set (this is a local assignment
2530 to a `\mathchar` variable) with `\xintDigits := D;` and queried
2531 with `\xinttheDigits`. It may be set to anything up to
2532 `32767`.[^1] The macro incarnations of the binary operations
2533 admit an optional argument which will replace pointwise `D`; this
2534 argument may exceed the `32767` bound.
2535
2536 * The **xintfrac** macros now accept numbers written in scientific
2537 notation, the `\xintFloat` command serves to output its argument
2538 with a given number `D` of significant figures. The value of `D`
2539 is either given as optional argument to `\xintFloat` or set with
2540 `\xintDigits := D;`. The default value is `16`.
2541
2542 [^1]: but values higher than 100 or 200 will presumably give too slow
2543 evaluations.
2544
2545
2546 `1.06b (2013/05/14)`
2547 ----
2548
2549 * Minor code and documentation improvements. Everywhere in the source
2550 code, a more modern underscore has replaced the @ sign.
2551
2552
2553 `1.06 (2013/05/07)`
2554 ----
2555
2556 * Some code improvements, particularly for macros of **xint** doing loops.
2557
2558 * New utilities in **xint** for expandable manipulations of lists:
2559
2560 \xintNthElt, \xintCSVtoList, \xintRevWithBraces
2561
2562 * The macros did only a double expansion of their arguments. They now
2563 fully expand them (using ``\romannumeral-`0``). Furthermore, in the
2564 case of arguments constrained to obey the TeX bounds they will be
2565 inserted inside a `\numexpr..\relax`, hence completely expanded, one
2566 may use count registers, even infix arithmetic operations, etc...
2567
2568
2569 `1.05 (2013/05/01)`
2570 ----
2571
2572 Minor changes and additions to **xintfrac** and **xintcfrac**.
2573
2574
2575 `1.04 (2013/04/25)`
2576 ----
2577
2578 * New component **xintcfrac** devoted to continued fractions.
2579
2580 * **xint**: faster division.
2581
2582 * **xint**: added expandable macros `\xintListWithSep` and `\xintApply` to
2583 handle token lists.
2584
2585 * **xintfrac**: added `\xintRound`.
2586
2587 * **xintseries** has a new implementation of `\xintPowerSeries` based
2588 on a Horner scheme, and new macro `\xintRationalSeries`. Both to
2589 help deal with the *denominator buildup* plague.
2590
2591 * `tex xint.dtx` extracts style files (no need for a `xint.ins`).
2592
2593 * Bug fix (**xintfrac**): `\xintIrr {0}` crashed.
2594
2595
2596 `1.03 (2013/04/14)`
2597 ----
2598
2599 * New modules **xintfrac** (expandable operations on fractions) and
2600 **xintseries** (expandable partial sums with xint package).
2601
2602 * Slightly improved division and faster multiplication (the best
2603 ordering of the arguments is chosen automatically).
2604
2605 * Added illustration of Machin algorithm to the documentation.
2606
2607
2608 `1.0 (2013/03/28)`
2609 ----
2610
2611 Initial announcement:
2612
2613 > The **xint** package implements with expandable TeX macros the basic
2614 arithmetic operations of addition, subtraction, multiplication
2615 and division, as applied to arbitrarily long numbers represented
2616 as chains of digits with an optional minus sign.
2617
2618 > The **xintgcd** package provides implementations of the Euclidean
2619 algorithm and of its typesetting.
2620
2621 > The packages may be used with Plain and with LaTeX.
2622