A Method for Evaluation of the Error Function of Real and Complex Variable with High Relative Accuracy

A method for evaluation of the error function of real and complex variable by means of a trapezoidal sum with a correction term is proposed. This method gives a result with high relative accuracy with small number of operations. A precise upper bound of the relative error of the approximation for real variable is given.