Skip to content

fix(assert): stabilize relative error calculation in InEpsilon#1847

Open
Davi-y08 wants to merge 1 commit intostretchr:masterfrom
Davi-y08:fix-inepsilon-small-expected
Open

fix(assert): stabilize relative error calculation in InEpsilon#1847
Davi-y08 wants to merge 1 commit intostretchr:masterfrom
Davi-y08:fix-inepsilon-small-expected

Conversation

@Davi-y08
Copy link

@Davi-y08 Davi-y08 commented Feb 6, 2026

Fix relative error calculation for small expected values in InEpsilon.

The previous implementation normalized only by the expected value, which could
inflate relative error when expected was small. This change normalizes by the
maximum absolute value, improving numerical stability without changing the
semantics of the base code.

For the tests, i used the below values:
{0.1, 0.14, 0.4}

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.

1 participant