summaryrefslogtreecommitdiff
path: root/libc/test/src/math/ldexpl_test.cpp
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2020-11-04 22:34:06 -0800
committerSiva Chandra Reddy <sivachandra@google.com>2020-11-17 15:05:42 -0800
commitbb8f2585c6eab263916757435d71df16d92de4a8 (patch)
treebd25a7a2c34efd674443745930af4265e2559f00 /libc/test/src/math/ldexpl_test.cpp
parent8e923ec2a803d54154aaa0079c1cfcf146b7a22f (diff)
[libc] Add implementations of ldexp[f|l].
The rounding behavior of NormalFloat to float format has been changed to round to nearest. Also, a bug in NormalFloat to subnormal number conversion has been fixed. Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D91591
Diffstat (limited to 'libc/test/src/math/ldexpl_test.cpp')
-rw-r--r--libc/test/src/math/ldexpl_test.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/libc/test/src/math/ldexpl_test.cpp b/libc/test/src/math/ldexpl_test.cpp
new file mode 100644
index 000000000000..69444b6edbaf
--- /dev/null
+++ b/libc/test/src/math/ldexpl_test.cpp
@@ -0,0 +1,21 @@
+//===-- Unittests for ldexpl ----------------------------------------------===//
+//
+// 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 "LdExpTest.h"
+
+#include "include/math.h"
+#include "src/math/ldexpl.h"
+#include "utils/CPP/Functional.h"
+#include "utils/FPUtil/FPBits.h"
+#include "utils/FPUtil/ManipulationFunctions.h"
+#include "utils/FPUtil/TestHelpers.h"
+#include "utils/UnitTest/Test.h"
+
+#include <limits.h>
+
+LIST_LDEXP_TESTS(long double, __llvm_libc::ldexpl)