linebender / linebender/fearless_simd
Add more assertion helpers for floating-point tests
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 457
- Forks
- 30
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 25
Description
Right now, the tests for floating-point operations perform either a floating-point comparison or a bitwise comparison. There are issues with both of these approaches:
- Floating-point comparisons treat -0.0 == +0.0, and NaN != NaN.
- Bitwise comparisons care about NaN payloads, but [LLVM does not mandate that NaN payloads be deterministic](https://llvm.org/docs/LangRef.html#behavior-of-floating-point-nan-values).
We should add a new assertion that treats -0.0 == +0.0, and all NaNs as equal.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the floating-point operation tests and their existing floating-point and bitwise comparison helpers. Add an assertion with the requested equality semantics, then run the affected tests to verify that -0.0 and +0.0 compare equal and all NaNs compare equal without relying on NaN payloads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100