| 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | /// |
| 9 | /// \file |
| 10 | /// Implementation of the float128 llogb function. |
| 11 | /// |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef LLVM_LIBC_SRC___SUPPORT_MATH_LLOGBF128_H |
| 15 | #define LLVM_LIBC_SRC___SUPPORT_MATH_LLOGBF128_H |
| 16 | |
| 17 | #include "src/__support/FPUtil/ManipulationFunctions.h" |
| 18 | #include "src/__support/FPUtil/float128.h" |
| 19 | #include "src/__support/common.h" |
| 20 | #include "src/__support/macros/config.h" |
| 21 | |
| 22 | namespace LIBC_NAMESPACE_DECL { |
| 23 | |
| 24 | namespace math { |
| 25 | |
| 26 | using LIBC_NAMESPACE::fputil::Float128; |
| 27 | |
| 28 | LIBC_INLINE constexpr long llogbf128(Float128 x) { |
| 29 | return fputil::intlogb<long>(x); |
| 30 | } |
| 31 | |
| 32 | } // namespace math |
| 33 | |
| 34 | } // namespace LIBC_NAMESPACE_DECL |
| 35 | |
| 36 | #endif // LLVM_LIBC_SRC___SUPPORT_MATH_LLOGBF128_H |
| 37 | |