  Good's formula and Fisher's method are frequently used for combining
independent P-values. Interestingly, the equivalent of Good's formula already
emerged in 1910 and mathematical expressions relevant to even more general
situations have been repeatedly derived, albeit in different context. We
provide here a novel derivation and show how the analytic formula obtained
reduces to the two aforementioned ones as special cases. The main novelty of
this paper, however, is the explicit treatment of nearly degenerate weights,
which are known to cause numerical instabilities. We derive a controlled
expansion, in powers of differences in inverse weights, that provides both
accurate statistics and stable numerics.
