xref: /llvm-project/libc/src/math/generic/llogbf16.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
110cd96ddSOverMighty //===-- Implementation of llogbf16 function -------------------------------===//
210cd96ddSOverMighty //
310cd96ddSOverMighty // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
410cd96ddSOverMighty // See https://llvm.org/LICENSE.txt for license information.
510cd96ddSOverMighty // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
610cd96ddSOverMighty //
710cd96ddSOverMighty //===----------------------------------------------------------------------===//
810cd96ddSOverMighty 
910cd96ddSOverMighty #include "src/math/llogbf16.h"
1010cd96ddSOverMighty #include "src/__support/FPUtil/ManipulationFunctions.h"
1110cd96ddSOverMighty #include "src/__support/common.h"
12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
1310cd96ddSOverMighty 
14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
1510cd96ddSOverMighty 
1610cd96ddSOverMighty LLVM_LIBC_FUNCTION(long, llogbf16, (float16 x)) {
1710cd96ddSOverMighty   return fputil::intlogb<long>(x);
1810cd96ddSOverMighty }
1910cd96ddSOverMighty 
20*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
21