1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
Source: bnumexpr.dtx
Version: v1.2, 2015/10/13 (doc: 2015/10/13)
Author: Jean-Francois Burnol
Info: Expressions with big integers
License: LPPL 1.3c or later
README: USAGE, INSTALLATION, LICENSE
Usage
The package bnumexpr allows _expandable_ computations with big integers,
the four infix operators +, -, *, / (which does rounded division), the
power operators ^ or **, the factorial !, the truncated division //, and
its associated modulo /:.
For example:
\thebnumexpr (92874927979^5-3197927979^6)/30!\relax
outputs -4006240736596543944035189.
The \relax ending token is mandatory and will be removed as a result of
the evaluation.
The expression parser is scaled-down from \xinttheiiexpr...\relax from
package xintexpr [1], it does not handle boolean operators, conditional
branching, variables and recognizes no functions.
By default the underlying arithmetic macros are the ones provided by
package xintcore [2] (its release 1.2 is required).
[1] http://www.ctan.org/pkg/xint
[2] http://www.ctan.org/pkg/xint
bnumexpr has only one option _custom_ which says to not load xintcore,
and a command \bnumexprsetup to inform the package which macros to use
if not those from xintcore.
This is a breaking release: some options and commands from v1.1 are not
defined anymore (as \bnumexprsetup provides a new interface), and
documents which used them will need updating.
Notice that the possibility not to use the xintcore macros might be
removed in the future: perhaps a future release will maintain during
computations a private internal representation (especially taylored
either for the xintcore macros or new ones which would be included
within bnumexpr.sty itself) and the constraints this implies may render
optional use of other macros impossible.
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.
README.md
reconstitutes this README.
bnumexprchanges.tex
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 README.md and bnumexprchanges.tex 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, bnumexprchanges.tex, README.md may be discarded.
License
Copyright (C) 2014-2015 by Jean-Francois Burnol
This Work may be distributed and/or modified under the
conditions of the LaTeX Project Public License 1.3c.
This version of this license is in
http://www.latex-project.org/lppl/lppl-1-3c.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 "author-maintained".
The Author and 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,
bnumexprchanges.tex, README.md
|