Updated parser syntax docs
This commit is contained in:
parent
2dc09149b7
commit
6e0633637f
@ -17,13 +17,26 @@ parser.evaluate({"a": [1, 1, 1], "b": [-5, -6, -9], "c": [6, 9, 20]}) # [2. 3. 4
|
|||||||
```
|
```
|
||||||
## Expression syntax
|
## Expression syntax
|
||||||
|
|
||||||
Expression can contain numbers or variable names with functions applyed to them, separated with operators or united with braces.
|
Expression can contain numbers or variable names with functions applied to them, separated with operators or united with braces. Numbers do not support `*`-less multiplication with spaces. Variables must be separated by space.
|
||||||
|
|
||||||
|
Here are examples with `_` as space
|
||||||
|
|
||||||
|
| Wrong | Right |
|
||||||
|
|--|--|
|
||||||
|
| `2_a` | `2a` or `2*a` |
|
||||||
|
| `a_2` | `a*2` |
|
||||||
|
| `a_2_a` | `a*2*a` |
|
||||||
|
| `2_cos(a)` | `2cos(a)` or `2*cos(a)` |
|
||||||
|
| `cos(a)_2` | `cos(a)*2` |
|
||||||
|
| `aa` | `a*a` or `a_a` |
|
||||||
|
| - | `cos(a)cos(a)` or `cos(a)_cos(a)` or `cos(a)*cos(a)` |
|
||||||
|
|
||||||
|
|
||||||
Theese are supported:
|
Theese are supported:
|
||||||
|
|
||||||
Functions:
|
Functions:
|
||||||
|
|
||||||
|name| math |
|
| name | math |
|
||||||
|--|--|
|
|--|--|
|
||||||
| `abs` | $\|x\|$ |
|
| `abs` | $\|x\|$ |
|
||||||
| `acos` | $\cos^{-1}(x)$ |
|
| `acos` | $\cos^{-1}(x)$ |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user