bugGNU Octave - Bugs: bug #42421, "find" function...


bug #42421: "find" function overflows for large sparse matrices

Submitted by:  David Spies <dspyz>
Submitted on:  Sun 25 May 2014 06:19:20 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev 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.


Thu 15 Dec 2016 04:12:26 PM UTC, comment #3:

This issue is still present in Octave 4.2.0.

The code example from comment #0 still gives a large negative number.

Hartmut <hardy>
Thu 20 Aug 2015 10:59:00 AM UTC, comment #2:

I can still confirm the problem for the current development version. But I think the patch goes too far for just applying it.

Kai Torben Ohlhus <siko1056>
Project Member
Sun 25 May 2014 06:31:46 PM UTC, comment #1:

This is fixed by adding a method to translate directly from row-column pairs to doubles and then multiplying. I rewrote find with templates so that all calls to find go to the same place (as I already tried to do once, but this time I have a better understanding of the core of Octave so I could do it "right").

I've attached my patch. It's changesets 18792 and 18793 on my clone of Octave at https://dspyz@bitbucket.org/dspyz/octave
Note that this patch goes on top of 18791 which removes _colp from permutation matrices.

(file #31432)

David Spies <dspyz>
Sun 25 May 2014 06:19:20 PM UTC, original submission:

The indices returned by "find" overflow on large matrices:

David Spies <dspyz>


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

Attach Files:

Attached Files
file #31432:  fixFind.diff added by dspyz (44KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by dspyz (Submitted the item)

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

    Only project members can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-08-20 siko1056 StatusNone => Confirmed
    2014-05-25 dspyz Attached File- => Added fixFind.diff, #31432

    Back to the top

    Powered by Savane 3.3