The function for binomial distribution is supposed to return 0.01 when called with bin(40, 100, 0.5) and rounded to 3 decimals according to the tests, however that should not be the case when rounding to 3 decimals. The full value is 0.010843866711637987 this would round to 0.011 when rounded to 3 decimals. Only way to round it to 0.01 is to round by 2 decimals. However, that breaks the next test case which expects 3 decimals. Only current way to solve this is to write a function for truncating the value at the third decimal.
The function for binomial distribution is supposed to return
0.01
when called withbin(40, 100, 0.5)
and rounded to 3 decimals according to the tests, however that should not be the case when rounding to 3 decimals. The full value is0.010843866711637987
this would round to0.011
when rounded to 3 decimals. Only way to round it to0.01
is to round by 2 decimals. However, that breaks the next test case which expects 3 decimals. Only current way to solve this is to write a function for truncating the value at the third decimal.