annotate test/bug-46330.tst @ 31225:3eab70385569

sparse-xpow.cc: Use faster multiplication technique, this time for complex
author Arun Giridhar <arungiridhar@gmail.com>
date Sun, 11 Sep 2022 13:53:38 -0400
parents 796f54d4ddbf
children 597f3ee61a48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ########################################################################
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 ##
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
3 ## Copyright (C) 2010-2022 The Octave Project Developers
27918
b442ec6dda5c use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
4 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
22799
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
7 ##
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
8 ## This file is part of Octave.
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
9 ##
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23221
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
22799
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
11 ## under the terms of the GNU General Public License as published by
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23221
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
22799
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
13 ## (at your option) any later version.
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
14 ##
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
18 ## GNU General Public License for more details.
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
19 ##
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
20 ## You should have received a copy of the GNU General Public License
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
21 ## along with Octave; see the file COPYING. If not, see
24534
194eb4bd202b maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents: 23221
diff changeset
22 ## <https://www.gnu.org/licenses/>.
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 ##
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ########################################################################
22799
592fa741e0aa add missing copyright notices (bug #49624)
John W. Eaton <jwe@octave.org>
parents: 22598
diff changeset
25
22085
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
26 ## bug #46330: segfault with matrices containing Inf & NaN
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
27
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
28 %!warning
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
29 %! a = [-0.46E-01, 0.10681415316, 0.0, -0.17121680433;
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
30 %! -0.1675901504661613, -0.515, 1.0, 0.6420630320636088E-02;
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
31 %! 0.1543104215347786, -0.547945, -0.906, -0.1521689385990753E-02;
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
32 %! 0.0, 0.0, 1.0, 0.0];
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
33 %!
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
34 %! b = [0.1602300107479095, 0.2111848453E-02;
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
35 %! 0.8196877780963616E-02, -0.3025E-01;
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
36 %! 0.9173594317692437E-01, -0.75283075;
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
37 %! 0.0, 0.0];
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
38 %!
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
39 %! c = [1.0, 0.0, 0.0, 0.0;
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
40 %! 0.0, 0.0, 0.0, 1.0];
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
41 %!
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
42 %! ## This statement caused an error in LAPACK and eventually caused
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
43 %! ## a segmentation fault.
bf5fbf347aaf Avoid segfault with complex matrices using LAPACK (bug #46330).
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
diff changeset
44 %! ## Triggers "warning: matrix singular to machine precision"
22598
5aa8f199e328 avoid invalid BLAS calls that then invoke xerbla (bug #39000)
Avinoam Kalma <a.kalma@gmail.com>
parents: 22085
diff changeset
45 %! assert (c / (i * Inf * eye (4) - a) * b, zeros (2, 2))