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

 
 

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

Submitter:  None
Submitted:  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 Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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

Fixed on the development branch of Octave in this changeset (http://hg.savanna ... /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>
Group 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

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>
Group 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

Lachlan

Anonymous

 

Attached Files

Attached Files
file #32835:  octave-cummin.patch added by None (715B - text/x-patch)

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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)
  •  

    Votes

    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.

     

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

    History

    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.16-046d.
    Corresponding source code