summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-03-29 15:19:47 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-03-29 15:19:47 (GMT)
commitc8a608c6668df607638d00771d70b778b91bca81 (patch)
treeef8b929ab797155a6b23f535f5085c89fc60e84e /Objects
parent48e2478329b6be67d7858174d146d65f6ccfe728 (diff)
downloadcpython-c8a608c6668df607638d00771d70b778b91bca81.zip
cpython-c8a608c6668df607638d00771d70b778b91bca81.tar.gz
cpython-c8a608c6668df607638d00771d70b778b91bca81.tar.bz2
Merged revisions 70678 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r70678 | mark.dickinson | 2009-03-29 15:37:51 +0100 (Sun, 29 Mar 2009) | 3 lines Issue #532631: Replace confusing fabs(x)/1e25 >= 1e25 test with fabs(x) >= 1e50, and fix documentation. ........
Diffstat (limited to 'Objects')
-rw-r--r--Objects/stringlib/formatter.h2
-rw-r--r--Objects/unicodeobject.c2
2 files changed, 2 insertions, 2 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
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index bcae239..f15e7cd 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -8847,7 +8847,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: