Skip to content

Add ZeroTolerance for ULP compares near 0#1394

Open
llvm-beanz wants to merge 1 commit into
llvm:mainfrom
llvm-beanz:cbieneman/ulp-zero-tolerance
Open

Add ZeroTolerance for ULP compares near 0#1394
llvm-beanz wants to merge 1 commit into
llvm:mainfrom
llvm-beanz:cbieneman/ulp-zero-tolerance

Conversation

@llvm-beanz

Copy link
Copy Markdown
Collaborator

ULP comparisons get really gnarly for values very close to zero. In those cases extremely small value differences caused by rounding errors can result in very large ULP differences.

To normalize for this I've added an optional "ZeroTolerance" value that allows specifying an epsilon value for matching against values when either the result or expected value are within the epsilon of zero.

ULP comparisons get really gnarly for values very close to zero. In those cases extremely small value differences caused by rounding errors can result in very large ULP differences.

To normalize for this I've added an optional "ZeroTolerance" value that allows specifying an epsilon value for matching against values when either the result or expected value are within the epsilon of zero.
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.

2 participants