From 87c31223b1a90302bf75ee3f6f58c84233bf5cec Mon Sep 17 00:00:00 2001 From: Nick Papior Date: Sun, 18 Sep 2016 15:21:11 +0200 Subject: [PATCH] bug: fixes always failing tests for *TREXC which was erroneous tests There where checks for *TREXC for the argument of N = 0 with a return value of -7. However, the documentation of the *TREXC routines specify that N = 0 is a valid argument with instant return. Hence the checks have been removed and the quick returns established in the affected routines. Also comments for [dz]errec.f files are fixed. Signed-off-by: Nick Papior --- SRC/ctrexc.f | 2 +- SRC/ztrexc.f | 2 +- TESTING/EIG/cerrec.f | 5 +---- TESTING/EIG/derrec.f | 7 ++----- TESTING/EIG/serrec.f | 5 +---- TESTING/EIG/zerrec.f | 7 ++----- 6 files changed, 8 insertions(+), 20 deletions(-) diff --git a/SRC/ctrexc.f b/SRC/ctrexc.f index 10cf167..8835a54 100644 --- a/SRC/ctrexc.f +++ b/SRC/ctrexc.f @@ -182,7 +182,7 @@ * * Quick return if possible * - IF( N.EQ.1 .OR. IFST.EQ.ILST ) + IF( N.LE.1 .OR. IFST.EQ.ILST ) $ RETURN * IF( IFST.LT.ILST ) THEN diff --git a/SRC/ztrexc.f b/SRC/ztrexc.f index 110b0fc..1a32001 100644 --- a/SRC/ztrexc.f +++ b/SRC/ztrexc.f @@ -182,7 +182,7 @@ * * Quick return if possible * - IF( N.EQ.1 .OR. IFST.EQ.ILST ) + IF( N.LE.1 .OR. IFST.EQ.ILST ) $ RETURN * IF( IFST.LT.ILST ) THEN diff --git a/TESTING/EIG/cerrec.f b/TESTING/EIG/cerrec.f index 90ada2f..fa476e0 100644 --- a/TESTING/EIG/cerrec.f +++ b/TESTING/EIG/cerrec.f @@ -152,9 +152,6 @@ INFOT = 1 CALL CTREXC( 'X', 1, A, 1, B, 1, IFST, ILST, INFO ) CALL CHKXER( 'CTREXC', INFOT, NOUT, LERR, OK ) - INFOT = 7 - CALL CTREXC( 'N', 0, A, 1, B, 1, IFST, ILST, INFO ) - CALL CHKXER( 'CTREXC', INFOT, NOUT, LERR, OK ) INFOT = 4 ILST = 2 CALL CTREXC( 'N', 2, A, 1, B, 1, IFST, ILST, INFO ) @@ -180,7 +177,7 @@ ILST = 2 CALL CTREXC( 'V', 1, A, 1, B, 1, IFST, ILST, INFO ) CALL CHKXER( 'CTREXC', INFOT, NOUT, LERR, OK ) - NT = NT + 8 + NT = NT + 7 * * Test CTRSNA * diff --git a/TESTING/EIG/derrec.f b/TESTING/EIG/derrec.f index 9fc539c..9697f57 100644 --- a/TESTING/EIG/derrec.f +++ b/TESTING/EIG/derrec.f @@ -23,7 +23,7 @@ *> *> DERREC tests the error exits for the routines for eigen- condition *> estimation for DOUBLE PRECISION matrices: -*> DTRSYL, STREXC, STRSNA and STRSEN. +*> DTRSYL, DTREXC, DTRSNA and DTRSEN. *> \endverbatim * * Arguments: @@ -152,9 +152,6 @@ INFOT = 1 CALL DTREXC( 'X', 1, A, 1, B, 1, IFST, ILST, WORK, INFO ) CALL CHKXER( 'DTREXC', INFOT, NOUT, LERR, OK ) - INFOT = 7 - CALL DTREXC( 'N', 0, A, 1, B, 1, IFST, ILST, WORK, INFO ) - CALL CHKXER( 'DTREXC', INFOT, NOUT, LERR, OK ) INFOT = 4 ILST = 2 CALL DTREXC( 'N', 2, A, 1, B, 1, IFST, ILST, WORK, INFO ) @@ -180,7 +177,7 @@ ILST = 2 CALL DTREXC( 'V', 1, A, 1, B, 1, IFST, ILST, WORK, INFO ) CALL CHKXER( 'DTREXC', INFOT, NOUT, LERR, OK ) - NT = NT + 8 + NT = NT + 7 * * Test DTRSNA * diff --git a/TESTING/EIG/serrec.f b/TESTING/EIG/serrec.f index 25980ad..dfefb28 100644 --- a/TESTING/EIG/serrec.f +++ b/TESTING/EIG/serrec.f @@ -152,9 +152,6 @@ INFOT = 1 CALL STREXC( 'X', 1, A, 1, B, 1, IFST, ILST, WORK, INFO ) CALL CHKXER( 'STREXC', INFOT, NOUT, LERR, OK ) - INFOT = 7 - CALL STREXC( 'N', 0, A, 1, B, 1, IFST, ILST, WORK, INFO ) - CALL CHKXER( 'STREXC', INFOT, NOUT, LERR, OK ) INFOT = 4 ILST = 2 CALL STREXC( 'N', 2, A, 1, B, 1, IFST, ILST, WORK, INFO ) @@ -180,7 +177,7 @@ ILST = 2 CALL STREXC( 'V', 1, A, 1, B, 1, IFST, ILST, WORK, INFO ) CALL CHKXER( 'STREXC', INFOT, NOUT, LERR, OK ) - NT = NT + 8 + NT = NT + 7 * * Test STRSNA * diff --git a/TESTING/EIG/zerrec.f b/TESTING/EIG/zerrec.f index 7ea308b..948f6ee 100644 --- a/TESTING/EIG/zerrec.f +++ b/TESTING/EIG/zerrec.f @@ -23,7 +23,7 @@ *> *> ZERREC tests the error exits for the routines for eigen- condition *> estimation for DOUBLE PRECISION matrices: -*> ZTRSYL, CTREXC, CTRSNA and CTRSEN. +*> ZTRSYL, ZTREXC, ZTRSNA and ZTRSEN. *> \endverbatim * * Arguments: @@ -152,9 +152,6 @@ INFOT = 1 CALL ZTREXC( 'X', 1, A, 1, B, 1, IFST, ILST, INFO ) CALL CHKXER( 'ZTREXC', INFOT, NOUT, LERR, OK ) - INFOT = 7 - CALL ZTREXC( 'N', 0, A, 1, B, 1, IFST, ILST, INFO ) - CALL CHKXER( 'ZTREXC', INFOT, NOUT, LERR, OK ) INFOT = 4 ILST = 2 CALL ZTREXC( 'N', 2, A, 1, B, 1, IFST, ILST, INFO ) @@ -180,7 +177,7 @@ ILST = 2 CALL ZTREXC( 'V', 1, A, 1, B, 1, IFST, ILST, INFO ) CALL CHKXER( 'ZTREXC', INFOT, NOUT, LERR, OK ) - NT = NT + 8 + NT = NT + 7 * * Test ZTRSNA * -- 2.7.4