bugGNU Octave - Bugs: bug #40017, bicgstab fails for complex matrices

 
 

bug #40017: bicgstab fails for complex matrices

Submitter:  Marco Caliari <caliari>
Submitted:  Fri 13 Sep 2013 07:02:48 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  cdf
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 16 Sep 2013 04:22:19 PM UTC, comment #3: 


Should be fixed by this changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/7ad3b9ca66f5

thanks,
c.

Carlo de Falco <cdf>
Group Member
Mon 16 Sep 2013 11:57:55 AM UTC, comment #2: 

Here it is a test


%!test
%! A = [1 + 1i, 1 + 1i; 2 - 1i, 2 + 1i];
%! b = A * [1; 1];
%! y = bicgstab (A, b);
%! assert (y, [1; 1], 1e-6);


Thanks for the changeset.

Marco

Marco Caliari <caliari>
Group Member
Mon 16 Sep 2013 11:42:13 AM UTC, comment #1: 

Hi Marco,

Could you please provide a test that shows this
problem so that I can ad it in the function?

It would be even better if you could provide the
proposed changes in the form of a Mercurial changeset,
but if that's not possible I can create the changeset myself.

thanks,
c.

Carlo de Falco <cdf>
Group Member
Fri 13 Sep 2013 07:02:48 AM UTC, original submission:  

Dear all,

bicgstab fails for complex matrices, try


A = rand(4)+1i*rand(4);
bicgstab(A,A*ones(4,1))


whose result should be ones(4,1). The problem is in a couple of complex scalar products (which are not symmetric). I think


rho_1 = res' * rr;


should be changed to


rho_1 = rr' * res;


and


omega = (t' * s) / (t' * t);


to


omega = (s' * t) / (t' * t);


Cheers,

Marco

Marco Caliari <caliari>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by caliari (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-16 cdf StatusNone Fixed
        Open/ClosedOpen Closed
        Release3.6.2 dev
    2013-09-16 cdf Assigned toNone cdf

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code