Sign in
webkit
/
WebKit
/
1f10227393c9dc21c9d2643241b56515c886ce78
/
.
/
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"
);
}