I think it is a 1-liner:

erf(x) = 2 cdf(sqrt(2) x) - 1