Sign in
webkit
/
WebKit
/
6117b7969ae9bfefe57ab827c89504ffb0a59249
/
.
/
JSTests
/
stress
/
random-in-range.js
blob: 9ec0d9fbef50feb9c1878439b898ebe1805e1750 [
file
] [
log
] [
blame
]
function
test
()
{
var
value
=
Math
.
random
();
if
(
value
>=
1.0
)
return
false
;
if
(
value
<
0
)
return
false
;
return
true
;
}
noInline
(
test
);
for
(
var
i
=
0
;
i
<
1e4
;
++
i
)
{
if
(!
test
())
throw
new
Error
(
"OUT"
);
}