mirror of
https://github.com/python/cpython.git
synced 2025-09-15 13:16:12 +00:00
Issue #532631: Replace confusing fabs(x)/1e25 >= 1e25 test
with fabs(x) >= 1e50, and fix documentation.
This commit is contained in:
parent
310916212e
commit
2e648ecc7d
4 changed files with 4 additions and 4 deletions
|
@ -8286,7 +8286,7 @@ formatfloat(Py_UNICODE *buf,
|
|||
return -1;
|
||||
if (prec < 0)
|
||||
prec = 6;
|
||||
if (type == 'f' && (fabs(x) / 1e25) >= 1e25)
|
||||
if (type == 'f' && fabs(x) >= 1e50)
|
||||
type = 'g';
|
||||
/* Worst case length calc to ensure no buffer overrun:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue