[llvm] [LangRef] make consequences of NaN rules for pow(i) more explicit (PR #170177)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 2 08:33:43 PST 2025
================
@@ -16831,6 +16836,11 @@ trapping or setting ``errno``.
When specified with the fast-math-flag 'afn', the result may be approximated
using a less accurate calculation.
+Note that due to how :ref:`LLVM treats NaN values <floatnan>`, the special cases
----------------
arsenm wrote:
I don't see the issue; how is this nondeterministic? The signalingness shouldn't matter, the special cases don't need to do anything with the nan argument
`pow(+1, exponent) returns 1 for any exponent, even when exponent is NaN`
`pow(base, ±0) returns 1 for any base, even when base is NaN`
https://github.com/llvm/llvm-project/pull/170177
More information about the llvm-commits
mailing list