File: bnumexpr.cwl

package info (click to toggle)
texstudio 4.9.1%2Bds-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 110,128 kB
  • sloc: cpp: 111,264; xml: 18,668; ansic: 8,977; python: 357; javascript: 177; sh: 147; makefile: 52
file content (60 lines) | stat: -rw-r--r-- 1,072 bytes parent folder | download
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
# bnumexpr package
# Matthew Bertucci 2025/09/14 for v1.7

#include:xintkernel
#include:xintbinhex
#include:xintcore

#keyvals:\usepackage/bnumexpr#c
custom
customcore
custombinhex
#endkeyvals

\thebnumexpr %<<expr>%> \relax
\thebnumexpr#S
\bnethe \bnumexpr %<<expr>%> \relax
\bnumexpr %<<expr>%> \relax#*
\bnumexpr#S
\bnumeval{integer-expr list}
\bnumeval[type%keyvals]{integer-expr list}
#keyvals:\bnumeval
b
o
h
ha
#endkeyvals

\bnumsetup{options%keyvals}

#keyvals:\bnumsetup
add=%<macro%>
sub=%<macro%>
mul=%<macro%>
divround=%<macro%>
div=%<macro%>
mod=%<macro%>
pow=%<macro%>
fac=%<macro%>
opp=%<macro%>
hextodec=%<macro%>
octtodec=%<macro%>
bintodec=%<macro%>
dectohex=%<macro%>
dectooct=%<macro%>
dectobin=%<macro%>
#endkeyvals

\bnumprintone#*
\bnumprintonehex#*
\bnumprintonelowerhex#*
\bnumprintoneoct#*
\bnumprintonebin#*
\bnumprintonesep#*

\bnumdefinfix{operator}{macro}{L-prec}{R-prec}#*
\bnumdefpostfix{operator}{macro}{L-prec}#*

\BNErestorecatcodesendinput#S
\bnumexpro#S
\bnebareeval{expr}#S