This is an archive of the discontinued LLVM Phabricator instance.

[flang] SET_EXPONENT(-0.0) should return -0.0
ClosedPublic

Authored by PeteSteinfeld on Jul 7 2022, 10:44 AM.

Details

Summary

Section 16.9.171 says:

If X has the value zero, the result has the same value as X

So if X is -0.0, SET_EXPONENT should return -0.0.

Diff Detail

Event Timeline

PeteSteinfeld created this revision.Jul 7 2022, 10:44 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 7 2022, 10:44 AM
PeteSteinfeld requested review of this revision.Jul 7 2022, 10:44 AM
klausler added inline comments.Jul 7 2022, 11:39 AM
flang/runtime/numeric.cpp
125

There's a typo in that comment.

Responding to Peter's commend.

flang/runtime/numeric.cpp
125

Thanks for catching this. Corrected in the latest version.

klausler accepted this revision.Jul 7 2022, 12:41 PM
This revision is now accepted and ready to land.Jul 7 2022, 12:41 PM
This revision was landed with ongoing or failed builds.Jul 7 2022, 12:44 PM
This revision was automatically updated to reflect the committed changes.