Don't add terms with a large overflow error into the sum.
Move the full calculation into a separate function.
Stop creating and destroying a smart pointer for no reason.
Move probability_for_context_diff( ) into separate function.
Remove duplicate comment.
Only compute probability_for_context_full( ) in debug mode.