Next Article in Journal
Geometric Brownian Motion (GBM) of Stock Indexes and Financial Market Uncertainty in the Context of Non-Crisis and Financial Crisis Scenarios
Next Article in Special Issue
A Two-Domain MATLAB Implementation for Efficient Computation of the Voigt/Complex Error Function
Previous Article in Journal
New Concepts of Vertex Covering in Cubic Graphs with Its Applications
Previous Article in Special Issue
Super-Accuracy Calculation for the Half Width of a Voigt Profile
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Highly Accurate Evaluation of the Voigt/Complex Error Function with Small Imaginary Argument

School of Energy and Environment, Southeast University, Nanjing 210096, China
*
Author to whom correspondence should be addressed.
Mathematics 2022, 10(3), 308; https://doi.org/10.3390/math10030308
Submission received: 12 December 2021 / Revised: 9 January 2022 / Accepted: 14 January 2022 / Published: 19 January 2022
(This article belongs to the Special Issue Applied Mathematics in Astrophysics and Space Science)

Abstract

:
A rapidly convergent series, based on Taylor expansion of the imaginary part of the complex error function, is presented for highly accurate approximation of the Voigt/complex error function with small imaginary argument y ≤ 0.1. Error analysis and run-time tests in double-precision arithmetic reveals that in the real and imaginary parts, the proposed algorithm provides an average accuracy exceeding 10−15 and 10−16, respectively, and the calculation speed is as fast as that reported in recent publications. An optimized MATLAB code providing rapid computation with high accuracy is presented.

Graphical Abstract

1. Introduction

The complex error function, also known as the Faddeeva function, is given by: [1,2]
w ( z ) = e z 2 erfc ( i z ) = e z 2 ( 1 + 2 i π 0 z e t 2 d t ) ,
where z = x + iy is the complex argument and y ≥ 0. Using the Fourier transforms, the real and imaginary parts of the complex error function (1) can be represented as [3]:
K ( x , y ) = 1 π 0 + exp ( 1 4 t 2 ) exp ( y t ) cos ( x t ) d t ,
and
L ( x , y ) = 1 π 0 + exp ( 1 4 t 2 ) exp ( y t ) sin ( x t ) d t ,
respectively. The real part of the complex error function K(x, y) also known as the Voigt function, occurs in great diversity in astrophysical spectroscopy, space science, neutron physics, plasma physics and statistical communication theory, as well as in some areas in mathematical physics and engineering associated with multi-dimensional analysis of spectral harmonics [4,5,6,7,8,9,10,11,12,13,14,15,16]. For example, the Voigt function is a fundamental component of the line-by-line (LBL) radiative transfer modeling for the analysis of planetary atmospheres [5,6,7].
Since there is no closed-form solution for the integrals above, many modern “state-of-the art” algorithms for evaluating the Voigt/complex error function utilizing sophisticated numerical techniques have been discussed in numerous papers. Several highly accurate algorithms [17,18,19] or arbitrary precision algorithms [20,21] have been proposed to give the benchmark value. Unfortunately, these algorithms are not suitable for large-scale computing applications such as high resolution LBL radiative transfer modeling [22], given their disadvantage of high computational cost. Therefore, pseudo-Voigt approximation [23,24,25], using a linear combination of a Gaussian function and a Lorentzian function instead of their convolution, is often used for calculations of experimental spectral line shapes, due to its high computational efficiency. As is evident, this approximation algorithm is fast but has a reduced accuracy. Moreover, the accuracy of pseudo-Voigt approximation, to the best of the authors’ knowledge, is typically between 1% and 0.1%.
The rational approximation method is particularly attractive and is used in many algorithms, because they can be implemented efficiently and allow for high accuracy [26]. The rational approximations algorithms “cpf12” [27] and “w4” [28] proposed by Humlicek appear to belong to the most popular complex error function algorithms and several modified algorithms [29,30,31] based on Humlicek’s algorithms have been further developed to improve the calculation accuracy or expand the scope of application. Humlicek’s algorithms and its modified algorithms provide accuracy chosen between 10−2 and 10−6 for almost the entire complex plane, except for very small imaginary values of the argument. Recently, several high-accuracy algorithms, i.e., “fexp” [32,33], “voigtf” [34] and “fadsamp” [35], proposed by Abrarov and his collaborators were developed to achieve highly accurate and simultaneously rapid computation of Voigt/complex error function. The accuracy of the “fexp” algorithm based on Fourier expansion of the exponential multiplier for the real and imaginary parts of the complex error function are 10−9 and 10−8, respectively, in Humlicek regions 3 and 4. The accuracy of the “voigtf” algorithm with 16 summation terms of rational fraction for the Voigt function is better than 10−8 in the domain of y > 10−6. However, the accuracy of both “fexp” algorithm and “voigtf” algorithm deteriorate significantly with decreasing y. Compared with the former two algorithms, the “fadsamp” algorithm based on incomplete cosine expansion of the sinc function sustains high accuracy (~10−13) in computation at smaller values of the parameter y that is commonly considered difficult for computation of the Voigt/complex error function. However, the “fadsamp” algorithm needs at least 24 terms to achieve the accuracy of 10−13, which is not conducive to fast calculation.
According to the above analysis, almost all algorithms will face the challenge of accurate calculation of Voigt/complex error function with small y. Recently, Abrarov and Quine [36] proposed an efficient algorithm (the accuracy is better than 10−12 while y < 10−6) based on the Maclaurin expansion of the exponential function to overcome its notorious difficulty. Although this approximation is sufficient for the most practical tasks, the more accurate yet efficient approximation for the Voigt and complex error function may also be required in modern precision spectroscopy [37].
In this work we propose a new algorithm for highly accurate evaluation of the Voigt/complex error function with small imaginary argument (y ≤ 0.1) based on the Taylor expansion method. By adding a finite term, this algorithm can be easily extended to arbitrary precision. We applied MATLAB R2019a supporting array programming features to implement the numerical verification of this algorithm, and a typical desktop computer Intel (R) Quad CPU with RAM 8.00 GB was utilized. The rest of the paper is organized as follows: Section 2 details the theory and methods of the proposed approximation scheme. Algorithmic implementation and results discussion are carried out to validate the proposed approximation scheme in Section 3 and Section 4, respectively. The paper is finally summarized in Section 5.

