Preprint
Article

This version is not peer-reviewed.

Practical Method for log[erfc(a)] Approximation in the Extreme Tail

Submitted:

06 March 2026

Posted:

09 March 2026

You are already at the latest version

Abstract
Accurate evaluation of extremely small Gaussian tail probabilities is essential in statistical meta-analyses, in which large z-scores (often exceeding 8 or 9) must be converted into p-values. Meanwhile, direct numerical integration of complementary error function erfc(a) suffers from severe underflow in floating-point arithmetic. In this paper, a simple and robust approximation scheme for log[erfc(a)] is proposed based on a geometric tangent construction. This approach yields explicit lower and upper bounds, closed-form asymptotic expansions up to order a^-8, and numerically stable formulas suitable for implementation in statistical software. Numerical comparisons demonstrate that the lower and upper bounds become extremely tight for a>=6, making the proposed method practical for large-scale meta-analytic computations.
Keywords: 
;  ;  ;  

1. Introduction

Meta-analyses frequently combine results from multiple studies by summing z-scores, which are assumed to be approximately normally distributed. The sum distribution is also normal. Therefore, evaluating the combined p-value requires evaluating the Gaussian tail probabilities of the following form for large a:
e r f c a = a exp x 2 d x .
For a ≥ 8, direct computation is numerically unstable: extremely small values underflow to zero in standard double-precision arithmetic.
Existing approximation techniques for the complementary error function e r f c ( a )   are almost exclusively based on analytic minimax polynomial approximations, rational-function approximations, Chebyshev-series expansions, or Padé-type expansions, as extensively documented in the NIST Digital Library of Mathematical Functions [1,2,3]. To our knowledge, no prior work has introduced a geometric construction—such as a tangent-based area argument—to derive explicit upper and lower bounds for erfc or l o g [ e r f c ( a ) ]   in the extreme tail.
The main purpose of this work was to construct a method that (i) avoids numerical underflow; (ii) provides explicit lower and upper bounds; (iii) admits asymptotic expansions to arbitrary order; and (iv) is easy to implement in practical statistical workflows.

2. Methods

2.1. Geometric Motivation

Consider a positive, decreasing function h = f ( x ) , and point A = ( a ,   h )   on its graph. Let s = f ' ( a ) denote the slope, and let l be the horizontal distance from foot O of the vertical through A to x-intercept P of the tangent line at A . Then,
l = h f ' a .
The area of triangle AOP is
A r e a A O P = h l 2 = f a 2 2 f ' a .
If f decays approximately exponentially, then the integral a f x d x is comparable to rectangle h × l ,   whose area is f a 2 / f ' ( a ) .
At a point of tangency x = a on the exponential curve y = b exp [ c x ] , the tangent line and the perpendicular to the x-axis from a right triangle (Figure 1). The area of this triangle is exactly half of tail integral
a b exp c x d x

2.2. Gaussian Tail and Tangent-Matched Lower Bound

This geometric principle is applied to the Gaussian function. The triangle area provides approximately half of this value, suggesting a natural upper and lower bound pair. For the tangency point chosen, the Gaussian tail e r f c ( x ) (dotted line) lies between the exponential decay curve (solid line) and the area of the right triangle generated by the tangent line (dashed line), demonstrating that the Gaussian tail integral is geometrically sandwiched between two quantities.S
Let
f x = exp x 2 ,
As f ' a = 2 a exp a 2 , the rectangle bound gives
p u p p e r a = f a 2 f ' a = exp a 2 2 a .
Let us construct a function
g x = A x u exp x u 2 ,
that satisfies
g a = f   a ,     g ' ( a ) = f ( a ) .
Let t = a u . Solving the resulting system gives
t = a + a 2 + 2 2 ,
and
p l o w e r a = a g x d x = exp a 2 2 t = exp a 2 a + a 2 + 2
Via construction,
p l o w e r a < e r f c a < p u p p e r a ,     a > 0
As t > a , the denominators satisfy a + a 2 + 2 > 2 a ; therefore, p lower ( a ) < p upper ( a ) .
Both bounds are explicit and extremely stable in log-space:
log p upper a = a 2 log 2 a ,
log p lower ( a ) = a 2 log a + a 2 + 2 .

2.3. Asymptotic Expansions Up to a 8

