File: basic_math.test

package info (click to toggle)
wcalc 2.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,284 kB
  • sloc: ansic: 8,379; sh: 2,250; objc: 1,776; lex: 852; yacc: 603; makefile: 127
file content (25 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
04+1
\assert 5
040+1
\assert 33
1,000,000
\assert 1000000
a+1+1 # should return 1000002
\assert 1000002
5.6*5.6 # should return 31.36
\assert 31.36
-340%-60
\assert -40
360%60
\assert 0
23.05
a-14.5-8.55 # should be 0, not -1E-09
\assert 0
2^3
\assert 8
2**3
\assert 8
6.6 & 0xff
\assert 6
-6.6 & 0xff
\assert 250