ae function

Computing the absolute error