 <p>If you want any kind of accuracy, the simple algorithm is terribly bad. For an accurace range reduction algorithm, see e.g. <a href="http://www.derekroconnor.net/Software/Ng--ArgReduction.pdf">Ng et al., ARGUMENT REDUCTION FOR HUGE ARGUMENTS: Good to the Last Bit </a>.</p>