double_binomial function bug fix