[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60273] Wrong result in GSVD
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #60273] Wrong result in GSVD |
Date: |
Tue, 23 Mar 2021 13:43:32 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36 |
Follow-up Comment #4, bug #60273 (project octave):
Octave is definitely taking the matrix Q from LAPACK and returning it as the
matrix X from gsvd which is incorrect. Documentation on the routine that
Octave calls is at
https://www.math.utah.edu/software/lapack/lapack-d/dggsvd.html.
The variable naming in gsvd.cc shows that the original coder knew that 'q' was
being returned. Maybe there wasn't a realization that Matlab was not exactly
mapping the outputs of LAPACK to the outputs of the Matlab function.
In any case, there is a 6th undocumented output from Octave's gsvd function
which is the matrix R from LAPACK. The documentation should really read
[U, V, Q, C, S, R] = gsvd (A, B)
If you do this then the results conform to the LAPACK documentation and
A = U * C * R * Q'
B = V * C * R * Q'
To recover Matlab's behavior
X = Q*R'
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60273>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Leonardo, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Rik, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Dmitri A. Sergatskov, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Leonardo, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD,
Rik <=
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Leonardo, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Dmitri A. Sergatskov, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Rik, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Rik, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Rik, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Rik, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, John W. Eaton, 2021/03/23
- [Octave-bug-tracker] [bug #60273] Wrong result in GSVD, Dmitri A. Sergatskov, 2021/03/23