2. Theory and Methods

2.1. Evaluation for the Imaginary Part L(x, y)

The n-order partial derivatives of L(x, y) with respect to y can be written as follows
n L ( x , y ) y n = 1 π 0 + exp ( 1 4 t 2 ) d n exp ( y t ) d y n sin ( x t ) d t = ( 1 ) n π 0 + t n exp ( 1 4 t 2 y t ) sin ( x t ) d t .
By substituting y = 0 into the integral above, the n-order partial derivatives along the x axis yields:
n L ( x , 0 ) y n = ( 1 ) n π 0 + t n exp ( 1 4 t 2 ) sin ( x t ) d t .
While n is an odd number, the integral (5) has an analytic solution as follows [38]:
n L ( x , 0 ) y n = ( 1 ) ( n + 1 ) / 2 exp ( x 2 ) H n ( x ) for   n   odd ,
where Hn(x) represents the n-order Hermite polynomials of real argument x:
H n ( x ) = h n , 0 x + h n , 1 x 3 + + h n , ( n 1 ) / 2 x n = k = 0 ( n 1 ) / 2 h n , k x 2 k + 1 ,
where the coefficients are:
h n , k = ( 1 ) n 1 2 k n ! ( ( n 1 ) / 2 k ) ! ( 2 k + 1 ) ! 2 2 k + 1 .
There is no closed-form solution for the integral (5), while n is an even number, however, we have proved that the even-order partial derivatives can be expressed in terms of the Dawson’s integral D(x) of real argument x as follows (Appendix A):
n L ( x , 0 ) y n = 1 π ( P n / 2 ( x ) D ( x ) + Q n / 2 ( x ) ) for   n   even ,
where the Dawson’s integral D(x) is defined as:
D ( x ) = 1 2 0 + exp ( 1 4 t 2 ) sin ( x t ) d t ,
and Pn/2(x), Qn/2(x) are polynomials of real argument x:
P n / 2 ( x ) = p n / 2 , 0 + p n / 2 , 1 x 2 + + p n / 2 , n / 2 x n = k = 0 n / 2 p n / 2 , k x 2 k ,
and
Q n / 2 ( x ) = q n / 2 , 0 x + q n / 2 , 1 x 3 + + q n / 2 , n / 2 1 x n 1 = k = 0 n / 2 1 q n / 2 , k x 2 k + 1 ,
where the coefficients pn/2,k and qn/2,k can be derived from the following recurrence relations
P m ( x ) = 2 4 8 x 2 ( 8 m 6 4 x 2 ) P m 1 ( x ) 8 ( m 1 ) ( 2 m 3 ) P m 2 ( x ) m = 0 m = 1 m 2 ,
and
Q m ( x ) = 0 4 x ( 8 m 6 4 x 2 ) Q m 1 ( x ) 8 ( m 1 ) ( 2 m 3 ) Q m 2 ( x ) m = 0 m = 1 m 2 ,
respectively. It should be noted that the calculation of the Dawson’s integral D(x) is not difficult and several efficient approximations that can provide rapid and highly accurate computation are reported in the literature [39,40,41,42]. In this work, a finite continued fraction is used for the efficient calculation of Dawson’s integral [39]:
D ( x ) F ( x , N D ) = x 1 + 2 x 2 4 x 2 3 + 2 x 2 8 x 2 5 + 2 x 2 12 x 2 7 + 2 x 2 4 N D x 2 2 N D + 1 + 2 x 2 ,
where ND is the number of terms considered in the continued fraction above. Consequently, the imaginary part L(x, y) of the complex error function can be represented as the following Taylor expansion series near y = 0:
L ( x , y ) = n = 0 1 n ! n L ( x , 0 ) y n y n = n = 0 [ 1 ( 2 n ) ! π ( P n ( x ) F ( x , M ) + Q n ( x ) ) y 2 n + ( 1 ) n + 1 ( 2 n + 1 ) ! e x 2 H 2 n + 1 ( x ) y 2 n + 1 ] .
By calculating the first N + 1 terms of Equation (16) and extracting the common factors D(x) and exp(−x2), which is the ‘‘slowest’’ array for computation, outside the formula, an efficient approximation for the imaginary part L(x, y) is yielded as follows:
L ( x , y ) 1 π F ( x , N D ) n = 0 N α n x 2 n + x e x 2 n = 0 N β n x 2 n + 1 π x n = 0 N 1 γ n x 2 n ,
where the coefficients are:
α n = m = n N 1 ( 2 m ) ! p m , n y 2 m , β n = m = n N ( 1 ) m + 1 ( 2 m + 1 ) ! h 2 m + 1 , n y 2 m + 1 , γ n = m = n + 1 N 1 ( 2 m ) ! q m , n y 2 m .

2.2. Evaluation for the Real Part K(x, y)