Let a . In classical form (Mills’ ratio expansion) we get
e r f c ( a ) e a 2 2 a 1 1 2 a 2 + 3 4 a 4 15 8 a 6 + 105 16 a 8 + O ( a 10 ) .
Our two bounding expressions admit clean asymptotics in the same form.
The upper bound is in the following form:
p upper ( a ) = e a 2 2 a .
This is exactly the leading term of the Gaussian tail asymptotics.
Using
p lower ( a ) = e a 2 a + a 2 + 2 = e a 2 2 a 2 1 + 1 + 2 a 2 ,
1 + ε = 1 + ε 2 ε 2 8 + ε 3 16 5 ε 4 128 + O ( ε 5 ) is expanded with ε = 2 / a 2 and inverted to obtain
2 1 + 1 + 2 a 2 = 1 1 2 a 2 + 1 2 a 4 5 8 a 6 + 7 8 a 8 + O ( a 10 ) .
Therefore,
p l o w e r a e a 2 2 a 1 1 2 a 2 + 3 4 a 4 15 8 a 6 + 7 16 a 8 + O ( a 10 ) .
These formulations show that both bounds agree with the exact tail of the first two terms: the lower bound differs starting at a 4 , whereas the upper bound is the leading term only. In practice, either bound can be used as the starting point for controlled asymptotic refinement.
Table 1 compares log e r f c ( a )   ,   log p l o w e r ( a ) , and log p u p p e r ( a )   for a   =   1 ,   .   .   .   ,   20 , with all logarithms being natural. As expected, l o g p lower ( a ) < l o g e r f c ( a ) < l o g p upper ( a ) , and the gap decreases rapidly as a increases. Accurate Gaussian tail values were obtained using the scipy.special.erfc function from the SciPy library (Python).

3. Practical Use and Numerical Stability

Underflow-safe evaluation. The following are always computed in log-space:
log p upper a = a 2 log 2 a ,
log p lower ( a ) = a 2 l o g [ a + a 2 + 2 ] .
Asymptotic refinement. For very large a , we append the known asymptotic correction terms e r f c ( a ) to a 8 for improved accuracy beyond the single-term upper bound.
Compatibility with the standard normal tail. If the one-sided Gaussian tail
Q ( z ) = z 1 2 π e x 2 / 2   d x
is needed, then convert via a = z / 2 and scale accordingly:
Q ( z ) = 1 2 e r f c ( z 2 ) .
The same bounding strategy applies verbatim after this change of variables.

4. Discussion

The proposed tangent and rectangle bracketing method yields a pair of closed-form expressions, which are
  • Simple (two elementary functions of a )
  • Monotone ( p lower e r f c p upper )
  • Asymptotically sharp (both match the leading e a 2 2 a , while the lower bound matches the next term 1 2 a 2 )
  • Numerically robust in log-space for a in the meta-analytic tail.
In workflows in which a strict bound is acceptable (e.g., to certify that a meta-analytic p -value is below a given threshold), the lower bound often suffices. For point estimates, either the midpoint in linear space or the log-mean in log-space provides a “free” estimator with guaranteed bracketing error. If higher accuracy is needed, the classical asymptotic series up to a 8 may be added to the leading term; the resulting log can be evaluated via log with log-sum-exp to avoid catastrophic cancellation.

5. Conclusions

Herein, we introduce a self-contained analytic approximation of l o g e r f c ( a ) for large a based on a geometric tangent argument. This method yields closed-form upper and lower bounds with asymptotic expansions up to a 8 . This is especially useful in meta-analyses in which large z -scores must be handled accurately and safely. This approach is straightforward to implement and integrate into statistical codebases.
Figure 2. The Gaussian tail (dotted line) is compared with the exponential function and its tangent-based triangular approximation. For the tangency point chosen, the Gaussian tail lies between the exponential decay curve (solid line) and the area of the right triangle generated by the tangent line (dashed line), demonstrating that the Gaussian tail integral is geometrically sandwiched between these two quantities.
Figure 2. The Gaussian tail (dotted line) is compared with the exponential function and its tangent-based triangular approximation. For the tangency point chosen, the Gaussian tail lies between the exponential decay curve (solid line) and the area of the right triangle generated by the tangent line (dashed line), demonstrating that the Gaussian tail integral is geometrically sandwiched between these two quantities.
Preprints 201869 g002

Acknowledgments

