bugGNU Octave - Bugs: bug #44009, row-wise cummin / cummax fail if...


bug #44009: row-wise cummin / cummax fail if rows start with NaN

Submitted by:  None
Submitted on:  Thu 15 Jan 2015 05:31:06 AM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Lachlan Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  3.8.2
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.


Tue 20 Jan 2015 05:08:16 AM UTC, comment #3: 

Fixed on the development branch of Octave in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/6b09dd576521).  I added your name to the list of contributors that shows up at the front of the manual too.  Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Tue 20 Jan 2015 02:04:43 AM UTC, comment #2: 

Thanks, Rik.

I've now created an account.  My details are
   Lachlan Andrew <lachlanbis@gmail.com>


Lachlan Andrew <lachlan>
Mon 19 Jan 2015 09:10:47 PM UTC, comment #1: 

The supplied patch works.  Normally we like to credit anyone who contributes by checking the patch in under "firstname lastname <email@address>".  If you would like to be acknolwedged post the information to this bug report.  Otherwise I can check the patch in anonymously under my credentials.

Rik <rik5>
Project Administrator
Thu 15 Jan 2015 05:31:06 AM UTC, original submission:  

Taking cummin over a dimension other than 1 gives undefined results if one of the rows starts with NaN, but later contains valid values.

For example,

cummin([1 2; NaN 1], 2)

gave me

    1.0000e+00   1.8652e-316
           NaN    1.0000e+00

instead of the top-right element being 1.

This is fixed by the attached patch, which supplies the required "else" clause in liboctave/operators/mx-inlines.cc




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

Attach Files:

Attached Files
file #32835:  octave-cummin.patch added by None (715B - 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 lachlan (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-20 rik5 StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2015-01-19 rik5 StatusNone => Patch Submitted
    2015-01-15 None Attached File- => Added octave-cummin.patch, #32835

    Back to the top

    Powered by Savane 3.6