Skip to content

Commit ecdfab4

Browse files
clang-format
1 parent 3da2724 commit ecdfab4

File tree

1 file changed

+14
-14
lines changed
  • tests/std/tests/GH_001059_hyperbolic_truncation

1 file changed

+14
-14
lines changed

tests/std/tests/GH_001059_hyperbolic_truncation/test.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@ using namespace std;
1818

1919
template <class T>
2020
void Test(T x) {
21-
const complex<T> z{x};
22-
const T exp_over_2 = T{0.5} * real(exp(z));
21+
const complex<T> z{ x };
22+
const T exp_over_2 = T{ 0.5 } *real(exp(z));
2323

24-
const T cosh_expected = exp_over_2 + T{0.25} / exp_over_2;
25-
const T cosh_calc = real(cosh(z));
24+
const T cosh_expected = exp_over_2 + T{ 0.25 } / exp_over_2;
25+
const T cosh_calc = real(cosh(z));
2626
if (cosh_expected != cosh_calc) {
2727
cout.precision(numeric_limits<T>::digits10 + 2);
2828
cout << "x = " << x << '\n'
29-
<< "cosh (expected) = " << cosh_expected << '\n'
30-
<< "cosh (calculated) = " << cosh_calc << endl;
29+
<< "cosh (expected) = " << cosh_expected << '\n'
30+
<< "cosh (calculated) = " << cosh_calc << endl;
3131
assert(cosh_expected == cosh_calc);
3232
}
3333

34-
const T sinh_expected = exp_over_2 - T{0.25} / exp_over_2;
35-
const T sinh_calc = real(sinh(z));
34+
const T sinh_expected = exp_over_2 - T{ 0.25 } / exp_over_2;
35+
const T sinh_calc = real(sinh(z));
3636
if (sinh_expected != sinh_calc) {
3737
cout.precision(numeric_limits<T>::digits10 + 2);
3838
cout << "x = " << x << '\n'
39-
<< "sinh (expected) = " << sinh_expected << '\n'
40-
<< "sinh (calculated) = " << sinh_calc << endl;
39+
<< "sinh (expected) = " << sinh_expected << '\n'
40+
<< "sinh (calculated) = " << sinh_calc << endl;
4141
assert(sinh_expected == sinh_calc);
4242
}
4343
}
@@ -46,17 +46,17 @@ template <class T>
4646
constexpr array<T, 3> GenerateValues() {
4747
// {old crossover, difference ~ 1 ulp, difference ~ ulp/2}
4848
constexpr int DIG = numeric_limits<T>::digits;
49-
return {DIG * 347L / 1000L, DIG * static_cast<T>(0.347), (DIG + 1) * static_cast<T>(0.347)};
49+
return { DIG * 347L / 1000L, DIG * static_cast<T>(0.347), (DIG + 1) * static_cast<T>(0.347) };
5050
}
5151

5252
int main() {
53-
constexpr auto fValues{GenerateValues<float>()};
53+
constexpr auto fValues{ GenerateValues<float>() };
5454
for (auto x : fValues)
5555
Test<float>(x);
5656

57-
constexpr auto dValues{GenerateValues<double>()};
57+
constexpr auto dValues{ GenerateValues<double>() };
5858
for (auto x : dValues)
5959
Test<double>(x);
6060

6161
return 0;
62-
}
62+
}

0 commit comments

Comments
 (0)