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

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

[Octave-bug-tracker] [bug #60738] logm returning incorrect result with s


From: anonymous
Subject: [Octave-bug-tracker] [bug #60738] logm returning incorrect result with some real non-symmetric matrices
Date: Sun, 6 Jun 2021 02:58:12 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

URL:
  <https://savannah.gnu.org/bugs/?60738>

                 Summary: logm returning incorrect result with some real
non-symmetric matrices
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sun 06 Jun 2021 06:58:10 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
                 Release: 6.2.0
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

The following shows a case where logm returns an incorrect result


A=[0.2510   1.2808  -1.2252
   0.2015   1.0766   0.5630
  -1.9769  -1.0922  -0.5831];
max(abs(expm(logm(A))-A)(:))

It's cause is the same as the following complex array not testing true in the
following:

[-2 2+i -2-i]<0

The above appears to be equivalent to abs([-2 2+i -2-i])<0

logm can be fixed by changing line 83 from

real_eig = all (eigv >= 0);

to

real_eig = all (real (eigv) >= 0);

or perhaps fixing the logical check of real numbers in complex arrays?




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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