CTAN Comprehensive TeX Archive Network

New on CTAN: bnumexpr

Datum: 22. September 2014 20:46:28 MESZ
Jean-François Burnol submitted the bnumexpr package. Version number: 1.1 License type: lppl1.3 Summary description: Extends eTeX’s \numexpr...\relax construct to big integers. 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 http://mirror.ctan.org/macros/latex/contrib/bnumexpr More information is at http://www.ctan.org/pkg/bnumexpr 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 Manfred Lotz

bnumexpr – Extends ’s \numexpr...\relax construct to big integers

The package provides the command \bnumeval, which extends 's \inteval with support for arbitrarily big integers, // for floored division, /: for the associated remainder, ^ and ** for powers, ! for factorials, 0b, 0o and ', 0x and ", as prefixes for binary, octal, or hexadecimal inputs. With the optional argument [h] (or [o] or [b]) the output is converted to hexadecimal (or octal, or binary).

Paketbnumexpr
Version1.7a 2025-09-14
Copyright2014–2025 Jean-François Burnol
BetreuerJean-François Burnol

Ankündigungen

mehr

Gästebuch Seiten-Struktur Impressum Autor kontaktieren