We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66ddaae commit 5766440Copy full SHA for 5766440
engine/util_test.go
@@ -17,8 +17,8 @@ func TestParseAndExecSimple(t *testing.T) {
17
{"-(1+2)*5/3", -5},
18
{"1+(-(1+2)*5/3)", -4},
19
{"3^4", 81},
20
- {"3^4.5", 81},
21
- {"3.5^4.5", 150.0625},
+ {"3^4.5", 140.29611541307906},
+ {"3.5^4.5", 280.7412308013823},
22
{"8%2", 0},
23
{"8%3", 2},
24
{"8%3.5", 2},
@@ -60,6 +60,10 @@ func TestParseAndExecSimple(t *testing.T) {
60
{"noerr(1/(1-1))", 0},
61
{"0.1+0.2", 0.3},
62
{"0.3-0.1", 0.2},
63
+ {"10^-1", 0.1},
64
+ {"10^-2", 0.01},
65
+ {"10^-1*100", 10},
66
+ {"10%0", 0},
67
}
68
for _, e := range exprs {
69
r, _ := ParseAndExec(e.Expr)
0 commit comments