]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/exponentiation.qc
Fix for loops
[xonotic/gmqcc.git] / tests / exponentiation.qc
1 void main() {
2     float hundy = __builtin_pow(10, 2); // 10^2 == 100
3     print(ftos(hundy), "\n");      // prints: 100
4
5     hundy = pow(10, 2);
6     print(ftos(hundy), "\n");
7
8     hundy -= 90; // 100-90 = 10
9     print(ftos(hundy ** 2), "\n"); // prints: 100
10     print(ftos(pow(hundy, 2)), "\n"); // prints: 100
11
12     hundy = 10.0f;
13     print(ftos(__builtin_exp(hundy)), "\n"); // prints: 22026.5
14 }