summaryrefslogtreecommitdiff
path: root/libc/src/math/generic/nextafterf128.cpp
diff options
context:
space:
mode:
authorMichael Flanders <mkf727@cs.washington.edu>2024-03-12 20:25:05 -0700
committerGitHub <noreply@github.com>2024-03-12 23:25:05 -0400
commit15a55486a54183d4fc597ed86c0d49fe9482f2bd (patch)
tree4fc605226904f81dfa91b421911edcc61d700be0 /libc/src/math/generic/nextafterf128.cpp
parent5d7796e674224be54c48a8db981f4134845bcc7c (diff)
[libc][math] Adds entrypoint and test for `nextafterf128` (#84882)
Diffstat (limited to 'libc/src/math/generic/nextafterf128.cpp')
-rw-r--r--libc/src/math/generic/nextafterf128.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/src/math/generic/nextafterf128.cpp b/libc/src/math/generic/nextafterf128.cpp
new file mode 100644
index 000000000000..905c89022ba1
--- /dev/null
+++ b/libc/src/math/generic/nextafterf128.cpp
@@ -0,0 +1,19 @@
+//===-- Implementation of nextafterf128 function --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/nextafterf128.h"
+#include "src/__support/FPUtil/ManipulationFunctions.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(float128, nextafterf128, (float128 x, float128 y)) {
+ return fputil::nextafter(x, y);
+}
+
+} // namespace LIBC_NAMESPACE