Sign in
webkit
/
WebKit
/
b0d7f9b249dd6483d6c7bc4f13c440c0842b7127
/
.
/
JSTests
/
stress
/
math-abs-positive.js
blob: fc4e1646056b1352d3568b61822e3afb475ceb5b [
file
] [
log
] [
blame
]
var
minus_three_quarters
=
-
0.75
;
function
foo
()
{
return
Math
.
abs
(
minus_three_quarters
);
}
for
(
var
i
=
0
;
i
<
10000
;
i
++)
{
var
result
=
foo
();
if
(
result
<
0
)
throw
"Error: Math.abs returned a negative value."
;
}