This is an archive of the discontinued LLVM Phabricator instance.

[libc] Make ULP error reflect the bit distance more closely.
ClosedPublic

Authored by sivachandra on Jul 1 2021, 11:49 PM.

Diff Detail

Event Timeline

sivachandra created this revision.Jul 1 2021, 11:49 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 1 2021, 11:49 PM
sivachandra requested review of this revision.Jul 1 2021, 11:49 PM

This has been prepared based on the discussion we had here: https://reviews.llvm.org/D104615

lntue accepted this revision.Jul 2 2021, 6:59 AM
lntue added inline comments.
libc/utils/MPFRWrapper/MPFRUtils.cpp
277

I think we can specify exactly what is "close enough" in here, i.e. when the exponent difference is at most 1.
Also, we might need to add another remark here that currently the ULP function cannot distinguish +0.0 and -0.0 yet.

This revision is now accepted and ready to land.Jul 2 2021, 6:59 AM
This revision was landed with ongoing or failed builds.Jul 2 2021, 9:56 AM
This revision was automatically updated to reflect the committed changes.