https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074
--- Comment #19 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- On Tue, 20 Nov 2018, rguenth at gcc dot gnu.org wrote: > if (fmt->emin < min_exp) > min_exp = fmt->emin - fmt->p + 1; > so somehow the formula fmt->emin - fmt->p + 1 isn't sufficient (that's No, it's sufficient. long double and float128 have the same emin but different precision; you need to use fmt->emin - fmt->p + 1 < min_exp above, or else you'll get the wrong results if the loop looks at the long double format before float128.