Skip to content

Commit 33fff1a

Browse files
committed
fix style
1 parent 54c2051 commit 33fff1a

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

libc/shared/math.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include "libc_common.h"
1313

14-
#include "math/expf.h"
1514
#include "math/exp.h"
15+
#include "math/expf.h"
1616

1717
#endif // LLVM_LIBC_SHARED_MATH_H

libc/src/__support/math/exp.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "src/__support/macros/config.h"
2828
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
2929

30-
3130
namespace LIBC_NAMESPACE_DECL {
3231

3332
using fputil::DoubleDouble;
@@ -162,7 +161,7 @@ static constexpr Float128 exp_f128(double x, double kd, int idx1, int idx2) {
162161

163162
// Compute exp(x) with double-double precision.
164163
static constexpr DoubleDouble exp_double_double(double x, double kd,
165-
const DoubleDouble &exp_mid) {
164+
const DoubleDouble &exp_mid) {
166165
// Recalculate dx:
167166
// dx = x - k * 2^-12 * log(2)
168167
double t1 = fputil::multiply_add(kd, MLOG_2_EXP2_M12_HI, x); // exact

libc/src/__support/math/exp_utils.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_EXP_UTILS_H
1010
#define LLVM_LIBC_SRC___SUPPORT_MATH_EXP_UTILS_H
1111

12-
#include "src/__support/CPP/optional.h"
1312
#include "src/__support/CPP/bit.h"
13+
#include "src/__support/CPP/optional.h"
1414
#include "src/__support/FPUtil/FPBits.h"
1515

16-
1716
namespace LIBC_NAMESPACE_DECL {
1817

1918
// Rounding tests for 2^hi * (mid + lo) when the output might be denormal. We
@@ -23,8 +22,8 @@ namespace LIBC_NAMESPACE_DECL {
2322
// So if we scale x up by 2^1022, we can use
2423
// double(1.0 + 2^1022 * x) - 1.0 to test how x is rounded in denormal range.
2524
template <bool SKIP_ZIV_TEST = false>
26-
static constexpr cpp::optional<double>
27-
ziv_test_denorm(int hi, double mid, double lo, double err) {
25+
static constexpr cpp::optional<double> ziv_test_denorm(int hi, double mid,
26+
double lo, double err) {
2827
using FPBits = typename fputil::FPBits<double>;
2928

3029
// Scaling factor = 1/(min normal number) = 2^1022

libc/src/math/generic/common_constants.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111

1212
#include "src/__support/FPUtil/triple_double.h"
1313
#include "src/__support/macros/config.h"
14-
#include "src/__support/number_pair.h"
1514
#include "src/__support/math/exp_constants.h"
16-
15+
#include "src/__support/number_pair.h"
1716

1817
namespace LIBC_NAMESPACE_DECL {
1918

libc/src/math/generic/exp.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#include "src/__support/math/exp.h"
1111
namespace LIBC_NAMESPACE_DECL {
1212

13-
LLVM_LIBC_FUNCTION(double, exp, (double x)) {
14-
return math::exp(x);
15-
}
13+
LLVM_LIBC_FUNCTION(double, exp, (double x)) { return math::exp(x); }
1614

1715
} // namespace LIBC_NAMESPACE_DECL

0 commit comments

Comments
 (0)