If any of the X1, X2, X3 values are in the neighborhood of E+300, adding a value less than E+285 will not change the total because the double precision floating point values only represent about 15 significant digits. Kind of like this:
12345678901234500000000000000...00000000 // 15 digits at far left
+ 1230000000000...00000000 // 3 more digits, but not overlapping
----------------------------------------
12345678901234500000000000000...00000000 // no change
This is always a problem with accumulating small numbers into big totals, not just at the limit of the exponent range.
I don't know anything about Log Worth and p-value, but for similar sounding problems, I'd say you'll want to think out what it means and test for the exceptional case so you can represent it correctly:
- Does a huge value mean it isn't interesting and the other values determine the answer?
- Or does a huge value completely determine the answer by itself?
Your current JSL suggests you want the huge value to override the small values, effectively ignoring them.
Craige