blob: 6418bc1b39726e76086714fb8e0afc1312a008ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Bug 894781
function m(stdlib)
{
"use asm";
var abs = stdlib.Math.abs;
function f(d)
{
d = +d;
return (~~(5.0 - +abs(d)))|0;
}
return f;
}
var f = m(this);
assertEq(f(0.2), 4);
assertEq(f(NaN), 0);
|