summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1073928.js
blob: 990103d1fdadcc2fb86af04adc899f48e05c92c0 (plain)
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
function f(y) {
    var a = Math.fround(-0);
    var b = ~Math.hypot(y > 0, 5);
    assertEq(a, -0);
    assertEq(b, -6);
}
f(-0);
f(1);

function g(y, z) {
    if (z == 0) {
        var a = Math.fround(z);
        var b = ~Math.hypot(y > 0, 5);
        assertEq(a, -0);
        assertEq(b, -6);
    }
}
g(-0, -0);
g(1, -0);

function h(y, z) {
    if (z == -0) {
        var a = Math.fround(z);
        var b = ~Math.hypot(y > 0, 5);
        assertEq(a, -0);
        assertEq(b, -6);
    }
}
h(-0, -0);
h(1, -0);