summaryrefslogtreecommitdiffstats
path: root/Objects/stringlib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-03-29 14:37:51 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-03-29 14:37:51 (GMT)
commit2e648ecc7d7339b0a932a64c521cae8da791bfcd (patch)
treee3fe18c1e8b6f0e1ce332502a343af8b79706568 /Objects/stringlib
parent310916212e3320b3b100ff57bbc4ce5331ca1cfe (diff)
downloadcpython-2e648ecc7d7339b0a932a64c521cae8da791bfcd.zip
cpython-2e648ecc7d7339b0a932a64c521cae8da791bfcd.tar.gz
cpython-2e648ecc7d7339b0a932a64c521cae8da791bfcd.tar.bz2
Issue #532631: Replace confusing fabs(x)/1e25 >= 1e25 test
with fabs(x) >= 1e50, and fix documentation.
Diffstat (limited to 'Objects/stringlib')
-rw-r--r--Objects/stringlib/formatter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/stringlib/formatter.h b/Objects/stringlib/formatter.h
index 2e3e5a6..86235a6 100644
--- a/Objects/stringlib/formatter.h
+++ b/Objects/stringlib/formatter.h
@@ -789,7 +789,7 @@ format_float_internal(PyObject *value,
if (precision < 0)
precision = 6;
- if (type == 'f' && (fabs(x) / 1e25) >= 1e25)
+ if (type == 'f' && fabs(x) >= 1e50)
type = 'g';
/* cast "type", because if we're in unicode we need to pass a