Skip to content

Commit 7d71a09

Browse files
committed
minor fix
1 parent c1b926b commit 7d71a09

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libc/src/math/generic/tanpif16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ LLVM_LIBC_FUNCTION(float16, tanpif16, (float16 x)) {
4141
FPBits xbits(x);
4242

4343
uint16_t x_u = xbits.uintval();
44-
bool x_sign = x_u >> 15;
4544
uint16_t x_abs = x_u & 0x7fff;
4645

4746
if (LIBC_UNLIKELY(x_abs == 0U))
4847
return x;
4948

5049
// Handle exceptional values
5150
if (LIBC_UNLIKELY(x_abs <= 0x4335)) {
51+
bool x_sign = x_u >> 15;
5252
if (auto r = TANF16_EXCEPTS.lookup_odd(x_abs, x_sign);
5353
LIBC_UNLIKELY(r.has_value()))
5454
return r.value();

libc/utils/MPFRWrapper/MPFRUtils.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -563,12 +563,12 @@ class MPFRNumber {
563563
MPFRNumber tanpi() const {
564564
MPFRNumber result(*this);
565565

566-
//#if MPFR_VERSION_MAJOR > 4 || \
566+
#if MPFR_VERSION_MAJOR > 4 || \
567567
(MPFR_VERSION_MAJOR == 4 && MPFR_VERSION_MINOR >= 2)
568568

569-
// mpfr_tanpi(result.value, value, mpfr_rounding);
570-
// return result;
571-
// #else
569+
mpfr_tanpi(result.value, value, mpfr_rounding);
570+
return result;
571+
#else
572572
MPFRNumber value_ret_exact(*this);
573573
MPFRNumber value_one(*this);
574574
mpfr_set_si(value_one.value, 1, MPFR_RNDN);
@@ -607,7 +607,7 @@ class MPFRNumber {
607607
mpfr_mul(value_pi.value, value_pi.value, value, MPFR_RNDN);
608608
mpfr_tan(result.value, value_pi.value, mpfr_rounding);
609609
return result;
610-
// #endif
610+
#endif
611611
}
612612

613613
MPFRNumber trunc() const {

0 commit comments

Comments
 (0)