Average relative error is finished.
Fix bug in average_relative_error fuction