I am trying to compute product of Bernoullis.
It is not a great idea to compute the product by brute force since it may underflow. What I did is to take the log and then take the exp. But there would be warning when I have np.log(0). So usually how should we compute such quantity? Thanks!