Skip to content

Support exact Rational{BigInt} distances - #29

Merged
nhz2 merged 2 commits into
mainfrom
rational-exact-distances
Nov 2, 2026
Merged

nhz2 merged 2 commits into
mainfrom
rational-exact-distances

Conversation

@nhz2

@nhz2 nhz2 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

The distance kernels now run on Rational{BigInt} coordinates and give exact results, useful as a reference. With floats, degenerate simplexes give NaN or infinite weights that clamp01nan makes points of the simplex, but rationals throw on 0//0. _clamp01_div and _inv0 give zero there instead. Float32 and Float64 results are unchanged.

A new test checks the exact results: d2 is the minimum when every vertex of each simplex is on the far side of the plane through its closest point, perpendicular to r.

Bump the version to 0.3.1.

nhz2 and others added 2 commits November 1, 2026 20:09
The distance kernels now run on `Rational{BigInt}` coordinates and give
exact results, useful as a reference. With floats, degenerate simplexes
give NaN or infinite weights that `clamp01nan` makes points of the
simplex, but rationals throw on `0//0`. `_clamp01_div` and `_inv0` give
zero there instead. Float32 and Float64 results are unchanged.

A new test checks the exact results: `d2` is the minimum when every
vertex of each simplex is on the far side of the plane through its
closest point, perpendicular to `r`.

Bump the version to 0.3.1-dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nhz2
nhz2 merged commit 7c12846 into main Nov 2, 2026
2 checks passed
@nhz2
nhz2 deleted the rational-exact-distances branch November 2, 2026 02:08
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