summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/bug618863.js
blob: 9393361190a6aaed2db6f20c20f9aea27d348ccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function f() {
  for(var i=0; i<3; i++) {
    var x = -i / 100;
    assertEq(x * -100, i);
  }
}
f();

function g() {
  for (var i = 0; i < 2; i++) {
    var a = i ? true : false;
    var x = -a / 100;
    assertEq(x * -100, i);
  }
}
g();

function h() {
  for (var i = 0; i < 20; i++)
    var x = (0x7ffffff4 + i) / 100;
  assertEq(x, 21474836.55);
}
h();