Skip to content

Fix loss of precision in standard deviation - #1087

Open
PHJ2000 wants to merge 1 commit into
json-path:masterfrom
PHJ2000:fix-stable-standard-deviation
Open

PHJ2000 wants to merge 1 commit into
json-path:masterfrom
PHJ2000:fix-stable-standard-deviation

Conversation

@PHJ2000

@PHJ2000 PHJ2000 commented Oct 5, 2026

Copy link
Copy Markdown

Compute population variance using a running mean and the sum of squared deviations, avoiding subtraction of large nearly equal sums. Add regression tests for a large common offset and identical large values across all eight JSON providers.

Validation: ./gradlew check on Java 17 passed: 1,042 tests across both modules, no failures or errors, 13 skipped.

Fixes #1086.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stddev() loses precision for values with a large common offset

1 participant