Skip to content

Commit

Permalink
Merge pull request Reference-LAPACK#569 from weslleyspereira/fix-bug-…
Browse files Browse the repository at this point in the history
…in-xCOMBSSQ

Fix bug in (s,d)COMBSSQ
  • Loading branch information
weslleyspereira authored May 25, 2021
2 parents 2ecd03d + c55a399 commit bd6add2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SRC/classq.f90
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ subroutine CLASSQ( n, x, incx, scl, sumsq )
end if
else
!
! Otherwise all values are mid-range
! Otherwise all values are mid-range or zero
!
scl = one
sumsq = amed
Expand Down
3 changes: 3 additions & 0 deletions SRC/dcombssq.f
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ SUBROUTINE DCOMBSSQ( V1, V2 )
PARAMETER ( ZERO = 0.0D+0 )
* ..
* .. Executable Statements ..
*
* A zero sum V2 shall not modify the scaling factor of V1
IF( V2( 2 ).EQ.ZERO ) RETURN
*
IF( V1( 1 ).GE.V2( 1 ) ) THEN
IF( V1( 1 ).NE.ZERO ) THEN
Expand Down
2 changes: 1 addition & 1 deletion SRC/dlassq.f90
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ subroutine DLASSQ( n, x, incx, scl, sumsq )
end if
else
!
! Otherwise all values are mid-range
! Otherwise all values are mid-range or zero
!
scl = one
sumsq = amed
Expand Down
3 changes: 3 additions & 0 deletions SRC/scombssq.f
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ SUBROUTINE SCOMBSSQ( V1, V2 )
PARAMETER ( ZERO = 0.0D+0 )
* ..
* .. Executable Statements ..
*
* A zero sum V2 shall not modify the scaling factor of V1
IF( V2( 2 ).EQ.ZERO ) RETURN
*
IF( V1( 1 ).GE.V2( 1 ) ) THEN
IF( V1( 1 ).NE.ZERO ) THEN
Expand Down
2 changes: 1 addition & 1 deletion SRC/slassq.f90
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ subroutine SLASSQ( n, x, incx, scl, sumsq )
end if
else
!
! Otherwise all values are mid-range
! Otherwise all values are mid-range or zero
!
scl = one
sumsq = amed
Expand Down
2 changes: 1 addition & 1 deletion SRC/zlassq.f90
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ subroutine ZLASSQ( n, x, incx, scl, sumsq )
end if
else
!
! Otherwise all values are mid-range
! Otherwise all values are mid-range or zero
!
scl = one
sumsq = amed
Expand Down

0 comments on commit bd6add2

Please sign in to comment.