CTAN update: xint
Maintenance release. - The underscore character _ is accepted by the xintexpr parsers as a digit separator. Example: \xinttheiiexpr 123_456_789 * 1111_2222_3333 \relax It is not allowed as _first_ character of a number, as it would then be mis-interpreted as the start of a possible variable name. Only expressions handle it (the space character can also separate digits there), not macros. The LaTeX package bnumexpr will also accept the underscore as digit separator in its upcoming release. - Some refactoring in xintcore for some small efficiency gains. - Some macros were not robust against arguments whose expansion looks forward for some termination (e.g. \number\mathcode`\-), and many more were broken if the inputs used a non-terminated \numexpr, e.g. \xintAdd{\the\numexpr1}{2}. The user manual never said this was legal input, but it was slightly inconvenient. Most macros have now been made robust against such non properly terminated inputs. In expressions though, a \numexpr swallowing the ending \relax is definitely still to be avoided, as the parser absolutely needs to hit against such a token at some point. - A few minor bugfixes, see CHANGES.pdf or CHANGES.html for the details.
This package is located at http://mirror.ctan.org/macros/generic/xint More information is at http://www.ctan.org/pkg/xint
Thanks for the upload. For the CTAN Team Manfred Lotz We are supported by the TeX user groups. Please join a users group; see http://www.tug.org/usergroups.html .
xint – Expandable arbitrary precision floating point and integer operations
Loading xintexpr provides \xinteval and \xintfloateval.
\xintfloateval evaluates numerical expressions. The floating point precision defaults to 16 decimal digits and can be set by user. Trigonometry, exponential and logarithms are implemented up to a maximal precision of 62 decimal digits.
\xinteval computes exactly with integers, fractions, and decimal numbers or numbers in scientific notation. Note though that multiplying two floating point numbers will about double the number of digits, and so on, because the algebra is done exactly.
Both are compatible with expansion-only context.
Loading xintexpr imports automatically various other modules that it depends upon. Among them:
- xinttools: utilities such as expandable and non-expandable loops,
- xint: macros implementing in particular the basic operations on arbitrarily long integers,
- xintbinhex: conversions between decimal and binary, octal, or hexadecimal bases for arbitrarily long integers,
- xintfrac: macros implementing in particular the basic operations on arbitrarily large fractions, decimal numbers, or numbers in scientific notation.
Further modules of independent interest include xintgcd, xintseries and xintcfrac.
You can use xintexpr (and the other components) with LaTeX (via \usepackage) or also with Plain TeX, OpTeX, or ConTeXt (via \input xintexpr.sty).
All the components are documented in the file xint.pdf, which also contains the commented source code.
Paket | xint |
Version | 1.4o 2025-09-06 |
Copyright | 2013–2022, 2025 Jean-François Burnol |
Betreuer | Jean-François Burnol |