[bug #68434] Function gsvd crashes when matrices have 10 or more columns

"Dmitri A. Sergatskov" <[email protected]> Mon, 15 Jun 2026 07:27:16 -0400 (EDT)
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Follow-up Comment #16, bug #68434 (group octave):

Here is some wrong calculations:
+verbaim+
octave:21> M = 4; P = 2; N = 8;
octave:22> A = [1:8; 1:8; 1:8; 1:8]
A =

   1   2   3   4   5   6   7   8
   1   2   3   4   5   6   7   8
   1   2   3   4   5   6   7   8
   1   2   3   4   5   6   7   8

octave:23> B = [8:-1:1; 8:-1:1]
B =

   8   7   6   5   4   3   2   1
   8   7   6   5   4   3   2   1

octave:24>  [U, V, X, C, S] = gsvd (A, B)
U =

  -5.0000e-01  -8.6603e-01  -5.6156e-17  -2.5375e-17
  -5.0000e-01   2.8868e-01   8.1650e-01  -9.0181e-17
  -5.0000e-01   2.8868e-01  -4.0825e-01  -7.0711e-01
  -5.0000e-01   2.8868e-01  -4.0825e-01   7.0711e-01

V =

  -0.7071  -0.7071
  -0.7071   0.7071

X =

  -20.0823   -5.9319         0         0         0         0         0
0
   18.9078   15.7321         0         0         0         0         0
0
    6.7013  -10.4301         0         0         0         0         0
0
    0.2763   -1.5369         0         0         0         0         0
0
   -0.6378   -0.0719         0         0         0         0         0
0
   -1.5519    1.3931         0         0         0         0         0
0
   -2.4659    2.8580         0         0         0         0         0
0
   -1.1476   -2.0124         0         0         0         0         0
0

C =

   1.0000        0        0        0        0        0        0        0
        0   0.0000        0        0        0        0        0        0
        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0

S =

   0   1   0   0   0   0   0   0
   0   0   0   0   0   0   0   0

octave:25> A - U * C * X'
ans =

   -9.0411   11.4539    6.3507    4.1382    4.6811    5.2241    5.7670
7.4262
   -9.0411   11.4539    6.3507    4.1382    4.6811    5.2241    5.7670
7.4262
   -9.0411   11.4539    6.3507    4.1382    4.6811    5.2241    5.7670
7.4262
   -9.0411   11.4539    6.3507    4.1382    4.6811    5.2241    5.7670
7.4262

octave:26> B - V * S * X'
ans =

    3.8055   18.1243   -1.3752    3.9132    3.9491    3.9850    4.0209
-0.4230
    3.8055   18.1243   -1.3752    3.9132    3.9491    3.9850    4.0209
-0.4230

-verbatim-

Dmitri.
-- 



    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCai/hlAAKCRCqLAuaBUf3
TqpyAQDM5wAozLGXrok7jtPpUbPMM31kYWNg4j8QiasnWdScfgD/Y7nVzCT6gXL8
5KKs3+sFTyYwN9aYxIGo6OBXybC/Cgc=
=tDc4
-----END PGP SIGNATURE-----