[all-commits] [llvm/llvm-project] d1b09a: [flang] Fix rounding edge case in F output editing

Peter Klausler via All-commits all-commits at lists.llvm.org
Fri Nov 12 11:16:39 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d1b09adeebe8e2faf2c18fd24b9f83e89087a1e8
      https://github.com/llvm/llvm-project/commit/d1b09adeebe8e2faf2c18fd24b9f83e89087a1e8
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2021-11-12 (Fri, 12 Nov 2021)

  Changed paths:
    M flang/runtime/edit-output.cpp
    M flang/runtime/edit-output.h
    M flang/unittests/Runtime/NumericalFormatTest.cpp

  Log Message:
  -----------
  [flang] Fix rounding edge case in F output editing

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).

Differential Revision: https://reviews.llvm.org/D113698




More information about the All-commits mailing list