Commit f0e43bb dengsgo
committed
1 parent 706c062 commit f0e43bb Copy full SHA for f0e43bb
File tree 1 file changed +12
-14
lines changed
1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -3,23 +3,21 @@ math-engine
3
3
4
4
--------
5
5
6
- 数学表达式计算引擎
6
+ 数学表达式解析计算引擎库
7
7
8
- 使用 Go 实现的数学表达式解析计算引擎, 无任何依赖,相对比较完整的完成了数学表达式解析执行 ,包括词法分析、语法分析、构建AST、运行。
8
+ 使用 Go 实现的数学表达式解析计算引擎库,它小巧, 无任何依赖,具有扩展性(比如可以注册自己的函数到引擎中),比较完整的完成了数学表达式解析执行 ,包括词法分析、语法分析、构建AST、运行。
9
9
10
- 能够处理的表达式样例:
11
-
12
- 1+127-21+(3-4)*6/2.5
13
-
14
- (88+(1+8)*6)/2+99
15
-
16
- 123_345_456 * 1.5 - 2 ^ 4
10
+ `go get -u github.com/dengsgo/math-engine`
17
11
18
- -4 * 6 + 2e2 - 1.6e-3
19
-
20
- sin(pi/2)+cos(45-45*1)+tan(pi/4)
21
-
22
- 99+abs(-1)-ceil(88.8)+floor(88.8)
12
+ 能够处理的表达式样例:
13
+ - `1+127-21+(3-4)*6/2.5`
14
+ - `(88+(1+8)*6)/2+99`
15
+ - `123_345_456 * 1.5 - 2 ^ 4`
16
+ - `-4 * 6 + 2e2 - 1.6e-3`
17
+ - `sin(pi/2)+cos(45-45*1)+tan(pi/4)`
18
+ - `99+abs(-1)-ceil(88.8)+floor(88.8)`
19
+ - `max(min(2^3, 3^2), 10*1.5-7)`
20
+ - `double(6) + 3` , `double`是一个自定义的函数
23
21
24
22
*/
25
23
package engine
You can’t perform that action at this time.
0 commit comments