BUG: dragon4 fractional output mode adds too many trailing zeros #10725
Backport of #10716.
For this I just copied the
There was a miscalculation in the number of trailing zeros to add when using format_float_positional with the option fractional=False, which specifies that the precision parameter refers to the total number of digits, not the number of fractional digits.
In that case we should be adding enough zeros so that precision equals the total number of digits; instead it was adding zeros so that precision equaled the number of fractional digits.