Title: Stable Numerical Methods for Acoustic and Electromagnetic Scattering Abstract: We discuss the conditioning properties of classical boundary perturbation methods for scattering from diffraction gratings. We will demonstrate that significant cancellations are present in the recursions generated by these methods, resulting in numerical algorithms which deteriorate with decreasing regularity of the grating profile. These cancellations prevent a direct proof of the convergence of these recursions, however, such a proof can be realized if a change of variables is performed before the derivation of the perturbation series. These observations also provide guiding principles for the design of efficient and highly accurate low- (first- and second-) and high-order algorithms. The low-order recurrences are stabilized by explicitly accounting for cancellations, while in the high-order setting we advocate several methods for the implicit management of these cancellations. Numerical results illustrating the advantages of these approaches are presented.