summaryrefslogtreecommitdiff
path: root/libc/src/math/generic/canonicalize.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2024-03-31 22:43:06 -0700
committerVitaly Buka <vitalybuka@google.com>2024-03-31 22:43:06 -0700
commit7aced1ab9772075ef9a77b1ba4a6456968f27906 (patch)
tree995152f5bc707d6c2160f92a879eb52f8fc2a3a9 /libc/src/math/generic/canonicalize.cpp
parentfd7a6d054b1e027c036a1cff5ddc7ee81461f90a (diff)
parent1e442ac4c33ac36d33e191c2d18ff594d8a5d11a (diff)
Created using spr 1.3.4 [skip ci]
Diffstat (limited to 'libc/src/math/generic/canonicalize.cpp')
-rw-r--r--libc/src/math/generic/canonicalize.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/src/math/generic/canonicalize.cpp b/libc/src/math/generic/canonicalize.cpp
new file mode 100644
index 000000000000..f38ca01e157f
--- /dev/null
+++ b/libc/src/math/generic/canonicalize.cpp
@@ -0,0 +1,19 @@
+//===-- Implementation of canonicalize 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/canonicalize.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(int, canonicalize, (double *cx, const double *x)) {
+ return fputil::canonicalize(*cx, *x);
+}
+
+} // namespace LIBC_NAMESPACE