Error function, erf(x) = 2 / sqrt(pi) * integral from 0 to x of exp(-t^2) dt. Not an R function. R writes it as 2 * pnorm(x * sqrt(2)) - 1, which loses the relative accuracy of small x.
2 * pnorm(x * sqrt(2)) - 1
Argument.
erf(x).
erf(0.5); // 0.5204998778130465erf(1e-10); // 1.1283791670955126e-10 Copy
erf(0.5); // 0.5204998778130465erf(1e-10); // 1.1283791670955126e-10
Error function, erf(x) = 2 / sqrt(pi) * integral from 0 to x of exp(-t^2) dt. Not an R function. R writes it as
2 * pnorm(x * sqrt(2)) - 1, which loses the relative accuracy of small x.