Skip to content

Preserve exact integer differences in claim distances - #4

Merged
ctoth merged 2 commits into
masterfrom
fix/integer-distance-issue-3
Oct 19, 2026
Merged

ctoth merged 2 commits into
masterfrom
fix/integer-distance-issue-3

Conversation

@ctoth

@ctoth ctoth commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Adjacent signed-64-bit integers above binary64's consecutive-integer range were assigned zero distance because both endpoints were rounded before subtraction. Subtract integer pairs exactly before converting the distance to the existing float result, preserving the unique SIGMA winner for a two-to-one profile.

Added regressions at positive and negative integer boundaries and for exact SIGMA scores. The new test file failed all six cases before the fix and passed all six afterward.

Closes #3

@ctoth
ctoth marked this pull request as ready for review October 19, 2026 23:17
@ctoth
ctoth merged commit 5816c20 into master Oct 19, 2026
3 checks passed
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.

Preserve integer differences before floating-point distance conversion

1 participant