Skip to content

Commit d939e5c

Browse files
committed
fmt
1 parent 9ce03e9 commit d939e5c

File tree

5 files changed

+29
-30
lines changed

5 files changed

+29
-30
lines changed

libc/src/complex/generic/cargf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
namespace LIBC_NAMESPACE_DECL {
1515

1616
LLVM_LIBC_FUNCTION(float, cargf, (_Complex float x)) {
17-
Complex<float> x_c = cpp::bit_cast<Complex<float>>(x);
18-
return atan2f(x_c.imag, x_c.real);
17+
Complex<float> x_c = cpp::bit_cast<Complex<float>>(x);
18+
return atan2f(x_c.imag, x_c.real);
1919
}
2020

2121
} // namespace LIBC_NAMESPACE_DECL

libc/test/src/complex/cargf_test.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ using LlvmLibcCargTest = LIBC_NAMESPACE::testing::FPTest<float>;
1717
namespace mpc = LIBC_NAMESPACE::testing::mpc;
1818

1919
TEST_F(LlvmLibcCargTest, RandomFloats) {
20-
_Complex float test1 = 5.0 + 10.0i;
21-
EXPECT_MPC_MATCH_DEFAULT(mpc::Operation::Carg, test1, LIBC_NAMESPACE::cargf(test1), 0.5);
20+
_Complex float test1 = 5.0 + 10.0i;
21+
EXPECT_MPC_MATCH_DEFAULT(mpc::Operation::Carg, test1,
22+
LIBC_NAMESPACE::cargf(test1), 0.5);
2223
}

libc/utils/MPCWrapper/MPCUtils.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class MPCNumber {
135135
mpc_set(value, other.value, mpc_rounding);
136136
}
137137

