[Issue 2865] New: RandomCover not random.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Apr 20 14:32:30 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2865

           Summary: RandomCover not random.
           Product: D
           Version: 2.029
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: dsimcha at yahoo.com


RandomCover is not actually random because the selection of the next element to
visit goes up to index k - 2 instead of element k - 1, where k = _input.length
- _alreadyChosen.  

I'm assuming this was because someone forgot that the default bounds of uniform
are [), not [].  Patch to follow momentarily.


-- 



More information about the Digitalmars-d-bugs mailing list