I thank my wife for her suggestions and encouragement. This work was supported by JSPS KAKENHI Grant Numbers JP25K22410 and Yokohama Foundation for Advancement of Medical Science (Medical Digitalization Grant). I thank Editage (www.editage.com) for providing professional English-language editing services. AI-assisted tools (Microsoft Copilot, 2026) were used solely for idea organization and for improving the clarity and fluency of the English text. All mathematical derivations, theoretical arguments, numerical experiments, and final scientific content were entirely produced and verified by the authors.

Conflicts of Interest

The author declares no competing interests.

Appendix A. Derivation Details

A.1 Solving the Tangent-Matching System

Let g ( x ) = A ( x u ) e ( x u ) 2 , then
g a = A t e t 2 = e a 2 , g a = A e t 2 1 2 t 2 = 2 a   e a 2 , t = a u .
Dividing the second equation by the first yields
1 2 t 2 t = 2 a         2 t 2 2 a t 1 = 0         t = a ± a 2 + 2 2 .
We choose the positive root t = a + a 2 + 2 2 > a to ensure g lies below f for x > a . Then
A = e a 2 t e t 2 = e ( a 2 t 2 ) t , a g ( x )   d x = A 2 e t 2 = e a 2 2 t = e a 2 a + a 2 + 2 .

A.2 Asymptotics of p lower to a 8

Let us write p lower ( a ) = e a 2 2 a R ( a ) with
R ( a ) = 2 1 + 1 + 2 a 2 .
Set ε = 2 / a 2 . Using 1 + ε = 1 + ε 2 ε 2 8 + ε 3 16 5 ε 4 128 + O ( ε 5 ) and expanding 2 / ( 1 + 1 + ε ) yields
R ( a ) = 1 1 2 a 2 + 1 2 a 4 5 8 a 6 + 7 8 a 8 + O ( a 10 ) ,
and the claimed series follows.

References

  1. M. M. Shepherd, and J. G. Laframboise, “Chebyshev Approximation of (1 + 2x) exp(x^2) erfc x in 0 <x <Infinity,” Mathematics of Computation, vol. 36, no. 153, pp. 249-253, 1981.
  2. W. J. Cody, “Rational Chebyshev Approximations for the Error Function,” Mathematics of Computation, vol. 23, no. 107, pp. 631-637, 1969.
  3. C. Hastings, Jr., Approximations for Digital Computers: Princeton University Press, 1955.
Figure 1. Geometric interpretation of the exponential tail. At the tangency point of the exponential curve, the tangent line and the perpendicular dropped to the xxx-axis form a right triangle whose area equals one-half of the integral of the exponential function beyond the tangency point.
Figure 1. Geometric interpretation of the exponential tail. At the tangency point of the exponential curve, the tangent line and the perpendicular dropped to the xxx-axis form a right triangle whose area equals one-half of the integral of the exponential function beyond the tangency point.
Preprints 201869 g001
Table 1. Comparison of the true value logarithms and the lower and upper bounds.
Table 1. Comparison of the true value logarithms and the lower and upper bounds.
a log [ e r f c ( a ) ] log [ p l o w e r ( a ) ] log [ p u p p e r ( a ) ]
1 −1.9703877476 −2.0050525387 −1.6931471806
2 −5.4857235023 −5.4927894251 −5.3862943611
3 −10.8411452796 −10.8431850133 −10.7917594692
4 −18.1085605497 −18.1093207643 −18.0794415417
5 −27.3216717832 −27.3220104357 −27.3025850930
6 −38.4983434109 −38.4985148043 −38.4849066498
7 −51.6490133313 −51.6491086758 −51.6390573296
8 −66.7802542084 −66.7803112271 −66.7725887222
9 −83.8964521172 −83.8964882130 −83.8903717579
10 −103.0006712625 −103.0006951848 −102.9957322736
11 −124.0951975621 −124.0951493044 −124.0910424534
12 −147.1815171929 −147.1815081064 −147.1780538303
13 −172.2609917239 −172.2610420738 −172.2580965380
14 −199.3346401127 −199.3347458240 −199.3322045102
15 −228.4032738090 −228.4034122328 −228.4011973817
16 −259.4675444399 −259.4676833305 −259.4657359028
17 −292.5279799500 −292.5280861557 −292.5263605246
18 −327.5850125174 −327.5850585883 −327.5835189385
19 −364.6390001601 −364.6389683326 −364.6375861597
20 −403.6902433592 −403.6901271169 −403.6888794541
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated