Skip to content

gh-161259: Fix statistics._sqrtprod() for subnormal products - #161260

Open
vmphase wants to merge 2 commits into
python:mainfrom
vmphase:fix-sqrtprod-subnormal
Open

vmphase wants to merge 2 commits into
python:mainfrom
vmphase:fix-sqrtprod-subnormal

Conversation

@vmphase

@vmphase vmphase commented Nov 3, 2026

Copy link
Copy Markdown

Previously, passing inputs with tiny sums of squared deviations to statistics.correlation() returned inaccurate results because statistics._sqrtprod() underflowed to subnormal products.

Rescale non-zero inputs in statistics._sqrtprod() when the product underflows or becomes subnormal.

@python-cla-bot

python-cla-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@vmphase
vmphase force-pushed the fix-sqrtprod-subnormal branch from 955ced3 to 185c365 Compare November 3, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant