aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorPaul Eggert2017-03-04 23:14:52 -0800
committerPaul Eggert2017-03-04 23:18:39 -0800
commit44e7ee2e356452139156e8175c46f646835d27ff (patch)
tree7b877113c8ad6b9e2d64c560354656f7397b3325 /etc
parent207de3303076bff1bb392bd407fee0dea892fe40 (diff)
downloademacs-44e7ee2e356452139156e8175c46f646835d27ff.tar.gz
emacs-44e7ee2e356452139156e8175c46f646835d27ff.zip
Fewer rounding errors with (format "%f" fixnum)
* etc/NEWS: Document this. * src/editfns.c (styled_format): When formatting integers via a floating-point format, use long double instead of double conversion, if long double’s extra precision might help.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/NEWS b/etc/NEWS
index a8db54c51ef..9c995930fbf 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -907,6 +907,14 @@ compares their numerical values. According to this predicate,
907due to internal rounding errors. For example, (< most-positive-fixnum 907due to internal rounding errors. For example, (< most-positive-fixnum
908(+ 1.0 most-positive-fixnum)) now correctly returns t on 64-bit hosts. 908(+ 1.0 most-positive-fixnum)) now correctly returns t on 64-bit hosts.
909 909
910---
911** On hosts like GNU/Linux x86-64 where a 'long double' fraction
912contains at least EMACS_INT_WIDTH - 3 bits, 'format' no longer returns
913incorrect answers due to internal rounding errors when formatting
914Emacs integers with %e, %f, or %g conversions. For example, on these
915hosts (eql N (string-to-number (format "%.0f" N))) now returns t for
916all Emacs integers N.
917
910+++ 918+++
911** The new function 'char-from-name' converts a Unicode name string 919** The new function 'char-from-name' converts a Unicode name string
912to the corresponding character code. 920to the corresponding character code.