When STD=0, then B=0, which causes M = round(RNG/B) to throw "ValueError: cannot convert float NaN to integer". Needs to add "if STD == 0: return 1".
When STD=0, then B=0, which causes M = round(RNG/B) to throw "ValueError: cannot convert float NaN to integer".
Needs to add "if STD == 0: return 1".