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

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

[Octave-bug-tracker] [bug #63082] eig(NaN) and eig(Inf) emit an error in


From: Rik
Subject: [Octave-bug-tracker] [bug #63082] eig(NaN) and eig(Inf) emit an error in Octave while Matlab returns NaN
Date: Tue, 20 Sep 2022 18:08:31 -0400 (EDT)

Update of bug #63082 (project octave):

                Severity:              3 - Normal => 2 - Minor              
                Priority:              5 - Normal => 3 - Low                
              Item Group: Unexpected Error or Warning => Matlab Compatibility 
 
                  Status:                    None => Confirmed              
                 Release:                   7.2.0 => dev                    
        Operating System:       Microsoft Windows => Any                    
                 Summary: eig(NaN) and eig(Inf) triggers a hard error instead
of returning NaN => eig(NaN) and eig(Inf) emit an error in Octave while Matlab
returns NaN

    _______________________________________________________

Follow-up Comment #4:

Confirmed.  I changed the Summary to reflect that this is merely a Matlab
Compatibility difference.  In the cases I tried, Matlab always returns a
vector of all NaNs whenever the input contains even one Inf or NaN value.

We could choose to make Octave do the same thing.  The code is in the
directory liboctave/numeric/ and in the files EIG.cc and fEIG.cc.  There are
four init() routines in each file which have a check similar to this one


  if (a.any_element_is_inf_or_nan ())
    (*current_liboctave_error_handler)
      ("EIG: matrix contains Inf or NaN values");




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63082>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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