Skip to content

Commit d9091d1

Browse files
committed
[libc][math][c23] Fix clang format issue.
1 parent 5e62f15 commit d9091d1

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

libc/src/math/generic/acoshf16.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ LLVM_LIBC_FUNCTION(float16, acoshf16, (float16 x)) {
2626
uint16_t x_u = xbits.uintval();
2727
uint16_t x_abs = x_u & 0x7fff;
2828

29-
// if (LIBC_UNLIKELY(x <= 1.0f)) {
30-
// if (x == 1.0f)
31-
// return 0.0f;
32-
// // x < 1.
33-
// fputil::set_errno_if_required(EDOM);
34-
// fputil::raise_except_if_required(FE_INVALID);
35-
// return FPBits::quiet_nan().get_val();
36-
// }
37-
29+
// if (LIBC_UNLIKELY(x <= 1.0f)) {
30+
// if (x == 1.0f)
31+
// return 0.0f;
32+
// // x < 1.
33+
// fputil::set_errno_if_required(EDOM);
34+
// fputil::raise_except_if_required(FE_INVALID);
35+
// return FPBits::quiet_nan().get_val();
36+
// }
37+
3838
// Check for NaN input first.
3939
if (LIBC_UNLIKELY(xbits.is_nan())) {
4040
if (xbits.is_signaling_nan()) {
@@ -89,7 +89,8 @@ LLVM_LIBC_FUNCTION(float16, acoshf16, (float16 x)) {
8989
// }
9090

9191
// Standard computation for general case.
92-
float sqrt_term = fputil::sqrt<float>(fputil::multiply_add(xf32, xf32, -1.0f));
92+
float sqrt_term =
93+
fputil::sqrt<float>(fputil::multiply_add(xf32, xf32, -1.0f));
9394
float result = static_cast<float>(log_eval(xf32 + sqrt_term));
9495

9596
return fputil::cast<float16>(result);

libc/test/src/math/acoshf16_test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
//===-- Unittests for acoshf16 --------------------------------------------===//
22
//
3-
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "src/__support/FPUtil/FPBits.h"
910
#include "src/__support/FPUtil/cast.h"
1011
#include "src/errno/libc_errno.h"
1112
#include "src/math/acoshf16.h"
12-
#include "src/__support/FPUtil/FPBits.h"
1313
#include "test/UnitTest/FPMatcher.h"
1414
#include "utils/MPFRWrapper/MPFRUtils.h"
1515
#include <stdint.h>
@@ -18,7 +18,7 @@ using LlvmLibcAcoshf16Test = LIBC_NAMESPACE::testing::FPTest<float16>;
1818
namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
1919

2020
static constexpr uint16_t START = 0x3c00U;
21-
static constexpr uint16_t STOP = 0x7bffU;
21+
static constexpr uint16_t STOP = 0x7bffU;
2222

2323
TEST_F(LlvmLibcAcoshf16Test, SpecialNumbers) {
2424
LIBC_NAMESPACE::libc_errno = 0;

0 commit comments

Comments
 (0)