When a scale factor is in effect, respect it for G0.0 output editing.
Differential Revision: https://reviews.llvm.org/D128761
flags |= decimal::AlwaysSign;
}
bool noLeadingSpaces{editWidth == 0};
+ int scale{edit.modes.scale}; // 'kP' value
if (editWidth == 0) { // "the processor selects the field width"
if (edit.digits.has_value()) { // E0.d
- if (editDigits == 0) { // E0.0
+ if (editDigits == 0 && scale <= 0) { // E0.0
significantDigits = 1;
}
} else { // E0
}
bool isEN{edit.variation == 'N'};
bool isES{edit.variation == 'S'};
- int scale{edit.modes.scale}; // 'kP' value
int zeroesAfterPoint{0};
if (isEN) {
scale = IsZero() ? 1 : 3;