Skip to content

Commit c3a0b79

Browse files
authored
Merge pull request #455 from timleslie/fix-rotmg-bug
[BLAS] Fix missing logic path in xrotmg.f
2 parents 4d1afcd + 6829744 commit c3a0b79

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

BLAS/SRC/drotmg.f

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ SUBROUTINE DROTMG(DD1,DD2,DX1,DY1,DPARAM)
152152
DD1 = DD1/DU
153153
DD2 = DD2/DU
154154
DX1 = DX1*DU
155+
ELSE
156+
* This code path if here for safety. We do not expect this
157+
* condition to ever hold except in edge cases with rounding
158+
* errors. See DOI: 10.1145/355841.355847
159+
DFLAG = -ONE
160+
DH11 = ZERO
161+
DH12 = ZERO
162+
DH21 = ZERO
163+
DH22 = ZERO
164+
*
165+
DD1 = ZERO
166+
DD2 = ZERO
167+
DX1 = ZERO
155168
END IF
156169
ELSE
157170

BLAS/SRC/srotmg.f

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ SUBROUTINE SROTMG(SD1,SD2,SX1,SY1,SPARAM)
152152
SD1 = SD1/SU
153153
SD2 = SD2/SU
154154
SX1 = SX1*SU
155+
ELSE
156+
* This code path if here for safety. We do not expect this
157+
* condition to ever hold except in edge cases with rounding
158+
* errors. See DOI: 10.1145/355841.355847
159+
SFLAG = -ONE
160+
SH11 = ZERO
161+
SH12 = ZERO
162+
SH21 = ZERO
163+
SH22 = ZERO
164+
*
165+
SD1 = ZERO
166+
SD2 = ZERO
167+
SX1 = ZERO
155168
END IF
156169
ELSE
157170

0 commit comments

Comments
 (0)