This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix rounding edge case in F output editing
ClosedPublic

Authored by klausler on Nov 11 2021, 10:50 AM.

Details

Summary

When an Fw.d output edit descriptor has a "d" value exactly
equal to the number of zeroes after the decimal point for a value
(e.g., 0.07 with F5.1), the Fw.d output editing code needs to
do the rounding itself to either 0.0 or 0.1 after performing
a conversion without rounding (to avoid 0.04999 rounding up twice).

Diff Detail

Event Timeline

klausler created this revision.Nov 11 2021, 10:50 AM
klausler requested review of this revision.Nov 11 2021, 10:50 AM
jeanPerier accepted this revision.Nov 12 2021, 12:42 AM
This revision is now accepted and ready to land.Nov 12 2021, 12:42 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2021, 11:16 AM