This is a single routine that uses the Davidson's iterative method to solve for a few of the lowest/highest eigenvalues of a real symmetric and preferably diagonally dominant matrix.
Davidson, E.R., "The iterative calculation of a few of the lowest eigenvalues and corresponding eigenvectors of large real-symmetric matrices", J. Comput. Phys. 17, 87-94 (1975)
fix the bug that vector d may contain inf.
Create scripts with code, output, and formatted text in a single executable document.