<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">AJCM</journal-id><journal-title-group><journal-title>American Journal of Computational Mathematics</journal-title></journal-title-group><issn pub-type="epub">2161-1203</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ajcm.2023.134026</article-id><article-id pub-id-type="publisher-id">AJCM-128377</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  The Bivariate Normal Integral via Owen’s &lt;i&gt;T&lt;/i&gt; Function as a Modified Euler’s Arctangent Series
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Janez</surname><given-names>Komelj</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Independent Researcher, Vnanje Gorice, Slovenia</addr-line></aff><pub-date pub-type="epub"><day>13</day><month>10</month><year>2023</year></pub-date><volume>13</volume><issue>04</issue><fpage>476</fpage><lpage>504</lpage><history><date date-type="received"><day>8,</day>	<month>September</month>	<year>2023</year></date><date date-type="rev-recd"><day>16,</day>	<month>October</month>	<year>2023</year>	</date><date date-type="accepted"><day>19,</day>	<month>October</month>	<year>2023</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  The Owen’s T function is presented in four new ways, one of them as a series similar to the Euler’s arctangent series divided by 2&amp;#960, which is its majorant series. All possibilities enable numerically stable and fast convergent computation of the bivariate normal integral with simple recursion. When tested <inline-formula><inline-graphic xlink:href="dit_22ebdcd8-8d42-448c-bd70-99632f6842d0.png" xlink:type="simple"/></inline-formula> 
  computation on a random sample of one million parameter triplets with uniformly distributed components and using double precision arithmetic, the maximum absolute error was 3.45 &#215; 10<sup>-</sup><sup>16</sup>. In additional testing, focusing on cases with correlation coefficients close to one in absolute value, when the computation may be very sensitive to small rounding errors, the accuracy was retained. In rare potentially critical cases, a simple adjustment to the computation procedure was performed—one potentially critical computation was replaced with two equivalent non-critical ones. All new series are suitable for vector and high-precision computation, assuming they are supplemented with appropriate efficient and accurate computation of the arctangent and standard normal cumulative distribution functions. They are implemented by the R package <b>Phi2rho</b>, available on CRAN. Its functions allow vector arguments and are ready to work with the <b>Rmpfr</b> package, which enables the use of arbitrary precision instead of double precision numbers. A special test with up to 1024-bit precision computation is also presented.
 
