diff --git a/lib/algorithms/iterative/GeneralisedMinimalResidual.h b/lib/algorithms/iterative/GeneralisedMinimalResidual.h index 9851987c..62a1699f 100644 --- a/lib/algorithms/iterative/GeneralisedMinimalResidual.h +++ b/lib/algorithms/iterative/GeneralisedMinimalResidual.h @@ -247,8 +247,8 @@ class GeneralisedMinimalResidual : public OperatorFunction { for (int i = iter; i >= 0; i--) { y[i] = gamma[i]; for (int k = i + 1; k <= iter; k++) - y[i] -= H(k, i) * y[k]; - y[i] /= H(i, i); + y[i] = y[i] - H(k, i) * y[k]; + y[i] = y[i] / H(i, i); } // TODO: Use axpys or similar for these