[Top][All Lists]

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

[Octave-bug-tracker] [bug #56031] eye produces wrong output when multipl

From: Gerrit Ansmann
Subject: [Octave-bug-tracker] [bug #56031] eye produces wrong output when multiplied with infinity or NaN
Date: Sat, 30 Mar 2019 04:13:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0


                 Summary: eye produces wrong output when multiplied with
infinity or NaN
                 Project: GNU Octave
            Submitted by: wrzlprmft
            Submitted on: Sat 30 Mar 2019 08:13:04 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: GNU/Linux



Consider the following examples:

% Preparation
my_eye = eye(3);
inf_eye = my_eye*inf;
nan_eye = my_eye*nan;

% Preliminary Checks
x = inf_eye(1,2);
assert( isnan(x*inf) );
assert( isnan(x*nan) );

% Actual Problem
assert( isnan(inf_eye(1,2)) );
assert( isnan(nan_eye(1,2)) );

In plain words, multiplying an eye matrix with infinity or NaN yields zero
elements outside the diagonal, even though there should be NaNs.

Obviously, this is inconsistent. I first thought this was to reproduce some
Matlab weirdness, but Matlab does this correctly.


Reply to this item at:


  Message sent via Savannah

reply via email to

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