The 1-order partial derivatives of L(x, y) with respect to y can be written as follows:
L ( x , y ) y = 1 π 0 + t exp ( 1 4 t 2 y t ) sin ( x t ) d t . = 2 y π 0 exp ( t 2 4 ) exp ( y t ) sin ( x t ) d t 2 x π 0 exp ( t 2 4 ) exp ( y t ) cos ( x t ) d t = 2 y L ( x , y ) 2 x K ( x , y ) .
Thus the real part K(x, y) of complex error function can be represented as:
K ( x , y ) = y x L ( x , y ) 1 2 x L ( x , y ) y .
Consequently, an efficient approximation for K(x, y) is obtained by substituting Equation (17) into Equation (20):
K ( x , y ) 1 π 1 x F ( x , N D ) n = 0 N α n x 2 n + e x 2 n = 0 N β n x 2 n + 1 π n = 0 N 1 γ n x 2 n 1 π α 0 + e x 2 β 0 + 1 π γ 0 for for x > 0 x = 0 ,
where the coefficients α n , β n and γ n are:
α n = y α n 1 2 m = n N sign ( m ) ( 2 m sign ( m ) ) ! p m , n y 2 m 1 , β n = y β n 1 2 m = n N ( 1 ) m + 1 ( 2 m ) ! h 2 m + 1 , n y 2 m , γ n = y γ n 1 2 m = n + 1 N 1 ( 2 m 1 ) ! q m , n y 2 m 1 .

3. Algorithmic Implementation

3.1. Evaluation Scheme

Many previous studies have claimed that for z with large absolute value, the truncation of the Laplace continued fraction (LCF) [17,18]:
w ( z ) C ( z , N C ) = i / π z 1 / 2 z 1 z 3 / 2 z N C / 2 z ,
where NC is the number of terms considered in the LCF, can be effectively used for high-accuracy and rapid computation of the complex error function w(z).
However, we note that when y is quite small, the convergence speed of LCF is significantly reduced, even if |z| is large enough, which require a lot of calculation, leading to a serious decline in computational efficiency. For example, the approximation accuracy of Equation (23) with y = 1 × 10−20 at different NC is as shown in Figure 1a, in which the relative errors of Equation (23) are defined as follows:
Δ C ( | z | , N C ) = max { | Re [ C ( z , N C ) ] Re [ w ref . ( z ) ] | Re [ w ref . ( z ) ] , | Im [ C ( z , N C ) ] Im [ w ref . ( z ) ] | Im [ w ref . ( z ) ] } ,
where the highly accurate reference values of wref.(z) can be obtained according to Equation (1) by using the MATLAB that supports the error function of a complex argument.
As we can see from Figure 1a, the relative errors at |z| = 8 are still greater than 1 × 10−6, even if NC is increased to 1000. Fortunately, the approximation accuracy of Equation (23) with y = 1 × 10−20 increases significantly with increasing |z|, i.e., only the first 100 terms need to be taken, and the truncation of the LCF can reach the approximation accuracy of 10−100 when |z|> 16.8. Therefore, it is important to determine the efficient computing boundary of the LCF approximations, especially when y is small. The numerical calculation results illustrate that if it is desired to achieve the selected precision ε efficiently, the absolute value of argument z needs to be greater than a certain boundary zε(y) which is determined by y and ε together and can be written as follow
z ε ( y ) = min | z | Δ C ( | z | , N C ) ε .
Figure 1b shows the zε(y) curves with selected accuracy of ε = 10−16, 10−20, 10−40, 10−60, 10−80 and 10−100, respectively, and the efficient computing boundary in the domain y ≤ 0.1 can be approximately calculated with the following formulas in Table 1. Thus, in order to improve the calculation efficiency, we use the following scheme to calculate the Voigt/complex error function with small imaginary argument:
w ( x , y 0.1 ) Equations   ( 17 )   and   ( 21 ) Equation   ( 23 ) for for | x + i y | < z ε ( y ) | x + i y | z ε ( y ) , .
In addition, Figure 1b demonstrates that when only the calculation of the complex error function in the domain of 10−100y ≤ 0.1 is considered, and the selected accuracy ε is no less than 10−100, the following simplified version of calculation scheme can be adopted:
w ( x , 10 100 y 0.1 ) Equations   ( 17 )   and   ( 21 ) Equation   ( 23 ) for for | x + i y | < 22 | x + i y | 22 , .

3.2. Parameters Optimization

In general, the accuracy of the evaluation scheme (26) or (27) will be improved with the increase in parameters N, ND and NC. The numerical calculations, as seen in Figure 2a, show that the significant number of Dawson’s integral calculated by Equation (15) increases linearly with increasing ND, which indicates that the Dawson’s integral can efficiently perform arbitrary precision calculations. Moreover, we note that the evaluation scheme (26) or (27) has a limit accuracy related to y, even if the error caused by Dawson’s integral is ignored (see Figure 2b). Taking y = 10−4 as an example, the significant number of the Voigt/complex error function increases linearly with increasing N when N is less than 12. In contrast, when N is greater than 12, the calculation efficiency is significantly reduced. Numerical calculations suggest that greater N, ND and NC are unnecessary in some cases, we may select the optimal parameters to minimize the number of terms in the evaluation scheme (26) or (27) in order to gain computational acceleration. In this work, the optimal parameters under different accuracy levels ∆=1 × 10−100 and ∆=1 × 10−16 of the evaluation scheme (27) are shown in Table 2 and Table 3, respectively.

4. Results and Discussion

4.1. Error Analysis in Multi-Precision Arithmetic

