Skip to content

Commit 60b2292

Browse files
committed
Addressed the feedback for MPCommon.cpp
1 parent 3b17d52 commit 60b2292

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

libc/utils/MPFRWrapper/MPCommon.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,11 @@ MPFRNumber MPFRNumber::acospi() const {
7878
mpfr_acospi(result.value, value, mpfr_rounding);
7979
return result;
8080
#else
81-
if (result.is_nan()) {
82-
return result;
83-
}
84-
mpfr_acos(result.value, value, mpfr_rounding);
81+
MPFRNumber value_acos(0.0, 1280);
82+
mpfr_acos(value_acos.value, value, MPFR_RNDN);
8583
MPFRNumber value_pi(0.0, 1280);
8684
mpfr_const_pi(value_pi.value, MPFR_RNDN);
87-
mpfr_div(result.value, value, value_pi.value, mpfr_rounding);
85+
mpfr_div(result.value, value_acos.value, value_pi.value, mpfr_rounding);
8886
return result;
8987
#endif
9088
}

0 commit comments

Comments
 (0)