New on CTAN: bnumexpr

CTAN Announcements ctan-ann at
Mon Sep 22 20:46:28 CEST 2014

Jean-François Burnol submitted the



Version number: 1.1
License type: lppl1.3

Summary description: Extends eTeX’s \numexpr...\relax construct to big

Announcement text:

v1.1 of 2014/09/21

\thebnumexpr...\relax is analogous to \the\numexpr...\relax but
for arbitrarily big integers. Example:
     \thebnumexpr 30*(21-43*(512-67*(6133-812*2897)))\relax
which outputs -202785405180. 

Option allowpower furthermore enables ^ for power operations.

By default, bnumexpr uses the arithmetic macros from xint (with /
doing rounded division for compatibility with \numexpr). To reduce
overhead, perhaps at some point these could get extracted from
xint.sty/xinttools.sty and moved to a smaller core package.

Option bigintcalc tells bnumexpr to load package bigintcalc rather
than package xint (however / does then truncated division).

With option custom, neither xint nor bigintcalc are loaded and it
is up to the user to provide suitable definitions for expandable
macros \bnumexprAdd, \bnumexprSub, \bnumexprMul, \bnumexprDiv and,
in case of option allowpower, also \bnumexprPow.

The \bnumexpr parser is a scaled down version of \xintiiexpr from
xintexpr.sty (which loads the whole chain xintfrac/xint/xinttools)
Currently it is provided only as a LaTeX2e package.


This package is located at

More information is at

We are supported by the TeX Users Group .  
Please join a users group; see .


   Thanks for the upload.

     For the CTAN Team
    Manfred Lotz

More information about the Ctan-ann mailing list