diff options
| author | Paul Eggert | 2014-03-17 21:03:59 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-03-17 21:03:59 -0700 |
| commit | 1917cf46bba74cdd0bcd1d0545cbd688db4e76f9 (patch) | |
| tree | 35cb5f9bc976ddd97283d32480e69f747a3bcc43 /doc/lispref/objects.texi | |
| parent | 53e84c5f280e75f7f3a624b01d298f48ea3105aa (diff) | |
| download | emacs-1917cf46bba74cdd0bcd1d0545cbd688db4e76f9.tar.gz emacs-1917cf46bba74cdd0bcd1d0545cbd688db4e76f9.zip | |
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.texi | 14 |
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. | |||
| 161 | @node Integer Type | 161 | @node Integer Type |
| 162 | @subsection Integer Type | 162 | @subsection Integer Type |
| 163 | 163 | ||
| 164 | The range of values for integers in Emacs Lisp is @minus{}536870912 to | 164 | The range of values for an integer depends on the machine. The |
| 165 | 536870911 (30 bits; i.e., | 165 | minimum range is @minus{}536,870,912 to 536,870,911 (30 bits; i.e., |
| 166 | @ifnottex | 166 | @ifnottex |
| 167 | @minus{}2**29 | 167 | @minus{}2**29 |
| 168 | @end ifnottex | 168 | @end ifnottex |
| @@ -176,9 +176,9 @@ to | |||
| 176 | @tex | 176 | @tex |
| 177 | @math{2^{29}-1}) | 177 | @math{2^{29}-1}) |
| 178 | @end tex | 178 | @end tex |
| 179 | on typical 32-bit machines. (Some machines provide a wider range.) | 179 | but many machines provide a wider range. |
| 180 | Emacs Lisp arithmetic functions do not check for overflow. Thus | 180 | Emacs Lisp arithmetic functions do not check for integer overflow. Thus |
| 181 | @code{(1+ 536870911)} is @minus{}536870912 if Emacs integers are 30 bits. | 181 | @code{(1+ 536870911)} is @minus{}536,870,912 if Emacs integers are 30 bits. |
| 182 | 182 | ||
| 183 | The read syntax for integers is a sequence of (base ten) digits with an | 183 | The read syntax for integers is a sequence of (base ten) digits with an |
| 184 | optional sign at the beginning and an optional period at the end. The | 184 | 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. | |||
| 215 | 215 | ||
| 216 | The printed representation for floating-point numbers requires either | 216 | The printed representation for floating-point numbers requires either |
| 217 | a decimal point (with at least one digit following), an exponent, or | 217 | a decimal point (with at least one digit following), an exponent, or |
| 218 | both. For example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2}, | 218 | both. For example, @samp{1500.0}, @samp{+15e2}, @samp{15.0e+2}, |
| 219 | @samp{1.5e3}, and @samp{.15e4} are five ways of writing a floating-point | 219 | @samp{+1500000e-3}, and @samp{.15e4} are five ways of writing a floating-point |
| 220 | number whose value is 1500. They are all equivalent. | 220 | number whose value is 1500. They are all equivalent. |
| 221 | 221 | ||
| 222 | @xref{Numbers}, for more information. | 222 | @xref{Numbers}, for more information. |