Address 1262 Goodway Rd, Frisco City, AL 36445 (251) 564-6532 http://i-techcompulock.com

# fortran imaginary error function Repton, Alabama

Another approximation is given by erf ⁡ ( x ) ≈ sgn ⁡ ( x ) 1 − exp ⁡ ( − x 2 4 π + a x 2 1 Return value:The return value is of type REAL, of the same kind as X and lies in the range -1 \leq erf (x) \leq 1 . This page has been accessed 57,563 times. Johnson; project web site http://ab-initio.mit.edu/Faddeeva.

Poles and essential singularities The probability integrals , , and have only one singular point at . By a simple substitution one could alternatively get: erf(z)=i*erfi(-i*z) since my function covers the general complex case. Opens overlay T.A Zaker Engineering Mechanics Division I.I.T. Properties Plots in the complex plane Integrand exp(−z2) erf(z) The property erf ⁡ ( − z ) = − erf ⁡ ( z ) {\displaystyle \operatorname − 6 (-z)=-\operatorname − 5

For fixed , it is an entire function of . Handbook of Continued Fractions for Special Functions. Ali, "Algorithm 916: Computing the Faddeyeva and Voigt Functions," ACM Trans. Using the alternate value a≈0.147 reduces the maximum error to about 0.00012.[12] This approximation can also be inverted to calculate the inverse error function: erf − 1 ⁡ ( x )

Similarly, the erf, erfc, erfcx, erfi, and Dawson functions are computed by calling: extern std::complex Faddeeva::erf(std::complex z, double relerr=0); extern std::complex Faddeeva::erfc(std::complex z, double relerr=0); extern std::complex Faddeeva::erfcx(std::complex z, double relerr=0); Speedwise, this implementation seems to be on par with Godfrey's (file ID: 3574) which I currently use for small to medium range of the complex argument. It comes with a set of man pages, including a page cerf(3) that overwrites the standard one. Can anybody help me?

In particular, we did not refer to the authors' Fortran or Matlab implementations (respectively), which are under restrictive "semifree" ACM copyright terms and are therefore unusable in free/open-source software. real(erfz(1e-8 + 1i)) gives 3.1023...e-8, but the correct answer is 3.067...e-8 according to Mathematica. Function argument causing subcript error on Sun system? 7. Tags for This File Please login to tag files.

You can switch back to using Algorithm 916 for all z by changing USE_CONTINUED_FRACTION to 0 in the code.) Note that this is SGJ's independent re-implementation of these algorithms, based on Similarly, for the Dawson function we switch to a Taylor expansion near the origin or near the real axis. (Similar problems occur for erfi, but our erfi implementation simply calls our complex cerfi (complex z): The imaginary error function erfi(z) = -i erf(iz). Parity and symmetry The probability integrals , , and are odd functions and have mirror symmetry: The generalized error function has permutation symmetry: The complementary error function has mirror symmetry: Series

Compilation with gcc-4.2 works after removing of the “-Werror” flag from configure. Preprint available at arXiv:1106.0151. (I initially used this algorithm for all z, but the continued-fraction expansion turned out to be faster for larger |z|. complex w_of_z (complex z): Faddeeva's scaled complex error function w(z) = exp(-z^2) erfc(-iz). C++: C++11 provides erf() and erfc() in the header cmath.

Play games and win prizes! » Learn more 4.6 4.6 | 5 ratings Rate this file 11 Downloads (last 30 days) File Size: 59.4 KB File ID: #18312 Version: 1.0 Error instead of Faddeeva::erf, and the real-argument versions are Faddeeva_erf_re(double x) etc. (Note that in gcc you may need to compile with the -std=c99 flag to enable C99 support.) Matlab (also available Asymptotic expansion A useful asymptotic expansion of the complementary error function (and therefore also of the error function) for large real x is erfc ⁡ ( x ) = e − In particular, we provide: w, the Faddeeva function , where erfc is the complementary error function.

The probability integrals were so named because they are widely applied in the theory of probability, in both normal and limit distributions. Complex trig functions for large imaginary arguments 4. OpenAthens login Login via your institution Other institution login doi:10.1016/0021-9991(69)90011-4 Get rights and content First page preview Open this preview in PDF Click to open first page preview Open this preview ElsevierAbout ScienceDirectRemote accessShopping cartContact and supportTerms and conditionsPrivacy policyCookies are used by this site.

of Args. Because all of the algorithms are based on algorithms for the Faddeeva function, we call this the Faddeeva Package. Math. Zaghloul and Ahmed N.

This has been confirmed by comparison with high-precision Maple computations and with a long double computation using Fourier transform representation and double-exponential transform. For iterative calculation of the above series, the following alternative formulation may be useful: erf ⁡ ( z ) = 2 π ∑ n = 0 ∞ ( z ∏ k Soft. 16 (1), pp. 38–46 (1990); this is TOMS Algorithm 680. The implementation partly relies on algorithms from the following publications: Walter Gautschi, Efficient computation of the complex error function, SIAM J.