CTAN Update: xint
1.09j 2014/01/09 * The core division routines have been re-written for some (limited) efficiency gain, more pronounced for small divisors. As a consequence, the computation with the algorithm given in the user manual of one thousand digits of Pi is three times faster. Some other small improvements elsewhere. * A new macro \xintXTrunc is designed to produce thousands or even tens of thousands of digits of the decimal expansion of a fraction. Although completely expandable it has its use limited to inside an |\edef|, |\write|, |\message|, \dots. It can thus not be nested as argument to another package macro. * \xintexpr..\relax can now be used inside an \edef without the \xintthe prefix converting the internal format into explicit digit tokens; it will expand completely and inhibit the error message about a missing \xintthe. This can significantly speed up the use of \xintexpr in a non-expandable contexts, when dealing with numbers having hundreds of digits. Notice that contrarily to \numexpr for which \the or \number is necessary not only to print but also to trigger the computation, \xintthe is only needed for the printing step (previously \xintexpr was already fully expandable under \romannumeral-`0). * bug-fix: |1.09i| did an unexplainable change to \XINT_infloat_zero which broke the floating point routines for vanishing operands :-(( The first two pages of the user manual give a much clearer view of the aims and abilities of the package. The manual has more of these tremendous applications my (singleton) user base enjoy so much!
This package is located at http://mirror.ctan.org/macros/generic/xint/ More information is at http://www.ctan.org/pkg/xint We are supported by the TeX Users Group http://www.tug.org . Please join a users group; see http://www.tug.org/usergroups.html .
Thanks for the upload. For the CTAN Team Petra Rübe-Pugliese
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 |