We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e92d31e + 5e21fa2 commit cb8ebd9Copy full SHA for cb8ebd9
flang/runtime/edit-output.cpp
@@ -9,6 +9,7 @@
9
#include "edit-output.h"
10
#include "emit-encoded.h"
11
#include "utf.h"
12
+#include "flang/Common/real.h"
13
#include "flang/Common/uint128.h"
14
#include <algorithm>
15
@@ -700,7 +701,9 @@ bool RealOutputEditing<KIND>::EditEXOutput(const DataEdit &edit) {
700
701
if ((editWidth == 0 && !edit.digits) || editDigits == 0) {
702
// EX0 or EXw.0
703
flags |= decimal::Minimize;
- significantDigits = 28; // enough for 128-bit F.P.
704
+ static constexpr int maxSigHexDigits{
705
+ (common::PrecisionOfRealKind(16) + 3) / 4};
706
+ significantDigits = maxSigHexDigits;
707
}
708
auto converted{
709
ConvertToHexadecimal(significantDigits, edit.modes.round, flags)};
0 commit comments