Skip to content
Prev 5848 / 398506 Next

Needed: Understading runif() output :-)

I don't think this is a problem with the RNG.  There are only 2^32 numbers
(2^31 in some systems)that can be represented with a 32-bit floating point
number.  So, a rough back-of-the-envelope calculation gives me:
[1] 10.73742

i.e. about 10-11 possible numbers bigger than .9999999975 which seems to be
your threshold.  So the results you get aren't very surprising.

# David Smith

--
David M Smith <dsmith at splus.mathsoft.com>
S-PLUS Product Manager, MathSoft DAPD, Seattle WA
Tel: +1 (206) 283 8802 x360
Fax: +1 (206) 283 0347
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._