[llvm] [APFloat] add power (PR #122889)
Jakub Kuderski via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 07:03:28 PST 2025
================
@@ -1536,6 +1536,27 @@ inline APFloat abs(APFloat X) {
return X;
}
+/// Returns X^N for N >= 0.
+/// Returns X^N for N >= 0.
+inline APFloat pow(const APFloat &X, const int &N) {
----------------
kuhar wrote:
I don't see what we gain by passing N as a const reference
```suggestion
inline APFloat pow(const APFloat &X, int N) {
```
https://github.com/llvm/llvm-project/pull/122889
More information about the llvm-commits
mailing list