Files
ResInsight/ApplicationLibCode
Magne Sjaastad 5e17f9986d #14627 Grid statistics: Fix NaN deviation for near-constant results
The single-pass sum-of-squares formula subtracts two large and nearly equal numbers. Where a result such as PORO is identical or near-identical across the realizations, the true variance is below the rounding noise floor, the radicand turns negative and sqrt() returns NaN.

Compute the deviation in two passes instead, centering on the exact mean. This also removes the loss of significance the old formula had for values with a large common offset.

Min, max, range, mean and deviation all report HUGE_VAL when the input holds no valid values, but the sum reported the zero it was accumulated from. A caller testing the result with isValidNumber would accept that zero as real data.
2026-08-28 07:01:57 +02:00
..
2026-06-11 16:29:04 +02:00
2025-10-31 13:21:19 +01:00
2025-11-19 10:25:32 +01:00
2024-07-01 14:09:56 +02:00