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

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

[Octave-bug-tracker] [bug #29768] logm fix


From: Jaroslav Hajek
Subject: [Octave-bug-tracker] [bug #29768] logm fix
Date: Tue, 04 May 2010 08:52:08 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.5.9-0.1.1 Firefox/3.5.9

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

                 Summary: logm fix
                 Project: GNU Octave
            Submitted by: highegg
            Submitted on: Tue 04 May 2010 08:52:07 AM GMT
                Category: Libraries
                Severity: 2 - Minor
              Item Group: Feature Request
                  Status: In Progress
             Assigned to: highegg
         Originator Name: Tommy Guy
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Octave dev team,

I am submitting a patch to fix the numerically unstable matrix
logarithm function logm.m

1) The original implementation used an eigenvalue decomposition and a
direct inversion of the eigenvector matrix.  This was unstable.  For
instance, the matrix a = [1 -1 -1;0 1 -1; 0 0 1] gave poor results.
2) I utilized a better algorithm based on the Pade approximation.
Code from the mftoolbox by D. Higham was adapted for use.  That code
was published under GPL 3.0 and I contacted him for permission to use
the code.  He agreed to anything within bounds of GPL.
3) I built the difference file with
>> hg diff -U 3
If you require something different, just let me know.  Three files
change: PROJECTS, Changelog, and logm.m.  The last file was completely
rewritten.
4) Only downside to this algorithm is that speed has suffered, but
accuracy trumps speed.  I am thinking about ways to speed it up,
particularly by exploiting a cheaper algorithm to compute sqrtm of an
upper triangular matrix, but the cheap algorithm fails on singular
matrices.

Please let me know if you will accept the patch!

Richard T. Guy
Dept. of Computer Science
Wake Forest University
(soon to be University of Toronto)




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 04 May 2010 08:52:08 AM GMT  Name: octave_logm_patch.txt  Size: 5kB
  By: highegg

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

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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