Sensibly dealing with the precision available in likelihood functions I am running some simulations involving Bayesian updating of prior odds given a succession of measurements and corresponding likelihood functions. Inevitably, repeated multiplication of the prior by the likelihood functions results in ever decreasing values. At the extremes, where the probabilities rapidly approach zero, the loss of precision doesn't matter. The real problem is in the neighbourhood of the maximum likelihood value where the resulting function becomes flattened out as a consequence of the precision loss.
What sensible approaches are there to dealing with this?

Typically the posterior becomes less flat near the MLE as the amount of data increases. Numerically this might not happen if you are actually multiplying by the likelihood, because it will quickly underflow to zero.  So don't do that! You should be summing log likelihoods instead of multiplying likelihoods.
If you actually want the posterior function at the end, taking exp() of the sum of logs will typically underflow, just like the product did.  But it's generally fine to add or subtract a constant to the sum of logs before exponentiating.  Typically subtracting the value at the MLE does a good job:  that will make the exp() evaluate to 1 there.
You don't end up with a normalized posterior this way, but you end up with something you can plot and sample from using MCMC.  To normalize it you would need to integrate over the whole range and divide by that value.
