do_direct_calculation Function

public elemental function do_direct_calculation(normalization)

Evaluate if a normalization has to be calculated directly.

Sometimes we make the mathematically valid trick of calculating a renormalization for a given subset via one minus its complement. This is not always valid for two reasons:

We assume that there are with nonzero probabilities. If is 1, we might be in a situation where all are zero and assuming would be wrong. This is the first case where we we have to directly calculate .

The other reason is floating point arithmetics, that might cause the two sides to be slightly different. Since they are renormalization factors and we divide by them, these small errors blow up for small numbers.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: normalization

Return Value logical


Contents