bugGNU Octave - Bugs: bug #32075, logm with an identity matrix

 
 

bug #32075: logm with an identity matrix

Submitted by:  Guillaume <gyom>
Submitted on:  Fri 07 Jan 2011 03:51:39 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: GuillaumeOpen/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 10 Jan 2011 07:55:51 PM UTC, comment #3:

Thanks for the suggestion. I did that, but also left my code in place because we need to ensure that

also works. I checked in the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/ff7e0776ba0f

I don't see a quick test to decide whether a full matrix has nonzero elements only on the diagonal. Maybe we should have one. If we did, we could speed things up a bit more.

I think this problem is fixed now, so I'm closing this report.

John W. Eaton <jwe>
Project Administrator
Mon 10 Jan 2011 03:57:42 PM UTC, comment #2:

Why not a behavior similar to expm? m is equal to 1 (not 0) only in the case s is the identity. The enclosed patch treats explicitly the scalar case and the diagonal case (in particular, the identity).

Marco

(file #22385)

Marco Caliari <caliari>
Project Member
Fri 07 Jan 2011 07:21:34 PM UTC, comment #1:

I'm attaching a changeset that appears to fix the problem for me, but I'd like confirmation that this is the right thing to do from someone who understands this algorithm better than I do before I commit it.

(file #22373)

John W. Eaton <jwe>
Project Administrator
Fri 07 Jan 2011 03:51:39 PM UTC, original submission:

Computing the matrix logarithm of an identity matrix crashes with Octave dev:
octave> logm(eye(3))
error: gauss_legendre: A(I,J): row index out of bounds; value 1 out of bound 0
while it returns zeros(3) on Octave 3.2.4 and MATLAB.

Guillaume <gyom>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #22385:  logm.m.diff added by caliari (389B - text/x-patch)
file #22373:  diffs.txt added by jwe (972B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by caliari (Updated the item)
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by jwe
  • -unavailable- added by jwe
  • -unavailable- added by jwe
  • -unavailable- added by gyom (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Jan 2011 07:55:51 PM UTCjweStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Mon 10 Jan 2011 03:57:42 PM UTCcaliariAttached File-=>Added logm.m.diff, #22385
    Fri 07 Jan 2011 07:21:34 PM UTCjweAttached File-=>Added diffs.txt, #22373
      StatusNone=>Patch Submitted
      Carbon-Copy-=>Added highegg
      Carbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup