File tree 1 file changed +15
-8
lines changed 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -18,26 +18,27 @@ Arithmetic expressions are evaluated following standard rules for operator prece
18
18
to override:
19
19
20
20
()
21
+ ∩ (set intersection)
22
+ ∪ (set union)
21
23
-
22
24
**
23
25
* / × ÷ mod
24
26
+ -
25
27
< > <= >= == != ≠ ≤ ≥
26
- between-and within-and "in range from"-to (ternary) (between is exclusive, within is inclusive, and `in range from` is
27
- inclusive lower-bound and exclusive upper-bound)
28
+ in ∈ ∉
28
29
not
29
30
and ∧
30
31
or ∨
31
32
? : (ternary)
32
33
33
34
Functions can be called:
34
35
35
- sin sinh abs log2 rnd
36
- cos cosh round log10 randint
37
- tan tanh trunc gcd min
38
- asin rad ceil lcm max
39
- acos deg floor gamma
40
- atan sgn ln hypot
36
+ sgn min asin rad lcm
37
+ abs max acos deg gamma
38
+ round str atan ln hypot
39
+ trunc sin sinh log2 nhypot
40
+ ceil cos cosh log10 rnd
41
+ floor tan tanh gcd
41
42
42
43
43
44
The Basic ArithmeticParser also supports assignment of variables:
@@ -51,3 +52,9 @@ This last expression could be assigned using '@=' formula assignment:
51
52
52
53
As ` r ` is updated, evaluating ` area ` will be reevaluated using the new value.
53
54
55
+
56
+ Custom expressions can be defined using a simple API. Example parsers
57
+ are included for dice rolling, combination/permutation expressions, and
58
+ common business calculations. These parsers can be incorporated into
59
+ other applications to support the safe evaluation of user-defined
60
+ domain-specific expressions.
You can’t perform that action at this time.
0 commit comments