Skip to content

Commit cf98927

Browse files
committed
fmt
1 parent dce8941 commit cf98927

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

libc/src/__support/complex_type.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ template <typename T> struct Complex {
1717
T imag;
1818
};
1919

20-
template <typename T, typename U>
21-
T conjugate(T c) {
20+
template <typename T, typename U> T conjugate(T c) {
2221
Complex<U> c_c = cpp::bit_cast<Complex<U>>(c);
2322
c_c.imag = -c_c.imag;
2423
return cpp::bit_cast<T>(c_c);

libc/test/src/complex/ConjTest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class ConjTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
7171
EXPECT_CFP_EQ(func(CFPT(0.0 - 0.0i)), CFPT(0.0 + 0.0i));
7272
EXPECT_CFP_EQ(func(CFPT(0.0 + 0.0i)), CFPT(0.0 - 0.0i));
7373
// This test passes because the conjugate of -0.0 - 0.0i is -0.0 + 0.0i
74-
// but -0.0 + 0.0i is actually CMPLX(-0.0, 0.0) + CMPLX(0.0, 0.0) = 0.0 + 0.0i
75-
// so to represent -0.0 + 0.0i, we just write -0.0
74+
// but -0.0 + 0.0i is actually CMPLX(-0.0, 0.0) + CMPLX(0.0, 0.0) = 0.0 +
75+
// 0.0i so to represent -0.0 + 0.0i, we just write -0.0
7676
EXPECT_CFP_EQ(func(CFPT(-0.0 - 0.0i)), CFPT(-0.0));
7777
// This test passes because -0.0 + 0.0i is actually
7878
// CMPLX(-0.0, 0.0) + CMPLX(0.0, 0.0) = CMPLX(-0.0 + 0.0, 0.0) = 0.0 + 0.0i

0 commit comments

Comments
 (0)