[flang-commits] [flang] [llvm] [flang] Fix wrong result for exponentiation when denormal is expected (PR #205262)

via flang-commits flang-commits at lists.llvm.org
Mon Jun 22 22:51:37 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- flang-rt/lib/runtime/numeric.cpp flang-rt/unittests/Runtime/Numeric.cpp flang/lib/Evaluate/int-power.h --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/flang/lib/Evaluate/int-power.h b/flang/lib/Evaluate/int-power.h
index d4ee2fbd0..f9c0f3e9b 100644
--- a/flang/lib/Evaluate/int-power.h
+++ b/flang/lib/Evaluate/int-power.h
@@ -57,7 +57,8 @@ ValueWithRealFlags<REAL> TimesIntPowerOf(const REAL &factor, const REAL &base,
 
 template <typename W, int P, typename INT>
 ValueWithRealFlags<value::Real<W, P>> IntPower(const value::Real<W, P> &base,
-    const INT &power, Rounding rounding = TargetCharacteristics::defaultRounding) {
+    const INT &power,
+    Rounding rounding = TargetCharacteristics::defaultRounding) {
   using REAL = value::Real<W, P>;
   REAL one{REAL::FromInteger(INT{1}).value};
   if (power.IsNegative() && !base.IsZero() &&

``````````

</details>


https://github.com/llvm/llvm-project/pull/205262


More information about the flang-commits mailing list