Included bug fix provided by Zlatco on Jacobi SVD
Email from Zlatco on August 24th 2010:
The problem that was reported (with zero matrix) is caused by bad initialization to xLASSQ.
It should be ZERO, ONE and not ZERO, ZERO. In fact, I had it ZERO, ONE throughout
the complete development of the code and decided to change it to ZERO, ZERO a the very
end to make it "more elegant". That was stupid, because xLASSQ does not touch those
variables in case of zero vector, leaving scaling at ZERO, and in the nonzero case the scaling
is between ONE and SQRT(N). So, in case of zero vector, division by a variable that
is normally bigger than ONE causes division by zero.
I have corrected that and few other things, stress tested the code and it should be OK now.
README:
i) In xgejsv.f and xgesvj.f input parameters SCALE and
SUMSQ in xlassq.f are now initially set as SCALE = ZERO, SUMSQ=ONE.
Setting them both to zero (without carefully reading xlassq.f) caused
problems with exactly zero columns.
ii) There was a problem in the branch that computes only SIGMA and U of a
rank deficient matrix. The computed numerical rank (NR) was incorrectly
written as N in parameter lists of the corresponding calls.
iii) In xgsvj0.f, xgsvj1.f testing the input parameters is changed to prevent
unnecessarily negative INFO in some situations.
iv) Minor changes, renaming some variables etc.