mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
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:
parent
faa25999a3
commit
9dd5e16c5d
6 changed files with 25 additions and 23 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue