This routine uses the BiCG (BiConjugate Gradient) method to solve the unsymmetric linear system , optionally using preconditioning. If , are the preconditioning matrices, the routine actually solves the preconditioned system
with and and recovers the solution . If , preconditioning is said to be from the right, if , it is said to be from the left, and otherwise it is from both sides. Reverse communication is used for preconditioning operations and , where , and for matrix-vector products of the form and .