replaced GO TO statements with DO J=1,M ... END DO in dqrt12.f and corrected description formula
This commit is contained in:
Regular → Executable
+10
-8
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user