</p></abstract><kwd-group><kwd>Owen’s &lt;i&gt;T&lt;/i&gt; Function</kwd><kwd> Bivariate Normal Integral</kwd><kwd> Euler’s Arctangent Series</kwd><kwd> Recursion</kwd><kwd> R Package &lt;b&gt;Phi2rho&lt;/b&gt;</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Let Φ ( x ) = 1 2 π ∫ − ∞ x     e − 1 2 t 2 d t be the standard normal cumulative distribution function (cdf) and φ ( x ) = 1 2 π e − 1 2 x 2 the standard normal probability density function (pdf). The bivariate standard normal cdf</p><p>Φ ρ 2 ( x , y ) = 1 2 π 1 − ρ 2 ∫ − ∞ x     ∫ − ∞ y     e − s 2 − 2 ρ s t + t 2 2 ( 1 − ρ 2 ) d s d t (1)</p><p>with a correlation coefficient ρ ∈ ( − 1,1 ) has the bivariate standard normal pdf</p><p>φ ρ 2 ( x , y ) = ∂ 2 Φ ρ 2 ( x , y ) ∂ x ∂ y = 1 2 π 1 − ρ 2 e − x 2 − 2 ρ x y + y 2 2 ( 1 − ρ 2 ) . (2)</p><p>If ρ = 0 , then Φ 0 2 ( x , y ) = Φ ( x ) Φ ( y ) , while for | ρ | = 1 we have the degenerated cases</p><p>Φ &#177; 1 2 ( x , y ) = ( min { Φ ( x ) , Φ ( y ) } ,   if     ρ = + 1 , max { Φ ( x ) + Φ ( y ) − 1 , 0 } ,   if     ρ = − 1. (3)</p><p>Additionally, for ρ ∈ ( − 1,1 ) define</p><p>L ( x , y , ρ ) = 1 2 π 1 − ρ 2 ∫ x ∞     ∫ y ∞     e − s 2 − 2 ρ s t + t 2 2 ( 1 − ρ 2 ) d s d t ,</p><p>L ( x , y , − 1 ) = max { 1 − Φ ( x ) − Φ ( y ) ,0 } and L ( x , y ,1 ) = 1 − max { Φ ( x ) , Φ ( y ) } . The functions Φ ρ 2 ( x , y ) and L ( x , y , ρ ) are symmetric regarding x and y, and because they are complementary, it suffices to analyze only one of them. In this respect, L is often preferred, but not in this paper where some equations for L are also rewritten using Φ ρ 2 ( x , y ) = L ( − x , − y , ρ ) and some other auxiliary equations.</p><p>Noting that (3) implies Φ 1 2 ( x , x ) = Φ ( x ) = 2   Φ 0 2 ( x , 0 ) and Φ − 1 2 ( x , − x ) = 0 = Φ 0 2 ( x , 0 ) + Φ 0 2 ( − x , 0 ) − 1 2 , the equations from ( [<xref ref-type="bibr" rid="scirp.128377-ref1">1</xref>] , p. 937, 26.3.19 and 26.3.20), which do not cover these cases if x ≠ 0 , as we get an indefinite expression 0 0 for the auxiliary correlation coefficients ρ x and ρ y , can be transformed into</p><p>Φ ρ 2 ( x , y ) = ( 1 4 + 1 2 π arcsin ρ ,   if     x = y = 0 , Φ ρ x 2 ( x , 0 ) + Φ ρ y 2 ( y , 0 ) − β ,   if     x ≠ 0     or     y ≠ 0 , (4)</p><p>where β = 0 if x y &gt; 0 or x y = 0 and x + y ≥ 0 , and β = 1 2 otherwise,</p><p>ρ x = { 0 if     | ρ | = 1     and     x ≠ 0     and     x − y sgn ( ρ ) = 0                                         0 ( ρ x − y ) sgn ( x ) x 2 − 2 ρ x y + y 2                                               otherwise ( ρ y − x ) sgn ( y ) x 2 − 2 ρ x y + y 2 } = ρ y , (5)</p><p>where sgn ( x ) = 1 , if x ≥ 0 and sgn ( x ) = − 1 , if x &lt; 0 . Note that although | ρ | is not close to 1, | ρ x | or | ρ y | can be, and that | ρ | = 1 and the lower Equations (5) imply | ρ x | = 1 and | ρ y | = 1 .</p><p>Since ( [<xref ref-type="bibr" rid="scirp.128377-ref1">1</xref>] , p. 936, 26.3.9 and 26.3.8) imply</p><p>Φ ρ 2 ( − x , 0 ) = Φ ρ 2 ( x , 0 ) − Φ ( x ) + 1 2     and     Φ − ρ 2 ( x , 0 ) = Φ ( x ) − Φ ρ 2 ( x , 0 ) , (6)</p><p>and Φ − ρ 2 ( − x ,0 ) = 1 2 − Φ ρ 2 ( x ,0 ) , the problem how to compute Φ ρ 2 ( x , y ) is reduced to the computation of Φ ρ 2 ( x ,0 ) for x ≥ 0 and ρ ∈ [ 0,1 ) .</p><p>Extensive older bibliography exists about how Φ ρ 2 ( x , y ) can be computed (see Gupta [<xref ref-type="bibr" rid="scirp.128377-ref2">2</xref>] ). Many old methods, e.g. Donnelly’s method [<xref ref-type="bibr" rid="scirp.128377-ref3">3</xref>] based on Owen’s results [<xref ref-type="bibr" rid="scirp.128377-ref4">4</xref>] , Divgi’s method [<xref ref-type="bibr" rid="scirp.128377-ref5">5</xref>] and the method of Drezner and Wesolowsky [<xref ref-type="bibr" rid="scirp.128377-ref6">6</xref>] , are sufficiently effective and accurate for the majority of present needs, but new methods still appear, e.g. [<xref ref-type="bibr" rid="scirp.128377-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.128377-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.128377-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.128377-ref10">10</xref>] . More details and comparisons of some methods can be found in [<xref ref-type="bibr" rid="scirp.128377-ref11">11</xref>] [<xref ref-type="bibr" rid="scirp.128377-ref12">12</xref>] [<xref ref-type="bibr" rid="scirp.128377-ref13">13</xref>] .</p><p>The Owen’s T function is defined by ( [<xref ref-type="bibr" rid="scirp.128377-ref4">4</xref>] , pp. 1078-1079)</p><p>T ( h , a ) = 1 2 π ∫ 0 a e − 1 2 h 2 ( 1 + x 2 ) 1 + x 2 d x = arctan a 2 π − 1 2 π ∑ k = 0 ∞ ( − 1 ) k a 2 k + 1 2 k + 1 ( 1 − e − 1 2 h 2 ∑ i = 0 k h 2 i 2 i i ! ) (7)</p><p>for a , h ∈ ℝ . It appears frequently in the extensive Owen’s table of integrals involving Gaussian functions ( [<xref ref-type="bibr" rid="scirp.128377-ref14">14</xref>] , pp. 393-413) and can be used for computing Φ ρ 2 ( x , y ) , as will be explained in the next section. The series (7) is used in Donnelly’s algorithm [<xref ref-type="bibr" rid="scirp.128377-ref3">3</xref>] and, based on it, is also realized in pbinorm() function from the VGAM package [<xref ref-type="bibr" rid="scirp.128377-ref15">15</xref>] . Since it alternates, there are problems with numerical stability, e.g. using double precision arithmetic, it may provide only single precision results. More about Owen’s T function and older ways of calculating it are given by Patefield and Tandy [<xref ref-type="bibr" rid="scirp.128377-ref7">7</xref>] , who developed a hybrid method to compute it. To achieve double precision accuracy, they use the series (7) or one of five other methods. Which method is chosen and which its parameters are used depends on which of the 18 regions ( h , a ) belongs to—see ( [<xref ref-type="bibr" rid="scirp.128377-ref7">7</xref>] , p. 7, Fig. 2). Their method is also implemented in OwenT() function from the OwenQ package [<xref ref-type="bibr" rid="scirp.128377-ref16">16</xref>] , hereafter OwenQ::OwenT().</p><p>The method presented in this paper extends the theoretical knowledge and can be easily implemented. Its great advantage over the already mentioned methods, which enable Φ ρ 2 ( x , y ) computation via Owen’s T function, is its simplicity, faster convergence and ensured numerical stability. Regarding other methods that have proven to be good or even excellent in terms of Φ ρ 2 ( x , y ) computation speed and accuracy, e.g. the one implemented in the pmvnorm() function from the mvtnorm package [<xref ref-type="bibr" rid="scirp.128377-ref17">17</xref>] , the main advantages are simplicity and independence from various constants. Both enable easy portability between different environments and using high-precision arithmetic. There is no need to adjust the number and precision of various constants, such as weights and knots in quadrature formulas, which are used in many Φ ρ 2 ( x , y ) computational methods.</p><p>In Section 2, the background results are presented, which are the starting point for the development of a new method, as well as for the acceleration of the tetrachoric series, which was used for the benchmark values computation. In Section 3, auxiliary results are derived. In core Section 4, new series for Φ ρ 2 ( x ,0 ) are derived in Theorems 3 and 4, and in Corollary 2 they are combined in a unified series for Φ ρ 2 ( x , y ) . However, in all cases, the series must be supplemented by the standard normal cdf and some of them also by the arctangent function computation. Four series for computing the Owen’s T function are presented in Theorem 5. Among them (40b) can be viewed as a modified Euler’s arctangent series. In Sections 5 and 6, algorithmic and numeric issues are discussed, and testing results are presented.</p><p>Using double precision arithmetic and testing on a random sample of one million triplets ( x , y , ρ ) with uniformly distributed components, the maximum absolute error was 3.45 &#215; 10<sup>−16</sup>, which is approximately 3.11-times the machine epsilon 2<sup>−53</sup>. On the same random sample, but with ρ transformed so that more than half of | ρ | were greater than 0.9999, and by equivalent computing of two function values instead of Φ ρ 2 ( x , y ) in rare cases with φ ρ 2 ( x , y ) &gt; 1 , the maximum absolute error was even slightly smaller.</p><p>All new series are suitable for vector and high-precision computation. The</p><p>fastest one asymptotically converges as ∑ k q k + 1 e − q ( k + 1 ) ! min { a 2 k ,1 } k + 1 ( 1 + a 2 ) k , where q = 1 2 ( 1 + a 2 ) h 2 . Using the Rmpfr package [<xref ref-type="bibr" rid="scirp.128377-ref18">18</xref>] and 1024-bit precision computation, 199 iterations were needed to compute Φ 2 / 2 2 ( 2.1,0 ) , achieving an absolute error smaller than 2 − 1024 ≈ 5.56 &#215; 10 − 309 .</p></sec><sec id="s2"><title>2. Background Results</title><p>The bivariate standard normal cdf can be expanded into tetrachoric series ( [<xref ref-type="bibr" rid="scirp.128377-ref19">19</xref>] , p. 196), ( [<xref ref-type="bibr" rid="scirp.128377-ref1">1</xref>] , p. 940, 26.3.29)</p><p>Φ ρ 2 ( x , y ) = Φ ( x ) Φ ( y ) + φ ( x ) φ ( y ) ∑ k = 0 ∞     H e k ( x ) H e k ( y ) ρ k + 1 ( k + 1 ) ! , (8)</p><p>where H e k ( x ) are the “probabilist’s” Hermite polynomials defined by</p><p>H e k ( x ) = ( − 1 ) k e 1 2 x 2 d k d x k e − 1 2 x 2   ( k ∈ ℕ 0 ) .</p><p>The tetrachoric series (8) converges a bit faster than a geometric series with a quotient ρ and slowly converges for | ρ | close to or equal to 1.</p><p>Let ℕ − 1 = ℕ ∪ { − 1,0 } . Extending the usual double factorial function definition for k ∈ ℕ 0 to k ∈ ℕ − 1 with ( − 1 ) ! ! = 1 , we have</p><p>H e k ( 0 ) = ( 0,   if   k   is   odd   , ( − 1 ) k 2 ( k − 1 ) ! ! ,   if   k   is   even   .</p><p>Setting y = 0 in (8), transforming the summation index k 2 ↦ k , and using ( 2 k − 1 ) ! ! = ( 2 k ) ! 2 k k ! for k ∈ ℕ 0 , we get a slightly faster converging series</p><p>Φ ρ 2 ( x ,0 ) = 1 2 Φ ( x ) + φ ( x ) 2 π ∑ k = 0 ∞     H e 2 k ( x ) ( − 1 ) k ρ 2 k + 1 2 k k ! ( 2 k + 1 ) . (9)</p><p>Vasicek ( [<xref ref-type="bibr" rid="scirp.128377-ref20">20</xref>] , p. 7) found an alternative series for the computation of Φ ρ 2 ( x ,0 ) , which is a good alternative to the series (9) if ρ 2 &gt; 1 2 .</p><p>Integrating the well known equation ( [<xref ref-type="bibr" rid="scirp.128377-ref21">21</xref>] , p. 352)</p><p>∂ ∂ ρ Φ ρ 2 ( x , y ) = ∂ 2 Φ ρ 2 ( x , y ) ∂ x ∂ y = φ ρ 2 ( x , y ) (10)</p><p>with respect to ρ , using equations Φ 0 2 ( x , y ) = Φ ( x ) Φ ( y ) and (3), we get</p><p>Φ ρ 2 ( x , y ) = Φ ( x ) Φ ( y ) + ∫ 0 ρ     φ s 2 ( x , y ) d s = min { Φ ( x ) , Φ ( y ) } − ∫ ρ 1     φ s 2 ( x , y ) d s = max { Φ ( x ) + Φ ( y ) − 1,0 } + ∫ − 1 ρ     φ s 2 ( x , y ) d s . (11)</p><p>Due to historical reasons, the variates h and k are often used instead of x and y. We will use h instead of x but will not need k in the role of y.</p><p>In the sequel, let ρ ∈ ( − 1,1 ) and r ∈ ℝ be permanently connected by the</p><p>one-to-one correspondence r = ρ 1 − ρ 2 and ρ = r 1 + r 2 . Notice that (4) and arcsin ρ = arctan r imply Φ ρ 2 ( 0,0 ) = 1 4 + 1 2 π arctan r . Setting x = h , y = 0 , and writing e − 1 2 h 2 ∫ a b     e 1 2 h 2 φ s 2 ( h ,0 ) d s instead of ∫ a b     φ s 2 ( h ,0 ) d s , the Equations (11) can be rewritten to</p><p>Φ ρ 2 ( h ,0 ) = 1 2 Φ ( h ) + φ ( h ) T r ( − 1 2 h 2 ) = min { Φ ( h ) , 1 2 } − φ ( h ) T ˜ r ( − 1 2 h 2 ) = max { Φ ( h ) − 1 2 ,0 } + φ ( h ) T &#175; r ( − 1 2 h 2 ) , (12)</p><p>where, using a substitution s = x 1 + x 2 ,</p><p>T r ( w ) = 1 2 π ∫ 0 ρ 1 1 − s 2 e w s 2 1 − s 2 d s = 1 2 π ∫ 0 r e w x 2 1 + x 2 d x   ( w ∈ ℝ ) .</p><p>Analogously, T ˜ r ( w ) and T &#175; r ( w ) are defined for w ≤ 0 by integrals with limits ( ρ ,1 ) and ( − 1, ρ ) , and ( r , ∞ ) and ( − ∞ , r ) respectively, which do not exist for w &gt; 0 . The computation of Φ ρ 2 ( h ,0 ) is reduced to the computation</p><p>of one of the integrals T r ( − 1 2 h 2 ) , T ˜ r ( − 1 2 h 2 ) and T &#175; r ( − 1 2 h 2 ) .</p><p>The special cases (12) of the Equations (11) in combination with (4) are a starting point for some computation methods for Φ ρ 2 ( x , y ) which are based on</p><p>the integration. Owen’s is one of them—note that φ ( h ) T a ( − 1 2 h 2 ) = T ( h , a ) . Using r instead of a in the sequel and resolving the problem with 0 0 as before, Owen’s equation ( [<xref ref-type="bibr" rid="scirp.128377-ref14">14</xref>] , p. 416, 3.1) can be rewritten as</p><p>Φ ρ 2 ( x , y ) = ( 1 4 + 1 2 π arcsin ρ ,   if     x = y = 0 , 1 2 ( Φ ( x ) + Φ ( y ) ) − T ( x , r x ) − T ( y , r y ) − β ,   if     x ≠ 0     or     y ≠ 0 , (13)</p><p>where β = 0 if x y &gt; 0 or x y = 0 and x + y ≥ 0 , and β = 1 2 otherwise, and</p><p>r x = { 0   if     | ρ | = 1     and     x ≠ 0     and     x − y sgn ( ρ ) = 0                       0 y − ρ x x 1 − ρ 2                                               otherwise   x − ρ y y 1 − ρ 2 } = r y . (14)</p><p>Another Owen’s important equation is ( [<xref ref-type="bibr" rid="scirp.128377-ref14">14</xref>] , p. 414, 2.7)</p><p>T ( h , r ) + T ( r h , 1 r ) = 1 2 ( Φ ( h ) + Φ ( r h ) ) − Φ ( h ) Φ ( r h ) − β , (15)</p><p>where β = 0 if r ≥ 0 and β = 1 2 if r &lt; 0 . It implies φ ( h ) T 1 ( − 1 2 h 2 ) = T ( h ,1 ) = 1 2 Φ ( h ) ( 1 − Φ ( h ) ) . If ρ = 2 2 , then r = 1 . Using (12) and the right Equation (6), we get</p><p>Φ 2 / 2 2 ( h , 0 ) = Φ ( h ) ( 1 − 1 2 Φ ( h ) )     and     Φ − 2 / 2 2 ( h , 0 ) = 1 2 ( Φ ( h ) ) 2 . (16)</p><p>Let ρ ∈ ( − 1,1 ) , ρ &#175; = sgn ( ρ ) 1 − ρ 2 , r = ρ 1 − ρ 2 , r &#175; = ρ &#175; 1 − ρ &#175; 2 = 1 r and h ∈ ℝ . By adding 1 2 ( Φ ( h ) + Φ ( r h ) ) on both sides of (15) and using (7) and (12), it follows</p><p>Φ ρ 2 ( h ,0 ) + Φ ρ &#175; 2 ( r h ,0 ) = Φ ( h ) + Φ ( r h ) − Φ ( h ) Φ ( r h ) − β , (17)</p><p>where β = 0 if r ≥ 0 and β = 1 2 if r &lt; 0 .</p><p>If | ρ | &gt; 2 2 , then | r | &gt; 1 , | r &#175; | &lt; 1 and | ρ &#175; | &lt; 2 2 . Φ ρ 2 ( h ,0 ) can be computed by computing Φ ρ &#175; 2 ( r h ,0 ) and using (17). Consequently, the right Equation (6) and the transformation of the parameters r h ↦ h &#175; and 1 r ↦ r &#175; , if needed, reduce the condition ρ ∈ ( − 1,1 ) to ρ ∈ [ 0, 2 2 ] with a corresponding r ∈ [ 0,1 ] . The problem how to compute Φ ρ 2 ( x , y ) is reduced to the computation of Φ ρ 2 ( h ,0 ) for h ≥ 0 and ρ ∈ [ 0, 2 2 ] .</p><p>The theorems in the sequel do not depend on the restriction to ρ 2 ≤ 1 2 with a corresponding | r | ≤ 1 found in [<xref ref-type="bibr" rid="scirp.128377-ref7">7</xref>] . However, if | r | &gt; 1 , the transformation of r h ↦ h &#175; and 1 r ↦ r &#175; speeds up convergence significantly. This is, for example,</p><p>also the case for the Vasicek’s series and the tetrachoric series (9), which transforms into</p><p>Φ ρ 2 ( h ,0 ) = Φ ( h ) + 1 2 Φ ( r h ) − Φ ( h ) Φ ( r h )     − φ ( r h ) 2 π ∑ k = 0 ∞     H e 2 k ( r h ) ( − 1 ) k ρ &#175; 2 k + 1 2 k k ! ( 2 k + 1 ) − β , (18)</p><p>where ρ &#175; = sgn ( ρ ) 1 − ρ 2 , β = 0 if r ≥ 0 and β = 1 2 if r &lt; 0 . Since the</p><p>results calculated with the Vasicek’s series in Section 6 only supplement benchmark values calculated with the tetrachoric series, details about it are not given here.</p></sec><sec id="s3"><title>3. Auxiliary Results</title><p>This paper pays attention to the estimation of the method error due to truncation of infinite series, while the analysis of rounding errors is out of its scope. The following lemma is intended for this. In it and all the theorems below, the phrase “truncated after the n<sup>th</sup> term” also means omitting the entire series. In these cases, set n = − 1 and assume the empty sum is 0.</p><p>Lemma 1. If the Euler’s series</p><p>arctan r = r 1 + r 2 ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! ( r 2 1 + r 2 ) k   ( r ∈ ℝ ) (19)</p><p>is truncated after the n<sup>th</sup> term, then the remainder</p><p>R n = r 1 + r 2 ∑ k = n + 1 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! ( r 2 1 + r 2 ) k   ( n ∈ ℕ − 1 )</p><p>has the same sign as r and is bounded in absolute value by</p><p>B n ≤ | R n | ≤ ( 1 + r 2 ) B n ,     where     B n = ( 2 n + 2 ) ! ! ( 2 n + 3 ) ! ! | r | 1 + r 2 ( r 2 1 + r 2 ) n + 1 . (20)</p><p>Proof. Let α ∈ ( 0,1 ] . Noting that k ≥ n + 1 ≥ 0 and ∫ 0 1 ( 1 − x 2 ) k d x = ∫ 0 π 2 cos 2 k + 1 t   d t = ( 2 k ) ! ! ( 2 k + 1 ) ! ! for k ∈ ℕ 0 ( [<xref ref-type="bibr" rid="scirp.128377-ref22">22</xref>] , p. 397, 3.621, 4.), and using Tonelli’s theorem, it follows</p><p>S ( r , α ) = ∑ k = n + 1 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! ( α r 2 1 + r 2 ) k = ∑ k = n + 1 ∞ ( α r 2 1 + r 2 ) k ∫ 0 1 ( 1 − x 2 ) k d x = ∫ 0 1 ∑ k = n + 1 ∞ ( α   r 2 ( 1 − x 2 ) 1 + r 2 ) k d x = ( 1 + r 2 ) ( α r 2 1 + r 2 ) n + 1 ∫ 0 1 ( 1 − x 2 ) n + 1 d x 1 + ( 1 − α ) r 2 + α r 2 x 2 . (21)</p><p>The denominator in the last integrand is an increasing function of x. Inserting 1 and 0 instead of x implies</p><p>( 2 n + 2 ) ! ! ( 2 n + 3 ) ! ! α | r | 1 + r 2 ( α r 2 1 + r 2 ) n + 1 ≤ | α r 2 1 + r 2 S ( r , α ) | ≤ ( 2 n + 2 ) ! ! ( 2 n + 3 ) ! ! α | r | 1 + ( 1 − α ) r 2 ( α r 2 1 + r 2 ) n + 1 (22)</p><p>and, together with B n = r 1 + r 2 S ( r ,1 ) , (20). □</p><p>If r ≠ 0 , arctan r = sgn ( r ) π 2 − arctan 1 r , (19) with 1 r instead of r, and r = sgn ( r ) | r | imply</p><p>arctan r = sgn ( r ) ( π 2 − | r | 1 + r 2 ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! 1 ( 1 + r 2 ) k )</p><p>and (20) with B n = ( 2 n + 2 ) ! ! ( 2 n + 3 ) ! ! | r | ( 1 + r 2 ) n + 2 . This series for | r | &gt; 1 converges faster than (19), so we can already sense some kind of similarity with (15).</p><p>In the sequel, the lower and upper regularized gamma functions</p><p>P ( a , x ) = γ ( a , x ) Γ ( a ) and Q ( a , x ) = Γ ( a , x ) Γ ( a ) respectively, where</p><p>γ ( a , x ) = ∫ 0 x     t a − 1 e − t d t and Γ ( a , x ) = ∫ x ∞     t a − 1 e − t d t are the lower and upper incomplete gamma functions respectively, both defined for a &gt; 0 and x ≥ 0 , will be very important, as well as their lower and upper bounds.</p><p>In the Alzer’s inequality</p><p>( 1 − e − s k + 1 x ) a ≤ P ( a , x ) ≤ ( 1 − e − x ) a   ( a ≥ 1, x ≥ 0 ) , (23)</p><p>where s k + 1 = ( ( k + 1 ) ! ) − 1 k + 1 ( [<xref ref-type="bibr" rid="scirp.128377-ref23">23</xref>] , p. 772, Theorem 1), ( [<xref ref-type="bibr" rid="scirp.128377-ref24">24</xref>] , p. 221, (5.4)), allowing a = 1 resulted in strict inequalities becoming non-strict. It implies</p><p>1 − ( 1 − e − x ) a ≤ Q ( a , x ) ≤ 1 − ( 1 − e − s k + 1 x ) a . (24)</p><p>For n ∈ ℕ 0 and x ≥ 0 , we have I n ( x ) = e x P ( n + 1, x ) ( [<xref ref-type="bibr" rid="scirp.128377-ref22">22</xref>] , p. 908, 8.352, 1.), where I n ( x ) = e x − ∑ k = 0 n x k k ! is the remainder of the Taylor series of the exponential function. The Lagrangian form of the remainder I n ( x ) = x n + 1 e ξ n ( x ) ( n + 1 ) ! , where 0 &lt; ξ n ( x ) &lt; x , implies I n ( x ) ≥ x n + 1 ( n + 1 ) ! for x ≥ 0 . Since I n ( x ) &lt; n + 2 n + 2 − x x n + 1 ( n + 1 ) ! for x ∈ ( 0, n + 2 ) ( [<xref ref-type="bibr" rid="scirp.128377-ref25">25</xref>] , pp. 323-324, 3.8.25), it follows</p><p>x k + 1 e − x ( k + 1 ) ! ≤ P ( k + 1, x ) ≤ 2 x k + 1 e − x ( k + 1 ) !   ( k ∈ ℕ 0 ,0 ≤ x ≤ k + 2 2 ) , (25)</p><p>where the equality holds only for x = 0 .</p><p>Theorem 2. Let f ^ ( x ) = ∑ k = 0 ∞     c ^ k x 2 k and f ˜ ( x ) = ∑ k = 0 ∞     c ˜ k x 2 k + 1 be absolutely convergent series for x ∈ ℝ . Then</p><p>F ^ ( x ) = ∫ 0 x     φ ( β t ) f ^ ( t ) d t = 1 2 ∑ k = 0 ∞ ( 2 k − 1 ) ! ! c ^ k | β | 2 k + 1 P ( k + 1 2 , 1 2 β 2 x 2 ) (26)</p><p>and</p><p>F ˜ ( x ) = ∫ 0 x     φ ( β t ) f ˜ ( t ) d t = 1 2 π ∑ k = 0 ∞ ( 2 k ) ! ! c ˜ k β 2 k + 2 P ( k + 1, 1 2 β 2 x 2 ) (27)</p><p>for x ≥ 0 and β ≠ 0 .</p><p>Proof. Let f k ( t ) = c ^ k φ ( β t ) t 2 k and F k ( x ) = ∫ 0 x     f k ( t ) d t for x ≥ 0 . Using ( 2 k − 1 ) ! ! = 2 k π Γ ( k + 1 2 ) and a substitution 1 2 β 2 t 2 = u , we get</p><p>F k ( x ) = c ^ k 2 π ∫ 0 x     e − 1 2 β 2 t 2 t 2 k   d t = 2 k − 1 c ^ k π | β | 2 k + 1 ∫ 0 1 2 β 2 x 2     u k − 1 2 e − u   d u = ( 2 k − 1 ) ! ! c ^ k 2 | β | 2 k + 1 γ ( k + 1 2 , 1 2 β 2 x 2 ) Γ ( k + 1 2 ) = ( 2 k − 1 ) ! ! c ^ k 2 | β | 2 k + 1 P ( k + 1 2 , 1 2 β 2 x 2 ) .</p><p>Setting j = ⌈ β 2 x 2 ⌉ + 1 implies 0 ≤ u &lt; j + 2 2 for u ∈ [ 0, 1 2 β 2 x 2 ] . Then</p><p>∑ k = 0 ∞ | F k ( x ) | = ∑ k = 0 j | F k ( x ) | + ∑ k = j + 1 ∞ | F k ( x ) | , where the first sum is finite. Using the fact that P ( a , x ) is a decreasing function of a ( [<xref ref-type="bibr" rid="scirp.128377-ref26">26</xref>] , p. 154), (25) and the absolute convergence assumption of f ^ ( x ) , it follows</p><p>P ( k + 1 2 , 1 2 β 2 x 2 ) ≤ P ( k , 1 2 β 2 x 2 ) ≤ 2 β 2 k x 2 k   e − 1 2 β 2 x 2 2 k k !   ( k ≥ j + 1 )</p><p>and</p><p>∑ k = j + 1 ∞ | F k ( x ) | = ∑ k = j + 1 ∞ ( 2 k − 1 ) ! ! | c ^ k | 2 | β | 2 k + 1 P ( k + 1 2 , 1 2 β 2 x 2 ) ≤ e − 1 2 β 2 x 2 | β | ∑ k = j + 1 ∞ ( 2 k − 1 ) ! ! ( 2 k ) ! ! | c ^ k | x 2 k &lt; ∞ .</p><p>Noting that ∫ 0 x | f k ( t ) | d t = | F k ( x ) | , we proved that ∑ k = 0 ∞ ∫ 0 x | f k ( t ) | d t &lt; ∞ . By Fubini’s theorem it follows that ∫ 0 x     φ ( β t ) f ^ ( t ) d t = ∑ k = 0 ∞     F k ( x ) , hence (26).</p><p>Let f k ( t ) = c ˜ k φ ( β t ) t 2 k + 1 and F k ( x ) = ∫ 0 x     f k ( t ) d t for x ≥ 0 . Analogously to above, and using ( 2 k ) ! ! = 2 k k ! = 2 k Γ ( k + 1 ) , we get F k ( x ) = ( 2 k ) ! ! c ˜ k 2 π   β 2 k + 2 P ( k + 1, 1 2 β 2 x 2 ) ,</p><p>∑ k = j + 1 ∞ | F k ( x ) | ≤ | x | e − 1 2 β 2 x 2 2 π ∑ k = j + 1 ∞ | c ˜ k | | x | 2 k + 1 k + 1 &lt; ∞</p><p>and (27). □</p><p>Note that in the same way as the Equations (26) and (27) were derived, analogous equations can be derived if the integration limits 0 and x are replaced by x and ∞ respectively, and lower regularized gamma function is replaced by the upper one. However, for each case it should be checked whether the order of integration and summation can be reversed.</p><p>The usefulness of Theorem 2 is that if the sequences { c ^ k } and { c ˜ k } can be computed recursively, then the terms of the series (26) and (27) can be too. Let</p><p>q = 1 2 β 2 x 2 . Crucial is the calculation of d ^ k = Q ( k + 1 2 , q ) and d ˜ k = P ( k + 1, q ) ,</p><p>k ∈ ℕ 0 , the rest is trivial. Since P ( k + 1, q ) = 1 − Q ( k + 1, q ) , we will calculate d k = Q ( k + 1, q ) instead of d ˜ k = 1 − d k .</p><p>Using P ( 1 2 , q ) = 2 Φ ( 2 q ) − 1 ( [<xref ref-type="bibr" rid="scirp.128377-ref1">1</xref>] , p. 934, 26.2.30), we get d ^ 0 = 1 − P ( 1 2 , q ) = 2 ( 1 − Φ ( 2 q ) ) , and d 0 = e − q . Since P ( a + 1, x ) = P ( a , x ) − x a   e − x Γ ( a + 1 ) ( [<xref ref-type="bibr" rid="scirp.128377-ref1">1</xref>] , p. 262, 6.5.21) implies Q ( a + 1, x ) = Q ( a , x ) + x a   e − x Γ ( a + 1 ) , using auxiliary variables b ^ k = q k − 1 2   e − q Γ ( k + 1 2 ) and b k = q k   e − q Γ ( k + 1 ) , it follows</p><p>b ^ 0 = e − q q π ,   d ^ 0 = 2 ( 1 − Φ ( 2 q ) )   and   b ^ k + 1 = q b ^ k k + 1 2 ,   d ^ k + 1 = d ^ k + b ^ k + 1</p><p>for q ≠ 0 and k = 0,1,2,... , and</p><p>b 0 = e − q ,   d 0 = b 0   and   b k + 1 = q b k k + 1 ,   d k + 1 = d k + b k + 1 (28)</p><p>for k = 0,1,2,...</p></sec><sec id="s4"><title>4. Main Results</title><p>The core of this article are Theorems 3, 4 and 5. Since the first two do not specify variants for the transformed parameters, the last one, together with (13) and (14), is more practically useful. It also justifies the title of the article.</p><p>Theorem 3. Let h ∈ ℝ , ρ ∈ ( − 1,1 ) , r = ρ 1 − ρ 2 and q = 1 2 ( 1 + r 2 ) h 2 = h 2 2 ( 1 − ρ 2 ) . Then</p><p>Φ ρ 2 ( h ,0 ) = 1 2 Φ ( h ) + arctan r 2 π − r 2 π ( 1 + r 2 ) ∑ k = 0 ∞     c k ( r 2 1 + r 2 ) k = 1 2 Φ ( h ) + arcsin ρ 2 π − 1 − ρ 2 2 π ∑ k = 0 ∞     c k ρ 2 k + 1 , (29)</p><p>where c k = ( 2 k ) ! ! ( 2 k + 1 ) ! ! P ( k + 1, q ) . The series S = ∑ k = 0 ∞     c k ( r 2 1 + r 2 ) k converges for every r , h ∈ ℝ . If it is truncated after the n<sup>th</sup> term, then</p><p>Φ ρ 2 ( h ,0 ) = 1 2 Φ ( h ) + arctan r 2 π − r S n 2 π ( 1 + r 2 ) − sgn ( r ) R n   ( n ∈ ℕ − 1 ) , (30)</p><p>where S n = ∑ k = 0 n     c k ( r 2 1 + r 2 ) k and R n = | r | 2 π ( 1 + r 2 ) ∑ k = n + 1 ∞     c k ( r 2 1 + r 2 ) k is bounded by</p><p>0 ≤ R n ≤ B n 1 + e − q r 2 ≤ B n , (31)</p><p>where B n = ( 2 n + 2 ) ! ! ( 2 n + 3 ) ! ! | r | 2 π ( 1 − e − q ) n + 2 ( r 2 1 + r 2 ) n + 1 .</p><p>Proof. From (7) and Φ ( x ) − 1 2 = φ ( x ) ∑ k = 0 ∞ x 2 k + 1 ( 2 k + 1 ) ! ! for x ∈ ℝ ( [<xref ref-type="bibr" rid="scirp.128377-ref1">1</xref>] , p. 932, 26.2.11), it follows</p><p>∂ T ( h , r ) ∂ h = − h 2 π ∫ 0 r     e − 1 2 h 2 ( 1 + x 2 )   d x = − φ ( h ) ( Φ ( r h ) − 1 2 ) = φ ( β h ) ∑ k = 0 ∞     c ˜ k h 2 k + 1 , (32)</p><p>r , h ∈ ℝ , where β = 1 + r 2 and c ˜ k = − r 2 k + 1 2 π ( 2 k + 1 ) ! ! . Since</p><p>∑ k = 0 ∞     c ˜ k h 2 k + 1 = − φ ( h ) φ ( β h ) ( Φ ( r h ) − 1 2 ) = − e 1 2 r 2 h 2 ( Φ ( r h ) − 1 2 ) ,</p><p>the series on the left side converges for every r , h ∈ ℝ and is an odd function of r h . If r h &lt; 0 , then all its terms are positive, implying that it converges absolutely.</p><p>All requirements of Theorem 2 are fulfilled. Assuming r ≥ 0 and using T ( 0, r ) = arctan r 2 π , (32) and (27), it follows</p><p>T ( h , r ) = arctan r 2 π − 1 2 π ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! r 2 k + 1 β 2 k + 2 P ( k + 1, 1 2 β 2 h 2 ) ,</p><p>which, together with (12), (7), r 2 β 2 = r 2 1 + r 2 = ρ 2 , r 1 + r 2 = ρ 1 − ρ 2 and 1 2 β 2 h 2 = q , imply (29) for r ≥ 0 . Since (7) implies T ( h , − r ) = − T ( h , r ) , (29) is also valid for r &lt; 0 . Let α = 1 − e − q . Using (23), (21) and (22), it follows</p><p>0 ≤ R n ≤ α | r | 2 π ( 1 + r 2 ) ∑ k = n + 1 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! ( α r 2 1 + r 2 ) k = α | r | 2 π ( 1 + r 2 ) S ( r , α )</p><p>and (31). □</p><p>Note that if r h ≠ 0 , then c k &gt; 0 and c k + 1 c k = 2 k + 2 2 k + 3 P ( k + 2 , q ) P ( k + 1 , q ) &lt; 1 . Hence the sequence { c k ( r 2 1 + r 2 ) k } is decreasing.</p><p>Corollary 1. For every h ∈ ℝ we have</p><p>Φ ( h ) = 1 2 + sgn ( h ) S ,     where     S = 1 2 π ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! P ( k + 1, h 2 ) 2 k . (33)</p><p>Proof. Using (29) with ρ = − 2 2 , hence r = − 1 , q = h 2 and the right Equation (16), it follows</p><p>1 2 Φ ( h ) − 1 8 + 1 4 π ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! P ( k + 1, h 2 ) 2 k = 1 2 ( Φ ( h ) ) 2</p><p>and a quadratic equation ( Φ ( h ) ) 2 − Φ ( h ) + 1 4 − S = 0 . If h = 0 , then S = 0 and (33) is valid. If h ≠ 0 , since Φ ( h ) &gt; 1 2 if h &gt; 0 and Φ ( h ) &lt; 1 2 if h &lt; 0 , only 1 2 + sgn ( h ) S is a proper root of the two. Note that sending h → ∞ implies ∑ k = 0 ∞ k ! ( 2 k + 1 ) ! ! = π 2 . □</p><p>Theorem 4. Let h ∈ ℝ , ρ ∈ ( − 1,1 ) , r = ρ 1 − ρ 2 and q = 1 2 ( 1 + r 2 ) h 2 = h 2 2 ( 1 − ρ 2 ) . Then</p><p>Φ ρ 2 ( h ,0 ) = 1 2 Φ ( h ) + r 2 π ( 1 + r 2 ) ∑ k = 0 ∞     c k ( r 2 1 + r 2 ) k = 1 2 Φ ( h ) + 1 − ρ 2 2 π ∑ k = 0 ∞     c k ρ 2 k + 1 , (34)</p><p>where c k = ( 2 k ) ! ! ( 2 k + 1 ) ! ! Q ( k + 1, q ) . The series S = ∑ k = 0 ∞     c k ( r 2 1 + r 2 ) k converges for every r , h ∈ ℝ . If it is truncated after the n<sup>th</sup> term, then</p><p>Φ ρ 2 ( h ,0 ) = 1 2 Φ ( h ) + r S n 2 π ( 1 + r 2 ) + sgn ( r ) R n   ( n ∈ ℕ − 1 ) , (35)</p><p>where S n = ∑ k = 0 n     c k ( r 2 1 + r 2 ) k and R n = | r | 2 π ( 1 + r 2 ) ∑ k = n + 1 ∞     c k ( r 2 1 + r 2 ) k is bounded by</p><p>0 ≤ R n ≤ B n ,     where     B n = ( 2 n + 2 ) ! ! ( 2 n + 3 ) ! ! | r | 2 π ( r 2 1 + r 2 ) n + 1 . (36)</p><p>Proof. Using (29), (19), P ( k + 1, x ) = 1 − Q ( k + 1, x ) , r 2 1 + r 2 = ρ 2 and</p><p>r 1 + r 2 = ρ 1 − ρ 2 , it follows (34). Noting that R n = | r | 2 π ( 1 + r 2 ) S ( r ,1 ) and (22) imply (36). □</p><p>Note that the upper bound (24) is not suitable for a simple estimation of R n here because lim k → ∞ s k + 1 = 0 , hence Q ( k + 1, q ) ≤ 1 was implicitly used instead.</p><p>Q ( a , x ) is an increasing function of a. The ratio c k + 1 c k = 2 k + 2 2 k + 3 Q ( k + 2, q ) Q ( k + 1, q ) can be greater than 1, e.g. if h = 3 and r = 1 , we get c 2 c 1 = 4 Q ( 3 , 9 ) 5 Q ( 2 , 9 ) ≈ 4.04 . In Theorem 4, the sequence { c k ( r 2 1 + r 2 ) k } is not always decreasing, but, in any case, the well-behaved arctan | r | series (19) divided by 2π is a majorant series for | r | S 2 π ( 1 + r 2 ) from Theorems 3 and 4.</p><p>Corollary 2. Let x , y ∈ ℝ , x 2 + y 2 &gt; 0 , ρ ∈ ( − 1,1 ) , ρ x = ( ρ x − y ) sgn ( x ) x 2 − 2 ρ x y + y 2 , ρ y = ( ρ y − x ) sgn ( y ) x 2 − 2 ρ x y + y 2 and q = x 2 − 2 ρ x y + y 2 2 ( 1 − ρ 2 ) . Let c k = ( 2 k ) ! ! ( 2 k + 1 ) ! ! P ( k + 1, q ) and c ˜ k = ( 2 k ) ! ! ( 2 k + 1 ) ! ! Q ( k + 1, q ) for k ∈ ℕ 0 . Then</p><p>Φ ρ 2 ( x , y ) = 1 2 ( Φ ( x ) + Φ ( y ) ) + arcsin ρ x + arcsin ρ y 2 π − S − β = 1 2 ( Φ ( x ) + Φ ( y ) ) + S ˜ − β , (37)</p><p>where</p><p>S = 1 2 π 2 q ∑ k = 0 ∞     c k ( | x | ρ x 2 k + 1 + | y | ρ y 2 k + 1 ) ,</p><p>S ˜ is S with c ˜ k instead of c k , and β = 0 if x y &gt; 0 or x y = 0 and x + y ≥ 0 , and β = 1 2 otherwise.</p><p>Proof. Since q x = x 2 2 ( 1 − ρ x 2 ) = x 2 − 2 ρ x y + y 2 2 ( 1 − ρ 2 ) = q and q y = y 2 2 ( 1 − ρ y 2 ) = x 2 − 2 ρ x y + y 2 2 ( 1 − ρ 2 ) = q , 1 − ρ x 2 = | x | 1 − ρ 2 x 2 − 2 ρ x y + y 2 = | x | 2 q and</p><p>1 − ρ y 2 = | y | 2 q , (4), (5), (29) and (34) imply (37). □</p><p>Note that r 1 + r 2 = r &#175; 1 + r &#175; 2 and q = 1 2 ( 1 + r 2 ) h 2 = 1 2 ( 1 + r &#175; 2 ) h &#175; 2 = q &#175; , therefore they are invariant on the transformation of r h ↦ h &#175; and 1 r ↦ r &#175; , but S n , R n and B n from Theorems 3 and 4 are not because ρ 2 = r 2 1 + r 2 ↦ 1 1 + r 2 = r &#175; 2 1 + r &#175; 2 = ρ &#175; 2 and ρ 2 ≠ ρ &#175; 2 if | r | ≠ 1 . They transform to S &#175; n , R &#175; n and B &#175; n . By transforming the parameters and using (17), the Equations (30) and (35) can be rewritten to</p><p>Φ ρ 2 ( h , 0 ) = 1 2 Φ ( r h ) + Φ ( h ) ( 1 − Φ ( r h ) ) − arctan r &#175; 2 π + r S &#175; n 2 π ( 1 + r 2 ) + sgn ( r ) R &#175; n − β (38)</p><p>and</p><p>Φ ρ 2 ( h , 0 ) = 1 2 Φ ( r h ) + Φ ( h ) ( 1 − Φ ( r h ) ) − r S &#175; n 2 π ( 1 + r 2 ) − sgn ( r ) R &#175; n − β (39)</p><p>respectively, where β = 0 if r ≥ 0 and β = 1 2 if r &lt; 0 .</p><p>The transformation makes sense if | r | &gt; 1 , implying ρ &#175; 2 &lt; 1 2 and faster con</p><p>vergence. For example, the inequality 0 ≤ R n ≤ B n from Theorem 4 transforms into 0 ≤ R &#175; n ≤ B &#175; n , where the upper bound B &#175; n is r 2 n + 4 -times smaller than a corresponding upper bound B n . The noteworthy cost for faster convergence is the additional computation of Φ ( r h ) .</p><p>Theorem 5. If | r | &lt; ∞ , the Owen’s T function (7) can be written as</p><p>T ( h , r ) = arctan r 2 π − r 2 π ( 1 + r 2 ) ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! P ( k + 1, q ) ( r 2 1 + r 2 ) k (40a)</p><p>= r 2 π ( 1 + r 2 ) ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! Q ( k + 1, q ) ( r 2 1 + r 2 ) k (40b)</p><p>= U ( h , r ) − arctan r 2 π + r 2 π ( 1 + r 2 ) ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! P ( k + 1, q ) ( 1 1 + r 2 ) k (40c)</p><p>= U ( h , r ) − r 2 π ( 1 + r 2 ) ∑ k = 0 ∞ ( 2 k ) ! ! ( 2 k + 1 ) ! ! Q ( k + 1, q ) ( 1 1 + r 2 ) k , (40d)</p><p>where q = 1 2 ( 1 + r 2 ) h 2 , U ( h , r ) = 1 2 ( Φ ( h ) + Φ ( r h ) ) − Φ ( h ) Φ ( r h ) − β , and β = 0 if r ≥ 0 and β = 1 2 if r &lt; 0 .</p><p>Proof. Using (12) and (7), the Equations (29) and (34) imply (40a) and (40b) respectively, which, together with (17), imply (40c) and (40d) respectively. □</p><p>Note that when truncating the series (40a) and (40b), the truncation error in absolute value can be estimated by (31) and (36) respectively. The same upper</p><p>bounds with r &#175; = 1 r instead of r also apply to (40c) and (40d).</p><p>Because of (40b) and 0 ≤ Q ( k + 1, q ) ≤ 1 , the Owen’s T function can be seen as a modified Euler’s arctangent series (19) divided by 2π, which is its majorant series.</p></sec><sec id="s5"><title>5. Recursion and Asymptotic Speed of Convergence</title><p>Let S ˜ = r S 2 π ( 1 + r 2 ) and e ˜ k = B k , where S and B k relate to Theorem 4. Using (34) and (28), the series S ˜ can be calculated by Recursion 1 (tildes are omitted). Analogously, let S ^ = r S 2 π ( 1 + r 2 ) and e ^ k = B k , where S and B k relate to Theorem</p><p>3. The series S ^ can be calculated by Recursion 2 (hats are omitted). In practice, both recursions can be easily combined, since only four steps, marked with ⊳ , are different.</p><p>In both cases, given ε &gt; 0 , the recursion is terminated when the condition e k + 1 &lt; ε is met and S k + 1 is taken as its result. However, if ε &gt; 0 is too small, or even intentionally negative, the calculation proceeds up to the actual accuracy threshold—the recursion is terminated when the condition S k + 1 ≤ S k is met. This criterion was used in the calculations presented in the next section.</p><p>In both recursions, all variables are positive and are bounded upward. If q ≠ 0 , the sequence { d k } strictly increases and, due to (24), converges to 1. The sequence { S k } is strictly increasing if r ≠ 0 . If r = 0 , the recursion terminates</p><p>with S 1 = 0 . Note that (7) implies | T ( r , h ) | ≤ arctan | r | 2 π . If step 7 in Recursion 2 is replaced by S 0 ← a 0 ( 1 − d 0 ) − arctan | r | 2 π , the sequence { S k } changes its sign but keeps the direction. However, the modified Recursion 2 computes S ^ = r S 2 π ( 1 + r 2 ) − arctan r 2 π .</p><p>Let S ˜ n and S ^ n be the results of Recursion 1 and modified Recursion 2 respectively, calculated with the same h and r if | r | ≤ 1 , or with h &#175; and r &#175; if | r | &gt; 1 . Let Φ ˜ ρ 2 ( h ,0 ) be calculated by (35) or (39), where unknown remainders are ignored. Analogously, let Φ ^ ρ 2 ( h ,0 ) be calculated by (30) or (38), where also</p><p>arctan r 2 π is ignored. If | r | ≤ 1 , then Φ ˜ ρ 2 ( h ,0 ) ≤ Φ ρ 2 ( h ,0 ) ≤ Φ ^ ρ 2 ( h ,0 ) if r ≥ 0</p><p>and Φ ˜ ρ 2 ( h ,0 ) ≥ Φ ρ 2 ( h ,0 ) ≥ Φ ^ ρ 2 ( h ,0 ) if r &lt; 0 . Even if | r | &gt; 1 , one of Φ ˜ ρ 2 ( h ,0 ) and Φ ^ ρ 2 ( h ,0 ) underestimates and the other overestimates Φ ρ 2 ( h ,0 ) . Consequently, the upper bounds (31) and (36) are not needed if S ˜ and modified S ^ are calculated in the same recursion which terminates when | S ^ k + 1 − S ˜ k + 1 | become small enough. Upper bounds are also not needed if in Recursions 1 and 2 step 17 is replaced so that S k + 1 ≤ S k is the only termination condition. In this case, steps 3, 8 and 15 are unnecessary.</p><disp-formula id="scirp.128377-formula1"><graphic  xlink:href="//html.scirp.org/file/3-1101051x452.png?20231018165035020"  xlink:type="simple"/></disp-formula><p>Given q, which one of the series (29) and (34) converges faster? Since P ( k + 1, x ) is a cdf of the gamma distribution with the median</p><p>ν ∈ ( k + 2 3 , k + 1 ) , it follows P ( k + 1, q ) ≤ Q ( k + 1, q ) if q ≤ ν &lt; k + 1 . The an</p><p>swer depends on the number of considered terms, which depends on the prescribed accuracy. On this basis, it seems that series (29) is more suitable than (34) for “small” q and vice versa for “large” q. <xref ref-type="table" rid="table1">Table 1</xref> and <xref ref-type="table" rid="table4">Table 4</xref> in the next section show how this is reflected in practice.</p><p>Gautschi’s inequality x 1 − s &lt; Γ ( x + 1 ) Γ ( x + s ) &lt; ( x + 1 ) 1 − s ( [<xref ref-type="bibr" rid="scirp.128377-ref27">27</xref>] , p. 138, 5.6.4) with s = 1 2 implies k π 2 k + 1 &lt; ( 2 k ) ! ! ( 2 k + 1 ) ! ! &lt; ( k + 1 ) π 2 k + 1 . Combining it with (25), sending k → ∞ and neglecting non-essential constants imply that the series (29) asymptotically converges as ∑ k q k + 1 e − q ( k + 1 ) ! ρ 2 k k + 1 . Assuming calculation with h &#175; , r &#175; and (38) instead of h, r and (30) respectively if | r | &gt; 1 , hence ρ 2 &gt; 1 2 , and recalling that q is invariant on the transformation of r h ↦ h &#175; and 1 r ↦ r &#175; , we get an asymptotic convergence as ∑ k q &#175; k + 1 e − q &#175; ( k + 1 ) ! ρ &#175; 2 k k + 1 = ∑ k q k + 1 e − q ( k + 1 ) ! ( 1 − ρ 2 ) k k + 1 . The series (29) or its corresponding transformed version, unwritten and based on (40c), asymptotically converges as ∑ k q k + 1 e − q ( k + 1 ) ! ( min { ρ 2 , 1 − ρ 2 } ) k k + 1 = ∑ k q k + 1 e − q ( k + 1 ) ! min { r 2 k , 1 } k + 1 ( 1 + r 2 ) k , where q = 1 2 ( 1 + r 2 ) h 2 = h 2 2 ( 1 − ρ 2 ) . On the other hand, since (24) implies lim k → ∞ Q ( k + 1, x ) = 1 , the series (34) or its corresponding transformed version, unwritten and based on (40d), asymptotically converges as ∑ k ( min { ρ 2 ,1 − ρ 2 } ) k k + 1 = ∑ k min { r 2 k ,1 } k + 1 ( 1 + r 2 ) k , hence in the worst case as ∑ k 1 2 k k + 1 .</p><p>Based on both asymptotic convergences, comparing (34) to (29) would be unfair because the calculation of arctan | r | should also be taken into account for (29). Since it is implicitly embedded in Recursion 1, it is calculated on the fly at the cost of worse speed of convergence. Each of the recursions is executable with the basic four arithmetic operations, two calls of elementary functions (if the calculation of r from ρ is also considered), and arctan | r | in the modified Recursion 2. However, the computational cost of Φ ( h ) (and Φ ( r h ) if needed) should also be taken in account, but it is the same in (29) and (34).</p></sec><sec id="s6"><title>6. Numeric Issues and Testing Results</title><p>A common cause of numerical instability, where two absolutely large values give an absolutely small result when added or subtracted, cannot occur in Recursions 1 and 2. The calculation by them is stable, but something may happen that needs</p><p>to be pointed out. The side effect of transforming r h ↦ h &#175; and 1 r ↦ r &#175; is that</p><p>| h &#175; | can become unusually large. When computing Φ ( h ) , according to Marsaglia ( [<xref ref-type="bibr" rid="scirp.128377-ref28">28</xref>] , p. 2), “[...] the region of interest may not be the statistician’s 0 &lt; x &lt; 5 , say, but rather 10 &lt; x &lt; 14 [...]’’. Assume the same needs when computing Φ ρ 2 ( h ,0 ) ,</p><p>and using transformed parameters if ρ 2 &gt; 1 2 . If h = 14 and</p><p>ρ = 10 1 + 10 2 ≈ 0.995 , then r ≈ 10 , r &#175; ≈ 0.1 and h &#175; ≈ 140 , implying that the</p><p>region of interest could be | h | &lt; 140 . Even the usual | h | &lt; 5 transformed to | h &#175; | &lt; 50 is well beyond the established limits.</p><p>The “problem” of too large | h | is mentioned because we have to be aware of it if we are going to perform high-precision computation. In any case, the recursion must be complemented by a suitable computation of Φ ( h ) and arctan r if needed. As an example that not all are like that, the computation by the well</p><p>known series Φ ( x ) = 1 2 + 1 2 π ∑ k = 0 ∞ ( − 1 ) k x 2 k + 1 2 k k ! ( 2 k + 1 ) ( [<xref ref-type="bibr" rid="scirp.128377-ref1">1</xref>] , p. 932, 26.2.10) and the</p><p>standard double precision arithmetic is numerically unstable even for moderately large | h | , e.g. using the programming language R [<xref ref-type="bibr" rid="scirp.128377-ref29">29</xref>] , for h = 10 we get a completely wrong result, approximately −1683. A similar problem can lead to a significant decrease in accuracy if T ( h , r ) is calculated with (7), as will be seen in Subsection 6.1.</p><p>In double precision arithmetic, the minimal positive non-zero number is η ≈ 2.23 &#215; 10 − 308 . Assuming b 0 = e − q ≥ η , it follows q max = − log ( η ) ≈ 708.40 and</p><p>h max ( r ) = − 2 log ( η ) 1 + r 2 . If | r | ≤ 1 , then h max ( r ) is between h max ( 1 ) ≈ 26.62 and</p><p>h max ( 0 ) ≈ 37.64 . If e − q &lt; η , then all elements of the sequence { b k } are zero. Consequently, all elements of { d k } are one and all elements of { S k } in Recursion 2 are zero.</p><p>From the integral in (7), it follows | T ( h , r ) | ≤ φ ( h ) Φ ( | r | | h | ) − 1 2 | h | ≤ φ ( h ) 2 | h | if h ≠ 0 , where the upper bound is a decreasing function of | h | . If e − q &lt; η and | r | ≤ 1 , then | h | &gt; h max ( 1 ) and | T ( h , r ) | ≤ φ ( h max ( 1 ) ) 2   h max ( 1 ) ≈ 1.12 &#215; 10 − 156 . Analogously to the case when r = 0 , the recursion terminates with S 1 = 0 , which is practically a correct result for T ( h , r ) , as well as Φ ρ 2 ( h , 0 ) = 1 2 if h &gt; 0 , and Φ ρ 2 ( h , 0 ) = 0 if h &lt; 0 .</p><p>The Recursions 1 and 2 with adjustment of their results according to (40a)—(40d) are implemented in the package Phi2rho [<xref ref-type="bibr" rid="scirp.128377-ref30">30</xref>] . It contains the functions OwenT(), hereafter Phi2rho::OwenT(), and Phi2xy(), which compute T ( h , r ) and Φ ρ 2 ( x , y ) respectively. They also enable computation with the tetrachoric and Vasicek’s series, original or accelerated. The latter means that h and r are transformed if r &gt; 1 and r &lt; 1 for the tetrachoric and Vasicek’s series respectively, and the Equation (15) is used, so (18) instead of (9) in the case of tetrachoric series. For the sake of comparison, all series were considered during testing in Subsection 6.1. In Subsection 6.2, the original tetrachoric and Vasicek’s series were excluded because they converge too slowly for unfavorable ρ .</p><p>During testing, the values of T ( r , h ) and Φ ρ 2 ( x , y ) were computed for a selected and randomly generated set of parameters. Reference values were computed using the accelerated tetrachoric series and quadruple (128-bit) precision. Absolute differences between tested and reference values are declared as absolute errors. The maximum absolute error is considered a measure of accuracy. Since the mean values and some quantiles are also important, they are shown in the tables in Subsection 6.2. An integral part of the testing was also a comparison of the results obtained with the Phi2rho package and competing packages available on CRAN.</p><sec id="s6_1"><title>6.1. Numeric Issues and Results When Computing T ( h , r )</title><p>Numerical calculations of T ( h , r ) were performed on 39,999 grid points ( h , r ) ,</p><p>where h ranges from −10 to 10 in increments of 0.1, r = ρ 1 − ρ 2 and ρ ranges</p><p>from −0.99 to 0.99 in increments of 0.01. Since for ρ = &#177; 0.99 we get r ≈ &#177; 7 , the actual range of h for which Φ ( h ) must be computed is approximately from −70 to 70, so well beyond the h max ( 0 ) ≈ 37.64 .</p><p>Note atanExt = no in tables means that Recursion 1 was executed, hence (40b) was used if | r | ≤ 1 and (40d) if | r | &gt; 1 , and atanExt = yes means that Recursion 2 was executed, hence (40a) was used if | r | ≤ 1 and (40c) if | r | &gt; 1 . Both recursions are well suited for vectors, so each of the parameters h and r can be a scalar or a vector. If they are both vectors, they must be of the same length, if one of h and r is a vector and the other is a scalar, the latter is replicated to the length of the former. Since the number of iterations is determined by the “worst’’ component, we would expect execution to be faster if function calls are done in a loop for each component of the vector separately, but usually the run time is significantly increased due to the overhead of the loop, more initialization, etc.</p><p>For the consistency test, T ( h , r ) was calculated on the test grid with h and r both scalars, one a scalar and the other a vector. For all three calculations with Recursion 1, the results matched perfectly, as well as for all three with Recursion 2. The maximum absolute difference between calculations with Recursions 1 and 2 was approximately 9.49 &#215; 10<sup>−17</sup>.</p><p>When testing accuracy, the tetrachoric and Vasicek’s series, original and accelerated, were also tested, using T ( h , r ) = Φ ρ 2 ( h , 0 ) − 1 2 Φ ( h ) . By transforming the</p><p>parameters, if appropriate, both comparison methods gained a lot, as can be concluded from <xref ref-type="table" rid="table1">Table 1</xref>. The absolute errors, the maximum values of which are</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Double precision computation of T ( h , r ) = Φ ρ 2 ( h , 0 ) − 1 2 Φ ( h ) on the test grid</title></caption><table><tbody><thead><tr><th align="center" valign="middle" ></th><th align="center" valign="middle"  colspan="2"  >Tetrachoric</th><th align="center" valign="middle"  colspan="2"  >Vasicek</th><th align="center" valign="middle"  colspan="2"  >Novel series</th></tr></thead><tr><td align="center" valign="middle" ></td><td align="center" valign="middle"  colspan="2"  >accelerated</td><td align="center" valign="middle"  colspan="2"  >accelerated</td><td align="center" valign="middle"  colspan="2"  >atanExt</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >no</td><td align="center" valign="middle" >yes</td><td align="center" valign="middle" >no</td><td align="center" valign="middle" >yes</td><td align="center" valign="middle" >no</td><td align="center" valign="middle" >yes</td></tr><tr><td align="center" valign="middle" >h is a vector</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >Max abs. error</td><td align="center" valign="middle" >9.42e−16</td><td align="center" valign="middle" >1.13e−16</td><td align="center" valign="middle" >9.37e−14</td><td align="center" valign="middle" >1.68e−16</td><td align="center" valign="middle" >9.68e−17</td><td align="center" valign="middle" >1.43e−16</td></tr><tr><td align="center" valign="middle" >Average iter. 1</td><td align="center" valign="middle" >123.2</td><td align="center" valign="middle" >47.2</td><td align="center" valign="middle" >3,575.4</td><td align="center" valign="middle" >65.3</td><td align="center" valign="middle" >66.9</td><td align="center" valign="middle" >22.8</td></tr><tr><td align="center" valign="middle" >r is a vector</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >Max abs. error</td><td align="center" valign="middle" >4.77e−15</td><td align="center" valign="middle" >1.13e−16</td><td align="center" valign="middle" >9.37e−14</td><td align="center" valign="middle" >1.68e−16</td><td align="center" valign="middle" >9.68e−17</td><td align="center" valign="middle" >1.43e−16</td></tr><tr><td align="center" valign="middle" >Average iter. 1</td><td align="center" valign="middle" >1,601.3</td><td align="center" valign="middle" >65.2</td><td align="center" valign="middle" >188,834.8</td><td align="center" valign="middle" >66.6</td><td align="center" valign="middle" >75.5</td><td align="center" valign="middle" >36.4</td></tr><tr><td align="center" valign="middle" >for both</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >Average iter. 2</td><td align="center" valign="middle" >84.2</td><td align="center" valign="middle" >29.8</td><td align="center" valign="middle" >3,355.8</td><td align="center" valign="middle" >31.2</td><td align="center" valign="middle" >38.5</td><td align="center" valign="middle" >18.6</td></tr><tr><td align="center" valign="middle" >Maximum iter.</td><td align="center" valign="middle" >2,447</td><td align="center" valign="middle" >113</td><td align="center" valign="middle" >199,790</td><td align="center" valign="middle" >141</td><td align="center" valign="middle" >125</td><td align="center" valign="middle" >50</td></tr></tbody></table></table-wrap><p>collected in this table, were calculated against the reference values computed with the accelerated tetrachoric series and 128-bit precision.</p><p>Since the vector computations were performed, there are two average numbers of iterations. The first is empirical because the iterations were terminated according to the “worst’’ component of the vector, and the second is hypothetical, if the computations were performed for each component separately. Since all iterations ran to the accuracy limit and with an unbounded number of iterations, the original Vasicek’s series needed the enormous number of iterations, not only for the worse case, but also in average, when calculating with scalar h and vector</p><p>r. However, it is not intended for cases with ρ 2 &lt; 1 2 , and its error can be well estimated, which was ignored here.</p><p>Comparative computations with competing packages were also performed on</p><p>the test grid, using T ( h , r ) = Φ ρ 2 ( h , 0 ) − 1 2 Φ ( h ) . The pbinorm() function from</p><p>the VGAM package [<xref ref-type="bibr" rid="scirp.128377-ref15">15</xref>] , i.e. using (7), had an average and maximum absolute error of 1.12 &#215; 10<sup>−8</sup> and 3.62 &#215; 10<sup>−7</sup> respectively. Similar maximum absolute errors were obtained by the function pbvnorm() from the pbv package [<xref ref-type="bibr" rid="scirp.128377-ref31">31</xref>] , which is based on [<xref ref-type="bibr" rid="scirp.128377-ref6">6</xref>] , and pmvnorm() from the mvtnorm package, but only with the parameter algorithm = Miwa.</p></sec><sec id="s6_2"><title>6.2. Numeric Issues and Results When Computing Φ ρ 2 ( x , y )</title><p>In all Φ ρ 2 ( x , y ) computational methods based on (4) and (5), or (13) and (14), exceptional cases with | ρ | = 1 , x ≠ 0 and x − y sgn ( ρ ) = 0 are not problematic because (3) can be used, however, nearby cases are their weak point. Recalling</p><p>that q x = q y = x 2 − 2 ρ x y + y 2 2 ( 1 − ρ 2 ) = q and using (10) and (2), it follows ∂ ∂ ρ Φ ρ 2 ( x , y ) = e − q 2 π 1 − ρ 2 and lim | ρ | → 1 ∂ ∂ ρ Φ ρ 2 ( x , y ) = 0 , except if</p><p>x − y sgn ( ρ ) = 0 . If | ρ | is close to 1 and x − y sgn ( ρ ) ≃ 0 , then</p><p>x 2 − 2 ρ x y + y 2 ≃ 0 and q may be small enough that ∂ ∂ ρ Φ ρ 2 ( x , y ) is moderate</p><p>or even large. As a result, even a small rounding error in the calculation of key variables that depend on ρ can cause a much larger error in the result. The calculation of r x and r y with (14) is particularly problematic. In a similar situation, Meyer ( [<xref ref-type="bibr" rid="scirp.128377-ref9">9</xref>] , p. 5) recommends an equivalent but less sensitive calculation</p><p>by r x = x − y x 1 − ρ 2 − 1 − ρ 1 + ρ if ρ ≈ 1 and r x = x + y x 1 − ρ 2 − 1 + ρ 1 − ρ if ρ ≈ − 1 , and</p><p>analogously for r y . In our case, his proposal improves accuracy, but does not solve the problem sufficiently.</p><p>The problem could be solved by a hybrid computation along the lines of some other methods, e.g. the series from ( [<xref ref-type="bibr" rid="scirp.128377-ref32">32</xref>] , pp. 242-245) could be used if | ρ | ≈ 1 and x − y sgn ( ρ ) ≃ 0 . Using the initial idea to develop these series, i.e. axis rotation in a way that removes the cross product term − 2 ρ s t in (1), by setting</p><p>s = u + v 2 and t = u − v 2 the Equation (1) transforms to</p><p>Φ ρ 2 ( x , y ) = 1 2 π 1 − ρ 2 ∫ − ∞ x − y 2     e − u 2 2 ( 1 − ρ ) ( ∫ − ∞ u + 2 y e − v 2 2 ( 1 + ρ )   d v ) d u       + 1 2 π 1 − ρ 2 ∫ x − y 2 ∞     e − u 2 2 ( 1 − ρ ) ( ∫ − ∞ − u + 2 x     e − v 2 2 ( 1 + ρ )   d v ) d u</p><p>and, using u 1 − ρ = u ˜ and v 1 + ρ = v ˜ , to</p><p>Φ ρ 2 ( x , y ) = ∫ − ∞ x − y 2 ( 1 − ρ )     φ ( u ˜ ) Φ ( u ˜ 1 − ρ 1 + ρ + y 2 1 + ρ ) d u ˜       + ∫ x − y 2 ( 1 − ρ ) ∞     φ ( u ˜ ) Φ ( − u ˜ 1 − ρ 1 + ρ + x 2 1 + ρ ) d u ˜ .</p><p>By transforming u ˜ ↦ − u ˜ in the second integral and using ( [<xref ref-type="bibr" rid="scirp.128377-ref14">14</xref>] , p. 402, 10,010.1),</p><p>it follows Φ ρ 2 ( x , y ) = Φ ρ * 2 ( x − y 2 ( 1 − ρ ) , y ) + Φ ρ * 2 ( − x − y 2 ( 1 − ρ ) , x ) , where ρ * = − 1 − ρ 2 . This equation is suitable for ρ ≈ 1 . From it and Φ ρ 2 ( x , y ) = Φ ( x ) − Φ − ρ 2 ( x , − y ) we obtain the equation</p><p>Φ ρ 2 ( x , y ) = Φ ( x ) − Φ ρ ^ 2 ( x + y 2 ( 1 + ρ ) , − y ) − Φ ρ ^ 2 ( − x + y 2 ( 1 + ρ ) , x ) ,</p><p>where ρ ^ = − 1 + ρ 2 , that is suitable for ρ ≈ − 1 . Both are combined in</p><p>Φ ρ 2 ( x , y ) = 1 − sgn ( ρ ) 2 Φ ( x ) + sgn ( ρ ) ( Φ ρ ˜ 2 ( z , y ˜ ) + Φ ρ ˜ 2 ( − z , x ) ) , (41)</p><p>where ρ ˜ = − 1 − | ρ | 2 , y ˜ = y sgn ( ρ ) and z = x − y ˜ 2 ( 1 − | ρ | ) . Noting that</p><p>q ˜ = y ˜ 2 − 2 ρ ˜ y ˜ z + z 2 2 ( 1 − ρ ˜ 2 ) = x 2 + 2 ρ ˜ x z + z 2 2 ( 1 − ρ ˜ 2 ) = x 2 − 2 ρ x y + y 2 2 ( 1 − ρ 2 ) = q ,</p><p>hence φ ρ ˜ 2 ( z , y ˜ ) = φ ρ ˜ 2 ( − z , x ) = e − q π 2 ( 1 + | ρ | ) , we stop here because one potentially critical case is replaced with two non-critical ones.</p><p>If we continued to simplify the right side of (41) by (13), we would get (13). This actually happens when calculating with the functions used in tests, but it turns out that the results are more accurate than if we start with (13) if | ρ | ≈ 1 and x − y sgn ( ρ ) ≃ 0 . Of course, the Equation (41) could be used as a starting point instead of (13) in all cases, but this is not rational because it requires 4 calculations of the T function instead of 2, two of which cancel each other out, at least in theory, and as a result, in non-critical cases the error may be larger than when starting with (13). When testing, (41) was used as a starting point instead</p><p>of (13) if φ ρ 2 ( x , y ) &gt; 1 . However, since min { | ρ | , 1 − | ρ | 2 } ≤ 1 2 , using (41) may</p><p>also make sense in some other circumstances, e.g. when computing directly with (8).</p><p>In this case, testing was performed on the randomly generated set of parameters. After setting the random generator seed to 123 to allow replication and independent verification, one million x values, one million y values, and one million ρ values were drawn from a uniform distribution on the intervals ( − 10,10 ) , ( − 10,10 ) , and ( − 1,1 ) respectively.</p><p>For each triplet ( x , y , ρ ) , auxiliary values q = x 2 − 2 ρ x y + y 2 2 ( 1 − ρ 2 ) and</p><p>φ ρ 2 ( x , y ) = e − q 2 π 1 − ρ 2 were calculated. For the new series, the tested Φ ρ 2 ( x , y )</p><p>values were computed using (41) as a branch point and (13) for both branches if φ ρ 2 ( x , y ) &gt; 1 , and using (13) directly otherwise. The same applies for the tetrachoric and Vasicek’s series, only (4) must be used instead of (13). However, the described procedure is built in the Phi2xy() function. The tested Φ ρ 2 ( x , y ) values needed for the preparation of <xref ref-type="table" rid="table2">Table 2</xref> were computed with:</p><p>row 1: Phi2xy(x, y, ρ, fun = &quot;tOwenT&quot;);</p><p>row 2: Phi2xy(x, y, ρ, fun = &quot;vOwenT&quot;);</p><p>row 3: Phi2xy(x, y, ρ, fun = &quot;mOwenT&quot;, opt = FALSE);</p><p>row 4: Phi2xy(x, y, ρ, fun = &quot;mOwenT&quot;, opt = TRUE).</p><p>The absolute errors, which statistics are collected in <xref ref-type="table" rid="table2">Table 2</xref>, were calculated against reference values computed with the accelerated tetrachoric series as described, but with 128-bit precision. From a user’s point of view, only the parameters x, y and ρ needed to be converted into 128-bit “mpfr-numbers’’ before calling Phi2xy(x, y, ρ, fun = &quot;tOwenT&quot;), hence x &lt;- mpfr(x, precBits = 128) and analogously for y and ρ. In this case, the computation took significantly more time, since all intermediate and final results were 128-bit “mpfr-numbers’’.</p><p>In this test, ρ min ≈ − 0.99999991 , ρ max ≈ 0.99999775 , there are 5 cases with φ ρ 2 ( x , y ) &gt; 1 and max φ ρ 2 ( x , y ) ≈ 1.38 .</p><p>In order to better check the accuracy if | ρ | is close to 1, the computation was repeated with the same x and y, and ρ * = 2 Φ ( 8 ρ ) − 1 . In this case, more than half of | ρ * | are greater than 0.9999 and none is equal to 1. The results are in <xref ref-type="table" rid="table3">Table 3</xref>.</p><p>In this test, there are 178 cases with φ ρ 2 ( x , y ) &gt; 1 and max φ ρ 2 ( x , y ) ≈ 376 . For both novel series in <xref ref-type="table" rid="table3">Table 3</xref>, the maximum absolute error is 1.54 &#215; 10<sup>−14</sup> if (41) is not used, improving to 1.21 &#215; 10<sup>−15</sup> if Meyer’s advice is followed. Similarly applies to the other two series.</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Φ ρ 2 ( x , y ) computation—absolute error comparison</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Method</th><th align="center" valign="middle" >Median</th><th align="center" valign="middle" >Mean</th><th align="center" valign="middle" >3rd Qu.</th><th align="center" valign="middle" >99%</th><th align="center" valign="middle" >Max.</th></tr></thead><tr><td align="center" valign="middle" >Tetrachoric series (accelerated)</td><td align="center" valign="middle" >2.86e−17</td><td align="center" valign="middle" >3.68e−17</td><td align="center" valign="middle" >5.37e−17</td><td align="center" valign="middle" >1.51e−16</td><td align="center" valign="middle" >2.77e−16</td></tr><tr><td align="center" valign="middle" >Vasicek’s series (accelerated)</td><td align="center" valign="middle" >2.57e−17</td><td align="center" valign="middle" >3.78e−17</td><td align="center" valign="middle" >5.90e−17</td><td align="center" valign="middle" >1.65e−16</td><td align="center" valign="middle" >3.38e−16</td></tr><tr><td align="center" valign="middle" >Novel series (atanExt = no)</td><td align="center" valign="middle" >2.86e−17</td><td align="center" valign="middle" >3.68e−17</td><td align="center" valign="middle" >5.38e−17</td><td align="center" valign="middle" >1.51e−16</td><td align="center" valign="middle" >2.77e−16</td></tr><tr><td align="center" valign="middle" >Novel series (atanExt = yes)</td><td align="center" valign="middle" >3.36e−17</td><td align="center" valign="middle" >4.20e−17</td><td align="center" valign="middle" >6.11e−17</td><td align="center" valign="middle" >1.56e−16</td><td align="center" valign="middle" >3.45e−16</td></tr></tbody></table></table-wrap><table-wrap id="table3" ><label><xref ref-type="table" rid="table3">Table 3</xref></label><caption><title> Φ ρ * 2 ( x , y ) computation—absolute error comparison</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Method</th><th align="center" valign="middle" >Median</th><th align="center" valign="middle" >Mean</th><th align="center" valign="middle" >3rd Qu.</th><th align="center" valign="middle" >99%</th><th align="center" valign="middle" >Max.</th></tr></thead><tr><td align="center" valign="middle" >Tetrachoric series (accelerated)</td><td align="center" valign="middle" >2.92e−17</td><td align="center" valign="middle" >3.83e−17</td><td align="center" valign="middle" >5.55e−17</td><td align="center" valign="middle" >1.60e−16</td><td align="center" valign="middle" >2.79e−16</td></tr><tr><td align="center" valign="middle" >Vasicek’s series (accelerated)</td><td align="center" valign="middle" >1.72e−17</td><td align="center" valign="middle" >3.38e−17</td><td align="center" valign="middle" >5.38e−17</td><td align="center" valign="middle" >1.63e−16</td><td align="center" valign="middle" >3.01e−16</td></tr><tr><td align="center" valign="middle" >Novel series (atanExt = no)</td><td align="center" valign="middle" >2.92e−17</td><td align="center" valign="middle" >3.83e−17</td><td align="center" valign="middle" >5.55e−17</td><td align="center" valign="middle" >1.60e−16</td><td align="center" valign="middle" >2.79e−16</td></tr><tr><td align="center" valign="middle" >Novel series (atanExt = yes)</td><td align="center" valign="middle" >3.01e−17</td><td align="center" valign="middle" >3.91e−17</td><td align="center" valign="middle" >5.55e−17</td><td align="center" valign="middle" >1.56e−16</td><td align="center" valign="middle" >2.95e−16</td></tr></tbody></table></table-wrap><p>Due to the time-consuming 128-bit precision computation, the presented tests are the only performed tests based on the 128-bit precision reference values. However, additional tests were made by comparing the results of Phi2xy() with the results obtained by other functions from packages available on CRAN. For three functions, the accuracy was found to be worse than 2 &#215; 10<sup>−7</sup> as measured by the maximum absolute error on the test grid from Subsection 6.1. Regarding accuracy, only the function pmvnorm() with the parameter algorithm = TVPACK from the mvtnorm package proved to be equivalent to Phi2xy() and even slightly more accurate with the maximum absolute errors 2.58 &#215; 10<sup>−16</sup> and 2.19 &#215; 10<sup>−16</sup> on the test sets of triplets ( x , y , ρ ) and ( x , y , ρ * ) respectively. The same function with algorithm = GenzBretz achieved 2.58 &#215; 10<sup>−16</sup> and 2.20 &#215; 10<sup>−11</sup>.</p><p>The OwenQ::OwenT() function also proved to be equivalent to Phi2xy() as measured by the maximum absolute error on the test sets of triplets, but only when upgraded to compute Φ ρ 2 ( x , y ) in the manner used in Phi2xy(). This function and Phi2rho::OwenT() are essentially wrappers for the internal functions tOwenT(), vOwenT() and mOwenT(), which as workhorses compute series.</p><p>In terms of reliability, stability and accuracy of the new methods, no problems or significant differences according to the parameters from the different data sets were detected, except those already described and related to | ρ | ≈ 1 and x − y sgn ( ρ ) ≃ 0 . To eliminate them, the Equation (44) was derived, which also proved to be successful when using the OwenQ::OwenT() function, upgraded to compute Φ ρ 2 ( x , y ) . Regarding parameters from different data sets, the only detected big difference is in the number of iterations, as can be seen from <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><p>Two million Φ ρ 2 ( x , y ) computations on Windows 10 and 64-bit R 4.3.1 on the old Intel i7-6500U CPU @ 2.50 GHz and 8 GB RAM, using only one thread</p><p>of four, lasted 26, 31 and 286 seconds for Phi2xy(), upgraded OwenQ::OwenT() and pmvnorm() with algorithm = TVPACK respectively. The 128-bit precision reference values computation took over 17 hours, compared to 43 seconds for the double precision one. Based on <xref ref-type="table" rid="table1">Table 1</xref> and <xref ref-type="table" rid="table4">Table 4</xref>, we can conclude that the increased number of iterations has only an insignificant effect on the huge time extension factor.</p></sec><sec id="s6_3"><title>6.3. High-Precision Computation</title><p>All functions in the Phi2rho package are ready to use the Rmpfr package, which enables using arbitrary precision numbers instead of double precision ones and provides all the high-precision functions needed. It interfaces R to the widely used C Library MPFR [<xref ref-type="bibr" rid="scirp.128377-ref33">33</xref>] . Assuming that the Rmpfr package is loaded, the functions should only be called with the parameters, which are “mpfr-numbers’’ of the same precision. All 128-bit precision benchmark values used in Subsections 6.1 and 6.2 were calculated using Rmpfr.</p><p>To get a sense of how the number of iterations depends on the required precision, the test from Subsection 6.1 was partially repeated using the 128-bit precision computation. The results are collected in <xref ref-type="table" rid="table4">Table 4</xref>. Note that 2 − 128 ≈ 2.94 &#215; 10 − 39 and that in this case the values in the table are not the maximum absolute errors because the comparison values are computed with the same precision.</p><p>From <xref ref-type="table" rid="table1">Table 1</xref> and <xref ref-type="table" rid="table4">Table 4</xref> can be concluded that there is no significant difference in accuracy between the compared series if the accelerated series are considered, but one of the new series converges significantly faster than the others. It can also be concluded that the Vasicek’s series with ρ &#175; instead of ρ is a</p><p>reasonable alternative to the tetrachoric series (8) also for ρ 2 &lt; 1 2 and remains a reasonable alternative for ρ 2 &gt; 1 2 if compared to the transformed tetrachoric series (9).</p><table-wrap id="table4" ><label><xref ref-type="table" rid="table4">Table 4</xref></label><caption><title> 128-bit precision computation of T ( h , r ) = Φ ρ 2 ( h , 0 ) − 1 2 Φ ( h ) on the test grid</title></caption><table><tbody><thead><tr><th align="center" valign="middle" ></th><th align="center" valign="middle" >Tetrachoric</th><th align="center" valign="middle" >Vasicek</th><th align="center" valign="middle"  colspan="2"  >Novel series</th></tr></thead><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >(accelerated)</td><td align="center" valign="middle" >(accelerated)</td><td align="center" valign="middle" >(atanExt = no)</td><td align="center" valign="middle" >(atanExt = yes)</td></tr><tr><td align="center" valign="middle" >h is a vector</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >Max abs. error</td><td align="center" valign="middle" >benchmark</td><td align="center" valign="middle" >6.61e−39</td><td align="center" valign="middle" >5.51e−39</td><td align="center" valign="middle" >3.88e−39</td></tr><tr><td align="center" valign="middle" >Average iter. 1</td><td align="center" valign="middle" >82.8</td><td align="center" valign="middle" >75.5</td><td align="center" valign="middle" >105.7</td><td align="center" valign="middle" >55.0</td></tr><tr><td align="center" valign="middle" >r is a vector</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >Max abs. error</td><td align="center" valign="middle" >0.00e+00</td><td align="center" valign="middle" >6.61e−39</td><td align="center" valign="middle" >5.51e−39</td><td align="center" valign="middle" >3.88e−39</td></tr><tr><td align="center" valign="middle" >Average iter. 1</td><td align="center" valign="middle" >132.9</td><td align="center" valign="middle" >120.9</td><td align="center" valign="middle" >149.2</td><td align="center" valign="middle" >72.5</td></tr><tr><td align="center" valign="middle" >for both</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td></tr><tr><td align="center" valign="middle" >Average iter. 2</td><td align="center" valign="middle" >63.2</td><td align="center" valign="middle" >57.7</td><td align="center" valign="middle" >73.4</td><td align="center" valign="middle" >40.3</td></tr><tr><td align="center" valign="middle" >Maximum iter.</td><td align="center" valign="middle" >191</td><td align="center" valign="middle" >144</td><td align="center" valign="middle" >199</td><td align="center" valign="middle" >119</td></tr></tbody></table></table-wrap><table-wrap id="table5" ><label><xref ref-type="table" rid="table5">Table 5</xref></label><caption><title> A special case of high-precision computing—absolute error comparison</title></caption><table><tbody><thead><tr><th align="center" valign="middle" ></th><th align="center" valign="middle" ></th><th align="center" valign="middle"  colspan="3"  >Tetrachoric</th><th align="center" valign="middle"  colspan="3"  >Vasicek</th></tr></thead><tr><td align="center" valign="middle" >Bits</td><td align="center" valign="middle" >Precision</td><td align="center" valign="middle" >A</td><td align="center" valign="middle" >B</td><td align="center" valign="middle" >n</td><td align="center" valign="middle" >A</td><td align="center" valign="middle" >B</td><td align="center" valign="middle" >n</td></tr><tr><td align="center" valign="middle" >53</td><td align="center" valign="middle" >1.11e−16</td><td align="center" valign="middle" >6.98e−17</td><td align="center" valign="middle" >8.65e−17</td><td align="center" valign="middle" >46</td><td align="center" valign="middle" >6.98e−17</td><td align="center" valign="middle" >3.10e−17</td><td align="center" valign="middle" >47</td></tr><tr><td align="center" valign="middle" >64</td><td align="center" valign="middle" >5.42e−20</td><td align="center" valign="middle" >6.89e−21</td><td align="center" valign="middle" >2.26e−20</td><td align="center" valign="middle" >57</td><td align="center" valign="middle" >6.89e−21</td><td align="center" valign="middle" >2.26e−20</td><td align="center" valign="middle" >57</td></tr><tr><td align="center" valign="middle" >128</td><td align="center" valign="middle" >2.94e−39</td><td align="center" valign="middle" >5.47e−40</td><td align="center" valign="middle" >5.89e−41</td><td align="center" valign="middle" >119</td><td align="center" valign="middle" >5.47e−40</td><td align="center" valign="middle" >5.89e−41</td><td align="center" valign="middle" >120</td></tr><tr><td align="center" valign="middle" >256</td><td align="center" valign="middle" >8.64e−78</td><td align="center" valign="middle" >6.29e−78</td><td align="center" valign="middle" >3.33e−78</td><td align="center" valign="middle" >246</td><td align="center" valign="middle" >6.29e−78</td><td align="center" valign="middle" >3.33e−78</td><td align="center" valign="middle" >246</td></tr><tr><td align="center" valign="middle" >512</td><td align="center" valign="middle" >7.46e−155</td><td align="center" valign="middle" >3.65e−156</td><td align="center" valign="middle" >1.37e−155</td><td align="center" valign="middle" >500</td><td align="center" valign="middle" >4.09e−155</td><td align="center" valign="middle" >1.37e−155</td><td align="center" valign="middle" >501</td></tr><tr><td align="center" valign="middle" >1024</td><td align="center" valign="middle" >5.56e−309</td><td align="center" valign="middle" >5.04e−309</td><td align="center" valign="middle" >2.41e−309</td><td align="center" valign="middle" >1011</td><td align="center" valign="middle" >2.25e−309</td><td align="center" valign="middle" >5.19e−309</td><td align="center" valign="middle" >1011</td></tr></tbody></table></table-wrap><p>The number of iterations for the computation with the new series with double and 128-bit precision can be compared in <xref ref-type="fig" rid="fig1">Figure 1</xref>. Only the first quadrant is presented because others are its mirror images.</p><p>We also provide examples with r = 1 and r = − 1 for which reference values can be computed alternatively. A = Φ 2 / 2 2 ( 2.1,0 ) and B = Φ − 2 / 2 2 ( 2.1,0 ) were computed by (13) and (14), and by the right side of (16) by the pnorm() function from the package Rmpfr as a benchmark. In all cases, the latter was computed by double the precision expressed in bits and used for the former. Both reference values were used to compare how quickly the compared series converge when computing with more than 128-bit precision. In <xref ref-type="table" rid="table5">Table 5</xref> and <xref ref-type="table" rid="table6">Table 6</xref>, for each of them the absolute error and the number of iterations, which is the same for both computations, is presented. Since | r | = 1 , there is no difference between the original and accelerated tetrachoric series, and the same applies to Vasicek’s series.</p><p>Time-consuming high precision testing was less intensive than double precision one. Since there is no competing package on CRAN ready for high-precision computation of Φ ρ 2 ( x , y ) , it could not be supplemented by comparison computations with competing packages.</p><table-wrap id="table6" ><label><xref ref-type="table" rid="table6">Table 6</xref></label><caption><title> A special case of high-precision computing—absolute error comparison</title></caption><table><tbody><thead><tr><th align="center" valign="middle" ></th><th align="center" valign="middle" ></th><th align="center" valign="middle"  colspan="3"  >Novel series (atanExt = no)</th><th align="center" valign="middle"  colspan="3"  >Novel series (atanExt = yes)</th></tr></thead><tr><td align="center" valign="middle" >Bits</td><td align="center" valign="middle" >Precision</td><td align="center" valign="middle" >A</td><td align="center" valign="middle" >B</td><td align="center" valign="middle" >n</td><td align="center" valign="middle" >A</td><td align="center" valign="middle" >B</td><td align="center" valign="middle" >n</td></tr><tr><td align="center" valign="middle" >53</td><td align="center" valign="middle" >1.11e−16</td><td align="center" valign="middle" >6.98e−17</td><td align="center" valign="middle" >3.10e−17</td><td align="center" valign="middle" >54</td><td align="center" valign="middle" >6.98e−17</td><td align="center" valign="middle" >3.10e−17</td><td align="center" valign="middle" >22</td></tr><tr><td align="center" valign="middle" >64</td><td align="center" valign="middle" >5.42e−20</td><td align="center" valign="middle" >3.40e−20</td><td align="center" valign="middle" >4.54e−21</td><td align="center" valign="middle" >65</td><td align="center" valign="middle" >6.89e−21</td><td align="center" valign="middle" >2.26e−20</td><td align="center" valign="middle" >25</td></tr><tr><td align="center" valign="middle" >128</td><td align="center" valign="middle" >2.94e−39</td><td align="center" valign="middle" >5.47e−40</td><td align="center" valign="middle" >5.89e−41</td><td align="center" valign="middle" >128</td><td align="center" valign="middle" >9.23e−40</td><td align="center" valign="middle" >1.41e−39</td><td align="center" valign="middle" >41</td></tr><tr><td align="center" valign="middle" >256</td><td align="center" valign="middle" >8.64e−78</td><td align="center" valign="middle" >6.29e−78</td><td align="center" valign="middle" >3.33e−78</td><td align="center" valign="middle" >256</td><td align="center" valign="middle" >6.29e−78</td><td align="center" valign="middle" >3.33e−78</td><td align="center" valign="middle" >69</td></tr><tr><td align="center" valign="middle" >512</td><td align="center" valign="middle" >7.46e−155</td><td align="center" valign="middle" >4.09e−155</td><td align="center" valign="middle" >1.37e−155</td><td align="center" valign="middle" >511</td><td align="center" valign="middle" >4.09e−155</td><td align="center" valign="middle" >1.37e−155</td><td align="center" valign="middle" >116</td></tr><tr><td align="center" valign="middle" >1024</td><td align="center" valign="middle" >5.56e−309</td><td align="center" valign="middle" >2.25e−309</td><td align="center" valign="middle" >5.19e−309</td><td align="center" valign="middle" >1023</td><td align="center" valign="middle" >5.04e−309</td><td align="center" valign="middle" >2.41e−309</td><td align="center" valign="middle" >199</td></tr></tbody></table></table-wrap></sec></sec><sec id="s7"><title>7. Conclusions</title><p>If the generally applicable Theorem 2 is not considered, Theorems 3 and 4, and Corollary 2 are interesting mainly theoretically, because Theorem 5, together with (13) and (14), replaces and supplements them in practice. The series (40a)—(40d) enable fast and numerically stable computation, which is often more important than the speed of convergence. From <xref ref-type="table" rid="table1">Table 1</xref> and <xref ref-type="table" rid="table4">Table 4</xref> can be concluded that the computation with (40a) or (40c) needs significantly fewer iterations than the computation with the accelerated tetrachoric and Vasicek’s series, and from <xref ref-type="table" rid="table5">Table 5</xref> and <xref ref-type="table" rid="table6">Table 6</xref> can be assumed that the advantage increases with increasing precision. For 53-bit precision (double precision), it required a half, and for 1024-bit precision only a fifth, of the iterations demanded by the competing series. However, the cost of calculating arctan r is not taken into account. In connection with this, let us just mention two more questions.</p><p>Recalling that e − x I n ( x ) = P ( n + 1, x ) , the Taylor series of the arctangent function and (7) imply</p><p>T ( h , r ) = arctan r 2 π − 1 2 π ∑ k = 0 ∞ ( − 1 ) k r 2 k + 1 2 k + 1 P ( k + 1, 1 2 h 2 ) = 1 2 π ∑ k = 0 ∞ ( − 1 ) k r 2 k + 1 2 k + 1 Q ( k + 1, 1 2 h 2 ) ,</p><p>which Fayed and Atiya ( [<xref ref-type="bibr" rid="scirp.128377-ref32">32</xref>] , p. 241) have already noticed. If the above series, (29) and (34) are viewed as functions of the variable h, they have a similar structure, but the coefficients, depending on r, belong to different arctangent series. Whether the similarity could be explained by a similar Euler transform as the one which transforms the Taylor arctangent series to the Euler’s arctangent series seems interesting question, but was not deeply explored.</p><p>In Recursion 1, the external calculation of the arctangent function is avoided, assuming that the Euler’s series (19) is used for it, and the expectation that there would be no difference in the number of iterations for Recursions 1 and 2 if those for calculating the arctangent were also taken into account. However, the use of the external arctangent calculation allows the use of already known and possible future faster converging series. Such is the case with</p><p>arctan r = r 1 + r 2 ∑ k = 0 ∞ ( 2 k − 1 ) ! ! ( 2 k ) ! ! ( 2 k + 1 ) ( r 2 1 + r 2 ) k   ( r ∈ ℝ ) , (42)</p><p>which is based on the Taylor series of arcsin r and arctan r = arcsin r 1 + r 2 .</p><p>Indeed, the number of iterations is not significantly smaller if | r | ≤ 1 and the accuracy obtained by double precision computation is sufficient, and even the square root must be calculated, but it could be significantly smaller in high-precision computation. The Euler’s series (19) is included in [<xref ref-type="bibr" rid="scirp.128377-ref1">1</xref>] and [<xref ref-type="bibr" rid="scirp.128377-ref27">27</xref>] , but (42) is not, even though it converges faster. It can be found in ( [<xref ref-type="bibr" rid="scirp.128377-ref22">22</xref>] , p. 61, 1.644 1.) as</p><p>arctan r = r 1 + r 2 ∑ k = 0 ∞ ( 2 k ) ! 2 2 k ( k ! ) 2 ( 2 k + 1 ) ( r 2 1 + r 2 ) k</p><p>with a reference to the 1922 source. Due to equations ( 2 k − 1 ) ! ! = ( 2 k ) ! 2 k k ! and</p><p>( 2 k ) ! ! = 2 k k ! , the coefficients are the same as those in (42). Whether we could also find a corresponding series for the Owen’s T function, which would converge faster than (40b), remains an open challenge.</p></sec><sec id="s8"><title>Conflicts of Interest</title><p>The author declares no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s9"><title>Cite this paper</title><p>Komelj, J. (2023) The Bivariate Normal Integral via Owen’s T Function as a Modified Euler’s Arctangent Series. American Journal of Computational Mathematics, 13, 476-504. https://doi.org/10.4236/ajcm.2023.134026</p></sec></body><back><ref-list><title>References</title><ref id="scirp.128377-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Abramowitz, M. and Stegun, I.A. (1972) Handbook of Mathematical Functions. 9th Edition, Dover Publications, Inc., New York.</mixed-citation></ref><ref id="scirp.128377-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Gupta, S.S. (1963) Bibliography on the Multivariate Normal Integrals and Related Topics. The Annals of Mathematical Statistics, 34, 829-838. https://doi.org/10.1214/aoms/1177704005</mixed-citation></ref><ref id="scirp.128377-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Donnelly, T.G. (1973) Algorithm 462: Bivariate Normal Distribution. Communications of the ACM, 16, 638. https://doi.org/10.1145/362375.362414</mixed-citation></ref><ref id="scirp.128377-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Owen, D.B. (1956) Tables for Computing Bivariate Normal Probabilities. The Annals of Mathematical Statistics, 27, 1075-1090. https://doi.org/10.1214/aoms/1177728074</mixed-citation></ref><ref id="scirp.128377-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Divgi, D.R. (1979) Calculation of Univariate and Bivariate Normal Probability Functions. The Annals of Statistics, 7, 903-910. https://doi.org/10.1214/aos/1176344739</mixed-citation></ref><ref id="scirp.128377-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Drezner, Z. and Wesolowsky, G.O. (1990) On the Computation of the Bivariate Normal Integral. Journal of Statistical Computation and Simulation, 35, 101-107. https://doi.org/10.1080/00949659008811236</mixed-citation></ref><ref id="scirp.128377-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Patefield, M. and Tandy, D. (2000) Fast and Accurate Calculation of Owen’s T Function. Journal of Statistical Software, 5, 1-25. https://doi.org/10.18637/jss.v005.i05</mixed-citation></ref><ref id="scirp.128377-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Genz, A. (2004) Numerical Computation of Rectangular Bivariate and Trivariate Normal and t Probabilities. Statistics and Computing, 14, 251-260. https://doi.org/10.1023/B:STCO.0000035304.20635.31</mixed-citation></ref><ref id="scirp.128377-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Meyer, C. (2013) Recursive Numerical Evaluation of the Cumulative Bivariate Normal Distribution. Journal of Statistical Software, 52, 1-14. https://doi.org/10.18637/jss.v052.i10</mixed-citation></ref><ref id="scirp.128377-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Fayed, H.A. and Atiya, A.F. (2014) A Novel Series Expansion for the Multivariate Normal Probability Integrals Based on Fourier Series. Mathematics of Computation, 83, 2385-2402. https://doi.org/10.1090/S0025-5718-2014-02844-5</mixed-citation></ref><ref id="scirp.128377-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Terza, J.V. and Welland, U. (1991) A Comparison of Bivariate Normal Algorithms. Journal of Statistical Computation and Simulation, 39, 115-127. https://doi.org/10.1080/00949659108811343</mixed-citation></ref><ref id="scirp.128377-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Gai, J. (2001) A Computational Study of the Bivariate Normal Probability Function. Master’s Thesis, Queen’s University, Kingston.</mixed-citation></ref><ref id="scirp.128377-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">A&amp;#287ca, &amp;#350.A. and Chance, D.M. (2003) Speed and Accuracy Comparison of Bivariate Normal Distribution Approximations for Option Pricing. The Journal of Computational Finance, 6, 61-96. https://doi.org/10.21314/JCF.2003.102</mixed-citation></ref><ref id="scirp.128377-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Owen, D.B. (1980) A Table of Normal Integrals. Communications in Statistics—Simulation and Computation, 9, 389-419. https://doi.org/10.1080/03610918008812164</mixed-citation></ref><ref id="scirp.128377-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Yee, T.W. (2023) VGAM: Vector Generalized Linear and Additive Models, R Package Version 1.1-8. https://CRAN.R-project.org/package=VGAM</mixed-citation></ref><ref id="scirp.128377-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Laurent, S. (2023) OwenQ: Owen Q-Function, R Package Version 1.0.7. https://CRAN.R-project.org/package=OwenQ</mixed-citation></ref><ref id="scirp.128377-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Genz, A. and Bretz, F. (2009) Computation of Multivariate Normal and t Probabilities. Lecture Notes in Statistics, Springer-Verlag, Heidelberg. https://doi.org/10.1007/978-3-642-01689-9</mixed-citation></ref><ref id="scirp.128377-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Maechler, M. (2023) Rmpfr: R MPFR—Multiple Precision Floating-Point Reliable, R Package Version 0.9-3. https://CRAN.R-project.org/package=Rmpfr</mixed-citation></ref><ref id="scirp.128377-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Kendall, M.G. (1941) Proof of Relations Connected with the Tetrachoric Series and Its Generalization. Biometrika, 32, 196-198. https://doi.org/10.1093/biomet/32.2.196</mixed-citation></ref><ref id="scirp.128377-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Vasicek, O.A. (1998) A Series Expansion for the Bivariate Normal Integral. The Journal of Computational Finance, 1, 5-10. https://doi.org/10.21314/JCF.1998.015</mixed-citation></ref><ref id="scirp.128377-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Plackett, R.L. (1954) A Reduction Formula for Normal Multivariate Integrals. Biometrika, 41, 351-360. https://doi.org/10.1093/biomet/41.3-4.351</mixed-citation></ref><ref id="scirp.128377-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Gradshteyn, I.S. and Ryzhik, I.M. (2015) Table of Integrals, Series, and Products. 8th Edition, Academic Press, Amsterdam.</mixed-citation></ref><ref id="scirp.128377-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Alzer, H. (1997) On Some Inequalities for the Incomplete Gamma Function. Mathematics of Computation, 66, 771-778. https://doi.org/10.1090/S0025-5718-97-00814-4</mixed-citation></ref><ref id="scirp.128377-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Gautschi, W. (1998) The Incomplete Gamma Functions since Tricomi. In: Tricomi’s Ideas and Contemporary Applied Mathematics, Atti Convegni Lincei, Vol. 147, Accademia Nazionale dei Lincei, Rome, 203-237.</mixed-citation></ref><ref id="scirp.128377-ref25"><label>25</label><mixed-citation publication-type="other" xlink:type="simple">Mitrinovi&amp;#263, D.S. (1970) Analytic Inequalities. Springer-Verlag, Berlin. https://doi.org/10.1007/978-3-642-99970-3</mixed-citation></ref><ref id="scirp.128377-ref26"><label>26</label><mixed-citation publication-type="other" xlink:type="simple">Alzer, H. (1998) Inequalities for the Chi Square Distribution Function. Journal of Mathematical Analysis and Applications, 223, 151-157. https://doi.org/10.1006/jmaa.1998.5965</mixed-citation></ref><ref id="scirp.128377-ref27"><label>27</label><mixed-citation publication-type="other" xlink:type="simple">Olver, F.W.J., Lozier, D.W., Boisvert, R.F. and Clark C.W. (2010) NIST Handbook of Mathematical Functions. National Institute of Standards and Technology &amp; Cambridge University Press, Cambridge.</mixed-citation></ref><ref id="scirp.128377-ref28"><label>28</label><mixed-citation publication-type="other" xlink:type="simple">Marsaglia, G. (2004) Evaluating the Normal Distribution. Journal of Statistical Software, 11, 1-11. https://doi.org/10.18637/jss.v011.i04</mixed-citation></ref><ref id="scirp.128377-ref29"><label>29</label><mixed-citation publication-type="other" xlink:type="simple">R Core Team (2023) R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna. https://www.R-project.org/</mixed-citation></ref><ref id="scirp.128377-ref30"><label>30</label><mixed-citation publication-type="other" xlink:type="simple">Komelj, J. (2023) Phi2rho: Owen’s T Function and Bivariate Normal Integral, R Package Version 1.0. https://CRAN.R-project.org/package=Phi2rho</mixed-citation></ref><ref id="scirp.128377-ref31"><label>31</label><mixed-citation publication-type="other" xlink:type="simple">Robitzsch, A. (2020) pbv: Probabilities for Bivariate Normal Distribution, R Package Version 0.4-22. https://CRAN.R-project.org/package=pbv</mixed-citation></ref><ref id="scirp.128377-ref32"><label>32</label><mixed-citation publication-type="other" xlink:type="simple">Fayed, H.A. and Atiya, A.F. (2014) An Evaluation of the Integral of the Product of the Error Function and the Normal Probability Density with Application to the Bivariate Normal Integral. Mathematics of Computation, 83, 235-250. https://doi.org/10.1090/S0025-5718-2013-02720-2</mixed-citation></ref><ref id="scirp.128377-ref33"><label>33</label><mixed-citation publication-type="other" xlink:type="simple">Fousse, L., Hanrot, G., Lef&amp;#232vre, V., P&amp;#233lissier, P. and Zimmermann, P. (2007) MPFR: A Multiple-Precision Binary Floating-Point Library with Correct Rounding. ACM Transactions on Mathematical Software, 33, 13-es. https://doi.org/10.1145/1236463.1236468</mixed-citation></ref></ref-list></back></article>