34 lines · cpp
1//===-- Exhaustive test for sinpif ----------------------------------------===//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-exception6//7//===----------------------------------------------------------------------===//8 9#include "exhaustive_test.h"10#include "src/math/sinpif.h"11#include "utils/MPFRWrapper/MPFRUtils.h"12 13namespace mpfr = LIBC_NAMESPACE::testing::mpfr;14 15using LlvmLibcSinpifExhaustiveTest =16 LlvmLibcUnaryOpExhaustiveMathTest<float, mpfr::Operation::Sinpi,17 LIBC_NAMESPACE::sinpif>;18 19static constexpr uint32_t POS_START = 0x0000'0000U;20static constexpr uint32_t POS_STOP = 0x7f80'0000U;21 22// Range: [0, Inf]23TEST_F(LlvmLibcSinpifExhaustiveTest, PostiveRange) {24 test_full_range_all_roundings(POS_START, POS_STOP);25}26 27// Range: [-Inf, 0]28static constexpr uint32_t NEG_START = 0xb000'0000U;29static constexpr uint32_t NEG_STOP = 0xff80'0000U;30 31TEST_F(LlvmLibcSinpifExhaustiveTest, NegativeRange) {32 test_full_range_all_roundings(NEG_START, NEG_STOP);33}34