basicer / dicey

A dice probability calculator.
https://dicey.js.org
7 stars 1 forks source link

Wrong values for sequence of dice "output {3d{1,3},d4}" #6

Open elpablete opened 3 months ago

elpablete commented 3 months ago

Expression output {3d{1,3},d4} gives wrong output, since a odd number of dice with only odd (integer) faces can only sum into an odd integer, there is no way the first sequence can output even results.

But this is what I got (notice the [4,3] sample in the output):

{3d{1,3},d4}
#,%
[3,1],3.125
[3,2],3.125
[3,3],3.125
[4,3],3.125
[5,1],9.375
[5,2],9.375
[5,3],9.375
[5,4],9.375
[7,1],9.375
[7,2],9.375
[7,3],9.375
[7,4],9.375
[9,1],3.125
[9,2],3.125
[9,3],3.125
[9,4],3.125

I tried the "odd faced die" on it's own and the result does not contain any even numbes:

3d{1,3}
#,%
3,12.5
5,37.5
7,37.5
9,12.5
elpablete commented 3 months ago

Ahhhh, I see now that the order of the sequences is inverted for that particular row (instead of beign [3d{1,3}, 1d4] as the rest of the rows, it's giving [1d4, 3d{1,3}]) [3,4] vs [4,3]

Why is that? What makes that row the exception?

I would say the output is wrong