A New Formulation of the Least-Squares Calculation of Atomic Constants