converted ints to floats

This commit is contained in:
Vhizux
2020-10-25 21:54:58 +01:00
parent 9a5af15486
commit e5efd5f92d

View File

@@ -30,8 +30,8 @@ def binomialDistFunc():
"rejected pistons?".format(rejected_fraction, batch, rejections) "rejected pistons?".format(rejected_fraction, batch, rejections)
for i in range(0, rejections+1): for i in range(0, rejections+1):
answer += newton_symbol(batch, i)*((rejected_fraction/100.)**i) * \ answer += newton_symbol(float(batch), float(i))*((rejected_fraction/100.)**float(i)) * \
((1 - (rejected_fraction/100.))**(batch-i)) ((1 - (rejected_fraction/100.))**(float(batch)-float(i)))
answer = round(100*answer, 2) answer = round(100*answer, 2)