Another bug in svdcmp.cpp (fixed in v. 2.11)


Saul Teukolsky
06-07-2002, 10:18 AM
Line 106 of svdcmp.cpp is currently

for (i=l-1;i<k+1;i++) {

It should be

for (i=l;i<k+1;i++) {

For non-singular matrices, the bug affects only matrices with m < n (no. of rows < no. of cols). But singular matrices with any m and n may be affected. (Thanks to Chris Butcher for tracking this bug down.)