Exact electrodynamics versus standard optics for a slab of cold dense gas