errors to distances