A more general formulation of separable least squares