# Calculating conditional probability in Bernoulli mixture model

I'm following the book Pattern recognition and machine learning by Bishop on Bernoulli mixture model, and trying to code it. But I don't understand how to calculate the conditional probability (page 446 of the first edition)

So in the E-step I'm supposed to calculate this. But it is said that we should use the log of the probability , so as to avoid numerical underflow. So how do i apply it here? I can't see any way to do it. Please help me, thank you very much