[libcxx-commits] [libcxx] [libc++] Fix return type of ilogb(double) (PR #150374)

Steffen Larsen via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 23 23:30:39 PDT 2025


================
@@ -58,7 +58,7 @@ inline _LIBCPP_HIDE_FROM_ABI double log10(_A1 __x) _NOEXCEPT {
 inline _LIBCPP_HIDE_FROM_ABI int ilogb(float __x) _NOEXCEPT { return __builtin_ilogbf(__x); }
 
 template <class = int>
-_LIBCPP_HIDE_FROM_ABI double ilogb(double __x) _NOEXCEPT {
+_LIBCPP_HIDE_FROM_ABI int ilogb(double __x) _NOEXCEPT {
----------------
steffenlarsen wrote:

Fine by me, but should we at least add a comment noting the observation of the bug? Or maybe there is a more appropriate place to track it for good measure?

https://github.com/llvm/llvm-project/pull/150374


More information about the libcxx-commits mailing list