http://d.puremagic.com/issues/show_bug.cgi?id=6023
Joseph Rushton Wakeling <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |t --- Comment #7 from Joseph Rushton Wakeling <[email protected]> 2013-08-30 04:41:06 PDT --- (In reply to comment #0) > uniform function from standard library doesn't work correctly with standard > BigInt. There are no indications anywhere that it shouldn't work, so I think > it is a bug. Typical existing RNGs may be expected to have an underlying range of 0 .. uint.max, with others perhaps extending that to ulong.max. They inherently can't cover the range of possible values that a BigInt can be expected to take, so there's a strong potential for statistical problems (albeit that those maxima are Very Big Indeed). It might be possible to do some customization so that BigInts falling within the appropriate bounds can be used -- probably your best bet would be to convert to uints, call the integral-type uniform() and convert back -- but in general generating random BigInts would require a BigInt-dedicated RNG. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
