xref: /llvm-project/libc/src/math/generic/nexttowardf16.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
163cda2d1SOverMighty //===-- Implementation of nexttowardf16 function --------------------------===//
263cda2d1SOverMighty //
363cda2d1SOverMighty // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
463cda2d1SOverMighty // See https://llvm.org/LICENSE.txt for license information.
563cda2d1SOverMighty // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
663cda2d1SOverMighty //
763cda2d1SOverMighty //===----------------------------------------------------------------------===//
863cda2d1SOverMighty 
963cda2d1SOverMighty #include "src/math/nexttowardf16.h"
1063cda2d1SOverMighty #include "src/__support/FPUtil/ManipulationFunctions.h"
1163cda2d1SOverMighty #include "src/__support/common.h"
12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
1363cda2d1SOverMighty 
14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
1563cda2d1SOverMighty 
1663cda2d1SOverMighty LLVM_LIBC_FUNCTION(float16, nexttowardf16, (float16 x, long double y)) {
1763cda2d1SOverMighty   // We can reuse the nextafter implementation because the internal nextafter is
1863cda2d1SOverMighty   // templated on the types of the arguments.
1963cda2d1SOverMighty   return fputil::nextafter(x, y);
2063cda2d1SOverMighty }
2163cda2d1SOverMighty 
22*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
23