  We study the limits of the energy resolution that can be achieved in the
calculations of spectral functions of quantum impurity models using the
numerical renormalization group (NRG) technique with interleaving
(z-averaging). We show that overbroadening errors can be largely eliminated,
that higher-moment spectral sum rules are satisfied to a good accuracy, and
that positions, heights and widths of spectral features are well reproduced;
the NRG approximates very well the spectral-weight distribution. We find,
however, that the discretization of the conduction-band continuum nevertheless
introduces artefacts. We present a new discretization scheme which removes the
band-edge discretization artefacts of the conventional approach and
significantly improves the convergence to the continuum (Lambda -> 1) limit.
Sample calculations of spectral functions with high energy resolution are
presented. We follow in detail the emergence of the Kondo resonance in the
Anderson impurity model as the electron-electron repulsion is increased, and
the emergence of the phononic side peaks and the transition from the spin Kondo
effect to the charge Kondo effect in the Anderson-Holstein impurity model as
the electron-phonon coupling is increased. We also compute the spectral
function of the Hubbard model within the dynamical mean-field theory (DMFT),
confirming the presence of fine structure in the Hubbard bands.
