bugGNU Octave - Bugs: bug #40287, max(max(speye(65536)))

 
 

bug #40287: max(max(speye(65536)))

Submitter:  None
Submitted:  Thu 17 Oct 2013 10:52:38 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  dbateman
Originator Name:  Daniel Roeske Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.6.4
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 17 Oct 2013 09:09:00 PM UTC, comment #6: 

Ok I pushed the patch in

http://hg.savannah.gnu.org/hgweb/octave/rev/c81debf315e0

Closing this bug

D.

David Bateman <dbateman>
Group Member
Thu 17 Oct 2013 08:57:40 PM UTC, comment #5: 

I tested your patch and it works for me.  I also ran 'make check' and it showed no new tests failing.

Rik <rik5>
Group administrator
Thu 17 Oct 2013 08:27:41 PM UTC, comment #4: 

I still think this is gonna be a whack-a-mole unless we fix the actual underlying issue with sparse indexing. At least the moles appear to be very infrequent.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Thu 17 Oct 2013 08:18:36 PM UTC, comment #3: 

This is not an off-by-one error but another case where numel() for a sparse matrix can overflow, but where in fact it doesn't even need to be used. See the discussion

http://octave.1599824.n4.nabble.com/Re-Pkg-octave-devel-Bug-706376-octave-sparse-matrix-n-2-16-td4652439i20.html

A patch that should fix it is attached, which I can test yet after monthes of not building Octave my build is taking quite some time ;-)

I'll test this patch soon and close this bug if the fix workes

D.

(file #29396)

David Bateman <dbateman>
Group Member
Thu 17 Oct 2013 04:20:50 PM UTC, comment #2: 

Confirmed.  This sure looks like an off-by-1 error given the special nature of 65,536.

Rik <rik5>
Group administrator
Thu 17 Oct 2013 11:25:56 AM UTC, comment #1: 

On a recent build I get:

>> max(max(speye(65536)))

ans = Compressed Column Sparse (rows = 0, cols = 0, nnz = 0)

>> max(max(speye(65537)))

ans = Compressed Column Sparse (rows = 1, cols = 1, nnz = 1 [100%])

  (1, 1) ->  1

>> max(max(speye(65535)))

ans = Compressed Column Sparse (rows = 1, cols = 1, nnz = 1 [100%])

  (1, 1) ->  1

Doug Stewart <dastew>
Thu 17 Oct 2013 10:52:38 AM UTC, original submission:  

max(max(speye(65536))) returns an empty matrix, should be 1x1 with maximum 1. For any other size it seems to work fine.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29396:  patch.minmax added by dbateman (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by dbateman (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-17 dbateman StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2013-10-17 dbateman Attached File- Added patch.minmax, #29396
        StatusConfirmed Ready For Test
        Assigned toNone dbateman
    2013-10-17 rik5 Item GroupNone Incorrect Result
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code