https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90374
--- Comment #31 from Thomas Henlich <thenlich+gccbug at gmail dot com> --- Jerry, I reviewed some of the code in write_float.def: 478 /* Calculate the format of the exponent field. */ 479 if (expchar && !(dtp->u.p.g0_no_blanks && e == 0)) 480 { 481 edigits = 1; 482 for (i = abs (e); i >= 10; i /= 10) 483 edigits++; 484 ... 499 /* Zero width specified, no leading zeros in exponent */ 500 if (e > 999 || e < -999) 501 edigits = 6; 502 else if (e > 99 || e < -99) 503 edigits = 5; 504 else if (e > 9 || e < -9) 505 edigits = 4; 506 else 507 edigits = 3; To me this seems somewhat redundant. Wouldn't the following be somewhat shorter, with the same result? 500 edigits += 2;