apache / apache/lucene

Use ULP float comparison instead of epsilon-based comparison

Open
#13,789 2 comments 1 reaction 0 assignees View on GitHub
type:task
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

### Description

#13723 introduced new methods for testing floating point equality based on number of units-of-least-precision rather than a fixed error. We should check which tests would benefit form using it. One [candidate](https://github.com/apache/lucene/pull/13723#pullrequestreview-2304393385) are the Panama vs scalar vector tests. The tricky bit will be to figure out the correct number of ULPs.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the ULP-based test methods introduced in PR #13723, then inspect the Panama versus scalar vector tests mentioned in the issue. Identify epsilon-based floating-point comparisons that benefit from ULP comparisons and determine suitable ULP counts. Done means the appropriate tests use validated ULP thresholds and continue to pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.