(as this example shows the underscore character can be used to separate visually digits, one can also use the space character for that purpose).

Currently, only integer and half-integer exponents are allowed for the power operation in expressions and only the square-root operation is implemented besides the four arithmetic operations. Square-root and the four operations achieve correct rounding in the given arbitrary precision.

Usage

It is possible to use the package with Plain (using for example \input xintexpr.sty) or with LaTeX (\usepackage{xintexpr}).

Package xintcore is the subset of xint providing only the five operations on big integers: \xintiiAdd, \xintiiMul, …

The LaTeX package bnumexpr defines a more light-weight parser of arithmetical expressions using big integers, which supports only the four operations, the modulo operation, the power operation, and the factorial. By default it uses the macros from xintcore but this can be customized.

With TeX

One does for example:

\input xintexpr.sty

The packages may be loaded in any catcode context such that letters, digits, \ and % have their standard catcodes.

xintcore.sty and xinttools.sty both import xintkernel.sty which has the catcode handler and package identifier and defines a few utilities such as \oodef/\fdef, \xint_dothis/\xint_orthat, or \xintLength.

Since 1.3b, xintkernel.sty also provides \xintUniformDeviate which is a wrapper of the engine \pdfuniformdeviate or \uniformdeviate done to guarantee more uniformity of the pseudo-random integers. This is used by xintexpr.sty for implementing random() and randrange() functions.

Mac OS X, installation into user home folder (no sudo needed, and it is recommended to not have a ls-R file there, hence no texhash):

unzip xint.tds.zip -d ~/Library/texmf

Method C: manual installation using Makefile and xint.dtx

The Makefile automatizes rebuilding from xint.dtx all documentation files as well as xint.tds.zip. It is for GNU/Linux-like (inc. Mac OS X) systems, with a teTeX like installation such as TeXLive. The Latexmk and Pandoc softwares are required to build all the documentation.

put them in an otherwise empty working repertory, run make or equivalently make help for further instructions.

Method D: installation starting with only xint.dtx

Run etex xint.dtx to extract from xint.dtx all macro files as well as auxiliary files needed for building the documentation. Among them there is Makefile.mk. If you are on a GNU/Linux-type system, rename the file to Makefile and execute make on command line for further help. If not, you will need to examine the contents of this file to see the commands needed to produce the documentation with latexmk (extraction will have created a configuration file .latexmkrc) and pandoc. If not using latexmk, you will need to execute suitable makeindex -s xint-gind.ist calls to produce the indices of macros for inclusion into sourcexint.pdf. It is also possible to get xint.pdf to include the source code. For this, see the instructions in xint.tex.