2017-08-24 03:38:40 +00:00
|
|
|
logmsg Validate basic expressions
|
2016-05-03 03:53:48 +00:00
|
|
|
math 3 / 2
|
|
|
|
math 10/6
|
|
|
|
math -s0 10 / 6
|
|
|
|
math -s3 10/6
|
|
|
|
math '10 % 6'
|
|
|
|
math -s0 '10 % 6'
|
|
|
|
math '23 % 7'
|
2017-07-14 23:03:31 +00:00
|
|
|
math --scale=6 '5 / 3 * 0.3'
|
2017-08-24 00:32:49 +00:00
|
|
|
math "7^2"
|
2017-07-14 23:03:31 +00:00
|
|
|
math -1 + 1
|
|
|
|
math '-2 * -2'
|
|
|
|
math 5 \* -2
|
|
|
|
math -- -4 / 2
|
|
|
|
math -- '-4 * 2'
|
2017-08-24 03:38:40 +00:00
|
|
|
|
2017-12-17 20:31:39 +00:00
|
|
|
logmsg Validate how variables in an expression are handled
|
|
|
|
math $x + 1
|
2017-08-24 03:38:40 +00:00
|
|
|
set x 1
|
2017-12-17 20:31:39 +00:00
|
|
|
math $x + 1
|
2017-08-24 03:38:40 +00:00
|
|
|
set x 3
|
|
|
|
set y 1.5
|
2017-12-17 20:31:39 +00:00
|
|
|
math "-$x * $y"
|
|
|
|
math -s1 "-$x * $y"
|
2017-11-25 07:04:44 +00:00
|
|
|
|
|
|
|
logmsg Validate math error reporting
|
2018-02-26 10:25:35 +00:00
|
|
|
not math '2 - '
|
|
|
|
not math 'ncr(1)'
|
2017-11-25 07:04:44 +00:00
|
|
|
not math 'max()'
|
2018-02-26 10:25:35 +00:00
|
|
|
not math 'sin()'
|
2018-02-26 13:00:29 +00:00
|
|
|
not math '2 + 2 4'
|
2018-03-01 21:27:24 +00:00
|
|
|
not math
|
|
|
|
not math -s 12
|
2018-03-07 17:13:26 +00:00
|
|
|
not math 2^650
|
|
|
|
not math 1 / 0
|