diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-03-08 20:55:55 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-03-08 20:57:01 -0800 |
commit | 80e145fc96765cc0a0f48ae2425294c8c92bce56 (patch) | |
tree | 25664bb27068449a082973736e35e1c43bee249b /doc/lispref/numbers.texi | |
parent | cb0f6348956761880069e8ff7ed5086a177a521a (diff) | |
download | emacs-80e145fc96765cc0a0f48ae2425294c8c92bce56.tar.gz |
Avoid losing info when formatting integers
* doc/lispref/numbers.texi (Integer Basics): Clarify that
out-of-range integers are treated as floating point only when the
integers are decimal.
* etc/NEWS: Mention changes.
* src/editfns.c (styled_format): Use %.0f when formatting %d or %i
values outside machine integer range, to avoid losing info.
Signal an error for %o or %x values that are too large to be
formatted, to avoid losing info.
Diffstat (limited to 'doc/lispref/numbers.texi')
-rw-r--r-- | doc/lispref/numbers.texi | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi index e692ee1cc2f..f1180cf754b 100644 --- a/doc/lispref/numbers.texi +++ b/doc/lispref/numbers.texi @@ -53,8 +53,9 @@ but many machines provide a wider range. Many examples in this chapter assume the minimum integer width of 30 bits. @cindex overflow - The Lisp reader reads an integer as a sequence of digits with optional -initial sign and optional final period. An integer that is out of the + The Lisp reader reads an integer as a nonempty sequence +of decimal digits with optional initial sign and optional +final period. A decimal integer that is out of the Emacs range is treated as a floating-point number. @example |