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