summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
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,