- From: Giuseppe Bianchi <
>
- To: <
>
- Subject: Tabelle Erlang B
- Date: Tue, 01 Jun 2010 12:11:11 +0200
Stampatele e portatele a lezione giovedi'.
Saluti, GB
PS: per il calcolo dell'erlang B, ove voleste programmarvelo, ecco un
esempio (C++) che usa il trucco dei logaritmi spiegato a lezione
double erlangb(int C, double A) {
double a = log(A); // do this logarithm of the offered load once
for all
double f = 0; // logarithm of the factorial: start from
log(0!) = 0
double d = 1; // denominator: start from A^0/0! = 1
double e; // cache the latest computed term
for(int i=1; i<=C; i++) { // cycle 1-->C
f += log(double(i)); // f is the current logarithm of factorial(i)
e = exp(i * a - f); // e is the current A^i/i!
d += e; // d is the current sum of A^i/i to be used
as denom
}
return e/d;
}
Attachment:
ErlB-inversa-1.pdf
Description: Adobe PDF document
Attachment:
ErlB-inversa-2.pdf
Description: Adobe PDF document
Attachment:
ErlB.pdf
Description: Adobe PDF document
- Tabelle Erlang B, Giuseppe Bianchi
Archivio con motore MhonArc 2.6.16.