[clang] [llvm] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin, fmax and frexp. (PR #88978)
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Thu May 9 15:22:24 PDT 2024
================
@@ -951,6 +951,19 @@ class APFloat : public APFloatBase {
bool needsCleanup() const { APFLOAT_DISPATCH_ON_SEMANTICS(needsCleanup()); }
+ // Checks that the value x is in the range (-1;-0.5], [0.5; 1)
+ static bool isInRange(const llvm::APFloat &x) {
----------------
hubert-reinterpretcast wrote:
I don't think this should be a member function of `APFloat`. It can be an implementation detail of `ExprConstant.cpp`. In either case, the function should be named something like `isInFrexpResultRange`.
https://github.com/llvm/llvm-project/pull/88978
More information about the cfe-commits
mailing list