summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-04-18 11:48:33 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-04-18 11:48:33 (GMT)
commite6a076d86c51c9d72fee088dd229a7662ccc6c19 (patch)
tree86dc10e5fbdf54b653ef87d7a6a8ae4425345ce9 /Misc
parent60fd0999cce17ec8603edf4219f686c37a260d7b (diff)
downloadcpython-e6a076d86c51c9d72fee088dd229a7662ccc6c19.zip
cpython-e6a076d86c51c9d72fee088dd229a7662ccc6c19.tar.gz
cpython-e6a076d86c51c9d72fee088dd229a7662ccc6c19.tar.bz2
Issue #1869 (and 4707, 5118, 5473, 1456775): use the new
string <-> float conversion routines to make round(x, n) correctly rounded for floats x, so that it always agrees with format(x, '.<n>f'). Also fix some other round nuisances, like round(123.456, 1-2**31) giving an integer rather than a float.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index f0ed225..295ebd0 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,11 @@ What's New in Python 3.1 beta 1?
Core and Builtins
-----------------
+- Issue #1869 (and many duplicates): make round(x, n) correctly
+ rounded for a float x, by using the decimal <-> binary conversions
+ from Python/dtoa.c. As a consequence, (e.g.) round(x, 2) now
+ consistently agrees with format(x, '.2f').
+
- Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100'.
- Issue #5515: str.format() type 'n' combined with commas and leading