Table 1 shows that the accuracy of evaluation scheme (27) can reach 1.9055 × 10−44 when 1 × 10−100y ≤ 0.1, and the limit accuracy is better than 1 × 10−100 when 1 × 10−100y < 1.5849 × 10−4, which indicates that this evaluation scheme can provide highly accurate values of Voigt/complex error function with small imaginary argument, against which the accuracy achieved by fast algorithms maybe benchmarked. By contrast, Boyer and Lynas-Gray [20] used the multi-precision algorithm to calculate the high precision benchmark value of Voigt/complex error function with a maximum absolute error in both Re [w(z)] and Im [w(z)] of 10−100 for |z| ≤ 40. What is unfortunate is that Boyer and Lynas-Gray’s algorithm requires a high number of calculation bits (2000 bits) to reduce the cancellation and smearing errors, since the first 5000 terms of a series need to be calculated.

4.2. Error Analysis in Double-Precision Arithmetic

Since double-precision floating-point arithmetic is commonly used in many science computing and engineering applications, the error analysis and run-time tests of evaluation scheme (26) in double-precision arithmetic is needed. In order to quantify the accuracy of evaluation scheme (26), it is convenient to define the relative error of Re [w(z)] and Im [w(z)] as
Δ Re ( z ) = Re [ w ( z ) ] Re [ w ref . ( z ) ] Re [ w ref . ( z ) ] , Δ Im ( z ) = Im [ w ( z ) ] Im [ w ref . ( z ) ] Im [ w ref . ( z ) ] .
Since the significant figure of double-precision calculation is 16 bits, the efficient computing boundary for ε = 10−16 in Table 1 is selected to distinguish the internal and external calculation domain (see Figure 3a). The parameters N and ND in the internal calculation domain are shown in Table 3 and the parameter NC for truncation of the Laplace continued fraction in the external calculation domain is shown in Figure 3b.
Figure 4 shows log10Re for the real part of the complex error function computed over the domain 0 ≤ x ≤40,000 ∩ 10−100y ≤ 0.1. As we can see from this figure, the evaluation scheme (26) provides accuracy better than 10−15 (green color) over the most of this domain. Although accuracy deteriorates in the neighborhood of the efficient computing boundary (see Figure 4a), it remains better than 10−13 (red color).
Figure 5 illustrates log10Im for the imaginary part of the complex error function also computed over the domain 0 ≤ x ≤40,000 ∩ 10−100y ≤ 0.1. As we can see from this figure, the evaluation scheme (26) provides accuracy better than 10−16 (blue color) over the most domain. Unlike the approximation for the real part, the evaluation scheme (26), also highly accurate in the neighborhood of the efficient computing boundary and the computational test, reveals that the worst accuracy is better than 10−15 (green color). One can see that the accuracy of the imaginary part is at least one order of magnitude better than the real part, which can be explained from the fact that Equation (21) is derived from Equation (17) and derivative operation enlarges calculation error.
In Figure 6a, we compare the maximum relative error eRe(y) = max{ΔRe(x+iy) | 0 ≤ x ≤ 4000} as a function of y for the real part of the complex error function. Obviously, the calculation accuracy of “fexp” algorithm deteriorates further with decreasing y and the maximum relative error even reaches 100% when y < 10−14. The calculation accuracy of “voigtf” algorithm is better than 10−9 when y > 10−5, however, similar to “fexp” algorithm, the calculation error increases rapidly with the decrease in y when y < 10−5. When y > 10−12, “fadsamp” algorithm can achieve 10−13 calculation accuracy, however, when y < 10−12, the accuracy of this algorithm also fails. It can be seen that these algorithms have their own advantages and disadvantages; it has the benefit of a specific scope, but also needs further improvement. The common point of these algorithms is that they are not suitable for the high precision evaluation of the real part of the complex error function with small imaginary argument. Compared with to the “fexp”, “voigtf” and “fadsamp” algorithms, our new algorithm, based on evaluation scheme (26), has been significantly improved. The calculation error of the proposed algorithm in this work increases slightly with the decrease in y and the maximum relative error eRe(y) in the domain 10−100y ≤ 0.1 is better than 2.93 × 10−13.
In Figure 6b we compare the maximum relative error eIm(y) = max{ΔIm(x+iy) | 0 ≤ x ≤ 4000} as a function of y for the imaginary part of the complex error function. Fortunately, the “fexp” algorithm and “fadsamp” algorithm, as well as the proposed algorithm in this work, can achieve high-precision calculation for the imaginary part of the complex error function. Compared with the existing algorithms, the proposed algorithm has higher accuracy and the average value of the maximum relative error eIm(y) in the domain 10−100y ≤ 0.1 is 4.91 × 10−16.

4.3. Preliminary Run-Time Tests with MATLAB

To obtain a first impression about the performance of the various approximations, we have used MATLAB’s built-in function “tic/toc” to evaluate the calculation speed of these algorithms. Figure 7 summarizes the results of these numerical experiments. A computational test reveals that with 1 million random numbers in different y within the internal domain |z| < 22, our algorithm is faster than “fexp” and “fadsamp” by a factor of 1.91 and 2.21, respectively (the average computing time of these algorithms is 0.33 s, 0.63 s and 0.73 s, respectively) and the “voigtf” algorithm (0.22 s) is the fastest. In the external domain 22 ≤ |z| ≤ 4000, the proposed algorithm has the highest computational efficiency, and the calculation speed is faster than “fexp”, “fadsamp” and “voigtf” algorithm by a factor of 1.44, 1.44 and 1.22, respectively (the average computing time of these algorithms is 0.18 s, 0.26 s, 0.26 s and 0.22 s, respectively). The preliminary run-time tests show that our algorithm, is as fast as those reported in recent publications.

5. Conclusions

