Issue #7117, continued: Remove substitution of %g-style formatting for

%f-style formatting, which used to occur at high precision.  Float formatting
should now be consistent between 2.7 and 3.1.
This commit is contained in:
Mark Dickinson 2009-11-23 20:54:09 +00:00
parent faa25999a3
commit 9dd5e16c5d
6 changed files with 25 additions and 23 deletions

View file

@ -8318,9 +8318,6 @@ formatfloat(PyObject *v, int flags, int prec, int type)
if (prec < 0)
prec = 6;
if (type == 'f' && fabs(x) >= 1e50)
type = 'g';
p = PyOS_double_to_string(x, type, prec,
(flags & F_ALT) ? Py_DTSF_ALT : 0, NULL);
if (p == NULL)