From 2eac2f6332279ec00341eee197c16d79f9c63f8b Mon Sep 17 00:00:00 2001 From: scr2016 <1015908+scr2016@users.noreply.github.com> Date: Tue, 14 Nov 2023 04:42:08 -0800 Subject: [PATCH] replaced GO TO statements with DO J=1,M ... END DO in dqrt12.f and corrected description formula --- TESTING/LIN/dqrt12.f | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) mode change 100644 => 100755 TESTING/LIN/dqrt12.f diff --git a/TESTING/LIN/dqrt12.f b/TESTING/LIN/dqrt12.f old mode 100644 new mode 100755 index a3bfbebb3..b8a124c59 --- a/TESTING/LIN/dqrt12.f +++ b/TESTING/LIN/dqrt12.f @@ -26,7 +26,7 @@ *> DQRT12 computes the singular values `svlues' of the upper trapezoid *> of A(1:M,1:N) and returns the ratio *> -*> || s - svlues||/(||svlues||*eps*max(M,N)) +*> || svlues - s ||/(||s||*eps*max(M,N)) *> \endverbatim * * Arguments: @@ -144,11 +144,11 @@ * Copy upper triangle of A into work * CALL DLASET( 'Full', M, N, ZERO, ZERO, WORK, M ) - DO 20 J = 1, N - DO 10 I = 1, MIN( J, M ) + DO J = 1, N + DO I = 1, MIN( J, M ) WORK( ( J-1 )*M+I ) = A( I, J ) - 10 CONTINUE - 20 CONTINUE + END DO + END DO * * Get machine parameters * @@ -197,16 +197,18 @@ * ELSE * - DO 30 I = 1, MN + DO I = 1, MN WORK( M*N+I ) = ZERO - 30 CONTINUE + END DO END IF * * Compare s and singular values of work * CALL DAXPY( MN, -ONE, S, 1, WORK( M*N+1 ), 1 ) +* DQRT12 = DASUM( MN, WORK( M*N+1 ), 1 ) / - $ ( DLAMCH( 'Epsilon' )*DBLE( MAX( M, N ) ) ) + $ ( DLAMCH('Epsilon') * DBLE( MAX( M, N ) ) ) +* IF( NRMSVL.NE.ZERO ) $ DQRT12 = DQRT12 / NRMSVL *