In this work we present an efficient approximation for the Voigt/complex error function that can be used for computation at small y ≤ 0.1. Error analysis and run-time tests in double-precision arithmetic reveal that in the real and imaginary parts of the proposed algorithm provide an average accuracy exceeding 10−15 and 10−16, respectively, and the calculation speed is as fast as that of reported in recent publications. Since the evaluation scheme (26) or (27) is a general expression, the desired accuracy can be easily achieved by choosing reasonable parameters. In particular, the optimal parameters under different accuracy levels ∆ = 1 × 10−100 and ∆ = 1 × 10−16 of evaluation scheme (27) are shown in Table 2 and Table 3, respectively, in order to gain computational acceleration. An optimized MATLAB code base on this work can be downloaded from the MATLAB Central website: https://www.mathworks.com/matlabcentral/fileexchange/75134-computing-of-voigt-complex-error-function-with-small-y (accessed on 7 January 2022).

Author Contributions

Conceptualization, Y.W.; methodology, Y.W.; MATLAB code, Y.W., B.W., R.Z., Q.L. and M.D.; validation, Y.W. and B.W.; formal analysis, Y.W.; investigation, Y.W. and B.Z.; writing—original draft preparation, Y.W.; writing—review and editing, B.Z.; visualization, Y.W., B.W., R.Z., Q.L. and M.D.; supervision, B.Z.; funding acquisition, B.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Key Research and Development Program of China, grant number 2017YFB0603204.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The 0-order and 2-order partial derivatives of L(x, y) with respect to y are expressed in terms of the Dawson’s integral D(x) of real argument x as follows:
L ( x , 0 ) = 2 π D ( x ) ,
2 L ( x , 0 ) y 2 = 1 π ( ( 4 8 x 2 ) D ( x ) + 4 x ) .
We note that the even-order partial derivatives of L(x, y) with respect to y satisfies the following recurrence relation:
2 m L ( x , 0 ) y 2 m = ( 8 m 6 4 x 2 ) 2 m 2 L ( x , 0 ) y 2 m 1 8 ( m 1 ) ( 2 m 3 ) 2 m 4 L ( x , 0 ) y 2 m 4 , m 2 .
Thus Equations (9)–(14) can be easily derived from the above equation. It should be noted that the coefficients pn/2,k have the following simple expression:
p n / 2 , k = ( 1 ) k n ! 2 k + 1 ( n / 2 k ) ! k ! ( 2 k s i g n ( k ) ) ! ! .
However, we did not find a simple expression for the coefficients qn/2,k. Instead, the coefficients qn/2,k (N ≤ 7) is given as shown in the following Table A1 according to the recurrence relation.
Table A1. The coefficients qn/2,k (N ≤ 7).
Table A1. The coefficients qn/2,k (N ≤ 7).
k = 0k = 1k = 2k = 3k = 4k = 5k = 6
n/2 = 00000000
n/2 = 14000000
n/2 = 240−1600000
n/2 = 3528−448640000
n/2 = 48928−11,8403456−256000
n/2 = 5185,280−337,920150,528−22,528102400
n/2 = 64,567,680−10,671,3606,429,696−1,456,128133,120−40960
n/2 = 7130,556,160−373,416,960284,691,456−86,630,40011,939,840−737,28016,384

