ITS.Propagation.LFMF 1.1
Part of the NTIA/ITS Propagation Library
Loading...
Searching...
No Matches
wofz.cpp File Reference

Implements a function to calculate the Faddeeva function \( W(z) \). More...

Functions

std::complex< double > ITS::Propagation::LFMF::wofz (const std::complex< double > z)
 This function computes the Faddeeva function \( W(z) = e^{-z^2} \mathrm{erfc}(-iz) \).
 

Detailed Description

Implements a function to calculate the Faddeeva function \( W(z) \).

Function Documentation

◆ wofz()

std::complex< double > ITS::Propagation::LFMF::wofz ( const std::complex< double > z)

This function computes the Faddeeva function \( W(z) = e^{-z^2} \mathrm{erfc}(-iz) \).

Given a complex input argument \( z \), this function computes the value of the above equation, in which \(\mathrm{erfc}\) is the complex complementary error function and \( i \) is \( \sqrt{-1} \).

The basis for this function is Algorithm 680, Collected Algorithms from ACM, (reference provided below). This version of the function accepts a single complex input argument z and returns a single complex output. The following note is restated from the original implementation's description:

Note
The accuracy of the algorithm for \( z \) in the 1st and 2nd quadrant is 14 significant digits; in the 3rd and 4th it is 13 significant digits outside a circular region with radius 0.126 around a zero of the function.
Parameters
[in]zInput argument
Returns
The desired \( W(z) \) function calculated at z

Lineage

  • The original FORTRAN implementation was translated to C/C++ by I. Stevanovic (OFCOM CH).
  • Direct comparisons of double values with == were removed by C. Heroy, who implemented AlmostEqualRelative().

References

Privacy Policy FOIA Accessibility Information Quality