Professional Documents
Culture Documents
Ondřej Hudousek
Department of Telecommunication engineering
Czech Technical University in Prague, Faculty of Electrical Engineering
Technická 2
166 27 Praha 6 - Dejvice
E-mail: hudouso@feld.cvut.cz
Above mentioned expansion into continued fraction and the resulting function is
is converging for all A > 0 and x > 0 (both condi-
fn = fn−1 un vn , (27)
tions are valid for the real systems). Nevertheless,
the convergence for x > A is slow, and therefore, it where
is often time-consuming to obtain a result with an
appropriate accuracy. In these cases, it is advisa- f0 = b0 , u0 = f0 = b0 , v0 = 0. (28)
ble to evaluate E1,A−1+θ (A), where θ is fractional
part of x. The final value of the loss probability is pn pn−2 an
un = = bn + an = bn + , (29)
evaluated with the recurrent equation (3) or (4). pn−1 pn−1 un−1
To achieve a desired accuracy it is advisable to an−2 −1
evaluate separately expansion for even and odd vn = bn + a n = (bn + an vn−1 )−1 . (30)
an−1
A problem may occur if the denominator in the 4 Conclusion
evaluation of un or vn equals to zero. Thompson
and Barnett suggested a slight modification of the The aim of this article is to sum up the me-
algorithm to address this issue. If un−1 = 0 or thods of evaluation of the Erlang-B formula. In ad-
bn + an vn−1 = 0 during the evaluation, it is substi- dition to known approaches, usage of Lentz’s algori-
tuted for a small constant, e.g. 10−30 . Lentz’s algo- thm for evaluation of the expansion into continued
rithm could be symbolically written for the desired fraction was suggested. The usage of the expansion
accuracy as follows: of incomplete-gamma function brings, in contrast
to the Rapp approximation, feasibility to meet the
predefined accuracy. This advantage is compensa-
1 tiny ← 10−30 , ted by higher complexity of the algorithm, which
2 f0 ← b0 , results in slower evaluation for small numbers of
3 if b0 = 0, then f0 ← tiny, circuits, as it was proved by testing on real imple-
4 u0 ← f 0 , mentations. On the testing system , the optimized
5 v0 ← 0, version of Rapp’s approximation was faster than
6 ∆j ← , evaluation of the expansion of incomplete gamma
7 while |∆j − 1| < , do: function up to approx. 1500 circuits (B=0.01). The-
8 vj ← bj + aj vj−1 , refore, Rapp’s approximation is probably the most
9 if vj = 0, then vj ← tiny, suitable for common cases, as far as the evaluation
10 uj ← bj + aj /uj−1 , time. Apart from that, some improvements leading
11 if uj = 0, then uj ← tiny, to fastening the evaluation of the recurrent formula
12 vj ← 1/vj , (3) have been suggested.
13 ∆ j ← uj vj ,
14 fj ← fj−1 ∆j .
Reference
From the practical point of view, it is advisable
to evaluate Pn (A, x) and In (A, x) simultaneously, [1] ITC; ITU-D SG2. Teletraffic en-
as it is possible to exploit the similarity of the ex- gineering handbook. Available at
pansion terms, (see (24),(25)) and thus accelerate <http://www.tele.dtu.dk/teletraffic>.
the algorithm.
[2] Lévy-Soussan, Guy. Numerical Evaluation of
the Erlang Function through a Continued-
3.4 Comparison of the evaluation Fraction Algorithm. Electrical Communi-
time cation, 1968, vol.43, no.2, p.163–168.
To discover the practical suitability of the algo- [3] Rapp, Yngve. Planning of Junction Network in
rithms, their speed has been examined. Table 2 a Multi–exchange Area. II Extensions of the
shows the results for both Rapp’s approximation Principles and Applications. Ericsson Tech-
(tr and tropt ) and the expansion of incomplete ga- nics, 1965, no.2, p.187–240.
mma function into continued fraction (tc and tcopt ,
accuracy 1.10−5 , B=0.01) both for direct and opti- [4] Szybicky, Edmund.Some Numerical Methods
mized implementation: Used for Telephone Traffic Theory Applicati-
ons. Ericsson Technics, 1964, no.2, p.203-229.