summaryrefslogtreecommitdiff
path: root/doc/lispref/objects.texi
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-03-17 21:03:59 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2014-03-17 21:03:59 -0700
commit1917cf46bba74cdd0bcd1d0545cbd688db4e76f9 (patch)
tree35cb5f9bc976ddd97283d32480e69f747a3bcc43 /doc/lispref/objects.texi
parent53e84c5f280e75f7f3a624b01d298f48ea3105aa (diff)
downloademacs-1917cf46bba74cdd0bcd1d0545cbd688db4e76f9.tar.gz
Improve documentation for integer and floating-point basics.
* numbers.texi (Numbers, Integer Basics, Float Basics): Document the basics a bit more precisely. Say more clearly that Emacs floating-point numbers are IEEE doubles on all current platforms. Give more details about frexp. Say more clearly that '1.' is an integer. (Predicates on Numbers): Fix wholenump typo. * objects.texi (Integer Type): Adjust to match numbers.texi.
Diffstat (limited to 'doc/lispref/objects.texi')
-rw-r--r--doc/lispref/objects.texi14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 086abecded1..4e8182ccf34 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -161,8 +161,8 @@ latter are unique to Emacs Lisp.
@node Integer Type
@subsection Integer Type
- The range of values for integers in Emacs Lisp is @minus{}536870912 to
-536870911 (30 bits; i.e.,
+ The range of values for an integer depends on the machine. The
+minimum range is @minus{}536,870,912 to 536,870,911 (30 bits; i.e.,
@ifnottex
@minus{}2**29
@end ifnottex
@@ -176,9 +176,9 @@ to
@tex
@math{2^{29}-1})
@end tex
-on typical 32-bit machines. (Some machines provide a wider range.)
-Emacs Lisp arithmetic functions do not check for overflow. Thus
-@code{(1+ 536870911)} is @minus{}536870912 if Emacs integers are 30 bits.
+but many machines provide a wider range.
+Emacs Lisp arithmetic functions do not check for integer overflow. Thus
+@code{(1+ 536870911)} is @minus{}536,870,912 if Emacs integers are 30 bits.
The read syntax for integers is a sequence of (base ten) digits with an
optional sign at the beginning and an optional period at the end. The
@@ -215,8 +215,8 @@ this records a power of 2 rather than a power of 10.
The printed representation for floating-point numbers requires either
a decimal point (with at least one digit following), an exponent, or
-both. For example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2},
-@samp{1.5e3}, and @samp{.15e4} are five ways of writing a floating-point
+both. For example, @samp{1500.0}, @samp{+15e2}, @samp{15.0e+2},
+@samp{+1500000e-3}, and @samp{.15e4} are five ways of writing a floating-point
number whose value is 1500. They are all equivalent.
@xref{Numbers}, for more information.