Skip to content

Commit a708df1

Browse files
committed
add notes to README for set expressions and operators
1 parent ccac831 commit a708df1

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

README.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,27 @@ Arithmetic expressions are evaluated following standard rules for operator prece
1818
to override:
1919

2020
()
21+
∩ (set intersection)
22+
∪ (set union)
2123
-
2224
**
2325
* / × ÷ mod
2426
+ -
2527
< > <= >= == != ≠ ≤ ≥
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 ∈ ∉
2829
not
2930
and ∧
3031
or ∨
3132
? : (ternary)
3233

3334
Functions can be called:
3435

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
4142

4243

4344
The Basic ArithmeticParser also supports assignment of variables:
@@ -51,3 +52,9 @@ This last expression could be assigned using '@=' formula assignment:
5152

5253
As `r` is updated, evaluating `area` will be reevaluated using the new value.
5354

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.

0 commit comments

Comments
 (0)