Skip to content

Commit c84f759

Browse files
authored
[libc] Fix compilation of new trig functions (#111987)
1 parent fa789df commit c84f759

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libc/src/math/generic/cos.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ LLVM_LIBC_FUNCTION(double, cos, (double x)) {
9393
}
9494
return ans;
9595
};
96-
DoubleDouble sin_k = get_idx_dd(k + 128);
96+
DoubleDouble msin_k = get_idx_dd(k + 128);
9797
DoubleDouble cos_k = get_idx_dd(k + 64);
9898
#else
9999
// Fast look up version, but needs 256-entry table.

libc/src/math/generic/range_reduction_double_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ struct LargeRangeReduction {
278278
DoubleDouble y_mid;
279279
};
280280

281+
#ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
281282
static Float128 range_reduction_small_f128(double x) {
282283
constexpr Float128 PI_OVER_128_F128 = {
283284
Sign::POS, -133, 0xc90f'daa2'2168'c234'c4c6'628b'80dc'1cd1_u128};
@@ -300,7 +301,6 @@ static Float128 range_reduction_small_f128(double x) {
300301
return fputil::quick_mul(y, PI_OVER_128_F128);
301302
}
302303

303-
#ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
304304
static constexpr Float128 SIN_K_PI_OVER_128_F128[65] = {
305305
{Sign::POS, 0, 0},
306306
{Sign::POS, -133, 0xc90a'afbd'1b33'efc9'c539'edcb'fda0'cf2c_u128},

0 commit comments

Comments
 (0)