Skip to content

Commit 688f12c

Browse files
committed
fixup! [libc][math][c23] Add exp2m1f C23 math function
1 parent fec5712 commit 688f12c

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

libc/utils/MPFRWrapper/MPFRUtils.cpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ class MPFRNumber {
239239
return result;
240240
}
241241

242-
MPFRNumber
243-
exp2m1([[maybe_unused]] const MPFRNumber &underflow_rndz_fallback) const {
242+
MPFRNumber exp2m1() const {
244243
// TODO: Only use mpfr_exp2m1 once CI and buildbots get MPFR >= 4.2.0.
245244
#if MPFR_VERSION_MAJOR > 4 || \
246245
(MPFR_VERSION_MAJOR == 4 && MPFR_VERSION_MINOR >= 2)
@@ -611,15 +610,8 @@ unary_operation(Operation op, InputType input, unsigned int precision,
611610
return mpfrInput.exp();
612611
case Operation::Exp2:
613612
return mpfrInput.exp2();
614-
case Operation::Exp2m1: {
615-
constexpr InputType UNDERFLOW_RNDZ_FALLBACK =
616-
FPBits<InputType>::create_value(Sign::NEG,
617-
-1 + FPBits<InputType>::EXP_BIAS,
618-
FPBits<InputType>::SIG_MASK)
619-
.get_val();
620-
MPFRNumber underflow_rndz_fallback(UNDERFLOW_RNDZ_FALLBACK);
621-
return mpfrInput.exp2m1(underflow_rndz_fallback);
622-
}
613+
case Operation::Exp2m1:
614+
return mpfrInput.exp2m1();
623615
case Operation::Exp10:
624616
return mpfrInput.exp10();
625617
case Operation::Expm1:

0 commit comments

Comments
 (0)