octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44009] row-wise cummin / cummax fail if rows


From: anonymous
Subject: [Octave-bug-tracker] [bug #44009] row-wise cummin / cummax fail if rows start with NaN
Date: Thu, 15 Jan 2015 05:31:07 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0

URL:
  <http://savannah.gnu.org/bugs/?44009>

                 Summary: row-wise cummin / cummax fail if rows start with NaN
                 Project: GNU Octave
            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: None
             Assigned to: None
         Originator Name: Lachlan
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 15 Jan 2015 05:31:06 AM UTC  Name: octave-cummin.patch  Size: 715B  
By: None

<http://savannah.gnu.org/bugs/download.php?file_id=32835>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44009>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]