Skip to content

Commit

Permalink
Use std::hexfloat more. (#6203)
Browse files Browse the repository at this point in the history
Previously, we were only using std::hexfloat on Windows on VS2013
and later.

Since std::hexfloat is part of C++11 and we require C++11 to build
the Z3 library, this should be supported everywhere.
  • Loading branch information
waywardmonkeys authored Jul 29, 2022
1 parent 75339c6 commit eba29a2
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/util/mpf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1630,11 +1630,7 @@ std::string mpf_manager::to_string_hexfloat(mpf const & x) {
std::ios_base::showpoint | std::ios_base::showpos);
ss.setf(ff);
ss.precision(13);
#if defined(_WIN32) && _MSC_VER >= 1800
ss << std::hexfloat << to_double(x);
#else
ss << std::hex << (*reinterpret_cast<const unsigned long long *>(&(x)));
#endif
return ss.str();
}

Expand Down

0 comments on commit eba29a2

Please sign in to comment.