138-
MPCNumber& operator=(const MPCNumber &rhs) {
138+
MPCNumber &operator=(const MPCNumber &rhs) {
139139
mpc_real_precision = rhs.mpc_real_precision;
140140
mpc_imag_precision = rhs.mpc_imag_precision;
141141
mpc_rounding = rhs.mpc_rounding;
@@ -151,9 +151,7 @@ class MPCNumber {
151151

152152
~MPCNumber() { mpc_clear(value); }
153153

154-
void getValue(mpc_t val) const {
155-
mpc_set(val, value, mpc_rounding);
156-
}
154+
void getValue(mpc_t val) const { mpc_set(val, value, mpc_rounding); }
157155

158156
MPCNumber carg() const {
159157
mpfr_t res;

libc/utils/MPCWrapper/MPCUtils.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ template <typename T> struct BinaryInput {
8282
namespace internal {
8383

8484
template <typename InputType, typename OutputType>
85-
bool compare_unary_operation_single_output_same_type(Operation op, InputType input,
86-
OutputType libc_output,
87-
double ulp_tolerance,
88-
MPCRoundingMode rounding);
85+
bool compare_unary_operation_single_output_same_type(Operation op,
86+
InputType input,
87+
OutputType libc_output,
88+
double ulp_tolerance,
89+
MPCRoundingMode rounding);
8990

9091
template <typename InputType, typename OutputType>
91-
bool compare_unary_operation_single_output_different_type(Operation op, InputType input,
92-
OutputType libc_output,
93-
double ulp_tolerance,
94-
MPCRoundingMode rounding);
92+
bool compare_unary_operation_single_output_different_type(
93+
Operation op, InputType input, OutputType libc_output, double ulp_tolerance,
94+
MPCRoundingMode rounding);
9595

9696
template <typename InputType, typename OutputType>
9797
bool compare_binary_operation_one_output(Operation op,
@@ -101,16 +101,14 @@ bool compare_binary_operation_one_output(Operation op,
101101
MPCRoundingMode rounding);
102102

103103
template <typename InputType, typename OutputType>
104-
void explain_unary_operation_single_output_same_type_error(Operation op, InputType input,
105-
OutputType match_value,
106-
double ulp_tolerance,
107-
MPCRoundingMode rounding);
104+
void explain_unary_operation_single_output_same_type_error(
105+
Operation op, InputType input, OutputType match_value, double ulp_tolerance,
106+
MPCRoundingMode rounding);
108107

109108
template <typename InputType, typename OutputType>
110-
void explain_unary_operation_single_output_different_type_error(Operation op, InputType input,
111-
OutputType match_value,
112-
double ulp_tolerance,
113-
MPCRoundingMode rounding);
109+
void explain_unary_operation_single_output_different_type_error(
110+
Operation op, InputType input, OutputType match_value, double ulp_tolerance,
111+
MPCRoundingMode rounding);
114112

115113
template <typename InputType, typename OutputType>
116114
void explain_binary_operation_one_output_error(
@@ -234,15 +232,16 @@ get_mpc_matcher(InputType input, [[maybe_unused]] OutputType output,
234232
match_value, \
235233
LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
236234
input, match_value, ulp_tolerance, \
237-
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{ \
235+
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{ \
238236
LIBC_NAMESPACE::fputil::testing::RoundingMode::Nearest, \
239237
LIBC_NAMESPACE::fputil::testing::RoundingMode::Nearest}))
240238

241239
#define EXPECT_MPC_MATCH_ROUNDING(op, input, match_value, ulp_tolerance, \
242240
Rrounding, Irounding) \
243241
EXPECT_THAT(match_value, LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
244242
input, match_value, ulp_tolerance, \
245-
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{Rrounding, Irounding}))
243+
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{ \
244+
Rrounding, Irounding}))
246245

247246
#define EXPECT_MPC_MATCH_ALL_ROUNDING_HELPER( \
248247
i, j, op, input, match_value, ulp_tolerance, Rrounding, Irounding) \
@@ -274,23 +273,24 @@ get_mpc_matcher(InputType input, [[maybe_unused]] OutputType output,
274273
Rrounding, Irounding) \
275274
LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
276275
input, match_value, ulp_tolerance, \
277-
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{Rrounding, Irounding}) \
276+
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{Rrounding, Irounding}) \
278277
.match(match_value)
279278

280279
#define ASSERT_MPC_MATCH_DEFAULT(op, input, match_value, ulp_tolerance) \
281280
ASSERT_THAT( \
282281
match_value, \
283282
LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
284283
input, match_value, ulp_tolerance, \
285-
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{ \
284+
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{ \
286285
LIBC_NAMESPACE::fputil::testing::RoundingMode::Nearest, \
287286
LIBC_NAMESPACE::fputil::testing::RoundingMode::Nearest}))
288287

289288
#define ASSERT_MPC_MATCH_ROUNDING(op, input, match_value, ulp_tolerance, \
290289
Rrounding, Irounding) \
291290
ASSERT_THAT(match_value, LIBC_NAMESPACE::testing::mpc::get_mpc_matcher<op>( \
292291
input, match_value, ulp_tolerance, \
293-
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{Rrounding, Irounding}))
292+
LIBC_NAMESPACE::testing::mpc::MPCRoundingMode{ \
293+
Rrounding, Irounding}))
294294

295295
#define ASSERT_MPC_MATCH_ALL_ROUNDING_HELPER( \
296296
i, j, op, input, match_value, ulp_tolerance, Rrounding, Irounding) \

libc/utils/MPFRWrapper/MPFRUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ class MPFRNumber {
188188
mpfr_set(value, other.value, mpfr_rounding);
189189
}
190190

191-
MPFRNumber(const mpfr_t& x, unsigned int precision, RoundingMode rounding)
191+
MPFRNumber(const mpfr_t &x, unsigned int precision, RoundingMode rounding)
192192
: mpfr_precision(precision),
193193
mpfr_rounding(get_mpfr_rounding_mode(rounding)) {
194194
mpfr_init2(value, mpfr_precision);

0 commit comments

Comments
 (0)