References

  1. Mohankumar, N.; Sen, S. On the very accurate evaluation of the Voigt functions. J. Quant. Spectrosc. Radiat. Transf. 2018, 224, 192–196. [Google Scholar] [CrossRef]
  2. Armstrong, B. Spectrum line profiles: The Voigt function. J. Quant. Spectrosc. Radiat. Transf. 1967, 7, 61–88. [Google Scholar] [CrossRef]
  3. Pagnini, G.; Mainardi, F. Evolution equations for the probabilistic generalization of the Voigt profile function. J. Comput. Appl. Math. 2010, 233, 1590–1595. [Google Scholar] [CrossRef] [Green Version]
  4. Li, J.; Yu, Z.; Du, Z.; Ji, Y.; Liu, C. Standoff Chemical Detection Using Laser Absorption Spectroscopy: A Review. Remote. Sens. 2020, 12, 2771. [Google Scholar] [CrossRef]
  5. Quine, B.M.; Drummond, J.R. GENSPECT: A line-by-line code with selectable interpolation error tolerance. J. Quant. Spectrosc. Radiat. Transf. 2002, 74, 147–165. [Google Scholar] [CrossRef]
  6. Siddiqui, R.; Jagpal, R.K.; Abrarov, S.M.; Quine, B.M. Efficient Application of the Radiance Enhancement Method for Detection of the Forest Fires Due to Combustion-Originated Reflectance. J. Environ. Prot. 2021, 12, 717–733. [Google Scholar] [CrossRef]
  7. Siddiqui, R.; Jagpal, R.K.; Abrarov, S.M.; Quine, B.M. Radiance enhancement and shortwave upwelling radiative flux methods for efficient detection of cloud scenes. Int. J. Space Sci. Eng. 2020, 6, 1–27. [Google Scholar] [CrossRef]
  8. Wang, Y.; Zhou, B.; Liu, C. Calibration-free wavelength modulation spectroscopy based on even-order harmonics. Opt. Express 2021, 29, 26618. [Google Scholar] [CrossRef]
  9. Wang, Y.; Zhou, B.; Liu, C. Sensitivity and Accuracy Enhanced Wavelength Modulation Spectroscopy Based on PSD Analysis. IEEE Photon.-Technol. Lett. 2021, 33, 1487–1490. [Google Scholar] [CrossRef]
  10. Enemali, G.; Zhang, R.; McCann, H.; Liu, C. Cost-Effective Quasi-Parallel Sensing Instrumentation for Industrial Chemical Species Tomography. IEEE Trans. Ind. Electron. 2021, 69, 2107–2116. [Google Scholar] [CrossRef]
  11. Khan, S.; Agrawal, B.; Pathan, M. Some connections between generalized Voigt functions with the different parameters. Appl. Math. Comput. 2006, 181, 57–64. [Google Scholar] [CrossRef]
  12. Bao, Y.; Zhang, R.; Enemali, G.; Cao, Z.; Zhou, B.; McCann, H.; Liu, C. Relative Entropy Regularized TDLAS Tomography for Robust Temperature Imaging. IEEE Trans. Instrum. Meas. 2021, 70, 1–9. [Google Scholar] [CrossRef]
  13. Wang, Y.; Zhou, B.; Zhao, R.; Wang, B.; Liu, Q.; Dai, M. Super-Accuracy Calculation for the Half Width of a Voigt Profile. Mathematics 2022, 10, 210. [Google Scholar] [CrossRef]
  14. Li, R.; Li, F.; Lin, X.; Yu, X. Error Analysis of Integrated Absorbance for TDLAS in a Nonuniform Flow Field. Appl. Sci. 2021, 11, 10936. [Google Scholar] [CrossRef]
  15. Wang, Z.; Fu, P.; Chao, X. Laser Absorption Sensing Systems: Challenges, Modeling, and Design Optimization. Appl. Sci. 2019, 9, 2723. [Google Scholar] [CrossRef] [Green Version]
  16. Ma, L.; Duan, K.; Cheong, K.P.; Yuan, C.; Ren, W. Multispectral infrared absorption spectroscopy for quantitative temperature measurements in axisymmetric laminar premixed sooting flames. Case Stud. Therm. Eng. 2021, 28, 101575. [Google Scholar] [CrossRef]
  17. Poppe, G.P.M.; Wijers, C.M.J. Algorithm 680: Evaluation of the complex error function. ACM Trans. Math. Softw. 1990, 16, 47. [Google Scholar] [CrossRef]
  18. Poppe, G.P.M.; Wijers, C.M.J. More efficient computation of the complex error function. ACM Trans. Math. Softw. 1990, 16, 38–46. [Google Scholar] [CrossRef] [Green Version]
  19. Zaghloul, M.R.; Ali, A.N. Algorithm 916: Computing the Faddeyeva and Voigt Functions. ACM Trans. Math. Softw. 2011, 38, 1–22. [Google Scholar] [CrossRef]
  20. Boyer, W.; Lynas-Gray, A.E. Evaluation of the Voigt function to arbitrary precision. Mon. Not. R. Astron. Soc. 2014, 444, 2555–2560. [Google Scholar] [CrossRef]
  21. Molin, P. Multi-Precision Computation of the Complex Error Function. 2011. Available online: https://hal.archives-ouvertes.fr/hal-00580855 (accessed on 26 December 2021).
  22. Bailey, J.; Kedziora-Chudczer, L. Modelling the spectra of planets, brown dwarfs and stars using vstar. Mon. Not. R. Astron. Soc. 2011, 419, 1913–1929. [Google Scholar] [CrossRef] [Green Version]
  23. Liu, Y.; Lin, J.; Huang, G.; Guo, Y.; Duan, C. Simple empirical analytical approximation to the Voigt profile. J. Opt. Soc. Am. B 2001, 18, 666–672. [Google Scholar] [CrossRef]
  24. Di Rocco, H.; Cruzado, A. The Voigt Profile as a Sum of a Gaussian and a Lorentzian Functions, when the Weight Coefficient Depends Only on the Widths Ratio. Acta Phys. Pol. A 2012, 122, 666–669. [Google Scholar] [CrossRef]
  25. Ida, T.; Ando, M.; Toraya, H. Extended pseudo-Voigt function for approximating the Voigt profile. J. Appl. Crystallogr. 2000, 33, 1311–1316. [Google Scholar] [CrossRef]
  26. Schreier, F. The Voigt and complex error function: Humlicek’s rational approximation generalized. Mon. Not. R. Astron. Soc. 2018, 479, 3068–3075. [Google Scholar] [CrossRef]
  27. Humlíček, J. An efficient method for evaluation of the complex probability function: The Voigt function and its derivatives. J. Quant. Spectrosc. Radiat. Transf. 1979, 21, 309–313. [Google Scholar] [CrossRef]
  28. Humlíček, J. Optimized computation of the voigt and complex probability functions. J. Quant. Spectrosc. Radiat. Transf. 1982, 27, 437–444. [Google Scholar] [CrossRef]
  29. Imai, K.; Suzuki, M.; Takahashi, C. Evaluation of Voigt algorithms for the ISS/JEM/SMILES L2 data processing system. Adv. Space Res. 2009, 45, 669–675. [Google Scholar] [CrossRef]
  30. Tennyson, J.; Bernath, P.F.; Campargue, A.; Császár, A.G.; Daumont, L.; Gamache, R.R.; Hodges, J.T.; Lisak, D.; Naumenko, O.V.; Rothman, L.; et al. Recommended isolated-line profile for representing high-resolution spectroscopic transitions (IUPAC Technical Report). Pure Appl. Chem. 2014, 86, 1931–1943. [Google Scholar] [CrossRef] [Green Version]
  31. Tran, H.; Ngo, N.; Hartmann, J.-M. Efficient computation of some speed-dependent isolated line profiles. J. Quant. Spectrosc. Radiat. Transf. 2013, 129, 199–203. [Google Scholar] [CrossRef]
  32. Abrarov, S.; Quine, B.; Jagpal, R. High-accuracy approximation of the complex probability function by Fourier expansion of exponential multiplier. Comput. Phys. Commun. 2010, 181, 876–882. [Google Scholar] [CrossRef]
  33. Abrarov, S.; Quine, B.; Jagpal, R. Rapidly convergent series for high-accuracy calculation of the Voigt function. J. Quant. Spectrosc. Radiat. Transf. 2010, 111, 372–375. [Google Scholar] [CrossRef]
  34. Abrarov, S.M.; Quine, B.M. A rational approximation for efficient computation of the Voigt function in quantitative spectroscopy. J. Math. Res. 2015, 7, 163–174. [Google Scholar] [CrossRef]
  35. Abrarov, S.M.; Quine, B.M.; Jagpal, R.K. A sampling-based approximation of the complex error function and its implementation without poles. Appl. Numer. Math. 2018, 129, 181–191. [Google Scholar] [CrossRef] [Green Version]
  36. Abrarov, S.M.; Quine, B.M. Accurate Approximations for the Complex Error Function with Small Imaginary Argument. J. Math. Res. 2015, 7, 44–53. [Google Scholar] [CrossRef]
  37. Rutkowski, L.; Maslowski, P.; Johansson, A.C.; Khodabakhsh, A.; Foltynowicz, A. Optical frequency comb Fourier transform spectroscopy with sub-nominal resolution and precision beyond the Voigt profile. J. Quant. Spectrosc. Radiat. Transf. 2018, 204, 63–73. [Google Scholar] [CrossRef]
  38. Gradshteĭn, I.S.; Ryzhik, I.M. Table of Integrals, Series, and Products; Academic Press: Cambridge, MA, USA, 2014. [Google Scholar]
  39. McCabe, J.H. A continued fraction expansion, with a truncation error estimate, for Dawson’s integral. Math. Comput. 1974, 28, 811–816. [Google Scholar] [CrossRef] [Green Version]
  40. Rybicki, G.B. Dawson’s integral and the sampling theorem. Comput. Phys. 1989, 3, 85–87. [Google Scholar] [CrossRef] [Green Version]
  41. Boyd, J. Evaluating of Dawson’s Integral by solving its differential equation using orthogonal rational Chebyshev functions. Appl. Math. Comput. 2008, 204, 914–919. [Google Scholar] [CrossRef]
  42. Abrarov, S.M.; Quine, B.M. A rational approximation of the Dawson’s integral for efficient computation of the complex error function. Appl. Math. Comput. 2018, 321, 526–543. [Google Scholar] [CrossRef] [Green Version]
