xref: /llvm-project/libc/src/math/generic/nexttowardl.cpp (revision 5ff3ff33ff930e4ec49da7910612d8a41eb068cb)
10c49fc4cSNishant Mittal //===-- Implementation of nexttowardl function ----------------------------===//
20c49fc4cSNishant Mittal //
30c49fc4cSNishant Mittal // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40c49fc4cSNishant Mittal // See https://llvm.org/LICENSE.txt for license information.
50c49fc4cSNishant Mittal // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60c49fc4cSNishant Mittal //
70c49fc4cSNishant Mittal //===----------------------------------------------------------------------===//
80c49fc4cSNishant Mittal 
90c49fc4cSNishant Mittal #include "src/math/nexttowardl.h"
100c49fc4cSNishant Mittal #include "src/__support/FPUtil/ManipulationFunctions.h"
110c49fc4cSNishant Mittal #include "src/__support/common.h"
12*5ff3ff33SPetr Hosek #include "src/__support/macros/config.h"
130c49fc4cSNishant Mittal 
14*5ff3ff33SPetr Hosek namespace LIBC_NAMESPACE_DECL {
150c49fc4cSNishant Mittal 
160c49fc4cSNishant Mittal LLVM_LIBC_FUNCTION(long double, nexttowardl, (long double x, long double y)) {
1786b0ccaeSmichaelrj-google   // We can reuse the nextafter implementation because the internal nextafter is
1886b0ccaeSmichaelrj-google   // templated on the types of the arguments.
190c49fc4cSNishant Mittal   return fputil::nextafter(x, y);
200c49fc4cSNishant Mittal }
210c49fc4cSNishant Mittal 
22*5ff3ff33SPetr Hosek } // namespace LIBC_NAMESPACE_DECL
23