help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gsvd test error - diff


From: Markus Mützel
Subject: Re: gsvd test error - diff
Date: Mon, 12 Feb 2024 13:45:20 +0100

Your proposed change doesn't look correct to me.
After the test starting in line 406 of that file, B should be a 5x5 matrix. If 
it is a 3x3 matrix for you, something else must have gone wrong earlier.

Copying the respective lines:
https://hg.savannah.gnu.org/hgweb/octave/file/19973af3ac42/libinterp/corefcn/gsvd.cc#l406

## A (now 3x5) complex and B (now 5x5) complex are full rank
## now, A is 3x5
%!test <48807>
%! A = A0.';
%! B0 = diag ([1 2 4 8 16]) + j* diag ([-5 4 -3 2 -1]);
%! B = B0;
%! [U, V, X, C, S] = gsvd (A, B);
%! assert (C'*C + S'*S, eye (5), 5*eps);
%! assert (U*C*X', A, 25*eps);
%! assert (V*S*X', B, 85*eps);



Am 12. Februar 2024 um 13:34 Uhr schrieb "Thomas D. Dean":
> On 2/11/24 23:41, Thomas D. Dean wrote:
> Here is a diff to fix a failed test:
>
>  > hg diff
> diff -r 3a0d7c21384c libinterp/corefcn/gsvd.cc
> --- a/libinterp/corefcn/gsvd.cc Sun Feb 11 09:39:44 2024 -0500
> +++ b/libinterp/corefcn/gsvd.cc Mon Feb 12 04:32:59 2024 -0800
> @@ -445,18 +445,18 @@
>
>   ## Test that single inputs produce single outputs
>   %!test
> -%! s = gsvd (single (eye (5)), B);
> +%! s = gsvd (single (eye (3)), B);
>   %! assert (class (s), "single");
> -%! [U,V,X,C,S] = gsvd (single (eye(5)), B);
> +%! [U,V,X,C,S] = gsvd (single (eye(3)), B);
>   %! assert (class (U), "single");
>   %! assert (class (V), "single");
>   %! assert (class (X), "single");
>   %! assert (class (C), "single");
>   %! assert (class (S), "single");
>   %!
> -%! s = gsvd (A, single (eye (5)));
> +%! s = gsvd (A, single (eye (3)));
>   %! assert (class (s), "single");
> -%! [U,V,X,C,S] = gsvd (A, single (eye (5)));
> +%! [U,V,X,C,S] = gsvd (A, single (eye (3)));
>   %! assert (class (U), "single");
>   %! assert (class (V), "single");
>   %! assert (class (X), "single");
>
> Tom Dean
>
>
> ----------
> We are transitioning to a web based forum
> for community help discussions at
> https://octave.discourse.group/c/help
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]