[libc-commits] [libc] [libc][math] Add option to set a specific exponent for frexp with Inf/NaN inputs. (PR #112387)
via libc-commits
libc-commits at lists.llvm.org
Thu Oct 17 21:57:12 PDT 2024
================
@@ -31,8 +31,12 @@ namespace fputil {
template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
LIBC_INLINE T frexp(T x, int &exp) {
FPBits<T> bits(x);
- if (bits.is_inf_or_nan())
+ if (bits.is_inf_or_nan()) {
+#ifdef LIBC_FREXP_INF_NAN_EXPONENT
----------------
lntue wrote:
Done.
https://github.com/llvm/llvm-project/pull/112387
More information about the libc-commits
mailing list