erfc - Linux


The erfc command computes the complementary error function for a given complex number or list of numbers. It is primarily used in mathematical applications, statistics, and probability theory to calculate the probability of a random variable exceeding a specified value.




  • -t: Use Taylor series expansion for complex inputs.
  • -f: Use continued fraction approximation for real inputs.


Calculate erfc for a complex number:

erfc -t 1+2i

Calculate erfc for a list of real numbers:

erfc -f 0.1 0.5 1.0

Common Issues

  • NaN errors: If the input is not a valid complex number or real number, erfc will return NaN.
  • Overflow errors: For very large real inputs, erfc may overflow.


erfc can be combined with other commands for advanced tasks, such as:

  • Calculate the probability of a standard normal variable exceeding a threshold:
erfc "$(awk 'BEGIN{print 1-0.95}')"

Related Commands

  • erf: Computes the error function.
  • gamma: Computes the gamma function.
  • lgamma: Computes the natural logarithm of the gamma function.