summaryrefslogtreecommitdiff
path: root/libc/src/math/generic/ldexpl.cpp
diff options
context:
space:
mode:
authorSiva Chandra <sivachandra@google.com>2021-02-03 00:37:16 -0800
committerSiva Chandra <sivachandra@google.com>2021-02-03 10:46:00 -0800
commitbbb7555403855f5c2a61d62ae59f1e970ea37ec1 (patch)
treee8a7846cf7322b0c6e430255997db7456e23c8e4 /libc/src/math/generic/ldexpl.cpp
parent15aa78abb6ca22294e72767d5ed2aea0b1cf23f9 (diff)
[libc][NFC] Move generic math implementations to the generic directory.
This expands the pattern suggest in https://reviews.llvm.org/D95850 to all math functions.
Diffstat (limited to 'libc/src/math/generic/ldexpl.cpp')
-rw-r--r--libc/src/math/generic/ldexpl.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/src/math/generic/ldexpl.cpp b/libc/src/math/generic/ldexpl.cpp
new file mode 100644
index 000000000000..018d5b4ffd6a
--- /dev/null
+++ b/libc/src/math/generic/ldexpl.cpp
@@ -0,0 +1,19 @@
+//===-- Implementation of ldexpl 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/ldexpl.h"
+#include "src/__support/common.h"
+#include "utils/FPUtil/ManipulationFunctions.h"
+
+namespace __llvm_libc {
+
+LLVM_LIBC_FUNCTION(long double, ldexpl, (long double x, int exp)) {
+ return fputil::ldexp(x, exp);
+}
+
+} // namespace __llvm_libc