added code to compute residual norm using EPS's own routines