Skip to content

fix: guard against division by zero in correlation() - #3170

Open
lippinj wants to merge 1 commit into
davisking:masterfrom
lippinj:upstream-fix-2
Open

lippinj wants to merge 1 commit into
davisking:masterfrom
lippinj:upstream-fix-2

Conversation

@lippinj

@lippinj lippinj commented Oct 16, 2026

Copy link
Copy Markdown

When both variances are near zero, sqrt(variance_x * variance_y) can underflow to zero and cause a division by zero. Clamp the divisor to epsilon instead.

When both variances are near zero, sqrt(variance_x * variance_y) can
underflow to zero and cause a division by zero. Clamp the divisor to
epsilon instead.
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.

1 participant