mgiger
08-07-2006, 02:18 PM
The line:
nm=l-1
will produce an out of bound array element access
Since l varies from k to 0, we have the line:
if (fabs(w[nm])+anorm == anorm) break;
accessing wm[k-1] to wm[-1]
rv1[0] === 0 is supposed to save the loop from this condition.
Wouldn't it be better to have the loop go from k>=l>=1 and put the following after the loop:
if(l == 0) flag = false;
That would be more explicit and also save a loop iteration.
nm=l-1
will produce an out of bound array element access
Since l varies from k to 0, we have the line:
if (fabs(w[nm])+anorm == anorm) break;
accessing wm[k-1] to wm[-1]
rv1[0] === 0 is supposed to save the loop from this condition.
Wouldn't it be better to have the loop go from k>=l>=1 and put the following after the loop:
if(l == 0) flag = false;
That would be more explicit and also save a loop iteration.