Detect overflow on large precision
This commit is contained in:
1 parent
c240d98ffd
commit
215f21a038
3 files changed
+10
-2
No files matched your search
@@ -12,7 +12,7 @@
|
||||
|
||||
void check_round_trip(fmt::string_view format_str, double value) {
|
||||
auto buffer = fmt::memory_buffer();
|
||||
fmt::format_to(buffer, format_str, value);
|
||||
fmt::format_to(std::back_inserter(buffer), format_str, value);
|
||||
|
||||
if (std::isnan(value)) {
|
||||
auto nan = std::signbit(value) ? "-nan" : "nan";
|
||||
|
||||
Reference in new issue
Block a user