aboutsummaryrefslogtreecommitdiff
path: root/SRC/dstein.f
diff options
context:
space:
mode:
authorlangou <langou@users.noreply.github.com>2015-05-05 01:00:18 +0000
committerlangou <langou@users.noreply.github.com>2015-05-05 01:00:18 +0000
commitc20d8cceca87568fb1aa1f26a0248b269e8c99d2 (patch)
tree4fad85778f803ef52402b3e33f146d810ebd8957 /SRC/dstein.f
parentc2bb35e025810d6e7c23c74f2858227f338c97df (diff)
Bug fix from Osni Marques, Beresford Parlett and Jim Demmel.
This fixes bugs 032 and 056. Edits in cstein.f, dstein.f, sstein.f and zstein.f From Osni on Monday, May 4: As we discussed in our last conference call, I am attaching a new version of _STEIN, which fixes bugs 032 and 056. (The bugs were reported for DSTEIN, but I have propagated the fix to the other versions.) Also, in the process of testing the fix for those two bugs with more difficult cases, we stumbled upon a matrix that led SSTEIN to return NaNs in the eigenvectors ... We fixed that too and, in summary, these are the changes in _STEIN: 1) The assignment after the GO TO 60 needs to be GPIND = J1 (instead of GPIND = B1). 2) In 'Normalize and scale the righthand side vector Pb' (after GO TO 100 or GO TO 120) we have replaced _ASUM with I_AMAX.
Diffstat (limited to 'SRC/dstein.f')
-rw-r--r--SRC/dstein.f5
1 files changed, 3 insertions, 2 deletions
diff --git a/SRC/dstein.f b/SRC/dstein.f
index 7cc372b2..ddc84fe2 100644
--- a/SRC/dstein.f
+++ b/SRC/dstein.f
@@ -297,7 +297,7 @@
BLKSIZ = BN - B1 + 1
IF( BLKSIZ.EQ.1 )
$ GO TO 60
- GPIND = B1
+ GPIND = J1
*
* Compute reorthogonalization criterion and stopping criterion.
*
@@ -370,9 +370,10 @@
*
* Normalize and scale the righthand side vector Pb.
*
+ JMAX = IDAMAX( BLKSIZ, WORK( INDRV1+1 ), 1 )
SCL = BLKSIZ*ONENRM*MAX( EPS,
$ ABS( WORK( INDRV4+BLKSIZ ) ) ) /
- $ DASUM( BLKSIZ, WORK( INDRV1+1 ), 1 )
+ $ ABS( WORK( INDRV1+JMAX ) )
CALL DSCAL( BLKSIZ, SCL, WORK( INDRV1+1 ), 1 )
*
* Solve the system LU = Pb.