brintos

brintos / llvm-project-archived public Read only

0
0
Text · 916 B · 6f76132 Raw
26 lines · cpp
1//===-- Exhaustive test for sqrtf -----------------------------------------===//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/sqrtf.h"11#include "utils/MPFRWrapper/MPFRUtils.h"12 13namespace mpfr = LIBC_NAMESPACE::testing::mpfr;14 15using LlvmLibcSqrtfExhaustiveTest =16    LlvmLibcUnaryOpExhaustiveMathTest<float, mpfr::Operation::Sqrt,17                                      LIBC_NAMESPACE::sqrtf>;18 19// Range: [0, Inf];20static constexpr uint32_t POS_START = 0x0000'0000U;21static constexpr uint32_t POS_STOP = 0x7f80'0000U;22 23TEST_F(LlvmLibcSqrtfExhaustiveTest, PostiveRange) {24  test_full_range_all_roundings(POS_START, POS_STOP);25}26