Processing math: 100%

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. iDpi=1iDpi This is not always valid for two reasons:

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

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