Figure 1. (a) The approximation accuracy of Equation (23) with y = 1 × 10−20 at different NC and (b) the efficient computing boundary zε(y) with different selected accuracy.
Figure 1. (a) The approximation accuracy of Equation (23) with y = 1 × 10−20 at different NC and (b) the efficient computing boundary zε(y) with different selected accuracy.
Mathematics 10 00308 g001
Figure 2. (a) The maximum relative error ΔD of Dawson’s integral calculated by Equation (15) in the domain 0 ≤ x < 22 under different ND and (b) the maximum relative error Δw of Voigt/complex error function calculated by Equation (27) in the domain |x + iy| < 22 and 10−100y ≤ 0.1 under different N and y with the error caused by the Dawson’s integral is ignored (ND = 1000).
Figure 2. (a) The maximum relative error ΔD of Dawson’s integral calculated by Equation (15) in the domain 0 ≤ x < 22 under different ND and (b) the maximum relative error Δw of Voigt/complex error function calculated by Equation (27) in the domain |x + iy| < 22 and 10−100y ≤ 0.1 under different N and y with the error caused by the Dawson’s integral is ignored (ND = 1000).
Mathematics 10 00308 g002
Figure 3. (a) The evaluation scheme for Voigt/complex error function in double-precision arithmetic and (b) the parameter NC for truncation of the Laplace continued fraction in the external calculation domain.
Figure 3. (a) The evaluation scheme for Voigt/complex error function in double-precision arithmetic and (b) the parameter NC for truncation of the Laplace continued fraction in the external calculation domain.
Mathematics 10 00308 g003
Figure 4. The logarithm of the relative error log10Re for the real part of the evaluation scheme (26) over the domain (a) 0 ≤ x ≤20 ∩ 10−100y ≤ 0.1 and (b) 20 ≤ x ≤40,000 ∩ 10−100y ≤ 0.1, respectively.
Figure 4. The logarithm of the relative error log10Re for the real part of the evaluation scheme (26) over the domain (a) 0 ≤ x ≤20 ∩ 10−100y ≤ 0.1 and (b) 20 ≤ x ≤40,000 ∩ 10−100y ≤ 0.1, respectively.
Mathematics 10 00308 g004
Figure 5. The logarithm of the relative error log10Im for the imaginary part of the evaluation scheme (26) over the domain (a) 0 ≤ x ≤20 ∩ 10−100y ≤ 0.1 and (b) 20 ≤ x ≤ 40,000 ∩ 10−100y ≤ 0.1, respectively.
Figure 5. The logarithm of the relative error log10Im for the imaginary part of the evaluation scheme (26) over the domain (a) 0 ≤ x ≤20 ∩ 10−100y ≤ 0.1 and (b) 20 ≤ x ≤ 40,000 ∩ 10−100y ≤ 0.1, respectively.
Mathematics 10 00308 g005
Figure 6. The maximum relative error for the (a) real part and (b) imaginary part of complex error function.
Figure 6. The maximum relative error for the (a) real part and (b) imaginary part of complex error function.
Mathematics 10 00308 g006
Figure 7. Execution time (s) per algorithm evaluation with 1 million random numbers in different y within the (a) internal domain |z| < 22 and (b) external domain 22 ≤ |z| ≤ 4000, respectively. The tests have been performed on a typical desktop computer Intel(R) Quad CPU with RAM 8.00 GB. (Since the “voigtf” algorithm can only calculate the real part of the complex error function, the calculation time is doubled here to compare the calculation speed with other algorithms).
Figure 7. Execution time (s) per algorithm evaluation with 1 million random numbers in different y within the (a) internal domain |z| < 22 and (b) external domain 22 ≤ |z| ≤ 4000, respectively. The tests have been performed on a typical desktop computer Intel(R) Quad CPU with RAM 8.00 GB. (Since the “voigtf” algorithm can only calculate the real part of the complex error function, the calculation time is doubled here to compare the calculation speed with other algorithms).
Mathematics 10 00308 g007
Table 1. Approximation formulas for zε(y) (y ≤ 0.1).
Table 1. Approximation formulas for zε(y) (y ≤ 0.1).
εzε(y)
10−166.4908 − 6.9856 × 10−2 × lny − 1.8237 × 10−4 × ln2y − 3.0026 × 10−7 × ln3y
10−207.1461 − 6.5589 × 10−2 × lny − 1.6308 × 10−4 × ln2y − 2.6500 × 10−7 × ln3y
10−409.8625 − 5.0156 × 10−2 × lny − 9.3640 × 10−5 × ln2y − 1.3861 × 10−7 × ln3y
10−6011.9611 − 4.2288 × 10−2 × lny − 6.5582 × 10−5 × ln2y − 9.4912 × 10−8 × ln3y
10−8013.7687 − 3.6042 × 10−2 × lny − 3.6111 × 10−5 × ln2y − 3.1788 × 10−8 × ln3y
10−10015.3784 − 3.1655 × 10−2 × lny − 1.9984 × 10−5 × ln2y − 2.0282 × 10−9 × ln3y
Table 2. The optimal parameters N, ND, and NC with accuracy levels ∆ = 1 × 10−100.
Table 2. The optimal parameters N, ND, and NC with accuracy levels ∆ = 1 × 10−100.
yNNDNC
1 × 10−100 ≤ y < 6.3096 × 10−49134465<1 × 10−100
6.3096 × 10−49 ≤ y < 1.5849 × 10−24234465<1 × 10−100
1.5849 × 10−24 ≤ y < 1.5849 × 10−16334465<1 × 10−100
1.5849 × 10−16 ≤ y < 1.5849 × 10−12434465<1 × 10−100
1.5849 × 10−12 ≤ y < 3.9811 × 10−10534465<1 × 10−100
3.9811 × 10−10 ≤ y < 1.5849 × 10−8634465<1 × 10−100
1.5849 × 10−8 ≤ y < 1.5849 × 10−7734465<1 × 10−100
1.5849 × 10−7 ≤ y < 1.5849 × 10−6834465<1 × 10−100
1.5849 × 10−6 ≤ y < 6.3096 × 10−6934465<1 × 10−100
6.3096 × 10−6 ≤ y < 2.5119 × 10−51034465<1 × 10−100
2.5119 × 10−5 ≤ y < 6.3096 × 10−51134465<1 × 10−100
6.3096 × 10−5 ≤ y < 1.5849 × 10−41234465<1 × 10−100
1.5849 × 10−4 ≤ y < 3.9811 × 10−31325443* 7.7625 × 10−74
3.9811 × 10−3 ≤ y < 0.0251191419730* 4.8978 × 10−57
0.025119 ≤ y < 0.0630961516925* 1.2023 × 10−48
0.063096 ≤ y ≤ 0.11615422* 1.9055 × 10−44
* Represents the limit accuracy that can be achieved.
Table 3. The optimal parameters N, ND, and NC with accuracy levels ∆ = 1 × 10−16.
Table 3. The optimal parameters N, ND, and NC with accuracy levels ∆ = 1 × 10−16.
yNNDNC
1 × 10−100 ≤ y < 1 × 10−71616<1 × 10−16
1 × 10−7 ≤ y < 2.5119 × 10−42616<1 × 10−16
2.5119 × 10−4 ≤ y < 3.9811 × 10−33616<1 × 10−16
3.9811 × 10−3 ≤ y < 0.0158494616<1 × 10−16
0.015849 ≤ y < 0.0398115616<1 × 10−16
0.039811 ≤ y < 0.0630966616<1 × 10−16
0.063096 ≤ y ≤ 0.17616<1 × 10−16
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wang, Y.; Zhou, B.; Wang, B.; Zhao, R.; Liu, Q.; Dai, M. On the Highly Accurate Evaluation of the Voigt/Complex Error Function with Small Imaginary Argument. Mathematics 2022, 10, 308. https://doi.org/10.3390/math10030308

AMA Style

Wang Y, Zhou B, Wang B, Zhao R, Liu Q, Dai M. On the Highly Accurate Evaluation of the Voigt/Complex Error Function with Small Imaginary Argument. Mathematics. 2022; 10(3):308. https://doi.org/10.3390/math10030308

Chicago/Turabian Style

Wang, Yihong, Bin Zhou, Bubin Wang, Rong Zhao, Qi Liu, and Minglu Dai. 2022. "On the Highly Accurate Evaluation of the Voigt/Complex Error Function with Small Imaginary Argument" Mathematics 10, no. 3: 308. https://doi.org/10.3390/math10030308

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop