Skip to content

Commit b0e8a93

Browse files
committed
Fixed format errors
1 parent 75ec8ec commit b0e8a93

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

libc/src/math/asinhf16.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- Implementation header for asinhf16 -----------------------*- C++ -*-===//
1+
//===-- Implementation header for asinhf16 -----------------------*- C++-*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

libc/src/math/generic/asinhf16.cpp

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- Half-precision asinhf16(x) function --------------------------------===//
1+
//===-- Half-precision asinhf16(x) function--------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,30 +8,29 @@
88
//===----------------------------------------------------------------------===//
99

1010
#include "src/math/asinhf16.h"
11-
#include "src/math/generic/explogxf.h"
1211
#include "src/__support/FPUtil/except_value_utils.h"
1312
#include "src/__support/FPUtil/generic/sqrt.h"
1413
#include "src/__support/FPUtil/multiply_add.h"
1514
#include "src/__support/common.h"
1615
#include "src/__support/macros/config.h"
1716
#include "src/__support/macros/properties/types.h"
17+
#include "src/math/generic/explogxf.h"
1818

1919
namespace LIBC_NAMESPACE_DECL {
2020

2121
#ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
2222
static constexpr size_t N_EXCEPTS = 8;
2323

24-
static constexpr fputil::ExceptValues<float16, N_EXCEPTS> ASINHF16_EXCEPTS{{
25-
// (input, RZ output, RU offset, RD offset, RN offset)
26-
{0x3769, 0x372A, 1, 0, 1},
27-
{0x3B5B, 0x3A96, 1, 0, 0},
28-
{0x4B1F, 0x42B3, 1, 0, 0},
29-
{0x4C9B, 0x4336, 1, 0, 1},
30-
{0xB769, 0xB72A, 0, 1, 1},
31-
{0xBB5B, 0xBA96, 0, 1, 0},
32-
{0xCB1F, 0xC2B3, 0, 1, 0},
33-
{0xCC9B, 0xC336, 0, 1, 1}
34-
}};
24+
static constexpr fputil::ExceptValues<float16, N_EXCEPTS> ASINHF16_EXCEPTS{
25+
{// (input, RZ output, RU offset, RD offset, RN offset)
26+
{0x3769, 0x372A, 1, 0, 1},
27+
{0x3B5B, 0x3A96, 1, 0, 0},
28+
{0x4B1F, 0x42B3, 1, 0, 0},
29+
{0x4C9B, 0x4336, 1, 0, 1},
30+
{0xB769, 0xB72A, 0, 1, 1},
31+
{0xBB5B, 0xBA96, 0, 1, 0},
32+
{0xCB1F, 0xC2B3, 0, 1, 0},
33+
{0xCC9B, 0xC336, 0, 1, 1}}};
3534
#endif // !LIBC_MATH_HAS_SKIP_ACCURATE_PASS
3635

3736
LLVM_LIBC_FUNCTION(float16, asinhf16, (float16 x)) {
@@ -64,8 +63,8 @@ LLVM_LIBC_FUNCTION(float16, asinhf16, (float16 x)) {
6463
if (LIBC_UNLIKELY(x_abs <= 0x3400)) {
6564
if (LIBC_UNLIKELY(x_abs == 0))
6665
return x;
67-
if (LIBC_UNLIKELY((fputil::get_round() == FE_UPWARD) &&
68-
(x_u >= 0x8401) && (x_u <= 0x90E6)))
66+
if (LIBC_UNLIKELY((fputil::get_round() == FE_UPWARD) && (x_u >= 0x8401) &&
67+
(x_u <= 0x90E6)))
6968
return static_cast<float16>(x_d + 0x1p-24f);
7069

7170
float x_sq = x_d * x_d;
@@ -79,7 +78,7 @@ LLVM_LIBC_FUNCTION(float16, asinhf16, (float16 x)) {
7978

8079
// General case: asinh(x) = ln(x + sqrt(x^2 + 1))
8180
float sqrt_term = fputil::sqrt<float>(fputil::multiply_add(x_d, x_d, 1.0f));
82-
return fputil::cast<float16>(x_sign * log_eval(
83-
fputil::multiply_add(x_d, x_sign, sqrt_term)));
84-
}
81+
return fputil::cast<float16>(
82+
x_sign * log_eval(fputil::multiply_add(x_d, x_sign, sqrt_term)));
8583
}
84+
} // namespace LIBC_NAMESPACE_DECL

libc/test/src/math/asinhf16_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- Exhaustive test for asinhf16 ---------------------------------------===//
1+
//===-- Exhaustive test for asinhf16---------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

libc/test/src/math/smoke/asinhf16_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- Unittests for asinhf16 ----------------------------------------------===//
1+
//===-- Unittests for asinhf16---------------------------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

0 commit comments

Comments
 (0)