Source: bnumexpr.dtx
Version: v1.1b, 2014/10/28 (doc: 2014/11/04)
Author: Jean-Francois Burnol
Info: Expressions with big integers
License: LPPL 1.3c or later



README: USAGE, INSTALLATION, LICENSE


Usage

    \usepackage{bnumexpr}

Then

    \thebnumexpr <expression with +,-,*,/,(,)> \relax

is like

    \the\numexpr <expression with +,-,*,/,(,)> \relax

with the difference of accepting or producing arbitrarily big integers.
For example,

    \thebnumexpr 2*1234567890\relax

outputs 2469135780 which would have created an arithmetic overflow in
\numexpr as it exceeds the maximal allowed TeX integer 2147483647.

\bnumexpr...\relax is a scaled down version of \xintiiexpr...\relax from
package xintexpr.[1]

-   by default, bnumexpr loads xintcore [2] for its arithmetic macros
    doing addition, subtraction, multiplication, division (and powers).

-   option _allowpower_ enables ^ as power operator, for example:

        \thebnumexpr 2^31\relax % smallest integer exceeding the TeX bound

-   option _bigintcalc_ loads package bigintcalc [3] and uses its
    arithmetic macros rather than those from xintcore.

-   option _l3bigint_ loads package l3bigint [4], from the experimental
    trunk of the on-going LaTeX3 project.

-   with option _custom_, no extra package is loaded and it is up to the
    user to define suitably expandable macros \bnumexprAdd,
    \bnumexprSub, \bnumexprMul, and \bnumexprDiv doing the basic
    arithmetic operations.


Installation

Obtain bnumexpr.dtx (and possibly, bnumexpr.ins and the README) from
CTAN:

  http://www.ctan.org/pkg/bnumexpr

Both "tex bnumexpr.ins" and "tex bnumexpr.dtx" extract from bnumexpr.dtx
the following files:

bnumexpr.sty
    this is the style file.

bnumexprReadme.md
    reconstitutes this README.

bnumexpr.changes
    lists changes from the initial version.

bnumexpr.tex

    can be used to generate the documentation:

    -   with latex+dvipdfmx: "latex bnumexpr.tex" (thrice) then
        "dvipdfmx bnumexpr.dvi".

        Ignore dvipdfmx warnings, but if the pdf file has problems with
        fonts (possibly from an old dvipdfmx), use then rather pdflatex.

    -   with pdflatex: "pdflatex bnumexpr.tex" (thrice).

    In both cases files bnumexprReadme.md and bnumexpr.changes must be
    present in the same repertory.

without bnumexpr.tex:
    "pdflatex bnumexpr.dtx" (thrice) extracts all files and
    simultaneously generates the pdf documentation.

Finishing the installation:

           bnumexpr.sty   --> TDS:tex/latex/bnumexpr/

           bnumexpr.dtx   --> TDS:source/latex/bnumexpr/
           bnumexpr.ins   --> TDS:source/latex/bnumexpr/

           bnumexpr.pdf   --> TDS:doc/latex/bnumexpr/
                 README   --> TDS:doc/latex/bnumexpr/

Files bnumexpr.tex, bnumexpr.changes, bnumexprReadme.md may be
discarded.


License

Copyright (C) 2014 by Jean-Francois Burnol

This Work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
version 1.3c of this license or (at your option) any later
version. This version of this license is in

  http://www.latex-project.org/lppl/lppl-1-3c.txt

and the latest version of this license is in

  http://www.latex-project.org/lppl.txt

and version 1.3 or later is part of all distributions of
LaTeX version 2005/12/01 or later.

This Work has the LPPL maintenance status "maintained".

The Current Maintainer of this Work is Jean-Francois Burnol.

This Work consists of the main source file bnumexpr.dtx and the derived
files

    bnumexpr.sty, bnumexpr.pdf, bnumexpr.ins, bnumexpr.tex,
    bnumexpr.changes, bnumexprReadme.md

[1] http://www.ctan.org/pkg/xint

[2] http://www.ctan.org/pkg/xint

[3] http://www.ctan.org/pkg/bigintcalc

[4] http://latex-project.org/svnroot/experimental/trunk/l3trial/l3bigint,
or from https://github.com/latex3/svn-mirror.

