This is an archive of the discontinued LLVM Phabricator instance.

[libc][math] Fix signed zeros for acosf, acoshf, and atanf in FE_DOWNWARD mode.
ClosedPublic

Authored by lntue on Sep 6 2023, 7:08 PM.

Details

Summary

Fix signed zeros for acosf, acoshf, and atanf in FE_DOWNWARD mode.

Diff Detail

Event Timeline

lntue created this revision.Sep 6 2023, 7:08 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptSep 6 2023, 7:08 PM
lntue requested review of this revision.Sep 6 2023, 7:08 PM
sivachandra accepted this revision.Sep 7 2023, 7:47 AM

A nit marked inline.

libc/src/math/generic/acosf.cpp
79

You should add comments for each branch taken. For example:

if (x_abs == 0x3f80'0000U) { // |x| == 1
    return x_sign ? /* x == -1 */ ... :
                             /* x == 1*/ ...;
}
This revision is now accepted and ready to land.Sep 7 2023, 7:47 AM
lntue updated this revision to Diff 556157.Sep 7 2023, 8:15 AM

Address comment.

lntue marked an inline comment as done.Sep 7 2023, 8:15 AM
This revision was landed with ongoing or failed builds.Sep 7 2023, 8:22 AM
This revision was automatically updated to reflect the committed changes.