Thread
-
Re: Re: [HACKERS] random() function produces wrong range
Roland Roberts <roberts@panix.com> — 2000-08-03T17:36:01Z
-----BEGIN PGP SIGNED MESSAGE----- >>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes: Tom> Actually the odds are far better than that. If the range is Tom> 2^31-1 then only about 2^-16th of the outputs should be less Tom> than 2^15. So ten probes gives you a failure probability of Tom> about 2^-160 not 2^-10. Oops, 2^16 != 2^32 / 2. So a dynamic test is not only possible but wouldn't cost to much at configure time. roland - -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD Unix Software Solutions roberts@panix.com 76-15 113th Street, Apt 3B rbroberts@acm.org Forest Hills, NY 11375 -----BEGIN PGP SIGNATURE----- Version: 2.6.3a Charset: noconv Comment: Processed by Mailcrypt 3.5.4, an Emacs/PGP interface iQCVAwUBOYmtf+oW38lmvDvNAQGWYwP/eXRtrDPu/xN+W9pCd9y34d4jbrPH7jku nBAuSYtCRyoMgTkjdCtqThzq3vzPLDwfmOZcmWP8W5AmQPJjvcdFwI7y1XgGlaxd aAIlqqf+TTkZwIUh2vnWTuu5JKkiAZI6UuzNSzy79O/frxKE2y97zCuMw02I0kMK iGNSybN3L5w= =36yP -----END PGP SIGNATURE-----