I've been playing around with Pythonista, a rather nice Python IDE, on my iPad. Here's a Python version of the program, which I imagine will work on plenty more than just Pythonista:
Code:
dice = [] #Input dice as polynomial coefficients
dice_quantity = 0 #Total number of dice
while True:
rawdie = [] #List of face values
qty = 1 #Quantity of a single die spec
inp = raw_input("Die " + str(dice_quantity + 1) + "? ")
if inp == "":
break
for face in inp.split(" "):
rawdie.append(int(face))
qty = raw_input("Quantity? [1] ")
if qty == "":
qty = 1
else:
qty = int(qty)
die = [0] * (max(rawdie) + 1)
for i in rawdie:
die[i] += 1
for i in range(qty):
dice.append(die)
print(str(rawdie) + " x " + str(qty))
dice_quantity = dice_quantity + qty
lastresult = dice[0]
for current in dice[1:]:
result = [0] * (len(lastresult) + len(current) - 1)
for x in range(len(lastresult)):
if lastresult[x] == 0:
continue
for y in range(len(current)):
result[x + y] += lastresult[x] * current[y]
lastresult = result
skipzero = True
p = 0.0
ft = 0.0
for i in lastresult:
p += i
print "Permutations: {:.0f}".format(p)
print "{:<6} {:<12} {:>10} {:>10} {:>10}".format("Total","Freq","Prob", "p>=", "p<=")
for i in range(len(lastresult)):
ft += lastresult[i]
if lastresult[i] == 0 and skipzero:
continue
skipzero = False
print "{:<6} {:<12} {:>10.3%} {:>10.3%} {:>10.3%}".format(i, lastresult[i], lastresult[i] / p, (p - ft + lastresult[i]) / p, ft / p)