A charge-flipping algorithm incorporating the tangent formula for solving difficult structures. 
The 'charge-flipping' method proposed by Oszlányi & Süto [Acta Cryst. ( 2004), A60, 134-141] has been extended to include the direct-methods tangent formula within the iterative process.  The tangent formula acts as a corrective influence allowing for solutions at resolutions poorer than 1 A. The resulting algorithm solves difficult structures in minutes rather than days or not at all.  Modifications include (i) flipping a percentage of charge rather than charge below a threshold value and critically (ii) dampening the magnitude of charge above the threshold; this impedes tangent-formula solutions comprising one or two very intense peaks in the electron density which is commonly known as the 'uranium atom solution'.  For data at poor resolution, an alternate charge-flipping regime avoids uranium atom solutions by truncating electron-density pixels that are greater than half the maximum value.