summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1650526.js
blob: 69934cf1118057376c3e4090fcb59df8e929c785 (plain)
1
2
3
4
5
6
7
8
9
for (let i = 0; i < 2; ++i) {
    // Alternate between even and odd values.
    let power = 1000 + i;

    // Math.pow(negative-int, large-negative-value) is +0 for even and -0 for odd values.
    let expected = (power & 1) === 0 ? +0 : -0;

    assertEq(Math.pow(-3, -power), expected);
}