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