keisoku

Error Function erf(x) and erfc(x) Calculator

Compute the error function erf(x) and complementary error function erfc(x) for any real x with high precision, using series and continued fractions, with a curve graph.

Input

Enter a real number x to compute the error function erf(x) and the complementary error function erfc(x).

Enter any real number (for example 1, -0.5, or 2.5).

Result

erf(1)

0.8427007929

erfc(1)

0.1572992071

Input x

1

Curve of erf(x)

How it works

  • The error function is defined as erf(x)=2/√π times the integral of e^(-t²) from 0 to x. It appears throughout probability, the normal distribution, heat conduction, and diffusion.
  • The complementary error function erfc(x)=1-erf(x) keeps full precision for large x, where erf(x) is very close to 1 and direct subtraction would lose digits.
  • This tool evaluates a Maclaurin series for small |x| and a continued fraction (modified Lentz method) for large |x|.
  • erf is an odd function, so erf(-x)=-erf(x), with erf(0)=0 and erf(x) approaching 1 as x grows large.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Error Function erf(x) and erfc(x) Calculator