Naive Bayes Classification Floating Point Underflow
<p>Multiplying lots of probabilities in Naïve Bayes can result in floating-point underflow.</p>

<pre><code>P(x_1,….,x_n│c) = P(x_1│c).P(x_2│c).P(x_3│c)… … P(x_n |c) 
</code></pre>

<p>Instead of using the above formula (result in floating point underflow), is it more feasible/better to use the formula given below? Or will it truncate information?</p>

<pre><code>log(xy) = log(x) + log(y)
</code></pre>