~starkingdoms/starkingdoms

ref: 2e1aa7be2e2829b9f15f99bbc851cf1768026f5a starkingdoms/crates/kabel/test/runtime/arithmetic_run.kab -rw-r--r-- 240 bytes
2e1aa7be — core feat: solver optimization (pro tip: do not do io in the hot path) 20 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
print 2+2; // 4
print 2+2*3; // 8
print 2 - 2; // 0
print 2.1+2.3*3; // 9
print 2 / 4; // 0.5
print 5 % 4; // 1
print 2 / -4; // -0.5
print 5 * 4 / 2; // 10
print 4 * 5 / 2; // 10

print 3 & 8 + 4; // 0
print 4 ^ 7; // 3
print 8 | 2; // 10