summaryrefslogtreecommitdiff
path: root/libc/src/math/generic/fmaximumf128.cpp
diff options
context:
space:
mode:
authorJob Henandez Lara <hj93@protonmail.com>2024-03-25 12:19:10 -0700
committerGitHub <noreply@github.com>2024-03-25 15:19:10 -0400
commit3e3f0c3175a8b83a8c51bef5712dbc384385db8b (patch)
treef18962c74b2f661649fca5ed5bfbe8425890ba99 /libc/src/math/generic/fmaximumf128.cpp
parent4e6745cc4db309c0e1b5e41d4598f67763f4c096 (diff)
[libc][math][c23] add c23 floating point fmaximum and fminimum functions. (#86016)
Fixes https://github.com/llvm/llvm-project/issues/85496. --------- Co-authored-by: Job Hernandez <h93@protonmail.com>
Diffstat (limited to 'libc/src/math/generic/fmaximumf128.cpp')
-rw-r--r--libc/src/math/generic/fmaximumf128.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/src/math/generic/fmaximumf128.cpp b/libc/src/math/generic/fmaximumf128.cpp
new file mode 100644
index 000000000000..0099c913b052
--- /dev/null
+++ b/libc/src/math/generic/fmaximumf128.cpp
@@ -0,0 +1,19 @@
+//===-- Implementation of fmaximumf128 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/fmaximumf128.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(float128, fmaximumf128, (float128 x, float128 y)) {
+ return fputil::fmaximum(x, y);
+}
+
+} // namespace LIBC_NAMESPACE