Created
March 11, 2016 10:50
-
-
Save toast254/0906a19ba6d0d0675617 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pour acceder aux fonctions maths evoluees | |
import math | |
# pour RHO/Erlang de 1 a 80 | |
for p in range(1,80+1): | |
# pour C/capacite de RHO a RHO*2 | |
for c in range(p,p*2+1): | |
# calcul numerateur | |
numerateur = pow(p,c) * 1.0 / math.factorial(c) | |
# init denominateur a 0 | |
denominateur = 0 | |
# Somme dans le denominateur | |
for i in range(0,c): | |
denominateur += pow(p,i) * 1.0 / math.factorial(i) | |
# affichage resultat (redirection vers un fichier donne un fichier utilisable par gnuplot) | |
print( str(c) + " " + str(p) + " " + str(numerateur / denominateur)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment