bugGNU Octave - Bugs: bug #36535, randperm(X,Y) returns duplicates

 
 

bug #36535: randperm(X,Y) returns duplicates

Submitted by:  None
Submitted on:  Thu 24 May 2012 03:58:16 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jordi Gutiérrez Hermoso <jordigh>
Originator Name: Patrick TierneyOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.1
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 25 May 2012 03:34:06 PM UTC, comment #2:

Okay, I pushed a fix on stable:

http://hg.savannah.gnu.org/hgweb/octave/rev/42edbe6f6a8d

This should be part of the 3.6.2 release that should happen very soon now.

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Thu 24 May 2012 04:13:19 PM UTC, comment #1:

Yeah, confirmed. Something is wrong with randperm. I made the current implementation, so I probably made a mistake somewhere.

This reproduces it for me:

Jordi Gutiérrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Thu 24 May 2012 03:58:16 PM UTC, original submission:

Not sure if this a bug in the new randperm(X,M) or in sort() but I just got output [2 3 3 6 10 ...] when calling sort(randperm(305,30)). This is a one-time error. Repeated calls produce correct values.

Using 3.6.1 mingw version on Win7.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 25 May 2012 03:34:34 PM UTCjordighStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Thu 24 May 2012 04:15:49 PM UTCjordighAssigned toNone=>jordigh
      Summarysort(randperm(X,Y) returns duplicates=>randperm(X,Y) returns duplicates
    Thu 24 May 2012 04:13:19 PM UTCjordighStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1