summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/mod-double.js
blob: 7a6df7bd56a50e895c15b1dc1aa55bd450bd6c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function test1() {
    function mod(x, y) {
        return x % y;
    }
    for (var i=0; i<60; i++) {
        assertEq(mod(4, 2), 0);
        assertEq(mod(5.5, 2.5), 0.5);
        assertEq(mod(10.3, 0), NaN);
        assertEq(mod(-0, -3), -0);

    }
}
test1();