[libc-commits] [libc] [libc][math][c23] Add {ldexp, scalbn, scalbln}f16 C23 math functions (PR #94797)
via libc-commits
libc-commits at lists.llvm.org
Mon Jun 10 06:11:03 PDT 2024
================
@@ -144,7 +144,7 @@ LIBC_INLINE constexpr T logb(T x) {
}
template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
-LIBC_INLINE constexpr T ldexp(T x, int exp) {
+LIBC_INLINE constexpr T ldexp(T x, long exp) {
----------------
lntue wrote:
Probably change this to
```
template <typename T, typename U>
LIBC_INLINE constexpr
cpp::enable_if_t<cpp::is_floating_point_v<T> && cpp::is_integral_v<U>, T>
ldexp(T x, U exp) {
```
https://github.com/llvm/llvm-project/pull/94797
More information about the libc-commits
mailing list