mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
Issue #5859: Remove '%f' to '%g' formatting switch for large floats.
This commit is contained in:
parent
f489caf5da
commit
33841c3489
6 changed files with 27 additions and 19 deletions
|
@ -8808,9 +8808,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