summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug892794.js
blob: dd9a6236c4dc854d216200016afbf0716f696008 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// |jit-test| --ion-eager

function test0(v) {
  return (2147483648-Math.max(1.1,-(((2<<(-v|v))-3)|0)))|0;
}
assertEq(test0(1.6), 2147483645);
assertEq(test0(437348122.9), 2147483646);

function test1(v) {
  return (2147483648+Math.min(v,0))|0;
}
assertEq(test1(2.1), -2147483648)
assertEq(test1(-0.1), 2147483647)