[Pkg-octave-devel] Bug#570231: Bug#570231: octave3.2: Errors in working with complex matrices on i386

Thomas Weber thomas.weber.mail at gmail.com
Wed Feb 17 19:50:52 UTC 2010


On Wed, Feb 17, 2010 at 02:20:55PM +0100, Steven De Herdt wrote:
> Package: octave3.2
> Version: 3.2.4-1
> Severity: normal
> 
> While working with complex matrices, I noticed strange things going on.
> Some searching showed that there is definitely something wrong:
> 
> octave3.2:2> a=orth(randn(3));
> octave3.2:3> a'*a
> ans =
> 
>    1.0000e+00  -1.0742e-16   2.2264e-16
>   -1.0742e-16   1.0000e+00  -3.1537e-17
>    2.2264e-16  -3.1537e-17   1.0000e+00
> 
> octave3.2:4> b=orth(randn(3)+J*randn(3));
> octave3.2:5> b'*b
> ans =
> 
>    1.06482 + 0.00000i   0.10484 + 0.51574i   0.14882 + 0.71172i
>    0.10484 - 0.51574i   0.90395 + 0.00000i  -0.07914 + 0.08895i
>    0.14882 - 0.71172i  -0.07914 - 0.08895i   1.06476 + 0.00000i 
> 
> The result is Hermitian, but not quite unitary.
> This also happens on octave3.0, but not on amd64 (either version).
> 
> A look through Octave's own bug reports produces e.g. 
> http://old.nabble.com/wrong-output-for-complex-scalar-product-to26766409.html and
> http://old.nabble.com/Wrong-results-for-svd-on-complex-numbers-to27079479.html ,
> so this kind of problem is not unheard of.
> 
> Depending on one's needs, this may be an 'important' bug.

Hmm, this looks like 
http://bugs.debian.org/569436

And indeed, I can reproduce the example from there in a sid chroot.

However, according to the rest of your mail, you have ATLAS installed,
which is strange.

> ii  libatlas3gf-base 3.6.0-24                Automatically Tuned Linear Algebra
> ii  libatlas3gf-sse2 3.6.0-24                Automatically Tuned Linear Algebra

Could you use the example from the above bug report and see if
uninstalling the optimized libraries helps?

==============================================================================
A = [1 2 3; 4 5 6; 7 8 9] * 1j;
[U, S, V] = svd(A);
disp(U);

The correct U is:

  -0.000000 - 0.214837i  -0.000000 - 0.887231i  -0.402839 - 0.066237i
   0.000000 - 0.520587i   0.000000 - 0.249644i   0.805678 + 0.132474i
   0.000000 - 0.826338i   0.000000 + 0.387943i  -0.402839 - 0.066237i

But in the chroot, I get:

  -0.00000 - 0.88741i  -0.00000 - 0.88723i  -0.39566 - 0.10061i
   0.00000 - 0.25007i  -0.00000 - 0.24964i   0.79131 + 0.20122i
   0.00000 + 0.38726i   0.00000 + 0.38794i  -0.39566 - 0.10061i
==============================================================================

Thanks
	Thomas





More information about the Pkg-octave-devel mailing list