Date: Fri, 24 Jul 2009 08:39:54 -0600 From: Pat Quillen To: "lapack@cs.utk.edu" Cc: Penny Anderson, Duncan Po, Cleve Moler, Bobby Cheng Subject: [Lapack] Scaling in xSTEQR, xSTERF Dear LAPACKers: During the process of upgrading to LAPACK 3.2, we noticed that the routines xSTEQR and xSTERF are calling xLANST to compute the infinity norm of the input matrix, and using this value to scale. It seems that these routines should probably use xLANST with first input 'M' and scale by the element with maximum absolute value. This would be consistent with the driver routines xSTEVy, as well as with the xSTEMR and xSTEDC routines. Changing the appropriate calls to xLANST would probably also necessitate changing the constants SSFMIN and SSFMAX. For example, one might replace the scaling logic in xSTEQR to be similar to that found in xSTEV. We were motivated to look at this as one of our tests for eigs began to fail with the recent change to xLASCL to handle CFROM == Inf. eigs is based on ARPACK, which ultimately calls xSTEQR. Our test executes eigs on the matrix A = [0 realmax; realmax 0] The Lanczos process produces a tridiagonal matrix whose infinity norm overflows, and for which the current version of DSTEQR will produce NaNs. By replacing the scaling logic as outlined above, DSTEQR will produce the eigenvalues +/-realmax. Of course, there will be matrices for which +/-Inf are returned (use a different starting vector in Lanczos), but that is more acceptable than NaN. I have attached a copy of dsteqr.f with a proposed change, and I'd appreciate any feedback you have. Thanks. Pat.