Skip to content

Commit 8809ef0

Browse files
committed
mark constexpr
1 parent d0a6baf commit 8809ef0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libc/src/__support/math/erff.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ static constexpr float erff(float x) {
132132
uint32_t x_abs = x_u & 0x7fff'ffffU;
133133

134134
if (LIBC_UNLIKELY(x_abs >= 0x4080'0000U)) {
135-
const float ONE[2] = {1.0f, -1.0f};
136-
const float SMALL[2] = {-0x1.0p-25f, 0x1.0p-25f};
135+
constexpr float ONE[2] = {1.0f, -1.0f};
136+
constexpr float SMALL[2] = {-0x1.0p-25f, 0x1.0p-25f};
137137

138138
int sign = xbits.is_neg() ? 1 : 0;
139139

@@ -170,7 +170,7 @@ static constexpr float erff(float x) {
170170
double xd = static_cast<double>(x);
171171
double xsq = xd * xd;
172172

173-
const uint32_t EIGHT = 3 << FPBits::FRACTION_LEN;
173+
constexpr uint32_t EIGHT = 3 << FPBits::FRACTION_LEN;
174174
int idx = static_cast<int>(FPBits(x_abs + EIGHT).get_val());
175175

176176
double x4 = xsq * xsq;

0 commit comments

Comments
 (0)