[ELF] Remove redundant isExported computation
[llvm-project.git] / libc / test / src / math / exhaustive / tanhf_test.cpp
blobe341064d5a9ecd871773d32da68f835592f416e8
1 //===-- Exhaustive test for tanhf -----------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "exhaustive_test.h"
10 #include "src/math/tanhf.h"
11 #include "utils/MPFRWrapper/MPFRUtils.h"
13 namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
15 using LlvmLibcTanhfExhaustiveTest =
16 LlvmLibcUnaryOpExhaustiveMathTest<float, mpfr::Operation::Tanh,
17 LIBC_NAMESPACE::tanhf>;
19 // Range: [0, Inf];
20 static constexpr uint32_t POS_START = 0x0000'0000U;
21 static constexpr uint32_t POS_STOP = 0x7f80'0000U;
23 TEST_F(LlvmLibcTanhfExhaustiveTest, PostiveRange) {
24 test_full_range_all_roundings(POS_START, POS_STOP);
27 // Range: [-Inf, 0];
28 static constexpr uint32_t NEG_START = 0xb000'0000U;
29 static constexpr uint32_t NEG_STOP = 0xff80'0000U;
31 TEST_F(LlvmLibcTanhfExhaustiveTest, NegativeRange) {
32 test_full_range_all_roundings(NEG_START, NEG_STOP);