linebender / linebender/fearless_simd

Add more assertion helpers for floating-point tests

Open
#174 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.