blob: cfcdbd8a2e5d71e8c70c3b2337e2ef45fc3063ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// |jit-test| --fast-warmup; --no-threads
var always_true = true;
var unused = 3;
function foo(input, trigger) {
if (trigger) {
return Math.atan2(always_true ? Math.trunc(input ** -0x80000001)
: unused,
+input);
}
}
with ({}) {}
for (var i = 0; i < 100; i++) {
foo(1, i == 15);
}
assertEq(foo(-Infinity, true), -Math.PI);
|