Saul Teukolsky
05-24-2002, 12:53 PM
There is a bug in svdcmp.cpp (v 2.10). The line
if (i+1 <= m && i != n) {
(line 2 on p. 71 of the text) should be
if (i+1 <= m && i+1 != n) {
This bug does not introduce any erroneous calculations, but can produce an out-of-bounds array reference.
if (i+1 <= m && i != n) {
(line 2 on p. 71 of the text) should be
if (i+1 <= m && i+1 != n) {
This bug does not introduce any erroneous calculations, but can produce an out-of-bounds array reference.