more efficient implementation of erf() and erfc()