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

 
 

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

Submitted by:  None
Submitted on:  Thu 17 Oct 2013 10:52:38 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: David Bateman <dbateman>
Originator Name: Daniel RoeskeOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission 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>
Project MemberIn charge of this item.
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>
Project 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>
Project Administrator
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>
Project MemberIn charge of this item.
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>
Project 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 File(s):
   
   
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
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by dbateman (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by dastew (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 17 Oct 2013 09:09:00 PM UTCdbatemanStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 17 Oct 2013 08:18:36 PM UTCdbatemanAttached File-=>Added patch.minmax, #29396
      StatusConfirmed=>Ready For Test
      Assigned toNone=>dbateman
    Thu 17 Oct 2013 04:20:50 PM UTCrik5Item GroupNone=>Incorrect Result
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1