Abstract. We propose a general algorithm for solving an n\times n nonsingular linear system Ax = b based on iterative refinement with three precisions. The working precision is combined with possibly different precisions for solving for the correction term and for computing the residuals. Via rounding error analysis of the algorithm we derive sufficient conditions for convergence and bounds for the attainable forward error and normwise and componentwise backward errors. Our results generalize and unify many existing rounding error analyses for iterative refinement. With single precision as the working precision, we show that by using LU factorization in IEEE half precision as the solver and calculating the residuals in double precision it is possible to solve Ax = b to full single precision accuracy for \infty -norm condition numbers \kappa \infty (A) \leq 10 4 , with the O(n 3 ) part of the computations carried out entirely in half precision. We show further that by solving the correction equations by GMRES preconditioned by the LU factors the restriction on the condition number can be weakened to \kappa \infty (A) \leq 10 8 , although in general there is no guarantee that GMRES will converge quickly. Taking for comparison a standard Ax = b solver that uses LU factorization in single precision, these results suggest that on architectures for which half precision is efficiently implemented it will be possible to solve certain linear systems Ax = b up to twice as fast and to greater accuracy. Analogous results are given with double precision as the working precision.Key words. iterative refinement, linear system, multiple precision, mixed precision, rounding error analysis, backward error, forward error, GMRES, preconditioning AMS subject classifications. 65G50, 65F10 DOI. 10.1137/17M11408191. Introduction. Iterative refinement is a method for improving an approximate solution y to a linear system Ax = b by computing the residual r = b -Ay, solving the correction equation Ad = r, forming the update y \leftarr y + d, and repeating these steps as necessary. We consider a general iterative refinement algorithm that includes a variety of existing ones as special cases. The algorithm contains three precisions:\bullet u is the precision at which the data A, b and the solution x are stored (the working precision), \bullet u f is the precision at which the factorization of A is computed, \bullet u r is the precision at which residuals are computed. The precisions are assumed to satisfy