summaryrefslogtreecommitdiff
path: root/libc/utils/MPFRWrapper/MPFRUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/utils/MPFRWrapper/MPFRUtils.cpp')
-rw-r--r--libc/utils/MPFRWrapper/MPFRUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp
index 7ce6a70d0931..27ff1f7190ef 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -13,6 +13,7 @@
#include "src/__support/CPP/string_view.h"
#include "src/__support/CPP/stringstream.h"
#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/FPUtil/cast.h"
#include "src/__support/FPUtil/fpbits_str.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
@@ -683,7 +684,7 @@ template <> long double MPFRNumber::as<long double>() const {
template <> float16 MPFRNumber::as<float16>() const {
// TODO: Either prove that this cast won't cause double-rounding errors, or
// find a better way to get a float16.
- return static_cast<float16>(mpfr_get_d(value, mpfr_rounding));
+ return fputil::cast<float16>(mpfr_get_d(value, mpfr_rounding));
}
#endif