summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-04-17 22:40:53 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-04-17 22:40:53 (GMT)
commit3370cce4dd3f129b51d5c2a7b03af59946513eeb (patch)
tree6690ec30d3bd1a8f7c477cb3e8eb865864d7744a /Misc
parent7efad9ec5a7d60630c9e9378467ed81b14efd57f (diff)
downloadcpython-3370cce4dd3f129b51d5c2a7b03af59946513eeb.zip
cpython-3370cce4dd3f129b51d5c2a7b03af59946513eeb.tar.gz
cpython-3370cce4dd3f129b51d5c2a7b03af59946513eeb.tar.bz2
Issue 5780: Fix test_float failures for legacy style float repr.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS12
1 files changed, 4 insertions, 8 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index d4774dd..f0ed225 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -20,14 +20,7 @@ Core and Builtins
- Implement PEP 378, Format Specifier for Thousands Separator, for
floats.
-- The repr function switches to exponential notation at 1e16, not 1e17
- as it did before. This change applies to both 'short' and legacy
- float repr styles. For the new repr style, it avoids misleading
- output in some cases: an example is repr(2e16+8), which gives
- '2.000000000000001e+16'; without this change it would have produced
- '20000000000000010.0' instead.
-
-- Similarly, the str function switches to exponential notation at
+- The str function switches to exponential notation at
1e11, not 1e12. This avoids printing 13 significant digits in
situations where only 12 of them are correct. Example problem
value: str(1e11 + 0.5). (This minor issue has existed in 2.x for a
@@ -44,6 +37,9 @@ Core and Builtins
finite float x, repr(x) now outputs a string based on the shortest
sequence of decimal digits that rounds to x. Previous behaviour was
to output 17 significant digits and then strip trailing zeros.
+ Another minor difference is that the new repr switches to
+ exponential notation at 1e16 instead of the previous 1e17; this
+ avoids misleading output in some cases.
There's a new sys attribute sys.float_repr_style, which takes
the value 'short' to indicate that we're using short float repr,