&&{\hspace{-7mm}}\qquad  \quad t_{n+1,n}^{(\ell)}=0,                        \nonumber \\
&&{\hspace{-7mm}}\qquad \quad \pmatrix{
                g_{n}^{(\ell)} \cr
                g_{n+1}^{(\ell)} }
 =
 \pmatrix{
           c_{n}^{(\ell)}     & s_{n}^{(\ell)}  \cr
           -\overline{s}_{n}^{(\ell)} & c_{n}^{(\ell)} }
\pmatrix{
               g_{n}^{(\ell)} \cr
               0 },   \nonumber\\   
&&{\hspace{-7mm}}\qquad \quad  {\textrm}{(Update approximate solutions ${\mbox{\boldmath $x$}}_n^{(\ell)}$)}\nonumber\\
&&{\hspace{-7mm}}\qquad \quad {\mbox{\boldmath $p$}}_{n}^{(\ell)}= {\mbox{\boldmath $v$}}_{n}-(t_{n-2,n}^{(\ell)}/t_{n-2,n-2}^{(\ell)}){\mbox{\boldmath $p$}}_{n-2}^{(\ell)}- (t_{n-1,n}^{(\ell)}/t_{n-1,n-1}^{(\ell)}){\mbox{\boldmath $p$}}_{n-1}^{(\ell)}, \nonumber\\
&&{\hspace{-7mm}}\qquad \quad {\mbox{\boldmath $x$}}_{n}^{(\ell)}={\mbox{\boldmath $x$}}_{n-1}^{(\ell)}+(g_n^{(\ell)}/t_{n,n}^{(\ell)}){\mbox{\boldmath $p$}}_n^{(\ell)},  \nonumber \\
&&{\hspace{-7mm}}\quad \quad {\textrm}{{\bf end if}}       \nonumber    \\
&&{\hspace{-7mm}}\quad {\textrm}{{\bf end}}                \nonumber    \\&&{\hspace{-7mm}}\qquad {\textrm}{{\bf if}}\ \|{\mbox{\boldmath $r$}}_{n}^{(\ell)}\|_2/\|{\mbox{\boldmath $b$}}\|_2\le \epsilon \ 
             {\textrm}{for all}\ \ell,\ {\textrm}{{\bf then} exit}.\\
&&{\hspace{-7mm}}{\textrm}{{\bf end}}                      \nonumber             \end{aligned}$$ Algorithm 2.1 can be regarded as a natural combination of the results given in [@QMR_SYM; @Freund].

In order to know that the numerical solution is accurate enough, one may need to compute the residual 2-norms. In that case, the following computation may be useful.

The 2-norms of the $n$th residuals of the approximate solutions ${\mbox{\boldmath $x$}}_n^{(\ell)}$ of the shifted QMR\_SYM method are given by $$\begin{aligned}
 \|{\mbox{\boldmath $r$}}_n^{(\ell)}\|_2=|g_{n+1}^{(\ell)}|\cdot\|{\mbox{\boldmath $w$}}_{n+1}^{(\ell)}\|_2\quad {\textrm}{for} \quad   \ell=1,2,\ldots,m, \end{aligned}$$ where ${\mbox{\boldmath $w$}}_{n+1}^{(\ell)}=-s_n^{(\ell)}{\mbox{\boldmath $w$}}_n^{(\ell)}+c_n^{(\ell)}{\mbox{\boldmath $v$}}_{n+1}$ and ${\mbox{\boldmath $w$}}_1^{(\ell)}={\mbox{\boldmath $v$}}_1.$

Proposition 2.1 is a result known to hold for the QMR method [@FrNa91]. Therefore, it also holds for the above specialized variant. The rest of this section describes some special properties of the shifted QMR\_SYM method.

Let 