-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.tzn
52 lines (45 loc) · 973 Bytes
/
test.tzn
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Test program to measure the speed of the interpreter
def i_plus = {
i = i + 1;
}
// Initialize variables
num sum = 0;
num count = 1000;
// Perform a large number of arithmetic operations
num i = 0;
while (i < count) {
num j = 0;
while (j < count) {
sum = sum + (i * j) - (i + j);
j = j + 1;
}
use i_plus;
}
// Print the result of the arithmetic operations
print(sum);
// Perform a large number of simple operations
num simple_sum = 0;
i = 0;
while (i < count * 10){
simple_sum = simple_sum + i;
use i_plus;
}
// Print the result of the simple operations
print(simple_sum);
// num frac = 100 / 3;
// num hundred = frac * 3;
// print(0.02 + 0.003);
// num first_var = 83 * 100 + 83;
// num second_var = first_var - 8382;
// print(2 * (first_var + 2727 + second_var) + 3);
//
// if (100 <= 200){
// print(100*3);
// if(100 > 50){
// print(100);
// }
// } else if (100*3 > 200) {
// print(100*4);
// } else {
// print(100*5);
// }