You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datasketches.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2026/08/28 15:38:38 UTC
[PR] fix(req): use canonical floating-point ordering (datasketches-rust)
tisonkun opened a new pull request, #243:
URL: https://github.com/apache/datasketches-rust/pull/243
## Summary
- share the canonical floating-point rules used by hashing and REQ ordering
- make `ReqValue` float comparisons treat signed zeros as equal and all NaNs as equal and ordered last, matching `ordered-float` semantics
- add regressions for canonical hashing, direct `ReqValue` comparisons, and signed-zero rank and split-point behavior
## Rationale
The previous REQ comparator used numeric comparison when possible and fell back to `f32::total_cmp` or `f64::total_cmp` for NaNs. That preserved signed-zero equality but gave NaNs an IEEE bit-level order based on sign and payload. The repository already canonicalizes signed zeros and NaNs for compatible floating-point hashing, so this change centralizes that equivalence and applies it consistently to REQ without adding a dependency.
No changelog entry is added because REQ is still an unreleased feature and the observable canonical hash output is unchanged.
## Testing
- `cargo x check`
- `cargo x test`
- `cargo x lint`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] refactor(req): clarify value comparison contract (datasketches-rust)
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun merged PR #243:
URL: https://github.com/apache/datasketches-rust/pull/243
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org